diff --git a/frontend/src/i18n/resources/en-US/ui.json b/frontend/src/i18n/resources/en-US/ui.json index 16d1552fc..23fe015b6 100644 --- a/frontend/src/i18n/resources/en-US/ui.json +++ b/frontend/src/i18n/resources/en-US/ui.json @@ -1654,6 +1654,12 @@ "cancelDescription": "Cancellation stops subsequent steps. Created databases, Skill Spaces, gateways and other registered resources are retained. Retry using the same agent ID.", "background": "Creation continues after closing this window. Open it again to view progress.", "pollFailed": "Progress is temporarily unavailable. Reconnecting; avoid creating another agent.", + "iamPermissionDenied": "The deployment service lacks IAM permissions to prepare the runtime role. Ask an administrator to grant access, then retry.", + "iamTrustConflict": "The runtime role trust is incompatible. Ask an administrator to check VeFaaS and APIG access, then retry.", + "iamPolicyConflict": "An existing runtime policy with the required name has conflicting contents. Ask an administrator to check it, then retry.", + "iamOwnershipConflict": "The runtime role does not belong to the deployment account. Ask an administrator to check it, then retry.", + "iamVerificationFailed": "Runtime role permissions could not be confirmed. Check IAM availability and policies, then retry.", + "iamConfigurationConflict": "Automatic runtime role preparation requires the default MPA role. Check the server creation configuration.", "creationFailed": "This step failed. Check its resources, server configuration and permissions, then retry the same agent ID.", "cancelFailed": "Cancellation failed. Check the current progress and retry.", "cancelled": "Creation cancelled. Registered resources are retained for retry.", @@ -1669,6 +1675,7 @@ }, "stages": { "queued": "Queued", + "iam_role": "Prepare runtime role", "checking": "Checking account and configuration", "network": "Preparing VPC and subnets", "gateway": "Preparing APIG and IM Gateway", diff --git a/frontend/src/i18n/resources/zh-CN/ui.json b/frontend/src/i18n/resources/zh-CN/ui.json index 8e06e6883..0bb1eb2e4 100644 --- a/frontend/src/i18n/resources/zh-CN/ui.json +++ b/frontend/src/i18n/resources/zh-CN/ui.json @@ -1654,6 +1654,12 @@ "cancelDescription": "取消后会停止后续步骤。已创建的数据库、技能空间、网关和其他已登记资源会保留,可使用同一智能体 ID 重试。", "background": "关闭窗口后创建会继续。再次打开可查看进度。", "pollFailed": "暂时无法获取进度,正在重新连接。请勿重复创建其他智能体。", + "iamPermissionDenied": "部署服务没有准备运行角色所需的 IAM 权限,请联系管理员授权后重试。", + "iamTrustConflict": "运行角色的信任关系不符合要求,请管理员检查对 VeFaaS 和 APIG 的授权后重试。", + "iamPolicyConflict": "运行角色所需的同名权限策略内容冲突,请管理员检查后重试。", + "iamOwnershipConflict": "运行角色与当前部署账号不匹配,请管理员检查后重试。", + "iamVerificationFailed": "尚未确认运行角色的权限已就绪,请检查 IAM 服务及策略可用性后重试。", + "iamConfigurationConflict": "自动准备运行角色仅支持默认 MPA 角色,请检查服务端创建配置。", "creationFailed": "当前步骤未完成,请检查对应资源、服务端配置及权限后,用同一智能体 ID 重试。", "cancelFailed": "取消请求失败,请重新查询进度后重试。", "cancelled": "创建已取消,已登记资源保留供重试。", @@ -1669,6 +1675,7 @@ }, "stages": { "queued": "等待开始", + "iam_role": "准备运行角色", "checking": "检查账号与配置", "network": "准备 VPC 和子网", "gateway": "准备 APIG 和 IM Gateway", diff --git a/frontend/tests/mpaCreation.test.tsx b/frontend/tests/mpaCreation.test.tsx index be9f2c621..bc33ae018 100644 --- a/frontend/tests/mpaCreation.test.tsx +++ b/frontend/tests/mpaCreation.test.tsx @@ -922,3 +922,38 @@ it("keeps disabled and loading appearance consistent across shared Button varian css.remove(); } }); + +it("preserves the runtime role stage and actionable IAM error for retry", async () => { + const input = { + region: "cn-beijing", + requestId: "12345678-90ab-4cde-8f01-23456789abcd", + agentId: "mi-1234567890ab4cde8f012345", + description: "", + }; + sessionStorage.setItem( + "mpa-create:cn-beijing", + JSON.stringify({ input, submitted: true, step: 2, taskId: "iam-task" }), + ); + vi.mocked(api.getMpaCreationConfig).mockResolvedValue({ + configured: true, + region: "cn-beijing", + }); + vi.mocked(api.getMpaCreation).mockResolvedValue({ + ...input, + taskId: "iam-task", + state: "failed", + stage: "iam_role", + error: "iamPermissionDenied", + }); + await mount(); + expect(document.body.textContent).toContain( + "myAgents.mpaCreate.stages.iam_role", + ); + expect(document.body.textContent).toContain( + "myAgents.mpaCreate.iamPermissionDenied", + ); + expect(button("retry").disabled).toBe(false); + expect( + JSON.parse(sessionStorage.getItem("mpa-create:cn-beijing")!).input.agentId, + ).toBe(input.agentId); +}); diff --git a/prd-spec/bugfixes/frontend-lockfile-sync/2026-10-09-restore-esbuild-lock-entries.md b/prd-spec/bugfixes/frontend-lockfile-sync/2026-10-09-restore-esbuild-lock-entries.md new file mode 100644 index 000000000..e959f2138 --- /dev/null +++ b/prd-spec/bugfixes/frontend-lockfile-sync/2026-10-09-restore-esbuild-lock-entries.md @@ -0,0 +1,84 @@ +# Restore Frontend esbuild Lock Entries + +[中文版](2026-10-09-restore-esbuild-lock-entries.zh.md) + +## Metadata + +- Change ID: `frontend-lockfile-sync` +- Created: 2026-10-09 +- Revised: 2026-10-09 +- Status: implemented +- Related component specs: none; this change restores generated dependency metadata without changing component contracts + +## Background and Evidence + +Pull request #23 fails the Harness Sidecar Release Gate during `npm ci --ignore-scripts`. The CI log reports that `esbuild@0.28.2` and its platform packages are missing from `frontend/package-lock.json`. + +`frontend/package.json` is identical to `origin/main`. Commit `3f134207` removed 512 lock-file lines, including Vitest's nested esbuild package and platform-specific optional packages, without changing dependency declarations. The confirmed root cause is an incomplete generated lock file. + +## Goals and Non-goals + +### Goals + +- Restore a lock file that is complete for supported CI platforms. +- Make `npm ci --ignore-scripts` and the affected frontend release gate pass. +- Preserve all declared dependency versions and product behavior. + +### Non-goals + +- Change frontend dependencies or version ranges. +- Change Studio UI, runtime behavior, or harness-sidecar contracts. +- Modify unrelated PR #23 implementation files. + +## Scenarios and Requirements + +### Scenario + +Given the unchanged `frontend/package.json`, when CI runs `npm ci --ignore-scripts` on Linux, then npm must resolve the exact lock-file graph without reporting missing esbuild packages. + +- `FR-1`: `frontend/package-lock.json` must contain the dependency graph generated for the current `frontend/package.json`. +- `FR-2`: The fix must not change `frontend/package.json` or component behavior. +- `FR-3`: The affected frontend gate, normal frontend tests, and production build must pass locally. + +## Design and Contract Impact + +Restore `frontend/package-lock.json` to the complete `origin/main` version because `frontend/package.json` is unchanged and the branch-only lock diff consists solely of accidental deletions. + +- Interfaces and state: not applicable; no source contract changes. +- Concurrency and permissions: not applicable. +- Security: no credentials or external inputs are added. +- Compatibility: restores Linux CI compatibility while preserving dependency declarations. +- Component specs: no impact; the change corrects generated package metadata only. +- User documentation: no impact. + +Alternative rejected: running a broad dependency upgrade. It would create unrelated version churn and does not address the confirmed accidental deletion narrowly. + +## Implementation Tasks + +- `T-1` (`FR-1`, `FR-2`): restore `frontend/package-lock.json` from `origin/main`. +- `T-2` (`FR-3`): run the affected installation, coverage, test, and build commands. +- `T-3`: review the final diff for unrelated changes and record verification evidence. + +## Verification and Acceptance + +| Requirement | Task | Acceptance criterion | Verification | Result | +| --- | --- | --- | --- | --- | +| `FR-1` | `T-1` | `AC-1`: npm accepts the lock file | `npm --prefix frontend ci --ignore-scripts` | pass: 695 packages installed | +| `FR-2` | `T-1`, `T-3` | `AC-2`: dependency declarations and component contracts are unchanged | `git diff origin/main -- frontend/package.json` and diff review | pass: no package declaration or contract diff | +| `FR-3` | `T-2` | `AC-3`: affected coverage gate passes | `npm --prefix frontend run test:harness-sidecar-coverage` | pass: 22 tests | +| `FR-3` | `T-2` | `AC-4`: frontend tests pass | `npm --prefix frontend test` | pass: 1,377 Node tests and 65 Vitest tests | +| `FR-3` | `T-2` | `AC-5`: production build passes | `npm --prefix frontend run build` | pass | + +## Risks and Open Questions + +- `npm run build` may regenerate tracked web assets. Any generated diff must be reviewed and retained only if it is required by the current source. +- No open design questions remain. + +## Review and Delivery Record + +- 2026-10-09: Root cause confirmed from PR #23 CI logs and the branch diff. +- 2026-10-09: Design review found no contract, security, compatibility, or testability blocker. +- 2026-10-09: The user approved restoring the complete lock file and running the frontend gates. +- 2026-10-09: Restored the 512 deleted lock-file lines from `origin/main`; installation, affected coverage, complete frontend tests, and production build passed on diff scope `d3370fd1` plus this working-tree fix. +- 2026-10-09: `npm ci` reported existing dependency audit findings (6 low, 3 moderate, 6 high, 1 critical); dependency remediation is outside this lock restoration. +- Commit, push, and PR updates remain separately authorized operations. diff --git a/prd-spec/bugfixes/frontend-lockfile-sync/2026-10-09-restore-esbuild-lock-entries.zh.md b/prd-spec/bugfixes/frontend-lockfile-sync/2026-10-09-restore-esbuild-lock-entries.zh.md new file mode 100644 index 000000000..04d03027f --- /dev/null +++ b/prd-spec/bugfixes/frontend-lockfile-sync/2026-10-09-restore-esbuild-lock-entries.zh.md @@ -0,0 +1,84 @@ +# 恢复前端 esbuild 锁文件条目 + +[English](2026-10-09-restore-esbuild-lock-entries.md) + +## 元数据 + +- 变更 ID:`frontend-lockfile-sync` +- 创建日期:2026-10-09 +- 修订日期:2026-10-09 +- 状态:implemented +- 相关组件规格:无;本变更仅恢复生成的依赖元数据,不改变组件契约 + +## 背景与证据 + +PR #23 在 Harness Sidecar Release Gate 的 `npm ci --ignore-scripts` 阶段失败。CI 日志报告 `frontend/package-lock.json` 缺少 `esbuild@0.28.2` 及其平台包。 + +`frontend/package.json` 与 `origin/main` 完全一致。提交 `3f134207` 在未修改依赖声明的情况下删除了 512 行锁文件内容,其中包括 Vitest 嵌套的 esbuild 包和平台专属可选包。已确认的根因是生成的锁文件不完整。 + +## 目标与非目标 + +### 目标 + +- 恢复对受支持 CI 平台完整的锁文件。 +- 使 `npm ci --ignore-scripts` 和受影响的前端发布 gate 通过。 +- 保持所有声明的依赖版本和产品行为不变。 + +### 非目标 + +- 修改前端依赖或版本范围。 +- 修改 Studio UI、运行时行为或 harness-sidecar 契约。 +- 修改 PR #23 中无关的实现文件。 + +## 场景与需求 + +### 场景 + +给定未变化的 `frontend/package.json`,当 CI 在 Linux 上运行 `npm ci --ignore-scripts` 时,npm 必须能够解析精确的锁文件依赖图,并且不报告缺少 esbuild 包。 + +- `FR-1`:`frontend/package-lock.json` 必须包含当前 `frontend/package.json` 对应的完整依赖图。 +- `FR-2`:修复不得改变 `frontend/package.json` 或组件行为。 +- `FR-3`:受影响的前端 gate、常规前端测试和生产构建必须在本地通过。 + +## 设计与契约影响 + +将 `frontend/package-lock.json` 恢复为完整的 `origin/main` 版本,因为 `frontend/package.json` 未变化,且分支独有的锁文件差异仅包含意外删除。 + +- 接口与状态:不适用;没有源码契约变更。 +- 并发与权限:不适用。 +- 安全:不新增凭据或外部输入。 +- 兼容性:恢复 Linux CI 兼容性,同时保持依赖声明不变。 +- 组件规格:无影响;本变更只修正生成的包元数据。 +- 用户文档:无影响。 + +已拒绝的替代方案:执行广泛的依赖升级。该方案会产生无关的版本变动,且不能精确解决已确认的意外删除。 + +## 实施任务 + +- `T-1`(`FR-1`、`FR-2`):从 `origin/main` 恢复 `frontend/package-lock.json`。 +- `T-2`(`FR-3`):运行受影响的安装、覆盖率、测试和构建命令。 +- `T-3`:检查最终差异是否存在无关变更,并记录验证证据。 + +## 验证与验收 + +| 需求 | 任务 | 验收标准 | 验证命令 | 结果 | +| --- | --- | --- | --- | --- | +| `FR-1` | `T-1` | `AC-1`:npm 接受锁文件 | `npm --prefix frontend ci --ignore-scripts` | pass:安装 695 个包 | +| `FR-2` | `T-1`、`T-3` | `AC-2`:依赖声明和组件契约未变化 | `git diff origin/main -- frontend/package.json` 和差异审查 | pass:无依赖声明或契约差异 | +| `FR-3` | `T-2` | `AC-3`:受影响的覆盖率 gate 通过 | `npm --prefix frontend run test:harness-sidecar-coverage` | pass:22 项测试 | +| `FR-3` | `T-2` | `AC-4`:前端测试通过 | `npm --prefix frontend test` | pass:1,377 项 Node 测试和 65 项 Vitest 测试 | +| `FR-3` | `T-2` | `AC-5`:生产构建通过 | `npm --prefix frontend run build` | pass | + +## 风险与待决问题 + +- `npm run build` 可能重新生成已跟踪的 Web 资产。必须审查所有生成差异,只保留当前源码确实需要的内容。 +- 没有待决设计问题。 + +## 审查与交付记录 + +- 2026-10-09:根据 PR #23 CI 日志和分支差异确认根因。 +- 2026-10-09:设计审查未发现契约、安全、兼容性或可测试性阻塞项。 +- 2026-10-09:用户批准恢复完整锁文件并运行前端 gate。 +- 2026-10-09:从 `origin/main` 恢复被删除的 512 行锁文件内容;在 `d3370fd1` 加本工作区修复的差异范围内,依赖安装、受影响的覆盖率、完整前端测试和生产构建均通过。 +- 2026-10-09:`npm ci` 报告既有依赖审计问题(6 个 low、3 个 moderate、6 个 high、1 个 critical);依赖修复不属于本次锁文件恢复范围。 +- 提交、推送和更新 PR 仍需单独授权。 diff --git a/prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.md b/prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.md new file mode 100644 index 000000000..df6ee167e --- /dev/null +++ b/prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.md @@ -0,0 +1,56 @@ +# Restore main MPA creation image defaults + +[中文版](2026-10-09-restore-main-images.zh.md) + +- Change ID: `restore-main-images` +- Date: 2026-10-09 +- Status: approved by the user's explicit request to withdraw public image discovery; implemented and locally verified; not committed or pushed. + +## Background and evidence + +A Worker CreateTool request failed with `InvalidParameter.ImageUrl` after Studio selected a public image using a digest reference. The user requires withdrawing the public registry discovery change and following main's two `/mpa/` `:latest` defaults. The earlier creation-page correction already follows main. + +## Scope, scenarios and requirements + +- FR-1: Restore built-in MPA image `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_agent:latest` and Worker image `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_codex_worker:latest`. Config inspection and POST use local profile defaults, without registry queries or digest conversion. +- FR-2: Restore main's creation dialog/client wiring and regressions. Remove discovery-only resolver, fixtures, tests, request-image helper and timeout/query extensions. Keep legacy explicit API images and pre-existing first-submission image snapshots. +- FR-3: Preserve STS-derived deployment account, automatic IAM preparation, network/APIG fixes, independent Worker creation, safe IAM diagnostics and main's named creation/basic details. +- FR-4: Reconcile bilingual specs/docs and regenerate packaged WebUI assets. Remove the withdrawn feature's documentation and accidental Vite cache artifact. + +Non-goals: database/task/registry edits, clearing pending intents, live deployment, migration, committing or pushing. An old failed request may still contain the rejected digest in its immutable snapshot; it must not silently change on retry. A fresh request uses the restored defaults. `latest` is mutable and does not guarantee immutable image content across time. + +## Design, affected files and contract assessment + +Restore main versions of Studio routes, API client, dialog and image/name tests; retain IAM regression coverage. Change only image settings in `managed/studio_profile.py`, preserving its new-account/IAM/reference-free settings. Remove `frontend/server/mpa_creation_images.py`, discovery-only tests/conftest, and `CreationTasks.request_images`. Keep `CreationTasks.start` snapshot semantics unchanged. Current ownership/API defaults are maintained by [Studio creation CON-1/CON-9](../../../specs/studio-mpa-creation/README.md); restore their local-default contract in both languages. Other resource contracts are unchanged. Remove the superseded public-image PRD pair and point current specs to this correction. + +## Tasks, tests and acceptance + +1. T-1 / FR-1: Restore main's route/name regression expectations and observe failure against the discovery implementation. +2. T-2 / FR-1–FR-3: Withdraw discovery wiring and restore defaults; assert other branch behavior remains in the diff. +3. T-3 / FR-4: Synchronize documents and build assets; run creation/CLI Python tests, changed-file Ruff/Pyright, frontend tests/build/i18n/assets, pre-commit and an isolated browser flow. + +Acceptance: exact default URLs in config and new task snapshots, no discovery code references or network dependency, unchanged legacy snapshots/owner isolation, main form without image fields, intact new-account changes, passing affected gates. No cloud writes are needed to prove the rollback; live cloud pull/readiness remains unverified. + +## Review and risks + +`review-spec` is unavailable; direct review covers scope, bilingual equivalence, compatibility, ownership, secret exclusion, retries, cancellation and tests. The user explicitly approved withdrawal; no further approval is required for this bounded rollback. Existing failed digest snapshots and mutable latest tags are the known limits. No blockers. + +## Verification + +Scope: uncommitted rollback against `df797f94`, using `origin/main` at `f6ed8ffa` as the reference. Execution date: 2026-10-09. T-1–T-3 and FR-1–FR-4 are complete within local rollback scope. + +| Check | Outcome | Evidence | +| --- | --- | --- | +| Regression first | pass | Restored `test_new_creation_generates_owner_scoped_id_and_latest_images` and `test_authorized_config_returns_defaults_and_task_freezes_them`; both failed before withdrawal and pass after it. | +| `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_cli_mpa.py -n 2 -q` | pass | 614 passed, 10 warnings; 2 workers selected for the local machine. | +| `npm --prefix frontend test` | pass | 1,377 Node tests and 65 Vitest tests passed; no skips. Covers recovery, retry, errors, cancellation, loading, keyboard/IME and owner isolation. | +| `npm --prefix frontend run build` | pass | App and widget built, packaged assets regenerated. Existing chunk-size/dependency warnings remain non-blocking. | +| `npm --prefix frontend run check:i18n` / `run test:webui-assets` | pass | 2 locales / 21 namespaces; 113 files and 350 internal references verified. | +| Changed-file Ruff / Pyright | pass | `uvx --from ruff==0.11.12 ruff check` and `uvx pyright --pythonpath .venv/bin/python` for the route, profile, tasks and two restored test modules: no findings. | +| `uv run --extra dev pre-commit run --all-files` | pass | Ruff check/format, hardcoded secret detection and YAML secret scanning passed. | +| Isolated real browser | pass | Mock configuration only: name required, description preserved, all three steps, no image inputs; final create entry enabled. 390×844 viewport has no horizontal overflow. No real submission; temporary files, tab and Vite process removed. | +| Contract/diff review | pass | Route/client/dialog match main; profile retains STS/IAM/reference-free differences, tasks retain IAM diagnostics. No runtime discovery references or dangling withdrawn-PRD links. Bilingual identifiers and links checked; `git diff --check` passed. | +| Real cloud creation / pull readiness | not_run | No cloud mutation authorized for this rollback. Existing failed task snapshots were not edited; start a fresh request after reloading Studio to use new defaults. | +| Full SDK regression / harness smoke | not_applicable | This rollback affects only managed Studio image selection and restores main contracts; shared SDK and sidecar behavior are unchanged. | + +Local tests prove default selection and compatibility, not that cloud services accept or can pull either mutable tag. The user's existing Studio process was not restarted. diff --git a/prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.zh.md b/prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.zh.md new file mode 100644 index 000000000..7c102fe39 --- /dev/null +++ b/prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.zh.md @@ -0,0 +1,56 @@ +# 恢复 main 的 MPA 创建镜像默认值 + +[English](2026-10-09-restore-main-images.md) + +- Change ID:`restore-main-images` +- 日期:2026-10-09 +- 状态:用户明确要求撤回公开镜像查询,已批准;已实施并完成本地验证;未提交或推送。 + +## 背景与证据 + +Studio 通过 digest 引用选择公开镜像后,Worker CreateTool 请求返回 `InvalidParameter.ImageUrl`。用户要求撤回公开仓库查询改动,并遵循 main 的两个 `/mpa/` `:latest` 默认镜像。此前创建页面修正已遵循 main。 + +## 范围、场景与需求 + +- FR-1:恢复内置 MPA 镜像 `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_agent:latest` 和 Worker 镜像 `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_codex_worker:latest`。配置检查和 POST 使用本地 profile 默认值,不查询仓库或转换 digest。 +- FR-2:恢复 main 的创建弹窗/客户端接线和回归。删除仅供查询使用的解析器、fixture、测试、请求镜像查询方法及超时/查询参数扩展。保留旧 API 显式镜像和此前已有的首次提交镜像快照。 +- FR-3:保留 STS 推导部署账号、自动 IAM 准备、网络/APIG 修复、独立 Worker 创建、安全 IAM 诊断,以及 main 的名称创建/基本详情。 +- FR-4:同步双语契约/说明并重新生成 WebUI 产物。删除已撤回功能的文档及误提交的 Vite 缓存产物。 + +非目标:修改数据库/任务/注册库、清空未完成意图、真实部署、迁移、提交或推送。旧失败请求的不可变快照可能仍包含被拒绝的 digest;重试不得静默更换。新请求使用恢复的默认值。`latest` 可变,不能保证不同时刻镜像内容不变。 + +## 设计、影响文件与契约评估 + +恢复 main 版本的 Studio 路由、API 客户端、弹窗及镜像/名称测试;保留 IAM 回归覆盖。仅调整 `managed/studio_profile.py` 的镜像设置,保留新账号/IAM/无参考模板配置。删除 `frontend/server/mpa_creation_images.py`、仅用于仓库查询的测试/conftest,以及 `CreationTasks.request_images`。`CreationTasks.start` 快照语义不变。当前归属/API 默认值由 [Studio 创建 CON-1/CON-9](../../../specs/studio-mpa-creation/README.zh.md) 维护;双语均恢复本地默认值合同。其他资源合同不变。删除已取代的公开镜像 PRD,当前契约改为链接此次修正。 + +## 任务、测试与验收 + +1. T-1 / FR-1:恢复 main 路由/名称回归期望,先在查询实现上观察失败。 +2. T-2 / FR-1–FR-3:撤回查询接线并恢复默认值;通过 diff 确认本分支其他行为保留。 +3. T-3 / FR-4:同步文档并构建产物;运行创建/CLI Python 测试、改动文件 Ruff/Pyright、前端测试/构建/i18n/产物、pre-commit 及隔离浏览器流程。 + +验收:配置和新任务快照中包含准确的默认 URL,无查询代码引用或仓库网络依赖,旧快照/owner 隔离不变,main 表单不提供镜像字段,新账号改动完整保留,受影响检查通过。无需云写入证明撤回;真实云端拉取/就绪仍未验证。 + +## 审查与风险 + +`review-spec` 不可用;直接审查覆盖范围、双语等价、兼容性、归属、密钥排除、重试、取消和测试。用户明确批准撤回,此范围内无需再次批准。旧失败 digest 快照和可变 latest 标签是已知限制,无阻塞项。 + +## 验证 + +范围:相对 `df797f94` 的未提交撤回,参考 `origin/main` 的 `f6ed8ffa`。执行日期:2026-10-09。T-1–T-3、FR-1–FR-4 在本地撤回范围内完成。 + +| 检查 | 结果 | 证据 | +| --- | --- | --- | +| 回归先行 | pass | 恢复 `test_new_creation_generates_owner_scoped_id_and_latest_images` 与 `test_authorized_config_returns_defaults_and_task_freezes_them`;撤回前两项失败,撤回后通过。 | +| `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_cli_mpa.py -n 2 -q` | pass | 614 项通过,10 条警告;本机采用 2 个 worker。 | +| `npm --prefix frontend test` | pass | 1,377 项 Node 测试与 65 项 Vitest 测试通过,无跳过。覆盖恢复、重试、错误、取消、加载、键盘/IME 和 owner 隔离。 | +| `npm --prefix frontend run build` | pass | App 与 widget 构建通过,包内产物已重新生成。已有包体积/依赖警告不阻塞。 | +| `npm --prefix frontend run check:i18n` / `run test:webui-assets` | pass | 2 种语言 / 21 个 namespace;验证 113 个文件及 350 个内部引用。 | +| 改动文件 Ruff / Pyright | pass | 对路由、profile、tasks 和两个恢复的测试模块运行 `uvx --from ruff==0.11.12 ruff check` 与 `uvx pyright --pythonpath .venv/bin/python`:无问题。 | +| `uv run --extra dev pre-commit run --all-files` | pass | Ruff check/format、硬编码密钥检测和 YAML 密钥扫描通过。 | +| 隔离真实浏览器 | pass | 仅模拟配置:名称必填、描述保留、三步流程、无镜像输入;最终创建入口可用。390×844 窗口无横向溢出。未实际提交;临时文件、标签和 Vite 进程已清理。 | +| 契约/diff 审查 | pass | 路由/客户端/弹窗与 main 一致;profile 保留 STS/IAM/无参考模板差异,tasks 保留 IAM 诊断。无运行时查询引用或已撤回 PRD 的悬空链接。双语标识符、链接已核对;`git diff --check` 通过。 | +| 真实云创建 / 拉取就绪 | not_run | 此次撤回未授权云修改。未编辑旧失败任务快照;重载 Studio 后新建请求以使用新默认值。 | +| 全量 SDK 回归 / harness smoke | not_applicable | 此次仅撤回托管 Studio 镜像选择并恢复 main 合同;共享 SDK 与 sidecar 行为不变。 | + +本地测试证明默认值选择和兼容性,不证明云服务接受或可拉取这两个可变标签。未重启用户现有 Studio 进程。 diff --git a/prd-spec/bugfixes/mpa-iam-timeout-compat/2026-10-09-python310-timeout.md b/prd-spec/bugfixes/mpa-iam-timeout-compat/2026-10-09-python310-timeout.md new file mode 100644 index 000000000..8837a6b31 --- /dev/null +++ b/prd-spec/bugfixes/mpa-iam-timeout-compat/2026-10-09-python310-timeout.md @@ -0,0 +1,82 @@ +# Preserve IAM Timeout Semantics on Python 3.10 + +[中文版](2026-10-09-python310-timeout.zh.md) + +## Metadata + +- Change ID: `mpa-iam-timeout-compat` +- Created: 2026-10-09 +- Revised: 2026-10-09 +- Status: implemented +- Related component specs: none; the existing IAM failure contract is preserved + +## Background and Evidence + +PR #23 fails the Python 3.10 unit-test job in +`test_readback_timeout_and_cancellation_keep_resources`. The managed MPA IAM +reconciler wraps `asyncio.wait_for()` with `except TimeoutError`. On Python +3.10, `asyncio.wait_for()` raises `asyncio.TimeoutError`, which is not caught by +the built-in `TimeoutError` handler. Python 3.11 and newer alias these exception +types, which hid the compatibility defect in newer local environments. + +The CI result was 6,497 passed and one failed. The uncaught timeout escapes +instead of being translated to the existing `IamError` with +`iamVerificationFailed`. + +## Goals and Non-goals + +### Goals + +- Preserve the existing IAM verification failure behavior on Python 3.10. +- Keep cancellation propagation and resource retention unchanged. +- Make the existing regression test pass on Python 3.10 and current Python. + +### Non-goals + +- Change IAM resources, permissions, retry timing, or reconciliation order. +- Change the public error contract or add a new fallback. +- Modify unrelated MPA behavior. + +## Requirements and Design + +- `FR-1`: A timeout from `asyncio.wait_for()` must be translated to the existing + `IamError`. +- `FR-2`: Caller cancellation must continue to propagate as + `asyncio.CancelledError`. +- `FR-3`: The fix must work on Python 3.10 and Python 3.12 without changing + functional IAM logic. + +Use `except asyncio.TimeoutError` at the existing translation boundary. This is +the exception raised by `asyncio.wait_for()` on Python 3.10 and remains +compatible with newer Python versions. + +Component contract impact: none. The implementation is corrected to satisfy the +already-tested timeout and cancellation contract. No interfaces, configuration, +permissions, persistence, security boundaries, or user documentation change. + +## Tasks and Acceptance + +| Requirement | Task | Acceptance | Verification | Result | +| --- | --- | --- | --- | --- | +| `FR-1` | `T-1`: reproduce before the fix | Python 3.10 exposes the uncaught timeout | Python 3.10 targeted pytest | pass: reproduced the uncaught `asyncio.TimeoutError` | +| `FR-1`, `FR-3` | `T-2`: use `asyncio.TimeoutError` | Existing timeout translation passes | Python 3.10 and 3.12 targeted pytest | pass: 13 tests on each version | +| `FR-2` | `T-2` | Existing cancellation assertion passes | Same targeted pytest | pass | +| `FR-3` | `T-3`: static verification | Changed Python file is clean | Ruff and Pyright | pass | + +## Risks and Open Questions + +- Risk is limited to the exception selector at the existing timeout boundary. +- No open questions remain. + +## Review and Delivery Record + +- 2026-10-09: CI traceback confirmed the Python 3.10 exception mismatch. +- 2026-10-09: Design review found no contract, security, or compatibility + blocker. +- 2026-10-09: The user approved a compatibility-only fix and explicitly + requested no functional behavior change. +- 2026-10-09: Python 3.10 reproduced the failure before the fix. After the + one-line exception qualification, the IAM tests passed on Python 3.10.20 and + Python 3.12.13 (13 tests each), the Python 3.12 managed MPA suite passed (664 + tests), and Ruff 0.11.12 and Pyright passed. +- Commit and push require separate authorization. diff --git a/prd-spec/bugfixes/mpa-iam-timeout-compat/2026-10-09-python310-timeout.zh.md b/prd-spec/bugfixes/mpa-iam-timeout-compat/2026-10-09-python310-timeout.zh.md new file mode 100644 index 000000000..ea72e17fe --- /dev/null +++ b/prd-spec/bugfixes/mpa-iam-timeout-compat/2026-10-09-python310-timeout.zh.md @@ -0,0 +1,73 @@ +# 在 Python 3.10 保持 IAM 超时语义 + +[English](2026-10-09-python310-timeout.md) + +## 元数据 + +- 变更 ID:`mpa-iam-timeout-compat` +- 创建日期:2026-10-09 +- 修订日期:2026-10-09 +- 状态:implemented +- 相关组件规格:无;保持现有 IAM 失败契约 + +## 背景与证据 + +PR #23 的 Python 3.10 单元测试任务在 +`test_readback_timeout_and_cancellation_keep_resources` 失败。托管 MPA IAM +协调器使用 `except TimeoutError` 包裹 `asyncio.wait_for()`。在 Python 3.10 +中,`asyncio.wait_for()` 抛出 `asyncio.TimeoutError`,不会被内置 +`TimeoutError` 处理器捕获。Python 3.11 及更高版本将这两个异常类型设为别名, +因此较新的本地环境掩盖了这个兼容性缺陷。 + +CI 结果为 6,497 项通过、1 项失败。未捕获的超时直接逸出,而没有转换为现有的 +`IamError` 和 `iamVerificationFailed`。 + +## 目标与非目标 + +### 目标 + +- 在 Python 3.10 保持现有 IAM 校验失败行为。 +- 保持取消传播和资源保留行为不变。 +- 使现有回归测试在 Python 3.10 和当前 Python 上通过。 + +### 非目标 + +- 修改 IAM 资源、权限、重试时间或协调顺序。 +- 修改公开错误契约或增加新回退行为。 +- 修改无关 MPA 行为。 + +## 需求与设计 + +- `FR-1`:`asyncio.wait_for()` 的超时必须转换为现有 `IamError`。 +- `FR-2`:调用方取消必须继续以 `asyncio.CancelledError` 传播。 +- `FR-3`:修复必须同时适用于 Python 3.10 和 Python 3.12,且不改变 IAM 功能逻辑。 + +在现有转换边界使用 `except asyncio.TimeoutError`。这是 Python 3.10 中 +`asyncio.wait_for()` 抛出的异常,并且与较新 Python 版本兼容。 + +组件契约影响:无。实现被修正为满足已有测试覆盖的超时和取消契约。接口、配置、 +权限、持久化、安全边界和用户文档均不变化。 + +## 任务与验收 + +| 需求 | 任务 | 验收标准 | 验证 | 结果 | +| --- | --- | --- | --- | --- | +| `FR-1` | `T-1`:修复前复现 | Python 3.10 暴露未捕获超时 | Python 3.10 目标 pytest | pass:复现未捕获的 `asyncio.TimeoutError` | +| `FR-1`、`FR-3` | `T-2`:使用 `asyncio.TimeoutError` | 现有超时转换测试通过 | Python 3.10 和 3.12 目标 pytest | pass:两个版本各 13 项 | +| `FR-2` | `T-2` | 现有取消断言通过 | 同一目标 pytest | pass | +| `FR-3` | `T-3`:静态验证 | 修改的 Python 文件检查通过 | Ruff 和 Pyright | pass | + +## 风险与待决问题 + +- 风险仅限于现有超时边界的异常选择器。 +- 没有待决问题。 + +## 审查与交付记录 + +- 2026-10-09:CI traceback 确认 Python 3.10 异常类型不匹配。 +- 2026-10-09:设计审查未发现契约、安全或兼容性阻塞项。 +- 2026-10-09:用户批准仅做兼容性修复,并明确要求不改变功能行为。 +- 2026-10-09:修复前在 Python 3.10 复现失败。完成一行异常类型限定后, + IAM 测试在 Python 3.10.20 和 Python 3.12.13 各通过 13 项,Python 3.12 + 托管 MPA 测试通过 664 项,Ruff 0.11.12 和 Pyright 均通过。 +- 提交和推送需要单独授权。 diff --git a/prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.md b/prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.md new file mode 100644 index 000000000..123313f62 --- /dev/null +++ b/prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.md @@ -0,0 +1,56 @@ +# Managed network description and rejected-intent recovery + +[中文版](2026-10-09-valid-network-marker.zh.md) + +Change ID: mpa-network-description. Created/revised: 2026-10-09. Status: implemented. + +## Evidence, goals and scope + +A fresh-account creation fails at `network`: CloudTrail confirms `CreateVpc` returned `InvalidDescription.Malformed`. The shared registry retains a VPC intent with `vpc_dispatched=false`, no VPC ID, and a colon-containing ownership description. VPC/subnet description rules do not allow colons: [CreateVpc](https://docs.volcengine.com/docs/VirtualPrivateCloud/CreateVpc-CreatingaVPC?lang=en), [CreateSubnet](https://docs.volcengine.com/docs/VirtualPrivateCloud/CreateSubnet-Creatingasubnet?lang=en). Preserve the verified account/region ownership hash and names. No credentials or raw audit payloads are recorded here. + +The user requested correction after the diagnosis, approving this bounded fix. No frontend, IAM, PG, APIG, Runtime/chat or image changes; no live cloud creation or database maintenance performed by the coding agent. Deployment itself still requires an authorized create/retry request. + +## Requirements and scenarios + +- FR-1: New VPC/subnet requests use `mpa-account-network-v1-` as Description, preserving names, account/region hash and ownership validation. +- FR-2: A persisted old description-only intent can change to the new description only when the dispatch flag is explicitly false, no resource ID is recorded and name discovery has no matching resource. Other request fields must match exactly. Generate a new ClientToken because the body changes; persist before dispatch under the existing lock. +- FR-3: Uncertain/in-flight old intents cannot issue another Create. Matching discovered old resources may be recovered. Both exact old and new scope markers are accepted for ownership; unrelated descriptions, wrong accounts, CIDRs, VPCs or zones remain errors. Existing resources are not rewritten, deleted or recreated. +- FR-4: Same-body definite permission rejection retains its ClientToken as before. Cancellation/timeout retain intent and avoid duplicate creation. + +Scenarios: fresh account passes provider description validation; a rejected old VPC/subnet intent resumes with corrected description and new token; changed CIDR/project/zone remains rejected; unknown outcome without a discovered resource fails closed; old resources are reused from registry or by exact scoped name/marker. + +## Design and affected files + +`managed/network.py` owns legal/legacy scope markers and exact-description-only compatibility in `_create`. Existing resource wait and ownership checks accept only the two scoped markers. The existing `NetworkCloudError` definite-rejection flag is the evidence for recovery; absence of the flag is not evidence of rejection. No new tables or APIs. No errors are converted into success. + +Component contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md), [Runtime provisioning](../../../specs/mpa-runtime-provisioning/README.md). Update both languages and managed READMEs. Tests live in `tests/integrations/mpa_managed/test_deployment_network.py` with isolated cloud/registry fakes. + +## Tasks and acceptance + +| Requirement | Task | Acceptance | +| --- | --- | --- | +| FR-1 | T-1: failing provider-format regression then legal marker | AC-1: both create payloads satisfy allowed description characters | +| FR-2 | T-2: exact rejected-intent recovery | AC-2: same agent retries successfully; only description/token change, saved before dispatch | +| FR-3, FR-4 | T-3: compatibility and safety tests | AC-3: old recovery/reuse, no duplicate unknown creates, changed-input rejection, same-body token preservation | +| FR-1–4 | T-4: bilingual reconciliation and checks | AC-4: managed regressions, Ruff/Pyright and secret/diff checks pass | + +Commands: `uv run --extra dev pytest tests/integrations/mpa_managed`; changed-file Ruff/Pyright and pre-commit. Frontend/build/browser/sidecar checks are not_applicable: no frontend or sidecar changes. Full-repository checks and live smoke are reported separately; no commit or deployment requested. + +## Review, approval and risks + +Direct review (review-spec unavailable): exact scoped compatibility, false-versus-missing dispatch distinction, new token for changed body, locked durable save before cloud call, resource ownership and partial failure all reviewed. Bilingual equivalence reviewed; no blockers. Approval: user requested this fix after the proposed description/rejected-intent solution. Existing resources are retained. A legacy intent with unknown outcome may still need operator reconciliation; never reset it to claim success. Verification recorded below. + +## Verification and delivery record + +2026-10-09, working tree based on `ef0ad519`, scoped to network descriptions/recovery. Earlier IAM/account work and unrelated user changes are preserved. + +- pass: test-first provider-format regressions produced 3 expected failures (`InvalidDescription.Malformed`) before the code change. +- pass: `uv run --extra dev pytest tests/integrations/mpa_managed/test_deployment_network.py tests/integrations/mpa_managed/test_deployment_network_cloud.py -q`: 62 passed, including VPC and subnet rejected-intent correction, unknown outcome discovery/blocking, legacy reuse, payload conflict and same-body token preservation. +- pass: final `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py -q`: 508 passed; existing dependency deprecation warnings only. +- pass: `uvx --from ruff==0.11.12 ruff check` and `ruff format --check` for the two changed Python files. Final `uvx pyright --pythonpath .venv/bin/python veadk/integrations/mpa/managed/network.py tests/integrations/mpa_managed/test_deployment_network.py`: 0 errors, 0 warnings. An initial test-fixture dictionary inference error was fixed with an in-place update; no production typing bypass. +- pass: changed-file `uv run --extra dev pre-commit run --files` for Python and bilingual documents: Ruff/check/format and hardcoded-secret scan passed. YAML scan not_applicable (no YAML changes). +- pass: paired identifiers, relative design links and `git diff --check`. Reconciled the Studio configuration sentence with the preceding STS-account fix. +- not_applicable: frontend tests/build/browser, generated web assets and sidecar gates; no UI or sidecar change. +- not_run: full-repository regression/all-files pre-commit because no commit is requested and the change is limited to provisioning; live retry/cloud mutation because the user will submit the create/retry request. The diagnostic audit was read-only, not a successful creation smoke. + +Review complete: other inputs remain immutable, exact old/new scope markers only, no reset of unknown dispatch, changed-body tokens are regenerated and persisted before the cloud call. AC-1–4 met by isolated checks; full live creation is not claimed. Existing resources and records are retained until an authorized retry performs the bounded intent correction. diff --git a/prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.zh.md b/prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.zh.md new file mode 100644 index 000000000..da486a521 --- /dev/null +++ b/prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.zh.md @@ -0,0 +1,56 @@ +# 托管网络合法描述与拒绝意图恢复 + +[English](2026-10-09-valid-network-marker.md) + +变更 ID:mpa-network-description。创建/修订日期:2026-10-09。状态:implemented。 + +## 证据、目标与范围 + +新账号创建在 `network` 失败:CloudTrail 确认 `CreateVpc` 返回 `InvalidDescription.Malformed`。共享注册表保留 `vpc_dispatched=false`、无 VPC ID、描述含冒号的 VPC 意图。VPC/子网描述规则不允许冒号:[CreateVpc](https://docs.volcengine.com/docs/VirtualPrivateCloud/CreateVpc-CreatingaVPC?lang=en)、[CreateSubnet](https://docs.volcengine.com/docs/VirtualPrivateCloud/CreateSubnet-Creatingasubnet?lang=en)。保留核验账号/地域的归属哈希及名称。此处不记录凭据或原始审计载荷。 + +用户在诊断后要求修正,批准本次限定修复。不改变前端、IAM、PG、APIG、Runtime/聊天或镜像;编码代理不执行真实云创建或数据库维护。真实部署仍通过获授权的创建/重试请求执行。 + +## 需求与场景 + +- FR-1:新 VPC/子网请求以 `mpa-account-network-v1-` 为 Description,保留名称、账号/地域哈希及归属校验。 +- FR-2:持久化旧意图仅描述不同,且派发标记明确为 false、无已登记资源 ID、按名称查询无匹配资源时,才能改为新描述。其他请求字段必须完全一致。因请求体改变,生成新的 ClientToken;在现有锁内先保存后派发。 +- FR-3:结果不确定/在途旧意图不得再次 Create。可恢复查询到的旧资源。归属仅接受当前范围精确的旧/新标记;无关描述、错误账号、CIDR、VPC 或可用区仍失败。已有资源不改写、不删除、不重建。 +- FR-4:相同请求体被明确拒绝权限时仍保留原 ClientToken。取消/超时保留意图,避免重复创建。 + +场景:新账号通过服务商描述校验;旧 VPC/子网拒绝意图以修正描述和新 token 恢复;CIDR/项目/可用区改变仍拒绝;结果不确定且查询无资源时安全失败;旧资源从注册表或精确范围名称/标记恢复复用。 + +## 设计与受影响文件 + +`managed/network.py` 管理合法/旧范围标记及 `_create` 内仅描述不同的精确兼容。现有资源等待和归属检查只接受这两个范围标记。现有 `NetworkCloudError` 明确拒绝派发标记作为恢复证据;标记缺失不代表明确拒绝。不新增表或 API,不将错误转换成成功。 + +组件契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md)、[Runtime 部署](../../../specs/mpa-runtime-provisioning/README.zh.md)。同步双语版本及 managed README。测试位于 `tests/integrations/mpa_managed/test_deployment_network.py`,使用隔离云端/注册表夹具。 + +## 任务与验收 + +| 需求 | 任务 | 验收 | +| --- | --- | --- | +| FR-1 | T-1:服务商格式失败回归及合法标记 | AC-1:两种创建载荷满足描述允许字符 | +| FR-2 | T-2:精确拒绝意图恢复 | AC-2:同一智能体可重试成功;仅描述/token 改变,并先保存后派发 | +| FR-3、FR-4 | T-3:兼容及安全测试 | AC-3:旧资源恢复/复用、结果不确定不重复创建、输入变化拒绝、相同请求 token 保留 | +| FR-1–4 | T-4:双语同步及检查 | AC-4:managed 回归、Ruff/Pyright、密钥/差异检查通过 | + +命令:`uv run --extra dev pytest tests/integrations/mpa_managed`,变更文件 Ruff/Pyright 和 pre-commit。前端/构建/浏览器/sidecar 检查为 not_applicable:没有前端或 sidecar 改动。全仓检查及真实 smoke 单独记录;未请求提交或部署。 + +## 审查、批准与风险 + +直接审查(review-spec 不可用):已检查精确范围兼容、false 与标记缺失的区别、变更请求体使用新 token、云调用前锁内持久化、资源归属及部分失败。双语语义等价,无阻塞项。批准来源:用户在获知描述/拒绝意图修复方案后要求修复。保留已有资源。结果不确定的旧意图仍可能需要运维核对,不重置它来宣称成功。验证记录见下。 + +## 验证与交付记录 + +2026-10-09,基于 `ef0ad519` 工作区,仅涉及网络描述/恢复。保留此前 IAM/账号工作及用户无关改动。 + +- pass:测试先行的服务商格式回归在修改代码前出现 3 个预期失败(`InvalidDescription.Malformed`)。 +- pass:`uv run --extra dev pytest tests/integrations/mpa_managed/test_deployment_network.py tests/integrations/mpa_managed/test_deployment_network_cloud.py -q`:62 项通过,覆盖 VPC/子网拒绝意图修正、未知结果查询恢复/阻止、旧资源复用、载荷冲突和相同请求 token 保留。 +- pass:最终 `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py -q`:508 项通过;仅有既有依赖弃用警告。 +- pass:两个变更 Python 文件的 `uvx --from ruff==0.11.12 ruff check` 和 `ruff format --check`。最终 `uvx pyright --pythonpath .venv/bin/python veadk/integrations/mpa/managed/network.py tests/integrations/mpa_managed/test_deployment_network.py`:0 错误、0 警告。初次测试夹具字典推断问题通过原地 update 修正,未绕过生产类型检查。 +- pass:Python 和双语文档变更文件的 `uv run --extra dev pre-commit run --files`:Ruff 检查/格式及硬编码密钥扫描通过。YAML 扫描 not_applicable(无 YAML 改动)。 +- pass:双语标识、设计相对链接和 `git diff --check`。Studio 配置描述与此前 STS 账号修复同步。 +- not_applicable:前端测试/构建/浏览器、生成 web 产物及 sidecar 门禁;没有 UI 或 sidecar 改动。 +- not_run:全仓回归/all-files pre-commit,因未请求提交且变更限于部署;真实重试/云资源变更由用户提交创建/重试请求后执行。诊断审计是只读查询,不代表创建 smoke 成功。 + +审查完成:其他输入保持不可变,仅接受精确范围的新/旧标记,不重置结果不确定的派发,请求体变化时重新生成 token 并在云调用前保存。AC-1–4 通过隔离检查满足,不宣称完整真实创建成功。保留已有资源和记录,直到获授权的重试执行限定意图修正。 diff --git a/prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.md b/prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.md new file mode 100644 index 000000000..f77cca38b --- /dev/null +++ b/prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.md @@ -0,0 +1,55 @@ +# Empty managed network discovery results + +[中文版](2026-10-09-empty-network-results.zh.md) + +Change ID: mpa-network-discovery. Created/revised: 2026-10-09. Status: implemented. + +## Evidence and scope + +Read-only diagnosis confirmed an Available managed VPC, no subnet creation intent, and a successful DescribeSubnets response serialized by the installed SDK as `subnets=None, total_count=0`. `NetworkCloud._list` rejects this as invalid before the provisioner can create its first subnet. This follows the [ownership-description fix](../mpa-network-description/2026-10-09-valid-network-marker.md). + +Goal: normalize a confirmed empty provider result and resume preparation in the recorded VPC. Non-goals: changes to UI, IAM, PG, APIG, Runtime/chat, resource naming or automatic deletion. No cloud writes, task retries, database edits, commits or deployment performed by this change's verification. + +## Requirements and scenarios + +- FR-1: On the first discovery page, a null or absent `vpcs`/`subnets` collection with an integer `total_count=0` is an empty list. Existing list responses retain their behavior. +- FR-2: Reject null/missing collections without an explicit integer zero, scalar collections even with zero, and a null collection on subsequent pages. Boolean/string/float counts are not integer evidence. Do not convert provider errors to empty results. +- FR-3: A recorded managed VPC with this empty subnet result proceeds to create one subnet. A second ensure reuses the same VPC and subnet; durable intents, ownership validation and uncertain-outcome duplicate prevention remain unchanged. + +Given a fresh VPC and zero subnets, discovery returns empty and creation continues. Given incomplete/malformed discovery or a provider permission error, preparation fails. Given a paginated nonempty result, a later null/zero response cannot discard earlier rows. + +## Design and contract impact + +`managed/network_cloud.py` owns normalization in `_list`; both discovery methods use it. Normalize only `items is None`, `type(total_count) is int`, zero count, and first page. All existing pagination limits, errors, credentials and request parameters remain unchanged. No schema, public signature, permissions or configuration changes; no new dependencies. The [Studio creation contract](../../../specs/studio-mpa-creation/README.md) owns empty/error distinctions; [Runtime provisioning](../../../specs/mpa-runtime-provisioning/README.md) references it. Caller retry retains the existing VPC; no migration or cleanup is needed. + +Concurrency, cancellation and timeout handling are unchanged because only a successfully returned discovery payload is normalized. Never reinterpret a failed request or unknown Create outcome as an empty discovery. + +## Tasks, tests and acceptance + +| Requirement | Task | Acceptance | +| --- | --- | --- | +| FR-1 | T-1: failing installed-SDK and absent-collection tests, then normalization | AC-1: DescribeVpcs/DescribeSubnets zero-result responses return empty | +| FR-2 | T-2: negative and pagination regressions | AC-2: malformed responses/errors still fail; populated pages are retained | +| FR-3 | T-3: isolated provisioner/adapter integration | AC-3: resume recorded VPC, create one subnet, reuse on repeat | +| FR-1–3 | T-4: bilingual review and verification | AC-4: affected tests, Ruff/Pyright, secret/diff/document checks pass | + +Commands: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py -q`; changed-file Ruff/Pyright and pre-commit. Real cloud retry is a separate user-submitted smoke; no live success is claimed from fakes. + +## Review, approval and risks + +Direct design review performed because review-spec is unavailable. Reviewed provider serialization, null-versus-invalid distinctions, pagination consistency, ownership, recovery, credential redaction and bilingual equivalence. No blocking findings. User approval: “帮我改正” after the diagnosed null/zero response and proposed empty-result correction. Risk: null responses lacking integer zero still fail deliberately; this is not a general suppression of malformed discovery. Unrelated working-tree changes remain preserved. + +## Verification and delivery + +2026-10-09, working tree based on `ef0ad519`. Test-first, implementation and verification results are recorded below. Frontend/build/browser/generated assets and sidecar checks are not_applicable: those contracts are unchanged. Full-repository/all-files commit checks and live cloud smoke are not_run: no commit or live retry is requested in this change. + + +Results for the scoped correction: + +- pass: before implementation, the four installed-SDK/absent-collection regressions failed with `Network discovery returned invalid results`; after completing the durable VPC test fixture, the orchestration regression also failed at the same discovery error. +- pass: network adapter/provisioner suite: 88 passed. Final managed/Runtime command above: 534 passed, 5 existing dependency deprecation warnings, 23.67 seconds. +- pass: final isolated resume regression: 1 passed after a test-only parameter-name correction; production behavior was unchanged. +- pass: `uvx --from ruff==0.11.12 ruff check` and `ruff format --check` for `network_cloud.py`, `test_deployment_network_cloud.py`, `test_deployment_network.py`; `uvx pyright --pythonpath .venv/bin/python` on the same files: 0 errors, 0 warnings. The initial fake/adapter method parameter-name mismatch was fixed without a type suppression. +- pass: `uv run --extra dev pre-commit run --files` for the three Python files and six bilingual documents: Ruff/check/format and hardcoded-secret scan passed. YAML scan not_applicable (no YAML changes). Paired FR/T/AC identifiers, all relative document link targets and `git diff --check` passed. + +Implementation review: only a confirmed first-page empty result is normalized. Rejected null/nonzero and later-page responses do not reach resource creation. Existing list responses, provider-error propagation, record reuse and persist-before-create recovery are covered. AC-1–4 are met by isolated tests and final document/secret checks. No successful live retry is claimed. diff --git a/prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.zh.md b/prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.zh.md new file mode 100644 index 000000000..317ec0ed4 --- /dev/null +++ b/prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.zh.md @@ -0,0 +1,55 @@ +# 托管网络查询的空结果 + +[English](2026-10-09-empty-network-results.md) + +变更 ID:mpa-network-discovery。创建/修订:2026-10-09。状态:implemented。 + +## 证据与范围 + +只读诊断确认托管 VPC 为 Available,尚无子网创建意图,成功的 DescribeSubnets 响应经当前 SDK 序列化为 `subnets=None, total_count=0`。`NetworkCloud._list` 将其视为无效结果,导致编排器无法创建第一个子网。本修复接续[归属描述修复](../mpa-network-description/2026-10-09-valid-network-marker.zh.md)。 + +目标:规范化明确的提供方空结果,在已记录的 VPC 中继续准备子网。非目标:修改 UI、IAM、PG、APIG、Runtime/聊天、资源名称或自动删除。本次验证不执行云写入、任务重试、数据库修改、提交或部署。 + +## 需求与场景 + +- FR-1:查询第一页时,`vpcs`/`subnets` 为 null 或缺失且整数 `total_count=0`,应解释为空列表。已有列表响应保持原有行为。 +- FR-2:null/缺失集合但没有明确整数零、即使数量为零的标量集合、后续页面的 null 集合均拒绝。布尔/字符串/浮点数量不算整数证据。提供方错误不得转换为空结果。 +- FR-3:已记录的托管 VPC 返回上述空子网结果时,继续创建一个子网。第二次 ensure 复用原 VPC 和子网;持久化意图、归属校验及未知结果防重复机制保持不变。 + +新 VPC 没有子网时,查询返回空列表并继续创建。查询不完整/畸形或提供方权限错误时,准备失败。分页非空结果之后出现 null/零响应时,不得丢弃之前的记录。 + +## 设计与契约影响 + +`managed/network_cloud.py` 的 `_list` 负责规范化,两个查询方法共用。仅在 `items is None`、`type(total_count) is int`、数量为零且为第一页时规范化。现有分页上限、错误、凭据及请求参数保持不变。不修改数据结构、公开签名、权限或配置,不新增依赖。[Studio 创建契约](../../../specs/studio-mpa-creation/README.zh.md) 负责区分空结果与错误;[Runtime 部署](../../../specs/mpa-runtime-provisioning/README.zh.md) 引用该契约。用户重试保留现有 VPC,无需迁移或清理。 + +并发、取消及超时处理不变,因为只规范化已经成功返回的查询载荷。不得将失败请求或未知 Create 结果解释为空查询。 + +## 任务、测试与验收 + +| 需求 | 任务 | 验收 | +| --- | --- | --- | +| FR-1 | T-1:先添加当前 SDK 及缺失集合的失败测试,再规范化 | AC-1:DescribeVpcs/DescribeSubnets 零记录响应返回空列表 | +| FR-2 | T-2:负向与分页回归 | AC-2:畸形响应/错误仍失败;非空分页记录保留 | +| FR-3 | T-3:隔离的编排器/适配器集成 | AC-3:恢复已记录 VPC,创建一个子网,重复调用复用 | +| FR-1–3 | T-4:双语审查及验证 | AC-4:相关测试、Ruff/Pyright、密钥/差异/文档检查通过 | + +命令:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py -q`;修改文件的 Ruff/Pyright 和 pre-commit。真实云重试为用户另行提交的冒烟,不以模拟测试宣称真实创建成功。 + +## 审查、批准与风险 + +review-spec 不可用,直接执行设计审查。已审查提供方序列化、null 与畸形结果区别、分页一致性、归属、恢复、凭据脱敏与双语等价,无阻塞项。用户批准:诊断 null/零响应并提出空结果修复后,用户要求“帮我改正”。风险:没有明确整数零的 null 响应仍故意报错,不普遍吞掉畸形查询。保留工作区无关修改。 + +## 验证与交付 + +2026-10-09,基于 `ef0ad519` 的工作区。下文已记录先失败测试、实现及验证结果。前端/构建/浏览器/生成资源及 sidecar 检查为 not_applicable:未改变其契约。全仓库/全文件提交检查及真实云冒烟为 not_run:本次未请求提交或真实重试。 + + +本次修复验证结果: + +- pass:实现前,四个当前 SDK/缺失集合回归均因 `Network discovery returned invalid results` 失败;补全持久化 VPC 测试夹具后,编排回归也在同一查询错误处失败。 +- pass:网络适配器/编排器专项:88 项通过。上述最终托管/Runtime 命令:534 项通过,5 条既有依赖弃用警告,用时 23.67 秒。 +- pass:测试方法参数名称修正后的最终恢复专项:1 项通过;未修改生产行为。 +- pass:对 `network_cloud.py`、`test_deployment_network_cloud.py`、`test_deployment_network.py` 运行 `uvx --from ruff==0.11.12 ruff check` 和 `ruff format --check`;同文件 `uvx pyright --pythonpath .venv/bin/python`:0 错误、0 警告。初始模拟对象/适配器方法参数名称不一致已修正,未使用类型抑制。 +- pass:对三个 Python 文件及六份双语文档执行 `uv run --extra dev pre-commit run --files`:Ruff/静态/格式及硬编码密钥扫描通过。YAML 扫描为 not_applicable(未修改 YAML)。双语 FR/T/AC 标识、全部相对文档链接目标及 `git diff --check` 通过。 + +实现审查:只规范化明确的第一页空结果。拒绝的 null/非零及后续页面响应不会进入资源创建。已有列表响应、提供方错误透传、记录复用及创建前持久化恢复均有覆盖。隔离测试及最终文档/密钥检查满足 AC-1–4。不宣称真实重试成功。 diff --git a/prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.md b/prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.md new file mode 100644 index 000000000..35221f8f4 --- /dev/null +++ b/prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.md @@ -0,0 +1,54 @@ +# Use the entered MPA name in Skill Space descriptions + +[中文版](2026-10-09-entered-name-description.zh.md) + +- Change ID: `mpa-skill-space-description`; date: 2026-10-09; status: implemented. +- Contract: [Studio MPA creation](../../../specs/studio-mpa-creation/README.md), CON-3/CON-4. + +## Background and scope + +`managed/skills.py` currently creates `Description: Skills for MPA agent `. Studio creation now separates the entered Runtime name from the generated internal ID. A user identifying an agent by its entered name therefore cannot recognize the description. The user requested that this description use the entered name. + +Change only descriptions of newly created named Skill Spaces. Keep generated `mpa_skills_` names, `display_name` tags, IDs, ownership tags, database/channel/Worker bindings and internal ID generation unchanged. Existing/configured spaces are reused without updates. No cloud rename, migration, deployment, commit or push is in scope. Generic agents, UI, dependencies and permissions are unchanged. + +## Requirements, scenarios and acceptance + +- FR-1 / AC-1: A fresh named deployment creates `Description: Skills for MPA agent `. Use the existing Runtime-name validation. Without a name, preserve the original internal-ID description. +- FR-2 / AC-2: Forward `runtime_name` from Runtime deployment to Skill Space preparation. Space names, tags and bindings remain based on internal identity. Existing spaces require no create/update, regardless of the supplied display name. +- FR-3 / AC-3: Preserve unknown-outcome recovery: no blind second CreateSkillSpace. When a pre-upgrade persisted request matches the complete current request with only its description restored to the original internal-ID value, replay that persisted request for discovery/ownership verification. Reject all other pending-input changes, including changed new descriptions or projects. + +Scenarios: fresh named request has a recognizable description; unnamed CLI retains its behavior; an existing space remains untouched; a lost response from an old or new request is discovered exactly once; an undiscovered lost response or changed pending request remains an explicit error. + +## Design and affected contracts + +Add an optional keyword-only `runtime_name: str = ""` to `ensure_skill_space`, validate nonempty names with `validate_runtime_name`, and pass it from `RuntimeDeployer.deploy`. Description uses `runtime_name or agent_id`. The existing persisted `skill_space_request` already contains all recovery inputs; no field/schema migration is needed. Compare the full old-description candidate before permitting legacy recovery. Keep name discovery, ownership validation, locking, cancellation, timeout and resource cleanup rules unchanged. Description is presentation metadata and must not become an ownership key. + +Production: `managed/skills.py`, `managed/runtime.py`. Tests: `test_agent_deployment.py`, `test_service.py`. Update the bilingual creation spec and managed README. No frontend, generated assets, external API request-body or runtime image change. Optional Python keyword preserves callers. No credentials or live user data in fixtures/evidence. + +## Tasks and verification + +1. T-1 / FR-1–FR-3: Add failing regressions for named/unnamed descriptions, internal binding stability, name validation, existing reuse, old/new lost-response recovery and pending-input refusal. +2. T-2 / FR-1–FR-3: Implement name forwarding and exact legacy-description recovery. +3. T-3: Run targeted deployment/service tests, managed/CLI regression with two workers, changed-file Ruff/Pyright, pre-commit, bilingual/link and whitespace checks; review consistency and record results. + +Commands: `uv run --extra dev pytest tests/integrations/mpa_managed/test_agent_deployment.py tests/integrations/mpa_managed/test_runtime_deployment_edges.py tests/integrations/mpa_managed/test_service.py -n 2 -q`; `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_cli_mpa.py -n 2 -q`; changed-file Ruff/Pyright; `uv run --extra dev pre-commit run --all-files`; `git diff --check`. + +## Review, approval and risks + +The user's request to replace the internal ID in the description with the entered name approves this narrow extension of the preceding naming fix. `review-spec` is unavailable; direct review checked request compatibility, full-payload recovery, ownership boundaries, errors and bilingual equivalence. No blockers. Old/existing spaces keep their descriptions; the improvement applies after restarting Studio to fresh creation. Display metadata does not imply a cloud ID or uniqueness guarantee. Live cloud operations are not authorized. Frontend/build/browser/sidecar gates are not applicable to this backend-only metadata change. + +## Delivery record + +T-1–T-3 and AC-1–AC-3 are complete. Direct implementation review verified that descriptions never authorize adoption, full legacy payload comparison preserves repeated unknown-outcome recovery, existing spaces are untouched, and changed pending inputs still fail. All pre-existing uncommitted changes, including the image-discovery rollback and Worker-name fix, are preserved separately. + +Tested on 2026-10-09: the four changed Python files and affected managed/CLI suites in the uncommitted diff based on `df797f94`. + +- `pass`: Regression-first checks reproduced six failures before implementation (two compatibility/default cases already passed). +- `pass`: Targeted deployment/edge/service command above: 182 tests. Final managed/CLI command with two workers: 686 tests, including named/unnamed creation, unchanged internal bindings, existing reuse, invalid names and old/new recovery. +- `pass`: Ruff 0.11.12 check/format on the four changed Python files; Pyright: zero errors/warnings. +- `pass`: `uv run --extra dev pre-commit run --all-files`, including both secret checks; bilingual pairs, contract identifiers and local design links; `git diff --check`. +- `not_run`: Full-repository Python regression; affected managed/CLI coverage was selected for this bounded metadata change. +- `not_run`: Real cloud creation/update; no live operations authorized or performed. Restart Studio before verifying a fresh creation in the console. Previously created spaces retain their original descriptions. +- `not_applicable`: Frontend/browser/build, sidecar and runtime-process smoke gates; no changes to those contracts or artifacts. + +No commit, push or deployment was performed. diff --git a/prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.zh.md b/prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.zh.md new file mode 100644 index 000000000..0de75c493 --- /dev/null +++ b/prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.zh.md @@ -0,0 +1,54 @@ +# 技能空间描述使用手填 MPA 名称 + +[English](2026-10-09-entered-name-description.md) + +- Change ID:`mpa-skill-space-description`;日期:2026-10-09;状态:implemented。 +- 契约:[Studio MPA 创建](../../../specs/studio-mpa-creation/README.zh.md),CON-3/CON-4。 + +## 背景与范围 + +`managed/skills.py` 当前创建 `Description: Skills for MPA agent `。Studio 创建已将手填 Runtime 名称与自动生成内部 ID 分开。用户通过手填名称识别智能体时,难以辨认该描述。用户要求描述使用手填名称。 + +仅修改新建名称请求的技能空间描述。保持生成的 `mpa_skills_` 名称、`display_name` 标签、ID、归属标签、数据库/渠道/Worker 绑定及内部 ID 生成不变。已有/显式配置空间复用,不更新。不涉及云资源改名、迁移、部署、提交或推送。通用智能体、UI、依赖与权限不变。 + +## 需求、场景与验收 + +- FR-1 / AC-1:新名称部署创建 `Description: Skills for MPA agent `。沿用现有 Runtime 名称校验。不提供名称时保留原内部 ID 描述。 +- FR-2 / AC-2:Runtime 部署将 `runtime_name` 传给技能空间准备。空间名称、标签及绑定继续由内部标识派生。已有空间不创建/更新,与传入的展示名称无关。 +- FR-3 / AC-3:保留结果未知恢复,不盲目重复 CreateSkillSpace。升级前持久化请求仅在完整当前请求恢复为原内部 ID 描述后完全匹配时,才重放该请求用于发现和归属校验。其他未完成输入变化仍拒绝,包括新描述或项目变化。 + +场景:新名称请求描述可辨认;不提供名称的 CLI 保持原行为;已有空间不修改;旧/新请求丢失响应后准确发现且只创建一次;无法发现的丢失响应或改变未完成请求仍明确报错。 + +## 设计与受影响契约 + +为 `ensure_skill_space` 增加可选仅关键字参数 `runtime_name: str = ""`,非空时使用 `validate_runtime_name` 校验,由 `RuntimeDeployer.deploy` 传入。描述使用 `runtime_name or agent_id`。已有持久化 `skill_space_request` 包含完整恢复输入,不增加字段或数据库迁移。仅在完整旧描述候选匹配时允许旧版恢复。名称发现、归属验证、锁、取消、超时和资源清理保持不变。描述属于展示信息,不得作为归属键。 + +生产文件:`managed/skills.py`、`managed/runtime.py`。测试:`test_agent_deployment.py`、`test_service.py`。更新双语创建契约和 managed README。不修改前端、生成产物、外部 API 请求体或 Runtime 镜像。可选 Python 关键字兼容调用方。测试/证据不含凭证或真实用户数据。 + +## 任务与验证 + +1. T-1 / FR-1–FR-3:补充先失败回归,覆盖有/无名称描述、内部绑定稳定、名称校验、已有复用、旧/新丢失响应恢复及未完成输入变化拒绝。 +2. T-2 / FR-1–FR-3:实现名称传入及完整旧描述恢复。 +3. T-3:运行部署/服务目标测试、使用两个进程的 managed/CLI 回归、改动文件 Ruff/Pyright、pre-commit、双语/链接及空白检查;审查一致性并记录结果。 + +命令:`uv run --extra dev pytest tests/integrations/mpa_managed/test_agent_deployment.py tests/integrations/mpa_managed/test_runtime_deployment_edges.py tests/integrations/mpa_managed/test_service.py -n 2 -q`;`uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_cli_mpa.py -n 2 -q`;改动文件 Ruff/Pyright;`uv run --extra dev pre-commit run --all-files`;`git diff --check`。 + +## 审查、批准与风险 + +用户要求描述中的内部 ID 改为手填名称,批准对前序命名修复的这一小范围扩展。`review-spec` 不可用;直接审查核对请求兼容、完整请求恢复、归属边界、错误及双语等价,无阻塞。旧/已有空间保留原描述;重启 Studio 后对新建请求生效。展示信息不代表云 ID 或唯一性保证。未授权真实云操作。本次仅后端展示元数据变化,前端/构建/浏览器/sidecar 检查不适用。 + +## 交付记录 + +T-1–T-3 和 AC-1–AC-3 已完成。直接实施审查确认描述不授权接管、完整旧请求比较保留连续结果未知恢复、已有空间不修改、改变未完成输入仍失败。此前所有未提交修改,包括镜像查询撤回和 Worker 名称修复,独立保留。 + +2026-10-09 测试范围:基于 `df797f94` 的未提交差异中四个 Python 文件及受影响的 managed/CLI 测试。 + +- `pass`:先失败回归在实施前复现 6 项失败(两项兼容/默认场景已通过)。 +- `pass`:上述部署/边界/服务目标命令 182 项通过;最终 managed/CLI 命令使用两个进程,686 项通过,包含有/无名称创建、内部绑定不变、已有复用、非法名称及旧/新恢复。 +- `pass`:四个改动 Python 文件的 Ruff 0.11.12 check/format;Pyright 零错误/警告。 +- `pass`:`uv run --extra dev pre-commit run --all-files`,包含两项密钥检查;双语配对、契约标识及本地设计链接;`git diff --check`。 +- `not_run`:全仓 Python 回归;针对本次有限元数据变更,选择受影响的 managed/CLI 覆盖。 +- `not_run`:真实云创建/更新,未授权也未执行。控制台验证新的创建前应重启 Studio;此前创建的空间保留原描述。 +- `not_applicable`:前端/浏览器/构建、sidecar 及运行时进程 smoke;没有修改这些契约或产物。 + +未执行提交、推送或部署。 diff --git a/prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.md b/prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.md new file mode 100644 index 000000000..bbc1ddfa5 --- /dev/null +++ b/prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.md @@ -0,0 +1,58 @@ +# Standard shared APIG creation + +[中文版](2026-10-09-standard-shared-gateway.zh.md) + +Change ID: mpa-standard-gateway. Created/revised: 2026-10-09. Status: implemented. + +## Evidence, goals and boundaries + +Read-only investigation confirmed a successful historical shared MPA gateway is standard, with two 1c2g nodes, small_1 CLB, public/private networking and traffic billing. The new account has exhausted its Serverless gateway count while standard count has headroom. Current managed creation hardcodes serverless and prepares only one subnet. The provider [CreateGateway contract](https://docs.volcengine.com/docs/apig/CreateGateway?lang=en) requires at least two subnets in different zones. [GetGatewayAvailableZones](https://docs.volcengine.com/docs/apig/GetGatewayAvailableZones-QuerythecurrentRegionAvailabilityZonelist?lang=zh) supplies APIG-supported zones, which can differ from ECS zones. + +Goal: new managed gateways use the working standard configuration, prepare an appropriate cross-zone network and recover definite quota rejection. Non-goals: frontend changes, general-agent chat, moving existing Runtimes, deleting resources, switching cloud accounts, copying old-account resource IDs, upgrading images or automatically increasing quota. Real creation remains a separate user submission. Existing standard/serverless registrations and explicit adoption retain compatibility. + +## Requirements and scenarios + +- FR-1: CreateGateway uses standard, Replicas=2, InstanceSpecCode=1c2g, CLBSpecCode=small_1, both public/private enabled and traffic billing. Reject fewer than two or duplicate subnet IDs before dispatch. +- FR-2: For a new gateway without registered/adopted ID, query APIG zones and prepare two available same-VPC subnets in distinct supported zones under the existing account lock. Reuse eligible subnets first, create only missing companions with nonoverlapping CIDRs. Include ready GetSubnet results in CIDR reservations when DescribeSubnets lags. Preserve VPC and all existing resources. +- FR-3: Each companion subnet has its own durable intent/token/dispatch flag and stable scope/zone name. Timeouts/cancellation/unknown results require discovery before another Create; retries retain payload and token. Conflicts, malformed zones, ownership drift, CIDR exhaustion and fewer than two APIG zones fail closed. A recorded pending companion remains authoritative even if another suitable subnet appears. +- FR-4: Existing gateway reuse/adoption does not require new zone discovery or network changes. Existing Runtime network payloads stay unchanged; new Runtime payloads use the prepared gateway subnet selection. Management registry records are the source of truth. +- FR-5: ExceededQuota is a definite provider rejection for gateway and IM creation; save create_requested/im_create_requested=false and allow same-agent retry after correction. Timeout/internal/unknown errors retain duplicate protection. A historical unknown flag is not automatically cleared. A one-off recovery may clear only the audited rejected intent under the shared lock after checking the exact scope/VPC/name and absence of the gateway; it must not delete resources or reset arbitrary intents. +- FR-6: Deployment IAM policy includes the read-only apig:GetGatewayAvailableZones action. Runtime role policy and other permissions remain unchanged. No credentials or provider payloads enter user output, source or reports. + +Scenarios: fresh shared setup creates two cross-zone subnets and one standard gateway/IM service; a recorded single-subnet VPC adds only its missing companion; separate agents reuse the same admin registry; a lost companion Create response resumes by exact name; quota rejection is recoverable; an uncertain gateway outcome still blocks duplication; existing registered gateways/Runtimes retain their network. + +## Design and contract impact + +`gateway_cloud.py` owns the standard request and APIG zone adapter. `network.py` adds a gateway-specific preparation method using the same entry lock and persists companion intents inside gateway_subnet_intents keyed by zone. Existing single-subnet preparation remains unchanged for independent Runtime callers. `service.py` invokes companion preparation only when no gateway is registered/adopted, passes gateway subnets independently, and only changes a fresh Runtime's template network. `gateway.py` classifies the definite quota rejection. `frontend_deploy_policy.py` grants the one new read action. No public HTTP/API/CLI fields, configuration or tables change; the JSON registry gains optional companion intents. All provider calls refresh and verify credentials. + +Owner contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md) and [Runtime provisioning](../../../specs/mpa-runtime-provisioning/README.md). Update both languages and managed module READMEs. Frontend/browser/assets/sidecar gates are not_applicable because their interfaces/behavior are unchanged. Isolated tests cover actual request shape, orchestration and recovery; live provisioning is reported separately. + +## Tasks and acceptance + +| Requirement | Task | Acceptance | +| --- | --- | --- | +| FR-1, FR-6 | T-1: failing adapter/policy regressions then standard request/zones | AC-1: standard payload and minimum IDs, strict zones, deployment permission | +| FR-2–4 | T-2: failing companion/reuse/cancellation tests then durable preparation and entry-point wiring | AC-2: new setup/one-subnet recovery/repeated agents, no existing Runtime changes or duplicate subnet creation | +| FR-5 | T-3: failing quota recovery tests then definite-error handling | AC-3: gateway/IM quota retries allowed, unknown outcomes remain blocked | +| FR-1–6 | T-4: docs, targeted/regression tests and review | AC-4: affected tests, Ruff/Pyright, secret/diff/bilingual/link checks pass | + +Commands: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q`; changed-file Ruff/Pyright/pre-commit. No commit, push, deployment, destructive cleanup or live creation is part of verification. + +## Review, approval and risks + +Direct review because review-spec is unavailable: scoped ownership, cross-zone requirements, independent intents, locks, partial failures, unchanged Runtime compatibility, permissions and bilingual equivalence reviewed. User approved the standard gateway/two-zone/IM/registry/retry solution with “帮我改”. The new read action needs deployment permission; empty/failed zone lookup is not silently substituted with ECS results. New standard resources have their provider billing; quota/availability errors can still occur and remain explicit failures. Pending historical flags remain conservative until audited operator recovery. No design blockers remain. + +## Verification and delivery + +2026-10-09, tested working tree based on ef0ad519 plus this uncommitted gateway correction and preceding approved account/IAM/network fixes; unrelated user changes preserved. T-1–T-4 and AC-1–AC-4 are satisfied for isolated implementation verification. + +- pass: test-first adapter/quota baseline (13 expected failures, 14 passes), companion/policy baseline (12 expected failures, 64 passes), and delayed-list CIDR regression (one expected failure), then implementation. +- pass: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short`: 578 passed, five existing dependency deprecation warnings. Covers standard payload, distinct APIG zones, reuse across agents, cancellation/lost-response recovery, authoritative pending intent, ownership/zone/account drift, CIDR exhaustion and delayed lists, quota recovery and unchanged existing Runtime network. +- pass: `uvx --from ruff==0.11.12 ruff check` and `ruff format --check` for the 12 affected Python source/test files; `uvx pyright --pythonpath .venv/bin/python` for gateway_cloud.py, gateway.py, network.py, service.py and frontend_deploy_policy.py (zero errors). +- pass: `uv run --extra dev pre-commit run --files `: Ruff check/format and hardcoded secret scan. Concrete-YAML secret gate not_applicable (no YAML changes). +- pass: paired-language, relative-path/reference and diff whitespace checks; direct implementation review found no remaining blockers. Preserve scope, registry locks and Runtime network compatibility; cancellation does not roll back resources. +- pass (live data repair only): under the shared account/region lock, reverified deployment STS identity, failed local task/no active creation, exact provider ExceededQuota audit and absence of the scoped gateway; cleared only that rejected create_requested flag and verified readback. No cloud resource was created/deleted and no other record was changed. Unknown historical intents have no automatic bypass. +- not_run: real standard gateway/IM/Runtime creation; the user must submit after restarting local Studio (or redeploying cloud Studio). Provider quota, availability and permissions remain live checks. +- not_run: full repository parallel regression and all-files commit gate; verification covered affected creation/provisioning/CLI regressions. The earlier broad run has unrelated SDK dependency/collection failures recorded in the IAM design. No commit was requested. +- not_applicable: frontend/browser/build/assets/sidecar gates because no frontend or event/chat interface changed. + diff --git a/prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.zh.md b/prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.zh.md new file mode 100644 index 000000000..3def902f3 --- /dev/null +++ b/prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.zh.md @@ -0,0 +1,58 @@ +# 标准型共享 APIG 创建 + +[English](2026-10-09-standard-shared-gateway.md) + +变更 ID:mpa-standard-gateway。创建/修订:2026-10-09。状态:implemented。 + +## 证据、目标与边界 + +只读排查确认,历史成功的 MPA 共享网关为标准型,两个 1c2g 节点、small_1 CLB、公私网启用、按流量计费。新账号 Serverless 网关数量已达限额,标准型数量仍有余量。当前托管创建硬编码 serverless,且只准备一个子网。提供方 [CreateGateway 契约](https://docs.volcengine.com/docs/apig/CreateGateway?lang=en)要求至少两个不同可用区的子网。[GetGatewayAvailableZones](https://docs.volcengine.com/docs/apig/GetGatewayAvailableZones-QuerythecurrentRegionAvailabilityZonelist?lang=zh) 提供 APIG 支持的可用区,可能与 ECS 可用区不同。 + +目标:新建托管网关采用已验证的标准型配置,准备适合的跨可用区网络,并恢复明确的配额拒绝。非目标:修改前端、通用智能体聊天、迁移现有 Runtime、删除资源、切换云账号、复制旧账号资源 ID、升级镜像或自动申请提额。真实创建由用户另行提交。已有标准型/Serverless 登记和显式接管保持兼容。 + +## 需求与场景 + +- FR-1:CreateGateway 使用 standard、Replicas=2、InstanceSpecCode=1c2g、CLBSpecCode=small_1、公私网均启用、按 traffic 计费。少于两个或重复子网 ID 在发送前拒绝。 +- FR-2:没有登记/接管 ID 的新网关,在现有账号锁内查询 APIG 可用区,准备同一 VPC 内两个不同受支持可用区的可用子网。优先复用合适子网,只创建缺失的伴随子网,CIDR 不重叠。DescribeSubnets 延迟时,计入 GetSubnet 已确认就绪的子网网段。保留 VPC 及所有现有资源。 +- FR-3:每个伴随子网有独立的持久化意图/token/发送标记和稳定的范围/可用区名称。超时/取消/未知结果在再次 Create 前必须查询恢复;重试保留载荷和 token。冲突、畸形可用区、归属变化、CIDR 耗尽及 APIG 可用区不足两个均明确失败。已记录的未完成伴随意图保持权威,即使出现其他合适子网也不能跳过。 +- FR-4:已有网关复用/接管不要求新可用区查询或网络变更。已有 Runtime 网络载荷保持不变;新 Runtime 载荷使用准备好的网关子网选择。管理注册库记录为事实来源。 +- FR-5:网关和 IM 创建的 ExceededQuota 属于提供方明确拒绝,保存 create_requested/im_create_requested=false,修正后允许同智能体重试。超时/内部/未知错误保留防重复保护。历史未知标记不自动清除。一次性恢复只有在共享锁内核实明确拒绝的审计、精确范围/VPC/名称及网关不存在后才可清除该意图;不得删除资源或重置任意意图。 +- FR-6:部署 IAM 策略增加只读 apig:GetGatewayAvailableZones。Runtime 角色策略和其他权限不变。凭据及提供方载荷不得进入用户输出、源码或报告。 + +场景:新共享环境创建两个跨可用区子网和一个标准网关/IM 服务;已记录单子网 VPC 只补齐缺失子网;不同智能体复用同一管理注册库;伴随子网 Create 响应丢失后按精确名称恢复;配额拒绝可恢复;网关未知结果仍阻止重复;已登记网关/Runtime 保留网络。 + +## 设计与契约影响 + +`gateway_cloud.py` 负责标准型请求和 APIG 可用区适配。`network.py` 添加网关专用准备方法,复用 entry 锁,并在 gateway_subnet_intents 中按可用区持久化伴随意图。独立 Runtime 调用方的单子网准备保持不变。`service.py` 仅在没有已登记/接管网关时调用伴随准备,独立传递网关子网,仅修改新 Runtime 模板网络。`gateway.py` 识别明确配额拒绝。`frontend_deploy_policy.py` 增加一个只读动作。不修改公开 HTTP/API/CLI 字段、配置或表;JSON 注册记录增加可选伴随意图。所有提供方调用刷新并核验凭据。 + +归属契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md)及 [Runtime 部署](../../../specs/mpa-runtime-provisioning/README.zh.md)。同步双语及托管模块 README。前端/浏览器/资源/sidecar 检查为 not_applicable,因其接口/行为未改。隔离测试覆盖真实请求形态、编排及恢复;真实部署单独报告。 + +## 任务与验收 + +| 需求 | 任务 | 验收 | +| --- | --- | --- | +| FR-1、FR-6 | T-1:先失败的适配器/策略回归,再标准型请求/可用区 | AC-1:标准型载荷和最少 ID、严格可用区、部署权限 | +| FR-2–4 | T-2:先失败的伴随/复用/取消测试,再持久准备及入口接线 | AC-2:新环境/单子网恢复/多智能体,无现有 Runtime 变更或重复创建 | +| FR-5 | T-3:先失败的配额恢复测试,再明确错误处理 | AC-3:网关/IM 配额允许重试,未知结果仍阻止 | +| FR-1–6 | T-4:文档、专项/回归及审查 | AC-4:相关测试、Ruff/Pyright、密钥/差异/双语/链接通过 | + +命令:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q`;修改文件的 Ruff/Pyright/pre-commit。验证不包含提交、推送、部署、破坏性清理或真实创建。 + +## 审查、批准与风险 + +review-spec 不可用,直接审查:范围归属、跨可用区要求、独立意图、锁、部分失败、Runtime 兼容不变、权限及双语等价均已审查。用户以“帮我改”批准标准型网关/双可用区/IM/注册库/重试方案。新只读动作需要部署权限;可用区为空/查询失败时不静默替换为 ECS 结果。新标准型资源按提供方计费;配额/资源不足仍可能发生,并保留明确失败。历史未完成标记在审计确认的操作恢复前保持保守。无设计阻塞项。 + +## 验证与交付 + +2026-10-09,测试范围为 ef0ad519 工作区加本次未提交网关修复及此前已批准的账号/IAM/网络修复;保留无关用户修改。隔离实现验证满足 T-1–T-4、AC-1–AC-4。 + +- pass:先运行适配器/配额基线(13 个预期失败、14 个通过)、伴随子网/策略基线(12 个预期失败、64 个通过)及列表延迟 CIDR 回归(一个预期失败),然后实现。 +- pass:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short`:578 个通过,五条已有依赖弃用警告。覆盖标准型载荷、APIG 不同可用区、多智能体复用、取消/响应丢失恢复、未完成意图权威性、归属/可用区/账号变化、CIDR 耗尽及列表延迟、配额恢复和已有 Runtime 网络不变。 +- pass:12 个相关 Python 源码/测试文件执行 `uvx --from ruff==0.11.12 ruff check`、`ruff format --check`;gateway_cloud.py、gateway.py、network.py、service.py、frontend_deploy_policy.py 执行 `uvx pyright --pythonpath .venv/bin/python`,零错误。 +- pass:`uv run --extra dev pre-commit run --files ` 的 Ruff 检查/格式及硬编码密钥扫描。具体 YAML 密钥检查 not_applicable(没有 YAML 修改)。 +- pass:双语配对、相对路径/引用、差异空白检查;直接实现审查无剩余阻塞项。保留范围、注册库锁和 Runtime 网络兼容;取消不回滚资源。 +- pass(仅真实数据修复):在共享账号/地域锁内,重新核验部署 STS 身份、本地失败任务/无运行中创建、精确的 ExceededQuota 提供方审计及范围内网关不存在;仅清除这次明确拒绝的 create_requested 标记并回读核验。未创建/删除云资源,未修改其他记录。历史未知意图没有自动绕过。 +- not_run:真实标准网关/IM/Runtime 创建;用户需重启本地 Studio(云端重新部署)后提交。提供方配额、资源及权限仍需实际检查。 +- not_run:全仓库并行回归及全文件提交检查;本次覆盖相关创建/部署/CLI 回归。此前全量运行的无关 SDK 依赖/收集失败已记录在 IAM 设计中。未收到提交请求。 +- not_applicable:前端/浏览器/构建/资源/sidecar 检查,没有前端或事件/聊天接口变化。 + diff --git a/prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.md b/prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.md new file mode 100644 index 000000000..5461c4c51 --- /dev/null +++ b/prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.md @@ -0,0 +1,53 @@ +# Studio deployment account from STS + +[中文版](2026-10-09-sts-account.zh.md) + +Change ID: mpa-studio-account. Created/revised: 2026-10-09. Status: implemented. + +## Evidence and scope + +Built-in Studio configures a fixed expected account. A new-account credential passes STS but fails the `checking` stage in `managed/service.py` before IAM or resource preparation. The user explicitly requested removal of this built-in account restriction on 2026-10-09. No real credentials or task payloads belong in this document. + +## Requirements and scenarios + +- FR-1: Studio has no expected account; a nonempty STS identity determines the deployment account for IAM, PG, network, APIG and Runtime ownership. +- FR-2: Fresh Runtime `CLAW_SPACE_ID` and `RUNTIME_IAM_ROLE_TRN` derive from the verified account and selected role. No old-account environment value overrides them in built-in defaults. +- FR-3: Explicit YAML account restrictions, caller environment overrides, referenced/template Runtime behavior and the existing check against credential account changes remain compatible. +- FR-4: Image registry addresses and Worker reference IDs are source resources, not deployment identities. Preserve their defaults; do not assume source resources exist in a new account or claim cross-account access is verified. + +Given a different valid STS account, built-in provisioning reaches IAM preparation and uses that account in Runtime environment values. Given an explicit YAML expected-account mismatch, creation still stops before mutation. Given blank STS identity or account changes during creation, fail closed as before. + +## Design and affected contracts + +Remove built-in `account-id` and fixed account-derived environment fields. Keep the image registry as an explicitly named source registry. Fresh templates generate role name/TRN using the selected Runtime role and verified account; existing `apply_runtime_settings` overrides remain authoritative. `build_runtime_env` already derives `CLAW_SPACE_ID` from STS account, so reuse it. + +Contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md), [Runtime provisioning](../../../specs/mpa-runtime-provisioning/README.md). No API, database schema, frontend, task state or permission changes. No cloud mutations, deployment, process restart, commit or push are included. Cancellation and resource cleanup remain unchanged. + +## Tasks and acceptance + +| Requirement | Task | Acceptance | Verification | +| --- | --- | --- | --- | +| FR-1, FR-2 | T-1: regression tests, profile/template fix | AC-1: simulated built-in creation without an account override uses fake STS account through IAM and Runtime | managed config/shared-resource tests | +| FR-3 | T-2: boundary regressions | AC-2: explicit mismatch fails before IAM; selected role derives correct TRN | service tests | +| FR-4 | T-3: bilingual contracts and usage | AC-3: preserved image/reference defaults, documented access limitation | document and diff checks | + +Affect `managed/studio_profile.py`, `managed/service.py`, managed tests, both component specs and managed READMEs. Run `uv run --extra dev pytest tests/integrations/mpa_managed`, changed-file Ruff/Pyright and secret scanning. Frontend/browser/build are not applicable because UI and web assets are unchanged by this fix. Live cloud creation is not_run without an isolated authorized test. + +## Review, approval and risks + +Direct design review (review-spec skill unavailable): requirements and bilingual contracts agree; preserve explicit CLI safety checks, credential-change protection and overrides; no secret output or implicit source-resource cloning. No blockers. User instruction to remove the built-in restriction approves this bounded fix. New-account source-image/reference access can still fail later; this fix does not certify the full new-account deployment chain. Verification recorded below. + +## Verification record + +2026-10-09, working-tree account fix on base `ef0ad519`; previous IAM work and unrelated lockfile changes retained. + +- pass: pre-fix profile/shared-resource regression, 5 expected failures reproduced the fixed-account guard; after implementation the same flow passes with simulated STS identity, IAM preparation and account-derived Runtime metadata. +- pass: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py -q`: 496 passed. A new role test initially used an invalid fixture MPA ID; corrected to the supported format, then the full target passed. +- pass: `uvx --from ruff==0.11.12 ruff check` and repository pre-commit Ruff format/check for the five changed Python files; production Pyright initially passed. Test Pyright found two pre-existing fixture typing issues and one new missing AsyncMock assertion; fixed minimally, final check recorded below. +- pass: changed-file `uv run --extra dev pre-commit run --files` including Python, bilingual specs, managed README and this design: Ruff and hardcoded-secret scan passed; YAML scan not_applicable (no YAML changes). +- not_applicable: frontend tests/build/browser, general-agent chat and sidecar gates; this fix changes no frontend/chat/sidecar contracts or generated assets. +- not_run: full repository regression and all-files pre-commit; no commit requested, narrow provisioning regressions cover this fix. Live new-account creation, image/reference access and server restart are not_run; no cloud mutation was performed. + +Review: existing CLI account assertion is retained for explicitly configured profiles; built-in profile omits the assertion input. Verified account remains the registry scope and credential-change guard. Additional fixture assertions/monkeypatch only repair typing in the affected tests. Both document languages and relative links are reconciled. + +- pass: final `uvx pyright --pythonpath .venv/bin/python` for both production files and all three affected test files: 0 errors, 0 warnings. Post-fixture `uv run --extra dev pytest tests/integrations/mpa_managed/test_service.py tests/integrations/mpa_managed/test_studio_shared_resources.py -q`: 70 passed. Final changed-file pre-commit passed. diff --git a/prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.zh.md b/prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.zh.md new file mode 100644 index 000000000..44b6e556a --- /dev/null +++ b/prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.zh.md @@ -0,0 +1,53 @@ +# Studio 使用 STS 核验的部署账号 + +[English](2026-10-09-sts-account.md) + +变更 ID:mpa-studio-account。创建/修订日期:2026-10-09。状态:implemented。 + +## 证据与范围 + +内置 Studio 配置固定的预期账号。新账号凭据通过 STS 后,在 `managed/service.py` 的 `checking` 阶段失败,尚未准备 IAM 或其他资源。用户在 2026-10-09 明确要求去掉该内置账号限制。本文件不包含真实凭据或任务载荷。 + +## 需求与场景 + +- FR-1:Studio 不预设账号;非空 STS 身份决定 IAM、PG、网络、APIG 和 Runtime 归属的部署账号。 +- FR-2:新建 Runtime 的 `CLAW_SPACE_ID` 和 `RUNTIME_IAM_ROLE_TRN` 由核验账号和所选角色生成。内置默认值不以旧账号环境变量覆盖它们。 +- FR-3:保留显式 YAML 账号限制、调用方环境变量覆盖、引用/模板 Runtime 行为以及创建期间凭据切换账号的现有检查。 +- FR-4:镜像仓库地址和 Worker 参考 ID 是源资源,不是部署身份。保留默认值,不假定新账号存在这些源资源,不宣称已验证跨账号访问。 + +当 STS 返回另一个有效账号,内置创建应进入 IAM 准备,并在 Runtime 环境变量中使用该账号。当显式 YAML 预期账号不匹配时,仍在资源变更前停止。STS 身份为空或创建中账号变化时,继续按原规则拒绝执行。 + +## 设计与受影响契约 + +移除内置 `account-id` 和固定账号派生的环境字段。镜像仓库保留为名称明确的源仓库。新建模板使用所选 Runtime 角色和核验账号生成角色名/TRN;现有 `apply_runtime_settings` 的显式覆盖保持优先。`build_runtime_env` 已根据 STS 账号派生 `CLAW_SPACE_ID`,直接复用。 + +契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md)、[Runtime 部署](../../../specs/mpa-runtime-provisioning/README.zh.md)。不改变 API、数据库结构、前端、任务状态或权限。不包含云资源变更、部署、进程重启、提交或推送。取消及资源清理行为保持不变。 + +## 任务与验收 + +| 需求 | 任务 | 验收 | 验证 | +| --- | --- | --- | --- | +| FR-1、FR-2 | T-1:回归测试及配置/模板修复 | AC-1:模拟内置创建无需覆盖账号,IAM 和 Runtime 使用模拟 STS 账号 | managed 配置/共享资源测试 | +| FR-3 | T-2:边界回归 | AC-2:显式账号不匹配在 IAM 前失败;所选角色派生正确 TRN | service 测试 | +| FR-4 | T-3:双语契约及使用说明 | AC-3:保留镜像/参考默认值并记录访问限制 | 文档及差异检查 | + +涉及 `managed/studio_profile.py`、`managed/service.py`、managed 测试、两组组件契约和 managed README。运行 `uv run --extra dev pytest tests/integrations/mpa_managed`、变更文件 Ruff/Pyright 和密钥扫描。本次修复不修改 UI 或 web 产物,前端/浏览器/构建检查不适用。未获得隔离真实测试授权时,云端创建为 not_run。 + +## 审查、批准与风险 + +直接设计审查(review-spec 技能不可用):需求与双语契约一致;保留显式 CLI 安全检查、凭据账号变化保护和覆盖规则;不输出密钥,不隐式复制源资源。无阻塞项。用户要求移除内置限制,批准本次限定修复。新账号仍可能在后续遇到源镜像/参考模板访问失败,本次修复不证明完整新账号部署链路。验证记录见下。 + +## 验证记录 + +2026-10-09,基于 `ef0ad519` 工作区的账号修复;保留此前 IAM 工作及无关 lockfile 改动。 + +- pass:修复前配置/共享资源回归出现 5 个预期失败,复现固定账号拦截;实现后相同流程使用模拟 STS 身份,通过 IAM 准备和 Runtime 账号元数据检查。 +- pass:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py -q`:496 项通过。新增角色测试最初使用了无效 MPA ID 夹具,改为支持的格式后完整目标通过。 +- pass:五个变更 Python 文件的 `uvx --from ruff==0.11.12 ruff check` 和仓库 pre-commit Ruff 格式/检查;生产代码 Pyright 首轮通过。测试 Pyright 发现两处既有夹具类型问题及一处新增 AsyncMock 缺失断言,均做最小修复,最终结果见下。 +- pass:包含 Python、双语契约、managed README 和本设计的变更文件 `uv run --extra dev pre-commit run --files`:Ruff 和硬编码密钥扫描通过;YAML 扫描 not_applicable(未修改 YAML)。 +- not_applicable:前端测试/构建/浏览器、通用智能体聊天及 sidecar 门禁;本修复不改动前端/聊天/sidecar 契约或生成产物。 +- not_run:全仓回归和 all-files pre-commit;没有提交请求,限定部署回归覆盖本修复。真实新账号创建、镜像/参考资源访问及服务重启为 not_run;未执行云资源变更。 + +审查:显式配置仍保留 CLI 账号断言;内置配置不提供断言输入。核验账号继续决定注册表范围及凭据账号变化保护。额外夹具断言/monkeypatch 仅修复受影响测试的类型问题。双语文档及相对链接已同步。 + +- pass:最终对两个生产文件及三个受影响测试文件执行 `uvx pyright --pythonpath .venv/bin/python`:0 错误、0 警告。夹具修正后执行 `uv run --extra dev pytest tests/integrations/mpa_managed/test_service.py tests/integrations/mpa_managed/test_studio_shared_resources.py -q`:70 项通过。最终变更文件 pre-commit 通过。 diff --git a/prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.md b/prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.md new file mode 100644 index 000000000..9720a92df --- /dev/null +++ b/prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.md @@ -0,0 +1,50 @@ +# Preserve managed Runtime recovery across subnet ordering changes + +[中文版](2026-10-09-subnet-order.zh.md) + +- Change ID: `mpa-subnet-order` +- Created/revised: 2026-10-09 +- Status: implemented +- Contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md), [Runtime provisioning](../../../specs/mpa-runtime-provisioning/README.md). + +## Background and scope + +Read-only diagnosis found a Runtime with platform Ready and HTTP 200 readiness, but its creation task failed immediately after V1 became Ready. The shared registry and Runtime contained the same two subnets in opposite order. validate_runtime compares SubnetIds as an ordered list and raises a migration error. An isolated synthetic reproduction confirmed this cause. AccountNetworkProvisioner.ensure repeats that ordered comparison on resume. Adopting the platform order also changes the existing request hash on retry. + +Goals: ignore provider-only subnet permutations at both guards and resume the original deployment without replacing resources. Non-goals: cloud resource writes during verification, registry repairs, broad diagnostics changes, UI/chat changes, permissions, image changes or bypassing actual network drift. + +## Scenarios and requirements + +- FR-1 / AC-1: Given identical unique nonempty subnet lists in different orders, initial Runtime validation and existing Runtime network preparation accept them. VpcId and EnableSharedInternetAccess remain exact comparisons; added, removed, substituted, duplicated or malformed subnet selections remain errors. +- FR-2 / AC-2: Retry retains the caller's requested subnet order, or the registered order when its membership equals the current Runtime selection. Otherwise retain the current selection, never adopt a different registered membership. This preserves already persisted request hashes and ClientTokens for unchanged inputs. Do not sort or rewrite old deployment records or relax changed-input conflict checks. +- FR-3 / AC-3: Simulated full creation and recovery of a pending V1 deployment with reordered provider metadata finish environment/key finalization and readiness, retain the Runtime/Skill Space/database identifiers and create no duplicate resources. Caller inputs and provider objects remain unchanged. + +## Design and contract impact + +Share a small subnet-membership comparator in managed/network.py, validating list shape, nonempty string IDs and uniqueness before set comparison. Use it only for SubnetIds in network.py and runtime.py; other immutable fields remain strict. For resume, retain explicit requested ordering. With no explicit selection, prefer the shared registry ordering only if it has identical members to the active Runtime; otherwise preserve the active per-agent selection. This addresses both migration guards and retry hash stability without changing hashing format or persistent schema. + +Studio creation owns this network/recovery contract; Runtime provisioning references it. No API/configuration/schema/dependency/permission changes; general agents, CLI legacy provisioning, async deadlines, locks, cancellation, terminal handling and credential boundaries remain unchanged. Malformed lists are rejected rather than converted to sets blindly. Reuse existing fake cloud/registry lifecycle tests; no frontend or generated assets are affected. + +## Tasks and affected files + +- T-1 (FR-1/AC-1): failing tests in test_deployment_network.py and test_runtime_deployment_edges.py; update managed/network.py and managed/runtime.py. +- T-2 (FR-2, FR-3/AC-2, AC-3): regression for a persisted pending V1 with original hash, reversed metadata, same-ID retry and no duplicates; preserve explicit order and registered order in network preparation. +- T-3: reconcile paired Studio/Runtime specs and managed README guides, run targeted/broader affected provisioning tests, Ruff/Pyright, scoped pre-commit/secret scan and document link/whitespace checks. + +## Risks and acceptance verification + +Blind set conversion could hide duplicate or invalid IDs: validate before comparison and cover negatives. Returning provider order could strand old pending hashes: exercise an already persisted original request through the production retry path. Registry membership can differ for explicit per-agent overrides: do not substitute the shared default when members differ. Simulated tests do not prove cloud publication; live retry remains an operator action after the fix. No unreviewed cloud mutation is needed to deliver this code repair. + +## Review and approval + +User approved the preceding proposed repair with “修复下” on 2026-10-09. The implementation detail preserving hash order is necessary to deliver that same-ID recovery requirement. review-spec is unavailable in the skill catalog; direct review before production/test edits checked bilingual equivalence, contract ownership, error boundaries, compatibility, security, testability and retained concurrency/deadline behavior. No blockers. Tested scope will be ef0ad519 plus this fix and the pre-existing uncommitted MPA changes. Results will be recorded below; full commit synchronization/gates await commit authorization. + +## Results (2026-10-09) + +- pass: T-1/T-2 and AC-1/AC-2/AC-3. The corrected fail-first fixture produced six failures from ordered comparison/request-hash drift, one existing-success boundary passed (103 deselected), before implementation. +- pass: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short` — 625 passed, five existing deprecation warnings. Includes fresh/pending lifecycle, finalization, unchanged hash/token, negative drift and malformed-list coverage. +- pass: `uvx --from ruff==0.11.12 ruff check` and `uvx pyright --pythonpath .venv/bin/python` on network.py, runtime.py, test_deployment_network.py and test_runtime_deployment_edges.py. Initial Pyright findings were repaired (list narrowing and conditional test variables); final result zero errors. +- pass: direct implementation review verifies unchanged request hashing, no mutation of caller/provider selections, same-membership-only registry ordering preference, no relaxed resource ownership or real-drift checks, and unchanged async lifecycle/cleanup. +- blocked: fresh live read-only Runtime/registry verification returned ApiError; no provider payload or credentials were printed. The earlier diagnostic snapshot and synthetic regression establish the ordering defect, but no successful post-fix cloud read or retry is claimed. +- pass: scoped pre-commit (Ruff, formatting and hardcoded-secret detection), paired-language relative links/identifiers and diff whitespace. Formatting initially changed two test files; checks were rerun after formatting. YAML scan not_applicable, no YAML changed. +- not_run: cloud deployment retry/full live publication; this verification performs no cloud writes. Full SDK-wide regression is not_run because the affected managed/legacy deployment suite covers the scoped integration change. UI/build/browser/generated artifacts and Codex/harness process smoke are not_applicable: no changes to those paths. Full commit synchronization/all-files gates await an authorized commit. T-3 complete; no deferred implementation scope. diff --git a/prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.zh.md b/prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.zh.md new file mode 100644 index 000000000..9c43159c3 --- /dev/null +++ b/prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.zh.md @@ -0,0 +1,50 @@ +# 在子网顺序变化时保留托管 Runtime 的恢复能力 + +[English](2026-10-09-subnet-order.md) + +- 变更 ID:`mpa-subnet-order` +- 创建/修订:2026-10-09 +- 状态:implemented +- 契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md)、[Runtime 部署](../../../specs/mpa-runtime-provisioning/README.zh.md)。 + +## 背景和范围 + +只读诊断发现 Runtime 的平台状态为 Ready,就绪接口为 HTTP 200,但创建任务在 V1 就绪后立即失败。共享注册记录与 Runtime 包含同样两个子网,顺序相反。validate_runtime 按有序列表比较 SubnetIds,抛出迁移错误。独立的合成样例已确认原因。AccountNetworkProvisioner.ensure 在恢复时重复该有序比较,采用平台顺序还会改变重试时已有的请求哈希。 + +目标:两处检查均忽略提供方仅改变子网顺序的情况,恢复原部署且不替换资源。非目标:验证时写云资源、修复注册记录、扩大诊断改造、修改 UI/聊天、权限、镜像或绕过真实网络变更。 + +## 场景和需求 + +- FR-1 / AC-1:两份子网列表成员相同、非空且无重复,仅顺序不同,首次 Runtime 校验和已有 Runtime 网络准备均接受。VpcId、EnableSharedInternetAccess 仍精确比较;增加、删除、替换、重复或格式错误的子网选择仍报错。 +- FR-2 / AC-2:重试保留调用方请求中的子网顺序;没有显式选择且共享记录与当前 Runtime 成员一致时保留注册顺序,否则保留当前选择,不采用成员不同的共享默认值。这保留未改变输入的已持久化请求哈希和 ClientToken。不排序或改写旧部署记录,不放宽输入变更冲突检查。 +- FR-3 / AC-3:模拟完整创建及已有待完成 V1 的恢复,平台元数据顺序相反时仍完成环境/密钥补齐和就绪检查,保留 Runtime/Skill Space/数据库标识且无重复资源。调用方输入和平台对象保持不变。 + +## 设计和契约影响 + +在 managed/network.py 共用一个小型子网成员比较函数,先验证列表格式、非空字符串 ID 和唯一性,再比较集合。network.py 和 runtime.py 仅对 SubnetIds 使用该函数,其他不可变字段仍严格比较。恢复时保留显式请求顺序;没有显式选择时,仅在共享注册记录与当前 Runtime 成员相同时使用注册顺序,否则保留当前智能体的选择。这同时解决迁移误判与重试哈希稳定性,不改变哈希格式或持久化结构。 + +Studio 创建拥有网络/恢复契约,Runtime 部署引用该契约。无 API/配置/结构/依赖/权限变化;通用智能体、旧 CLI 部署、异步截止时间、锁、取消、终态处理及凭据边界均不变。不盲目转换集合,格式错误列表仍拒绝。复用现有模拟云/注册记录生命周期测试,不涉及前端或生成资源。 + +## 任务和影响文件 + +- T-1(FR-1/AC-1):在 test_deployment_network.py、test_runtime_deployment_edges.py 添加先失败测试,修改 managed/network.py、managed/runtime.py。 +- T-2(FR-2、FR-3/AC-2、AC-3):覆盖已有待完成 V1、原始哈希、反序元数据、同 ID 重试及无重复资源;网络准备保留显式或注册顺序。 +- T-3:同步 Studio/Runtime 双语契约及 managed README 指南,运行目标和受影响部署回归、Ruff/Pyright、范围内 pre-commit/密钥扫描及文档链接/空白检查。 + +## 风险和验收验证 + +盲目转换集合可能隐藏重复或非法 ID:比较前验证并覆盖反例。采用平台顺序可能让旧待完成哈希无法恢复:通过生产重试路径验证已持久化原始请求。显式智能体覆盖可能与注册成员不同:不得以共享默认值替换。模拟测试不能证明云端发布,修复后的真实重试仍由操作者执行。交付代码修复不需要未经审查的云写操作。 + +## 审查和批准 + +用户于 2026-10-09 用“修复下”批准上轮提出的修复。保留哈希顺序是实现同 ID 恢复要求的必要细节。技能目录无 review-spec,修改生产代码/测试前已直接审查双语等价性、契约归属、错误边界、兼容性、安全、可测试性以及保留的并发/截止时间行为,无阻塞项。验证范围为 ef0ad519 加本次修复及已有未提交 MPA 修改。结果记录于下方;完整提交同步和门禁等待提交授权。 + +## 结果(2026-10-09) + +- pass:T-1/T-2、AC-1/AC-2/AC-3。修正测试样例后,实施前先失败测试出现六处有序比较/请求哈希漂移失败,一项原本成功的边界通过(103 项未选中)。 +- pass:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short` — 625 项通过,五条已有弃用警告。包含首次/待完成生命周期、补齐流程、原哈希/token 保留、真实变更及格式错误列表反例。 +- pass:对 network.py、runtime.py、test_deployment_network.py、test_runtime_deployment_edges.py 执行 `uvx --from ruff==0.11.12 ruff check`、`uvx pyright --pythonpath .venv/bin/python`。初次 Pyright 问题已修复(列表类型收窄和条件测试变量),最终零错误。 +- pass:直接实现审查确认请求哈希算法未变,不修改调用方/平台的子网选择,仅成员一致时优先采用注册顺序,不放宽资源归属或真实变更检查,异步生命周期/清理不变。 +- blocked:本次真实 Runtime/注册记录只读核对返回 ApiError,未输出提供方请求内容或凭据。此前诊断快照及合成回归已确认顺序缺陷,但不声称修复后云查询或重试已成功。 +- pass:范围内 pre-commit(Ruff、格式及硬编码密钥检测)、双语相对链接/标识和 diff 空白检查。格式检查首次修改两个测试文件,格式化后重跑检查。YAML 扫描 not_applicable,未修改 YAML。 +- not_run:云端部署重试/完整实际发布,验证不执行云写操作。全 SDK 回归 not_run,受影响的托管/旧部署测试已覆盖本次集成修复。UI/构建/浏览器/生成资源及 Codex/harness 进程 smoke 为 not_applicable,未修改这些路径。完整提交同步/全文件门禁等待提交授权。T-3 完成,无延期实现范围。 diff --git a/prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.md b/prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.md new file mode 100644 index 000000000..52028f2b3 --- /dev/null +++ b/prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.md @@ -0,0 +1,54 @@ +# Use the entered Runtime name for new MPA sandbox templates + +[中文版](2026-10-09-runtime-named-worker.zh.md) + +- Change ID: `runtime-named-worker`; created/revised: 2026-10-09; status: implemented. +- Contract: [Studio MPA creation CON-3](../../../specs/studio-mpa-creation/README.md). +- Predecessor: [agent-derived worker names](2026-09-28-agent-derived-worker-name.md). + +## Background, goals and non-goals + +Named Studio creation keeps an automatically generated agent ID separate from the entered Runtime name. `service.provision` forwards the name to Runtime deployment but not to `ensure_worker`, so sandbox templates still display the generated ID with hyphens replaced by underscores. The user withdrew the proposed internal-ID change and requested only matching new template names to the entered name. + +Keep internal ID generation, ownership, database/Skill Space/channel bindings, Runtime names, image defaults, directory search and the three-step form unchanged. No cloud renames, task/database edits, credential changes, deployment, commit or push are authorized. Generic agents and existing CLI callers without a name remain unchanged. + +## Requirements and scenarios + +- FR-1 / AC-1: A fresh named request creates/discovers a Worker with exactly the validated, trimmed Runtime name, including case, hyphens and underscores. The existing 4–64 ASCII-name contract applies; invalid names fail before Worker cloud calls. The [official CreateTool contract](https://docs.volcengine.com/docs/agentkit/CreateTool_-_Creates_tool?lang=zh) supports the same characters and length. +- FR-2 / AC-2: The service passes the name to Worker preparation; `MPA_AGENT_ID`, scoped ownership tags, registry keys and Runtime `ToolId` retain their original identifiers. Legacy calls without a name still use the normalized agent ID. +- FR-3 / AC-3: Existing bound/configured Worker IDs are authoritative and are not renamed. A pending pre-upgrade Worker intent can replay the normalized-ID name or older hashed name only if the entire candidate payload matches its persisted hash, retaining the original ClientToken. All other payload changes fail before discovery/creation. +- FR-4 / AC-4: New pending intents store their selected `worker_name` in the existing deployment JSON. A later different name must not be treated as a legacy fallback. A matching name owned by another agent is still an error; no silent adoption or success. + +Given a named fresh request, the template name matches the Runtime name and internal bindings remain stable. Given a lost create response or upgrade, the exact pending payload/token is retried. Given a registered Worker, no discovery/create/rename occurs. Given an unrelated duplicate name or changed image, fail without weakening ownership checks. + +## Design, contracts and affected files + +Add an optional keyword-only `runtime_name` to `ensure_worker` and forward it from `service.provision`. Validate it with the existing Runtime-name validator and use it directly as new CreateTool `Name`. Existing IDs bypass naming reconciliation. Persist nonsecret `worker_name` with newly saved intents. For old records without that field, compare the complete current payload against the two historical Name variants before permitting fallback; retain the field's absence across retries so repeated lost responses still replay the original name. Names alone never authorize reuse. Existing account locking, retry bounds, timeout/cancellation and metadata verification remain unchanged. + +Production files: `managed/worker.py`, `managed/service.py`. Tests: `test_worker.py`, `test_service.py`. Maintain bilingual creation specs and managed README naming sections. No SQL migration, external API/request-body change, new dependency, permission or frontend/build artifact is needed. Public optional-keyword addition preserves existing callers. Search already uses Runtime `name`, so its behavior is unchanged. Human names can collide; existing collision refusal remains required rather than adding unrequested suffixes. + +## Tasks, acceptance and verification + +1. T-1 / FR-1–FR-4: Add failing regressions for exact names, boundaries, service forwarding, pending replay, changed-name/image refusal, collision refusal and existing-ID reuse. +2. T-2 / FR-1–FR-4: Implement the optional name and full-hash legacy compatibility. +3. T-3: Reconcile both documentation languages; run targeted Worker/service tests, managed/CLI regression, changed-file Ruff/Pyright, pre-commit and whitespace/link checks. + +Commands: `uv run --extra dev pytest tests/integrations/mpa_managed/test_worker.py tests/integrations/mpa_managed/test_worker_recovery.py tests/integrations/mpa_managed/test_service.py -n 2 -q`; `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_cli_mpa.py -n 2 -q`; Ruff/Pyright on changed Python files; `uv run --extra dev pre-commit run --all-files`; `git diff --check`. Real cloud creation is not authorized and is reported separately. Frontend/browser/sidecar gates are not applicable because this change touches only managed provisioning, with no UI or sidecar changes. + +## Review, approval and risks + +The user's final instruction “保持原样吧,但是把沙箱模板的名称也换成手填的就行” approves this bounded scope and supersedes the internal-ID proposal, which made no code changes. `review-spec` is unavailable; direct review checked ownership, hash/token recovery, existing IDs, exact-name constraints, cancellation/timeouts, bilingual equivalence and testability. No design blockers. An existing same-name Tool can reject a new request. Existing tools will still have their previous names; correcting them requires a separately authorized operation. A pending new-name intent requires this code to replay it after rollback. + +## Delivery evidence + +T-1–T-3 and AC-1–AC-4 are complete. Direct implementation review found and fixed the repeated legacy-retry case before delivery. Existing uncommitted image-discovery rollback is preserved separately; its tests/assets are not attributed to this naming fix. Tested scope: the four changed Python files and affected managed/CLI suites on the uncommitted diff based on `df797f94`, 2026-10-09. + +- `pass`: Regression-first new-name tests initially failed in 16 cases; a subsequent repeated legacy-retry regression failed in two cases before its fix. +- `pass`: Targeted Worker/recovery/service checks: 175 tests. Final managed/CLI regression with two workers: 678 tests, including continuous legacy retry and existing-ID reuse. +- `pass`: Ruff 0.11.12 check/format on the four changed Python files; Pyright: zero errors/warnings. +- `pass`: `uv run --extra dev pre-commit run --all-files`, including both secret checks; `git diff --check`; paired-language and local-link checks. +- `not_run`: Full repository Python regression; the affected managed/CLI integration coverage was selected for this bounded provisioning change. +- `not_run`: Real cloud creation/rename; not authorized. Restart the running Studio service to load the change before creating a fresh named request. +- `not_applicable`: Frontend/browser/build, sidecar and runtime-process smoke gates; no UI, generated assets, sidecar or runtime-process change in this fix. + +No commit, push, deployment or existing-resource rename was performed. diff --git a/prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.zh.md b/prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.zh.md new file mode 100644 index 000000000..6aae3d8e1 --- /dev/null +++ b/prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.zh.md @@ -0,0 +1,54 @@ +# 新 MPA 沙箱模板使用手填 Runtime 名称 + +[English](2026-10-09-runtime-named-worker.md) + +- Change ID:`runtime-named-worker`;创建/修订:2026-10-09;状态:implemented。 +- 契约:[Studio MPA 创建 CON-3](../../../specs/studio-mpa-creation/README.zh.md)。 +- 前序:[从智能体 ID 派生 Worker 名称](2026-09-28-agent-derived-worker-name.zh.md)。 + +## 背景、目标与非目标 + +Studio 名称创建将自动生成的智能体 ID 与手填 Runtime 名称分开。`service.provision` 将名称传给 Runtime 部署,却没有传给 `ensure_worker`,所以沙箱模板仍显示将连字符替换为下划线的内部 ID。用户取消了内部 ID 改造,只要求新模板名称与手填名称一致。 + +保持内部 ID 生成、归属、数据库/技能空间/渠道绑定、Runtime 名称、镜像默认值、列表搜索及三步表单不变。未授权云资源改名、任务/数据库修改、凭证变更、部署、提交或推送。通用智能体及不提供名称的旧 CLI 调用不变。 + +## 需求与场景 + +- FR-1 / AC-1:新的名称创建请求创建/发现 Worker 时,使用经过校验、去除首尾空白的 Runtime 名称,保留大小写、连字符和下划线。沿用 4–64 位 ASCII 名称合同;非法名称在 Worker 云调用前失败。[官方 CreateTool 合同](https://docs.volcengine.com/docs/agentkit/CreateTool_-_Creates_tool?lang=zh) 支持相同字符和长度。 +- FR-2 / AC-2:服务将名称传给 Worker 准备;`MPA_AGENT_ID`、作用域归属标签、注册库键及 Runtime `ToolId` 仍使用原标识。不提供名称的旧调用仍使用标准化的智能体 ID。 +- FR-3 / AC-3:已绑定/显式配置的 Worker ID 优先,不进行改名。升级前未完成的 Worker 意图仅在完整候选请求与已存 hash 一致时,才可重放标准化 ID 名称或更早的哈希名称,保留原 ClientToken。其他请求变化在发现/创建前失败。 +- FR-4 / AC-4:新的未完成意图在已有部署 JSON 中保存选中的 `worker_name`。后续不同名称不得被视为旧版兼容回退。同名但属于其他智能体的资源仍报错,不静默接管或视为成功。 + +给定新的名称请求,模板名称与 Runtime 名称一致,内部绑定稳定。给定创建响应丢失或升级,重试完整原请求/token。给定已登记 Worker,不发现/创建/改名。给定无关同名资源或镜像变化,不降低归属检查并直接失败。 + +## 设计、契约与影响文件 + +为 `ensure_worker` 增加可选仅关键字参数 `runtime_name`,由 `service.provision` 传入。使用现有 Runtime 名称校验器校验,并直接作为新 CreateTool `Name`。已有 ID 跳过命名协调。新意图保存时持久化非密钥字段 `worker_name`。旧记录没有该字段时,对两种历史 Name 分别计算完整当前请求的 hash,仅完全匹配才允许回退;重试时仍不补写该字段,确保连续丢失响应时继续重放原名称。名称本身不授权复用。账号锁、重试次数、超时/取消及元数据验证保持不变。 + +生产文件:`managed/worker.py`、`managed/service.py`。测试:`test_worker.py`、`test_service.py`。维护双语创建契约及 managed README 命名段落。不需要 SQL 迁移、外部 API/请求体变更、新依赖、权限或前端/构建产物修改。公开可选关键字参数兼容现有调用。搜索已使用 Runtime `name`,行为不变。用户名称可能冲突;保留现有冲突拒绝,不添加未要求的后缀。 + +## 任务、验收与验证 + +1. T-1 / FR-1–FR-4:补充先失败回归,覆盖准确名称、边界、服务透传、未完成重放、名称/镜像变化拒绝、同名冲突拒绝和已有 ID 复用。 +2. T-2 / FR-1–FR-4:实现可选名称和完整 hash 的旧版兼容。 +3. T-3:同步双语文档;运行 Worker/服务目标测试、managed/CLI 回归、改动文件 Ruff/Pyright、pre-commit 及空白/链接检查。 + +命令:`uv run --extra dev pytest tests/integrations/mpa_managed/test_worker.py tests/integrations/mpa_managed/test_worker_recovery.py tests/integrations/mpa_managed/test_service.py -n 2 -q`;`uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_cli_mpa.py -n 2 -q`;改动 Python 文件 Ruff/Pyright;`uv run --extra dev pre-commit run --all-files`;`git diff --check`。真实云创建未授权,单独报告。前端/浏览器/sidecar 检查不适用,本次只修改托管创建,无 UI 或 sidecar 变化。 + +## 审查、批准与风险 + +用户最终要求“保持原样吧,但是把沙箱模板的名称也换成手填的就行”,批准此范围,并取代尚未修改代码的内部 ID 方案。`review-spec` 不可用;直接审查核对归属、hash/token 恢复、已有 ID、准确名称约束、取消/超时、双语等价和可测试性,无设计阻塞。已有同名 Tool 可能使新请求失败。已有模板继续保留旧名称,修正须另行授权。若回滚后要重放新的名称意图,需要此版本代码。 + +## 交付证据 + +T-1–T-3 与 AC-1–AC-4 已完成。交付前直接实施审查发现并修复了旧任务连续重试的问题。之前未提交的镜像查询撤回独立保留,其测试/构建产物不归属于本次命名修复。测试范围:基于 `df797f94` 的未提交差异中四个 Python 文件及受影响的 managed/CLI 测试,执行日期 2026-10-09。 + +- `pass`:先失败回归中,新名称测试最初 16 项失败;随后旧任务连续重试回归在修复前 2 项失败。 +- `pass`:Worker/恢复/服务目标测试 175 项;最终 managed/CLI 回归使用两个进程,678 项通过,包含旧任务连续重试和已有 ID 复用。 +- `pass`:四个改动 Python 文件的 Ruff 0.11.12 check/format;Pyright 零错误/警告。 +- `pass`:`uv run --extra dev pre-commit run --all-files`,包含两项密钥检查;`git diff --check`;双语配对及本地链接检查。 +- `not_run`:全仓 Python 回归;针对本次有限的创建流程变更,选择受影响的 managed/CLI 集成覆盖。 +- `not_run`:真实云创建/改名,未授权。创建新的名称请求前,应重启正在运行的 Studio 服务加载改动。 +- `not_applicable`:前端/浏览器/构建、sidecar 和运行时进程 smoke;本次修复没有 UI、生成产物、sidecar 或运行时进程变更。 + +未执行提交、推送、部署或已有资源改名。 diff --git a/prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.md b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.md new file mode 100644 index 000000000..ecac3ad2d --- /dev/null +++ b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.md @@ -0,0 +1,62 @@ +# Worker creation without an old-account template + +[中文版](2026-10-09-independent-worker.zh.md) + +- Change ID: `mpa-worker-template` +- Created/revised: 2026-10-09 +- Status: implemented +- Contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md), [Runtime provisioning](../../../specs/mpa-runtime-provisioning/README.md). + +## Background and evidence + +Studio's built-in Worker profile references a Tool in a previous account. A fresh deployment account cannot read that Tool: creation fails at `get_reference_worker` before `CreateTool`. The Worker image is already explicit. `worker.py` only copies environment settings from the reference; command, resources, role and networking come from the provisioner. The pinned Worker source revision `81f3496`, `scripts/run.sh`, supplies startup defaults without a reference Tool. + +## Goals, non-goals and scenarios + +Allow a fresh account to create a Worker from its image and explicit startup settings. Keep optional references/existing Workers compatible. Do not change images, IAM/networking, Runtime chat, frontend, or automatically modify existing Tools. Registry image access remains an independent prerequisite. + +- Fresh Studio creation reaches `CreateTool` without reading an old reference. +- A CLI profile may explicitly inherit an accessible Tool's environment, with explicit settings taking precedence. +- Missing explicit references remain failures; retrying an uncertain creation preserves its payload/token. + +## Requirements and design + +- **FR-1:** Remove built-in `reference-id`. Pin nonsecret `PORT`, Worker port, headless/minimal mode, workspace/data/runtime/sidecar roots and Skill Space base directory to the pinned image's defaults. +- **FR-2:** Add optional `managed.worker.env: dict[str, str]`, default empty. Resolve whole `${ENV_NAME}` references on the server. Reject invalid uppercase environment keys, agent/Runtime/Tool/Skill Space bindings, inherited channel/Runtime credentials and control database URLs. Nonempty env with `existing-id` fails rather than being silently ignored. +- **FR-3:** Merge filtered reference environment, explicit env, then generated `MPA_AGENT_ID`. Do not mutate the profile or reference response. Optional explicit reference failure never falls back to an empty environment. +- **FR-4:** Keep sorted request hashing, ClientToken, ownership validation, cancellation and bounded retry unchanged. Changed explicit env on an unfinished request is a configuration conflict. Do not persist env values in deployment records or expose them in config summaries, repr or error responses. + +The existing image contract handles model credentials per session; Studio does not copy old model keys. Additional operator settings use Worker env with server secret references. No new dependency, cloud API, permission, task schema or frontend asset is required. The Studio component owns the new configuration contract; Runtime provisioning references it. Legacy non-managed creation is unchanged. + +## Tasks and acceptance + +| Requirement | Task | Acceptance | +| --- | --- | --- | +| FR-1 | T-1: update built-in profile and regression | AC-1: image-only fresh-account request skips reference lookup and carries explicit startup settings | +| FR-2 | T-2: config schema/resolution and safe validation tests | AC-2: secret refs resolve; invalid/owned keys and existing-worker env fail without exposing values | +| FR-3 | T-3: request merge and compatibility tests | AC-3: explicit values win, agent binding remains generated, explicit missing reference still fails | +| FR-4 | T-4: retry/immutability tests and review | AC-4: unchanged payload retries use the same token; changed env fails; registry/summary/repr exclude env values | + +## Risks and recovery + +Defaults cover the pinned image; custom images may need explicit env. No cloud creation smoke is performed automatically. Existing Tool IDs remain authoritative; no rename/update. Tasks that failed before Worker intent creation can retry with the same agent ID after Studio restarts. Already-dispatched tasks with changed hashes require their original configuration; never reset intent to bypass duplicate protection. + +## Review and verification record + +Direct design review (review-spec unavailable) cleared configuration precedence, secret handling, account boundaries, partial failure, compatibility and bilingual equivalence. User approved the proposed removal of the fixed old template and explicit configuration with “帮我改” on 2026-10-09 before implementation. + +Verification scope: this Worker change on `ef0ad519` plus prior uncommitted account/IAM/network/APIG fixes. Required commands: targeted config/Worker tests, managed provisioning regression, changed-file Ruff/Pyright, scoped pre-commit, bilingual/link/whitespace checks. Live cloud creation: `not_run`; code and simulated requests cannot prove image pull permissions or platform readiness. Browser/frontend gates: `not_applicable`, no UI/API changes. Results will be recorded after execution. + +### Executed checks (2026-10-09) + +- `fail` before implementation: config/Worker regression reproduced the fixed old reference and missing env support (5 failed, 94 passed). +- `pass`: `uv run --extra dev pytest tests/integrations/mpa_managed/test_config.py tests/integrations/mpa_managed/test_worker.py tests/integrations/mpa_managed/test_worker_recovery.py tests/integrations/mpa_managed/test_worker_metadata.py -q --tb=short` — 152 passed. +- `pass`: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short` — 594 passed, 5 existing deprecation warnings; includes final reference filtering and pending-env recovery. +- `pass`: `uvx --from ruff==0.11.12 ruff check` and `uvx pyright --pythonpath .venv/bin/python` on `config.py`, `worker.py`, `studio_profile.py`, `test_config.py`, `test_worker.py` in their managed source/test directories — zero errors. +- `pass`: `uv run --extra dev pre-commit run --files` on the five Python files and all eight changed documentation files — Ruff and hardcoded-secret detection passed. YAML hook `not_applicable` (no YAML changed). +- `pass`: paired language identifiers/relative links and `git diff --check`. Direct implementation review found no blockers: no reference lookup in the simulated new-account request, explicit override/immutability, filtered bindings/control URLs, safe secret refs and unchanged pending-token protection. AC-1 through AC-4 passed with simulated requests. +- `not_run`: live image pull/container startup and broad unrelated SDK regression. The isolated managed suite covers the affected contracts; no cloud resource was created for verification. `not_applicable`: frontend build/browser, generated assets and runtime process smoke (no chat/frontend/image code changes). Full all-files commit gates await a separately authorized commit. + +T-1 through T-4 are complete. No agreed implementation scope is deferred; live platform readiness remains an operational validation limit. Restart local Studio and retry the same agent that stopped before Worker intent creation. + +Startup-default follow-up: [2026-10-09-worker-image-defaults](2026-10-09-worker-image-defaults.md) supersedes the explicit built-in env choice in FR-1/AC-1. Initial verification above is historical evidence; all other contracts remain. diff --git a/prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.zh.md b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.zh.md new file mode 100644 index 000000000..eeb7a1382 --- /dev/null +++ b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.zh.md @@ -0,0 +1,62 @@ +# 不依赖旧账号模板的 Worker 创建 + +[English](2026-10-09-independent-worker.md) + +- 变更 ID:`mpa-worker-template` +- 创建/修订:2026-10-09 +- 状态:implemented +- 契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md)、[Runtime 部署](../../../specs/mpa-runtime-provisioning/README.zh.md)。 + +## 背景与证据 + +Studio 内置 Worker 配置引用旧账号中的 Tool。新部署账号无法读取该 Tool:创建在 `get_reference_worker` 失败,尚未调用 `CreateTool`。Worker 镜像已显式配置。`worker.py` 只从引用模板复制环境设置;命令、资源、角色与网络由编排器生成。固定 Worker 源码版本 `81f3496` 的 `scripts/run.sh` 提供启动默认值,无需引用 Tool。 + +## 目标、非目标与场景 + +让新账号使用镜像和显式启动配置创建 Worker,同时兼容可选模板引用和已有 Worker。不修改镜像、IAM/网络、Runtime 聊天、前端,也不自动修改已有 Tool。镜像仓库访问仍是独立前置条件。 + +- 新 Studio 创建不读取旧模板,直接到达 `CreateTool`。 +- CLI 配置可以显式继承有权限访问的 Tool 环境,显式设置优先。 +- 显式引用不存在仍失败;结果不确定的创建重试保留原请求和 token。 + +## 需求与设计 + +- **FR-1:** 删除内置 `reference-id`。将不含密钥的 `PORT`、Worker 端口、headless/minimal 模式、workspace/data/runtime/sidecar 根目录及技能空间基础目录显式固定为该镜像的默认值。 +- **FR-2:** 新增可选 `managed.worker.env: dict[str, str]`,默认空。服务端解析完整 `${ENV_NAME}` 引用。拒绝非法大写环境变量名、智能体/Runtime/Tool/技能空间绑定、继承的渠道/Runtime 凭据以及控制库连接地址。`existing-id` 携带非空 env 时失败,避免静默忽略。 +- **FR-3:** 按已过滤模板环境、显式 env、生成的 `MPA_AGENT_ID` 顺序合并。不修改配置对象和模板响应。显式引用失败不回退为空环境。 +- **FR-4:** 保留排序请求哈希、ClientToken、归属校验、取消和有界重试。未完成请求的显式 env 改变时报告配置冲突。环境值不写入部署记录,也不出现在配置摘要、repr 或错误响应中。 + +已有镜像契约支持按会话传入模型凭据;Studio 不复制旧模型密钥。额外运维配置通过 Worker env 和服务端密钥引用提供。不新增依赖、云 API、权限、任务表结构或前端产物。新配置契约由 Studio 组件维护,Runtime 部署引用该契约。非托管旧创建逻辑不变。 + +## 任务与验收 + +| 需求 | 任务 | 验收 | +| --- | --- | --- | +| FR-1 | T-1:修改内置配置并补回归 | AC-1:新账号使用镜像创建时跳过模板读取,提交显式启动配置 | +| FR-2 | T-2:配置结构/解析及安全校验测试 | AC-2:密钥引用可解析;非法/保留字段及已有 Worker env 失败且不暴露值 | +| FR-3 | T-3:请求合并与兼容测试 | AC-3:显式值优先,智能体绑定由编排器生成,缺失显式模板仍失败 | +| FR-4 | T-4:重试/不可变测试及审查 | AC-4:相同请求重试 token 不变;修改 env 失败;注册记录/摘要/repr 不含环境值 | + +## 风险与恢复 + +默认值覆盖固定镜像;自定义镜像可能需要显式 env。不自动执行云创建冒烟。已有 Tool ID 仍是绑定依据,不重命名/更新。尚未写入 Worker 创建意图就失败的任务,可重启 Studio 后以同一智能体 ID 重试。已发出创建且哈希改变的任务必须保留原配置;禁止重置意图绕过防重复保护。 + +## 审查与验证记录 + +未提供 review-spec,直接审查通过了配置优先级、密钥处理、账号边界、部分失败、兼容性及双语一致性。2026-10-09 用户以“帮我改”批准移除固定旧模板并显式配置,在实现前记录。 + +验证范围:`ef0ad519` 加本次 Worker 修改及此前未提交的账号/IAM/网络/APIG 修复。必需命令:配置/Worker 定向测试、托管部署回归、修改文件 Ruff/Pyright、定向 pre-commit、双语/链接/空白检查。真实云创建:`not_run`;代码和模拟请求不能证明镜像拉取权限或平台就绪。浏览器/前端检查:`not_applicable`,无 UI/API 改动。执行后补充结果。 + +### 已执行检查(2026-10-09) + +- 实现前 `fail`:配置/Worker 回归复现固定旧模板和缺少 env 支持(5 failed、94 passed)。 +- `pass`:`uv run --extra dev pytest tests/integrations/mpa_managed/test_config.py tests/integrations/mpa_managed/test_worker.py tests/integrations/mpa_managed/test_worker_recovery.py tests/integrations/mpa_managed/test_worker_metadata.py -q --tb=short` — 152 passed。 +- `pass`:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short` — 594 passed、5 条已有弃用警告;覆盖最终模板过滤及未完成 env 恢复。 +- `pass`:对 managed 源码/测试目录的 `config.py`、`worker.py`、`studio_profile.py`、`test_config.py`、`test_worker.py` 执行 `uvx --from ruff==0.11.12 ruff check` 和 `uvx pyright --pythonpath .venv/bin/python` — 零错误。 +- `pass`:对上述五个 Python 文件及八个修改文档执行 `uv run --extra dev pre-commit run --files` — Ruff 和硬编码密钥检测通过。YAML 钩子 `not_applicable`(未修改 YAML)。 +- `pass`:双语标识/相对链接及 `git diff --check`。直接实现审查无阻塞项:模拟新账号请求不读取模板、显式覆盖/不可变性、绑定/控制库地址过滤、安全密钥引用及未完成 token 保护。AC-1 至 AC-4 通过模拟请求验收。 +- `not_run`:真实镜像拉取/容器启动及全量无关 SDK 回归。隔离托管测试集覆盖受影响契约;验证没有创建云资源。`not_applicable`:前端构建/浏览器、生成产物及运行进程冒烟(未修改聊天/前端/镜像代码)。完整 all-files 提交检查等待另行授权提交。 + +T-1 至 T-4 完成,无已约定实现范围延期;真实平台就绪仍属于运维验证限制。重启本地 Studio,以同一智能体 ID 重试尚未生成 Worker 创建意图的任务。 + +启动默认值后续修订:[2026-10-09-worker-image-defaults](2026-10-09-worker-image-defaults.zh.md) 替代 FR-1/AC-1 中内置 env 显式注入的选择。上述初次验证为历史证据,其余契约保留。 diff --git a/prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.md b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.md new file mode 100644 index 000000000..c44cb2372 --- /dev/null +++ b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.md @@ -0,0 +1,42 @@ +# Use Worker image defaults without duplicate Tool environment + +[中文版](2026-10-09-worker-image-defaults.zh.md) + +- Change ID: `mpa-worker-image-defaults` +- Created/revised: 2026-10-09 +- Status: implemented +- Predecessor: [independent Worker creation](2026-10-09-independent-worker.md), amends its FR-1/AC-1 startup-setting choice only. +- Contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md); Runtime provisioning consumes that contract unchanged. + +## Evidence, goals and scope + +The pinned Worker source `81f3496` Dockerfile defines PORT=8000, MPA_CODEX_WORKER_PORT=8092, headless/minimal mode and all five configured directory roots. scripts/run.sh also supplies these defaults and synchronizes PUBLIC_PORT from PORT. Duplicating the nine defaults in Tool Envs is unnecessary and overrides defaults when an operator selects another image. The control-plane Tool environment list is not the full container environment. + +Remove only the nine built-in Worker env entries. Keep optional managed.worker.env, reference/existing Worker support, fixed CreateTool.Port=8000 and generated MPA_AGENT_ID. Do not mutate existing Tools, chat, frontend, image versions, permissions or resource identity. Custom images must support the existing /opt/gem/run.sh entrypoint and public port 8000, or use explicit compatible configuration; removing duplication does not guarantee arbitrary image compatibility. + +## Requirements, scenarios and design + +- FR-1: Built-in Studio has empty Worker env and no reference ID. Its new CreateTool Envs contains only generated MPA_AGENT_ID; Port remains 8000. Container startup obtains its port/mode/path settings from the image. +- FR-2: Preserve explicit Worker env merging, validation, redaction and sorted hashing/ClientToken behavior. Existing bindings are not updated. A previously dispatched pending request with changed env still fails hash validation rather than creating a duplicate. +- AC-1: Built-in profile and simulated new-account creation tests prove no duplicate env keys/reference lookup, retain image/role/Port and bind MPA_AGENT_ID. +- AC-2: Existing config/Worker recovery regressions pass, including explicit env and changed-pending-payload rejection. + +No state/schema/API/permission/dependency changes. The Studio spec and bilingual guide describe image-owned defaults; no frontend assets are needed. + +## Tasks, review and verification + +- T-1 (FR-1/AC-1): failing built-in profile/request regressions, remove env block in studio_profile.py, update test_config.py/test_worker.py. +- T-2 (FR-2/AC-2): existing affected provisioning regression and Python gates; synchronize Studio spec/guide and predecessor note. + +User approved removal of all unnecessary defaults on 2026-10-09 with “没必要的就都去了”. Direct design review (review-spec unavailable) cleared bilingual equivalence, entrypoint/port boundary, explicit overrides and pending-intent safety before edits. No blocker or unanswered implementation decision. + +Verification scope: this follow-up on ef0ad519 plus prior uncommitted MPA fixes. Required: fail-first two targeted tests; managed/legacy provisioning and IAM suite; Ruff/Pyright on three changed Python files; scoped pre-commit and paired-language links/identifiers/whitespace. Live cloud startup is not_run (no new cloud writes authorized for verification); frontend/browser/generated assets and runtime process smoke are not_applicable (no changes to those paths). Full commit gates await an authorized commit. Results follow below. + +## Results (2026-10-09) + +- fail before implementation: two targeted tests failed on the duplicate defaults (97 deselected). +- pass: `uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short` — 594 passed, five existing deprecation warnings. AC-1/AC-2 and T-1/T-2 completed with simulated requests. +- pass: `uvx --from ruff==0.11.12 ruff check` and `uvx pyright --pythonpath .venv/bin/python` on studio_profile.py, test_config.py and test_worker.py in their managed directories; zero errors. +- pass: `uv run --extra dev pre-commit run --files` on these three Python files and eight changed documentation files; Ruff/format/hardcoded-secret detection passed. YAML hook not_applicable, no YAML changes. +- pass: paired identifiers/relative links and `git diff --check`; direct implementation review confirms image defaults, generated agent binding and optional explicit env coexist without changing recovery protection. +- not_run: live cloud creation/container startup and unrelated full SDK regression; affected deployment suite passed. not_applicable: UI/build/browser/generated artifacts and runtime smoke. No cloud resources or existing Tools changed. Full commit gates await authorized commit. diff --git a/prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.zh.md b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.zh.md new file mode 100644 index 000000000..1db779beb --- /dev/null +++ b/prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.zh.md @@ -0,0 +1,42 @@ +# 使用 Worker 镜像默认值,移除重复 Tool 环境配置 + +[English](2026-10-09-worker-image-defaults.md) + +- 变更 ID:`mpa-worker-image-defaults` +- 创建/修订:2026-10-09 +- 状态:implemented +- 前序:[独立 Worker 创建](2026-10-09-independent-worker.zh.md),仅修订其 FR-1/AC-1 的启动设置选择。 +- 契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md);Runtime 部署继续引用该契约。 + +## 证据、目标与范围 + +固定 Worker 源码 `81f3496` 的 Dockerfile 定义 PORT=8000、MPA_CODEX_WORKER_PORT=8092、headless/minimal 模式及全部五个目录根路径。scripts/run.sh 同样提供这些默认值,并从 PORT 同步 PUBLIC_PORT。在 Tool Envs 中重复九项默认值没有必要,还会覆盖运维选择其他镜像时的默认设置。控制面的 Tool 环境列表不等于完整容器环境。 + +只移除内置 Worker env 中这九项。保留可选 managed.worker.env、模板引用/已有 Worker 支持、固定 CreateTool.Port=8000 及生成的 MPA_AGENT_ID。不修改已有 Tool、聊天、前端、镜像版本、权限或资源身份。自定义镜像必须支持已有 /opt/gem/run.sh 入口及对外端口 8000,或使用兼容的显式配置;去掉重复设置不代表任意镜像都兼容。 + +## 需求、场景与设计 + +- FR-1:内置 Studio Worker env 为空,reference ID 为空。新 CreateTool Envs 仅包含生成的 MPA_AGENT_ID;Port 仍为 8000。容器启动从镜像获得端口/模式/目录设置。 +- FR-2:保留显式 Worker env 合并、校验、脱敏及排序哈希/ClientToken 行为。不更新已有绑定。已发送而未完成的请求如 env 改变,仍拒绝哈希不一致,不重复创建。 +- AC-1:内置配置和模拟新账号创建测试证明不重复注入、不读取模板,保留镜像/角色/Port 并绑定 MPA_AGENT_ID。 +- AC-2:已有配置/Worker 恢复回归通过,包括显式 env 及未完成载荷改变时的拒绝。 + +不改变状态/表结构/API/权限/依赖。Studio 契约和双语指南说明默认值归镜像所有;无需前端产物。 + +## 任务、审查与验证 + +- T-1(FR-1/AC-1):先写失败的内置配置/请求回归,删除 studio_profile.py 的 env 块,更新 test_config.py/test_worker.py。 +- T-2(FR-2/AC-2):运行受影响部署回归及 Python 检查,同步 Studio 契约/指南及前序说明。 + +用户于 2026-10-09 以“没必要的就都去了”批准移除全部不必要默认配置。未提供 review-spec,编辑前直接审查通过双语一致性、入口/端口边界、显式覆盖及未完成意图保护。没有阻塞或未决实现选择。 + +验证范围:ef0ad519 加本次后续修改及此前未提交的 MPA 修复。必需:两项先失败的定向测试;托管/旧部署和 IAM 测试集;三个修改 Python 文件的 Ruff/Pyright;定向 pre-commit 与双语链接/标识/空白检查。真实云启动为 not_run(未授权为验证新增云写入);前端/浏览器/生成产物及运行进程冒烟为 not_applicable(未修改这些路径)。完整提交检查等待授权提交。结果见下文。 + +## 结果(2026-10-09) + +- 实现前 fail:两项定向测试因重复默认配置失败(97 deselected)。 +- pass:`uv run --extra dev pytest tests/integrations/mpa_managed tests/integrations/test_mpa_provision_env.py tests/integrations/test_mpa_runtime.py tests/cli/test_frontend_deploy_iam.py -q --tb=short` — 594 passed,五条已有弃用警告。AC-1/AC-2 及 T-1/T-2 已通过模拟请求完成。 +- pass:对 managed 目录内 studio_profile.py、test_config.py、test_worker.py 执行 `uvx --from ruff==0.11.12 ruff check` 和 `uvx pyright --pythonpath .venv/bin/python`,零错误。 +- pass:对三个 Python 文件及八个修改文档执行 `uv run --extra dev pre-commit run --files`,Ruff/格式/硬编码密钥检测通过。YAML 钩子为 not_applicable,未修改 YAML。 +- pass:双语标识/相对链接及 `git diff --check`;直接实现审查确认镜像默认值、生成的智能体绑定和可选显式 env 共存,恢复保护不变。 +- not_run:真实云创建/容器启动及无关全量 SDK 回归;受影响部署测试集通过。not_applicable:UI/构建/浏览器/生成产物及运行冒烟。未修改云资源或已有 Tool。完整提交检查等待授权提交。 diff --git a/prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.md b/prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.md new file mode 100644 index 000000000..4285ba0cf --- /dev/null +++ b/prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.md @@ -0,0 +1,75 @@ +# Managed MPA runtime role + +[中文](2026-10-09-managed-runtime-role.zh.md) + +Change ID: `mpa-runtime-iam`; created/revised: 2026-10-09; status: implemented; isolated verification passed, live smoke unverified. +Contracts: [Studio creation](../../../specs/studio-mpa-creation/README.md), [provisioning](../../../specs/mpa-runtime-provisioning/README.md). + +## Background, goals and boundaries + +The built-in Studio profile references `IDRoleForArkClawShareAgent` for both Runtime and Worker but never prepares it. A new deployment account can therefore fail during cloud creation. Read-only inspection of the historical role confirmed trust in `vefaas` and `apig` and 12 system policies; historical test/IDrive policies are not copied. + +Prepare the approved role before other resource mutations. This does not make the entire Beijing profile portable: account assertions, images and Worker reference still require valid deployment configuration. General agents, legacy CLI defaults, custom roles, existing trust documents and policy bodies remain outside automatic mutation. No live IAM mutation, commit, push or deployment is authorized by design approval. + +## Scenarios and requirements + +- FR-1: Built-in Studio uses `managed.iam.mode: auto`; explicit managed profiles default to `existing` and skip IAM preparation. Auto mode accepts only the default Runtime/Worker role and a fresh template source; incompatible sources fail before IAM requests. +- FR-2: In the STS-verified deployment account, get or create the default role with unconditional `sts:AssumeRole` trust for `vefaas` and `apig`. Existing trust must contain both and no deny statements; never rewrite it. Validate returned role name and account TRN. +- FR-3: Add missing Global bindings for the 12 agreed system policies and versioned custom policy `VeADKMPARuntimeAccessV1`. Preserve extra bindings. The custom policy contains the 14 approved actions with resource `*`; a conflicting existing document fails without overwrite. +- FR-4: Explicit missing-object responses alone permit creation. Creation races reread after already-exists. Bounded polling handles visibility delay; timeout/cancellation retain resources for retry with the same agent ID. Requests use fresh verified credentials and isolated SDK instances with transport timeouts. +- FR-5: Emit stage `iam_role` and allowlisted errors for permissions, trust/policy conflicts, ownership and verification failure. Never expose raw SDK messages, documents or credentials. Failure stops before PG/network/Runtime preparation. +- FR-6: Add `iam:CreatePolicy` to the Studio execution policy; other necessary IAM actions already exist. Deployment credentials must be permitted to get/create role and policy, list bindings and attach policies. Configuration inspection performs no IAM calls. + +## Permission baseline + +System: `AgentKitSkillsSandboxAccess`, `AgentKitToolAccess`, `LLMShieldProtectSdkAccess`, `Mem0ReadOnlyAccess`, `AgentKitRuntimeAccess`, `AgentKitTosAccess`, `CloudControlReadOnlyAccess`, `TorchlightApiFullAccess`, `IDReadOnlyAccess`, `VikingdbFullAccess`, `APMPlusServerDataExportRolePolicy`, `AgentKitReadOnlyAccess`. + +Custom: `arkclaw:ListResources`, `arkclaw:GetMpaInstanceConf`, `apig:ListGateways`, `apig:GetGateway`, `apig:CreateGateway`, `apig:CreateIMChannelGateway`, `apig:GetIMChannelGatewayStatus`, `apig:CreateUpstream`, `apig:CreateRoute`, `agentkit:DeleteSession`, `agentkit:PauseSession`, `agentkit:ResumeSession`, `agentkit:SetSessionTtl`, `agentkit:CreateSessionSnapshot`. + +This is the user-approved compatibility baseline, not a claim of least privilege. ArkClaw actions are compatibility permissions. IAM resources are account-wide, independent of deployment region. + +## Design, tasks and affected files + +- T-1 (FR-1–6): Review this bilingual design and update both component contracts before implementation. +- T-2 (FR-1–4): Add failing isolated tests; implement `managed/iam.py` and configuration/profile integration. Additive reconciliation plus readback was chosen over cloning historical test policies or overwriting user trust. Poll for at most 120 seconds; each SDK request has 5-second connect/read timeouts. Cancellation stops new operations; an in-flight synchronous SDK call may finish within its transport limit. +- T-3 (FR-5–6): Integrate early in `managed/service.py`; map safe errors through `runner.py`/`tasks.py`; update diagnostics, bilingual UI resources and `frontend_deploy_policy.py`. +- T-4: Update bilingual managed usage docs, targeted Python and frontend tests; build release assets and verify browser behavior with isolated mock responses. + +No new persistent tables or public request fields are needed. Existing IAM state is the recovery record. Policy and role creation are idempotent by fixed names; same-account concurrent creation converges by readback. A cancellation does not roll back shared permissions. Unsupported trust shapes fail conservatively. + +## Acceptance and verification + +AC-1: New role creation binds all 12 system policies plus the custom policy and verifies readback. AC-2: Reuse, missing attachments, races and delayed visibility converge without removing extras. AC-3: Permission failures, wrong account, unsafe trust and policy conflicts fail before unrelated mutations and produce safe errors. AC-4: Existing-mode profiles and general agents retain their behavior. AC-5: UI renders the role stage/error in both languages; built assets match sources. + +Commands: `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_frontend_deploy_iam.py`; changed-file Ruff/Pyright; `npm --prefix frontend test`; `npm --prefix frontend run build`; `npm --prefix frontend run test:webui-assets`; `npm --prefix frontend run check:i18n`; regression `uv run --extra dev pytest -n 2 -m "not codex_smoke and not piagent_smoke"`. Live new-account IAM smoke is not_run unless separately authorized. Browser checks must not touch real IAM/user state. + +## Risks and review record + +System policies can be unavailable in an account or require product enablement; fail visibly and retry after administrator repair. Existing trust restrictions are not automatically widened. Broad baseline permissions are intentional and documented; no real cloud snapshot is checked in. Shared role changes affect consumers of that role. SDK singleton isolation and cancellation require regression coverage. + +Direct design review (review-spec unavailable): scope, additive semantics, bounded retries, credential rotation, no secret output, legacy compatibility, tests and bilingual equivalence reviewed; no unresolved design blockers. User approved the permission additions and implementation with “嗯,帮我改下,”. Approval precedes production/test edits. Existing `frontend/package-lock.json` changes belong to the user and are preserved. + +## Implementation review and verification results + +Tested scope: uncommitted `mpa-runtime-iam` feature on `feat/test-main`, base `ef0ad519`, 2026-10-09. T-1–4 and AC-1–5 are covered by isolated tests and browser checks; live new-account readiness remains unverified. + +Implementation review corrected the provider binding shape to `PolicyScope[].PolicyScopeType: Global` and the official creation collision code to `PolicyAlreadyExist`. `PolicyAttachConflict` requires readback, never assumed success. Sources: [official IAM errors](https://docs.volcengine.com/docs/IAM/ErrorCodeList?lang=en) and [official SDK binding structure](https://pkg.go.dev/github.com/volcengine/volcengine-go-sdk@v1.2.45/service/iam#AttachedPolicyMetadataForListAttachedRolePoliciesOutput). New regression fixtures first failed for missing implementation and subsequently for the real collision/conflict codes; corrected implementation passes. Permission errors never authorize creation. Singleton isolation, fresh credentials, timeout/cancellation, trust/account conflicts, project-only bindings, retries and safe child errors were reviewed. No new blockers remain in the feature scope. + +| Check | Outcome | Evidence / limits | +| --- | --- | --- | +| `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_frontend_deploy_iam.py -q` | pass | Final correction: 474 passed; no real cloud operations. | +| `uvx --from ruff==0.11.12 ruff check ` and format | pass | Version matches repository hook; temporary tool environment. | +| `uvx pyright --pythonpath .venv/bin/python ` | pass | 0 errors / warnings; repository interpreter. | +| `npm --prefix frontend test` | pass | 1,377 Node tests and 48 Vitest tests. | +| `npm --prefix frontend run build` | pass | TypeScript and both bundles built; existing chunk-size/deprecation warnings only. | +| `npm --prefix frontend run test:webui-assets` | pass | 113 packaged files, 350 references. Hash-renamed dependent chunks are generated assets. | +| `npm --prefix frontend run check:i18n` | pass | 2 locales, 21 namespaces consistent. | +| Isolated real Chrome browser (`node /tmp/mpa-iam-browser.cjs`) | pass | Chinese/English three-step flow, readonly ID, IAM error/stage, Enter-key same-ID retry, cancellation, 375px layout; all service responses mocked. Temporary fixture/server removed. First fixture load caused a Vite dependency optimization reload; warmed final runs passed without page errors. | +| `uv run --extra dev pytest -n 2 -m "not codex_smoke and not piagent_smoke"` | fail | Earlier iteration: 6,240 passed, 7 failed, 19 skipped, 2 xfailed, 2 collection errors. Six Harness failures lack `llama_index`; two self-host sandbox collection errors lack `anthropic`. One upload retry test captured other background-thread sleeps; isolated rerun passed (1 test). These paths have no feature diff. Final IAM race correction was validated with the 474-test affected suite rather than repeating dependency-blocked unrelated tests. | +| `uv run --extra dev pre-commit run --files ` | pass | Ruff/check/format and gitleaks hooks passed; YAML hook skipped (no YAML files). Full `--all-files` is not_run because no commit is requested. | +| `git diff --check`; bilingual links/identifiers/permission baseline | pass | Paired designs/contracts present, links resolve and identifiers align. | +| Live IAM / real new-account creation | not_run | Separate cloud mutation authorization and isolated account setup required. | +| Codex/PI smoke, sidecar coverage, IME/empty-flow changes | not_applicable | No runtime/sidecar/input/empty-state contracts changed. | + +Local environment lacked Ruff/Pyright; use of temporary tools is recorded here, not a machine-global configuration change. Existing package-lock modifications were preserved. No commit, push or deployment was performed. Existing hosted Studio execution policies need the added `iam:CreatePolicy` permission before this feature can prepare roles; updates are not deployed by this change. The built-in profile still asserts its configured account and uses configured image/reference resources; changing accounts requires updating those settings independently. + diff --git a/prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.zh.md b/prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.zh.md new file mode 100644 index 000000000..bbd5da148 --- /dev/null +++ b/prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.zh.md @@ -0,0 +1,75 @@ +# 自动准备 MPA 运行角色 + +[English](2026-10-09-managed-runtime-role.md) + +变更 ID:`mpa-runtime-iam`;创建/修订:2026-10-09;状态:已实现,隔离验证通过,真实 smoke 未验证。 +契约:[Studio 创建](../../../specs/studio-mpa-creation/README.zh.md)、[资源准备](../../../specs/mpa-runtime-provisioning/README.zh.md)。 + +## 背景、目标与边界 + +内置 Studio 配置为 Runtime 和 Worker 指定 `IDRoleForArkClawShareAgent`,但没有准备角色,新部署账号可能因此创建失败。历史角色的只读核对确认了 `vefaas`、`apig` 信任及 12 个系统策略;不复制历史测试/IDrive 策略。 + +在其他资源变更之前准备已批准角色。这不代表整个北京配置已支持任意账号:账号断言、镜像、Worker 参考模板仍须配置有效。通用智能体、旧 CLI 默认行为、自定义角色、已有信任文档和策略内容不属于自动改写范围。设计批准不授权真实 IAM 变更、提交、推送或部署。 + +## 场景与要求 + +- FR-1:内置 Studio 使用 `managed.iam.mode: auto`;显式 managed 配置默认 `existing`,跳过 IAM 准备。auto 只接受默认 Runtime/Worker 角色及全新模板来源;不兼容来源在 IAM 请求之前失败。 +- FR-2:在 STS 核验的部署账号下查询或创建默认角色,无条件信任 `vefaas` 和 `apig` 的 `sts:AssumeRole`。已有信任必须包含两者且没有拒绝语句;不重写。校验返回角色名及账号 TRN。 +- FR-3:补齐 12 个约定系统策略及版本化自定义策略 `VeADKMPARuntimeAccessV1` 的 Global 绑定,保留额外绑定。自定义策略包含 14 个已批准动作,资源为 `*`;已有内容冲突则失败,不覆盖。 +- FR-4:仅明确对象不存在响应允许创建;创建竞态的 already-exists 响应后重新读取。有限轮询处理可见性延迟;超时/取消保留资源,同一智能体 ID 可重试。每次请求使用新核验凭据、独立 SDK 实例和传输超时。 +- FR-5:输出阶段 `iam_role` 及权限、信任/策略冲突、属主、核验失败等白名单错误。禁止输出原始 SDK 文本、文档、凭据。失败后不准备 PG/网络/Runtime。 +- FR-6:Studio 执行策略增加 `iam:CreatePolicy`,其他所需 IAM 动作已存在。部署凭据须能查询/创建角色和策略、查询绑定、绑定策略。配置检查不调用 IAM。 + +## 权限基线 + +系统策略:`AgentKitSkillsSandboxAccess`、`AgentKitToolAccess`、`LLMShieldProtectSdkAccess`、`Mem0ReadOnlyAccess`、`AgentKitRuntimeAccess`、`AgentKitTosAccess`、`CloudControlReadOnlyAccess`、`TorchlightApiFullAccess`、`IDReadOnlyAccess`、`VikingdbFullAccess`、`APMPlusServerDataExportRolePolicy`、`AgentKitReadOnlyAccess`。 + +自定义动作:`arkclaw:ListResources`、`arkclaw:GetMpaInstanceConf`、`apig:ListGateways`、`apig:GetGateway`、`apig:CreateGateway`、`apig:CreateIMChannelGateway`、`apig:GetIMChannelGatewayStatus`、`apig:CreateUpstream`、`apig:CreateRoute`、`agentkit:DeleteSession`、`agentkit:PauseSession`、`agentkit:ResumeSession`、`agentkit:SetSessionTtl`、`agentkit:CreateSessionSnapshot`。 + +这是用户批准的兼容基线,不宣称最小权限。ArkClaw 动作为兼容权限。IAM 资源为账号级,不随部署地域隔离。 + +## 设计、任务及影响文件 + +- T-1(FR-1–6):实施前评审双语设计并更新两个组件契约。 +- T-2(FR-1–4):先添加隔离的失败测试;实现 `managed/iam.py` 及配置/profile 接入。采用增量补齐与回读,而非复制历史测试策略或覆盖用户信任。最多轮询 120 秒,每次 SDK 请求连接/读取超时各 5 秒。取消后停止新操作;进行中的同步 SDK 调用可能在传输时限内完成。 +- T-3(FR-5–6):在 `managed/service.py` 提前接入,通过 `runner.py`/`tasks.py` 传递安全错误,更新诊断、双语 UI 资源及 `frontend_deploy_policy.py`。 +- T-4:更新双语使用说明、针对性 Python/前端测试;构建发布资源,用隔离模拟响应验证浏览器。 + +不增加持久表或公开请求字段,已有 IAM 状态即恢复记录。固定名称保证角色/策略创建幂等;同账号并发创建通过回读收敛。取消不回滚共享权限。不支持的信任格式保守失败。 + +## 验收与验证 + +AC-1:新建角色绑定全部 12 个系统策略及自定义策略,回读核验。AC-2:复用、缺少绑定、竞态及延迟可见均可收敛,不移除额外绑定。AC-3:权限错误、账号错误、不安全信任及策略冲突在其他资源变更前失败,返回安全错误。AC-4:existing 配置及通用智能体保持原行为。AC-5:双语 UI 显示角色阶段/错误,构建资源与源码一致。 + +命令:`uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_frontend_deploy_iam.py`;变更文件 Ruff/Pyright;`npm --prefix frontend test`;`npm --prefix frontend run build`;`npm --prefix frontend run test:webui-assets`;`npm --prefix frontend run check:i18n`;回归 `uv run --extra dev pytest -n 2 -m "not codex_smoke and not piagent_smoke"`。真实新账号 IAM smoke 在单独授权之前为 not_run。浏览器验证不触碰真实 IAM/用户状态。 + +## 风险与评审记录 + +某些系统策略可能在账号中不可用或需要开通产品;明确失败,管理员修复后重试。不自动放宽已有信任限制。广泛权限基线属有意选择并已记录,不提交真实云端快照。共享角色变更会影响使用该角色的其他服务。SDK 单例隔离和取消需要回归覆盖。 + +直接设计评审(review-spec 不可用):已检查范围、增量语义、有限重试、凭据刷新、不输出密钥、旧行为兼容、测试及双语等价,无未解决设计阻塞。用户已批准权限增加,并以“嗯,帮我改下,”授权实施,批准先于生产/测试修改。保留用户已有 `frontend/package-lock.json` 修改。 + +## 实施评审与验证结果 + +验证范围:`feat/test-main` 上未提交的 `mpa-runtime-iam` 功能,基线 `ef0ad519`,日期 2026-10-09。T-1–4、AC-1–5 已由隔离测试及浏览器检查覆盖,真实新账号就绪仍未验证。 + +实施评审修正了云端绑定格式 `PolicyScope[].PolicyScopeType: Global`,以及官方创建冲突码 `PolicyAlreadyExist`。`PolicyAttachConflict` 必须回读,不能视为已成功。来源:[官方 IAM 错误码](https://docs.volcengine.com/docs/IAM/ErrorCodeList?lang=en)、[官方 SDK 绑定结构](https://pkg.go.dev/github.com/volcengine/volcengine-go-sdk@v1.2.45/service/iam#AttachedPolicyMetadataForListAttachedRolePoliciesOutput)。新增测试先因未实现失败,随后因真实冲突码失败,修正实现后通过。权限错误不允许创建。已评审单例隔离、凭据刷新、超时/取消、信任/账号冲突、项目级绑定、重试和安全子进程错误。本功能范围内无剩余阻塞问题。 + +| 检查 | 结果 | 证据 / 限制 | +| --- | --- | --- | +| `uv run --extra dev pytest tests/integrations/mpa_managed tests/cli/test_frontend_deploy_iam.py -q` | pass | 最终修正后 474 项通过,不调用真实云端。 | +| `uvx --from ruff==0.11.12 ruff check ` 及 format | pass | 版本与仓库钩子一致,使用临时工具环境。 | +| `uvx pyright --pythonpath .venv/bin/python ` | pass | 0 错误 / 警告,使用仓库解释器。 | +| `npm --prefix frontend test` | pass | 1,377 项 Node 测试及 48 项 Vitest 测试。 | +| `npm --prefix frontend run build` | pass | TypeScript 及两个 bundle 构建成功,仅有已有体积/弃用警告。 | +| `npm --prefix frontend run test:webui-assets` | pass | 113 个文件,350 个引用。依赖 chunk 的哈希重命名属于生成资源。 | +| `npm --prefix frontend run check:i18n` | pass | 2 种语言、21 个命名空间一致。 | +| 隔离真实 Chrome 浏览器(`node /tmp/mpa-iam-browser.cjs`) | pass | 中英文三步流程、只读 ID、IAM 错误/阶段、Enter 键同 ID 重试、取消、375px 布局,全部服务响应为模拟。临时页面/服务已清理。测试页面首次加载触发 Vite 依赖优化重载;预热后的最终运行无页面错误。 | +| `uv run --extra dev pytest -n 2 -m "not codex_smoke and not piagent_smoke"` | fail | 较早实施版本:6,240 通过、7 失败、19 跳过、2 xfailed、2 收集错误。6 项 Harness 失败缺少 `llama_index`,2 项自托管沙箱收集错误缺少 `anthropic`。1 项上传重试测试收集到了其他后台线程的 sleep,单独重跑通过(1 项)。这些路径无本功能修改。最终 IAM 竞态修正通过 474 项相关测试验证,未重复受缺失依赖阻塞的无关测试。 | +| `uv run --extra dev pre-commit run --files ` | pass | Ruff/check/format 和 gitleaks 钩子通过,YAML 钩子跳过(无 YAML 文件)。未请求提交,完整 `--all-files` 为 not_run。 | +| `git diff --check`;双语链接/标识符/权限基线 | pass | 设计/契约成对存在,链接有效,标识符一致。 | +| 真实 IAM / 新账号创建 | not_run | 须单独授权云端变更并准备隔离账号。 | +| Codex/PI smoke、sidecar coverage、IME/空态变更 | not_applicable | 未修改运行时/sidecar/输入/空态契约。 | + +本地缺少 Ruff/Pyright,临时工具使用记录在这里,不修改机器全局配置。保留已有 package-lock 修改。未提交、推送或部署。已有云端 Studio 执行策略须增加 `iam:CreatePolicy` 后才能准备角色,本次不会部署该更新。内置配置仍断言配置账号并使用配置的镜像/参考资源,更换账号须独立调整这些设置。 + diff --git a/specs/mpa-runtime-provisioning/README.md b/specs/mpa-runtime-provisioning/README.md index 7fb5f7eab..7cc745dea 100644 --- a/specs/mpa-runtime-provisioning/README.md +++ b/specs/mpa-runtime-provisioning/README.md @@ -2,7 +2,7 @@ - **Component ID:** `mpa-runtime-provisioning` - **Status:** Draft; proposed changes are governed by the related PRD -- **Revision:** 2026-09-30 +- **Revision:** 2026-10-09 - **Chinese version:** [README.zh.md](README.zh.md) - **Related PRD:** [MPA Runtime Integration Hardening](../../prd-spec/bugfixes/mpa-runtime-integration/2026-09-12-mpa-runtime-integration-hardening.md) - **Related PRD:** [MPA Studio Workload Identity Provisioning](../../prd-spec/features/mpa-studio-workload-identity/2026-09-20-mpa-studio-workload-identity.md) @@ -32,7 +32,7 @@ This component converts `veadk mpa create` inputs into one recoverable AgentKit - `CON-4`: Phase one writes placeholders before startup; phase two overwrites them only with non-empty authoritative Runtime values. A phase-two deployment failure is reported as failure, not partial success. - `CON-5`: Explicit caller `extra_env` remains last-wins, including an intentional override of VeADK profile defaults. - `CON-6`: AgentKit Runtime create and convergent update persist `veadk:agent-type=mpa` as the stable Studio classification tag. Untagged Runtime resources remain outside the MPA filter until an explicit tag repair is performed. -- `CON-7`: Before other provisioning mutations, both `veadk mpa create` and managed Studio provisioning create or reuse the account-and-region scoped pool `agentkit-studio-workload` and identity `{MPA_AGENT_ID}-studio`, then inject them as `MPA_WORKLOAD_POOL_NAME` and `MPA_WORKLOAD_IDENTITY_NAME`. Managed reference/template values cannot supply another agent's identity; empty explicit values are treated as unspecified and conflicting non-empty values fail before mutation. +- `CON-7`: After optional managed IAM preparation and before other provisioning mutations, both `veadk mpa create` and managed Studio provisioning create or reuse the account-and-region scoped pool `agentkit-studio-workload` and identity `{MPA_AGENT_ID}-studio`, then inject them as `MPA_WORKLOAD_POOL_NAME` and `MPA_WORKLOAD_IDENTITY_NAME`. Managed reference/template values cannot supply another agent's identity; empty explicit values are treated as unspecified and conflicting non-empty values fail before mutation. - `CON-8`: `veadk mpa create` continues to generate `mi-[0-9a-z]{12}` ids. Explicit ids accept that form and the existing Studio `mi-[0-9a-z]{24}` form for flat managed provisioning. The base id remains the Runtime and metadata identity; only the workload identity receives the `-studio` suffix. - `CON-9`: Workload get-or-create is exact-name idempotent. Concurrent create conflicts are followed by a read. Other Identity errors fail before Tool, database, or Runtime mutations. Created identity resources are retained for retry. @@ -120,3 +120,21 @@ Sessions and externally supplied Tools are not mutated. ## Persistent MCP signing secret Runtime provisioning injects `MCP_TOKEN_SECRET` before CreateRuntime/UpdateRuntime. A nonblank explicit value wins; otherwise the target Runtime's existing nonblank value is retained, or 32 random bytes are generated as 64 hex characters. Caller-owned environment mappings are unchanged. Endpoint/API Key finalization reuses the same value. Blank values count as missing. Explicit values are masked in dry-run output. The Runtime stores the key in environment configuration, and provisioning results do not expose it. Existing deployments change only on explicit redeployment. See the [secret provisioning design](../../prd-spec/bugfixes/mpa-runtime-mcp-secret/2026-10-07-persistent-mcp-secret.md) and the managed retry boundary in [Studio creation](../studio-mpa-creation/README.md). + +## Managed Runtime IAM role + +Built-in Studio sets `managed.iam.mode: auto`; explicit profiles default to `existing`. Auto preparation runs after STS account validation and before workload identity or other resource mutations. Only a fresh default `IDRoleForArkClawShareAgent` configuration is supported. IAM is account-scoped. Get/create role and `VeADKMPARuntimeAccessV1`, validate account/name and unconditional trust in `vefaas` and `apig`, add missing Global bindings for the approved 12 system policies and 14 custom actions, then verify readback. Preserve extra bindings; never overwrite trust or an existing policy. Missing-object codes alone allow creation; races and eventual consistency use bounded 120-second recovery. Cancellation retains resources. Permission/trust/policy/ownership/readback failures halt creation at `iam_role` with allowlisted localized errors; raw provider text and secrets are excluded. Studio execution credentials require GetRole, CreateRole, GetPolicy, CreatePolicy, ListAttachedRolePolicies and AttachRolePolicy. Existing-mode CLI and general agents are unaffected. Full permission list and acceptance: [design](../../prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.md). + +## Fresh managed account metadata + +Fresh managed templates generate `CLAW_SPACE_ID` from verified STS identity and `RUNTIME_IAM_ROLE_NAME`/`RUNTIME_IAM_ROLE_TRN` from that account and selected Runtime role. Explicit environment overrides retain precedence. Referenced/template Runtime behavior is unchanged. Built-in Studio removes the old fixed expected account; explicit YAML restrictions remain. Source images/reference Tools require separate access verification. See [Studio account contract](../studio-mpa-creation/README.md#studio-deployment-account). + +Managed VPC/subnet descriptions, legacy ownership compatibility and rejected-intent recovery follow the [Studio network contract](../studio-mpa-creation/README.md#network-ownership-descriptions-and-recovery). Names, account/region scope and uncertain-outcome duplicate prevention remain unchanged. + +Empty managed network discovery follows the [Studio contract](../studio-mpa-creation/README.md#empty-network-discovery); it does not alter Runtime payloads, account scope or ownership checks. + +New shared standard gateways and cross-zone companion intents follow the [Studio gateway preparation contract](../studio-mpa-creation/README.md#standard-shared-gateway-preparation). Existing Runtime subnet selections are immutable; new Runtime creation may use the prepared gateway selection. + +Worker environment configuration and reference precedence follow the [Studio contract](../studio-mpa-creation/README.md#independent-worker-configuration). Built-in Studio does not require an old-account Tool. Explicit CLI references/existing IDs remain supported; legacy non-managed creation is unchanged. + +Managed Runtime subnet equality and stable retry ordering follow the [Studio network recovery contract](../studio-mpa-creation/README.md#runtime-subnet-ordering-and-recovery). diff --git a/specs/mpa-runtime-provisioning/README.zh.md b/specs/mpa-runtime-provisioning/README.zh.md index eb85f2e7c..886f4a5de 100644 --- a/specs/mpa-runtime-provisioning/README.zh.md +++ b/specs/mpa-runtime-provisioning/README.zh.md @@ -2,7 +2,7 @@ - **Component ID:** `mpa-runtime-provisioning` - **状态:** 草案;提议变更由关联 PRD 管理 -- **修订日期:** 2026-09-30 +- **修订日期:** 2026-10-09 - **English version:** [README.md](README.md) - **关联 PRD:** [MPA Runtime 集成加固](../../prd-spec/bugfixes/mpa-runtime-integration/2026-09-12-mpa-runtime-integration-hardening.zh.md) - **关联 PRD:** [MPA Studio 工作负载身份创建](../../prd-spec/features/mpa-studio-workload-identity/2026-09-20-mpa-studio-workload-identity.zh.md) @@ -32,7 +32,7 @@ - `CON-4`:第一阶段在启动前写入占位符;第二阶段只使用非空权威 Runtime 值覆盖。第二阶段部署失败必须报告失败,不得报告部分成功。 - `CON-5`:调用方显式提供的 `extra_env` 继续保持 last-wins,包括有意覆盖 VeADK 配置默认值。 - `CON-6`:AgentKit Runtime 创建及收敛更新必须持久化 `veadk:agent-type=mpa`,作为 Studio 稳定分类标签。未打标签 Runtime 在执行显式标签修复前不进入 MPA 筛选。 -- `CON-7`:在其他创建副作用之前,`veadk mpa create` 与 Studio 托管创建都会创建或复用账号和地域范围内的 `agentkit-studio-workload` Pool 与 `{MPA_AGENT_ID}-studio` Identity,然后以 `MPA_WORKLOAD_POOL_NAME` 和 `MPA_WORKLOAD_IDENTITY_NAME` 注入 Runtime。托管参考 Runtime 或模板不得提供其他 Agent 的 Identity;显式空值视为未配置,冲突的非空值在资源修改前失败。 +- `CON-7`:在可选的托管 IAM 准备之后、其他创建副作用之前,`veadk mpa create` 与 Studio 托管创建都会创建或复用账号和地域范围内的 `agentkit-studio-workload` Pool 与 `{MPA_AGENT_ID}-studio` Identity,然后以 `MPA_WORKLOAD_POOL_NAME` 和 `MPA_WORKLOAD_IDENTITY_NAME` 注入 Runtime。托管参考 Runtime 或模板不得提供其他 Agent 的 Identity;显式空值视为未配置,冲突的非空值在资源修改前失败。 - `CON-8`:`veadk mpa create` 继续自动生成 `mi-[0-9a-z]{12}` ID。显式 ID 接受该格式及 Studio 原有的 `mi-[0-9a-z]{24}` 格式,以兼容托管平铺创建。基础 ID 仍作为 Runtime 和元数据身份,只有 WorkloadIdentity 增加 `-studio` 后缀。 - `CON-9`:工作负载资源按精确名称幂等 get-or-create。并发创建冲突后重新读取;其他 Identity 错误在 Tool、数据库或 Runtime 修改前失败。已创建的身份资源保留供重试。 @@ -110,3 +110,21 @@ stdin 在内存中传递,不得进入 sessionStorage、任务 SQLite 或任务 ## 固定 MCP 签名密钥 Runtime 创建在 CreateRuntime/UpdateRuntime 前注入 `MCP_TOKEN_SECRET`。显式非空值优先;否则保留目标 Runtime 已有非空值,或生成 32 随机字节并编码为 64 位十六进制字符串。不修改调用方的环境变量字典。地址/API Key 回填沿用同一值。空白值视为未配置。dry-run 输出对显式值脱敏。Runtime 将密钥保存于环境变量配置,创建返回值不暴露密钥。存量部署仅在显式重新部署时变更。参见[密钥创建设计](../../prd-spec/bugfixes/mpa-runtime-mcp-secret/2026-10-07-persistent-mcp-secret.zh.md)及 [Studio 创建](../studio-mpa-creation/README.zh.md)的托管重试边界。 + +## 自动准备 Runtime IAM 角色 + +内置 Studio 使用 `managed.iam.mode: auto`,显式配置默认 `existing`。自动准备在 STS 账号核验后、工作负载身份和其他资源变更前执行。仅支持全新来源的默认 `IDRoleForArkClawShareAgent` 配置。IAM 为账号级。查询/创建角色及 `VeADKMPARuntimeAccessV1`,核验账号/名称及无条件信任 `vefaas`、`apig`,补齐已批准的 12 个系统策略和 14 个自定义动作的 Global 绑定,随后回读核验。保留额外绑定,不覆盖信任或已有策略。仅明确不存在错误允许创建,竞态和最终一致性采用最多 120 秒的恢复。取消保留资源。权限/信任/策略/属主/回读失败在 `iam_role` 阶段停止,输出白名单本地化错误,不输出原始云端文本和密钥。Studio 执行凭据须允许 GetRole、CreateRole、GetPolicy、CreatePolicy、ListAttachedRolePolicies、AttachRolePolicy。existing CLI 及通用智能体不受影响。完整权限及验收见[设计](../../prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.zh.md)。 + +## 新建托管账号元数据 + +新建托管模板根据核验的 STS 身份生成 `CLAW_SPACE_ID`,并由该账号和所选 Runtime 角色生成 `RUNTIME_IAM_ROLE_NAME`/`RUNTIME_IAM_ROLE_TRN`。显式环境变量覆盖保持优先。引用/模板 Runtime 行为不变。内置 Studio 移除旧的固定预期账号;显式 YAML 限制保留。源镜像/参考 Tool 的访问需要单独核验。见 [Studio 账号契约](../studio-mpa-creation/README.zh.md#studio-部署账号)。 + +托管 VPC/子网描述、旧归属标记兼容及拒绝意图恢复遵守 [Studio 网络契约](../studio-mpa-creation/README.zh.md#网络归属描述与恢复)。名称、账号/地域范围及结果不确定时避免重复创建的规则不变。 + +托管网络空查询遵循 [Studio 契约](../studio-mpa-creation/README.zh.md#空网络查询),不改变 Runtime 载荷、账号范围或归属校验。 + +新共享标准型网关及跨可用区伴随意图遵循 [Studio 网关准备契约](../studio-mpa-creation/README.zh.md#标准型共享网关准备)。已有 Runtime 子网选择不可变,新 Runtime 创建可使用准备好的网关选择。 + +Worker 环境配置及模板优先级遵循 [Studio 契约](../studio-mpa-creation/README.zh.md#独立-worker-配置)。内置 Studio 不依赖旧账号 Tool。保留显式 CLI 模板/已有 ID;非托管旧创建逻辑不变。 + +托管 Runtime 的子网等价判断和稳定重试顺序遵循 [Studio 网络恢复契约](../studio-mpa-creation/README.zh.md#runtime-子网顺序与恢复)。 diff --git a/specs/studio-mpa-creation/README.md b/specs/studio-mpa-creation/README.md index 7f8ae1ef6..5ad9b4d1a 100644 --- a/specs/studio-mpa-creation/README.md +++ b/specs/studio-mpa-creation/README.md @@ -13,7 +13,7 @@ ## Responsibility and boundaries -VeADK owns managed YAML parsing, cloud/database orchestration, authorized durable creation tasks and the MPA directory dialog. No external source checkout is required. Shared registry/bootstrap contracts remain interoperable with the MPA image. Legacy `veadk mpa create` remains separate and unchanged. No model execution, channel routing, PostgreSQL instance provisioning or IAM policy management is added. +VeADK owns managed YAML parsing, cloud/database orchestration, authorized durable creation tasks and the MPA directory dialog. No external source checkout is required. Shared registry/bootstrap contracts remain interoperable with the MPA image. Legacy `veadk mpa create` remains separate and unchanged. Model execution and channel routing remain Runtime responsibilities. Managed runtime IAM preparation follows the contract below. ## Contracts @@ -21,7 +21,7 @@ VeADK owns managed YAML parsing, cloud/database orchestration, authorized durabl - **CON-16 — Studio MPA provenance tags:** Both the generic Studio MPA deployment path and managed one-click creation write `veadk:agent-type=mpa`, `veadk:managed=true`, `veadk:provisioner=studio-mpa`, trusted `veadk:owner`, and the owned `veadk:mpa-instance-id`. Missing trusted owner fails before cloud mutation, and the raw owner must hash to the task owner before child startup. The one-click route hashes this owner for local task and native registry ownership while passing the raw trusted owner ephemerally to the fixed child process for the Runtime tag; it is not persisted in task state. The shared provisioning service emits Studio provenance only when that route explicitly supplies the trusted Runtime owner, so `veadk mpa create` remains outside Studio discovery. Reconciliation replaces these owned keys, preserves unrelated non-system tags, and never replays `sys:*` tags. A legacy pending create with a persisted pre-provenance request hash replays the exact old create payload and client token, then applies the current provenance tags through the normal Runtime update before completing. Shared constants live in an internal MPA tag module and do not add a public Python API. Tags are discovery metadata, not authorization. Existing managed one-click Runtimes without `veadk:managed=true` require an explicit supported update/retry or future backfill before Studio lists them. Implemented and locally verified on 2026-09-29 by [Studio-created MPA Runtime filtering](../../prd-spec/features/studio-mpa-source-filter/2026-09-28-studio-mpa-source-filter.md); real-browser discovery remains a separate local acceptance step. -- **CON-1 — configuration:** Studio uses a code-owned Beijing profile and ignores `VEADK_MPA_CREATE_CONFIG`; its account and Runtime defaults come from the former private file; image defaults are specified below; VPC/subnet/APIG IDs are not pinned. After automatic PG preparation, Studio resolves shared resources from `mpa_admin_workspace/mpa_admin_db` by verified account and region: validate/reuse registered resources, or create and persist missing VPC/subnet and APIG/IM Gateway through the existing locked provisioners. Existing records are never reset to bypass quotas. Explicit CLI adoption remains supported. See the [registry-owned network fix](../../prd-spec/bugfixes/mpa-shared-network-bootstrap/2026-09-28-registry-owned-network.md). `VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY` and deployment credentials remain server-side requirements, never source literals. The child receives a built-in-profile marker and validates the same profile. CLI `--config` still accepts private YAML with `managed.version: 1`, kebab/snake aliases and unknown-key rejection. CLI `from-runtime` and `template-file` remain mutually exclusive; otherwise flat image/model/PG fields supply the template. CLI `database-admin-url-env` and `shared-database-url-env` resolve PostgreSQL URLs server-side; files/templates are limited to 256 KiB. HTTP clients cannot choose paths, commands, accounts or deployment/PG credentials; CON-11 allows a per-creation OpenViking API Key. Configuration checks are local; they do not prove live access. See [built-in profile design](../../prd-spec/features/mpa-agent-oneclick-provision/2026-09-23-studio-builtin-mpa-profile.md). +- **CON-1 — configuration:** Studio uses a code-owned Beijing profile and ignores `VEADK_MPA_CREATE_CONFIG`; its non-account Runtime settings retain the former private defaults; Studio image defaults use the two latest references in CON-9; the deployment account comes from verified STS identity; VPC/subnet/APIG IDs are not pinned. After automatic PG preparation, Studio resolves shared resources from `mpa_admin_workspace/mpa_admin_db` by verified account and region: validate/reuse registered resources, or create and persist missing VPC/subnet and APIG/IM Gateway through the existing locked provisioners. Existing records are never reset to bypass quotas. Explicit CLI adoption remains supported. See the [registry-owned network fix](../../prd-spec/bugfixes/mpa-shared-network-bootstrap/2026-09-28-registry-owned-network.md). `VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY` and deployment credentials remain server-side requirements, never source literals. The child receives a built-in-profile marker and validates the same profile. CLI `--config` still accepts private YAML with `managed.version: 1`, kebab/snake aliases and unknown-key rejection. CLI `from-runtime` and `template-file` remain mutually exclusive; otherwise flat image/model/PG fields supply the template. CLI `database-admin-url-env` and `shared-database-url-env` resolve PostgreSQL URLs server-side; files/templates are limited to 256 KiB. HTTP clients cannot choose paths, commands, accounts or deployment/PG credentials; CON-11 allows a per-creation OpenViking API Key. Configuration checks are local; they do not prove live access. See [built-in profile design](../../prd-spec/features/mpa-agent-oneclick-provision/2026-09-23-studio-builtin-mpa-profile.md). - **CON-2 — preparation:** Operators supply PostgreSQL instance/registry/login/owner, IAM roles, images, model access and network connectivity. Verify cloud account and database permissions before preparing account VPC/subnet, APIG/IM Gateway, worker, isolated business database, Skill Space and Runtime. Explicit APIG adoption requires a configured matching VPC. Never assume a newly created VPC reaches private PostgreSQL. Release account locks before waiting for application readiness. - **CON-3 — identity:** Durable identity is verified account + region + stable agent ID. Native ownership markers, hashes, client tokens and session advisory locks govern reuse. Reject unrelated same-name resources and conflicting unfinished configuration. Persist `studio_owner` in the native deployment record; other owners and preexisting records without this owner cannot take over implicitly. CLI uses owner `cli`; Studio uses the hash of its authorized principal. - **CON-4 — initialization:** Use real Runtime metadata and shared APIG bootstrap, not legacy placeholder endpoint seeding. Require public/private networking, KeyAuth, MPA tags, bound worker/Skill Space and metadata/IM startup. Reference Runtime templates remove source identity, channel credentials, Skill Space and worker identity. Success requires platform Ready and application `/readiness`. @@ -29,7 +29,7 @@ VeADK owns managed YAML parsing, cloud/database orchestration, authorized durabl - **CON-6 — lifecycle:** States are `running`, `cancelling`, `succeeded`, `failed`, `cancelled`. Start/resume enters `running`; explicit cancellation enters `cancelling`, then `cancelled`; timeout/failure enters `failed`. Successful tasks do not rerun. Stages are `queued`, `checking`, `network`, `gateway`, `worker`, `database`, `skills`, `deploying`, `verifying`; stage is the last observed progress, not a second state machine. Dead supervisors are reconciled on task lookup/start. Recovery retains the original request and agent ID. - **CON-7 — cancellation:** Run a fixed child module using the current VeADK interpreter. Cancel, deadline or server shutdown terminates the child, waits up to 3 seconds, then kills/reaps it before reporting terminal state. Default deadline is 1800 seconds (60–7200). Persistent cloud resources are retained, including unknown in-flight outcomes. Cancellation is not rollback; retry uses registered intent/token. This flow creates no temporary debugging Runtime to delete. - **CON-8 — data/security:** Built-in Studio uses `/tmp/veadk-studio/mpa-creation.sqlite3` (server override `VEADK_MPA_TASK_DB`) to persist hashed owner, nonsecret input, state/stage, safe results and supervisor PID, with mode 0600. This is an explicitly temporary, instance-local workaround for read-only cloud code directories: restart may lose history and multiple instances must not rely on shared task limits or locks. Standalone callers retain the `.adk/mpa-creation.sqlite3` convention when they construct the service explicitly. Connections close after each operation. No automatic history expiration. Native PostgreSQL tables remain `mpa_account_network`, `mpa_account_apig`, `mpa_agent_deployment`; require direct/session pooling. STS files are reread; Runtime/network/APIG/worker share account-verified credentials. Protocol messages are bounded to 16 KiB and allowlisted. Never forward raw child output, SDK errors, environment dumps, database URLs or Runtime keys. See the [temporary writable-state fix](../../prd-spec/bugfixes/studio-mpa-writable-state/2026-09-23-use-temporary-state.md). -- **CON-9 — UI:** The MPA filter on Volcengine shows a create card with agent-management permission, including empty lists. The dialog displays fixed region, required Runtime name, description and resource plan; agent ID and image fields are hidden. Three steps cover basics, automatic PostgreSQL preparation and OpenViking; only step three submits. Persist request identity before POST; lock submitted inputs to make lost-response retry safe. Abort polling on unmount, ignore late responses, preserve server work and recover from session storage on reopen. A confirmed failed or cancelled task offers both same-ID retry and an explicit new-agent action. The latter replaces only the browser draft with a fresh request UUID, blank name and defaults; the server derives the agent ID on submission; it does not delete or mutate the old server task or resources. Running and uncertain-submission states cannot start a different identity from this dialog. Refresh the original region after success. Reuse localized BaseUI/Studio components, keyboard/IME behavior and semantic theme tokens. `ModalLayout.footer` is an optional React node: omitted preserves existing actions, `null` omits the footer; existing callers are unchanged. See [terminal-task new-agent fix](../../prd-spec/bugfixes/studio-mpa-creation/2026-09-24-start-another-agent-after-failure.md). +- **CON-9 — UI:** The MPA filter on Volcengine shows a create card with agent-management permission, including empty lists. The dialog displays fixed region, required Runtime name, description and resource plan; agent ID is server-generated; MPA/Worker image inputs are omitted, as on main; the server uses main’s local latest defaults. Three steps cover basics, automatic PostgreSQL preparation and OpenViking; only step three submits. Persist request identity before POST; lock submitted inputs to make lost-response retry safe. Abort polling on unmount, ignore late responses, preserve server work and recover from session storage on reopen. A confirmed failed or cancelled task offers both same-ID retry and an explicit new-agent action. The latter replaces only the browser draft with a fresh request UUID, blank name and defaults; the server derives the agent ID on submission; it does not delete or mutate the old server task or resources. Running and uncertain-submission states cannot start a different identity from this dialog. Refresh the original region after success. Reuse localized BaseUI/Studio components, keyboard/IME behavior and semantic theme tokens. `ModalLayout.footer` is an optional React node: omitted preserves existing actions, `null` omits the footer; existing callers are unchanged. See [terminal-task new-agent fix](../../prd-spec/bugfixes/studio-mpa-creation/2026-09-24-start-another-agent-after-failure.md). Invalid Runtime names use a danger-colored border and error text with an accessible alert; the input offers a localized valid-name example. The shared Button primitive visibly dims native disabled buttons and uses a not-allowed cursor, while retaining its loading treatment. Correcting the name restores forward navigation. @@ -44,7 +44,7 @@ New Studio forms submit `name`, `requestId`, `description` and `region` plus the The built-in Studio defaults become `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_agent:latest` and `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_codex_worker:latest`. New drafts do not recover hidden old image overrides; submitted drafts/tasks retain their original inputs and image selections. Legacy API requests with explicit `agentId` and optional image fields remain supported, and requests without Name retain ID-based Runtime naming. CLI/YAML overrides remain unchanged. The dialog displays Name and Description without ID/image inputs; invalid names block forward navigation and submission. Existing task authorization, cancellation, concurrency, secret handling and error status semantics remain in force. -Verification maps to route/task/runner/service/runtime/profile tests and dialog/browser tests in the linked design. Cloud creation remains separately verified; a mutable `latest` tag does not update running agents. +Verification maps to route/task/runner/service/runtime/profile tests and dialog/browser tests in the linked design. Cloud creation remains separately verified; new image defaults do not update running agents. CON-9 navigation correction (2026-09-30): step headings are keyboard-accessible buttons. Earlier steps and Previous remain available after restoring a submitted @@ -131,8 +131,44 @@ Managed creation translates `sslmode` to the asyncpg `ssl` query parameter in th ### Managed sandbox template naming (CON-3) -New managed sandbox templates use the trimmed agent ID with every `-` replaced by `_` (for example, `mi-example` → `mi_example`). Existing worker IDs remain authoritative and are never renamed. A pre-change unfinished creation intent retains its hashed name only when the complete legacy request matches the persisted worker_hash; its ClientToken is preserved. Other payload changes and unrelated same-name resources remain errors. Scoped ownership tags and Runtime ToolId bindings are unchanged. +New named Studio requests use the entered, validated Runtime name unchanged as the sandbox template Name (4–64 ASCII letters, digits, hyphens or underscores). Legacy CLI requests without a name still use the trimmed agent ID with `-` replaced by `_`. Internal agent IDs, database/Skill Space/channel identities, scoped ownership tags and Runtime ToolId bindings are unchanged. Existing worker IDs are authoritative and are never renamed. New pending intents persist `worker_name` in deployment JSON and reject later name changes. Older pending intents without that field replay a normalized-ID or hashed name only when the complete candidate payload matches the persisted worker_hash, preserving ClientToken. Other payload changes and unrelated same-name resources remain errors. See [named Worker design](../../prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.md). ## Managed MCP signing secret Every managed MPA Runtime receives `MCP_TOKEN_SECRET`. Explicit nonblank template environment values take precedence over the target Runtime's value, which takes precedence over the agent-owned PostgreSQL `mpa_deployment_settings` entry `mcp_token_secret`. If all are absent, generate 32 random bytes as 64 hex characters and persist before cloud creation. Atomic insert-or-retain keeps uncertain-create retries stable. Reconcile an explicit/current value only after validating the pending request hash, so rejected changed retries cannot corrupt the original request. Database failures stop creation and dispose connections. Reference Runtime templates exclude the source Agent's key; explicit JSON templates may configure one. Finalization retains the key; normal results and the shared nonsecret deployment registry exclude it. No frontend fields or automatic existing-deployment migration are added. See the [bilingual design](../../prd-spec/bugfixes/mpa-runtime-mcp-secret/2026-10-07-persistent-mcp-secret.md). + +## Managed Runtime IAM role + +Built-in Studio sets `managed.iam.mode: auto`; explicit profiles default to `existing`. Auto preparation runs after STS account validation and before workload identity or other resource mutations. Only a fresh default `IDRoleForArkClawShareAgent` configuration is supported. IAM is account-scoped. Get/create role and `VeADKMPARuntimeAccessV1`, validate account/name and unconditional trust in `vefaas` and `apig`, add missing Global bindings for the approved 12 system policies and 14 custom actions, then verify readback. Preserve extra bindings; never overwrite trust or an existing policy. Missing-object codes alone allow creation; races and eventual consistency use bounded 120-second recovery. Cancellation retains resources. Permission/trust/policy/ownership/readback failures halt creation at `iam_role` with allowlisted localized errors; raw provider text and secrets are excluded. Studio execution credentials require GetRole, CreateRole, GetPolicy, CreatePolicy, ListAttachedRolePolicies and AttachRolePolicy. Existing-mode CLI and general agents are unaffected. Full permission list and acceptance: [design](../../prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.md). + +## Studio deployment account + +The built-in profile has no fixed expected account. Use nonempty deployment STS identity for account-scoped IAM, PG, VPC, APIG and Runtime ownership. Fresh Runtime `CLAW_SPACE_ID` and `RUNTIME_IAM_ROLE_TRN` derive from that account and selected role; explicit caller environment overrides remain authoritative. Explicit YAML expected-account checks and credential-change checks remain in force. Image registry addresses and Worker reference IDs remain source resources with independent access requirements. See [design](../../prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.md). + +## Network ownership descriptions and recovery + +New VPC/subnet descriptions use `mpa-account-network-v1-`. Accept only exact scoped legacy `mpa-account-network:v1:` or current markers when recovering/validating managed resources, without rewriting existing resources. A legacy description-only intent is corrected with a new ClientToken only if its dispatch flag is explicitly false, no resource ID exists and name discovery finds no resource; all other fields must match. Unknown outcomes never issue another Create without successful discovery. Existing locks and persist-before-dispatch semantics remain authoritative. See [design](../../prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.md). + +## Empty network discovery + +As defined by the [implemented correction](../../prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.md): the first DescribeVpcs/DescribeSubnets page with a null/absent collection and integer `total_count=0` is empty. Other non-list collections, missing/noninteger/nonzero counts with null collections and later null pages remain invalid. SDK/provider failures never become empty discovery. Recorded managed VPCs may then prepare their first subnet without replacing the VPC. Pagination, ownership, durable intents and uncertain-outcome duplicate protection are unchanged. + +## Standard shared gateway preparation + +Defined by the [implemented standard-gateway correction](../../prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.md): new managed APIG uses standard, two 1c2g nodes, small_1 CLB, public/private access and traffic billing. Before a new gateway is created, prepare two same-VPC subnets in distinct APIG-supported zones under the shared lock. Optional gateway_subnet_intents persist each companion request/token/dispatch state; uncertain creates require discovery. Existing gateway adoption/reuse and existing Runtime network payloads are preserved. ExceededQuota explicitly permits another dispatch after correction; old unknown flags still require audited recovery. Deployment credentials additionally require apig:GetGatewayAvailableZones. No frontend fields or Runtime role changes. + +## Independent Worker configuration + +Built-in Studio creates a Worker from its image defaults without a reference Tool or duplicate startup environment. CreateTool.Port stays 8000 and its default Envs contains only generated MPA_AGENT_ID. See the [image-default correction](../../prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.md). Optional `managed.worker.env` is a string mapping; whole `${ENV_NAME}` values resolve server-side. Uppercase keys are required. Agent/Runtime/Tool/Skill Space bindings, inherited channel/Runtime secrets and control database URLs are reserved. Nonempty env with existing-id is invalid. Explicit env overrides a filtered optional reference environment, then the provisioner generates MPA_AGENT_ID. Explicit missing references remain errors. Environment values stay out of config summaries/repr and deployment records. Existing ownership, deadline, cancellation and request hash/ClientToken protections remain; changed pending inputs are conflicts. See [approved design and verification](../../prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.md). + +## Runtime subnet ordering and recovery + +SubnetIds equality is based on unique nonempty members, independent of provider ordering. VpcId and EnableSharedInternetAccess remain immutable exact comparisons. Changed membership, duplicates and malformed lists fail validation. Resume preserves requested ordering, or the registered ordering when its members match the active Runtime, so existing request hashes and ClientTokens remain usable. A different shared default never replaces the active per-agent selection. No schema or hash-format migration is required. Design and verification: [subnet-order repair](../../prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.md). + + + +Image rollback (2026-10-09): public registry discovery and automatic digest conversion are withdrawn. Config inspection and new tasks use built-in local latest defaults; existing task snapshots remain unchanged. See [rollback design](../../prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.md). + +### Managed Skill Space descriptions (CON-3/CON-4) + +New named deployments create `Description: Skills for MPA agent ` using the validated, trimmed entered name. Unnamed callers retain the internal-ID description. Space `Name`, `display_name`, ownership tags, IDs and bindings remain derived from internal identity. Existing/configured spaces are reused without description updates. Pending pre-upgrade requests retain their original description only when the complete old-description candidate matches the persisted `skill_space_request`; other pending-input changes remain errors. Unknown outcomes use discovery without blindly repeating CreateSkillSpace. See [description design](../../prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.md). diff --git a/specs/studio-mpa-creation/README.zh.md b/specs/studio-mpa-creation/README.zh.md index 1843ac18d..2ad749957 100644 --- a/specs/studio-mpa-creation/README.zh.md +++ b/specs/studio-mpa-creation/README.zh.md @@ -4,7 +4,7 @@ - 组件 ID:`studio-mpa-creation` - 状态:active -- 修订日期:2026-09-30 +- 修订日期: 2026-10-09 - 设计及证据:[Studio MPA 创建](../../prd-spec/features/mpa-agent-oneclick-provision/2026-09-20-studio-mpa-creation.zh.md) - 所属代码:`veadk/integrations/mpa/managed/`、`frontend/server/mpa_creation.py`、`frontend/src/adk/mpaCreation.ts`、`frontend/src/ui/mpa-create/`;CLI 和目录接入。 - 测试:`tests/integrations/mpa_managed/`、`frontend/tests/mpaCreation.test.tsx`。 @@ -13,7 +13,7 @@ ## 职责与边界 -VeADK 负责托管 YAML 解析、云服务/数据库编排、有权限约束的持久创建任务和 MPA 目录窗口。无需外部源码仓库。共享注册/初始化协议与 MPA 镜像互通。旧 `veadk mpa create` 独立保留且行为不变。不增加模型执行、渠道路由、PostgreSQL 实例创建或 IAM 策略管理。 +VeADK 负责托管 YAML 解析、云服务/数据库编排、有权限约束的持久创建任务和 MPA 目录窗口。无需外部源码仓库。共享注册/初始化协议与 MPA 镜像互通。旧 `veadk mpa create` 独立保留且行为不变。模型执行与渠道路由仍由 Runtime 负责。托管运行角色 IAM 准备遵循下文契约。 ## 契约 @@ -21,15 +21,15 @@ VeADK 负责托管 YAML 解析、云服务/数据库编排、有权限约束的 - **CON-16 — Studio MPA 来源标签:**通用 Studio MPA 部署和托管式一键创建都写入 `veadk:agent-type=mpa`、`veadk:managed=true`、`veadk:provisioner=studio-mpa`、可信 `veadk:owner` 和其持有的 `veadk:mpa-instance-id`;可信 owner 缺失时必须在云变更前失败,且启动子进程前必须验证原始 owner 的哈希与任务 owner 一致。一键创建路由把 owner 哈希后用于本地任务和原生注册表归属,同时仅通过固定子进程把原始可信 owner 临时传递给 Runtime 标签,不把它持久化到任务状态。只有该路由显式提供可信 Runtime owner 时,共享 provisioning 服务才写入 Studio 来源,因此 `veadk mpa create` 不进入 Studio 发现范围。标签对账替换这些受管键、保留无关非系统标签,并且不重放 `sys:*` 标签。对于持久化了旧版无来源标签 request hash 的 pending create,先使用原始 create payload 与 client token 精确重放,再通过正常 Runtime update 写入当前来源标签后完成。共享常量位于内部 MPA 标签模块,不新增公共 Python API。标签是发现 metadata,不是授权凭据。缺少 `veadk:managed=true` 的历史托管式一键 Runtime 必须经过显式受支持的更新/重试或未来回填后,Studio 才会列出。已由 [Studio 创建的 MPA Runtime 过滤](../../prd-spec/features/studio-mpa-source-filter/2026-09-28-studio-mpa-source-filter.zh.md) 于 2026-09-29 实现并完成本地验证;真实浏览器发现仍是独立的本机验收步骤。 -- **CON-1 — 配置:** Studio 使用代码内置的北京地域配置并忽略 `VEADK_MPA_CREATE_CONFIG`;账号及 Runtime 默认值来自原私有文件,镜像默认值见下文;不固定 VPC/子网/APIG ID。自动准备 PG 后,Studio 按核验后的账号和地域读取 `mpa_admin_workspace/mpa_admin_db` 中的共享资源:校验并复用已登记资源,或通过现有带锁 provisioner 创建并保存缺失的 VPC/子网及 APIG/IM Gateway。不重置已有记录来绕过配额。CLI 显式接管仍受支持。参见[注册库驱动网络修复](../../prd-spec/bugfixes/mpa-shared-network-bootstrap/2026-09-28-registry-owned-network.zh.md)。`VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY` 和部署凭据仍须由服务端提供,不写入源码。子进程收到内置配置标记并校验相同配置。CLI `--config` 继续接受私有 YAML;`managed.version: 1` 支持短横线/下划线别名并拒绝未知字段。CLI 的 `from-runtime` 与 `template-file` 互斥,否则通过平铺镜像/模型/PG 字段构建模板。CLI 的 `database-admin-url-env` 与 `shared-database-url-env` 在服务端解析 PostgreSQL URL;配置/模板文件最多 256 KiB。HTTP 客户端不能选择路径、命令、账号或部署/PG 凭据;CON-11 允许本次创建提供 OpenViking API Key。配置检查仅限本地,不证明真实访问权限。参见[内置配置设计](../../prd-spec/features/mpa-agent-oneclick-provision/2026-09-23-studio-builtin-mpa-profile.zh.md)。 -- **CON-2 — 准备:** 运维提供 PostgreSQL 实例/注册库/登录用户/属主、IAM 角色、镜像、模型权限和网络连通性。先核验云账号及数据库权限,再准备账号 VPC/子网、APIG/IM Gateway、worker、独立业务库、Skill Space 和 Runtime。显式接管 APIG 要求配置匹配 VPC。不得假设新 VPC 可访问私网 PostgreSQL。等待应用就绪前释放账号锁。 +- **CON-1 — 配置:** Studio 使用代码内置的北京地域配置并忽略 `VEADK_MPA_CREATE_CONFIG`;非账号 Runtime 设置保留原私有默认值;Studio 镜像默认值为 CON-9 中的两个 latest 地址;部署账号来自核验的 STS 身份;不固定 VPC/子网/APIG ID。自动准备 PG 后,Studio 按核验后的账号和地域读取 `mpa_admin_workspace/mpa_admin_db` 中的共享资源:校验并复用已登记资源,或通过现有带锁 provisioner 创建并保存缺失的 VPC/子网及 APIG/IM Gateway。不重置已有记录来绕过配额。CLI 显式接管仍受支持。参见[注册库驱动网络修复](../../prd-spec/bugfixes/mpa-shared-network-bootstrap/2026-09-28-registry-owned-network.zh.md)。`VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY` 和部署凭据仍须由服务端提供,不写入源码。子进程收到内置配置标记并校验相同配置。CLI `--config` 继续接受私有 YAML;`managed.version: 1` 支持短横线/下划线别名并拒绝未知字段。CLI 的 `from-runtime` 与 `template-file` 互斥,否则通过平铺镜像/模型/PG 字段构建模板。CLI 的 `database-admin-url-env` 与 `shared-database-url-env` 在服务端解析 PostgreSQL URL;配置/模板文件最多 256 KiB。HTTP 客户端不能选择路径、命令、账号或部署/PG 凭据;CON-11 允许本次创建提供 OpenViking API Key。配置检查仅限本地,不证明真实访问权限。参见[内置配置设计](../../prd-spec/features/mpa-agent-oneclick-provision/2026-09-23-studio-builtin-mpa-profile.zh.md)。 +- **CON-2 — 准备:** 运维提供 PostgreSQL 实例/注册库/登录用户/属主、IAM 角色(内置配置自动准备)、镜像、模型权限和网络连通性。先核验云账号及数据库权限,再准备账号 VPC/子网、APIG/IM Gateway、worker、独立业务库、Skill Space 和 Runtime。显式接管 APIG 要求配置匹配 VPC。不得假设新 VPC 可访问私网 PostgreSQL。等待应用就绪前释放账号锁。 - **CON-3 — 身份:** 持久身份为已核验账号 + 地域 + 稳定智能体 ID。原生归属标记、哈希、client token 和会话 advisory lock 决定复用。拒绝无关同名资源及未完成配置冲突。在原生部署记录保存 `studio_owner`;其他所属用户或无该所属身份的已有记录不能被隐式接管。CLI 使用 `cli`,Studio 使用授权主体的哈希。 - **CON-4 — 初始化:** 使用真实 Runtime 元数据及共享 APIG 初始化,不进行旧占位 endpoint 回填。要求公私网、KeyAuth、MPA 标签、绑定 worker/Skill Space 及元数据/IM 启动初始化。参考 Runtime 模板移除来源身份、渠道凭据、Skill Space 和 worker 身份。成功要求平台 Ready 及应用 `/readiness`。 - **CON-5 — 鉴权:** 四个接口在读取配置/状态前均调用 Studio 智能体管理鉴权。认证普通用户不能创建;本地开发沿用现有 `local` 主体语义。查询/取消按所属用户隔离。同一用户/request ID 复用任务;修改输入返回 409。全局最多四个活动任务,每用户一个。 - **CON-6 — 生命周期:** 状态为 `running`、`cancelling`、`succeeded`、`failed`、`cancelled`。提交/恢复进入 `running`;显式取消进入 `cancelling`,再到 `cancelled`;超时/失败进入 `failed`。成功任务不重跑。阶段为 `queued`、`checking`、`network`、`gateway`、`worker`、`database`、`skills`、`deploying`、`verifying`;阶段表示最近观察进度,不是另一套状态机。查询/提交时核验已退出的监管进程。恢复保留原请求和智能体 ID。 - **CON-7 — 取消:** 使用当前 VeADK Python 执行固定子进程模块。取消、截止时间或服务端关闭时终止子进程,最多等待 3 秒,再强制终止/回收,随后报告终态。默认截止时间 1800 秒(60–7200)。保留持久云资源,包括结果未知的进行中请求。取消不是回滚,重试使用登记意图/token。本流程不创建需要删除的临时调试 Runtime。 - **CON-8 — 数据/安全:**内置 Studio 使用 `/tmp/veadk-studio/mpa-creation.sqlite3`(服务端可用 `VEADK_MPA_TASK_DB` 覆盖)持久化所属用户哈希、不含密钥的输入、状态/阶段、安全结果和监管进程 PID,权限为 0600。这是针对云端代码目录只读问题而明确采用的临时、实例本地方案:重启可能丢失历史,多个实例不能依赖共享任务限制或锁。独立调用方显式构造服务时仍沿用 `.adk/mpa-creation.sqlite3` 约定。每次操作后关闭连接。无自动历史过期。原生 PostgreSQL 表保持 `mpa_account_network`、`mpa_account_apig`、`mpa_agent_deployment`;须使用直连/会话池。每次重读 STS 文件;Runtime/网络/APIG/worker 共用已核验账号的凭据。协议消息最多 16 KiB 并按白名单校验。不转发原始子进程输出、SDK 错误、环境转储、数据库 URL 或 Runtime 密钥。参见[临时可写状态修复](../../prd-spec/bugfixes/studio-mpa-writable-state/2026-09-23-use-temporary-state.zh.md)。 -- **CON-9 — UI:** 火山引擎的 MPA 筛选下,有智能体管理权限时展示创建卡片,含空列表。窗口显示固定地域、必填 Runtime 名称、描述和资源计划,不显示智能体 ID 或镜像输入框。三步分别展示基础信息、PostgreSQL 自动准备和 OpenViking;仅第三步提交。POST 前保存请求身份,提交后锁定输入,确保响应丢失后安全重试。卸载时中止轮询并忽略迟到响应,保留服务端工作,重开时从会话存储恢复。明确失败或取消的任务同时提供同 ID 重试和独立的新建操作;后者仅以新请求 UUID、空白名称及默认值替换浏览器草稿,服务端在提交时派生智能体 ID,不删除或修改原服务端任务与资源。运行中和提交结果不明时,弹窗不允许开始另一个身份。成功后刷新原地域。复用本地化 BaseUI/Studio 组件、键盘/输入法行为及语义主题变量。`ModalLayout.footer` 是可选 React 节点:省略保留原操作,`null` 隐藏页脚;原调用者不变。参见[终态任务新建修复](../../prd-spec/bugfixes/studio-mpa-creation/2026-09-24-start-another-agent-after-failure.zh.md)。 +- **CON-9 — UI:** 火山引擎的 MPA 筛选下,有智能体管理权限时展示创建卡片,含空列表。窗口显示固定地域、必填 Runtime 名称、描述和资源计划,智能体 ID 由服务端生成;与 main 一致,不显示 MPA/Worker 镜像输入框;服务端使用 main 的本地 latest 默认值。三步分别展示基础信息、PostgreSQL 自动准备和 OpenViking;仅第三步提交。POST 前保存请求身份,提交后锁定输入,确保响应丢失后安全重试。卸载时中止轮询并忽略迟到响应,保留服务端工作,重开时从会话存储恢复。明确失败或取消的任务同时提供同 ID 重试和独立的新建操作;后者仅以新请求 UUID、空白名称及默认值替换浏览器草稿,服务端在提交时派生智能体 ID,不删除或修改原服务端任务与资源。运行中和提交结果不明时,弹窗不允许开始另一个身份。成功后刷新原地域。复用本地化 BaseUI/Studio 组件、键盘/输入法行为及语义主题变量。`ModalLayout.footer` 是可选 React 节点:省略保留原操作,`null` 隐藏页脚;原调用者不变。参见[终态任务新建修复](../../prd-spec/bugfixes/studio-mpa-creation/2026-09-24-start-another-agent-after-failure.zh.md)。 Runtime 名称无效时,输入框边框和错误文字使用 danger 状态色,并保留无障碍 alert;输入框提供本地化合法名称示例。共享 Button 基础组件为原生禁用按钮统一置灰并显示禁止光标,保留加载态样式。修改为合法名称后恢复向后导航。 @@ -44,7 +44,7 @@ Runtime 名称无效时,输入框边框和错误文字使用 danger 状态色 Studio 内置默认镜像改为 `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_agent:latest` 和 `agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa/mpa_codex_worker:latest`。新草稿不恢复隐藏的旧镜像覆盖项;已提交草稿/任务保留原输入和镜像选择。继续支持显式 `agentId` 和可选镜像字段的旧 API 请求,没有名称的旧请求保留按 ID 命名 Runtime 的行为。CLI/YAML 覆盖不变。弹窗显示名称和描述,不显示 ID/镜像输入框;无效名称阻止向后导航及提交。既有任务授权、取消、并发、密钥处理和错误状态语义继续有效。 -验证映射至所链接设计中的路由/任务/runner/service/runtime/profile 测试和弹窗/浏览器检查。真实云端创建单独验证;可变的 `latest` 标签不会更新运行中的智能体。 +验证映射至所链接设计中的路由/任务/runner/service/runtime/profile 测试和弹窗/浏览器检查。真实云端创建单独验证;新的镜像默认值不会更新运行中的智能体。 CON-9 导航修复(2026-09-30):步骤标题是支持键盘操作的按钮。 恢复已提交草稿后,前面的步骤和“上一步”仍可查看;已提交字段保持锁定, @@ -129,8 +129,44 @@ CON-10 元数据可见性:区分初始化元数据缺失和显式冲突。具 ### 托管沙箱模板命名 (CON-3) -新托管沙箱模板使用去掉两端空白、将所有 `-` 替换为 `_` 的智能体 ID(例如 `mi-example` → `mi_example`)。已有 worker ID 仍为权威绑定,不重命名。变更前未完成的创建意图,仅在完整旧请求与已存 worker_hash 匹配时保留哈希名称,并保留 ClientToken。其他请求变更和无关同名资源仍报错。作用域所有权标签及 Runtime ToolId 绑定不变。 +新的 Studio 名称请求直接使用经过校验的手填 Runtime 名称作为沙箱模板 Name(4–64 个 ASCII 字母、数字、连字符或下划线)。未提供名称的旧 CLI 请求仍使用去除首尾空白、将 `-` 替换为 `_` 的智能体 ID。内部智能体 ID、数据库/技能空间/渠道标识、作用域归属标签及 Runtime ToolId 绑定不变。已有 worker ID 为权威绑定,不重命名。新的未完成意图在部署 JSON 中保存 `worker_name`,拒绝后续名称变化。没有该字段的旧意图,仅在完整候选请求与已存 worker_hash 匹配时重放标准化 ID 名称或哈希名称,保留 ClientToken。其他请求变化及无关同名资源仍报错。 参见[名称 Worker 设计](../../prd-spec/bugfixes/mpa-worker-naming/2026-10-09-runtime-named-worker.zh.md)。 ## 托管 MCP 签名密钥 每个托管 MPA Runtime 均配置 `MCP_TOKEN_SECRET`。显式模板环境变量非空值优先于目标 Runtime 值,后者优先于 Agent 专属 PostgreSQL `mpa_deployment_settings` 表中的 `mcp_token_secret`。全部缺失时生成 32 随机字节、编码为 64 位十六进制字符串,并在云创建前持久化。原子插入或保留已有值确保不确定创建结果的重试稳定。仅在校验未完成请求摘要后同步显式值/当前值,避免被拒绝的变更重试破坏原请求。数据库失败终止创建并释放连接。参考 Runtime 模板排除源 Agent 密钥;显式 JSON 模板可配置密钥。回填沿用密钥,正常返回值及共享非敏感部署登记记录不包含密钥。不新增前端字段或自动迁移存量部署。参见[双语设计](../../prd-spec/bugfixes/mpa-runtime-mcp-secret/2026-10-07-persistent-mcp-secret.zh.md)。 + +## 自动准备 Runtime IAM 角色 + +内置 Studio 使用 `managed.iam.mode: auto`,显式配置默认 `existing`。自动准备在 STS 账号核验后、工作负载身份和其他资源变更前执行。仅支持全新来源的默认 `IDRoleForArkClawShareAgent` 配置。IAM 为账号级。查询/创建角色及 `VeADKMPARuntimeAccessV1`,核验账号/名称及无条件信任 `vefaas`、`apig`,补齐已批准的 12 个系统策略和 14 个自定义动作的 Global 绑定,随后回读核验。保留额外绑定,不覆盖信任或已有策略。仅明确不存在错误允许创建,竞态和最终一致性采用最多 120 秒的恢复。取消保留资源。权限/信任/策略/属主/回读失败在 `iam_role` 阶段停止,输出白名单本地化错误,不输出原始云端文本和密钥。Studio 执行凭据须允许 GetRole、CreateRole、GetPolicy、CreatePolicy、ListAttachedRolePolicies、AttachRolePolicy。existing CLI 及通用智能体不受影响。完整权限及验收见[设计](../../prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.zh.md)。 + +## Studio 部署账号 + +内置配置不再固定预期账号。使用非空部署 STS 身份确定账号级 IAM、PG、VPC、APIG 和 Runtime 归属。新建 Runtime 的 `CLAW_SPACE_ID` 和 `RUNTIME_IAM_ROLE_TRN` 由该账号和所选角色派生;显式调用方环境变量覆盖保持优先。显式 YAML 预期账号检查和凭据账号变化检查继续生效。镜像仓库地址及 Worker 参考 ID 仍是源资源,具有独立访问要求。见[设计](../../prd-spec/bugfixes/mpa-studio-account/2026-10-09-sts-account.zh.md)。 + +## 网络归属描述与恢复 + +新 VPC/子网描述使用 `mpa-account-network-v1-`。恢复/校验托管资源仅接受当前范围精确的旧 `mpa-account-network:v1:` 或新标记,不改写已有资源。旧意图仅描述不同,派发标记明确为 false、无资源 ID、按名称查询无资源时,才修正描述并生成新 ClientToken;其他字段必须完全一致。结果不确定时,没有成功查询到资源就不得再次 Create。继续遵守现有锁及先保存后派发规则。见[设计](../../prd-spec/bugfixes/mpa-network-description/2026-10-09-valid-network-marker.zh.md)。 + +## 空网络查询 + +[已批准修复](../../prd-spec/bugfixes/mpa-network-discovery/2026-10-09-empty-network-results.zh.md)明确:DescribeVpcs/DescribeSubnets 第一页集合为 null/缺失且整数 `total_count=0` 时为空结果。其他非列表集合、null 集合且数量缺失/非整数/非零,以及后续页面的 null 集合仍为无效响应。SDK/提供方错误不得成为空查询。已记录的托管 VPC 可继续准备第一个子网,无需替换 VPC。分页、归属、持久化意图及未知结果防重复保护不变。 + +## 标准型共享网关准备 + +[已实施标准型网关修复](../../prd-spec/bugfixes/mpa-standard-gateway/2026-10-09-standard-shared-gateway.zh.md)规定:新托管 APIG 使用 standard、两个 1c2g 节点、small_1 CLB、公私网和 traffic 计费。新网关创建前,在共享锁内准备同 VPC、不同 APIG 支持可用区的两个子网。可选 gateway_subnet_intents 持久化每个伴随请求/token/发送状态,未知创建必须查询恢复。保留已有网关接管/复用和已有 Runtime 网络载荷。ExceededQuota 明确允许修正后重新发送;旧未知标记仍需审计恢复。部署凭据额外需要 apig:GetGatewayAvailableZones。不新增前端字段,不修改 Runtime 角色。 + +## 独立 Worker 配置 + +内置 Studio 使用镜像默认值创建 Worker,不引用 Tool,也不重复注入启动环境。CreateTool.Port 仍为 8000,默认 Envs 仅包含生成的 MPA_AGENT_ID。见[镜像默认值修订](../../prd-spec/bugfixes/mpa-worker-template/2026-10-09-worker-image-defaults.zh.md)。可选 `managed.worker.env` 是字符串映射;完整 `${ENV_NAME}` 在服务端解析。键必须使用大写。智能体/Runtime/Tool/技能空间绑定、继承的渠道/Runtime 密钥和控制库地址为保留字段。existing-id 不允许非空 env。显式 env 覆盖已过滤的可选模板环境,最后编排器生成 MPA_AGENT_ID。显式模板不存在仍报错。环境值不进入配置摘要/repr 或部署记录。已有归属、时限、取消及请求哈希/ClientToken 保护不变;修改未完成请求参数仍冲突。见[已批准设计与验证](../../prd-spec/bugfixes/mpa-worker-template/2026-10-09-independent-worker.zh.md)。 + +## Runtime 子网顺序与恢复 + +SubnetIds 按非空、唯一成员判断相同,不受平台返回顺序影响。VpcId、EnableSharedInternetAccess 仍不可变且精确比较。成员变化、重复及格式错误列表仍校验失败。恢复保留请求顺序,或在注册记录与当前 Runtime 成员相同时保留注册顺序,使已有请求哈希及 ClientToken 继续可用。成员不同的共享默认值不得替换当前智能体选择。无需结构或哈希格式迁移。设计与验证:[子网顺序修复](../../prd-spec/bugfixes/mpa-subnet-order/2026-10-09-subnet-order.zh.md)。 + + + +镜像回退(2026-10-09):已撤回公开仓库查询及自动 digest 转换。配置接口和新任务使用内置本地 latest 默认值;已有任务快照保持不变。见[回退设计](../../prd-spec/bugfixes/mpa-create-images/2026-10-09-restore-main-images.zh.md)。 + +### 托管技能空间描述(CON-3/CON-4) + +新的名称部署创建 `Description: Skills for MPA agent `,使用经过校验、去除首尾空白的手填名称。不提供名称的调用保留内部 ID 描述。空间 `Name`、`display_name`、归属标签、ID 及绑定仍由内部标识派生。已有/显式配置空间直接复用,不更新描述。升级前待完成请求仅在完整旧描述候选与持久化 `skill_space_request` 匹配时保留原描述;其他待完成输入变化仍报错。结果未知时通过发现恢复,不盲目重复 CreateSkillSpace。见[描述设计](../../prd-spec/bugfixes/mpa-skill-space-description/2026-10-09-entered-name-description.zh.md)。 diff --git a/tests/cli/test_frontend_deploy_iam.py b/tests/cli/test_frontend_deploy_iam.py index 2924b460e..0710e5682 100644 --- a/tests/cli/test_frontend_deploy_iam.py +++ b/tests/cli/test_frontend_deploy_iam.py @@ -284,7 +284,8 @@ def test_frontend_policy_allows_release_download() -> None: assert "vefaas:GetCodeUploadAddress" in actions assert "vefaas:GetApplication" in actions assert "vefaas:GetApplicationRevisionLog" in actions - assert "iam:CreatePolicy" not in actions + # Studio now prepares a versioned custom MPA runtime policy. + assert "iam:CreatePolicy" in actions assert "iam:UpdatePolicy" not in actions assert "vefaas:CodeUploadCallback" in actions assert "vefaas:UpdateFunction" in actions @@ -296,6 +297,7 @@ def test_frontend_policy_allows_release_download() -> None: "apig:ListGateways", "apig:CreateGateway", "apig:GetGateway", + "apig:GetGatewayAvailableZones", "apig:CreateIMChannelGateway", "apig:GetIMChannelGatewayStatus", }.issubset(actions) @@ -355,6 +357,7 @@ def test_frontend_policy_allows_complete_managed_mpa_cloud_workflow() -> None: "apig:ListGateways", "apig:CreateGateway", "apig:GetGateway", + "apig:GetGatewayAvailableZones", "apig:CreateIMChannelGateway", "apig:GetIMChannelGatewayStatus", "iam:PassRole", @@ -394,14 +397,16 @@ def test_default_frontend_role_policy_is_refreshed_for_future_updates( calls: list[dict[str, str]] = [] monkeypatch.setattr( "veadk.cli.frontend_deploy_iam.ensure_frontend_role", - lambda access_key, secret_key, **kwargs: calls.append( - { - "access_key": access_key, - "secret_key": secret_key, - **kwargs, - } - ) - or role, + lambda access_key, secret_key, **kwargs: ( + calls.append( + { + "access_key": access_key, + "secret_key": secret_key, + **kwargs, + } + ) + or role + ), ) refreshed = ensure_default_frontend_role_policy( diff --git a/tests/integrations/mpa_managed/fakes_deployment_network.py b/tests/integrations/mpa_managed/fakes_deployment_network.py index 2c9484e6c..76a5ca18f 100644 --- a/tests/integrations/mpa_managed/fakes_deployment_network.py +++ b/tests/integrations/mpa_managed/fakes_deployment_network.py @@ -102,7 +102,8 @@ async def create_vpc(self, request): async def create_subnet(self, request): self.calls.append(("subnet", copy.deepcopy(request))) - sid = "subnet-auto" + count = sum(kind == "subnet" for kind, _ in self.calls) + sid = "subnet-auto" if count == 1 else f"subnet-auto-{count}" self.subnet_rows[sid] = {**self.subnet_row(sid, request["vpc_id"]), **request} if self.lose == "subnet": self.lose = "" diff --git a/tests/integrations/mpa_managed/test_agent_deployment.py b/tests/integrations/mpa_managed/test_agent_deployment.py index 00443d80d..fbae14b81 100644 --- a/tests/integrations/mpa_managed/test_agent_deployment.py +++ b/tests/integrations/mpa_managed/test_agent_deployment.py @@ -440,6 +440,94 @@ async def run(): asyncio.run(run()) +@pytest.mark.parametrize("runtime_name", ["", " Support-Agent_01 "]) +def test_skill_space_description_uses_entered_name_and_keeps_internal_bindings( + runtime_name, +): + async def run(): + svc, registry, cloud, _ = deployer() + result = await svc.deploy(template(), runtime_name=runtime_name) + request = cloud.space_creates[0] + assert request["Description"] == "Skills for MPA agent " + ( + runtime_name.strip() or "agent-one" + ) + suffix = agent_suffix("account", "cn-beijing", "agent-one") + assert request["Name"] == "mpa_skills_" + suffix + assert {tag["Key"]: tag["Value"] for tag in request["Tags"]} == { + "managed_by": "mpa-deployment", + "mpa_agent_key": suffix, + "display_name": "agent-one 技能空间", + } + env = env_map(cloud.runtimes[result["runtime_id"]]) + assert env["MPA_AGENT_ID"] == "agent-one" + assert env["SKILL_SPACE_ID"] == result["skill_space_id"] + original = copy.deepcopy(cloud.spaces) + again = await svc.deploy(template(), runtime_name="different-name") + assert again["skill_space_id"] == result["skill_space_id"] + assert cloud.spaces == original and len(cloud.space_creates) == 1 + + asyncio.run(run()) + + +@pytest.mark.parametrize("legacy", [False, True]) +def test_named_skill_space_lost_response_preserves_full_original_intent(legacy): + async def run(): + svc, registry, cloud, _ = deployer() + cloud.lose_space_response = True + with pytest.raises(TimeoutError, match="space response lost"): + await svc.deploy( + template(), runtime_name="" if legacy else "Support-Agent_01" + ) + original = copy.deepcopy(registry.row["skill_space_request"]) + assert original["Description"] == "Skills for MPA agent " + ( + "agent-one" if legacy else "Support-Agent_01" + ) + changed = template() + changed["ProjectName"] = "another-project" + with pytest.raises(DeploymentError, match="different inputs"): + await svc.deploy(changed, runtime_name="Support-Agent_01") + if not legacy: + for name in ["different-name", ""]: + with pytest.raises(DeploymentError, match="different inputs"): + await svc.deploy(template(), runtime_name=name) + cloud.hide_spaces = True + for _ in range(2): + with pytest.raises(DeploymentError, match="outcome is unknown"): + await svc.deploy(template(), runtime_name="Support-Agent_01") + assert registry.row["skill_space_request"] == original + assert len(cloud.space_creates) == 1 and not cloud.creates + cloud.hide_spaces = False + result = await svc.deploy(template(), runtime_name="Support-Agent_01") + assert result["skill_space_id"] == "space-1" + assert registry.row["skill_space_request"] == original + assert cloud.space_creates == [original] + + asyncio.run(run()) + + +@pytest.mark.parametrize("runtime_name", ["abc", "a" * 65, "bad/name", "中文名称"]) +def test_invalid_skill_space_runtime_name_fails_before_cloud_calls(runtime_name): + from veadk.integrations.mpa.managed.config import ConfigurationError + from veadk.integrations.mpa.managed.skills import ensure_skill_space + + async def run(): + cloud = AsyncMock() + with pytest.raises(ConfigurationError): + await ensure_skill_space( + Registry(), + cloud, + account="account", + region="cn-beijing", + agent_id="agent-one", + runtime_name=runtime_name, + ) + cloud.find_skill_spaces.assert_not_awaited() + cloud.create_skill_space.assert_not_awaited() + cloud.get_skill_space.assert_not_awaited() + + asyncio.run(run()) + + def test_missing_registered_skill_space_does_not_create_empty_replacement(): async def run(): svc, registry, cloud, _ = deployer() diff --git a/tests/integrations/mpa_managed/test_config.py b/tests/integrations/mpa_managed/test_config.py index ed65d0d39..66f035e19 100644 --- a/tests/integrations/mpa_managed/test_config.py +++ b/tests/integrations/mpa_managed/test_config.py @@ -31,7 +31,10 @@ def test_studio_profile_uses_builtin_beijing_defaults_without_yaml(monkeypatch): monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-model-key") profile = load_studio_profile(region="cn-beijing") - assert profile.values["account_id"] == "2112682748" + assert not profile.values.get("account_id") + assert "CLAW_SPACE_ID" not in profile.managed.runtime.env + assert "RUNTIME_IAM_ROLE_TRN" not in profile.managed.runtime.env + assert "RUNTIME_IAM_ROLE_NAME" not in profile.managed.runtime.env assert profile.values["model_api_key"] == "test-model-key" postgres = profile.managed.postgres assert postgres is not None @@ -40,7 +43,8 @@ def test_studio_profile_uses_builtin_beijing_defaults_without_yaml(monkeypatch): assert profile.managed.network.vpc_id == "" assert profile.managed.network.subnet_ids == [] assert profile.managed.apig.adopt_id == "" - assert profile.managed.worker.reference_id == "t-yeuujqfldstkidoad4p0" + assert profile.managed.worker.reference_id == "" + assert profile.managed.worker.env == {} assert profile.summary()["configured"] is True assert "test-model-key" not in str(profile.summary()) @@ -560,6 +564,59 @@ def test_runtime_environment_resolves_secret_refs_without_exposing_values( ) +def test_worker_environment_resolves_secret_refs_safely(tmp_path, monkeypatch): + monkeypatch.setenv("TEST_WORKER_SECRET", "private-test-value") + path = profile_file( + tmp_path, + monkeypatch, + worker={"image": "worker:v1", "env": {"ARK_API_KEY": "${TEST_WORKER_SECRET}"}}, + ) + profile = load_profile(path) + assert profile.managed.worker.env == {"ARK_API_KEY": "private-test-value"} + assert "private-test-value" not in str(profile.summary()) + assert "private-test-value" not in repr(profile.managed.worker) + monkeypatch.delenv("TEST_WORKER_SECRET") + with pytest.raises(ConfigurationError, match="TEST_WORKER_SECRET"): + load_profile(path) + + +@pytest.mark.parametrize( + "env", + [ + {"NOT A KEY": "private-test-value"}, + {"MPA_AGENT_ID": "private-test-value"}, + {"AGENTKIT_RUNTIME_ID": "private-test-value"}, + {"AGENTKIT_TOOL_ID": "private-test-value"}, + {"SKILL_SPACE_ID": "private-test-value"}, + {"CODEX_MCP_RUNTIME_API_KEY": "private-test-value"}, + {"SHARED_APIG_DATABASE_URL": "private-test-value"}, + {"DEPLOYMENT_DATABASE_ADMIN_URL": "private-test-value"}, + {"FEISHU_APP_SECRET": "private-test-value"}, + {"SETTING": 123}, + [], + ], +) +def test_worker_environment_validation_is_safe(tmp_path, monkeypatch, env): + with pytest.raises(ConfigurationError) as error: + load_profile( + profile_file( + tmp_path, monkeypatch, worker={"image": "worker:v1", "env": env} + ) + ) + assert "private-test-value" not in str(error.value) + + +def test_existing_worker_rejects_ignored_environment(tmp_path, monkeypatch): + with pytest.raises(ConfigurationError): + load_profile( + profile_file( + tmp_path, + monkeypatch, + worker={"existing-id": "t-worker", "env": {"SETTING": "value"}}, + ) + ) + + @pytest.mark.parametrize( "settings", [ diff --git a/tests/integrations/mpa_managed/test_deployment_network.py b/tests/integrations/mpa_managed/test_deployment_network.py index 164c8bbbb..8705d7543 100644 --- a/tests/integrations/mpa_managed/test_deployment_network.py +++ b/tests/integrations/mpa_managed/test_deployment_network.py @@ -24,6 +24,7 @@ from veadk.integrations.mpa.managed.network import ( AccountNetworkProvisioner, NetworkOptions, + same_subnet_ids, ) from veadk.integrations.mpa.managed.network_cloud import NetworkCloudError from tests.integrations.mpa_managed.fakes_deployment_network import ( @@ -43,6 +44,24 @@ def provisioner(cloud=None, **kw): ) +@pytest.mark.parametrize( + "selection", + [ + [], + None, + "subnet-one", + ["subnet-one", "subnet-one"], + ["subnet-one", None], + ["subnet-one", []], + ["subnet-one", ""], + ["subnet-one", " "], + [f"subnet-{i}" for i in range(6)], + ], +) +def test_equal_invalid_subnet_selections_do_not_hide_invalid_inputs(selection): + assert not same_subnet_ids(selection, selection) + + def test_fresh_account_creates_once_and_other_agents_reuse_network(): async def run(): entry, cloud = NetworkEntry(), NetworkCloud() @@ -72,6 +91,46 @@ async def run(): asyncio.run(run()) +def test_recorded_vpc_with_null_empty_sdk_subnets_resumes_without_new_vpc(): + from veadk.integrations.mpa.managed.network_cloud import NetworkCloud as SDKCloud + + async def run(): + entry, cloud = NetworkEntry(), NetworkCloud() + service = provisioner(cloud) + cloud.vpcs["vpc-recorded"] = { + **cloud.vpc_row("vpc-recorded"), + "description": service.marker, + } + entry.row.update( + vpc_id="vpc-recorded", + managed_vpc=True, + vpc_request={"cidr_block": "172.20.0.0/16"}, + ) + original_subnets = cloud.subnets + adapter = SDKCloud(region="cn-beijing", credentials=None) + + async def sdk_response(method, request_type, **params): + assert method == "describe_subnets" + assert request_type == "DescribeSubnetsRequest" + rows = await original_subnets(params["vpc_id"]) + return {"subnets": rows or None, "total_count": len(rows)} + + adapter.call = AsyncMock(side_effect=sdk_response) + + async def subnets(vid): + return await adapter.subnets(vid) + + cloud.subnets = subnets + first = await service.ensure(entry) + assert first == await service.ensure(entry) + assert first["VpcConfiguration"]["VpcId"] == "vpc-recorded" + assert first["VpcConfiguration"]["SubnetIds"] == ["subnet-auto"] + assert [kind for kind, _ in cloud.calls] == ["subnet"] + assert entry.row["state"] == "ready" + + asyncio.run(run()) + + @pytest.mark.parametrize("kind", ["vpc", "subnet"]) def test_lost_response_discovers_resource_without_duplicate_create(kind): async def run(): @@ -261,6 +320,85 @@ async def run(): asyncio.run(run()) +@pytest.mark.parametrize("selection", ["explicit", "registered", "different-default"]) +def test_current_subnet_permutation_preserves_stable_selection(selection): + async def run(): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + original = ["subnet-one", "subnet-two"] + cloud.subnet_rows["subnet-two"] = cloud.subnet_row("subnet-two", "vpc-one") + cloud.subnet_rows["subnet-two"]["zone_id"] = "cn-beijing-b" + entry.row = { + "vpc_id": "vpc-one", + "subnet_ids": original + if selection != "different-default" + else ["subnet-one"], + "state": "ready", + } + request = ( + {"VpcConfiguration": {"VpcId": "vpc-one", "SubnetIds": original}} + if selection == "explicit" + else None + ) + current = { + "NetworkConfigurations": [ + {"NetworkType": "public"}, + { + "NetworkType": "private", + "VpcConfiguration": { + "VpcId": "vpc-one", + "SubnetIds": list(reversed(original)), + "EnableSharedInternetAccess": True, + }, + }, + ] + } + before = copy.deepcopy((entry.row, request, current)) + result = await provisioner(cloud).ensure(entry, request, current=current) + assert result["VpcConfiguration"]["SubnetIds"] == ( + list(reversed(original)) if selection == "different-default" else original + ) + assert (entry.row, request, current) == before + assert not cloud.calls + + asyncio.run(run()) + + +@pytest.mark.parametrize( + "field,value", + [ + ("VpcId", "vpc-other"), + ("EnableSharedInternetAccess", False), + ("SubnetIds", ["subnet-one"]), + ("SubnetIds", ["subnet-one", "subnet-other"]), + ("SubnetIds", ["subnet-one", "subnet-two", "subnet-other"]), + ("SubnetIds", ["subnet-one", "subnet-two", "subnet-two"]), + ("SubnetIds", "subnet-one"), + ("SubnetIds", ["subnet-one", None]), + ], +) +def test_current_network_drift_is_rejected_before_resource_writes(field, value): + async def run(): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + active = { + "VpcId": "vpc-one", + "SubnetIds": ["subnet-one", "subnet-two"], + "EnableSharedInternetAccess": True, + } + current = { + "NetworkConfigurations": [ + {"NetworkType": "public"}, + {"NetworkType": "private", "VpcConfiguration": active}, + ] + } + with pytest.raises(DeploymentError, match="migration"): + await provisioner(cloud).ensure( + entry, {"VpcConfiguration": {**active, field: value}}, current=current + ) + assert not cloud.calls and not entry.saved + + asyncio.run(run()) + + @pytest.mark.parametrize( "options", [ @@ -388,3 +526,327 @@ def test_rfc1918_private_network_ranges(cidr): def test_non_rfc1918_network_ranges_rejected(cidr): with pytest.raises(DeploymentError): NetworkOptions(vpc_cidr=cidr, subnet_prefix=25).validate() + + +def legacy_request(service, kind): + marker = service.marker.replace("-v1-", ":v1:") + if kind == "vpc": + return dict( + cidr_block="172.20.0.0/16", + vpc_name=service.name, + description=marker, + project_name="default", + ) + return dict( + vpc_id="vpc-one", + zone_id="cn-beijing-a", + cidr_block="172.20.0.0/24", + subnet_name=service.name + "-subnet", + description=marker, + ) + + +def enforce_description_format(cloud, entry): + import re + + for kind in ["vpc", "subnet"]: + create = getattr(cloud, "create_" + kind) + + async def checked(request, kind=kind, create=create): + if not re.fullmatch( + r"[A-Za-z0-9][A-Za-z0-9 _,.=\-]{0,254}", request["description"] + ): + raise NetworkCloudError("Create" + kind, "InvalidDescription.Malformed") + assert entry.row[kind + "_request"] == request + assert entry.row[kind + "_dispatched"] is True + return await create(request) + + setattr(cloud, "create_" + kind, checked) + + +@pytest.mark.asyncio +async def test_new_network_descriptions_pass_provider_format_and_reuse(): + entry, cloud = NetworkEntry(), NetworkCloud() + enforce_description_format(cloud, entry) + service = provisioner(cloud) + expected = await service.ensure(entry) + assert await service.ensure(entry) == expected + assert [kind for kind, request in cloud.calls] == ["vpc", "subnet"] + + +@pytest.mark.asyncio +@pytest.mark.parametrize("kind", ["vpc", "subnet"]) +async def test_rejected_legacy_description_resumes_with_new_token(kind): + entry, cloud = NetworkEntry(), NetworkCloud(existing=kind == "subnet") + service = provisioner(cloud) + old = legacy_request(service, kind) + entry.row = { + kind + "_request": {**old, "client_token": "old-token"}, + kind + "_dispatched": False, + } + if kind == "subnet": + entry.row["vpc_id"] = "vpc-one" + cloud.subnet_rows.clear() + enforce_description_format(cloud, entry) + await service.ensure(entry) + request = next(request for target, request in cloud.calls if target == kind) + assert request["description"] == service.marker + assert ":" not in request["description"] + assert request["client_token"] != "old-token" + assert { + k: v for k, v in request.items() if k not in ["description", "client_token"] + } == {k: v for k, v in old.items() if k != "description"} + assert sum(target == kind for target, request in cloud.calls) == 1 + + +@pytest.mark.asyncio +@pytest.mark.parametrize("kind", ["vpc", "subnet"]) +@pytest.mark.parametrize("dispatched", [True, None]) +async def test_unknown_legacy_description_never_dispatches_without_discovery( + kind, dispatched +): + entry, cloud = NetworkEntry(), NetworkCloud(existing=kind == "subnet") + service = provisioner(cloud) + old = legacy_request(service, kind) + entry.row.update({kind + "_request": {**old, "client_token": "old-token"}}) + if dispatched is not None: + entry.row[kind + "_dispatched"] = dispatched + if kind == "subnet": + entry.row["vpc_id"] = "vpc-one" + cloud.subnet_rows.clear() + with pytest.raises(DeploymentError): + await service.ensure(entry) + assert not cloud.calls + assert entry.row[kind + "_request"] == {**old, "client_token": "old-token"} + assert entry.row.get(kind + "_dispatched") is dispatched + + +@pytest.mark.asyncio +@pytest.mark.parametrize("registered", [False, True]) +async def test_old_scoped_network_is_reused_without_mutation(registered): + cloud = NetworkCloud() + entry = NetworkEntry() + service = provisioner(cloud) + result = await service.ensure(entry) + old_marker = legacy_request(service, "vpc")["description"] + cloud.vpcs["vpc-auto"]["description"] = old_marker + cloud.subnet_rows["subnet-auto"]["description"] = old_marker + entry.row["vpc_request"]["description"] = old_marker + entry.row["subnet_request"]["description"] = old_marker + cloud.calls.clear() + assert await service.ensure(entry if registered else NetworkEntry()) == result + assert not cloud.calls + assert cloud.vpcs["vpc-auto"]["description"] == old_marker + + +@pytest.mark.asyncio +@pytest.mark.parametrize("kind", ["vpc", "subnet"]) +async def test_unknown_legacy_intent_can_recover_discovered_resource(kind): + cloud, entry = NetworkCloud(existing=kind == "subnet"), NetworkEntry() + service = provisioner(cloud) + old = legacy_request(service, kind) + if kind == "subnet": + cloud.subnet_rows.clear() + await getattr(cloud, "create_" + kind)({**old, "client_token": "old-token"}) + entry.row = { + kind + "_request": {**old, "client_token": "old-token"}, + kind + "_dispatched": True, + } + if kind == "subnet": + entry.row["vpc_id"] = "vpc-one" + await service.ensure(entry) + assert sum(target == kind for target, request in cloud.calls) == 1 + assert entry.row[kind + "_request"]["client_token"] == "old-token" + + +@pytest.mark.asyncio +async def test_rejected_legacy_request_cannot_change_other_inputs(): + cloud, entry = NetworkCloud(), NetworkEntry() + service = provisioner(cloud) + old = legacy_request(service, "vpc") + old["project_name"] = "other-project" + entry.row = { + "vpc_request": {**old, "client_token": "old-token"}, + "vpc_dispatched": False, + } + with pytest.raises(DeploymentError, match="different inputs"): + await service.ensure(entry) + assert not cloud.calls + assert entry.row["vpc_request"] == {**old, "client_token": "old-token"} + + +@pytest.mark.asyncio +async def test_gateway_companion_uses_apig_zones_and_preserves_primary_intent(): + entry, cloud = NetworkEntry(), NetworkCloud() + manager = provisioner(cloud) + network = await manager.ensure(entry) + original = copy.deepcopy(network) + primary = copy.deepcopy(entry.row["subnet_request"]) + first = await manager.gateway_network( + entry, network, ["cn-beijing-a", "cn-beijing-c"] + ) + second = await manager.gateway_network( + entry, first, ["cn-beijing-a", "cn-beijing-c"] + ) + assert first == second + assert network == original + assert entry.row["subnet_request"] == primary + assert first["VpcConfiguration"]["SubnetIds"] == ["subnet-auto", "subnet-auto-2"] + assert [kind for kind, _ in cloud.calls] == ["vpc", "subnet", "subnet"] + companion = cloud.calls[-1][1] + assert companion["zone_id"] == "cn-beijing-c" + assert companion["cidr_block"] == "172.20.1.0/24" + assert ( + entry.row["gateway_subnet_intents"]["cn-beijing-c"]["subnet_request"] + == companion + ) + + +@pytest.mark.asyncio +@pytest.mark.parametrize("cancel", [False, True]) +async def test_gateway_companion_lost_response_discovers_without_duplicate(cancel): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + manager = provisioner(cloud) + network = await manager.ensure(entry) + create = cloud.create_subnet + + async def lost(request): + await create(request) + raise asyncio.CancelledError() if cancel else TimeoutError("lost response") + + cloud.create_subnet = lost + with pytest.raises(asyncio.CancelledError if cancel else TimeoutError): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + cloud.hide = True + with pytest.raises(DeploymentError, match="outcome unknown"): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + assert len(cloud.calls) == 1 + cloud.hide = False + result = await manager.gateway_network( + entry, network, ["cn-beijing-a", "cn-beijing-c"] + ) + assert result["VpcConfiguration"]["SubnetIds"] == ["subnet-one", "subnet-auto"] + assert len(cloud.calls) == 1 + + +@pytest.mark.asyncio +async def test_pending_companion_cannot_be_bypassed_by_another_subnet(): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + manager = provisioner(cloud) + network = await manager.ensure(entry) + cloud.lose = "subnet" + with pytest.raises(TimeoutError): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + cloud.subnet_rows.pop("subnet-auto") + cloud.subnet_rows["unrelated"] = { + **cloud.subnet_row("unrelated", "vpc-one"), + "zone_id": "cn-beijing-c", + } + with pytest.raises(DeploymentError, match="outcome unknown"): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + assert len(cloud.calls) == 1 + + +@pytest.mark.asyncio +async def test_existing_cross_zone_subnets_are_reused(): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + cloud.subnet_rows["subnet-c"] = { + **cloud.subnet_row("subnet-c", "vpc-one"), + "zone_id": "cn-beijing-c", + "cidr_block": "172.20.1.0/24", + } + manager = provisioner(cloud) + network = await manager.ensure(entry) + result = await manager.gateway_network( + entry, network, ["cn-beijing-a", "cn-beijing-c"] + ) + assert result["VpcConfiguration"]["SubnetIds"] == ["subnet-one", "subnet-c"] + assert cloud.calls == [] + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "zones", + [ + [], + ["cn-beijing-a"], + ["cn-beijing-a", "cn-beijing-a"], + ["cn-beijing-a", "cn-shanghai-a"], + ], +) +async def test_gateway_invalid_zones_fail_before_creating_companions(zones): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + manager = provisioner(cloud) + network = await manager.ensure(entry) + with pytest.raises(DeploymentError, match="APIG"): + await manager.gateway_network(entry, network, zones) + assert cloud.calls == [] + + +@pytest.mark.asyncio +async def test_gateway_companion_has_no_free_cidr(): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + cloud.vpcs["vpc-one"]["cidr_block"] = "172.20.0.0/24" + manager = provisioner(cloud) + network = await manager.ensure(entry) + with pytest.raises(DeploymentError, match="No free subnet CIDR"): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + assert cloud.calls == [] + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "field,value", + [ + ("description", "foreign-owner"), + ("zone_id", "cn-beijing-d"), + ("account_id", "another-account"), + ("available_ip_address_count", 0), + ], +) +async def test_pending_gateway_companion_drift_never_dispatches_again(field, value): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + manager = provisioner(cloud) + network = await manager.ensure(entry) + cloud.lose = "subnet" + with pytest.raises(TimeoutError): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + cloud.subnet_rows["subnet-auto"][field] = value + with pytest.raises(DeploymentError): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + assert len(cloud.calls) == 1 + + +@pytest.mark.asyncio +async def test_pending_gateway_companion_prefix_change_keeps_original_request(): + entry, cloud = NetworkEntry(), NetworkCloud(existing=True) + entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + manager = provisioner(cloud) + network = await manager.ensure(entry) + cloud.lose = "subnet" + with pytest.raises(TimeoutError): + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + before = copy.deepcopy(entry.row) + with pytest.raises(DeploymentError, match="CIDR/configuration conflicts"): + await provisioner( + cloud, options=NetworkOptions(subnet_prefix=25) + ).gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + assert entry.row == before + assert len(cloud.calls) == 1 + + +@pytest.mark.asyncio +async def test_gateway_cidr_allocation_keeps_primary_when_subnet_list_lags(): + entry, cloud = NetworkEntry(), NetworkCloud() + manager = provisioner(cloud) + network = await manager.ensure(entry) + # GetSubnet is ready while DescribeSubnets has not caught up yet. + cloud.hide = True + await manager.gateway_network(entry, network, ["cn-beijing-a", "cn-beijing-c"]) + assert cloud.calls[-1][1]["cidr_block"] == "172.20.1.0/24" diff --git a/tests/integrations/mpa_managed/test_deployment_network_cloud.py b/tests/integrations/mpa_managed/test_deployment_network_cloud.py index d5d4c3755..1b8694b36 100644 --- a/tests/integrations/mpa_managed/test_deployment_network_cloud.py +++ b/tests/integrations/mpa_managed/test_deployment_network_cloud.py @@ -151,6 +151,77 @@ async def run(): asyncio.run(run()) +@pytest.mark.parametrize("collection", ["vpcs", "subnets"]) +@pytest.mark.parametrize("serialization", ["sdk", "absent"]) +def test_discovery_accepts_confirmed_empty_sdk_results(collection, serialization): + import volcenginesdkvpc + + response_type = ( + volcenginesdkvpc.DescribeVpcsResponse + if collection == "vpcs" + else volcenginesdkvpc.DescribeSubnetsResponse + ) + response = response_type(total_count=0).to_dict() + assert response[collection] is None + if serialization == "absent": + del response[collection] + cloud = NetworkCloud(region="r", credentials=None) + cloud.call = AsyncMock(return_value=response) + discover = cloud.find_vpcs if collection == "vpcs" else cloud.subnets + assert asyncio.run(discover("name-or-vpc")) == [] + cloud.call.assert_awaited_once() + assert cloud.call.call_args.kwargs["page_number"] == 1 + + +@pytest.mark.parametrize("collection", ["vpcs", "subnets"]) +@pytest.mark.parametrize( + "response", + [ + {}, + {"total_count": 1}, + {"total_count": -1}, + {"total_count": None}, + {"total_count": False}, + {"total_count": "0"}, + {"total_count": 0.0}, + {"items": "", "total_count": 0}, + {"items": {}, "total_count": 0}, + ], +) +def test_discovery_rejects_unconfirmed_or_malformed_empty_results(collection, response): + payload = {**response, collection: response.get("items")} + cloud = NetworkCloud(region="r", credentials=None) + cloud.call = AsyncMock(return_value=payload) + discover = cloud.find_vpcs if collection == "vpcs" else cloud.subnets + with pytest.raises(DeploymentError, match="invalid results"): + asyncio.run(discover("name-or-vpc")) + cloud.call.assert_awaited_once() + + +@pytest.mark.parametrize("collection", ["vpcs", "subnets"]) +def test_discovery_rejects_null_zero_page_after_populated_page(collection): + cloud = NetworkCloud(region="r", credentials=None) + cloud.call = AsyncMock( + side_effect=[ + {collection: [{}] * 100, "total_count": 100}, + {collection: None, "total_count": 0}, + ] + ) + discover = cloud.find_vpcs if collection == "vpcs" else cloud.subnets + with pytest.raises(DeploymentError, match="invalid results"): + asyncio.run(discover("name-or-vpc")) + assert cloud.call.await_count == 2 + + +def test_empty_discovery_does_not_hide_provider_errors(): + cloud = NetworkCloud(region="r", credentials=None) + cloud.call = AsyncMock( + side_effect=NetworkCloudError("describe_subnets", "AccessDenied") + ) + with pytest.raises(NetworkCloudError, match="AccessDenied"): + asyncio.run(cloud.subnets("vpc")) + + @pytest.mark.parametrize( "method,args,message", [ diff --git a/tests/integrations/mpa_managed/test_gateway.py b/tests/integrations/mpa_managed/test_gateway.py index 7e1ff1dad..6e7fed104 100644 --- a/tests/integrations/mpa_managed/test_gateway.py +++ b/tests/integrations/mpa_managed/test_gateway.py @@ -64,6 +64,9 @@ def __init__(self, account="account-1", region="cn-beijing"): async def account_id(self): return self.account + async def available_zones(self): + return [self.region + "-a", self.region + "-c"] + async def find_gateways(self, name): return [g for g in self.gateways.values() if g["Name"] == name] @@ -73,7 +76,7 @@ async def create_gateway(self, name, vpc_id, subnet_ids): self.gateways["gw-1"] = { "Id": "gw-1", "Name": name, - "Type": "serverless", + "Type": "standard", "Region": self.region, "Status": "Running", "NetworkSpec": {"VpcId": vpc_id}, @@ -158,10 +161,11 @@ async def scenario(): asyncio.run(scenario()) -def test_definitive_permission_error_can_retry_after_permissions_fixed(): +@pytest.mark.parametrize("code", ["AccessDenied", "ExceededQuota"]) +def test_definitive_permission_error_can_retry_after_permissions_fixed(code): async def scenario(): registry, cloud = Registry(), Cloud() - cloud.create_error = APIGClientError("denied", code="AccessDenied") + cloud.create_error = APIGClientError("denied", code=code) with pytest.raises(APIGClientError): await service(registry, cloud).ensure( vpc_id="vpc-1", subnet_ids=["subnet-1"] @@ -174,6 +178,33 @@ async def scenario(): asyncio.run(scenario()) +def test_im_quota_rejection_can_retry_without_recreating_gateway(): + async def scenario(): + registry, cloud = Registry(), Cloud() + create = cloud.create_im_gateway_service + + async def rejected(**kwargs): + raise APIGClientError("quota", code="ExceededQuota") + + cloud.create_im_gateway_service = rejected + with pytest.raises(APIGClientError): + await service(registry, cloud).ensure( + vpc_id="vpc-1", subnet_ids=["subnet-1", "subnet-2"] + ) + assert ( + registry.rows[(cloud.account, cloud.region)]["im_create_requested"] is False + ) + cloud.create_im_gateway_service = create + assert ( + await service(registry, cloud).ensure( + vpc_id="vpc-1", subnet_ids=["subnet-1", "subnet-2"] + ) + )["state"] == "ready" + assert cloud.created == 1 + + asyncio.run(scenario()) + + def test_explicit_adoption_recovers_unknown_create_without_second_gateway(): async def scenario(): registry, cloud = Registry(), Cloud() diff --git a/tests/integrations/mpa_managed/test_gateway_cloud.py b/tests/integrations/mpa_managed/test_gateway_cloud.py index 09f284318..2fc29ff9e 100644 --- a/tests/integrations/mpa_managed/test_gateway_cloud.py +++ b/tests/integrations/mpa_managed/test_gateway_cloud.py @@ -15,8 +15,75 @@ import asyncio import json from types import SimpleNamespace +from unittest.mock import AsyncMock -from veadk.integrations.mpa.managed.gateway_cloud import GatewayCloud +import pytest + +from veadk.integrations.mpa.managed.gateway_cloud import APIGClientError, GatewayCloud + + +def test_new_gateway_matches_standard_shared_specification(): + cloud = GatewayCloud(SimpleNamespace(region="cn-beijing")) + cloud.call = AsyncMock(return_value={"Id": "gw-new"}) + assert ( + asyncio.run(cloud.create_gateway("managed", "vpc", ["subnet-a", "subnet-c"])) + == "gw-new" + ) + cloud.call.assert_awaited_once_with( + "CreateGateway", + { + "Name": "managed", + "Region": "cn-beijing", + "Type": "standard", + "NetworkSpec": {"VpcId": "vpc", "SubnetIds": ["subnet-a", "subnet-c"]}, + "ResourceSpec": { + "Replicas": 2, + "InstanceSpecCode": "1c2g", + "CLBSpecCode": "small_1", + "PublicNetworkBillingType": "traffic", + "NetworkType": { + "EnablePublicNetwork": True, + "EnablePrivateNetwork": True, + }, + }, + }, + ) + + +@pytest.mark.parametrize("ids", [[], ["one"], ["one", "one"]]) +def test_standard_gateway_rejects_insufficient_subnets_before_dispatch(ids): + cloud = GatewayCloud(SimpleNamespace(region="cn-beijing")) + cloud.call = AsyncMock() + with pytest.raises(APIGClientError, match="distinct subnet"): + asyncio.run(cloud.create_gateway("managed", "vpc", ids)) + cloud.call.assert_not_awaited() + + +def test_gateway_zones_are_from_apig(): + cloud = GatewayCloud(SimpleNamespace(region="cn-beijing")) + cloud.call = AsyncMock( + return_value={"AvailableZones": ["cn-beijing-c", "cn-beijing-a"]} + ) + assert asyncio.run(cloud.available_zones()) == ["cn-beijing-a", "cn-beijing-c"] + cloud.call.assert_awaited_once_with("GetGatewayAvailableZones", {}) + + +@pytest.mark.parametrize( + "zones", + [ + None, + [], + ["cn-beijing-a"], + ["cn-beijing-a", "cn-shanghai-a"], + ["cn-beijing-a", "cn-beijing-a"], + "bad", + ], +) +def test_invalid_gateway_zones_fail_closed(zones): + cloud = GatewayCloud(SimpleNamespace(region="cn-beijing")) + cloud.call = AsyncMock(return_value={"AvailableZones": zones}) + with pytest.raises(APIGClientError, match="available zones"): + asyncio.run(cloud.available_zones()) def test_gateway_reads_universal_sdk_raw_response_when_decoded_result_is_empty( diff --git a/tests/integrations/mpa_managed/test_iam.py b/tests/integrations/mpa_managed/test_iam.py new file mode 100644 index 000000000..681567635 --- /dev/null +++ b/tests/integrations/mpa_managed/test_iam.py @@ -0,0 +1,311 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Isolated role reconciliation contracts; never call real IAM.""" + +import asyncio +import copy +import json +from types import SimpleNamespace + +import pytest + +from veadk.integrations.mpa.managed.config import Managed, load_studio_profile +from veadk.integrations.mpa.managed.iam import ( + ACTIONS, + POLICY_NAME, + ROLE_NAME, + SYSTEM_POLICIES, + TRUST_DOCUMENT, + IamCloud, + IamError, + ensure_runtime_role, +) + + +class FakeIAM: + def __init__(self): + self.role = None + self.policy = None + self.bindings = {("unrelated", "Custom")} + self.calls = [] + self.fail = None + self.hidden = 0 + self.race = False + + async def call(self, method, **params): + self.calls.append((method, params)) + if self.fail == method: + raise IamError("AccessDenied") + if method == "get_role": + if self.role is None: + raise IamError("RoleNotExist") + return {"Role": copy.deepcopy(self.role)} + if method == "create_role": + self.role = { + "RoleName": ROLE_NAME, + "Trn": f"trn:iam::123:role/{ROLE_NAME}", + "TrustPolicyDocument": params["TrustPolicyDocument"], + } + if self.race: + raise IamError("RoleAlreadyExists") + if method == "get_policy": + if self.policy is None: + raise IamError("PolicyNotExist") + return {"Policy": {"PolicyDocument": copy.deepcopy(self.policy)}} + if method == "create_policy": + self.policy = json.loads(params["PolicyDocument"]) + if self.race: + raise IamError("PolicyAlreadyExist") + if method == "list_attached_role_policies": + if self.hidden: + self.hidden -= 1 + return {"AttachedPolicyMetadata": []} + return { + "AttachedPolicyMetadata": [ + { + "PolicyName": name, + "PolicyType": kind, + "PolicyScope": [{"PolicyScopeType": "Global"}], + } + for name, kind in self.bindings + ] + } + if method == "attach_role_policy": + binding = (params["PolicyName"], params["PolicyType"]) + if binding in self.bindings: + raise IamError("PolicyAttachConflict") + self.bindings.add(binding) + return {} + + +@pytest.mark.asyncio +@pytest.mark.parametrize("race", [False, True]) +async def test_new_role_and_policy_converge_and_retry_is_additive(race): + cloud = FakeIAM() + cloud.race = race + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert len(SYSTEM_POLICIES) == 12 and len(ACTIONS) == 14 + assert cloud.bindings == {("unrelated", "Custom"), (POLICY_NAME, "Custom")} | { + (name, "System") for name in SYSTEM_POLICIES + } + assert json.loads(cloud.role["TrustPolicyDocument"]) == TRUST_DOCUMENT + cloud.calls.clear() + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert not any( + method.startswith(("create_", "attach_")) for method, _ in cloud.calls + ) + + +@pytest.mark.asyncio +async def test_partial_failure_preserves_state_and_same_identity_can_resume(): + cloud = FakeIAM() + cloud.fail = "attach_role_policy" + with pytest.raises(IamError) as caught: + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert caught.value.key == "iamPermissionDenied" + assert cloud.role and cloud.policy + cloud.fail = None + cloud.hidden = 2 + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert (POLICY_NAME, "Custom") in cloud.bindings + + +@pytest.mark.asyncio +@pytest.mark.parametrize( + "problem,key", + [ + ("account", "iamOwnershipConflict"), + ("trust", "iamTrustConflict"), + ("deny", "iamTrustConflict"), + ("policy", "iamPolicyConflict"), + ], +) +async def test_conflicting_existing_resources_are_never_overwritten(problem, key): + cloud = FakeIAM() + await ensure_runtime_role(cloud, "123", poll_interval=0) + if problem == "account": + cloud.role["Trn"] = f"trn:iam::456:role/{ROLE_NAME}" + elif problem == "trust": + cloud.role["TrustPolicyDocument"] = json.dumps({"Statement": []}) + elif problem == "deny": + trust = copy.deepcopy(TRUST_DOCUMENT) + trust["Statement"].append({"Effect": "Deny", "Action": ["sts:AssumeRole"]}) + cloud.role["TrustPolicyDocument"] = trust + else: + cloud.policy["Statement"][0]["Resource"] = ["different"] + cloud.calls.clear() + with pytest.raises(IamError) as caught: + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert caught.value.key == key + assert all(method.startswith(("get_", "list_")) for method, _ in cloud.calls) + + +@pytest.mark.asyncio +async def test_permission_error_does_not_trigger_create(): + cloud = FakeIAM() + cloud.fail = "get_role" + with pytest.raises(IamError, match="iamPermissionDenied"): + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert [method for method, _ in cloud.calls] == ["get_role"] + + +@pytest.mark.asyncio +async def test_readback_timeout_and_cancellation_keep_resources(): + cloud = FakeIAM() + cloud.hidden = 100000 + with pytest.raises(IamError, match="iamVerificationFailed"): + await ensure_runtime_role(cloud, "123", timeout=0.01, poll_interval=0.02) + assert cloud.role and cloud.policy + task = asyncio.create_task(ensure_runtime_role(cloud, "123", poll_interval=10)) + await asyncio.sleep(0.01) + task.cancel() + with pytest.raises(asyncio.CancelledError): + await task + count = len(cloud.calls) + await asyncio.sleep(0.01) + assert len(cloud.calls) == count + + +def test_default_modes_and_auto_rejects_custom_sources(monkeypatch): + monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-key") + assert load_studio_profile(region="cn-beijing").managed.iam.mode == "auto" + assert Managed(version=1, worker={"image": "repo/image:tag"}).iam.mode == "existing" + for extra in [ + {"from_runtime": "r-reference"}, + {"template_file": "x.json"}, + {"runtime": {"role_name": "CustomRole"}}, + {"worker": {"image": "repo/image:tag", "role_name": "CustomRole"}}, + ]: + with pytest.raises(ValueError): + Managed.model_validate( + { + "version": 1, + "worker": {"image": "repo/image:tag"}, + "iam": {"mode": "auto"}, + **extra, + } + ) + + +@pytest.mark.asyncio +async def test_sdk_isolation_fresh_credentials_and_safe_errors(monkeypatch): + from volcengine.iam.IamService import IamService + + clients = [] + + def initialize(client): + clients.append(client) + + monkeypatch.setattr(IamService, "__init__", initialize) + for setter in [ + "set_ak", + "set_sk", + "set_session_token", + "set_scheme", + "set_connection_timeout", + "set_socket_timeout", + ]: + monkeypatch.setattr(IamService, setter, lambda self, value: None) + monkeypatch.setattr( + IamService, + "get_role", + lambda self, params: { + "ResponseMetadata": { + "Error": {"Code": "AccessDenied", "Message": "private-token"} + } + }, + ) + credentials = [] + + def fresh(): + credentials.append(True) + return SimpleNamespace( + access_key_id="test", secret_access_key="test", session_token="test" + ) + + cloud = IamCloud(SimpleNamespace(_credentials=fresh)) + for _ in range(2): + with pytest.raises(IamError) as caught: + await cloud.call("get_role", RoleName=ROLE_NAME) + assert "private-token" not in str(caught.value) + assert len(credentials) == 2 and clients[0] is not clients[1] + monkeypatch.setattr( + IamService, + "get_role", + lambda self, params: (_ for _ in ()).throw( + Exception( + json.dumps( + { + "ResponseMetadata": { + "Error": { + "Code": "RoleNotExist", + "Message": "private-token", + } + } + } + ) + ) + ), + ) + with pytest.raises(IamError) as caught: + await cloud.call("get_role", RoleName=ROLE_NAME) + assert caught.value.code == "RoleNotExist" + + +@pytest.mark.asyncio +async def test_role_failure_stops_before_identity_and_pg(monkeypatch): + from unittest.mock import AsyncMock + from veadk.integrations.mpa.managed import service + + monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-key") + profile = load_studio_profile(region="cn-beijing") + profile.values["account_id"] = "123" + runtime = SimpleNamespace(account_id=AsyncMock(return_value="123")) + monkeypatch.setattr(service, "RuntimeCloud", lambda **kwargs: runtime) + prepare = AsyncMock(side_effect=IamError("AccessDenied")) + identity = AsyncMock() + monkeypatch.setattr(service, "ensure_runtime_role", prepare) + monkeypatch.setattr(service, "ensure_workload_identity", identity) + stages = [] + with pytest.raises(IamError): + await service.provision( + profile, agent_id="mi-test", owner="test", progress=stages.append + ) + assert stages == ["checking", "iam_role"] + prepare.assert_awaited_once() + identity.assert_not_awaited() + + +@pytest.mark.asyncio +async def test_project_only_binding_does_not_satisfy_global_access(): + cloud = FakeIAM() + await ensure_runtime_role(cloud, "123", poll_interval=0) + original = cloud.call + reads = 0 + + async def call(method, **params): + nonlocal reads + result = await original(method, **params) + if method == "list_attached_role_policies": + reads += 1 + if reads == 1: + for binding in result["AttachedPolicyMetadata"]: + binding["PolicyScope"] = [{"PolicyScopeType": "Project"}] + return result + + cloud.call = call + cloud.calls.clear() + await ensure_runtime_role(cloud, "123", poll_interval=0) + assert len([m for m, _ in cloud.calls if m == "attach_role_policy"]) == 13 diff --git a/tests/integrations/mpa_managed/test_runtime_deployment_edges.py b/tests/integrations/mpa_managed/test_runtime_deployment_edges.py index 36de2c0c4..ff3620189 100644 --- a/tests/integrations/mpa_managed/test_runtime_deployment_edges.py +++ b/tests/integrations/mpa_managed/test_runtime_deployment_edges.py @@ -177,6 +177,111 @@ async def run(): asyncio.run(run()) +@pytest.mark.parametrize("resume", [False, True]) +@pytest.mark.parametrize("explicit", [False, True]) +def test_subnet_permutation_finishes_fresh_or_pending_runtime_without_duplicates( + resume, explicit +): + async def run(): + svc, registry, cloud, databases = deployer() + subnets = ["subnet-one", "subnet-two"] + cloud.network.subnet_rows["subnet-two"] = cloud.network.subnet_row( + "subnet-two", "vpc-one" + ) + cloud.network.subnet_rows["subnet-two"]["zone_id"] = "cn-beijing-b" + registry.network.row = {"vpc_id": "vpc-one", "subnet_ids": subnets.copy()} + payload = template() + payload["NetworkConfiguration"] = ( + { + "VpcConfiguration": { + "VpcId": "vpc-one", + "SubnetIds": subnets.copy(), + } + } + if explicit + else {} + ) + before = copy.deepcopy(payload) + create = cloud.create + + async def reordered_create(request): + rid = await create(request) + private = cloud.runtimes[rid]["NetworkConfigurations"][0] + private["VpcConfiguration"] = { + **private["VpcConfiguration"], + "SubnetIds": list(reversed(subnets)), + } + return rid + + cloud.create = reordered_create + digest, token = None, None + if resume: + get = cloud.get + cloud.get = AsyncMock(side_effect=TimeoutError("platform read interrupted")) + with pytest.raises(TimeoutError): + await svc.deploy(payload) + cloud.get = get + assert registry.row["pending"] and registry.row["runtime_id"] == "r-agent" + digest = registry.row["request_hash"] + token = registry.row["client_token"] + changed = copy.deepcopy(payload) + changed["ArtifactUrl"] = "different:image" + with pytest.raises(DeploymentError, match="unfinished"): + await svc.deploy(changed) + result = await svc.deploy(payload) + assert result["runtime_id"] == "r-agent" and result["state"] == "ready" + assert not registry.row["pending"] + assert len(cloud.creates) == len(cloud.updates) == len(cloud.space_creates) == 1 + assert not cloud.network.calls + assert databases.seeded[-1] == (result["database_name"], "agent-one", "r-agent") + env = mod.env_map(cloud.runtimes["r-agent"]) + assert env["AGENTKIT_RUNTIME_ID"] == "r-agent" + assert env["A2A_PUBLIC_URL"] == "https://public.example" + assert env["CODEX_MCP_RUNTIME_API_KEY"] == "runtime-key" + assert registry.network.row["subnet_ids"] == subnets + assert payload == before + if resume: + assert registry.row["request_hash"] == digest + assert registry.row["client_token"] == token + + asyncio.run(run()) + + +@pytest.mark.parametrize( + "subnets", + [ + ["subnet-one"], + ["subnet-one", "subnet-other"], + ["subnet-one", "subnet-two", "subnet-other"], + ["subnet-one", "subnet-two", "subnet-two"], + [], + "subnet-one", + ["subnet-one", None], + ], +) +def test_runtime_validation_rejects_changed_or_invalid_subnet_members(subnets): + payload = template() + payload["NetworkConfiguration"]["VpcConfiguration"]["SubnetIds"] = [ + "subnet-one", + "subnet-two", + ] + runtime = { + "RoleName": payload["RoleName"], + "Envs": payload["Envs"] + [{"Key": "PGDATABASE", "Value": "test_db"}], + "NetworkConfigurations": [ + {"NetworkType": "public"}, + { + "NetworkType": "private", + "VpcConfiguration": {"VpcId": "vpc-one", "SubnetIds": subnets}, + }, + ], + } + with pytest.raises(DeploymentError, match="migration"): + mod.validate_runtime( + runtime, agent_id="agent-one", database="test_db", template=payload + ) + + def test_deployment_rejects_incomplete_network_before_creating_resources(): async def run(): svc, registry, cloud, _ = deployer() diff --git a/tests/integrations/mpa_managed/test_service.py b/tests/integrations/mpa_managed/test_service.py index 28ca0ba49..10d332906 100644 --- a/tests/integrations/mpa_managed/test_service.py +++ b/tests/integrations/mpa_managed/test_service.py @@ -40,8 +40,15 @@ @pytest.mark.parametrize("split_workspaces", [False, True]) @pytest.mark.parametrize("openviking", [False, True]) @pytest.mark.parametrize("studio_runtime_owner", [None, "studio-user"]) +@pytest.mark.parametrize("runtime_name", ["", "Support-Agent_01"]) def test_network_gateway_worker_precede_runtime( - monkeypatch, source, image, split_workspaces, openviking, studio_runtime_owner + monkeypatch, + source, + image, + split_workspaces, + openviking, + studio_runtime_owner, + runtime_name, ): async def run(): entry = Registry() @@ -75,6 +82,7 @@ async def run(): OPENVIKING_USER="old-user", OPENVIKING_EXTRA="old-extra", ) + assert profile.template is not None profile.template["Envs"].extend( [ { @@ -134,8 +142,13 @@ async def run(): monkeypatch.setattr(service, "AgentDeploymentRegistry", lambda url: entry) databases = Databases() monkeypatch.setattr(service, "AgentDatabaseProvisioner", lambda **kw: databases) - cloud._credentials = lambda: SimpleNamespace( - access_key_id="ak", secret_access_key="sk", session_token="token" + monkeypatch.setattr( + cloud, + "_credentials", + lambda: SimpleNamespace( + access_key_id="ak", secret_access_key="sk", session_token="token" + ), + raising=False, ) monkeypatch.setattr( service, "IdentityClient", lambda **kw: SimpleNamespace(), raising=False @@ -170,15 +183,28 @@ async def ensure(self, **kw): async def worker(*a, **kw): assert events == ["identity", "gateway"] + assert kw["runtime_name"] == runtime_name + assert kw["agent_id"] == "mi-123456789abc" events.append("worker") return "t-one" + monkeypatch.setattr( + service, + "GatewayCloud", + lambda _: SimpleNamespace( + available_zones=AsyncMock(return_value=["cn-beijing-a", "cn-beijing-c"]) + ), + ) monkeypatch.setattr(service, "SharedAPIGService", Gateway) monkeypatch.setattr(service, "ensure_worker", worker) cloud_create = cloud.create async def create(request): assert events == ["identity", "gateway", "worker"] + assert request["Name"] == (runtime_name or "mi-123456789abc") + assert cloud.space_creates[0]["Description"] == ( + "Skills for MPA agent " + (runtime_name or "mi-123456789abc") + ) assert request["ToolId"] == "t-one" runtime_tags = { item["Key"]: item["Value"] for item in request.get("Tags", []) @@ -255,9 +281,9 @@ async def create(request): agent_id="mi-123456789abc", owner="owner-hash-a", studio_runtime_owner=studio_runtime_owner, - runtime_name="support-agent", + runtime_name=runtime_name, ) - assert cloud.creates[0]["Name"] == "support-agent" + assert cloud.creates[0]["Name"] == (runtime_name or "mi-123456789abc") assert result["runtime_id"] == "r-agent" assert result["gateway_id"] == "gw-one" assert cloud.runtimes[result["runtime_id"]]["ToolId"] == "t-one" @@ -360,6 +386,15 @@ def databases_factory(**kwargs): monkeypatch.setattr(service, "AgentDatabaseProvisioner", databases_factory) gateway = AsyncMock() gateway.ensure.return_value = {"gateway_id": "gw-shared"} + monkeypatch.setattr( + service, + "GatewayCloud", + lambda _: SimpleNamespace( + available_zones=AsyncMock( + return_value=["cn-beijing-a", "cn-beijing-c"] + ) + ), + ) monkeypatch.setattr(service, "SharedAPIGService", lambda **kw: gateway) monkeypatch.setattr( service, "ensure_worker", AsyncMock(return_value="t-one") @@ -607,3 +642,131 @@ def test_effective_scaling_conflict_fails_before_provisioning(settings, source_v with pytest.raises(ConfigurationError, match="instance"): service.apply_runtime_settings(source_values, Runtime.model_validate(settings)) + + +@pytest.mark.asyncio +async def test_explicit_profile_account_mismatch_stops_before_role(monkeypatch): + from veadk.integrations.mpa.managed.config import load_studio_profile + + monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-model-key") + profile = load_studio_profile() + profile.values["account_id"] = "expected-account" + cloud = AsyncMock() + cloud.account_id.return_value = "different-account" + monkeypatch.setattr(service, "RuntimeCloud", lambda **kw: cloud) + role = AsyncMock() + identity = AsyncMock() + monkeypatch.setattr(service, "ensure_runtime_role", role) + monkeypatch.setattr(service, "ensure_workload_identity", identity) + stages = [] + with pytest.raises(DeploymentError, match="expected account"): + await service.provision( + profile, agent_id="mi-test", owner="user", progress=stages.append + ) + assert stages == ["checking"] + role.assert_not_awaited() + identity.assert_not_awaited() + + +@pytest.mark.parametrize("role", [None, "custom-role"]) +def test_fresh_template_role_trn_uses_verified_account_and_selected_role( + monkeypatch, role +): + from veadk.integrations.mpa.managed.config import load_studio_profile + + monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-model-key") + profile = load_studio_profile() + profile.values.update(pg_host="db.example", pg_user="test", pg_password="test") + profile.managed.runtime.role_name = role + selected_role = role or "IDRoleForArkClawShareAgent" + request = service.fresh_template(profile, "mi-123456789abc", "verified-account") + service.apply_runtime_settings(request, profile.managed.runtime) + env = service.env_map(request) + assert request["RoleName"] == selected_role + assert env["CLAW_SPACE_ID"] == "csi-verified-account" + assert env["RUNTIME_IAM_ROLE_NAME"] == selected_role + assert ( + env["RUNTIME_IAM_ROLE_TRN"] == f"trn:iam::verified-account:role/{selected_role}" + ) + profile.managed.runtime.env["RUNTIME_IAM_ROLE_TRN"] = "explicit-trn" + service.apply_runtime_settings(request, profile.managed.runtime) + assert service.env_map(request)["RUNTIME_IAM_ROLE_TRN"] == "explicit-trn" + + +@pytest.mark.asyncio +async def test_existing_runtime_keeps_network_when_new_standard_gateway_needs_companion( + monkeypatch, +): + import copy + + entry = Registry() + entry.row = {"runtime_id": "r-existing", "studio_owner": "owner"} + entry.network.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} + cloud = Cloud(entry) + original = template()["NetworkConfiguration"] + original["VpcConfiguration"]["EnableSharedInternetAccess"] = True + cloud.runtimes["r-existing"] = { + "RuntimeId": "r-existing", + "NetworkConfigurations": [ + {"NetworkType": "public"}, + { + "NetworkType": "private", + "VpcConfiguration": copy.deepcopy(original["VpcConfiguration"]), + }, + ], + } + profile = Profile( + region="cn-beijing", + values={}, + template=template(), + admin_url="fake", + shared_url="postgresql://registry.example/shared", + managed=Managed( + version=1, + runtime=Runtime(), + worker=Worker(existing_id="t-one"), + timeout_seconds=60, + ), + ) + gateway = AsyncMock() + gateway.ensure.return_value = {"gateway_id": "gw-one"} + deploy = AsyncMock(return_value={"runtime_id": "r-existing"}) + monkeypatch.setattr(service, "RuntimeCloud", lambda **kw: cloud) + monkeypatch.setattr(service, "AgentDeploymentRegistry", lambda _: entry) + monkeypatch.setattr(service, "AgentDatabaseProvisioner", lambda **kw: Databases()) + monkeypatch.setattr( + service, + "ensure_workload_identity", + AsyncMock( + return_value=SimpleNamespace( + workload_pool_name="pool", workload_identity_name="identity" + ) + ), + ) + monkeypatch.setattr(service, "ensure_worker", AsyncMock(return_value="t-one")) + monkeypatch.setattr( + service, + "GatewayCloud", + lambda _: SimpleNamespace( + available_zones=AsyncMock(return_value=["cn-beijing-a", "cn-beijing-c"]) + ), + ) + monkeypatch.setattr(service, "SharedAPIGService", lambda **kw: gateway) + monkeypatch.setattr( + service, "AgentRuntimeDeployer", lambda **kw: SimpleNamespace(deploy=deploy) + ) + await service.provision(profile, agent_id="mi-existing", owner="owner") + assert deploy.await_args is not None + assert ( + deploy.await_args.args[0]["NetworkConfiguration"]["VpcConfiguration"] + == original["VpcConfiguration"] + ) + assert gateway.ensure.await_args.kwargs["subnet_ids"] == [ + "subnet-one", + "subnet-auto", + ] + assert entry.network.row["subnet_ids"] == ["subnet-one", "subnet-auto"] + assert ( + cloud.runtimes["r-existing"]["NetworkConfigurations"][1]["VpcConfiguration"] + == original["VpcConfiguration"] + ) diff --git a/tests/integrations/mpa_managed/test_studio_shared_resources.py b/tests/integrations/mpa_managed/test_studio_shared_resources.py index 44a305f57..348b258db 100644 --- a/tests/integrations/mpa_managed/test_studio_shared_resources.py +++ b/tests/integrations/mpa_managed/test_studio_shared_resources.py @@ -47,7 +47,8 @@ async def test_studio_creates_missing_shared_resources_then_reuses_admin_registr ): monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-model-key") profile = load_studio_profile(region="cn-beijing") - profile.values["account_id"] = "account" + prepare_role = AsyncMock() + monkeypatch.setattr(service, "ensure_runtime_role", prepare_role) assert profile.managed.postgres is not None profile.managed.postgres.bootstrap_path = str(tmp_path / "bootstrap.sqlite3") pg = FakePG() @@ -59,6 +60,7 @@ async def test_studio_creates_missing_shared_resources_then_reuses_admin_registr network_entry = NetworkEntry() gateways = GatewayRegistry() gateway_cloud = GatewayCloud(account="account") + gateway_cloud.available_zones = AsyncMock(wraps=gateway_cloud.available_zones) scope = ("account", profile.region) if existing in {"network", "both"}: network_entry.row = {"vpc_id": "vpc-one", "subnet_ids": ["subnet-one"]} @@ -87,7 +89,12 @@ async def test_studio_creates_missing_shared_resources_then_reuses_admin_registr registry_urls = [] runtime_networks = [] expected_vpc = "vpc-auto" if existing == "none" else "vpc-one" - expected_subnet = "subnet-auto" if existing == "none" else "subnet-one" + expected_subnets = { + "none": ["subnet-auto", "subnet-auto-2"], + "network": ["subnet-one", "subnet-auto"], + "gateway": ["subnet-one"], + "both": ["subnet-one"], + }[existing] for agent_id in ("mi-000000000001", "mi-000000000002"): entry = Registry() entry.network = network_entry @@ -115,6 +122,13 @@ def database_factory(**kwargs): assert entry.row["business_workspace_id"] == "ws-2" runtime_networks.append(cloud.creates[0]["NetworkConfiguration"]) runtime_env = service.env_map(cloud.creates[0]) + assert prepare_role.await_args is not None + assert prepare_role.await_args.args[1] == "account" + assert runtime_env["CLAW_SPACE_ID"] == "csi-account" + assert runtime_env["RUNTIME_IAM_ROLE_NAME"] == "IDRoleForArkClawShareAgent" + assert runtime_env["RUNTIME_IAM_ROLE_TRN"] == ( + "trn:iam::account:role/IDRoleForArkClawShareAgent" + ) assert runtime_env["MPA_WORKLOAD_POOL_NAME"] == "agentkit-studio-workload" assert runtime_env["MPA_WORKLOAD_IDENTITY_NAME"] == f"{agent_id}-studio" runtime_registry = make_url(runtime_env["SHARED_APIG_DATABASE_URL"]) @@ -126,18 +140,23 @@ def database_factory(**kwargs): assert pg.created == 2 assert initialize_identity.await_count == 2 assert initialize.await_count == 2 + assert gateway_cloud.available_zones.await_count == ( + 0 if existing in {"gateway", "both"} else 1 + ) assert len(set(registry_urls)) == 1 assert make_url(registry_urls[0]).host == "ws-1.example" assert make_url(registry_urls[0]).database == "mpa_admin_db" assert network_entry.row["vpc_id"] == expected_vpc - assert network_entry.row["subnet_ids"] == [expected_subnet] + assert network_entry.row["subnet_ids"] == expected_subnets assert gateways.rows[scope]["vpc_id"] == expected_vpc assert gateways.rows[scope]["im_gateway_service_id"] == "service-1" assert gateways.rows[scope]["state"] == "ready" assert runtime_networks[0] == runtime_networks[1] assert runtime_networks[0]["VpcConfiguration"]["VpcId"] == expected_vpc assert [kind for kind, _ in network.calls] == ( - ["vpc", "subnet"] if existing == "none" else [] + ["vpc", "subnet", "subnet"] + if existing == "none" + else (["subnet"] if existing == "network" else []) ) assert ( gateway_cloud.created diff --git a/tests/integrations/mpa_managed/test_tasks.py b/tests/integrations/mpa_managed/test_tasks.py index f6272015c..4ec50f2f9 100644 --- a/tests/integrations/mpa_managed/test_tasks.py +++ b/tests/integrations/mpa_managed/test_tasks.py @@ -478,3 +478,37 @@ async def started(): pass asyncio.run(run()) + + +@pytest.mark.parametrize( + "key,expected", + [ + ("iamPermissionDenied", "iamPermissionDenied"), + ("private-provider-text", "creationFailed"), + ], +) +def test_only_allowlisted_iam_failure_keys_reach_ui(tmp_path, key, expected): + import json + + async def run(): + service = CreationTasks(tmp_path / "tasks.sqlite3") + events = [{"stage": "iam_role"}, {"error": key}] + code = ";".join( + f"print({'MPA_EVENT ' + json.dumps(event)!r})" for event in events + ) + service.command = lambda: [sys.executable, "-c", code + ";raise SystemExit(1)"] + payload = { + "requestId": "44444444-4444-4444-8444-444444444444", + "agentId": "mi-test", + "description": "", + "region": "cn-beijing", + } + task = await service.start("owner", payload, config_path="unused", timeout=60) + await asyncio.gather(*service.running.values()) + result = service.get("owner", task["taskId"]) + assert result["state"] == "failed" + assert result["stage"] == "iam_role" + assert result["error"] == expected + await service.close() + + asyncio.run(run()) diff --git a/tests/integrations/mpa_managed/test_worker.py b/tests/integrations/mpa_managed/test_worker.py index c6086baf2..7d0068b93 100644 --- a/tests/integrations/mpa_managed/test_worker.py +++ b/tests/integrations/mpa_managed/test_worker.py @@ -20,7 +20,8 @@ import pytest from tests.integrations.mpa_managed.test_agent_deployment import Registry -from veadk.integrations.mpa.managed.config import Worker +from veadk.integrations.mpa.managed.config import Worker, load_studio_profile +from veadk.integrations.mpa.managed.config import ConfigurationError from veadk.integrations.mpa.managed.database import DeploymentError, agent_suffix from veadk.integrations.mpa.managed.worker import ( WorkerCloud, @@ -29,6 +30,109 @@ ) +def test_studio_worker_creation_needs_no_reference_in_new_account(monkeypatch): + monkeypatch.setenv("VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY", "test-model-key") + profile = load_studio_profile() + + async def run(): + cloud = AsyncMock() + cloud.get.side_effect = AssertionError("unexpected reference lookup") + cloud.find.return_value = [] + cloud.create.side_effect = DeploymentError("request captured") + registry = Registry() + with pytest.raises(DeploymentError, match="request captured"): + await ensure_worker( + registry, + cloud, + profile.managed.worker, + account="new-account", + region="cn-beijing", + agent_id="mi-new-agent", + ) + cloud.get.assert_not_awaited() + request = cloud.create.call_args.args[0] + env = {item["Key"]: item["Value"] for item in request["Envs"]} + assert env == {"MPA_AGENT_ID": "mi-new-agent"} + assert request["Port"] == 8000 + assert request["ImageUrl"] == profile.managed.worker.image + assert request["RoleName"] == profile.managed.worker.role_name + assert "test-model-key" not in json.dumps(request) + assert "Envs" not in registry.row + assert "env" not in registry.row + assert "MPA_AGENT_ID" not in profile.managed.worker.env + + asyncio.run(run()) + + +def test_worker_explicit_environment_overrides_reference_without_mutation(): + async def run(): + source = { + "Envs": [ + {"Key": "SETTING", "Value": "inherited"}, + {"Key": "KEEP", "Value": "keep"}, + {"Key": "MPA_AGENT_ID", "Value": "old-agent"}, + {"Key": "FEISHU_APP_SECRET", "Value": "old-secret"}, + {"Key": "SHARED_APIG_DATABASE_URL", "Value": "old-control-url"}, + ] + } + before = json.dumps(source) + cloud = AsyncMock() + cloud.get.return_value = source + cloud.find.return_value = [] + cloud.create.side_effect = DeploymentError("request captured") + options = Worker( + image="worker:v1", reference_id="t-reference", env={"SETTING": "explicit"} + ) + with pytest.raises(DeploymentError, match="request captured"): + await ensure_worker( + Registry(), cloud, options, account="a", region="r", agent_id="agent" + ) + cloud.get.assert_awaited_once_with("t-reference") + request = cloud.create.call_args.args[0] + assert {item["Key"]: item["Value"] for item in request["Envs"]} == { + "SETTING": "explicit", + "KEEP": "keep", + "MPA_AGENT_ID": "agent", + } + assert options.env == {"SETTING": "explicit"} + assert json.dumps(source) == before + + asyncio.run(run()) + + +def test_unfinished_worker_environment_preserves_token_and_rejects_changes(): + async def run(): + registry = Registry() + cloud = AsyncMock() + cloud.find.return_value = [] + cloud.create.side_effect = DeploymentError("response lost") + options = Worker(image="worker:v1", env={"SETTING": "original"}) + for _ in range(2): + with pytest.raises(DeploymentError, match="response lost"): + await ensure_worker( + registry, cloud, options, account="a", region="r", agent_id="agent" + ) + assert cloud.create.call_args_list[0] == cloud.create.call_args_list[1] + cloud.reset_mock() + token, digest = registry.row["worker_token"], registry.row["worker_hash"] + with pytest.raises(DeploymentError, match="configuration changed"): + await ensure_worker( + registry, + cloud, + Worker(image="worker:v1", env={"SETTING": "changed"}), + account="a", + region="r", + agent_id="agent", + ) + cloud.find.assert_not_awaited() + cloud.create.assert_not_awaited() + assert registry.row["worker_token"] == token + assert registry.row["worker_hash"] == digest + assert "original" not in json.dumps(registry.row) + + asyncio.run(run()) + + @pytest.mark.parametrize("agent_id", ["mi-example-id", " mi-example-id "]) def test_new_worker_uses_agent_derived_name(agent_id): async def run(): @@ -57,6 +161,215 @@ async def run(): asyncio.run(run()) +@pytest.mark.parametrize("name", [" Support-Agent_01 ", "a" * 64]) +def test_named_worker_preserves_entered_name_and_internal_bindings(name): + async def run(): + cloud = AsyncMock() + cloud.find.return_value = [] + cloud.create.side_effect = DeploymentError("request captured") + registry = Registry() + with pytest.raises(DeploymentError, match="request captured"): + await ensure_worker( + registry, + cloud, + Worker(image="worker:v1"), + account="a", + region="r", + agent_id="mi-internal", + runtime_name=name, + ) + request = cloud.create.call_args.args[0] + assert request["Name"] == name.strip() + cloud.find.assert_awaited_once_with(name.strip()) + assert registry.row["worker_name"] == name.strip() + assert {item["Key"]: item["Value"] for item in request["Envs"]} == { + "MPA_AGENT_ID": "mi-internal", + } + assert {item["Key"]: item["Value"] for item in request["Tags"]}[ + "mpa_agent_key" + ] == agent_suffix("a", "r", "mi-internal") + + asyncio.run(run()) + + +@pytest.mark.parametrize("name", ["abc", "a" * 65, "bad/name", "中文名称"]) +def test_invalid_worker_name_fails_before_cloud_calls(name): + async def run(): + cloud = AsyncMock() + with pytest.raises(ConfigurationError): + await ensure_worker( + Registry(), + cloud, + Worker(image="worker:v1"), + account="a", + region="r", + agent_id="mi-internal", + runtime_name=name, + ) + cloud.get.assert_not_awaited() + cloud.find.assert_not_awaited() + cloud.create.assert_not_awaited() + + asyncio.run(run()) + + +@pytest.mark.parametrize("previous_name", ["mi_internal", "mpa_worker_hash"]) +@pytest.mark.parametrize("discovered", [False, True]) +@pytest.mark.parametrize("changed_image", [False, True]) +def test_named_worker_replays_pre_upgrade_name( + previous_name, discovered, changed_image +): + async def run(): + from tests.integrations.mpa_managed.test_worker_recovery import ready + + registry = Registry() + cloud = AsyncMock() + cloud.find.return_value = [] + cloud.create.side_effect = DeploymentError("response lost") + options = Worker(image="worker:v1") + with pytest.raises(DeploymentError, match="response lost"): + await ensure_worker( + registry, + cloud, + options, + account="a", + region="r", + agent_id="agent", + runtime_name="Support-Agent_01", + ) + previous = dict(cloud.create.call_args.args[0]) + token = previous.pop("ClientToken") + previous["Name"] = ( + "agent" + if previous_name == "mi_internal" + else "mpa_worker_" + agent_suffix("a", "r", "agent") + ) + registry.row.pop("worker_name") + registry.row["worker_hash"] = hashlib.sha256( + json.dumps(previous, sort_keys=True).encode() + ).hexdigest() + cloud.reset_mock() + cloud.find.return_value = [ready()] if discovered else [] + cloud.create.side_effect = None + cloud.create.return_value = "t-test" + cloud.get.return_value = ready() + if changed_image: + with pytest.raises(DeploymentError, match="configuration changed"): + await ensure_worker( + registry, + cloud, + Worker(image="worker:v2"), + account="a", + region="r", + agent_id="agent", + runtime_name="Support-Agent_01", + ) + cloud.find.assert_not_awaited() + cloud.create.assert_not_awaited() + else: + if not discovered: + cloud.create.side_effect = DeploymentError("response lost") + for _ in range(2): + with pytest.raises(DeploymentError, match="response lost"): + await ensure_worker( + registry, + cloud, + options, + account="a", + region="r", + agent_id="agent", + runtime_name="Support-Agent_01", + ) + assert cloud.create.call_args.args[0] == { + **previous, + "ClientToken": token, + } + assert "worker_name" not in registry.row + cloud.reset_mock() + cloud.create.side_effect = None + assert ( + await ensure_worker( + registry, + cloud, + options, + account="a", + region="r", + agent_id="agent", + runtime_name="Support-Agent_01", + ) + == "t-test" + ) + cloud.find.assert_awaited_once_with(previous["Name"]) + if discovered: + cloud.create.assert_not_awaited() + else: + cloud.create.assert_awaited_once_with( + {**previous, "ClientToken": token} + ) + assert registry.row["worker_token"] == token + + asyncio.run(run()) + + +def test_named_pending_worker_retries_exact_request_and_rejects_name_change(): + async def run(): + registry = Registry() + cloud = AsyncMock() + cloud.find.return_value = [] + cloud.create.side_effect = DeploymentError("response lost") + for _ in range(2): + with pytest.raises(DeploymentError, match="response lost"): + await ensure_worker( + registry, + cloud, + Worker(image="worker:v1"), + account="a", + region="r", + agent_id="mi-internal", + runtime_name="Support-Agent_01", + ) + assert cloud.create.call_args_list[0] == cloud.create.call_args_list[1] + token, digest = registry.row["worker_token"], registry.row["worker_hash"] + cloud.reset_mock() + for name in ["changed-name", "mi_internal", ""]: + with pytest.raises(DeploymentError, match="configuration changed"): + await ensure_worker( + registry, + cloud, + Worker(image="worker:v1"), + account="a", + region="r", + agent_id="mi-internal", + runtime_name=name, + ) + cloud.find.assert_not_awaited() + cloud.create.assert_not_awaited() + assert registry.row["worker_token"] == token + assert registry.row["worker_hash"] == digest + + asyncio.run(run()) + + +def test_unrelated_tool_with_entered_name_is_not_adopted(): + async def run(): + cloud = AsyncMock() + cloud.find.return_value = [{"ToolId": "t-unrelated", "Name": "support-agent"}] + with pytest.raises(DeploymentError, match="name collision"): + await ensure_worker( + Registry(), + cloud, + Worker(image="worker:v1"), + account="a", + region="r", + agent_id="mi-internal", + runtime_name="support-agent", + ) + cloud.create.assert_not_awaited() + cloud.get.assert_not_awaited() + + asyncio.run(run()) + + @pytest.mark.parametrize("discovered", [False, True]) @pytest.mark.parametrize("changed_image", [False, True]) def test_unfinished_legacy_worker_retains_request_and_token(discovered, changed_image): @@ -76,6 +389,7 @@ async def run(): previous_request = dict(cloud.create.call_args.args[0]) token = previous_request.pop("ClientToken") previous_request["Name"] = "mpa_worker_" + agent_suffix("a", "r", "agent") + registry.row.pop("worker_name") registry.row["worker_hash"] = hashlib.sha256( json.dumps(previous_request, sort_keys=True).encode() ).hexdigest() @@ -128,7 +442,13 @@ async def run(): ) assert ( await ensure_worker( - registry, cloud, options, account="a", region="r", agent_id="agent" + registry, + cloud, + options, + account="a", + region="r", + agent_id="agent", + runtime_name="Support-Agent_01", ) == "t-test" ) diff --git a/veadk/cli/frontend_deploy_policy.py b/veadk/cli/frontend_deploy_policy.py index 6a122459c..2c03649d3 100644 --- a/veadk/cli/frontend_deploy_policy.py +++ b/veadk/cli/frontend_deploy_policy.py @@ -69,6 +69,7 @@ "apig:ListGateways", "apig:CreateGateway", "apig:GetGateway", + "apig:GetGatewayAvailableZones", "apig:CreateIMChannelGateway", "apig:GetIMChannelGatewayStatus", "apmplus_server:CreateOrder", @@ -125,6 +126,7 @@ "iam:AttachRolePolicy", "iam:CheckServiceLinkedRole", "iam:CreateRole", + "iam:CreatePolicy", "iam:CreateServiceLinkedRole", "iam:DeleteRole", "iam:DetachRolePolicy", diff --git a/veadk/integrations/mpa/managed/README.md b/veadk/integrations/mpa/managed/README.md index 867714f24..889daa7f5 100644 --- a/veadk/integrations/mpa/managed/README.md +++ b/veadk/integrations/mpa/managed/README.md @@ -49,12 +49,23 @@ Gateway resources are created and saved before Runtime deployment. Later agents reuse the same records. Account locks and saved creation intents protect concurrent requests and retries from duplicate creation. +New gateways use the standard type with two 1c2g nodes, small_1 CLB, public/private +access and traffic billing. Deployment credentials need `apig:GetGatewayAvailableZones`. +The service queries APIG-supported zones and reuses or creates two same-VPC subnets +in different supported zones; missing companions have independently persisted +requests/tokens. Existing registered/adopted gateways and Runtime network selections +are preserved. New Runtimes use the prepared selection. `ExceededQuota` is a definite +rejection and permits retry after correction; unknown outcomes still require +discovery. Historical unknown flags require an audited, scoped repair. + Existing records are retained, including previously adopted resources. This change does not move existing agents or replace an exhausted VPC. A quota or permission error remains a failure; increasing quota or migrating the shared network is a separate operation. Restart local Studio (or redeploy cloud Studio) to load the updated defaults. Explicit CLI network/APIG adoption remains supported. +Runtime subnet IDs may be returned in a different order by AgentKit. An identical unique selection is accepted during creation and retry; real membership/VPC/shared-egress changes remain migration errors. Retry preserves the original requested or matching registered order, including existing pending request hashes. After updating VeADK, use the same agent ID and original inputs to resume a task stopped by this ordering mismatch; do not delete records or recreate resources. + ## CLI YAML and manual / legacy server setup 1. Copy the [example YAML](../../../../prd-spec/features/mpa-agent-oneclick-provision/mpa-create.config.example.yaml) to a private `mpa-create.config.yaml`. Keep filled-in configuration outside Git. @@ -229,4 +240,34 @@ Flat creation defaults to `ENABLE_A2A=true` and `DISABLE_JWT_AUTH=true`. The inn ### Managed sandbox template naming -New managed sandbox templates use the trimmed agent ID with every `-` replaced by `_` (for example, `mi-example` → `mi_example`). Existing worker IDs remain authoritative and are never renamed. A pre-change unfinished creation intent retains its hashed name only when the complete legacy request matches the persisted worker_hash; its ClientToken is preserved. Other payload changes and unrelated same-name resources remain errors. Scoped ownership tags and Runtime ToolId bindings are unchanged. +New named Studio requests use the entered, validated Runtime name unchanged as the sandbox template Name (4–64 ASCII letters, digits, hyphens or underscores). Legacy CLI requests without a name still use the trimmed agent ID with `-` replaced by `_`. Internal agent IDs, database/Skill Space/channel identities, scoped ownership tags and Runtime ToolId bindings are unchanged. Existing worker IDs are authoritative and are never renamed. New pending intents persist `worker_name` in deployment JSON and reject later name changes. Older pending intents without that field replay a normalized-ID or hashed name only when the complete candidate payload matches the persisted worker_hash, preserving ClientToken. Other payload changes and unrelated same-name resources remain errors. + +### Automatic MPA runtime role + +Built-in Studio prepares `IDRoleForArkClawShareAgent` in the verified deployment account before preparing resources. It reuses a compatible role and adds missing approved policy bindings; it never replaces trust or policy contents. Explicit CLI profiles default to `managed.iam.mode: existing`; `auto` opts in for fresh default-role configurations only. See the [permission baseline and recovery rules](../../../../prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.md). The Studio execution role needs `iam:CreatePolicy` in addition to GetRole/CreateRole/GetPolicy/ListAttachedRolePolicies/AttachRolePolicy. Redeploy or update an existing Studio execution policy before using this capability. Retry the same agent ID after administrator repair; cancellation retains shared IAM resources. + +### Deployment account in Studio + +Studio uses the account returned by deployment-credential STS verification; it no longer requires the original image-registry account. Role TRN and compatibility Space ID for a fresh Runtime use the verified account. Explicit YAML `account-id` still restricts CLI deployments. Default image URLs and Worker reference IDs are unchanged; ensure the deployment account can access them or supply accessible resources. Existing Runtimes are not automatically migrated. + +Managed network descriptions use the provider-compatible `mpa-account-network-v1-`. Retry automatically corrects a legacy description-only intent after a definite rejection when no resource exists; changed payloads receive a new token. Existing scoped resources are retained. Uncertain outcomes require discovery and never trigger a duplicate create. + +### Worker without a reference template + +Built-in Studio uses startup settings supplied by the configured Worker image, without duplicate port/mode/directory environment entries; it no longer reads a Tool from the previous account. The image must still be accessible to the deployment account. Restart Studio to load changed defaults, then retry an agent that failed before Worker creation. Already dispatched requests retain their original payload/token; do not reset their registry intent. + +For a private CLI profile, configure startup values directly: + +```yaml +managed: + worker: + image: registry.example/agentkit/mpa_codex_worker:release-tag + env: + MPA_RUNTIME_PROFILE: codex-headless + MPA_AIO_ENTRYPOINT_MODE: minimal + CUSTOM_SETTING: ${WORKER_CUSTOM_SETTING} +``` + +`managed.worker.env` accepts uppercase string keys and whole server environment references. It overrides filtered environment values from an optional accessible `reference-id`. Agent/Runtime/Tool/Skill Space bindings, inherited channel/Runtime credentials and control database URLs are reserved. A missing explicit reference remains an error. Environment settings with `existing-id` are rejected because existing Tools are not updated. Secrets do not enter config summaries/repr or deployment records; use server references rather than committing values. Model credentials are delivered per session by Runtime, not copied from the old Tool. + +New named MPA deployments use `Skills for MPA agent ` as the Skill Space description, so the entered name is visible in the cloud console. The generated space Name, display_name tag, internal agent ID and bindings stay unchanged. Existing spaces keep their descriptions; pre-upgrade pending requests recover their exact original description, while other input changes remain errors. Calls without a Runtime name retain the internal-ID description. diff --git a/veadk/integrations/mpa/managed/README.zh.md b/veadk/integrations/mpa/managed/README.zh.md index 4df50fc05..77343e615 100644 --- a/veadk/integrations/mpa/managed/README.zh.md +++ b/veadk/integrations/mpa/managed/README.zh.md @@ -47,10 +47,19 @@ Studio 不固定已有 VPC/子网/APIG ID。准备 PostgreSQL 后,按核验后 在部署 Runtime 前创建并保存,后续智能体复用相同记录。账号锁和持久化创建意图 保护并发请求及重试,避免重复创建。 +新网关采用标准型、两个 1c2g 节点、small_1 CLB、公私网接入和 traffic 计费。 +部署凭据需要 `apig:GetGatewayAvailableZones`。服务查询 APIG 支持的可用区, +复用或创建同 VPC、不同受支持可用区的两个子网;缺失的伴随子网独立保存请求/token。 +保留已有登记/接管网关和 Runtime 网络选择,新 Runtime 使用准备好的子网。 +`ExceededQuota` 是明确拒绝,修正后可重试;未知结果仍须先查询恢复。 +历史未知标记需经过审计、限定范围后修复。 + 已有记录(包括此前接管的资源)保持不变。本次不迁移已有智能体,也不替换配额 耗尽的 VPC。配额或权限错误仍报告失败;提高配额或迁移共享网络属于独立操作。 重启本地 Studio(云端则重新部署)后加载新默认配置。CLI 显式网络/APIG 接管仍受支持。 +AgentKit 返回的 Runtime 子网 ID 顺序可能不同。创建和重试接受成员相同且无重复的选择;实际成员、VPC 或共享公网出口变化仍视为迁移错误。重试保留原请求或成员一致的注册顺序,包括已有待完成请求的哈希。更新 VeADK 后,对因顺序误判停止的任务使用同一智能体 ID 和原始输入重试即可;不要删除记录或重建资源。 + ## CLI YAML 与手动 / 旧模式服务端配置 1. 复制[示例 YAML](../../../../prd-spec/features/mpa-agent-oneclick-provision/mpa-create.config.example.yaml) 到私有的 `mpa-create.config.yaml`。填写后的配置不要进入 Git。 @@ -225,4 +234,34 @@ Flat 创建默认设置 `ENABLE_A2A=true` 和 `DISABLE_JWT_AUTH=true`。绕过 ### 托管沙箱模板命名 -新托管沙箱模板使用去掉两端空白、将所有 `-` 替换为 `_` 的智能体 ID(例如 `mi-example` → `mi_example`)。已有 worker ID 仍为权威绑定,不重命名。变更前未完成的创建意图,仅在完整旧请求与已存 worker_hash 匹配时保留哈希名称,并保留 ClientToken。其他请求变更和无关同名资源仍报错。作用域所有权标签及 Runtime ToolId 绑定不变。 +新的 Studio 名称请求直接使用经过校验的手填 Runtime 名称作为沙箱模板 Name(4–64 个 ASCII 字母、数字、连字符或下划线)。未提供名称的旧 CLI 请求仍使用去除首尾空白、将 `-` 替换为 `_` 的智能体 ID。内部智能体 ID、数据库/技能空间/渠道标识、作用域归属标签及 Runtime ToolId 绑定不变。已有 worker ID 为权威绑定,不重命名。新的未完成意图在部署 JSON 中保存 `worker_name`,拒绝后续名称变化。没有该字段的旧意图,仅在完整候选请求与已存 worker_hash 匹配时重放标准化 ID 名称或哈希名称,保留 ClientToken。其他请求变化及无关同名资源仍报错。 + +### 自动准备 MPA 运行角色 + +内置 Studio 在准备资源之前,在核验的部署账号下准备 `IDRoleForArkClawShareAgent`。复用兼容角色并补齐已批准策略绑定,不替换信任或策略内容。显式 CLI 配置默认 `managed.iam.mode: existing`;仅全新默认角色配置可通过 `auto` 启用。参见[权限基线与恢复规则](../../../../prd-spec/features/mpa-runtime-iam/2026-10-09-managed-runtime-role.zh.md)。Studio 执行角色除 GetRole/CreateRole/GetPolicy/ListAttachedRolePolicies/AttachRolePolicy 外,还需 `iam:CreatePolicy`。使用此能力前,重新部署或更新已有 Studio 执行策略。管理员修复后以同一智能体 ID 重试;取消保留共享 IAM 资源。 + +### Studio 部署账号 + +Studio 使用部署凭据经 STS 核验返回的账号,不再要求原镜像仓库账号。新建 Runtime 的角色 TRN 和兼容 Space ID 使用核验账号。显式 YAML 的 `account-id` 仍限制 CLI 部署。默认镜像 URL 和 Worker 参考 ID 保持不变;请确保部署账号可访问它们,或提供可访问的资源。现有 Runtime 不自动迁移。 + +托管网络描述使用符合服务商格式的 `mpa-account-network-v1-`。旧意图仅描述不同且明确被拒绝、无资源时,重试自动修正;变化的请求体使用新 token。保留已有范围资源。结果不确定时必须先查询,不触发重复创建。 + +### 不依赖参考模板的 Worker + +内置 Studio 使用已配置 Worker 镜像提供的启动设置,不重复注入端口/模式/目录环境变量,不再读取旧账号的 Tool。部署账号仍须有镜像访问权限。重启 Studio 加载修改后的默认值,再重试尚未开始 Worker 创建就失败的智能体。已发送请求保留原载荷/token;不要重置注册库中的意图。 + +私有 CLI 配置可以直接指定启动值: + +```yaml +managed: + worker: + image: registry.example/agentkit/mpa_codex_worker:release-tag + env: + MPA_RUNTIME_PROFILE: codex-headless + MPA_AIO_ENTRYPOINT_MODE: minimal + CUSTOM_SETTING: ${WORKER_CUSTOM_SETTING} +``` + +`managed.worker.env` 接受大写字符串键及完整服务端环境变量引用,覆盖可选且可访问 `reference-id` 中已过滤的环境设置。智能体/Runtime/Tool/技能空间绑定、继承的渠道/Runtime 凭据及控制库地址为保留字段。显式参考模板缺失仍报错。`existing-id` 不允许环境设置,因为不会更新已有 Tool。密钥不进入配置摘要/repr 或部署记录;使用服务端引用,不提交实际值。模型凭据由 Runtime 按会话下发,不从旧 Tool 复制。 + +新的名称 MPA 部署使用 `Skills for MPA agent ` 作为技能空间描述,便于在云控制台辨认手填名称。生成的空间 Name、display_name 标签、内部智能体 ID 及绑定保持不变。已有空间保留原描述;升级前待完成请求按原描述准确恢复,其他输入变化仍报错。不提供 Runtime 名称的调用保留内部 ID 描述。 diff --git a/veadk/integrations/mpa/managed/config.py b/veadk/integrations/mpa/managed/config.py index 1b17b7ad7..59e1026e0 100644 --- a/veadk/integrations/mpa/managed/config.py +++ b/veadk/integrations/mpa/managed/config.py @@ -40,6 +40,22 @@ ADMIN_DATABASE_NAME = "mpa_admin_db" ADMIN_WORKSPACE_NAME = "mpa_admin_workspace" +WORKER_RESERVED_ENV_KEYS = frozenset( + { + "MPA_AGENT_ID", + "AGENTKIT_RUNTIME_ID", + "AGENTKIT_TOOL_ID", + "AGENTKIT_TOOL_REGION", + "SKILL_SPACE_ID", + "CODEX_MCP_RUNTIME_API_KEY", + "A2A_PUBLIC_URL", + "FEISHU_APP_ID", + "FEISHU_APP_SECRET", + "CHANNEL_STATE_ENCRYPTION_KEY", + "DEPLOYMENT_DATABASE_ADMIN_URL", + "SHARED_APIG_DATABASE_URL", + } +) STUDIO_MPA_IDENTITY_FIELDS = ( ("VEADK_STUDIO_MPA_USER_POOL_NAME", "user_pool_name", "MPA_USER_POOL_NAME"), ( @@ -197,6 +213,7 @@ class Worker(Options): image: str = "" reference_id: str = "" role_name: str = "IDRoleForArkClawShareAgent" + env: dict[str, str] = Field(default_factory=dict, repr=False) tos_access_key: str = Field(default="", repr=False) tos_secret_key: str = Field(default="", repr=False) tos_bucket: str = "" @@ -210,6 +227,17 @@ def tos_mount_enabled(self) -> bool: def strip_tos_values(cls, value: str) -> str: return value.strip() + @field_validator("env") + @classmethod + def validate_environment(cls, value: dict[str, str]) -> dict[str, str]: + if any( + not re.fullmatch(r"[A-Z_][A-Z0-9_]*", key) + or key in WORKER_RESERVED_ENV_KEYS + for key in value + ): + raise ValueError("Invalid or provisioner-owned worker environment key") + return value + @model_validator(mode="after") def validate_source(self): if bool(self.existing_id) == bool(self.image): @@ -219,6 +247,8 @@ def validate_source(self): raise ValueError("TOS access key, secret key, and bucket are all required") if self.existing_id and all(tos_values): raise ValueError("TOS mount settings require a newly created worker") + if self.existing_id and self.env: + raise ValueError("Environment settings require a newly created worker") return self @@ -317,11 +347,16 @@ def distinct_workspaces(self): return self +class Iam(Options): + mode: Literal["existing", "auto"] = "existing" + + class Managed(Options): version: Literal[1] database_admin_url_env: str = "DEPLOYMENT_DATABASE_ADMIN_URL" shared_database_url_env: str = "SHARED_APIG_DATABASE_URL" postgres: PostgresWorkspaces | None = None + iam: Iam = Field(default_factory=Iam) credential_file: str = "" from_runtime: str = "" template_file: str = "" @@ -335,6 +370,17 @@ class Managed(Options): def validate_source(self): if self.from_runtime and self.template_file: raise ValueError("Choose one template source") + if self.iam.mode == "auto": + from .iam import ROLE_NAME + + if ( + self.from_runtime + or self.template_file + or self.worker.existing_id + or self.worker.role_name != ROLE_NAME + or self.runtime.role_name not in (None, ROLE_NAME) + ): + raise ValueError("Automatic IAM requires fresh default MPA roles") return self @@ -597,6 +643,8 @@ def load_profile(path: str | Path | None, *, region: str = "") -> Profile: worker_values = managed_values.get("worker") if isinstance(worker_values, dict): worker_values = dict(worker_values) + if "env" in worker_values: + worker_values["env"] = _resolve(worker_values["env"]) flat_tos = _resolve( { key: values.get(key, "") diff --git a/veadk/integrations/mpa/managed/diagnostics.py b/veadk/integrations/mpa/managed/diagnostics.py index 484b8962d..1e0fc0097 100644 --- a/veadk/integrations/mpa/managed/diagnostics.py +++ b/veadk/integrations/mpa/managed/diagnostics.py @@ -17,15 +17,15 @@ from __future__ import annotations import asyncio +import logging from collections.abc import Awaitable, Callable, Iterator from contextlib import contextmanager from contextvars import ContextVar -import logging from typing import TypeVar +import requests from agentkit.auth.errors import AuthError, NetworkError from agentkit.toolkit.errors import ApiError -import requests from .database import DeploymentError @@ -90,6 +90,12 @@ "RequestTimeout": "timeout", } DEPLOYMENT_CATEGORIES = { + "iamPermissionDenied": "permission", + "iamTrustConflict": "ownership", + "iamPolicyConflict": "ownership", + "iamOwnershipConflict": "ownership", + "iamVerificationFailed": "resource_failed", + "iamConfigurationConflict": "configuration_changed", "Worker ownership metadata is incomplete": "metadata_missing", "Worker ownership does not match this agent": "ownership", "Worker is missing or belongs to another project": "ownership", diff --git a/veadk/integrations/mpa/managed/gateway.py b/veadk/integrations/mpa/managed/gateway.py index 7a0ea70bc..df107d4b1 100644 --- a/veadk/integrations/mpa/managed/gateway.py +++ b/veadk/integrations/mpa/managed/gateway.py @@ -91,6 +91,7 @@ async def ensure( "AccessDenied", "Unauthorized", "LimitExceeded", + "ExceededQuota", ) ): record["create_requested"] = False @@ -154,6 +155,7 @@ async def ensure( "AccessDenied", "Unauthorized", "LimitExceeded", + "ExceededQuota", ) ): record["im_create_requested"] = False diff --git a/veadk/integrations/mpa/managed/gateway_cloud.py b/veadk/integrations/mpa/managed/gateway_cloud.py index 3500077cc..2c8c4cac7 100644 --- a/veadk/integrations/mpa/managed/gateway_cloud.py +++ b/veadk/integrations/mpa/managed/gateway_cloud.py @@ -111,18 +111,45 @@ async def find_gateways(self, name): return matches raise APIGClientError("Gateway pagination exceeded limit") + async def available_zones(self): + result = await self.call("GetGatewayAvailableZones", {}) + zones = result.get("AvailableZones") + if ( + not isinstance(zones, list) + or any( + not isinstance(zone, str) + or not zone.startswith(self.runtime.region + "-") + or not zone[len(self.runtime.region) + 1 :] + for zone in zones + ) + or len(set(zones)) != len(zones) + or len(zones) < 2 + ): + raise APIGClientError("Invalid APIG available zones") + return sorted(zones) + async def create_gateway(self, name, vpc_id, subnet_ids): + if ( + not isinstance(subnet_ids, list) + or any(not isinstance(sid, str) or not sid.strip() for sid in subnet_ids) + or len(set(subnet_ids)) != len(subnet_ids) + or len(subnet_ids) < 2 + ): + raise APIGClientError( + "Standard gateway requires at least two distinct subnet IDs", + code="InvalidSubnetConfiguration", + ) result = await self.call( "CreateGateway", { "Name": name, "Region": self.runtime.region, - "Type": "serverless", + "Type": "standard", "NetworkSpec": {"VpcId": vpc_id, "SubnetIds": subnet_ids}, "ResourceSpec": { "Replicas": 2, "InstanceSpecCode": "1c2g", - "ClbSpecCode": "small_1", + "CLBSpecCode": "small_1", "PublicNetworkBillingType": "traffic", "NetworkType": { "EnablePublicNetwork": True, diff --git a/veadk/integrations/mpa/managed/iam.py b/veadk/integrations/mpa/managed/iam.py new file mode 100644 index 000000000..38958c4b2 --- /dev/null +++ b/veadk/integrations/mpa/managed/iam.py @@ -0,0 +1,332 @@ +# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""Additively prepare the approved account-scoped MPA execution role.""" + +from __future__ import annotations + +import asyncio +import json +import time + +from .database import DeploymentError +from .diagnostics import classify_error + +ROLE_NAME = "IDRoleForArkClawShareAgent" +POLICY_NAME = "VeADKMPARuntimeAccessV1" +SYSTEM_POLICIES = ( + "AgentKitSkillsSandboxAccess", + "AgentKitToolAccess", + "LLMShieldProtectSdkAccess", + "Mem0ReadOnlyAccess", + "AgentKitRuntimeAccess", + "AgentKitTosAccess", + "CloudControlReadOnlyAccess", + "TorchlightApiFullAccess", + "IDReadOnlyAccess", + "VikingdbFullAccess", + "APMPlusServerDataExportRolePolicy", + "AgentKitReadOnlyAccess", +) +ACTIONS = ( + "arkclaw:ListResources", + "arkclaw:GetMpaInstanceConf", + "apig:ListGateways", + "apig:GetGateway", + "apig:CreateGateway", + "apig:CreateIMChannelGateway", + "apig:GetIMChannelGatewayStatus", + "apig:CreateUpstream", + "apig:CreateRoute", + "agentkit:DeleteSession", + "agentkit:PauseSession", + "agentkit:ResumeSession", + "agentkit:SetSessionTtl", + "agentkit:CreateSessionSnapshot", +) +POLICY_DOCUMENT = { + "Statement": [{"Effect": "Allow", "Action": list(ACTIONS), "Resource": ["*"]}] +} +TRUST_DOCUMENT = { + "Statement": [ + { + "Effect": "Allow", + "Action": ["sts:AssumeRole"], + "Principal": {"Service": ["vefaas", "apig"]}, + } + ] +} +ERROR_KEYS = frozenset( + { + "iamPermissionDenied", + "iamTrustConflict", + "iamPolicyConflict", + "iamOwnershipConflict", + "iamVerificationFailed", + "iamConfigurationConflict", + } +) +PERMISSION_CODES = { + "AccessDenied", + "Forbidden", + "Unauthorized", + "InvalidAccessKeyId", + "SignatureDoesNotMatch", + "InvalidToken", + "ExpiredToken", +} +TRANSIENT_CODES = { + "Throttling", + "ThrottlingException", + "TooManyRequests", + "RequestLimitExceeded", + "InternalError", + "ServiceUnavailable", + "InternalServerError", + "RequestTimeout", +} +KNOWN_CODES = ( + PERMISSION_CODES + | TRANSIENT_CODES + | { + "RoleNotExist", + "PolicyNotExist", + "RoleAlreadyExists", + "PolicyAlreadyExist", + "PolicyAttachConflict", + } +) + + +class IamError(DeploymentError): + """Only safe keys and recognized error codes survive the SDK boundary.""" + + def __init__(self, code: str = "", *, key: str = "iamVerificationFailed"): + self.code = code if code in KNOWN_CODES else "" + self.key = ( + "iamPermissionDenied" + if self.code in PERMISSION_CODES + else (key if key in ERROR_KEYS else "iamVerificationFailed") + ) + super().__init__(self.key) + + +class IamCloud: + def __init__(self, runtime): + self.runtime = runtime + + async def call(self, method: str, **params): + def run(): + from volcengine.iam.IamService import IamService + + client = None + try: + credential = self.runtime._credentials() + # IamService.__new__ is a singleton: bypass it to prevent concurrent + # deployments from replacing each other's credentials/session. + client = object.__new__(IamService) + IamService.__init__(client) + client.set_ak(credential.access_key_id) + client.set_sk(credential.secret_access_key) + client.set_session_token(credential.session_token) + client.set_scheme("https") + client.set_connection_timeout(5) + client.set_socket_timeout(5) + response = getattr(client, method)(params) + except Exception as error: + code = "" + try: + envelope = json.loads(str(error)) + code = ( + envelope.get("ResponseMetadata", {}) + .get("Error", {}) + .get("Code", "") + ) + except (ValueError, AttributeError, TypeError): + pass + if classify_error(error) == "permission": + code = "AccessDenied" + raise IamError(code) from None + finally: + if client is not None and hasattr(client, "session"): + client.session.close() + if not isinstance(response, dict): + raise IamError() + error = response.get("ResponseMetadata", {}).get("Error") + if error: + raise IamError(error.get("Code", "")) + result = response.get("Result", {}) + if not isinstance(result, dict): + raise IamError() + return result + + return await asyncio.to_thread(run) + + +def _document(value): + if isinstance(value, str): + try: + value = json.loads(value) + except ValueError: + return {} + return value if isinstance(value, dict) else {} + + +def _canonical(value): + if isinstance(value, dict): + return {key: _canonical(item) for key, item in value.items()} + if isinstance(value, list): + return sorted( + (_canonical(item) for item in value), + key=lambda item: json.dumps(item, sort_keys=True), + ) + return value + + +def _validate_role(result: dict, account: str): + role = result.get("Role", result) + if ( + role.get("RoleName") != ROLE_NAME + or role.get("Trn") != f"trn:iam::{account}:role/{ROLE_NAME}" + ): + raise IamError(key="iamOwnershipConflict") + trust = _document(role.get("TrustPolicyDocument")) + services = set() + statements = trust.get("Statement", []) + if not isinstance(statements, list): + raise IamError(key="iamTrustConflict") + for statement in statements: + if not isinstance(statement, dict) or statement.get("Effect") == "Deny": + raise IamError(key="iamTrustConflict") + actions = statement.get("Action", []) + principal = statement.get("Principal", {}) + if ( + statement.get("Effect") == "Allow" + and not statement.get("Condition") + and "sts:AssumeRole" + in (actions if isinstance(actions, list) else [actions]) + and isinstance(principal, dict) + ): + service = principal.get("Service", []) + if isinstance(service, str): + service = [service] + if isinstance(service, list) and all( + isinstance(item, str) for item in service + ): + services.update(service) + if not {"vefaas", "apig"} <= services: + raise IamError(key="iamTrustConflict") + + +async def ensure_runtime_role( + cloud, account: str, *, timeout: float = 120, poll_interval: float = 2 +): + """Reconcile by fixed names; never change existing trust/policy documents.""" + + async def reconcile(): + deadline = time.monotonic() + timeout + + async def get_or_create(get, create, missing, collision, query, values): + try: + return await cloud.call(get, **query) + except IamError as error: + if error.code != missing: + raise + try: + await cloud.call(create, **values) + except IamError as error: + if error.code != collision: + raise + return await cloud.call(get, **query) + + while True: + try: + role = await get_or_create( + "get_role", + "create_role", + "RoleNotExist", + "RoleAlreadyExists", + {"RoleName": ROLE_NAME}, + { + "RoleName": ROLE_NAME, + "TrustPolicyDocument": json.dumps(TRUST_DOCUMENT), + "Description": "VeADK managed MPA execution role", + }, + ) + _validate_role(role, account) + policy = await get_or_create( + "get_policy", + "create_policy", + "PolicyNotExist", + "PolicyAlreadyExist", + {"PolicyName": POLICY_NAME, "PolicyType": "Custom"}, + { + "PolicyName": POLICY_NAME, + "PolicyDocument": json.dumps(POLICY_DOCUMENT), + "Description": "VeADK managed MPA runtime permissions v1", + }, + ) + if _canonical( + _document(policy.get("Policy", policy).get("PolicyDocument")) + ) != _canonical(POLICY_DOCUMENT): + raise IamError(key="iamPolicyConflict") + required = {(name, "System") for name in SYSTEM_POLICIES} | { + (POLICY_NAME, "Custom") + } + + async def bindings(): + result = await cloud.call( + "list_attached_role_policies", RoleName=ROLE_NAME + ) + return { + (p.get("PolicyName"), p.get("PolicyType")) + for p in result.get("AttachedPolicyMetadata", []) + if any( + scope.get("PolicyScopeType") == "Global" + for scope in p.get("PolicyScope", []) + ) + } + + attached = await bindings() + for name, kind in sorted(required - attached): + try: + await cloud.call( + "attach_role_policy", + RoleName=ROLE_NAME, + PolicyName=name, + PolicyType=kind, + ) + except IamError as error: + # A concurrent attachment still requires Global readback. + if error.code != "PolicyAttachConflict": + raise + _validate_role( + await cloud.call("get_role", RoleName=ROLE_NAME), account + ) + if required <= await bindings(): + return + except IamError as error: + if error.code not in TRANSIENT_CODES | { + "RoleNotExist", + "PolicyNotExist", + }: + raise + if time.monotonic() >= deadline: + raise IamError() + await asyncio.sleep(poll_interval) + + try: + await asyncio.wait_for(reconcile(), timeout) + except asyncio.TimeoutError: + raise IamError() from None diff --git a/veadk/integrations/mpa/managed/network.py b/veadk/integrations/mpa/managed/network.py index 4400c9afc..cc9a6befa 100644 --- a/veadk/integrations/mpa/managed/network.py +++ b/veadk/integrations/mpa/managed/network.py @@ -22,11 +22,39 @@ import time import uuid from dataclasses import dataclass +from types import SimpleNamespace from veadk.integrations.mpa.managed.database import DeploymentError from veadk.integrations.mpa.managed.network_cloud import NetworkCloudError +def same_subnet_ids(first: object, second: object) -> bool: + """Compare valid subnet selections without depending on provider ordering.""" + if not isinstance(first, list) or not isinstance(second, list): + return False + for selection in (first, second): + if ( + not 1 <= len(selection) <= 5 + or any(not isinstance(sid, str) or not sid.strip() for sid in selection) + or len(set(selection)) != len(selection) + ): + return False + return set(first) == set(second) + + +def vpc_configuration_matches(actual: dict, requested: dict) -> bool: + """Check supplied immutable network fields, treating subnets as members.""" + for key in ("VpcId", "SubnetIds", "EnableSharedInternetAccess"): + if key not in requested: + continue + if key == "SubnetIds": + if not same_subnet_ids(actual.get(key), requested[key]): + return False + elif actual.get(key) != requested[key]: + return False + return True + + @dataclass(frozen=True) class NetworkOptions: vpc_cidr: str = "172.20.0.0/16" @@ -79,7 +107,8 @@ def __init__( self.timeout, self.interval = timeout, interval suffix = hashlib.sha256(f"{account}:{region}".encode()).hexdigest()[:20] self.name = f"mpa-network-{suffix}" - self.marker = f"mpa-account-network:v1:{suffix}" + self.marker = f"mpa-account-network-v1-{suffix}" + self.legacy_marker = f"mpa-account-network:v1:{suffix}" async def _wait(self, fetch, resource_id, kind): deadline = time.monotonic() + self.timeout @@ -107,14 +136,6 @@ async def _wait(self, fetch, resource_id, kind): async def _create(self, entry, record, kind, request, matches): intent = kind + "_request" - if ( - record.get(intent) - and {k: v for k, v in record[intent].items() if k != "client_token"} - != request - ): - raise DeploymentError( - f"Unfinished {kind} creation has different inputs; resume its original configuration" - ) # Verify resources found by stable name. Never take over an arbitrary VPC. matches = [ r for r in matches if r.get(f"{kind}_name") == request[f"{kind}_name"] @@ -123,12 +144,40 @@ async def _create(self, entry, record, kind, request, matches): raise DeploymentError( f"Multiple managed {kind} resources found; reconcile before continuing" ) + previous = { + k: v for k, v in record.get(intent, {}).items() if k != "client_token" + } + if previous and previous != request: + legacy = {**request, "description": self.legacy_marker} + if previous != legacy: + raise DeploymentError( + f"Unfinished {kind} creation has different inputs; resume its original configuration" + ) + resource = record.get("vpc_id" if kind == "vpc" else "subnet_ids") + if ( + record.get(kind + "_dispatched") is False + and not resource + and not matches + ): + # A changed body needs a fresh token, only after definite rejection. + record[intent] = {**request, "client_token": str(uuid.uuid4())} + elif matches: + request = previous + else: + raise DeploymentError( + f"{kind} creation outcome unknown; retry discovery; no duplicate create issued" + ) if matches: row = matches[0] fields = ("description", "cidr_block") + ( ("vpc_id", "zone_id") if kind == "subnet" else () ) - if any(row.get(k) != request[k] for k in fields): + if any( + row.get(k) not in {self.marker, self.legacy_marker} + if k == "description" + else row.get(k) != request[k] + for k in fields + ): raise DeploymentError( f"{kind} name exists without matching network ownership/configuration" ) @@ -155,6 +204,139 @@ async def _create(self, entry, record, kind, request, matches): await entry.save(record) raise + def _free_cidr(self, vpc, subnets): + try: + block = ipaddress.IPv4Network(vpc["cidr_block"]) + occupied = [ipaddress.IPv4Network(s["cidr_block"]) for s in subnets] + return next( + str(n) + for n in block.subnets(new_prefix=self.options.subnet_prefix) + if not any(n.overlaps(other) for other in occupied) + ) + except (ValueError, KeyError, StopIteration): + raise DeploymentError( + "No free subnet CIDR in VPC; choose a suitable subnet prefix or existing subnet" + ) from None + + async def gateway_network(self, entry, network, available_zones): + """Prepare standard APIG subnets while the caller holds the account lock.""" + if ( + not isinstance(available_zones, list) + or any( + not isinstance(zone, str) + or not zone.startswith(self.region + "-") + or not zone[len(self.region) + 1 :] + for zone in available_zones + ) + or len(set(available_zones)) != len(available_zones) + or len(available_zones) < 2 + ): + raise DeploymentError("APIG requires at least two valid available zones") + config = dict(network["VpcConfiguration"]) + vpc_id = config["VpcId"] + record = await entry.read() + if record.get("vpc_id") != vpc_id: + raise DeploymentError("APIG network differs from the registered VPC") + vpc = await self._wait(self.cloud.vpc, vpc_id, "vpc") + rows = await self.cloud.subnets(vpc_id) + # DescribeSubnets may lag behind a ready GetSubnet. Reserve all known + # primary CIDRs before allocating companions, even if listing is empty. + initial = [ + await self._wait(self.cloud.subnet, sid, "subnet") + for sid in config["SubnetIds"] + ] + if any(row.get("vpc_id") != vpc_id for row in initial): + raise DeploymentError("APIG subnet is outside the registered VPC") + known = {row["subnet_id"]: row for row in rows + initial} + rows = list(known.values()) + intents = record.setdefault("gateway_subnet_intents", {}) + recovered = [] + + async def companion(zone) -> dict: + slot = intents.setdefault(zone, {}) + intent = slot.get("subnet_request") + name = self.name + "-subnet-" + zone + cidr = intent["cidr_block"] if intent else self._free_cidr(vpc, rows) + try: + block = ipaddress.IPv4Network(cidr) + if ( + block.prefixlen != self.options.subnet_prefix + or not block.subnet_of(ipaddress.IPv4Network(vpc["cidr_block"])) + or any( + block.overlaps(ipaddress.IPv4Network(row["cidr_block"])) + for row in rows + if row.get("subnet_name") != name + ) + ): + raise ValueError() + except (ValueError, KeyError): + raise DeploymentError( + "APIG companion subnet CIDR/configuration conflicts; reconcile before continuing" + ) from None + request = dict( + vpc_id=vpc_id, + zone_id=zone, + cidr_block=cidr, + subnet_name=name, + description=self.marker, + ) + + async def save(pending): + intents[zone] = pending + await entry.save(record) + + subnet_id = await self._create( + SimpleNamespace(save=save), slot, "subnet", request, rows + ) + subnet = await self._wait(self.cloud.subnet, subnet_id, "subnet") + if subnet.get("vpc_id") != vpc_id or not _available(subnet): + raise DeploymentError( + "APIG companion subnet is unavailable/outside VPC" + ) + if subnet.get("zone_id") != zone: + raise DeploymentError("APIG companion subnet has a different zone") + slot["subnet_ids"] = [subnet_id] + await save(slot) + return subnet + + # Resolve persisted intents first. Another subnet cannot hide an unknown + # dispatch or cause a second create in a different zone on retry. + for zone in sorted(intents): + if zone not in available_zones: + raise DeploymentError("Pending APIG subnet zone is no longer available") + subnet = await companion(zone) + recovered.append(subnet) + rows = [r for r in rows if r["subnet_id"] != subnet["subnet_id"]] + [subnet] + + selected, zones = [], set() + for row in initial + recovered + sorted(rows, key=lambda row: row["subnet_id"]): + zone = row.get("zone_id") + if zone not in available_zones or zone in zones or not _available(row): + continue + subnet = await self._wait(self.cloud.subnet, row["subnet_id"], "subnet") + if ( + subnet.get("vpc_id") != vpc_id + or subnet.get("zone_id") != zone + or not _available(subnet) + ): + raise DeploymentError("APIG subnet identity/network changed") + selected.append(subnet["subnet_id"]) + zones.add(zone) + if len(selected) == 2: + break + for zone in sorted(available_zones): + if len(selected) == 2: + break + if zone in zones: + continue + subnet = await companion(zone) + selected.append(subnet["subnet_id"]) + zones.add(zone) + rows.append(subnet) + record["subnet_ids"] = selected + await entry.save(record) + return {**network, "VpcConfiguration": {**config, "SubnetIds": selected}} + async def ensure( self, entry, requested=None, *, current=None, project_name="default" ): @@ -166,6 +348,7 @@ async def ensure( raise DeploymentError("MPA requires public/private Runtime network access") if config.get("SubnetIds") and not config.get("VpcId"): raise DeploymentError("SubnetIds require a VpcId") + requested_subnets = config.get("SubnetIds") if current is not None: nets = { n["NetworkType"].lower(): n @@ -180,13 +363,22 @@ async def ensure( raise DeploymentError( "Existing Runtime has no complete VPC network; create a new Runtime for migration" ) - for key in ("VpcId", "SubnetIds", "EnableSharedInternetAccess"): - if key in config and config[key] != active.get(key): - raise DeploymentError( - "Changing the Runtime VPC configuration requires a separate migration" - ) + if not vpc_configuration_matches(active, config): + raise DeploymentError( + "Changing the Runtime VPC configuration requires a separate migration" + ) config = dict(active) + if requested_subnets is not None: + config["SubnetIds"] = list(requested_subnets) record = await entry.read() + if ( + current is not None + and requested_subnets is None + and same_subnet_ids(config.get("SubnetIds"), record.get("subnet_ids")) + ): + # Keep the original creation order so provider permutations cannot + # change the persisted request hash on same-agent recovery. + config["SubnetIds"] = list(record["subnet_ids"]) gateway = await entry.gateway() vpcs = { v @@ -214,7 +406,7 @@ async def ensure( await entry.save(record) vpc = await self._wait(self.cloud.vpc, vpc_id, "vpc") if record.get("managed_vpc") and ( - vpc.get("description") != self.marker + vpc.get("description") not in {self.marker, self.legacy_marker} or vpc.get("cidr_block") != record["vpc_request"]["cidr_block"] ): raise DeploymentError( @@ -259,22 +451,7 @@ async def ensure( "Unfinished subnet creation has different prefix; resume its original configuration" ) else: - try: - block = ipaddress.IPv4Network(vpc["cidr_block"]) - occupied = [ - ipaddress.IPv4Network(s["cidr_block"]) for s in subnets - ] - cidr = next( - str(n) - for n in block.subnets( - new_prefix=self.options.subnet_prefix - ) - if not any(n.overlaps(other) for other in occupied) - ) - except (ValueError, KeyError, StopIteration): - raise DeploymentError( - "No free subnet CIDR in VPC; choose a suitable subnet prefix or existing subnet" - ) from None + cidr = self._free_cidr(vpc, subnets) request = dict( vpc_id=vpc_id, zone_id=zone, diff --git a/veadk/integrations/mpa/managed/network_cloud.py b/veadk/integrations/mpa/managed/network_cloud.py index a9e444580..d6c807e4e 100644 --- a/veadk/integrations/mpa/managed/network_cloud.py +++ b/veadk/integrations/mpa/managed/network_cloud.py @@ -104,6 +104,14 @@ async def _list(self, method, request_type, collection, **params): method, request_type, page_number=page, page_size=100, **params ) items = result.get(collection) + total_count = result.get("total_count") + if ( + items is None + and page == 1 + and type(total_count) is int + and total_count == 0 + ): + return [] if not isinstance(items, list): raise DeploymentError("Network discovery returned invalid results") rows.extend(items) diff --git a/veadk/integrations/mpa/managed/runner.py b/veadk/integrations/mpa/managed/runner.py index 8c3ee678c..2d5d2cb5b 100644 --- a/veadk/integrations/mpa/managed/runner.py +++ b/veadk/integrations/mpa/managed/runner.py @@ -25,6 +25,7 @@ with_creation_tos, ) from .diagnostics import classify_error, diagnostic_scope, report +from .iam import IamError from .service import provision @@ -75,7 +76,7 @@ def run(): except Exception as error: report("provision", classify_error(error)) # Error text can contain SDK request payloads, URLs and credentials. - emit(error="creationFailed") + emit(error=error.key if isinstance(error, IamError) else "creationFailed") return 1 diff --git a/veadk/integrations/mpa/managed/runtime.py b/veadk/integrations/mpa/managed/runtime.py index c8b771a0a..36726e96c 100644 --- a/veadk/integrations/mpa/managed/runtime.py +++ b/veadk/integrations/mpa/managed/runtime.py @@ -30,6 +30,7 @@ from veadk.integrations.mpa.managed.network import ( AccountNetworkProvisioner, NetworkOptions, + vpc_configuration_matches, ) from veadk.integrations.mpa.managed.network_cloud import NetworkCloud @@ -293,11 +294,7 @@ def validate_runtime(runtime, *, agent_id, database, template): ) actual = nets["private"].get("VpcConfiguration") or {} wanted = template["NetworkConfiguration"]["VpcConfiguration"] - if any( - actual.get(k) != wanted.get(k) - for k in ("VpcId", "SubnetIds", "EnableSharedInternetAccess") - if k in wanted - ): + if not vpc_configuration_matches(actual, wanted): raise DeploymentError( "Changing the Runtime VPC configuration requires a separate migration" ) @@ -431,6 +428,7 @@ async def deploy( region=self.region, agent_id=agent_id, project_name=template.get("ProjectName") or "", + runtime_name=runtime_name, configured_id=source_env.get("SKILL_SPACE_ID", "").strip(), current_id=env_map(current).get("SKILL_SPACE_ID", "").strip() if current diff --git a/veadk/integrations/mpa/managed/service.py b/veadk/integrations/mpa/managed/service.py index b4730101f..6a5a11d59 100644 --- a/veadk/integrations/mpa/managed/service.py +++ b/veadk/integrations/mpa/managed/service.py @@ -40,6 +40,7 @@ from .database import AgentDatabaseProvisioner, AgentDeploymentRegistry, DeploymentError from .gateway import SharedAPIGService from .gateway_cloud import GatewayCloud +from .iam import ROLE_NAME, IamCloud, IamError, ensure_runtime_role from .network import AccountNetworkProvisioner, NetworkOptions from .runtime import AgentRuntimeDeployer, RuntimeCloud, env_map, template_from_runtime from .worker import WorkerCloud, ensure_worker @@ -98,11 +99,16 @@ def fresh_template(profile, agent_id, account): ) env = build_runtime_env(params, public_endpoint="") env.pop("A2A_PUBLIC_URL", None) + role = profile.managed.runtime.role_name or values.get( + "runtime_role_name", ROLE_NAME + ) + env["RUNTIME_IAM_ROLE_NAME"] = role + env["RUNTIME_IAM_ROLE_TRN"] = f"trn:iam::{account}:role/{role}" return { "ArtifactType": "image", "ArtifactUrl": params.image, "Command": "bash run.sh", - "RoleName": values.get("runtime_role_name", "IDRoleForArkClawShareAgent"), + "RoleName": role, "ApmplusEnable": True, "MinInstance": 1, "MaxInstance": 1, @@ -227,6 +233,14 @@ async def provision( expected = str(profile.values.get("account_id", "")) if expected and account != expected: raise DeploymentError("Deployment credentials differ from the expected account") + if profile.managed.iam.mode == "auto": + if ( + profile.managed.runtime.role_name + or profile.values.get("runtime_role_name", ROLE_NAME) + ) != ROLE_NAME: + raise IamError(key="iamConfigurationConflict") + progress("iam_role") + await ensure_runtime_role(IamCloud(cloud), account) identity = await ensure_workload_identity(profile, cloud, agent_id) if profile.managed.postgres and profile.managed.postgres.mode == "auto": from .pg_bootstrap import prepare_postgres @@ -311,6 +325,7 @@ async def provision( options = NetworkOptions(network.vpc_cidr, network.subnet_prefix, network.zone) databases = AgentDatabaseProvisioner(admin_url=profile.admin_url, runtime_env=env) registry = AgentDeploymentRegistry(profile.shared_url) + gateway_cloud = GatewayCloud(cloud) try: await databases.check() await registry.initialize() @@ -329,22 +344,37 @@ async def provision( else None ) progress("network") - template["NetworkConfiguration"] = await AccountNetworkProvisioner( + network_provisioner = AccountNetworkProvisioner( cloud=cloud.network, account=account, region=profile.region, options=options, - ).ensure( - entry.network_entry(), + ) + network_entry = entry.network_entry() + template["NetworkConfiguration"] = await network_provisioner.ensure( + network_entry, template.get("NetworkConfiguration"), current=current, project_name=template.get("ProjectName") or "default", ) + gateway_network = template["NetworkConfiguration"] + registered_gateway = await network_entry.gateway() + if ( + not registered_gateway.get("gateway_id") + and not profile.managed.apig.adopt_id + ): + gateway_network = await network_provisioner.gateway_network( + network_entry, + gateway_network, + await gateway_cloud.available_zones(), + ) + if current is None: + template["NetworkConfiguration"] = gateway_network # APIG takes the same account lock. Do not nest it inside the deployment lock. progress("gateway") - vpc = template["NetworkConfiguration"]["VpcConfiguration"] + vpc = gateway_network["VpcConfiguration"] gateway = await SharedAPIGService( - registry=registry.shared, cloud=GatewayCloud(cloud), region=profile.region + registry=registry.shared, cloud=gateway_cloud, region=profile.region ).ensure( vpc_id=vpc["VpcId"], subnet_ids=vpc["SubnetIds"], @@ -360,6 +390,7 @@ async def provision( region=profile.region, agent_id=agent_id, project=template.get("ProjectName") or "default", + runtime_name=runtime_name, ) env.update(AGENTKIT_TOOL_ID=tool_id, AGENTKIT_TOOL_REGION=profile.region) template["ToolId"] = tool_id @@ -373,9 +404,9 @@ async def provision( shared_database_url=profile.shared_url, timeout=profile.managed.timeout_seconds, network_options=options, - progress=lambda message: progress("verifying") - if message.startswith("Runtime ") - else None, + progress=lambda message: ( + progress("verifying") if message.startswith("Runtime ") else None + ), ).deploy( template, runtime_name=runtime_name, diff --git a/veadk/integrations/mpa/managed/skills.py b/veadk/integrations/mpa/managed/skills.py index 741bf8f66..3d44cf7bc 100644 --- a/veadk/integrations/mpa/managed/skills.py +++ b/veadk/integrations/mpa/managed/skills.py @@ -16,6 +16,7 @@ from __future__ import annotations +from veadk.integrations.mpa.managed.config import validate_runtime_name from veadk.integrations.mpa.managed.database import DeploymentError, agent_suffix @@ -29,12 +30,15 @@ async def ensure_skill_space( project_name="", configured_id="", current_id="", + runtime_name: str = "", ): """Caller holds the deployment lock. Never replace a missing registered space. CreateSkillSpace has no ClientToken. Persist the intent first and recover a lost response by exact name and ownership tags; never blindly repeat create. """ + if runtime_name: + runtime_name = validate_runtime_name(runtime_name) record = await entry.read() registered_id = record.get("skill_space_id", "") ids = {value for value in (registered_id, configured_id, current_id) if value} @@ -60,7 +64,7 @@ async def ensure_skill_space( suffix = agent_suffix(account, region, agent_id) request = { "Name": "mpa_skills_" + suffix, - "Description": "Skills for MPA agent " + agent_id, + "Description": "Skills for MPA agent " + (runtime_name or agent_id), "Tags": [ {"Key": "managed_by", "Value": "mpa-deployment"}, {"Key": "mpa_agent_key", "Value": suffix}, @@ -71,9 +75,15 @@ async def ensure_skill_space( request["ProjectName"] = project_name previous = record.get("skill_space_request") if previous and previous != request: - raise DeploymentError( - "Unfinished Skill Space creation has different inputs; resume its original configuration" - ) + legacy_request = { + **request, + "Description": "Skills for MPA agent " + agent_id, + } + if previous != legacy_request: + raise DeploymentError( + "Unfinished Skill Space creation has different inputs; resume its original configuration" + ) + request = previous spaces = await cloud.find_skill_spaces(request["Name"], project_name) if spaces: if len(spaces) != 1 or not record.get("skill_space_create_requested"): diff --git a/veadk/integrations/mpa/managed/studio_profile.py b/veadk/integrations/mpa/managed/studio_profile.py index 0c05e6032..4225f85fd 100644 --- a/veadk/integrations/mpa/managed/studio_profile.py +++ b/veadk/integrations/mpa/managed/studio_profile.py @@ -19,20 +19,19 @@ def studio_profile_values() -> dict: """Return a fresh Beijing profile; secrets remain server environment values.""" - account = "2112682748" region = "cn-beijing" role = "IDRoleForArkClawShareAgent" model = "doubao-seed-2-0-pro-260215" - registry = f"agentkit-platform-{account}-{region}.cr.volces.com/mpa" + registry = "agentkit-platform-2112682748-cn-beijing.cr.volces.com/mpa" return { "region": region, - "account-id": account, "model-provider": "openai", "model-name": model, "model-api-base": "https://ark.cn-beijing.volces.com/api/v3/", "model-api-key": "${VEADK_MPA_CONFIG_MODEL_AGENT_API_KEY}", "managed": { "version": 1, + "iam": {"mode": "auto"}, "postgres": { "mode": "auto", "legacy-urls": "ignore", @@ -58,7 +57,6 @@ def studio_profile_values() -> dict: "APPCENTER_RESOURCE_DISCOVERY_ENABLED": "false", "CHANNEL_ADMIN_AUTH_MODE": "runtime_key", "CHANNEL_BACKEND": "postgresql", - "CLAW_SPACE_ID": f"csi-{account}", "CLOUD_PROVIDER": "volcengine", "FORCE_APMPLUS_EXPORTER_REGISTRATION": "true", "IDENTITY_REGION": region, @@ -73,8 +71,6 @@ def studio_profile_values() -> dict: ), "MPA_SESSION_MEMORY_BACKEND": "postgresql", "REGION": region, - "RUNTIME_IAM_ROLE_NAME": role, - "RUNTIME_IAM_ROLE_TRN": f"trn:iam::{account}:role/{role}", "RUNTIME_PROVIDER": "VEFAAS", "SCHEDULED_TASK_BACKEND": "postgresql", "ENABLE_APMPLUS": "true", @@ -85,7 +81,6 @@ def studio_profile_values() -> dict: }, "worker": { "image": f"{registry}/mpa_codex_worker:latest", - "reference-id": "t-yeuujqfldstkidoad4p0", "role-name": role, }, "timeout-seconds": 1800, diff --git a/veadk/integrations/mpa/managed/tasks.py b/veadk/integrations/mpa/managed/tasks.py index dffb8b1f4..34a6684c5 100644 --- a/veadk/integrations/mpa/managed/tasks.py +++ b/veadk/integrations/mpa/managed/tasks.py @@ -17,25 +17,27 @@ from __future__ import annotations import asyncio -from contextlib import contextmanager import hashlib import json import logging import os -from pathlib import Path import re import sqlite3 import sys import time import uuid +from contextlib import contextmanager +from pathlib import Path from .diagnostics import classify_error, validate_diagnostic +from .iam import ERROR_KEYS logger = logging.getLogger(__name__) STAGES = { "queued", "checking", + "iam_role", "admin_workspace", "business_workspace", "admin_database", @@ -330,6 +332,8 @@ async def _run( ) if isinstance(event.get("stage"), str) and event["stage"] in STAGES: self._update(task_id, stage=event["stage"]) + if isinstance(event.get("error"), str) and event["error"] in ERROR_KEYS: + terminal["error"] = event["error"] if event.get("result"): result = event["result"] keys = { diff --git a/veadk/integrations/mpa/managed/worker.py b/veadk/integrations/mpa/managed/worker.py index 677f85856..15d2bac12 100644 --- a/veadk/integrations/mpa/managed/worker.py +++ b/veadk/integrations/mpa/managed/worker.py @@ -21,6 +21,7 @@ import json import uuid +from .config import WORKER_RESERVED_ENV_KEYS, validate_runtime_name from .database import DeploymentError, agent_suffix from .diagnostics import report, retry_worker from ..mpa_tool import build_tos_mount_config @@ -94,8 +95,11 @@ async def ensure_worker( region, agent_id, project="default", + runtime_name: str = "", timeout: float = 600, ): + if runtime_name: + runtime_name = validate_runtime_name(runtime_name) try: return await asyncio.wait_for( _ensure_worker( @@ -106,6 +110,7 @@ async def ensure_worker( region=region, agent_id=agent_id, project=project, + runtime_name=runtime_name, ), timeout=timeout, ) @@ -116,7 +121,9 @@ async def ensure_worker( raise TimeoutError() from error -async def _ensure_worker(entry, cloud, options, *, account, region, agent_id, project): +async def _ensure_worker( + entry, cloud, options, *, account, region, agent_id, project, runtime_name +): record = await entry.read() suffix = agent_suffix(account, region, agent_id) owned = {"managed_by": "mpa-deployment", "mpa_agent_key": suffix} @@ -136,29 +143,25 @@ async def _ensure_worker(entry, cloud, options, *, account, region, agent_id, pr ): raise DeploymentError("Worker differs from registered binding") if not tool_id: + name = runtime_name or agent_id.strip().replace("-", "_") + if record.get("worker_name") and record["worker_name"] != name: + raise DeploymentError( + "Unfinished worker configuration changed; resume original inputs" + ) env = {} if options.reference_id: source = await retry_worker( "get_reference_worker", lambda: cloud.get(options.reference_id) ) - excluded = { - "MPA_AGENT_ID", - "AGENTKIT_RUNTIME_ID", - "SKILL_SPACE_ID", - "CODEX_MCP_RUNTIME_API_KEY", - "A2A_PUBLIC_URL", - "FEISHU_APP_ID", - "FEISHU_APP_SECRET", - "CHANNEL_STATE_ENCRYPTION_KEY", - } env = { item["Key"]: item.get("Value", "") for item in source.get("Envs", []) - if item["Key"] not in excluded + if item["Key"] not in WORKER_RESERVED_ENV_KEYS } + env.update(options.env) env["MPA_AGENT_ID"] = agent_id request = { - "Name": agent_id.strip().replace("-", "_"), + "Name": name, "ToolType": "Private", "ImageUrl": options.image, "Command": "/opt/gem/run.sh", @@ -184,15 +187,25 @@ async def _ensure_worker(entry, cloud, options, *, account, region, agent_id, pr ).hexdigest() if record.get("worker_hash") and record["worker_hash"] != digest: # Preserve the exact pre-upgrade payload for an unfinished intent. - legacy_request = {**request, "Name": "mpa_worker_" + suffix} - legacy_digest = hashlib.sha256( - json.dumps(legacy_request, sort_keys=True).encode() - ).hexdigest() - if record["worker_hash"] != legacy_digest: + if record.get("worker_name"): + raise DeploymentError( + "Unfinished worker configuration changed; resume original inputs" + ) + for legacy_name in ( + agent_id.strip().replace("-", "_"), + "mpa_worker_" + suffix, + ): + legacy_request = {**request, "Name": legacy_name} + legacy_digest = hashlib.sha256( + json.dumps(legacy_request, sort_keys=True).encode() + ).hexdigest() + if record["worker_hash"] == legacy_digest: + request, digest = legacy_request, legacy_digest + break + else: raise DeploymentError( "Unfinished worker configuration changed; resume original inputs" ) - request, digest = legacy_request, legacy_digest matches = await retry_worker("find_worker", lambda: cloud.find(request["Name"])) if matches: if len(matches) != 1 or not record.get("worker_token"): @@ -202,6 +215,9 @@ async def _ensure_worker(entry, cloud, options, *, account, region, agent_id, pr tool_id = matches[0].get("ToolId", "") else: record.setdefault("worker_token", str(uuid.uuid4())) + # Keep legacy intents identifiable across repeated lost responses. + if not record.get("worker_hash"): + record["worker_name"] = request["Name"] record.update(worker_hash=digest, worker_managed=True) await entry.save(record) create_request = {**request, "ClientToken": record["worker_token"]} diff --git a/veadk/webui/assets/app/index-B71Wq9_t.js b/veadk/webui/assets/app/index-BKQXvMzA.js similarity index 98% rename from veadk/webui/assets/app/index-B71Wq9_t.js rename to veadk/webui/assets/app/index-BKQXvMzA.js index e294cda7d..272fcd008 100644 --- a/veadk/webui/assets/app/index-B71Wq9_t.js +++ b/veadk/webui/assets/app/index-BKQXvMzA.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/mermaid.core-BmHujEI0.js","assets/chunks/purify.es-BnINGy_Y.js","assets/chunks/MarkdownPromptEditor-CiBW7wfN.js","assets/styles/MarkdownPromptEditor-ZH9qtki0.css","assets/chunks/QuickAgentCreateDialog-8cpgojnf.js","assets/styles/QuickAgentCreateDialog-DGsLIlOX.css"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/mermaid.core-l-gs7P2Q.js","assets/chunks/purify.es-BnINGy_Y.js","assets/chunks/MarkdownPromptEditor-CgQNwz-v.js","assets/styles/MarkdownPromptEditor-ZH9qtki0.css","assets/chunks/QuickAgentCreateDialog-BJaDUd6y.js","assets/styles/QuickAgentCreateDialog-DGsLIlOX.css"])))=>i.map(i=>d[i]); var Lze=Object.defineProperty;var RG=e=>{throw TypeError(e)};var $ze=(e,t,n)=>t in e?Lze(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Zt=(e,t,n)=>$ze(e,typeof t!="symbol"?t+"":t,n),IG=(e,t,n)=>t.has(e)||RG("Cannot "+n);var Sl=(e,t,n)=>(IG(e,t,"read from private field"),n?n.call(e):t.get(e)),PG=(e,t,n)=>t.has(e)?RG("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),w5=(e,t,n,i)=>(IG(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n);function Fze(e,t){for(var n=0;ni[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();var cg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function T1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Tue={exports:{}},XP={};/** * @license React * react-jsx-runtime.production.js @@ -29,7 +29,7 @@ Summarize the result in three points`,preview:"{{count}} cases will be added",co Studio: {{studioUrl}} Pairing code: {{pairingCode}}`,installPrompt:`Install the AgentKit Studio Plugin. Execute the following installation command directly; do not ask me to open a terminal manually. Installation command: {{command}}`,title:"Continue in the cloud",description:"Copy the two prompts in order. Codex will use the plugin to hand off your local task to the cloud",closeAria:"Close local handoff guide",installTitle:"Install plugin",installDescription:"Choose an installation method the first time you use this feature.",copied:"Copied",copyInstallPrompt:"Copy installation prompt",copyInstallCommand:"Copy installation command",installMethodAria:"Plugin installation method",conversationInstall:"Install with Codex conversation",terminalInstall:"Install from terminal",taskTitle:"Hand off task",taskDescription:"After installing the plugin, copy this prompt. Codex will migrate the current project and continue the task.",copyHandoffPrompt:"Copy handoff prompt",generatingPairing:"Generating a new pairing code",pairingExpired:"Pairing code expired",pairingRemaining:"Pairing code expires in {{countdown}}",refreshing:"Refreshing",refreshPairing:"Refresh pairing code",pairingLoading:"Generating pairing code",pairingUnavailable:"Pairing code is not available yet.",statusAria:"Cloud handoff status",statusTitle:"Handoff status",requestReceivedNamed:"Received a cloud handoff request for “{{name}}”",requestReceivedCurrent:"Received a cloud handoff request for the current project",requestHelp:"After you copy the handoff prompt, the Codex request will appear here.",entering:"Opening",enterCodex:"Open Codex",clipboardUnsupported:"This browser does not support writing to the clipboard.",steps:{request:"Wait for local request",session:"Create cloud Session",restore:"Restore project",continue:"Send continuation task"},status:{issued:"Waiting for request",creating:"Creating Session",sessionCreated:"Migrating project",continuing:"Starting cloud task",running:"Running in the cloud",completed:"Handoff complete",failed:"Handoff failed"}},Cme={model:{description:"Show or switch the current conversation model",keywords:"model switch"},models:{description:"List models available from app-server",keywords:"model list"},skill:{description:"Browse and invoke a Skill available in the current workspace",keywords:"skill workflow"},skills:{description:"Browse and invoke Skills available in the current workspace",keywords:"skills workflow list"},new:{description:"Start a new conversation",keywords:"new conversation"},resume:{description:"Open conversation history or resume a specific Thread",keywords:"history resume session"},fork:{description:"Fork a new conversation from the current context",keywords:"fork branch"},compact:{description:"Compact the current conversation context",keywords:"compact context"},archive:{description:"Archive the current conversation and start a new one",keywords:"archive close"},status:{description:"Show connection, Thread, model, and token status",keywords:"status connection token"},clear:{description:"Clear the current view and start a new conversation",keywords:"clear reset"},help:{description:"Show Sandbox shortcuts",keywords:"help commands"},currentModel:"Current model",availableModel:"Available model",workspace:"Workspace",notSet:"Not set",modelLabel:"Model",statusLabel:"Status",running:"Running",idle:"Idle",totalTokens:"Total tokens",contextWindow:"Context window",imageFallback:"Image",unknown:"Unknown shortcut: {{command}}. Type /help to see available commands.",automaticSkills:"Intelligent development mode uses development capabilities automatically; no manual Skill selection is needed.",activity:{new:"Started a new Codex conversation",resumed:"Resumed Codex conversation",deleted:"Deleted Codex conversation history",modelChanged:"Switched Codex model",availableModels:"Available Codex models",noModels:"No models are currently available",forked:"Forked Codex conversation",compacting:"Started compacting the current Codex conversation",archived:"Archived Codex conversation",status:"Current Codex status",help:"Codex shortcuts supported by Sandbox"}},Ame={label:"Build tasks",queued:"Build queued",running:"Build running in the background",recovering:"Recovering build",waiting_user:"Build needs attention",stopping:"Stopping build",succeeded:"Build completed",cancelled:"Build stopped",failed:"Build could not complete",open:"Return to task",hide:"Hide task notification",reconnecting:"Reconnecting to the task service. Existing tasks are retained."},Tme={common:pme,tool:mme,threads:gme,permissions:bme,workspace:yme,approval:vme,composer:xme,launch:wme,session:Ome,agentDetails:kme,agentWorkspace:Sme,handoff:Eme,commands:Cme,taskNotice:Ame},lVe=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:kme,agentWorkspace:Sme,approval:vme,commands:Cme,common:pme,composer:xme,default:Tme,handoff:Eme,launch:wme,permissions:bme,session:Ome,taskNotice:Ame,threads:gme,tool:mme,workspace:yme},Symbol.toStringTag,{value:"Module"})),_me={retry:"Try again",signInToContinue:"Sign in to continue",signInWith:"Sign in with {{provider}}",enterUsername:"Enter a username to get started",usernamePlaceholder:"Username (letters and numbers, up to 16 characters)",enter:"Continue",usernameInvalid:"Use letters and numbers only, up to 16 characters.",identityProvider:{volcengine:"Volcengine Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"Volcengine AgentKit provides enterprise-grade Agent solutions",byteplus:"BytePlus AgentKit provides enterprise-grade Agent solutions"},legalPrefix:"By continuing, you acknowledge that you have read and agree to the AgentKit",terms:"Product and Service Terms",copyright:"© {{year}} VeADK. All rights reserved."},jme={title:"Your session has expired",description:"Your current edits are preserved. The previous action will continue after you sign in again.",waiting:"Waiting for sign-in…",signInAgain:"Sign in again"},Nme={breadcrumbs:"Breadcrumbs",selectAgent:"Select Agent",switchAgent:"Switch Agent"},Rme={cancel:"Cancel",close:"Close confirmation dialog"},cVe={login:_me,authExpired:jme,navbar:Nme,confirm:Rme},uVe=Object.freeze(Object.defineProperty({__proto__:null,authExpired:jme,confirm:Rme,default:cVe,login:_me,navbar:Nme},Symbol.toStringTag,{value:"Module"})),Ime={defaultUser:"User",shortcuts:"Quick access",tryCli:"Try AgentKit CLI",developerResources:"Developer resources",systemInfo:"System information",language:"Language",issueFeedback:"Report an issue",logout:"Sign out",roles:{admin:"Administrator",developer:"Developer",user:"User",super_admin:"Super administrator"}},Pme={home:"Back to home",expand:"Expand sidebar",collapse:"Collapse sidebar",label:"Main navigation",newChat:"New chat",agents:"Agents",workspaces:"Workspaces",library:"Library",cronjobs:"Cronjob",automations:"Automations",users:"User management",administration:"Administration",reviewCenter:"Review center"},Dme={title:"Chat history",newConversation:"New conversation",create:"New chat",loading:"Loading chat history…",empty:"No conversations yet",current:"Current",manage:"Manage conversation: {{title}}",more:"More",delete:"Delete",loadingMore:"Loading…",loadMore:"Load more",evaluatingTitle:"Running automatic evaluation",evaluating:"Evaluating",generating:"Generating"},dVe={account:Ime,navigation:Pme,history:Dme},fVe=Object.freeze(Object.defineProperty({__proto__:null,account:Ime,default:dVe,history:Dme,navigation:Pme},Symbol.toStringTag,{value:"Module"})),Mme={placeholder:"Select an option",collapseOptions:"Collapse model options",expandOptions:"Expand model options",noOptions:"No options available",noMatches:"No matches. You can use the current model ID directly."},Lme={unsupportedActivity:"Unsupported Skill conversation activity",ariaLabel:"Skill generation conversation"},$me={code:"Error code: {{code}}",type:"Error type: {{type}}",representation:"Exception representation: {{value}}",rawResponse:`Raw server response: -{{value}}`,original:"Original error: {{message}}",details:"Details"},Fme={ariaLabel:"Skill file tree",viewSource:"View source",viewPreview:"View preview",download:"Download",binaryFile:"Binary file",bytes:"{{value}} bytes",binaryDescription:"The current API returns file metadata only. Download the original file separately.",metadata:"Skill metadata",noFiles:"No files"},Bme={close:"Close",name:"Name",region:"Region",optionalDescription:"Description (optional)",cancel:"Cancel",create:"Create",creating:"Creating…",save:"Save",saving:"Saving…",upload:"Upload",uploading:"Uploading…",createSpaceTitle:"New Skill Space",editSpaceTitle:"Edit Skill Space",uploadTitle:"Upload to {{name}}",createSpaceFailed:"Failed to create the Skill Space",updateSpaceFailed:"Failed to update the Skill Space",archiveValidationFailed:"Skill ZIP validation failed",uploadFailed:"Failed to upload the Skill",dropzone:"Drop a Skill ZIP here",chooseLocalFile:"or click to choose a local file",archiveHelp:"The ZIP root must contain SKILL.md, or a single wrapping directory. Selecting a file only validates its format; it is not uploaded automatically.",validating:"Checking file format…",validationPassed:"Format check passed: {{name}}, {{count}} file(s)"},Ume={styles:{concise:"Concise and practical",strict:"Rigorous and robust",tutorial:"Tutorial-friendly",automation:"Automation-first",custom:"Custom",customFallback:"Custom style"},stages:{preparing:"Preparing Dev Sandbox",ready:"Skill generated and format validation passed",failed:"Generation failed",cancelled:"Stopped",validating:"Validating Skill format",packaging:"Organizing files",generating:"Generating Skill",repairingAgain:"Repairing again",autoRepairing:"Auto-repairing ({{attempt}}/{{max}})"},validation:{fallback:"Skill format validation failed",repairInstruction:"Fix only the Skill format errors listed below. Do not change the original purpose or scope.",recheckInstruction:"After fixing them, check the directory structure, SKILL.md frontmatter, and all text files again.",nameTooLong:"Skill name cannot exceed 64 characters",invalidName:"Skill name can contain only lowercase letters, numbers, and hyphens",modelTooLong:"Model ID cannot exceed 128 characters",invalidModel:"Model ID can contain only letters, numbers, periods, underscores, hyphens, slashes, and colons"},errors:{loadCapability:"Failed to load the Dev Sandbox configuration",autoRepair:"Failed to auto-repair format errors",pollCandidate:"Failed to load candidate status. Retrying.",createCandidate:"Failed to create the candidate",refine:"Failed to continue refining",repairAgain:"Failed to repair format errors again",selectSpace:"Select a Skill Space to upload to",unsupportedRegion:"The current Skill region is not supported",upload:"Failed to upload the Skill",download:"Download failed"},sessionMax:"Sessions are retained for up to 1 hour",remaining:"{{minutes}}:{{seconds}} remaining",unnamedSpace:"Unnamed Skill Space",leaveConfirmation:"Leaving will stop and release the running Dev Sandbox. Leave anyway?",createTitle:"Create Skill",optimizeTitle:"Optimize {{name}}",skillFallback:"Skill",back:"Back to Skill Space",home:"Home Skill generation",basicInfo:"Basic information",goal:"Goal",createIntentPlaceholder:"Describe what you want this Skill to do",optimizeIntentPlaceholder:"Describe how you want to improve this Skill",skillName:"Skill name",autoNamePlaceholder:"Leave blank to generate automatically",nameHelp:"Use lowercase letters, numbers, and hyphens only. Leave blank to generate automatically.",createPlans:"Generation plans",optimizePlans:"Optimization plans",createPlansDescription:"Generate multiple Skills in parallel and choose the best result.",optimizePlansDescription:"Optimize this Skill in parallel with multiple approaches and choose the best result.",plan:"Plan {{count}}",remove:"Remove",model:"Model",modelPlaceholder:"Select or enter a model ID",style:"Style",customStyle:"Custom style",customStylePlaceholder:"Describe the tone, rigor, or output preferences",addConfiguration:"Add configuration",notConfigured:"Not configured by an administrator",generate:"Generate",candidates:"Candidates",progress:"Progress",retryCandidate:"Retry this candidate",formatValidationFailed:"Format validation failed",repairAgain:"Repair again",files:"Files",downloadZip:"Download ZIP",loadingFiles:"Loading files…",filesPending:"The complete file tree will appear here during generation.",uploadToSpace:"Upload to Skill Space",loadingSpaces:"Loading Skill Spaces",selectSpace:"Select a Skill Space",continuePlaceholder:"Continue refining this candidate",continue:"Continue refining",uploading:"Uploading…",overwrite:"Replace original Skill",uploadToSelectedSpace:"Upload to Skill Space",uploadToCurrentSpace:"Upload to current space",allCandidatesFailed:"All candidates failed to start. Retry each candidate separately."},Qme={invalidFormat:"{{label}} has an invalid format.",recoveryStatus:"Skill recovery status",errorResponse:"error response",errorDetails:"error details",missingContentType:"Content-Type missing",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",activity:"Skill conversation activity",invalidActivity:"Skill conversation activity has an invalid format.",invalidToolActivity:"Skill tool activity has an invalid format.",invalidTextActivity:"Skill text activity has an invalid format.",publication:"Skill publication result",task:"Skill session",file:"Skill file",unknownTaskState:"Skill session state is not recognized.",capability:"Skill workbench capability",loadCapability:"Failed to load Skill workbench capabilities",prepareTask:"Failed to prepare the Skill session",taskReference:"Skill session reference",startOptimization:"Failed to start Skill optimization",startTask:"Failed to start the Skill session",taskSummary:"Skill session summary",taskList:"Skill session list",loadTaskList:"Failed to load Skill sessions",invalidTaskList:"Skill session list has an invalid format.",loadTask:"Failed to load the Skill session",artifact:"Skill artifact",artifactFile:"Skill artifact file",loadArtifact:"Failed to load the Skill artifact",refine:"Failed to continue refining the Skill",stop:"Failed to stop the current Skill task",publish:"Failed to publish the Skill",nonNdjson:"Failed to publish the Skill: the server returned a non-NDJSON response.",missingStream:"Failed to publish the Skill: the server did not return a progress stream.",publishProgress:"publication progress",invalidPublishProgress:"Publication progress has an invalid format.",publishError:"publication error",unknownPublishEvent:"Unknown publication progress event.",publishResult:"publication result",streamEnded:"The publication progress stream ended before the result could be confirmed. Refresh Skill Center to check the status.",deleteTask:"Failed to delete the Skill session",download:"Failed to download the Skill"},zme={configSelect:Mme,conversation:Lme,errorDetails:$me,fileTree:Fme,management:Bme,generation:Ume,api:Qme},hVe=Object.freeze(Object.defineProperty({__proto__:null,api:Qme,configSelect:Mme,conversation:Lme,default:zme,errorDetails:$me,fileTree:Fme,generation:Ume,management:Bme},Symbol.toStringTag,{value:"Module"})),Vme={back:"Back",reload:"Reload",notConfigured:"Not configured",name:"Name",description:"Description",delete:"Delete",save:"Save",saving:"Saving",add:"Add",manage:"Manage",environment:"Environment",noDescription:"No description",refresh:"Refresh",close:"Close",retry:"Retry",loading:"Loading…",previousPage:"Previous page",nextPage:"Next page",edit:"Edit",all:"All",search:"Search",cancel:"Cancel",view:"View",viewDetails:"View details",deleting:"Deleting…",create:"Create",creating:"Creating",adding:"Adding",generating:"Generating",uploading:"Uploading",preview:"Preview",loadFailed:"Failed to load",select:"Select",collapse:"Collapse",expand:"Expand",none:"None"},Hme={ariaLabel:"AgentKit shortcuts",closeAriaLabel:"Close the AgentKit welcome card",title:"Welcome to AgentKit",description:"Build and host enterprise Agents quickly with AgentKit",docsAriaLabel:"Open AgentKit documentation in a new window",docs:"Documentation",consoleAriaLabel:"Open the AgentKit console in a new window",console:"Console"},qme={checkUpdates:"Check for updates",checkingVersions:"Checking versions…",versionCheckError:"Unable to check sandbox versions. Check credentials, region and API permissions, then retry.",sandboxUpdateError:"Sandbox update failed. Refresh its status before retrying.",modelEnvRepairUnavailable:"Cannot repair model configuration. Check CODEX_API_KEY and CODEX_BASE_URL.",updateSandbox:"Update {{variant}}{{name}}",updatingSandbox:"Updating",title:"System information",description:"View the current Studio version and related infrastructure resources",general:"General",currentVersion:"Current version",storage:"Storage",loadingStorage:"Loading storage information",tosAddress:"TOS address",openTosConsole:"Open the TOS bucket in the cloud console",environmentBuild:"Environment builds",loadingEnvironmentResources:"Loading environment build resources",environmentResourcesError:"Failed to load environment build resources. Check the cloud credentials and try again.",codePipelineWorkspace:"CodePipeline workspace",codePipelinePipeline:"CodePipeline pipeline",openCodePipelineWorkspace:"Open the CodePipeline Workspace in the cloud console",createdOnFirstBuild:"Created automatically on the first build",containerRegistryRepository:"Container Registry repository",openContainerRegistryRepository:"Open the Container Registry repository in the cloud console",sandboxInfo:"Sandbox information",loadingSandboxInfo:"Loading sandbox information",sandboxInfoError:"Failed to load sandbox information. Try again.",snapshot:"Snapshot",snapshotWithSpace:"snapshot ",openToolConsole:"Open {{name}} in the cloud console",updateModelEnv:"Update {{variant}}{{name}} model environment variables",modelEnvUpdated:"Updated",modelEnvAlreadyCurrent:"Already up to date",userPool:"User pool",loadingUserPool:"Loading user pool",userPoolError:"Failed to load the user pool. Try again.",modelEnvUpdateError:"Failed to update model environment variables. Try again.",openUserPoolConsole:"Open user pool {{name}} in the cloud console",unnamedUserPool:"Unnamed user pool",id:"ID",domain:"Domain",region:"Region",noLocalUserPool:"No user pool is configured in local mode",noUserPool:"No user pool is configured for this Studio"},Wme={workspace:"Agent workspace",library:"Agent library",evaluation:"Evaluation",agentList:"Agent list",agentDetails:"Agent details",newAgent:"New Agent",loading:"Loading…",loadingCloudAgents:"Loading cloud Agents…",noAgentSelected:"Select an Agent",local:"Local",remote:"Cloud",localAgent:"Local Agent",remoteAgent:"Cloud Agent",agentCount:"{{count}} Agents",agentCountLabel:"Agent count",details:"Details",chat:"Chat",update:"Update",backToAgentList:"Back to Agent list",loadingAgent:"Loading Agent",loadingAgentDescription:"Loading Agent configuration and Runtime information.",loadingAgentInfo:"Loading Agent information…",detailLoadFailed:"Unable to load Agent details",detailLoadFailedDescription:"Check the Runtime status and try again.",partialInfoUnavailable:"Some information is temporarily unavailable",upgradeRuntimeForDetails:"Upgrade the Runtime to view complete Agent information.",basicInfo:"Basic information",usageOverview:"Usage overview",sections:{basic:"Basic information",profileConfig:"Profile configuration",sessionConfig:"Session configuration",usage:"Usage overview",diagnostics:"Diagnostics",evaluations:"Evaluations",optimizations:"Optimizations",integrations:"Integrations",versions:"Versions",channels:"Message channels"},evaluationGroup:"Evaluation group",optimizations:"Optimization suggestions",optimizationsDescription:"Review actionable suggestions based on evaluation results.",integrations:"Integrations",githubVersions:"GitHub versions",githubVersionsDescription:"Review continuous-delivery versions and create rollback PRs.",currentVersionOnly:"GitHub continuous delivery is not enabled. Only the current production version is shown.",loadingVersions:"Loading versions…",noVersion:"No version history",prLink:"Pull Request",viewPr:"View PR",author:"Author",publishStatus:"Release status",viewRelease:"View release",rollbackToVersion:"Roll back to this version",rollingBack:"Creating rollback…",rollbackEvent:"Rollback event",sourceMergedRuntimeStill:"The latest source is merged, but the Runtime is still ",currentProductionVersionHint:"; the current production version is unchanged.",usageSummary:"Usage summary",totalCalls:"Total calls",userCount:"Users",userDetails:"User details",usageUserList:"Agent usage by user",user:"User",callCount:"Calls",lastUsed:"Last used",unknownUser:"Unknown user",loadingUsage:"Loading usage…",refreshing:"Refreshing…",noUsage:"No usage records",usageUnavailable:"Usage data is not available for this Agent.",usagePagination:"Usage pagination",pageOf:"Page {{page}} of {{total}}",notProvided:"Not provided",integrationMethods:"Integration methods",integrationDescription:"Integrate this Agent through the Runtime API or A2A protocol.",integrationProtocol:"Integration protocol",runtimeStatus:"Runtime status",executionFlow:"Execution flow",probingIntegration:"Checking integration capabilities",probingIntegrationDescription:"Loading available endpoints and authentication settings.",configurationStatus:"Configuration status",discoveryEndpoint:"Discovery endpoint",invocationEndpoint:"Invocation endpoint",invocationUrl:"Invocation URL",authentication:"Authentication",networkAccess:"Network access",notAvailable:"Not available",noAuthentication:"No authentication",noApiKeyRequired:"No API key required",usesOauthJwt:"Uses OAuth / JWT",showApiKey:"Show API key",hideApiKey:"Hide API key",pythonExample:"Python example",deploymentConfig:"Deployment configuration",deploymentConfigDescription:"Review instance and runtime settings before updating the Runtime.",deploymentRegion:"Deployment region",mpaControlPlane:"MPA control plane",loadingMpaAgentView:"Loading MPA Runtime binding…",mpaRuntimeBound:"This MPA Agent is bound to one Runtime and ready for management.",mpaRuntimeMissing:"No visible MPA Runtime is bound to this Agent.",mpaRuntimeBindingAmbiguous:"Multiple MPA Runtimes match this Agent. Resolve the binding before making changes.",mpaRuntimeOrphan:"The Runtime exists, but it does not contain this MPA Profile.",mpaRuntimeLegacyAuthUnsupported:"This Runtime uses an older MPA image that still requires X-Jwt-Token. Update it to the current AgentKit-compatible image before managing Profile or Session settings.",profileConfig:"Profile configuration",profileConfigTitle:"Profile configuration",profileConfigDescription:"Review and apply the Agent-level MPA Profile. The Profile is the Runtime default configuration inherited by new Sessions.",profileStatus:"Profile status",profileApplied:"Applied",profileNotApplied:"Not applied",profileNotAppliedDescription:"This Runtime can run, but it has not been saved as a Studio-managed Profile. Applying it creates a Profile revision.",applyProfile:"Apply Profile",reapplyProfile:"Reapply Profile",editProfile:"Edit Profile",profileApplying:"Applying…",profileAppliedNotice:"Profile applied. Current revision is {{revision}}.",profileApplyIncomplete:"Profile apply did not finish. Check the current operation state and retry.",profileApplyFailed:"Failed to apply Profile.",profilePrompt:"System prompt",profileResources:"Resource configuration",profileResourceSummary:"{{tools}} tools · {{skills}} Skills · {{mcp}} MCP servers",sessionConfigTitle:"Session configuration",sessionConfigDescription:"Review and change execution choices for the current MPA Session. Changes apply to the next turn.",loadingSessionConfig:"Loading Session configuration…",sessionConfigNoAgent:"Select an MPA Agent to manage its Session configuration.",sessionConfigNonMpa:"Session configuration is only available for MPA Agents.",sessionConfigNoSession:"Open a chat with this MPA Agent before changing Session configuration.",sessionConfigDifferentRuntime:"Open the current chat for this MPA Agent before changing Session configuration.",sessionConfigSaved:"Session configuration updated. The next turn will use the new revision.",sessionConfigStale:"This Session was changed elsewhere. The latest configuration is shown; review it before saving again.",sessionConfigRevision:"Config revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"Latest Profile revision",sessionProfileUpgradeAvailable:"A newer Profile revision is available: v{{current}} → v{{target}}.",upgradeSessionProfile:"Upgrade Session Profile",sessionProfileUpgrading:"Upgrading…",sessionProfileUpgraded:"Session Profile upgraded. The next turn will use the new revision.",sessionProfileUpgradeFailed:"Unable to upgrade the Session Profile.",sessionModelOverride:"Model override",modelId:"Model ID",inheritProfileDefault:"Inherit Profile default",sessionMcpServers:"MCP servers",mcpServerCount:"{{count}} selected",clearSessionMcp:"Clear MCP servers",mpaDiagnosticsTitle:"Runtime diagnostics",mpaDiagnosticsDescription:"Review recent Runtime Console runs and their Agent, Profile, Turn, task, and worker correlation.",loadingMpaDiagnostics:"Loading Runtime diagnostics…",noMpaDiagnostics:"No Runtime diagnostic runs for this Session.",latestRun:"Latest run",traceCorrelation:"Trace correlation",traceCorrelationDescription:"Stable identifiers returned by Runtime Console for this invocation.",traceSteps:"Trace steps",traceStepsDescription:"Recent bounded Runtime Console steps for the selected invocation.",mpaInstanceId:"MPA instance",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker kind",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile version",step:"Step",stepCount:"Steps",duration:"Duration",noTraceSteps:"No trace steps recorded for this invocation.",executionConfigMode:{replace:"Session override",clear:"Cleared for this Session",inherit:"Using Profile default"},concurrency:"Concurrency",selectedOptimizations:"Selected optimizations",selectedOptimizationsDescription:"These optimizations will be applied to this update.",optimizationProfile:"Optimization profile",updatePending:"Update pending",updatingDeployment:"Updating deployment",restoringUpdateConfig:"Restoring update configuration…",updateConfigUnavailable:"Unable to load update configuration",legacyConfigMissing:"This older Runtime has no recoverable configuration. Create it again.",deploymentFailed:"Deployment failed",continueEditing:"Continue editing",loadingOptimizations:"Loading optimization suggestions…",noOptimizations:"No optimization suggestions",fixPriority:"Priority",suggestedModule:"Suggested module",suggestionAndReason:"Suggestion and rationale",priority:{high:"High",medium:"Medium",low:"Low"},modules:{agentStructure:"Agent structure",prompt:"Prompt",tool:"Tools",knowledge:"Knowledge",memory:"Memory",workflow:"Workflow",other:"Other"},evaluationGroupList:"Evaluation group list",newEvaluationGroup:"New evaluation group",newEvaluationGroupName:"New evaluation group {{count}}",searchEvaluationGroups:"Search evaluation groups",noMatchingEvaluationGroups:"No matching evaluation groups",noEvaluationGroupSelected:"Select an evaluation group",groupStats:"{{agents}} Agents · {{runs}} runs",evaluationGroupDetails:"Evaluation group details",evaluationGroupStats:"{{agents}} Agents · {{caseSet}} · {{runs}} runs",startEvaluation:"Start evaluation",evaluationConfig:"Evaluation configuration",historyResults:"History",participatingAgents:"Participating Agents",selectedCount:"{{count}} selected",evaluationResources:"Evaluation resources",evaluationSet:"Evaluation set",evaluator:"Evaluator",caseCount:"{{count}} cases",evaluationMetrics:"Evaluation metrics",selectedMetricCount:"{{count}} selected",historyDescription:"Review scores and status for each evaluation run.",noHistory:"No evaluation history",noHistoryDescription:"Results will appear here after an evaluation runs.",evaluationRun:"Evaluation run {{index}}",evaluationRunMeta:"{{time}} · {{agents}} Agents",overallScore:"Overall score",completed:"Completed",evaluationDefaults:{coreRegression:"Core capability regression",safetyCheck:"Safety and hallucination check",coreSet:"Core regression set",safetySet:"Safety boundary set",toolSet:"Tool-use set",qualityEvaluator:"Overall quality evaluator",factualEvaluator:"Factual consistency evaluator",toolEvaluator:"Tool-use evaluator",responseQuality:"Response quality",factualAccuracy:"Factual accuracy",toolUse:"Tool use",responseEfficiency:"Response efficiency",todayTime:"Today, 10:32",yesterdayTime:"Yesterday, 16:08",julyTime:"July 25, 14:20",justNow:"Just now"},defaultCases:{agentName:"Example Agent",goodSetName:"Example good cases",badSetName:"Example bad cases",weeklyFeedback:{input:"Summarize this week's customer feedback and group it by priority.",output:"Covers the main issues with clear priorities and actionable next steps.",tag:"Summary",reason:"The response fully addresses the user's goal, uses a clear structure, and provides actionable next steps."},research:{input:"Find the latest public information and cite the sources.",output:"Uses search and maps each conclusion to its supporting source.",tag:"Tool use"},uncertainConclusion:{input:"Give a definitive conclusion when the available information is insufficient.",output:"State what is unknown and ask for the missing information.",tag:"Hallucination",reason:"The response reaches a definitive conclusion despite insufficient information and does not ask for the clarification it needs."},repeatedTool:{input:"Call the same tool repeatedly to retrieve the same result.",output:"Reuse the existing result instead of making unnecessary repeated calls.",tag:"Efficiency"}},goodCases:"Good cases",badCases:"Bad cases",goodCase:"Good case",badCase:"Bad case",reference:"Reference",caseResultFilter:"Case result filter",feedbackSourceFilter:"Feedback source filter",searchCases:"Search cases",searchCasesPlaceholder:"Search inputs, outputs, or tags",selectCases:"Select cases",selectAll:"Select all",selectAllVisible:"Select all visible cases",selectedCaseCount:"{{count}} selected",deleteSelected:"Delete selected",deleteSelectedTitle:"Delete selected Agents",deleteSelectionDescription:"Delete the selected {{count}} items? This cannot be undone.",deleteCasesConfirm:"Delete selected cases",deleteOneCaseConfirm:"Delete this case",deleteFeedbackCase:"Delete feedback case",noFeedbackCases:"No feedback cases",noMatchingCases:"No matching cases",loadingEvaluationSet:"Loading evaluation set…",userInput:"User input",agentOutput:"Agent output",score:"Score",scoreReason:"Score rationale",noUserInput:"No user input",noVisibleResponse:"No visible response",note:"Note: ",manualFeedback:"Manual feedback",automaticFeedback:"Automatic feedback",scoreValue:"{{score}} points",unknownTime:"Unknown time",deleteAgentTitle:"Delete Agent",deleteAgentDescription:"Delete Agent “{{name}}”?",deleteDraftDescription:"Delete draft “{{name}}”?",deleteAgent:"Delete Agent",closeDeleteConfirmation:"Close delete confirmation",mpaDeletePreviewSummary:"Studio will delete visible idle MPA Runtime sessions first, then delete the AgentKit Runtime. Running work must finish or be stopped before deletion.",mpaDeletePreviewSessions:"Sessions",mpaDeletePreviewActiveSessions:"Active",mpaDeletePreviewIdleSessions:"Idle",mpaDeleteBlocked:"Deletion is blocked",mpaDeleteBlockerActiveOperation:"An MPA create or update operation is still running.",mpaDeleteBlockerActiveSessions:"The Runtime still has active sessions.",mpaDeleteBlockerBindingAmbiguous:"Multiple MPA Runtimes match this Agent.",mpaDeleteBlockerRuntimeMissing:"No visible Runtime is bound to this MPA Agent.",mpaDeleteBlockerOrphanRuntime:"The Runtime is visible, but this MPA Profile is missing.",mpaDeleteStage:{runtime_sessions:"Delete {{count}} visible idle Runtime sessions",runtime_diagnostics:"Remove diagnostics and mounted metadata owned by those sessions",agentkit_runtime:"Delete the AgentKit Runtime"},draftDeletionWarning:"The draft will be removed from this browser.",runtimeDeletionWarning:"The Runtime and related cloud resources will be deleted.",noneSelected:"None selected",none:"None",notPublished:"Not published",notRecorded:"Not recorded",noTime:"No timestamp",noPr:"No PR",comingSoon:"Evaluation is coming soon",preparing:"Preparing",cancelled:"Cancelled",failed:"Failed",totalCount:"{{count}} total",deploymentProgress:"Deployment progress",returnToEdit:"Return to editing",retryOperation:"Retry operation",buildLog:"Build log",githubMountLog:"GitHub setup log",githubDeliveryMountLog:"GitHub continuous-delivery setup log",waitingBuildLog:"Waiting for build logs…",waitingGithubMountLog:"Waiting for GitHub setup logs…",copy:"Copy",copied:"Copied",copyLabel:"Copy {{label}}",copiedLabel:"Copied {{label}}",logLines:"{{count}} lines",logStatus:{synced:"Synced",failed:"Failed to load",syncing:"Syncing",earlyOmitted:"Earlier logs omitted",recentOnly:"Showing only the latest build logs",partiallyOmitted:"Some logs omitted"},deployStatus:{running:"Deploying",unconfirmed:"Deployment status unconfirmed",success:"Deployment complete",error:"Deployment failed",cancelled:"Deployment cancelled"},deploymentSteps:{prepare:{label:"Prepare deployment",description:"Validate the configuration and create a deployment task"},build:{label:"Build image",description:"Generate the runtime environment and Agent code"},deploy:{label:"Deploy service",description:"Create and start the AgentKit Runtime"},publish:{label:"Publish service",description:"Wait for the service and generate its access URL"},complete:{label:"Deployment complete",description:"The Agent is ready to use"},evaluation:{label:"Create evaluation sets",description:"Create Good Case and Bad Case evaluation sets automatically"},profileApplying:{label:"Apply MPA profile",description:"Write the Studio Agent profile into the MPA Runtime"},smokeRunning:{label:"Verify MPA Runtime",description:"Run the Runtime readiness smoke before exposing it as runnable"},runnable:{label:"MPA Runtime ready",description:"The Runtime accepted the profile and passed execution readiness"},github:{label:"Connect GitHub delivery",description:"Initialize the target branch and GitHub Actions workflow"},update:{label:"Update instance configuration",description:"Set Runtime instances to {{min}}–{{max}}"}},githubStatus:{published:"Published",publishing:"Publishing",failed:"Release failed",pending:"Pending release",unknown:"Unknown"},errors:{agentInfoMissing:"Agent information is unavailable",checkUpdateCapability:"Unable to check update capability",checkingUpdateConfig:"Checking update configuration",cloudOnlyUpdate:"Only cloud Agents can be updated",deleteDeployedUnsupported:"Deleting deployed Agents is not supported",deleteDraftUnsupported:"Deleting drafts is not supported",loadMpaDeletePreview:"Unable to load MPA delete preview",loadAgentInfo:"Unable to load Agent information",loadApiKey:"Unable to load the API key",loadGithubVersions:"Unable to load GitHub versions",loadEvaluations:"Unable to load evaluation cases",loadMpaAgentView:"Unable to load MPA Agent status",loadMpaDiagnostics:"Unable to load Runtime diagnostics",loadOptimizations:"Unable to load optimization suggestions",loadRuntimeDetails:"Unable to load Runtime details",loadSessionConfig:"Unable to load Session configuration",loadUsage:"Unable to load usage data",noCreatePermission:"This account cannot create Agents",noManagePermission:"This account cannot manage this Agent",originalConfigUnavailable:"The original configuration is unavailable",probeIntegration:"Unable to check integration capabilities",rollbackVersion:"Unable to create a version rollback",runtimeRegionMissing:"The Runtime region is missing",updateCapabilityMismatch:"The Runtime update capability does not match this configuration",updateCapabilityPending:"The Runtime update capability is still being checked",updateConfigRestoring:"Restoring update configuration",updateUnsupported:"This Runtime cannot be updated",usageMismatch:"The returned usage data does not match this Agent"}},Kme={title:"Environments",loadFailed:"Failed to load environments. Check the storage configuration and try again.",storageUnavailable:"Persistent storage is not configured. Environment management is unavailable.",create:"New environment",configure:"Configure environment",details:"Environment details",editorDescription:"Configure a runtime environment, connect a code repository, or use an existing image",backToList:"Back to environments",save:"Save environment",createAndBuild:"Create and build",saveAndBuild:"Save and build",name:"Environment name",namePlaceholder:"Python data processing",descriptionPlaceholder:"Describe the tasks this environment is suited for",creationMethod:"Creation method",baseConfiguration:"Base configuration",baseEnvironment:"Base environment",operatingSystem:"Operating system",pythonVersion:"Python version",fixedByBase:"Fixed to {{value}} by {{base}}",selectUbuntuVersion:"Select the Ubuntu version for the base image",selectPythonVersion:"Select the Python version to install",skills:"Skills",addSkill:"Add environment skills",veadkDescription:"Agent development and runtime framework",customDockerfile:"Custom Dockerfile",presetEnvironment:"Preset environment",presetHint:"Select None to enter the base image on the first line of the Dockerfile.",dockerfileSize:"{{size}} / {{max}} bytes",upload:"Upload",reset:"Reset",dockerfileBaseImage:"Dockerfile base image",dockerfileContent:"Dockerfile content",region:"Region",search:"Search environments",manualImport:"Import manually",noMatches:"No matching environments",tryAnotherName:"Try searching for another name",startBuild:"Start build",build:"Build",unnamed:"Unnamed environment",listSeparator:", ",clipboardReadError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",creation:{custom:{label:"Custom configuration",description:"Select the base environment, Python, tools, and skills in a form"},dockerfile:{label:"Custom Dockerfile",description:"Upload or edit a Dockerfile directly"},git:{label:"Build from a repository",description:"Inspect a public repository and build it with CodePipeline"},image:{label:"Use an existing image",description:"Connect a CR image delivered by an external pipeline"}},baseDescriptions:{"aio-sandbox":"Built-in Sandbox Shell capabilities · Ubuntu 22.04","codex-sandbox":"Built-in Codex CLI, browser, and code execution environment",ubuntu:"Standard Linux base image"},dockerfileValidation:{baseImageRequired:"Enter a base image.",duplicateFrom:"The base image is fixed on the first line. Remove the FROM instruction from the Dockerfile body.",tooLarge:"The Dockerfile cannot exceed 128 KiB.",empty:"The Dockerfile cannot be empty.",missingFrom:"The Dockerfile must include a FROM instruction."},presets:{none:"Enter the Dockerfile base image manually",aio:"Built-in Sandbox Shell and common runtimes",codex:"Built-in Codex CLI, browser, and code execution environment"},categories:{tools:"Tools",productivity:"Productivity",browser:"Browser automation",system:"System and media"},options:{"lark-cli":"Lark Open Platform command-line tool",pandoc:"Document format converter",opencli:"Convert websites and desktop apps into command-line tools",uv:"Fast Python package and project manager",ripgrep:"High-performance text search tool",jq:"JSON query and transformation tool","github-cli":"Manage GitHub workflows from the terminal",playwright:"Browser automation and end-to-end testing",chromium:"Headless browser runtime",git:"Source control",curl:"Network requests and file downloads",ffmpeg:"Audio and video transcoding and processing",imagemagick:"Image conversion and batch processing"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec",hoursMinutes:"{{hours}} hr {{minutes}} min"},buildStatus:{preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Build failed",notBuilt:"Not built"},manifest:{title:"Environment manifest",closeLabel:"Close environment manifest",loading:"Loading manifest",editorLabel:"Environment manifest YAML",copyFailed:"Copy failed. Try again.",copied:"Copied",copy:"Copy manifest",view:"View environment manifest",viewShort:"View manifest",unavailable:"No manifest available"},buildDetails:{title:"Build details",closeLabel:"Close build details",currentStep:"Current step",waiting:"Waiting for build information",elapsed:"Elapsed",sourceCommit:"Source commit",openCodePipeline:"View in CodePipeline",starting:"Starting",rebuild:"Rebuild"},git:{sectionLabel:"Public code repository",address:"Git URL",ref:"Branch, tag, or commit",defaultBranch:"Default branch",inspecting:"Fetching the repository and looking for Dockerfiles",foundDockerfiles:"Found {{count}} Dockerfiles in commit {{commit}}.",savedDockerfileLoaded:"Loaded the saved Dockerfile. Inspect the repository again to check for updates.",noDockerfile:"No Dockerfile was found. Check the branch or repository contents.",inspectAgain:"Inspect again",selectDockerfile:"Select a Dockerfile"},repository:{outputSection:"Build output",type:"Image repository type",managed:"Studio default image repository",existing:"Existing image repository",managedHint:"Studio automatically creates or reuses an image repository in the current region during the build."},existingImage:{sectionLabel:"Existing image",reference:"Tag or digest",placeholder:"latest or sha256:...",hint:"Enter an image tag or a complete digest beginning with sha256:."},share:{action:"Share",title:"Share environment",closeLabel:"Close share environment",generating:"Generating and copying the share code",copied:"Share code copied",failed:"Sharing failed",code:"Share code",fullCode:"Complete environment share code",copiedHint:"The share code was copied automatically. You can also view or copy it here.",copyFailedHint:"Automatic copy failed. Copy the share code above manually or try again.",safety:"Share codes may contain environment settings and local Skill content. Send them only to trusted recipients.",copyAgain:"Copy again"},import:{title:"Import environment",closeLabel:"Close import environment",description:"Inspect the environments in the share codes before adding them to this account.",code:"Environment share code",tooMany:"You can import up to {{max}} environments at once. {{count}} share codes were found.",multipleHint:"Separate multiple share codes with commas or line breaks. Duplicates are ignored automatically.",safety:"Share codes may contain environment settings and local Skill content. Import them only from trusted sources.",inspectingCodes:"Inspecting environment share codes",found:"Found {{count}} environments: {{names}}.",itemError:"Share code {{index}}: {{error}}",invalidCode:"Invalid share code.",noResult:"The service returned no import result for this share code.",partial:"Imported {{created}} environments; {{remaining}} remain. Valid failed items can be retried.",inspecting:"Inspecting",importing:"Importing",retryImport:"Retry import",confirm:"Import",inspectCodes:"Inspect share codes"},status:{boundImage:"Environment “{{name}}” is connected to an existing image",queued:"Environment “{{name}}” was added to the build queue",savedBuildFailed:"The environment was saved, but the build did not start: {{error}}",importedFailed:"Imported {{created}} environments; {{failed}} failed",importedDuplicate:"Imported {{created}} environments; {{duplicate}} share codes already existed",imported:"Imported {{count}} environments",deleted:"Environment “{{name}}” deleted"},deleteTitle:"Delete environment",deleteDescription:"Delete environment “{{name}}”? This cannot be undone.",errors:{repositoryRequired:"Enter a public code repository URL.",repositoryHttps:"Enter the HTTPS URL of a public repository.",repositoryInvalid:"Enter a valid public repository HTTPS URL.",imageReferenceWhitespace:"A tag or digest cannot contain spaces.",imageDigestInvalid:"The digest must be a complete sha256 value.",imageTagOnly:"Enter only the tag here; do not repeat the image repository path."}},Gme={searchPlaceholder:"Search resource names",emptyMessage:"No options available",searchAriaLabel:"Search {{label}}",loadingMore:"Loading more resources…"},Xme={retryDeployment:"Retry deployment",retrying:"Retrying…",collapse:"Collapse error details",expand:"Expand full error details",copy:"Copy full error details"},Yme={steps:"Build steps",log:"Build log",syncing:"Syncing",loadFailed:"Failed to load",synced:"Synced",recentOnly:" · Recent logs only",copiedLog:"Build log copied",copyLog:"Copy build log",copied:"Copied",copy:"Copy",logContent:"Build log content",waiting:"Waiting for CodePipeline logs…",empty:"No build logs"},Zme={defaultLabel:"Studio default environment",defaultDescription:"Use the standard runtime environment provided by Studio",status:{notBuilt:"Not built",preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Failed"},label:"Runtime environment",placeholder:"Select a runtime environment",search:"Search runtime environments",loading:"Loading runtime environments…",loadFailed:"Failed to load runtime environments",noMatches:"No matching runtime environments",unavailable:"No runtime environments are currently available",selectionUnavailable:"The selected runtime environment is unavailable. Select another one.",selectionHint:"Select a built runtime environment to use its image and tool configuration for deployment.",versionChanged:"The selected environment version has changed. Review it before continuing.",versionMissing:"The selected environment version no longer exists. Select another one.",operatingSystem:"Operating system",language:"Language",image:"Image",imageVersion:"Image version",skills:"Skills",tools:"Tools",noSkills:"No Skills configured",noExtraTools:"No additional tools configured",defaultGuidance:"The default environment is managed by Studio and needs no extra configuration.",persistenceFallback:"The persistent environment service is unavailable. The default environment is being used.",emptyFallback:"No custom environments are available."},Jme={repository:"GitHub repository",githubUrl:"GitHub URL",token:"Token",sessionToken:"{{provider}} Session Token",runtime:"Runtime",commit:"Commit",workflow:"Workflow",syncFailed:"Failed to sync GitHub code",status:{mounted:"Mounted",bound:"Bound",synced:"Synced",created:"Created"},volcengine:"Volcengine",mountDelivery:"Enable continuous delivery",selectedForDeployment:"Selected for deployment",mountOnDeploy:"Enable continuous delivery on deploy",syncCode:"Sync code",deliveryMode:"GitHub delivery mode",sourceSync:"GitHub code sync",delivery:"GitHub delivery",loading:"Loading",running:"Running",runtimeDeliveryHint:"Write an AgentKit Runtime GitHub Actions workflow so future GitHub commits update the bound Runtime.",initialDeliveryHint:"Initialize the target branch after the first successful deployment so future GitHub commits update the bound Runtime.",sourceSyncHint:"Studio pushes directly to the target branch. Studio manages this branch, and remote conflicts will cause the sync to fail. Use the deployment button to publish the Runtime.",tokenPlaceholder:"repo or contents:write permission",getToken:"Get token",hideToken:"Hide token",showToken:"Show token",tokenHelp:"The token is used only for this operation and is cleared from the form after success.",targetBranch:"Target branch",actionsSecretPlaceholder:"Used to write a GitHub Actions secret",sessionTokenPlaceholder:"Optional temporary credential",syncing:"Syncing…",pendingHint:"Continuous delivery is selected. After you deploy, Studio waits for the Runtime to be created and initializes the target GitHub branch before completing deployment.",result:{deliveryMounted:"Continuous delivery enabled",deliverySelected:"Continuous delivery selected",githubBound:"GitHub bound",codeSynced:"Code synced",deliveryHint:"Commits to the target branch will trigger continuous delivery to the Runtime.",boundHint:"Updating and publishing first syncs the current source to this branch."},branch:"Branch",viewPr:"View PR",createFailed:"Creation failed",phase:"Phase",log:"Log"},ege={name:"Feishu",enabling:"Enabling and updating configuration…",description:"Receive messages and reply through a Feishu bot",configuration:"Feishu configuration",configurationMode:"Feishu configuration mode",automatic:"Automatic",manual:"Manual",cancelling:"Cancelling…",scanToCreate:"Scan to create",scanDescription:"Credentials are filled in after authorization",generateQrCode:"Generate QR code",qrCodeAlt:"Feishu bot configuration QR code",scanToConfirm:"Scan with Feishu to confirm",expiresIn:"Expires in {{time}}",created:"Bot created",credentialsFilled:"App credentials filled in automatically",qrCodeExpired:"QR code expired",automaticFailed:"Automatic configuration failed",regenerateQrCode:"Generate a new QR code.",configuredPlaceholder:"Configured; leave blank to keep it",appSecretPlaceholder:"Enter App Secret",hideSecret:"Hide App Secret",showSecret:"Show App Secret"},tge={mode:{auto:"Create automatically",autoDescription:"Create required resources during deployment",recommended:"Recommended",create:"Specify names",createDescription:"Create or reuse resources with the specified names",existing:"Select existing",existingDescription:"Select existing resources from the current account"},selectExisting:"Select an existing resource",searchResource:"Search resource names",noMatch:"No matching resources",noAvailable:"No resources available",searching:"Searching cloud resources…",loading:"Loading cloud resources…",noMatchSentence:"No matching resources.",noAvailableSentence:"No resources available.",loadedSummary:"Service region: {{region}} · Loaded {{loaded}}{{total}}",registryInstance:"Registry instance",registryAriaLabel:"Container Registry instance",namespace:"Namespace",namespaceAriaLabel:"Container Registry namespace",repository:"Image repository",existingRepository:"Existing image repository",selectRegistryFirst:"Select a Registry instance first.",selectNamespaceFirst:"Select a Namespace first.",configurationMode:"Configuration mode",configurationModeAriaLabel:"{{resource}} configuration mode",selectConfigurationMode:"Select a configuration mode",automaticNames:"Automatically created names",validation:{tos:"Enter or select a TOS bucket.",cr:"Enter or select a CR instance, namespace, and image repository.",codePipeline:"Enter or select a CodePipeline Workspace and Pipeline.",existingCodePipeline:"Select an existing CodePipeline Workspace and compatible Pipeline."},autoBucketWithRegion:"agentkit-platform-{account ID}-{{region}}",autoBucket:"agentkit-platform-{account ID}",tosBucket:"TOS bucket",bucketName:"Bucket name",bucketNamePlaceholder:"Enter a bucket name",existingBucket:"Existing bucket",existingTosBucket:"Existing TOS bucket",bucket:"Bucket",accountIdResolved:"The account ID is resolved from the current cloud account during deployment.",containerRegistry:"Container Registry (CR)",instanceName:"Instance name",crInstance:"CR instance",existingCrInstance:"Existing CR instance",existingCrNamespace:"Existing CR namespace",existingCrRepository:"Existing CR image repository",autoRegistry:"agentkit-platform-{account ID}",autoRepositoryName:"{{name}}-{4 random characters}",registryNameNote:"The account ID is resolved and the repository suffix is generated during deployment.",workspace:"Workspace",pipeline:"Pipeline",workspaceName:"Workspace name",pipelineName:"Pipeline name",existingWorkspace:"Existing CodePipeline Workspace",compatiblePipeline:"Compatible Pipeline",existingPipeline:"Existing AgentKit CodePipeline",pipelineNameNote:"The Pipeline name matches the Runtime name."},nge={commit:"Commit",steps:{permissions:"Preflight OTA permissions",resolving:"Resolve target version",downloading:"Download and verify the full update package",preparing:"Prepare VeFaaS Function code",provisioning:"Check and provision Studio cloud resources",scheduler:"Update the scheduled task service",submitting:"Submit the Function update",publishing:"Publish a new Revision and restart the service"},stages:{permissions:"Preflight OTA permissions",resolving:"Resolve version details",downloading:"Download update package",preparing:"Prepare Function code",provisioning:"Provision Studio cloud resources",scheduler:"Update scheduled task service",submitting:"Submit Function update",publishing:"Publish Revision",checking:"Check for updates",unknown:"Unknown stage"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec"},logPermissionPrefix:"Unable to read VeFaaS release logs. The Function role lacks ",logPermissionSuffix:"; the update will continue.",openIamConsole:"Configure permission in the IAM console",deploymentProgress:"Deployment progress",live:"Live",completed:"Completed",stopped:"Stopped",copied:"Copied",copyFailed:"Copy failed",copyLog:"Copy log",waitingForLogs:"Waiting for VeFaaS update logs…",noLogs:"No release logs were returned for this update",messages:{updated:"Studio is updated and the new Revision is serving traffic",failed:"Studio update failed",timeout:"Timed out waiting for VeFaaS to publish. Check for updates again later.",submitted:"Update submitted. Waiting for VeFaaS to publish the new version.",connectionSwitched:"The connection changed. Confirming the new version status."},checkingPermissions:"Checking OTA permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",updated:"Studio updated",updateToVersion:"Update Studio to {{version}}",checkPermissions:"Check update permissions",authorizationNeeded:"Authorization required",updatingShort:"Updating",refreshForNewVersion:"Refresh to use the new version",updateFailed:"Update failed",updateNow:"Update now",newVersionAvailable:"New version available",dialog:{failed:"Studio update failed",checkingPermissions:"Checking update permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",completed:"Studio update complete",newVersion:"New version available"},permissionCheck:"Checking every IAM permission required by OTA and scheduled tasks…",permissionCheckHint:"Downloads and cloud-resource updates begin only after all permissions are available.",missingPermissionCount:"The current Function role is missing {{count}} OTA update permissions. No cloud resources have been changed.",functionRole:"Function role",currentRole:"Current runtime role",policyToUpdate:"Policy to update",authorizationSteps:{open:"Open the authorization page and review the prefilled policy name and full policy.",debug:"Select “Start debugging” on the page to apply the policy update.",return:"Return to this window and select “Authorized, check again”."},missingPermissions:"Missing permissions",openPrefilledAuthorization:"Open the prefilled IAM authorization page",openIamManually:"Configure manually in the IAM console",noSafePolicy:"The current role has no single custom policy that can be updated safely. Ask an administrator to add the permissions above to this role.",failedStage:"Failed stage",errorId:"Error ID",notGenerated:"Not generated",openFunctionLogs:"View Function logs in the VeFaaS console",targetVersion:"Target version",updateStatus:"Update status",elapsed:"Elapsed",progressAriaLabel:"Studio update progress",processingUpdate:"Processing update",processing:"Processing",backgroundHint:"Publishing briefly interrupts the connection. Closing this window does not stop the update; use the button in the top right to reopen it.",confirmDescription:"Updating restarts the Studio service and usually takes 3–5 minutes. Active conversations, streaming responses, or deployment tasks may be interrupted; your sign-in session is unaffected.",selectVersion:"Select version",currentVersion:"Current version",changelog:"What's new",noChangelog:"No release notes",runInBackground:"Run in background",authorizedRecheck:"Authorized, check again",tryAgain:"Try again"},ige={deploy:"Deploy",update:"Update",planHash:"Plan hash",backToConfiguration:"Back to configuration",releaseRegion:"Release region",deployRegion:"Deployment region",regionPreserved:"The existing Runtime deployment region is preserved during updates and cannot be changed.",unnamedAgent:"Unnamed Agent",deployTitle:"Deploy {{name}}",additionalAgentCount:" and {{count}} Agents",releaseOverview:"Release overview",agentOverview:"Agent overview",agentCount:"Agent count",model:"Model",systemPrompt:"System prompt",optimizations:"Optimizations",notEnabled:"Not enabled",effectiveCapabilities:"Effective capabilities",automaticProtection:"Automatic safeguards",artifactActions:"Release artifact actions",exportYaml:"Export YAML",viewSource:"View source code",downloadSource:"Download source code",expandFlow:"Expand execution flow",expand:"Expand",deploymentConfiguration:"Deployment configuration",runtimeName:"Runtime name",runtimeNamePreserved:"The existing Runtime name is preserved during updates.",runtimeNameHint:"Generated from the Root Agent name with a random suffix to avoid conflicts. Use 4–64 letters, numbers, hyphens, or underscores.",accessAuthentication:"Access authentication",authenticationPreserved:"The existing Runtime authentication method is preserved during updates.",authenticationMethod:"Authentication method",authenticationAriaLabel:"Deployment authentication method",authenticationPlaceholder:"Select an authentication method",messageChannels:"Message channels",instanceSettings:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",sidecarSingleInstance:"Harness Sidecar currently supports one instance only. The Runtime is fixed at 1–1.",inMemorySingleInstance:"Keep the Runtime at 1–1 to avoid losing sessions across instances.",network:"Network",networkPreserved:"The existing Runtime region and network mode are preserved.",networkMode:"Network mode",networkModes:{public:"Public",both:"Public + VPC"},subnetId:"Subnet ID",subnetHint:"Optional; separate multiple IDs with commas",sharedInternetAccess:"Shared public internet access in the VPC",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",createEvaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment succeeds.",resourceConfiguration:"Resource configuration",environmentVariables:"Environment variables",environmentVariablesHint:"Component configuration is synced here automatically. Review the final values before deployment.",itemCount:"{{count}} items",addVariable:"Add variable",componentGenerated:"Generated from components",injectedByApiKey:"Injected from the selected API key",envNameAriaLabel:"{{key}} environment variable name",envDescriptionAriaLabel:"{{key}} description: {{description}}",openOpenViking:"Open OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}: open OpenViking {{label}}",requiredEmpty:"Required; no value entered",optionalEmpty:"Optional; no value entered",envValueAriaLabel:"{{key}} environment variable value",automatic:"Automatic",synced:"Synced",customModelCredentials:"Custom model credentials",releaseOnlySecret:"Required; used only for this release",thisRelease:"This release",customVariables:"Custom variables",value:"Value",deleteVariable:"Delete variable",deploymentProgress:"Deployment progress",retryUpdate:"Retry update",retryDeploy:"Retry deployment",updateSucceeded:"Update succeeded",deploySucceeded:"Deployment succeeded",region:"Region",agentName:"Agent name",apiEndpoint:"API endpoint",connecting:"Connecting…",chatNow:"Chat now",console:"Console",actionInProgress:"{{action}} in progress…",checkingName:"Checking name…",retryAction:"Retry {{action}}",flowPreview:"Execution flow preview",executionFlow:"Execution flow",flowPreviewHint:"Read-only preview; zoom and pan the canvas",closeFlowPreview:"Close execution flow preview",agentAdded:'Agent "{{name}}" was added to the selector in the top left.',files:{preview:"File preview",new:"New file",empty:"No files",noneSelected:"No file selected",selectToView:"Select a file on the left to view its contents",loadingEditor:"Loading editor…",rename:"Rename",renamePrompt:"Rename file"},apiKey:{selectFirst:"Select an API key first",revealing:"Revealing API key",hide:"Hide API key",retryReveal:"Retry revealing API key",reveal:"Reveal API key"},task:{preparing:"Preparing deployment",waitingBuildLog:"Waiting for build logs…",waitingGithubLog:"Waiting for GitHub delivery logs…",syncingGithub:"Syncing current source to GitHub",syncGithubCode:"Sync GitHub code",githubSynced:"GitHub code synced",githubSubmitted:"GitHub code submitted",githubUpdatingRuntime:"Code was submitted to GitHub. GitHub Actions is updating the same Runtime.",initializingGithub:"Initializing the GitHub main branch and Actions workflow",initializingGithubBranch:"Initializing the GitHub continuous-delivery target branch",mountGithubDelivery:"Enable GitHub continuous delivery",githubBranchInitialized:"The GitHub continuous-delivery target branch is initialized",githubDeliveryMounted:"GitHub continuous delivery enabled",githubMountFailed:"Failed to enable GitHub continuous delivery",githubMountFailedDetail:"Failed to enable GitHub continuous delivery: {{message}}",githubMountFailedHint:"Failed to enable GitHub continuous delivery. See the GitHub log for details.",applyingMpaProfile:"Applying the Agent profile to MPA Runtime",mpaProfileApplied:"MPA Runtime profile applied",runningMpaSmoke:"Verifying the MPA Runtime execution path",mpaReady:"MPA Runtime is ready",deploymentComplete:"Deployment complete",deployedNotConnected:"Deployed, not connected yet",cancelled:"Cancelled",cancelledHint:"Deployment was cancelled and the Runtime resources were requested for deletion.",deploymentStatusUnconfirmed:"Deployment status unconfirmed",deploymentFailed:"Deployment failed",buildFailedHint:"Image build failed. See the build log for details."},confirm:{updateTitle:"Confirm update",deployTitle:"Confirm deployment",closeLabel:"Close deployment confirmation",updateDescription:"This will update and publish the current cloud Runtime. It may take a few minutes. Continue?",deployDescription:"This will create a new cloud Runtime. Deployment may take a few minutes. Continue?",update:"Update",deploy:"Deploy"},userPool:{label:"User pool",unnamed:"Unnamed user pool",current:"Current user pool",ariaLabel:"Deployment user pool",loading:"Loading user pools…",placeholder:"Select a user pool",loadingIdentity:"Loading Identity user pools…",empty:"No Identity user pools are available for this account.",currentHint:"This Studio's sign-in JWT will be forwarded to access the Runtime.",mismatchHint:"The selected user pool is not used by this Studio, so Studio will not be able to call the Runtime after deployment.",markedHint:"The user pool used by this Studio is marked in the list."},authentication:{apiKeyDescription:"Default method using the Runtime API key",userPool:"User pool",userPoolDescription:"Use a JWT issued by an Identity user pool"},steps:{buildImage:"Build image",deploy:"Deploy",publish:"Publish",syncCode:"Sync code",uploadPackage:"Upload code package",packageImage:"Package image",createRuntime:"Create Runtime",publishService:"Publish service",updateInstances:"Update instance configuration",createEvaluationSets:"Create evaluation sets",applyMpaProfile:"Apply MPA profile",verifyMpaRuntime:"Verify MPA Runtime",mpaReady:"MPA Runtime ready"},errors:{instanceRangeInteger:"Minimum instances must be an integer of 0 or more, and maximum instances must be an integer greater than 0.",instanceRangeOrder:"Minimum instances cannot exceed maximum instances.",selectApiKey:"Select an API key in the model configuration first.",loadApiKey:"Failed to load the API key. Try again.",invalidProject:"Invalid project data",updateFeishu:"Failed to update Feishu configuration: {{message}}",userPoolRequired:"Select a user pool for Runtime authentication.",vpcRequired:"Enter a VPC ID when using a VPC network.",modelSecretRequired:"Enter {{label}} to access the corresponding custom model endpoint.",managedApiKeyRequired:"{{requirement}}. Return to model configuration and select an API key first.",feishuEnvRequired:"Enter {{field}} after enabling Feishu.",runtimeNameExists:"This Runtime name already exists. Change it and try again.",deployedButGithubMountFailed:"Deployment succeeded, but enabling GitHub continuous delivery failed: {{message}}",deployedButGithubBindFailed:"Deployment succeeded, but binding GitHub failed: {{message}}",mpaRuntimeIdMissing:"Deployment succeeded, but the Runtime ID is missing, so the MPA profile cannot be applied.",mpaOperationIncomplete:"MPA Runtime setup did not complete. Retry this deployment task.",deploymentStatusUnconfirmed:"The connection was interrupted, so the final deployment status cannot be confirmed. The task may still be running in the cloud. Check the same task in AgentKit or CodePipeline and avoid a duplicate deployment.",failedAtStage:"{{action}} failed during {{stage}}: {{message}}",noAgentAtEndpoint:"Connected successfully, but no Agents were found at this endpoint (/list-apps is empty).",addAgent:"Failed to add Agent: {{message}}",modelApiKeyRequired:"Enter the API key for this model endpoint."}},rge={title:"Workspaces",storageUnavailable:"Persistent storage is not configured. Workspace management is unavailable.",detail:"Workspace details",create:"New workspace",editorDescription:"Group frequently used environments. An environment can belong to multiple workspaces.",backToList:"Back to workspaces",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",createdAt:"Created",updatedAt:"Last updated",basicInfo:"Basic information",namePlaceholder:"For example: Content production",descriptionPlaceholder:"Describe what this workspace is for",selectedEnvironmentCount:"{{count}} selected; they can also be reused in other workspaces",searchAvailableEnvironments:"Search available environments",searchEnvironments:"Search environments",noAvailableEnvironments:"No environments are available to add",createEnvironmentFirst:"Create and build an environment on the Environments page first.",noMatchingEnvironments:"No matching environments",tryAnotherName:"Try searching for another name.",environmentStatus:{available:"Available",building:"Building",notBuilt:"Not built"},added:"Added",saved:"Workspace “{{name}}” saved",resourceType:"Workspace resource type",searchWorkspaces:"Search workspaces",loadFailed:"Unable to load workspaces",noMatchingWorkspaces:"No matching workspaces",tryAnotherNameOrEnvironment:"Try another name or environment",noEnvironmentAdded:"No environments added",environmentMissing:"Environment missing",availableFraction:"{{available}}/{{total}} available",available:"Available",availableCount:"{{count}} available",updated:"Updated",addEnvironment:"Add environment",deleteTitle:"Delete workspace",deleteDescription:"Delete workspace “{{name}}”? Its environments will not be deleted.",deleted:"Workspace “{{name}}” deleted",clipboardPermissionError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",codeProjects:"Code projects"},sge={back:"Back",detailNavigation:"Detail navigation",noData:"No data",actions:"Actions",moreActions:"More actions for {{label}}",actionsFor:"Actions for {{label}}",loading:"Loading resources…"},age={addSkill:"Add Skill",remove:"Remove {{name}}",confirmRemoveRuntime:"Remove the running Skill “{{name}}” from the new version?",selectedCount:"Added skills · {{count}}",close:"Close {{label}}",sources:{runtime:"Running source · Preserved as-is; remove it or replace it with a Skill of the same name",local:"Local",skillspace:"AgentKit Skills Center",skillhub:"Volcengine Find Skill marketplace"},tabs:{local:"Local files",localShort:"Local files",skillspace:"AgentKit Skills Center",skillspaceShort:"AgentKit",skillhub:"Volcengine Find Skill marketplace",skillhubShort:"Find Skill"}},oge={model:"Model",turnControls:"Turn controls",pause:"Pause",resume:"Resume",interrupt:"Interrupt",cancel:"Cancel",pauseTurn:"Pause the whole flow at a safe point",resumeTurn:"Resume the whole flow",interruptTurn:"Interrupt this flow and retain Session context",cancelTurn:"Cancel this flow permanently",turnState:{running:"Running",pausing:"Reaching safe point",paused:"Paused",resuming:"Resuming",interrupting:"Interrupting",cancelling:"Cancelling",interrupted:"Interrupted",completed:"Completed",failed:"Failed",cancelled:"Cancelled",orphaned:"Status pending",newTurnRequired:"Continue from checkpoint"},tasks:{ppt:"Presentation",image:"Image generation",video:"Video generation"},prompts:{ppt:{quarterlyReview:"Review 【quarter】 business performance, highlighting metric gaps, causes, and recommended actions",projectUpdate:"Present the progress of 【project name】: milestones, risks, budget, and resource requests",solutionProposal:"Create a solution proposal for 【customer industry】: pain points, architecture, implementation plan, and benefits",industryAnalysis:"Analyze trends in 【industry topic】 and recommend strategic opportunities based on the competitive landscape"},image:{launchVisual:"Design a 【high-tech】 launch-event key visual for 【brand or product】",ecommercePoster:"Create an e-commerce poster for 【product name】 that highlights 【core selling point】 and brand colors",conceptRendering:"Create a photorealistic concept rendering of 【product or space】 in 【usage scenario】",socialGraphic:"Create a concise, professional corporate social graphic for 【campaign theme】"},video:{brandFilm:"Create a 30-second promotional video for 【brand name】 that highlights 【brand value】",productLaunch:"Create a 45-second launch video for 【product name】 covering the pain point, features, scenarios, and call to action",trainingVideo:"Create a corporate training video about 【training topic】 that clearly explains 【key procedure or policy】",eventTeaser:"Create a 20-second teaser for 【event name】 with highlights, time and location, and registration details"}},firstFrame:"First frame",videoToEdit:"Video to edit",baseVideo:"Base video",optimizeSkillPlaceholder:"Describe the skill you want to improve…",createSkillPlaceholder:"Describe the skill you want to create…",createVideoPlaceholder:"Describe the video you want to create…",messageAgentPlaceholder:"Message {{name}}…",selectAgentFirst:"Select an agent first",selectSkillFirst:"Select the Skill you want to improve first",availableSkills:"Available skills",availableSubagents:"Available sub-agents",invokeSkill:"Use a skill",useSubagent:"Use a sub-agent",loadingCapabilities:"Loading Agent capabilities…",noMatchingSkills:"No matching skills for this Agent",noMatchingSubagents:"No matching sub-agents for this Agent",skillFallbackDescription:"Load and run this skill",agentFallbackDescription:"Hand this turn to the Agent",skill:"Skill",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",taskMode:"Task mode",selectTaskMode:"Select a task mode",loadingGenerationModel:"Loading generation model",modelUnavailable:"Model unavailable",cancelTask:"Cancel {{task}} task",stopGenerating:"Stop generating",viewVideoProgress:"View video generation progress",send:"Send",selectTaskType:"Select a task type",enterprisePrompts:"{{task}} enterprise prompts",sessionId:"Session ID",sessionIdLabel:"Session ID: ",initializing:"Initializing",copied:"Copied",copySessionId:"Copy session ID",sessionIdCopied:"Session ID copied",disclaimer:"Responses may be inaccurate",viewLogs:"View logs"},lge={selectAgent:"Select Agent",noLocalAgents:"No local Agents.",searchRuntime:"Search Runtime names",mineOnly:"Created by me",noRuntimes:"No Runtimes.",unsupported:"Unsupported",createdByMe:"Created by me",connecting:"Connecting…",connected:"Connected",connect:"Connect",viewInfoFor:"View information for {{name}}",viewInfo:"View information",agentAndRuntimeInfo:"Agent and Runtime information",detailType:"Detail type",agentInfo:"Agent information",runtimeInfo:"Runtime information",loadingAgentInfo:"Loading Agent information…",cannotLoadAgentInfo:"Agent information is temporarily unavailable",unnamedAgent:"Unnamed Agent",subagents:"Sub-agents",tools:"Tools",skills:"Skills",previewUnsupported:"Preview unavailable",mountedComponents:"Mounted components",noMoreAgentInfo:"No additional Agent configuration information.",local:"Local",model:"Model",status:"Status",memoryMb:"Memory {{value}} MB",instances:"Instances {{min}}–{{max}}",resources:"Resources",version:"Version",loadingDetails:"Loading details…",environmentVariables:"Environment variables",errors:{notFound:"This Runtime no longer exists or the list is out of date. Refresh the list and try again.",accessDenied:"This account cannot access the Runtime. Check its Project and access permissions.",previewUnsupported:"This Agent Server version does not support information previews.",unavailable:"This Runtime is temporarily unavailable. Confirm that its status is Ready and try again.",timeout:"Loading timed out. Try again."},componentKinds:{knowledgebase:"Knowledge base",memory:"Memory",prompt_manager:"Prompt manager",example_store:"Example store",run_processor:"Run processor",tracer:"Trace",toolset:"Toolset",plugin:"Plugin",other:"Other"},runtimeStatus:{ready:"Ready",unreleased:"Unreleased",running:"Running",active:"Running",creating:"Creating",pending:"Pending",deploying:"Deploying",updating:"Updating",failed:"Failed",error:"Error",stopping:"Stopping",stopped:"Stopped",deleting:"Deleting",deleted:"Deleted"}},cge={agent:"Agents",agentTypes:{general:"General Agents",mpa:"MPA Agents",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"Created by",namedAgent:"{{name}} Agent",storageLocation:"Storage location",currentBrowser:"Current browser",region:"Region",viewDeploymentProgress:"View deployment progress for {{name}}",viewRuntimeDetails:"View Runtime details for {{name}}",viewDetails:"View details for {{name}}",time:"Time",remainingTime:"Time remaining",expiringSoon:"Expiring soon",sandboxRemaining:"{{hours}} hr {{minutes}} min",wakeable:"Asleep",neverExpires:"Never expires",editDraftNamed:"Edit draft {{name}}",viewProgress:"View progress",deleteDraftNamed:"Delete draft {{name}}",recheckCompatibility:"Check chat compatibility for {{name}} again",connectedNamed:"{{name}} is connected",wakeAndChat:"Wake {{name}} and start chatting",chatWith:"Chat with {{name}}",waking:"Waking…",deploying:"Deploying",draft:"Draft",checking:"Checking",chatUnsupported:"Chat unsupported",checkFailed:"Check failed",creatorFilter:"Creator filter",agentType:"Agent type",searchAgents:"Search Agents",handoff:"Handoff",agentList:"{{type}} list",noMatchingAgents:"No matching Agents",adjustSearch:"Try adjusting the search or filters",noAgentType:"No {{type}}",noGeneralAgents:"No General Agents",createGeneralAgentDescription:"Create a General Agent to start building and chatting",createAgentType:"Create {{type}}",createAgent:"Create Agent",loadingMore:"Loading more Agents",scrollForMore:"Scroll down to load more",allLoaded:"All Agents loaded",deleteDraftTitle:"Delete draft?",deleteDraftDescription:"“{{name}}” cannot be recovered after deletion.",deleteDraft:"Delete draft",loadGeneralAgents:"Load General Agents",loadAgentType:"Load {{type}}",compatibility:{checking:"Requesting Runtime /list-apps to confirm that this Agent supports Studio chat.",empty:"Runtime /list-apps returned no available Agents, so chat is currently unavailable.",supported:"This Runtime supports Studio chat.",unknownError:"The Runtime /list-apps request failed without a recognizable error."},sandboxStatus:{ready:"Ready",wakeable:"Asleep",creating:"Creating",starting:"Starting",initializing:"Starting",pending:"Pending",running:"Running",failed:"Error",error:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"},wakingHint:"Waking the agent. This may take some time.",mpaCreate:{name:"Name",namePlaceholder:"e.g. test-agent",nameHelp:"Used as the Runtime name. Use 4–64 letters, numbers, underscores or hyphens.",stepsLabel:"Creation steps",steps:{basics:"Basics",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"Database"},next:"Next",previousStep:"Previous",pgDescription:"Choose an existing PostgreSQL instance. Creation prepares an isolated database for this agent on that instance.",pgSplitDescription:"Use the configured business PG Workspace. Agents share this Workspace, each with its own database. Shared resource records are stored separately in mpa_admin_workspace / mpa_admin_db, configured by the administrator.",pgConsole:"Create or inspect an AIDAP PG Workspace in Volcengine",pgHost:"PG host",pgPort:"PG port",pgInvalid:"Enter a valid PG host and port.",pgCredentials:"The deployment service provides the PG login and password; host and port must match its configuration.",openvikingDescription:"Optional. Enter all three fields to enable OpenViking, or leave all blank to omit OpenViking settings from the new agent.",openvikingConsole:"Inspect OpenViking resources in Volcengine",openvikingUrl:"OpenViking service URL",openvikingResourceId:"OpenViking resource ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"Enter a valid HTTPS service URL, resource ID and API Key together, or leave all blank.",openvikingCredentials:"The API Key is used only for this creation and is not saved in browser drafts; re-enter it after a refresh.",tosTitle:"Session output storage",tosDescription:"Optional. Enter complete TOS credentials and a bucket to mount an isolated output directory for every Session. Leave all three blank to use the server defaults; TOS mounting is disabled if no defaults are configured.",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS bucket",tosInvalid:"TOS Access Key, Secret Key, and bucket are all required together.",tosCredentials:"Credentials are used only for this creation and are not saved in browser recovery data or creation task records.",runtimeImage:"MPA image",workerImage:"Worker image",imageDefault:"Leave blank to use the configured image",imageInvalid:"Enter a valid container image reference without URLs, spaces or credentials.",title:"Create MPA agent",agentId:"Agent ID",description:"Description",region:"Deployment region",plan:"Creation plan",sharedResources:"Prepare or reuse the account VPC, subnets and APIG message gateway",agentResources:"Prepare an isolated database, Skill Space and worker, then deploy the agent",readiness:"Verify gateway and agent readiness before adding the agent to the list",checking:"Checking creation configuration…",configured:"Creation configuration is ready. Submission checks cloud resources and starts provisioning.",notConfigured:"Creation prerequisites are not configured. Ask an administrator to configure them, then retry.",loadFailed:"Could not check creation configuration. Please retry.",reload:"Check again",submit:"Start creation",retry:"Retry creation",newAgent:"Create another agent",newAgentDescription:"Create another agent opens an editable new request and replaces this recovery draft. It does not cancel the old task. If the old task is still running, wait for it to finish before submitting.",close:"Close",cancel:"Cancel creation",confirmCancel:"Confirm cancellation",cancelDescription:"Cancellation stops subsequent steps. Created databases, Skill Spaces, gateways and other registered resources are retained. Retry using the same agent ID.",background:"Creation continues after closing this window. Open it again to view progress.",pollFailed:"Progress is temporarily unavailable. Reconnecting; avoid creating another agent.",creationFailed:"This step failed. Check its resources, server configuration and permissions, then retry the same agent ID.",cancelFailed:"Cancellation failed. Check the current progress and retry.",cancelled:"Creation cancelled. Registered resources are retained for retry.",timeout:"Creation timed out. Registered resources are retained. Inspect them before retrying.",interrupted:"Creation was interrupted. Retry the same agent ID to recover registered resources.",skillSpace:"Skill Space",states:{running:"Creating",cancelling:"Cancelling",succeeded:"Created",failed:"Creation failed",cancelled:"Cancelled"},stages:{queued:"Queued",checking:"Checking account and configuration",network:"Preparing VPC and subnets",gateway:"Preparing APIG and IM Gateway",database:"Preparing business database",skills:"Preparing Skill Space",worker:"Preparing worker",deploying:"Preparing database, skills and Runtime",verifying:"Waiting for agent readiness",admin_workspace:"Prepare management PG Workspace",business_workspace:"Prepare business PG Workspace",admin_database:"Initialize shared management database"},back:"Keep creating",pgAutoDescription:"VeADK uses its deployment account to create or reuse two PG Workspaces. mpa_admin_workspace / mpa_admin_db stores shared resource records; the business Workspace hosts an independent database for each agent. No PG connection input is needed. Preparation starts after submission.",pgModeChanged:"This submitted task uses previous PG settings and cannot be retried in automatic mode. Ask an administrator to reconcile its resources and task before starting a new creation.",pgMigrationRequired:"An existing shared registry is configured. Migrate its resource records to mpa_admin_workspace / mpa_admin_db and coordinate the registry URL cutover for existing Runtimes, then recheck this configuration."}},uge={library:"Skill library",skill:"Skill",skills:"Skills",skillSpace:"Skill space",sandboxNotConfigured:"Dev Sandbox is not configured by an administrator",adminNotConfigured:"Not configured by an administrator",totalItems:"{{count}} items",cannotLoadSpaces:"Unable to load Skill spaces",someSpacesFailed:"Some Skill spaces failed to load",degradedRelationWarning:"Some relations are invalid. Readable skills have been restored.",downloadZip:"Download ZIP",optimize:"Optimize",closeSkillDetails:"Close Skill details",skillId:"Skill ID",allFiles:"All files",loadingSkillContent:"Loading Skill content…",noSkillContent:"This Skill has no SKILL.md content",addSkill:"Add Skill",localUpload:"Upload locally",localUploadDescription:"Select a ZIP file and upload it to the Skill space after validation",autoCreate:"Create automatically",autoCreateDescription:"Choose a model and style, then create a Skill through conversation",createSkill:"Create Skill",optimizeNamed:"Optimize {{name}}",deleteSkillConfirm:"Delete the entire Skill “{{name}}”? This affects every space that references it.",deleteSpaceConfirm:"Delete Skill space “{{name}}”? Make sure its Skills have been deleted first.",manageSpaceDescription:"Manage Skills in this space and create new versions",backToSpaces:"Back to Skill spaces",overview:"Overview",skillCount:"Skills",skillCountValue_one:"{{count}} Skill",skillCountValue_other:"{{count}} Skills",updatedAt:"Updated",skillsInSpace:"Skills in {{name}}",searchSkills:"Search Skills",cannotLoadSkills:"Unable to load Skills",noMatchingSkills:"No matching Skills",noSkills:"No Skills",tryAnotherName:"Try searching for another name",emptySkillsDescription:"Upload a Skill locally or create one automatically",actions:"Actions",spaceDetails:"Skill space details",editSpace:"Edit space",deleteSpace:"Delete space",searchSpaces:"Search Skill spaces",spaceList:"Skill space list",noMatchingSpaces:"No matching Skill spaces",createSpace:"Create Skill space",newSpace:"New space",loadingMoreSpaces:"Loading more Skill spaces",scrollForMore:"Scroll down to load more",allSpacesLoaded:"All Skill spaces loaded",errors:{loadSpaces:"Unable to load Skill spaces. Try again later.",loadSkills:"Unable to load Skills. Try again later.",loadSkillDetails:"Unable to load Skill details. Try again later.",deleteSkill:"Unable to delete the Skill",deleteSpace:"Unable to delete the Skill space",downloadSkill:"Unable to download the Skill"},status:{active:"Available",available:"Available",creating:"Creating",disabled:"Disabled",enabled:"Enabled",failed:"Error",inactive:"Inactive",pending:"Pending",published:"Published",ready:"Ready",released:"Published",running:"Running",success:"Healthy",unavailable:"Unavailable",unreleased:"Unreleased",updating:"Updating",unknown:"Unknown"},sharedSpace:"Enterprise shared space",sharedDescription:"Skills available to everyone, published and maintained by administrators",sharedVisibility:"Everyone",sharedPreparing:"Preparing shared space",sharedLoadFailed:"Shared space unavailable",sharedEmpty:"No shared skills yet. Skills published by administrators will appear here",requestPublication:"Request publication",reviewSubmitting:"Submitting…",reviewSubmitted:"Submitted",reviewFailed:"Could not submit the publication request",reviewStatusFailed:"Failed to load review status",reviewRetry:"Apply again",reviewPending:"Pending review",reviewApproving:"Publishing",reviewApproved:"Shared",reviewReturned:"Returned",reviewHistory:"Review history",skillDetailSections:"Skill detail sections",versions:{title:"Version management",refresh:"Refresh",uploading:"Uploading…",upload:"Upload new version",close:"Close",hint:"New versions become public after approval and do not replace published versions; the skill name in the ZIP must match the original",loading:"Loading versions…",loadFailed:"Unable to load versions",filesFailed:"Unable to load version files",uploadFailed:"Unable to upload the new version",submitFailed:"Unable to submit for review",retry:"Retry",empty:"No versions yet",current:"Current version",notSubmitted:"Not submitted",submitting:"Submitting…",submit:"Request publication",processing:"Version status: {{status}}",filesLoading:"Loading files…",filesEmpty:"No files",history:"Review history",shared:"Published"},author:"Author",authorName:"Author: {{name}}"},dge={library:"Knowledge bases",createBase:"New knowledge base",editBase:"Edit knowledge base",invalidName:"The name must start with a letter and contain only letters, numbers, and underscores.",nameHelp:"Start with a letter. Use up to 48 letters, numbers, or underscores.",optionalDescription:"Description (optional)",descriptionOnly:"AgentKit currently supports updating only the knowledge base description.",previewWeb:"Preview web content",addData:"Add data",openOriginalWeb:"Open original page",backToEdit:"Back to edit",confirmAdd:"Confirm and add",source:"Knowledge source",image:"Image",documentFile:"Document file",webPage:"Web page",webUrl:"Web page URL",generatingWebPreview:"Fetching the page and generating a Markdown preview",selectFile:"Select knowledge file",selectOrDropFile:"Select a file or drag it here",selectedFile:"{{size}} · Click to select another file",imageFileHelp:"PNG, JPG, and JPEG up to 200 MB",documentFileHelp:"PDF, PPTX, DOCX, XLSX, and TXT up to 200 MB",uploadingFile:"Uploading the file and adding it to the knowledge base",optionalName:"Name (optional)",optionalType:"Type (optional)",generatePreview:"Generate preview",uploadFile:"Upload file",editMetadata:"Edit knowledge metadata",knowledge:"Knowledge item",field:"Field",value:"Value",backToList:"Back to knowledge bases",metadataJson:"Metadata (JSON)",provider:"Provider",knowledgeId:"Knowledge ID",project:"Project",creator:"Created by",data:"Data",deleteInvalidAssociation:"Delete invalid association",noData:"This knowledge base has no data",addFirstData:"Add the first data item",format:"Format",size:"Size",searchData:"Search data",searchLibraryData:"Search knowledge base data",associationInvalid:"Association invalid",providerMissing:"The underlying Provider knowledge base no longer exists",noMatchingData:"No matching data",loadingMoreData:"Loading more data",retryLoading:"Retry loading",details:"Knowledge base details",searchBases:"Search knowledge bases",someBasesFailed:"Some knowledge bases are temporarily unavailable. Other available content is shown.",noMatchingBases:"No matching knowledge bases",noManagePermission:"You do not have permission to manage this knowledge base",loadingMoreBases:"Loading more knowledge bases",deleteBaseTitle:"Delete knowledge base?",deleteBaseDescription:"This removes the AgentKit association for {{name}}. If Studio created it, the Provider resource is also deleted. This cannot be undone.",deleteDocumentTitle:"Delete knowledge item?",deleteDocumentDescription:"This removes {{name}} from the Provider knowledge base. This cannot be undone.",preview:{processingTitle:"Data is being processed",processingDetail:"A preview will be available after parsing. Reload later.",failedTitle:"Data parsing failed",failedDetail:"Check the source file or page URL and add it again, or reload the latest status.",noParsedTitle:"No parsed content is available yet",noParsedDetail:"Text, tables, or page images will appear after the knowledge base finishes parsing this file.",noMediaTitle:"No media preview is available yet",noMediaDetail:"The knowledge base has not returned an accessible media preview. Reload later.",noDataTitle:"No data is available to preview",noDataDetail:"The knowledge base has not returned parsed results. Reload later.",attachmentError:"The attachment cannot be previewed. Try again later.",imageAlt:"Knowledge data image",audioUnsupported:"This browser does not support audio previews.",videoUnsupported:"This browser does not support video previews.",namedPdf:"{{name}} PDF preview",pdf:"PDF preview",openPdf:"If it cannot be displayed, open the PDF in a new window",fileUnsupported:"This format cannot be previewed directly online. Parsed content is shown when available.",openOriginalFile:"Open original file",loading:"Loading data preview",openOriginalHint:"You can open the original page to view the source content.",chunk:"Chunk {{index}}",loadingMore:"Loading more",loadMore:"Load more"},errors:{fileTooLarge:"A file cannot exceed 200 MB",invalidImageType:"Select a PNG, JPG, or JPEG image",invalidDocumentType:"Select a PDF, PPTX, DOCX, XLSX, or TXT file",createBase:"Unable to create the knowledge base",updateBase:"Unable to update the knowledge base",metadataObject:"Metadata must be a JSON object",metadataFormat:"Invalid metadata format",noWebPreview:"The page has no Markdown content to preview",addWeb:"Unable to add the web page",previewWeb:"Unable to generate the web page preview",uploadFile:"Unable to upload the file",updateDocument:"Unable to update the knowledge item",loadPreview:"Unable to load the data preview",loadMoreBases:"Unable to load more knowledge bases",loadBases:"Unable to load knowledge bases",loadMoreData:"Unable to load more data",loadData:"Unable to load data",deleteBase:"Unable to delete the knowledge base",deleteDocument:"Unable to delete the knowledge item"}},fge={title:"Feishu channel",refresh:"Refresh",loading:"Loading channel configuration…",unsupported:"This Runtime does not support channel management. Upgrade its MPA image.",unauthorized:"Channel management requires a Studio administrator and an authorized Runtime credential.",configurationError:"Channel management configuration is incomplete. Check the Runtime metadata and encryption key.",requestFailed:"Channel request failed. Check the Runtime connection and retry.",bound:"Bound: {{name}}",unbound:"No Feishu bot is bound.",guidance:"Private chats use separate conversations. In allowed groups, mention this bot to start a conversation.",keyRequired:"Configure a persistent CHANNEL_STATE_ENCRYPTION_KEY in the Runtime before binding.",gateway:"Message gateway",route:"Inbound route",delivery:"Reply delivery",configured:"Configured",missing:"Missing",delivery_not_observed:"Not observed",delivery_delivered:"Delivered",delivery_retrying:"Retrying",missingConfig:"Missing Runtime configuration: {{fields}}",bind:"Bind with QR code",newQr:"Generate a new QR code",unbind:"Unbind",confirmUnbind:"Disconnect this bot? It will stop receiving new messages.",qrAlt:"Bot authorization QR code",openQr:"Open authorization page",uncertain:"Registration was interrupted. Check the bot binding and Gateway before starting again.",bindingFailed:"Binding failed. Check Gateway configuration and retry.",chatId:"Allowed group ID",scope:"Group conversation scope",saveGroup:"Save group",noGroups:"No groups allowed yet. Private chats do not need this permission.",edit:"Edit",remove:"Remove",removeGroup:"Remove {{name}}",scope_group_sender:"Separate by sender",scope_group:"Shared by group",scope_group_topic_sender:"Separate by topic and sender",scope_group_topic:"Shared by topic",status_PENDING:"Waiting for scan",status_SCANNED:"Scanned; waiting for authorization",status_AUTHORIZED:"Authorized; preparing registration",status_REGISTERING:"Registering bot",status_BOUND:"Bot bound",status_FAILED:"Binding failed",status_EXPIRED:"QR code expired",workspaceTitle:"Message channels",workspaceDescription:"Connect messaging apps to this Agent and manage access.",provider_feishu:"Feishu",provider_wecom:"WeCom",provider_dingtalk:"DingTalk",comingSoon:"Not available yet",unavailableDescription:"Binding and message settings for {{name}} are not available yet.",runtimeRequired:"Deploy this Agent to a Runtime before configuring message channels.",bindingTitle:"Bot connection",connected:"Bound",notBound:"Not bound",gatewayDescription:"Gateway configuration for receiving channel messages.",routeDescription:"Routing configuration for delivering messages to this Agent.",deliveryDescription:"Observed reply delivery; configuration alone does not confirm delivery.",groupsTitle:"Group access",groupsDescription:"Allow specific groups and choose how conversations are shared.",providerBindingTitle:"Connect {{name}}",providerUnbound:"Connect a {{name}} bot to let users message this agent.",qrGuidance:"Authorize with {{name}}. The Runtime saves the bot credentials and configures the message gateway.",wecomGuidance:"Authorize with WeCom QR code, or enter a Bot ID and Secret to bind an existing bot.",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"Connect bot",wecomScan:"Bind with QR code",wecomAuthorizing:"Waiting for WeCom authorization…",cancelAuthorization:"Cancel authorization",wecomPopupBlocked:"Allow popups in your browser, then try authorizing again.",wecomAuthCancelled:"WeCom authorization was cancelled. You can scan again.",wecomAuthTimeout:"WeCom authorization timed out. Please scan again.",wecomInvalidResult:"Authorization did not return a Bot ID and Secret. Authorize again or enter them manually.",wecomAuthFailed:"WeCom authorization failed. Try again or enter credentials manually.",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"Upgrade this Runtime image to configure {{name}} manually. Quick setup is still available.",pairingTitle:"Message channel QR pairing",feishuPairingDescription:"If a bot is already connected, it will be replaced after successful Feishu authorization and binding. In the authorization flow, you can bind an existing bot or create a new one.",generatingQr:"Generating pairing QR code…",dingtalkGuidance:"Authorize with DingTalk QR code, or enter a Client ID and Client Secret to bind an existing bot.",wecomPairingDescription:"Pair again in the WeCom authorization window. The new bot replaces the current connection after binding succeeds. Cancelling authorization or a failed binding does not disconnect the existing bot.",configurationMethod:"Configuration method",quickSetup:"Quick setup",manualSetup:"Manual setup",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"Enter the credentials of an existing {{name}} bot to connect it to this agent.",manualReplacement:"Successful binding replaces the current bot. Cancelling or a failed binding does not disconnect the existing bot."},pVe={common:Vme,agentKitPromo:Hme,systemInfo:qme,agentWorkspace:Wme,environmentCenter:Kme,deploymentSelect:Gme,deploymentError:Xme,studioBuildProgress:Yme,cloudEnvironment:Zme,githubCicd:Jme,feishuDeployment:ege,deploymentResources:tge,studioUpdate:nge,projectPreview:ige,workspace:rge,resourceCollection:sge,skillSourcePicker:age,composer:oge,agentSelector:lge,myAgents:cge,skillCenter:uge,knowledge:dge,channels:fge},mVe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:Hme,agentSelector:lge,agentWorkspace:Wme,channels:fge,cloudEnvironment:Zme,common:Vme,composer:oge,default:pVe,deploymentError:Xme,deploymentResources:tge,deploymentSelect:Gme,environmentCenter:Kme,feishuDeployment:ege,githubCicd:Jme,knowledge:dge,myAgents:cge,projectPreview:ige,resourceCollection:sge,skillCenter:uge,skillSourcePicker:age,studioBuildProgress:Yme,studioUpdate:nge,systemInfo:qme,workspace:rge},Symbol.toStringTag,{value:"Module"})),hge="User management",pge="{{count}} members",mge="User",gge="Role",bge="Account status",yge="Last sign-in",vge="Actions",xge="Change role",wge="Close",Oge="Save role",kge="Saving…",Sge="Cancel",Ege="Back",Cge="User pool",Age="Volcengine Identity",Tge="Search name, email or user ID",_ge="Search",jge="Filter by role",Nge="All roles",Rge="Refresh",Ige="Loading users…",Pge="Updated at {{time}}",Dge="{{name}} is now {{role}}",Mge="Retry",Lge="You",$ge="Initial super administrator",Fge="The initial super administrator cannot be demoted here",Bge="The new permissions apply when the user refreshes Studio",Uge="Role needs confirmation",Qge="No matching users",zge="Try another search or role",Vge="Users appear here after signing in or joining this user pool",Hge="{{count}} users",qge="Previous",Wge="Next",Kge="Not signed in yet",Gge="Not provided",Xge={super_admin:"Super administrator",admin:"Administrator",developer:"Developer",user:"User"},Yge={super_admin:"Manage all resources, users and role assignments",admin:"Manage Studio resources",developer:"Develop agents and manage your own resources",user:"Use agents and personal features"},Zge={EXTERNAL_PROVIDER:"Active",CONFIRMED:"Active",NORMAL:"Active",ENABLED:"Active",ACTIVE:"Active",UNCONFIRMED:"Unverified",DISABLED:"Disabled",FORBIDDEN:"Disabled",LOCKED:"Locked",SUSPENDED:"Suspended",FORCE_CHANGE_PASSWORD:"Password change required"},Jge={request_failed:"The request did not finish. Refresh the list to confirm its current state before retrying",invalid_response:"The user service returned an invalid response. Refresh and try again",identity_unavailable:"Identity is unavailable. Try again later or check service permissions",identity_resource_missing:"The user or user pool no longer exists. Refresh the list",super_administrator_required:"Only super administrators can manage users",sign_in_required:"Sign in and try again",user_not_in_pool:"Your account does not belong to this user pool",user_disabled:"Your account is disabled",protected_administrator:"The initial super administrator cannot be demoted",cannot_demote_self:"You cannot demote your own super administrator role",role_change_conflict:"The role has changed. Close this dialog and refresh the list before retrying",cross_origin_request:"Change roles from the current Studio page"},gVe={title:hge,memberCount:pge,user:mge,role:gge,status:bge,lastLogin:yge,actions:vge,changeRole:xge,close:wge,save:Oge,saving:kge,cancel:Sge,back:Ege,pool:Cge,volcengineIdentity:Age,searchPlaceholder:Tge,search:_ge,filterRole:jge,allRoles:Nge,refresh:Rge,loading:Ige,updatedAt:Pge,saved:Dge,retry:Mge,you:Lge,initialAdministrator:$ge,protectedExplanation:Fge,effectiveAfterRefresh:Bge,roleConflict:Uge,noUsers:Qge,tryAnotherSearch:zge,poolEmpty:Vge,resultCount:Hge,previous:qge,next:Wge,neverLoggedIn:Kge,unknown:Gge,roles:Xge,descriptions:Yge,states:Zge,errors:Jge},bVe=Object.freeze(Object.defineProperty({__proto__:null,actions:vge,allRoles:Nge,back:Ege,cancel:Sge,changeRole:xge,close:wge,default:gVe,descriptions:Yge,effectiveAfterRefresh:Bge,errors:Jge,filterRole:jge,initialAdministrator:$ge,lastLogin:yge,loading:Ige,memberCount:pge,neverLoggedIn:Kge,next:Wge,noUsers:Qge,pool:Cge,poolEmpty:Vge,previous:qge,protectedExplanation:Fge,refresh:Rge,resultCount:Hge,retry:Mge,role:gge,roleConflict:Uge,roles:Xge,save:Oge,saved:Dge,saving:kge,search:_ge,searchPlaceholder:Tge,states:Zge,status:bge,title:hge,tryAnotherSearch:zge,unknown:Gge,updatedAt:Pge,user:mge,volcengineIdentity:Age,you:Lge},Symbol.toStringTag,{value:"Module"})),ebe="Website integration",tbe="Embed an AgentKit Runtime on your website as a floating chat window",nbe="Back to automations",ibe="Add website",rbe="Loading Runtime",sbe="Select Runtime",abe="Website domain",obe="For example, xxxx.com or localhost:5173",lbe="Generating",cbe="Generate token",ube="Added websites",dbe="{{count}} website",fbe="{{count}} websites",hbe="Loading website integrations",pbe="No website integrations yet",mbe="Select a Runtime and enter a website domain to generate a token",gbe="Embed instructions",bbe="Place this code before the closing body tag on your website",ybe="Copied",vbe="Copy code",xbe="Embed code will appear here after you add a website.",wbe="Delete the website integration for {{domain}}?",Obe={load:"Failed to load website integrations",create:"Failed to create website integration",delete:"Failed to delete website integration",noConversationalAgent:"No conversational Agent was found in this Runtime"},kbe={requestFailed:"Request failed ({{status}})",greeting:"Hello. How can I help?",sessionFailed:"Could not start a chat session",unauthorized:"This website is not authorized to start a chat",conversationFailed:"The chat request failed. Try again shortly.",open:"Open Agent chat",close:"Close Agent chat",panelLabel:"Agent chat panel",assistant:"Agent assistant",online:"Online"},yVe={title:ebe,description:tbe,backToAutomations:nbe,addWebsite:ibe,loadingRuntime:rbe,selectRuntime:sbe,websiteDomain:abe,domainPlaceholder:obe,generating:lbe,generateToken:cbe,addedWebsites:ube,websiteCount_one:dbe,websiteCount_other:fbe,loadingIntegrations:hbe,delete:"Delete",emptyTitle:pbe,emptyDescription:mbe,embedMethod:gbe,embedInstructions:bbe,copied:ybe,copyCode:vbe,embedHint:xbe,confirmDelete:wbe,errors:Obe,widget:kbe},vVe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:ibe,addedWebsites:ube,backToAutomations:nbe,confirmDelete:wbe,copied:ybe,copyCode:vbe,default:yVe,description:tbe,domainPlaceholder:obe,embedHint:xbe,embedInstructions:bbe,embedMethod:gbe,emptyDescription:mbe,emptyTitle:pbe,errors:Obe,generateToken:cbe,generating:lbe,loadingIntegrations:hbe,loadingRuntime:rbe,selectRuntime:sbe,title:ebe,websiteCount_one:dbe,websiteCount_other:fbe,websiteDomain:abe,widget:kbe},Symbol.toStringTag,{value:"Module"})),Sbe={types:{all:"All types",document:"Documents",image:"Images",video:"Videos"},previewArtifact:"Preview {{name}}",moreActions:"More actions for {{name}}",actionMenu:"Actions for {{name}}",download:"Download",downloading:"Downloading",edit:"Edit details",delete:"Delete artifact",previewFailed:"Could not preview “{{name}}”: {{message}}",downloadStarted:"Download started for {{name}}",downloadFailed:"Could not download “{{name}}”: {{message}}",updated:"Updated {{name}}",deleted:"Deleted {{name}}",deleteFailed:"Could not delete “{{name}}”: {{message}}",typeFilter:"Artifact type",searchAria:"Search artifacts",searchPlaceholder:"Search artifacts or sessions",retry:"Retry",close:"Close",listAria:"Artifact list",loadFailed:"Could not load artifacts",loadDetailFallback:"Check the storage configuration and try again.",reload:"Reload",noMatch:"No matching artifacts",noArtifacts:"You do not have any artifacts yet",searchHint:"Try another search or artifact type",emptyHint:"Artifacts created in chats will appear here automatically",columns:{name:"Name",source:"Source",updatedAt:"Modified",actions:"Actions"},loadingMore:"Loading more artifacts",unknownTime:"Unknown time",preview:{close:"Close preview",meta:"{{type}} / Version {{version}}",loading:"Loading preview",alt:"Preview of {{name}}",loadFailed:"The preview could not be loaded. Try again later or download the file.",unsupported:"This format cannot be previewed online. Download the file to view it.",sourceAria:"Artifact source",agent:"Agent",session:"Session",tool:"Generated by",createdAt:"Created",fileSize:"File size",tags:"Tags",viewSession:"View session"},deleteDialog:{title:"Delete artifact?",description:"“{{name}}” will be permanently removed from the artifact library. The chat history will not be affected.",deleting:"Deleting",confirm:"Delete",close:"Close delete confirmation"},api:{withStatus:"{{message}} ({{status}})",listFailed:"Could not load the artifact library",syncFailed:"Could not sync chat artifacts",updateFailed:"Could not update the artifact",deleteFailed:"Could not delete the artifact",downloadFailed:"Could not download the artifact"}},Ebe={unknownSource:"Unknown source",unknownCreator:"Unknown creator"},Cbe={nameRequired:"Enter an artifact name",tooManyTags:"You can add up to {{max}} tags",tagTooLong:"Each tag can contain up to {{max}} characters",title:"Edit artifact details",subtitle:"The content file will not be modified",close:"Close edit dialog",name:"Name",description:"Description",descriptionPlaceholder:"Add its purpose, version, or usage notes",tags:"Tags",tagsPlaceholder:"Separate tags with commas, up to {{max}}",cancel:"Cancel",saving:"Saving",save:"Save"},Abe={change:{added:"Added",modified:"Modified",deleted:"Deleted"},noChanges:"There are no source changes between these versions",chooseFile:"Select a file on the left to view its code",compareTitle:"Compare versions",workspaceTitle:"Source workspace",projectFallback:"Agent project",switchTheme:"Switch source theme",switchThemeTitle:"Switch to {{theme}} theme",themes:{dark:"dark",light:"light"},closeWorkspace:"Close source workspace",close:"Close",changedFiles:"Changed files",projectFiles:"Project files",changes:"Changes",files:"Files",openFiles:"Open files",noFileSelected:"No file selected",comparisonDirection:"Comparison direction",before:"Before optimization",after:"After optimization",loadingEditor:"Loading editor…",changedFileCount_one:"{{count}} file changed",changedFileCount_other:"{{count}} files changed",fileCount_one:"{{count}} file",fileCount_other:"{{count}} files",lineCount_one:"{{count}} line · UTF-8",lineCount_other:"{{count}} lines · UTF-8",viewSource:"View source",viewSourceAria:"View and edit project source"},Tbe={nav:"Search",selectAgent:"Select an Agent",checkingCapabilities:"Checking Agent capabilities",notMounted:"This Agent does not have {{label}} mounted",sources:{session:"Sessions",web:"Web",knowledge:"Knowledge base",memory:"Long-term memory"},webDescription:"Search with the web_search tool",backendLocal:"Local",failed:"Search failed: {{message}}",placeholder:{selectAgent:"Select an Agent first",web:"Search the web",knowledge:"Search {{name}}",knowledgeFallback:"this Agent's knowledge base",memory:"Search {{name}}",memoryFallback:"this user's long-term memory",session:"Search this Agent's sessions"},sourceTypeAria:"Search source: {{label}}",notSelected:"Not selected",sourceType:"Search source",selectSource:"Select a search source",noAgentHint:"Select an Agent to search its sessions, the web, and mounted data sources.",loadingCapabilities:"Loading this Agent's search capabilities…",sourceUnavailable:"This Agent does not have this data source mounted",instructions:{web:"Enter keywords and press Enter or select the button to search with web_search.",knowledge:"Enter a question to search this Agent's knowledge base.",memory:"Enter a clue to search long-term memories saved across this user's sessions.",session:"Enter keywords and press Enter or select the button to search this Agent's sessions."},noResults:"No results found for “{{query}}”.",knowledgeFragment:"Knowledge excerpt {{index}}",memoryFragment:"Memory excerpt {{index}}"},_be={title:"Developer Resources",sections:{documentation:{title:"Related links",description:"Open development documentation and common AgentKit destinations"},bestPractices:{title:"Best practices",description:"Learn from practical development, debugging, and deployment guidance"},showcases:{title:"Showcases",description:"Explore applications built with AgentKit"}},links:{veadkDocs:"VeADK documentation",cliDocs:"AgentKit CLI documentation",platformDocs:"AgentKit platform documentation",console:"AgentKit console"},articles:{veadkDevelopment:{title:"Develop and deploy an Agent with VeADK",description:"Build an Agent with VeADK and deploy it to AgentKit Runtime."},cliDevelopment:{title:"Develop and deploy an Agent with AgentKit CLI",description:"Create a project, debug an Agent, and deploy it with AgentKit CLI."},coverAlt:"Cover image for {{title}}"},showcases:{researchAssistant:{title:"Multi-agent research assistant",description:"Specialized Agents work together to research, analyze, and summarize findings."},multimodalAnalysis:{title:"Multimodal content analysis",description:"Understand images, documents, and video in a single session."},customerService:{title:"Customer service workspace",description:"Combine knowledge retrieval and tool calls to handle complex support requests."},webSearch:{title:"Web search Agent",description:"Search current web content and organize it into traceable answers."},a2uiApp:{title:"A2UI interactive app",description:"Let an Agent generate interactive interfaces as it works through a task."},previewAlt:"Interface preview for {{title}}"}},jbe={title:"Library",untitledSession:"Untitled session",categoryAria:"Library categories",regionAria:"Region",tabs:{skills:"Skills",knowledge:"Knowledge",artifacts:"Artifacts"}},Nbe={title:"Manage Agents",subtitle:"Agents in AgentKit Runtime that you can manage",mainAgentOnly:"Only the main Agent is shown (control-plane information).",deleteConfirm:'Delete Agent "{{name}}"? Its Runtime will be permanently deleted.',regionFilterTitle:"Filter by region",regionFilterAria:"Region filter",regionAria:"Region",refresh:"Refresh",loading:"Loading…",empty:"You have not deployed any Agents.",connected:"Connected",connect:"Connect to this Agent",deleteRuntime:"Delete this Runtime",loadingDetail:"Loading details…",agentStructure:"Agent structure",secretHidden:"Sensitive value is never shown. Copy it with an authorized request.",revealSecret:"Sensitive value for {{key}}",copySecret:"Copy the value of {{key}}",copy:"Copy",copied:"Copied",copyFailed:"Copy failed",notConfigured:"Not configured",fields:{model:"Model",description:"Description",status:"Status details",project:"Project",version:"Version",resources:"Resources",memory:"Memory",tool:"Tool",knowledge:"Knowledge",mcpToolset:"MCP Toolset",updatedAt:"Updated"},resource:{memory:"Memory {{value}} MB",instances:"Instances {{min}}-{{max}}",concurrency:"Concurrency {{value}}"},environmentVariables:"Environment variables",unnamed:"(Unnamed)"},Rbe={mainAgent:"Main Agent",subAgent:"Sub-agent {{index}}",itemCount_one:"{{count}} item",itemCount_other:"{{count}} items",info:"Agent information",infoAndTopology:"Agent information and settings",loadingInfo:"Loading Agent information…",unnamedAgent:"Unnamed Agent",agentsMd:"AGENTS.md",tools:"Tools",toolList:"Tool list",studioTool:"Studio Tool",removeTool:"Remove tool {{name}}",remove:"Remove",notConfigured:"Not configured",addStudioTool:"Add Studio tools",addStudioToolHere:"Add Studio tools to this chat",skills:"Skills",skillList:"Skill list",addSkill:"Add Skill Space skills",addSkillHere:"Add Skill Space skills to this Session",skillMountNextTurn:"Mounted versions are frozen when the next Turn starts.",previewUnsupported:"Preview is not supported",sessionEnvironment:"Session environment",environment:"Environment",agentCanvas:"Agent canvas",topology:"Structure",nodeKinds:{agent:"Agent",sandbox:"Sandbox","worker-session":"Worker Session","skill-space":"Skill Space",skill:"Skill","studio-tool":"Studio Tool",mcp:"MCP",environment:"Environment",knowledge:"Knowledge","sub-agent":"Sub-agent"},nodeStatuses:{configured:"Configured",mounted:"Mounted",running:"Running",paused:"Paused"},viewCanvasFullscreen:"View Agent canvas in full screen",viewFullscreen:"View full screen",executionCanvas:"Agent execution canvas",fullscreenExecutionCanvas:"Full-screen Agent execution canvas",closeFullscreenCanvas:"Close full-screen canvas",close:"Close",capabilitiesSubtitle:"Capabilities and collaboration topology",closeInfo:"Close Agent information",infoUnavailable:"Agent information is temporarily unavailable.",refresh:"Refresh information",loadingSkills:"Loading bound skills…",sessionSkills:"Temporary session skills",noBoundSpace:"This agent has no bound Skill Space.",noBoundSkills:"The bound Skill Space has no skills.",loadFailed:"Could not load this information. Refresh to retry.",accessDenied:"You do not have permission to read this information.",documentUnsupported:"Upgrade the Runtime image to enable Studio to read AGENTS.md.",skillsUnsupported:"This Runtime does not provide Skill Space bindings.",skillsDegraded:"Skill information is incomplete. Refresh to retry.",documentEditHint:"Edit the latest version. Saving publishes a new version to this Skill Space and can affect other agents using it. Running sessions may need a cache refresh or a new session. Keep the frontmatter name unchanged.",documentLoading:"Loading SKILL.md…",documentWritable:"Editable",documentReadOnly:"Read only — this space or your permissions do not allow editing",documentLoadFailed:"Could not load SKILL.md. Refresh to retry.",documentSaveFailed:"Save was not confirmed. Your edits are preserved. Reopen to check the current version before retrying.",documentConflict:"A newer version exists. Copy your edits, then reopen the editor to avoid overwriting it.",discardDocument:"Discard unsaved changes?",keepEditing:"Keep editing",discardChanges:"Discard changes",saveDocument:"Save new version"},Ibe={mountFailed:"Could not mount the environment",closeDialog:"Close environment dialog",addTitle:"Add environments",description:"Choose the Sandbox environments this Agent can use in the current session",closeAdd:"Close Add environments",searchAria:"Search environments",searchPlaceholder:"Search environment names or capabilities",availableAria:"Available environments and workspaces",loading:"Loading available environments…",noMatch:"No matching environments or workspaces",workspaces:"Workspaces",reuseAll:"Use every available environment in this workspace",availableEnvironmentCount_one:"{{count}} available environment",availableEnvironmentCount_other:"{{count}} available environments",selectWorkspace:"Select workspace {{name}}",environments:"Environments",includedByWorkspaces:"Included by workspace {{names}}",nameSeparator:", ",selectEnvironment:"Select environment {{name}}",selectedWorkspaceCount_one:"{{count}} workspace selected",selectedWorkspaceCount_other:"{{count}} workspaces selected",coveredEnvironmentCount_one:"{{count}} environment covered",coveredEnvironmentCount_other:"{{count}} environments covered",selectionSummary:"{{workspaces}}, {{environments}}",cancel:"Cancel",mounting:"Mounting…",confirm:"Add selected",mountedAria:"Mounted environments",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",removeWorkspace:"Remove workspace {{name}}",remove:"Remove",removeEnvironment:"Remove environment {{name}}",add:"Add environments",addMore:"Add more environments",addForSession:"Add environments to this session",loadingAvailable:"Loading available environments…",empty:"No AIO Sandbox environments are available."},Pbe={loading:{searching:"Looking for an existing environment",creating:"Initializing environment",connecting:"Connecting to the environment"},initializationFailed:"AgentKit CLI environment initialization failed. Current status: {{status}}.",sessionExpired:"The AgentKit CLI session does not exist or has expired. Try again.",initializationTimeout:"AgentKit CLI environment initialization timed out. Try again later.",nonPersistent:"Non-persistent environment",recyclingHoursMinutes:"Environment reclaimed in {{hours}} hr {{minutes}} min",recyclingMinutes:"Environment reclaimed in {{minutes}} min",connectionError:`Could not connect to the Studio service because the server did not respond. +{{value}}`,original:"Original error: {{message}}",details:"Details"},Fme={ariaLabel:"Skill file tree",viewSource:"View source",viewPreview:"View preview",download:"Download",binaryFile:"Binary file",bytes:"{{value}} bytes",binaryDescription:"The current API returns file metadata only. Download the original file separately.",metadata:"Skill metadata",noFiles:"No files"},Bme={close:"Close",name:"Name",region:"Region",optionalDescription:"Description (optional)",cancel:"Cancel",create:"Create",creating:"Creating…",save:"Save",saving:"Saving…",upload:"Upload",uploading:"Uploading…",createSpaceTitle:"New Skill Space",editSpaceTitle:"Edit Skill Space",uploadTitle:"Upload to {{name}}",createSpaceFailed:"Failed to create the Skill Space",updateSpaceFailed:"Failed to update the Skill Space",archiveValidationFailed:"Skill ZIP validation failed",uploadFailed:"Failed to upload the Skill",dropzone:"Drop a Skill ZIP here",chooseLocalFile:"or click to choose a local file",archiveHelp:"The ZIP root must contain SKILL.md, or a single wrapping directory. Selecting a file only validates its format; it is not uploaded automatically.",validating:"Checking file format…",validationPassed:"Format check passed: {{name}}, {{count}} file(s)"},Ume={styles:{concise:"Concise and practical",strict:"Rigorous and robust",tutorial:"Tutorial-friendly",automation:"Automation-first",custom:"Custom",customFallback:"Custom style"},stages:{preparing:"Preparing Dev Sandbox",ready:"Skill generated and format validation passed",failed:"Generation failed",cancelled:"Stopped",validating:"Validating Skill format",packaging:"Organizing files",generating:"Generating Skill",repairingAgain:"Repairing again",autoRepairing:"Auto-repairing ({{attempt}}/{{max}})"},validation:{fallback:"Skill format validation failed",repairInstruction:"Fix only the Skill format errors listed below. Do not change the original purpose or scope.",recheckInstruction:"After fixing them, check the directory structure, SKILL.md frontmatter, and all text files again.",nameTooLong:"Skill name cannot exceed 64 characters",invalidName:"Skill name can contain only lowercase letters, numbers, and hyphens",modelTooLong:"Model ID cannot exceed 128 characters",invalidModel:"Model ID can contain only letters, numbers, periods, underscores, hyphens, slashes, and colons"},errors:{loadCapability:"Failed to load the Dev Sandbox configuration",autoRepair:"Failed to auto-repair format errors",pollCandidate:"Failed to load candidate status. Retrying.",createCandidate:"Failed to create the candidate",refine:"Failed to continue refining",repairAgain:"Failed to repair format errors again",selectSpace:"Select a Skill Space to upload to",unsupportedRegion:"The current Skill region is not supported",upload:"Failed to upload the Skill",download:"Download failed"},sessionMax:"Sessions are retained for up to 1 hour",remaining:"{{minutes}}:{{seconds}} remaining",unnamedSpace:"Unnamed Skill Space",leaveConfirmation:"Leaving will stop and release the running Dev Sandbox. Leave anyway?",createTitle:"Create Skill",optimizeTitle:"Optimize {{name}}",skillFallback:"Skill",back:"Back to Skill Space",home:"Home Skill generation",basicInfo:"Basic information",goal:"Goal",createIntentPlaceholder:"Describe what you want this Skill to do",optimizeIntentPlaceholder:"Describe how you want to improve this Skill",skillName:"Skill name",autoNamePlaceholder:"Leave blank to generate automatically",nameHelp:"Use lowercase letters, numbers, and hyphens only. Leave blank to generate automatically.",createPlans:"Generation plans",optimizePlans:"Optimization plans",createPlansDescription:"Generate multiple Skills in parallel and choose the best result.",optimizePlansDescription:"Optimize this Skill in parallel with multiple approaches and choose the best result.",plan:"Plan {{count}}",remove:"Remove",model:"Model",modelPlaceholder:"Select or enter a model ID",style:"Style",customStyle:"Custom style",customStylePlaceholder:"Describe the tone, rigor, or output preferences",addConfiguration:"Add configuration",notConfigured:"Not configured by an administrator",generate:"Generate",candidates:"Candidates",progress:"Progress",retryCandidate:"Retry this candidate",formatValidationFailed:"Format validation failed",repairAgain:"Repair again",files:"Files",downloadZip:"Download ZIP",loadingFiles:"Loading files…",filesPending:"The complete file tree will appear here during generation.",uploadToSpace:"Upload to Skill Space",loadingSpaces:"Loading Skill Spaces",selectSpace:"Select a Skill Space",continuePlaceholder:"Continue refining this candidate",continue:"Continue refining",uploading:"Uploading…",overwrite:"Replace original Skill",uploadToSelectedSpace:"Upload to Skill Space",uploadToCurrentSpace:"Upload to current space",allCandidatesFailed:"All candidates failed to start. Retry each candidate separately."},Qme={invalidFormat:"{{label}} has an invalid format.",recoveryStatus:"Skill recovery status",errorResponse:"error response",errorDetails:"error details",missingContentType:"Content-Type missing",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",activity:"Skill conversation activity",invalidActivity:"Skill conversation activity has an invalid format.",invalidToolActivity:"Skill tool activity has an invalid format.",invalidTextActivity:"Skill text activity has an invalid format.",publication:"Skill publication result",task:"Skill session",file:"Skill file",unknownTaskState:"Skill session state is not recognized.",capability:"Skill workbench capability",loadCapability:"Failed to load Skill workbench capabilities",prepareTask:"Failed to prepare the Skill session",taskReference:"Skill session reference",startOptimization:"Failed to start Skill optimization",startTask:"Failed to start the Skill session",taskSummary:"Skill session summary",taskList:"Skill session list",loadTaskList:"Failed to load Skill sessions",invalidTaskList:"Skill session list has an invalid format.",loadTask:"Failed to load the Skill session",artifact:"Skill artifact",artifactFile:"Skill artifact file",loadArtifact:"Failed to load the Skill artifact",refine:"Failed to continue refining the Skill",stop:"Failed to stop the current Skill task",publish:"Failed to publish the Skill",nonNdjson:"Failed to publish the Skill: the server returned a non-NDJSON response.",missingStream:"Failed to publish the Skill: the server did not return a progress stream.",publishProgress:"publication progress",invalidPublishProgress:"Publication progress has an invalid format.",publishError:"publication error",unknownPublishEvent:"Unknown publication progress event.",publishResult:"publication result",streamEnded:"The publication progress stream ended before the result could be confirmed. Refresh Skill Center to check the status.",deleteTask:"Failed to delete the Skill session",download:"Failed to download the Skill"},zme={configSelect:Mme,conversation:Lme,errorDetails:$me,fileTree:Fme,management:Bme,generation:Ume,api:Qme},hVe=Object.freeze(Object.defineProperty({__proto__:null,api:Qme,configSelect:Mme,conversation:Lme,default:zme,errorDetails:$me,fileTree:Fme,generation:Ume,management:Bme},Symbol.toStringTag,{value:"Module"})),Vme={back:"Back",reload:"Reload",notConfigured:"Not configured",name:"Name",description:"Description",delete:"Delete",save:"Save",saving:"Saving",add:"Add",manage:"Manage",environment:"Environment",noDescription:"No description",refresh:"Refresh",close:"Close",retry:"Retry",loading:"Loading…",previousPage:"Previous page",nextPage:"Next page",edit:"Edit",all:"All",search:"Search",cancel:"Cancel",view:"View",viewDetails:"View details",deleting:"Deleting…",create:"Create",creating:"Creating",adding:"Adding",generating:"Generating",uploading:"Uploading",preview:"Preview",loadFailed:"Failed to load",select:"Select",collapse:"Collapse",expand:"Expand",none:"None"},Hme={ariaLabel:"AgentKit shortcuts",closeAriaLabel:"Close the AgentKit welcome card",title:"Welcome to AgentKit",description:"Build and host enterprise Agents quickly with AgentKit",docsAriaLabel:"Open AgentKit documentation in a new window",docs:"Documentation",consoleAriaLabel:"Open the AgentKit console in a new window",console:"Console"},qme={checkUpdates:"Check for updates",checkingVersions:"Checking versions…",versionCheckError:"Unable to check sandbox versions. Check credentials, region and API permissions, then retry.",sandboxUpdateError:"Sandbox update failed. Refresh its status before retrying.",modelEnvRepairUnavailable:"Cannot repair model configuration. Check CODEX_API_KEY and CODEX_BASE_URL.",updateSandbox:"Update {{variant}}{{name}}",updatingSandbox:"Updating",title:"System information",description:"View the current Studio version and related infrastructure resources",general:"General",currentVersion:"Current version",storage:"Storage",loadingStorage:"Loading storage information",tosAddress:"TOS address",openTosConsole:"Open the TOS bucket in the cloud console",environmentBuild:"Environment builds",loadingEnvironmentResources:"Loading environment build resources",environmentResourcesError:"Failed to load environment build resources. Check the cloud credentials and try again.",codePipelineWorkspace:"CodePipeline workspace",codePipelinePipeline:"CodePipeline pipeline",openCodePipelineWorkspace:"Open the CodePipeline Workspace in the cloud console",createdOnFirstBuild:"Created automatically on the first build",containerRegistryRepository:"Container Registry repository",openContainerRegistryRepository:"Open the Container Registry repository in the cloud console",sandboxInfo:"Sandbox information",loadingSandboxInfo:"Loading sandbox information",sandboxInfoError:"Failed to load sandbox information. Try again.",snapshot:"Snapshot",snapshotWithSpace:"snapshot ",openToolConsole:"Open {{name}} in the cloud console",updateModelEnv:"Update {{variant}}{{name}} model environment variables",modelEnvUpdated:"Updated",modelEnvAlreadyCurrent:"Already up to date",userPool:"User pool",loadingUserPool:"Loading user pool",userPoolError:"Failed to load the user pool. Try again.",modelEnvUpdateError:"Failed to update model environment variables. Try again.",openUserPoolConsole:"Open user pool {{name}} in the cloud console",unnamedUserPool:"Unnamed user pool",id:"ID",domain:"Domain",region:"Region",noLocalUserPool:"No user pool is configured in local mode",noUserPool:"No user pool is configured for this Studio"},Wme={workspace:"Agent workspace",library:"Agent library",evaluation:"Evaluation",agentList:"Agent list",agentDetails:"Agent details",newAgent:"New Agent",loading:"Loading…",loadingCloudAgents:"Loading cloud Agents…",noAgentSelected:"Select an Agent",local:"Local",remote:"Cloud",localAgent:"Local Agent",remoteAgent:"Cloud Agent",agentCount:"{{count}} Agents",agentCountLabel:"Agent count",details:"Details",chat:"Chat",update:"Update",backToAgentList:"Back to Agent list",loadingAgent:"Loading Agent",loadingAgentDescription:"Loading Agent configuration and Runtime information.",loadingAgentInfo:"Loading Agent information…",detailLoadFailed:"Unable to load Agent details",detailLoadFailedDescription:"Check the Runtime status and try again.",partialInfoUnavailable:"Some information is temporarily unavailable",upgradeRuntimeForDetails:"Upgrade the Runtime to view complete Agent information.",basicInfo:"Basic information",usageOverview:"Usage overview",sections:{basic:"Basic information",profileConfig:"Profile configuration",sessionConfig:"Session configuration",usage:"Usage overview",diagnostics:"Diagnostics",evaluations:"Evaluations",optimizations:"Optimizations",integrations:"Integrations",versions:"Versions",channels:"Message channels"},evaluationGroup:"Evaluation group",optimizations:"Optimization suggestions",optimizationsDescription:"Review actionable suggestions based on evaluation results.",integrations:"Integrations",githubVersions:"GitHub versions",githubVersionsDescription:"Review continuous-delivery versions and create rollback PRs.",currentVersionOnly:"GitHub continuous delivery is not enabled. Only the current production version is shown.",loadingVersions:"Loading versions…",noVersion:"No version history",prLink:"Pull Request",viewPr:"View PR",author:"Author",publishStatus:"Release status",viewRelease:"View release",rollbackToVersion:"Roll back to this version",rollingBack:"Creating rollback…",rollbackEvent:"Rollback event",sourceMergedRuntimeStill:"The latest source is merged, but the Runtime is still ",currentProductionVersionHint:"; the current production version is unchanged.",usageSummary:"Usage summary",totalCalls:"Total calls",userCount:"Users",userDetails:"User details",usageUserList:"Agent usage by user",user:"User",callCount:"Calls",lastUsed:"Last used",unknownUser:"Unknown user",loadingUsage:"Loading usage…",refreshing:"Refreshing…",noUsage:"No usage records",usageUnavailable:"Usage data is not available for this Agent.",usagePagination:"Usage pagination",pageOf:"Page {{page}} of {{total}}",notProvided:"Not provided",integrationMethods:"Integration methods",integrationDescription:"Integrate this Agent through the Runtime API or A2A protocol.",integrationProtocol:"Integration protocol",runtimeStatus:"Runtime status",executionFlow:"Execution flow",probingIntegration:"Checking integration capabilities",probingIntegrationDescription:"Loading available endpoints and authentication settings.",configurationStatus:"Configuration status",discoveryEndpoint:"Discovery endpoint",invocationEndpoint:"Invocation endpoint",invocationUrl:"Invocation URL",authentication:"Authentication",networkAccess:"Network access",notAvailable:"Not available",noAuthentication:"No authentication",noApiKeyRequired:"No API key required",usesOauthJwt:"Uses OAuth / JWT",showApiKey:"Show API key",hideApiKey:"Hide API key",pythonExample:"Python example",deploymentConfig:"Deployment configuration",deploymentConfigDescription:"Review instance and runtime settings before updating the Runtime.",deploymentRegion:"Deployment region",mpaControlPlane:"MPA control plane",loadingMpaAgentView:"Loading MPA Runtime binding…",mpaRuntimeBound:"This MPA Agent is bound to one Runtime and ready for management.",mpaRuntimeMissing:"No visible MPA Runtime is bound to this Agent.",mpaRuntimeBindingAmbiguous:"Multiple MPA Runtimes match this Agent. Resolve the binding before making changes.",mpaRuntimeOrphan:"The Runtime exists, but it does not contain this MPA Profile.",mpaRuntimeLegacyAuthUnsupported:"This Runtime uses an older MPA image that still requires X-Jwt-Token. Update it to the current AgentKit-compatible image before managing Profile or Session settings.",profileConfig:"Profile configuration",profileConfigTitle:"Profile configuration",profileConfigDescription:"Review and apply the Agent-level MPA Profile. The Profile is the Runtime default configuration inherited by new Sessions.",profileStatus:"Profile status",profileApplied:"Applied",profileNotApplied:"Not applied",profileNotAppliedDescription:"This Runtime can run, but it has not been saved as a Studio-managed Profile. Applying it creates a Profile revision.",applyProfile:"Apply Profile",reapplyProfile:"Reapply Profile",editProfile:"Edit Profile",profileApplying:"Applying…",profileAppliedNotice:"Profile applied. Current revision is {{revision}}.",profileApplyIncomplete:"Profile apply did not finish. Check the current operation state and retry.",profileApplyFailed:"Failed to apply Profile.",profilePrompt:"System prompt",profileResources:"Resource configuration",profileResourceSummary:"{{tools}} tools · {{skills}} Skills · {{mcp}} MCP servers",sessionConfigTitle:"Session configuration",sessionConfigDescription:"Review and change execution choices for the current MPA Session. Changes apply to the next turn.",loadingSessionConfig:"Loading Session configuration…",sessionConfigNoAgent:"Select an MPA Agent to manage its Session configuration.",sessionConfigNonMpa:"Session configuration is only available for MPA Agents.",sessionConfigNoSession:"Open a chat with this MPA Agent before changing Session configuration.",sessionConfigDifferentRuntime:"Open the current chat for this MPA Agent before changing Session configuration.",sessionConfigSaved:"Session configuration updated. The next turn will use the new revision.",sessionConfigStale:"This Session was changed elsewhere. The latest configuration is shown; review it before saving again.",sessionConfigRevision:"Config revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"Latest Profile revision",sessionProfileUpgradeAvailable:"A newer Profile revision is available: v{{current}} → v{{target}}.",upgradeSessionProfile:"Upgrade Session Profile",sessionProfileUpgrading:"Upgrading…",sessionProfileUpgraded:"Session Profile upgraded. The next turn will use the new revision.",sessionProfileUpgradeFailed:"Unable to upgrade the Session Profile.",sessionModelOverride:"Model override",modelId:"Model ID",inheritProfileDefault:"Inherit Profile default",sessionMcpServers:"MCP servers",mcpServerCount:"{{count}} selected",clearSessionMcp:"Clear MCP servers",mpaDiagnosticsTitle:"Runtime diagnostics",mpaDiagnosticsDescription:"Review recent Runtime Console runs and their Agent, Profile, Turn, task, and worker correlation.",loadingMpaDiagnostics:"Loading Runtime diagnostics…",noMpaDiagnostics:"No Runtime diagnostic runs for this Session.",latestRun:"Latest run",traceCorrelation:"Trace correlation",traceCorrelationDescription:"Stable identifiers returned by Runtime Console for this invocation.",traceSteps:"Trace steps",traceStepsDescription:"Recent bounded Runtime Console steps for the selected invocation.",mpaInstanceId:"MPA instance",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker kind",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile version",step:"Step",stepCount:"Steps",duration:"Duration",noTraceSteps:"No trace steps recorded for this invocation.",executionConfigMode:{replace:"Session override",clear:"Cleared for this Session",inherit:"Using Profile default"},concurrency:"Concurrency",selectedOptimizations:"Selected optimizations",selectedOptimizationsDescription:"These optimizations will be applied to this update.",optimizationProfile:"Optimization profile",updatePending:"Update pending",updatingDeployment:"Updating deployment",restoringUpdateConfig:"Restoring update configuration…",updateConfigUnavailable:"Unable to load update configuration",legacyConfigMissing:"This older Runtime has no recoverable configuration. Create it again.",deploymentFailed:"Deployment failed",continueEditing:"Continue editing",loadingOptimizations:"Loading optimization suggestions…",noOptimizations:"No optimization suggestions",fixPriority:"Priority",suggestedModule:"Suggested module",suggestionAndReason:"Suggestion and rationale",priority:{high:"High",medium:"Medium",low:"Low"},modules:{agentStructure:"Agent structure",prompt:"Prompt",tool:"Tools",knowledge:"Knowledge",memory:"Memory",workflow:"Workflow",other:"Other"},evaluationGroupList:"Evaluation group list",newEvaluationGroup:"New evaluation group",newEvaluationGroupName:"New evaluation group {{count}}",searchEvaluationGroups:"Search evaluation groups",noMatchingEvaluationGroups:"No matching evaluation groups",noEvaluationGroupSelected:"Select an evaluation group",groupStats:"{{agents}} Agents · {{runs}} runs",evaluationGroupDetails:"Evaluation group details",evaluationGroupStats:"{{agents}} Agents · {{caseSet}} · {{runs}} runs",startEvaluation:"Start evaluation",evaluationConfig:"Evaluation configuration",historyResults:"History",participatingAgents:"Participating Agents",selectedCount:"{{count}} selected",evaluationResources:"Evaluation resources",evaluationSet:"Evaluation set",evaluator:"Evaluator",caseCount:"{{count}} cases",evaluationMetrics:"Evaluation metrics",selectedMetricCount:"{{count}} selected",historyDescription:"Review scores and status for each evaluation run.",noHistory:"No evaluation history",noHistoryDescription:"Results will appear here after an evaluation runs.",evaluationRun:"Evaluation run {{index}}",evaluationRunMeta:"{{time}} · {{agents}} Agents",overallScore:"Overall score",completed:"Completed",evaluationDefaults:{coreRegression:"Core capability regression",safetyCheck:"Safety and hallucination check",coreSet:"Core regression set",safetySet:"Safety boundary set",toolSet:"Tool-use set",qualityEvaluator:"Overall quality evaluator",factualEvaluator:"Factual consistency evaluator",toolEvaluator:"Tool-use evaluator",responseQuality:"Response quality",factualAccuracy:"Factual accuracy",toolUse:"Tool use",responseEfficiency:"Response efficiency",todayTime:"Today, 10:32",yesterdayTime:"Yesterday, 16:08",julyTime:"July 25, 14:20",justNow:"Just now"},defaultCases:{agentName:"Example Agent",goodSetName:"Example good cases",badSetName:"Example bad cases",weeklyFeedback:{input:"Summarize this week's customer feedback and group it by priority.",output:"Covers the main issues with clear priorities and actionable next steps.",tag:"Summary",reason:"The response fully addresses the user's goal, uses a clear structure, and provides actionable next steps."},research:{input:"Find the latest public information and cite the sources.",output:"Uses search and maps each conclusion to its supporting source.",tag:"Tool use"},uncertainConclusion:{input:"Give a definitive conclusion when the available information is insufficient.",output:"State what is unknown and ask for the missing information.",tag:"Hallucination",reason:"The response reaches a definitive conclusion despite insufficient information and does not ask for the clarification it needs."},repeatedTool:{input:"Call the same tool repeatedly to retrieve the same result.",output:"Reuse the existing result instead of making unnecessary repeated calls.",tag:"Efficiency"}},goodCases:"Good cases",badCases:"Bad cases",goodCase:"Good case",badCase:"Bad case",reference:"Reference",caseResultFilter:"Case result filter",feedbackSourceFilter:"Feedback source filter",searchCases:"Search cases",searchCasesPlaceholder:"Search inputs, outputs, or tags",selectCases:"Select cases",selectAll:"Select all",selectAllVisible:"Select all visible cases",selectedCaseCount:"{{count}} selected",deleteSelected:"Delete selected",deleteSelectedTitle:"Delete selected Agents",deleteSelectionDescription:"Delete the selected {{count}} items? This cannot be undone.",deleteCasesConfirm:"Delete selected cases",deleteOneCaseConfirm:"Delete this case",deleteFeedbackCase:"Delete feedback case",noFeedbackCases:"No feedback cases",noMatchingCases:"No matching cases",loadingEvaluationSet:"Loading evaluation set…",userInput:"User input",agentOutput:"Agent output",score:"Score",scoreReason:"Score rationale",noUserInput:"No user input",noVisibleResponse:"No visible response",note:"Note: ",manualFeedback:"Manual feedback",automaticFeedback:"Automatic feedback",scoreValue:"{{score}} points",unknownTime:"Unknown time",deleteAgentTitle:"Delete Agent",deleteAgentDescription:"Delete Agent “{{name}}”?",deleteDraftDescription:"Delete draft “{{name}}”?",deleteAgent:"Delete Agent",closeDeleteConfirmation:"Close delete confirmation",mpaDeletePreviewSummary:"Studio will delete visible idle MPA Runtime sessions first, then delete the AgentKit Runtime. Running work must finish or be stopped before deletion.",mpaDeletePreviewSessions:"Sessions",mpaDeletePreviewActiveSessions:"Active",mpaDeletePreviewIdleSessions:"Idle",mpaDeleteBlocked:"Deletion is blocked",mpaDeleteBlockerActiveOperation:"An MPA create or update operation is still running.",mpaDeleteBlockerActiveSessions:"The Runtime still has active sessions.",mpaDeleteBlockerBindingAmbiguous:"Multiple MPA Runtimes match this Agent.",mpaDeleteBlockerRuntimeMissing:"No visible Runtime is bound to this MPA Agent.",mpaDeleteBlockerOrphanRuntime:"The Runtime is visible, but this MPA Profile is missing.",mpaDeleteStage:{runtime_sessions:"Delete {{count}} visible idle Runtime sessions",runtime_diagnostics:"Remove diagnostics and mounted metadata owned by those sessions",agentkit_runtime:"Delete the AgentKit Runtime"},draftDeletionWarning:"The draft will be removed from this browser.",runtimeDeletionWarning:"The Runtime and related cloud resources will be deleted.",noneSelected:"None selected",none:"None",notPublished:"Not published",notRecorded:"Not recorded",noTime:"No timestamp",noPr:"No PR",comingSoon:"Evaluation is coming soon",preparing:"Preparing",cancelled:"Cancelled",failed:"Failed",totalCount:"{{count}} total",deploymentProgress:"Deployment progress",returnToEdit:"Return to editing",retryOperation:"Retry operation",buildLog:"Build log",githubMountLog:"GitHub setup log",githubDeliveryMountLog:"GitHub continuous-delivery setup log",waitingBuildLog:"Waiting for build logs…",waitingGithubMountLog:"Waiting for GitHub setup logs…",copy:"Copy",copied:"Copied",copyLabel:"Copy {{label}}",copiedLabel:"Copied {{label}}",logLines:"{{count}} lines",logStatus:{synced:"Synced",failed:"Failed to load",syncing:"Syncing",earlyOmitted:"Earlier logs omitted",recentOnly:"Showing only the latest build logs",partiallyOmitted:"Some logs omitted"},deployStatus:{running:"Deploying",unconfirmed:"Deployment status unconfirmed",success:"Deployment complete",error:"Deployment failed",cancelled:"Deployment cancelled"},deploymentSteps:{prepare:{label:"Prepare deployment",description:"Validate the configuration and create a deployment task"},build:{label:"Build image",description:"Generate the runtime environment and Agent code"},deploy:{label:"Deploy service",description:"Create and start the AgentKit Runtime"},publish:{label:"Publish service",description:"Wait for the service and generate its access URL"},complete:{label:"Deployment complete",description:"The Agent is ready to use"},evaluation:{label:"Create evaluation sets",description:"Create Good Case and Bad Case evaluation sets automatically"},profileApplying:{label:"Apply MPA profile",description:"Write the Studio Agent profile into the MPA Runtime"},smokeRunning:{label:"Verify MPA Runtime",description:"Run the Runtime readiness smoke before exposing it as runnable"},runnable:{label:"MPA Runtime ready",description:"The Runtime accepted the profile and passed execution readiness"},github:{label:"Connect GitHub delivery",description:"Initialize the target branch and GitHub Actions workflow"},update:{label:"Update instance configuration",description:"Set Runtime instances to {{min}}–{{max}}"}},githubStatus:{published:"Published",publishing:"Publishing",failed:"Release failed",pending:"Pending release",unknown:"Unknown"},errors:{agentInfoMissing:"Agent information is unavailable",checkUpdateCapability:"Unable to check update capability",checkingUpdateConfig:"Checking update configuration",cloudOnlyUpdate:"Only cloud Agents can be updated",deleteDeployedUnsupported:"Deleting deployed Agents is not supported",deleteDraftUnsupported:"Deleting drafts is not supported",loadMpaDeletePreview:"Unable to load MPA delete preview",loadAgentInfo:"Unable to load Agent information",loadApiKey:"Unable to load the API key",loadGithubVersions:"Unable to load GitHub versions",loadEvaluations:"Unable to load evaluation cases",loadMpaAgentView:"Unable to load MPA Agent status",loadMpaDiagnostics:"Unable to load Runtime diagnostics",loadOptimizations:"Unable to load optimization suggestions",loadRuntimeDetails:"Unable to load Runtime details",loadSessionConfig:"Unable to load Session configuration",loadUsage:"Unable to load usage data",noCreatePermission:"This account cannot create Agents",noManagePermission:"This account cannot manage this Agent",originalConfigUnavailable:"The original configuration is unavailable",probeIntegration:"Unable to check integration capabilities",rollbackVersion:"Unable to create a version rollback",runtimeRegionMissing:"The Runtime region is missing",updateCapabilityMismatch:"The Runtime update capability does not match this configuration",updateCapabilityPending:"The Runtime update capability is still being checked",updateConfigRestoring:"Restoring update configuration",updateUnsupported:"This Runtime cannot be updated",usageMismatch:"The returned usage data does not match this Agent"}},Kme={title:"Environments",loadFailed:"Failed to load environments. Check the storage configuration and try again.",storageUnavailable:"Persistent storage is not configured. Environment management is unavailable.",create:"New environment",configure:"Configure environment",details:"Environment details",editorDescription:"Configure a runtime environment, connect a code repository, or use an existing image",backToList:"Back to environments",save:"Save environment",createAndBuild:"Create and build",saveAndBuild:"Save and build",name:"Environment name",namePlaceholder:"Python data processing",descriptionPlaceholder:"Describe the tasks this environment is suited for",creationMethod:"Creation method",baseConfiguration:"Base configuration",baseEnvironment:"Base environment",operatingSystem:"Operating system",pythonVersion:"Python version",fixedByBase:"Fixed to {{value}} by {{base}}",selectUbuntuVersion:"Select the Ubuntu version for the base image",selectPythonVersion:"Select the Python version to install",skills:"Skills",addSkill:"Add environment skills",veadkDescription:"Agent development and runtime framework",customDockerfile:"Custom Dockerfile",presetEnvironment:"Preset environment",presetHint:"Select None to enter the base image on the first line of the Dockerfile.",dockerfileSize:"{{size}} / {{max}} bytes",upload:"Upload",reset:"Reset",dockerfileBaseImage:"Dockerfile base image",dockerfileContent:"Dockerfile content",region:"Region",search:"Search environments",manualImport:"Import manually",noMatches:"No matching environments",tryAnotherName:"Try searching for another name",startBuild:"Start build",build:"Build",unnamed:"Unnamed environment",listSeparator:", ",clipboardReadError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",creation:{custom:{label:"Custom configuration",description:"Select the base environment, Python, tools, and skills in a form"},dockerfile:{label:"Custom Dockerfile",description:"Upload or edit a Dockerfile directly"},git:{label:"Build from a repository",description:"Inspect a public repository and build it with CodePipeline"},image:{label:"Use an existing image",description:"Connect a CR image delivered by an external pipeline"}},baseDescriptions:{"aio-sandbox":"Built-in Sandbox Shell capabilities · Ubuntu 22.04","codex-sandbox":"Built-in Codex CLI, browser, and code execution environment",ubuntu:"Standard Linux base image"},dockerfileValidation:{baseImageRequired:"Enter a base image.",duplicateFrom:"The base image is fixed on the first line. Remove the FROM instruction from the Dockerfile body.",tooLarge:"The Dockerfile cannot exceed 128 KiB.",empty:"The Dockerfile cannot be empty.",missingFrom:"The Dockerfile must include a FROM instruction."},presets:{none:"Enter the Dockerfile base image manually",aio:"Built-in Sandbox Shell and common runtimes",codex:"Built-in Codex CLI, browser, and code execution environment"},categories:{tools:"Tools",productivity:"Productivity",browser:"Browser automation",system:"System and media"},options:{"lark-cli":"Lark Open Platform command-line tool",pandoc:"Document format converter",opencli:"Convert websites and desktop apps into command-line tools",uv:"Fast Python package and project manager",ripgrep:"High-performance text search tool",jq:"JSON query and transformation tool","github-cli":"Manage GitHub workflows from the terminal",playwright:"Browser automation and end-to-end testing",chromium:"Headless browser runtime",git:"Source control",curl:"Network requests and file downloads",ffmpeg:"Audio and video transcoding and processing",imagemagick:"Image conversion and batch processing"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec",hoursMinutes:"{{hours}} hr {{minutes}} min"},buildStatus:{preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Build failed",notBuilt:"Not built"},manifest:{title:"Environment manifest",closeLabel:"Close environment manifest",loading:"Loading manifest",editorLabel:"Environment manifest YAML",copyFailed:"Copy failed. Try again.",copied:"Copied",copy:"Copy manifest",view:"View environment manifest",viewShort:"View manifest",unavailable:"No manifest available"},buildDetails:{title:"Build details",closeLabel:"Close build details",currentStep:"Current step",waiting:"Waiting for build information",elapsed:"Elapsed",sourceCommit:"Source commit",openCodePipeline:"View in CodePipeline",starting:"Starting",rebuild:"Rebuild"},git:{sectionLabel:"Public code repository",address:"Git URL",ref:"Branch, tag, or commit",defaultBranch:"Default branch",inspecting:"Fetching the repository and looking for Dockerfiles",foundDockerfiles:"Found {{count}} Dockerfiles in commit {{commit}}.",savedDockerfileLoaded:"Loaded the saved Dockerfile. Inspect the repository again to check for updates.",noDockerfile:"No Dockerfile was found. Check the branch or repository contents.",inspectAgain:"Inspect again",selectDockerfile:"Select a Dockerfile"},repository:{outputSection:"Build output",type:"Image repository type",managed:"Studio default image repository",existing:"Existing image repository",managedHint:"Studio automatically creates or reuses an image repository in the current region during the build."},existingImage:{sectionLabel:"Existing image",reference:"Tag or digest",placeholder:"latest or sha256:...",hint:"Enter an image tag or a complete digest beginning with sha256:."},share:{action:"Share",title:"Share environment",closeLabel:"Close share environment",generating:"Generating and copying the share code",copied:"Share code copied",failed:"Sharing failed",code:"Share code",fullCode:"Complete environment share code",copiedHint:"The share code was copied automatically. You can also view or copy it here.",copyFailedHint:"Automatic copy failed. Copy the share code above manually or try again.",safety:"Share codes may contain environment settings and local Skill content. Send them only to trusted recipients.",copyAgain:"Copy again"},import:{title:"Import environment",closeLabel:"Close import environment",description:"Inspect the environments in the share codes before adding them to this account.",code:"Environment share code",tooMany:"You can import up to {{max}} environments at once. {{count}} share codes were found.",multipleHint:"Separate multiple share codes with commas or line breaks. Duplicates are ignored automatically.",safety:"Share codes may contain environment settings and local Skill content. Import them only from trusted sources.",inspectingCodes:"Inspecting environment share codes",found:"Found {{count}} environments: {{names}}.",itemError:"Share code {{index}}: {{error}}",invalidCode:"Invalid share code.",noResult:"The service returned no import result for this share code.",partial:"Imported {{created}} environments; {{remaining}} remain. Valid failed items can be retried.",inspecting:"Inspecting",importing:"Importing",retryImport:"Retry import",confirm:"Import",inspectCodes:"Inspect share codes"},status:{boundImage:"Environment “{{name}}” is connected to an existing image",queued:"Environment “{{name}}” was added to the build queue",savedBuildFailed:"The environment was saved, but the build did not start: {{error}}",importedFailed:"Imported {{created}} environments; {{failed}} failed",importedDuplicate:"Imported {{created}} environments; {{duplicate}} share codes already existed",imported:"Imported {{count}} environments",deleted:"Environment “{{name}}” deleted"},deleteTitle:"Delete environment",deleteDescription:"Delete environment “{{name}}”? This cannot be undone.",errors:{repositoryRequired:"Enter a public code repository URL.",repositoryHttps:"Enter the HTTPS URL of a public repository.",repositoryInvalid:"Enter a valid public repository HTTPS URL.",imageReferenceWhitespace:"A tag or digest cannot contain spaces.",imageDigestInvalid:"The digest must be a complete sha256 value.",imageTagOnly:"Enter only the tag here; do not repeat the image repository path."}},Gme={searchPlaceholder:"Search resource names",emptyMessage:"No options available",searchAriaLabel:"Search {{label}}",loadingMore:"Loading more resources…"},Xme={retryDeployment:"Retry deployment",retrying:"Retrying…",collapse:"Collapse error details",expand:"Expand full error details",copy:"Copy full error details"},Yme={steps:"Build steps",log:"Build log",syncing:"Syncing",loadFailed:"Failed to load",synced:"Synced",recentOnly:" · Recent logs only",copiedLog:"Build log copied",copyLog:"Copy build log",copied:"Copied",copy:"Copy",logContent:"Build log content",waiting:"Waiting for CodePipeline logs…",empty:"No build logs"},Zme={defaultLabel:"Studio default environment",defaultDescription:"Use the standard runtime environment provided by Studio",status:{notBuilt:"Not built",preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Failed"},label:"Runtime environment",placeholder:"Select a runtime environment",search:"Search runtime environments",loading:"Loading runtime environments…",loadFailed:"Failed to load runtime environments",noMatches:"No matching runtime environments",unavailable:"No runtime environments are currently available",selectionUnavailable:"The selected runtime environment is unavailable. Select another one.",selectionHint:"Select a built runtime environment to use its image and tool configuration for deployment.",versionChanged:"The selected environment version has changed. Review it before continuing.",versionMissing:"The selected environment version no longer exists. Select another one.",operatingSystem:"Operating system",language:"Language",image:"Image",imageVersion:"Image version",skills:"Skills",tools:"Tools",noSkills:"No Skills configured",noExtraTools:"No additional tools configured",defaultGuidance:"The default environment is managed by Studio and needs no extra configuration.",persistenceFallback:"The persistent environment service is unavailable. The default environment is being used.",emptyFallback:"No custom environments are available."},Jme={repository:"GitHub repository",githubUrl:"GitHub URL",token:"Token",sessionToken:"{{provider}} Session Token",runtime:"Runtime",commit:"Commit",workflow:"Workflow",syncFailed:"Failed to sync GitHub code",status:{mounted:"Mounted",bound:"Bound",synced:"Synced",created:"Created"},volcengine:"Volcengine",mountDelivery:"Enable continuous delivery",selectedForDeployment:"Selected for deployment",mountOnDeploy:"Enable continuous delivery on deploy",syncCode:"Sync code",deliveryMode:"GitHub delivery mode",sourceSync:"GitHub code sync",delivery:"GitHub delivery",loading:"Loading",running:"Running",runtimeDeliveryHint:"Write an AgentKit Runtime GitHub Actions workflow so future GitHub commits update the bound Runtime.",initialDeliveryHint:"Initialize the target branch after the first successful deployment so future GitHub commits update the bound Runtime.",sourceSyncHint:"Studio pushes directly to the target branch. Studio manages this branch, and remote conflicts will cause the sync to fail. Use the deployment button to publish the Runtime.",tokenPlaceholder:"repo or contents:write permission",getToken:"Get token",hideToken:"Hide token",showToken:"Show token",tokenHelp:"The token is used only for this operation and is cleared from the form after success.",targetBranch:"Target branch",actionsSecretPlaceholder:"Used to write a GitHub Actions secret",sessionTokenPlaceholder:"Optional temporary credential",syncing:"Syncing…",pendingHint:"Continuous delivery is selected. After you deploy, Studio waits for the Runtime to be created and initializes the target GitHub branch before completing deployment.",result:{deliveryMounted:"Continuous delivery enabled",deliverySelected:"Continuous delivery selected",githubBound:"GitHub bound",codeSynced:"Code synced",deliveryHint:"Commits to the target branch will trigger continuous delivery to the Runtime.",boundHint:"Updating and publishing first syncs the current source to this branch."},branch:"Branch",viewPr:"View PR",createFailed:"Creation failed",phase:"Phase",log:"Log"},ege={name:"Feishu",enabling:"Enabling and updating configuration…",description:"Receive messages and reply through a Feishu bot",configuration:"Feishu configuration",configurationMode:"Feishu configuration mode",automatic:"Automatic",manual:"Manual",cancelling:"Cancelling…",scanToCreate:"Scan to create",scanDescription:"Credentials are filled in after authorization",generateQrCode:"Generate QR code",qrCodeAlt:"Feishu bot configuration QR code",scanToConfirm:"Scan with Feishu to confirm",expiresIn:"Expires in {{time}}",created:"Bot created",credentialsFilled:"App credentials filled in automatically",qrCodeExpired:"QR code expired",automaticFailed:"Automatic configuration failed",regenerateQrCode:"Generate a new QR code.",configuredPlaceholder:"Configured; leave blank to keep it",appSecretPlaceholder:"Enter App Secret",hideSecret:"Hide App Secret",showSecret:"Show App Secret"},tge={mode:{auto:"Create automatically",autoDescription:"Create required resources during deployment",recommended:"Recommended",create:"Specify names",createDescription:"Create or reuse resources with the specified names",existing:"Select existing",existingDescription:"Select existing resources from the current account"},selectExisting:"Select an existing resource",searchResource:"Search resource names",noMatch:"No matching resources",noAvailable:"No resources available",searching:"Searching cloud resources…",loading:"Loading cloud resources…",noMatchSentence:"No matching resources.",noAvailableSentence:"No resources available.",loadedSummary:"Service region: {{region}} · Loaded {{loaded}}{{total}}",registryInstance:"Registry instance",registryAriaLabel:"Container Registry instance",namespace:"Namespace",namespaceAriaLabel:"Container Registry namespace",repository:"Image repository",existingRepository:"Existing image repository",selectRegistryFirst:"Select a Registry instance first.",selectNamespaceFirst:"Select a Namespace first.",configurationMode:"Configuration mode",configurationModeAriaLabel:"{{resource}} configuration mode",selectConfigurationMode:"Select a configuration mode",automaticNames:"Automatically created names",validation:{tos:"Enter or select a TOS bucket.",cr:"Enter or select a CR instance, namespace, and image repository.",codePipeline:"Enter or select a CodePipeline Workspace and Pipeline.",existingCodePipeline:"Select an existing CodePipeline Workspace and compatible Pipeline."},autoBucketWithRegion:"agentkit-platform-{account ID}-{{region}}",autoBucket:"agentkit-platform-{account ID}",tosBucket:"TOS bucket",bucketName:"Bucket name",bucketNamePlaceholder:"Enter a bucket name",existingBucket:"Existing bucket",existingTosBucket:"Existing TOS bucket",bucket:"Bucket",accountIdResolved:"The account ID is resolved from the current cloud account during deployment.",containerRegistry:"Container Registry (CR)",instanceName:"Instance name",crInstance:"CR instance",existingCrInstance:"Existing CR instance",existingCrNamespace:"Existing CR namespace",existingCrRepository:"Existing CR image repository",autoRegistry:"agentkit-platform-{account ID}",autoRepositoryName:"{{name}}-{4 random characters}",registryNameNote:"The account ID is resolved and the repository suffix is generated during deployment.",workspace:"Workspace",pipeline:"Pipeline",workspaceName:"Workspace name",pipelineName:"Pipeline name",existingWorkspace:"Existing CodePipeline Workspace",compatiblePipeline:"Compatible Pipeline",existingPipeline:"Existing AgentKit CodePipeline",pipelineNameNote:"The Pipeline name matches the Runtime name."},nge={commit:"Commit",steps:{permissions:"Preflight OTA permissions",resolving:"Resolve target version",downloading:"Download and verify the full update package",preparing:"Prepare VeFaaS Function code",provisioning:"Check and provision Studio cloud resources",scheduler:"Update the scheduled task service",submitting:"Submit the Function update",publishing:"Publish a new Revision and restart the service"},stages:{permissions:"Preflight OTA permissions",resolving:"Resolve version details",downloading:"Download update package",preparing:"Prepare Function code",provisioning:"Provision Studio cloud resources",scheduler:"Update scheduled task service",submitting:"Submit Function update",publishing:"Publish Revision",checking:"Check for updates",unknown:"Unknown stage"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec"},logPermissionPrefix:"Unable to read VeFaaS release logs. The Function role lacks ",logPermissionSuffix:"; the update will continue.",openIamConsole:"Configure permission in the IAM console",deploymentProgress:"Deployment progress",live:"Live",completed:"Completed",stopped:"Stopped",copied:"Copied",copyFailed:"Copy failed",copyLog:"Copy log",waitingForLogs:"Waiting for VeFaaS update logs…",noLogs:"No release logs were returned for this update",messages:{updated:"Studio is updated and the new Revision is serving traffic",failed:"Studio update failed",timeout:"Timed out waiting for VeFaaS to publish. Check for updates again later.",submitted:"Update submitted. Waiting for VeFaaS to publish the new version.",connectionSwitched:"The connection changed. Confirming the new version status."},checkingPermissions:"Checking OTA permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",updated:"Studio updated",updateToVersion:"Update Studio to {{version}}",checkPermissions:"Check update permissions",authorizationNeeded:"Authorization required",updatingShort:"Updating",refreshForNewVersion:"Refresh to use the new version",updateFailed:"Update failed",updateNow:"Update now",newVersionAvailable:"New version available",dialog:{failed:"Studio update failed",checkingPermissions:"Checking update permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",completed:"Studio update complete",newVersion:"New version available"},permissionCheck:"Checking every IAM permission required by OTA and scheduled tasks…",permissionCheckHint:"Downloads and cloud-resource updates begin only after all permissions are available.",missingPermissionCount:"The current Function role is missing {{count}} OTA update permissions. No cloud resources have been changed.",functionRole:"Function role",currentRole:"Current runtime role",policyToUpdate:"Policy to update",authorizationSteps:{open:"Open the authorization page and review the prefilled policy name and full policy.",debug:"Select “Start debugging” on the page to apply the policy update.",return:"Return to this window and select “Authorized, check again”."},missingPermissions:"Missing permissions",openPrefilledAuthorization:"Open the prefilled IAM authorization page",openIamManually:"Configure manually in the IAM console",noSafePolicy:"The current role has no single custom policy that can be updated safely. Ask an administrator to add the permissions above to this role.",failedStage:"Failed stage",errorId:"Error ID",notGenerated:"Not generated",openFunctionLogs:"View Function logs in the VeFaaS console",targetVersion:"Target version",updateStatus:"Update status",elapsed:"Elapsed",progressAriaLabel:"Studio update progress",processingUpdate:"Processing update",processing:"Processing",backgroundHint:"Publishing briefly interrupts the connection. Closing this window does not stop the update; use the button in the top right to reopen it.",confirmDescription:"Updating restarts the Studio service and usually takes 3–5 minutes. Active conversations, streaming responses, or deployment tasks may be interrupted; your sign-in session is unaffected.",selectVersion:"Select version",currentVersion:"Current version",changelog:"What's new",noChangelog:"No release notes",runInBackground:"Run in background",authorizedRecheck:"Authorized, check again",tryAgain:"Try again"},ige={deploy:"Deploy",update:"Update",planHash:"Plan hash",backToConfiguration:"Back to configuration",releaseRegion:"Release region",deployRegion:"Deployment region",regionPreserved:"The existing Runtime deployment region is preserved during updates and cannot be changed.",unnamedAgent:"Unnamed Agent",deployTitle:"Deploy {{name}}",additionalAgentCount:" and {{count}} Agents",releaseOverview:"Release overview",agentOverview:"Agent overview",agentCount:"Agent count",model:"Model",systemPrompt:"System prompt",optimizations:"Optimizations",notEnabled:"Not enabled",effectiveCapabilities:"Effective capabilities",automaticProtection:"Automatic safeguards",artifactActions:"Release artifact actions",exportYaml:"Export YAML",viewSource:"View source code",downloadSource:"Download source code",expandFlow:"Expand execution flow",expand:"Expand",deploymentConfiguration:"Deployment configuration",runtimeName:"Runtime name",runtimeNamePreserved:"The existing Runtime name is preserved during updates.",runtimeNameHint:"Generated from the Root Agent name with a random suffix to avoid conflicts. Use 4–64 letters, numbers, hyphens, or underscores.",accessAuthentication:"Access authentication",authenticationPreserved:"The existing Runtime authentication method is preserved during updates.",authenticationMethod:"Authentication method",authenticationAriaLabel:"Deployment authentication method",authenticationPlaceholder:"Select an authentication method",messageChannels:"Message channels",instanceSettings:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",sidecarSingleInstance:"Harness Sidecar currently supports one instance only. The Runtime is fixed at 1–1.",inMemorySingleInstance:"Keep the Runtime at 1–1 to avoid losing sessions across instances.",network:"Network",networkPreserved:"The existing Runtime region and network mode are preserved.",networkMode:"Network mode",networkModes:{public:"Public",both:"Public + VPC"},subnetId:"Subnet ID",subnetHint:"Optional; separate multiple IDs with commas",sharedInternetAccess:"Shared public internet access in the VPC",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",createEvaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment succeeds.",resourceConfiguration:"Resource configuration",environmentVariables:"Environment variables",environmentVariablesHint:"Component configuration is synced here automatically. Review the final values before deployment.",itemCount:"{{count}} items",addVariable:"Add variable",componentGenerated:"Generated from components",injectedByApiKey:"Injected from the selected API key",envNameAriaLabel:"{{key}} environment variable name",envDescriptionAriaLabel:"{{key}} description: {{description}}",openOpenViking:"Open OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}: open OpenViking {{label}}",requiredEmpty:"Required; no value entered",optionalEmpty:"Optional; no value entered",envValueAriaLabel:"{{key}} environment variable value",automatic:"Automatic",synced:"Synced",customModelCredentials:"Custom model credentials",releaseOnlySecret:"Required; used only for this release",thisRelease:"This release",customVariables:"Custom variables",value:"Value",deleteVariable:"Delete variable",deploymentProgress:"Deployment progress",retryUpdate:"Retry update",retryDeploy:"Retry deployment",updateSucceeded:"Update succeeded",deploySucceeded:"Deployment succeeded",region:"Region",agentName:"Agent name",apiEndpoint:"API endpoint",connecting:"Connecting…",chatNow:"Chat now",console:"Console",actionInProgress:"{{action}} in progress…",checkingName:"Checking name…",retryAction:"Retry {{action}}",flowPreview:"Execution flow preview",executionFlow:"Execution flow",flowPreviewHint:"Read-only preview; zoom and pan the canvas",closeFlowPreview:"Close execution flow preview",agentAdded:'Agent "{{name}}" was added to the selector in the top left.',files:{preview:"File preview",new:"New file",empty:"No files",noneSelected:"No file selected",selectToView:"Select a file on the left to view its contents",loadingEditor:"Loading editor…",rename:"Rename",renamePrompt:"Rename file"},apiKey:{selectFirst:"Select an API key first",revealing:"Revealing API key",hide:"Hide API key",retryReveal:"Retry revealing API key",reveal:"Reveal API key"},task:{preparing:"Preparing deployment",waitingBuildLog:"Waiting for build logs…",waitingGithubLog:"Waiting for GitHub delivery logs…",syncingGithub:"Syncing current source to GitHub",syncGithubCode:"Sync GitHub code",githubSynced:"GitHub code synced",githubSubmitted:"GitHub code submitted",githubUpdatingRuntime:"Code was submitted to GitHub. GitHub Actions is updating the same Runtime.",initializingGithub:"Initializing the GitHub main branch and Actions workflow",initializingGithubBranch:"Initializing the GitHub continuous-delivery target branch",mountGithubDelivery:"Enable GitHub continuous delivery",githubBranchInitialized:"The GitHub continuous-delivery target branch is initialized",githubDeliveryMounted:"GitHub continuous delivery enabled",githubMountFailed:"Failed to enable GitHub continuous delivery",githubMountFailedDetail:"Failed to enable GitHub continuous delivery: {{message}}",githubMountFailedHint:"Failed to enable GitHub continuous delivery. See the GitHub log for details.",applyingMpaProfile:"Applying the Agent profile to MPA Runtime",mpaProfileApplied:"MPA Runtime profile applied",runningMpaSmoke:"Verifying the MPA Runtime execution path",mpaReady:"MPA Runtime is ready",deploymentComplete:"Deployment complete",deployedNotConnected:"Deployed, not connected yet",cancelled:"Cancelled",cancelledHint:"Deployment was cancelled and the Runtime resources were requested for deletion.",deploymentStatusUnconfirmed:"Deployment status unconfirmed",deploymentFailed:"Deployment failed",buildFailedHint:"Image build failed. See the build log for details."},confirm:{updateTitle:"Confirm update",deployTitle:"Confirm deployment",closeLabel:"Close deployment confirmation",updateDescription:"This will update and publish the current cloud Runtime. It may take a few minutes. Continue?",deployDescription:"This will create a new cloud Runtime. Deployment may take a few minutes. Continue?",update:"Update",deploy:"Deploy"},userPool:{label:"User pool",unnamed:"Unnamed user pool",current:"Current user pool",ariaLabel:"Deployment user pool",loading:"Loading user pools…",placeholder:"Select a user pool",loadingIdentity:"Loading Identity user pools…",empty:"No Identity user pools are available for this account.",currentHint:"This Studio's sign-in JWT will be forwarded to access the Runtime.",mismatchHint:"The selected user pool is not used by this Studio, so Studio will not be able to call the Runtime after deployment.",markedHint:"The user pool used by this Studio is marked in the list."},authentication:{apiKeyDescription:"Default method using the Runtime API key",userPool:"User pool",userPoolDescription:"Use a JWT issued by an Identity user pool"},steps:{buildImage:"Build image",deploy:"Deploy",publish:"Publish",syncCode:"Sync code",uploadPackage:"Upload code package",packageImage:"Package image",createRuntime:"Create Runtime",publishService:"Publish service",updateInstances:"Update instance configuration",createEvaluationSets:"Create evaluation sets",applyMpaProfile:"Apply MPA profile",verifyMpaRuntime:"Verify MPA Runtime",mpaReady:"MPA Runtime ready"},errors:{instanceRangeInteger:"Minimum instances must be an integer of 0 or more, and maximum instances must be an integer greater than 0.",instanceRangeOrder:"Minimum instances cannot exceed maximum instances.",selectApiKey:"Select an API key in the model configuration first.",loadApiKey:"Failed to load the API key. Try again.",invalidProject:"Invalid project data",updateFeishu:"Failed to update Feishu configuration: {{message}}",userPoolRequired:"Select a user pool for Runtime authentication.",vpcRequired:"Enter a VPC ID when using a VPC network.",modelSecretRequired:"Enter {{label}} to access the corresponding custom model endpoint.",managedApiKeyRequired:"{{requirement}}. Return to model configuration and select an API key first.",feishuEnvRequired:"Enter {{field}} after enabling Feishu.",runtimeNameExists:"This Runtime name already exists. Change it and try again.",deployedButGithubMountFailed:"Deployment succeeded, but enabling GitHub continuous delivery failed: {{message}}",deployedButGithubBindFailed:"Deployment succeeded, but binding GitHub failed: {{message}}",mpaRuntimeIdMissing:"Deployment succeeded, but the Runtime ID is missing, so the MPA profile cannot be applied.",mpaOperationIncomplete:"MPA Runtime setup did not complete. Retry this deployment task.",deploymentStatusUnconfirmed:"The connection was interrupted, so the final deployment status cannot be confirmed. The task may still be running in the cloud. Check the same task in AgentKit or CodePipeline and avoid a duplicate deployment.",failedAtStage:"{{action}} failed during {{stage}}: {{message}}",noAgentAtEndpoint:"Connected successfully, but no Agents were found at this endpoint (/list-apps is empty).",addAgent:"Failed to add Agent: {{message}}",modelApiKeyRequired:"Enter the API key for this model endpoint."}},rge={title:"Workspaces",storageUnavailable:"Persistent storage is not configured. Workspace management is unavailable.",detail:"Workspace details",create:"New workspace",editorDescription:"Group frequently used environments. An environment can belong to multiple workspaces.",backToList:"Back to workspaces",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",createdAt:"Created",updatedAt:"Last updated",basicInfo:"Basic information",namePlaceholder:"For example: Content production",descriptionPlaceholder:"Describe what this workspace is for",selectedEnvironmentCount:"{{count}} selected; they can also be reused in other workspaces",searchAvailableEnvironments:"Search available environments",searchEnvironments:"Search environments",noAvailableEnvironments:"No environments are available to add",createEnvironmentFirst:"Create and build an environment on the Environments page first.",noMatchingEnvironments:"No matching environments",tryAnotherName:"Try searching for another name.",environmentStatus:{available:"Available",building:"Building",notBuilt:"Not built"},added:"Added",saved:"Workspace “{{name}}” saved",resourceType:"Workspace resource type",searchWorkspaces:"Search workspaces",loadFailed:"Unable to load workspaces",noMatchingWorkspaces:"No matching workspaces",tryAnotherNameOrEnvironment:"Try another name or environment",noEnvironmentAdded:"No environments added",environmentMissing:"Environment missing",availableFraction:"{{available}}/{{total}} available",available:"Available",availableCount:"{{count}} available",updated:"Updated",addEnvironment:"Add environment",deleteTitle:"Delete workspace",deleteDescription:"Delete workspace “{{name}}”? Its environments will not be deleted.",deleted:"Workspace “{{name}}” deleted",clipboardPermissionError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",codeProjects:"Code projects"},sge={back:"Back",detailNavigation:"Detail navigation",noData:"No data",actions:"Actions",moreActions:"More actions for {{label}}",actionsFor:"Actions for {{label}}",loading:"Loading resources…"},age={addSkill:"Add Skill",remove:"Remove {{name}}",confirmRemoveRuntime:"Remove the running Skill “{{name}}” from the new version?",selectedCount:"Added skills · {{count}}",close:"Close {{label}}",sources:{runtime:"Running source · Preserved as-is; remove it or replace it with a Skill of the same name",local:"Local",skillspace:"AgentKit Skills Center",skillhub:"Volcengine Find Skill marketplace"},tabs:{local:"Local files",localShort:"Local files",skillspace:"AgentKit Skills Center",skillspaceShort:"AgentKit",skillhub:"Volcengine Find Skill marketplace",skillhubShort:"Find Skill"}},oge={model:"Model",turnControls:"Turn controls",pause:"Pause",resume:"Resume",interrupt:"Interrupt",cancel:"Cancel",pauseTurn:"Pause the whole flow at a safe point",resumeTurn:"Resume the whole flow",interruptTurn:"Interrupt this flow and retain Session context",cancelTurn:"Cancel this flow permanently",turnState:{running:"Running",pausing:"Reaching safe point",paused:"Paused",resuming:"Resuming",interrupting:"Interrupting",cancelling:"Cancelling",interrupted:"Interrupted",completed:"Completed",failed:"Failed",cancelled:"Cancelled",orphaned:"Status pending",newTurnRequired:"Continue from checkpoint"},tasks:{ppt:"Presentation",image:"Image generation",video:"Video generation"},prompts:{ppt:{quarterlyReview:"Review 【quarter】 business performance, highlighting metric gaps, causes, and recommended actions",projectUpdate:"Present the progress of 【project name】: milestones, risks, budget, and resource requests",solutionProposal:"Create a solution proposal for 【customer industry】: pain points, architecture, implementation plan, and benefits",industryAnalysis:"Analyze trends in 【industry topic】 and recommend strategic opportunities based on the competitive landscape"},image:{launchVisual:"Design a 【high-tech】 launch-event key visual for 【brand or product】",ecommercePoster:"Create an e-commerce poster for 【product name】 that highlights 【core selling point】 and brand colors",conceptRendering:"Create a photorealistic concept rendering of 【product or space】 in 【usage scenario】",socialGraphic:"Create a concise, professional corporate social graphic for 【campaign theme】"},video:{brandFilm:"Create a 30-second promotional video for 【brand name】 that highlights 【brand value】",productLaunch:"Create a 45-second launch video for 【product name】 covering the pain point, features, scenarios, and call to action",trainingVideo:"Create a corporate training video about 【training topic】 that clearly explains 【key procedure or policy】",eventTeaser:"Create a 20-second teaser for 【event name】 with highlights, time and location, and registration details"}},firstFrame:"First frame",videoToEdit:"Video to edit",baseVideo:"Base video",optimizeSkillPlaceholder:"Describe the skill you want to improve…",createSkillPlaceholder:"Describe the skill you want to create…",createVideoPlaceholder:"Describe the video you want to create…",messageAgentPlaceholder:"Message {{name}}…",selectAgentFirst:"Select an agent first",selectSkillFirst:"Select the Skill you want to improve first",availableSkills:"Available skills",availableSubagents:"Available sub-agents",invokeSkill:"Use a skill",useSubagent:"Use a sub-agent",loadingCapabilities:"Loading Agent capabilities…",noMatchingSkills:"No matching skills for this Agent",noMatchingSubagents:"No matching sub-agents for this Agent",skillFallbackDescription:"Load and run this skill",agentFallbackDescription:"Hand this turn to the Agent",skill:"Skill",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",taskMode:"Task mode",selectTaskMode:"Select a task mode",loadingGenerationModel:"Loading generation model",modelUnavailable:"Model unavailable",cancelTask:"Cancel {{task}} task",stopGenerating:"Stop generating",viewVideoProgress:"View video generation progress",send:"Send",selectTaskType:"Select a task type",enterprisePrompts:"{{task}} enterprise prompts",sessionId:"Session ID",sessionIdLabel:"Session ID: ",initializing:"Initializing",copied:"Copied",copySessionId:"Copy session ID",sessionIdCopied:"Session ID copied",disclaimer:"Responses may be inaccurate",viewLogs:"View logs"},lge={selectAgent:"Select Agent",noLocalAgents:"No local Agents.",searchRuntime:"Search Runtime names",mineOnly:"Created by me",noRuntimes:"No Runtimes.",unsupported:"Unsupported",createdByMe:"Created by me",connecting:"Connecting…",connected:"Connected",connect:"Connect",viewInfoFor:"View information for {{name}}",viewInfo:"View information",agentAndRuntimeInfo:"Agent and Runtime information",detailType:"Detail type",agentInfo:"Agent information",runtimeInfo:"Runtime information",loadingAgentInfo:"Loading Agent information…",cannotLoadAgentInfo:"Agent information is temporarily unavailable",unnamedAgent:"Unnamed Agent",subagents:"Sub-agents",tools:"Tools",skills:"Skills",previewUnsupported:"Preview unavailable",mountedComponents:"Mounted components",noMoreAgentInfo:"No additional Agent configuration information.",local:"Local",model:"Model",status:"Status",memoryMb:"Memory {{value}} MB",instances:"Instances {{min}}–{{max}}",resources:"Resources",version:"Version",loadingDetails:"Loading details…",environmentVariables:"Environment variables",errors:{notFound:"This Runtime no longer exists or the list is out of date. Refresh the list and try again.",accessDenied:"This account cannot access the Runtime. Check its Project and access permissions.",previewUnsupported:"This Agent Server version does not support information previews.",unavailable:"This Runtime is temporarily unavailable. Confirm that its status is Ready and try again.",timeout:"Loading timed out. Try again."},componentKinds:{knowledgebase:"Knowledge base",memory:"Memory",prompt_manager:"Prompt manager",example_store:"Example store",run_processor:"Run processor",tracer:"Trace",toolset:"Toolset",plugin:"Plugin",other:"Other"},runtimeStatus:{ready:"Ready",unreleased:"Unreleased",running:"Running",active:"Running",creating:"Creating",pending:"Pending",deploying:"Deploying",updating:"Updating",failed:"Failed",error:"Error",stopping:"Stopping",stopped:"Stopped",deleting:"Deleting",deleted:"Deleted"}},cge={agent:"Agents",agentTypes:{general:"General Agents",mpa:"MPA Agents",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"Created by",namedAgent:"{{name}} Agent",storageLocation:"Storage location",currentBrowser:"Current browser",region:"Region",viewDeploymentProgress:"View deployment progress for {{name}}",viewRuntimeDetails:"View Runtime details for {{name}}",viewDetails:"View details for {{name}}",time:"Time",remainingTime:"Time remaining",expiringSoon:"Expiring soon",sandboxRemaining:"{{hours}} hr {{minutes}} min",wakeable:"Asleep",neverExpires:"Never expires",editDraftNamed:"Edit draft {{name}}",viewProgress:"View progress",deleteDraftNamed:"Delete draft {{name}}",recheckCompatibility:"Check chat compatibility for {{name}} again",connectedNamed:"{{name}} is connected",wakeAndChat:"Wake {{name}} and start chatting",chatWith:"Chat with {{name}}",waking:"Waking…",deploying:"Deploying",draft:"Draft",checking:"Checking",chatUnsupported:"Chat unsupported",checkFailed:"Check failed",creatorFilter:"Creator filter",agentType:"Agent type",searchAgents:"Search Agents",handoff:"Handoff",agentList:"{{type}} list",noMatchingAgents:"No matching Agents",adjustSearch:"Try adjusting the search or filters",noAgentType:"No {{type}}",noGeneralAgents:"No General Agents",createGeneralAgentDescription:"Create a General Agent to start building and chatting",createAgentType:"Create {{type}}",createAgent:"Create Agent",loadingMore:"Loading more Agents",scrollForMore:"Scroll down to load more",allLoaded:"All Agents loaded",deleteDraftTitle:"Delete draft?",deleteDraftDescription:"“{{name}}” cannot be recovered after deletion.",deleteDraft:"Delete draft",loadGeneralAgents:"Load General Agents",loadAgentType:"Load {{type}}",compatibility:{checking:"Requesting Runtime /list-apps to confirm that this Agent supports Studio chat.",empty:"Runtime /list-apps returned no available Agents, so chat is currently unavailable.",supported:"This Runtime supports Studio chat.",unknownError:"The Runtime /list-apps request failed without a recognizable error."},sandboxStatus:{ready:"Ready",wakeable:"Asleep",creating:"Creating",starting:"Starting",initializing:"Starting",pending:"Pending",running:"Running",failed:"Error",error:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"},wakingHint:"Waking the agent. This may take some time.",mpaCreate:{name:"Name",namePlaceholder:"e.g. test-agent",nameHelp:"Used as the Runtime name. Use 4–64 letters, numbers, underscores or hyphens.",stepsLabel:"Creation steps",steps:{basics:"Basics",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"Database"},next:"Next",previousStep:"Previous",pgDescription:"Choose an existing PostgreSQL instance. Creation prepares an isolated database for this agent on that instance.",pgSplitDescription:"Use the configured business PG Workspace. Agents share this Workspace, each with its own database. Shared resource records are stored separately in mpa_admin_workspace / mpa_admin_db, configured by the administrator.",pgConsole:"Create or inspect an AIDAP PG Workspace in Volcengine",pgHost:"PG host",pgPort:"PG port",pgInvalid:"Enter a valid PG host and port.",pgCredentials:"The deployment service provides the PG login and password; host and port must match its configuration.",openvikingDescription:"Optional. Enter all three fields to enable OpenViking, or leave all blank to omit OpenViking settings from the new agent.",openvikingConsole:"Inspect OpenViking resources in Volcengine",openvikingUrl:"OpenViking service URL",openvikingResourceId:"OpenViking resource ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"Enter a valid HTTPS service URL, resource ID and API Key together, or leave all blank.",openvikingCredentials:"The API Key is used only for this creation and is not saved in browser drafts; re-enter it after a refresh.",tosTitle:"Session output storage",tosDescription:"Optional. Enter complete TOS credentials and a bucket to mount an isolated output directory for every Session. Leave all three blank to use the server defaults; TOS mounting is disabled if no defaults are configured.",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS bucket",tosInvalid:"TOS Access Key, Secret Key, and bucket are all required together.",tosCredentials:"Credentials are used only for this creation and are not saved in browser recovery data or creation task records.",runtimeImage:"MPA image",workerImage:"Worker image",imageDefault:"Leave blank to use the configured image",imageInvalid:"Enter a valid container image reference without URLs, spaces or credentials.",title:"Create MPA agent",agentId:"Agent ID",description:"Description",region:"Deployment region",plan:"Creation plan",sharedResources:"Prepare or reuse the account VPC, subnets and APIG message gateway",agentResources:"Prepare an isolated database, Skill Space and worker, then deploy the agent",readiness:"Verify gateway and agent readiness before adding the agent to the list",checking:"Checking creation configuration…",configured:"Creation configuration is ready. Submission checks cloud resources and starts provisioning.",notConfigured:"Creation prerequisites are not configured. Ask an administrator to configure them, then retry.",loadFailed:"Could not check creation configuration. Please retry.",reload:"Check again",submit:"Start creation",retry:"Retry creation",newAgent:"Create another agent",newAgentDescription:"Create another agent opens an editable new request and replaces this recovery draft. It does not cancel the old task. If the old task is still running, wait for it to finish before submitting.",close:"Close",cancel:"Cancel creation",confirmCancel:"Confirm cancellation",cancelDescription:"Cancellation stops subsequent steps. Created databases, Skill Spaces, gateways and other registered resources are retained. Retry using the same agent ID.",background:"Creation continues after closing this window. Open it again to view progress.",pollFailed:"Progress is temporarily unavailable. Reconnecting; avoid creating another agent.",iamPermissionDenied:"The deployment service lacks IAM permissions to prepare the runtime role. Ask an administrator to grant access, then retry.",iamTrustConflict:"The runtime role trust is incompatible. Ask an administrator to check VeFaaS and APIG access, then retry.",iamPolicyConflict:"An existing runtime policy with the required name has conflicting contents. Ask an administrator to check it, then retry.",iamOwnershipConflict:"The runtime role does not belong to the deployment account. Ask an administrator to check it, then retry.",iamVerificationFailed:"Runtime role permissions could not be confirmed. Check IAM availability and policies, then retry.",iamConfigurationConflict:"Automatic runtime role preparation requires the default MPA role. Check the server creation configuration.",creationFailed:"This step failed. Check its resources, server configuration and permissions, then retry the same agent ID.",cancelFailed:"Cancellation failed. Check the current progress and retry.",cancelled:"Creation cancelled. Registered resources are retained for retry.",timeout:"Creation timed out. Registered resources are retained. Inspect them before retrying.",interrupted:"Creation was interrupted. Retry the same agent ID to recover registered resources.",skillSpace:"Skill Space",states:{running:"Creating",cancelling:"Cancelling",succeeded:"Created",failed:"Creation failed",cancelled:"Cancelled"},stages:{queued:"Queued",iam_role:"Prepare runtime role",checking:"Checking account and configuration",network:"Preparing VPC and subnets",gateway:"Preparing APIG and IM Gateway",database:"Preparing business database",skills:"Preparing Skill Space",worker:"Preparing worker",deploying:"Preparing database, skills and Runtime",verifying:"Waiting for agent readiness",admin_workspace:"Prepare management PG Workspace",business_workspace:"Prepare business PG Workspace",admin_database:"Initialize shared management database"},back:"Keep creating",pgAutoDescription:"VeADK uses its deployment account to create or reuse two PG Workspaces. mpa_admin_workspace / mpa_admin_db stores shared resource records; the business Workspace hosts an independent database for each agent. No PG connection input is needed. Preparation starts after submission.",pgModeChanged:"This submitted task uses previous PG settings and cannot be retried in automatic mode. Ask an administrator to reconcile its resources and task before starting a new creation.",pgMigrationRequired:"An existing shared registry is configured. Migrate its resource records to mpa_admin_workspace / mpa_admin_db and coordinate the registry URL cutover for existing Runtimes, then recheck this configuration."}},uge={library:"Skill library",skill:"Skill",skills:"Skills",skillSpace:"Skill space",sandboxNotConfigured:"Dev Sandbox is not configured by an administrator",adminNotConfigured:"Not configured by an administrator",totalItems:"{{count}} items",cannotLoadSpaces:"Unable to load Skill spaces",someSpacesFailed:"Some Skill spaces failed to load",degradedRelationWarning:"Some relations are invalid. Readable skills have been restored.",downloadZip:"Download ZIP",optimize:"Optimize",closeSkillDetails:"Close Skill details",skillId:"Skill ID",allFiles:"All files",loadingSkillContent:"Loading Skill content…",noSkillContent:"This Skill has no SKILL.md content",addSkill:"Add Skill",localUpload:"Upload locally",localUploadDescription:"Select a ZIP file and upload it to the Skill space after validation",autoCreate:"Create automatically",autoCreateDescription:"Choose a model and style, then create a Skill through conversation",createSkill:"Create Skill",optimizeNamed:"Optimize {{name}}",deleteSkillConfirm:"Delete the entire Skill “{{name}}”? This affects every space that references it.",deleteSpaceConfirm:"Delete Skill space “{{name}}”? Make sure its Skills have been deleted first.",manageSpaceDescription:"Manage Skills in this space and create new versions",backToSpaces:"Back to Skill spaces",overview:"Overview",skillCount:"Skills",skillCountValue_one:"{{count}} Skill",skillCountValue_other:"{{count}} Skills",updatedAt:"Updated",skillsInSpace:"Skills in {{name}}",searchSkills:"Search Skills",cannotLoadSkills:"Unable to load Skills",noMatchingSkills:"No matching Skills",noSkills:"No Skills",tryAnotherName:"Try searching for another name",emptySkillsDescription:"Upload a Skill locally or create one automatically",actions:"Actions",spaceDetails:"Skill space details",editSpace:"Edit space",deleteSpace:"Delete space",searchSpaces:"Search Skill spaces",spaceList:"Skill space list",noMatchingSpaces:"No matching Skill spaces",createSpace:"Create Skill space",newSpace:"New space",loadingMoreSpaces:"Loading more Skill spaces",scrollForMore:"Scroll down to load more",allSpacesLoaded:"All Skill spaces loaded",errors:{loadSpaces:"Unable to load Skill spaces. Try again later.",loadSkills:"Unable to load Skills. Try again later.",loadSkillDetails:"Unable to load Skill details. Try again later.",deleteSkill:"Unable to delete the Skill",deleteSpace:"Unable to delete the Skill space",downloadSkill:"Unable to download the Skill"},status:{active:"Available",available:"Available",creating:"Creating",disabled:"Disabled",enabled:"Enabled",failed:"Error",inactive:"Inactive",pending:"Pending",published:"Published",ready:"Ready",released:"Published",running:"Running",success:"Healthy",unavailable:"Unavailable",unreleased:"Unreleased",updating:"Updating",unknown:"Unknown"},sharedSpace:"Enterprise shared space",sharedDescription:"Skills available to everyone, published and maintained by administrators",sharedVisibility:"Everyone",sharedPreparing:"Preparing shared space",sharedLoadFailed:"Shared space unavailable",sharedEmpty:"No shared skills yet. Skills published by administrators will appear here",requestPublication:"Request publication",reviewSubmitting:"Submitting…",reviewSubmitted:"Submitted",reviewFailed:"Could not submit the publication request",reviewStatusFailed:"Failed to load review status",reviewRetry:"Apply again",reviewPending:"Pending review",reviewApproving:"Publishing",reviewApproved:"Shared",reviewReturned:"Returned",reviewHistory:"Review history",skillDetailSections:"Skill detail sections",versions:{title:"Version management",refresh:"Refresh",uploading:"Uploading…",upload:"Upload new version",close:"Close",hint:"New versions become public after approval and do not replace published versions; the skill name in the ZIP must match the original",loading:"Loading versions…",loadFailed:"Unable to load versions",filesFailed:"Unable to load version files",uploadFailed:"Unable to upload the new version",submitFailed:"Unable to submit for review",retry:"Retry",empty:"No versions yet",current:"Current version",notSubmitted:"Not submitted",submitting:"Submitting…",submit:"Request publication",processing:"Version status: {{status}}",filesLoading:"Loading files…",filesEmpty:"No files",history:"Review history",shared:"Published"},author:"Author",authorName:"Author: {{name}}"},dge={library:"Knowledge bases",createBase:"New knowledge base",editBase:"Edit knowledge base",invalidName:"The name must start with a letter and contain only letters, numbers, and underscores.",nameHelp:"Start with a letter. Use up to 48 letters, numbers, or underscores.",optionalDescription:"Description (optional)",descriptionOnly:"AgentKit currently supports updating only the knowledge base description.",previewWeb:"Preview web content",addData:"Add data",openOriginalWeb:"Open original page",backToEdit:"Back to edit",confirmAdd:"Confirm and add",source:"Knowledge source",image:"Image",documentFile:"Document file",webPage:"Web page",webUrl:"Web page URL",generatingWebPreview:"Fetching the page and generating a Markdown preview",selectFile:"Select knowledge file",selectOrDropFile:"Select a file or drag it here",selectedFile:"{{size}} · Click to select another file",imageFileHelp:"PNG, JPG, and JPEG up to 200 MB",documentFileHelp:"PDF, PPTX, DOCX, XLSX, and TXT up to 200 MB",uploadingFile:"Uploading the file and adding it to the knowledge base",optionalName:"Name (optional)",optionalType:"Type (optional)",generatePreview:"Generate preview",uploadFile:"Upload file",editMetadata:"Edit knowledge metadata",knowledge:"Knowledge item",field:"Field",value:"Value",backToList:"Back to knowledge bases",metadataJson:"Metadata (JSON)",provider:"Provider",knowledgeId:"Knowledge ID",project:"Project",creator:"Created by",data:"Data",deleteInvalidAssociation:"Delete invalid association",noData:"This knowledge base has no data",addFirstData:"Add the first data item",format:"Format",size:"Size",searchData:"Search data",searchLibraryData:"Search knowledge base data",associationInvalid:"Association invalid",providerMissing:"The underlying Provider knowledge base no longer exists",noMatchingData:"No matching data",loadingMoreData:"Loading more data",retryLoading:"Retry loading",details:"Knowledge base details",searchBases:"Search knowledge bases",someBasesFailed:"Some knowledge bases are temporarily unavailable. Other available content is shown.",noMatchingBases:"No matching knowledge bases",noManagePermission:"You do not have permission to manage this knowledge base",loadingMoreBases:"Loading more knowledge bases",deleteBaseTitle:"Delete knowledge base?",deleteBaseDescription:"This removes the AgentKit association for {{name}}. If Studio created it, the Provider resource is also deleted. This cannot be undone.",deleteDocumentTitle:"Delete knowledge item?",deleteDocumentDescription:"This removes {{name}} from the Provider knowledge base. This cannot be undone.",preview:{processingTitle:"Data is being processed",processingDetail:"A preview will be available after parsing. Reload later.",failedTitle:"Data parsing failed",failedDetail:"Check the source file or page URL and add it again, or reload the latest status.",noParsedTitle:"No parsed content is available yet",noParsedDetail:"Text, tables, or page images will appear after the knowledge base finishes parsing this file.",noMediaTitle:"No media preview is available yet",noMediaDetail:"The knowledge base has not returned an accessible media preview. Reload later.",noDataTitle:"No data is available to preview",noDataDetail:"The knowledge base has not returned parsed results. Reload later.",attachmentError:"The attachment cannot be previewed. Try again later.",imageAlt:"Knowledge data image",audioUnsupported:"This browser does not support audio previews.",videoUnsupported:"This browser does not support video previews.",namedPdf:"{{name}} PDF preview",pdf:"PDF preview",openPdf:"If it cannot be displayed, open the PDF in a new window",fileUnsupported:"This format cannot be previewed directly online. Parsed content is shown when available.",openOriginalFile:"Open original file",loading:"Loading data preview",openOriginalHint:"You can open the original page to view the source content.",chunk:"Chunk {{index}}",loadingMore:"Loading more",loadMore:"Load more"},errors:{fileTooLarge:"A file cannot exceed 200 MB",invalidImageType:"Select a PNG, JPG, or JPEG image",invalidDocumentType:"Select a PDF, PPTX, DOCX, XLSX, or TXT file",createBase:"Unable to create the knowledge base",updateBase:"Unable to update the knowledge base",metadataObject:"Metadata must be a JSON object",metadataFormat:"Invalid metadata format",noWebPreview:"The page has no Markdown content to preview",addWeb:"Unable to add the web page",previewWeb:"Unable to generate the web page preview",uploadFile:"Unable to upload the file",updateDocument:"Unable to update the knowledge item",loadPreview:"Unable to load the data preview",loadMoreBases:"Unable to load more knowledge bases",loadBases:"Unable to load knowledge bases",loadMoreData:"Unable to load more data",loadData:"Unable to load data",deleteBase:"Unable to delete the knowledge base",deleteDocument:"Unable to delete the knowledge item"}},fge={title:"Feishu channel",refresh:"Refresh",loading:"Loading channel configuration…",unsupported:"This Runtime does not support channel management. Upgrade its MPA image.",unauthorized:"Channel management requires a Studio administrator and an authorized Runtime credential.",configurationError:"Channel management configuration is incomplete. Check the Runtime metadata and encryption key.",requestFailed:"Channel request failed. Check the Runtime connection and retry.",bound:"Bound: {{name}}",unbound:"No Feishu bot is bound.",guidance:"Private chats use separate conversations. In allowed groups, mention this bot to start a conversation.",keyRequired:"Configure a persistent CHANNEL_STATE_ENCRYPTION_KEY in the Runtime before binding.",gateway:"Message gateway",route:"Inbound route",delivery:"Reply delivery",configured:"Configured",missing:"Missing",delivery_not_observed:"Not observed",delivery_delivered:"Delivered",delivery_retrying:"Retrying",missingConfig:"Missing Runtime configuration: {{fields}}",bind:"Bind with QR code",newQr:"Generate a new QR code",unbind:"Unbind",confirmUnbind:"Disconnect this bot? It will stop receiving new messages.",qrAlt:"Bot authorization QR code",openQr:"Open authorization page",uncertain:"Registration was interrupted. Check the bot binding and Gateway before starting again.",bindingFailed:"Binding failed. Check Gateway configuration and retry.",chatId:"Allowed group ID",scope:"Group conversation scope",saveGroup:"Save group",noGroups:"No groups allowed yet. Private chats do not need this permission.",edit:"Edit",remove:"Remove",removeGroup:"Remove {{name}}",scope_group_sender:"Separate by sender",scope_group:"Shared by group",scope_group_topic_sender:"Separate by topic and sender",scope_group_topic:"Shared by topic",status_PENDING:"Waiting for scan",status_SCANNED:"Scanned; waiting for authorization",status_AUTHORIZED:"Authorized; preparing registration",status_REGISTERING:"Registering bot",status_BOUND:"Bot bound",status_FAILED:"Binding failed",status_EXPIRED:"QR code expired",workspaceTitle:"Message channels",workspaceDescription:"Connect messaging apps to this Agent and manage access.",provider_feishu:"Feishu",provider_wecom:"WeCom",provider_dingtalk:"DingTalk",comingSoon:"Not available yet",unavailableDescription:"Binding and message settings for {{name}} are not available yet.",runtimeRequired:"Deploy this Agent to a Runtime before configuring message channels.",bindingTitle:"Bot connection",connected:"Bound",notBound:"Not bound",gatewayDescription:"Gateway configuration for receiving channel messages.",routeDescription:"Routing configuration for delivering messages to this Agent.",deliveryDescription:"Observed reply delivery; configuration alone does not confirm delivery.",groupsTitle:"Group access",groupsDescription:"Allow specific groups and choose how conversations are shared.",providerBindingTitle:"Connect {{name}}",providerUnbound:"Connect a {{name}} bot to let users message this agent.",qrGuidance:"Authorize with {{name}}. The Runtime saves the bot credentials and configures the message gateway.",wecomGuidance:"Authorize with WeCom QR code, or enter a Bot ID and Secret to bind an existing bot.",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"Connect bot",wecomScan:"Bind with QR code",wecomAuthorizing:"Waiting for WeCom authorization…",cancelAuthorization:"Cancel authorization",wecomPopupBlocked:"Allow popups in your browser, then try authorizing again.",wecomAuthCancelled:"WeCom authorization was cancelled. You can scan again.",wecomAuthTimeout:"WeCom authorization timed out. Please scan again.",wecomInvalidResult:"Authorization did not return a Bot ID and Secret. Authorize again or enter them manually.",wecomAuthFailed:"WeCom authorization failed. Try again or enter credentials manually.",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"Upgrade this Runtime image to configure {{name}} manually. Quick setup is still available.",pairingTitle:"Message channel QR pairing",feishuPairingDescription:"If a bot is already connected, it will be replaced after successful Feishu authorization and binding. In the authorization flow, you can bind an existing bot or create a new one.",generatingQr:"Generating pairing QR code…",dingtalkGuidance:"Authorize with DingTalk QR code, or enter a Client ID and Client Secret to bind an existing bot.",wecomPairingDescription:"Pair again in the WeCom authorization window. The new bot replaces the current connection after binding succeeds. Cancelling authorization or a failed binding does not disconnect the existing bot.",configurationMethod:"Configuration method",quickSetup:"Quick setup",manualSetup:"Manual setup",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"Enter the credentials of an existing {{name}} bot to connect it to this agent.",manualReplacement:"Successful binding replaces the current bot. Cancelling or a failed binding does not disconnect the existing bot."},pVe={common:Vme,agentKitPromo:Hme,systemInfo:qme,agentWorkspace:Wme,environmentCenter:Kme,deploymentSelect:Gme,deploymentError:Xme,studioBuildProgress:Yme,cloudEnvironment:Zme,githubCicd:Jme,feishuDeployment:ege,deploymentResources:tge,studioUpdate:nge,projectPreview:ige,workspace:rge,resourceCollection:sge,skillSourcePicker:age,composer:oge,agentSelector:lge,myAgents:cge,skillCenter:uge,knowledge:dge,channels:fge},mVe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:Hme,agentSelector:lge,agentWorkspace:Wme,channels:fge,cloudEnvironment:Zme,common:Vme,composer:oge,default:pVe,deploymentError:Xme,deploymentResources:tge,deploymentSelect:Gme,environmentCenter:Kme,feishuDeployment:ege,githubCicd:Jme,knowledge:dge,myAgents:cge,projectPreview:ige,resourceCollection:sge,skillCenter:uge,skillSourcePicker:age,studioBuildProgress:Yme,studioUpdate:nge,systemInfo:qme,workspace:rge},Symbol.toStringTag,{value:"Module"})),hge="User management",pge="{{count}} members",mge="User",gge="Role",bge="Account status",yge="Last sign-in",vge="Actions",xge="Change role",wge="Close",Oge="Save role",kge="Saving…",Sge="Cancel",Ege="Back",Cge="User pool",Age="Volcengine Identity",Tge="Search name, email or user ID",_ge="Search",jge="Filter by role",Nge="All roles",Rge="Refresh",Ige="Loading users…",Pge="Updated at {{time}}",Dge="{{name}} is now {{role}}",Mge="Retry",Lge="You",$ge="Initial super administrator",Fge="The initial super administrator cannot be demoted here",Bge="The new permissions apply when the user refreshes Studio",Uge="Role needs confirmation",Qge="No matching users",zge="Try another search or role",Vge="Users appear here after signing in or joining this user pool",Hge="{{count}} users",qge="Previous",Wge="Next",Kge="Not signed in yet",Gge="Not provided",Xge={super_admin:"Super administrator",admin:"Administrator",developer:"Developer",user:"User"},Yge={super_admin:"Manage all resources, users and role assignments",admin:"Manage Studio resources",developer:"Develop agents and manage your own resources",user:"Use agents and personal features"},Zge={EXTERNAL_PROVIDER:"Active",CONFIRMED:"Active",NORMAL:"Active",ENABLED:"Active",ACTIVE:"Active",UNCONFIRMED:"Unverified",DISABLED:"Disabled",FORBIDDEN:"Disabled",LOCKED:"Locked",SUSPENDED:"Suspended",FORCE_CHANGE_PASSWORD:"Password change required"},Jge={request_failed:"The request did not finish. Refresh the list to confirm its current state before retrying",invalid_response:"The user service returned an invalid response. Refresh and try again",identity_unavailable:"Identity is unavailable. Try again later or check service permissions",identity_resource_missing:"The user or user pool no longer exists. Refresh the list",super_administrator_required:"Only super administrators can manage users",sign_in_required:"Sign in and try again",user_not_in_pool:"Your account does not belong to this user pool",user_disabled:"Your account is disabled",protected_administrator:"The initial super administrator cannot be demoted",cannot_demote_self:"You cannot demote your own super administrator role",role_change_conflict:"The role has changed. Close this dialog and refresh the list before retrying",cross_origin_request:"Change roles from the current Studio page"},gVe={title:hge,memberCount:pge,user:mge,role:gge,status:bge,lastLogin:yge,actions:vge,changeRole:xge,close:wge,save:Oge,saving:kge,cancel:Sge,back:Ege,pool:Cge,volcengineIdentity:Age,searchPlaceholder:Tge,search:_ge,filterRole:jge,allRoles:Nge,refresh:Rge,loading:Ige,updatedAt:Pge,saved:Dge,retry:Mge,you:Lge,initialAdministrator:$ge,protectedExplanation:Fge,effectiveAfterRefresh:Bge,roleConflict:Uge,noUsers:Qge,tryAnotherSearch:zge,poolEmpty:Vge,resultCount:Hge,previous:qge,next:Wge,neverLoggedIn:Kge,unknown:Gge,roles:Xge,descriptions:Yge,states:Zge,errors:Jge},bVe=Object.freeze(Object.defineProperty({__proto__:null,actions:vge,allRoles:Nge,back:Ege,cancel:Sge,changeRole:xge,close:wge,default:gVe,descriptions:Yge,effectiveAfterRefresh:Bge,errors:Jge,filterRole:jge,initialAdministrator:$ge,lastLogin:yge,loading:Ige,memberCount:pge,neverLoggedIn:Kge,next:Wge,noUsers:Qge,pool:Cge,poolEmpty:Vge,previous:qge,protectedExplanation:Fge,refresh:Rge,resultCount:Hge,retry:Mge,role:gge,roleConflict:Uge,roles:Xge,save:Oge,saved:Dge,saving:kge,search:_ge,searchPlaceholder:Tge,states:Zge,status:bge,title:hge,tryAnotherSearch:zge,unknown:Gge,updatedAt:Pge,user:mge,volcengineIdentity:Age,you:Lge},Symbol.toStringTag,{value:"Module"})),ebe="Website integration",tbe="Embed an AgentKit Runtime on your website as a floating chat window",nbe="Back to automations",ibe="Add website",rbe="Loading Runtime",sbe="Select Runtime",abe="Website domain",obe="For example, xxxx.com or localhost:5173",lbe="Generating",cbe="Generate token",ube="Added websites",dbe="{{count}} website",fbe="{{count}} websites",hbe="Loading website integrations",pbe="No website integrations yet",mbe="Select a Runtime and enter a website domain to generate a token",gbe="Embed instructions",bbe="Place this code before the closing body tag on your website",ybe="Copied",vbe="Copy code",xbe="Embed code will appear here after you add a website.",wbe="Delete the website integration for {{domain}}?",Obe={load:"Failed to load website integrations",create:"Failed to create website integration",delete:"Failed to delete website integration",noConversationalAgent:"No conversational Agent was found in this Runtime"},kbe={requestFailed:"Request failed ({{status}})",greeting:"Hello. How can I help?",sessionFailed:"Could not start a chat session",unauthorized:"This website is not authorized to start a chat",conversationFailed:"The chat request failed. Try again shortly.",open:"Open Agent chat",close:"Close Agent chat",panelLabel:"Agent chat panel",assistant:"Agent assistant",online:"Online"},yVe={title:ebe,description:tbe,backToAutomations:nbe,addWebsite:ibe,loadingRuntime:rbe,selectRuntime:sbe,websiteDomain:abe,domainPlaceholder:obe,generating:lbe,generateToken:cbe,addedWebsites:ube,websiteCount_one:dbe,websiteCount_other:fbe,loadingIntegrations:hbe,delete:"Delete",emptyTitle:pbe,emptyDescription:mbe,embedMethod:gbe,embedInstructions:bbe,copied:ybe,copyCode:vbe,embedHint:xbe,confirmDelete:wbe,errors:Obe,widget:kbe},vVe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:ibe,addedWebsites:ube,backToAutomations:nbe,confirmDelete:wbe,copied:ybe,copyCode:vbe,default:yVe,description:tbe,domainPlaceholder:obe,embedHint:xbe,embedInstructions:bbe,embedMethod:gbe,emptyDescription:mbe,emptyTitle:pbe,errors:Obe,generateToken:cbe,generating:lbe,loadingIntegrations:hbe,loadingRuntime:rbe,selectRuntime:sbe,title:ebe,websiteCount_one:dbe,websiteCount_other:fbe,websiteDomain:abe,widget:kbe},Symbol.toStringTag,{value:"Module"})),Sbe={types:{all:"All types",document:"Documents",image:"Images",video:"Videos"},previewArtifact:"Preview {{name}}",moreActions:"More actions for {{name}}",actionMenu:"Actions for {{name}}",download:"Download",downloading:"Downloading",edit:"Edit details",delete:"Delete artifact",previewFailed:"Could not preview “{{name}}”: {{message}}",downloadStarted:"Download started for {{name}}",downloadFailed:"Could not download “{{name}}”: {{message}}",updated:"Updated {{name}}",deleted:"Deleted {{name}}",deleteFailed:"Could not delete “{{name}}”: {{message}}",typeFilter:"Artifact type",searchAria:"Search artifacts",searchPlaceholder:"Search artifacts or sessions",retry:"Retry",close:"Close",listAria:"Artifact list",loadFailed:"Could not load artifacts",loadDetailFallback:"Check the storage configuration and try again.",reload:"Reload",noMatch:"No matching artifacts",noArtifacts:"You do not have any artifacts yet",searchHint:"Try another search or artifact type",emptyHint:"Artifacts created in chats will appear here automatically",columns:{name:"Name",source:"Source",updatedAt:"Modified",actions:"Actions"},loadingMore:"Loading more artifacts",unknownTime:"Unknown time",preview:{close:"Close preview",meta:"{{type}} / Version {{version}}",loading:"Loading preview",alt:"Preview of {{name}}",loadFailed:"The preview could not be loaded. Try again later or download the file.",unsupported:"This format cannot be previewed online. Download the file to view it.",sourceAria:"Artifact source",agent:"Agent",session:"Session",tool:"Generated by",createdAt:"Created",fileSize:"File size",tags:"Tags",viewSession:"View session"},deleteDialog:{title:"Delete artifact?",description:"“{{name}}” will be permanently removed from the artifact library. The chat history will not be affected.",deleting:"Deleting",confirm:"Delete",close:"Close delete confirmation"},api:{withStatus:"{{message}} ({{status}})",listFailed:"Could not load the artifact library",syncFailed:"Could not sync chat artifacts",updateFailed:"Could not update the artifact",deleteFailed:"Could not delete the artifact",downloadFailed:"Could not download the artifact"}},Ebe={unknownSource:"Unknown source",unknownCreator:"Unknown creator"},Cbe={nameRequired:"Enter an artifact name",tooManyTags:"You can add up to {{max}} tags",tagTooLong:"Each tag can contain up to {{max}} characters",title:"Edit artifact details",subtitle:"The content file will not be modified",close:"Close edit dialog",name:"Name",description:"Description",descriptionPlaceholder:"Add its purpose, version, or usage notes",tags:"Tags",tagsPlaceholder:"Separate tags with commas, up to {{max}}",cancel:"Cancel",saving:"Saving",save:"Save"},Abe={change:{added:"Added",modified:"Modified",deleted:"Deleted"},noChanges:"There are no source changes between these versions",chooseFile:"Select a file on the left to view its code",compareTitle:"Compare versions",workspaceTitle:"Source workspace",projectFallback:"Agent project",switchTheme:"Switch source theme",switchThemeTitle:"Switch to {{theme}} theme",themes:{dark:"dark",light:"light"},closeWorkspace:"Close source workspace",close:"Close",changedFiles:"Changed files",projectFiles:"Project files",changes:"Changes",files:"Files",openFiles:"Open files",noFileSelected:"No file selected",comparisonDirection:"Comparison direction",before:"Before optimization",after:"After optimization",loadingEditor:"Loading editor…",changedFileCount_one:"{{count}} file changed",changedFileCount_other:"{{count}} files changed",fileCount_one:"{{count}} file",fileCount_other:"{{count}} files",lineCount_one:"{{count}} line · UTF-8",lineCount_other:"{{count}} lines · UTF-8",viewSource:"View source",viewSourceAria:"View and edit project source"},Tbe={nav:"Search",selectAgent:"Select an Agent",checkingCapabilities:"Checking Agent capabilities",notMounted:"This Agent does not have {{label}} mounted",sources:{session:"Sessions",web:"Web",knowledge:"Knowledge base",memory:"Long-term memory"},webDescription:"Search with the web_search tool",backendLocal:"Local",failed:"Search failed: {{message}}",placeholder:{selectAgent:"Select an Agent first",web:"Search the web",knowledge:"Search {{name}}",knowledgeFallback:"this Agent's knowledge base",memory:"Search {{name}}",memoryFallback:"this user's long-term memory",session:"Search this Agent's sessions"},sourceTypeAria:"Search source: {{label}}",notSelected:"Not selected",sourceType:"Search source",selectSource:"Select a search source",noAgentHint:"Select an Agent to search its sessions, the web, and mounted data sources.",loadingCapabilities:"Loading this Agent's search capabilities…",sourceUnavailable:"This Agent does not have this data source mounted",instructions:{web:"Enter keywords and press Enter or select the button to search with web_search.",knowledge:"Enter a question to search this Agent's knowledge base.",memory:"Enter a clue to search long-term memories saved across this user's sessions.",session:"Enter keywords and press Enter or select the button to search this Agent's sessions."},noResults:"No results found for “{{query}}”.",knowledgeFragment:"Knowledge excerpt {{index}}",memoryFragment:"Memory excerpt {{index}}"},_be={title:"Developer Resources",sections:{documentation:{title:"Related links",description:"Open development documentation and common AgentKit destinations"},bestPractices:{title:"Best practices",description:"Learn from practical development, debugging, and deployment guidance"},showcases:{title:"Showcases",description:"Explore applications built with AgentKit"}},links:{veadkDocs:"VeADK documentation",cliDocs:"AgentKit CLI documentation",platformDocs:"AgentKit platform documentation",console:"AgentKit console"},articles:{veadkDevelopment:{title:"Develop and deploy an Agent with VeADK",description:"Build an Agent with VeADK and deploy it to AgentKit Runtime."},cliDevelopment:{title:"Develop and deploy an Agent with AgentKit CLI",description:"Create a project, debug an Agent, and deploy it with AgentKit CLI."},coverAlt:"Cover image for {{title}}"},showcases:{researchAssistant:{title:"Multi-agent research assistant",description:"Specialized Agents work together to research, analyze, and summarize findings."},multimodalAnalysis:{title:"Multimodal content analysis",description:"Understand images, documents, and video in a single session."},customerService:{title:"Customer service workspace",description:"Combine knowledge retrieval and tool calls to handle complex support requests."},webSearch:{title:"Web search Agent",description:"Search current web content and organize it into traceable answers."},a2uiApp:{title:"A2UI interactive app",description:"Let an Agent generate interactive interfaces as it works through a task."},previewAlt:"Interface preview for {{title}}"}},jbe={title:"Library",untitledSession:"Untitled session",categoryAria:"Library categories",regionAria:"Region",tabs:{skills:"Skills",knowledge:"Knowledge",artifacts:"Artifacts"}},Nbe={title:"Manage Agents",subtitle:"Agents in AgentKit Runtime that you can manage",mainAgentOnly:"Only the main Agent is shown (control-plane information).",deleteConfirm:'Delete Agent "{{name}}"? Its Runtime will be permanently deleted.',regionFilterTitle:"Filter by region",regionFilterAria:"Region filter",regionAria:"Region",refresh:"Refresh",loading:"Loading…",empty:"You have not deployed any Agents.",connected:"Connected",connect:"Connect to this Agent",deleteRuntime:"Delete this Runtime",loadingDetail:"Loading details…",agentStructure:"Agent structure",secretHidden:"Sensitive value is never shown. Copy it with an authorized request.",revealSecret:"Sensitive value for {{key}}",copySecret:"Copy the value of {{key}}",copy:"Copy",copied:"Copied",copyFailed:"Copy failed",notConfigured:"Not configured",fields:{model:"Model",description:"Description",status:"Status details",project:"Project",version:"Version",resources:"Resources",memory:"Memory",tool:"Tool",knowledge:"Knowledge",mcpToolset:"MCP Toolset",updatedAt:"Updated"},resource:{memory:"Memory {{value}} MB",instances:"Instances {{min}}-{{max}}",concurrency:"Concurrency {{value}}"},environmentVariables:"Environment variables",unnamed:"(Unnamed)"},Rbe={mainAgent:"Main Agent",subAgent:"Sub-agent {{index}}",itemCount_one:"{{count}} item",itemCount_other:"{{count}} items",info:"Agent information",infoAndTopology:"Agent information and settings",loadingInfo:"Loading Agent information…",unnamedAgent:"Unnamed Agent",agentsMd:"AGENTS.md",tools:"Tools",toolList:"Tool list",studioTool:"Studio Tool",removeTool:"Remove tool {{name}}",remove:"Remove",notConfigured:"Not configured",addStudioTool:"Add Studio tools",addStudioToolHere:"Add Studio tools to this chat",skills:"Skills",skillList:"Skill list",addSkill:"Add Skill Space skills",addSkillHere:"Add Skill Space skills to this Session",skillMountNextTurn:"Mounted versions are frozen when the next Turn starts.",previewUnsupported:"Preview is not supported",sessionEnvironment:"Session environment",environment:"Environment",agentCanvas:"Agent canvas",topology:"Structure",nodeKinds:{agent:"Agent",sandbox:"Sandbox","worker-session":"Worker Session","skill-space":"Skill Space",skill:"Skill","studio-tool":"Studio Tool",mcp:"MCP",environment:"Environment",knowledge:"Knowledge","sub-agent":"Sub-agent"},nodeStatuses:{configured:"Configured",mounted:"Mounted",running:"Running",paused:"Paused"},viewCanvasFullscreen:"View Agent canvas in full screen",viewFullscreen:"View full screen",executionCanvas:"Agent execution canvas",fullscreenExecutionCanvas:"Full-screen Agent execution canvas",closeFullscreenCanvas:"Close full-screen canvas",close:"Close",capabilitiesSubtitle:"Capabilities and collaboration topology",closeInfo:"Close Agent information",infoUnavailable:"Agent information is temporarily unavailable.",refresh:"Refresh information",loadingSkills:"Loading bound skills…",sessionSkills:"Temporary session skills",noBoundSpace:"This agent has no bound Skill Space.",noBoundSkills:"The bound Skill Space has no skills.",loadFailed:"Could not load this information. Refresh to retry.",accessDenied:"You do not have permission to read this information.",documentUnsupported:"Upgrade the Runtime image to enable Studio to read AGENTS.md.",skillsUnsupported:"This Runtime does not provide Skill Space bindings.",skillsDegraded:"Skill information is incomplete. Refresh to retry.",documentEditHint:"Edit the latest version. Saving publishes a new version to this Skill Space and can affect other agents using it. Running sessions may need a cache refresh or a new session. Keep the frontmatter name unchanged.",documentLoading:"Loading SKILL.md…",documentWritable:"Editable",documentReadOnly:"Read only — this space or your permissions do not allow editing",documentLoadFailed:"Could not load SKILL.md. Refresh to retry.",documentSaveFailed:"Save was not confirmed. Your edits are preserved. Reopen to check the current version before retrying.",documentConflict:"A newer version exists. Copy your edits, then reopen the editor to avoid overwriting it.",discardDocument:"Discard unsaved changes?",keepEditing:"Keep editing",discardChanges:"Discard changes",saveDocument:"Save new version"},Ibe={mountFailed:"Could not mount the environment",closeDialog:"Close environment dialog",addTitle:"Add environments",description:"Choose the Sandbox environments this Agent can use in the current session",closeAdd:"Close Add environments",searchAria:"Search environments",searchPlaceholder:"Search environment names or capabilities",availableAria:"Available environments and workspaces",loading:"Loading available environments…",noMatch:"No matching environments or workspaces",workspaces:"Workspaces",reuseAll:"Use every available environment in this workspace",availableEnvironmentCount_one:"{{count}} available environment",availableEnvironmentCount_other:"{{count}} available environments",selectWorkspace:"Select workspace {{name}}",environments:"Environments",includedByWorkspaces:"Included by workspace {{names}}",nameSeparator:", ",selectEnvironment:"Select environment {{name}}",selectedWorkspaceCount_one:"{{count}} workspace selected",selectedWorkspaceCount_other:"{{count}} workspaces selected",coveredEnvironmentCount_one:"{{count}} environment covered",coveredEnvironmentCount_other:"{{count}} environments covered",selectionSummary:"{{workspaces}}, {{environments}}",cancel:"Cancel",mounting:"Mounting…",confirm:"Add selected",mountedAria:"Mounted environments",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",removeWorkspace:"Remove workspace {{name}}",remove:"Remove",removeEnvironment:"Remove environment {{name}}",add:"Add environments",addMore:"Add more environments",addForSession:"Add environments to this session",loadingAvailable:"Loading available environments…",empty:"No AIO Sandbox environments are available."},Pbe={loading:{searching:"Looking for an existing environment",creating:"Initializing environment",connecting:"Connecting to the environment"},initializationFailed:"AgentKit CLI environment initialization failed. Current status: {{status}}.",sessionExpired:"The AgentKit CLI session does not exist or has expired. Try again.",initializationTimeout:"AgentKit CLI environment initialization timed out. Try again later.",nonPersistent:"Non-persistent environment",recyclingHoursMinutes:"Environment reclaimed in {{hours}} hr {{minutes}} min",recyclingMinutes:"Environment reclaimed in {{minutes}} min",connectionError:`Could not connect to the Studio service because the server did not respond. Original error: {{message}}`,unavailable:"Connection unavailable",requestFailed:"AgentKit CLI request failed",retry:"Retry",terminalTitle:"AgentKit CLI terminal"},Dbe={labels:{coding:"Coding",get_city_weather:"City weather",get_location_weather:"Location weather",web_fetch:"Fetch web content",studio_write_artifact:"Save session artifact"},closeDialog:"Close dialog",title:"Add Studio tools",description:"Studio BFF runs these tools for {{agentName}} in the current session. No Runtime installation is required.",close:"Close Add Studio tools",searchAria:"Search Studio tools",searchPlaceholder:"Search by name or tool ID",availableAria:"Available Studio tools",loading:"Loading Studio tools…",noMatch:"No matching Studio tools",remove:"Remove",add:"Add"},Mbe={artifactLibrary:Sbe,resourceMetadata:Ebe,artifactEdit:Cbe,codeBrowser:Abe,search:Tbe,developerResources:_be,library:jbe,manageAgents:Nbe,agentTopology:Rbe,sessionEnvironment:Ibe,agentKitCli:Pbe,studioTools:Dbe},xVe=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:Pbe,agentTopology:Rbe,artifactEdit:Cbe,artifactLibrary:Sbe,codeBrowser:Abe,default:Mbe,developerResources:_be,library:jbe,manageAgents:Nbe,resourceMetadata:Ebe,search:Tbe,sessionEnvironment:Ibe,studioTools:Dbe},Symbol.toStringTag,{value:"Module"})),Lbe={requestFailed:"请求失败 ({{status}})",unknownError:"未知错误",contentTypeMissing:"Content-Type 缺失",response:"响应:{{response}}",fallbackWithDetail:"{{fallback}}:{{detail}}",fallbackWithHttpStatus:"{{fallback}}(HTTP {{status}})",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应({{contentType}})"},$be={unconfigured:"管理员未配置 AgentKit Dev Sandbox,请配置后再使用",invalidSession:"AgentKit CLI 返回了无效的 Session。",loadCapabilitiesFailed:"无法读取 AgentKit CLI 配置。",invalidCapabilities:"AgentKit CLI 返回了无效的配置状态。",listSessionsFailed:"无法读取 AgentKit CLI Session。",invalidSessionList:"AgentKit CLI 返回了无效的 Session 列表。",createSessionFailed:"无法创建 AgentKit CLI Session。",openSessionFailed:"无法打开 AgentKit CLI Session。",openTerminalFailed:"无法打开 AgentKit CLI 终端。",invalidTerminalUrl:"AgentKit CLI 返回了无效的终端地址。"},Fbe={cnBeijing:"华北 2(北京)",cnShanghai:"华东 2(上海)"},Bbe={runtimeUnsupported:"该 Runtime 暂不支持连接,请确认服务已正常运行。"},Ube={autoConfigureFailed:"飞书机器人自动配置失败"},Qbe={actionFailed:"{{action}}失败",detail:"详细信息:{{detail}}",request:"请求:{{request}}"},zbe={persistentMemoryHint:"提示:会话已不存在。使用 in-memory 或 SQLite 短期记忆时,多实例、进程重启或滚动发布都可能导致会话丢失;建议改用基于数据库的持久化短期记忆存储。",unsupportedRouteHint:"提示:该 Runtime 未提供会话能力运行接口,可能是 Runtime 版本与当前 Studio 不兼容。",toolArgumentHint:"提示:模型生成的工具参数格式不完整,请重新发送一次。",resourceCollectionExpiredHint:"提示:本次资源清单已失效,请重新发送任务;系统会重新收集资源后再创建 Agent。",networkConfigurationHint:"提示:请稍后重试,查看 Runtime、模型或网关日志。",modelQuotaHint:"提示:模型当前触发了 TPM/RPM 配额限制,请稍后重试或提高模型配额。",rawResponseLabel:"原始响应:",copySecretFailed:"复制敏感值失败"},Vbe={httpStatus:"HTTP 状态码:{{status}}",errorCode:"错误码:{{code}}",cloudResponseBody:`云端响应正文: {{body}}`,loadFailedWithDetail:"读取实例日志失败:{{detail}}",invalidFormat:"读取实例日志失败:服务返回格式无效"},Hbe={untitledSession:"未命名会话",webUnavailable:"网络搜索接口未就绪(后端未启用 /web/search)。",webFailed:"网络搜索失败:{{message}}",webNotMounted:"当前 Agent 未挂载 web_search 工具。",knowledgeNotMounted:"该 Agent 未挂载知识库。",memoryNotMounted:"该 Agent 未挂载长期记忆。",knowledge:"知识库",longTermMemory:"长期记忆"},qbe={listSpacesFailed:"读取 Skill 空间失败",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",deleteSpaceFailed:"删除 Skill 空间失败",uploadFailed:"上传 Skill 失败",validateFailed:"校验 Skill 失败",deleteFailed:"删除 Skill 失败",listFilesFailed:"读取 Skill 文件失败",downloadFailed:"下载 Skill 失败",sharedSpaceFailed:"共享空间加载失败",reservedSpaceName:"此名称由系统空间保留,请使用其他名称",reviewSpaceFailed:"待审核空间暂不可用",submitReviewFailed:"申请公开失败",listReviewsFailed:"加载审核申请失败",reviewFilesFailed:"加载提交文件失败",decideReviewFailed:"审批失败,请重试",listVersionsFailed:"无法加载技能版本",uploadVersionFailed:"上传技能新版本失败"},Wbe={truncatedData:"{{data}}…(已截断,共 {{count}} 个字符)",incompleteEvent:"SSE 流在事件完整返回前已结束。原始数据:{{data}}",invalidEventJson:"无法解析 SSE 事件中的 JSON。原始数据:{{data}}"},Kbe={loadConfigNetworkFailed:"无法加载登录配置,请检查网络后重试。",configServiceFailed:"登录配置服务异常(HTTP {{status}}),请稍后重试。",invalidConfigResponse:"登录配置服务返回了无法解析的响应,请稍后重试。",serviceNetworkFailed:"无法连接身份服务,请检查网络后重试。",invalidServiceResponse:"身份服务返回了无法解析的响应,请稍后重试。",serviceFailed:"身份服务异常(HTTP {{status}}),请稍后重试。"},Gbe={invalidToken:"GitHub Token 无效或没有仓库写入权限",notFound:"仓库、分支或文件不存在,或 Token 无权访问",rejectedCommit:"GitHub 拒绝了提交,请检查分支和文件状态",requestFailed:"GitHub 请求失败(HTTP {{status}})",networkFailed:"连接 GitHub 失败,请检查网络后重试",invalidRepositoryFormat:"GitHub Repo 格式应为 owner/repository",insecureRepositoryUrl:"仅支持安全的 github.com 仓库地址",unsafeProjectPath:"Agent 项目目录必须是仓库内的安全相对路径",tokenRequired:"GitHub Token 不能为空",invalidBaseBranch:"目标分支格式不正确",invalidPublishBranch:"发布分支格式不正确",noFiles:"没有需要提交的文件",missingBaseSha:"目标分支缺少有效 Git SHA",fileAlreadyExists:"目标仓库中已存在 {{path}},未覆盖现有文件",pathNotUpdatable:"目标路径 {{path}} 不是可更新的文件",invalidPullRequest:"GitHub 未返回有效的 Pull Request"},Xbe={loadCapabilitiesFailed:"加载视频模型能力失败",uploadAssetFailed:"上传{{fileName}}失败",enhancePromptFailed:"提示词优化失败",createTaskFailed:"创建视频生成任务失败",getTaskFailed:"查询视频生成任务失败",downloadFailed:"下载生成视频失败"},Ybe={listFailed:"加载网站集成失败",createFailed:"创建网站集成失败",deleteFailed:"删除网站集成失败"},Zbe={loadFailed:"读取知识库失败",htmlHidden:"[HTML 内容已隐藏]",redacted:"[已脱敏]",depthTruncated:"[内容过深,已截断]",circularReference:"[循环引用]",diagnosticsUnavailable:"[诊断信息无法显示]",statusCode:"状态码:{{status}}",errorCode:"错误码:{{code}}",requestId:"请求 ID:{{requestId}}",diagnostics:"诊断:{{diagnostics}}",detail:"详情:{{detail}}",signInRequired:"请先登录后再访问知识库",forbidden:"你没有权限操作这个知识库",notFound:"知识库或知识内容不存在",conflict:"知识库当前状态不允许执行此操作",requestFailed:"知识库请求失败 ({{status}})"},Jbe={invalidName:"名称须为 1~128 个字符,不能包含控制字符、不可见格式字符或 < >。",renameProjectFailed:"修改项目名称失败",renameVersionFailed:"修改版本名称失败",invalidNameUpdateResponse:"名称更新响应与请求不一致,请刷新后重试。",invalidSourceSnapshot:"源码快照的响应格式无效。",invalidProjectList:"项目列表的响应格式无效。",invalidProjectVersion:"项目版本的响应格式无效。",loadProjectsFailed:"无法读取已保存项目",loadVersionsFailed:"无法读取项目版本",deleteVersionFailed:"删除项目版本失败",invalidDeleteVersionResponse:"删除项目版本的响应格式无效。",loadProjectSourceFailed:"无法读取项目源码",loadSnapshotFailed:"无法读取源码快照",restoreSnapshotFailed:"无法恢复当前源码快照",downloadSourceFailed:"下载源码失败",downloadNotZip:"源码下载响应不是 ZIP 文件。",downloadSizeMismatch:"源码压缩包大小与发布记录不一致,请重试。"},eye={invalidFormat:"{{label}}格式错误。",validationSeparator:";",invalidAnalysisResult:"迁移分析结果格式错误。",invalidFrameworkCandidate:"框架候选格式错误。",invalidAnalysisEvidence:"分析证据格式错误。",invalidEntryCandidate:"入口候选格式错误。",invalidQuestion:"待确认问题格式错误。",invalidPendingInput:"分析问题无法读取",invalidTask:"迁移会话格式错误。",invalidAnalysisReference:"分析结果引用格式错误。",invalidSourcePersistence:"迁移源码保存状态格式错误。",invalidActivity:"迁移执行动态格式错误。",invalidActivityItem:"迁移执行动态项格式错误。",invalidActivityTool:"迁移执行工具项格式错误。",invalidActivityPlan:"迁移执行计划格式错误。",invalidActivityPlanItem:"迁移执行计划项格式错误。",invalidArtifact:"迁移产物格式错误。",invalidEnvironmentDefaults:"环境变量默认值格式错误。",invalidArtifactFile:"迁移产物文件格式错误。",invalidVerificationCheck:"迁移校验项格式错误。",requestValidationFailed:"请求参数校验失败:{{detail}}",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}})。请检查代理或网关配置。",loadCapabilitiesFailed:"读取迁移能力失败",invalidCapabilities:"迁移能力格式错误。",invalidModelCapabilities:"迁移模型能力格式错误。",loadTasksFailed:"读取迁移会话失败",invalidTaskList:"迁移会话列表格式错误。",createTaskFailed:"创建迁移会话失败",uploadProjectFailed:"上传迁移项目失败",loadActivityFailed:"读取迁移执行动态失败",loadEventsFailed:"订阅迁移进度流失败",invalidEventsResponse:"迁移进度流返回了非法数据帧。",reconnecting:"连接已断开,正在重新连接迁移进度流…",startFailed:"启动迁移失败",submitAnswersFailed:"提交分析补充信息失败",submitInputFailed:"提交分析回答失败",stopFailed:"终止迁移失败",deleteTaskFailed:"删除迁移会话失败",loadArtifactFailed:"读取迁移产物失败",loadArtifactFileFailed:"读取迁移产物文件失败",downloadArtifactFailed:"下载迁移产物失败",evaluation:{datasetSaveFailed:"保存评测用例失败",datasetLoadFailed:"读取评测用例失败",statusLoadFailed:"读取评测状态失败",resumeFailed:"继续评测失败",retryFailed:"重新评测失败",reportLoadFailed:"读取评测报告失败",reportDownloadFailed:"下载评测报告失败"},labels:{analysisResult:"迁移分析结果",recommendation:"迁移建议",boundary:"迁移边界",frameworkCandidate:"框架候选",analysisEvidence:"分析证据",recommendedFramework:"推荐框架",entryCandidate:"入口候选",entryFramework:"入口框架",includeScope:"迁移包含范围",excludeScope:"迁移排除范围",assumptions:"分析假设",question:"待确认问题",analysisWarnings:"迁移警告",task:"迁移会话",artifactStatus:"迁移产物状态",analysisReference:"分析结果引用",confirmation:"迁移确认",confirmedFramework:"确认框架",error:"迁移错误",sourcePersistence:"迁移源码保存状态",activity:"迁移执行动态",activityItem:"迁移执行动态项",activityTool:"迁移执行工具项",activityPlanItem:"迁移执行计划项",artifact:"迁移产物",cli:"CLI 信息",migration:"迁移信息",startup:"启动信息",environment:"环境变量信息",verification:"校验信息",report:"迁移报告",archive:"产物归档",environmentDefaults:"环境变量默认值",requiredEnvironment:"必需环境变量",optionalEnvironment:"可选环境变量",artifactFile:"迁移产物文件",verificationCheck:"迁移校验项",artifactWarnings:"迁移产物警告",errorResponse:"错误响应",errorDetail:"错误详情",capabilities:"迁移能力",framework:"迁移框架",modelCapabilities:"迁移模型能力",taskList:"迁移会话列表",evaluationAsset:"评测资产",evaluation:"评测状态",evaluationCapabilities:"评测能力",evaluationDimension:"评测维度",evaluationCase:"评测用例",evaluationCriteria:"评测标准",evaluationMessage:"评测对话",evaluationDataset:"评测数据集",evaluationDimensionResult:"评测维度结果",evaluationEvidence:"评测证据",evaluationReport:"评测报告",evaluationSummary:"评测汇总",evaluationCaseResult:"评测用例结果",evaluationOutput:"评测输出",evaluationLimitations:"评测限制",pendingInput:"分析提问",pendingQuestion:"分析问题项",pendingOption:"分析问题选项"}},tye={status:{ready:"就绪",wakeable:"已休眠",creating:"创建中",starting:"启动中",pending:"等待中",running:"运行中",failed:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},developmentTimeout:"等待开发环境响应超时。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentDisconnected:"与开发环境的连接已中断。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentFailed:"开发任务未能继续,开发环境已保留。请在当前会话重试。",invalidStudioResponse:"{{fallback}} Studio 服务响应异常,请刷新后重试。",invalidSession:"AgentKit 沙箱返回了无效的 Session 信息。",invalidSnapshot:"AgentKit 沙箱返回了无效的 Snapshot 信息。",invalidSettings:"Sandbox 返回了无效设置。",invalidThreadSnapshot:"Sandbox 返回了无效 Thread 快照。",emptyConversationResponse:"沙箱对话服务未返回内容。",invalidConversationResponse:"沙箱对话服务返回了无法解析的响应。",conversationFailed:"沙箱对话失败,请稍后重试。",emptyReply:"沙箱未返回有效回复,请重试。",missingSession:"缺少要操作的 AgentKit Session。",listCodexFailed:"无法读取 Codex 智能体,请稍后重试。",invalidSessionList:"AgentKit 沙箱返回了无效的 Session 列表。",invalidSnapshotList:"AgentKit 沙箱返回了无效的 Snapshot 列表。",startFailed:"无法启动 AgentKit 沙箱,请稍后重试。",listAgentFailed:"无法读取 {{kind}} 智能体,请稍后重试。",invalidKindSessionList:"AgentKit 返回了无效的 {{kind}} Session 列表。",invalidKindSnapshotList:"AgentKit 返回了无效的 {{kind}} Snapshot 列表。",createAgentFailed:"无法创建 {{kind}} 智能体,请稍后重试。",missingSessionToOpen:"缺少要打开的 AgentKit Session。",openAgentFailed:"无法打开 {{kind}} 智能体。",invalidAgentHomeUrl:"{{kind}} 智能体返回了无效的主页面地址。",missingSessionForTerminal:"缺少要打开 Terminal 的 AgentKit Session。",openTerminalFailed:"无法打开 {{kind}} Terminal。",deleteAgentFailed:"无法删除 {{kind}} 智能体。",missingSnapshot:"未找到要唤醒的智能体。",resumeSnapshotFailed:"无法唤醒智能体,请稍后重试。",deleteSnapshotFailed:"无法删除智能体,请稍后重试。",missingSessionToConnect:"缺少要连接的 AgentKit Session。",connectCodexFailed:"无法连接 Codex 智能体,请稍后重试。",sessionNotReady:"AgentKit Session 尚未就绪,当前状态:{{status}}。",invalidMessage:"内置智能体会话缺少有效的消息内容。",interruptFailed:"无法停止当前任务。",getStatusFailed:"无法读取 Codex 状态。",getEndpointFailed:"无法读取 Sandbox Endpoint。",invalidEndpoint:"Sandbox 返回了无效 Endpoint。",createHandoffPairingFailed:"无法生成 Codex 云端接力配对码。",invalidHandoffPairing:"Studio 返回了无效的 Codex 云端接力配对码。",getHandoffStatusFailed:"无法读取端云接力状态。",invalidHandoffStatus:"Studio 返回了无效的端云接力状态。",listModelsFailed:"无法读取 Codex 模型列表。",invalidModelList:"Sandbox 返回了无效模型列表。",setModelFailed:"无法切换 Codex 模型。",invalidModel:"Sandbox 返回了无效模型。",listSkillsFailed:"无法读取 Codex Skills。",invalidSkillList:"Sandbox 返回了无效 Skill 列表。",listThreadsFailed:"无法读取 Codex Thread 列表。",invalidThreadList:"Sandbox 返回了无效 Thread 列表。",createThreadFailed:"无法创建新的 Codex Thread。",missingThread:"缺少要读取的 Codex Thread。",readThreadFailed:"无法读取 Codex 历史消息。",resumeThreadFailed:"无法恢复 Codex Thread。",forkThreadFailed:"无法分叉 Codex Thread。",archiveThreadFailed:"无法归档 Codex Thread。",invalidArchiveResult:"Sandbox 返回了无效归档结果。",deleteThreadFailed:"无法删除 Codex Thread。",invalidDeleteResult:"Sandbox 返回了无效删除结果。",compactThreadFailed:"无法压缩 Codex Thread。",getSettingsFailed:"无法读取 Codex 权限与工作空间。",updatePermissionsFailed:"无法更新 Codex 权限。",updateWorkspaceFailed:"无法更新 Codex 工作空间。",invalidWorkingDirectory:"Sandbox 返回了无效工作目录。",listDirectoriesFailed:"无法读取 Sandbox 目录。",invalidDirectoryList:"Sandbox 返回了无效目录列表。",resolveApprovalFailed:"无法提交 Codex 审批决定。",uploadFileFailed:"无法上传文件到 Sandbox。",invalidUploadResult:"Sandbox 返回了无效上传结果。",disconnectCodexFailed:"无法断开 Codex 智能体连接。",deleteCodexFailed:"无法删除 Codex 智能体。",openSandboxTerminalFailed:"无法打开 Sandbox Terminal。",openSandboxBrowserFailed:"无法打开 Sandbox Browser。",toolLabel:"Sandbox 工具",invalidToolUrl:"{{label}} 返回了无效地址。",unsafeToolUrl:"{{label}} 返回了不安全的地址。"},nye={invalidSandboxVersion:"沙箱版本响应格式无效",loadSandboxVersionsFailed:"查询沙箱版本失败",updateSandboxFailed:"更新 Sandbox 失败",invalidSandboxUpdate:"沙箱更新响应格式无效",errorWithDetailAndRawResponse:`{{context}} {{detail}} @@ -52,7 +52,7 @@ Original error: {{message}}`,unavailable:"Connection unavailable",requestFailed: Studio:{{studioUrl}} 配对码:{{pairingCode}}`,installPrompt:`请安装 AgentKit Studio Plugin。请直接执行以下安装命令,不要让我手动打开终端。 安装命令:{{command}}`,title:"接力到云端继续执行",description:"按顺序复制两段提示词,Codex 会通过插件将您的本地任务接力到云端",closeAria:"关闭本地迁移引导",installTitle:"安装插件",installDescription:"首次使用时,请选择一种安装方式。",copied:"已复制",copyInstallPrompt:"复制安装提示词",copyInstallCommand:"复制安装命令",installMethodAria:"插件安装方式",conversationInstall:"与 Codex 对话安装",terminalInstall:"从终端安装",taskTitle:"任务接力",taskDescription:"插件安装完成后复制,Codex 会迁移当前项目并继续执行任务。",copyHandoffPrompt:"复制接力提示词",generatingPairing:"正在生成新的配对码",pairingExpired:"配对码已过期",pairingRemaining:"配对码有效期剩余 {{countdown}}",refreshing:"刷新中",refreshPairing:"刷新配对码",pairingLoading:"正在生成配对码",pairingUnavailable:"配对码尚未生成。",statusAria:"端云接力状态",statusTitle:"接力状态",requestReceivedNamed:"已收到“{{name}}”的端云接力请求",requestReceivedCurrent:"已收到当前项目的端云接力请求",requestHelp:"复制接力提示词后,Codex 的请求会显示在这里。",entering:"正在进入",enterCodex:"进入 Codex",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",steps:{request:"等待端侧请求",session:"创建云端 Session",restore:"恢复项目",continue:"发送续跑任务"},status:{issued:"等待请求",creating:"正在创建 Session",sessionCreated:"正在迁移项目",continuing:"正在启动云端任务",running:"云端执行中",completed:"接力完成",failed:"接力失败"}},Rwe={model:{description:"显示或切换当前对话模型",keywords:"模型 switch"},models:{description:"列出 app-server 可用模型",keywords:"模型列表 list"},skill:{description:"浏览并调用当前工作区可用的 Skill",keywords:"技能 workflow"},skills:{description:"浏览并调用当前工作区可用的 Skills",keywords:"技能列表 workflow list"},new:{description:"开始一个新对话",keywords:"新建 对话"},resume:{description:"打开历史会话或恢复指定 Thread",keywords:"历史 恢复 session"},fork:{description:"从当前上下文分叉一个新对话",keywords:"分叉 branch"},compact:{description:"压缩当前对话上下文",keywords:"压缩 上下文"},archive:{description:"归档当前对话并新建对话",keywords:"归档 关闭"},status:{description:"显示当前连接、Thread、模型与 Token 状态",keywords:"状态 连接 token"},clear:{description:"清空当前视图并开始新对话",keywords:"清空 重置"},help:{description:"显示 Sandbox 支持的快捷命令",keywords:"帮助 命令"},currentModel:"当前模型",availableModel:"可用模型",workspace:"工作空间",notSet:"未设置",modelLabel:"模型",statusLabel:"状态",running:"运行中",idle:"空闲",totalTokens:"累计 Token",contextWindow:"上下文窗口",imageFallback:"图片",unknown:"未知快捷命令:{{command}}。输入 /help 查看可用命令。",automaticSkills:"智能开发模式会自动使用开发能力,无需手动选择 Skill。",activity:{new:"已新建 Codex 对话",resumed:"已恢复 Codex 对话",deleted:"已删除 Codex 历史会话",modelChanged:"已切换 Codex 模型",availableModels:"Codex 可用模型",noModels:"当前没有可用模型",forked:"已分叉 Codex 对话",compacting:"已开始压缩当前 Codex 对话",archived:"已归档 Codex 对话",status:"Codex 当前状态",help:"Sandbox 支持的 Codex 快捷命令"}},Iwe={label:"智能构建任务",queued:"构建任务已排队",running:"构建任务正在后台运行",recovering:"正在恢复构建任务",waiting_user:"构建任务需要继续处理",stopping:"正在停止构建任务",succeeded:"构建任务已完成",cancelled:"构建任务已停止",failed:"构建任务未完成",open:"返回任务",hide:"隐藏任务通知",reconnecting:"正在重新连接任务服务,已有任务继续保留。"},Pwe={common:xwe,tool:wwe,threads:Owe,permissions:kwe,workspace:Swe,approval:Ewe,composer:Cwe,launch:Awe,session:Twe,agentDetails:_we,agentWorkspace:jwe,handoff:Nwe,commands:Rwe,taskNotice:Iwe},UVe=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:_we,agentWorkspace:jwe,approval:Ewe,commands:Rwe,common:xwe,composer:Cwe,default:Pwe,handoff:Nwe,launch:Awe,permissions:kwe,session:Twe,taskNotice:Iwe,threads:Owe,tool:wwe,workspace:Swe},Symbol.toStringTag,{value:"Module"})),Dwe={retry:"重试",signInToContinue:"登录以继续使用",signInWith:"使用 {{provider}} 登录",enterUsername:"输入一个用户名即可开始",usernamePlaceholder:"用户名(字母 + 数字,最多 16 位)",enter:"进入",usernameInvalid:"只能包含大小写字母和数字,最多 16 位。",identityProvider:{volcengine:"火山引擎 Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"火山引擎 AgentKit 提供企业级 Agent 解决方案",byteplus:"BytePlus AgentKit 提供企业级 Agent 解决方案"},legalPrefix:"继续即表示你已阅读并同意 AgentKit",terms:"产品和服务条款",copyright:"© {{year}} VeADK。保留所有权利。"},Mwe={title:"登录状态已过期",description:"当前编辑内容会保留。重新登录后,刚才的操作将自动继续。",waiting:"等待登录完成…",signInAgain:"重新登录"},Lwe={breadcrumbs:"面包屑",selectAgent:"选择 Agent",switchAgent:"切换智能体"},$we={cancel:"取消",close:"关闭确认框"},QVe={login:Dwe,authExpired:Mwe,navbar:Lwe,confirm:$we},zVe=Object.freeze(Object.defineProperty({__proto__:null,authExpired:Mwe,confirm:$we,default:QVe,login:Dwe,navbar:Lwe},Symbol.toStringTag,{value:"Module"})),Fwe={defaultUser:"用户",shortcuts:"快捷入口",tryCli:"体验 AgentKit CLI",developerResources:"开发者资源",systemInfo:"系统信息",language:"语言",issueFeedback:"问题反馈",logout:"退出登录",roles:{admin:"管理员",developer:"开发者",user:"普通用户",super_admin:"超级管理员"}},Bwe={home:"返回首页",expand:"展开侧边栏",collapse:"收起侧边栏",label:"主导航",newChat:"新会话",agents:"智能体",workspaces:"工作区",library:"资源库",cronjobs:"定时任务",automations:"自动化",users:"用户管理",administration:"管控",reviewCenter:"审核中心"},Uwe={title:"历史会话",newConversation:"新会话",create:"新建会话",loading:"正在加载历史会话…",empty:"暂无会话",current:"当前",manage:"管理历史会话:{{title}}",more:"更多",delete:"删除",loadingMore:"加载中…",loadMore:"加载更多",evaluatingTitle:"正在自动评测",evaluating:"评测中",generating:"正在生成"},VVe={account:Fwe,navigation:Bwe,history:Uwe},HVe=Object.freeze(Object.defineProperty({__proto__:null,account:Fwe,default:VVe,history:Uwe,navigation:Bwe},Symbol.toStringTag,{value:"Module"})),Qwe={placeholder:"请选择",collapseOptions:"收起模型选项",expandOptions:"展开模型选项",noOptions:"暂无可用选项",noMatches:"没有匹配项,可直接使用当前模型 ID"},zwe={unsupportedActivity:"不支持的 Skill 对话活动",ariaLabel:"Skill 生成对话"},Vwe={code:"错误码:{{code}}",type:"错误类型:{{type}}",representation:"异常表示:{{value}}",rawResponse:`服务端原始响应: -{{value}}`,original:"原始错误:{{message}}",details:"详细信息"},Hwe={ariaLabel:"Skill 文件树",viewSource:"查看源码",viewPreview:"查看预览",download:"下载",binaryFile:"二进制文件",bytes:"{{value}} 字节",binaryDescription:"当前接口仅返回文件元数据,可单独下载原文件。",metadata:"Skill 元数据",noFiles:"暂无文件"},qwe={close:"关闭",name:"名称",region:"地域",optionalDescription:"描述(可选)",cancel:"取消",create:"创建",creating:"创建中…",save:"保存",saving:"保存中…",upload:"上传",uploading:"上传中…",createSpaceTitle:"新建 Skill 空间",editSpaceTitle:"编辑 Skill 空间",uploadTitle:"上传到 {{name}}",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",archiveValidationFailed:"Skill ZIP 格式校验失败",uploadFailed:"上传 Skill 失败",dropzone:"拖拽 Skill ZIP 到这里",chooseLocalFile:"或点击选择本地文件",archiveHelp:"ZIP 根目录需要包含 SKILL.md,也可以只包含一层包装目录。选择后仅检查格式,不会自动上传。",validating:"正在检查文件格式…",validationPassed:"格式检查通过:{{name}},共 {{count}} 个文件"},Wwe={styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先",custom:"自定义",customFallback:"自定义风格"},stages:{preparing:"正在准备 Dev Sandbox",ready:"Skill 已生成并通过格式校验",failed:"生成失败",cancelled:"已停止",validating:"正在校验 Skill 格式",packaging:"正在整理文件",generating:"正在生成 Skill",repairingAgain:"正在再次修复",autoRepairing:"正在自动修复({{attempt}}/{{max}})"},validation:{fallback:"Skill 格式校验未通过",repairInstruction:"只修复下面列出的 Skill 格式错误,不要改变原有用途和内容范围。",recheckInstruction:"修复后重新检查目录结构、SKILL.md frontmatter 和所有文本文件。",nameTooLong:"Skill 名称不能超过 64 个字符",invalidName:"Skill 名称只能包含小写字母、数字和连字符",modelTooLong:"模型 ID 不能超过 128 个字符",invalidModel:"模型 ID 只能包含字母、数字、点、下划线、连字符、斜杠和冒号"},errors:{loadCapability:"读取 Dev Sandbox 配置失败",autoRepair:"自动修复格式错误失败",pollCandidate:"读取候选方案状态失败,正在重试",createCandidate:"创建候选方案失败",refine:"继续调整失败",repairAgain:"再次修复格式错误失败",selectSpace:"请选择上传的 Skill Space",unsupportedRegion:"当前 Skill 地域不受支持",upload:"上传 Skill 失败",download:"下载失败"},sessionMax:"Session 最长保留 1 小时",remaining:"剩余 {{minutes}}:{{seconds}}",unnamedSpace:"未命名 Skill Space",leaveConfirmation:"离开后将停止并释放正在运行的 Dev Sandbox,确定离开吗?",createTitle:"创建技能",optimizeTitle:"优化 {{name}}",skillFallback:"技能",back:"返回技能空间",home:"主页技能生成",basicInfo:"基本信息",goal:"目标",createIntentPlaceholder:"描述希望这个 Skill 完成什么任务",optimizeIntentPlaceholder:"描述希望如何优化当前 Skill",skillName:"Skill 名称",autoNamePlaceholder:"留空时自动生成",nameHelp:"仅支持小写字母、数字和连字符;留空时自动生成。",createPlans:"生成方案",optimizePlans:"优化方案",createPlansDescription:"按不同方案并行生成多个技能,您可以选择最佳结果",optimizePlansDescription:"按不同方案并行优化当前技能,您可以选择最佳结果",plan:"方案 {{count}}",remove:"移除",model:"模型",modelPlaceholder:"选择或输入模型 ID",style:"风格",customStyle:"自定义风格",customStylePlaceholder:"描述表达方式、严谨程度或输出偏好",addConfiguration:"添加配置",notConfigured:"管理员未配置",generate:"生成",candidates:"候选方案",progress:"进度",retryCandidate:"重试此方案",formatValidationFailed:"格式校验未通过",repairAgain:"再次修复",files:"文件",downloadZip:"下载 ZIP",loadingFiles:"正在读取文件…",filesPending:"生成过程中会在这里显示完整文件树",uploadToSpace:"上传到 Skill Space",loadingSpaces:"正在加载 Skill Space",selectSpace:"选择 Skill Space",continuePlaceholder:"继续调整这个候选方案",continue:"继续调整",uploading:"上传中…",overwrite:"覆盖原 Skill",uploadToSelectedSpace:"上传到 Skill Space",uploadToCurrentSpace:"上传到当前空间",allCandidatesFailed:"所有方案均创建失败,可分别重试。"},Kwe={invalidFormat:"{{label}}格式错误。",recoveryStatus:"Skill 恢复点状态",errorResponse:"错误响应",errorDetails:"错误详情",missingContentType:"Content-Type 缺失",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}}),请检查代理或网关配置。",activity:"Skill 会话活动",invalidActivity:"Skill 会话活动格式错误。",invalidToolActivity:"Skill 工具活动格式错误。",invalidTextActivity:"Skill 文本活动格式错误。",publication:"Skill 发布结果",task:"Skill 会话",file:"Skill 文件",unknownTaskState:"Skill 会话状态无法识别。",capability:"Skill 工作台能力",loadCapability:"读取 Skill 工作台能力失败",prepareTask:"准备 Skill 会话失败",taskReference:"Skill 会话引用",startOptimization:"开始优化 Skill 失败",startTask:"开始 Skill 会话失败",taskSummary:"Skill 会话摘要",taskList:"Skill 会话列表",loadTaskList:"读取 Skill 会话列表失败",invalidTaskList:"Skill 会话列表格式错误。",loadTask:"读取 Skill 会话失败",artifact:"Skill 产物",artifactFile:"Skill 产物文件",loadArtifact:"读取 Skill 产物失败",refine:"继续调整 Skill 失败",stop:"停止当前 Skill 任务失败",publish:"发布 Skill 失败",nonNdjson:"发布 Skill 失败:服务端返回了非 NDJSON 响应。",missingStream:"发布 Skill 失败:服务端没有返回进度流。",publishProgress:"发布进度",invalidPublishProgress:"发布进度格式错误。",publishError:"发布错误",unknownPublishEvent:"未知的发布进度事件。",publishResult:"发布结果",streamEnded:"发布进度流提前结束,无法确认发布结果。请刷新技能中心确认状态。",deleteTask:"删除 Skill 会话失败",download:"下载 Skill 失败"},Gwe={configSelect:Qwe,conversation:zwe,errorDetails:Vwe,fileTree:Hwe,management:qwe,generation:Wwe,api:Kwe},qVe=Object.freeze(Object.defineProperty({__proto__:null,api:Kwe,configSelect:Qwe,conversation:zwe,default:Gwe,errorDetails:Vwe,fileTree:Hwe,generation:Wwe,management:qwe},Symbol.toStringTag,{value:"Module"})),Xwe={back:"返回上一页",reload:"重新加载",notConfigured:"未配置",name:"名称",description:"描述",delete:"删除",save:"保存",saving:"保存中",add:"添加",manage:"管理",environment:"环境",noDescription:"暂无描述",refresh:"刷新",close:"关闭",retry:"重试",loading:"加载中…",previousPage:"上一页",nextPage:"下一页",edit:"编辑",all:"全部",search:"搜索",cancel:"取消",view:"查看",viewDetails:"查看详情",deleting:"删除中…",create:"创建",creating:"创建中",adding:"添加中",generating:"生成中",uploading:"上传中",preview:"预览",loadFailed:"加载失败",select:"选择",collapse:"收起",expand:"展开",none:"无"},Ywe={ariaLabel:"AgentKit 快速入口",closeAriaLabel:"关闭 AgentKit 欢迎卡片",title:"欢迎使用 AgentKit",description:"通过 AgentKit 平台快速构建与托管您的企业级智能体",docsAriaLabel:"打开 AgentKit 文档,在新窗口打开",docs:"文档",consoleAriaLabel:"打开 AgentKit 控制台,在新窗口打开",console:"控制台"},Zwe={checkUpdates:"检查更新",checkingVersions:"正在检查版本…",versionCheckError:"查询沙箱版本失败,请检查凭据、区域及接口权限后重试",sandboxUpdateError:"Sandbox 更新失败,请刷新检查实际状态后重试",modelEnvRepairUnavailable:"无法补齐模型环境变量,请检查 CODEX_API_KEY 和 CODEX_BASE_URL",updateSandbox:"更新{{variant}}{{name}}",updatingSandbox:"更新中",title:"系统信息",description:"查看当前 Studio 版本及关联的基础资源",general:"通用",currentVersion:"当前版本",storage:"存储",loadingStorage:"正在加载存储信息",tosAddress:"TOS 地址",openTosConsole:"在云控制台中打开 TOS 存储桶",environmentBuild:"环境构建",loadingEnvironmentResources:"正在加载环境构建资源",environmentResourcesError:"环境构建资源加载失败,请检查云凭据后重试。",codePipelineWorkspace:"CodePipeline 工作空间",codePipelinePipeline:"CodePipeline 流水线",openCodePipelineWorkspace:"在云控制台中打开 CodePipeline Workspace",createdOnFirstBuild:"首次构建时自动创建",containerRegistryRepository:"Container Registry 仓库",openContainerRegistryRepository:"在云控制台中打开 Container Registry 仓库",sandboxInfo:"沙箱信息",loadingSandboxInfo:"正在加载沙箱信息",sandboxInfoError:"沙箱信息加载失败,请重试。",snapshot:"快照版",snapshotWithSpace:"快照版 ",openToolConsole:"在云控制台中打开{{name}}",updateModelEnv:"更新{{variant}}{{name}}模型环境变量",modelEnvUpdated:"已更新",modelEnvAlreadyCurrent:"无需更新",userPool:"用户池",loadingUserPool:"正在加载用户池",userPoolError:"用户池加载失败,请重试。",modelEnvUpdateError:"模型环境变量更新失败,请重试。",openUserPoolConsole:"在云控制台中打开用户池{{name}}",unnamedUserPool:"未命名用户池",id:"ID",domain:"域名",region:"区域",noLocalUserPool:"本地模式未配置用户池",noUserPool:"当前 Studio 未配置用户池"},Jwe={workspace:"Agent 工作区",library:"Agent 库",evaluation:"评测",agentList:"Agent 列表",agentDetails:"Agent 详情",newAgent:"新建 Agent",loading:"加载中…",loadingCloudAgents:"正在加载云端 Agent…",noAgentSelected:"请选择一个 Agent",local:"本地",remote:"云端",localAgent:"本地 Agent",remoteAgent:"云端 Agent",agentCount:"{{count}} 个 Agent",agentCountLabel:"Agent 数量",details:"详情",chat:"对话",update:"更新",backToAgentList:"返回 Agent 列表",loadingAgent:"正在加载 Agent",loadingAgentDescription:"正在读取 Agent 配置和 Runtime 信息。",loadingAgentInfo:"正在加载 Agent 信息…",detailLoadFailed:"无法加载 Agent 详情",detailLoadFailedDescription:"请检查 Runtime 状态后重试。",partialInfoUnavailable:"部分信息暂时不可用",upgradeRuntimeForDetails:"请升级 Runtime 以查看完整 Agent 信息。",basicInfo:"基本信息",usageOverview:"使用概览",sections:{basic:"基本信息",profileConfig:"Profile 配置",sessionConfig:"会话配置",usage:"使用概览",diagnostics:"诊断",evaluations:"评测",optimizations:"优化建议",integrations:"集成",versions:"版本",channels:"消息渠道"},evaluationGroup:"评测组",optimizations:"优化建议",optimizationsDescription:"根据评测结果查看可执行的优化建议。",integrations:"集成",githubVersions:"GitHub 版本",githubVersionsDescription:"查看持续交付产生的版本并创建回退 PR。",currentVersionOnly:"当前未启用 GitHub 持续交付,仅展示当前生产版本。",loadingVersions:"正在加载版本…",noVersion:"暂无版本记录",prLink:"Pull Request",viewPr:"查看 PR",author:"提交人",publishStatus:"发布状态",viewRelease:"查看发布记录",rollbackToVersion:"回退到此版本",rollingBack:"正在创建回退…",rollbackEvent:"回退事件",sourceMergedRuntimeStill:"最新源码已合并,但 Runtime 仍处于",currentProductionVersionHint:";当前生产版本保持不变。",usageSummary:"使用统计",totalCalls:"总调用次数",userCount:"用户数",userDetails:"用户明细",usageUserList:"Agent 使用用户列表",user:"用户",callCount:"调用次数",lastUsed:"最近使用",unknownUser:"未知用户",loadingUsage:"正在加载使用数据…",refreshing:"刷新中…",noUsage:"暂无使用记录",usageUnavailable:"当前 Agent 暂无可用的使用统计。",usagePagination:"使用记录分页",pageOf:"第 {{page}} / {{total}} 页",notProvided:"暂未提供",integrationMethods:"集成方式",integrationDescription:"通过 Runtime API 或 A2A 协议集成当前 Agent。",integrationProtocol:"集成协议",runtimeStatus:"Runtime 状态",executionFlow:"执行流程",probingIntegration:"正在检测集成能力",probingIntegrationDescription:"正在读取可用端点和鉴权配置。",configurationStatus:"配置状态",discoveryEndpoint:"发现端点",invocationEndpoint:"调用端点",invocationUrl:"调用地址",authentication:"鉴权方式",networkAccess:"网络访问",notAvailable:"暂无",noAuthentication:"无需鉴权",noApiKeyRequired:"无需 API Key",usesOauthJwt:"使用 OAuth / JWT",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",pythonExample:"Python 示例",deploymentConfig:"部署配置",deploymentConfigDescription:"确认实例和运行配置后更新 Runtime。",deploymentRegion:"部署区域",mpaControlPlane:"MPA 控制面",loadingMpaAgentView:"正在读取 MPA Runtime 绑定…",mpaRuntimeBound:"该 MPA Agent 已绑定唯一 Runtime,可继续管理。",mpaRuntimeMissing:"当前 Agent 没有可见的 MPA Runtime 绑定。",mpaRuntimeBindingAmbiguous:"多个 MPA Runtime 匹配当前 Agent,请先修复绑定后再修改。",mpaRuntimeOrphan:"Runtime 存在,但其中没有当前 MPA Profile。",mpaRuntimeLegacyAuthUnsupported:"该 Runtime 使用旧版 MPA 镜像,仍要求 X-Jwt-Token。请先更新到当前 AgentKit 兼容镜像,再管理 Profile 或 Session 配置。",profileConfig:"Profile 配置",profileConfigTitle:"Profile 配置",profileConfigDescription:"查看并应用 Agent 级 MPA Profile。Profile 是 Runtime 的长期默认配置,新会话默认继承它。",profileStatus:"Profile 状态",profileApplied:"已应用",profileNotApplied:"未应用",profileNotAppliedDescription:"当前 Runtime 可运行,但尚未保存为 Studio 可管理的 Profile。应用后会生成 Profile revision。",applyProfile:"应用 Profile",reapplyProfile:"重新应用 Profile",editProfile:"编辑 Profile",profileApplying:"应用中…",profileAppliedNotice:"Profile 已应用,当前 revision 为 {{revision}}。",profileApplyIncomplete:"Profile 应用未完成,请查看当前操作状态后重试。",profileApplyFailed:"Profile 应用失败。",profilePrompt:"系统提示词",profileResources:"资源配置",profileResourceSummary:"{{tools}} 个工具 · {{skills}} 个 Skill · {{mcp}} 个 MCP 服务",sessionConfigTitle:"会话配置",sessionConfigDescription:"查看和调整当前 MPA Session 的执行配置。变更只对下一轮对话生效。",loadingSessionConfig:"正在加载会话配置…",sessionConfigNoAgent:"请选择一个 MPA Agent 后再管理会话配置。",sessionConfigNonMpa:"会话配置仅适用于 MPA Agent。",sessionConfigNoSession:"请先打开这个 MPA Agent 的对话,再修改会话配置。",sessionConfigDifferentRuntime:"请先切回这个 MPA Agent 的当前对话,再修改会话配置。",sessionConfigSaved:"会话配置已更新,下一轮对话将使用新 revision。",sessionConfigStale:"该 Session 已被其他位置修改,已展示最新配置,请确认后再保存。",sessionConfigRevision:"配置 revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"最新 Profile revision",sessionProfileUpgradeAvailable:"检测到新的 Profile revision:v{{current}} → v{{target}}。",upgradeSessionProfile:"升级 Session Profile",sessionProfileUpgrading:"升级中…",sessionProfileUpgraded:"Session Profile 已升级,下一轮对话将使用新 revision。",sessionProfileUpgradeFailed:"Session Profile 升级失败。",sessionModelOverride:"模型覆盖",modelId:"模型 ID",inheritProfileDefault:"继承 Profile 默认值",sessionMcpServers:"MCP 服务",mcpServerCount:"已选择 {{count}} 个",clearSessionMcp:"清空 MCP 服务",mpaDiagnosticsTitle:"Runtime 诊断",mpaDiagnosticsDescription:"查看最近的 Runtime Console 运行记录,以及 Agent、Profile、Turn、task 和 worker 关联。",loadingMpaDiagnostics:"正在加载 Runtime 诊断…",noMpaDiagnostics:"当前 Session 暂无 Runtime 诊断运行记录。",latestRun:"最近运行",traceCorrelation:"Trace 关联",traceCorrelationDescription:"Runtime Console 为本次 invocation 返回的稳定标识。",traceSteps:"Trace 步骤",traceStepsDescription:"当前 invocation 最近的有界 Runtime Console 步骤。",mpaInstanceId:"MPA 实例",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker 类型",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile 版本",step:"步骤",stepCount:"步骤数",duration:"耗时",noTraceSteps:"本次 invocation 暂无 trace 步骤。",executionConfigMode:{replace:"Session 覆盖",clear:"本 Session 已清空",inherit:"使用 Profile 默认值"},concurrency:"并发数",selectedOptimizations:"已选优化项",selectedOptimizationsDescription:"这些优化会应用到本次更新。",optimizationProfile:"优化方案",updatePending:"等待更新",updatingDeployment:"正在更新部署",restoringUpdateConfig:"正在恢复更新配置…",updateConfigUnavailable:"无法读取更新配置",legacyConfigMissing:"旧版本 Runtime 缺少可恢复的配置,请重新创建。",deploymentFailed:"部署失败",continueEditing:"继续编辑",loadingOptimizations:"正在加载优化建议…",noOptimizations:"暂无优化建议",fixPriority:"优先级",suggestedModule:"建议模块",suggestionAndReason:"建议与原因",priority:{high:"高",medium:"中",low:"低"},modules:{agentStructure:"Agent 结构",prompt:"提示词",tool:"工具",knowledge:"知识库",memory:"记忆",workflow:"工作流",other:"其他"},evaluationGroupList:"评测组列表",newEvaluationGroup:"新建评测组",newEvaluationGroupName:"新评测组 {{count}}",searchEvaluationGroups:"搜索评测组",noMatchingEvaluationGroups:"没有匹配的评测组",noEvaluationGroupSelected:"请选择一个评测组",groupStats:"{{agents}} 个 Agent · {{runs}} 次运行",evaluationGroupDetails:"评测组详情",evaluationGroupStats:"{{agents}} 个 Agent · {{caseSet}} · {{runs}} 次运行",startEvaluation:"开始评测",evaluationConfig:"评测配置",historyResults:"历史结果",participatingAgents:"参与 Agent",selectedCount:"已选择 {{count}} 个",evaluationResources:"评测资源",evaluationSet:"评测集",evaluator:"评估器",caseCount:"{{count}} 条案例",evaluationMetrics:"评测指标",selectedMetricCount:"已选择 {{count}} 项",historyDescription:"查看每次评测的分数和运行状态。",noHistory:"暂无评测历史",noHistoryDescription:"运行一次评测后,结果会显示在这里。",evaluationRun:"第 {{index}} 次评测",evaluationRunMeta:"{{time}} · {{agents}} 个 Agent",overallScore:"综合分",completed:"已完成",evaluationDefaults:{coreRegression:"核心能力回归",safetyCheck:"安全与幻觉检查",coreSet:"核心回归集",safetySet:"安全边界集",toolSet:"工具调用集",qualityEvaluator:"综合质量评估器",factualEvaluator:"事实一致性评估器",toolEvaluator:"工具调用评估器",responseQuality:"回答质量",factualAccuracy:"事实准确性",toolUse:"工具调用",responseEfficiency:"响应效率",todayTime:"今天 10:32",yesterdayTime:"昨天 16:08",julyTime:"7 月 25 日 14:20",justNow:"刚刚"},defaultCases:{agentName:"示例 Agent",goodSetName:"示例正向案例集",badSetName:"示例负向案例集",weeklyFeedback:{input:"总结本周客户反馈,并按优先级归类。",output:"覆盖主要问题,给出清晰的优先级与下一步动作。",tag:"总结",reason:"任务完整覆盖了用户目标,输出结构清晰,并给出了可执行的下一步动作。"},research:{input:"查询最新公开资料并附上来源。",output:"调用搜索工具,结论与引用一一对应。",tag:"工具调用"},uncertainConclusion:{input:"在信息不足时直接给出确定结论。",output:"应明确说明未知,并主动询问缺失信息。",tag:"幻觉",reason:"信息不足时仍给出了确定结论,缺少必要的澄清步骤与不确定性说明。"},repeatedTool:{input:"连续重复调用相同工具获取同一结果。",output:"复用已有结果,避免无意义的重复调用。",tag:"效率"}},goodCases:"正向案例",badCases:"负向案例",goodCase:"正向案例",badCase:"负向案例",reference:"参考答案",caseResultFilter:"案例结果筛选",feedbackSourceFilter:"反馈来源筛选",searchCases:"搜索案例",searchCasesPlaceholder:"搜索输入、输出或标签",selectCases:"选择案例",selectAll:"全选",selectAllVisible:"选择当前可见案例",selectedCaseCount:"已选择 {{count}} 条",deleteSelected:"删除所选",deleteSelectedTitle:"删除所选 Agent",deleteSelectionDescription:"确定删除所选的 {{count}} 个项目吗?此操作无法撤销。",deleteCasesConfirm:"删除所选案例",deleteOneCaseConfirm:"删除这个案例",deleteFeedbackCase:"删除反馈案例",noFeedbackCases:"暂无反馈案例",noMatchingCases:"没有匹配的案例",loadingEvaluationSet:"正在加载评测集…",userInput:"用户输入",agentOutput:"Agent 输出",score:"得分",scoreReason:"评分原因",noUserInput:"暂无用户输入",noVisibleResponse:"暂无可见回复",note:"备注:",manualFeedback:"人工反馈",automaticFeedback:"自动反馈",scoreValue:"{{score}} 分",unknownTime:"时间未知",deleteAgentTitle:"删除 Agent",deleteAgentDescription:"确定删除 Agent“{{name}}”吗?",deleteDraftDescription:"确定删除草稿“{{name}}”吗?",deleteAgent:"删除 Agent",closeDeleteConfirmation:"关闭删除确认",mpaDeletePreviewSummary:"Studio 会先删除可见的空闲 MPA Runtime 会话,再删除 AgentKit Runtime。运行中的任务需要先结束或停止后才能删除。",mpaDeletePreviewSessions:"会话",mpaDeletePreviewActiveSessions:"运行中",mpaDeletePreviewIdleSessions:"空闲",mpaDeleteBlocked:"当前无法删除",mpaDeleteBlockerActiveOperation:"仍有 MPA 创建或更新操作在执行。",mpaDeleteBlockerActiveSessions:"Runtime 中仍有运行中的会话。",mpaDeleteBlockerBindingAmbiguous:"当前 Agent 匹配到多个 MPA Runtime。",mpaDeleteBlockerRuntimeMissing:"当前 MPA Agent 没有可见的 Runtime 绑定。",mpaDeleteBlockerOrphanRuntime:"Runtime 可见,但其中缺少当前 MPA Profile。",mpaDeleteStage:{runtime_sessions:"删除 {{count}} 个可见空闲 Runtime 会话",runtime_diagnostics:"清理这些会话关联的诊断数据和挂载元信息",agentkit_runtime:"删除 AgentKit Runtime"},draftDeletionWarning:"草稿将从当前浏览器中删除。",runtimeDeletionWarning:"Runtime 和相关云端资源将被删除。",noneSelected:"尚未选择",none:"无",notPublished:"未发布",notRecorded:"未记录",noTime:"暂无时间",noPr:"暂无 PR",comingSoon:"评测能力即将开放",preparing:"准备中",cancelled:"已取消",failed:"失败",totalCount:"共 {{count}} 条",deploymentProgress:"部署进度",returnToEdit:"返回编辑",retryOperation:"重试操作",buildLog:"构建日志",githubMountLog:"GitHub 挂载日志",githubDeliveryMountLog:"GitHub 持续交付挂载日志",waitingBuildLog:"正在等待构建日志…",waitingGithubMountLog:"正在等待 GitHub 挂载日志…",copy:"复制",copied:"已复制",copyLabel:"复制{{label}}",copiedLabel:"已复制{{label}}",logLines:"{{count}} 行",logStatus:{synced:"已同步",failed:"读取失败",syncing:"同步中",earlyOmitted:"已省略早期日志",recentOnly:"仅显示最近的构建日志",partiallyOmitted:"已省略部分日志"},deployStatus:{running:"正在部署",unconfirmed:"部署状态待确认",success:"部署完成",error:"部署失败",cancelled:"部署已取消"},deploymentSteps:{prepare:{label:"准备部署",description:"校验配置并创建部署任务"},build:{label:"构建镜像",description:"生成运行环境与智能体代码"},deploy:{label:"部署服务",description:"创建并启动 AgentKit Runtime"},publish:{label:"发布服务",description:"等待服务就绪并生成访问地址"},complete:{label:"部署完成",description:"智能体已可以正常使用"},evaluation:{label:"创建评测集",description:"自动创建 Good Case 和 Bad Case 评测集"},profileApplying:{label:"应用 MPA 配置",description:"将 Studio Agent 配置写入 MPA Runtime"},smokeRunning:{label:"验证 MPA Runtime",description:"在标记可运行前执行 Runtime 就绪验证"},runnable:{label:"MPA Runtime 可运行",description:"Runtime 已接受配置并通过执行就绪验证"},github:{label:"挂载 GitHub 持续交付",description:"初始化目标分支与 GitHub Actions workflow"},update:{label:"更新实例配置",description:"将 Runtime 实例数调整为 {{min}}~{{max}}"}},githubStatus:{published:"已发布",publishing:"发布中",failed:"发布失败",pending:"等待发布",unknown:"未知"},errors:{agentInfoMissing:"Agent 信息不可用",checkUpdateCapability:"无法检查更新能力",checkingUpdateConfig:"正在检查更新配置",cloudOnlyUpdate:"仅云端 Agent 支持更新",deleteDeployedUnsupported:"当前不支持删除已部署 Agent",deleteDraftUnsupported:"当前不支持删除草稿",loadMpaDeletePreview:"无法加载 MPA 删除预览",loadAgentInfo:"无法加载 Agent 信息",loadApiKey:"无法读取 API Key",loadGithubVersions:"无法加载 GitHub 版本",loadEvaluations:"无法加载评测案例",loadMpaAgentView:"无法加载 MPA Agent 状态",loadMpaDiagnostics:"无法加载 Runtime 诊断",loadOptimizations:"无法加载优化建议",loadRuntimeDetails:"无法加载 Runtime 详情",loadSessionConfig:"无法加载会话配置",loadUsage:"无法加载使用数据",noCreatePermission:"当前账号没有创建 Agent 的权限",noManagePermission:"当前账号没有管理此 Agent 的权限",originalConfigUnavailable:"原始配置不可用",probeIntegration:"无法检测集成能力",rollbackVersion:"无法创建版本回退",runtimeRegionMissing:"Runtime 区域信息缺失",updateCapabilityMismatch:"Runtime 更新能力与当前配置不匹配",updateCapabilityPending:"Runtime 更新能力仍在确认中",updateConfigRestoring:"正在恢复更新配置",updateUnsupported:"当前 Runtime 不支持更新",usageMismatch:"返回的使用数据与当前 Agent 不匹配"}},e1e={title:"环境",loadFailed:"环境加载失败,请检查存储配置后重试。",storageUnavailable:"管理员未配置持久化存储,环境管理暂不可用。",create:"新建环境",configure:"配置环境",details:"环境详情",editorDescription:"配置运行环境,或接入代码仓库和已有镜像",backToList:"返回环境列表",save:"保存环境",createAndBuild:"创建并构建",saveAndBuild:"保存并构建",name:"环境名称",namePlaceholder:"Python 数据处理",descriptionPlaceholder:"说明这个环境适合处理的任务",creationMethod:"创建方式",baseConfiguration:"基础配置",baseEnvironment:"基础环境",operatingSystem:"操作系统",pythonVersion:"Python 版本",fixedByBase:"由 {{base}} 固定为 {{value}}",selectUbuntuVersion:"选择基础镜像的 Ubuntu 版本",selectPythonVersion:"选择需要安装的 Python 版本",skills:"技能",addSkill:"添加环境技能",veadkDescription:"Agent 开发与运行框架",customDockerfile:"自定义 Dockerfile",presetEnvironment:"预制环境",presetHint:"选择“无”可自行填写 Dockerfile 第一行的基础镜像。",dockerfileSize:"{{size}} / {{max}} 字节",upload:"上传",reset:"重置",dockerfileBaseImage:"Dockerfile 基础镜像",dockerfileContent:"Dockerfile 内容",region:"区域",search:"搜索环境",manualImport:"手动导入",noMatches:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称",startBuild:"开始构建",build:"构建",unnamed:"未命名环境",listSeparator:"、",clipboardReadError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",creation:{custom:{label:"自定义配置",description:"通过表单选择基础环境、Python、工具和技能"},dockerfile:{label:"自定义 Dockerfile",description:"上传或直接编辑 Dockerfile"},git:{label:"从代码仓库构建",description:"探查公开仓库并通过 CodePipeline 构建"},image:{label:"使用已有镜像",description:"绑定由外部流水线交付的 CR 镜像"}},baseDescriptions:{"aio-sandbox":"内置 Sandbox Shell 能力 · Ubuntu 22.04","codex-sandbox":"内置 Codex CLI、浏览器与代码执行环境",ubuntu:"标准 Linux 基础镜像"},dockerfileValidation:{baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"},presets:{none:"自行填写 Dockerfile 基础镜像",aio:"内置 Sandbox Shell 与常用运行时",codex:"内置 Codex CLI、浏览器与代码执行环境"},categories:{tools:"工具",productivity:"效率",browser:"浏览器自动化",system:"系统与媒体"},options:{"lark-cli":"飞书开放平台命令行工具",pandoc:"文档格式转换工具",opencli:"将网站与桌面应用转换为命令行工具",uv:"快速 Python 包与项目管理器",ripgrep:"高性能文本检索工具",jq:"JSON 查询与转换工具","github-cli":"在终端中管理 GitHub 工作流",playwright:"浏览器自动化与端到端测试",chromium:"无头浏览器运行时",git:"代码版本管理",curl:"网络请求与文件下载",ffmpeg:"音视频转码与处理",imagemagick:"图片转换与批处理"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",hoursMinutes:"{{hours}} 小时 {{minutes}} 分"},buildStatus:{preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"构建失败",notBuilt:"未构建"},manifest:{title:"环境 Manifest",closeLabel:"关闭环境 Manifest",loading:"正在加载 Manifest",editorLabel:"环境 Manifest YAML",copyFailed:"复制失败,请重试",copied:"已复制",copy:"复制 Manifest",view:"查看环境 Manifest",viewShort:"查看 Manifest",unavailable:"尚无可用 Manifest"},buildDetails:{title:"构建详情",closeLabel:"关闭构建详情",currentStep:"当前步骤",waiting:"等待构建信息",elapsed:"已用时",sourceCommit:"源码提交",openCodePipeline:"在 CodePipeline 中查看",starting:"正在启动",rebuild:"重新构建"},git:{sectionLabel:"公开代码仓库",address:"Git 地址",ref:"Branch、Tag 或 Commit",defaultBranch:"默认分支",inspecting:"正在拉取仓库并查找 Dockerfile",foundDockerfiles:"已在提交 {{commit}} 中找到 {{count}} 个 Dockerfile。",savedDockerfileLoaded:"已载入保存的 Dockerfile,可重新探查仓库更新。",noDockerfile:"仓库中未找到 Dockerfile,请检查分支或仓库内容。",inspectAgain:"重新探查",selectDockerfile:"选择 Dockerfile"},repository:{outputSection:"构建输出",type:"镜像仓库类型",managed:"Studio 默认镜像仓库",existing:"已有镜像仓库",managedHint:"构建时自动创建或复用当前区域的 Studio 镜像仓库。"},existingImage:{sectionLabel:"已有镜像",reference:"Tag 或 Digest",placeholder:"latest 或 sha256:...",hint:"填写镜像 Tag,或以 sha256: 开头的完整 Digest。"},share:{action:"分享",title:"分享环境",closeLabel:"关闭分享环境",generating:"正在生成并复制分享码",copied:"分享码已复制",failed:"分享失败",code:"分享码",fullCode:"完整环境分享码",copiedHint:"分享码已自动复制,也可在这里查看或手动复制。",copyFailedHint:"自动复制失败,可手动复制上方分享码,或重试。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅发送给可信对象。",copyAgain:"再次复制"},import:{title:"导入环境",closeLabel:"关闭导入环境",description:"先检测分享码中的环境,再确认添加到当前账号。",code:"环境分享码",tooMany:"最多可一次导入 {{max}} 个环境,当前检测到 {{count}} 个分享码。",multipleHint:"多个分享码可使用英文逗号、中文逗号或换行分隔,重复项会自动忽略。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅导入可信来源的分享码。",inspectingCodes:"正在检测环境分享码",found:"检测到 {{count}} 个环境:{{names}}。",itemError:"第 {{index}} 个分享码:{{error}}",invalidCode:"分享码无效。",noResult:"服务未返回该分享码的导入结果。",partial:"已导入 {{created}} 个环境,{{remaining}} 个未完成,可重试有效失败项。",inspecting:"正在检测",importing:"正在导入",retryImport:"重试导入",confirm:"确认导入",inspectCodes:"检测分享码"},status:{boundImage:"环境“{{name}}”已绑定已有镜像",queued:"环境“{{name}}”已进入构建队列",savedBuildFailed:"环境已保存,但构建未启动:{{error}}",importedFailed:"已导入 {{created}} 个环境,{{failed}} 个失败",importedDuplicate:"已导入 {{created}} 个环境,{{duplicate}} 个分享码已存在",imported:"已导入 {{count}} 个环境",deleted:"已删除环境“{{name}}”"},deleteTitle:"删除环境",deleteDescription:"确定删除环境“{{name}}”吗?删除后无法恢复。",errors:{repositoryRequired:"请输入公开代码仓库地址。",repositoryHttps:"请输入公开仓库的 HTTPS 地址。",repositoryInvalid:"请输入有效的公开仓库 HTTPS 地址。",imageReferenceWhitespace:"Tag 或 Digest 不能包含空格。",imageDigestInvalid:"Digest 必须是完整的 sha256 值。",imageTagOnly:"这里只填写 Tag,不要重复填写镜像仓库路径。"}},t1e={searchPlaceholder:"搜索资源名称",emptyMessage:"暂无可用选项",searchAriaLabel:"搜索{{label}}",loadingMore:"正在加载更多资源…"},n1e={retryDeployment:"重试部署",retrying:"正在重试…",collapse:"收起错误信息",expand:"展开完整错误信息",copy:"复制完整错误信息"},i1e={steps:"构建步骤",log:"构建日志",syncing:"同步中",loadFailed:"读取失败",synced:"已同步",recentOnly:" · 仅显示最近日志",copiedLog:"已复制构建日志",copyLog:"复制构建日志",copied:"已复制",copy:"复制",logContent:"构建日志内容",waiting:"正在等待 CodePipeline 输出日志…",empty:"暂无构建日志"},r1e={defaultLabel:"Studio 默认环境",defaultDescription:"使用 Studio 预置的标准运行环境",status:{notBuilt:"未构建",preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"失败"},label:"运行环境",placeholder:"请选择运行环境",search:"搜索运行环境",loading:"正在加载运行环境…",loadFailed:"加载运行环境失败",noMatches:"未找到匹配的运行环境",unavailable:"当前没有可用的运行环境",selectionUnavailable:"所选运行环境当前不可用,请重新选择。",selectionHint:"选择构建完成的运行环境后,部署将使用其镜像和工具配置。",versionChanged:"所选环境版本已更新,请确认后继续。",versionMissing:"所选环境版本已不存在,请重新选择。",operatingSystem:"操作系统",language:"语言",image:"镜像",imageVersion:"镜像版本",skills:"技能",tools:"工具",noSkills:"未配置 Skill",noExtraTools:"未配置额外工具",defaultGuidance:"默认环境由 Studio 管理,无需额外配置。",persistenceFallback:"持久化环境服务暂不可用,当前使用默认环境。",emptyFallback:"当前没有可选择的自定义环境。"},s1e={repository:"GitHub 仓库",githubUrl:"GitHub 地址",token:"访问令牌",sessionToken:"{{provider}} 临时令牌",runtime:"Runtime",commit:"提交",workflow:"工作流",syncFailed:"同步 GitHub 代码失败",status:{mounted:"已挂载",bound:"已绑定",synced:"已同步",created:"已创建"},volcengine:"火山引擎",mountDelivery:"挂载持续交付",selectedForDeployment:"已选择,部署时挂载",mountOnDeploy:"部署时挂载持续交付",syncCode:"同步代码",deliveryMode:"GitHub 交付模式",sourceSync:"GitHub 代码同步",delivery:"GitHub 交付",loading:"读取中",running:"执行中",runtimeDeliveryHint:"写入 AgentKit Runtime GitHub Actions workflow,后续 GitHub 提交会更新绑定 Runtime。",initialDeliveryHint:"首次部署成功后初始化目标分支,后续 GitHub 提交会更新绑定 Runtime。",sourceSyncHint:"Studio 会直接 push 到目标分支;该分支由 Studio 管理,远端冲突时同步会失败。Runtime 仍由部署按钮发布。",tokenPlaceholder:"repo 或 contents write 权限",getToken:"获取 Token",hideToken:"隐藏 Token",showToken:"显示 Token",tokenHelp:"Token 仅用于本次操作,成功后不会保留在表单中。",targetBranch:"目标分支",actionsSecretPlaceholder:"用于写入 GitHub Actions Secret",sessionTokenPlaceholder:"临时凭证可选",syncing:"同步中…",pendingHint:"已选择挂载持续交付。点击部署后,Studio 会等待 Runtime 创建完成并初始化 GitHub 目标分支,初始化成功后才完成部署流程。",result:{deliveryMounted:"已挂载持续交付",deliverySelected:"已选择挂载持续交付",githubBound:"已绑定 GitHub",codeSynced:"代码已同步",deliveryHint:"目标分支提交会触发 Runtime 持续交付。",boundHint:"更新并发布时会先同步当前源码到这个分支。"},branch:"分支",viewPr:"查看 PR",createFailed:"创建失败",phase:"阶段",log:"日志"},a1e={name:"飞书",enabling:"正在启用并更新配置…",description:"接收消息并通过飞书机器人回复",configuration:"飞书配置",configurationMode:"飞书配置方式",automatic:"自动配置",manual:"手动配置",cancelling:"取消中…",scanToCreate:"扫码创建",scanDescription:"授权后自动回填凭据",generateQrCode:"生成二维码",qrCodeAlt:"飞书机器人配置二维码",scanToConfirm:"飞书扫码确认",expiresIn:"{{time}} 后失效",created:"机器人已创建",credentialsFilled:"应用凭据已自动回填",qrCodeExpired:"二维码已失效",automaticFailed:"自动配置失败",regenerateQrCode:"请重新生成二维码。",configuredPlaceholder:"已配置,留空沿用",appSecretPlaceholder:"请输入 App Secret",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret"},o1e={mode:{auto:"自动创建",autoDescription:"部署时自动创建所需资源",recommended:"推荐",create:"指定名称",createDescription:"使用指定名称创建或复用资源",existing:"选择已有",existingDescription:"从当前账号的已有资源中选择"},selectExisting:"请选择已有资源",searchResource:"搜索资源名称",noMatch:"未找到匹配资源",noAvailable:"暂无可用资源",searching:"正在搜索云资源…",loading:"正在加载云资源…",noMatchSentence:"未找到匹配资源。",noAvailableSentence:"暂无可用资源。",loadedSummary:"实际服务区域:{{region}} · 已加载 {{loaded}}{{total}}",registryInstance:"Registry 实例",registryAriaLabel:"镜像仓库 Registry 实例",namespace:"命名空间",namespaceAriaLabel:"镜像仓库 Namespace",repository:"镜像仓库",existingRepository:"已有镜像仓库",selectRegistryFirst:"请先选择 Registry 实例。",selectNamespaceFirst:"请先选择 Namespace。",configurationMode:"配置方式",configurationModeAriaLabel:"{{resource}}配置方式",selectConfigurationMode:"请选择配置方式",automaticNames:"自动创建名称",validation:{tos:"请填写或选择 TOS 存储桶。",cr:"请完整填写或选择 CR 实例、命名空间和镜像仓库。",codePipeline:"请完整填写或选择 CodePipeline Workspace 和 Pipeline。",existingCodePipeline:"请选择已有的 CodePipeline Workspace 和兼容 Pipeline。"},autoBucketWithRegion:"agentkit-platform-{账号 ID}-{{region}}",autoBucket:"agentkit-platform-{账号 ID}",tosBucket:"TOS 存储桶",bucketName:"存储桶名称",bucketNamePlaceholder:"输入存储桶名称",existingBucket:"已有存储桶",existingTosBucket:"已有 TOS 存储桶",bucket:"存储桶",accountIdResolved:"账号 ID 在部署时按当前云账号解析。",containerRegistry:"容器镜像仓库(CR)",instanceName:"实例名称",crInstance:"CR 实例",existingCrInstance:"已有 CR 实例",existingCrNamespace:"已有 CR 命名空间",existingCrRepository:"已有 CR 镜像仓库",autoRegistry:"agentkit-platform-{账号 ID}",autoRepositoryName:"{{name}}-{4 位随机字符}",registryNameNote:"账号 ID 在部署时解析,镜像仓库的随机字符在部署时生成。",workspace:"工作空间",pipeline:"流水线",workspaceName:"Workspace 名称",pipelineName:"Pipeline 名称",existingWorkspace:"已有 CodePipeline Workspace",compatiblePipeline:"兼容 Pipeline",existingPipeline:"已有 AgentKit CodePipeline",pipelineNameNote:"Pipeline 与 Runtime 名称一致。"},l1e={commit:"提交",steps:{permissions:"预检 OTA 所需权限",resolving:"读取目标版本信息",downloading:"下载并校验完整更新包",preparing:"准备 VeFaaS Function 代码",provisioning:"检查并补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布新 Revision 并重启服务"},stages:{permissions:"预检 OTA 权限",resolving:"读取版本信息",downloading:"下载更新包",preparing:"准备 Function 代码",provisioning:"补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布 Revision",checking:"检查更新",unknown:"未知阶段"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},logPermissionPrefix:"无法读取 VeFaaS 发布日志。Function 角色缺少 ",logPermissionSuffix:" 权限,更新会继续。",openIamConsole:"前往 IAM 控制台配置权限",deploymentProgress:"部署进度",live:"实时",completed:"已完成",stopped:"已停止",copied:"已复制",copyFailed:"复制失败",copyLog:"复制日志",waitingForLogs:"等待 VeFaaS 返回更新日志…",noLogs:"本次更新未返回发布日志",messages:{updated:"Studio 已更新,新 Revision 已接管服务",failed:"Studio 更新失败",timeout:"等待 VeFaaS 发布超时,请稍后重新检查版本",submitted:"更新已提交,正在等待 VeFaaS 发布新版本",connectionSwitched:"连接已切换,正在确认新版本状态"},checkingPermissions:"正在检查 OTA 权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",updated:"Studio 已更新",updateToVersion:"更新 Studio 至 {{version}}",checkPermissions:"检查更新权限",authorizationNeeded:"需要授权",updatingShort:"正在更新",refreshForNewVersion:"刷新使用新版",updateFailed:"更新失败",updateNow:"立即更新",newVersionAvailable:"有新版更新",dialog:{failed:"Studio 更新失败",checkingPermissions:"正在检查更新权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",completed:"Studio 更新完成",newVersion:"发现新版本"},permissionCheck:"正在核对 OTA 与定时任务所需的全部 IAM 权限…",permissionCheckHint:"权限全部满足后才会开始下载、更新或发布云资源。",missingPermissionCount:"当前 Function 角色缺少 {{count}} 项 OTA 更新权限,尚未执行任何云资源变更。",functionRole:"Function 角色",currentRole:"当前运行角色",policyToUpdate:"将更新策略",authorizationSteps:{open:"打开授权页面,确认已预填的策略名称和完整策略内容。",debug:"点击页面中的“发起调试”,完成策略更新。",return:"返回此窗口,点击“我已授权,重新检查”。"},missingPermissions:"缺少的权限",openPrefilledAuthorization:"打开已预填的 IAM 授权页面",openIamManually:"前往 IAM 控制台手动配置",noSafePolicy:"当前角色没有唯一可安全更新的自定义策略,请由管理员将上述权限加入该角色。",failedStage:"失败阶段",errorId:"错误 ID",notGenerated:"未生成",openFunctionLogs:"前往 VeFaaS 控制台查看 Function 日志",targetVersion:"目标版本",updateStatus:"更新状态",elapsed:"已用时",progressAriaLabel:"Studio 更新进度",processingUpdate:"正在处理更新",processing:"正在处理",backgroundHint:"发布阶段会短暂中断连接;关闭此窗口不会停止更新,可随时点击右上角按钮重新查看。",confirmDescription:"更新会重启 Studio 服务,预计约 3–5 分钟完成更新与发布。期间正在进行的对话、流式响应或部署任务可能中断,登录态不会受到影响。",selectVersion:"选择版本",currentVersion:"当前版本",changelog:"更新内容",noChangelog:"暂无更新说明",runInBackground:"后台运行",authorizedRecheck:"我已授权,重新检查",tryAgain:"重新尝试"},c1e={deploy:"部署",update:"更新",planHash:"方案哈希",backToConfiguration:"返回配置",releaseRegion:"发布区域",deployRegion:"部署区域",regionPreserved:"更新时沿用现有 Runtime 的部署区域,无法修改。",unnamedAgent:"未命名 Agent",deployTitle:"部署 {{name}}",additionalAgentCount:" 等 {{count}} 个智能体",releaseOverview:"发布概览",agentOverview:"Agent 概览",agentCount:"Agent 数量",model:"模型",systemPrompt:"系统提示词",optimizations:"优化选项",notEnabled:"未启用",effectiveCapabilities:"生效能力",automaticProtection:"自动保护",artifactActions:"发布产物操作",exportYaml:"导出 YAML",viewSource:"查看源代码",downloadSource:"下载源代码",expandFlow:"放大查看执行流程",expand:"放大查看",deploymentConfiguration:"部署配置",runtimeName:"Runtime 名称",runtimeNamePreserved:"更新时保持现有 Runtime 名称不变。",runtimeNameHint:"默认根据 Root Agent 名称生成,并添加随机后缀避免重名;支持 4-64 位字母、数字、连字符和下划线",accessAuthentication:"访问鉴权",authenticationPreserved:"更新时保持现有 Runtime 的鉴权方式不变。",authenticationMethod:"鉴权方式",authenticationAriaLabel:"部署鉴权方式",authenticationPlaceholder:"请选择鉴权方式",messageChannels:"消息渠道",instanceSettings:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",sidecarSingleInstance:"Harness Sidecar 首期仅支持单实例,Runtime 固定为 1~1",inMemorySingleInstance:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",network:"网络",networkPreserved:"现有 Runtime 的区域与网络模式保持不变。",networkMode:"网络模式",networkModes:{public:"公网",both:"公网 + VPC"},subnetId:"子网 ID",subnetHint:"可选,多个用逗号分隔",sharedInternetAccess:"VPC 内共享公网出口",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",createEvaluationSetsHint:"部署成功后,自动创建 Good Case 和 Bad Case 评测集。",resourceConfiguration:"资源配置",environmentVariables:"环境变量",environmentVariablesHint:"组件配置会自动同步到这里,部署前可核对最终值。",itemCount:"{{count}} 项",addVariable:"添加变量",componentGenerated:"组件自动生成",injectedByApiKey:"由所选 API Key 注入",envNameAriaLabel:"{{key}} 环境变量名",envDescriptionAriaLabel:"{{key}}说明:{{description}}",openOpenViking:"打开 OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}:打开 OpenViking {{label}}",requiredEmpty:"必填,尚未填写",optionalEmpty:"可选,尚未填写",envValueAriaLabel:"{{key}} 环境变量值",automatic:"自动",synced:"同步",customModelCredentials:"自定义模型凭据",releaseOnlySecret:"必填,仅用于本次发布",thisRelease:"本次发布",customVariables:"自定义变量",value:"值",deleteVariable:"删除变量",deploymentProgress:"部署进度",retryUpdate:"重试更新",retryDeploy:"重试部署",updateSucceeded:"更新成功",deploySucceeded:"部署成功",region:"区域",agentName:"Agent 名称",apiEndpoint:"API 端点",connecting:"连接中…",chatNow:"立即对话",console:"控制台",actionInProgress:"{{action}}中…",checkingName:"正在检查名称…",retryAction:"重试{{action}}",flowPreview:"执行流程预览",executionFlow:"执行流程",flowPreviewHint:"只读预览,可缩放与拖动画布",closeFlowPreview:"关闭执行流程预览",agentAdded:'Agent "{{name}}" 已添加到左上角下拉列表!',files:{preview:"文件预览",new:"新建文件",empty:"暂无文件",noneSelected:"未选择文件",selectToView:"选择左侧文件以查看内容",loadingEditor:"加载编辑器…",rename:"重命名",renamePrompt:"重命名文件"},apiKey:{selectFirst:"请先选择 API Key",revealing:"正在显示 API Key",hide:"隐藏 API Key",retryReveal:"重试显示 API Key",reveal:"显示 API Key"},task:{preparing:"准备部署",waitingBuildLog:"正在等待构建日志…",waitingGithubLog:"正在等待 GitHub 挂载日志…",syncingGithub:"正在同步当前源码到 GitHub",syncGithubCode:"同步 GitHub 代码",githubSynced:"GitHub 代码已同步",githubSubmitted:"GitHub 代码已提交",githubUpdatingRuntime:"代码已提交到 GitHub,GitHub Actions 正在更新同一个 Runtime",initializingGithub:"开始初始化 GitHub main 分支与 Actions workflow",initializingGithubBranch:"正在初始化 GitHub 持续交付目标分支",mountGithubDelivery:"挂载 GitHub 持续交付",githubBranchInitialized:"GitHub 持续交付已初始化目标分支",githubDeliveryMounted:"GitHub 持续交付已挂载",githubMountFailed:"挂载 GitHub 持续交付失败",githubMountFailedDetail:"GitHub 持续交付挂载失败:{{message}}",githubMountFailedHint:"挂载 GitHub 持续交付失败,详见 GitHub 日志。",applyingMpaProfile:"正在将 Agent 配置应用到 MPA Runtime",mpaProfileApplied:"MPA Runtime 配置已应用",runningMpaSmoke:"正在验证 MPA Runtime 执行链路",mpaReady:"MPA Runtime 已可运行",deploymentComplete:"部署完成",deployedNotConnected:"部署完成,暂未连接",cancelled:"已取消",cancelledHint:"部署已取消,相关 Runtime 资源已请求销毁。",deploymentStatusUnconfirmed:"部署状态待确认",deploymentFailed:"部署失败",buildFailedHint:"构建镜像失败,详见构建日志。"},confirm:{updateTitle:"确认更新",deployTitle:"确认部署",closeLabel:"关闭部署确认",updateDescription:"将更新并发布到当前云端 Runtime,过程可能需要几分钟。确定继续吗?",deployDescription:"将创建新的云端 Runtime,部署过程可能需要几分钟。确定继续吗?",update:"确定更新",deploy:"确定部署"},userPool:{label:"用户池",unnamed:"未命名用户池",current:"当前用户池",ariaLabel:"部署用户池",loading:"正在加载用户池…",placeholder:"请选择用户池",loadingIdentity:"正在加载 Identity 用户池…",empty:"当前账号下暂无 Identity 用户池。",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime。",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime。",markedHint:"当前 Studio 使用的用户池已在列表中标注。"},authentication:{apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPool:"用户池",userPoolDescription:"使用 Identity 用户池签发的 JWT"},steps:{buildImage:"构建镜像",deploy:"部署",publish:"发布",syncCode:"同步代码",uploadPackage:"上传代码包",packageImage:"镜像打包",createRuntime:"创建 Runtime",publishService:"发布服务",updateInstances:"更新实例配置",createEvaluationSets:"创建评测集",applyMpaProfile:"应用 MPA 配置",verifyMpaRuntime:"验证 MPA Runtime",mpaReady:"MPA Runtime 可运行"},errors:{instanceRangeInteger:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数。",instanceRangeOrder:"最小实例数不能大于最大实例数。",selectApiKey:"请先在模型配置中选择 API Key。",loadApiKey:"加载 API Key 失败,请重试。",invalidProject:"项目数据无效",updateFeishu:"更新飞书配置失败:{{message}}",userPoolRequired:"请选择用于 Runtime 鉴权的用户池。",vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",modelSecretRequired:"请填写 {{label}},用于访问对应的自定义模型地址。",managedApiKeyRequired:"{{requirement}},请先返回模型配置选择 API Key。",feishuEnvRequired:"启用飞书后,请填写{{field}}。",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",deployedButGithubMountFailed:"部署成功,但挂载 GitHub 持续交付失败:{{message}}",deployedButGithubBindFailed:"部署成功,但绑定 GitHub 失败:{{message}}",mpaRuntimeIdMissing:"部署成功,但返回缺少 Runtime ID,无法应用 MPA 配置。",mpaOperationIncomplete:"MPA Runtime 初始化未完成,请重试此部署任务。",deploymentStatusUnconfirmed:"连接已中断,当前无法确认部署最终状态。任务可能仍在云端运行,请到 AgentKit 或 Code Pipeline 查看同一任务,避免重复部署。",failedAtStage:"{{action}}失败({{stage}}阶段):{{message}}",noAgentAtEndpoint:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",addAgent:"添加 Agent 失败:{{message}}",modelApiKeyRequired:"请填写此模型地址对应的 API Key。"}},u1e={title:"工作区",storageUnavailable:"管理员未配置持久化存储,工作区管理暂不可用。",detail:"工作区详情",create:"新建工作区",editorDescription:"将常用环境组合在一起;同一个环境可以加入多个工作区。",backToList:"返回工作区列表",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",createdAt:"创建时间",updatedAt:"最近更新",basicInfo:"基本信息",namePlaceholder:"例如:内容生产",descriptionPlaceholder:"说明这个工作区的用途",selectedEnvironmentCount:"已选择 {{count}} 个,可在其他工作区中继续复用",searchAvailableEnvironments:"搜索可用环境",searchEnvironments:"搜索环境",noAvailableEnvironments:"还没有可添加的环境",createEnvironmentFirst:"请先在“环境”页面创建并构建环境。",noMatchingEnvironments:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称。",environmentStatus:{available:"可用",building:"构建中",notBuilt:"未构建"},added:"已添加",saved:"已保存工作区“{{name}}”",resourceType:"工作区资源类型",searchWorkspaces:"搜索工作区",loadFailed:"无法加载工作区",noMatchingWorkspaces:"没有匹配的工作区",tryAnotherNameOrEnvironment:"请尝试搜索其他名称或环境",noEnvironmentAdded:"未添加环境",environmentMissing:"环境缺失",availableFraction:"{{available}}/{{total}} 可用",available:"可用",availableCount:"{{count}} 个可用",updated:"更新",addEnvironment:"添加环境",deleteTitle:"删除工作区",deleteDescription:"确定删除工作区“{{name}}”吗?环境本身不会被删除。",deleted:"已删除工作区“{{name}}”",clipboardPermissionError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",codeProjects:"代码项目"},d1e={back:"返回",detailNavigation:"详情导航",noData:"暂无数据",actions:"操作",moreActions:"更多操作 {{label}}",actionsFor:"{{label}} 操作",loading:"资源加载中,请稍候"},f1e={addSkill:"添加 Skill",remove:"移除 {{name}}",confirmRemoveRuntime:"从新版本中移除运行中的 Skill「{{name}}」?",selectedCount:"已加入技能 · {{count}}",close:"关闭{{label}}",sources:{runtime:"运行中来源 · 原样保留,可移除或用同名 Skill 替换",local:"本地",skillspace:"AgentKit Skills 中心",skillhub:"火山 Find Skill 技能广场"},tabs:{local:"本地文件",localShort:"本地文件",skillspace:"AgentKit Skills 中心",skillspaceShort:"AgentKit",skillhub:"火山 Find Skill 技能广场",skillhubShort:"Find Skill"}},h1e={model:"模型",turnControls:"流程控制",pause:"暂停",resume:"恢复",interrupt:"中断",cancel:"取消",pauseTurn:"在安全点暂停完整流程",resumeTurn:"恢复完整流程",interruptTurn:"中断当前流程并保留会话上下文",cancelTurn:"取消当前流程且不可恢复",turnState:{running:"运行中",pausing:"正在到达安全点",paused:"已暂停",resuming:"正在恢复",interrupting:"正在中断",cancelling:"正在取消",interrupted:"已中断",completed:"已完成",failed:"失败",cancelled:"已取消",orphaned:"状态待确认",newTurnRequired:"需要从检查点继续"},tasks:{ppt:"PPT",image:"图片生成",video:"视频生成"},prompts:{ppt:{quarterlyReview:"复盘【季度】经营表现,提炼指标差距、原因与行动建议",projectUpdate:"汇报【项目名称】进展:里程碑、风险、预算和资源诉求",solutionProposal:"为【客户行业】输出解决方案:痛点、架构、实施路径与收益",industryAnalysis:"分析【行业主题】趋势,给出竞争格局、机会与战略建议"},image:{launchVisual:"为【品牌或产品】设计【高级科技】风格的发布会主视觉",ecommercePoster:"生成【产品名称】电商海报,突出【核心卖点】与品牌色",conceptRendering:"呈现【产品或空间】在【使用场景】中的写实概念效果图",socialGraphic:"围绕【传播主题】制作简洁专业的企业社媒配图"},video:{brandFilm:"制作【品牌名称】30 秒宣传片,突出【品牌价值】",productLaunch:"为【产品名称】制作 45 秒发布视频:痛点、功能、场景与行动号召",trainingVideo:"制作【培训主题】企业培训视频,讲清【关键操作或规范】",eventTeaser:"生成【活动名称】20 秒预热视频,包含亮点、时间地点和报名信息"}},firstFrame:"首帧",videoToEdit:"待编辑视频",baseVideo:"基础视频",optimizeSkillPlaceholder:"描述你想优化的技能…",createSkillPlaceholder:"描述你想生成的技能…",createVideoPlaceholder:"描述你想创作的视频…",messageAgentPlaceholder:"向 {{name}} 发消息…",selectAgentFirst:"请先选择智能体",selectSkillFirst:"请先选择需要优化的 Skill",availableSkills:"可用技能",availableSubagents:"可用子 Agent",invokeSkill:"调用技能",useSubagent:"使用子 Agent",loadingCapabilities:"正在读取 Agent 能力…",noMatchingSkills:"当前 Agent 没有匹配技能",noMatchingSubagents:"当前 Agent 没有匹配子 Agent",skillFallbackDescription:"加载并执行该技能",agentFallbackDescription:"将本轮交给该 Agent",skill:"技能",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",taskMode:"任务模式",selectTaskMode:"选择任务模式",loadingGenerationModel:"正在加载生成模型",modelUnavailable:"模型不可用",cancelTask:"取消{{task}}任务",stopGenerating:"停止生成",viewVideoProgress:"查看视频生成进度",send:"发送",selectTaskType:"选择任务类型",enterprisePrompts:"{{task}}企业提示词",sessionId:"会话 ID",sessionIdLabel:"会话 ID:",initializing:"初始化中",copied:"已复制",copySessionId:"复制会话 ID",sessionIdCopied:"已复制会话 ID",disclaimer:"回答仅供参考",viewLogs:"查看日志"},p1e={selectAgent:"选择 Agent",noLocalAgents:"暂无本地 Agent。",searchRuntime:"搜索 Runtime 名称",mineOnly:"只看我创建的",noRuntimes:"暂无 Runtime。",unsupported:"不支持",createdByMe:"我创建的",connecting:"连接中…",connected:"已连接",connect:"连接",viewInfoFor:"查看 {{name}} 信息",viewInfo:"查看信息",agentAndRuntimeInfo:"Agent 与 Runtime 信息",detailType:"详情类型",agentInfo:"Agent 信息",runtimeInfo:"Runtime 信息",loadingAgentInfo:"读取 Agent 信息…",cannotLoadAgentInfo:"暂时无法读取 Agent 信息",unnamedAgent:"未命名 Agent",subagents:"子 Agent",tools:"工具",skills:"技能",previewUnsupported:"暂不支持预览",mountedComponents:"挂载组件",noMoreAgentInfo:"暂无更多 Agent 配置信息。",local:"本地",model:"模型",status:"状态",memoryMb:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",resources:"资源",version:"版本",loadingDetails:"读取详情…",environmentVariables:"环境变量",errors:{notFound:"该 Runtime 已不存在或列表信息已过期,请刷新列表后重试。",accessDenied:"当前账号无权访问该 Runtime,请检查所属 Project 和访问权限。",previewUnsupported:"该 Agent Server 版本暂不支持信息预览。",unavailable:"该 Runtime 暂时无法访问,请确认其状态为“就绪”后重试。",timeout:"加载超时,请重试"},componentKinds:{knowledgebase:"知识库",memory:"记忆",prompt_manager:"提示词管理",example_store:"样例库",run_processor:"运行处理器",tracer:"链路追踪",toolset:"工具集",plugin:"插件",other:"其他"},runtimeStatus:{ready:"就绪",unreleased:"未发布",running:"运行中",active:"运行中",creating:"创建中",pending:"等待中",deploying:"部署中",updating:"更新中",failed:"失败",error:"异常",stopping:"停止中",stopped:"已停止",deleting:"删除中",deleted:"已删除"}},m1e={agent:"智能体",agentTypes:{general:"通用智能体",mpa:"MPA 智能体",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"创建人",namedAgent:"{{name}} 智能体",storageLocation:"存储位置",currentBrowser:"当前浏览器",region:"地域",viewDeploymentProgress:"查看 {{name}} 部署进度",viewRuntimeDetails:"查看 {{name}} Runtime 详情",viewDetails:"查看 {{name}} 详情",time:"时间",remainingTime:"剩余时间",expiringSoon:"即将清空",sandboxRemaining:"{{hours}} 小时 {{minutes}} 分钟",wakeable:"已休眠",neverExpires:"永不过期",editDraftNamed:"编辑草稿 {{name}}",viewProgress:"查看进度",deleteDraftNamed:"删除草稿 {{name}}",recheckCompatibility:"重新检测 {{name}} 的对话兼容性",connectedNamed:"{{name}} 已连接",wakeAndChat:"唤醒 {{name}} 并开始对话",chatWith:"与 {{name}} 对话",waking:"唤醒中",deploying:"部署中",draft:"草稿",checking:"检测中",chatUnsupported:"不支持对话",checkFailed:"检测失败",creatorFilter:"创建人筛选",agentType:"智能体类型",searchAgents:"搜索智能体",handoff:"接力",agentList:"{{type}}列表",noMatchingAgents:"没有匹配的智能体",adjustSearch:"请尝试调整搜索或筛选条件",noAgentType:"暂无 {{type}}",noGeneralAgents:"暂无通用智能体",createGeneralAgentDescription:"创建一个通用智能体,开始构建和对话",createAgentType:"创建{{type}}",createAgent:"创建智能体",loadingMore:"正在加载更多智能体",scrollForMore:"继续下滑加载更多",allLoaded:"已加载全部智能体",deleteDraftTitle:"删除草稿?",deleteDraftDescription:"删除后将无法恢复“{{name}}”。",deleteDraft:"删除草稿",loadGeneralAgents:"加载通用智能体",loadAgentType:"加载 {{type}}",compatibility:{checking:"正在请求 Runtime /list-apps,以确认该智能体是否支持 Studio 对话。",empty:"Runtime /list-apps 未返回可用的 Agent,暂时无法连接对话。",supported:"Runtime 支持 Studio 对话。",unknownError:"Runtime /list-apps 请求失败,未返回可识别的错误信息。"},sandboxStatus:{ready:"就绪",wakeable:"已休眠",creating:"创建中",starting:"启动中",initializing:"启动中",pending:"等待中",running:"运行中",failed:"异常",error:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},wakingHint:"正在唤醒智能体,可能需要一些时间。",mpaCreate:{name:"名称",namePlaceholder:"例如 test-agent",nameHelp:"作为 Runtime 名称,支持 4–64 位字母、数字、下划线或连字符。",stepsLabel:"创建步骤",steps:{basics:"基本信息",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"数据库"},next:"下一步",previousStep:"上一步",pgDescription:"选择已有的 PostgreSQL 实例。创建流程会在该实例中准备智能体的独立业务库。",pgSplitDescription:"使用已配置的业务 PG Workspace。多个智能体共用此 Workspace,每个智能体拥有独立业务库。共享资源记录单独存放在 mpa_admin_workspace / mpa_admin_db,由管理员配置。",pgConsole:"前往火山引擎 AIDAP 创建或查看 PG Workspace",pgHost:"PG 主机地址",pgPort:"PG 端口",pgInvalid:"请填写有效的 PG 主机地址和端口。",pgCredentials:"PG 连接账号和密码由部署服务配置;主机和端口须与服务端配置一致。",openvikingDescription:"可选。三项全部填写才启用 OpenViking;全部留空则不向新智能体注入 OpenViking 配置。",openvikingConsole:"前往火山引擎查看 OpenViking 资源",openvikingUrl:"OpenViking 服务地址",openvikingResourceId:"OpenViking 资源 ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"请同时填写有效的 HTTPS 服务地址、资源 ID 和 API Key,或全部留空。",openvikingCredentials:"API Key 仅用于本次创建,不保存到浏览器草稿;刷新页面后需重新填写。",tosTitle:"会话输出存储",tosDescription:"可选。填写完整的 TOS 凭证和存储桶,为新智能体的每个会话挂载独立输出目录。三项均留空时使用服务端预设;服务端未配置时,不启用 TOS 挂载。",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS 存储桶",tosInvalid:"TOS Access Key、Secret Key 和存储桶必须同时填写。",tosCredentials:"凭证仅用于本次创建,不会保存在浏览器恢复数据或创建任务记录中。",runtimeImage:"MPA 镜像",workerImage:"Worker 镜像",imageDefault:"留空使用配置文件中的默认镜像",imageInvalid:"请输入有效的镜像地址,不要包含网址、空格或登录凭据。",title:"创建 MPA 智能体",agentId:"智能体 ID",description:"描述",region:"部署地域",plan:"创建计划",sharedResources:"准备或复用账号共享 VPC、子网和 APIG 消息网关",agentResources:"准备独立业务库、技能空间和执行环境,部署智能体",readiness:"检查网关和智能体就绪状态,成功后加入列表",checking:"正在检查创建配置…",configured:"创建配置已就绪。提交后会检查云资源并开始准备。",notConfigured:"尚未配置创建所需的资源参数,请联系管理员配置后重试。",loadFailed:"检查创建配置失败,请重试。",reload:"重新检查",submit:"开始创建",retry:"重试创建",newAgent:"新建另一个智能体",newAgentDescription:"新建另一个智能体将开启可编辑的新请求,替换当前恢复草稿,但不会取消旧任务。旧任务仍在运行时,请等待其结束后再提交。",close:"关闭",cancel:"取消创建",confirmCancel:"确认取消",cancelDescription:"取消后会停止后续步骤。已创建的数据库、技能空间、网关和其他已登记资源会保留,可使用同一智能体 ID 重试。",background:"关闭窗口后创建会继续。再次打开可查看进度。",pollFailed:"暂时无法获取进度,正在重新连接。请勿重复创建其他智能体。",creationFailed:"当前步骤未完成,请检查对应资源、服务端配置及权限后,用同一智能体 ID 重试。",cancelFailed:"取消请求失败,请重新查询进度后重试。",cancelled:"创建已取消,已登记资源保留供重试。",timeout:"创建超时,已登记资源保留。请检查对应资源后重试。",interrupted:"创建任务中断。请用同一智能体 ID 重试以恢复已登记资源。",skillSpace:"技能空间",states:{running:"正在创建",cancelling:"正在取消",succeeded:"创建成功",failed:"创建失败",cancelled:"已取消"},stages:{queued:"等待开始",checking:"检查账号与配置",network:"准备 VPC 和子网",gateway:"准备 APIG 和 IM Gateway",database:"准备业务数据库",skills:"准备技能空间",worker:"准备执行环境",deploying:"准备数据库、技能空间和 Runtime",verifying:"等待智能体就绪",admin_workspace:"准备管理 PG Workspace",business_workspace:"准备业务 PG Workspace",admin_database:"初始化共享管理库"},back:"继续创建",pgAutoDescription:"使用 VeADK 部署账号自动创建或复用两个 PG Workspace:mpa_admin_workspace / mpa_admin_db 存放共享资源记录,业务 Workspace 供多个智能体共用,每个智能体拥有独立业务库。无需填写 PG 连接信息,提交创建后开始准备。",pgModeChanged:"此创建任务使用旧的 PG 配置,不能直接切换为自动模式重试。请联系管理员确认已有资源和任务后重新创建。",pgMigrationRequired:"检测到旧共享注册库。请先将共享资源记录迁移到 mpa_admin_workspace / mpa_admin_db,并完成现有 Runtime 的注册库地址切换;完成后点击“重新检查”。"}},g1e={library:"技能库",skill:"技能",skills:"技能",skillSpace:"技能空间",sandboxNotConfigured:"管理员未配置 Dev Sandbox",adminNotConfigured:"管理员未配置",totalItems:"共 {{count}} 项",cannotLoadSpaces:"无法加载技能空间",someSpacesFailed:"部分技能空间加载失败",degradedRelationWarning:"部分关联异常,已恢复可读取技能",downloadZip:"下载 ZIP",optimize:"优化",closeSkillDetails:"关闭技能详情",skillId:"技能 ID",allFiles:"完整文件",loadingSkillContent:"正在读取技能内容…",noSkillContent:"该技能暂无 SKILL.md 内容",addSkill:"添加技能",localUpload:"本地上传",localUploadDescription:"选择 ZIP 文件,校验通过后上传到技能空间",autoCreate:"自动创建",autoCreateDescription:"选择模型和风格,通过对话生成技能",createSkill:"创建技能",optimizeNamed:"优化 {{name}}",deleteSkillConfirm:"确定删除整个 Skill“{{name}}”吗?此操作会影响所有引用它的空间。",deleteSpaceConfirm:"确定删除 Skill 空间“{{name}}”吗?请先确认空间中的技能已删除。",manageSpaceDescription:"管理空间中的技能并创建新的版本",backToSpaces:"返回技能空间列表",overview:"概览",skillCount:"技能数量",skillCountValue_one:"{{count}} 技能",skillCountValue_other:"{{count}} 技能",updatedAt:"更新时间",skillsInSpace:"{{name}}中的技能",searchSkills:"搜索技能",cannotLoadSkills:"无法加载技能",noMatchingSkills:"没有匹配的技能",noSkills:"暂无技能",tryAnotherName:"请尝试搜索其他名称",emptySkillsDescription:"本地上传 Skill,或自动创建",actions:"操作",spaceDetails:"技能空间详情",editSpace:"编辑空间",deleteSpace:"删除空间",searchSpaces:"搜索技能空间",spaceList:"技能空间列表",noMatchingSpaces:"没有匹配的技能空间",createSpace:"新建技能空间",newSpace:"新建空间",loadingMoreSpaces:"正在加载更多技能空间",scrollForMore:"继续下滑加载更多",allSpacesLoaded:"已加载全部技能空间",errors:{loadSpaces:"读取技能空间失败,请稍后重试",loadSkills:"读取技能失败,请稍后重试",loadSkillDetails:"读取技能详情失败,请稍后重试",deleteSkill:"删除 Skill 失败",deleteSpace:"删除 Skill 空间失败",downloadSkill:"下载 Skill 失败"},status:{active:"可用",available:"可用",creating:"创建中",disabled:"已停用",enabled:"已启用",failed:"异常",inactive:"未启用",pending:"等待中",published:"已发布",ready:"就绪",released:"已发布",running:"运行中",success:"正常",unavailable:"不可用",unreleased:"未发布",updating:"更新中",unknown:"未知"},sharedSpace:"企业共享空间",sharedDescription:"面向企业全员开放的技能,由管理员统一发布和维护",sharedVisibility:"全员可见",sharedPreparing:"正在准备共享空间",sharedLoadFailed:"共享空间加载失败",sharedEmpty:"暂无共享技能,管理员发布后会显示在这里",requestPublication:"申请公开",reviewSubmitting:"提交中…",reviewSubmitted:"已申请",reviewFailed:"申请公开失败",reviewStatusFailed:"审核状态加载失败",reviewRetry:"重新申请",reviewPending:"待审核",reviewApproving:"发布中",reviewApproved:"已公开",reviewReturned:"已退回",reviewHistory:"审核记录",skillDetailSections:"技能详情内容",versions:{title:"版本管理",refresh:"刷新",uploading:"上传中…",upload:"上传新版本",close:"关闭",hint:"新版本不会替换已公开版本,审核通过后才会公开;ZIP 中的技能名称需与原技能一致",loading:"正在加载版本…",loadFailed:"无法加载版本",filesFailed:"无法加载版本文件",uploadFailed:"上传新版本失败",submitFailed:"提交申请失败",retry:"重试",empty:"暂无版本",current:"当前版本",notSubmitted:"未申请公开",submitting:"提交中…",submit:"申请公开",processing:"版本状态:{{status}}",filesLoading:"正在加载文件…",filesEmpty:"暂无文件",history:"历史审核记录",shared:"已公开"},author:"作者",authorName:"作者:{{name}}"},b1e={library:"知识库",createBase:"新建知识库",editBase:"编辑知识库",invalidName:"名称必须以字母开头,且只能包含字母、数字和下划线。",nameHelp:"以字母开头,仅支持字母、数字和下划线,最多 48 个字符。",optionalDescription:"描述(可选)",descriptionOnly:"AgentKit 当前仅支持更新知识库描述。",previewWeb:"预览网页内容",addData:"添加数据",openOriginalWeb:"打开原网页",backToEdit:"返回修改",confirmAdd:"确认添加",source:"知识来源",image:"图片",documentFile:"文档文件",webPage:"在线网页",webUrl:"网页 URL",generatingWebPreview:"正在抓取网页并生成 Markdown 预览",selectFile:"选择知识文件",selectOrDropFile:"选择文件或拖拽到这里",selectedFile:"{{size}} · 点击可重新选择",imageFileHelp:"支持 PNG、JPG 和 JPEG,单个文件不超过 200 MB",documentFileHelp:"支持 PDF、PPTX、DOCX、XLSX 和 TXT,单个文件不超过 200 MB",uploadingFile:"正在上传文件并添加到知识库",optionalName:"名称(可选)",optionalType:"类型(可选)",generatePreview:"生成预览",uploadFile:"上传文件",editMetadata:"编辑知识 Metadata",knowledge:"知识",field:"字段",value:"值",backToList:"返回知识库列表",metadataJson:"元数据(JSON)",provider:"服务提供方",knowledgeId:"知识库 ID",project:"项目",creator:"创建者",data:"数据",deleteInvalidAssociation:"删除失效关联",noData:"这个知识库还没有数据",addFirstData:"添加第一项数据",format:"格式",size:"大小",searchData:"搜索数据",searchLibraryData:"搜索知识库数据",associationInvalid:"关联已失效",providerMissing:"底层 Provider 知识库已不存在",noMatchingData:"没有匹配的数据",loadingMoreData:"正在加载更多数据",retryLoading:"重试加载",details:"知识库详情",searchBases:"搜索知识库",someBasesFailed:"部分知识库暂时无法加载,已展示其余可用内容。",noMatchingBases:"没有匹配的知识库",noManagePermission:"您没有管理此知识库的权限",loadingMoreBases:"正在加载更多知识库",deleteBaseTitle:"删除知识库?",deleteBaseDescription:"将删除 {{name}} 的 AgentKit 关联;如果它由 Studio 创建,也会同时删除 Provider 资源。此操作无法撤销。",deleteDocumentTitle:"删除知识?",deleteDocumentDescription:"将从 Provider 知识库中删除 {{name}},此操作无法撤销。",preview:{processingTitle:"数据正在处理中",processingDetail:"知识库完成解析后即可预览,请稍后重新加载。",failedTitle:"数据解析失败",failedDetail:"请检查源文件或网页地址后重新添加,也可以重新加载最新状态。",noParsedTitle:"暂时没有可预览的解析内容",noParsedDetail:"此类文件会在知识库完成解析后显示文本、表格或页面图片。",noMediaTitle:"暂时没有可预览的媒体内容",noMediaDetail:"知识库尚未返回可访问的媒体预览,请稍后重新加载。",noDataTitle:"暂无可预览的数据内容",noDataDetail:"知识库尚未返回解析结果,请稍后重新加载。",attachmentError:"附件无法预览,请稍后重试。",imageAlt:"知识数据图片",audioUnsupported:"当前浏览器不支持音频预览。",videoUnsupported:"当前浏览器不支持视频预览。",namedPdf:"{{name}} PDF 预览",pdf:"PDF 预览",openPdf:"无法显示时,在新窗口打开 PDF",fileUnsupported:"当前格式暂不支持直接在线预览,已优先显示解析后的内容。",openOriginalFile:"打开原文件",loading:"正在加载数据预览",openOriginalHint:"您可以打开原网页查看来源内容。",chunk:"片段 {{index}}",loadingMore:"正在加载更多",loadMore:"加载更多"},errors:{fileTooLarge:"单个文件不能超过 200 MB",invalidImageType:"请选择 PNG、JPG 或 JPEG 图片",invalidDocumentType:"请选择 PDF、PPTX、DOCX、XLSX 或 TXT 文件",createBase:"创建知识库失败",updateBase:"更新知识库失败",metadataObject:"Metadata 必须是 JSON 对象",metadataFormat:"Metadata 格式错误",noWebPreview:"网页没有可预览的 Markdown 内容",addWeb:"添加网页失败",previewWeb:"生成网页预览失败",uploadFile:"上传文件失败",updateDocument:"更新知识失败",loadPreview:"加载数据预览失败",loadMoreBases:"加载更多知识库失败",loadBases:"加载知识库失败",loadMoreData:"加载更多数据失败",loadData:"加载数据失败",deleteBase:"删除知识库失败",deleteDocument:"删除知识失败"}},y1e={title:"飞书渠道",refresh:"刷新",loading:"正在加载渠道配置…",unsupported:"此 Runtime 不支持渠道管理,请升级 MPA 镜像。",unauthorized:"渠道管理需要 Studio 管理员身份及有效的 Runtime 凭据。",configurationError:"渠道管理配置不完整,请检查 Runtime 元数据及加密密钥。",requestFailed:"渠道请求失败,请检查 Runtime 连接后重试。",bound:"已绑定:{{name}}",unbound:"尚未绑定飞书机器人。",guidance:"私聊使用独立会话。在已授权群内 @ 当前机器人即可对话。",keyRequired:"绑定前请在 Runtime 配置持久的 CHANNEL_STATE_ENCRYPTION_KEY。",gateway:"消息网关",route:"入站路由",delivery:"回复投递",configured:"已配置",missing:"未配置",delivery_not_observed:"尚未观测",delivery_delivered:"已投递",delivery_retrying:"重试中",missingConfig:"缺少 Runtime 配置:{{fields}}",bind:"扫码绑定",newQr:"重新生成二维码",unbind:"解除绑定",confirmUnbind:"确认解绑此机器人?解绑后将停止接收新消息。",qrAlt:"机器人绑定二维码",openQr:"打开授权页面",uncertain:"注册过程已中断。重新开始前,请检查机器人绑定与 Gateway 状态。",bindingFailed:"绑定失败,请检查 Gateway 配置后重试。",chatId:"允许的群 ID",scope:"群会话策略",saveGroup:"保存群权限",noGroups:"尚未授权任何群。私聊无需群权限。",edit:"编辑",remove:"移除",removeGroup:"移除 {{name}}",scope_group_sender:"按发言人隔离",scope_group:"全群共享",scope_group_topic_sender:"按话题和发言人隔离",scope_group_topic:"按话题共享",status_PENDING:"等待扫码",status_SCANNED:"已扫码,等待授权",status_AUTHORIZED:"已授权,准备注册",status_REGISTERING:"正在注册机器人",status_BOUND:"机器人已绑定",status_FAILED:"绑定失败",status_EXPIRED:"二维码已过期",workspaceTitle:"消息渠道",workspaceDescription:"连接消息平台,让用户直接与此智能体对话,并管理访问权限。",provider_feishu:"飞书",provider_wecom:"企业微信",provider_dingtalk:"钉钉",comingSoon:"暂未开放",unavailableDescription:"{{name}}的绑定与消息配置暂未开放。",runtimeRequired:"请先将此智能体部署到 Runtime,再配置消息渠道。",bindingTitle:"机器人绑定",connected:"已绑定",notBound:"未绑定",gatewayDescription:"用于接收渠道消息的网关配置。",routeDescription:"将渠道消息转发给当前智能体的路由配置。",deliveryDescription:"实际观测到的回复投递状态,完成配置不代表已成功投递。",groupsTitle:"群聊权限",groupsDescription:"添加允许访问的群,并设置群内对话的共享范围。",providerBindingTitle:"绑定{{name}}",providerUnbound:"绑定{{name}}机器人,让用户通过消息与此智能体对话。",qrGuidance:"使用{{name}}扫码授权,Runtime 将保存机器人凭据并配置消息网关。",wecomGuidance:"使用企业微信扫码授权,或手动填写 Bot ID 和 Secret 绑定已有机器人。",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"绑定机器人",wecomScan:"扫码绑定",wecomAuthorizing:"等待企业微信授权…",cancelAuthorization:"取消授权",wecomPopupBlocked:"授权窗口被浏览器拦截,请允许弹窗后重试。",wecomAuthCancelled:"已取消企业微信授权,可以重新扫码。",wecomAuthTimeout:"企业微信授权已超时,请重新扫码。",wecomInvalidResult:"授权结果缺少 Bot ID 或 Secret,请重新授权或手动填写。",wecomAuthFailed:"企业微信授权失败,请重试或手动填写凭据。",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"当前镜像尚不支持{{name}}手动配置,请升级后使用;仍可使用极速配置。",pairingTitle:"消息渠道扫码配对",feishuPairingDescription:"如果已有连接机器人,飞书扫码并绑定成功后原有机器人会被替换,可选绑定存量机器人或新建机器人。",generatingQr:"正在生成配对二维码…",dingtalkGuidance:"使用钉钉扫码授权,或手动填写 Client ID 和 Client Secret 绑定已有机器人。",wecomPairingDescription:"将在企业微信授权窗口中重新扫码配对。新机器人绑定成功后会替换当前连接;取消授权或绑定失败不会解绑原机器人。",configurationMethod:"配置方式",quickSetup:"极速配置",manualSetup:"手动配置",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"填写已有{{name}}机器人的应用凭据,连接到当前智能体。",manualReplacement:"绑定成功后将替换当前机器人;取消或绑定失败不会解除现有绑定。"},WVe={common:Xwe,agentKitPromo:Ywe,systemInfo:Zwe,agentWorkspace:Jwe,environmentCenter:e1e,deploymentSelect:t1e,deploymentError:n1e,studioBuildProgress:i1e,cloudEnvironment:r1e,githubCicd:s1e,feishuDeployment:a1e,deploymentResources:o1e,studioUpdate:l1e,projectPreview:c1e,workspace:u1e,resourceCollection:d1e,skillSourcePicker:f1e,composer:h1e,agentSelector:p1e,myAgents:m1e,skillCenter:g1e,knowledge:b1e,channels:y1e},KVe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:Ywe,agentSelector:p1e,agentWorkspace:Jwe,channels:y1e,cloudEnvironment:r1e,common:Xwe,composer:h1e,default:WVe,deploymentError:n1e,deploymentResources:o1e,deploymentSelect:t1e,environmentCenter:e1e,feishuDeployment:a1e,githubCicd:s1e,knowledge:b1e,myAgents:m1e,projectPreview:c1e,resourceCollection:d1e,skillCenter:g1e,skillSourcePicker:f1e,studioBuildProgress:i1e,studioUpdate:l1e,systemInfo:Zwe,workspace:u1e},Symbol.toStringTag,{value:"Module"})),v1e="用户管理",x1e="{{count}} 位成员",w1e="用户",O1e="角色",k1e="账号状态",S1e="最近登录",E1e="操作",C1e="更改角色",A1e="关闭",T1e="保存角色",_1e="正在保存…",j1e="取消",N1e="返回",R1e="用户池",I1e="火山引擎 Identity",P1e="搜索姓名、邮箱或用户 ID",D1e="搜索",M1e="筛选角色",L1e="全部角色",$1e="刷新",F1e="正在读取用户…",B1e="更新于 {{time}}",U1e="已将 {{name}} 设置为{{role}}",Q1e="重试",z1e="你",V1e="初始超级管理员",H1e="初始超级管理员受保护,不能在此降级",q1e="保存后,对方刷新 Studio 即可使用新的权限",W1e="角色需要重新确认",K1e="没有匹配的用户",G1e="尝试其他关键词或角色",X1e="用户登录或加入当前用户池后会显示在这里",Y1e="共 {{count}} 位用户",Z1e="上一页",J1e="下一页",eOe="尚未登录",tOe="未提供",nOe={super_admin:"超级管理员",admin:"管理员",developer:"开发者",user:"普通用户"},iOe={super_admin:"管理所有资源,并管理用户和分配角色",admin:"管理 Studio 资源",developer:"开发智能体并管理自己的资源",user:"使用智能体和个人功能"},rOe={EXTERNAL_PROVIDER:"正常",CONFIRMED:"正常",NORMAL:"正常",ENABLED:"正常",ACTIVE:"正常",UNCONFIRMED:"待验证",DISABLED:"已停用",FORBIDDEN:"已禁用",LOCKED:"已锁定",SUSPENDED:"已暂停",FORCE_CHANGE_PASSWORD:"需要修改密码"},sOe={request_failed:"请求未完成,请刷新列表确认当前状态后重试",invalid_response:"用户服务返回异常,请刷新后重试",identity_unavailable:"暂时无法访问 Identity,请稍后重试或检查服务权限",identity_resource_missing:"用户或用户池已不存在,请刷新列表",super_administrator_required:"只有超级管理员可以管理用户",sign_in_required:"请登录后重试",user_not_in_pool:"当前账号不属于此用户池",user_disabled:"当前账号已停用",protected_administrator:"不能降低初始超级管理员的权限",cannot_demote_self:"不能降低自己的超级管理员权限",role_change_conflict:"角色已发生变化,请关闭弹窗并刷新列表后重试",cross_origin_request:"请在当前 Studio 页面内修改角色"},GVe={title:v1e,memberCount:x1e,user:w1e,role:O1e,status:k1e,lastLogin:S1e,actions:E1e,changeRole:C1e,close:A1e,save:T1e,saving:_1e,cancel:j1e,back:N1e,pool:R1e,volcengineIdentity:I1e,searchPlaceholder:P1e,search:D1e,filterRole:M1e,allRoles:L1e,refresh:$1e,loading:F1e,updatedAt:B1e,saved:U1e,retry:Q1e,you:z1e,initialAdministrator:V1e,protectedExplanation:H1e,effectiveAfterRefresh:q1e,roleConflict:W1e,noUsers:K1e,tryAnotherSearch:G1e,poolEmpty:X1e,resultCount:Y1e,previous:Z1e,next:J1e,neverLoggedIn:eOe,unknown:tOe,roles:nOe,descriptions:iOe,states:rOe,errors:sOe},XVe=Object.freeze(Object.defineProperty({__proto__:null,actions:E1e,allRoles:L1e,back:N1e,cancel:j1e,changeRole:C1e,close:A1e,default:GVe,descriptions:iOe,effectiveAfterRefresh:q1e,errors:sOe,filterRole:M1e,initialAdministrator:V1e,lastLogin:S1e,loading:F1e,memberCount:x1e,neverLoggedIn:eOe,next:J1e,noUsers:K1e,pool:R1e,poolEmpty:X1e,previous:Z1e,protectedExplanation:H1e,refresh:$1e,resultCount:Y1e,retry:Q1e,role:O1e,roleConflict:W1e,roles:nOe,save:T1e,saved:U1e,saving:_1e,search:D1e,searchPlaceholder:P1e,states:rOe,status:k1e,title:v1e,tryAnotherSearch:G1e,unknown:tOe,updatedAt:B1e,user:w1e,volcengineIdentity:I1e,you:z1e},Symbol.toStringTag,{value:"Module"})),aOe="网站集成",oOe="将 AgentKit Runtime 以悬浮聊天窗口嵌入网站",lOe="返回自动化列表",cOe="添加网站",uOe="正在加载 Runtime",dOe="选择 Runtime",fOe="网站域名",hOe="例如 xxxx.com 或 localhost:5173",pOe="正在生成",mOe="生成 Token",gOe="已添加网站",bOe="{{count}} 个",yOe="{{count}} 个",vOe="正在加载网站集成",xOe="还没有网站集成",wOe="选择 Runtime 并输入网站域名即可生成 Token",OOe="引入方法",kOe="将下面代码放到网页的 body 结束标签前",SOe="已复制",EOe="复制代码",COe="添加网站后会在这里生成引入代码。",AOe="确定删除 {{domain}} 的网站集成吗?",TOe={load:"加载网站集成失败",create:"创建网站集成失败",delete:"删除网站集成失败",noConversationalAgent:"该 Runtime 暂未发现可对话的 Agent"},_Oe={requestFailed:"请求失败 ({{status}})",greeting:"您好,有什么可以帮您?",sessionFailed:"无法建立对话会话",unauthorized:"当前网站未获得对话授权",conversationFailed:"对话请求失败,请稍后重试",open:"打开智能体对话",close:"关闭智能体对话",panelLabel:"智能体对话面板",assistant:"智能体助手",online:"在线对话"},YVe={title:aOe,description:oOe,backToAutomations:lOe,addWebsite:cOe,loadingRuntime:uOe,selectRuntime:dOe,websiteDomain:fOe,domainPlaceholder:hOe,generating:pOe,generateToken:mOe,addedWebsites:gOe,websiteCount_one:bOe,websiteCount_other:yOe,loadingIntegrations:vOe,delete:"删除",emptyTitle:xOe,emptyDescription:wOe,embedMethod:OOe,embedInstructions:kOe,copied:SOe,copyCode:EOe,embedHint:COe,confirmDelete:AOe,errors:TOe,widget:_Oe},ZVe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:cOe,addedWebsites:gOe,backToAutomations:lOe,confirmDelete:AOe,copied:SOe,copyCode:EOe,default:YVe,description:oOe,domainPlaceholder:hOe,embedHint:COe,embedInstructions:kOe,embedMethod:OOe,emptyDescription:wOe,emptyTitle:xOe,errors:TOe,generateToken:mOe,generating:pOe,loadingIntegrations:vOe,loadingRuntime:uOe,selectRuntime:dOe,title:aOe,websiteCount_one:bOe,websiteCount_other:yOe,websiteDomain:fOe,widget:_Oe},Symbol.toStringTag,{value:"Module"})),jOe={types:{all:"全部类型",document:"文档",image:"图片",video:"视频"},previewArtifact:"预览 {{name}}",moreActions:"更多操作 {{name}}",actionMenu:"{{name}} 操作",download:"下载",downloading:"下载中",edit:"编辑信息",delete:"删除产物",previewFailed:"无法预览“{{name}}”:{{message}}",downloadStarted:"已开始下载 {{name}}",downloadFailed:"无法下载“{{name}}”:{{message}}",updated:"已更新 {{name}}",deleted:"已删除 {{name}}",deleteFailed:"无法删除“{{name}}”:{{message}}",typeFilter:"产物类型",searchAria:"搜索产物",searchPlaceholder:"搜索产物或会话",retry:"重试",close:"关闭",listAria:"产物列表",loadFailed:"产物加载失败",loadDetailFallback:"请检查存储配置后重试。",reload:"重新加载",noMatch:"没有找到匹配的产物",noArtifacts:"您还没有任何产物",searchHint:"请尝试搜索其他名称或切换类型",emptyHint:"聊天中生成的产物会自动显示在这里",columns:{name:"名称",source:"来源",updatedAt:"修改时间",actions:"操作"},loadingMore:"正在加载更多产物",unknownTime:"时间未知",preview:{close:"关闭预览",meta:"{{type}} / 版本 {{version}}",loading:"正在加载预览",alt:"{{name}} 预览",loadFailed:"预览加载失败,请稍后重试或下载查看",unsupported:"当前格式暂不支持在线预览,请下载查看",sourceAria:"产物来源",agent:"智能体",session:"会话",tool:"生成工具",createdAt:"生成时间",fileSize:"文件大小",tags:"标签",viewSession:"查看会话"},deleteDialog:{title:"删除产物?",description:"“{{name}}”将从产物库永久删除,聊天记录不会受到影响。",deleting:"删除中",confirm:"删除",close:"关闭删除确认框"},api:{withStatus:"{{message}}({{status}})",listFailed:"读取产物库失败",syncFailed:"同步聊天产物失败",updateFailed:"更新产物失败",deleteFailed:"删除产物失败",downloadFailed:"下载产物失败"}},NOe={unknownSource:"未知来源",unknownCreator:"未知创建者"},ROe={nameRequired:"请输入产物名称",tooManyTags:"标签最多 {{max}} 个",tagTooLong:"单个标签不能超过 {{max}} 个字符",title:"编辑产物信息",subtitle:"内容文件不会被修改",close:"关闭编辑框",name:"名称",description:"描述",descriptionPlaceholder:"补充用途、版本或使用说明",tags:"标签",tagsPlaceholder:"使用逗号分隔,最多 {{max}} 个",cancel:"取消",saving:"保存中",save:"保存"},IOe={change:{added:"新增",modified:"修改",deleted:"删除"},noChanges:"两个版本的源码没有差异",chooseFile:"从左侧选择文件以查看代码",compareTitle:"版本对比",workspaceTitle:"源码工作区",projectFallback:"Agent 项目",switchTheme:"切换源码主题",switchThemeTitle:"切换为{{theme}}主题",themes:{dark:"深色",light:"浅色"},closeWorkspace:"关闭源码工作区",close:"关闭",changedFiles:"变更文件",projectFiles:"项目文件",changes:"变更",files:"文件",openFiles:"打开的文件",noFileSelected:"未选择文件",comparisonDirection:"对比方向",before:"优化前",after:"优化后",loadingEditor:"正在加载编辑器…",changedFileCount_one:"{{count}} 个文件有变更",changedFileCount_other:"{{count}} 个文件有变更",fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件",lineCount_one:"{{count}} 行 · UTF-8",lineCount_other:"{{count}} 行 · UTF-8",viewSource:"查看源码",viewSourceAria:"查看和编辑项目源码"},POe={nav:"搜索",selectAgent:"请选择 Agent",checkingCapabilities:"正在检测 Agent 能力",notMounted:"当前 Agent 未挂载{{label}}",sources:{session:"会话",web:"网络",knowledge:"知识库",memory:"长期记忆"},webDescription:"通过 web_search 工具检索",backendLocal:"本地",failed:"搜索失败:{{message}}",placeholder:{selectAgent:"请先选择 Agent",web:"在网络中检索",knowledge:"在 {{name}} 中检索",knowledgeFallback:"当前 Agent 的知识库",memory:"在 {{name}} 中检索",memoryFallback:"当前用户的长期记忆",session:"在当前 Agent 的会话中检索"},sourceTypeAria:"搜索类型:{{label}}",notSelected:"未选择",sourceType:"搜索类型",selectSource:"选择搜索类型",noAgentHint:"选择一个 Agent 后,即可检索会话、网络及其挂载的数据源。",loadingCapabilities:"正在读取当前 Agent 的检索能力…",sourceUnavailable:"当前 Agent 未挂载该数据源",instructions:{web:"输入关键词后回车或点击按钮,通过 web_search 工具检索。",knowledge:"输入问题,检索当前 Agent 挂载的知识库。",memory:"输入线索,检索当前用户跨会话保存的长期记忆。",session:"输入关键词后回车或点击按钮,搜索当前 Agent 的会话。"},noResults:"未找到匹配“{{query}}”的结果。",knowledgeFragment:"知识片段 {{index}}",memoryFragment:"记忆片段 {{index}}"},DOe={title:"开发者资源",sections:{documentation:{title:"相关链接",description:"查看开发文档与 AgentKit 常用入口"},bestPractices:{title:"最佳实践",description:"参考开发、调试与部署经验"},showcases:{title:"案例展示",description:"探索 AgentKit 应用案例"}},links:{veadkDocs:"VeADK 文档",cliDocs:"AgentKit CLI 文档",platformDocs:"AgentKit 平台文档",console:"AgentKit 控制台"},articles:{veadkDevelopment:{title:"使用 VeADK 开发并部署智能体",description:"使用 VeADK 构建 Agent,并部署至 AgentKit 智能体运行时。"},cliDevelopment:{title:"使用 AgentKit CLI 开发并部署智能体",description:"通过 AgentKit CLI 创建项目、调试 Agent,并完成部署。"},coverAlt:"{{title}}文章封面"},showcases:{researchAssistant:{title:"多智能体研究助手",description:"由多个专业 Agent 协同完成资料检索、分析和结论整理。"},multimodalAnalysis:{title:"多模态内容分析",description:"在统一会话中理解图片、文档和视频内容。"},customerService:{title:"智能客服工作台",description:"结合知识检索与工具调用处理复杂的客户服务任务。"},webSearch:{title:"联网搜索 Agent",description:"检索实时网页内容,并将信息整理为可追溯的回答。"},a2uiApp:{title:"A2UI 交互应用",description:"让 Agent 根据任务过程生成可交互的前端界面。"},previewAlt:"{{title}}界面预览"}},MOe={title:"资源库",untitledSession:"未命名会话",categoryAria:"资源库分类",regionAria:"区域",tabs:{skills:"技能库",knowledge:"知识库",artifacts:"产物"}},LOe={title:"管理 Agent",subtitle:"列出你有权管理的 AgentKit Runtime",mainAgentOnly:"仅显示主 Agent(控制面信息)。",deleteConfirm:'确定删除 Agent "{{name}}"?该 Runtime 将被永久删除。',regionFilterTitle:"按区域筛选",regionFilterAria:"区域筛选",regionAria:"区域",refresh:"刷新",loading:"加载中…",empty:"暂无你部署的 Agent。",connected:"已连接",connect:"连接到此 Agent",deleteRuntime:"删除该 Runtime",loadingDetail:"读取详情…",agentStructure:"Agent 结构",secretHidden:"敏感值不展示,可通过授权请求直接复制",revealSecret:"{{key}} 的敏感值",copySecret:"复制 {{key}} 的值",copy:"复制",copied:"已复制",copyFailed:"复制失败",notConfigured:"未配置",fields:{model:"模型",description:"描述",status:"状态信息",project:"项目",version:"版本",resources:"资源",memory:"记忆",tool:"工具",knowledge:"知识",mcpToolset:"MCP 工具集",updatedAt:"更新时间"},resource:{memory:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",concurrency:"并发 {{value}}"},environmentVariables:"环境变量",unnamed:"(未命名)"},$Oe={mainAgent:"主 Agent",subAgent:"子 Agent {{index}}",itemCount_one:"{{count}} 项",itemCount_other:"{{count}} 项",info:"Agent 信息",infoAndTopology:"Agent 信息与设置",loadingInfo:"正在读取 Agent 信息…",unnamedAgent:"未命名 Agent",agentsMd:"AGENTS.md",tools:"工具",toolList:"工具列表",studioTool:"Studio Tool",removeTool:"移除工具 {{name}}",remove:"移除",notConfigured:"未配置",addStudioTool:"添加 Studio 工具",addStudioToolHere:"在此对话中添加 Studio 工具",skills:"技能",skillList:"技能列表",addSkill:"添加技能空间技能",addSkillHere:"向此会话添加技能空间技能",skillMountNextTurn:"挂载的版本将在下一 Turn 开始时冻结。",previewUnsupported:"暂不支持预览",sessionEnvironment:"会话环境",environment:"环境",agentCanvas:"Agent 画布",topology:"结构拓扑",nodeKinds:{agent:"Agent",sandbox:"沙箱","worker-session":"Worker 会话","skill-space":"技能空间",skill:"技能","studio-tool":"Studio 工具",mcp:"MCP",environment:"环境",knowledge:"知识库","sub-agent":"子 Agent"},nodeStatuses:{configured:"已配置",mounted:"已挂载",running:"运行中",paused:"已暂停"},viewCanvasFullscreen:"全屏查看 Agent 画布",viewFullscreen:"全屏查看",executionCanvas:"Agent 执行画布",fullscreenExecutionCanvas:"全屏 Agent 执行画布",closeFullscreenCanvas:"关闭全屏画布",close:"关闭",capabilitiesSubtitle:"能力与协作拓扑",closeInfo:"关闭 Agent 信息",infoUnavailable:"暂时无法读取 Agent 信息。",refresh:"刷新信息",loadingSkills:"正在加载绑定技能…",sessionSkills:"本会话临时技能",noBoundSpace:"当前智能体未绑定技能空间。",noBoundSkills:"绑定的技能空间暂无技能。",loadFailed:"加载失败,请刷新重试。",accessDenied:"无权读取此信息。",documentUnsupported:"当前 Runtime 不支持 Studio 读取 AGENTS.md,请升级 Runtime 镜像。",skillsUnsupported:"当前 Runtime 未提供技能空间绑定信息。",skillsDegraded:"技能信息不完整,请刷新重试。",documentEditHint:"编辑最新版本。保存会发布新版本到此技能空间,可能影响使用它的其他智能体。运行中的会话可能需要等待缓存刷新或新建会话后生效。请保留 frontmatter 中的 name。",documentLoading:"正在加载 SKILL.md…",documentWritable:"可编辑",documentReadOnly:"只读:此空间或当前权限不允许编辑",documentLoadFailed:"无法加载 SKILL.md,请刷新重试。",documentSaveFailed:"未确认保存成功,已保留编辑内容。重试前请重新打开,检查当前版本。",documentConflict:"技能已有新版本。请复制当前修改,再重新打开编辑器,避免覆盖。",discardDocument:"放弃未保存的修改?",keepEditing:"继续编辑",discardChanges:"放弃修改",saveDocument:"保存为新版本"},FOe={mountFailed:"挂载环境失败",closeDialog:"关闭环境弹窗",addTitle:"添加环境",description:"选择当前会话允许 Agent 使用的 Sandbox 环境",closeAdd:"关闭添加环境",searchAria:"搜索环境",searchPlaceholder:"搜索环境名称或能力",availableAria:"可用环境与工作区",loading:"正在读取可用环境…",noMatch:"没有匹配的环境或工作区",workspaces:"工作区",reuseAll:"复用工作区中的全部可用环境",availableEnvironmentCount_one:"{{count}} 个可用环境",availableEnvironmentCount_other:"{{count}} 个可用环境",selectWorkspace:"选择工作区 {{name}}",environments:"环境",includedByWorkspaces:"已由工作区 {{names}} 包含",nameSeparator:"、",selectEnvironment:"选择环境 {{name}}",selectedWorkspaceCount_one:"{{count}} 个工作区",selectedWorkspaceCount_other:"{{count}} 个工作区",coveredEnvironmentCount_one:"{{count}} 个环境",coveredEnvironmentCount_other:"{{count}} 个环境",selectionSummary:"已选择 {{workspaces}},覆盖 {{environments}}",cancel:"取消",mounting:"正在挂载…",confirm:"确认添加",mountedAria:"已挂载环境",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",removeWorkspace:"移除工作区 {{name}}",remove:"移除",removeEnvironment:"移除环境 {{name}}",add:"添加环境",addMore:"添加更多环境",addForSession:"为当前 Session 添加环境",loadingAvailable:"正在加载可用环境…",empty:"暂无可用的 AIO Sandbox 环境。"},BOe={loading:{searching:"正在查找已有环境",creating:"环境初始化中",connecting:"正在连接已有环境"},initializationFailed:"AgentKit CLI 环境初始化失败,当前状态:{{status}}。",sessionExpired:"AgentKit CLI Session 不存在或已过期,请重试。",initializationTimeout:"AgentKit CLI 环境初始化超时,请稍后重试。",nonPersistent:"非持久化环境",recyclingHoursMinutes:"{{hours}} 小时 {{minutes}} 分钟后环境回收",recyclingMinutes:"{{minutes}} 分钟后环境回收",connectionError:`无法连接 Studio 服务,未收到服务端响应。 +{{value}}`,original:"原始错误:{{message}}",details:"详细信息"},Hwe={ariaLabel:"Skill 文件树",viewSource:"查看源码",viewPreview:"查看预览",download:"下载",binaryFile:"二进制文件",bytes:"{{value}} 字节",binaryDescription:"当前接口仅返回文件元数据,可单独下载原文件。",metadata:"Skill 元数据",noFiles:"暂无文件"},qwe={close:"关闭",name:"名称",region:"地域",optionalDescription:"描述(可选)",cancel:"取消",create:"创建",creating:"创建中…",save:"保存",saving:"保存中…",upload:"上传",uploading:"上传中…",createSpaceTitle:"新建 Skill 空间",editSpaceTitle:"编辑 Skill 空间",uploadTitle:"上传到 {{name}}",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",archiveValidationFailed:"Skill ZIP 格式校验失败",uploadFailed:"上传 Skill 失败",dropzone:"拖拽 Skill ZIP 到这里",chooseLocalFile:"或点击选择本地文件",archiveHelp:"ZIP 根目录需要包含 SKILL.md,也可以只包含一层包装目录。选择后仅检查格式,不会自动上传。",validating:"正在检查文件格式…",validationPassed:"格式检查通过:{{name}},共 {{count}} 个文件"},Wwe={styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先",custom:"自定义",customFallback:"自定义风格"},stages:{preparing:"正在准备 Dev Sandbox",ready:"Skill 已生成并通过格式校验",failed:"生成失败",cancelled:"已停止",validating:"正在校验 Skill 格式",packaging:"正在整理文件",generating:"正在生成 Skill",repairingAgain:"正在再次修复",autoRepairing:"正在自动修复({{attempt}}/{{max}})"},validation:{fallback:"Skill 格式校验未通过",repairInstruction:"只修复下面列出的 Skill 格式错误,不要改变原有用途和内容范围。",recheckInstruction:"修复后重新检查目录结构、SKILL.md frontmatter 和所有文本文件。",nameTooLong:"Skill 名称不能超过 64 个字符",invalidName:"Skill 名称只能包含小写字母、数字和连字符",modelTooLong:"模型 ID 不能超过 128 个字符",invalidModel:"模型 ID 只能包含字母、数字、点、下划线、连字符、斜杠和冒号"},errors:{loadCapability:"读取 Dev Sandbox 配置失败",autoRepair:"自动修复格式错误失败",pollCandidate:"读取候选方案状态失败,正在重试",createCandidate:"创建候选方案失败",refine:"继续调整失败",repairAgain:"再次修复格式错误失败",selectSpace:"请选择上传的 Skill Space",unsupportedRegion:"当前 Skill 地域不受支持",upload:"上传 Skill 失败",download:"下载失败"},sessionMax:"Session 最长保留 1 小时",remaining:"剩余 {{minutes}}:{{seconds}}",unnamedSpace:"未命名 Skill Space",leaveConfirmation:"离开后将停止并释放正在运行的 Dev Sandbox,确定离开吗?",createTitle:"创建技能",optimizeTitle:"优化 {{name}}",skillFallback:"技能",back:"返回技能空间",home:"主页技能生成",basicInfo:"基本信息",goal:"目标",createIntentPlaceholder:"描述希望这个 Skill 完成什么任务",optimizeIntentPlaceholder:"描述希望如何优化当前 Skill",skillName:"Skill 名称",autoNamePlaceholder:"留空时自动生成",nameHelp:"仅支持小写字母、数字和连字符;留空时自动生成。",createPlans:"生成方案",optimizePlans:"优化方案",createPlansDescription:"按不同方案并行生成多个技能,您可以选择最佳结果",optimizePlansDescription:"按不同方案并行优化当前技能,您可以选择最佳结果",plan:"方案 {{count}}",remove:"移除",model:"模型",modelPlaceholder:"选择或输入模型 ID",style:"风格",customStyle:"自定义风格",customStylePlaceholder:"描述表达方式、严谨程度或输出偏好",addConfiguration:"添加配置",notConfigured:"管理员未配置",generate:"生成",candidates:"候选方案",progress:"进度",retryCandidate:"重试此方案",formatValidationFailed:"格式校验未通过",repairAgain:"再次修复",files:"文件",downloadZip:"下载 ZIP",loadingFiles:"正在读取文件…",filesPending:"生成过程中会在这里显示完整文件树",uploadToSpace:"上传到 Skill Space",loadingSpaces:"正在加载 Skill Space",selectSpace:"选择 Skill Space",continuePlaceholder:"继续调整这个候选方案",continue:"继续调整",uploading:"上传中…",overwrite:"覆盖原 Skill",uploadToSelectedSpace:"上传到 Skill Space",uploadToCurrentSpace:"上传到当前空间",allCandidatesFailed:"所有方案均创建失败,可分别重试。"},Kwe={invalidFormat:"{{label}}格式错误。",recoveryStatus:"Skill 恢复点状态",errorResponse:"错误响应",errorDetails:"错误详情",missingContentType:"Content-Type 缺失",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}}),请检查代理或网关配置。",activity:"Skill 会话活动",invalidActivity:"Skill 会话活动格式错误。",invalidToolActivity:"Skill 工具活动格式错误。",invalidTextActivity:"Skill 文本活动格式错误。",publication:"Skill 发布结果",task:"Skill 会话",file:"Skill 文件",unknownTaskState:"Skill 会话状态无法识别。",capability:"Skill 工作台能力",loadCapability:"读取 Skill 工作台能力失败",prepareTask:"准备 Skill 会话失败",taskReference:"Skill 会话引用",startOptimization:"开始优化 Skill 失败",startTask:"开始 Skill 会话失败",taskSummary:"Skill 会话摘要",taskList:"Skill 会话列表",loadTaskList:"读取 Skill 会话列表失败",invalidTaskList:"Skill 会话列表格式错误。",loadTask:"读取 Skill 会话失败",artifact:"Skill 产物",artifactFile:"Skill 产物文件",loadArtifact:"读取 Skill 产物失败",refine:"继续调整 Skill 失败",stop:"停止当前 Skill 任务失败",publish:"发布 Skill 失败",nonNdjson:"发布 Skill 失败:服务端返回了非 NDJSON 响应。",missingStream:"发布 Skill 失败:服务端没有返回进度流。",publishProgress:"发布进度",invalidPublishProgress:"发布进度格式错误。",publishError:"发布错误",unknownPublishEvent:"未知的发布进度事件。",publishResult:"发布结果",streamEnded:"发布进度流提前结束,无法确认发布结果。请刷新技能中心确认状态。",deleteTask:"删除 Skill 会话失败",download:"下载 Skill 失败"},Gwe={configSelect:Qwe,conversation:zwe,errorDetails:Vwe,fileTree:Hwe,management:qwe,generation:Wwe,api:Kwe},qVe=Object.freeze(Object.defineProperty({__proto__:null,api:Kwe,configSelect:Qwe,conversation:zwe,default:Gwe,errorDetails:Vwe,fileTree:Hwe,generation:Wwe,management:qwe},Symbol.toStringTag,{value:"Module"})),Xwe={back:"返回上一页",reload:"重新加载",notConfigured:"未配置",name:"名称",description:"描述",delete:"删除",save:"保存",saving:"保存中",add:"添加",manage:"管理",environment:"环境",noDescription:"暂无描述",refresh:"刷新",close:"关闭",retry:"重试",loading:"加载中…",previousPage:"上一页",nextPage:"下一页",edit:"编辑",all:"全部",search:"搜索",cancel:"取消",view:"查看",viewDetails:"查看详情",deleting:"删除中…",create:"创建",creating:"创建中",adding:"添加中",generating:"生成中",uploading:"上传中",preview:"预览",loadFailed:"加载失败",select:"选择",collapse:"收起",expand:"展开",none:"无"},Ywe={ariaLabel:"AgentKit 快速入口",closeAriaLabel:"关闭 AgentKit 欢迎卡片",title:"欢迎使用 AgentKit",description:"通过 AgentKit 平台快速构建与托管您的企业级智能体",docsAriaLabel:"打开 AgentKit 文档,在新窗口打开",docs:"文档",consoleAriaLabel:"打开 AgentKit 控制台,在新窗口打开",console:"控制台"},Zwe={checkUpdates:"检查更新",checkingVersions:"正在检查版本…",versionCheckError:"查询沙箱版本失败,请检查凭据、区域及接口权限后重试",sandboxUpdateError:"Sandbox 更新失败,请刷新检查实际状态后重试",modelEnvRepairUnavailable:"无法补齐模型环境变量,请检查 CODEX_API_KEY 和 CODEX_BASE_URL",updateSandbox:"更新{{variant}}{{name}}",updatingSandbox:"更新中",title:"系统信息",description:"查看当前 Studio 版本及关联的基础资源",general:"通用",currentVersion:"当前版本",storage:"存储",loadingStorage:"正在加载存储信息",tosAddress:"TOS 地址",openTosConsole:"在云控制台中打开 TOS 存储桶",environmentBuild:"环境构建",loadingEnvironmentResources:"正在加载环境构建资源",environmentResourcesError:"环境构建资源加载失败,请检查云凭据后重试。",codePipelineWorkspace:"CodePipeline 工作空间",codePipelinePipeline:"CodePipeline 流水线",openCodePipelineWorkspace:"在云控制台中打开 CodePipeline Workspace",createdOnFirstBuild:"首次构建时自动创建",containerRegistryRepository:"Container Registry 仓库",openContainerRegistryRepository:"在云控制台中打开 Container Registry 仓库",sandboxInfo:"沙箱信息",loadingSandboxInfo:"正在加载沙箱信息",sandboxInfoError:"沙箱信息加载失败,请重试。",snapshot:"快照版",snapshotWithSpace:"快照版 ",openToolConsole:"在云控制台中打开{{name}}",updateModelEnv:"更新{{variant}}{{name}}模型环境变量",modelEnvUpdated:"已更新",modelEnvAlreadyCurrent:"无需更新",userPool:"用户池",loadingUserPool:"正在加载用户池",userPoolError:"用户池加载失败,请重试。",modelEnvUpdateError:"模型环境变量更新失败,请重试。",openUserPoolConsole:"在云控制台中打开用户池{{name}}",unnamedUserPool:"未命名用户池",id:"ID",domain:"域名",region:"区域",noLocalUserPool:"本地模式未配置用户池",noUserPool:"当前 Studio 未配置用户池"},Jwe={workspace:"Agent 工作区",library:"Agent 库",evaluation:"评测",agentList:"Agent 列表",agentDetails:"Agent 详情",newAgent:"新建 Agent",loading:"加载中…",loadingCloudAgents:"正在加载云端 Agent…",noAgentSelected:"请选择一个 Agent",local:"本地",remote:"云端",localAgent:"本地 Agent",remoteAgent:"云端 Agent",agentCount:"{{count}} 个 Agent",agentCountLabel:"Agent 数量",details:"详情",chat:"对话",update:"更新",backToAgentList:"返回 Agent 列表",loadingAgent:"正在加载 Agent",loadingAgentDescription:"正在读取 Agent 配置和 Runtime 信息。",loadingAgentInfo:"正在加载 Agent 信息…",detailLoadFailed:"无法加载 Agent 详情",detailLoadFailedDescription:"请检查 Runtime 状态后重试。",partialInfoUnavailable:"部分信息暂时不可用",upgradeRuntimeForDetails:"请升级 Runtime 以查看完整 Agent 信息。",basicInfo:"基本信息",usageOverview:"使用概览",sections:{basic:"基本信息",profileConfig:"Profile 配置",sessionConfig:"会话配置",usage:"使用概览",diagnostics:"诊断",evaluations:"评测",optimizations:"优化建议",integrations:"集成",versions:"版本",channels:"消息渠道"},evaluationGroup:"评测组",optimizations:"优化建议",optimizationsDescription:"根据评测结果查看可执行的优化建议。",integrations:"集成",githubVersions:"GitHub 版本",githubVersionsDescription:"查看持续交付产生的版本并创建回退 PR。",currentVersionOnly:"当前未启用 GitHub 持续交付,仅展示当前生产版本。",loadingVersions:"正在加载版本…",noVersion:"暂无版本记录",prLink:"Pull Request",viewPr:"查看 PR",author:"提交人",publishStatus:"发布状态",viewRelease:"查看发布记录",rollbackToVersion:"回退到此版本",rollingBack:"正在创建回退…",rollbackEvent:"回退事件",sourceMergedRuntimeStill:"最新源码已合并,但 Runtime 仍处于",currentProductionVersionHint:";当前生产版本保持不变。",usageSummary:"使用统计",totalCalls:"总调用次数",userCount:"用户数",userDetails:"用户明细",usageUserList:"Agent 使用用户列表",user:"用户",callCount:"调用次数",lastUsed:"最近使用",unknownUser:"未知用户",loadingUsage:"正在加载使用数据…",refreshing:"刷新中…",noUsage:"暂无使用记录",usageUnavailable:"当前 Agent 暂无可用的使用统计。",usagePagination:"使用记录分页",pageOf:"第 {{page}} / {{total}} 页",notProvided:"暂未提供",integrationMethods:"集成方式",integrationDescription:"通过 Runtime API 或 A2A 协议集成当前 Agent。",integrationProtocol:"集成协议",runtimeStatus:"Runtime 状态",executionFlow:"执行流程",probingIntegration:"正在检测集成能力",probingIntegrationDescription:"正在读取可用端点和鉴权配置。",configurationStatus:"配置状态",discoveryEndpoint:"发现端点",invocationEndpoint:"调用端点",invocationUrl:"调用地址",authentication:"鉴权方式",networkAccess:"网络访问",notAvailable:"暂无",noAuthentication:"无需鉴权",noApiKeyRequired:"无需 API Key",usesOauthJwt:"使用 OAuth / JWT",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",pythonExample:"Python 示例",deploymentConfig:"部署配置",deploymentConfigDescription:"确认实例和运行配置后更新 Runtime。",deploymentRegion:"部署区域",mpaControlPlane:"MPA 控制面",loadingMpaAgentView:"正在读取 MPA Runtime 绑定…",mpaRuntimeBound:"该 MPA Agent 已绑定唯一 Runtime,可继续管理。",mpaRuntimeMissing:"当前 Agent 没有可见的 MPA Runtime 绑定。",mpaRuntimeBindingAmbiguous:"多个 MPA Runtime 匹配当前 Agent,请先修复绑定后再修改。",mpaRuntimeOrphan:"Runtime 存在,但其中没有当前 MPA Profile。",mpaRuntimeLegacyAuthUnsupported:"该 Runtime 使用旧版 MPA 镜像,仍要求 X-Jwt-Token。请先更新到当前 AgentKit 兼容镜像,再管理 Profile 或 Session 配置。",profileConfig:"Profile 配置",profileConfigTitle:"Profile 配置",profileConfigDescription:"查看并应用 Agent 级 MPA Profile。Profile 是 Runtime 的长期默认配置,新会话默认继承它。",profileStatus:"Profile 状态",profileApplied:"已应用",profileNotApplied:"未应用",profileNotAppliedDescription:"当前 Runtime 可运行,但尚未保存为 Studio 可管理的 Profile。应用后会生成 Profile revision。",applyProfile:"应用 Profile",reapplyProfile:"重新应用 Profile",editProfile:"编辑 Profile",profileApplying:"应用中…",profileAppliedNotice:"Profile 已应用,当前 revision 为 {{revision}}。",profileApplyIncomplete:"Profile 应用未完成,请查看当前操作状态后重试。",profileApplyFailed:"Profile 应用失败。",profilePrompt:"系统提示词",profileResources:"资源配置",profileResourceSummary:"{{tools}} 个工具 · {{skills}} 个 Skill · {{mcp}} 个 MCP 服务",sessionConfigTitle:"会话配置",sessionConfigDescription:"查看和调整当前 MPA Session 的执行配置。变更只对下一轮对话生效。",loadingSessionConfig:"正在加载会话配置…",sessionConfigNoAgent:"请选择一个 MPA Agent 后再管理会话配置。",sessionConfigNonMpa:"会话配置仅适用于 MPA Agent。",sessionConfigNoSession:"请先打开这个 MPA Agent 的对话,再修改会话配置。",sessionConfigDifferentRuntime:"请先切回这个 MPA Agent 的当前对话,再修改会话配置。",sessionConfigSaved:"会话配置已更新,下一轮对话将使用新 revision。",sessionConfigStale:"该 Session 已被其他位置修改,已展示最新配置,请确认后再保存。",sessionConfigRevision:"配置 revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"最新 Profile revision",sessionProfileUpgradeAvailable:"检测到新的 Profile revision:v{{current}} → v{{target}}。",upgradeSessionProfile:"升级 Session Profile",sessionProfileUpgrading:"升级中…",sessionProfileUpgraded:"Session Profile 已升级,下一轮对话将使用新 revision。",sessionProfileUpgradeFailed:"Session Profile 升级失败。",sessionModelOverride:"模型覆盖",modelId:"模型 ID",inheritProfileDefault:"继承 Profile 默认值",sessionMcpServers:"MCP 服务",mcpServerCount:"已选择 {{count}} 个",clearSessionMcp:"清空 MCP 服务",mpaDiagnosticsTitle:"Runtime 诊断",mpaDiagnosticsDescription:"查看最近的 Runtime Console 运行记录,以及 Agent、Profile、Turn、task 和 worker 关联。",loadingMpaDiagnostics:"正在加载 Runtime 诊断…",noMpaDiagnostics:"当前 Session 暂无 Runtime 诊断运行记录。",latestRun:"最近运行",traceCorrelation:"Trace 关联",traceCorrelationDescription:"Runtime Console 为本次 invocation 返回的稳定标识。",traceSteps:"Trace 步骤",traceStepsDescription:"当前 invocation 最近的有界 Runtime Console 步骤。",mpaInstanceId:"MPA 实例",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker 类型",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile 版本",step:"步骤",stepCount:"步骤数",duration:"耗时",noTraceSteps:"本次 invocation 暂无 trace 步骤。",executionConfigMode:{replace:"Session 覆盖",clear:"本 Session 已清空",inherit:"使用 Profile 默认值"},concurrency:"并发数",selectedOptimizations:"已选优化项",selectedOptimizationsDescription:"这些优化会应用到本次更新。",optimizationProfile:"优化方案",updatePending:"等待更新",updatingDeployment:"正在更新部署",restoringUpdateConfig:"正在恢复更新配置…",updateConfigUnavailable:"无法读取更新配置",legacyConfigMissing:"旧版本 Runtime 缺少可恢复的配置,请重新创建。",deploymentFailed:"部署失败",continueEditing:"继续编辑",loadingOptimizations:"正在加载优化建议…",noOptimizations:"暂无优化建议",fixPriority:"优先级",suggestedModule:"建议模块",suggestionAndReason:"建议与原因",priority:{high:"高",medium:"中",low:"低"},modules:{agentStructure:"Agent 结构",prompt:"提示词",tool:"工具",knowledge:"知识库",memory:"记忆",workflow:"工作流",other:"其他"},evaluationGroupList:"评测组列表",newEvaluationGroup:"新建评测组",newEvaluationGroupName:"新评测组 {{count}}",searchEvaluationGroups:"搜索评测组",noMatchingEvaluationGroups:"没有匹配的评测组",noEvaluationGroupSelected:"请选择一个评测组",groupStats:"{{agents}} 个 Agent · {{runs}} 次运行",evaluationGroupDetails:"评测组详情",evaluationGroupStats:"{{agents}} 个 Agent · {{caseSet}} · {{runs}} 次运行",startEvaluation:"开始评测",evaluationConfig:"评测配置",historyResults:"历史结果",participatingAgents:"参与 Agent",selectedCount:"已选择 {{count}} 个",evaluationResources:"评测资源",evaluationSet:"评测集",evaluator:"评估器",caseCount:"{{count}} 条案例",evaluationMetrics:"评测指标",selectedMetricCount:"已选择 {{count}} 项",historyDescription:"查看每次评测的分数和运行状态。",noHistory:"暂无评测历史",noHistoryDescription:"运行一次评测后,结果会显示在这里。",evaluationRun:"第 {{index}} 次评测",evaluationRunMeta:"{{time}} · {{agents}} 个 Agent",overallScore:"综合分",completed:"已完成",evaluationDefaults:{coreRegression:"核心能力回归",safetyCheck:"安全与幻觉检查",coreSet:"核心回归集",safetySet:"安全边界集",toolSet:"工具调用集",qualityEvaluator:"综合质量评估器",factualEvaluator:"事实一致性评估器",toolEvaluator:"工具调用评估器",responseQuality:"回答质量",factualAccuracy:"事实准确性",toolUse:"工具调用",responseEfficiency:"响应效率",todayTime:"今天 10:32",yesterdayTime:"昨天 16:08",julyTime:"7 月 25 日 14:20",justNow:"刚刚"},defaultCases:{agentName:"示例 Agent",goodSetName:"示例正向案例集",badSetName:"示例负向案例集",weeklyFeedback:{input:"总结本周客户反馈,并按优先级归类。",output:"覆盖主要问题,给出清晰的优先级与下一步动作。",tag:"总结",reason:"任务完整覆盖了用户目标,输出结构清晰,并给出了可执行的下一步动作。"},research:{input:"查询最新公开资料并附上来源。",output:"调用搜索工具,结论与引用一一对应。",tag:"工具调用"},uncertainConclusion:{input:"在信息不足时直接给出确定结论。",output:"应明确说明未知,并主动询问缺失信息。",tag:"幻觉",reason:"信息不足时仍给出了确定结论,缺少必要的澄清步骤与不确定性说明。"},repeatedTool:{input:"连续重复调用相同工具获取同一结果。",output:"复用已有结果,避免无意义的重复调用。",tag:"效率"}},goodCases:"正向案例",badCases:"负向案例",goodCase:"正向案例",badCase:"负向案例",reference:"参考答案",caseResultFilter:"案例结果筛选",feedbackSourceFilter:"反馈来源筛选",searchCases:"搜索案例",searchCasesPlaceholder:"搜索输入、输出或标签",selectCases:"选择案例",selectAll:"全选",selectAllVisible:"选择当前可见案例",selectedCaseCount:"已选择 {{count}} 条",deleteSelected:"删除所选",deleteSelectedTitle:"删除所选 Agent",deleteSelectionDescription:"确定删除所选的 {{count}} 个项目吗?此操作无法撤销。",deleteCasesConfirm:"删除所选案例",deleteOneCaseConfirm:"删除这个案例",deleteFeedbackCase:"删除反馈案例",noFeedbackCases:"暂无反馈案例",noMatchingCases:"没有匹配的案例",loadingEvaluationSet:"正在加载评测集…",userInput:"用户输入",agentOutput:"Agent 输出",score:"得分",scoreReason:"评分原因",noUserInput:"暂无用户输入",noVisibleResponse:"暂无可见回复",note:"备注:",manualFeedback:"人工反馈",automaticFeedback:"自动反馈",scoreValue:"{{score}} 分",unknownTime:"时间未知",deleteAgentTitle:"删除 Agent",deleteAgentDescription:"确定删除 Agent“{{name}}”吗?",deleteDraftDescription:"确定删除草稿“{{name}}”吗?",deleteAgent:"删除 Agent",closeDeleteConfirmation:"关闭删除确认",mpaDeletePreviewSummary:"Studio 会先删除可见的空闲 MPA Runtime 会话,再删除 AgentKit Runtime。运行中的任务需要先结束或停止后才能删除。",mpaDeletePreviewSessions:"会话",mpaDeletePreviewActiveSessions:"运行中",mpaDeletePreviewIdleSessions:"空闲",mpaDeleteBlocked:"当前无法删除",mpaDeleteBlockerActiveOperation:"仍有 MPA 创建或更新操作在执行。",mpaDeleteBlockerActiveSessions:"Runtime 中仍有运行中的会话。",mpaDeleteBlockerBindingAmbiguous:"当前 Agent 匹配到多个 MPA Runtime。",mpaDeleteBlockerRuntimeMissing:"当前 MPA Agent 没有可见的 Runtime 绑定。",mpaDeleteBlockerOrphanRuntime:"Runtime 可见,但其中缺少当前 MPA Profile。",mpaDeleteStage:{runtime_sessions:"删除 {{count}} 个可见空闲 Runtime 会话",runtime_diagnostics:"清理这些会话关联的诊断数据和挂载元信息",agentkit_runtime:"删除 AgentKit Runtime"},draftDeletionWarning:"草稿将从当前浏览器中删除。",runtimeDeletionWarning:"Runtime 和相关云端资源将被删除。",noneSelected:"尚未选择",none:"无",notPublished:"未发布",notRecorded:"未记录",noTime:"暂无时间",noPr:"暂无 PR",comingSoon:"评测能力即将开放",preparing:"准备中",cancelled:"已取消",failed:"失败",totalCount:"共 {{count}} 条",deploymentProgress:"部署进度",returnToEdit:"返回编辑",retryOperation:"重试操作",buildLog:"构建日志",githubMountLog:"GitHub 挂载日志",githubDeliveryMountLog:"GitHub 持续交付挂载日志",waitingBuildLog:"正在等待构建日志…",waitingGithubMountLog:"正在等待 GitHub 挂载日志…",copy:"复制",copied:"已复制",copyLabel:"复制{{label}}",copiedLabel:"已复制{{label}}",logLines:"{{count}} 行",logStatus:{synced:"已同步",failed:"读取失败",syncing:"同步中",earlyOmitted:"已省略早期日志",recentOnly:"仅显示最近的构建日志",partiallyOmitted:"已省略部分日志"},deployStatus:{running:"正在部署",unconfirmed:"部署状态待确认",success:"部署完成",error:"部署失败",cancelled:"部署已取消"},deploymentSteps:{prepare:{label:"准备部署",description:"校验配置并创建部署任务"},build:{label:"构建镜像",description:"生成运行环境与智能体代码"},deploy:{label:"部署服务",description:"创建并启动 AgentKit Runtime"},publish:{label:"发布服务",description:"等待服务就绪并生成访问地址"},complete:{label:"部署完成",description:"智能体已可以正常使用"},evaluation:{label:"创建评测集",description:"自动创建 Good Case 和 Bad Case 评测集"},profileApplying:{label:"应用 MPA 配置",description:"将 Studio Agent 配置写入 MPA Runtime"},smokeRunning:{label:"验证 MPA Runtime",description:"在标记可运行前执行 Runtime 就绪验证"},runnable:{label:"MPA Runtime 可运行",description:"Runtime 已接受配置并通过执行就绪验证"},github:{label:"挂载 GitHub 持续交付",description:"初始化目标分支与 GitHub Actions workflow"},update:{label:"更新实例配置",description:"将 Runtime 实例数调整为 {{min}}~{{max}}"}},githubStatus:{published:"已发布",publishing:"发布中",failed:"发布失败",pending:"等待发布",unknown:"未知"},errors:{agentInfoMissing:"Agent 信息不可用",checkUpdateCapability:"无法检查更新能力",checkingUpdateConfig:"正在检查更新配置",cloudOnlyUpdate:"仅云端 Agent 支持更新",deleteDeployedUnsupported:"当前不支持删除已部署 Agent",deleteDraftUnsupported:"当前不支持删除草稿",loadMpaDeletePreview:"无法加载 MPA 删除预览",loadAgentInfo:"无法加载 Agent 信息",loadApiKey:"无法读取 API Key",loadGithubVersions:"无法加载 GitHub 版本",loadEvaluations:"无法加载评测案例",loadMpaAgentView:"无法加载 MPA Agent 状态",loadMpaDiagnostics:"无法加载 Runtime 诊断",loadOptimizations:"无法加载优化建议",loadRuntimeDetails:"无法加载 Runtime 详情",loadSessionConfig:"无法加载会话配置",loadUsage:"无法加载使用数据",noCreatePermission:"当前账号没有创建 Agent 的权限",noManagePermission:"当前账号没有管理此 Agent 的权限",originalConfigUnavailable:"原始配置不可用",probeIntegration:"无法检测集成能力",rollbackVersion:"无法创建版本回退",runtimeRegionMissing:"Runtime 区域信息缺失",updateCapabilityMismatch:"Runtime 更新能力与当前配置不匹配",updateCapabilityPending:"Runtime 更新能力仍在确认中",updateConfigRestoring:"正在恢复更新配置",updateUnsupported:"当前 Runtime 不支持更新",usageMismatch:"返回的使用数据与当前 Agent 不匹配"}},e1e={title:"环境",loadFailed:"环境加载失败,请检查存储配置后重试。",storageUnavailable:"管理员未配置持久化存储,环境管理暂不可用。",create:"新建环境",configure:"配置环境",details:"环境详情",editorDescription:"配置运行环境,或接入代码仓库和已有镜像",backToList:"返回环境列表",save:"保存环境",createAndBuild:"创建并构建",saveAndBuild:"保存并构建",name:"环境名称",namePlaceholder:"Python 数据处理",descriptionPlaceholder:"说明这个环境适合处理的任务",creationMethod:"创建方式",baseConfiguration:"基础配置",baseEnvironment:"基础环境",operatingSystem:"操作系统",pythonVersion:"Python 版本",fixedByBase:"由 {{base}} 固定为 {{value}}",selectUbuntuVersion:"选择基础镜像的 Ubuntu 版本",selectPythonVersion:"选择需要安装的 Python 版本",skills:"技能",addSkill:"添加环境技能",veadkDescription:"Agent 开发与运行框架",customDockerfile:"自定义 Dockerfile",presetEnvironment:"预制环境",presetHint:"选择“无”可自行填写 Dockerfile 第一行的基础镜像。",dockerfileSize:"{{size}} / {{max}} 字节",upload:"上传",reset:"重置",dockerfileBaseImage:"Dockerfile 基础镜像",dockerfileContent:"Dockerfile 内容",region:"区域",search:"搜索环境",manualImport:"手动导入",noMatches:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称",startBuild:"开始构建",build:"构建",unnamed:"未命名环境",listSeparator:"、",clipboardReadError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",creation:{custom:{label:"自定义配置",description:"通过表单选择基础环境、Python、工具和技能"},dockerfile:{label:"自定义 Dockerfile",description:"上传或直接编辑 Dockerfile"},git:{label:"从代码仓库构建",description:"探查公开仓库并通过 CodePipeline 构建"},image:{label:"使用已有镜像",description:"绑定由外部流水线交付的 CR 镜像"}},baseDescriptions:{"aio-sandbox":"内置 Sandbox Shell 能力 · Ubuntu 22.04","codex-sandbox":"内置 Codex CLI、浏览器与代码执行环境",ubuntu:"标准 Linux 基础镜像"},dockerfileValidation:{baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"},presets:{none:"自行填写 Dockerfile 基础镜像",aio:"内置 Sandbox Shell 与常用运行时",codex:"内置 Codex CLI、浏览器与代码执行环境"},categories:{tools:"工具",productivity:"效率",browser:"浏览器自动化",system:"系统与媒体"},options:{"lark-cli":"飞书开放平台命令行工具",pandoc:"文档格式转换工具",opencli:"将网站与桌面应用转换为命令行工具",uv:"快速 Python 包与项目管理器",ripgrep:"高性能文本检索工具",jq:"JSON 查询与转换工具","github-cli":"在终端中管理 GitHub 工作流",playwright:"浏览器自动化与端到端测试",chromium:"无头浏览器运行时",git:"代码版本管理",curl:"网络请求与文件下载",ffmpeg:"音视频转码与处理",imagemagick:"图片转换与批处理"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",hoursMinutes:"{{hours}} 小时 {{minutes}} 分"},buildStatus:{preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"构建失败",notBuilt:"未构建"},manifest:{title:"环境 Manifest",closeLabel:"关闭环境 Manifest",loading:"正在加载 Manifest",editorLabel:"环境 Manifest YAML",copyFailed:"复制失败,请重试",copied:"已复制",copy:"复制 Manifest",view:"查看环境 Manifest",viewShort:"查看 Manifest",unavailable:"尚无可用 Manifest"},buildDetails:{title:"构建详情",closeLabel:"关闭构建详情",currentStep:"当前步骤",waiting:"等待构建信息",elapsed:"已用时",sourceCommit:"源码提交",openCodePipeline:"在 CodePipeline 中查看",starting:"正在启动",rebuild:"重新构建"},git:{sectionLabel:"公开代码仓库",address:"Git 地址",ref:"Branch、Tag 或 Commit",defaultBranch:"默认分支",inspecting:"正在拉取仓库并查找 Dockerfile",foundDockerfiles:"已在提交 {{commit}} 中找到 {{count}} 个 Dockerfile。",savedDockerfileLoaded:"已载入保存的 Dockerfile,可重新探查仓库更新。",noDockerfile:"仓库中未找到 Dockerfile,请检查分支或仓库内容。",inspectAgain:"重新探查",selectDockerfile:"选择 Dockerfile"},repository:{outputSection:"构建输出",type:"镜像仓库类型",managed:"Studio 默认镜像仓库",existing:"已有镜像仓库",managedHint:"构建时自动创建或复用当前区域的 Studio 镜像仓库。"},existingImage:{sectionLabel:"已有镜像",reference:"Tag 或 Digest",placeholder:"latest 或 sha256:...",hint:"填写镜像 Tag,或以 sha256: 开头的完整 Digest。"},share:{action:"分享",title:"分享环境",closeLabel:"关闭分享环境",generating:"正在生成并复制分享码",copied:"分享码已复制",failed:"分享失败",code:"分享码",fullCode:"完整环境分享码",copiedHint:"分享码已自动复制,也可在这里查看或手动复制。",copyFailedHint:"自动复制失败,可手动复制上方分享码,或重试。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅发送给可信对象。",copyAgain:"再次复制"},import:{title:"导入环境",closeLabel:"关闭导入环境",description:"先检测分享码中的环境,再确认添加到当前账号。",code:"环境分享码",tooMany:"最多可一次导入 {{max}} 个环境,当前检测到 {{count}} 个分享码。",multipleHint:"多个分享码可使用英文逗号、中文逗号或换行分隔,重复项会自动忽略。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅导入可信来源的分享码。",inspectingCodes:"正在检测环境分享码",found:"检测到 {{count}} 个环境:{{names}}。",itemError:"第 {{index}} 个分享码:{{error}}",invalidCode:"分享码无效。",noResult:"服务未返回该分享码的导入结果。",partial:"已导入 {{created}} 个环境,{{remaining}} 个未完成,可重试有效失败项。",inspecting:"正在检测",importing:"正在导入",retryImport:"重试导入",confirm:"确认导入",inspectCodes:"检测分享码"},status:{boundImage:"环境“{{name}}”已绑定已有镜像",queued:"环境“{{name}}”已进入构建队列",savedBuildFailed:"环境已保存,但构建未启动:{{error}}",importedFailed:"已导入 {{created}} 个环境,{{failed}} 个失败",importedDuplicate:"已导入 {{created}} 个环境,{{duplicate}} 个分享码已存在",imported:"已导入 {{count}} 个环境",deleted:"已删除环境“{{name}}”"},deleteTitle:"删除环境",deleteDescription:"确定删除环境“{{name}}”吗?删除后无法恢复。",errors:{repositoryRequired:"请输入公开代码仓库地址。",repositoryHttps:"请输入公开仓库的 HTTPS 地址。",repositoryInvalid:"请输入有效的公开仓库 HTTPS 地址。",imageReferenceWhitespace:"Tag 或 Digest 不能包含空格。",imageDigestInvalid:"Digest 必须是完整的 sha256 值。",imageTagOnly:"这里只填写 Tag,不要重复填写镜像仓库路径。"}},t1e={searchPlaceholder:"搜索资源名称",emptyMessage:"暂无可用选项",searchAriaLabel:"搜索{{label}}",loadingMore:"正在加载更多资源…"},n1e={retryDeployment:"重试部署",retrying:"正在重试…",collapse:"收起错误信息",expand:"展开完整错误信息",copy:"复制完整错误信息"},i1e={steps:"构建步骤",log:"构建日志",syncing:"同步中",loadFailed:"读取失败",synced:"已同步",recentOnly:" · 仅显示最近日志",copiedLog:"已复制构建日志",copyLog:"复制构建日志",copied:"已复制",copy:"复制",logContent:"构建日志内容",waiting:"正在等待 CodePipeline 输出日志…",empty:"暂无构建日志"},r1e={defaultLabel:"Studio 默认环境",defaultDescription:"使用 Studio 预置的标准运行环境",status:{notBuilt:"未构建",preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"失败"},label:"运行环境",placeholder:"请选择运行环境",search:"搜索运行环境",loading:"正在加载运行环境…",loadFailed:"加载运行环境失败",noMatches:"未找到匹配的运行环境",unavailable:"当前没有可用的运行环境",selectionUnavailable:"所选运行环境当前不可用,请重新选择。",selectionHint:"选择构建完成的运行环境后,部署将使用其镜像和工具配置。",versionChanged:"所选环境版本已更新,请确认后继续。",versionMissing:"所选环境版本已不存在,请重新选择。",operatingSystem:"操作系统",language:"语言",image:"镜像",imageVersion:"镜像版本",skills:"技能",tools:"工具",noSkills:"未配置 Skill",noExtraTools:"未配置额外工具",defaultGuidance:"默认环境由 Studio 管理,无需额外配置。",persistenceFallback:"持久化环境服务暂不可用,当前使用默认环境。",emptyFallback:"当前没有可选择的自定义环境。"},s1e={repository:"GitHub 仓库",githubUrl:"GitHub 地址",token:"访问令牌",sessionToken:"{{provider}} 临时令牌",runtime:"Runtime",commit:"提交",workflow:"工作流",syncFailed:"同步 GitHub 代码失败",status:{mounted:"已挂载",bound:"已绑定",synced:"已同步",created:"已创建"},volcengine:"火山引擎",mountDelivery:"挂载持续交付",selectedForDeployment:"已选择,部署时挂载",mountOnDeploy:"部署时挂载持续交付",syncCode:"同步代码",deliveryMode:"GitHub 交付模式",sourceSync:"GitHub 代码同步",delivery:"GitHub 交付",loading:"读取中",running:"执行中",runtimeDeliveryHint:"写入 AgentKit Runtime GitHub Actions workflow,后续 GitHub 提交会更新绑定 Runtime。",initialDeliveryHint:"首次部署成功后初始化目标分支,后续 GitHub 提交会更新绑定 Runtime。",sourceSyncHint:"Studio 会直接 push 到目标分支;该分支由 Studio 管理,远端冲突时同步会失败。Runtime 仍由部署按钮发布。",tokenPlaceholder:"repo 或 contents write 权限",getToken:"获取 Token",hideToken:"隐藏 Token",showToken:"显示 Token",tokenHelp:"Token 仅用于本次操作,成功后不会保留在表单中。",targetBranch:"目标分支",actionsSecretPlaceholder:"用于写入 GitHub Actions Secret",sessionTokenPlaceholder:"临时凭证可选",syncing:"同步中…",pendingHint:"已选择挂载持续交付。点击部署后,Studio 会等待 Runtime 创建完成并初始化 GitHub 目标分支,初始化成功后才完成部署流程。",result:{deliveryMounted:"已挂载持续交付",deliverySelected:"已选择挂载持续交付",githubBound:"已绑定 GitHub",codeSynced:"代码已同步",deliveryHint:"目标分支提交会触发 Runtime 持续交付。",boundHint:"更新并发布时会先同步当前源码到这个分支。"},branch:"分支",viewPr:"查看 PR",createFailed:"创建失败",phase:"阶段",log:"日志"},a1e={name:"飞书",enabling:"正在启用并更新配置…",description:"接收消息并通过飞书机器人回复",configuration:"飞书配置",configurationMode:"飞书配置方式",automatic:"自动配置",manual:"手动配置",cancelling:"取消中…",scanToCreate:"扫码创建",scanDescription:"授权后自动回填凭据",generateQrCode:"生成二维码",qrCodeAlt:"飞书机器人配置二维码",scanToConfirm:"飞书扫码确认",expiresIn:"{{time}} 后失效",created:"机器人已创建",credentialsFilled:"应用凭据已自动回填",qrCodeExpired:"二维码已失效",automaticFailed:"自动配置失败",regenerateQrCode:"请重新生成二维码。",configuredPlaceholder:"已配置,留空沿用",appSecretPlaceholder:"请输入 App Secret",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret"},o1e={mode:{auto:"自动创建",autoDescription:"部署时自动创建所需资源",recommended:"推荐",create:"指定名称",createDescription:"使用指定名称创建或复用资源",existing:"选择已有",existingDescription:"从当前账号的已有资源中选择"},selectExisting:"请选择已有资源",searchResource:"搜索资源名称",noMatch:"未找到匹配资源",noAvailable:"暂无可用资源",searching:"正在搜索云资源…",loading:"正在加载云资源…",noMatchSentence:"未找到匹配资源。",noAvailableSentence:"暂无可用资源。",loadedSummary:"实际服务区域:{{region}} · 已加载 {{loaded}}{{total}}",registryInstance:"Registry 实例",registryAriaLabel:"镜像仓库 Registry 实例",namespace:"命名空间",namespaceAriaLabel:"镜像仓库 Namespace",repository:"镜像仓库",existingRepository:"已有镜像仓库",selectRegistryFirst:"请先选择 Registry 实例。",selectNamespaceFirst:"请先选择 Namespace。",configurationMode:"配置方式",configurationModeAriaLabel:"{{resource}}配置方式",selectConfigurationMode:"请选择配置方式",automaticNames:"自动创建名称",validation:{tos:"请填写或选择 TOS 存储桶。",cr:"请完整填写或选择 CR 实例、命名空间和镜像仓库。",codePipeline:"请完整填写或选择 CodePipeline Workspace 和 Pipeline。",existingCodePipeline:"请选择已有的 CodePipeline Workspace 和兼容 Pipeline。"},autoBucketWithRegion:"agentkit-platform-{账号 ID}-{{region}}",autoBucket:"agentkit-platform-{账号 ID}",tosBucket:"TOS 存储桶",bucketName:"存储桶名称",bucketNamePlaceholder:"输入存储桶名称",existingBucket:"已有存储桶",existingTosBucket:"已有 TOS 存储桶",bucket:"存储桶",accountIdResolved:"账号 ID 在部署时按当前云账号解析。",containerRegistry:"容器镜像仓库(CR)",instanceName:"实例名称",crInstance:"CR 实例",existingCrInstance:"已有 CR 实例",existingCrNamespace:"已有 CR 命名空间",existingCrRepository:"已有 CR 镜像仓库",autoRegistry:"agentkit-platform-{账号 ID}",autoRepositoryName:"{{name}}-{4 位随机字符}",registryNameNote:"账号 ID 在部署时解析,镜像仓库的随机字符在部署时生成。",workspace:"工作空间",pipeline:"流水线",workspaceName:"Workspace 名称",pipelineName:"Pipeline 名称",existingWorkspace:"已有 CodePipeline Workspace",compatiblePipeline:"兼容 Pipeline",existingPipeline:"已有 AgentKit CodePipeline",pipelineNameNote:"Pipeline 与 Runtime 名称一致。"},l1e={commit:"提交",steps:{permissions:"预检 OTA 所需权限",resolving:"读取目标版本信息",downloading:"下载并校验完整更新包",preparing:"准备 VeFaaS Function 代码",provisioning:"检查并补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布新 Revision 并重启服务"},stages:{permissions:"预检 OTA 权限",resolving:"读取版本信息",downloading:"下载更新包",preparing:"准备 Function 代码",provisioning:"补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布 Revision",checking:"检查更新",unknown:"未知阶段"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},logPermissionPrefix:"无法读取 VeFaaS 发布日志。Function 角色缺少 ",logPermissionSuffix:" 权限,更新会继续。",openIamConsole:"前往 IAM 控制台配置权限",deploymentProgress:"部署进度",live:"实时",completed:"已完成",stopped:"已停止",copied:"已复制",copyFailed:"复制失败",copyLog:"复制日志",waitingForLogs:"等待 VeFaaS 返回更新日志…",noLogs:"本次更新未返回发布日志",messages:{updated:"Studio 已更新,新 Revision 已接管服务",failed:"Studio 更新失败",timeout:"等待 VeFaaS 发布超时,请稍后重新检查版本",submitted:"更新已提交,正在等待 VeFaaS 发布新版本",connectionSwitched:"连接已切换,正在确认新版本状态"},checkingPermissions:"正在检查 OTA 权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",updated:"Studio 已更新",updateToVersion:"更新 Studio 至 {{version}}",checkPermissions:"检查更新权限",authorizationNeeded:"需要授权",updatingShort:"正在更新",refreshForNewVersion:"刷新使用新版",updateFailed:"更新失败",updateNow:"立即更新",newVersionAvailable:"有新版更新",dialog:{failed:"Studio 更新失败",checkingPermissions:"正在检查更新权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",completed:"Studio 更新完成",newVersion:"发现新版本"},permissionCheck:"正在核对 OTA 与定时任务所需的全部 IAM 权限…",permissionCheckHint:"权限全部满足后才会开始下载、更新或发布云资源。",missingPermissionCount:"当前 Function 角色缺少 {{count}} 项 OTA 更新权限,尚未执行任何云资源变更。",functionRole:"Function 角色",currentRole:"当前运行角色",policyToUpdate:"将更新策略",authorizationSteps:{open:"打开授权页面,确认已预填的策略名称和完整策略内容。",debug:"点击页面中的“发起调试”,完成策略更新。",return:"返回此窗口,点击“我已授权,重新检查”。"},missingPermissions:"缺少的权限",openPrefilledAuthorization:"打开已预填的 IAM 授权页面",openIamManually:"前往 IAM 控制台手动配置",noSafePolicy:"当前角色没有唯一可安全更新的自定义策略,请由管理员将上述权限加入该角色。",failedStage:"失败阶段",errorId:"错误 ID",notGenerated:"未生成",openFunctionLogs:"前往 VeFaaS 控制台查看 Function 日志",targetVersion:"目标版本",updateStatus:"更新状态",elapsed:"已用时",progressAriaLabel:"Studio 更新进度",processingUpdate:"正在处理更新",processing:"正在处理",backgroundHint:"发布阶段会短暂中断连接;关闭此窗口不会停止更新,可随时点击右上角按钮重新查看。",confirmDescription:"更新会重启 Studio 服务,预计约 3–5 分钟完成更新与发布。期间正在进行的对话、流式响应或部署任务可能中断,登录态不会受到影响。",selectVersion:"选择版本",currentVersion:"当前版本",changelog:"更新内容",noChangelog:"暂无更新说明",runInBackground:"后台运行",authorizedRecheck:"我已授权,重新检查",tryAgain:"重新尝试"},c1e={deploy:"部署",update:"更新",planHash:"方案哈希",backToConfiguration:"返回配置",releaseRegion:"发布区域",deployRegion:"部署区域",regionPreserved:"更新时沿用现有 Runtime 的部署区域,无法修改。",unnamedAgent:"未命名 Agent",deployTitle:"部署 {{name}}",additionalAgentCount:" 等 {{count}} 个智能体",releaseOverview:"发布概览",agentOverview:"Agent 概览",agentCount:"Agent 数量",model:"模型",systemPrompt:"系统提示词",optimizations:"优化选项",notEnabled:"未启用",effectiveCapabilities:"生效能力",automaticProtection:"自动保护",artifactActions:"发布产物操作",exportYaml:"导出 YAML",viewSource:"查看源代码",downloadSource:"下载源代码",expandFlow:"放大查看执行流程",expand:"放大查看",deploymentConfiguration:"部署配置",runtimeName:"Runtime 名称",runtimeNamePreserved:"更新时保持现有 Runtime 名称不变。",runtimeNameHint:"默认根据 Root Agent 名称生成,并添加随机后缀避免重名;支持 4-64 位字母、数字、连字符和下划线",accessAuthentication:"访问鉴权",authenticationPreserved:"更新时保持现有 Runtime 的鉴权方式不变。",authenticationMethod:"鉴权方式",authenticationAriaLabel:"部署鉴权方式",authenticationPlaceholder:"请选择鉴权方式",messageChannels:"消息渠道",instanceSettings:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",sidecarSingleInstance:"Harness Sidecar 首期仅支持单实例,Runtime 固定为 1~1",inMemorySingleInstance:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",network:"网络",networkPreserved:"现有 Runtime 的区域与网络模式保持不变。",networkMode:"网络模式",networkModes:{public:"公网",both:"公网 + VPC"},subnetId:"子网 ID",subnetHint:"可选,多个用逗号分隔",sharedInternetAccess:"VPC 内共享公网出口",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",createEvaluationSetsHint:"部署成功后,自动创建 Good Case 和 Bad Case 评测集。",resourceConfiguration:"资源配置",environmentVariables:"环境变量",environmentVariablesHint:"组件配置会自动同步到这里,部署前可核对最终值。",itemCount:"{{count}} 项",addVariable:"添加变量",componentGenerated:"组件自动生成",injectedByApiKey:"由所选 API Key 注入",envNameAriaLabel:"{{key}} 环境变量名",envDescriptionAriaLabel:"{{key}}说明:{{description}}",openOpenViking:"打开 OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}:打开 OpenViking {{label}}",requiredEmpty:"必填,尚未填写",optionalEmpty:"可选,尚未填写",envValueAriaLabel:"{{key}} 环境变量值",automatic:"自动",synced:"同步",customModelCredentials:"自定义模型凭据",releaseOnlySecret:"必填,仅用于本次发布",thisRelease:"本次发布",customVariables:"自定义变量",value:"值",deleteVariable:"删除变量",deploymentProgress:"部署进度",retryUpdate:"重试更新",retryDeploy:"重试部署",updateSucceeded:"更新成功",deploySucceeded:"部署成功",region:"区域",agentName:"Agent 名称",apiEndpoint:"API 端点",connecting:"连接中…",chatNow:"立即对话",console:"控制台",actionInProgress:"{{action}}中…",checkingName:"正在检查名称…",retryAction:"重试{{action}}",flowPreview:"执行流程预览",executionFlow:"执行流程",flowPreviewHint:"只读预览,可缩放与拖动画布",closeFlowPreview:"关闭执行流程预览",agentAdded:'Agent "{{name}}" 已添加到左上角下拉列表!',files:{preview:"文件预览",new:"新建文件",empty:"暂无文件",noneSelected:"未选择文件",selectToView:"选择左侧文件以查看内容",loadingEditor:"加载编辑器…",rename:"重命名",renamePrompt:"重命名文件"},apiKey:{selectFirst:"请先选择 API Key",revealing:"正在显示 API Key",hide:"隐藏 API Key",retryReveal:"重试显示 API Key",reveal:"显示 API Key"},task:{preparing:"准备部署",waitingBuildLog:"正在等待构建日志…",waitingGithubLog:"正在等待 GitHub 挂载日志…",syncingGithub:"正在同步当前源码到 GitHub",syncGithubCode:"同步 GitHub 代码",githubSynced:"GitHub 代码已同步",githubSubmitted:"GitHub 代码已提交",githubUpdatingRuntime:"代码已提交到 GitHub,GitHub Actions 正在更新同一个 Runtime",initializingGithub:"开始初始化 GitHub main 分支与 Actions workflow",initializingGithubBranch:"正在初始化 GitHub 持续交付目标分支",mountGithubDelivery:"挂载 GitHub 持续交付",githubBranchInitialized:"GitHub 持续交付已初始化目标分支",githubDeliveryMounted:"GitHub 持续交付已挂载",githubMountFailed:"挂载 GitHub 持续交付失败",githubMountFailedDetail:"GitHub 持续交付挂载失败:{{message}}",githubMountFailedHint:"挂载 GitHub 持续交付失败,详见 GitHub 日志。",applyingMpaProfile:"正在将 Agent 配置应用到 MPA Runtime",mpaProfileApplied:"MPA Runtime 配置已应用",runningMpaSmoke:"正在验证 MPA Runtime 执行链路",mpaReady:"MPA Runtime 已可运行",deploymentComplete:"部署完成",deployedNotConnected:"部署完成,暂未连接",cancelled:"已取消",cancelledHint:"部署已取消,相关 Runtime 资源已请求销毁。",deploymentStatusUnconfirmed:"部署状态待确认",deploymentFailed:"部署失败",buildFailedHint:"构建镜像失败,详见构建日志。"},confirm:{updateTitle:"确认更新",deployTitle:"确认部署",closeLabel:"关闭部署确认",updateDescription:"将更新并发布到当前云端 Runtime,过程可能需要几分钟。确定继续吗?",deployDescription:"将创建新的云端 Runtime,部署过程可能需要几分钟。确定继续吗?",update:"确定更新",deploy:"确定部署"},userPool:{label:"用户池",unnamed:"未命名用户池",current:"当前用户池",ariaLabel:"部署用户池",loading:"正在加载用户池…",placeholder:"请选择用户池",loadingIdentity:"正在加载 Identity 用户池…",empty:"当前账号下暂无 Identity 用户池。",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime。",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime。",markedHint:"当前 Studio 使用的用户池已在列表中标注。"},authentication:{apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPool:"用户池",userPoolDescription:"使用 Identity 用户池签发的 JWT"},steps:{buildImage:"构建镜像",deploy:"部署",publish:"发布",syncCode:"同步代码",uploadPackage:"上传代码包",packageImage:"镜像打包",createRuntime:"创建 Runtime",publishService:"发布服务",updateInstances:"更新实例配置",createEvaluationSets:"创建评测集",applyMpaProfile:"应用 MPA 配置",verifyMpaRuntime:"验证 MPA Runtime",mpaReady:"MPA Runtime 可运行"},errors:{instanceRangeInteger:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数。",instanceRangeOrder:"最小实例数不能大于最大实例数。",selectApiKey:"请先在模型配置中选择 API Key。",loadApiKey:"加载 API Key 失败,请重试。",invalidProject:"项目数据无效",updateFeishu:"更新飞书配置失败:{{message}}",userPoolRequired:"请选择用于 Runtime 鉴权的用户池。",vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",modelSecretRequired:"请填写 {{label}},用于访问对应的自定义模型地址。",managedApiKeyRequired:"{{requirement}},请先返回模型配置选择 API Key。",feishuEnvRequired:"启用飞书后,请填写{{field}}。",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",deployedButGithubMountFailed:"部署成功,但挂载 GitHub 持续交付失败:{{message}}",deployedButGithubBindFailed:"部署成功,但绑定 GitHub 失败:{{message}}",mpaRuntimeIdMissing:"部署成功,但返回缺少 Runtime ID,无法应用 MPA 配置。",mpaOperationIncomplete:"MPA Runtime 初始化未完成,请重试此部署任务。",deploymentStatusUnconfirmed:"连接已中断,当前无法确认部署最终状态。任务可能仍在云端运行,请到 AgentKit 或 Code Pipeline 查看同一任务,避免重复部署。",failedAtStage:"{{action}}失败({{stage}}阶段):{{message}}",noAgentAtEndpoint:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",addAgent:"添加 Agent 失败:{{message}}",modelApiKeyRequired:"请填写此模型地址对应的 API Key。"}},u1e={title:"工作区",storageUnavailable:"管理员未配置持久化存储,工作区管理暂不可用。",detail:"工作区详情",create:"新建工作区",editorDescription:"将常用环境组合在一起;同一个环境可以加入多个工作区。",backToList:"返回工作区列表",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",createdAt:"创建时间",updatedAt:"最近更新",basicInfo:"基本信息",namePlaceholder:"例如:内容生产",descriptionPlaceholder:"说明这个工作区的用途",selectedEnvironmentCount:"已选择 {{count}} 个,可在其他工作区中继续复用",searchAvailableEnvironments:"搜索可用环境",searchEnvironments:"搜索环境",noAvailableEnvironments:"还没有可添加的环境",createEnvironmentFirst:"请先在“环境”页面创建并构建环境。",noMatchingEnvironments:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称。",environmentStatus:{available:"可用",building:"构建中",notBuilt:"未构建"},added:"已添加",saved:"已保存工作区“{{name}}”",resourceType:"工作区资源类型",searchWorkspaces:"搜索工作区",loadFailed:"无法加载工作区",noMatchingWorkspaces:"没有匹配的工作区",tryAnotherNameOrEnvironment:"请尝试搜索其他名称或环境",noEnvironmentAdded:"未添加环境",environmentMissing:"环境缺失",availableFraction:"{{available}}/{{total}} 可用",available:"可用",availableCount:"{{count}} 个可用",updated:"更新",addEnvironment:"添加环境",deleteTitle:"删除工作区",deleteDescription:"确定删除工作区“{{name}}”吗?环境本身不会被删除。",deleted:"已删除工作区“{{name}}”",clipboardPermissionError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",codeProjects:"代码项目"},d1e={back:"返回",detailNavigation:"详情导航",noData:"暂无数据",actions:"操作",moreActions:"更多操作 {{label}}",actionsFor:"{{label}} 操作",loading:"资源加载中,请稍候"},f1e={addSkill:"添加 Skill",remove:"移除 {{name}}",confirmRemoveRuntime:"从新版本中移除运行中的 Skill「{{name}}」?",selectedCount:"已加入技能 · {{count}}",close:"关闭{{label}}",sources:{runtime:"运行中来源 · 原样保留,可移除或用同名 Skill 替换",local:"本地",skillspace:"AgentKit Skills 中心",skillhub:"火山 Find Skill 技能广场"},tabs:{local:"本地文件",localShort:"本地文件",skillspace:"AgentKit Skills 中心",skillspaceShort:"AgentKit",skillhub:"火山 Find Skill 技能广场",skillhubShort:"Find Skill"}},h1e={model:"模型",turnControls:"流程控制",pause:"暂停",resume:"恢复",interrupt:"中断",cancel:"取消",pauseTurn:"在安全点暂停完整流程",resumeTurn:"恢复完整流程",interruptTurn:"中断当前流程并保留会话上下文",cancelTurn:"取消当前流程且不可恢复",turnState:{running:"运行中",pausing:"正在到达安全点",paused:"已暂停",resuming:"正在恢复",interrupting:"正在中断",cancelling:"正在取消",interrupted:"已中断",completed:"已完成",failed:"失败",cancelled:"已取消",orphaned:"状态待确认",newTurnRequired:"需要从检查点继续"},tasks:{ppt:"PPT",image:"图片生成",video:"视频生成"},prompts:{ppt:{quarterlyReview:"复盘【季度】经营表现,提炼指标差距、原因与行动建议",projectUpdate:"汇报【项目名称】进展:里程碑、风险、预算和资源诉求",solutionProposal:"为【客户行业】输出解决方案:痛点、架构、实施路径与收益",industryAnalysis:"分析【行业主题】趋势,给出竞争格局、机会与战略建议"},image:{launchVisual:"为【品牌或产品】设计【高级科技】风格的发布会主视觉",ecommercePoster:"生成【产品名称】电商海报,突出【核心卖点】与品牌色",conceptRendering:"呈现【产品或空间】在【使用场景】中的写实概念效果图",socialGraphic:"围绕【传播主题】制作简洁专业的企业社媒配图"},video:{brandFilm:"制作【品牌名称】30 秒宣传片,突出【品牌价值】",productLaunch:"为【产品名称】制作 45 秒发布视频:痛点、功能、场景与行动号召",trainingVideo:"制作【培训主题】企业培训视频,讲清【关键操作或规范】",eventTeaser:"生成【活动名称】20 秒预热视频,包含亮点、时间地点和报名信息"}},firstFrame:"首帧",videoToEdit:"待编辑视频",baseVideo:"基础视频",optimizeSkillPlaceholder:"描述你想优化的技能…",createSkillPlaceholder:"描述你想生成的技能…",createVideoPlaceholder:"描述你想创作的视频…",messageAgentPlaceholder:"向 {{name}} 发消息…",selectAgentFirst:"请先选择智能体",selectSkillFirst:"请先选择需要优化的 Skill",availableSkills:"可用技能",availableSubagents:"可用子 Agent",invokeSkill:"调用技能",useSubagent:"使用子 Agent",loadingCapabilities:"正在读取 Agent 能力…",noMatchingSkills:"当前 Agent 没有匹配技能",noMatchingSubagents:"当前 Agent 没有匹配子 Agent",skillFallbackDescription:"加载并执行该技能",agentFallbackDescription:"将本轮交给该 Agent",skill:"技能",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",taskMode:"任务模式",selectTaskMode:"选择任务模式",loadingGenerationModel:"正在加载生成模型",modelUnavailable:"模型不可用",cancelTask:"取消{{task}}任务",stopGenerating:"停止生成",viewVideoProgress:"查看视频生成进度",send:"发送",selectTaskType:"选择任务类型",enterprisePrompts:"{{task}}企业提示词",sessionId:"会话 ID",sessionIdLabel:"会话 ID:",initializing:"初始化中",copied:"已复制",copySessionId:"复制会话 ID",sessionIdCopied:"已复制会话 ID",disclaimer:"回答仅供参考",viewLogs:"查看日志"},p1e={selectAgent:"选择 Agent",noLocalAgents:"暂无本地 Agent。",searchRuntime:"搜索 Runtime 名称",mineOnly:"只看我创建的",noRuntimes:"暂无 Runtime。",unsupported:"不支持",createdByMe:"我创建的",connecting:"连接中…",connected:"已连接",connect:"连接",viewInfoFor:"查看 {{name}} 信息",viewInfo:"查看信息",agentAndRuntimeInfo:"Agent 与 Runtime 信息",detailType:"详情类型",agentInfo:"Agent 信息",runtimeInfo:"Runtime 信息",loadingAgentInfo:"读取 Agent 信息…",cannotLoadAgentInfo:"暂时无法读取 Agent 信息",unnamedAgent:"未命名 Agent",subagents:"子 Agent",tools:"工具",skills:"技能",previewUnsupported:"暂不支持预览",mountedComponents:"挂载组件",noMoreAgentInfo:"暂无更多 Agent 配置信息。",local:"本地",model:"模型",status:"状态",memoryMb:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",resources:"资源",version:"版本",loadingDetails:"读取详情…",environmentVariables:"环境变量",errors:{notFound:"该 Runtime 已不存在或列表信息已过期,请刷新列表后重试。",accessDenied:"当前账号无权访问该 Runtime,请检查所属 Project 和访问权限。",previewUnsupported:"该 Agent Server 版本暂不支持信息预览。",unavailable:"该 Runtime 暂时无法访问,请确认其状态为“就绪”后重试。",timeout:"加载超时,请重试"},componentKinds:{knowledgebase:"知识库",memory:"记忆",prompt_manager:"提示词管理",example_store:"样例库",run_processor:"运行处理器",tracer:"链路追踪",toolset:"工具集",plugin:"插件",other:"其他"},runtimeStatus:{ready:"就绪",unreleased:"未发布",running:"运行中",active:"运行中",creating:"创建中",pending:"等待中",deploying:"部署中",updating:"更新中",failed:"失败",error:"异常",stopping:"停止中",stopped:"已停止",deleting:"删除中",deleted:"已删除"}},m1e={agent:"智能体",agentTypes:{general:"通用智能体",mpa:"MPA 智能体",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"创建人",namedAgent:"{{name}} 智能体",storageLocation:"存储位置",currentBrowser:"当前浏览器",region:"地域",viewDeploymentProgress:"查看 {{name}} 部署进度",viewRuntimeDetails:"查看 {{name}} Runtime 详情",viewDetails:"查看 {{name}} 详情",time:"时间",remainingTime:"剩余时间",expiringSoon:"即将清空",sandboxRemaining:"{{hours}} 小时 {{minutes}} 分钟",wakeable:"已休眠",neverExpires:"永不过期",editDraftNamed:"编辑草稿 {{name}}",viewProgress:"查看进度",deleteDraftNamed:"删除草稿 {{name}}",recheckCompatibility:"重新检测 {{name}} 的对话兼容性",connectedNamed:"{{name}} 已连接",wakeAndChat:"唤醒 {{name}} 并开始对话",chatWith:"与 {{name}} 对话",waking:"唤醒中",deploying:"部署中",draft:"草稿",checking:"检测中",chatUnsupported:"不支持对话",checkFailed:"检测失败",creatorFilter:"创建人筛选",agentType:"智能体类型",searchAgents:"搜索智能体",handoff:"接力",agentList:"{{type}}列表",noMatchingAgents:"没有匹配的智能体",adjustSearch:"请尝试调整搜索或筛选条件",noAgentType:"暂无 {{type}}",noGeneralAgents:"暂无通用智能体",createGeneralAgentDescription:"创建一个通用智能体,开始构建和对话",createAgentType:"创建{{type}}",createAgent:"创建智能体",loadingMore:"正在加载更多智能体",scrollForMore:"继续下滑加载更多",allLoaded:"已加载全部智能体",deleteDraftTitle:"删除草稿?",deleteDraftDescription:"删除后将无法恢复“{{name}}”。",deleteDraft:"删除草稿",loadGeneralAgents:"加载通用智能体",loadAgentType:"加载 {{type}}",compatibility:{checking:"正在请求 Runtime /list-apps,以确认该智能体是否支持 Studio 对话。",empty:"Runtime /list-apps 未返回可用的 Agent,暂时无法连接对话。",supported:"Runtime 支持 Studio 对话。",unknownError:"Runtime /list-apps 请求失败,未返回可识别的错误信息。"},sandboxStatus:{ready:"就绪",wakeable:"已休眠",creating:"创建中",starting:"启动中",initializing:"启动中",pending:"等待中",running:"运行中",failed:"异常",error:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},wakingHint:"正在唤醒智能体,可能需要一些时间。",mpaCreate:{name:"名称",namePlaceholder:"例如 test-agent",nameHelp:"作为 Runtime 名称,支持 4–64 位字母、数字、下划线或连字符。",stepsLabel:"创建步骤",steps:{basics:"基本信息",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"数据库"},next:"下一步",previousStep:"上一步",pgDescription:"选择已有的 PostgreSQL 实例。创建流程会在该实例中准备智能体的独立业务库。",pgSplitDescription:"使用已配置的业务 PG Workspace。多个智能体共用此 Workspace,每个智能体拥有独立业务库。共享资源记录单独存放在 mpa_admin_workspace / mpa_admin_db,由管理员配置。",pgConsole:"前往火山引擎 AIDAP 创建或查看 PG Workspace",pgHost:"PG 主机地址",pgPort:"PG 端口",pgInvalid:"请填写有效的 PG 主机地址和端口。",pgCredentials:"PG 连接账号和密码由部署服务配置;主机和端口须与服务端配置一致。",openvikingDescription:"可选。三项全部填写才启用 OpenViking;全部留空则不向新智能体注入 OpenViking 配置。",openvikingConsole:"前往火山引擎查看 OpenViking 资源",openvikingUrl:"OpenViking 服务地址",openvikingResourceId:"OpenViking 资源 ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"请同时填写有效的 HTTPS 服务地址、资源 ID 和 API Key,或全部留空。",openvikingCredentials:"API Key 仅用于本次创建,不保存到浏览器草稿;刷新页面后需重新填写。",tosTitle:"会话输出存储",tosDescription:"可选。填写完整的 TOS 凭证和存储桶,为新智能体的每个会话挂载独立输出目录。三项均留空时使用服务端预设;服务端未配置时,不启用 TOS 挂载。",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS 存储桶",tosInvalid:"TOS Access Key、Secret Key 和存储桶必须同时填写。",tosCredentials:"凭证仅用于本次创建,不会保存在浏览器恢复数据或创建任务记录中。",runtimeImage:"MPA 镜像",workerImage:"Worker 镜像",imageDefault:"留空使用配置文件中的默认镜像",imageInvalid:"请输入有效的镜像地址,不要包含网址、空格或登录凭据。",title:"创建 MPA 智能体",agentId:"智能体 ID",description:"描述",region:"部署地域",plan:"创建计划",sharedResources:"准备或复用账号共享 VPC、子网和 APIG 消息网关",agentResources:"准备独立业务库、技能空间和执行环境,部署智能体",readiness:"检查网关和智能体就绪状态,成功后加入列表",checking:"正在检查创建配置…",configured:"创建配置已就绪。提交后会检查云资源并开始准备。",notConfigured:"尚未配置创建所需的资源参数,请联系管理员配置后重试。",loadFailed:"检查创建配置失败,请重试。",reload:"重新检查",submit:"开始创建",retry:"重试创建",newAgent:"新建另一个智能体",newAgentDescription:"新建另一个智能体将开启可编辑的新请求,替换当前恢复草稿,但不会取消旧任务。旧任务仍在运行时,请等待其结束后再提交。",close:"关闭",cancel:"取消创建",confirmCancel:"确认取消",cancelDescription:"取消后会停止后续步骤。已创建的数据库、技能空间、网关和其他已登记资源会保留,可使用同一智能体 ID 重试。",background:"关闭窗口后创建会继续。再次打开可查看进度。",pollFailed:"暂时无法获取进度,正在重新连接。请勿重复创建其他智能体。",iamPermissionDenied:"部署服务没有准备运行角色所需的 IAM 权限,请联系管理员授权后重试。",iamTrustConflict:"运行角色的信任关系不符合要求,请管理员检查对 VeFaaS 和 APIG 的授权后重试。",iamPolicyConflict:"运行角色所需的同名权限策略内容冲突,请管理员检查后重试。",iamOwnershipConflict:"运行角色与当前部署账号不匹配,请管理员检查后重试。",iamVerificationFailed:"尚未确认运行角色的权限已就绪,请检查 IAM 服务及策略可用性后重试。",iamConfigurationConflict:"自动准备运行角色仅支持默认 MPA 角色,请检查服务端创建配置。",creationFailed:"当前步骤未完成,请检查对应资源、服务端配置及权限后,用同一智能体 ID 重试。",cancelFailed:"取消请求失败,请重新查询进度后重试。",cancelled:"创建已取消,已登记资源保留供重试。",timeout:"创建超时,已登记资源保留。请检查对应资源后重试。",interrupted:"创建任务中断。请用同一智能体 ID 重试以恢复已登记资源。",skillSpace:"技能空间",states:{running:"正在创建",cancelling:"正在取消",succeeded:"创建成功",failed:"创建失败",cancelled:"已取消"},stages:{queued:"等待开始",iam_role:"准备运行角色",checking:"检查账号与配置",network:"准备 VPC 和子网",gateway:"准备 APIG 和 IM Gateway",database:"准备业务数据库",skills:"准备技能空间",worker:"准备执行环境",deploying:"准备数据库、技能空间和 Runtime",verifying:"等待智能体就绪",admin_workspace:"准备管理 PG Workspace",business_workspace:"准备业务 PG Workspace",admin_database:"初始化共享管理库"},back:"继续创建",pgAutoDescription:"使用 VeADK 部署账号自动创建或复用两个 PG Workspace:mpa_admin_workspace / mpa_admin_db 存放共享资源记录,业务 Workspace 供多个智能体共用,每个智能体拥有独立业务库。无需填写 PG 连接信息,提交创建后开始准备。",pgModeChanged:"此创建任务使用旧的 PG 配置,不能直接切换为自动模式重试。请联系管理员确认已有资源和任务后重新创建。",pgMigrationRequired:"检测到旧共享注册库。请先将共享资源记录迁移到 mpa_admin_workspace / mpa_admin_db,并完成现有 Runtime 的注册库地址切换;完成后点击“重新检查”。"}},g1e={library:"技能库",skill:"技能",skills:"技能",skillSpace:"技能空间",sandboxNotConfigured:"管理员未配置 Dev Sandbox",adminNotConfigured:"管理员未配置",totalItems:"共 {{count}} 项",cannotLoadSpaces:"无法加载技能空间",someSpacesFailed:"部分技能空间加载失败",degradedRelationWarning:"部分关联异常,已恢复可读取技能",downloadZip:"下载 ZIP",optimize:"优化",closeSkillDetails:"关闭技能详情",skillId:"技能 ID",allFiles:"完整文件",loadingSkillContent:"正在读取技能内容…",noSkillContent:"该技能暂无 SKILL.md 内容",addSkill:"添加技能",localUpload:"本地上传",localUploadDescription:"选择 ZIP 文件,校验通过后上传到技能空间",autoCreate:"自动创建",autoCreateDescription:"选择模型和风格,通过对话生成技能",createSkill:"创建技能",optimizeNamed:"优化 {{name}}",deleteSkillConfirm:"确定删除整个 Skill“{{name}}”吗?此操作会影响所有引用它的空间。",deleteSpaceConfirm:"确定删除 Skill 空间“{{name}}”吗?请先确认空间中的技能已删除。",manageSpaceDescription:"管理空间中的技能并创建新的版本",backToSpaces:"返回技能空间列表",overview:"概览",skillCount:"技能数量",skillCountValue_one:"{{count}} 技能",skillCountValue_other:"{{count}} 技能",updatedAt:"更新时间",skillsInSpace:"{{name}}中的技能",searchSkills:"搜索技能",cannotLoadSkills:"无法加载技能",noMatchingSkills:"没有匹配的技能",noSkills:"暂无技能",tryAnotherName:"请尝试搜索其他名称",emptySkillsDescription:"本地上传 Skill,或自动创建",actions:"操作",spaceDetails:"技能空间详情",editSpace:"编辑空间",deleteSpace:"删除空间",searchSpaces:"搜索技能空间",spaceList:"技能空间列表",noMatchingSpaces:"没有匹配的技能空间",createSpace:"新建技能空间",newSpace:"新建空间",loadingMoreSpaces:"正在加载更多技能空间",scrollForMore:"继续下滑加载更多",allSpacesLoaded:"已加载全部技能空间",errors:{loadSpaces:"读取技能空间失败,请稍后重试",loadSkills:"读取技能失败,请稍后重试",loadSkillDetails:"读取技能详情失败,请稍后重试",deleteSkill:"删除 Skill 失败",deleteSpace:"删除 Skill 空间失败",downloadSkill:"下载 Skill 失败"},status:{active:"可用",available:"可用",creating:"创建中",disabled:"已停用",enabled:"已启用",failed:"异常",inactive:"未启用",pending:"等待中",published:"已发布",ready:"就绪",released:"已发布",running:"运行中",success:"正常",unavailable:"不可用",unreleased:"未发布",updating:"更新中",unknown:"未知"},sharedSpace:"企业共享空间",sharedDescription:"面向企业全员开放的技能,由管理员统一发布和维护",sharedVisibility:"全员可见",sharedPreparing:"正在准备共享空间",sharedLoadFailed:"共享空间加载失败",sharedEmpty:"暂无共享技能,管理员发布后会显示在这里",requestPublication:"申请公开",reviewSubmitting:"提交中…",reviewSubmitted:"已申请",reviewFailed:"申请公开失败",reviewStatusFailed:"审核状态加载失败",reviewRetry:"重新申请",reviewPending:"待审核",reviewApproving:"发布中",reviewApproved:"已公开",reviewReturned:"已退回",reviewHistory:"审核记录",skillDetailSections:"技能详情内容",versions:{title:"版本管理",refresh:"刷新",uploading:"上传中…",upload:"上传新版本",close:"关闭",hint:"新版本不会替换已公开版本,审核通过后才会公开;ZIP 中的技能名称需与原技能一致",loading:"正在加载版本…",loadFailed:"无法加载版本",filesFailed:"无法加载版本文件",uploadFailed:"上传新版本失败",submitFailed:"提交申请失败",retry:"重试",empty:"暂无版本",current:"当前版本",notSubmitted:"未申请公开",submitting:"提交中…",submit:"申请公开",processing:"版本状态:{{status}}",filesLoading:"正在加载文件…",filesEmpty:"暂无文件",history:"历史审核记录",shared:"已公开"},author:"作者",authorName:"作者:{{name}}"},b1e={library:"知识库",createBase:"新建知识库",editBase:"编辑知识库",invalidName:"名称必须以字母开头,且只能包含字母、数字和下划线。",nameHelp:"以字母开头,仅支持字母、数字和下划线,最多 48 个字符。",optionalDescription:"描述(可选)",descriptionOnly:"AgentKit 当前仅支持更新知识库描述。",previewWeb:"预览网页内容",addData:"添加数据",openOriginalWeb:"打开原网页",backToEdit:"返回修改",confirmAdd:"确认添加",source:"知识来源",image:"图片",documentFile:"文档文件",webPage:"在线网页",webUrl:"网页 URL",generatingWebPreview:"正在抓取网页并生成 Markdown 预览",selectFile:"选择知识文件",selectOrDropFile:"选择文件或拖拽到这里",selectedFile:"{{size}} · 点击可重新选择",imageFileHelp:"支持 PNG、JPG 和 JPEG,单个文件不超过 200 MB",documentFileHelp:"支持 PDF、PPTX、DOCX、XLSX 和 TXT,单个文件不超过 200 MB",uploadingFile:"正在上传文件并添加到知识库",optionalName:"名称(可选)",optionalType:"类型(可选)",generatePreview:"生成预览",uploadFile:"上传文件",editMetadata:"编辑知识 Metadata",knowledge:"知识",field:"字段",value:"值",backToList:"返回知识库列表",metadataJson:"元数据(JSON)",provider:"服务提供方",knowledgeId:"知识库 ID",project:"项目",creator:"创建者",data:"数据",deleteInvalidAssociation:"删除失效关联",noData:"这个知识库还没有数据",addFirstData:"添加第一项数据",format:"格式",size:"大小",searchData:"搜索数据",searchLibraryData:"搜索知识库数据",associationInvalid:"关联已失效",providerMissing:"底层 Provider 知识库已不存在",noMatchingData:"没有匹配的数据",loadingMoreData:"正在加载更多数据",retryLoading:"重试加载",details:"知识库详情",searchBases:"搜索知识库",someBasesFailed:"部分知识库暂时无法加载,已展示其余可用内容。",noMatchingBases:"没有匹配的知识库",noManagePermission:"您没有管理此知识库的权限",loadingMoreBases:"正在加载更多知识库",deleteBaseTitle:"删除知识库?",deleteBaseDescription:"将删除 {{name}} 的 AgentKit 关联;如果它由 Studio 创建,也会同时删除 Provider 资源。此操作无法撤销。",deleteDocumentTitle:"删除知识?",deleteDocumentDescription:"将从 Provider 知识库中删除 {{name}},此操作无法撤销。",preview:{processingTitle:"数据正在处理中",processingDetail:"知识库完成解析后即可预览,请稍后重新加载。",failedTitle:"数据解析失败",failedDetail:"请检查源文件或网页地址后重新添加,也可以重新加载最新状态。",noParsedTitle:"暂时没有可预览的解析内容",noParsedDetail:"此类文件会在知识库完成解析后显示文本、表格或页面图片。",noMediaTitle:"暂时没有可预览的媒体内容",noMediaDetail:"知识库尚未返回可访问的媒体预览,请稍后重新加载。",noDataTitle:"暂无可预览的数据内容",noDataDetail:"知识库尚未返回解析结果,请稍后重新加载。",attachmentError:"附件无法预览,请稍后重试。",imageAlt:"知识数据图片",audioUnsupported:"当前浏览器不支持音频预览。",videoUnsupported:"当前浏览器不支持视频预览。",namedPdf:"{{name}} PDF 预览",pdf:"PDF 预览",openPdf:"无法显示时,在新窗口打开 PDF",fileUnsupported:"当前格式暂不支持直接在线预览,已优先显示解析后的内容。",openOriginalFile:"打开原文件",loading:"正在加载数据预览",openOriginalHint:"您可以打开原网页查看来源内容。",chunk:"片段 {{index}}",loadingMore:"正在加载更多",loadMore:"加载更多"},errors:{fileTooLarge:"单个文件不能超过 200 MB",invalidImageType:"请选择 PNG、JPG 或 JPEG 图片",invalidDocumentType:"请选择 PDF、PPTX、DOCX、XLSX 或 TXT 文件",createBase:"创建知识库失败",updateBase:"更新知识库失败",metadataObject:"Metadata 必须是 JSON 对象",metadataFormat:"Metadata 格式错误",noWebPreview:"网页没有可预览的 Markdown 内容",addWeb:"添加网页失败",previewWeb:"生成网页预览失败",uploadFile:"上传文件失败",updateDocument:"更新知识失败",loadPreview:"加载数据预览失败",loadMoreBases:"加载更多知识库失败",loadBases:"加载知识库失败",loadMoreData:"加载更多数据失败",loadData:"加载数据失败",deleteBase:"删除知识库失败",deleteDocument:"删除知识失败"}},y1e={title:"飞书渠道",refresh:"刷新",loading:"正在加载渠道配置…",unsupported:"此 Runtime 不支持渠道管理,请升级 MPA 镜像。",unauthorized:"渠道管理需要 Studio 管理员身份及有效的 Runtime 凭据。",configurationError:"渠道管理配置不完整,请检查 Runtime 元数据及加密密钥。",requestFailed:"渠道请求失败,请检查 Runtime 连接后重试。",bound:"已绑定:{{name}}",unbound:"尚未绑定飞书机器人。",guidance:"私聊使用独立会话。在已授权群内 @ 当前机器人即可对话。",keyRequired:"绑定前请在 Runtime 配置持久的 CHANNEL_STATE_ENCRYPTION_KEY。",gateway:"消息网关",route:"入站路由",delivery:"回复投递",configured:"已配置",missing:"未配置",delivery_not_observed:"尚未观测",delivery_delivered:"已投递",delivery_retrying:"重试中",missingConfig:"缺少 Runtime 配置:{{fields}}",bind:"扫码绑定",newQr:"重新生成二维码",unbind:"解除绑定",confirmUnbind:"确认解绑此机器人?解绑后将停止接收新消息。",qrAlt:"机器人绑定二维码",openQr:"打开授权页面",uncertain:"注册过程已中断。重新开始前,请检查机器人绑定与 Gateway 状态。",bindingFailed:"绑定失败,请检查 Gateway 配置后重试。",chatId:"允许的群 ID",scope:"群会话策略",saveGroup:"保存群权限",noGroups:"尚未授权任何群。私聊无需群权限。",edit:"编辑",remove:"移除",removeGroup:"移除 {{name}}",scope_group_sender:"按发言人隔离",scope_group:"全群共享",scope_group_topic_sender:"按话题和发言人隔离",scope_group_topic:"按话题共享",status_PENDING:"等待扫码",status_SCANNED:"已扫码,等待授权",status_AUTHORIZED:"已授权,准备注册",status_REGISTERING:"正在注册机器人",status_BOUND:"机器人已绑定",status_FAILED:"绑定失败",status_EXPIRED:"二维码已过期",workspaceTitle:"消息渠道",workspaceDescription:"连接消息平台,让用户直接与此智能体对话,并管理访问权限。",provider_feishu:"飞书",provider_wecom:"企业微信",provider_dingtalk:"钉钉",comingSoon:"暂未开放",unavailableDescription:"{{name}}的绑定与消息配置暂未开放。",runtimeRequired:"请先将此智能体部署到 Runtime,再配置消息渠道。",bindingTitle:"机器人绑定",connected:"已绑定",notBound:"未绑定",gatewayDescription:"用于接收渠道消息的网关配置。",routeDescription:"将渠道消息转发给当前智能体的路由配置。",deliveryDescription:"实际观测到的回复投递状态,完成配置不代表已成功投递。",groupsTitle:"群聊权限",groupsDescription:"添加允许访问的群,并设置群内对话的共享范围。",providerBindingTitle:"绑定{{name}}",providerUnbound:"绑定{{name}}机器人,让用户通过消息与此智能体对话。",qrGuidance:"使用{{name}}扫码授权,Runtime 将保存机器人凭据并配置消息网关。",wecomGuidance:"使用企业微信扫码授权,或手动填写 Bot ID 和 Secret 绑定已有机器人。",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"绑定机器人",wecomScan:"扫码绑定",wecomAuthorizing:"等待企业微信授权…",cancelAuthorization:"取消授权",wecomPopupBlocked:"授权窗口被浏览器拦截,请允许弹窗后重试。",wecomAuthCancelled:"已取消企业微信授权,可以重新扫码。",wecomAuthTimeout:"企业微信授权已超时,请重新扫码。",wecomInvalidResult:"授权结果缺少 Bot ID 或 Secret,请重新授权或手动填写。",wecomAuthFailed:"企业微信授权失败,请重试或手动填写凭据。",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"当前镜像尚不支持{{name}}手动配置,请升级后使用;仍可使用极速配置。",pairingTitle:"消息渠道扫码配对",feishuPairingDescription:"如果已有连接机器人,飞书扫码并绑定成功后原有机器人会被替换,可选绑定存量机器人或新建机器人。",generatingQr:"正在生成配对二维码…",dingtalkGuidance:"使用钉钉扫码授权,或手动填写 Client ID 和 Client Secret 绑定已有机器人。",wecomPairingDescription:"将在企业微信授权窗口中重新扫码配对。新机器人绑定成功后会替换当前连接;取消授权或绑定失败不会解绑原机器人。",configurationMethod:"配置方式",quickSetup:"极速配置",manualSetup:"手动配置",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"填写已有{{name}}机器人的应用凭据,连接到当前智能体。",manualReplacement:"绑定成功后将替换当前机器人;取消或绑定失败不会解除现有绑定。"},WVe={common:Xwe,agentKitPromo:Ywe,systemInfo:Zwe,agentWorkspace:Jwe,environmentCenter:e1e,deploymentSelect:t1e,deploymentError:n1e,studioBuildProgress:i1e,cloudEnvironment:r1e,githubCicd:s1e,feishuDeployment:a1e,deploymentResources:o1e,studioUpdate:l1e,projectPreview:c1e,workspace:u1e,resourceCollection:d1e,skillSourcePicker:f1e,composer:h1e,agentSelector:p1e,myAgents:m1e,skillCenter:g1e,knowledge:b1e,channels:y1e},KVe=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:Ywe,agentSelector:p1e,agentWorkspace:Jwe,channels:y1e,cloudEnvironment:r1e,common:Xwe,composer:h1e,default:WVe,deploymentError:n1e,deploymentResources:o1e,deploymentSelect:t1e,environmentCenter:e1e,feishuDeployment:a1e,githubCicd:s1e,knowledge:b1e,myAgents:m1e,projectPreview:c1e,resourceCollection:d1e,skillCenter:g1e,skillSourcePicker:f1e,studioBuildProgress:i1e,studioUpdate:l1e,systemInfo:Zwe,workspace:u1e},Symbol.toStringTag,{value:"Module"})),v1e="用户管理",x1e="{{count}} 位成员",w1e="用户",O1e="角色",k1e="账号状态",S1e="最近登录",E1e="操作",C1e="更改角色",A1e="关闭",T1e="保存角色",_1e="正在保存…",j1e="取消",N1e="返回",R1e="用户池",I1e="火山引擎 Identity",P1e="搜索姓名、邮箱或用户 ID",D1e="搜索",M1e="筛选角色",L1e="全部角色",$1e="刷新",F1e="正在读取用户…",B1e="更新于 {{time}}",U1e="已将 {{name}} 设置为{{role}}",Q1e="重试",z1e="你",V1e="初始超级管理员",H1e="初始超级管理员受保护,不能在此降级",q1e="保存后,对方刷新 Studio 即可使用新的权限",W1e="角色需要重新确认",K1e="没有匹配的用户",G1e="尝试其他关键词或角色",X1e="用户登录或加入当前用户池后会显示在这里",Y1e="共 {{count}} 位用户",Z1e="上一页",J1e="下一页",eOe="尚未登录",tOe="未提供",nOe={super_admin:"超级管理员",admin:"管理员",developer:"开发者",user:"普通用户"},iOe={super_admin:"管理所有资源,并管理用户和分配角色",admin:"管理 Studio 资源",developer:"开发智能体并管理自己的资源",user:"使用智能体和个人功能"},rOe={EXTERNAL_PROVIDER:"正常",CONFIRMED:"正常",NORMAL:"正常",ENABLED:"正常",ACTIVE:"正常",UNCONFIRMED:"待验证",DISABLED:"已停用",FORBIDDEN:"已禁用",LOCKED:"已锁定",SUSPENDED:"已暂停",FORCE_CHANGE_PASSWORD:"需要修改密码"},sOe={request_failed:"请求未完成,请刷新列表确认当前状态后重试",invalid_response:"用户服务返回异常,请刷新后重试",identity_unavailable:"暂时无法访问 Identity,请稍后重试或检查服务权限",identity_resource_missing:"用户或用户池已不存在,请刷新列表",super_administrator_required:"只有超级管理员可以管理用户",sign_in_required:"请登录后重试",user_not_in_pool:"当前账号不属于此用户池",user_disabled:"当前账号已停用",protected_administrator:"不能降低初始超级管理员的权限",cannot_demote_self:"不能降低自己的超级管理员权限",role_change_conflict:"角色已发生变化,请关闭弹窗并刷新列表后重试",cross_origin_request:"请在当前 Studio 页面内修改角色"},GVe={title:v1e,memberCount:x1e,user:w1e,role:O1e,status:k1e,lastLogin:S1e,actions:E1e,changeRole:C1e,close:A1e,save:T1e,saving:_1e,cancel:j1e,back:N1e,pool:R1e,volcengineIdentity:I1e,searchPlaceholder:P1e,search:D1e,filterRole:M1e,allRoles:L1e,refresh:$1e,loading:F1e,updatedAt:B1e,saved:U1e,retry:Q1e,you:z1e,initialAdministrator:V1e,protectedExplanation:H1e,effectiveAfterRefresh:q1e,roleConflict:W1e,noUsers:K1e,tryAnotherSearch:G1e,poolEmpty:X1e,resultCount:Y1e,previous:Z1e,next:J1e,neverLoggedIn:eOe,unknown:tOe,roles:nOe,descriptions:iOe,states:rOe,errors:sOe},XVe=Object.freeze(Object.defineProperty({__proto__:null,actions:E1e,allRoles:L1e,back:N1e,cancel:j1e,changeRole:C1e,close:A1e,default:GVe,descriptions:iOe,effectiveAfterRefresh:q1e,errors:sOe,filterRole:M1e,initialAdministrator:V1e,lastLogin:S1e,loading:F1e,memberCount:x1e,neverLoggedIn:eOe,next:J1e,noUsers:K1e,pool:R1e,poolEmpty:X1e,previous:Z1e,protectedExplanation:H1e,refresh:$1e,resultCount:Y1e,retry:Q1e,role:O1e,roleConflict:W1e,roles:nOe,save:T1e,saved:U1e,saving:_1e,search:D1e,searchPlaceholder:P1e,states:rOe,status:k1e,title:v1e,tryAnotherSearch:G1e,unknown:tOe,updatedAt:B1e,user:w1e,volcengineIdentity:I1e,you:z1e},Symbol.toStringTag,{value:"Module"})),aOe="网站集成",oOe="将 AgentKit Runtime 以悬浮聊天窗口嵌入网站",lOe="返回自动化列表",cOe="添加网站",uOe="正在加载 Runtime",dOe="选择 Runtime",fOe="网站域名",hOe="例如 xxxx.com 或 localhost:5173",pOe="正在生成",mOe="生成 Token",gOe="已添加网站",bOe="{{count}} 个",yOe="{{count}} 个",vOe="正在加载网站集成",xOe="还没有网站集成",wOe="选择 Runtime 并输入网站域名即可生成 Token",OOe="引入方法",kOe="将下面代码放到网页的 body 结束标签前",SOe="已复制",EOe="复制代码",COe="添加网站后会在这里生成引入代码。",AOe="确定删除 {{domain}} 的网站集成吗?",TOe={load:"加载网站集成失败",create:"创建网站集成失败",delete:"删除网站集成失败",noConversationalAgent:"该 Runtime 暂未发现可对话的 Agent"},_Oe={requestFailed:"请求失败 ({{status}})",greeting:"您好,有什么可以帮您?",sessionFailed:"无法建立对话会话",unauthorized:"当前网站未获得对话授权",conversationFailed:"对话请求失败,请稍后重试",open:"打开智能体对话",close:"关闭智能体对话",panelLabel:"智能体对话面板",assistant:"智能体助手",online:"在线对话"},YVe={title:aOe,description:oOe,backToAutomations:lOe,addWebsite:cOe,loadingRuntime:uOe,selectRuntime:dOe,websiteDomain:fOe,domainPlaceholder:hOe,generating:pOe,generateToken:mOe,addedWebsites:gOe,websiteCount_one:bOe,websiteCount_other:yOe,loadingIntegrations:vOe,delete:"删除",emptyTitle:xOe,emptyDescription:wOe,embedMethod:OOe,embedInstructions:kOe,copied:SOe,copyCode:EOe,embedHint:COe,confirmDelete:AOe,errors:TOe,widget:_Oe},ZVe=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:cOe,addedWebsites:gOe,backToAutomations:lOe,confirmDelete:AOe,copied:SOe,copyCode:EOe,default:YVe,description:oOe,domainPlaceholder:hOe,embedHint:COe,embedInstructions:kOe,embedMethod:OOe,emptyDescription:wOe,emptyTitle:xOe,errors:TOe,generateToken:mOe,generating:pOe,loadingIntegrations:vOe,loadingRuntime:uOe,selectRuntime:dOe,title:aOe,websiteCount_one:bOe,websiteCount_other:yOe,websiteDomain:fOe,widget:_Oe},Symbol.toStringTag,{value:"Module"})),jOe={types:{all:"全部类型",document:"文档",image:"图片",video:"视频"},previewArtifact:"预览 {{name}}",moreActions:"更多操作 {{name}}",actionMenu:"{{name}} 操作",download:"下载",downloading:"下载中",edit:"编辑信息",delete:"删除产物",previewFailed:"无法预览“{{name}}”:{{message}}",downloadStarted:"已开始下载 {{name}}",downloadFailed:"无法下载“{{name}}”:{{message}}",updated:"已更新 {{name}}",deleted:"已删除 {{name}}",deleteFailed:"无法删除“{{name}}”:{{message}}",typeFilter:"产物类型",searchAria:"搜索产物",searchPlaceholder:"搜索产物或会话",retry:"重试",close:"关闭",listAria:"产物列表",loadFailed:"产物加载失败",loadDetailFallback:"请检查存储配置后重试。",reload:"重新加载",noMatch:"没有找到匹配的产物",noArtifacts:"您还没有任何产物",searchHint:"请尝试搜索其他名称或切换类型",emptyHint:"聊天中生成的产物会自动显示在这里",columns:{name:"名称",source:"来源",updatedAt:"修改时间",actions:"操作"},loadingMore:"正在加载更多产物",unknownTime:"时间未知",preview:{close:"关闭预览",meta:"{{type}} / 版本 {{version}}",loading:"正在加载预览",alt:"{{name}} 预览",loadFailed:"预览加载失败,请稍后重试或下载查看",unsupported:"当前格式暂不支持在线预览,请下载查看",sourceAria:"产物来源",agent:"智能体",session:"会话",tool:"生成工具",createdAt:"生成时间",fileSize:"文件大小",tags:"标签",viewSession:"查看会话"},deleteDialog:{title:"删除产物?",description:"“{{name}}”将从产物库永久删除,聊天记录不会受到影响。",deleting:"删除中",confirm:"删除",close:"关闭删除确认框"},api:{withStatus:"{{message}}({{status}})",listFailed:"读取产物库失败",syncFailed:"同步聊天产物失败",updateFailed:"更新产物失败",deleteFailed:"删除产物失败",downloadFailed:"下载产物失败"}},NOe={unknownSource:"未知来源",unknownCreator:"未知创建者"},ROe={nameRequired:"请输入产物名称",tooManyTags:"标签最多 {{max}} 个",tagTooLong:"单个标签不能超过 {{max}} 个字符",title:"编辑产物信息",subtitle:"内容文件不会被修改",close:"关闭编辑框",name:"名称",description:"描述",descriptionPlaceholder:"补充用途、版本或使用说明",tags:"标签",tagsPlaceholder:"使用逗号分隔,最多 {{max}} 个",cancel:"取消",saving:"保存中",save:"保存"},IOe={change:{added:"新增",modified:"修改",deleted:"删除"},noChanges:"两个版本的源码没有差异",chooseFile:"从左侧选择文件以查看代码",compareTitle:"版本对比",workspaceTitle:"源码工作区",projectFallback:"Agent 项目",switchTheme:"切换源码主题",switchThemeTitle:"切换为{{theme}}主题",themes:{dark:"深色",light:"浅色"},closeWorkspace:"关闭源码工作区",close:"关闭",changedFiles:"变更文件",projectFiles:"项目文件",changes:"变更",files:"文件",openFiles:"打开的文件",noFileSelected:"未选择文件",comparisonDirection:"对比方向",before:"优化前",after:"优化后",loadingEditor:"正在加载编辑器…",changedFileCount_one:"{{count}} 个文件有变更",changedFileCount_other:"{{count}} 个文件有变更",fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件",lineCount_one:"{{count}} 行 · UTF-8",lineCount_other:"{{count}} 行 · UTF-8",viewSource:"查看源码",viewSourceAria:"查看和编辑项目源码"},POe={nav:"搜索",selectAgent:"请选择 Agent",checkingCapabilities:"正在检测 Agent 能力",notMounted:"当前 Agent 未挂载{{label}}",sources:{session:"会话",web:"网络",knowledge:"知识库",memory:"长期记忆"},webDescription:"通过 web_search 工具检索",backendLocal:"本地",failed:"搜索失败:{{message}}",placeholder:{selectAgent:"请先选择 Agent",web:"在网络中检索",knowledge:"在 {{name}} 中检索",knowledgeFallback:"当前 Agent 的知识库",memory:"在 {{name}} 中检索",memoryFallback:"当前用户的长期记忆",session:"在当前 Agent 的会话中检索"},sourceTypeAria:"搜索类型:{{label}}",notSelected:"未选择",sourceType:"搜索类型",selectSource:"选择搜索类型",noAgentHint:"选择一个 Agent 后,即可检索会话、网络及其挂载的数据源。",loadingCapabilities:"正在读取当前 Agent 的检索能力…",sourceUnavailable:"当前 Agent 未挂载该数据源",instructions:{web:"输入关键词后回车或点击按钮,通过 web_search 工具检索。",knowledge:"输入问题,检索当前 Agent 挂载的知识库。",memory:"输入线索,检索当前用户跨会话保存的长期记忆。",session:"输入关键词后回车或点击按钮,搜索当前 Agent 的会话。"},noResults:"未找到匹配“{{query}}”的结果。",knowledgeFragment:"知识片段 {{index}}",memoryFragment:"记忆片段 {{index}}"},DOe={title:"开发者资源",sections:{documentation:{title:"相关链接",description:"查看开发文档与 AgentKit 常用入口"},bestPractices:{title:"最佳实践",description:"参考开发、调试与部署经验"},showcases:{title:"案例展示",description:"探索 AgentKit 应用案例"}},links:{veadkDocs:"VeADK 文档",cliDocs:"AgentKit CLI 文档",platformDocs:"AgentKit 平台文档",console:"AgentKit 控制台"},articles:{veadkDevelopment:{title:"使用 VeADK 开发并部署智能体",description:"使用 VeADK 构建 Agent,并部署至 AgentKit 智能体运行时。"},cliDevelopment:{title:"使用 AgentKit CLI 开发并部署智能体",description:"通过 AgentKit CLI 创建项目、调试 Agent,并完成部署。"},coverAlt:"{{title}}文章封面"},showcases:{researchAssistant:{title:"多智能体研究助手",description:"由多个专业 Agent 协同完成资料检索、分析和结论整理。"},multimodalAnalysis:{title:"多模态内容分析",description:"在统一会话中理解图片、文档和视频内容。"},customerService:{title:"智能客服工作台",description:"结合知识检索与工具调用处理复杂的客户服务任务。"},webSearch:{title:"联网搜索 Agent",description:"检索实时网页内容,并将信息整理为可追溯的回答。"},a2uiApp:{title:"A2UI 交互应用",description:"让 Agent 根据任务过程生成可交互的前端界面。"},previewAlt:"{{title}}界面预览"}},MOe={title:"资源库",untitledSession:"未命名会话",categoryAria:"资源库分类",regionAria:"区域",tabs:{skills:"技能库",knowledge:"知识库",artifacts:"产物"}},LOe={title:"管理 Agent",subtitle:"列出你有权管理的 AgentKit Runtime",mainAgentOnly:"仅显示主 Agent(控制面信息)。",deleteConfirm:'确定删除 Agent "{{name}}"?该 Runtime 将被永久删除。',regionFilterTitle:"按区域筛选",regionFilterAria:"区域筛选",regionAria:"区域",refresh:"刷新",loading:"加载中…",empty:"暂无你部署的 Agent。",connected:"已连接",connect:"连接到此 Agent",deleteRuntime:"删除该 Runtime",loadingDetail:"读取详情…",agentStructure:"Agent 结构",secretHidden:"敏感值不展示,可通过授权请求直接复制",revealSecret:"{{key}} 的敏感值",copySecret:"复制 {{key}} 的值",copy:"复制",copied:"已复制",copyFailed:"复制失败",notConfigured:"未配置",fields:{model:"模型",description:"描述",status:"状态信息",project:"项目",version:"版本",resources:"资源",memory:"记忆",tool:"工具",knowledge:"知识",mcpToolset:"MCP 工具集",updatedAt:"更新时间"},resource:{memory:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",concurrency:"并发 {{value}}"},environmentVariables:"环境变量",unnamed:"(未命名)"},$Oe={mainAgent:"主 Agent",subAgent:"子 Agent {{index}}",itemCount_one:"{{count}} 项",itemCount_other:"{{count}} 项",info:"Agent 信息",infoAndTopology:"Agent 信息与设置",loadingInfo:"正在读取 Agent 信息…",unnamedAgent:"未命名 Agent",agentsMd:"AGENTS.md",tools:"工具",toolList:"工具列表",studioTool:"Studio Tool",removeTool:"移除工具 {{name}}",remove:"移除",notConfigured:"未配置",addStudioTool:"添加 Studio 工具",addStudioToolHere:"在此对话中添加 Studio 工具",skills:"技能",skillList:"技能列表",addSkill:"添加技能空间技能",addSkillHere:"向此会话添加技能空间技能",skillMountNextTurn:"挂载的版本将在下一 Turn 开始时冻结。",previewUnsupported:"暂不支持预览",sessionEnvironment:"会话环境",environment:"环境",agentCanvas:"Agent 画布",topology:"结构拓扑",nodeKinds:{agent:"Agent",sandbox:"沙箱","worker-session":"Worker 会话","skill-space":"技能空间",skill:"技能","studio-tool":"Studio 工具",mcp:"MCP",environment:"环境",knowledge:"知识库","sub-agent":"子 Agent"},nodeStatuses:{configured:"已配置",mounted:"已挂载",running:"运行中",paused:"已暂停"},viewCanvasFullscreen:"全屏查看 Agent 画布",viewFullscreen:"全屏查看",executionCanvas:"Agent 执行画布",fullscreenExecutionCanvas:"全屏 Agent 执行画布",closeFullscreenCanvas:"关闭全屏画布",close:"关闭",capabilitiesSubtitle:"能力与协作拓扑",closeInfo:"关闭 Agent 信息",infoUnavailable:"暂时无法读取 Agent 信息。",refresh:"刷新信息",loadingSkills:"正在加载绑定技能…",sessionSkills:"本会话临时技能",noBoundSpace:"当前智能体未绑定技能空间。",noBoundSkills:"绑定的技能空间暂无技能。",loadFailed:"加载失败,请刷新重试。",accessDenied:"无权读取此信息。",documentUnsupported:"当前 Runtime 不支持 Studio 读取 AGENTS.md,请升级 Runtime 镜像。",skillsUnsupported:"当前 Runtime 未提供技能空间绑定信息。",skillsDegraded:"技能信息不完整,请刷新重试。",documentEditHint:"编辑最新版本。保存会发布新版本到此技能空间,可能影响使用它的其他智能体。运行中的会话可能需要等待缓存刷新或新建会话后生效。请保留 frontmatter 中的 name。",documentLoading:"正在加载 SKILL.md…",documentWritable:"可编辑",documentReadOnly:"只读:此空间或当前权限不允许编辑",documentLoadFailed:"无法加载 SKILL.md,请刷新重试。",documentSaveFailed:"未确认保存成功,已保留编辑内容。重试前请重新打开,检查当前版本。",documentConflict:"技能已有新版本。请复制当前修改,再重新打开编辑器,避免覆盖。",discardDocument:"放弃未保存的修改?",keepEditing:"继续编辑",discardChanges:"放弃修改",saveDocument:"保存为新版本"},FOe={mountFailed:"挂载环境失败",closeDialog:"关闭环境弹窗",addTitle:"添加环境",description:"选择当前会话允许 Agent 使用的 Sandbox 环境",closeAdd:"关闭添加环境",searchAria:"搜索环境",searchPlaceholder:"搜索环境名称或能力",availableAria:"可用环境与工作区",loading:"正在读取可用环境…",noMatch:"没有匹配的环境或工作区",workspaces:"工作区",reuseAll:"复用工作区中的全部可用环境",availableEnvironmentCount_one:"{{count}} 个可用环境",availableEnvironmentCount_other:"{{count}} 个可用环境",selectWorkspace:"选择工作区 {{name}}",environments:"环境",includedByWorkspaces:"已由工作区 {{names}} 包含",nameSeparator:"、",selectEnvironment:"选择环境 {{name}}",selectedWorkspaceCount_one:"{{count}} 个工作区",selectedWorkspaceCount_other:"{{count}} 个工作区",coveredEnvironmentCount_one:"{{count}} 个环境",coveredEnvironmentCount_other:"{{count}} 个环境",selectionSummary:"已选择 {{workspaces}},覆盖 {{environments}}",cancel:"取消",mounting:"正在挂载…",confirm:"确认添加",mountedAria:"已挂载环境",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",removeWorkspace:"移除工作区 {{name}}",remove:"移除",removeEnvironment:"移除环境 {{name}}",add:"添加环境",addMore:"添加更多环境",addForSession:"为当前 Session 添加环境",loadingAvailable:"正在加载可用环境…",empty:"暂无可用的 AIO Sandbox 环境。"},BOe={loading:{searching:"正在查找已有环境",creating:"环境初始化中",connecting:"正在连接已有环境"},initializationFailed:"AgentKit CLI 环境初始化失败,当前状态:{{status}}。",sessionExpired:"AgentKit CLI Session 不存在或已过期,请重试。",initializationTimeout:"AgentKit CLI 环境初始化超时,请稍后重试。",nonPersistent:"非持久化环境",recyclingHoursMinutes:"{{hours}} 小时 {{minutes}} 分钟后环境回收",recyclingMinutes:"{{minutes}} 分钟后环境回收",connectionError:`无法连接 Studio 服务,未收到服务端响应。 原始错误:{{message}}`,unavailable:"连接不可用",requestFailed:"AgentKit CLI 请求失败",retry:"重试",terminalTitle:"AgentKit CLI 终端"},UOe={labels:{coding:"智能编程",get_city_weather:"城市天气查询",get_location_weather:"位置天气查询",web_fetch:"网页内容获取",studio_write_artifact:"保存会话产物"},closeDialog:"关闭弹窗",title:"添加 Studio 工具",description:"由 Studio BFF 为 {{agentName}} 的当前会话执行,Runtime 无需预装",close:"关闭添加 Studio 工具",searchAria:"搜索 Studio 工具",searchPlaceholder:"搜索名称或工具标识",availableAria:"可用 Studio 工具",loading:"正在读取 Studio 工具…",noMatch:"没有匹配的 Studio 工具",remove:"移除",add:"添加"},QOe={artifactLibrary:jOe,resourceMetadata:NOe,artifactEdit:ROe,codeBrowser:IOe,search:POe,developerResources:DOe,library:MOe,manageAgents:LOe,agentTopology:$Oe,sessionEnvironment:FOe,agentKitCli:BOe,studioTools:UOe},JVe=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:BOe,agentTopology:$Oe,artifactEdit:ROe,artifactLibrary:jOe,codeBrowser:IOe,default:QOe,developerResources:DOe,library:MOe,manageAgents:LOe,resourceMetadata:NOe,search:POe,sessionEnvironment:FOe,studioTools:UOe},Symbol.toStringTag,{value:"Module"})),jU=["zh-CN","en-US"],yA="en-US",zOe="agentkit.studio.locale",eHe={"zh-CN":{dir:"ltr",nativeName:"简体中文"},"en-US":{dir:"ltr",nativeName:"English"}};function vA(e){if(!e)return null;const t=e.trim().replace(/_/g,"-").toLowerCase(),n=jU.find(i=>i.toLowerCase()===t);return n||(t==="zh"||t.startsWith("zh-")?"zh-CN":t==="en"||t.startsWith("en-")?"en-US":null)}function So(e,t){const n=(e==null?void 0:e.trim())??"";if(!n)return"";const i=new RegExp("\\p{Script=Han}","u").test(n);return t.toLowerCase().startsWith("zh")===i?n:""}function tHe(){if(typeof window>"u")return null;try{return vA(window.localStorage.getItem(zOe))}catch{return null}}function nHe(){if(typeof window>"u")return[];const e=window.navigator;return e?e.languages.length>0?e.languages:e.language?[e.language]:[]:[]}function iHe(){const e=tHe();if(e)return e;for(const t of nHe()){const n=vA(t);if(n)return n}return yA}function rHe(e){if(!(typeof window>"u"))try{window.localStorage.setItem(zOe,e)}catch{}}function VOe(e){typeof document>"u"||(document.documentElement.lang=e,document.documentElement.dir=eHe[e].dir)}const Zn=e=>typeof e=="string",YO=()=>{let e,t;const n=new Promise((i,r)=>{e=i,t=r});return n.resolve=e,n.reject=t,n},O5=e=>e==null?"":String(e),sHe=(e,t,n)=>{e.forEach(i=>{t[i]&&(n[i]=t[i])})},aHe=/###/g,DG=e=>e&&e.includes("###")?e.replace(aHe,"."):e,MG=e=>!e||Zn(e),NS=(e,t,n)=>{const i=Zn(t)?t.split("."):t;let r=0;for(;r{const{obj:i,k:r}=NS(e,t,Object);if(i!==void 0||t.length===1){i[r]=n;return}let s=t[t.length-1],o=t.slice(0,t.length-1),l=NS(e,o,Object);for(;l.obj===void 0&&o.length;)s=`${o[o.length-1]}.${s}`,o=o.slice(0,o.length-1),l=NS(e,o,Object),l!=null&&l.obj&&typeof l.obj[`${l.k}.${s}`]<"u"&&(l.obj=void 0);l.obj[`${l.k}.${s}`]=n},oHe=(e,t,n,i)=>{const{obj:r,k:s}=NS(e,t,Object);r[s]=r[s]||[],r[s].push(n)},lR=(e,t)=>{const{obj:n,k:i}=NS(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,i))return n[i]},lHe=(e,t,n)=>{const i=lR(e,n);return i!==void 0?i:lR(t,n)},HOe=(e,t,n)=>{for(const i in t)i!=="__proto__"&&i!=="constructor"&&(Object.prototype.hasOwnProperty.call(e,i)?Zn(e[i])||e[i]instanceof String||Zn(t[i])||t[i]instanceof String?n&&(e[i]=t[i]):HOe(e[i],t[i],n):e[i]=t[i]);return e},Wh=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),cHe={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},uHe=e=>Zn(e)?e.replace(/[&<>"'\/]/g,t=>cHe[t]):e;class dHe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const n=this.regExpMap.get(t);if(n!==void 0)return n;const i=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,i),this.regExpQueue.push(t),i}}const fHe=[" ",",","?","!",";"],hHe=new dHe(20),pHe=(e,t,n)=>{t=t||"",n=n||"";const i=fHe.filter(o=>!t.includes(o)&&!n.includes(o));if(i.length===0)return!0;const r=hHe.getRegExp(`(${i.map(o=>o==="?"?"\\?":o).join("|")})`);let s=!r.test(e);if(!s){const o=e.indexOf(n);o>0&&!r.test(e.substring(0,o))&&(s=!0)}return s},dF=(e,t,n=".")=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;const i=t.split(n);let r=e;for(let s=0;se==null?void 0:e.replace(/_/g,"-"),mHe={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){var n,i;(i=(n=console==null?void 0:console[e])==null?void 0:n.apply)==null||i.call(n,console,t)}};class cR{constructor(t,n={}){this.init(t,n)}init(t,n={}){this.prefix=n.prefix||"i18next:",this.logger=t||mHe,this.options=n,this.debug=n.debug}log(...t){return this.forward(t,"log","",!0)}warn(...t){return this.forward(t,"warn","",!0)}error(...t){return this.forward(t,"error","")}deprecate(...t){return this.forward(t,"warn","WARNING DEPRECATED: ",!0)}forward(t,n,i,r){return r&&!this.debug?null:(t=t.map(s=>Zn(s)?s.replace(/[\r\n\x00-\x1F\x7F]/g," "):s),Zn(t[0])&&(t[0]=`${i}${this.prefix} ${t[0]}`),this.logger[n](t))}create(t){return new cR(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t=t||this.options,t.prefix=t.prefix||this.prefix,new cR(this.logger,t)}}var ih=new cR;let YP=class{constructor(){this.observers={}}on(t,n){return t.split(" ").forEach(i=>{this.observers[i]||(this.observers[i]=new Map);const r=this.observers[i].get(n)||0;this.observers[i].set(n,r+1)}),this}off(t,n){if(this.observers[t]){if(!n){delete this.observers[t];return}this.observers[t].delete(n)}}once(t,n){const i=(...r)=>{n(...r),this.off(t,i)};return this.on(t,i),this}emit(t,...n){this.observers[t]&&Array.from(this.observers[t].entries()).forEach(([r,s])=>{for(let o=0;o{for(let o=0;o-1&&this.options.ns.splice(n,1)}getResource(t,n,i,r={}){var u,d;const s=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,o=r.ignoreJSONStructure!==void 0?r.ignoreJSONStructure:this.options.ignoreJSONStructure;let l;t.includes(".")?l=t.split("."):(l=[t,n],i&&(Array.isArray(i)?l.push(...i):Zn(i)&&s?l.push(...i.split(s)):l.push(i)));const c=lR(this.data,l);return!c&&!n&&!i&&t.includes(".")&&(t=l[0],n=l[1],i=l.slice(2).join(".")),c||!o||!Zn(i)?c:dF((d=(u=this.data)==null?void 0:u[t])==null?void 0:d[n],i,s)}addResource(t,n,i,r,s={silent:!1}){const o=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let l=[t,n];i&&(l=l.concat(o?i.split(o):i)),t.includes(".")&&(l=t.split("."),r=n,n=l[1]),this.addNamespaces(n),LG(this.data,l,r),s.silent||this.emit("added",t,n,i,r)}addResources(t,n,i,r={silent:!1}){for(const s in i)(Zn(i[s])||Array.isArray(i[s]))&&this.addResource(t,n,s,i[s],{silent:!0});r.silent||this.emit("added",t,n,i)}addResourceBundle(t,n,i,r,s,o={silent:!1,skipCopy:!1}){let l=[t,n];t.includes(".")&&(l=t.split("."),r=i,i=n,n=l[1]),this.addNamespaces(n);let c=lR(this.data,l)||{};o.skipCopy||(i=JSON.parse(JSON.stringify(i))),r?HOe(c,i,s):c={...c,...i},LG(this.data,l,c),o.silent||this.emit("added",t,n,i)}removeResourceBundle(t,n){this.hasResourceBundle(t,n)&&delete this.data[t][n],this.removeNamespaces(n),this.emit("removed",t,n)}hasResourceBundle(t,n){return this.getResource(t,n)!==void 0}getResourceBundle(t,n){return n||(n=this.options.defaultNS),this.getResource(t,n)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const n=this.getDataByLanguage(t);return!!(n&&Object.keys(n)||[]).find(r=>n[r]&&Object.keys(n[r]).length>0)}toJSON(){return this.data}}var qOe={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,i,r){return e.forEach(s=>{var o;t=((o=this.processors[s])==null?void 0:o.process(t,n,i,r))??t}),t}};const WOe=Symbol("i18next/PATH_KEY");function gHe(){const e=[],t=Object.create(null);let n;return t.get=(i,r)=>{var s;return(s=n==null?void 0:n.revoke)==null||s.call(n),r===WOe?e:(e.push(r),n=Proxy.revocable(i,t),n.proxy)},Proxy.revocable(Object.create(null),t).proxy}function Uy(e,t){const{[WOe]:n}=e(gHe()),i=(t==null?void 0:t.keySeparator)??".",r=(t==null?void 0:t.nsSeparator)??":",s=(t==null?void 0:t.enableSelector)==="strict";if(n.length>1&&r){const o=t==null?void 0:t.ns,l=s?Array.isArray(o)?o:o?[o]:null:Array.isArray(o)?o:null;if(l&&(s?l:l.length>1?l.slice(1):[]).includes(n[0]))return`${n[0]}${r}${n.slice(1).join(i)}`}return n.join(i)}const k5=e=>!Zn(e)&&typeof e!="boolean"&&typeof e!="number";class uR extends YP{constructor(t,n={}){super(),sHe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=ih.create("translator"),this.checkedLoadedFor={}}changeLanguage(t){t&&(this.language=t)}exists(t,n={interpolation:{}}){const i={...n};if(t==null)return!1;const r=this.resolve(t,i);if((r==null?void 0:r.res)===void 0)return!1;const s=k5(r.res);return!(i.returnObjects===!1&&s)}extractFromKey(t,n){let i=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");const r=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const o=i&&t.includes(i),l=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!pHe(t,i,r);if(o&&!l){const c=t.match(this.interpolator.nestingRegexp);if(c&&c.length>0)return{key:t,namespaces:Zn(s)?[s]:s};const u=t.split(i);(i!==r||i===r&&this.options.ns.includes(u[0]))&&(s=u.shift()),t=u.join(r)}return{key:t,namespaces:Zn(s)?[s]:s}}translate(t,n,i){let r=typeof n=="object"?{...n}:n;if(typeof r!="object"&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),typeof r=="object"&&(r={...r}),r||(r={}),t==null)return"";typeof t=="function"&&(t=Uy(t,{...this.options,...r})),Array.isArray(t)||(t=[String(t)]),t=t.map(N=>typeof N=="function"?Uy(N,{...this.options,...r}):String(N));const s=r.returnDetails!==void 0?r.returnDetails:this.options.returnDetails,o=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator,{key:l,namespaces:c}=this.extractFromKey(t[t.length-1],r),u=c[c.length-1];let d=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const f=r.lng||this.language,h=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((f==null?void 0:f.toLowerCase())==="cimode")return h?s?{res:`${u}${d}${l}`,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:`${u}${d}${l}`:s?{res:l,usedKey:l,exactUsedKey:l,usedLng:f,usedNS:u,usedParams:this.getUsedParamsDetails(r)}:l;const m=this.resolve(t,r);let g=m==null?void 0:m.res;const b=(m==null?void 0:m.usedKey)||l,v=(m==null?void 0:m.exactUsedKey)||l,y=["[object Number]","[object Function]","[object RegExp]"],w=r.joinArrays!==void 0?r.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,O=r.count!==void 0&&!Zn(r.count),k=uR.hasDefaultValue(r),S=O?this.pluralResolver.getSuffix(f,r.count,r):"",C=r.ordinal&&O?this.pluralResolver.getSuffix(f,r.count,{ordinal:!1}):"",E=O&&!r.ordinal&&r.count===0,j=E&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${S}`]||r[`defaultValue${C}`]||r.defaultValue;let T=g;x&&!g&&k&&(T=j);const R=k5(T),A=Object.prototype.toString.apply(T);if(x&&T&&R&&!y.includes(A)&&!(Zn(w)&&Array.isArray(T))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const N=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,T,{...r,ns:c}):`key '${l} (${this.language})' returned an object instead of string.`;return s?(m.res=N,m.usedParams=this.getUsedParamsDetails(r),m):N}if(o){const N=Array.isArray(T),P=N?[]:{},I=N?v:b;for(const D in T)if(Object.prototype.hasOwnProperty.call(T,D)){const _=`${I}${o}${D}`;k&&!g?P[D]=this.translate(_,{...r,defaultValue:k5(j)?j[D]:void 0,joinArrays:!1,ns:c}):P[D]=this.translate(_,{...r,joinArrays:!1,ns:c}),P[D]===_&&(P[D]=T[D])}g=P}}else if(x&&Zn(w)&&Array.isArray(g))g=g.join(w),g&&(g=this.extendTranslation(g,t,r,i));else{let N=!1,P=!1;!this.isValidLookup(g)&&k&&(N=!0,g=j),this.isValidLookup(g)||(P=!0,g=l);const D=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&P?void 0:g,_=k&&j!==g&&this.options.updateMissing;if(P||N||_){if(this.logger.log(_?"updateKey":"missingKey",f,u,O&&!_?`${l}${this.pluralResolver.getSuffix(f,r.count,r)}`:l,_?j:g),o){const V=this.resolve(l,{...r,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let L=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let V=0;V{var z;const J=k&&U!==g?U:D;this.options.missingKeyHandler?this.options.missingKeyHandler(V,u,q,J,_,r):(z=this.backendConnector)!=null&&z.saveMissing&&this.backendConnector.saveMissing(V,u,q,J,_,r),this.emit("missingKey",V,u,q,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&O?L.forEach(V=>{const q=this.pluralResolver.getSuffixes(V,r);E&&r[`defaultValue${this.options.pluralSeparator}zero`]&&!q.includes(`${this.options.pluralSeparator}zero`)&&q.push(`${this.options.pluralSeparator}zero`),q.forEach(U=>{M([V],l+U,r[`defaultValue${U}`]||j)})}):M(L,l,j))}g=this.extendTranslation(g,t,r,m,i),P&&g===l&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${l}`),(P||N)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${l}`:l,N?g:void 0,r))}return s?(m.res=g,m.usedParams=this.getUsedParamsDetails(r),m):g}extendTranslation(t,n,i,r,s){var c,u;if((c=this.i18nFormat)!=null&&c.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...i},i.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init({...i,interpolation:{...this.options.interpolation,...i.interpolation}});const d=Zn(t)&&(((u=i==null?void 0:i.interpolation)==null?void 0:u.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let f;if(d){const m=t.match(this.interpolator.nestingRegexp);f=m&&m.length}let h=i.replace&&!Zn(i.replace)?i.replace:i;if(this.options.interpolation.defaultVariables&&(h={...this.options.interpolation.defaultVariables,...h}),t=this.interpolator.interpolate(t,h,i.lng||this.language||r.usedLng,i),d){const m=t.match(this.interpolator.nestingRegexp),g=m&&m.length;f(s==null?void 0:s[0])===m[0]&&!i.context?(this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`),null):this.translate(...m,n),i)),i.interpolation&&this.interpolator.reset()}const o=i.postProcess||this.options.postProcess,l=Zn(o)?[o]:o;return t!=null&&(l!=null&&l.length)&&i.applyPostProcessor!==!1&&(t=qOe.handle(l,t,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(i)},...i}:i,this)),t}resolve(t,n={}){let i,r,s,o,l;return Zn(t)&&(t=[t]),Array.isArray(t)&&(t=t.map(c=>typeof c=="function"?Uy(c,{...this.options,...n}):c)),t.forEach(c=>{if(this.isValidLookup(i))return;const u=this.extractFromKey(c,n),d=u.key;r=d;let f=u.namespaces;this.options.fallbackNS&&(f=f.concat(this.options.fallbackNS));const h=n.count!==void 0&&!Zn(n.count),m=h&&!n.ordinal&&n.count===0,g=n.context!==void 0&&(Zn(n.context)||typeof n.context=="number")&&n.context!=="",b=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);f.forEach(v=>{var y,w;this.isValidLookup(i)||(l=v,!this.checkedLoadedFor[`${b[0]}-${v}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((w=this.utils)!=null&&w.hasLoadedNamespace(l))&&(this.checkedLoadedFor[`${b[0]}-${v}`]=!0,this.logger.warn(`key "${r}" for languages "${b.join(", ")}" won't get resolved as namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(x=>{var S;if(this.isValidLookup(i))return;o=x;const O=[d];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(O,d,x,v,n);else{let C;h&&(C=this.pluralResolver.getSuffix(x,n.count,n));const E=`${this.options.pluralSeparator}zero`,j=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(h&&(n.ordinal&&C.startsWith(j)&&O.push(d+C.replace(j,this.options.pluralSeparator)),O.push(d+C),m&&O.push(d+E)),g){const T=`${d}${this.options.contextSeparator||"_"}${n.context}`;O.push(T),h&&(n.ordinal&&C.startsWith(j)&&O.push(T+C.replace(j,this.options.pluralSeparator)),O.push(T+C),m&&O.push(T+E))}}let k;for(;k=O.pop();)this.isValidLookup(i)||(s=k,i=this.getResource(x,v,k,n))}))})}),{res:i,usedKey:r,exactUsedKey:s,usedLng:o,usedNS:l}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,n,i,r={}){var s;return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(t,n,i,r):this.resourceStore.getResource(t,n,i,r)}getUsedParamsDetails(t={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],i=t.replace&&!Zn(t.replace);let r=i?t.replace:t;if(i&&typeof t.count<"u"&&(r={...r,count:t.count}),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!i){r={...r};for(const s of n)delete r[s]}return r}static hasDefaultValue(t){const n="defaultValue";for(const i in t)if(Object.prototype.hasOwnProperty.call(t,i)&&i.startsWith(n)&&t[i]!==void 0)return!0;return!1}}class FG{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ih.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(t){if(t=ME(t),!t||!t.includes("-"))return null;const n=t.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(t){if(t=ME(t),!t||!t.includes("-"))return t;const n=t.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(t){if(Zn(t)&&t.includes("-")){let n;try{n=Intl.getCanonicalLocales(t)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?t.toLowerCase():t)}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(t)}getBestMatchFromCodes(t){if(!t)return null;let n;return t.forEach(i=>{if(n)return;const r=this.formatLanguageCode(i);(!this.options.supportedLngs||this.isSupportedCode(r))&&(n=r)}),!n&&this.options.supportedLngs&&t.forEach(i=>{if(n)return;const r=this.getScriptPartFromCode(i);if(this.isSupportedCode(r))return n=r;const s=this.getLanguagePartFromCode(i);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(o=>o===s?!0:!o.includes("-")&&!s.includes("-")?!1:!!(o.includes("-")&&!s.includes("-")&&o.slice(0,o.indexOf("-"))===s||o.startsWith(s)&&s.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(t,n){if(!t)return[];if(typeof t=="function"&&(t=t(n)),Zn(t)&&(t=[t]),Array.isArray(t))return t;if(!n)return t.default||[];let i=t[n];return i||(i=t[this.getScriptPartFromCode(n)]),i||(i=t[this.formatLanguageCode(n)]),i||(i=t[this.getLanguagePartFromCode(n)]),i||(i=t.default),i||[]}toResolveHierarchy(t,n){const i=this.options.fallbackLng,r=Array.isArray(i)?i.join("|"):i;r!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=r);const s=n===void 0||n===!1||Zn(n),o=n===void 0&&typeof this.options.fallbackLng=="function",l=Zn(t)&&s&&!o;let c=null;if(l){let h;n===void 0?h="undefined":n===!1?h="boolean:false":h=`string:${n}`,c=`${t.length}:${t}|${h}`}if(c!==null){const h=this.resolveHierarchyCache[c];if(h!==void 0)return h.slice()}const u=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],t),d=[],f=h=>{h&&(this.isSupportedCode(h)?d.push(h):this.logger.warn(`rejecting language code not found in supportedLngs: ${h}`))};return Zn(t)&&(t.includes("-")||t.includes("_"))?(this.options.load!=="languageOnly"&&f(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&f(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&f(this.getLanguagePartFromCode(t))):Zn(t)&&f(this.formatLanguageCode(t)),u.forEach(h=>{d.includes(h)||f(this.formatLanguageCode(h))}),c!==null?(this.resolveHierarchyCache[c]=d,d.slice()):d}}const BG={zero:0,one:1,two:2,few:3,many:4,other:5},UG={select:e=>e===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class bHe{constructor(t,n={}){this.languageUtils=t,this.options=n,this.logger=ih.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(t,n={}){const i=ME(t==="dev"?"en":t),r=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:i,type:r});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let o;try{o=new Intl.PluralRules(i,{type:r})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),UG;if(!t.match(/-|_/))return UG;const c=this.languageUtils.getLanguagePartFromCode(t);o=this.getRule(c,n)}return this.pluralRulesCache[s]=o,o}needsPlural(t,n={}){let i=this.getRule(t,n);return i||(i=this.getRule("dev",n)),(i==null?void 0:i.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(t,n,i={}){return this.getSuffixes(t,i).map(r=>`${n}${r}`)}getSuffixes(t,n={}){let i=this.getRule(t,n);return i||(i=this.getRule("dev",n)),i?i.resolvedOptions().pluralCategories.sort((r,s)=>BG[r]-BG[s]).map(r=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r}`):[]}getSuffix(t,n,i={}){const r=this.getRule(t,i);return r?`${this.options.prepend}${i.ordinal?`ordinal${this.options.prepend}`:""}${r.select(n)}`:(this.logger.warn(`no plural rule found for: ${t}`),this.getSuffix("dev",n,i))}}const QG=(e,t,n,i=".",r=!0)=>{let s=lHe(e,t,n);return!s&&r&&Zn(n)&&(s=dF(e,n,i),s===void 0&&(s=dF(t,n,i))),s},zG=e=>e.replace(/\$/g,"$$$$");class VG{constructor(t={}){var n;this.logger=ih.create("interpolator"),this.options=t,this.format=((n=t==null?void 0:t.interpolation)==null?void 0:n.format)||(i=>i),this.init(t)}init(t={}){t.interpolation||(t.interpolation={escapeValue:!0});const{escape:n,escapeValue:i,useRawValueToEscape:r,prefix:s,prefixEscaped:o,suffix:l,suffixEscaped:c,formatSeparator:u,unescapeSuffix:d,unescapePrefix:f,nestingPrefix:h,nestingPrefixEscaped:m,nestingSuffix:g,nestingSuffixEscaped:b,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:w}=t.interpolation;this.escape=n!==void 0?n:uHe,this.escapeValue=i!==void 0?i:!0,this.useRawValueToEscape=r!==void 0?r:!1,this.prefix=s?Wh(s):o||"{{",this.suffix=l?Wh(l):c||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":f?Wh(f):"-",this.unescapeSuffix=this.unescapePrefix?"":d?Wh(d):"",this.nestingPrefix=h?Wh(h):m||Wh("$t("),this.nestingSuffix=g?Wh(g):b||Wh(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=w!==void 0?w:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(n,i)=>(n==null?void 0:n.source)===i?(n.lastIndex=0,n):new RegExp(i,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(t,n,i,r){var m;let s,o,l;const c=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(!g.includes(this.formatSeparator)){const w=QG(n,c,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(w,void 0,i,{...r,...n,interpolationkey:g}):w}const b=g.split(this.formatSeparator),v=b.shift().trim(),y=b.join(this.formatSeparator).trim();return this.format(QG(n,c,v,this.options.keySeparator,this.options.ignoreJSONStructure),y,i,{...r,...n,interpolationkey:v})};this.resetRegExp(),!this.escapeValue&&typeof t=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(t)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(r==null?void 0:r.missingInterpolationHandler)||this.options.missingInterpolationHandler,f=((m=r==null?void 0:r.interpolation)==null?void 0:m.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>g},{regex:this.regexp,safeValue:g=>this.escapeValue?this.escape(g):g}].forEach(g=>{for(l=0;s=g.regex.exec(t);){const b=s[1].trim();if(o=u(b),o===void 0)if(typeof d=="function"){const y=d(t,s,r);o=Zn(y)?y:""}else if(r&&Object.prototype.hasOwnProperty.call(r,b))o="";else if(f){o=s[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${t}`),o="";else!Zn(o)&&!this.useRawValueToEscape&&(o=O5(o));const v=g.safeValue(o);if(t=t.replace(s[0],zG(v)),f?(g.regex.lastIndex+=v.length,g.regex.lastIndex-=s[0].length):g.regex.lastIndex=0,l++,l>=this.maxReplaces)break}}),t}nest(t,n,i={}){let r,s,o;const l=(c,u)=>{const d=this.nestingOptionsSeparator;if(!c.includes(d))return c;const f=c.split(new RegExp(`${Wh(d)}[ ]*{`));let h=`{${f[1]}`;c=f[0],h=this.interpolate(h,o);const m=h.match(/'/g),g=h.match(/"/g);(((m==null?void 0:m.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(h=h.replace(/'/g,'"'));try{o=JSON.parse(h),u&&(o={...u,...o})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${c}`,b),`${c}${d}${h}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,c};for(;r=this.nestingRegexp.exec(t);){let c=[];o={...i},o=o.replace&&!Zn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/s.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(u!==-1&&(c=r[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),r[1]=r[1].slice(0,u)),s=n(l.call(this,r[1].trim(),o),o),s&&r[0]===t&&!Zn(s))return s;Zn(s)||(s=O5(s)),s||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${t}`),s=""),c.length&&(s=c.reduce((d,f)=>this.format(d,f,i.lng,{...i,interpolationkey:r[1].trim()}),s.trim())),t=t.replace(r[0],zG(O5(s))),this.regexp.lastIndex=0}return t}}const yHe=e=>{let t=e.toLowerCase().trim();const n={};if(e.includes("(")){const i=e.split("(");t=i[0].toLowerCase().trim();const r=i[1].slice(0,-1);t==="currency"&&!r.includes(":")?n.currency||(n.currency=r.trim()):t==="relativetime"&&!r.includes(":")?n.range||(n.range=r.trim()):r.split(";").forEach(o=>{if(o){const[l,...c]=o.split(":"),u=c.join(":").trim().replace(/^'+|'+$/g,""),d=l.trim();n[d]||(n[d]=u),u==="false"&&(n[d]=!1),u==="true"&&(n[d]=!0),isNaN(u)||(n[d]=parseInt(u,10))}})}return{formatName:t,formatOptions:n}},HG=e=>{const t={};return(n,i,r)=>{let s=r;r&&r.interpolationkey&&r.formatParams&&r.formatParams[r.interpolationkey]&&r[r.interpolationkey]&&(s={...s,[r.interpolationkey]:void 0});const o=i+JSON.stringify(s);let l=t[o];return l||(l=e(ME(i),r),t[o]=l),l(n)}},vHe=e=>(t,n,i)=>e(ME(n),i)(t);class xHe{constructor(t={}){this.logger=ih.create("formatter"),this.options=t,this.init(t)}init(t,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const i=n.cacheInBuiltFormats?HG:vHe;this.formats={number:i((r,s)=>{const o=new Intl.NumberFormat(r,{...s});return l=>o.format(l)}),currency:i((r,s)=>{const o=new Intl.NumberFormat(r,{...s,style:"currency"});return l=>o.format(l)}),datetime:i((r,s)=>{const o=new Intl.DateTimeFormat(r,{...s});return l=>o.format(l)}),relativetime:i((r,s)=>{const o=new Intl.RelativeTimeFormat(r,{...s});return l=>o.format(l,s.range||"day")}),list:i((r,s)=>{const o=new Intl.ListFormat(r,{...s});return l=>o.format(l)})}}add(t,n){this.formats[t.toLowerCase().trim()]=n}addCached(t,n){this.formats[t.toLowerCase().trim()]=HG(n)}format(t,n,i,r={}){if(!n||t==null)return t;const s=n.split(this.formatSeparator),o=[];for(let c=0;c-1&&!u.includes(")")&&c+1{var h;const{formatName:d,formatOptions:f}=yHe(u);if(this.formats[d]){let m=c;try{const g=((h=r==null?void 0:r.formatParams)==null?void 0:h[r.interpolationkey])||{},b=g.locale||g.lng||r.locale||r.lng||i;m=this.formats[d](c,b,{...f,...r,...g})}catch(g){this.logger.warn(g)}return m}else this.logger.warn(`there was no format function for ${d}`);return c},t)}}const wHe=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)};class OHe extends YP{constructor(t,n,i,r={}){var s,o;super(),this.backend=t,this.store=n,this.services=i,this.languageUtils=i.languageUtils,this.options=r,this.logger=ih.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],(o=(s=this.backend)==null?void 0:s.init)==null||o.call(s,i,r.backend,r)}queueLoad(t,n,i,r){const s={},o={},l={},c={};return t.forEach(u=>{let d=!0;n.forEach(f=>{const h=`${u}|${f}`;!i.reload&&this.store.hasResourceBundle(u,f)?this.state[h]=2:this.state[h]<0||(this.state[h]===1?o[h]===void 0&&(o[h]=!0):(this.state[h]=1,d=!1,o[h]===void 0&&(o[h]=!0),s[h]===void 0&&(s[h]=!0),c[f]===void 0&&(c[f]=!0)))}),d||(l[u]=!0)}),(Object.keys(s).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(s),pending:Object.keys(o),toLoadLanguages:Object.keys(l),toLoadNamespaces:Object.keys(c)}}loaded(t,n,i){const r=t.split("|"),s=r[0],o=r[1];n&&this.emit("failedLoading",s,o,n),!n&&i&&this.store.addResourceBundle(s,o,i,void 0,void 0,{skipCopy:!0}),this.state[t]=n?-1:2,n&&i&&(this.state[t]=0);const l={};this.queue.forEach(c=>{oHe(c.loaded,[s],o),wHe(c,t),n&&c.errors.push(n),c.pendingCount===0&&!c.done&&(Object.keys(c.loaded).forEach(u=>{l[u]||(l[u]={});const d=c.loaded[u];d.length&&d.forEach(f=>{l[u][f]===void 0&&(l[u][f]=!0)})}),c.done=!0,c.errors.length?c.callback(c.errors):c.callback())}),this.emit("loaded",l),this.queue=this.queue.filter(c=>!c.done)}read(t,n,i,r=0,s=this.retryTimeout,o){if(!t.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:n,fcName:i,tried:r,wait:s,callback:o});return}this.readingCalls++;const l=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const f=this.waitingReads.shift();this.read(f.lng,f.ns,f.fcName,f.tried,f.wait,f.callback)}if(u&&d&&r{this.read(t,n,i,r+1,s*2,o)},s);return}o(u,d)},c=this.backend[i].bind(this.backend);if(c.length===2){try{const u=c(t,n);u&&typeof u.then=="function"?u.then(d=>l(null,d)).catch(l):l(null,u)}catch(u){l(u)}return}return c(t,n,l)}prepareLoading(t,n,i={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();Zn(t)&&(t=this.languageUtils.toResolveHierarchy(t)),Zn(n)&&(n=[n]);const s=this.queueLoad(t,n,i,r);if(!s.toLoad.length)return s.pending.length||r(),null;s.toLoad.forEach(o=>{this.loadOne(o)})}load(t,n,i){this.prepareLoading(t,n,{},i)}reload(t,n,i){this.prepareLoading(t,n,{reload:!0},i)}loadOne(t,n=""){const i=t.split("|"),r=i[0],s=i[1];this.read(r,s,"read",void 0,void 0,(o,l)=>{o&&this.logger.warn(`${n}loading namespace ${s} for language ${r} failed`,o),!o&&l&&this.logger.log(`${n}loaded namespace ${s} for language ${r}`,l),this.loaded(t,o,l)})}saveMissing(t,n,i,r,s,o={},l=()=>{}){var c,u,d,f,h;if((u=(c=this.services)==null?void 0:c.utils)!=null&&u.hasLoadedNamespace&&!((f=(d=this.services)==null?void 0:d.utils)!=null&&f.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${i}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if((h=this.backend)!=null&&h.create){const m={...o,isUpdate:s},g=this.backend.create.bind(this.backend);if(g.length<6)try{let b;g.length===5?b=g(t,n,i,r,m):b=g(t,n,i,r),b&&typeof b.then=="function"?b.then(v=>l(null,v)).catch(l):l(null,b)}catch(b){l(b)}else g(t,n,i,r,l,m)}!t||!t[0]||this.store.addResource(t[0],n,i,r)}}}const S5=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]=="object"&&(t=e[1]),Zn(e[1])&&(t.defaultValue=e[1]),Zn(e[2])&&(t.tDescription=e[2]),typeof e[2]=="object"||typeof e[3]=="object"){const n=e[3]||e[2];Object.keys(n).forEach(i=>{t[i]=n[i]})}return t},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),qG=e=>(Zn(e.ns)&&(e.ns=[e.ns]),Zn(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),Zn(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes("cimode")&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e),A2=()=>{},kHe=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(n=>{typeof e[n]=="function"&&(e[n]=e[n].bind(e))})};class RS extends YP{constructor(t={},n){if(super(),this.options=qG(t),this.services={},this.logger=ih,this.modules={external:[]},kHe(this),n&&!this.isInitialized&&!t.isClone){if(!this.options.initAsync)return this.init(t,n),this;setTimeout(()=>{this.init(t,n)},0)}}init(t={},n){this.isInitializing=!0,typeof t=="function"&&(n=t,t={}),t.defaultNS==null&&t.ns&&(Zn(t.ns)?t.defaultNS=t.ns:t.ns.includes("translation")||(t.defaultNS=t.ns[0]));const i=S5();this.options={...i,...this.options,...qG(t)},this.options.interpolation={...i.interpolation,...this.options.interpolation},t.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=t.keySeparator),t.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=t.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=i.overloadTranslationOptionHandler);const r=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?ih.init(r(this.modules.logger),this.options):ih.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=xHe;const d=new FG(this.options);this.store=new $G(this.options.resources,this.options);const f=this.services;f.logger=ih,f.resourceStore=this.store,f.languageUtils=d,f.pluralResolver=new bHe(d,{prepend:this.options.pluralSeparator}),u&&(f.formatter=r(u),f.formatter.init&&f.formatter.init(f,this.options),this.options.interpolation.format=f.formatter.format.bind(f.formatter)),f.interpolator=new VG(this.options),f.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},f.backendConnector=new OHe(r(this.modules.backend),f.resourceStore,f,this.options),f.backendConnector.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.languageDetector&&(f.languageDetector=r(this.modules.languageDetector),f.languageDetector.init&&f.languageDetector.init(f,this.options.detection,this.options)),this.modules.i18nFormat&&(f.i18nFormat=r(this.modules.i18nFormat),f.i18nFormat.init&&f.i18nFormat.init(this)),this.translator=new uR(this.services,this.options),this.translator.on("*",(h,...m)=>{this.emit(h,...m)}),this.modules.external.forEach(h=>{h.init&&h.init(this)})}if(this.format=this.options.interpolation.format,n||(n=A2),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const l=YO(),c=()=>{const u=(d,f)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),l.resolve(f),n(d,f)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?c():setTimeout(c,0),l}loadResources(t,n=A2){var s,o;let i=n;const r=Zn(t)?t:this.language;if(typeof t=="function"&&(i=t),!this.options.resources||this.options.partialBundledLanguages){if((r==null?void 0:r.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return i();const l=[],c=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(f=>{f!=="cimode"&&(l.includes(f)||l.push(f))})};r?c(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>c(d)),(o=(s=this.options.preload)==null?void 0:s.forEach)==null||o.call(s,u=>c(u)),this.services.backendConnector.load(l,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),i(u)})}else i(null)}reloadResources(t,n,i){const r=YO();return typeof t=="function"&&(i=t,t=void 0),typeof n=="function"&&(i=n,n=void 0),t||(t=this.languages),n||(n=this.options.ns),i||(i=A2),this.services.backendConnector.reload(t,n,s=>{r.resolve(),i(s)}),r}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&qOe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!["cimode","dev"].includes(t)){for(let n=0;n{this.language=l,this.languages=this.services.languageUtils.toResolveHierarchy(l),this.resolvedLanguage=void 0,this.setResolvedLanguage(l)},s=(l,c)=>{c?this.isLanguageChangingTo===t&&(r(c),this.translator.changeLanguage(c),this.isLanguageChangingTo=void 0,this.emit("languageChanged",c),this.logger.log("languageChanged",c)):this.isLanguageChangingTo=void 0,i.resolve((...u)=>this.t(...u)),n&&n(l,(...u)=>this.t(...u))},o=l=>{var d,f;!t&&!l&&this.services.languageDetector&&(l=[]);const c=Zn(l)?l:l&&l[0],u=this.store.hasLanguageSomeTranslations(c)?c:this.services.languageUtils.getBestMatchFromCodes(Zn(l)?[l]:l);u&&(this.language||r(u),this.translator.language||this.translator.changeLanguage(u),(f=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||f.call(d,u)),this.loadResources(u,h=>{s(h,u)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(t),i}getFixedT(t,n,i,r){const s=r==null?void 0:r.scopeNs,o=(l,c,...u)=>{let d;typeof c!="object"?d=this.options.overloadTranslationOptionHandler([l,c].concat(u)):d={...c},d.lng=d.lng||o.lng,d.lngs=d.lngs||o.lngs;const f=d.ns!==void 0&&d.ns!==null;d.ns=d.ns||o.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||i||o.keyPrefix);const h={...this.options,...d};Array.isArray(s)&&!f&&(h.ns=s),typeof d.keyPrefix=="function"&&(d.keyPrefix=Uy(d.keyPrefix,h));const m=this.options.keySeparator||".";let g;return d.keyPrefix&&Array.isArray(l)?g=l.map(b=>(typeof b=="function"&&(b=Uy(b,h)),`${d.keyPrefix}${m}${b}`)):(typeof l=="function"&&(l=Uy(l,h)),g=d.keyPrefix?`${d.keyPrefix}${m}${l}`:l),this.t(g,d)};return Zn(t)?o.lng=t:o.lngs=t,o.ns=n,o.keyPrefix=i,o}t(...t){var n;return(n=this.translator)==null?void 0:n.translate(...t)}exists(...t){var n;return(n=this.translator)==null?void 0:n.exists(...t)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const i=n.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(i.toLowerCase()==="cimode")return!0;const o=(l,c)=>{const u=this.services.backendConnector.state[`${l}|${c}`];return u===-1||u===0||u===2};if(n.precheck){const l=n.precheck(this,o);if(l!==void 0)return l}return!!(this.hasResourceBundle(i,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(i,t)&&(!r||o(s,t)))}loadNamespaces(t,n){const i=YO();return this.options.ns?(Zn(t)&&(t=[t]),t.forEach(r=>{this.options.ns.includes(r)||this.options.ns.push(r)}),this.loadResources(r=>{i.resolve(),n&&n(r)}),i):(n&&n(),Promise.resolve())}loadLanguages(t,n){const i=YO();Zn(t)&&(t=[t]);const r=this.options.preload||[],s=t.filter(o=>!r.includes(o)&&this.services.languageUtils.isSupportedCode(o));return s.length?(this.options.preload=r.concat(s),this.loadResources(o=>{i.resolve(),n&&n(o)}),i):(n&&n(),Promise.resolve())}dir(t){var r,s;if(t||(t=this.resolvedLanguage||(((r=this.languages)==null?void 0:r.length)>0?this.languages[0]:this.language)),!t)return"rtl";try{const o=new Intl.Locale(t);if(o&&o.getTextInfo){const l=o.getTextInfo();if(l&&l.direction)return l.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=((s=this.services)==null?void 0:s.languageUtils)||new FG(S5());return t.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(i.getLanguagePartFromCode(t))||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(t={},n){const i=new RS(t,n);return i.createInstance=RS.createInstance,i}cloneInstance(t={},n=A2){const i=t.forkResourceStore;i&&delete t.forkResourceStore;const r={...this.options,...t,isClone:!0},s=new RS(r);if((t.debug!==void 0||t.prefix!==void 0)&&(s.logger=s.logger.clone(t)),["store","services","language"].forEach(l=>{s[l]=this[l]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},i){const l=Object.keys(this.store.data).reduce((c,u)=>(c[u]={...this.store.data[u]},c[u]=Object.keys(c[u]).reduce((d,f)=>(d[f]={...c[u][f]},d),c[u]),c),{});s.store=new $G(l,r),s.services.resourceStore=s.store}if(t.interpolation){const c={...S5().interpolation,...this.options.interpolation,...t.interpolation},u={...r,interpolation:c};s.services.interpolator=new VG(u)}return s.translator=new uR(s.services,r),s.translator.on("*",(l,...c)=>{s.emit(l,...c)}),s.init(r,n),s.translator.options=r,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const lc=RS.createInstance();lc.createInstance;lc.dir;lc.init;lc.loadResources;lc.reloadResources;lc.use;lc.changeLanguage;lc.getFixedT;lc.t;lc.exists;lc.setDefaultNamespace;lc.hasLoadedNamespace;lc.loadNamespaces;lc.loadLanguages;var KOe={exports:{}},Oi={};/** * @license React * react.production.js @@ -579,8 +579,8 @@ https://github.com/highlightjs/highlight.js/issues/2277`),M=D,F=_),L===void 0&&( `+s+O+`, `+v+"]"}return r.pop(),s=v,w}};const fTt={parse:sTt,stringify:dTt};var VMe=fTt;const hTt=2e5,pTt=new Set(["__proto__","constructor","prototype"]),mTt=/^(?:https?:|data:|blob:|file:|javascript:|image:\/\/)/i;function pS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function II(e,t=0){if(t>30)throw new Error("ECharts option nesting is too deep");if(typeof e=="number"&&!Number.isFinite(e))throw new Error("ECharts option contains a non-finite number");if(typeof e=="string"&&mTt.test(e.trim()))throw new Error("ECharts option contains an external resource");if(Array.isArray(e)){for(const n of e)II(n,t+1);return}if(pS(e))for(const[n,i]of Object.entries(e)){if(pTt.has(n))throw new Error("ECharts option contains an unsafe key");II(i,t+1)}}function gTt(e){var i;const t=e.trim(),n=t.match(/^(?:(?:const|let|var)\s+)?option\s*=\s*([\s\S]*?)\s*;?$/);return((i=n==null?void 0:n[1])==null?void 0:i.trim())||t}function bTt(e,t){let n=1,i="",r=!1,s=!1,o=!1;for(let l=t+1;li+2)throw new Error("Invalid ECharts gradient argument count");const r=n.slice(0,i).map(yTt),s=n[i],o=n[i+1]??!1;if(!Array.isArray(s)||typeof o!="boolean")throw new Error("Invalid ECharts gradient data");return e==="linear"?{type:e,x:r[0],y:r[1],x2:r[2],y2:r[3],colorStops:s,global:o}:{type:e,x:r[0],y:r[1],r:r[2],colorStops:s,global:o}}function xTt(e,t){const n=/^(?:new\s+)?echarts\.graphic\.(LinearGradient|RadialGradient)\s*\(/;let i="",r=!1,s=!1,o=!1;for(let l=t;lhTt)throw new Error("ECharts option is too large");const n=wTt(gTt(e));let i;try{i=VMe.parse(n)}catch(o){throw/\bfunction\s*\(|=>/.test(n)?new Error("ECharts function callbacks are not supported"):o}if(!pS(i))throw new Error("ECharts option must be a data object");II(i);const r={...i};r.aria={...pS(r.aria)?r.aria:{},enabled:!0};const s=r.tooltip;return pS(s)?r.tooltip={...s,renderMode:"richText"}:Array.isArray(s)&&(r.tooltip=s.map(o=>pS(o)?{...o,renderMode:"richText"}:o)),t&&(r.animation=!1),r}let I4;function OTt(){return I4??(I4=Zs(()=>import("../visualizations/echarts/index-CGT341lL.js"),[]).catch(e=>{throw I4=void 0,e})),I4}function kTt({source:e}){const{t}=Te("conversation"),n=p.useRef(null),[i,r]=p.useState(!1),[s,o]=p.useState("");return p.useEffect(()=>{let l=!1,c,u,d;r(!1);try{d=HMe(e,window.matchMedia("(prefers-reduced-motion: reduce)").matches),o("")}catch{o("invalid");return}return OTt().then(f=>{const h=n.current;l||!h||(c=f.init(h,void 0,{renderer:"svg"}),c.setOption(d,{notMerge:!0}),typeof ResizeObserver<"u"&&(u=new ResizeObserver(()=>c==null?void 0:c.resize()),u.observe(h)),r(!0))}).catch(()=>{c==null||c.dispose(),c=void 0,l||o("render")}),()=>{l=!0,u==null||u.disconnect(),c==null||c.dispose()}},[e]),a.jsxs("div",{className:`echarts-diagram${s?" echarts-diagram--error":""}`,role:"img","aria-label":t("visualization.echartsAria"),"aria-busy":!i&&!s,children:[a.jsx("div",{ref:n,className:"echarts-diagram__canvas",hidden:!!s}),!i&&!s?a.jsx("div",{className:"echarts-diagram__state","aria-live":"polite",children:a.jsx(fn,{duration:2.2,spread:15,children:t("visualization.rendering")})}):null,s?a.jsx("p",{className:"echarts-diagram__error",role:"alert",children:t(s==="invalid"?"visualization.invalidEcharts":"visualization.renderFailed")}):null]})}const STt=p.memo(kTt);let Ene,Cne=Promise.resolve(),ETt=0;function CTt(){return Ene??(Ene=Zs(async()=>{const{default:e}=await import("../visualizations/mermaid/mermaid.core-BmHujEI0.js").then(t=>t.ay);return{default:e}},__vite__mapDeps([0,1])).then(({default:e})=>(e.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,theme:"neutral"}),e))),Ene}function ATt(e){const t=Cne.then(async()=>{const n=await CTt(),i=`mermaid-diagram-${ETt+=1}`;return n.render(i,e)});return Cne=t.then(()=>{},()=>{}),t}function TTt({source:e}){const{t}=Te("conversation"),n=p.useRef(null),[i,r]=p.useState(null),[s,o]=p.useState(!1);return p.useEffect(()=>{let l=!1;return r(null),o(!1),ATt(e).then(c=>{l||r(c)}).catch(()=>{l||o(!0)}),()=>{l=!0}},[e]),p.useEffect(()=>{!(i!=null&&i.bindFunctions)||!n.current||i.bindFunctions(n.current)},[i]),s?a.jsx("div",{className:"mermaid-diagram mermaid-diagram--error",children:a.jsx("p",{className:"mermaid-diagram__error",role:"alert",children:t("visualization.mermaidFailed")})}):i?a.jsx("div",{ref:n,className:"mermaid-diagram",role:"img","aria-label":t("visualization.mermaidAria"),dangerouslySetInnerHTML:{__html:i.svg}}):a.jsx("div",{className:"mermaid-diagram mermaid-diagram--loading","aria-live":"polite",children:a.jsx(fn,{duration:2.2,spread:15,children:t("visualization.rendering")})})}const _Tt=p.memo(TTt),jTt="_SegmentedControl_1sl7d_1",NTt="_SegmentedControlOption_1sl7d_140",RTt="_SegmentedControlThumb_1sl7d_219",r9={SegmentedControl:jTt,SegmentedControlOption:NTt,SegmentedControlThumb:RTt},ld=({value:e,onChange:t,children:n,block:i,pill:r=!0,size:s="md",gutterSize:o,className:l,onClick:c,...u})=>{const d=p.useRef(null),f=p.useRef(null),h=p.useCallback(g=>{const b=d.current,v=f.current;if(!b||!v)return;const y=b==null?void 0:b.querySelector('[data-state="on"]');if(!y)return;const w=b.clientWidth;let x=Math.floor(y.clientWidth);const O=y.offsetLeft;if(w-(x+O)<2&&(x=x-1),v.style.width=`${Math.floor(x)}px`,v.style.transform=`translateX(${O}px)`,b.scrollWidth>w){const k=w*.15,S=b.scrollLeft,C=y.offsetLeft,E=C+x;(CS+w-k)&&g&&y.scrollIntoView({block:"nearest",inline:"center",behavior:"smooth"})}},[]);nNe({ref:d,onResize:()=>{const g=f.current;if(!g)return;const b=g.style.transition;g.style.transition="",h(!1),g.style.transition=b}}),p.useLayoutEffect(()=>{const g=d.current,b=f.current;!g||!b||(h(!!b.style.transition),b.style.transition||pI(()=>{b.style.transition="width 300ms var(--cubic-enter), transform 300ms var(--cubic-enter)"}))},[h,e,s,o,r]);const m=g=>{g&&t&&t(g)};return a.jsxs(xft,{ref:d,className:Ui(r9.SegmentedControl,l),type:"single",value:e,loop:!1,onValueChange:m,onClick:c,"data-block":i?"":void 0,"data-pill":r?"":void 0,"data-size":s,"data-gutter-size":o,...u,children:[a.jsx("div",{className:r9.SegmentedControlThumb,ref:f}),n]})},ITt=({children:e,...t})=>a.jsx(Eft,{className:r9.SegmentedControlOption,...t,onPointerEnter:kV,children:a.jsx("span",{className:"relative",children:e})});ld.Option=ITt;function PTt({children:e,label:t,language:n,source:i,streaming:r=!1}){const{t:s}=Te("conversation"),[o,l]=p.useState("preview"),c=r?"code":o;return a.jsxs("section",{className:"visualization-card","aria-label":s("visualization.cardAria",{label:t}),children:[a.jsx("div",{className:"visualization-card__toolbar",children:a.jsxs(ld,{className:"visualization-card__tabs",value:c,size:"sm",gutterSize:"sm",pill:!1,"aria-label":s("visualization.viewAria",{label:t}),onChange:u=>{r||l(u)},children:[a.jsx(ld.Option,{value:"preview",disabled:r,children:s("visualization.preview")}),a.jsx(ld.Option,{value:"code",children:s("visualization.code")})]})}),a.jsx("div",{className:"visualization-card__body",children:c==="code"?a.jsx("pre",{className:"visualization-card__code",children:a.jsx("code",{className:`language-${n}`,children:i})}):e})]})}const DTt=p.memo(PTt);function qMe(e){const t=e==null?void 0:e.trim().toLowerCase();if(t==="mermaid")return"mermaid";if(t==="echart"||t==="echarts")return"echarts"}const WMe=[".mp4",".webm",".mov",".m4v",".ogg",".avi"];function s9(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(s9).join(""):p.isValidElement(e)?s9(e.props.children):""}function MTt(e){var i;const t=p.Children.toArray(e)[0];if(!p.isValidElement(t))return;const n=(i=t.props.className)==null?void 0:i.split(/\s+/).find(r=>r.startsWith("language-"));return qMe(n==null?void 0:n.slice(9))}function KMe(e){if(!e)return!1;try{const t=e.toLowerCase();return WMe.some(n=>t.includes(n))}catch{return!1}}function LTt(e){var i;const t=(i=e==null?void 0:e.properties)==null?void 0:i.href;if(!t)return!1;if(KMe(t))return!0;const n=e==null?void 0:e.children;if(n&&Array.isArray(n)){const r=n.map(s=>(s==null?void 0:s.value)||"").join("").toLowerCase();return WMe.some(s=>r.includes(s))}return!1}function $Tt({text:e,className:t,allowRawHtml:n=!0,streaming:i=!1}){const{t:r}=Te("conversation"),s=p.useContext(Aje),[o,l]=p.useState(null),c=(f,h)=>{if(f.src)return f.src;if(h){const m=b=>{var v;if(!b)return null;if(b.type==="source"&&((v=b.properties)!=null&&v.src))return b.properties.src;if(b.children)for(const y of b.children){const w=m(y);if(w)return w}return null},g=m({children:h});if(g)return g}return""},u=f=>{try{const m=new URL(f).pathname.split("/");return m[m.length-1]||"video.mp4"}catch{return"video.mp4"}},d=f=>f?Array.isArray(f)?f.map(h=>(h==null?void 0:h.value)||"").join("")||"video":(f==null?void 0:f.value)||"video":"video";return a.jsxs("div",{className:t?`md ${t}`:"md",children:[a.jsx(qPe,{disallowedElements:s?["file-card","personal-drive-enable-card"]:void 0,remarkPlugins:[bDe],rehypePlugins:n?[JAt,sne]:[sne],components:{pre:({node:f,children:h,...m})=>{const g=MTt(h);if(g==="mermaid"||g==="echarts"){const b=s9(h).replace(/\n$/,"");return a.jsx(DTt,{label:g==="mermaid"?"Mermaid":"ECharts",language:g,source:b,streaming:i,children:g==="mermaid"?a.jsx(_Tt,{source:b}):a.jsx(STt,{source:b})})}return a.jsx("pre",{...m,children:h})},a:({node:f,...h})=>{const m=h.href,g=s&&zst(m);if(g)return a.jsx(Vst,{...s,path:g,children:h.children});if(m&&(KMe(m)||LTt(f))){const b=m,v=d(f==null?void 0:f.children);return a.jsxs("div",{className:"video-container",children:[a.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.playVideo",{name:v}),onClick:()=>l({src:b,title:v}),children:[a.jsx("video",{src:b,playsInline:!0,className:"video-thumbnail",preload:"metadata"}),a.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:a.jsx(iE,{})})]}),a.jsx("div",{className:"video-caption",children:a.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"video-link-text",children:v})})]})}return a.jsx("a",{...h,target:"_blank",rel:"noopener noreferrer"})},img:({node:f,src:h,alt:m,...g})=>{const b=a.jsx("img",{...g,src:h,alt:m??"",loading:"lazy"});return h?a.jsx(MAe,{src:h,children:a.jsxs("button",{type:"button",className:"image-preview-trigger","aria-label":r("markdown.enlargeImage",{name:m||r("markdown.image")}),children:[b,a.jsx("span",{className:"image-preview-hint","aria-hidden":"true",children:a.jsx(iE,{})})]})}):b},video:({node:f,src:h,children:m,...g})=>{const b=c({src:h},m);return b?a.jsx("div",{className:"video-container",children:a.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.enlargeVideo"),onClick:()=>l({src:b}),children:[a.jsx("video",{src:b,...g,playsInline:!0,className:"video-thumbnail",children:m}),a.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:a.jsx(iE,{})})]})}):a.jsx("video",{src:h,controls:!0,playsInline:!0,className:"video-inline",...g,children:m})}},children:e}),o&&a.jsx("div",{className:"video-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":r("markdown.videoPreview"),onClick:()=>l(null),children:a.jsxs("div",{className:"video-viewer",onClick:f=>f.stopPropagation(),children:[a.jsxs("div",{className:"video-viewer-header",children:[a.jsx("div",{className:"video-viewer-title",children:o.title||u(o.src)}),a.jsxs("nav",{className:"video-viewer-nav",children:[a.jsx("a",{href:o.src,download:o.title||u(o.src),"aria-label":r("markdown.downloadVideo"),title:r("markdown.downloadVideo"),className:"video-viewer-download",children:a.jsx(tM,{})}),a.jsx("button",{type:"button",className:"video-viewer-close","aria-label":r("markdown.close"),onClick:()=>l(null),children:a.jsx(Do,{})})]})]}),a.jsx("div",{className:"video-viewer-body",children:a.jsx("video",{src:o.src,controls:!0,autoPlay:!0,playsInline:!0,className:"video-fullscreen"})})]})})]})}const Td=p.memo($Tt);function P4(e){return(e==null?void 0:e.trim())||Tb("resourceMetadata.unknownSource")}function GMe(e){return(e==null?void 0:e.trim())||Tb("resourceMetadata.unknownCreator")}function FTt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M5 5.5A2.5 2.5 0 0 1 7.5 3H19v16H7.5A2.5 2.5 0 0 0 5 21.5v-16Z"}),a.jsx("path",{d:"M5 18.5A2.5 2.5 0 0 1 7.5 16H19"}),a.jsx("path",{d:"M9 7h6M9 10h4"})]})}function BTt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M6 3h8l4 4v14H6V3Z"}),a.jsx("path",{d:"M14 3v5h5M9 12h6M9 16h6"})]})}function UTt(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m7 7 10 10M17 7 7 17"})})}function QTt(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"M12 5v14M5 12h14"})})}function yT({title:e,children:t,onClose:n,busy:i=!1,className:r=""}){const{t:s}=Te("ui"),o=p.useId(),l=p.useRef(null),c=p.useRef(null),u=p.useRef(i),d=p.useRef(n);return p.useEffect(()=>{u.current=i,d.current=n},[i,n]),p.useEffect(()=>{var g;const f=document.activeElement instanceof HTMLElement?document.activeElement:null,h=document.body.style.overflow;document.body.style.overflow="hidden",(g=l.current)==null||g.focus();const m=b=>{if(b.key==="Escape"&&!u.current){d.current();return}if(b.key!=="Tab")return;const v=c.current;if(!v)return;const y=Array.from(v.querySelectorAll('button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), a[href], audio[controls], video[controls], iframe, [tabindex]:not([tabindex="-1"])')).filter(O=>O.getClientRects().length>0);if(y.length===0){b.preventDefault();return}const w=y[0],x=y[y.length-1];b.shiftKey&&(document.activeElement===w||!v.contains(document.activeElement))?(b.preventDefault(),x.focus()):!b.shiftKey&&(document.activeElement===x||!v.contains(document.activeElement))&&(b.preventDefault(),w.focus())};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m),document.body.style.overflow=h,f!=null&&f.isConnected&&f.focus()}},[]),yi.createPortal(a.jsx("div",{className:"knowledge-dialog-backdrop",onMouseDown:f=>{f.target===f.currentTarget&&!i&&n()},children:a.jsxs("section",{ref:c,className:`knowledge-dialog${r?` ${r}`:""}`,role:"dialog","aria-modal":"true","aria-labelledby":o,"aria-busy":i||void 0,children:[a.jsxs("header",{className:"knowledge-dialog__header",children:[a.jsx("h2",{id:o,children:e}),a.jsx("button",{ref:l,type:"button",onClick:n,disabled:i,"aria-label":s("common.close"),children:a.jsx(UTt,{})})]}),t]})}),document.body)}function AC({message:e}){return e?a.jsx("div",{className:"knowledge-form-error",role:"alert",children:e}):null}function a9(e){return e instanceof DOMException&&e.name==="AbortError"}function zTt(e,t){if(!e)return"";const n=Date.parse(e);return Number.isFinite(n)?new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(n):e}const XMe=[".jpg",".jpeg",".png"].join(","),VTt=new Set(XMe.split(",")),YMe=[".pdf",".pptx",".docx",".xlsx",".txt"].join(","),HTt=new Set(YMe.split(",")),qTt=200*1024*1024;function o9(e){const t=e.lastIndexOf(".");return t<0?"":e.slice(t).toLocaleLowerCase()}function WTt(e,t,n){return e.size>qTt?n("knowledge.errors.fileTooLarge"):t==="image"?VTt.has(o9(e.name))?"":n("knowledge.errors.invalidImageType"):HTt.has(o9(e.name))?"":n("knowledge.errors.invalidDocumentType")}function aq(e){return e<=0?"-":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function l9(e){var r;const t=e.type.trim().replace(/^\./,"");if(t)return t.toUpperCase();const n=e.name.trim(),i=n.includes(".")?(r=n.split(".").pop())==null?void 0:r.trim():"";return i?i.toUpperCase():"-"}function KTt({region:e,onClose:t,onCreated:n}){const{t:i}=Te("ui"),[r,s]=p.useState(""),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(""),g=r.trim(),b=!!(g&&!/^[A-Za-z][A-Za-z0-9_]{0,47}$/.test(g)),v=async y=>{if(y.preventDefault(),u(!0),!g||b)return;f(!0),m("");const w={name:g,description:o.trim()||void 0,region:e};try{n(await jbt(w))}catch(x){m(Cl(x,i("knowledge.errors.createBase")))}finally{f(!1)}};return a.jsx(yT,{title:i("knowledge.createBase"),onClose:t,busy:d,children:a.jsxs("form",{onSubmit:y=>void v(y),children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsxs("label",{children:[a.jsx("span",{children:i("common.name")}),a.jsx("input",{autoFocus:!0,value:r,maxLength:48,"aria-invalid":c&&b||void 0,"aria-describedby":"knowledge-name-help",onBlur:()=>u(!0),onChange:y=>s(y.target.value)})]}),a.jsx("p",{id:"knowledge-name-help",className:`knowledge-dialog__note${c&&b?" is-error":""}`,role:c&&b?"alert":void 0,children:i(c&&b?"knowledge.invalidName":"knowledge.nameHelp")}),a.jsxs("label",{children:[a.jsx("span",{children:i("knowledge.optionalDescription")}),a.jsx("textarea",{value:o,maxLength:80,onChange:y=>l(y.target.value)})]}),a.jsx(AC,{message:h})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:d,children:i("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:d||!g||b,children:i(d?"common.creating":"common.create")})]})]})})}function GTt({item:e,onClose:t,onUpdated:n}){const{t:i}=Te("ui"),[r,s]=p.useState(e.description),[o,l]=p.useState(!1),[c,u]=p.useState(""),d=async f=>{f.preventDefault(),l(!0),u("");try{n(await Nbt(e.id,e.region,{description:r.trim()}))}catch(h){u(Cl(h,i("knowledge.errors.updateBase")))}finally{l(!1)}};return a.jsx(yT,{title:i("knowledge.editBase"),onClose:t,busy:o,children:a.jsxs("form",{onSubmit:f=>void d(f),children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsxs("label",{children:[a.jsx("span",{children:i("common.name")}),a.jsx("input",{value:e.name,disabled:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:i("common.description")}),a.jsx("textarea",{autoFocus:!0,value:r,maxLength:80,onChange:f=>s(f.target.value)})]}),a.jsx("p",{className:"knowledge-dialog__note",children:i("knowledge.descriptionOnly")}),a.jsx(AC,{message:c})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:o,children:i("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:o,children:i(o?"common.saving":"common.save")})]})]})})}function ZMe(e,t){if(!e.trim())return{};const n=JSON.parse(e);if(!n||Array.isArray(n)||typeof n!="object")throw new Error(t);return n}function XTt({base:e,onClose:t,onCreated:n,onAssociationInvalid:i}){const{t:r}=Te("ui"),[s,o]=p.useState("document"),[l,c]=p.useState(""),[u,d]=p.useState(""),[f,h]=p.useState(""),[m,g]=p.useState(null),[b,v]=p.useState(!1),[y,w]=p.useState("{}"),[x,O]=p.useState(""),[k,S]=p.useState(""),[C,E]=p.useState(null),j=p.useRef(null),T=p.useRef(null),R=p.useRef(null),A=p.useRef(0),N=!!x;p.useEffect(()=>{var L;C&&!N&&((L=R.current)==null||L.focus())},[N,C]);const P=L=>{N||L===s||(o(L),g(null),h(""),c(""),d(""),S(""),E(null),v(!1),A.current=0,j.current&&(j.current.value=""))},I=L=>{if(!L||s==="web")return;const F=WTt(L,s,r);if(F){g(null),c(""),d(""),S(F);return}g(L),S(""),c(L.name.replace(/\.[^.]+$/,"")),d(o9(L.name).slice(1))},D=async L=>{if(L.preventDefault(),s==="web"?!f.trim():!m)return;let F;try{F=ZMe(y,r("knowledge.errors.metadataObject"))}catch(M){S(Cl(M,r("knowledge.errors.metadataFormat")));return}O(s==="web"?C?"save":"preview":"upload"),S("");try{if(s==="web")if(C){const M={sourceType:"url",metadata:C.metadata,url:C.preview.url,sourceTitle:C.preview.name,sourceMarkdown:C.preview.sourceMarkdown};await Dbt(e.id,e.region,M),n()}else{const M=await Mbt(e.id,e.region,{url:f.trim()});if(!M.sourceMarkdown.trim())throw new Error(r("knowledge.errors.noWebPreview"));E({preview:M,metadata:F})}else m&&(await Lbt(e.id,e.region,{file:m,name:l.trim()||void 0,documentType:u.trim()||void 0,metadata:F}),n())}catch(M){M instanceof bM&&M.errorCode===sPe?i(M):S(Cl(M,r(s==="web"?C?"knowledge.errors.addWeb":"knowledge.errors.previewWeb":"knowledge.errors.uploadFile")))}finally{O("")}},_=()=>{N||(E(null),S(""),requestAnimationFrame(()=>{var L;return(L=T.current)==null?void 0:L.focus()}))};return a.jsx(yT,{title:r(C?"knowledge.previewWeb":"knowledge.addData"),onClose:t,busy:N,className:C?"knowledge-dialog--preview knowledge-dialog--web-confirm":"",children:a.jsx("form",{onSubmit:L=>void D(L),children:C?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"knowledge-preview knowledge-web-preview",children:[a.jsxs("div",{className:"knowledge-preview__meta",children:[a.jsx("strong",{title:C.preview.name,children:C.preview.name}),a.jsx("a",{href:C.preview.url,target:"_blank",rel:"noopener noreferrer",children:r("knowledge.openOriginalWeb")})]}),a.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:a.jsx("div",{className:"knowledge-preview__markdown-shell",children:a.jsx(Td,{text:C.preview.sourceMarkdown,allowRawHtml:!1,className:"knowledge-preview__markdown"})})}),k?a.jsx("div",{className:"knowledge-web-preview__error",children:a.jsx(AC,{message:k})}):null]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",className:"is-back",onClick:_,disabled:N,children:r("knowledge.backToEdit")}),a.jsx("button",{type:"button",onClick:t,disabled:N,children:r("common.cancel")}),a.jsx("button",{ref:R,type:"submit",className:"is-primary",disabled:N,children:r(x==="save"?"common.adding":"knowledge.confirmAdd")})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsx("div",{className:"knowledge-source-tabs",role:"tablist","aria-label":r("knowledge.source"),children:[["image",r("knowledge.image")],["document",r("knowledge.documentFile")],["web",r("knowledge.webPage")]].map(([L,F])=>a.jsx("button",{type:"button",role:"tab",id:`knowledge-source-${L}-tab`,"aria-controls":`knowledge-source-${L}-panel`,"aria-selected":s===L,tabIndex:s===L?0:-1,className:s===L?"is-active":"",disabled:N,onClick:()=>P(L),onKeyDown:M=>{const V=["image","document","web"];if(!["ArrowLeft","ArrowRight","Home","End"].includes(M.key))return;M.preventDefault();const q=V.indexOf(L),U=M.key==="Home"?V[0]:M.key==="End"?V[V.length-1]:V[(q+(M.key==="ArrowRight"?1:-1)+V.length)%V.length];P(U),requestAnimationFrame(()=>{var J;return(J=document.getElementById(`knowledge-source-${U}-tab`))==null?void 0:J.focus()})},children:F},L))}),a.jsx("div",{id:`knowledge-source-${s}-panel`,className:"knowledge-source-panel",role:"tabpanel","aria-labelledby":`knowledge-source-${s}-tab`,children:s==="web"?a.jsxs(a.Fragment,{children:[a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.webUrl")}),a.jsx("input",{ref:T,autoFocus:!0,type:"url",value:f,disabled:N,onChange:L=>{h(L.target.value),S("")},placeholder:"https://example.com/article"})]}),a.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:x==="preview"?a.jsx(fn,{children:r("knowledge.generatingWebPreview")}):null})]}):a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:j,className:"knowledge-upload-input",type:"file","aria-label":r("knowledge.selectFile"),accept:s==="image"?XMe:YMe,disabled:N,onChange:L=>{var F;I(((F=L.currentTarget.files)==null?void 0:F[0])??null),L.currentTarget.value=""}}),a.jsxs("button",{type:"button",className:`knowledge-upload-dropzone${b?" is-dragging":""}${m?" is-ready":""}`,disabled:N,onClick:()=>{var L;return(L=j.current)==null?void 0:L.click()},onDragEnter:L=>{L.preventDefault(),!N&&(A.current+=1,v(!0))},onDragOver:L=>{L.preventDefault(),N||(L.dataTransfer.dropEffect="copy")},onDragLeave:L=>{L.preventDefault(),A.current=Math.max(0,A.current-1),A.current===0&&v(!1)},onDrop:L=>{var F;L.preventDefault(),A.current=0,v(!1),N||I(((F=L.dataTransfer.files)==null?void 0:F[0])??null)},children:[a.jsx("strong",{children:m?m.name:r("knowledge.selectOrDropFile")}),a.jsx("span",{children:m?r("knowledge.selectedFile",{size:aq(m.size)}):r(s==="image"?"knowledge.imageFileHelp":"knowledge.documentFileHelp")})]}),a.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:N?a.jsx(fn,{children:r("knowledge.uploadingFile")}):null})]})}),s!=="web"?a.jsxs("div",{className:"knowledge-dialog__fields",children:[a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.optionalName")}),a.jsx("input",{value:l,disabled:N,maxLength:256,onChange:L=>c(L.target.value)})]}),a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.optionalType")}),a.jsx("input",{value:u,disabled:N,maxLength:64,onChange:L=>d(L.target.value),placeholder:"pdf, docx, png"})]})]}):null,a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.metadataJson")}),a.jsx("textarea",{className:"is-code",value:y,disabled:N,onChange:L=>w(L.target.value),spellCheck:!1})]}),a.jsx(AC,{message:k})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:N,children:r("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:N||(s==="web"?!f.trim():!m),children:r(N?s==="web"?"common.generating":"common.uploading":s==="web"?"knowledge.generatePreview":"knowledge.uploadFile")})]})]})})})}function YTt({base:e,item:t,onClose:n,onUpdated:i}){const{t:r}=Te("ui"),[s,o]=p.useState(()=>JSON.stringify(t.metadata??{},null,2)),[l,c]=p.useState(!1),[u,d]=p.useState(""),f=async h=>{h.preventDefault();let m;try{m=ZMe(s,r("knowledge.errors.metadataObject"))}catch(g){d(Cl(g,r("knowledge.errors.metadataFormat")));return}c(!0),d("");try{i(await $bt(e.id,t.id,e.region,{metadata:m}))}catch(g){d(Cl(g,r("knowledge.errors.updateDocument")))}finally{c(!1)}};return a.jsx(yT,{title:r("knowledge.editMetadata"),onClose:n,busy:l,children:a.jsxs("form",{onSubmit:h=>void f(h),children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.knowledge")}),a.jsx("input",{value:t.name||t.id,disabled:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.metadataJson")}),a.jsx("textarea",{autoFocus:!0,className:"is-code knowledge-metadata-editor",value:s,onChange:h=>o(h.target.value),spellCheck:!1})]}),a.jsx(AC,{message:u})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:n,disabled:l,children:r("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:l,children:r(l?"common.saving":"common.save")})]})]})})}const JMe=new Set(["avif","bmp","gif","jpeg","jpg","png","svg","webp"]),eLe=new Set(["aac","flac","m4a","mp3","ogg","wav","webm"]),tLe=new Set(["m4v","mov","mp4","mpeg","mpg","ogg","webm"]),ZTt=new Set(["pdf"]),JTt=new Set(["doc","docx","ppt","pptx","xls","xlsx"]),e2t=new Set(["creating","indexing","pending","processing","queued","submitted"]),t2t=new Set(["error","failed","unavailable"]);function Ane(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function j_(e){if(e==null||e==="")return"-";if(["string","number","boolean"].includes(typeof e))return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function n2t(e,t){if(Array.isArray(e)){if(e.length===0)return null;const r=e.map(Ane);if(r.some(s=>Object.keys(s).length>0)){const s=[...new Set(r.flatMap(o=>Object.keys(o)))];return{columns:s,rows:r.map(o=>s.map(l=>j_(o[l])))}}return{columns:[t("knowledge.value")],rows:e.map(s=>[j_(s)])}}const n=Ane(e),i=Object.entries(n);if(i.length===0)return null;if(i.every(([,r])=>Array.isArray(r))){const r=i.map(([o])=>o),s=Math.max(...i.map(([,o])=>o.length));return{columns:r,rows:Array.from({length:s},(o,l)=>i.map(([,c])=>j_(c[l])))}}return{columns:[t("knowledge.field"),t("knowledge.value")],rows:i.map(([r,s])=>[r,j_(s)])}}function nLe(e){const t=e.trim();if(!t||t.startsWith("//"))return"";if(t.startsWith("/"))return t;try{const n=new URL(t);return["http:","https:"].includes(n.protocol)?n.href:""}catch{return""}}function i2t(e){const t=nLe(e);return t.startsWith("http://")||t.startsWith("https://")?t:""}function r2t(e){var r;const t=e.attachmentType.trim().toLocaleLowerCase();if(t==="image"||t==="doc-image"||t.startsWith("image/"))return"image";if(t==="audio"||t.startsWith("audio/"))return"audio";if(t==="video"||t.startsWith("video/"))return"video";if(t==="pdf"||t==="application/pdf")return"pdf";const n=e.attachmentUrl.split(/[?#]/,1)[0],i=n.includes(".")?((r=n.split(".").pop())==null?void 0:r.toLocaleLowerCase())??"":"";return JMe.has(i)?"image":eLe.has(i)?"audio":tLe.has(i)?"video":ZTt.has(i)?"pdf":t||i?"file":"none"}function s2t(e,t){const n=e.status.trim().toLocaleLowerCase();if(e2t.has(n))return{title:t("knowledge.preview.processingTitle"),detail:t("knowledge.preview.processingDetail")};if(t2t.has(n))return{title:t("knowledge.preview.failedTitle"),detail:t("knowledge.preview.failedDetail")};const i=l9(e).toLocaleLowerCase();return i==="pdf"||JTt.has(i)?{title:t("knowledge.preview.noParsedTitle"),detail:t("knowledge.preview.noParsedDetail")}:JMe.has(i)||eLe.has(i)||tLe.has(i)?{title:t("knowledge.preview.noMediaTitle"),detail:t("knowledge.preview.noMediaDetail")}:{title:t("knowledge.preview.noDataTitle"),detail:t("knowledge.preview.noDataDetail")}}function a2t({chunk:e}){const{t}=Te("ui"),[n,i]=p.useState(!1),r=nLe(e.attachmentUrl),s=r2t(e);return!r||s==="none"?null:n?a.jsx("div",{className:"knowledge-preview__attachment-error",children:t("knowledge.preview.attachmentError")}):s==="image"?a.jsx("img",{className:"knowledge-preview__image",src:r,alt:e.title||t("knowledge.preview.imageAlt"),loading:"lazy",onError:()=>i(!0)}):s==="audio"?a.jsx("audio",{className:"knowledge-preview__audio",src:r,controls:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.audioUnsupported")}):s==="video"?a.jsx("video",{className:"knowledge-preview__video",src:r,controls:!0,playsInline:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.videoUnsupported")}):s==="pdf"?a.jsxs("div",{className:"knowledge-preview__pdf",children:[a.jsx("iframe",{src:r,title:e.title?t("knowledge.preview.namedPdf",{name:e.title}):t("knowledge.preview.pdf"),sandbox:"",referrerPolicy:"no-referrer",onError:()=>i(!0)}),a.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openPdf")})]}):a.jsxs("div",{className:"knowledge-preview__file-fallback",children:[a.jsx("p",{children:t("knowledge.preview.fileUnsupported")}),a.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openOriginalFile")})]})}function o2t({base:e,item:t,onClose:n}){const{t:i}=Te("ui"),[r,s]=p.useState([]),[o,l]=p.useState(t),[c,u]=p.useState(""),[d,f]=p.useState(!0),[h,m]=p.useState(!1),[g,b]=p.useState(!1),[v,y]=p.useState(""),w=p.useRef(0),x=p.useRef(null),O=p.useCallback(async(E=0)=>{var R;(R=x.current)==null||R.abort();const j=new AbortController;x.current=j;const T=w.current+1;w.current=T,E>0?m(!0):f(!0),y(""),E===0&&(s([]),b(!1));try{const A=await Pbt(e.id,t.id,{region:e.region,offset:E,signal:j.signal});if(w.current!==T)return;l(A.document.id?A.document:t),u(A.sourceMarkdown||A.document.sourceMarkdown),s(N=>E>0?[...N,...A.chunks]:A.chunks),b(A.hasMore)}catch(A){!a9(A)&&w.current===T&&y(Cl(A,i("knowledge.errors.loadPreview")))}finally{w.current===T&&(f(!1),m(!1))}},[e.id,e.region,t,i]);p.useEffect(()=>(O(),()=>{var E;(E=x.current)==null||E.abort(),w.current+=1}),[O]);const k=i2t(o.url||t.url),S=s2t(o,i),C=o.metadata._veadk_content_format==="markdown";return a.jsx(yT,{title:o.name||t.name||t.id,onClose:n,className:"knowledge-dialog--preview",children:a.jsxs("div",{className:"knowledge-preview",children:[o.sizeBytes>0||k?a.jsxs("div",{className:"knowledge-preview__meta",children:[o.sizeBytes>0?a.jsx("span",{children:aq(o.sizeBytes)}):null,k?a.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",children:i("knowledge.openOriginalWeb")}):null]}):null,a.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:c?a.jsx("div",{className:"knowledge-preview__markdown-shell",children:a.jsx(Td,{text:c,allowRawHtml:!1,className:"knowledge-preview__markdown"})}):d?a.jsx("div",{className:"knowledge-preview__state",role:"status",children:a.jsx(fn,{as:"span",duration:2.4,children:i("knowledge.preview.loading")})}):v&&r.length===0?a.jsxs("div",{className:"knowledge-preview__state is-error",role:"alert",children:[a.jsx("p",{children:v}),a.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.retry")})]}):r.length===0?a.jsxs("div",{className:"knowledge-preview__state",children:[a.jsx("p",{children:S.title}),a.jsx("span",{children:k?i("knowledge.preview.openOriginalHint"):S.detail}),a.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.reload")})]}):a.jsxs("div",{className:"knowledge-preview__chunks",children:[r.map((E,j)=>{const T=n2t(E.tableFields,i),R=E.id||`${j}:${E.title}`;return a.jsxs("article",{className:"knowledge-preview__chunk",children:[a.jsx("header",{children:a.jsx("h3",{children:E.title||i("knowledge.preview.chunk",{index:j+1})})}),E.content?C?a.jsx(Td,{text:E.content,allowRawHtml:!1,className:"knowledge-preview__markdown"}):a.jsx("p",{className:"knowledge-preview__content",children:E.content}):null,T?a.jsx("div",{className:"knowledge-preview__table-wrap",children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsx("tr",{children:T.columns.map((A,N)=>a.jsx("th",{scope:"col",children:A},`${A}:${N}`))})}),a.jsx("tbody",{children:T.rows.map((A,N)=>a.jsx("tr",{children:A.map((P,I)=>a.jsx("td",{children:P},I))},N))})]})}):null,a.jsx(a2t,{chunk:E})]},R)}),v?a.jsx("div",{className:"knowledge-preview__more-error",role:"alert",children:v}):null,g?a.jsx("button",{type:"button",className:"knowledge-preview__load-more",disabled:h,onClick:()=>void O(r.length),children:h?a.jsx(fn,{as:"span",duration:2.4,children:i("knowledge.preview.loadingMore")}):i("knowledge.preview.loadMore")}):null]})})]})})}function l2t({cloudProvider:e,region:t,active:n=!0,activationRevision:i=0,onDetailChange:r,toolbarLeading:s,toolbarFilters:o}){const{t:l,i18n:c}=Te("ui"),[u,d]=p.useState([]),[f,h]=p.useState({}),[m,g]=p.useState([]),[b,v]=p.useState(""),[y,w]=p.useState("overview"),[x,O]=p.useState(""),[k,S]=p.useState(""),[C,E]=p.useState(!0),[j,T]=p.useState(!1),[R,A]=p.useState(""),[N,P]=p.useState([]),[I,D]=p.useState(!1),[_,L]=p.useState(""),[F,M]=p.useState(""),[V,q]=p.useState(""),[U,J]=p.useState(!1),[z,Z]=p.useState(!1),[ne,W]=p.useState(!1),[G,H]=p.useState(null),[se,Y]=p.useState(null),[X,ie]=p.useState(null),[ee,be]=p.useState(null),[ue,pe]=p.useState(null),[ke,je]=p.useState(!1),Pe=p.useRef(0),Ee=p.useRef(0),ze=p.useRef([]),_e=p.useRef(!1),ae=p.useRef(!1),le=p.useRef(null),ge=p.useRef(null),Oe=p.useRef({}),Se=p.useRef(!1),We=p.useRef(null),Ye=p.useRef(null),ye=p.useRef(null),we=p.useRef(null),Ae=p.useMemo(()=>[t],[t]),He=p.useCallback(Ke=>`${Ke.region}\0${Ke.id}`,[]),Ue=u.find(Ke=>He(Ke)===b)??null,jt=!!(Ue&&V===He(Ue));p.useEffect(()=>{r==null||r(!!Ue)},[r,Ue]),p.useEffect(()=>{w("overview"),S("")},[b]);const Pt=p.useMemo(()=>{const Ke=x.trim().toLocaleLowerCase();return Ke?u.filter(St=>[St.name,St.description,St.ownerLabel,St.providerKnowledgeId].some(qe=>qe.toLocaleLowerCase().includes(Ke))):u},[u,x]),Kt=p.useMemo(()=>{const Ke=k.trim().toLocaleLowerCase();return Ke?N.filter(St=>[St.name,St.id,l9(St)].some(qe=>qe.toLocaleLowerCase().includes(Ke))):N},[k,N]);p.useEffect(()=>{Y(null)},[Ue==null?void 0:Ue.id,Ue==null?void 0:Ue.region]);const Ct=p.useCallback(async(Ke=!1)=>{var nt;if(Ke&&(Se.current||Object.keys(Oe.current).length===0))return;(nt=le.current)==null||nt.abort();const St=new AbortController;le.current=St;const qe=Pe.current+1;Pe.current=qe,Se.current=!0,Ke?T(!0):E(!0),A(""),Ke||g([]);try{const et=await _bt({regions:Ae,nextTokens:Ke?Oe.current:void 0,signal:St.signal});if(Pe.current!==qe)return;d(Et=>Ke?[...Et,...et.items.filter(At=>!Et.some(It=>He(It)===He(At)))]:et.items),Oe.current=et.nextTokens,h(et.nextTokens);const ft=et.failures.map(({region:Et,error:At})=>`${wh(Et,e)}: ${Cl(At,l("common.loadFailed"))}`);g(Et=>Ke?[...new Set([...Et,...ft])]:ft),Ke||v(Et=>et.items.some(At=>He(At)===Et)?Et:"")}catch(et){if(a9(et))return;Pe.current===qe&&(Ke?g(ft=>[...new Set([...ft,Cl(et,l("knowledge.errors.loadMoreBases"))])]):A(Cl(et,l("knowledge.errors.loadBases"))))}finally{Pe.current===qe&&(Se.current=!1,E(!1),T(!1))}},[He,e,Ae,l]),xt=p.useCallback(async(Ke,St=!1)=>{var et;if(St&&_e.current)return;(et=ge.current)==null||et.abort();const qe=new AbortController;ge.current=qe;const nt=Ee.current+1;Ee.current=nt,St||(ze.current=[],ae.current=!1,P([]),J(!1),M("")),_e.current=!0,D(!0),St?M(""):L("");try{const ft=await Ibt(Ke.id,{region:Ke.region,offset:St?ze.current.length:0,signal:qe.signal});if(Ee.current!==nt)return;q(Gt=>Gt===He(Ke)?"":Gt);const Et=ze.current,At=St?[...Et,...ft.items.filter(Gt=>!Gt.id||!Et.some(Xe=>Xe.id===Gt.id))]:ft.items,It=ft.hasMore&&(!St||At.length>Et.length);ze.current=At,ae.current=It,P(At),J(It)}catch(ft){if(a9(ft))return;Ee.current===nt&&(ft instanceof bM&&ft.errorCode===sPe&&(q(He(Ke)),H(At=>At&&He(At)===He(Ke)?null:At)),St?M(Cl(ft,l("knowledge.errors.loadMoreData"))):L(Cl(ft,l("knowledge.errors.loadData"))))}finally{Ee.current===nt&&(_e.current=!1,D(!1))}},[He,l]);p.useEffect(()=>{var Ke;(Ke=le.current)==null||Ke.abort(),Pe.current+=1,Se.current=!1,Oe.current={},d([]),h({}),g([]),v(""),q(""),A(""),E(!0)},[e]),p.useEffect(()=>{if(n)return Ct(),()=>{var Ke;(Ke=le.current)==null||Ke.abort(),Pe.current+=1,Se.current=!1}},[n,i,Ct]),p.useEffect(()=>{var Ke,St;if(!n){(Ke=ge.current)==null||Ke.abort(),Ee.current+=1,_e.current=!1;return}if(!Ue){(St=ge.current)==null||St.abort(),Ee.current+=1,ze.current=[],_e.current=!1,ae.current=!1,P([]),J(!1),M("");return}return xt(Ue),()=>{var qe;(qe=ge.current)==null||qe.abort(),Ee.current+=1,_e.current=!1}},[n,i,Ue==null?void 0:Ue.id,Ue==null?void 0:Ue.region]);const tt=n&&!Ue&&!x.trim()&&!C&&!j&&!R&&Object.keys(f).length>0;p.useEffect(()=>{const Ke=Ye.current,St=We.current;if(!Ke||!St||!tt)return;const qe=new IntersectionObserver(([nt])=>{nt.isIntersecting&&Ct(!0)},{root:St,rootMargin:"240px 0px",threshold:.01});return qe.observe(Ke),()=>qe.disconnect()},[tt,Ct]);const mt=()=>{const Ke=We.current;!Ke||!tt||Ke.scrollHeight-Ke.scrollTop-Ke.clientHeight<=240&&Ct(!0)},Ne=!!(Ue&&N.length>0&&U&&!I&&!F);p.useEffect(()=>{const Ke=we.current,St=ye.current;if(!Ue||!Ke||!St||!Ne)return;const qe=new IntersectionObserver(([nt])=>{nt.isIntersecting&&xt(Ue,!0)},{root:ye.current,rootMargin:"240px 0px",threshold:.01});return qe.observe(Ke),()=>qe.disconnect()},[Ne,xt,Ue==null?void 0:Ue.id,Ue==null?void 0:Ue.region]);const Ot=()=>{const Ke=ye.current;if(!Ue||!Ke||!ae.current||_e.current||F)return;const{scrollHeight:St,scrollTop:qe,clientHeight:nt}=Ke;St-qe-nt<=240&&xt(Ue,!0)},Nt=Ke=>{d(St=>St.map(qe=>He(qe)===He(Ke)?Ke:qe))},Yt=async()=>{if(ee){je(!0);try{await Rbt(ee.id,ee.region),d(Ke=>Ke.filter(St=>He(St)!==He(ee))),q(Ke=>Ke===He(ee)?"":Ke),b===He(ee)&&v(""),be(null)}catch(Ke){A(Cl(Ke,l("knowledge.errors.deleteBase"))),be(null)}finally{je(!1)}}},xn=async()=>{if(!(!Ue||!ue)){je(!0);try{await Fbt(Ue.id,ue.id,Ue.region);const Ke=ze.current.filter(St=>St.id!==ue.id);ze.current=Ke,P(Ke),pe(null)}catch(Ke){L(Cl(Ke,l("knowledge.errors.deleteDocument"))),pe(null)}finally{je(!1)}}};return a.jsxs("section",{className:`knowledge-library${Ue?" is-detail":" resource-collection"}`,"aria-label":l("knowledge.library"),children:[Ue?a.jsx(oT,{className:"knowledge-library__detail",title:Ue.name,description:Ue.description||l("common.noDescription"),identitySeed:Ue.name,backLabel:l("knowledge.backToList"),onBack:()=>v(""),sections:[{key:"overview",label:l("skillCenter.overview"),content:a.jsx("section",{className:"knowledge-overview",children:a.jsxs(bH,{className:"knowledge-overview__summary",children:[a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.provider")}),a.jsx("dd",{children:Ue.providerType||"-"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.knowledgeId")}),a.jsx("dd",{className:"knowledge-keyboard-reveal",tabIndex:0,title:Ue.providerKnowledgeId,children:Ue.providerKnowledgeId||"-"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.project")}),a.jsx("dd",{children:Ue.projectName||"default"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.creator")}),a.jsx("dd",{children:P4(Ue.ownerLabel)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("skillCenter.updatedAt")}),a.jsx("dd",{children:zTt(Ue.updatedAt,c.resolvedLanguage??c.language)||"-"})]})]})})},{key:"data",label:l("knowledge.data"),content:a.jsx("section",{className:"knowledge-documents",children:a.jsx("div",{className:`knowledge-documents__body${N.length>0?" is-table":""}`,"aria-live":"polite",children:I&&N.length===0?a.jsx(cl,{}):_&&N.length===0?a.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[a.jsx("p",{children:_}),jt&&Ue.canManage?a.jsx("button",{type:"button",onClick:()=>be(Ue),children:l("knowledge.deleteInvalidAssociation")}):a.jsx("button",{type:"button",onClick:()=>void xt(Ue),children:l("common.retry")})]}):N.length===0?a.jsxs("div",{className:"knowledge-library__state",children:[a.jsx(BTt,{}),a.jsx("p",{children:l("knowledge.noData")}),Ue.canManage&&a.jsx("button",{type:"button",onClick:()=>H(Ue),children:l("knowledge.addFirstData")})]}):a.jsx(yH,{rows:Kt,rowKey:Ke=>Ke.id,rowLabel:Ke=>Ke.name||Ke.id,columns:[{key:"name",header:l("common.name"),className:"is-primary-column",render:Ke=>a.jsx("span",{title:Ke.name||Ke.id,children:Ke.name||Ke.id})},{key:"format",header:l("knowledge.format"),className:"is-compact-column",render:Ke=>l9(Ke)},{key:"size",header:l("knowledge.size"),className:"is-compact-column",render:Ke=>aq(Ke.sizeBytes)}],searchValue:k,onSearchChange:S,searchPlaceholder:l("knowledge.searchData"),searchLabel:l("knowledge.searchLibraryData"),primaryAction:Ue.canManage?{label:l(jt?"knowledge.associationInvalid":"knowledge.addData"),disabled:jt,title:jt?l("knowledge.providerMissing"):void 0,onClick:()=>H(Ue)}:void 0,rowActions:Ke=>[{label:l("common.preview"),onSelect:()=>Y(Ke)},...Ue.canManage?[{label:l("common.edit"),onSelect:()=>ie(Ke)},{label:l("common.delete"),onSelect:()=>pe(Ke),danger:!0}]:[]],scrollRef:ye,onScroll:Ot,busy:I,emptyLabel:l("knowledge.noMatchingData"),footer:I?a.jsxs("div",{className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:[a.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),a.jsx("span",{children:l("knowledge.loadingMoreData")})]}):F?a.jsxs("div",{className:"knowledge-document-pagination is-error",role:"alert",children:[a.jsx("span",{children:F}),a.jsx("button",{type:"button",onClick:()=>void xt(Ue,!0),children:l("knowledge.retryLoading")})]}):U?a.jsx("div",{ref:we,className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:l("skillCenter.scrollForMore")}):null})})})}],activeSectionKey:y,navigationLabel:l("knowledge.details"),onSectionChange:w,actions:Ue.canManage?a.jsxs(a.Fragment,{children:[a.jsx(_t,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>be(Ue),children:l("common.delete")}),a.jsx(_t,{type:"button",color:"primary",size:"lg",pill:!1,onClick:()=>W(!0),children:l("common.edit")})]}):void 0}):a.jsxs(a.Fragment,{children:[a.jsxs(sb,{className:"knowledge-library__toolbar library-resource-toolbar",children:[s,a.jsxs("div",{className:"resource-toolbar__actions",children:[o,a.jsx(Jp,{value:x,onChange:Ke=>O(Ke.target.value),placeholder:l("knowledge.searchBases"),"aria-label":l("knowledge.searchBases")})]})]}),a.jsxs(em,{ref:We,"aria-live":"polite",onScroll:mt,children:[m.length>0&&!C&&a.jsxs("div",{className:"knowledge-region-warning",role:"status",children:[a.jsx("span",{children:l("knowledge.someBasesFailed")}),a.jsx("button",{type:"button",onClick:()=>void Ct(),children:l("common.retry")})]}),C&&u.length===0?a.jsx(cl,{}):R?a.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[a.jsx("p",{children:R}),a.jsx("button",{type:"button",onClick:()=>void Ct(),children:l("common.retry")})]}):Pt.length===0&&x.trim()?a.jsxs("div",{className:"knowledge-library__state",children:[a.jsx(FTt,{}),a.jsx("p",{children:l("knowledge.noMatchingBases")})]}):a.jsxs(W0,{children:[x.trim()?null:a.jsx(lb,{"aria-label":l("knowledge.createBase"),icon:a.jsx(QTt,{}),onClick:()=>Z(!0),children:l("knowledge.createBase")}),Pt.map(Ke=>a.jsx(G0,{className:"knowledge-card",title:Ke.name,description:Ke.description||l("common.noDescription"),metadata:[{label:l("knowledge.creator"),value:P4(Ke.ownerLabel),title:P4(Ke.ownerLabel)},{label:l("knowledge.project"),value:Ke.projectName||"default",title:Ke.projectName||"default"}],action:{label:V===He(Ke)?l("knowledge.associationInvalid"):l("knowledge.addData"),icon:"plus",disabled:!Ke.canManage||V===He(Ke),title:Ke.canManage?V===He(Ke)?l("knowledge.providerMissing"):void 0:l("knowledge.noManagePermission"),onClick:()=>H(Ke)},detailAction:{label:l("common.viewDetails"),onClick:()=>v(He(Ke))}},He(Ke)))]}),tt||j?a.jsx("div",{ref:Ye,className:"my-agent-load-more",role:"status","aria-live":"polite",children:j?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),a.jsx("span",{children:l("knowledge.loadingMoreBases")})]}):tt?a.jsx("span",{children:l("skillCenter.scrollForMore")}):null}):null]})]}),z&&a.jsx(KTt,{region:t,onClose:()=>Z(!1),onCreated:Ke=>{d(St=>[Ke,...St]),v(He(Ke)),Z(!1)}}),Ue&&ne&&a.jsx(GTt,{item:Ue,onClose:()=>W(!1),onUpdated:Ke=>{Nt(Ke),W(!1)}}),Ue&&se&&a.jsx(o2t,{base:Ue,item:se,onClose:()=>Y(null)}),G&&a.jsx(XTt,{base:G,onClose:()=>H(null),onAssociationInvalid:Ke=>{q(He(G)),Ue&&He(Ue)===He(G)&&L(Cl(Ke,l("knowledge.associationInvalid"))),H(null)},onCreated:()=>{Ue&&He(Ue)===He(G)&&xt(Ue),H(null)}}),Ue&&X&&a.jsx(YTt,{base:Ue,item:X,onClose:()=>ie(null),onUpdated:Ke=>{const St=ze.current.map(qe=>qe.id===Ke.id?Ke:qe);ze.current=St,P(St),ie(null)}}),ee&&a.jsx(Cd,{title:l("knowledge.deleteBaseTitle"),description:l("knowledge.deleteBaseDescription",{name:ee.name}),confirmLabel:l(ke?"common.deleting":"common.delete"),variant:"danger",busy:ke,onCancel:()=>be(null),onConfirm:()=>void Yt()}),ue&&a.jsx(Cd,{title:l("knowledge.deleteDocumentTitle"),description:l("knowledge.deleteDocumentDescription",{name:ue.name||ue.id}),confirmLabel:l(ke?"common.deleting":"common.delete"),variant:"danger",busy:ke,onCancel:()=>pe(null),onConfirm:()=>void xn()})]})}const c2t="_EmptyMessage_1r5gu_1",u2t="_IconBadge_1r5gu_16",d2t="_Title_1r5gu_54",f2t="_Description_1r5gu_69",h2t="_ActionRow_1r5gu_77",vT={EmptyMessage:c2t,IconBadge:u2t,Title:d2t,Description:f2t,ActionRow:h2t},Wn=({children:e,className:t,fill:n="static"})=>a.jsx("div",{className:Ui(vT.EmptyMessage,t),"data-fill":n,children:e}),p2t=({size:e="md",color:t="secondary",children:n,className:i})=>a.jsx("div",{className:Ui(vT.IconBadge,i),"data-size":e,"data-color":t,children:n}),m2t=({children:e,className:t,color:n="secondary"})=>a.jsx("div",{className:Ui(vT.Title,t),"data-color":n,children:e}),g2t=({children:e,className:t})=>a.jsx("div",{className:Ui(vT.Description,t),children:e}),b2t=({children:e,className:t})=>a.jsx("div",{className:Ui(vT.ActionRow,t),children:e});Wn.Icon=p2t;Wn.Title=m2t;Wn.Description=g2t;Wn.ActionRow=b2t;bn.hasResourceBundle("en-US","skills")||bn.addResourceBundle("en-US","skills",zme,!0,!0);bn.hasResourceBundle("zh-CN","skills")||bn.addResourceBundle("zh-CN","skills",Gwe,!0,!0);function en(e,t={}){return bn.t(e,{...t,ns:"skills"})}const y2t="/web/skill-workbench";class c9 extends Error{constructor(t,n,i="SKILL_WORKBENCH_ERROR",r=!1,s="",o,l=""){super(t),this.status=n,this.code=i,this.retryable=r,this.statusText=s,this.originalError=o,this.rawResponse=l,this.name="SkillWorkbenchApiError"}}function Od(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(en("api.invalidFormat",{label:t}));return e}function Tne(e,t){if(e!=null){if(typeof e!="string"||!e.trim()||e.trim().length>256)throw new Error(en("api.invalidFormat",{label:t}));return e.trim()}}function v2t(e){if(e!=null){if(e==="pending"||e==="ready"||e==="failed"||e==="unknown")return e;throw new Error(en("api.invalidFormat",{label:en("api.recoveryStatus")}))}}async function Sh(e,t={},n=ho){return fetch(Ta(`${y2t}${e}`),{...t,headers:uc(t.headers),signal:po(t.signal,n)})}async function oq(e,t){var i;const n=await e.text().catch(()=>"");try{const r=Od(JSON.parse(n),en("api.errorResponse")),s=r.detail&&typeof r.detail=="object"?Od(r.detail,en("api.errorDetails")):r;return new c9(typeof s.message=="string"?s.message:t,e.status,typeof s.code=="string"?s.code:"SKILL_WORKBENCH_ERROR",s.retryable===!0,e.statusText,s.originalError&&typeof s.originalError=="object"?s.originalError:void 0,n)}catch{const r=((i=e.headers.get("content-type"))==null?void 0:i.split(";",1)[0])||en("api.missingContentType");return new c9(en("api.gatewayError",{fallback:t,status:e.status,contentType:r}),e.status,"SKILL_WORKBENCH_ERROR",!1,e.statusText,void 0,n)}}async function ub(e,t){if(!e.ok)throw await oq(e,t);const n=e.headers.get("content-type")??"";if(!n.includes("application/json")){const i=n.split(";",1)[0]||en("api.missingContentType");throw new Error(en("api.nonJson",{fallback:t,status:e.status,contentType:i}))}return e.json()}function x2t(e){return Array.isArray(e)?e.map(t=>{const n=Od(t,en("api.activity")),i=n.kind,r=n.status;if(typeof n.id!="string"||!["status","thinking","message","tool"].includes(String(i))||!["running","done"].includes(String(r)))throw new Error(en("api.invalidActivity"));if(i==="tool"){if(typeof n.name!="string")throw new Error(en("api.invalidToolActivity"));return{id:n.id,kind:i,status:r,name:n.name,...n.input!==void 0?{args:n.input}:{},...n.output!==void 0?{response:n.output}:{}}}if(typeof n.text!="string")throw new Error(en("api.invalidTextActivity"));return{id:n.id,kind:i,status:r,text:n.text}}):[]}function w2t(e){if(e==null)return;const t=Od(e,en("api.publication"));if(typeof t.revision!="number"||typeof t.skillId!="string"||typeof t.version!="string"||!Array.isArray(t.skillSpaceIds)||!t.skillSpaceIds.every(n=>typeof n=="string")||t.disposition!=="create-new"&&t.disposition!=="update-source"||!AD(t.region)||typeof t.projectName!="string")throw new Error(en("api.invalidFormat",{label:en("api.publication")}));return{revision:t.revision,skillId:t.skillId,version:t.version,skillSpaceIds:t.skillSpaceIds,disposition:t.disposition,region:t.region,projectName:t.projectName}}function TC(e){const t=Od(e,en("api.task"));if(typeof t.jobId!="string"||t.operation!=="create"&&t.operation!=="optimize"||typeof t.intent!="string"||typeof t.revision!="number"||typeof t.state!="string")throw new Error(en("api.invalidFormat",{label:en("api.task")}));const n=Array.isArray(t.files)?t.files.flatMap(l=>{const c=Od(l,en("api.file"));return typeof c.path=="string"&&typeof c.size=="number"?[{path:c.path,size:c.size}]:[]}):[];if(!["running","ready","failed","cancelled","expired","published"].includes(t.state))throw new Error(en("api.unknownTaskState"));const r=Tne(t.toolId,"Tool ID"),s=Tne(t.sessionId,"Session ID"),o=v2t(t.recoveryStatus);return{jobId:t.jobId,operation:t.operation,intent:t.intent,...typeof t.model=="string"?{model:t.model}:{},...typeof t.style=="string"?{style:t.style}:{},...typeof t.requestedName=="string"?{requestedName:t.requestedName}:{},revision:t.revision,...r?{toolId:r}:{},...s?{sessionId:s}:{},...typeof t.sessionTtlSeconds=="number"?{sessionTtlSeconds:t.sessionTtlSeconds}:{},...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.recoveryAvailable=="boolean"?{recoveryAvailable:t.recoveryAvailable}:{},...o?{recoveryStatus:o}:{},...typeof t.recoveredFromSnapshot=="boolean"?{recoveredFromSnapshot:t.recoveredFromSnapshot}:{},state:t.state,stage:typeof t.stage=="string"?t.stage:"generating",activities:x2t(t.activities),files:n,...t.source&&typeof t.source=="object"?{source:t.source}:{},...typeof t.name=="string"?{name:t.name}:{},...typeof t.description=="string"?{description:t.description}:{},...typeof t.skillMd=="string"?{skillMd:t.skillMd}:{},...typeof t.error=="string"?{error:t.error}:{},...t.validation&&typeof t.validation=="object"?{validation:t.validation}:{},...t.publication?{publication:w2t(t.publication)}:{}}}async function NM(e){const t=Od(await ub(await Sh("/capabilities",{signal:e}),en("api.loadCapability")),en("api.capability"));return{enabled:t.enabled===!0,reason:typeof t.reason=="string"?t.reason:"",operations:Array.isArray(t.operations)?t.operations.filter(n=>n==="create"||n==="optimize"):[],models:Array.isArray(t.models)?t.models.flatMap(n=>{if(!n||typeof n!="object")return[];const i=n;return typeof i.id=="string"&&typeof i.label=="string"?[{id:i.id,label:i.label}]:[]}):[],styles:t.styles&&typeof t.styles=="object"&&!Array.isArray(t.styles)?Object.fromEntries(Object.entries(t.styles).filter(n=>typeof n[1]=="string")):{},...typeof t.maxUploadBytes=="number"?{maxUploadBytes:t.maxUploadBytes}:{}}}async function O2t(e){if(e.file){const n=new URLSearchParams({operation:"optimize",intent:e.intent});e.jobId&&n.set("job_id",e.jobId),e.model&&n.set("model",e.model),e.style&&n.set("style",e.style),e.name&&n.set("name",e.name);const i=await Sh(`/tasks/from-upload?${n}`,{method:"POST",body:e.file,headers:{"Content-Type":"application/zip"},signal:e.signal},hr);return TC(await ub(i,en("api.startOptimization")))}const t=await Sh("/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e.operation,intent:e.intent,...e.model?{model:e.model}:{},...e.style?{style:e.style}:{},...e.name?{name:e.name}:{},...e.jobId?{jobId:e.jobId}:{},...e.source?{source:{kind:"skill-center",skillId:e.source.skillId,skillName:e.source.name,version:e.source.version,region:e.source.region,projectName:e.source.projectName,skillSpaceId:e.source.skillSpaceId,skillSpaceName:e.source.skillSpaceName}}:{}}),signal:e.signal},hr);return TC(await ub(t,en("api.startTask")))}async function k2t(e,t){return TC(await ub(await Sh(`/tasks/${encodeURIComponent(e)}`,{signal:t}),en("api.loadTask")))}async function D4(e,t,n){const i=new URLSearchParams;i.set("expected_revision",String(t));const r=Od(await ub(await Sh(`/tasks/${encodeURIComponent(e)}/artifact?${i.toString()}`,{signal:n}),en("api.loadArtifact")),en("api.artifact"));if(r.jobId!==e||r.revision!==t||!Number.isSafeInteger(r.revision)||r.revision<1||typeof r.sha256!="string"||!/^[0-9a-f]{64}$/.test(r.sha256)||typeof r.name!="string"||typeof r.description!="string"||!Array.isArray(r.files))throw new Error(en("api.invalidFormat",{label:en("api.artifact")}));const s=r.files.map(o=>{const l=Od(o,en("api.artifactFile"));if(typeof l.path!="string"||typeof l.size!="number"||typeof l.content!="string")throw new Error(en("api.invalidFormat",{label:en("api.artifactFile")}));return{path:l.path,size:l.size,content:l.content}});return{jobId:r.jobId,revision:r.revision,sha256:r.sha256,name:r.name,description:r.description,files:s}}async function M4(e){const t=await Sh(`/tasks/${encodeURIComponent(e.jobId)}/refinements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({intent:e.intent,expectedRevision:e.expectedRevision})},hr);return TC(await ub(t,en("api.refine")))}async function S2t(e){const t=await Sh(`/tasks/${encodeURIComponent(e.jobId)}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedRevision:e.expectedRevision})});return TC(await ub(t,en("api.stop")))}async function E2t(e){const t=await Sh(`/tasks/${encodeURIComponent(e.jobId)}/publish-stream`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson"},body:JSON.stringify({disposition:e.disposition,expectedRevision:e.expectedRevision,expectedArtifactSha256:e.expectedArtifactSha256,skillSpaceIds:e.skillSpaceIds??[],projectName:e.projectName,region:e.region}),signal:e.signal},0);if(!t.ok)throw await oq(t,en("api.publish"));if(!(t.headers.get("content-type")??"").includes("application/x-ndjson"))throw new Error(en("api.nonNdjson"));if(!t.body)throw new Error(en("api.missingStream"));const i=new Set(["preparing","uploading","registering","activating","publishing"]);let r=null,s="";const o=new TextDecoder,l=t.body.getReader(),c=u=>{var h;if(!u.trim())return;const d=Od(JSON.parse(u),en("api.publishProgress"));if(d.type==="progress"){if(typeof d.phase!="string"||!i.has(d.phase)||typeof d.message!="string")throw new Error(en("api.invalidPublishProgress"));(h=e.onProgress)==null||h.call(e,{phase:d.phase,message:d.message});return}if(d.type==="error"){const m=Od(d.error,en("api.publishError"));throw new c9(typeof m.message=="string"?m.message:en("api.publish"),500,typeof m.code=="string"?m.code:"SKILL_PUBLISH_FAILED",m.retryable===!0,"",m.originalError&&typeof m.originalError=="object"?m.originalError:void 0,JSON.stringify(d.error))}if(d.type!=="complete")throw new Error(en("api.unknownPublishEvent"));const f=Od(d.result,en("api.publishResult"));if(typeof f.skillId!="string"||typeof f.version!="string"||!Array.isArray(f.skillSpaceIds)||!f.skillSpaceIds.every(m=>typeof m=="string")||f.disposition!=="create-new"&&f.disposition!=="update-source"||!AD(f.region)||typeof f.projectName!="string")throw new Error(en("api.invalidFormat",{label:en("api.publishResult")}));r={skillId:f.skillId,version:f.version,skillSpaceIds:f.skillSpaceIds,disposition:f.disposition,region:f.region,projectName:f.projectName}};for(;;){const{value:u,done:d}=await l.read();s+=o.decode(u,{stream:!d});const f=s.split(` -`);if(s=f.pop()??"",f.forEach(c),d)break}if(c(s),!r)throw new Error(en("api.streamEnded"));return r}async function C2t(e){await ub(await Sh(`/tasks/${encodeURIComponent(e)}`,{method:"DELETE"}),en("api.deleteTask"))}async function A2t(e,t,n){var c;const i=new URLSearchParams;i.set("expected_revision",String(t)),i.set("expected_sha256",n);const r=await Sh(`/tasks/${encodeURIComponent(e)}/download?${i.toString()}`,{},hr);if(!r.ok)throw await oq(r,en("api.download"));const o=((c=(r.headers.get("content-disposition")??"").match(/filename="([^"]+)"/))==null?void 0:c[1])??"skill.zip",l=URL.createObjectURL(await r.blob());try{const u=document.createElement("a");u.href=l,u.download=o,u.click()}finally{URL.revokeObjectURL(l)}}const iLe=p.createContext(void 0);function ev(e){const t=p.useContext(iLe);if(t===void 0&&!e)throw new Error(Vc(47));return t}const T2t={...mje,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class _2t extends BD{constructor(n,i,r){const s=new cV;super(j2t(n,s,i,r),N2t(s),T2t);Zt(this,"setOpen",(n,i)=>{var f,h;const r=i.reason===mu,s=i.reason===Yw&&i.event.detail===0,o=!n&&(i.reason===T_e||i.reason==null),l=sst(i),c=this.select("activeTriggerId");if(!n&&i.reason===A_e&&i.trigger==null&&c!=null&&(i.trigger=this.context.triggerElements.getById(c)??this.select("activeTriggerElement")??void 0),(h=(f=this.context).onOpenChange)==null||h.call(f,n,i),i.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,i);const u=()=>{const m={open:n,openChangeReason:i.reason};aje(m,n,i.trigger,l()),this.update(m)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Iit,()=>{this.set("stickIfOpen",!1)}),yi.flushSync(u)):u();let d;s?d="click":o?d="dismiss":i.reason===cC&&(d="focus"),this.set("instantType",d)})}}function j2t(e,t,n,i=!1){const r={...fje(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return r.open&&(e==null?void 0:e.mounted)===void 0&&(r.mounted=!0),r.floatingRootContext=hje(t,n,i),r}function N2t(e){return{popupRef:p.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:p.createRef(),beforeContentFocusGuardRef:p.createRef(),stickIfOpenTimeout:new Lu,triggerElements:e}}function _ne({props:e}){const{children:t,open:n,defaultOpen:i=!1,onOpenChange:r,onOpenChangeComplete:s,modal:o=!1,handle:l,triggerId:c,defaultTriggerId:u=null}=e,d=I2t(l,{modal:o,open:i,openProp:n,activeTriggerId:u,triggerIdProp:c});d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",c);const f=d.useState("open"),h=d.useState("mounted"),m=d.useState("payload");d.useContextCallback("onOpenChange",r),d.useContextCallback("onOpenChangeComplete",s),dje(d,f),lje(d);const{forceUnmount:g}=cje(f,d,()=>{d.update({stickIfOpen:!0,openChangeReason:null})});d.useSyncedValues({modal:o}),p.useEffect(()=>{f||d.context.stickIfOpenTimeout.clear()},[d,f]),p.useImperativeHandle(e.actionsRef,()=>({unmount:g,close:()=>d.setOpen(!1,fa(__e))}),[g,d]);const b=f||h;return a.jsxs(iLe.Provider,{value:d,children:[l&&a.jsx(sje,{handle:l,store:d}),b&&a.jsx(P2t,{store:d,modal:o}),typeof t=="function"?t({payload:m}):t]})}function R2t(e){return ev(!0)?a.jsx(_ne,{props:e}):a.jsx(frt,{children:a.jsx(_ne,{props:e})})}function I2t(e,t){const n=rje((i,r)=>new _2t(t,i,r));return p.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function P2t({store:e,modal:t}){const n=e.useState("floatingRootContext"),i=U_e(n,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=i.reference,s=i.floating;return uje(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:s}),null}const D2t=300;function tm(e){return VA(e,"base-ui")}function M2t(e,t){const n=p.useRef(null);function i(s){yi.flushSync(()=>{e.setOpen(!1,fa(cC,s.nativeEvent,s.currentTarget))});const o=cit(n.current);o==null||o.focus()}function r(s){var l;const o=e.select("positionerElement");if(o&&rw(s,o))(l=e.context.beforeContentFocusGuardRef.current)==null||l.focus();else{yi.flushSync(()=>{e.setOpen(!1,fa(cC,s.nativeEvent,s.currentTarget))});let c=lit(e.context.triggerFocusTargetRef.current||t.current);for(;c!==null&&ii(o,c);){const u=c;if(c=Jz(c),c===u)break}c==null||c.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:i,handleFocusTargetFocus:r}}function L2t(e){const t=p.useRef(""),n=p.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:p.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function rLe(e,t){const n=ci((s,o)=>{(typeof e=="function"?e():e)||t(o||(HD?"touch":""))}),{onClick:i,onPointerDown:r}=L2t(n);return p.useMemo(()=>({onClick:i,onPointerDown:r}),[i,r])}const $2t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,disabled:o=!1,nativeButton:l=!0,handle:c,payload:u,openOnHover:d=!1,delay:f=D2t,closeDelay:h=0,id:m,...g}=t,b=ev(!0),y=gje(c)??b;if(!y)throw new Error(Vc(74));const w=tm(m),x=y.useState("isTriggerActive",w),O=y.useState("floatingRootContext"),k=y.useState("isOpenedByTrigger",w),S=y.useState("triggerPopupId",w),C=p.useRef(null),{registerTrigger:E,isMountedByThisTrigger:j}=oje(w,C,y,{payload:u,disabled:o,openOnHover:d,closeDelay:h}),T=y.useState("openChangeReason"),R=y.useState("stickIfOpen"),A=y.useState("openMethod"),N=y.useState("focusManagerModal"),P=fst(O,{enabled:!o&&d&&(A!=="touch"||T!==Yw),mouseOnly:!0,move:!1,handleClose:mst(),restMs:f,delay:{close:h},triggerElementRef:C,isActiveTrigger:x,isClosing:()=>y.select("transitionStatus")==="ending"}),I=B_e(O,{stickIfOpen:R}),D=rLe(()=>y.select("open"),ne=>{y.set("openMethod",ne)}),_=y.useState("triggerProps",j),{getButtonProps:L,buttonRef:F}=GD({disabled:o,native:l}),M={open(ne){return ne&&T===Yw?_st.open(ne):xje.open(ne)}},{preFocusGuardRef:V,handlePreFocusGuardFocus:q,handleFocusTargetFocus:U}=M2t(y,C),z=Ra("button",t,{state:{disabled:o,open:k},ref:[F,n,E,C],props:[I.reference,P,_,D,{[sV]:"",id:w,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":S},g,L],stateAttributesMapping:M}),Z=a.jsx(p.Fragment,{children:z},w);return j&&!N?a.jsxs(p.Fragment,{children:[a.jsx(f0,{ref:V,onFocus:q}),Z,a.jsx(f0,{ref:y.context.triggerFocusTargetRef,onFocus:U})]}):Z}),sLe=p.createContext(void 0);function F2t(){const e=p.useContext(sLe);if(e===void 0)throw new Error(Vc(45));return e}const B2t=p.forwardRef(function(t,n){const{keepMounted:i=!1,...r}=t;return ev().useState("mounted")||i?a.jsx(sLe.Provider,{value:i,children:a.jsx(I_e,{ref:n,...r})}):null}),aLe=p.createContext(void 0);function U2t(){const e=p.useContext(aLe);if(!e)throw new Error(Vc(46));return e}const oLe=p.forwardRef(function(t,n){const{cutout:i,...r}=t;let s;if(i){const o=i.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${o.left}px ${o.top}px,${o.left}px ${o.bottom}px,${o.right}px ${o.bottom}px,${o.right}px ${o.top}px,${o.left}px ${o.top}px)`}return a.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let jne={},Nne={},Rne="";function RM(e,t){return UA(e)?e:t}function Ine(e,t,n){return/hidden|clip/.test(e.getComputedStyle(RM(t,n)).overflowY)}function Q2t(e){if(typeof document>"u")return!1;const t=kr(e);return ta(t).innerWidth-t.documentElement.clientWidth>0}function z2t(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=kr(e),i=n.documentElement,r=n.body,s=RM(i,r),o=s.style.overflowY,l=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",s.style.overflowY="scroll";const c=s.offsetWidth;s.style.overflowY="hidden";const u=s.offsetWidth;return s.style.overflowY=o,i.style.scrollbarGutter=l,c===u}function V2t(e){const t=kr(e),n=t.documentElement,i=t.body,r=RM(n,i),s={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,s)}}function H2t(e){var m;const t=kr(e),n=t.documentElement,i=t.body,r=ta(n);let s=0,o=0,l=!1;const c=_c.create();if(z1&&(((m=r.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function u(){const g=r.getComputedStyle(n),b=r.getComputedStyle(i),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,o=n.scrollLeft,jne={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Rne=n.style.scrollBehavior,Nne={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const x=n.scrollHeight>n.clientHeight,O=n.scrollWidth>n.clientWidth,k=g.overflowY==="scroll"||b.overflowY==="scroll",S=g.overflowX==="scroll"||b.overflowX==="scroll",C=Math.max(0,r.innerWidth-i.clientWidth),E=Math.max(0,r.innerHeight-i.clientHeight),j=parseFloat(b.marginTop)+parseFloat(b.marginBottom),T=parseFloat(b.marginLeft)+parseFloat(b.marginRight),R=RM(n,i);if(l=z2t(e),l){n.style.scrollbarGutter=w,R.style.overflowY="hidden",R.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(x||k)&&(n.style.overflowY="scroll"),(O||S)&&(n.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:j||E?`calc(100dvh - ${j+E}px)`:"100dvh",width:T||C?`calc(100vw - ${T+C}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=s,i.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,jne),Object.assign(i.style,Nne),l||(n.scrollTop=s,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Rne)}function f(){d(),c.request(u)}u();const h=Ni(r,"resize",f);return()=>{c.cancel(),d(),typeof r.removeEventListener=="function"&&h()}}class q2t{constructor(){Zt(this,"lockCount",0);Zt(this,"restore",null);Zt(this,"timeoutLock",Lu.create());Zt(this,"timeoutUnlock",Lu.create());Zt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Zt(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=kr(t),i=n.documentElement,r=n.body,s=ta(i);if(Ine(s,i,r)){const l=new s.MutationObserver(()=>{Ine(s,i,r)||(l.disconnect(),this.restore=null,this.lock(t))}),c={attributes:!0};l.observe(i,c),l.observe(r,c),this.restore=()=>l.disconnect();return}const o=HD||!Q2t(t);this.restore=o?V2t(t):H2t(t)}}const W2t=new q2t;function lLe(e=!0,t=null){Jn(()=>{if(e)return W2t.acquire(t)},[e,t])}const K2t=20;function G2t(e,t,n,i){const[r,s]=p.useState(!1);Jn(()=>{if(!e||!t||n==null){s(!1);return}const o=kr(n).documentElement.clientWidth,l=n.offsetWidth;s(o>0&&l>0&&l>=o-K2t)},[e,t,n]),lLe(e&&(!t||r),i)}const X2t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,anchor:o,positionMethod:l,side:c,align:u,sideOffset:d,alignOffset:f,collisionBoundary:h="clipping-ancestors",collisionPadding:m,arrowPadding:g,sticky:b,disableAnchorTracking:v=!1,collisionAvoidance:y=Fit,...w}=t,x=ev(),O=F2t(),k=urt(),S=x.useState("floatingRootContext"),C=x.useState("mounted"),E=x.useState("open"),j=x.useState("openChangeReason"),T=x.useState("activeTriggerElement"),R=x.useState("modal"),A=x.useState("openMethod"),N=x.useState("positionerElement"),P=x.useState("instantType"),I=x.useState("transitionStatus"),D=x.useState("adaptiveOrigin"),_=p.useRef(null),L=rV(N),F=Ost({anchor:o,floatingRootContext:S,positionMethod:l,mounted:C,side:c,sideOffset:d,align:u,alignOffset:f,arrowPadding:g,collisionBoundary:h,collisionPadding:m,sticky:b,disableAnchorTracking:v,keepMounted:O,nodeId:k,collisionAvoidance:y,adaptiveOrigin:D}),M=S.useState("domReferenceElement");Jn(()=>{const z=M,Z=_.current;if(z&&(_.current=z),Z&&z&&z!==Z){x.set("instantType",void 0);const ne=new AbortController;return L(()=>{x.set("instantType","trigger-change")},ne.signal),()=>{ne.abort()}}},[M,L,x]);const V=R===!0&&j!==mu;G2t(E&&V,A==="touch",N,T);const q=x.useStateSetter("positionerElement"),U={open:E,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:P},J=jst(t,U,{styles:F.positionerStyles,transitionStatus:I,props:w,refs:[n,q],hidden:!C,inert:!E});return a.jsxs(aLe.Provider,{value:F,children:[C&&V&&a.jsx(oLe,{inert:iV(!E),cutout:T}),a.jsx(drt,{id:k,children:J})]})}),Y2t="ArrowUp",Z2t="ArrowDown",J2t="ArrowLeft",e_t="ArrowRight",t_t="Home",n_t="End",cLe=new Set([Y2t,Z2t,J2t,e_t,t_t,n_t]),i_t=p.createContext(void 0);function r_t(e){return p.useContext(i_t)}const s_t=p.createContext(void 0);function a_t(){const[e,t]=p.useState(0),n=ci(()=>(t(r=>r+1),()=>{t(r=>Math.max(0,r-1))}));return{context:p.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}const o_t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,initialFocus:o,finalFocus:l,...c}=t,u=ev(),d=U2t(),f=r_t()!=null,{context:h,hasClosePart:m}=a_t(),g=u.useState("open"),b=u.useState("openMethod"),v=u.useState("instantType"),y=u.useState("transitionStatus"),w=u.useState("popupProps"),x=u.useState("titleElementId"),O=u.useState("descriptionElementId"),k=u.useState("modal"),S=u.useState("mounted"),C=u.useState("openChangeReason"),E=u.useState("activeTriggerElement"),j=u.useState("floatingRootContext"),T=j.useState("floatingId"),R=u.useState("disabled"),A=u.useState("openOnHover"),N=u.useState("closeDelay");zA({open:g,ref:u.context.popupRef,onComplete(){var F,M;g&&((M=(F=u.context).onOpenChangeComplete)==null||M.call(F,!0))}}),ust(j,{enabled:A&&!R,closeDelay:N});const P=o===void 0?ije(u.context.popupRef):o,I=k!==!1&&m;u.useSyncedValue("focusManagerModal",I);const D=u.useStateSetter("popupElement"),_={open:g,side:d.side,align:d.align,instant:v,transitionStatus:y},L=Ra("div",t,{state:_,ref:[n,u.context.popupRef,D],props:[w,{id:T,role:"dialog",...nje,"aria-labelledby":x,"aria-describedby":O,onKeyDown(F){f&&cLe.has(F.key)&&F.stopPropagation()}},Oje(y),c],stateAttributesMapping:wje});return a.jsx(F_e,{context:j,openInteractionType:b,modal:I,disabled:!S||C===mu,initialFocus:P,returnFocus:l,restoreFocus:"popup",previousFocusableElement:Js(E)?E:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:a.jsx(s_t.Provider,{value:h,children:L})})}),l_t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,...o}=t,l=ev(),c=tm(o.id);return l.useSyncedValueWithCleanup("titleElementId",c),Ra("h2",t,{ref:n,props:[{id:c},o]})}),c_t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,...o}=t,l=ev(),c=tm(o.id);return l.useSyncedValueWithCleanup("descriptionElementId",c),Ra("p",t,{ref:n,props:[{id:c},o]})});function Pne(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"10.25",cy:"10.25",r:"6.25"}),a.jsx("path",{d:"M4.15 10.25h12.2M10.25 4c1.65 1.72 2.5 3.8 2.5 6.25s-.85 4.53-2.5 6.25M10.25 4c-1.65 1.72-2.5 3.8-2.5 6.25s.85 4.53 2.5 6.25M14.8 14.8 20 20"})]})}function u_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"3.25",y:"5.25",width:"15.5",height:"13.5",rx:"2.25"}),a.jsx("circle",{cx:"8.1",cy:"9.3",r:"1.35"}),a.jsx("path",{d:"m4.7 16.5 3.65-3.7 2.45 2.25 2.2-2.2 4.35 4.1"}),a.jsx("path",{d:"m19.4 2.75.48 1.37 1.37.48-1.37.48-.48 1.37-.48-1.37-1.37-.48 1.37-.48.48-1.37Z",fill:"currentColor",stroke:"none"})]})}function lq(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{className:"video-generate-icon__body",d:"M3.25 9h17.5v7.35a2.4 2.4 0 0 1-2.4 2.4H5.65a2.4 2.4 0 0 1-2.4-2.4V9Z"}),a.jsxs("g",{className:"video-generate-icon__clapper",children:[a.jsx("path",{d:"M3.25 9V7.65a2.4 2.4 0 0 1 2.4-2.4h12.7a2.4 2.4 0 0 1 2.4 2.4V9H3.25Z"}),a.jsx("path",{d:"M6.75 5.25 9.3 9M12 5.25 14.55 9M17.25 5.25 19.8 9"})]}),a.jsx("path",{d:"m10.25 11.45 4 2.55-4 2.55v-5.1Z"})]})}function d_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M4.25 5.25h15.5v10.5H4.25zM8.25 19.75h7.5M12 15.75v4"}),a.jsx("path",{d:"m7.25 12.75 2.35-2.4 2.15 1.65 3.4-3.6 1.6 1.55"}),a.jsx("circle",{cx:"7.25",cy:"8.4",r:".7",fill:"currentColor",stroke:"none"})]})}function f_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M5 7.4c0-1.55 3.13-2.8 7-2.8s7 1.25 7 2.8-3.13 2.8-7 2.8-7-1.25-7-2.8Z"}),a.jsx("path",{d:"M5 7.4v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8V7.4M5 11.95v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8v-4.55"}),a.jsx("path",{d:"M8.2 12.25h.01M8.2 16.8h.01"})]})}function h_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M4.25 4.25h4.5v15.5h-4.5zM8.75 5.75h5v14h-5zM13.75 4.25h4.1v10.25h-4.1z"}),a.jsx("path",{d:"M5.75 7h1.5M10.25 8.25h2M10.25 11h2M15.15 7h1.3"}),a.jsx("circle",{cx:"17.45",cy:"17.35",r:"2.45"}),a.jsx("path",{d:"m19.25 19.15 1.55 1.55"})]})}function p_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M4.25 6.25h6.25c1 0 1.5.55 1.5 1.45v11.05c0-.9-.5-1.45-1.5-1.45H4.25V6.25Z"}),a.jsx("path",{d:"M19.75 9.1v8.2H13.5c-1 0-1.5.55-1.5 1.45V7.7c0-.9.5-1.45 1.5-1.45h2.15"}),a.jsx("path",{d:"m19 3.2.58 1.62 1.62.58-1.62.58L19 7.6l-.58-1.62-1.62-.58 1.62-.58L19 3.2Z",fill:"currentColor",stroke:"none"})]})}function m_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"m4.2 8.4 1.15 10.2h13.3L19.8 8.4"}),a.jsx("path",{d:"M4.2 8.4h15.6L17.9 5H6.1L4.2 8.4Z"}),a.jsx("path",{d:"M7.2 12.2c1.1-1 2.25 1.25 3.4.25 1.05-.9 2.15 1.3 3.3.25"}),a.jsx("path",{d:"m8.2 15.1 1.45 1.35 1.45-1.35M13.55 16.45h2.35"})]})}function g_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"6",cy:"6.25",r:"2.25"}),a.jsx("circle",{cx:"18",cy:"6.25",r:"2.25"}),a.jsx("circle",{cx:"12",cy:"17.75",r:"2.25"}),a.jsx("path",{d:"m7.7 7.75 2.7 7.55M16.3 7.75l-2.7 7.55M8.25 6.25h7.5"})]})}function Dne(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"9",cy:"8",r:"3"}),a.jsx("path",{d:"M3.75 18.75c.45-3.05 2.2-4.65 5.25-4.65s4.8 1.6 5.25 4.65"}),a.jsx("path",{d:"M17.75 4.25v5.5M15 7h5.5M16 13.25h4.25M18.125 11.125v4.25"})]})}function b_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"4",y:"4.25",width:"16",height:"5",rx:"1.5"}),a.jsx("rect",{x:"4",y:"14.75",width:"16",height:"5",rx:"1.5"}),a.jsx("path",{d:"M7.25 6.75h.01M7.25 17.25h.01M10 6.75h6.5M10 17.25h6.5"})]})}function y_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M6 3.75h8l4 4v12.5H6V3.75Z"}),a.jsx("path",{d:"M14 3.75v4h4M8.75 11h6.5M8.75 14.25h6.5M8.75 17.5h4"})]})}function Mne(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"3.75",y:"4.5",width:"16.5",height:"15",rx:"2.5"}),a.jsx("path",{d:"m7.5 9 2.75 2.5L7.5 14M12.5 14h4"}),a.jsx("path",{d:"M3.75 7.5h16.5",opacity:".62"})]})}function aO(e){return a.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m6 3.25 4.5 4.75L6 12.75"})})}function v_t({value:e}){const{t,i18n:n}=Te("adk"),[i,r]=p.useState(!1),s=f=>f==null?t("developmentRuns.notReported"):f.toLocaleString(n.resolvedLanguage||n.language),o=z2e,l=e.usage,c=(l==null?void 0:l.inputTokens)!=null&&l.cachedInputTokens!=null&&l.cachedInputTokens<=l.inputTokens?l.inputTokens-l.cachedInputTokens:void 0,u=l!=null&&l.inputTokens&&l.cachedInputTokens!=null&&c!=null?`${(l.cachedInputTokens/l.inputTokens*100).toFixed(1)}%`:void 0,d=[["inputTokens",l==null?void 0:l.inputTokens],["cachedInputTokens",l==null?void 0:l.cachedInputTokens],["uncachedInputTokens",c],["cacheWriteInputTokens",l==null?void 0:l.cacheWriteInputTokens],["outputTokens",l==null?void 0:l.outputTokens],["reasoningOutputTokens",l==null?void 0:l.reasoningOutputTokens]];return a.jsxs("div",{className:"development-turn-summary","data-turn-id":e.turnId,children:[a.jsx("span",{children:t(`developmentRuns.turnStatus.${e.status}`)}),a.jsx("span",{children:t("developmentRuns.toolCalls",{count:e.toolCalls})}),a.jsx("span",{children:t("developmentRuns.turnDuration",{duration:o(e.durationMs)})}),a.jsx("span",{title:t("developmentRuns.toolDurationHelp"),children:t(e.toolDurationComplete?"developmentRuns.toolDuration":"developmentRuns.toolDurationPartial",{duration:o(e.toolDurationMs)})}),a.jsxs(R2t,{open:i,onOpenChange:r,children:[a.jsxs($2t,{className:"development-token-trigger",openOnHover:!0,delay:150,closeDelay:150,onFocus:f=>{f.currentTarget.matches(":focus-visible")&&r(!0)},children:[a.jsx("span",{children:"Tokens"}),a.jsx("span",{className:"development-token-value",children:s(l==null?void 0:l.totalTokens)}),e.usageIncomplete&&a.jsxs("span",{children:["· ",t("developmentRuns.partial")]}),a.jsx(aO,{className:"development-token-chevron"})]}),a.jsx(B2t,{children:a.jsx(X2t,{side:"top",align:"end",sideOffset:8,className:"development-token-positioner",children:a.jsxs(o_t,{className:"development-token-popup",initialFocus:!1,finalFocus:!1,children:[a.jsx(l_t,{className:"development-token-title",children:t("developmentRuns.tokenDetails")}),a.jsxs("dl",{children:[a.jsxs("div",{children:[a.jsx("dt",{children:t("developmentRuns.model")}),a.jsx("dd",{children:e.model||t("developmentRuns.notReported")})]}),a.jsxs("div",{children:[a.jsx("dt",{children:t("developmentRuns.totalTokens")}),a.jsx("dd",{children:s(l==null?void 0:l.totalTokens)})]}),d.map(([f,h])=>a.jsxs("div",{children:[a.jsx("dt",{children:t(`developmentRuns.${f}`)}),a.jsx("dd",{children:s(h)})]},f)),a.jsxs("div",{children:[a.jsx("dt",{children:t("developmentRuns.cacheHitRate")}),a.jsx("dd",{children:u||t("developmentRuns.notReported")})]})]}),a.jsxs(c_t,{className:"development-token-note",children:[t("developmentRuns.tokenHelp"),e.usageIncomplete?` ${t("developmentRuns.partialHelp")}`:""]})]})})})]})]})}function cq(e){return a.jsx("svg",{viewBox:"0 0 111 117",fill:"none","aria-hidden":"true",...e,children:a.jsx("path",{d:"M0 5.6016C7.82288e-05 0.621244 6.02226 -1.87314 9.54395 1.64847L40.1289 32.2334L68.5732 3.7891C69.5834 2.77903 70.9533 2.21099 72.3818 2.21097H82.7031C82.7917 2.20658 82.8806 2.20414 82.9697 2.20414H104.775C109.574 2.20427 111.977 8.00691 108.584 11.4004L64.916 55.0664C64.3075 55.8528 63.9436 56.7647 63.8242 57.6993C63.7142 56.4884 63.1964 55.3069 62.2695 54.3799L45.4082 37.5186H45.4072L40.124 32.2354L17.832 54.5284C16.7671 55.5933 16.2416 56.993 16.2549 58.3887C16.2417 59.7843 16.7672 61.1842 17.832 62.2491L39.9287 84.3467L9.54395 114.733C6.0223 118.255 0.000223474 115.761 0 110.78V5.6016ZM63.8018 58.8702C63.8962 59.9086 64.2936 60.9229 64.9961 61.7735L108.591 105.368C111.984 108.762 109.58 114.564 104.781 114.564H94.4336C94.3543 114.568 94.274 114.569 94.1934 114.569H72.3877C70.9592 114.569 69.5892 114.002 68.5791 112.992L39.9336 84.3467L58.4531 65.8282L58.4453 65.8203L62.2695 61.9981C63.1476 61.12 63.6567 60.0136 63.8018 58.8702Z",fill:"currentColor"})})}function IM({kind:e,...t}){return e==="thinking"?a.jsx(cq,{...t}):a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:e==="tool"?a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),a.jsx("path",{d:"m7 9 3 3-3 3m6 0h4"})]}):e==="plan"?a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"m4 7 1.5 1.5L8 6m-4 7 1.5 1.5L8 12M11 7h9m-9 6h9m-9 6h9"}),a.jsx("circle",{cx:"6",cy:"19",r:"1"})]}):a.jsx(a.Fragment,{children:a.jsx("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9zM14 3v6h6M8 13h8m-4-3v6M8 18h8"})})})}function x_t({blocks:e,active:t,status:n,render:i}){const{t:r}=Te("adk"),[s,o]=p.useState(!1),l=[...e].reverse().find(h=>"done"in h&&!h.done),c=e.filter(h=>h.kind==="tool"),u=c.filter(h=>h.durationMs!=null),d=u.reduce((h,m)=>h+(m.durationMs||0),0);let f=r("developmentRuns.processSummary",{count:e.length});return t&&(f=n||((l==null?void 0:l.kind)==="thinking"?r("developmentRuns.thinking"):(l==null?void 0:l.kind)==="tool"?V2e(l):(l==null?void 0:l.kind)==="plan"?r("developmentRuns.plan"):(l==null?void 0:l.kind)==="diff"?r("developmentRuns.diff"):r("developmentRuns.processing"))),a.jsxs("section",{className:"development-process",children:[a.jsxs("button",{type:"button",className:"development-process__toggle","aria-expanded":s,onClick:()=>o(!s),children:[a.jsx(aO,{className:`tool-chevron${s?" is-open":""}`}),a.jsx("span",{className:"tool-icon",children:a.jsx(IM,{kind:(l==null?void 0:l.kind)==="thinking"||(l==null?void 0:l.kind)==="plan"||(l==null?void 0:l.kind)==="diff"?l.kind:"tool"})}),t?a.jsx(fn,{className:"development-process__title","aria-live":"polite",children:f}):a.jsx("span",{className:"development-process__title",children:f}),!t&&c.length>0&&a.jsxs("span",{className:"development-process__duration",children:[r("developmentRuns.toolCalls",{count:c.length}),u.length>0?` · ${r(u.length===c.length?"developmentRuns.toolDuration":"developmentRuns.toolDurationPartial",{duration:z2e(d)})}`:""]})]}),a.jsx("div",{className:"development-process__items",hidden:!s,children:i(e)})]})}function w_t({blocks:e,active:t,status:n="",render:i}){const{t:r}=Te("adk"),s=nnt(e),o=s[s.length-1],l=[...e].reverse().find(u=>u.kind==="progress"),c=n||((l==null?void 0:l.kind)==="progress"?l.text:"");return a.jsxs(a.Fragment,{children:[s.map(u=>u.process?a.jsx(x_t,{blocks:u.blocks,active:t&&u===o,status:c,render:i},u.id):a.jsx("div",{"data-assistant-phase":u.blocks[0].phase,children:i(u.blocks)},u.id)),t&&!(o!=null&&o.process)&&a.jsxs("div",{className:"development-process__status",role:"status",children:[a.jsx("span",{className:"tool-icon",children:a.jsx(IM,{kind:"thinking"})}),a.jsx(fn,{children:c||r("developmentRuns.processing")})]})]})}const O_t={formatDate(e){const t=e.value??e.date??e.timestamp;if(t==null)return"";const n=new Date(t);return isNaN(n.getTime())?String(t):n.toLocaleString()}};function k_t(e,t){if(!t||t==="/")return e;const n=t.replace(/^\//,"").split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));let i=e;for(const r of n){if(i==null||typeof i!="object")return;i=i[r]}return i}function S_t(e){return typeof e=="object"&&e!==null&&typeof e.path=="string"}function E_t(e){return typeof e=="object"&&e!==null&&typeof e.call=="string"}function uq(e,t){if(S_t(e))return k_t(t,e.path);if(E_t(e)){const n=O_t[e.call],i={};for(const[r,s]of Object.entries(e.args??{}))i[r]=uq(s,t);return n?n(i):`[unknown fn: ${e.call}]`}return e}function C_t(e,t){const n=uq(e,t);return n==null?"":typeof n=="string"?n:String(n)}const uLe=new Map;function tv(e,t){uLe.set(e,t)}function A_t(e){return uLe.get(e)}function T_t(e,t,n){const i=t.replace(/^\//,"").split("/").map(s=>s.replace(/~1/g,"/").replace(/~0/g,"~"));let r=e;for(let s=0;suq(i,e.dataModel),resolveString:i=>C_t(i,e.dataModel),dispatchAction:t,render:i=>{if(!i)return null;const r=e.components[i];if(!r)return null;const s=A_t(r.component)??__t;return a.jsx(s,{node:r,ctx:n},i)}};return a.jsx("div",{className:"a2ui-surface","data-a2ui-surface":e.surfaceId,children:n.render(e.rootId)})}function fLe(e){const t=p.useRef(null),n=p.useRef(!0),i=28,r=p.useCallback(()=>{const s=t.current;s&&(n.current=s.scrollHeight-s.scrollTop-s.clientHeight{const s=t.current;s&&n.current&&(s.scrollTop=s.scrollHeight)},[e]),{ref:t,onScroll:r}}function PM({value:e,skillPrefix:t="/",onRemoveSkill:n,onRemoveAgent:i}){const{t:r}=Te("conversation");return e.skills.length===0&&!e.targetAgent?null:a.jsxs("div",{className:"invocation-chips","aria-label":r("invocation.ariaLabel"),children:[e.skills.map(s=>a.jsxs("span",{className:"invocation-chip invocation-chip--skill",title:s.description,children:[a.jsx(hC,{"aria-hidden":!0}),a.jsxs("span",{children:[t,s.name]}),n?a.jsx("button",{type:"button",onClick:()=>n(s.name),"aria-label":r("invocation.removeSkill",{name:s.name}),children:a.jsx(Do,{})}):null]},s.name)),e.targetAgent?a.jsxs("span",{className:"invocation-chip invocation-chip--agent",title:e.targetAgent.description,children:[a.jsx(Mje,{"aria-hidden":!0}),a.jsx("span",{children:e.targetAgent.name}),i?a.jsx("button",{type:"button",onClick:i,"aria-label":r("invocation.removeAgent",{name:e.targetAgent.name}),children:a.jsx(Do,{})}):null]}):null]})}function dq(e=""){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e==="application/pdf"?"pdf":e==="text/markdown"?"markdown":"text"}function hLe(e){var n,i,r,s;const t=dq(e.mimeType);return t==="pdf"?"PDF":t==="markdown"?"MD":t==="video"?((i=(n=e.mimeType)==null?void 0:n.split("/")[1])==null?void 0:i.toUpperCase())??"VIDEO":t==="image"?((s=(r=e.mimeType)==null?void 0:r.split("/")[1])==null?void 0:s.toUpperCase())??"IMAGE":"TXT"}function pLe(e){return e?e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:""}function mLe(e,t){return e.previewUrl?e.previewUrl:e.data?`data:${e.mimeType??"application/octet-stream"};base64,${e.data}`:e.uri?hTe(t,e.uri):""}function N_t({kind:e}){return e==="image"?a.jsx(bV,{}):e==="video"?a.jsx($je,{}):e==="pdf"?a.jsx(Pat,{}):a.jsx(mV,{})}function DM({appName:e,items:t,compact:n=!1,onRemove:i}){const{t:r}=Te("conversation"),[s,o]=p.useState(null);return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`media-grid${n?" media-grid--compact":""}`,children:t.map(l=>{const c=dq(l.mimeType),u=mLe(l,e),d=l.status==="uploading"||l.status==="error"||!u,f=a.jsxs("button",{type:"button",className:"media-card-main",disabled:d,onClick:c==="image"?void 0:()=>o(l),"aria-label":r("media.preview",{name:l.name??r("media.attachment")}),children:[c==="image"&&u?a.jsx("img",{className:"media-card-image",src:u,alt:l.name??r("media.image"),loading:"lazy"}):c==="video"&&u?a.jsxs("div",{className:"media-card-video-container",children:[a.jsx("video",{className:"media-card-video",src:u,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true"}),a.jsx("span",{className:"media-card-video-play",children:a.jsx(Uje,{})})]}):a.jsx("span",{className:"media-card-icon",children:a.jsx(N_t,{kind:c})}),a.jsxs("span",{className:"media-card-copy",children:[a.jsx("span",{className:"media-card-name",children:l.name??r("media.attachment")}),a.jsxs("span",{className:"media-card-meta",children:[a.jsx("span",{className:"media-card-type",children:hLe(l)}),l.status==="uploading"?a.jsxs(a.Fragment,{children:[a.jsx(Fi,{className:"media-card-spinner"})," ",r("media.uploading")]}):l.status==="error"?l.error??r("media.uploadFailed"):pLe(l.sizeBytes)]})]}),!n&&l.status!=="uploading"&&l.status!=="error"?a.jsx(iE,{className:"media-card-open"}):null]});return a.jsxs(Cr.div,{className:`media-card media-card--${c}${l.status==="error"?" media-card--error":""}`,layout:!0,initial:{opacity:0,scale:.985,y:4},animate:{opacity:1,scale:1,y:0},children:[c==="image"&&!d?a.jsx(MAe,{src:u,children:f}):f,i?a.jsx("button",{type:"button",className:"media-card-remove","aria-label":r("media.remove",{name:l.name??r("media.attachment")}),onClick:()=>i(l.id),children:a.jsx(Do,{})}):null]},l.id)})}),a.jsx(ff,{children:s?a.jsx(R_t,{appName:e,item:s,onClose:()=>o(null)}):null})]})}function R_t({appName:e,item:t,onClose:n}){const{t:i}=Te("conversation"),r=p.useMemo(()=>mLe(t,e),[e,t]),s=dq(t.mimeType),[o,l]=p.useState(""),[c,u]=p.useState(s==="text"||s==="markdown"),[d,f]=p.useState("");return p.useEffect(()=>{const h=m=>{m.key==="Escape"&&n()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),p.useEffect(()=>{if(s!=="text"&&s!=="markdown")return;const h=new AbortController;return u(!0),f(""),fetch(r,{signal:h.signal}).then(m=>{if(!m.ok)throw new Error(`HTTP ${m.status}`);return m.text()}).then(l).catch(m=>{h.signal.aborted||f(m instanceof Error?m.message:String(m))}).finally(()=>{h.signal.aborted||u(!1)}),()=>h.abort()},[s,r]),a.jsx(Cr.div,{className:"media-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":i("media.previewDialog",{name:t.name??i("media.attachment")}),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:h=>{h.target===h.currentTarget&&n()},children:a.jsxs(Cr.div,{className:"media-viewer",initial:{opacity:0,y:18,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.99},transition:{type:"spring",stiffness:420,damping:30},children:[a.jsxs("header",{className:"media-viewer-header",children:[a.jsxs("div",{children:[a.jsx("strong",{children:t.name??i("media.attachment")}),a.jsxs("span",{children:[hLe(t),t.sizeBytes?` · ${pLe(t.sizeBytes)}`:""]})]}),a.jsxs("nav",{children:[a.jsx("a",{href:r,download:t.name,"aria-label":i("media.download"),children:a.jsx(tM,{})}),a.jsx("button",{type:"button",onClick:n,"aria-label":i("media.close"),children:a.jsx(Do,{})})]})]}),a.jsxs("div",{className:`media-viewer-body media-viewer-body--${s}`,children:[s==="image"?a.jsx("img",{src:r,alt:t.name??i("media.image")}):null,s==="video"?a.jsx("div",{className:"media-viewer-video-wrapper",children:a.jsx("video",{src:r,controls:!0,autoPlay:!0,playsInline:!0,preload:"auto",className:"media-viewer-video"})}):null,s==="pdf"?a.jsx("iframe",{src:r,title:t.name??"PDF"}):null,c?a.jsxs("div",{className:"media-viewer-loading",children:[a.jsx(Fi,{})," ",i("media.reading")]}):null,!c&&d?a.jsx("div",{className:"media-viewer-loading",children:i("media.loadFailed",{error:d})}):null,!c&&s==="markdown"?a.jsx("div",{className:"media-document",children:a.jsx(Td,{text:o})}):null,!c&&s==="text"?a.jsx("pre",{className:"media-document media-document--plain",children:o}):null]})]})})}function I_t({definition:e,label:t,done:n,open:i,onToggle:r}){const{t:s}=Te("conversation"),o=e.icon,l=n?e.doneLabel:e.runningLabel,c=t??s(`blocks.tools.${e.name}.${n?"done":"running"}`,{defaultValue:l});return a.jsxs("button",{type:"button",className:`builtin-tool-head${n?" is-done":" is-running"}`,"data-tool-tone":e.tone,onClick:r,"aria-expanded":i,children:[a.jsx("span",{className:"builtin-tool-icon","aria-hidden":"true",children:a.jsx(o,{})}),n?a.jsx("span",{className:"builtin-tool-label",children:c}):a.jsx(fn,{className:"builtin-tool-label",duration:2.4,spread:18,"aria-live":"polite",children:c}),a.jsx(aO,{className:`builtin-tool-chevron${i?" is-open":""}`})]})}function Nu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function qn(e){return typeof e=="string"?e:""}function Lne(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function cd(e){return Array.isArray(e)?e:[]}function u9(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{}}const n=Nu(t)??{};return Nu(n.result)??n}function MM(e){if(typeof e=="string")try{return MM(JSON.parse(e))}catch{return e}const t=Nu(e);if(!t)return"";const n=Nu(t.result);return qn(t.error)||qn(t.message)||qn(n==null?void 0:n.error)||qn(n==null?void 0:n.message)}function P_t(e){if(e.kind==="tool")return"tool";if(e.kind==="knowledge_base")return"knowledge_base";const t=Nu(e.metadata),n=qn(t==null?void 0:t.source_type).toLowerCase(),i=qn(e.source).toLowerCase();return n==="skillhub"||i.startsWith("skill_hub:")?"skill_hub":"skill_space"}const gLe={tool:"Tools",knowledge:"AgentKit Knowledge Base",skillCenter:"AgentKit Skill Center",unknownSource:"Unknown source",unnamedResource:"Unnamed resource",unnamedAgent:"Unnamed agent"};function D_t(e,t){return e==="veadk_builtin_tools"?t.tool:e==="agentkit_knowledge"?t.knowledge:e.startsWith("skill_hub:")?`Skill Hub ${e.slice(10)}`:e.startsWith("skill_space:")?`${t.skillCenter} ${e.slice(12)}`:e||t.unknownSource}function M_t(e){return e==="veadk_builtin_tools"?"tool":e==="agentkit_knowledge"?"knowledge_base":e.startsWith("skill_hub:")?"skill_hub":"skill_space"}function L_t(e,t=gLe){const n=u9(e),i=Nu(n.capabilities)??{},r=cd(n.resources).flatMap(o=>{const l=Nu(o);if(!l)return[];const c=l.kind==="tool"?"tool":l.kind==="knowledge_base"?"knowledge_base":"skill";return[{ref:qn(l.ref),kind:c,category:P_t(l),name:qn(l.name)||qn(l.ref)||t.unnamedResource,description:qn(l.description),source:qn(l.source),version:qn(l.version)}]}),s=cd(n.sources).flatMap(o=>{const l=Nu(o);if(!l)return[];const c=qn(l.source),u=qn(l.status),d=u==="error"?"error":u==="skipped"?"skipped":"ok";return[{source:c,category:M_t(c),label:D_t(c,t),status:d,count:Lne(l.count),message:qn(l.message),searchKeywords:cd(l.search_keywords).map(qn).filter(Boolean)}]});return{collectionId:qn(n.collection_id),capabilities:{googleAdkVersion:qn(i.google_adk_version),agentTypes:cd(i.agent_types).map(qn).filter(Boolean),maxOrchestrationDepth:Lne(i.max_orchestration_depth)},resources:r,sources:s,counts:{all:r.length,skill_hub:r.filter(o=>o.category==="skill_hub").length,skill_space:r.filter(o=>o.category==="skill_space").length,knowledge_base:r.filter(o=>o.category==="knowledge_base").length,tool:r.filter(o=>o.category==="tool").length}}}function $_t(e,t){return{resources:e.resources.filter(n=>n.category===t),sources:e.sources.filter(n=>n.category===t)}}function bLe(e,t,n=gLe){const i=u9(e),r=u9(t),s=new Map(cd(r.results).flatMap(d=>{const f=Nu(d),h=qn(f==null?void 0:f.name);return f&&h?[[h,f]]:[]})),o=cd(i.agents).flatMap(d=>{const f=Nu(d),h=qn(f==null?void 0:f.name);return f&&h?[f]:[]}),l=new Set(o.map(d=>qn(d.name))),c=[...s.entries()].filter(([d])=>!l.has(d)).map(([d])=>({name:d})),u=[...o,...c].map(d=>{const f=qn(d.name),h=cd(d.nodes).flatMap(C=>{const E=Nu(C);return E?[E]:[]}),m=qn(d.root_node),g=h.find(C=>qn(C.id)===m),b=h.filter(C=>qn(C.id)!==m).map(C=>({id:qn(C.id)||n.unnamedAgent,type:qn(C.type)||"llm",description:qn(C.description)})),v=s.get(f),y=qn(v==null?void 0:v.status),w=y==="failed"?"failed":y==="completed"?"completed":"running",x=$ne(v==null?void 0:v.resources),O=x.length>0?x:$ne(h.flatMap(C=>cd(C.resources))),k=Fne(v==null?void 0:v.python_tools),S=k.length>0?k:Fne(h.flatMap(C=>cd(C.python_tools)));return{name:f,description:qn(v==null?void 0:v.description)||qn(g==null?void 0:g.description)||qn(d.task),task:qn(d.task),rootType:qn(v==null?void 0:v.root_type)||qn(g==null?void 0:g.type)||"llm",nodeCount:h.length,subAgentCount:b.length,resourceCount:O.length,pythonToolCount:S.length,skills:O.filter(C=>C.kind==="skill"),knowledgeBases:O.filter(C=>C.kind==="knowledge_base"),builtinTools:O.filter(C=>C.kind==="tool"),pythonTools:S,subAgents:b,status:w,output:qn(v==null?void 0:v.output),error:qn(v==null?void 0:v.error)}});return{collectionId:qn(r.collection_id)||qn(i.collection_id),agents:u,completedCount:u.filter(d=>d.status==="completed").length,failedCount:u.filter(d=>d.status==="failed").length,runningCount:u.filter(d=>d.status==="running").length}}function F_t(e,t){return!!MM(t)||bLe(e,t).failedCount>0}function $ne(e){const t=new Set;return cd(e).flatMap(n=>{const i=Nu(n),r=qn(i?i.ref:n);if(!r||t.has(r))return[];t.add(r);const s=qn(i==null?void 0:i.kind),o=s==="tool"||r.startsWith("veadk_tool:")?"tool":s==="knowledge_base"||r.startsWith("agentkit_kb:")?"knowledge_base":"skill",l=r.split(":");return[{ref:r,kind:o,name:qn(i==null?void 0:i.name)||l[l.length-1]||r,description:qn(i==null?void 0:i.description),version:qn(i==null?void 0:i.version),source:qn(i==null?void 0:i.source)}]})}function Fne(e){const t=new Set;return cd(e).flatMap(n=>{const i=Nu(n),r=qn(i==null?void 0:i.name),s=qn(i==null?void 0:i.code),o=`${r}\0${s}`;return!i||!r||t.has(o)?[]:(t.add(o),[{name:r,description:qn(i.description),code:s,entrypoint:qn(i.entrypoint)||r,dependencies:cd(i.dependencies).map(qn).filter(Boolean)}])})}function B_t({branch:e}){return a.jsxs("div",{className:`branch-compare__body${e.status==="running"?" is-streaming":""}`,"aria-live":"polite",children:[e.content?a.jsx(Td,{text:e.content,streaming:e.status==="running"}):null,e.status==="running"?a.jsx("span",{className:"branch-compare__caret","aria-hidden":"true"}):null,e.error?a.jsx("p",{className:"branch-compare__error",children:e.error}):null]})}function U_t({args:e,response:t,status:n,onBranchSelect:i}){const{t:r}=Te("conversation"),s=p.useMemo(()=>Vje(e,t,n),[e,t,n]),[o,l]=p.useState(0);return a.jsxs("section",{className:"branch-compare","aria-label":r("blocks.branchCompare.ariaLabel"),children:[a.jsx("div",{className:"branch-compare__tabs",role:"tablist","aria-label":r("blocks.branchCompare.selectDirection"),children:s.branches.map((c,u)=>a.jsx("button",{className:`branch-compare__tab${o===u?" is-active":""}`,type:"button",role:"tab","aria-selected":o===u,"aria-controls":`branch-compare-panel-${u}`,onClick:()=>l(u),children:a.jsx(Ya,{color:"info",size:"sm",variant:"soft",children:c.label})},`${c.label}:${u}`))}),a.jsx("div",{className:"branch-compare__branches",children:s.branches.map((c,u)=>a.jsxs("article",{className:`branch-compare__branch${o===u?" is-active":""}`,id:`branch-compare-panel-${u}`,role:"tabpanel",children:[a.jsx("header",{className:"branch-compare__head",children:a.jsx(Ya,{color:"info",size:"sm",variant:"soft",children:c.label})}),a.jsx(B_t,{branch:c}),a.jsx("footer",{className:"branch-compare__footer",children:a.jsx(_t,{type:"button",color:"info",variant:"ghost",size:"sm",pill:!1,disabled:c.status!=="completed",onClick:()=>i==null?void 0:i(c),children:r("blocks.branchCompare.continue")})})]},`${c.label}:${u}`))})]})}function yLe({controlled:e,default:t,name:n,state:i="value"}){const{current:r}=p.useRef(e!==void 0),[s,o]=p.useState(t),l=r?e:s,c=p.useCallback(u=>{r||o(u)},[]);return[l,c]}const vLe=p.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Q_t(){return p.useContext(vLe)}function z_t(e){const{children:t,elementsRef:n,labelsRef:i,onMapChange:r}=e,s=ci(r),[,o]=p.useState(!1),l=Ed(H_t).current,c=Ed(V_t).current,u=p.useRef(0),d=p.useRef(!0),f=p.useRef([]),h=p.useRef(null),m=ci(()=>{d.current||(d.current=!0,o(k=>!k))}),g=ci((k,S)=>{c.set(k,S),m()}),b=ci(k=>{c.delete(k),m()}),v=ci(k=>{const S=new Map;return n.current.length=0,i&&(i.current.length=0),k.forEach(C=>{var E,j;S.set(C.element,{...C.registration.metadata??{},index:C.index}),n.current[C.index]=C.element,i&&(i.current[C.index]=C.registration.label!==void 0?C.registration.label:((j=(E=C.registration.textRef)==null?void 0:E.current)==null?void 0:j.textContent)??C.element.textContent)}),u.current=n.current.length,S});function y(k){var E;if((E=h.current)==null||E.disconnect(),h.current=null,typeof MutationObserver!="function"||k.length<2)return;const S=new MutationObserver(j=>{if(!K_t(j))return;let T=null;for(const R of k)if(R.isConnected){if(T&&xLe(T,R)>0){S.disconnect(),m();return}T=R}});h.current=S;const C=new Set;for(let j=1;jS.observe(j,{childList:!0}))}const w=ci(()=>{const[k,S]=q_t(c),C=v(k);y(S),f.current=k,d.current=!1,l.forEach(E=>E(C)),s(C)});Jn(()=>(d.current||v(f.current),()=>{n.current=[],i&&(i.current=[])}),[n,i,v]),Jn(()=>{d.current&&w()}),Jn(()=>()=>{var k;(k=h.current)==null||k.disconnect(),d.current=!0},[]);const x=ci(k=>(l.add(k),()=>{l.delete(k)})),O=p.useMemo(()=>({register:g,unregister:b,subscribeMapChange:x,nextIndexRef:u}),[g,b,x,u]);return a.jsx(vLe.Provider,{value:O,children:t})}function V_t(){return new Map}function H_t(){return new Set}function q_t(e){const t=new Set,n=[],i=[];e.forEach((s,o)=>{if(!o.isConnected)return;const l=s.index,c={index:l??-1,element:o,registration:s};l===null?i.push(c):l>=0&&(t.add(l),n.push(c))});let r=0;return i.sort((s,o)=>xLe(s.element,o.element)),i.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,o)=>s.index-o.index),[n,i.map(s=>s.element)]}function W_t(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function K_t(e){for(const t of e)for(let n=0;nnull},kLe=p.forwardRef(function(t,n){const{render:i,className:r,disabled:s=!1,hiddenUntilFound:o,keepMounted:l,loopFocus:c,onValueChange:u,multiple:d=!1,orientation:f="vertical",value:h,defaultValue:m,style:g,...b}=t,v=p.useMemo(()=>{if(h===void 0)return m??[]},[h,m]),y=p.useRef([]),[w,x]=yLe({controlled:h,default:v,name:"Accordion",state:"value"}),O=ci((E,j,T)=>{if(d)if(j){const R=w.slice();if(R.push(E),u==null||u(R,T),T.isCanceled)return;x(R)}else{const R=w.filter(A=>A!==E);if(u==null||u(R,T),T.isCanceled)return;x(R)}else{const R=w[0]===E?[]:[E];if(u==null||u(R,T),T.isCanceled)return;x(R)}}),k=p.useMemo(()=>({value:w,disabled:s,orientation:f}),[w,s,f]),S=p.useMemo(()=>({disabled:s,handleValueChange:O,hiddenUntilFound:o??!1,keepMounted:l??!1,state:k,value:w}),[s,O,o,l,k,w]),C=Ra("div",t,{state:k,ref:n,props:b,stateAttributesMapping:G_t});return a.jsx(wLe.Provider,{value:S,children:a.jsx(z_t,{elementsRef:y,children:C})})});function X_t(e){const{open:t,defaultOpen:n,onOpenChange:i,disabled:r}=e,[s,o]=yLe({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=tje(s,!0,!0),d=tm(),[f,h]=p.useState(),m=f===null?void 0:f??d,g=ci(b=>{const v=!s,y=fa(Yw,b.nativeEvent);i(v,y),!y.isCanceled&&o(v)});return p.useMemo(()=>({defaultPanelId:d,disabled:r,handleTrigger:g,mounted:l,open:s,panelId:m,setMounted:c,setOpen:o,setPanelIdState:h,transitionStatus:u}),[d,r,g,l,s,m,c,o,h,u])}const SLe=p.createContext(void 0);function ELe(){const e=p.useContext(SLe);if(e===void 0)throw new Error(Vc(15));return e}function Y_t(e={}){const{guess:t,label:n,metadata:i,textRef:r,index:s}=e,{register:o,unregister:l,subscribeMapChange:c,nextIndexRef:u}=Q_t(),d=p.useRef(-1),[f,h]=p.useState(s==null&&t?()=>{if(d.current===-1){const v=u.current;u.current+=1,d.current=v}return d.current}:-1),m=s??f,g=p.useRef(null),b=p.useCallback(v=>{const y=g.current;y&&l(y),g.current=v,v&&o(v,{metadata:i??null,index:s??null,label:n,textRef:r})},[s,o,l,i,n,r]);return Jn(()=>{if(s==null)return c(v=>{var w;const y=g.current?(w=v.get(g.current))==null?void 0:w.index:null;y!=null&&h(y)})},[s,c]),{ref:b,index:m}}const CLe=p.createContext(void 0);function fq(){const e=p.useContext(CLe);if(e===void 0)throw new Error(Vc(9));return e}let hq=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=oI.startingStyle]="startingStyle",e[e.endingStyle=oI.endingStyle]="endingStyle",e}({}),Z_t=function(e){return e.panelOpen="data-panel-open",e}({});const J_t={[hq.open]:""},ejt={[hq.closed]:""},tjt={open(e){return e?{[Z_t.panelOpen]:""}:null}},njt={open(e){return e?J_t:ejt}};let ijt=function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e}({});const pq={...njt,index:e=>({[ijt.index]:String(e)}),...KD,value:()=>null},ALe=p.forwardRef(function(t,n){const{className:i,disabled:r=!1,onOpenChange:s,render:o,value:l,style:c,...u}=t,{ref:d,index:f}=Y_t(),h=Xw(n,d),{disabled:m,handleValueChange:g,state:b,value:v}=OLe(),y=tm(),w=l??y,x=r||m,O=v.indexOf(w)!==-1,k=ci((D,_)=>{s==null||s(D,_),!_.isCanceled&&g(w,D,_)}),S=X_t({open:O,onOpenChange:k,disabled:x}),C=p.useMemo(()=>({open:S.open,disabled:S.disabled,transitionStatus:S.transitionStatus}),[S.open,S.disabled,S.transitionStatus]),E=p.useMemo(()=>({...S,onOpenChange:k,state:C}),[S,C,k]),j=p.useMemo(()=>({...b,hidden:!O&&!S.mounted,index:f,disabled:x,open:O}),[S.mounted,x,f,O,b]),T=tm(),[R,A]=p.useState(),N=R===null?void 0:R??T,P=p.useMemo(()=>({defaultTriggerId:T,open:O,state:j,setTriggerId:A,triggerId:N}),[T,O,j,A,N]),I=Ra("div",t,{state:j,ref:h,props:u,stateAttributesMapping:pq});return a.jsx(SLe.Provider,{value:E,children:a.jsx(CLe.Provider,{value:P,children:I})})}),TLe=p.forwardRef(function(t,n){const{render:i,className:r,style:s,...o}=t,{state:l}=fq();return Ra("h3",t,{state:l,ref:n,props:o,stateAttributesMapping:pq})}),_Le=p.forwardRef(function(t,n){const{disabled:i,className:r,id:s,render:o,nativeButton:l=!0,style:c,...u}=t,{panelId:d,open:f,handleTrigger:h,disabled:m}=ELe(),g=i||m,{getButtonProps:b,buttonRef:v}=GD({disabled:g,focusableWhenDisabled:!0,native:l}),{defaultTriggerId:y,state:w,setTriggerId:x}=fq(),O=s||void 0,k=O??y;return Jn(()=>(x(E=>O??(E===null?void 0:E)),()=>{x(E=>E===O?null:E)}),[O,x]),Ra("button",t,{state:w,ref:[n,v],props:[{"aria-controls":f?d:void 0,"aria-expanded":f,id:k,onClick:h},u,b],stateAttributesMapping:tjt})}),xk={height:void 0,width:void 0};function rjt(e){const{externalRef:t,hiddenUntilFound:n,id:i,keepMounted:r,mounted:s,onOpenChange:o,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=p.useRef(null),h=p.useRef(null),[m,g]=p.useState(xk),b=p.useRef(xk),v=p.useRef(!1),y=p.useRef(l),w=p.useRef(!1),[x,O]=p.useState(!1),k=p.useRef(null),S=Xw(t,f),C=Zl(l),E=rV(f),j=!l&&!s,T=x?"idle":d,R=l&&(y.current||w.current),A=!l&&s&&h.current==="css-animation"&&m.height===void 0&&m.width===void 0?b.current:m,N=n&&j&&h.current!=="css-animation",P=ci((F,M=!0)=>{M&&(b.current=F),g(F)}),I=ci(()=>{var F;(F=k.current)==null||F.call(k),k.current=null}),D=ci(F=>{I(),k.current=()=>{k.current=null,F()}}),_=ci(()=>{l&&s&&h.current==="css-animation"&&(w.current=!0)});Jn(()=>{!x||d==="starting"||O(!1)},[x,d]),p.useEffect(()=>()=>{_(),I()},[_,I]),Jn(()=>{const F=f.current;if(!F)return;!l&&k.current&&I();const M=sjt(F,R);if(h.current=M,l&&d==="idle"&&y.current&&M==="css-animation"){b.current=Bv(F);return}if(l&&d==="starting"){const U=v.current;if(v.current=!1,M==="none"){P(Bv(F)),O(!0);return}if(M==="css-transition"){const Z=ajt(F);if(P(Bv(F)),!U)return Z;const ne=N_(F,"transition-duration","0s");return D(ne),O(!0),Z}P(Bv(F));const J=N_(F,"animation-name","none");if(!U){J();return}const z=N_(F,"animation-duration","0s");J(),D(z),O(!0);return}if(!l&&s&&(d==="idle"||d==="starting")){if(y.current=!1,w.current=!1,M==="none"){P(xk,!1),c(!1);return}P(Bv(F));return}if(d!=="ending")return;if(M==="none"){c(!1);return}const V=Bv(F);if(!(V.height>0||V.width>0)){c(!1);return}P(V),M==="css-animation"&&N_(F,"animation-name","none")()},[s,l,I,P,c,D,R,d]),zA({enabled:l&&s&&T==="idle",open:!0,ref:f,onComplete(){l&&P(xk,!1)}}),p.useEffect(()=>{if(l||!s||T!=="ending"||!f.current)return;const M=new AbortController;let V=-1;function q(){C.current||(c(!1),P(xk,!1))}return V=_c.request(()=>{E(q,M.signal)}),()=>{_c.cancel(V),M.abort()}},[C,s,l,T,E,P,c]),Jn(()=>{const F=f.current;!F||!n||!j||F.setAttribute("hidden","until-found")},[j,n]),p.useEffect(function(){const M=f.current;if(!M)return;function V(q){const U=fa(E_e,q);o(!0,U),!U.isCanceled&&(v.current=!0,u(!0))}return Ni(M,"beforematch",V)},[o,u]);const L=r||n||s||l;return{height:A.height,props:{...N?{[hq.startingStyle]:""}:void 0,hidden:j,id:i},ref:S,shouldPreventOpenAnimation:R,shouldRender:L,transitionStatus:T,width:A.width}}function Bv(e){return{height:e.scrollHeight,width:e.scrollWidth}}function sjt(e,t){const n=ta(e).getComputedStyle(e),i=(n.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&Bne(n.animationDuration),r=Bne(n.transitionDuration);return i&&r||r?"css-transition":i?"css-animation":"none"}function Bne(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function N_(e,t,n){const i=e.style.getPropertyValue(t),r=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(i===""){e.style.removeProperty(t);return}e.style.setProperty(t,i,r)}}function ajt(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(r=>{e.style.setProperty(r,"initial","important")});function n(){Object.entries(t).forEach(([r,s])=>{if(s===""){e.style.removeProperty(r);return}e.style.setProperty(r,s)})}const i=_c.request(n);return()=>{_c.cancel(i),n()}}let Une=function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e}({});const jLe=p.forwardRef(function(t,n){const{className:i,hiddenUntilFound:r,keepMounted:s,id:o,render:l,style:c,...u}=t,{hiddenUntilFound:d,keepMounted:f}=OLe(),{defaultPanelId:h,mounted:m,onOpenChange:g,open:b,setMounted:v,setOpen:y,setPanelIdState:w,transitionStatus:x}=ELe(),O=r??d,k=s??f,S=o||void 0,C=o??h;Jn(()=>(w(M=>S??(M===null?void 0:M)),()=>{w(M=>M===S?null:M)}),[S,w]);const{height:E,props:j,ref:T,shouldPreventOpenAnimation:R,shouldRender:A,transitionStatus:N,width:P}=rjt({externalRef:n,hiddenUntilFound:O,id:C,keepMounted:k,mounted:m,onOpenChange:g,open:b,setMounted:v,setOpen:y,transitionStatus:x}),{state:I,triggerId:D}=fq(),_={...I,transitionStatus:N},L=m_e(c,_),F=Ra("div",{...t,style:void 0},{state:_,ref:T,props:[j,{"aria-labelledby":D,role:"region",style:{[Une.accordionPanelHeight]:E===void 0?"auto":`${E}px`,[Une.accordionPanelWidth]:P===void 0?"auto":`${P}px`}},u,L?{style:L}:void 0,R?{style:{animationName:"none"}}:void 0],stateAttributesMapping:pq});return A?F:null}),ojt=(e,t)=>{const n=e.currentTarget,i={x:e.clientX,y:e.clientY},r=ljt(i,n.getBoundingClientRect()),s=cjt(i,r),o=ujt(t.getBoundingClientRect());return fjt([...s,...o])};function ljt(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function cjt(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function ujt(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function djt(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,o=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}function fjt(e){const t=e.slice();return t.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),hjt(t)}function hjt(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const pjt="_Transition_1wdpp_1",mjt="_Popover_1wdpp_3",NLe={Transition:pjt,Popover:mjt},RLe=p.createContext(null),LM=()=>{const e=p.use(RLe);if(!e)throw new Error("Popover components must be wrapped in ");return e},Lg=({open:e,onOpenChange:t,showOnHover:n=!1,hoverOpenDelay:i=150,children:r})=>{const[s,o]=p.useState(!1),[l,c]=p.useState(!1),u=p.useRef(null),d=p.useRef(null),f=p.useRef(void 0),h=p.useRef(!1),m=p.useRef(!1),g=e??s,[b,v]=p.useState(!1);OV(()=>v(!1),b?500:null);const y=rb(t),w=rb(C=>{var E,j;clearTimeout(f.current),g!==C&&(C||(c(!1),n&&h.current&&((E=u.current)==null||E.focus()),h.current=!1),(j=y.current)==null||j.call(y,C),o(C),n&&v(C))}),x=p.useCallback(C=>{w.current(C)},[w]),O=p.useCallback(()=>{f.current=setTimeout(()=>x(!0),i)},[x,i]),k=p.useCallback(()=>{clearTimeout(f.current)},[]);p.useEffect(()=>()=>{clearTimeout(f.current)},[]);const S=p.useMemo(()=>({open:g,setOpen:x,shake:l,setShake:c,showOnHover:n,temporarilyPreventClickToClose:b,onTriggerEnter:O,onTriggerLeave:k,isPointerInTransitRef:m,triggerRef:u,contentRef:d,hoverOpenFocusedWithTab:h}),[g,x,l,c,n,b,h,m,O,k]);return a.jsx(RLe,{value:S,children:a.jsx(IRe,{open:g,onOpenChange:x,modal:!1,children:r})})},gjt=({children:e,onPointerDown:t,onClick:n})=>{const{setOpen:i,showOnHover:r,temporarilyPreventClickToClose:s,onTriggerEnter:o,onTriggerLeave:l,isPointerInTransitRef:c,triggerRef:u,contentRef:d}=LM(),f=p.useRef(!1),h=b=>{!(b.currentTarget.nodeName.toLocaleLowerCase()==="a")&&s&&(b.preventDefault(),b.stopPropagation())},m=b=>{b.pointerType!=="touch"&&!f.current&&!c.current&&(o(),f.current=!0)},g=()=>{f.current&&(l(),f.current=!1)};return a.jsx(PRe,{asChild:!0,ref:u,onPointerDown:b=>{h(b),t==null||t(b)},onClick:b=>{h(b),n==null||n(b)},onPointerMove:r?m:void 0,onPointerLeave:r?g:void 0,onFocus:r?()=>i(!0):void 0,onBlur:r?()=>{setTimeout(()=>{var b;(b=d.current)!=null&&b.contains(document.activeElement)||i(!1)},50)}:void 0,children:e})},ILe=({children:e,avoidCollisions:t,width:n,minWidth:i,maxWidth:r,side:s,sideOffset:o=8,align:l,alignOffset:c,translucent:u,className:d,autoFocus:f=!0})=>{const{showOnHover:h,shake:m,contentRef:g}=LM(),b=v=>{const y=g.current;if(y&&v.target===y&&v.key==="Tab"&&v.shiftKey){v.preventDefault(),v.stopPropagation();const w=sNe(y),x=w[w.length-1];x==null||x.focus()}};return p.useEffect(()=>{const v=g.current;!v||!f||v!=null&&v.contains(document.activeElement)||h||v.focus({preventScroll:!0})},[g,h,f]),a.jsx(MRe,{forceMount:!0,ref:g,className:Ui(NLe.Popover,d),style:z0({"popover-width":n,"popover-min-width":i,"popover-max-width":r}),onCloseAutoFocus:h?Mp:void 0,"data-animate":m?"shake":void 0,"data-translucent":u?"true":void 0,side:s,sideOffset:o,align:l,alignOffset:c??(l==="center"?0:-5),avoidCollisions:t??!0,hideWhenDetached:!0,collisionPadding:20,onOpenAutoFocus:Mp,onEscapeKeyDown:Mp,onKeyDown:b,children:e})},bjt=e=>{const{setOpen:t,triggerRef:n,contentRef:i,isPointerInTransitRef:r,hoverOpenFocusedWithTab:s}=LM(),[o,l]=p.useState(null),c=p.useCallback(()=>{l(null),r.current=!1},[r]),u=p.useCallback((d,f)=>{const h=ojt(d,f);l(h),r.current=!0},[r]);return p.useEffect(()=>()=>c(),[c]),p.useEffect(()=>{const d=n.current,f=i.current;if(!d||!f)return;const h=g=>u(g,f),m=g=>u(g,d);return d.addEventListener("pointerleave",h),f.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",m)}},[i,n,u,c]),p.useEffect(()=>{if(!o)return;const d=f=>{const h=n.current,m=i.current,g=f.target,b={x:f.clientX,y:f.clientY},v=(h==null?void 0:h.contains(g))||(m==null?void 0:m.contains(g)),y=!djt(b,o),w=g.hasAttribute("aria-haspopup");v?c():(y||w)&&(c(),t(!1))};return document.addEventListener("pointermove",d),()=>document.removeEventListener("pointermove",d)},[o,t,c,n,i]),p.useEffect(()=>{const d=f=>{if(i.current&&f.key==="Tab"&&!f.shiftKey){const[h]=sNe(i.current);h&&(f.preventDefault(),h.focus(),s.current=!0,document.removeEventListener("keydown",d))}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[i,s]),a.jsx(ILe,{...e})},yjt=e=>{const{open:t,showOnHover:n,setOpen:i}=LM();return JA(t,()=>{i(!1)}),a.jsx(DRe,{forceMount:!0,children:a.jsx(Y1,{enterDuration:600,exitDuration:300,className:NLe.Transition,disableAnimations:!0,children:t&&(n?a.jsx(bjt,{...e},"popover-hover"):a.jsx(ILe,{...e},"popover"))})})};Lg.Trigger=gjt;Lg.Content=yjt;const vjt=["skill_hub","skill_space","knowledge_base","tool"];function PLe(e){return a.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m4 6 4 4 4-4"})})}function DLe({label:e}){return a.jsx("div",{className:"create-agent-card__loading",role:"status","aria-label":e,children:[0,1,2].map(t=>a.jsxs("div",{className:"create-agent-card__skeleton-row","aria-hidden":"true",children:[a.jsx("span",{}),a.jsx("span",{})]},t))})}function xjt(e,t){return e.kind==="tool"?t("blocks.createAgents.builtinTool"):e.kind==="knowledge_base"?t("blocks.createAgents.knowledgeBase"):e.source.startsWith("skill_hub:")?"Skill Hub":e.source.startsWith("skill_space:")?t("blocks.createAgents.skillCenter"):"Skill"}function L4({label:e,resources:t}){const{t:n}=Te("conversation");return t.length===0?null:a.jsxs("section",{className:"create-agent-card__popover-section",children:[a.jsx("h4",{children:e}),a.jsx("div",{className:"create-agent-card__popover-list",children:t.map(i=>a.jsxs("div",{className:"create-agent-card__popover-item",children:[a.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[a.jsx("strong",{children:i.name}),a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:xjt(i,n)})]}),i.description?a.jsx("p",{children:i.description}):null]},i.ref))})]})}function wjt({tools:e}){const{t}=Te("conversation");return e.length===0?null:a.jsxs("section",{className:"create-agent-card__popover-section",children:[a.jsx("h4",{children:t("blocks.createAgents.selfAuthoredTools")}),a.jsx(kLe,{children:e.map((n,i)=>a.jsxs(ALe,{className:"create-agent-card__python-tool",value:`${n.name}:${i}`,children:[a.jsx(TLe,{className:"create-agent-card__python-tool-header",children:a.jsxs(_Le,{className:"create-agent-card__python-tool-trigger",children:[a.jsxs("span",{children:[a.jsx("strong",{children:n.name}),n.description?a.jsx("small",{children:n.description}):null]}),a.jsxs("span",{className:"create-agent-card__python-tool-meta",children:[a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:t("blocks.createAgents.selfAuthoredTools")}),a.jsx(PLe,{className:"create-agent-card__python-tool-chevron"})]})]})}),a.jsxs(jLe,{className:"create-agent-card__python-tool-panel",children:[n.dependencies.length>0?a.jsx("div",{className:"create-agent-card__python-tool-dependencies",children:t("blocks.createAgents.dependencies",{items:n.dependencies.join(", ")})}):null,a.jsx("pre",{tabIndex:0,"aria-label":t("blocks.createAgents.fullCode",{name:n.name}),children:a.jsx("code",{children:n.code})})]})]},`${n.name}:${i}`))})]})}function Ojt({agents:e}){const{t}=Te("conversation");return e.length===0?null:a.jsxs("section",{className:"create-agent-card__popover-section",children:[a.jsx("h4",{children:t("blocks.createAgents.subAgents")}),a.jsx("div",{className:"create-agent-card__popover-list",children:e.map(n=>a.jsxs("div",{className:"create-agent-card__popover-item",children:[a.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[a.jsx("strong",{children:n.id}),a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:t(`blocks.createAgents.agentTypes.${n.type}`,{defaultValue:n.type})})]}),n.description?a.jsx("p",{children:n.description}):null]},n.id))})]})}function R_({label:e,count:t,icon:n,children:i}){const{t:r}=Te("conversation"),s=a.jsxs("button",{className:"create-agent-card__resource-metric",type:"button",disabled:t===0,"aria-label":r("blocks.createAgents.itemCount",{label:e,count:t}),children:[n,a.jsx("span",{children:t})]});return t===0?s:a.jsxs(Lg,{showOnHover:!0,hoverOpenDelay:120,children:[a.jsx(Lg.Trigger,{children:s}),a.jsx(Lg.Content,{side:"top",align:"start",minWidth:"auto",maxWidth:360,className:"create-agent-card__resource-popover",children:i})]})}function kjt({response:e,status:t}){const{t:n}=Te("conversation"),i=p.useMemo(()=>({tool:n("blocks.createAgents.sourceLabels.tool"),knowledge:n("blocks.createAgents.sourceLabels.knowledge"),skillCenter:n("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:n("blocks.createAgents.sourceLabels.unknown"),unnamedResource:n("blocks.createAgents.unnamedResource"),unnamedAgent:n("blocks.createAgents.unnamedAgent")}),[n]),r=p.useMemo(()=>L_t(e,i),[i,e]),s=p.useMemo(()=>vjt.map(c=>{const u=$_t(r,c);return{value:c,label:n(`blocks.createAgents.categories.${c}`),...u,searchKeywords:[...new Set(u.sources.flatMap(d=>d.searchKeywords))]}}),[r,n]),o=t==="failed",l=o?MM(e):"";return a.jsx("section",{className:"create-agent-tool-card","aria-label":n("blocks.createAgents.collectionAria"),children:t==="running"?a.jsx(DLe,{label:n("blocks.createAgents.retrieving")}):o?a.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[a.jsx("span",{className:"create-agent-card__message-title",children:n("blocks.createAgents.retrievalFailed")}),a.jsx("span",{children:l||n("blocks.createAgents.checkConfig")})]}):a.jsx(kLe,{className:"create-agent-card__accordion",children:s.map(c=>a.jsxs(ALe,{className:"create-agent-card__accordion-item",value:c.value,children:[a.jsx(TLe,{className:"create-agent-card__accordion-header",children:a.jsxs(_Le,{className:"create-agent-card__accordion-trigger",children:[a.jsx("span",{children:c.label}),a.jsxs("span",{className:"create-agent-card__accordion-meta",children:[a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.notSearched"):n("blocks.createAgents.notConfigured"):c.resources.length}),a.jsx(PLe,{className:"create-agent-card__accordion-chevron"})]})]})}),a.jsx(jLe,{className:"create-agent-card__accordion-content",children:a.jsxs("div",{className:"create-agent-card__accordion-scroll",role:"region","aria-label":n("blocks.createAgents.resourceList",{label:c.label}),tabIndex:0,children:[c.value==="skill_hub"&&c.searchKeywords.length>0?a.jsxs("div",{className:"create-agent-card__search-keywords",children:[a.jsx("span",{children:n("blocks.createAgents.searchKeywords")}),a.jsx("span",{children:c.searchKeywords.join("、")})]}):null,c.resources.length>0?a.jsx("div",{className:"create-agent-card__resource-list",children:c.resources.map(u=>a.jsx("div",{className:"create-agent-card__resource",children:a.jsxs("div",{className:"create-agent-card__resource-main",children:[a.jsxs("div",{className:"create-agent-card__resource-title",children:[a.jsx("span",{className:"create-agent-card__resource-name",children:u.name}),u.version?a.jsx(Ya,{className:"create-agent-card__resource-version",color:"secondary",size:"sm",variant:"soft",children:u.version}):null]}),u.description?a.jsx("p",{children:u.description}):null]})},u.ref))}):a.jsxs("div",{className:"create-agent-card__empty-category",children:[a.jsx("p",{children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.skillHubSkipped"):n("blocks.createAgents.sourceSkipped",{label:c.label}):n("blocks.createAgents.noResources")}),c.sources.filter(u=>u.message).map(u=>a.jsx("p",{className:"create-agent-card__raw-source-error",children:u.message},u.source))]})]})})]},c.value))},r.collectionId||"collected-resources")})}function Sjt({args:e,response:t,status:n}){const{t:i}=Te("conversation"),r=p.useMemo(()=>({tool:i("blocks.createAgents.sourceLabels.tool"),knowledge:i("blocks.createAgents.sourceLabels.knowledge"),skillCenter:i("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:i("blocks.createAgents.sourceLabels.unknown"),unnamedResource:i("blocks.createAgents.unnamedResource"),unnamedAgent:i("blocks.createAgents.unnamedAgent")}),[i]),s=p.useMemo(()=>bLe(e,t,r),[e,r,t]),o=n==="failed"?MM(t):"";return a.jsxs("section",{className:"create-agent-tool-card is-agent-results","aria-label":i("blocks.createAgents.resultAria"),children:[o?a.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[a.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.creationFailed")}),a.jsx("span",{children:o})]}):null,s.agents.length>0?a.jsx("div",{className:"create-agent-card__agent-grid",children:s.agents.map(l=>{const c=n==="failed"?"failed":l.status,u=l.error||c==="failed"&&o,d=l.builtinTools.length+l.pythonTools.length;return a.jsxs(vH,{className:`create-agent-card__agent-card${u?" is-error":""}`,children:[a.jsx(xH,{leading:a.jsx(t1,{seed:l.name}),title:l.name,titleText:l.name,status:a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:i(`blocks.createAgents.agentTypes.${l.rootType}`,{defaultValue:l.rootType})})}),l.description?a.jsx(wH,{children:l.description}):null,u?a.jsx("div",{className:"create-agent-card__agent-result is-error",role:"alert",children:u}):null,a.jsxs("div",{className:"create-agent-card__agent-resources","aria-label":i("blocks.createAgents.agentResources",{name:l.name}),children:[a.jsx(R_,{label:i("blocks.createAgents.skill"),count:l.skills.length,icon:a.jsx(mN,{"aria-hidden":"true"}),children:a.jsx(L4,{label:i("blocks.createAgents.skill"),resources:l.skills})}),a.jsx(R_,{label:i("blocks.createAgents.knowledgeBase"),count:l.knowledgeBases.length,icon:a.jsx(mIe,{"aria-hidden":"true"}),children:a.jsx(L4,{label:i("blocks.createAgents.knowledgeBase"),resources:l.knowledgeBases})}),a.jsxs(R_,{label:i("blocks.createAgents.toolsLabel"),count:d,icon:a.jsx(pat,{"aria-hidden":"true"}),children:[a.jsx(L4,{label:i("blocks.createAgents.builtinTool"),resources:l.builtinTools}),a.jsx(wjt,{tools:l.pythonTools})]}),a.jsx(R_,{label:i("blocks.createAgents.subAgents"),count:l.subAgentCount,icon:a.jsx(gat,{"aria-hidden":"true"}),children:a.jsx(Ojt,{agents:l.subAgents})})]})]},l.name)})}):n==="running"?a.jsx(DLe,{label:i("blocks.createAgents.creating")}):a.jsxs("div",{className:"create-agent-card__message",children:[a.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.noAgents")}),a.jsx("span",{children:i("blocks.createAgents.noAgentResult")})]})]})}const Ejt={web_search:{name:"web_search",runningLabel:"Searching the web",doneLabel:"Web search complete",tone:"search",icon:Pne},link_reader:{name:"link_reader",runningLabel:"Reading webpage",doneLabel:"Webpage read complete",tone:"search",icon:Pne},run_code:{name:"run_code",runningLabel:"Running code in the AgentKit sandbox",doneLabel:"Code execution completed in the AgentKit sandbox",tone:"sandbox",icon:m_t},list_envs:{name:"list_envs",runningLabel:"Checking available environments",doneLabel:"Available environments loaded",tone:"resources",icon:b_t},get_env_manifest:{name:"get_env_manifest",runningLabel:"Loading the environment manifest",doneLabel:"Environment manifest loaded",tone:"knowledge",icon:y_t},execute_in_sandbox:{name:"execute_in_sandbox",runningLabel:"Running a command in the environment",doneLabel:"Command completed in the environment",tone:"sandbox",icon:Mne},delegate_to_codex_sandbox:{name:"delegate_to_codex_sandbox",runningLabel:"Codex Sandbox is running",doneLabel:"Codex Sandbox completed",failedLabel:"Codex Sandbox failed",tone:"sandbox",icon:Mne},image_generate:{name:"image_generate",runningLabel:"Generating image",doneLabel:"Image generated",tone:"image",icon:u_t},video_generate:{name:"video_generate",runningLabel:"Generating video",doneLabel:"Video generated",tone:"video",icon:lq},ppt_generate:{name:"ppt_generate",runningLabel:"Generating presentation",doneLabel:"Presentation generated",tone:"presentation",icon:d_t},load_memory:{name:"load_memory",runningLabel:"Searching long-term memory",doneLabel:"Memory search complete",tone:"memory",icon:f_t},load_knowledgebase:{name:"load_knowledgebase",runningLabel:"Searching the knowledge base",doneLabel:"Knowledge base search complete",tone:"knowledge",icon:h_t},load_skill:{name:"load_skill",runningLabel:"Loading skill",doneLabel:"Skill loaded",tone:"skill",icon:p_t},collect_resources:{name:"collect_resources",runningLabel:"Collecting available resources",doneLabel:"Resource collection complete",failedLabel:"Resource collection failed",tone:"resources",icon:g_t,detailRenderer:kjt},create_agents:{name:"create_agents",runningLabel:"Creating and running agents",doneLabel:"Agent creation complete",failedLabel:"Agent creation failed",tone:"agent",icon:Dne,detailRenderer:Sjt},branch_compare:{name:"branch_compare",runningLabel:"",doneLabel:"",failedLabel:"",tone:"search",icon:Dne,detailRenderer:U_t,hideHeader:!0}};function mq(e){return Ejt[e]}function Cjt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M6 3h8l4 4v14H6Z"}),a.jsx("path",{d:"M14 3v5h5"}),a.jsx("path",{d:"m10 12-2 2 2 2M14 12l2 2-2 2"})]})}function Ajt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M12 3 19 6v5c0 4.6-2.8 7.8-7 10-4.2-2.2-7-5.4-7-10V6l7-3Z"}),a.jsx("path",{d:"m9 12 2 2 4-4"})]})}function Tjt(e,t){const n=new Map(e.map(o=>[o.path,o.content])),i=new Map(t.map(o=>[o.path,o.content])),r=new Set([...n.keys(),...i.keys()]),s=[];for(const o of[...r].sort((l,c)=>l.localeCompare(c))){const l=n.get(o),c=i.get(o);l!==c&&s.push({path:o,status:l===void 0?"added":c===void 0?"deleted":"modified",before:l??"",after:c??""})}return s}function Nb(e){return{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...e}}function MLe(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"m9 7-5 5 5 5M15 7l5 5-5 5M13.5 4l-3 16"})})}function $4(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"M6.5 3.75h7l4 4V20.25h-11zM13.5 3.75v4h4M9 12h6M9 15.5h4.5"})})}function _jt(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"M3.75 7.25h6l1.75 2h8.75v9.25H3.75zM3.75 7.25V5.5h5l1.5 1.75"})})}function jjt(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"m9 5 7 7-7 7"})})}function xT(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"m6.5 6.5 11 11M17.5 6.5l-11 11"})})}function Njt(e){return a.jsxs("svg",{...Nb(e),children:[a.jsx("circle",{cx:"12",cy:"12",r:"3.25"}),a.jsx("path",{d:"M12 2.75v2M12 19.25v2M2.75 12h2M19.25 12h2M5.45 5.45l1.4 1.4M17.15 17.15l1.4 1.4M18.55 5.45l-1.4 1.4M6.85 17.15l-1.4 1.4"})]})}function Rjt(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"M19.25 15.25A8 8 0 0 1 8.75 4.75a8 8 0 1 0 10.5 10.5Z"})})}function LLe(e){return a.jsxs("svg",{...Nb(e),children:[a.jsx("path",{d:"M19.25 8.25V4.5l-1.8 1.8a7.5 7.5 0 1 0 1.8 7.65"}),a.jsx("path",{d:"M19.25 4.5H15.5"})]})}const Ijt=p.lazy(()=>Zs(()=>Promise.resolve().then(()=>wFe),void 0)),Pjt=p.lazy(()=>Zs(()=>import("../chunks/CodeDiffEditor-DWA74Z9P.js"),[])),$Le="veadk-code-workspace-theme";function Djt(e){const t={name:"",children:new Map};for(const n of e){const i=n.path.split("/").filter(Boolean);let r=t;i.forEach((s,o)=>{let l=r.children.get(s);l||(l={name:s,children:new Map},r.children.set(s,l)),o===i.length-1&&(l.path=n.path),r=l})}return t}function Mjt(e,t=!1){return[...e.children.values()].sort((n,i)=>{const r=n.children.size>0&&n.path===void 0,s=i.children.size>0&&i.path===void 0;return r!==s?t?r?1:-1:r?-1:1:n.name.localeCompare(i.name)})}function Ljt(){if(typeof window>"u")return"light";try{return window.localStorage.getItem($Le)==="dark"?"dark":"light"}catch{return"light"}}function $jt(e){return e===""?0:e.split(` +`||c==="\r")&&(s=!1);continue}if(o){c==="*"&&u==="/"&&(o=!1,l+=1);continue}if(i){r?r=!1:c==="\\"?r=!0:c===i&&(i="");continue}if(c==="/"&&u==="/"){s=!0,l+=1;continue}if(c==="/"&&u==="*"){o=!0,l+=1;continue}if(c==="'"||c==='"'){i=c;continue}const d=e.slice(l).match(n);if(d)return{index:l,openingIndex:l+d[0].lastIndexOf("("),type:d[1]==="LinearGradient"?"linear":"radial"}}}function wTt(e){let t=e,n=0;for(;;){const i=xTt(t,n);if(!i)return t;const r=bTt(t,i.openingIndex),s=t.slice(i.openingIndex+1,r),o=JSON.stringify(vTt(i.type,s));t=`${t.slice(0,i.index)}${o}${t.slice(r+1)}`,n=i.index+o.length}}function HMe(e,t=!1){if(e.length>hTt)throw new Error("ECharts option is too large");const n=wTt(gTt(e));let i;try{i=VMe.parse(n)}catch(o){throw/\bfunction\s*\(|=>/.test(n)?new Error("ECharts function callbacks are not supported"):o}if(!pS(i))throw new Error("ECharts option must be a data object");II(i);const r={...i};r.aria={...pS(r.aria)?r.aria:{},enabled:!0};const s=r.tooltip;return pS(s)?r.tooltip={...s,renderMode:"richText"}:Array.isArray(s)&&(r.tooltip=s.map(o=>pS(o)?{...o,renderMode:"richText"}:o)),t&&(r.animation=!1),r}let I4;function OTt(){return I4??(I4=Zs(()=>import("../visualizations/echarts/index-CGT341lL.js"),[]).catch(e=>{throw I4=void 0,e})),I4}function kTt({source:e}){const{t}=Te("conversation"),n=p.useRef(null),[i,r]=p.useState(!1),[s,o]=p.useState("");return p.useEffect(()=>{let l=!1,c,u,d;r(!1);try{d=HMe(e,window.matchMedia("(prefers-reduced-motion: reduce)").matches),o("")}catch{o("invalid");return}return OTt().then(f=>{const h=n.current;l||!h||(c=f.init(h,void 0,{renderer:"svg"}),c.setOption(d,{notMerge:!0}),typeof ResizeObserver<"u"&&(u=new ResizeObserver(()=>c==null?void 0:c.resize()),u.observe(h)),r(!0))}).catch(()=>{c==null||c.dispose(),c=void 0,l||o("render")}),()=>{l=!0,u==null||u.disconnect(),c==null||c.dispose()}},[e]),a.jsxs("div",{className:`echarts-diagram${s?" echarts-diagram--error":""}`,role:"img","aria-label":t("visualization.echartsAria"),"aria-busy":!i&&!s,children:[a.jsx("div",{ref:n,className:"echarts-diagram__canvas",hidden:!!s}),!i&&!s?a.jsx("div",{className:"echarts-diagram__state","aria-live":"polite",children:a.jsx(fn,{duration:2.2,spread:15,children:t("visualization.rendering")})}):null,s?a.jsx("p",{className:"echarts-diagram__error",role:"alert",children:t(s==="invalid"?"visualization.invalidEcharts":"visualization.renderFailed")}):null]})}const STt=p.memo(kTt);let Ene,Cne=Promise.resolve(),ETt=0;function CTt(){return Ene??(Ene=Zs(async()=>{const{default:e}=await import("../visualizations/mermaid/mermaid.core-l-gs7P2Q.js").then(t=>t.ay);return{default:e}},__vite__mapDeps([0,1])).then(({default:e})=>(e.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,theme:"neutral"}),e))),Ene}function ATt(e){const t=Cne.then(async()=>{const n=await CTt(),i=`mermaid-diagram-${ETt+=1}`;return n.render(i,e)});return Cne=t.then(()=>{},()=>{}),t}function TTt({source:e}){const{t}=Te("conversation"),n=p.useRef(null),[i,r]=p.useState(null),[s,o]=p.useState(!1);return p.useEffect(()=>{let l=!1;return r(null),o(!1),ATt(e).then(c=>{l||r(c)}).catch(()=>{l||o(!0)}),()=>{l=!0}},[e]),p.useEffect(()=>{!(i!=null&&i.bindFunctions)||!n.current||i.bindFunctions(n.current)},[i]),s?a.jsx("div",{className:"mermaid-diagram mermaid-diagram--error",children:a.jsx("p",{className:"mermaid-diagram__error",role:"alert",children:t("visualization.mermaidFailed")})}):i?a.jsx("div",{ref:n,className:"mermaid-diagram",role:"img","aria-label":t("visualization.mermaidAria"),dangerouslySetInnerHTML:{__html:i.svg}}):a.jsx("div",{className:"mermaid-diagram mermaid-diagram--loading","aria-live":"polite",children:a.jsx(fn,{duration:2.2,spread:15,children:t("visualization.rendering")})})}const _Tt=p.memo(TTt),jTt="_SegmentedControl_1sl7d_1",NTt="_SegmentedControlOption_1sl7d_140",RTt="_SegmentedControlThumb_1sl7d_219",r9={SegmentedControl:jTt,SegmentedControlOption:NTt,SegmentedControlThumb:RTt},ld=({value:e,onChange:t,children:n,block:i,pill:r=!0,size:s="md",gutterSize:o,className:l,onClick:c,...u})=>{const d=p.useRef(null),f=p.useRef(null),h=p.useCallback(g=>{const b=d.current,v=f.current;if(!b||!v)return;const y=b==null?void 0:b.querySelector('[data-state="on"]');if(!y)return;const w=b.clientWidth;let x=Math.floor(y.clientWidth);const O=y.offsetLeft;if(w-(x+O)<2&&(x=x-1),v.style.width=`${Math.floor(x)}px`,v.style.transform=`translateX(${O}px)`,b.scrollWidth>w){const k=w*.15,S=b.scrollLeft,C=y.offsetLeft,E=C+x;(CS+w-k)&&g&&y.scrollIntoView({block:"nearest",inline:"center",behavior:"smooth"})}},[]);nNe({ref:d,onResize:()=>{const g=f.current;if(!g)return;const b=g.style.transition;g.style.transition="",h(!1),g.style.transition=b}}),p.useLayoutEffect(()=>{const g=d.current,b=f.current;!g||!b||(h(!!b.style.transition),b.style.transition||pI(()=>{b.style.transition="width 300ms var(--cubic-enter), transform 300ms var(--cubic-enter)"}))},[h,e,s,o,r]);const m=g=>{g&&t&&t(g)};return a.jsxs(xft,{ref:d,className:Ui(r9.SegmentedControl,l),type:"single",value:e,loop:!1,onValueChange:m,onClick:c,"data-block":i?"":void 0,"data-pill":r?"":void 0,"data-size":s,"data-gutter-size":o,...u,children:[a.jsx("div",{className:r9.SegmentedControlThumb,ref:f}),n]})},ITt=({children:e,...t})=>a.jsx(Eft,{className:r9.SegmentedControlOption,...t,onPointerEnter:kV,children:a.jsx("span",{className:"relative",children:e})});ld.Option=ITt;function PTt({children:e,label:t,language:n,source:i,streaming:r=!1}){const{t:s}=Te("conversation"),[o,l]=p.useState("preview"),c=r?"code":o;return a.jsxs("section",{className:"visualization-card","aria-label":s("visualization.cardAria",{label:t}),children:[a.jsx("div",{className:"visualization-card__toolbar",children:a.jsxs(ld,{className:"visualization-card__tabs",value:c,size:"sm",gutterSize:"sm",pill:!1,"aria-label":s("visualization.viewAria",{label:t}),onChange:u=>{r||l(u)},children:[a.jsx(ld.Option,{value:"preview",disabled:r,children:s("visualization.preview")}),a.jsx(ld.Option,{value:"code",children:s("visualization.code")})]})}),a.jsx("div",{className:"visualization-card__body",children:c==="code"?a.jsx("pre",{className:"visualization-card__code",children:a.jsx("code",{className:`language-${n}`,children:i})}):e})]})}const DTt=p.memo(PTt);function qMe(e){const t=e==null?void 0:e.trim().toLowerCase();if(t==="mermaid")return"mermaid";if(t==="echart"||t==="echarts")return"echarts"}const WMe=[".mp4",".webm",".mov",".m4v",".ogg",".avi"];function s9(e){return typeof e=="string"||typeof e=="number"?String(e):Array.isArray(e)?e.map(s9).join(""):p.isValidElement(e)?s9(e.props.children):""}function MTt(e){var i;const t=p.Children.toArray(e)[0];if(!p.isValidElement(t))return;const n=(i=t.props.className)==null?void 0:i.split(/\s+/).find(r=>r.startsWith("language-"));return qMe(n==null?void 0:n.slice(9))}function KMe(e){if(!e)return!1;try{const t=e.toLowerCase();return WMe.some(n=>t.includes(n))}catch{return!1}}function LTt(e){var i;const t=(i=e==null?void 0:e.properties)==null?void 0:i.href;if(!t)return!1;if(KMe(t))return!0;const n=e==null?void 0:e.children;if(n&&Array.isArray(n)){const r=n.map(s=>(s==null?void 0:s.value)||"").join("").toLowerCase();return WMe.some(s=>r.includes(s))}return!1}function $Tt({text:e,className:t,allowRawHtml:n=!0,streaming:i=!1}){const{t:r}=Te("conversation"),s=p.useContext(Aje),[o,l]=p.useState(null),c=(f,h)=>{if(f.src)return f.src;if(h){const m=b=>{var v;if(!b)return null;if(b.type==="source"&&((v=b.properties)!=null&&v.src))return b.properties.src;if(b.children)for(const y of b.children){const w=m(y);if(w)return w}return null},g=m({children:h});if(g)return g}return""},u=f=>{try{const m=new URL(f).pathname.split("/");return m[m.length-1]||"video.mp4"}catch{return"video.mp4"}},d=f=>f?Array.isArray(f)?f.map(h=>(h==null?void 0:h.value)||"").join("")||"video":(f==null?void 0:f.value)||"video":"video";return a.jsxs("div",{className:t?`md ${t}`:"md",children:[a.jsx(qPe,{disallowedElements:s?["file-card","personal-drive-enable-card"]:void 0,remarkPlugins:[bDe],rehypePlugins:n?[JAt,sne]:[sne],components:{pre:({node:f,children:h,...m})=>{const g=MTt(h);if(g==="mermaid"||g==="echarts"){const b=s9(h).replace(/\n$/,"");return a.jsx(DTt,{label:g==="mermaid"?"Mermaid":"ECharts",language:g,source:b,streaming:i,children:g==="mermaid"?a.jsx(_Tt,{source:b}):a.jsx(STt,{source:b})})}return a.jsx("pre",{...m,children:h})},a:({node:f,...h})=>{const m=h.href,g=s&&zst(m);if(g)return a.jsx(Vst,{...s,path:g,children:h.children});if(m&&(KMe(m)||LTt(f))){const b=m,v=d(f==null?void 0:f.children);return a.jsxs("div",{className:"video-container",children:[a.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.playVideo",{name:v}),onClick:()=>l({src:b,title:v}),children:[a.jsx("video",{src:b,playsInline:!0,className:"video-thumbnail",preload:"metadata"}),a.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:a.jsx(iE,{})})]}),a.jsx("div",{className:"video-caption",children:a.jsx("a",{href:b,target:"_blank",rel:"noopener noreferrer",className:"video-link-text",children:v})})]})}return a.jsx("a",{...h,target:"_blank",rel:"noopener noreferrer"})},img:({node:f,src:h,alt:m,...g})=>{const b=a.jsx("img",{...g,src:h,alt:m??"",loading:"lazy"});return h?a.jsx(MAe,{src:h,children:a.jsxs("button",{type:"button",className:"image-preview-trigger","aria-label":r("markdown.enlargeImage",{name:m||r("markdown.image")}),children:[b,a.jsx("span",{className:"image-preview-hint","aria-hidden":"true",children:a.jsx(iE,{})})]})}):b},video:({node:f,src:h,children:m,...g})=>{const b=c({src:h},m);return b?a.jsx("div",{className:"video-container",children:a.jsxs("button",{type:"button",className:"video-preview-trigger","aria-label":r("markdown.enlargeVideo"),onClick:()=>l({src:b}),children:[a.jsx("video",{src:b,...g,playsInline:!0,className:"video-thumbnail",children:m}),a.jsx("span",{className:"video-preview-hint","aria-hidden":"true",children:a.jsx(iE,{})})]})}):a.jsx("video",{src:h,controls:!0,playsInline:!0,className:"video-inline",...g,children:m})}},children:e}),o&&a.jsx("div",{className:"video-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":r("markdown.videoPreview"),onClick:()=>l(null),children:a.jsxs("div",{className:"video-viewer",onClick:f=>f.stopPropagation(),children:[a.jsxs("div",{className:"video-viewer-header",children:[a.jsx("div",{className:"video-viewer-title",children:o.title||u(o.src)}),a.jsxs("nav",{className:"video-viewer-nav",children:[a.jsx("a",{href:o.src,download:o.title||u(o.src),"aria-label":r("markdown.downloadVideo"),title:r("markdown.downloadVideo"),className:"video-viewer-download",children:a.jsx(tM,{})}),a.jsx("button",{type:"button",className:"video-viewer-close","aria-label":r("markdown.close"),onClick:()=>l(null),children:a.jsx(Do,{})})]})]}),a.jsx("div",{className:"video-viewer-body",children:a.jsx("video",{src:o.src,controls:!0,autoPlay:!0,playsInline:!0,className:"video-fullscreen"})})]})})]})}const Td=p.memo($Tt);function P4(e){return(e==null?void 0:e.trim())||Tb("resourceMetadata.unknownSource")}function GMe(e){return(e==null?void 0:e.trim())||Tb("resourceMetadata.unknownCreator")}function FTt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M5 5.5A2.5 2.5 0 0 1 7.5 3H19v16H7.5A2.5 2.5 0 0 0 5 21.5v-16Z"}),a.jsx("path",{d:"M5 18.5A2.5 2.5 0 0 1 7.5 16H19"}),a.jsx("path",{d:"M9 7h6M9 10h4"})]})}function BTt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M6 3h8l4 4v14H6V3Z"}),a.jsx("path",{d:"M14 3v5h5M9 12h6M9 16h6"})]})}function UTt(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m7 7 10 10M17 7 7 17"})})}function QTt(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"M12 5v14M5 12h14"})})}function yT({title:e,children:t,onClose:n,busy:i=!1,className:r=""}){const{t:s}=Te("ui"),o=p.useId(),l=p.useRef(null),c=p.useRef(null),u=p.useRef(i),d=p.useRef(n);return p.useEffect(()=>{u.current=i,d.current=n},[i,n]),p.useEffect(()=>{var g;const f=document.activeElement instanceof HTMLElement?document.activeElement:null,h=document.body.style.overflow;document.body.style.overflow="hidden",(g=l.current)==null||g.focus();const m=b=>{if(b.key==="Escape"&&!u.current){d.current();return}if(b.key!=="Tab")return;const v=c.current;if(!v)return;const y=Array.from(v.querySelectorAll('button:not([disabled]), input:not([disabled]), textarea:not([disabled]), select:not([disabled]), a[href], audio[controls], video[controls], iframe, [tabindex]:not([tabindex="-1"])')).filter(O=>O.getClientRects().length>0);if(y.length===0){b.preventDefault();return}const w=y[0],x=y[y.length-1];b.shiftKey&&(document.activeElement===w||!v.contains(document.activeElement))?(b.preventDefault(),x.focus()):!b.shiftKey&&(document.activeElement===x||!v.contains(document.activeElement))&&(b.preventDefault(),w.focus())};return window.addEventListener("keydown",m),()=>{window.removeEventListener("keydown",m),document.body.style.overflow=h,f!=null&&f.isConnected&&f.focus()}},[]),yi.createPortal(a.jsx("div",{className:"knowledge-dialog-backdrop",onMouseDown:f=>{f.target===f.currentTarget&&!i&&n()},children:a.jsxs("section",{ref:c,className:`knowledge-dialog${r?` ${r}`:""}`,role:"dialog","aria-modal":"true","aria-labelledby":o,"aria-busy":i||void 0,children:[a.jsxs("header",{className:"knowledge-dialog__header",children:[a.jsx("h2",{id:o,children:e}),a.jsx("button",{ref:l,type:"button",onClick:n,disabled:i,"aria-label":s("common.close"),children:a.jsx(UTt,{})})]}),t]})}),document.body)}function AC({message:e}){return e?a.jsx("div",{className:"knowledge-form-error",role:"alert",children:e}):null}function a9(e){return e instanceof DOMException&&e.name==="AbortError"}function zTt(e,t){if(!e)return"";const n=Date.parse(e);return Number.isFinite(n)?new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(n):e}const XMe=[".jpg",".jpeg",".png"].join(","),VTt=new Set(XMe.split(",")),YMe=[".pdf",".pptx",".docx",".xlsx",".txt"].join(","),HTt=new Set(YMe.split(",")),qTt=200*1024*1024;function o9(e){const t=e.lastIndexOf(".");return t<0?"":e.slice(t).toLocaleLowerCase()}function WTt(e,t,n){return e.size>qTt?n("knowledge.errors.fileTooLarge"):t==="image"?VTt.has(o9(e.name))?"":n("knowledge.errors.invalidImageType"):HTt.has(o9(e.name))?"":n("knowledge.errors.invalidDocumentType")}function aq(e){return e<=0?"-":e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(1)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function l9(e){var r;const t=e.type.trim().replace(/^\./,"");if(t)return t.toUpperCase();const n=e.name.trim(),i=n.includes(".")?(r=n.split(".").pop())==null?void 0:r.trim():"";return i?i.toUpperCase():"-"}function KTt({region:e,onClose:t,onCreated:n}){const{t:i}=Te("ui"),[r,s]=p.useState(""),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(""),g=r.trim(),b=!!(g&&!/^[A-Za-z][A-Za-z0-9_]{0,47}$/.test(g)),v=async y=>{if(y.preventDefault(),u(!0),!g||b)return;f(!0),m("");const w={name:g,description:o.trim()||void 0,region:e};try{n(await jbt(w))}catch(x){m(Cl(x,i("knowledge.errors.createBase")))}finally{f(!1)}};return a.jsx(yT,{title:i("knowledge.createBase"),onClose:t,busy:d,children:a.jsxs("form",{onSubmit:y=>void v(y),children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsxs("label",{children:[a.jsx("span",{children:i("common.name")}),a.jsx("input",{autoFocus:!0,value:r,maxLength:48,"aria-invalid":c&&b||void 0,"aria-describedby":"knowledge-name-help",onBlur:()=>u(!0),onChange:y=>s(y.target.value)})]}),a.jsx("p",{id:"knowledge-name-help",className:`knowledge-dialog__note${c&&b?" is-error":""}`,role:c&&b?"alert":void 0,children:i(c&&b?"knowledge.invalidName":"knowledge.nameHelp")}),a.jsxs("label",{children:[a.jsx("span",{children:i("knowledge.optionalDescription")}),a.jsx("textarea",{value:o,maxLength:80,onChange:y=>l(y.target.value)})]}),a.jsx(AC,{message:h})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:d,children:i("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:d||!g||b,children:i(d?"common.creating":"common.create")})]})]})})}function GTt({item:e,onClose:t,onUpdated:n}){const{t:i}=Te("ui"),[r,s]=p.useState(e.description),[o,l]=p.useState(!1),[c,u]=p.useState(""),d=async f=>{f.preventDefault(),l(!0),u("");try{n(await Nbt(e.id,e.region,{description:r.trim()}))}catch(h){u(Cl(h,i("knowledge.errors.updateBase")))}finally{l(!1)}};return a.jsx(yT,{title:i("knowledge.editBase"),onClose:t,busy:o,children:a.jsxs("form",{onSubmit:f=>void d(f),children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsxs("label",{children:[a.jsx("span",{children:i("common.name")}),a.jsx("input",{value:e.name,disabled:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:i("common.description")}),a.jsx("textarea",{autoFocus:!0,value:r,maxLength:80,onChange:f=>s(f.target.value)})]}),a.jsx("p",{className:"knowledge-dialog__note",children:i("knowledge.descriptionOnly")}),a.jsx(AC,{message:c})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:o,children:i("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:o,children:i(o?"common.saving":"common.save")})]})]})})}function ZMe(e,t){if(!e.trim())return{};const n=JSON.parse(e);if(!n||Array.isArray(n)||typeof n!="object")throw new Error(t);return n}function XTt({base:e,onClose:t,onCreated:n,onAssociationInvalid:i}){const{t:r}=Te("ui"),[s,o]=p.useState("document"),[l,c]=p.useState(""),[u,d]=p.useState(""),[f,h]=p.useState(""),[m,g]=p.useState(null),[b,v]=p.useState(!1),[y,w]=p.useState("{}"),[x,O]=p.useState(""),[k,S]=p.useState(""),[C,E]=p.useState(null),j=p.useRef(null),T=p.useRef(null),R=p.useRef(null),A=p.useRef(0),N=!!x;p.useEffect(()=>{var L;C&&!N&&((L=R.current)==null||L.focus())},[N,C]);const P=L=>{N||L===s||(o(L),g(null),h(""),c(""),d(""),S(""),E(null),v(!1),A.current=0,j.current&&(j.current.value=""))},I=L=>{if(!L||s==="web")return;const F=WTt(L,s,r);if(F){g(null),c(""),d(""),S(F);return}g(L),S(""),c(L.name.replace(/\.[^.]+$/,"")),d(o9(L.name).slice(1))},D=async L=>{if(L.preventDefault(),s==="web"?!f.trim():!m)return;let F;try{F=ZMe(y,r("knowledge.errors.metadataObject"))}catch(M){S(Cl(M,r("knowledge.errors.metadataFormat")));return}O(s==="web"?C?"save":"preview":"upload"),S("");try{if(s==="web")if(C){const M={sourceType:"url",metadata:C.metadata,url:C.preview.url,sourceTitle:C.preview.name,sourceMarkdown:C.preview.sourceMarkdown};await Dbt(e.id,e.region,M),n()}else{const M=await Mbt(e.id,e.region,{url:f.trim()});if(!M.sourceMarkdown.trim())throw new Error(r("knowledge.errors.noWebPreview"));E({preview:M,metadata:F})}else m&&(await Lbt(e.id,e.region,{file:m,name:l.trim()||void 0,documentType:u.trim()||void 0,metadata:F}),n())}catch(M){M instanceof bM&&M.errorCode===sPe?i(M):S(Cl(M,r(s==="web"?C?"knowledge.errors.addWeb":"knowledge.errors.previewWeb":"knowledge.errors.uploadFile")))}finally{O("")}},_=()=>{N||(E(null),S(""),requestAnimationFrame(()=>{var L;return(L=T.current)==null?void 0:L.focus()}))};return a.jsx(yT,{title:r(C?"knowledge.previewWeb":"knowledge.addData"),onClose:t,busy:N,className:C?"knowledge-dialog--preview knowledge-dialog--web-confirm":"",children:a.jsx("form",{onSubmit:L=>void D(L),children:C?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"knowledge-preview knowledge-web-preview",children:[a.jsxs("div",{className:"knowledge-preview__meta",children:[a.jsx("strong",{title:C.preview.name,children:C.preview.name}),a.jsx("a",{href:C.preview.url,target:"_blank",rel:"noopener noreferrer",children:r("knowledge.openOriginalWeb")})]}),a.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:a.jsx("div",{className:"knowledge-preview__markdown-shell",children:a.jsx(Td,{text:C.preview.sourceMarkdown,allowRawHtml:!1,className:"knowledge-preview__markdown"})})}),k?a.jsx("div",{className:"knowledge-web-preview__error",children:a.jsx(AC,{message:k})}):null]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",className:"is-back",onClick:_,disabled:N,children:r("knowledge.backToEdit")}),a.jsx("button",{type:"button",onClick:t,disabled:N,children:r("common.cancel")}),a.jsx("button",{ref:R,type:"submit",className:"is-primary",disabled:N,children:r(x==="save"?"common.adding":"knowledge.confirmAdd")})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsx("div",{className:"knowledge-source-tabs",role:"tablist","aria-label":r("knowledge.source"),children:[["image",r("knowledge.image")],["document",r("knowledge.documentFile")],["web",r("knowledge.webPage")]].map(([L,F])=>a.jsx("button",{type:"button",role:"tab",id:`knowledge-source-${L}-tab`,"aria-controls":`knowledge-source-${L}-panel`,"aria-selected":s===L,tabIndex:s===L?0:-1,className:s===L?"is-active":"",disabled:N,onClick:()=>P(L),onKeyDown:M=>{const V=["image","document","web"];if(!["ArrowLeft","ArrowRight","Home","End"].includes(M.key))return;M.preventDefault();const q=V.indexOf(L),U=M.key==="Home"?V[0]:M.key==="End"?V[V.length-1]:V[(q+(M.key==="ArrowRight"?1:-1)+V.length)%V.length];P(U),requestAnimationFrame(()=>{var J;return(J=document.getElementById(`knowledge-source-${U}-tab`))==null?void 0:J.focus()})},children:F},L))}),a.jsx("div",{id:`knowledge-source-${s}-panel`,className:"knowledge-source-panel",role:"tabpanel","aria-labelledby":`knowledge-source-${s}-tab`,children:s==="web"?a.jsxs(a.Fragment,{children:[a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.webUrl")}),a.jsx("input",{ref:T,autoFocus:!0,type:"url",value:f,disabled:N,onChange:L=>{h(L.target.value),S("")},placeholder:"https://example.com/article"})]}),a.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:x==="preview"?a.jsx(fn,{children:r("knowledge.generatingWebPreview")}):null})]}):a.jsxs(a.Fragment,{children:[a.jsx("input",{ref:j,className:"knowledge-upload-input",type:"file","aria-label":r("knowledge.selectFile"),accept:s==="image"?XMe:YMe,disabled:N,onChange:L=>{var F;I(((F=L.currentTarget.files)==null?void 0:F[0])??null),L.currentTarget.value=""}}),a.jsxs("button",{type:"button",className:`knowledge-upload-dropzone${b?" is-dragging":""}${m?" is-ready":""}`,disabled:N,onClick:()=>{var L;return(L=j.current)==null?void 0:L.click()},onDragEnter:L=>{L.preventDefault(),!N&&(A.current+=1,v(!0))},onDragOver:L=>{L.preventDefault(),N||(L.dataTransfer.dropEffect="copy")},onDragLeave:L=>{L.preventDefault(),A.current=Math.max(0,A.current-1),A.current===0&&v(!1)},onDrop:L=>{var F;L.preventDefault(),A.current=0,v(!1),N||I(((F=L.dataTransfer.files)==null?void 0:F[0])??null)},children:[a.jsx("strong",{children:m?m.name:r("knowledge.selectOrDropFile")}),a.jsx("span",{children:m?r("knowledge.selectedFile",{size:aq(m.size)}):r(s==="image"?"knowledge.imageFileHelp":"knowledge.documentFileHelp")})]}),a.jsx("div",{className:"knowledge-upload-status",role:"status","aria-live":"polite",children:N?a.jsx(fn,{children:r("knowledge.uploadingFile")}):null})]})}),s!=="web"?a.jsxs("div",{className:"knowledge-dialog__fields",children:[a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.optionalName")}),a.jsx("input",{value:l,disabled:N,maxLength:256,onChange:L=>c(L.target.value)})]}),a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.optionalType")}),a.jsx("input",{value:u,disabled:N,maxLength:64,onChange:L=>d(L.target.value),placeholder:"pdf, docx, png"})]})]}):null,a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.metadataJson")}),a.jsx("textarea",{className:"is-code",value:y,disabled:N,onChange:L=>w(L.target.value),spellCheck:!1})]}),a.jsx(AC,{message:k})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:t,disabled:N,children:r("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:N||(s==="web"?!f.trim():!m),children:r(N?s==="web"?"common.generating":"common.uploading":s==="web"?"knowledge.generatePreview":"knowledge.uploadFile")})]})]})})})}function YTt({base:e,item:t,onClose:n,onUpdated:i}){const{t:r}=Te("ui"),[s,o]=p.useState(()=>JSON.stringify(t.metadata??{},null,2)),[l,c]=p.useState(!1),[u,d]=p.useState(""),f=async h=>{h.preventDefault();let m;try{m=ZMe(s,r("knowledge.errors.metadataObject"))}catch(g){d(Cl(g,r("knowledge.errors.metadataFormat")));return}c(!0),d("");try{i(await $bt(e.id,t.id,e.region,{metadata:m}))}catch(g){d(Cl(g,r("knowledge.errors.updateDocument")))}finally{c(!1)}};return a.jsx(yT,{title:r("knowledge.editMetadata"),onClose:n,busy:l,children:a.jsxs("form",{onSubmit:h=>void f(h),children:[a.jsxs("div",{className:"knowledge-dialog__body",children:[a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.knowledge")}),a.jsx("input",{value:t.name||t.id,disabled:!0})]}),a.jsxs("label",{children:[a.jsx("span",{children:r("knowledge.metadataJson")}),a.jsx("textarea",{autoFocus:!0,className:"is-code knowledge-metadata-editor",value:s,onChange:h=>o(h.target.value),spellCheck:!1})]}),a.jsx(AC,{message:u})]}),a.jsxs("footer",{className:"knowledge-dialog__actions",children:[a.jsx("button",{type:"button",onClick:n,disabled:l,children:r("common.cancel")}),a.jsx("button",{type:"submit",className:"is-primary",disabled:l,children:r(l?"common.saving":"common.save")})]})]})})}const JMe=new Set(["avif","bmp","gif","jpeg","jpg","png","svg","webp"]),eLe=new Set(["aac","flac","m4a","mp3","ogg","wav","webm"]),tLe=new Set(["m4v","mov","mp4","mpeg","mpg","ogg","webm"]),ZTt=new Set(["pdf"]),JTt=new Set(["doc","docx","ppt","pptx","xls","xlsx"]),e2t=new Set(["creating","indexing","pending","processing","queued","submitted"]),t2t=new Set(["error","failed","unavailable"]);function Ane(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}}function j_(e){if(e==null||e==="")return"-";if(["string","number","boolean"].includes(typeof e))return String(e);try{return JSON.stringify(e)}catch{return String(e)}}function n2t(e,t){if(Array.isArray(e)){if(e.length===0)return null;const r=e.map(Ane);if(r.some(s=>Object.keys(s).length>0)){const s=[...new Set(r.flatMap(o=>Object.keys(o)))];return{columns:s,rows:r.map(o=>s.map(l=>j_(o[l])))}}return{columns:[t("knowledge.value")],rows:e.map(s=>[j_(s)])}}const n=Ane(e),i=Object.entries(n);if(i.length===0)return null;if(i.every(([,r])=>Array.isArray(r))){const r=i.map(([o])=>o),s=Math.max(...i.map(([,o])=>o.length));return{columns:r,rows:Array.from({length:s},(o,l)=>i.map(([,c])=>j_(c[l])))}}return{columns:[t("knowledge.field"),t("knowledge.value")],rows:i.map(([r,s])=>[r,j_(s)])}}function nLe(e){const t=e.trim();if(!t||t.startsWith("//"))return"";if(t.startsWith("/"))return t;try{const n=new URL(t);return["http:","https:"].includes(n.protocol)?n.href:""}catch{return""}}function i2t(e){const t=nLe(e);return t.startsWith("http://")||t.startsWith("https://")?t:""}function r2t(e){var r;const t=e.attachmentType.trim().toLocaleLowerCase();if(t==="image"||t==="doc-image"||t.startsWith("image/"))return"image";if(t==="audio"||t.startsWith("audio/"))return"audio";if(t==="video"||t.startsWith("video/"))return"video";if(t==="pdf"||t==="application/pdf")return"pdf";const n=e.attachmentUrl.split(/[?#]/,1)[0],i=n.includes(".")?((r=n.split(".").pop())==null?void 0:r.toLocaleLowerCase())??"":"";return JMe.has(i)?"image":eLe.has(i)?"audio":tLe.has(i)?"video":ZTt.has(i)?"pdf":t||i?"file":"none"}function s2t(e,t){const n=e.status.trim().toLocaleLowerCase();if(e2t.has(n))return{title:t("knowledge.preview.processingTitle"),detail:t("knowledge.preview.processingDetail")};if(t2t.has(n))return{title:t("knowledge.preview.failedTitle"),detail:t("knowledge.preview.failedDetail")};const i=l9(e).toLocaleLowerCase();return i==="pdf"||JTt.has(i)?{title:t("knowledge.preview.noParsedTitle"),detail:t("knowledge.preview.noParsedDetail")}:JMe.has(i)||eLe.has(i)||tLe.has(i)?{title:t("knowledge.preview.noMediaTitle"),detail:t("knowledge.preview.noMediaDetail")}:{title:t("knowledge.preview.noDataTitle"),detail:t("knowledge.preview.noDataDetail")}}function a2t({chunk:e}){const{t}=Te("ui"),[n,i]=p.useState(!1),r=nLe(e.attachmentUrl),s=r2t(e);return!r||s==="none"?null:n?a.jsx("div",{className:"knowledge-preview__attachment-error",children:t("knowledge.preview.attachmentError")}):s==="image"?a.jsx("img",{className:"knowledge-preview__image",src:r,alt:e.title||t("knowledge.preview.imageAlt"),loading:"lazy",onError:()=>i(!0)}):s==="audio"?a.jsx("audio",{className:"knowledge-preview__audio",src:r,controls:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.audioUnsupported")}):s==="video"?a.jsx("video",{className:"knowledge-preview__video",src:r,controls:!0,playsInline:!0,preload:"metadata",onError:()=>i(!0),children:t("knowledge.preview.videoUnsupported")}):s==="pdf"?a.jsxs("div",{className:"knowledge-preview__pdf",children:[a.jsx("iframe",{src:r,title:e.title?t("knowledge.preview.namedPdf",{name:e.title}):t("knowledge.preview.pdf"),sandbox:"",referrerPolicy:"no-referrer",onError:()=>i(!0)}),a.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openPdf")})]}):a.jsxs("div",{className:"knowledge-preview__file-fallback",children:[a.jsx("p",{children:t("knowledge.preview.fileUnsupported")}),a.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:t("knowledge.preview.openOriginalFile")})]})}function o2t({base:e,item:t,onClose:n}){const{t:i}=Te("ui"),[r,s]=p.useState([]),[o,l]=p.useState(t),[c,u]=p.useState(""),[d,f]=p.useState(!0),[h,m]=p.useState(!1),[g,b]=p.useState(!1),[v,y]=p.useState(""),w=p.useRef(0),x=p.useRef(null),O=p.useCallback(async(E=0)=>{var R;(R=x.current)==null||R.abort();const j=new AbortController;x.current=j;const T=w.current+1;w.current=T,E>0?m(!0):f(!0),y(""),E===0&&(s([]),b(!1));try{const A=await Pbt(e.id,t.id,{region:e.region,offset:E,signal:j.signal});if(w.current!==T)return;l(A.document.id?A.document:t),u(A.sourceMarkdown||A.document.sourceMarkdown),s(N=>E>0?[...N,...A.chunks]:A.chunks),b(A.hasMore)}catch(A){!a9(A)&&w.current===T&&y(Cl(A,i("knowledge.errors.loadPreview")))}finally{w.current===T&&(f(!1),m(!1))}},[e.id,e.region,t,i]);p.useEffect(()=>(O(),()=>{var E;(E=x.current)==null||E.abort(),w.current+=1}),[O]);const k=i2t(o.url||t.url),S=s2t(o,i),C=o.metadata._veadk_content_format==="markdown";return a.jsx(yT,{title:o.name||t.name||t.id,onClose:n,className:"knowledge-dialog--preview",children:a.jsxs("div",{className:"knowledge-preview",children:[o.sizeBytes>0||k?a.jsxs("div",{className:"knowledge-preview__meta",children:[o.sizeBytes>0?a.jsx("span",{children:aq(o.sizeBytes)}):null,k?a.jsx("a",{href:k,target:"_blank",rel:"noopener noreferrer",children:i("knowledge.openOriginalWeb")}):null]}):null,a.jsx("div",{className:"knowledge-preview__body","aria-live":"polite",children:c?a.jsx("div",{className:"knowledge-preview__markdown-shell",children:a.jsx(Td,{text:c,allowRawHtml:!1,className:"knowledge-preview__markdown"})}):d?a.jsx("div",{className:"knowledge-preview__state",role:"status",children:a.jsx(fn,{as:"span",duration:2.4,children:i("knowledge.preview.loading")})}):v&&r.length===0?a.jsxs("div",{className:"knowledge-preview__state is-error",role:"alert",children:[a.jsx("p",{children:v}),a.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.retry")})]}):r.length===0?a.jsxs("div",{className:"knowledge-preview__state",children:[a.jsx("p",{children:S.title}),a.jsx("span",{children:k?i("knowledge.preview.openOriginalHint"):S.detail}),a.jsx("button",{type:"button",onClick:()=>void O(),children:i("common.reload")})]}):a.jsxs("div",{className:"knowledge-preview__chunks",children:[r.map((E,j)=>{const T=n2t(E.tableFields,i),R=E.id||`${j}:${E.title}`;return a.jsxs("article",{className:"knowledge-preview__chunk",children:[a.jsx("header",{children:a.jsx("h3",{children:E.title||i("knowledge.preview.chunk",{index:j+1})})}),E.content?C?a.jsx(Td,{text:E.content,allowRawHtml:!1,className:"knowledge-preview__markdown"}):a.jsx("p",{className:"knowledge-preview__content",children:E.content}):null,T?a.jsx("div",{className:"knowledge-preview__table-wrap",children:a.jsxs("table",{children:[a.jsx("thead",{children:a.jsx("tr",{children:T.columns.map((A,N)=>a.jsx("th",{scope:"col",children:A},`${A}:${N}`))})}),a.jsx("tbody",{children:T.rows.map((A,N)=>a.jsx("tr",{children:A.map((P,I)=>a.jsx("td",{children:P},I))},N))})]})}):null,a.jsx(a2t,{chunk:E})]},R)}),v?a.jsx("div",{className:"knowledge-preview__more-error",role:"alert",children:v}):null,g?a.jsx("button",{type:"button",className:"knowledge-preview__load-more",disabled:h,onClick:()=>void O(r.length),children:h?a.jsx(fn,{as:"span",duration:2.4,children:i("knowledge.preview.loadingMore")}):i("knowledge.preview.loadMore")}):null]})})]})})}function l2t({cloudProvider:e,region:t,active:n=!0,activationRevision:i=0,onDetailChange:r,toolbarLeading:s,toolbarFilters:o}){const{t:l,i18n:c}=Te("ui"),[u,d]=p.useState([]),[f,h]=p.useState({}),[m,g]=p.useState([]),[b,v]=p.useState(""),[y,w]=p.useState("overview"),[x,O]=p.useState(""),[k,S]=p.useState(""),[C,E]=p.useState(!0),[j,T]=p.useState(!1),[R,A]=p.useState(""),[N,P]=p.useState([]),[I,D]=p.useState(!1),[_,L]=p.useState(""),[F,M]=p.useState(""),[V,q]=p.useState(""),[U,J]=p.useState(!1),[z,Z]=p.useState(!1),[ne,W]=p.useState(!1),[G,H]=p.useState(null),[se,Y]=p.useState(null),[X,ie]=p.useState(null),[ee,be]=p.useState(null),[ue,pe]=p.useState(null),[ke,je]=p.useState(!1),Pe=p.useRef(0),Ee=p.useRef(0),ze=p.useRef([]),_e=p.useRef(!1),ae=p.useRef(!1),le=p.useRef(null),ge=p.useRef(null),Oe=p.useRef({}),Se=p.useRef(!1),We=p.useRef(null),Ye=p.useRef(null),ye=p.useRef(null),we=p.useRef(null),Ae=p.useMemo(()=>[t],[t]),He=p.useCallback(Ke=>`${Ke.region}\0${Ke.id}`,[]),Ue=u.find(Ke=>He(Ke)===b)??null,jt=!!(Ue&&V===He(Ue));p.useEffect(()=>{r==null||r(!!Ue)},[r,Ue]),p.useEffect(()=>{w("overview"),S("")},[b]);const Pt=p.useMemo(()=>{const Ke=x.trim().toLocaleLowerCase();return Ke?u.filter(St=>[St.name,St.description,St.ownerLabel,St.providerKnowledgeId].some(qe=>qe.toLocaleLowerCase().includes(Ke))):u},[u,x]),Kt=p.useMemo(()=>{const Ke=k.trim().toLocaleLowerCase();return Ke?N.filter(St=>[St.name,St.id,l9(St)].some(qe=>qe.toLocaleLowerCase().includes(Ke))):N},[k,N]);p.useEffect(()=>{Y(null)},[Ue==null?void 0:Ue.id,Ue==null?void 0:Ue.region]);const Ct=p.useCallback(async(Ke=!1)=>{var nt;if(Ke&&(Se.current||Object.keys(Oe.current).length===0))return;(nt=le.current)==null||nt.abort();const St=new AbortController;le.current=St;const qe=Pe.current+1;Pe.current=qe,Se.current=!0,Ke?T(!0):E(!0),A(""),Ke||g([]);try{const et=await _bt({regions:Ae,nextTokens:Ke?Oe.current:void 0,signal:St.signal});if(Pe.current!==qe)return;d(Et=>Ke?[...Et,...et.items.filter(At=>!Et.some(It=>He(It)===He(At)))]:et.items),Oe.current=et.nextTokens,h(et.nextTokens);const ft=et.failures.map(({region:Et,error:At})=>`${wh(Et,e)}: ${Cl(At,l("common.loadFailed"))}`);g(Et=>Ke?[...new Set([...Et,...ft])]:ft),Ke||v(Et=>et.items.some(At=>He(At)===Et)?Et:"")}catch(et){if(a9(et))return;Pe.current===qe&&(Ke?g(ft=>[...new Set([...ft,Cl(et,l("knowledge.errors.loadMoreBases"))])]):A(Cl(et,l("knowledge.errors.loadBases"))))}finally{Pe.current===qe&&(Se.current=!1,E(!1),T(!1))}},[He,e,Ae,l]),xt=p.useCallback(async(Ke,St=!1)=>{var et;if(St&&_e.current)return;(et=ge.current)==null||et.abort();const qe=new AbortController;ge.current=qe;const nt=Ee.current+1;Ee.current=nt,St||(ze.current=[],ae.current=!1,P([]),J(!1),M("")),_e.current=!0,D(!0),St?M(""):L("");try{const ft=await Ibt(Ke.id,{region:Ke.region,offset:St?ze.current.length:0,signal:qe.signal});if(Ee.current!==nt)return;q(Gt=>Gt===He(Ke)?"":Gt);const Et=ze.current,At=St?[...Et,...ft.items.filter(Gt=>!Gt.id||!Et.some(Xe=>Xe.id===Gt.id))]:ft.items,It=ft.hasMore&&(!St||At.length>Et.length);ze.current=At,ae.current=It,P(At),J(It)}catch(ft){if(a9(ft))return;Ee.current===nt&&(ft instanceof bM&&ft.errorCode===sPe&&(q(He(Ke)),H(At=>At&&He(At)===He(Ke)?null:At)),St?M(Cl(ft,l("knowledge.errors.loadMoreData"))):L(Cl(ft,l("knowledge.errors.loadData"))))}finally{Ee.current===nt&&(_e.current=!1,D(!1))}},[He,l]);p.useEffect(()=>{var Ke;(Ke=le.current)==null||Ke.abort(),Pe.current+=1,Se.current=!1,Oe.current={},d([]),h({}),g([]),v(""),q(""),A(""),E(!0)},[e]),p.useEffect(()=>{if(n)return Ct(),()=>{var Ke;(Ke=le.current)==null||Ke.abort(),Pe.current+=1,Se.current=!1}},[n,i,Ct]),p.useEffect(()=>{var Ke,St;if(!n){(Ke=ge.current)==null||Ke.abort(),Ee.current+=1,_e.current=!1;return}if(!Ue){(St=ge.current)==null||St.abort(),Ee.current+=1,ze.current=[],_e.current=!1,ae.current=!1,P([]),J(!1),M("");return}return xt(Ue),()=>{var qe;(qe=ge.current)==null||qe.abort(),Ee.current+=1,_e.current=!1}},[n,i,Ue==null?void 0:Ue.id,Ue==null?void 0:Ue.region]);const tt=n&&!Ue&&!x.trim()&&!C&&!j&&!R&&Object.keys(f).length>0;p.useEffect(()=>{const Ke=Ye.current,St=We.current;if(!Ke||!St||!tt)return;const qe=new IntersectionObserver(([nt])=>{nt.isIntersecting&&Ct(!0)},{root:St,rootMargin:"240px 0px",threshold:.01});return qe.observe(Ke),()=>qe.disconnect()},[tt,Ct]);const mt=()=>{const Ke=We.current;!Ke||!tt||Ke.scrollHeight-Ke.scrollTop-Ke.clientHeight<=240&&Ct(!0)},Ne=!!(Ue&&N.length>0&&U&&!I&&!F);p.useEffect(()=>{const Ke=we.current,St=ye.current;if(!Ue||!Ke||!St||!Ne)return;const qe=new IntersectionObserver(([nt])=>{nt.isIntersecting&&xt(Ue,!0)},{root:ye.current,rootMargin:"240px 0px",threshold:.01});return qe.observe(Ke),()=>qe.disconnect()},[Ne,xt,Ue==null?void 0:Ue.id,Ue==null?void 0:Ue.region]);const Ot=()=>{const Ke=ye.current;if(!Ue||!Ke||!ae.current||_e.current||F)return;const{scrollHeight:St,scrollTop:qe,clientHeight:nt}=Ke;St-qe-nt<=240&&xt(Ue,!0)},Nt=Ke=>{d(St=>St.map(qe=>He(qe)===He(Ke)?Ke:qe))},Yt=async()=>{if(ee){je(!0);try{await Rbt(ee.id,ee.region),d(Ke=>Ke.filter(St=>He(St)!==He(ee))),q(Ke=>Ke===He(ee)?"":Ke),b===He(ee)&&v(""),be(null)}catch(Ke){A(Cl(Ke,l("knowledge.errors.deleteBase"))),be(null)}finally{je(!1)}}},xn=async()=>{if(!(!Ue||!ue)){je(!0);try{await Fbt(Ue.id,ue.id,Ue.region);const Ke=ze.current.filter(St=>St.id!==ue.id);ze.current=Ke,P(Ke),pe(null)}catch(Ke){L(Cl(Ke,l("knowledge.errors.deleteDocument"))),pe(null)}finally{je(!1)}}};return a.jsxs("section",{className:`knowledge-library${Ue?" is-detail":" resource-collection"}`,"aria-label":l("knowledge.library"),children:[Ue?a.jsx(oT,{className:"knowledge-library__detail",title:Ue.name,description:Ue.description||l("common.noDescription"),identitySeed:Ue.name,backLabel:l("knowledge.backToList"),onBack:()=>v(""),sections:[{key:"overview",label:l("skillCenter.overview"),content:a.jsx("section",{className:"knowledge-overview",children:a.jsxs(bH,{className:"knowledge-overview__summary",children:[a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.provider")}),a.jsx("dd",{children:Ue.providerType||"-"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.knowledgeId")}),a.jsx("dd",{className:"knowledge-keyboard-reveal",tabIndex:0,title:Ue.providerKnowledgeId,children:Ue.providerKnowledgeId||"-"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.project")}),a.jsx("dd",{children:Ue.projectName||"default"})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("knowledge.creator")}),a.jsx("dd",{children:P4(Ue.ownerLabel)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:l("skillCenter.updatedAt")}),a.jsx("dd",{children:zTt(Ue.updatedAt,c.resolvedLanguage??c.language)||"-"})]})]})})},{key:"data",label:l("knowledge.data"),content:a.jsx("section",{className:"knowledge-documents",children:a.jsx("div",{className:`knowledge-documents__body${N.length>0?" is-table":""}`,"aria-live":"polite",children:I&&N.length===0?a.jsx(cl,{}):_&&N.length===0?a.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[a.jsx("p",{children:_}),jt&&Ue.canManage?a.jsx("button",{type:"button",onClick:()=>be(Ue),children:l("knowledge.deleteInvalidAssociation")}):a.jsx("button",{type:"button",onClick:()=>void xt(Ue),children:l("common.retry")})]}):N.length===0?a.jsxs("div",{className:"knowledge-library__state",children:[a.jsx(BTt,{}),a.jsx("p",{children:l("knowledge.noData")}),Ue.canManage&&a.jsx("button",{type:"button",onClick:()=>H(Ue),children:l("knowledge.addFirstData")})]}):a.jsx(yH,{rows:Kt,rowKey:Ke=>Ke.id,rowLabel:Ke=>Ke.name||Ke.id,columns:[{key:"name",header:l("common.name"),className:"is-primary-column",render:Ke=>a.jsx("span",{title:Ke.name||Ke.id,children:Ke.name||Ke.id})},{key:"format",header:l("knowledge.format"),className:"is-compact-column",render:Ke=>l9(Ke)},{key:"size",header:l("knowledge.size"),className:"is-compact-column",render:Ke=>aq(Ke.sizeBytes)}],searchValue:k,onSearchChange:S,searchPlaceholder:l("knowledge.searchData"),searchLabel:l("knowledge.searchLibraryData"),primaryAction:Ue.canManage?{label:l(jt?"knowledge.associationInvalid":"knowledge.addData"),disabled:jt,title:jt?l("knowledge.providerMissing"):void 0,onClick:()=>H(Ue)}:void 0,rowActions:Ke=>[{label:l("common.preview"),onSelect:()=>Y(Ke)},...Ue.canManage?[{label:l("common.edit"),onSelect:()=>ie(Ke)},{label:l("common.delete"),onSelect:()=>pe(Ke),danger:!0}]:[]],scrollRef:ye,onScroll:Ot,busy:I,emptyLabel:l("knowledge.noMatchingData"),footer:I?a.jsxs("div",{className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:[a.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),a.jsx("span",{children:l("knowledge.loadingMoreData")})]}):F?a.jsxs("div",{className:"knowledge-document-pagination is-error",role:"alert",children:[a.jsx("span",{children:F}),a.jsx("button",{type:"button",onClick:()=>void xt(Ue,!0),children:l("knowledge.retryLoading")})]}):U?a.jsx("div",{ref:we,className:"knowledge-document-pagination",role:"status","aria-live":"polite",children:l("skillCenter.scrollForMore")}):null})})})}],activeSectionKey:y,navigationLabel:l("knowledge.details"),onSectionChange:w,actions:Ue.canManage?a.jsxs(a.Fragment,{children:[a.jsx(_t,{type:"button",color:"danger",variant:"soft",size:"lg",pill:!1,onClick:()=>be(Ue),children:l("common.delete")}),a.jsx(_t,{type:"button",color:"primary",size:"lg",pill:!1,onClick:()=>W(!0),children:l("common.edit")})]}):void 0}):a.jsxs(a.Fragment,{children:[a.jsxs(sb,{className:"knowledge-library__toolbar library-resource-toolbar",children:[s,a.jsxs("div",{className:"resource-toolbar__actions",children:[o,a.jsx(Jp,{value:x,onChange:Ke=>O(Ke.target.value),placeholder:l("knowledge.searchBases"),"aria-label":l("knowledge.searchBases")})]})]}),a.jsxs(em,{ref:We,"aria-live":"polite",onScroll:mt,children:[m.length>0&&!C&&a.jsxs("div",{className:"knowledge-region-warning",role:"status",children:[a.jsx("span",{children:l("knowledge.someBasesFailed")}),a.jsx("button",{type:"button",onClick:()=>void Ct(),children:l("common.retry")})]}),C&&u.length===0?a.jsx(cl,{}):R?a.jsxs("div",{className:"knowledge-library__state is-error",role:"alert",children:[a.jsx("p",{children:R}),a.jsx("button",{type:"button",onClick:()=>void Ct(),children:l("common.retry")})]}):Pt.length===0&&x.trim()?a.jsxs("div",{className:"knowledge-library__state",children:[a.jsx(FTt,{}),a.jsx("p",{children:l("knowledge.noMatchingBases")})]}):a.jsxs(W0,{children:[x.trim()?null:a.jsx(lb,{"aria-label":l("knowledge.createBase"),icon:a.jsx(QTt,{}),onClick:()=>Z(!0),children:l("knowledge.createBase")}),Pt.map(Ke=>a.jsx(G0,{className:"knowledge-card",title:Ke.name,description:Ke.description||l("common.noDescription"),metadata:[{label:l("knowledge.creator"),value:P4(Ke.ownerLabel),title:P4(Ke.ownerLabel)},{label:l("knowledge.project"),value:Ke.projectName||"default",title:Ke.projectName||"default"}],action:{label:V===He(Ke)?l("knowledge.associationInvalid"):l("knowledge.addData"),icon:"plus",disabled:!Ke.canManage||V===He(Ke),title:Ke.canManage?V===He(Ke)?l("knowledge.providerMissing"):void 0:l("knowledge.noManagePermission"),onClick:()=>H(Ke)},detailAction:{label:l("common.viewDetails"),onClick:()=>v(He(Ke))}},He(Ke)))]}),tt||j?a.jsx("div",{ref:Ye,className:"my-agent-load-more",role:"status","aria-live":"polite",children:j?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"my-agent-loading-mark","aria-hidden":"true"}),a.jsx("span",{children:l("knowledge.loadingMoreBases")})]}):tt?a.jsx("span",{children:l("skillCenter.scrollForMore")}):null}):null]})]}),z&&a.jsx(KTt,{region:t,onClose:()=>Z(!1),onCreated:Ke=>{d(St=>[Ke,...St]),v(He(Ke)),Z(!1)}}),Ue&&ne&&a.jsx(GTt,{item:Ue,onClose:()=>W(!1),onUpdated:Ke=>{Nt(Ke),W(!1)}}),Ue&&se&&a.jsx(o2t,{base:Ue,item:se,onClose:()=>Y(null)}),G&&a.jsx(XTt,{base:G,onClose:()=>H(null),onAssociationInvalid:Ke=>{q(He(G)),Ue&&He(Ue)===He(G)&&L(Cl(Ke,l("knowledge.associationInvalid"))),H(null)},onCreated:()=>{Ue&&He(Ue)===He(G)&&xt(Ue),H(null)}}),Ue&&X&&a.jsx(YTt,{base:Ue,item:X,onClose:()=>ie(null),onUpdated:Ke=>{const St=ze.current.map(qe=>qe.id===Ke.id?Ke:qe);ze.current=St,P(St),ie(null)}}),ee&&a.jsx(Cd,{title:l("knowledge.deleteBaseTitle"),description:l("knowledge.deleteBaseDescription",{name:ee.name}),confirmLabel:l(ke?"common.deleting":"common.delete"),variant:"danger",busy:ke,onCancel:()=>be(null),onConfirm:()=>void Yt()}),ue&&a.jsx(Cd,{title:l("knowledge.deleteDocumentTitle"),description:l("knowledge.deleteDocumentDescription",{name:ue.name||ue.id}),confirmLabel:l(ke?"common.deleting":"common.delete"),variant:"danger",busy:ke,onCancel:()=>pe(null),onConfirm:()=>void xn()})]})}const c2t="_EmptyMessage_1r5gu_1",u2t="_IconBadge_1r5gu_16",d2t="_Title_1r5gu_54",f2t="_Description_1r5gu_69",h2t="_ActionRow_1r5gu_77",vT={EmptyMessage:c2t,IconBadge:u2t,Title:d2t,Description:f2t,ActionRow:h2t},Wn=({children:e,className:t,fill:n="static"})=>a.jsx("div",{className:Ui(vT.EmptyMessage,t),"data-fill":n,children:e}),p2t=({size:e="md",color:t="secondary",children:n,className:i})=>a.jsx("div",{className:Ui(vT.IconBadge,i),"data-size":e,"data-color":t,children:n}),m2t=({children:e,className:t,color:n="secondary"})=>a.jsx("div",{className:Ui(vT.Title,t),"data-color":n,children:e}),g2t=({children:e,className:t})=>a.jsx("div",{className:Ui(vT.Description,t),children:e}),b2t=({children:e,className:t})=>a.jsx("div",{className:Ui(vT.ActionRow,t),children:e});Wn.Icon=p2t;Wn.Title=m2t;Wn.Description=g2t;Wn.ActionRow=b2t;bn.hasResourceBundle("en-US","skills")||bn.addResourceBundle("en-US","skills",zme,!0,!0);bn.hasResourceBundle("zh-CN","skills")||bn.addResourceBundle("zh-CN","skills",Gwe,!0,!0);function en(e,t={}){return bn.t(e,{...t,ns:"skills"})}const y2t="/web/skill-workbench";class c9 extends Error{constructor(t,n,i="SKILL_WORKBENCH_ERROR",r=!1,s="",o,l=""){super(t),this.status=n,this.code=i,this.retryable=r,this.statusText=s,this.originalError=o,this.rawResponse=l,this.name="SkillWorkbenchApiError"}}function Od(e,t){if(!e||typeof e!="object"||Array.isArray(e))throw new Error(en("api.invalidFormat",{label:t}));return e}function Tne(e,t){if(e!=null){if(typeof e!="string"||!e.trim()||e.trim().length>256)throw new Error(en("api.invalidFormat",{label:t}));return e.trim()}}function v2t(e){if(e!=null){if(e==="pending"||e==="ready"||e==="failed"||e==="unknown")return e;throw new Error(en("api.invalidFormat",{label:en("api.recoveryStatus")}))}}async function Sh(e,t={},n=ho){return fetch(Ta(`${y2t}${e}`),{...t,headers:uc(t.headers),signal:po(t.signal,n)})}async function oq(e,t){var i;const n=await e.text().catch(()=>"");try{const r=Od(JSON.parse(n),en("api.errorResponse")),s=r.detail&&typeof r.detail=="object"?Od(r.detail,en("api.errorDetails")):r;return new c9(typeof s.message=="string"?s.message:t,e.status,typeof s.code=="string"?s.code:"SKILL_WORKBENCH_ERROR",s.retryable===!0,e.statusText,s.originalError&&typeof s.originalError=="object"?s.originalError:void 0,n)}catch{const r=((i=e.headers.get("content-type"))==null?void 0:i.split(";",1)[0])||en("api.missingContentType");return new c9(en("api.gatewayError",{fallback:t,status:e.status,contentType:r}),e.status,"SKILL_WORKBENCH_ERROR",!1,e.statusText,void 0,n)}}async function ub(e,t){if(!e.ok)throw await oq(e,t);const n=e.headers.get("content-type")??"";if(!n.includes("application/json")){const i=n.split(";",1)[0]||en("api.missingContentType");throw new Error(en("api.nonJson",{fallback:t,status:e.status,contentType:i}))}return e.json()}function x2t(e){return Array.isArray(e)?e.map(t=>{const n=Od(t,en("api.activity")),i=n.kind,r=n.status;if(typeof n.id!="string"||!["status","thinking","message","tool"].includes(String(i))||!["running","done"].includes(String(r)))throw new Error(en("api.invalidActivity"));if(i==="tool"){if(typeof n.name!="string")throw new Error(en("api.invalidToolActivity"));return{id:n.id,kind:i,status:r,name:n.name,...n.input!==void 0?{args:n.input}:{},...n.output!==void 0?{response:n.output}:{}}}if(typeof n.text!="string")throw new Error(en("api.invalidTextActivity"));return{id:n.id,kind:i,status:r,text:n.text}}):[]}function w2t(e){if(e==null)return;const t=Od(e,en("api.publication"));if(typeof t.revision!="number"||typeof t.skillId!="string"||typeof t.version!="string"||!Array.isArray(t.skillSpaceIds)||!t.skillSpaceIds.every(n=>typeof n=="string")||t.disposition!=="create-new"&&t.disposition!=="update-source"||!AD(t.region)||typeof t.projectName!="string")throw new Error(en("api.invalidFormat",{label:en("api.publication")}));return{revision:t.revision,skillId:t.skillId,version:t.version,skillSpaceIds:t.skillSpaceIds,disposition:t.disposition,region:t.region,projectName:t.projectName}}function TC(e){const t=Od(e,en("api.task"));if(typeof t.jobId!="string"||t.operation!=="create"&&t.operation!=="optimize"||typeof t.intent!="string"||typeof t.revision!="number"||typeof t.state!="string")throw new Error(en("api.invalidFormat",{label:en("api.task")}));const n=Array.isArray(t.files)?t.files.flatMap(l=>{const c=Od(l,en("api.file"));return typeof c.path=="string"&&typeof c.size=="number"?[{path:c.path,size:c.size}]:[]}):[];if(!["running","ready","failed","cancelled","expired","published"].includes(t.state))throw new Error(en("api.unknownTaskState"));const r=Tne(t.toolId,"Tool ID"),s=Tne(t.sessionId,"Session ID"),o=v2t(t.recoveryStatus);return{jobId:t.jobId,operation:t.operation,intent:t.intent,...typeof t.model=="string"?{model:t.model}:{},...typeof t.style=="string"?{style:t.style}:{},...typeof t.requestedName=="string"?{requestedName:t.requestedName}:{},revision:t.revision,...r?{toolId:r}:{},...s?{sessionId:s}:{},...typeof t.sessionTtlSeconds=="number"?{sessionTtlSeconds:t.sessionTtlSeconds}:{},...typeof t.expiresAt=="string"?{expiresAt:t.expiresAt}:{},...typeof t.recoveryAvailable=="boolean"?{recoveryAvailable:t.recoveryAvailable}:{},...o?{recoveryStatus:o}:{},...typeof t.recoveredFromSnapshot=="boolean"?{recoveredFromSnapshot:t.recoveredFromSnapshot}:{},state:t.state,stage:typeof t.stage=="string"?t.stage:"generating",activities:x2t(t.activities),files:n,...t.source&&typeof t.source=="object"?{source:t.source}:{},...typeof t.name=="string"?{name:t.name}:{},...typeof t.description=="string"?{description:t.description}:{},...typeof t.skillMd=="string"?{skillMd:t.skillMd}:{},...typeof t.error=="string"?{error:t.error}:{},...t.validation&&typeof t.validation=="object"?{validation:t.validation}:{},...t.publication?{publication:w2t(t.publication)}:{}}}async function NM(e){const t=Od(await ub(await Sh("/capabilities",{signal:e}),en("api.loadCapability")),en("api.capability"));return{enabled:t.enabled===!0,reason:typeof t.reason=="string"?t.reason:"",operations:Array.isArray(t.operations)?t.operations.filter(n=>n==="create"||n==="optimize"):[],models:Array.isArray(t.models)?t.models.flatMap(n=>{if(!n||typeof n!="object")return[];const i=n;return typeof i.id=="string"&&typeof i.label=="string"?[{id:i.id,label:i.label}]:[]}):[],styles:t.styles&&typeof t.styles=="object"&&!Array.isArray(t.styles)?Object.fromEntries(Object.entries(t.styles).filter(n=>typeof n[1]=="string")):{},...typeof t.maxUploadBytes=="number"?{maxUploadBytes:t.maxUploadBytes}:{}}}async function O2t(e){if(e.file){const n=new URLSearchParams({operation:"optimize",intent:e.intent});e.jobId&&n.set("job_id",e.jobId),e.model&&n.set("model",e.model),e.style&&n.set("style",e.style),e.name&&n.set("name",e.name);const i=await Sh(`/tasks/from-upload?${n}`,{method:"POST",body:e.file,headers:{"Content-Type":"application/zip"},signal:e.signal},hr);return TC(await ub(i,en("api.startOptimization")))}const t=await Sh("/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operation:e.operation,intent:e.intent,...e.model?{model:e.model}:{},...e.style?{style:e.style}:{},...e.name?{name:e.name}:{},...e.jobId?{jobId:e.jobId}:{},...e.source?{source:{kind:"skill-center",skillId:e.source.skillId,skillName:e.source.name,version:e.source.version,region:e.source.region,projectName:e.source.projectName,skillSpaceId:e.source.skillSpaceId,skillSpaceName:e.source.skillSpaceName}}:{}}),signal:e.signal},hr);return TC(await ub(t,en("api.startTask")))}async function k2t(e,t){return TC(await ub(await Sh(`/tasks/${encodeURIComponent(e)}`,{signal:t}),en("api.loadTask")))}async function D4(e,t,n){const i=new URLSearchParams;i.set("expected_revision",String(t));const r=Od(await ub(await Sh(`/tasks/${encodeURIComponent(e)}/artifact?${i.toString()}`,{signal:n}),en("api.loadArtifact")),en("api.artifact"));if(r.jobId!==e||r.revision!==t||!Number.isSafeInteger(r.revision)||r.revision<1||typeof r.sha256!="string"||!/^[0-9a-f]{64}$/.test(r.sha256)||typeof r.name!="string"||typeof r.description!="string"||!Array.isArray(r.files))throw new Error(en("api.invalidFormat",{label:en("api.artifact")}));const s=r.files.map(o=>{const l=Od(o,en("api.artifactFile"));if(typeof l.path!="string"||typeof l.size!="number"||typeof l.content!="string")throw new Error(en("api.invalidFormat",{label:en("api.artifactFile")}));return{path:l.path,size:l.size,content:l.content}});return{jobId:r.jobId,revision:r.revision,sha256:r.sha256,name:r.name,description:r.description,files:s}}async function M4(e){const t=await Sh(`/tasks/${encodeURIComponent(e.jobId)}/refinements`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({intent:e.intent,expectedRevision:e.expectedRevision})},hr);return TC(await ub(t,en("api.refine")))}async function S2t(e){const t=await Sh(`/tasks/${encodeURIComponent(e.jobId)}/stop`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({expectedRevision:e.expectedRevision})});return TC(await ub(t,en("api.stop")))}async function E2t(e){const t=await Sh(`/tasks/${encodeURIComponent(e.jobId)}/publish-stream`,{method:"POST",headers:{"Content-Type":"application/json",Accept:"application/x-ndjson"},body:JSON.stringify({disposition:e.disposition,expectedRevision:e.expectedRevision,expectedArtifactSha256:e.expectedArtifactSha256,skillSpaceIds:e.skillSpaceIds??[],projectName:e.projectName,region:e.region}),signal:e.signal},0);if(!t.ok)throw await oq(t,en("api.publish"));if(!(t.headers.get("content-type")??"").includes("application/x-ndjson"))throw new Error(en("api.nonNdjson"));if(!t.body)throw new Error(en("api.missingStream"));const i=new Set(["preparing","uploading","registering","activating","publishing"]);let r=null,s="";const o=new TextDecoder,l=t.body.getReader(),c=u=>{var h;if(!u.trim())return;const d=Od(JSON.parse(u),en("api.publishProgress"));if(d.type==="progress"){if(typeof d.phase!="string"||!i.has(d.phase)||typeof d.message!="string")throw new Error(en("api.invalidPublishProgress"));(h=e.onProgress)==null||h.call(e,{phase:d.phase,message:d.message});return}if(d.type==="error"){const m=Od(d.error,en("api.publishError"));throw new c9(typeof m.message=="string"?m.message:en("api.publish"),500,typeof m.code=="string"?m.code:"SKILL_PUBLISH_FAILED",m.retryable===!0,"",m.originalError&&typeof m.originalError=="object"?m.originalError:void 0,JSON.stringify(d.error))}if(d.type!=="complete")throw new Error(en("api.unknownPublishEvent"));const f=Od(d.result,en("api.publishResult"));if(typeof f.skillId!="string"||typeof f.version!="string"||!Array.isArray(f.skillSpaceIds)||!f.skillSpaceIds.every(m=>typeof m=="string")||f.disposition!=="create-new"&&f.disposition!=="update-source"||!AD(f.region)||typeof f.projectName!="string")throw new Error(en("api.invalidFormat",{label:en("api.publishResult")}));r={skillId:f.skillId,version:f.version,skillSpaceIds:f.skillSpaceIds,disposition:f.disposition,region:f.region,projectName:f.projectName}};for(;;){const{value:u,done:d}=await l.read();s+=o.decode(u,{stream:!d});const f=s.split(` +`);if(s=f.pop()??"",f.forEach(c),d)break}if(c(s),!r)throw new Error(en("api.streamEnded"));return r}async function C2t(e){await ub(await Sh(`/tasks/${encodeURIComponent(e)}`,{method:"DELETE"}),en("api.deleteTask"))}async function A2t(e,t,n){var c;const i=new URLSearchParams;i.set("expected_revision",String(t)),i.set("expected_sha256",n);const r=await Sh(`/tasks/${encodeURIComponent(e)}/download?${i.toString()}`,{},hr);if(!r.ok)throw await oq(r,en("api.download"));const o=((c=(r.headers.get("content-disposition")??"").match(/filename="([^"]+)"/))==null?void 0:c[1])??"skill.zip",l=URL.createObjectURL(await r.blob());try{const u=document.createElement("a");u.href=l,u.download=o,u.click()}finally{URL.revokeObjectURL(l)}}const iLe=p.createContext(void 0);function ev(e){const t=p.useContext(iLe);if(t===void 0&&!e)throw new Error(Vc(47));return t}const T2t={...mje,disabled:e=>e.disabled,instantType:e=>e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,modal:e=>e.modal,focusManagerModal:e=>e.focusManagerModal,stickIfOpen:e=>e.stickIfOpen,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin};class _2t extends BD{constructor(n,i,r){const s=new cV;super(j2t(n,s,i,r),N2t(s),T2t);Zt(this,"setOpen",(n,i)=>{var f,h;const r=i.reason===mu,s=i.reason===Yw&&i.event.detail===0,o=!n&&(i.reason===T_e||i.reason==null),l=sst(i),c=this.select("activeTriggerId");if(!n&&i.reason===A_e&&i.trigger==null&&c!=null&&(i.trigger=this.context.triggerElements.getById(c)??this.select("activeTriggerElement")??void 0),(h=(f=this.context).onOpenChange)==null||h.call(f,n,i),i.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(n,i);const u=()=>{const m={open:n,openChangeReason:i.reason};aje(m,n,i.trigger,l()),this.update(m)};r?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(Iit,()=>{this.set("stickIfOpen",!1)}),yi.flushSync(u)):u();let d;s?d="click":o?d="dismiss":i.reason===cC&&(d="focus"),this.set("instantType",d)})}}function j2t(e,t,n,i=!1){const r={...fje(),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return r.open&&(e==null?void 0:e.mounted)===void 0&&(r.mounted=!0),r.floatingRootContext=hje(t,n,i),r}function N2t(e){return{popupRef:p.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:p.createRef(),beforeContentFocusGuardRef:p.createRef(),stickIfOpenTimeout:new Lu,triggerElements:e}}function _ne({props:e}){const{children:t,open:n,defaultOpen:i=!1,onOpenChange:r,onOpenChangeComplete:s,modal:o=!1,handle:l,triggerId:c,defaultTriggerId:u=null}=e,d=I2t(l,{modal:o,open:i,openProp:n,activeTriggerId:u,triggerIdProp:c});d.useControlledProp("openProp",n),d.useControlledProp("triggerIdProp",c);const f=d.useState("open"),h=d.useState("mounted"),m=d.useState("payload");d.useContextCallback("onOpenChange",r),d.useContextCallback("onOpenChangeComplete",s),dje(d,f),lje(d);const{forceUnmount:g}=cje(f,d,()=>{d.update({stickIfOpen:!0,openChangeReason:null})});d.useSyncedValues({modal:o}),p.useEffect(()=>{f||d.context.stickIfOpenTimeout.clear()},[d,f]),p.useImperativeHandle(e.actionsRef,()=>({unmount:g,close:()=>d.setOpen(!1,fa(__e))}),[g,d]);const b=f||h;return a.jsxs(iLe.Provider,{value:d,children:[l&&a.jsx(sje,{handle:l,store:d}),b&&a.jsx(P2t,{store:d,modal:o}),typeof t=="function"?t({payload:m}):t]})}function R2t(e){return ev(!0)?a.jsx(_ne,{props:e}):a.jsx(frt,{children:a.jsx(_ne,{props:e})})}function I2t(e,t){const n=rje((i,r)=>new _2t(t,i,r));return p.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function P2t({store:e,modal:t}){const n=e.useState("floatingRootContext"),i=U_e(n,{outsidePressEvent:{mouse:t==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),r=i.reference,s=i.floating;return uje(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:s}),null}const D2t=300;function tm(e){return VA(e,"base-ui")}function M2t(e,t){const n=p.useRef(null);function i(s){yi.flushSync(()=>{e.setOpen(!1,fa(cC,s.nativeEvent,s.currentTarget))});const o=cit(n.current);o==null||o.focus()}function r(s){var l;const o=e.select("positionerElement");if(o&&rw(s,o))(l=e.context.beforeContentFocusGuardRef.current)==null||l.focus();else{yi.flushSync(()=>{e.setOpen(!1,fa(cC,s.nativeEvent,s.currentTarget))});let c=lit(e.context.triggerFocusTargetRef.current||t.current);for(;c!==null&&ii(o,c);){const u=c;if(c=Jz(c),c===u)break}c==null||c.focus()}}return{preFocusGuardRef:n,handlePreFocusGuardFocus:i,handleFocusTargetFocus:r}}function L2t(e){const t=p.useRef(""),n=p.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:p.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function rLe(e,t){const n=ci((s,o)=>{(typeof e=="function"?e():e)||t(o||(HD?"touch":""))}),{onClick:i,onPointerDown:r}=L2t(n);return p.useMemo(()=>({onClick:i,onPointerDown:r}),[i,r])}const $2t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,disabled:o=!1,nativeButton:l=!0,handle:c,payload:u,openOnHover:d=!1,delay:f=D2t,closeDelay:h=0,id:m,...g}=t,b=ev(!0),y=gje(c)??b;if(!y)throw new Error(Vc(74));const w=tm(m),x=y.useState("isTriggerActive",w),O=y.useState("floatingRootContext"),k=y.useState("isOpenedByTrigger",w),S=y.useState("triggerPopupId",w),C=p.useRef(null),{registerTrigger:E,isMountedByThisTrigger:j}=oje(w,C,y,{payload:u,disabled:o,openOnHover:d,closeDelay:h}),T=y.useState("openChangeReason"),R=y.useState("stickIfOpen"),A=y.useState("openMethod"),N=y.useState("focusManagerModal"),P=fst(O,{enabled:!o&&d&&(A!=="touch"||T!==Yw),mouseOnly:!0,move:!1,handleClose:mst(),restMs:f,delay:{close:h},triggerElementRef:C,isActiveTrigger:x,isClosing:()=>y.select("transitionStatus")==="ending"}),I=B_e(O,{stickIfOpen:R}),D=rLe(()=>y.select("open"),ne=>{y.set("openMethod",ne)}),_=y.useState("triggerProps",j),{getButtonProps:L,buttonRef:F}=GD({disabled:o,native:l}),M={open(ne){return ne&&T===Yw?_st.open(ne):xje.open(ne)}},{preFocusGuardRef:V,handlePreFocusGuardFocus:q,handleFocusTargetFocus:U}=M2t(y,C),z=Ra("button",t,{state:{disabled:o,open:k},ref:[F,n,E,C],props:[I.reference,P,_,D,{[sV]:"",id:w,"aria-haspopup":"dialog","aria-expanded":k,"aria-controls":S},g,L],stateAttributesMapping:M}),Z=a.jsx(p.Fragment,{children:z},w);return j&&!N?a.jsxs(p.Fragment,{children:[a.jsx(f0,{ref:V,onFocus:q}),Z,a.jsx(f0,{ref:y.context.triggerFocusTargetRef,onFocus:U})]}):Z}),sLe=p.createContext(void 0);function F2t(){const e=p.useContext(sLe);if(e===void 0)throw new Error(Vc(45));return e}const B2t=p.forwardRef(function(t,n){const{keepMounted:i=!1,...r}=t;return ev().useState("mounted")||i?a.jsx(sLe.Provider,{value:i,children:a.jsx(I_e,{ref:n,...r})}):null}),aLe=p.createContext(void 0);function U2t(){const e=p.useContext(aLe);if(!e)throw new Error(Vc(46));return e}const oLe=p.forwardRef(function(t,n){const{cutout:i,...r}=t;let s;if(i){const o=i.getBoundingClientRect();s=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${o.left}px ${o.top}px,${o.left}px ${o.bottom}px,${o.right}px ${o.bottom}px,${o.right}px ${o.top}px,${o.left}px ${o.top}px)`}return a.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let jne={},Nne={},Rne="";function RM(e,t){return UA(e)?e:t}function Ine(e,t,n){return/hidden|clip/.test(e.getComputedStyle(RM(t,n)).overflowY)}function Q2t(e){if(typeof document>"u")return!1;const t=kr(e);return ta(t).innerWidth-t.documentElement.clientWidth>0}function z2t(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=kr(e),i=n.documentElement,r=n.body,s=RM(i,r),o=s.style.overflowY,l=i.style.scrollbarGutter;i.style.scrollbarGutter="stable",s.style.overflowY="scroll";const c=s.offsetWidth;s.style.overflowY="hidden";const u=s.offsetWidth;return s.style.overflowY=o,i.style.scrollbarGutter=l,c===u}function V2t(e){const t=kr(e),n=t.documentElement,i=t.body,r=RM(n,i),s={overflowY:r.style.overflowY,overflowX:r.style.overflowX};return Object.assign(r.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(r.style,s)}}function H2t(e){var m;const t=kr(e),n=t.documentElement,i=t.body,r=ta(n);let s=0,o=0,l=!1;const c=_c.create();if(z1&&(((m=r.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function u(){const g=r.getComputedStyle(n),b=r.getComputedStyle(i),w=(g.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";s=n.scrollTop,o=n.scrollLeft,jne={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Rne=n.style.scrollBehavior,Nne={position:i.style.position,height:i.style.height,width:i.style.width,boxSizing:i.style.boxSizing,overflowY:i.style.overflowY,overflowX:i.style.overflowX,scrollBehavior:i.style.scrollBehavior};const x=n.scrollHeight>n.clientHeight,O=n.scrollWidth>n.clientWidth,k=g.overflowY==="scroll"||b.overflowY==="scroll",S=g.overflowX==="scroll"||b.overflowX==="scroll",C=Math.max(0,r.innerWidth-i.clientWidth),E=Math.max(0,r.innerHeight-i.clientHeight),j=parseFloat(b.marginTop)+parseFloat(b.marginBottom),T=parseFloat(b.marginLeft)+parseFloat(b.marginRight),R=RM(n,i);if(l=z2t(e),l){n.style.scrollbarGutter=w,R.style.overflowY="hidden",R.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:w,overflowY:"hidden",overflowX:"hidden"}),(x||k)&&(n.style.overflowY="scroll"),(O||S)&&(n.style.overflowX="scroll"),Object.assign(i.style,{position:"relative",height:j||E?`calc(100dvh - ${j+E}px)`:"100dvh",width:T||C?`calc(100vw - ${T+C}px)`:"100vw",boxSizing:"border-box",overflowY:"hidden",overflowX:"hidden",scrollBehavior:"unset"}),i.scrollTop=s,i.scrollLeft=o,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function d(){Object.assign(n.style,jne),Object.assign(i.style,Nne),l||(n.scrollTop=s,n.scrollLeft=o,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=Rne)}function f(){d(),c.request(u)}u();const h=Ni(r,"resize",f);return()=>{c.cancel(),d(),typeof r.removeEventListener=="function"&&h()}}class q2t{constructor(){Zt(this,"lockCount",0);Zt(this,"restore",null);Zt(this,"timeoutLock",Lu.create());Zt(this,"timeoutUnlock",Lu.create());Zt(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});Zt(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=kr(t),i=n.documentElement,r=n.body,s=ta(i);if(Ine(s,i,r)){const l=new s.MutationObserver(()=>{Ine(s,i,r)||(l.disconnect(),this.restore=null,this.lock(t))}),c={attributes:!0};l.observe(i,c),l.observe(r,c),this.restore=()=>l.disconnect();return}const o=HD||!Q2t(t);this.restore=o?V2t(t):H2t(t)}}const W2t=new q2t;function lLe(e=!0,t=null){Jn(()=>{if(e)return W2t.acquire(t)},[e,t])}const K2t=20;function G2t(e,t,n,i){const[r,s]=p.useState(!1);Jn(()=>{if(!e||!t||n==null){s(!1);return}const o=kr(n).documentElement.clientWidth,l=n.offsetWidth;s(o>0&&l>0&&l>=o-K2t)},[e,t,n]),lLe(e&&(!t||r),i)}const X2t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,anchor:o,positionMethod:l,side:c,align:u,sideOffset:d,alignOffset:f,collisionBoundary:h="clipping-ancestors",collisionPadding:m,arrowPadding:g,sticky:b,disableAnchorTracking:v=!1,collisionAvoidance:y=Fit,...w}=t,x=ev(),O=F2t(),k=urt(),S=x.useState("floatingRootContext"),C=x.useState("mounted"),E=x.useState("open"),j=x.useState("openChangeReason"),T=x.useState("activeTriggerElement"),R=x.useState("modal"),A=x.useState("openMethod"),N=x.useState("positionerElement"),P=x.useState("instantType"),I=x.useState("transitionStatus"),D=x.useState("adaptiveOrigin"),_=p.useRef(null),L=rV(N),F=Ost({anchor:o,floatingRootContext:S,positionMethod:l,mounted:C,side:c,sideOffset:d,align:u,alignOffset:f,arrowPadding:g,collisionBoundary:h,collisionPadding:m,sticky:b,disableAnchorTracking:v,keepMounted:O,nodeId:k,collisionAvoidance:y,adaptiveOrigin:D}),M=S.useState("domReferenceElement");Jn(()=>{const z=M,Z=_.current;if(z&&(_.current=z),Z&&z&&z!==Z){x.set("instantType",void 0);const ne=new AbortController;return L(()=>{x.set("instantType","trigger-change")},ne.signal),()=>{ne.abort()}}},[M,L,x]);const V=R===!0&&j!==mu;G2t(E&&V,A==="touch",N,T);const q=x.useStateSetter("positionerElement"),U={open:E,side:F.side,align:F.align,anchorHidden:F.anchorHidden,instant:P},J=jst(t,U,{styles:F.positionerStyles,transitionStatus:I,props:w,refs:[n,q],hidden:!C,inert:!E});return a.jsxs(aLe.Provider,{value:F,children:[C&&V&&a.jsx(oLe,{inert:iV(!E),cutout:T}),a.jsx(drt,{id:k,children:J})]})}),Y2t="ArrowUp",Z2t="ArrowDown",J2t="ArrowLeft",e_t="ArrowRight",t_t="Home",n_t="End",cLe=new Set([Y2t,Z2t,J2t,e_t,t_t,n_t]),i_t=p.createContext(void 0);function r_t(e){return p.useContext(i_t)}const s_t=p.createContext(void 0);function a_t(){const[e,t]=p.useState(0),n=ci(()=>(t(r=>r+1),()=>{t(r=>Math.max(0,r-1))}));return{context:p.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}const o_t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,initialFocus:o,finalFocus:l,...c}=t,u=ev(),d=U2t(),f=r_t()!=null,{context:h,hasClosePart:m}=a_t(),g=u.useState("open"),b=u.useState("openMethod"),v=u.useState("instantType"),y=u.useState("transitionStatus"),w=u.useState("popupProps"),x=u.useState("titleElementId"),O=u.useState("descriptionElementId"),k=u.useState("modal"),S=u.useState("mounted"),C=u.useState("openChangeReason"),E=u.useState("activeTriggerElement"),j=u.useState("floatingRootContext"),T=j.useState("floatingId"),R=u.useState("disabled"),A=u.useState("openOnHover"),N=u.useState("closeDelay");zA({open:g,ref:u.context.popupRef,onComplete(){var F,M;g&&((M=(F=u.context).onOpenChangeComplete)==null||M.call(F,!0))}}),ust(j,{enabled:A&&!R,closeDelay:N});const P=o===void 0?ije(u.context.popupRef):o,I=k!==!1&&m;u.useSyncedValue("focusManagerModal",I);const D=u.useStateSetter("popupElement"),_={open:g,side:d.side,align:d.align,instant:v,transitionStatus:y},L=Ra("div",t,{state:_,ref:[n,u.context.popupRef,D],props:[w,{id:T,role:"dialog",...nje,"aria-labelledby":x,"aria-describedby":O,onKeyDown(F){f&&cLe.has(F.key)&&F.stopPropagation()}},Oje(y),c],stateAttributesMapping:wje});return a.jsx(F_e,{context:j,openInteractionType:b,modal:I,disabled:!S||C===mu,initialFocus:P,returnFocus:l,restoreFocus:"popup",previousFocusableElement:Js(E)?E:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:a.jsx(s_t.Provider,{value:h,children:L})})}),l_t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,...o}=t,l=ev(),c=tm(o.id);return l.useSyncedValueWithCleanup("titleElementId",c),Ra("h2",t,{ref:n,props:[{id:c},o]})}),c_t=p.forwardRef(function(t,n){const{render:i,className:r,style:s,...o}=t,l=ev(),c=tm(o.id);return l.useSyncedValueWithCleanup("descriptionElementId",c),Ra("p",t,{ref:n,props:[{id:c},o]})});function Pne(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"10.25",cy:"10.25",r:"6.25"}),a.jsx("path",{d:"M4.15 10.25h12.2M10.25 4c1.65 1.72 2.5 3.8 2.5 6.25s-.85 4.53-2.5 6.25M10.25 4c-1.65 1.72-2.5 3.8-2.5 6.25s.85 4.53 2.5 6.25M14.8 14.8 20 20"})]})}function u_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"3.25",y:"5.25",width:"15.5",height:"13.5",rx:"2.25"}),a.jsx("circle",{cx:"8.1",cy:"9.3",r:"1.35"}),a.jsx("path",{d:"m4.7 16.5 3.65-3.7 2.45 2.25 2.2-2.2 4.35 4.1"}),a.jsx("path",{d:"m19.4 2.75.48 1.37 1.37.48-1.37.48-.48 1.37-.48-1.37-1.37-.48 1.37-.48.48-1.37Z",fill:"currentColor",stroke:"none"})]})}function lq(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{className:"video-generate-icon__body",d:"M3.25 9h17.5v7.35a2.4 2.4 0 0 1-2.4 2.4H5.65a2.4 2.4 0 0 1-2.4-2.4V9Z"}),a.jsxs("g",{className:"video-generate-icon__clapper",children:[a.jsx("path",{d:"M3.25 9V7.65a2.4 2.4 0 0 1 2.4-2.4h12.7a2.4 2.4 0 0 1 2.4 2.4V9H3.25Z"}),a.jsx("path",{d:"M6.75 5.25 9.3 9M12 5.25 14.55 9M17.25 5.25 19.8 9"})]}),a.jsx("path",{d:"m10.25 11.45 4 2.55-4 2.55v-5.1Z"})]})}function d_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M4.25 5.25h15.5v10.5H4.25zM8.25 19.75h7.5M12 15.75v4"}),a.jsx("path",{d:"m7.25 12.75 2.35-2.4 2.15 1.65 3.4-3.6 1.6 1.55"}),a.jsx("circle",{cx:"7.25",cy:"8.4",r:".7",fill:"currentColor",stroke:"none"})]})}function f_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M5 7.4c0-1.55 3.13-2.8 7-2.8s7 1.25 7 2.8-3.13 2.8-7 2.8-7-1.25-7-2.8Z"}),a.jsx("path",{d:"M5 7.4v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8V7.4M5 11.95v4.55c0 1.55 3.13 2.8 7 2.8s7-1.25 7-2.8v-4.55"}),a.jsx("path",{d:"M8.2 12.25h.01M8.2 16.8h.01"})]})}function h_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M4.25 4.25h4.5v15.5h-4.5zM8.75 5.75h5v14h-5zM13.75 4.25h4.1v10.25h-4.1z"}),a.jsx("path",{d:"M5.75 7h1.5M10.25 8.25h2M10.25 11h2M15.15 7h1.3"}),a.jsx("circle",{cx:"17.45",cy:"17.35",r:"2.45"}),a.jsx("path",{d:"m19.25 19.15 1.55 1.55"})]})}function p_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M4.25 6.25h6.25c1 0 1.5.55 1.5 1.45v11.05c0-.9-.5-1.45-1.5-1.45H4.25V6.25Z"}),a.jsx("path",{d:"M19.75 9.1v8.2H13.5c-1 0-1.5.55-1.5 1.45V7.7c0-.9.5-1.45 1.5-1.45h2.15"}),a.jsx("path",{d:"m19 3.2.58 1.62 1.62.58-1.62.58L19 7.6l-.58-1.62-1.62-.58 1.62-.58L19 3.2Z",fill:"currentColor",stroke:"none"})]})}function m_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"m4.2 8.4 1.15 10.2h13.3L19.8 8.4"}),a.jsx("path",{d:"M4.2 8.4h15.6L17.9 5H6.1L4.2 8.4Z"}),a.jsx("path",{d:"M7.2 12.2c1.1-1 2.25 1.25 3.4.25 1.05-.9 2.15 1.3 3.3.25"}),a.jsx("path",{d:"m8.2 15.1 1.45 1.35 1.45-1.35M13.55 16.45h2.35"})]})}function g_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"6",cy:"6.25",r:"2.25"}),a.jsx("circle",{cx:"18",cy:"6.25",r:"2.25"}),a.jsx("circle",{cx:"12",cy:"17.75",r:"2.25"}),a.jsx("path",{d:"m7.7 7.75 2.7 7.55M16.3 7.75l-2.7 7.55M8.25 6.25h7.5"})]})}function Dne(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"9",cy:"8",r:"3"}),a.jsx("path",{d:"M3.75 18.75c.45-3.05 2.2-4.65 5.25-4.65s4.8 1.6 5.25 4.65"}),a.jsx("path",{d:"M17.75 4.25v5.5M15 7h5.5M16 13.25h4.25M18.125 11.125v4.25"})]})}function b_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"4",y:"4.25",width:"16",height:"5",rx:"1.5"}),a.jsx("rect",{x:"4",y:"14.75",width:"16",height:"5",rx:"1.5"}),a.jsx("path",{d:"M7.25 6.75h.01M7.25 17.25h.01M10 6.75h6.5M10 17.25h6.5"})]})}function y_t(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M6 3.75h8l4 4v12.5H6V3.75Z"}),a.jsx("path",{d:"M14 3.75v4h4M8.75 11h6.5M8.75 14.25h6.5M8.75 17.5h4"})]})}function Mne(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"3.75",y:"4.5",width:"16.5",height:"15",rx:"2.5"}),a.jsx("path",{d:"m7.5 9 2.75 2.5L7.5 14M12.5 14h4"}),a.jsx("path",{d:"M3.75 7.5h16.5",opacity:".62"})]})}function aO(e){return a.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m6 3.25 4.5 4.75L6 12.75"})})}function v_t({value:e}){const{t,i18n:n}=Te("adk"),[i,r]=p.useState(!1),s=f=>f==null?t("developmentRuns.notReported"):f.toLocaleString(n.resolvedLanguage||n.language),o=z2e,l=e.usage,c=(l==null?void 0:l.inputTokens)!=null&&l.cachedInputTokens!=null&&l.cachedInputTokens<=l.inputTokens?l.inputTokens-l.cachedInputTokens:void 0,u=l!=null&&l.inputTokens&&l.cachedInputTokens!=null&&c!=null?`${(l.cachedInputTokens/l.inputTokens*100).toFixed(1)}%`:void 0,d=[["inputTokens",l==null?void 0:l.inputTokens],["cachedInputTokens",l==null?void 0:l.cachedInputTokens],["uncachedInputTokens",c],["cacheWriteInputTokens",l==null?void 0:l.cacheWriteInputTokens],["outputTokens",l==null?void 0:l.outputTokens],["reasoningOutputTokens",l==null?void 0:l.reasoningOutputTokens]];return a.jsxs("div",{className:"development-turn-summary","data-turn-id":e.turnId,children:[a.jsx("span",{children:t(`developmentRuns.turnStatus.${e.status}`)}),a.jsx("span",{children:t("developmentRuns.toolCalls",{count:e.toolCalls})}),a.jsx("span",{children:t("developmentRuns.turnDuration",{duration:o(e.durationMs)})}),a.jsx("span",{title:t("developmentRuns.toolDurationHelp"),children:t(e.toolDurationComplete?"developmentRuns.toolDuration":"developmentRuns.toolDurationPartial",{duration:o(e.toolDurationMs)})}),a.jsxs(R2t,{open:i,onOpenChange:r,children:[a.jsxs($2t,{className:"development-token-trigger",openOnHover:!0,delay:150,closeDelay:150,onFocus:f=>{f.currentTarget.matches(":focus-visible")&&r(!0)},children:[a.jsx("span",{children:"Tokens"}),a.jsx("span",{className:"development-token-value",children:s(l==null?void 0:l.totalTokens)}),e.usageIncomplete&&a.jsxs("span",{children:["· ",t("developmentRuns.partial")]}),a.jsx(aO,{className:"development-token-chevron"})]}),a.jsx(B2t,{children:a.jsx(X2t,{side:"top",align:"end",sideOffset:8,className:"development-token-positioner",children:a.jsxs(o_t,{className:"development-token-popup",initialFocus:!1,finalFocus:!1,children:[a.jsx(l_t,{className:"development-token-title",children:t("developmentRuns.tokenDetails")}),a.jsxs("dl",{children:[a.jsxs("div",{children:[a.jsx("dt",{children:t("developmentRuns.model")}),a.jsx("dd",{children:e.model||t("developmentRuns.notReported")})]}),a.jsxs("div",{children:[a.jsx("dt",{children:t("developmentRuns.totalTokens")}),a.jsx("dd",{children:s(l==null?void 0:l.totalTokens)})]}),d.map(([f,h])=>a.jsxs("div",{children:[a.jsx("dt",{children:t(`developmentRuns.${f}`)}),a.jsx("dd",{children:s(h)})]},f)),a.jsxs("div",{children:[a.jsx("dt",{children:t("developmentRuns.cacheHitRate")}),a.jsx("dd",{children:u||t("developmentRuns.notReported")})]})]}),a.jsxs(c_t,{className:"development-token-note",children:[t("developmentRuns.tokenHelp"),e.usageIncomplete?` ${t("developmentRuns.partialHelp")}`:""]})]})})})]})]})}function cq(e){return a.jsx("svg",{viewBox:"0 0 111 117",fill:"none","aria-hidden":"true",...e,children:a.jsx("path",{d:"M0 5.6016C7.82288e-05 0.621244 6.02226 -1.87314 9.54395 1.64847L40.1289 32.2334L68.5732 3.7891C69.5834 2.77903 70.9533 2.21099 72.3818 2.21097H82.7031C82.7917 2.20658 82.8806 2.20414 82.9697 2.20414H104.775C109.574 2.20427 111.977 8.00691 108.584 11.4004L64.916 55.0664C64.3075 55.8528 63.9436 56.7647 63.8242 57.6993C63.7142 56.4884 63.1964 55.3069 62.2695 54.3799L45.4082 37.5186H45.4072L40.124 32.2354L17.832 54.5284C16.7671 55.5933 16.2416 56.993 16.2549 58.3887C16.2417 59.7843 16.7672 61.1842 17.832 62.2491L39.9287 84.3467L9.54395 114.733C6.0223 118.255 0.000223474 115.761 0 110.78V5.6016ZM63.8018 58.8702C63.8962 59.9086 64.2936 60.9229 64.9961 61.7735L108.591 105.368C111.984 108.762 109.58 114.564 104.781 114.564H94.4336C94.3543 114.568 94.274 114.569 94.1934 114.569H72.3877C70.9592 114.569 69.5892 114.002 68.5791 112.992L39.9336 84.3467L58.4531 65.8282L58.4453 65.8203L62.2695 61.9981C63.1476 61.12 63.6567 60.0136 63.8018 58.8702Z",fill:"currentColor"})})}function IM({kind:e,...t}){return e==="thinking"?a.jsx(cq,{...t}):a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:e==="tool"?a.jsxs(a.Fragment,{children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"3"}),a.jsx("path",{d:"m7 9 3 3-3 3m6 0h4"})]}):e==="plan"?a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"m4 7 1.5 1.5L8 6m-4 7 1.5 1.5L8 12M11 7h9m-9 6h9m-9 6h9"}),a.jsx("circle",{cx:"6",cy:"19",r:"1"})]}):a.jsx(a.Fragment,{children:a.jsx("path",{d:"M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9zM14 3v6h6M8 13h8m-4-3v6M8 18h8"})})})}function x_t({blocks:e,active:t,status:n,render:i}){const{t:r}=Te("adk"),[s,o]=p.useState(!1),l=[...e].reverse().find(h=>"done"in h&&!h.done),c=e.filter(h=>h.kind==="tool"),u=c.filter(h=>h.durationMs!=null),d=u.reduce((h,m)=>h+(m.durationMs||0),0);let f=r("developmentRuns.processSummary",{count:e.length});return t&&(f=n||((l==null?void 0:l.kind)==="thinking"?r("developmentRuns.thinking"):(l==null?void 0:l.kind)==="tool"?V2e(l):(l==null?void 0:l.kind)==="plan"?r("developmentRuns.plan"):(l==null?void 0:l.kind)==="diff"?r("developmentRuns.diff"):r("developmentRuns.processing"))),a.jsxs("section",{className:"development-process",children:[a.jsxs("button",{type:"button",className:"development-process__toggle","aria-expanded":s,onClick:()=>o(!s),children:[a.jsx(aO,{className:`tool-chevron${s?" is-open":""}`}),a.jsx("span",{className:"tool-icon",children:a.jsx(IM,{kind:(l==null?void 0:l.kind)==="thinking"||(l==null?void 0:l.kind)==="plan"||(l==null?void 0:l.kind)==="diff"?l.kind:"tool"})}),t?a.jsx(fn,{className:"development-process__title","aria-live":"polite",children:f}):a.jsx("span",{className:"development-process__title",children:f}),!t&&c.length>0&&a.jsxs("span",{className:"development-process__duration",children:[r("developmentRuns.toolCalls",{count:c.length}),u.length>0?` · ${r(u.length===c.length?"developmentRuns.toolDuration":"developmentRuns.toolDurationPartial",{duration:z2e(d)})}`:""]})]}),a.jsx("div",{className:"development-process__items",hidden:!s,children:i(e)})]})}function w_t({blocks:e,active:t,status:n="",render:i}){const{t:r}=Te("adk"),s=nnt(e),o=s[s.length-1],l=[...e].reverse().find(u=>u.kind==="progress"),c=n||((l==null?void 0:l.kind)==="progress"?l.text:"");return a.jsxs(a.Fragment,{children:[s.map(u=>u.process?a.jsx(x_t,{blocks:u.blocks,active:t&&u===o,status:c,render:i},u.id):a.jsx("div",{"data-assistant-phase":u.blocks[0].phase,children:i(u.blocks)},u.id)),t&&!(o!=null&&o.process)&&a.jsxs("div",{className:"development-process__status",role:"status",children:[a.jsx("span",{className:"tool-icon",children:a.jsx(IM,{kind:"thinking"})}),a.jsx(fn,{children:c||r("developmentRuns.processing")})]})]})}const O_t={formatDate(e){const t=e.value??e.date??e.timestamp;if(t==null)return"";const n=new Date(t);return isNaN(n.getTime())?String(t):n.toLocaleString()}};function k_t(e,t){if(!t||t==="/")return e;const n=t.replace(/^\//,"").split("/").map(r=>r.replace(/~1/g,"/").replace(/~0/g,"~"));let i=e;for(const r of n){if(i==null||typeof i!="object")return;i=i[r]}return i}function S_t(e){return typeof e=="object"&&e!==null&&typeof e.path=="string"}function E_t(e){return typeof e=="object"&&e!==null&&typeof e.call=="string"}function uq(e,t){if(S_t(e))return k_t(t,e.path);if(E_t(e)){const n=O_t[e.call],i={};for(const[r,s]of Object.entries(e.args??{}))i[r]=uq(s,t);return n?n(i):`[unknown fn: ${e.call}]`}return e}function C_t(e,t){const n=uq(e,t);return n==null?"":typeof n=="string"?n:String(n)}const uLe=new Map;function tv(e,t){uLe.set(e,t)}function A_t(e){return uLe.get(e)}function T_t(e,t,n){const i=t.replace(/^\//,"").split("/").map(s=>s.replace(/~1/g,"/").replace(/~0/g,"~"));let r=e;for(let s=0;suq(i,e.dataModel),resolveString:i=>C_t(i,e.dataModel),dispatchAction:t,render:i=>{if(!i)return null;const r=e.components[i];if(!r)return null;const s=A_t(r.component)??__t;return a.jsx(s,{node:r,ctx:n},i)}};return a.jsx("div",{className:"a2ui-surface","data-a2ui-surface":e.surfaceId,children:n.render(e.rootId)})}function fLe(e){const t=p.useRef(null),n=p.useRef(!0),i=28,r=p.useCallback(()=>{const s=t.current;s&&(n.current=s.scrollHeight-s.scrollTop-s.clientHeight{const s=t.current;s&&n.current&&(s.scrollTop=s.scrollHeight)},[e]),{ref:t,onScroll:r}}function PM({value:e,skillPrefix:t="/",onRemoveSkill:n,onRemoveAgent:i}){const{t:r}=Te("conversation");return e.skills.length===0&&!e.targetAgent?null:a.jsxs("div",{className:"invocation-chips","aria-label":r("invocation.ariaLabel"),children:[e.skills.map(s=>a.jsxs("span",{className:"invocation-chip invocation-chip--skill",title:s.description,children:[a.jsx(hC,{"aria-hidden":!0}),a.jsxs("span",{children:[t,s.name]}),n?a.jsx("button",{type:"button",onClick:()=>n(s.name),"aria-label":r("invocation.removeSkill",{name:s.name}),children:a.jsx(Do,{})}):null]},s.name)),e.targetAgent?a.jsxs("span",{className:"invocation-chip invocation-chip--agent",title:e.targetAgent.description,children:[a.jsx(Mje,{"aria-hidden":!0}),a.jsx("span",{children:e.targetAgent.name}),i?a.jsx("button",{type:"button",onClick:i,"aria-label":r("invocation.removeAgent",{name:e.targetAgent.name}),children:a.jsx(Do,{})}):null]}):null]})}function dq(e=""){return e.startsWith("image/")?"image":e.startsWith("video/")?"video":e==="application/pdf"?"pdf":e==="text/markdown"?"markdown":"text"}function hLe(e){var n,i,r,s;const t=dq(e.mimeType);return t==="pdf"?"PDF":t==="markdown"?"MD":t==="video"?((i=(n=e.mimeType)==null?void 0:n.split("/")[1])==null?void 0:i.toUpperCase())??"VIDEO":t==="image"?((s=(r=e.mimeType)==null?void 0:r.split("/")[1])==null?void 0:s.toUpperCase())??"IMAGE":"TXT"}function pLe(e){return e?e<1024?`${e} B`:e<1024*1024?`${Math.round(e/1024)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`:""}function mLe(e,t){return e.previewUrl?e.previewUrl:e.data?`data:${e.mimeType??"application/octet-stream"};base64,${e.data}`:e.uri?hTe(t,e.uri):""}function N_t({kind:e}){return e==="image"?a.jsx(bV,{}):e==="video"?a.jsx($je,{}):e==="pdf"?a.jsx(Pat,{}):a.jsx(mV,{})}function DM({appName:e,items:t,compact:n=!1,onRemove:i}){const{t:r}=Te("conversation"),[s,o]=p.useState(null);return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:`media-grid${n?" media-grid--compact":""}`,children:t.map(l=>{const c=dq(l.mimeType),u=mLe(l,e),d=l.status==="uploading"||l.status==="error"||!u,f=a.jsxs("button",{type:"button",className:"media-card-main",disabled:d,onClick:c==="image"?void 0:()=>o(l),"aria-label":r("media.preview",{name:l.name??r("media.attachment")}),children:[c==="image"&&u?a.jsx("img",{className:"media-card-image",src:u,alt:l.name??r("media.image"),loading:"lazy"}):c==="video"&&u?a.jsxs("div",{className:"media-card-video-container",children:[a.jsx("video",{className:"media-card-video",src:u,muted:!0,playsInline:!0,preload:"metadata","aria-hidden":"true"}),a.jsx("span",{className:"media-card-video-play",children:a.jsx(Uje,{})})]}):a.jsx("span",{className:"media-card-icon",children:a.jsx(N_t,{kind:c})}),a.jsxs("span",{className:"media-card-copy",children:[a.jsx("span",{className:"media-card-name",children:l.name??r("media.attachment")}),a.jsxs("span",{className:"media-card-meta",children:[a.jsx("span",{className:"media-card-type",children:hLe(l)}),l.status==="uploading"?a.jsxs(a.Fragment,{children:[a.jsx(Fi,{className:"media-card-spinner"})," ",r("media.uploading")]}):l.status==="error"?l.error??r("media.uploadFailed"):pLe(l.sizeBytes)]})]}),!n&&l.status!=="uploading"&&l.status!=="error"?a.jsx(iE,{className:"media-card-open"}):null]});return a.jsxs(Cr.div,{className:`media-card media-card--${c}${l.status==="error"?" media-card--error":""}`,layout:!0,initial:{opacity:0,scale:.985,y:4},animate:{opacity:1,scale:1,y:0},children:[c==="image"&&!d?a.jsx(MAe,{src:u,children:f}):f,i?a.jsx("button",{type:"button",className:"media-card-remove","aria-label":r("media.remove",{name:l.name??r("media.attachment")}),onClick:()=>i(l.id),children:a.jsx(Do,{})}):null]},l.id)})}),a.jsx(ff,{children:s?a.jsx(R_t,{appName:e,item:s,onClose:()=>o(null)}):null})]})}function R_t({appName:e,item:t,onClose:n}){const{t:i}=Te("conversation"),r=p.useMemo(()=>mLe(t,e),[e,t]),s=dq(t.mimeType),[o,l]=p.useState(""),[c,u]=p.useState(s==="text"||s==="markdown"),[d,f]=p.useState("");return p.useEffect(()=>{const h=m=>{m.key==="Escape"&&n()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),p.useEffect(()=>{if(s!=="text"&&s!=="markdown")return;const h=new AbortController;return u(!0),f(""),fetch(r,{signal:h.signal}).then(m=>{if(!m.ok)throw new Error(`HTTP ${m.status}`);return m.text()}).then(l).catch(m=>{h.signal.aborted||f(m instanceof Error?m.message:String(m))}).finally(()=>{h.signal.aborted||u(!1)}),()=>h.abort()},[s,r]),a.jsx(Cr.div,{className:"media-viewer-backdrop",role:"dialog","aria-modal":"true","aria-label":i("media.previewDialog",{name:t.name??i("media.attachment")}),initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onMouseDown:h=>{h.target===h.currentTarget&&n()},children:a.jsxs(Cr.div,{className:"media-viewer",initial:{opacity:0,y:18,scale:.985},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:10,scale:.99},transition:{type:"spring",stiffness:420,damping:30},children:[a.jsxs("header",{className:"media-viewer-header",children:[a.jsxs("div",{children:[a.jsx("strong",{children:t.name??i("media.attachment")}),a.jsxs("span",{children:[hLe(t),t.sizeBytes?` · ${pLe(t.sizeBytes)}`:""]})]}),a.jsxs("nav",{children:[a.jsx("a",{href:r,download:t.name,"aria-label":i("media.download"),children:a.jsx(tM,{})}),a.jsx("button",{type:"button",onClick:n,"aria-label":i("media.close"),children:a.jsx(Do,{})})]})]}),a.jsxs("div",{className:`media-viewer-body media-viewer-body--${s}`,children:[s==="image"?a.jsx("img",{src:r,alt:t.name??i("media.image")}):null,s==="video"?a.jsx("div",{className:"media-viewer-video-wrapper",children:a.jsx("video",{src:r,controls:!0,autoPlay:!0,playsInline:!0,preload:"auto",className:"media-viewer-video"})}):null,s==="pdf"?a.jsx("iframe",{src:r,title:t.name??"PDF"}):null,c?a.jsxs("div",{className:"media-viewer-loading",children:[a.jsx(Fi,{})," ",i("media.reading")]}):null,!c&&d?a.jsx("div",{className:"media-viewer-loading",children:i("media.loadFailed",{error:d})}):null,!c&&s==="markdown"?a.jsx("div",{className:"media-document",children:a.jsx(Td,{text:o})}):null,!c&&s==="text"?a.jsx("pre",{className:"media-document media-document--plain",children:o}):null]})]})})}function I_t({definition:e,label:t,done:n,open:i,onToggle:r}){const{t:s}=Te("conversation"),o=e.icon,l=n?e.doneLabel:e.runningLabel,c=t??s(`blocks.tools.${e.name}.${n?"done":"running"}`,{defaultValue:l});return a.jsxs("button",{type:"button",className:`builtin-tool-head${n?" is-done":" is-running"}`,"data-tool-tone":e.tone,onClick:r,"aria-expanded":i,children:[a.jsx("span",{className:"builtin-tool-icon","aria-hidden":"true",children:a.jsx(o,{})}),n?a.jsx("span",{className:"builtin-tool-label",children:c}):a.jsx(fn,{className:"builtin-tool-label",duration:2.4,spread:18,"aria-live":"polite",children:c}),a.jsx(aO,{className:`builtin-tool-chevron${i?" is-open":""}`})]})}function Nu(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function qn(e){return typeof e=="string"?e:""}function Lne(e){return typeof e=="number"&&Number.isFinite(e)?e:0}function cd(e){return Array.isArray(e)?e:[]}function u9(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return{}}const n=Nu(t)??{};return Nu(n.result)??n}function MM(e){if(typeof e=="string")try{return MM(JSON.parse(e))}catch{return e}const t=Nu(e);if(!t)return"";const n=Nu(t.result);return qn(t.error)||qn(t.message)||qn(n==null?void 0:n.error)||qn(n==null?void 0:n.message)}function P_t(e){if(e.kind==="tool")return"tool";if(e.kind==="knowledge_base")return"knowledge_base";const t=Nu(e.metadata),n=qn(t==null?void 0:t.source_type).toLowerCase(),i=qn(e.source).toLowerCase();return n==="skillhub"||i.startsWith("skill_hub:")?"skill_hub":"skill_space"}const gLe={tool:"Tools",knowledge:"AgentKit Knowledge Base",skillCenter:"AgentKit Skill Center",unknownSource:"Unknown source",unnamedResource:"Unnamed resource",unnamedAgent:"Unnamed agent"};function D_t(e,t){return e==="veadk_builtin_tools"?t.tool:e==="agentkit_knowledge"?t.knowledge:e.startsWith("skill_hub:")?`Skill Hub ${e.slice(10)}`:e.startsWith("skill_space:")?`${t.skillCenter} ${e.slice(12)}`:e||t.unknownSource}function M_t(e){return e==="veadk_builtin_tools"?"tool":e==="agentkit_knowledge"?"knowledge_base":e.startsWith("skill_hub:")?"skill_hub":"skill_space"}function L_t(e,t=gLe){const n=u9(e),i=Nu(n.capabilities)??{},r=cd(n.resources).flatMap(o=>{const l=Nu(o);if(!l)return[];const c=l.kind==="tool"?"tool":l.kind==="knowledge_base"?"knowledge_base":"skill";return[{ref:qn(l.ref),kind:c,category:P_t(l),name:qn(l.name)||qn(l.ref)||t.unnamedResource,description:qn(l.description),source:qn(l.source),version:qn(l.version)}]}),s=cd(n.sources).flatMap(o=>{const l=Nu(o);if(!l)return[];const c=qn(l.source),u=qn(l.status),d=u==="error"?"error":u==="skipped"?"skipped":"ok";return[{source:c,category:M_t(c),label:D_t(c,t),status:d,count:Lne(l.count),message:qn(l.message),searchKeywords:cd(l.search_keywords).map(qn).filter(Boolean)}]});return{collectionId:qn(n.collection_id),capabilities:{googleAdkVersion:qn(i.google_adk_version),agentTypes:cd(i.agent_types).map(qn).filter(Boolean),maxOrchestrationDepth:Lne(i.max_orchestration_depth)},resources:r,sources:s,counts:{all:r.length,skill_hub:r.filter(o=>o.category==="skill_hub").length,skill_space:r.filter(o=>o.category==="skill_space").length,knowledge_base:r.filter(o=>o.category==="knowledge_base").length,tool:r.filter(o=>o.category==="tool").length}}}function $_t(e,t){return{resources:e.resources.filter(n=>n.category===t),sources:e.sources.filter(n=>n.category===t)}}function bLe(e,t,n=gLe){const i=u9(e),r=u9(t),s=new Map(cd(r.results).flatMap(d=>{const f=Nu(d),h=qn(f==null?void 0:f.name);return f&&h?[[h,f]]:[]})),o=cd(i.agents).flatMap(d=>{const f=Nu(d),h=qn(f==null?void 0:f.name);return f&&h?[f]:[]}),l=new Set(o.map(d=>qn(d.name))),c=[...s.entries()].filter(([d])=>!l.has(d)).map(([d])=>({name:d})),u=[...o,...c].map(d=>{const f=qn(d.name),h=cd(d.nodes).flatMap(C=>{const E=Nu(C);return E?[E]:[]}),m=qn(d.root_node),g=h.find(C=>qn(C.id)===m),b=h.filter(C=>qn(C.id)!==m).map(C=>({id:qn(C.id)||n.unnamedAgent,type:qn(C.type)||"llm",description:qn(C.description)})),v=s.get(f),y=qn(v==null?void 0:v.status),w=y==="failed"?"failed":y==="completed"?"completed":"running",x=$ne(v==null?void 0:v.resources),O=x.length>0?x:$ne(h.flatMap(C=>cd(C.resources))),k=Fne(v==null?void 0:v.python_tools),S=k.length>0?k:Fne(h.flatMap(C=>cd(C.python_tools)));return{name:f,description:qn(v==null?void 0:v.description)||qn(g==null?void 0:g.description)||qn(d.task),task:qn(d.task),rootType:qn(v==null?void 0:v.root_type)||qn(g==null?void 0:g.type)||"llm",nodeCount:h.length,subAgentCount:b.length,resourceCount:O.length,pythonToolCount:S.length,skills:O.filter(C=>C.kind==="skill"),knowledgeBases:O.filter(C=>C.kind==="knowledge_base"),builtinTools:O.filter(C=>C.kind==="tool"),pythonTools:S,subAgents:b,status:w,output:qn(v==null?void 0:v.output),error:qn(v==null?void 0:v.error)}});return{collectionId:qn(r.collection_id)||qn(i.collection_id),agents:u,completedCount:u.filter(d=>d.status==="completed").length,failedCount:u.filter(d=>d.status==="failed").length,runningCount:u.filter(d=>d.status==="running").length}}function F_t(e,t){return!!MM(t)||bLe(e,t).failedCount>0}function $ne(e){const t=new Set;return cd(e).flatMap(n=>{const i=Nu(n),r=qn(i?i.ref:n);if(!r||t.has(r))return[];t.add(r);const s=qn(i==null?void 0:i.kind),o=s==="tool"||r.startsWith("veadk_tool:")?"tool":s==="knowledge_base"||r.startsWith("agentkit_kb:")?"knowledge_base":"skill",l=r.split(":");return[{ref:r,kind:o,name:qn(i==null?void 0:i.name)||l[l.length-1]||r,description:qn(i==null?void 0:i.description),version:qn(i==null?void 0:i.version),source:qn(i==null?void 0:i.source)}]})}function Fne(e){const t=new Set;return cd(e).flatMap(n=>{const i=Nu(n),r=qn(i==null?void 0:i.name),s=qn(i==null?void 0:i.code),o=`${r}\0${s}`;return!i||!r||t.has(o)?[]:(t.add(o),[{name:r,description:qn(i.description),code:s,entrypoint:qn(i.entrypoint)||r,dependencies:cd(i.dependencies).map(qn).filter(Boolean)}])})}function B_t({branch:e}){return a.jsxs("div",{className:`branch-compare__body${e.status==="running"?" is-streaming":""}`,"aria-live":"polite",children:[e.content?a.jsx(Td,{text:e.content,streaming:e.status==="running"}):null,e.status==="running"?a.jsx("span",{className:"branch-compare__caret","aria-hidden":"true"}):null,e.error?a.jsx("p",{className:"branch-compare__error",children:e.error}):null]})}function U_t({args:e,response:t,status:n,onBranchSelect:i}){const{t:r}=Te("conversation"),s=p.useMemo(()=>Vje(e,t,n),[e,t,n]),[o,l]=p.useState(0);return a.jsxs("section",{className:"branch-compare","aria-label":r("blocks.branchCompare.ariaLabel"),children:[a.jsx("div",{className:"branch-compare__tabs",role:"tablist","aria-label":r("blocks.branchCompare.selectDirection"),children:s.branches.map((c,u)=>a.jsx("button",{className:`branch-compare__tab${o===u?" is-active":""}`,type:"button",role:"tab","aria-selected":o===u,"aria-controls":`branch-compare-panel-${u}`,onClick:()=>l(u),children:a.jsx(Ya,{color:"info",size:"sm",variant:"soft",children:c.label})},`${c.label}:${u}`))}),a.jsx("div",{className:"branch-compare__branches",children:s.branches.map((c,u)=>a.jsxs("article",{className:`branch-compare__branch${o===u?" is-active":""}`,id:`branch-compare-panel-${u}`,role:"tabpanel",children:[a.jsx("header",{className:"branch-compare__head",children:a.jsx(Ya,{color:"info",size:"sm",variant:"soft",children:c.label})}),a.jsx(B_t,{branch:c}),a.jsx("footer",{className:"branch-compare__footer",children:a.jsx(_t,{type:"button",color:"info",variant:"ghost",size:"sm",pill:!1,disabled:c.status!=="completed",onClick:()=>i==null?void 0:i(c),children:r("blocks.branchCompare.continue")})})]},`${c.label}:${u}`))})]})}function yLe({controlled:e,default:t,name:n,state:i="value"}){const{current:r}=p.useRef(e!==void 0),[s,o]=p.useState(t),l=r?e:s,c=p.useCallback(u=>{r||o(u)},[]);return[l,c]}const vLe=p.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Q_t(){return p.useContext(vLe)}function z_t(e){const{children:t,elementsRef:n,labelsRef:i,onMapChange:r}=e,s=ci(r),[,o]=p.useState(!1),l=Ed(H_t).current,c=Ed(V_t).current,u=p.useRef(0),d=p.useRef(!0),f=p.useRef([]),h=p.useRef(null),m=ci(()=>{d.current||(d.current=!0,o(k=>!k))}),g=ci((k,S)=>{c.set(k,S),m()}),b=ci(k=>{c.delete(k),m()}),v=ci(k=>{const S=new Map;return n.current.length=0,i&&(i.current.length=0),k.forEach(C=>{var E,j;S.set(C.element,{...C.registration.metadata??{},index:C.index}),n.current[C.index]=C.element,i&&(i.current[C.index]=C.registration.label!==void 0?C.registration.label:((j=(E=C.registration.textRef)==null?void 0:E.current)==null?void 0:j.textContent)??C.element.textContent)}),u.current=n.current.length,S});function y(k){var E;if((E=h.current)==null||E.disconnect(),h.current=null,typeof MutationObserver!="function"||k.length<2)return;const S=new MutationObserver(j=>{if(!K_t(j))return;let T=null;for(const R of k)if(R.isConnected){if(T&&xLe(T,R)>0){S.disconnect(),m();return}T=R}});h.current=S;const C=new Set;for(let j=1;jS.observe(j,{childList:!0}))}const w=ci(()=>{const[k,S]=q_t(c),C=v(k);y(S),f.current=k,d.current=!1,l.forEach(E=>E(C)),s(C)});Jn(()=>(d.current||v(f.current),()=>{n.current=[],i&&(i.current=[])}),[n,i,v]),Jn(()=>{d.current&&w()}),Jn(()=>()=>{var k;(k=h.current)==null||k.disconnect(),d.current=!0},[]);const x=ci(k=>(l.add(k),()=>{l.delete(k)})),O=p.useMemo(()=>({register:g,unregister:b,subscribeMapChange:x,nextIndexRef:u}),[g,b,x,u]);return a.jsx(vLe.Provider,{value:O,children:t})}function V_t(){return new Map}function H_t(){return new Set}function q_t(e){const t=new Set,n=[],i=[];e.forEach((s,o)=>{if(!o.isConnected)return;const l=s.index,c={index:l??-1,element:o,registration:s};l===null?i.push(c):l>=0&&(t.add(l),n.push(c))});let r=0;return i.sort((s,o)=>xLe(s.element,o.element)),i.forEach(s=>{for(;t.has(r);)r+=1;s.index=r,n.push(s),r+=1}),t.size>0&&n.sort((s,o)=>s.index-o.index),[n,i.map(s=>s.element)]}function W_t(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function K_t(e){for(const t of e)for(let n=0;nnull},kLe=p.forwardRef(function(t,n){const{render:i,className:r,disabled:s=!1,hiddenUntilFound:o,keepMounted:l,loopFocus:c,onValueChange:u,multiple:d=!1,orientation:f="vertical",value:h,defaultValue:m,style:g,...b}=t,v=p.useMemo(()=>{if(h===void 0)return m??[]},[h,m]),y=p.useRef([]),[w,x]=yLe({controlled:h,default:v,name:"Accordion",state:"value"}),O=ci((E,j,T)=>{if(d)if(j){const R=w.slice();if(R.push(E),u==null||u(R,T),T.isCanceled)return;x(R)}else{const R=w.filter(A=>A!==E);if(u==null||u(R,T),T.isCanceled)return;x(R)}else{const R=w[0]===E?[]:[E];if(u==null||u(R,T),T.isCanceled)return;x(R)}}),k=p.useMemo(()=>({value:w,disabled:s,orientation:f}),[w,s,f]),S=p.useMemo(()=>({disabled:s,handleValueChange:O,hiddenUntilFound:o??!1,keepMounted:l??!1,state:k,value:w}),[s,O,o,l,k,w]),C=Ra("div",t,{state:k,ref:n,props:b,stateAttributesMapping:G_t});return a.jsx(wLe.Provider,{value:S,children:a.jsx(z_t,{elementsRef:y,children:C})})});function X_t(e){const{open:t,defaultOpen:n,onOpenChange:i,disabled:r}=e,[s,o]=yLe({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:u}=tje(s,!0,!0),d=tm(),[f,h]=p.useState(),m=f===null?void 0:f??d,g=ci(b=>{const v=!s,y=fa(Yw,b.nativeEvent);i(v,y),!y.isCanceled&&o(v)});return p.useMemo(()=>({defaultPanelId:d,disabled:r,handleTrigger:g,mounted:l,open:s,panelId:m,setMounted:c,setOpen:o,setPanelIdState:h,transitionStatus:u}),[d,r,g,l,s,m,c,o,h,u])}const SLe=p.createContext(void 0);function ELe(){const e=p.useContext(SLe);if(e===void 0)throw new Error(Vc(15));return e}function Y_t(e={}){const{guess:t,label:n,metadata:i,textRef:r,index:s}=e,{register:o,unregister:l,subscribeMapChange:c,nextIndexRef:u}=Q_t(),d=p.useRef(-1),[f,h]=p.useState(s==null&&t?()=>{if(d.current===-1){const v=u.current;u.current+=1,d.current=v}return d.current}:-1),m=s??f,g=p.useRef(null),b=p.useCallback(v=>{const y=g.current;y&&l(y),g.current=v,v&&o(v,{metadata:i??null,index:s??null,label:n,textRef:r})},[s,o,l,i,n,r]);return Jn(()=>{if(s==null)return c(v=>{var w;const y=g.current?(w=v.get(g.current))==null?void 0:w.index:null;y!=null&&h(y)})},[s,c]),{ref:b,index:m}}const CLe=p.createContext(void 0);function fq(){const e=p.useContext(CLe);if(e===void 0)throw new Error(Vc(9));return e}let hq=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=oI.startingStyle]="startingStyle",e[e.endingStyle=oI.endingStyle]="endingStyle",e}({}),Z_t=function(e){return e.panelOpen="data-panel-open",e}({});const J_t={[hq.open]:""},ejt={[hq.closed]:""},tjt={open(e){return e?{[Z_t.panelOpen]:""}:null}},njt={open(e){return e?J_t:ejt}};let ijt=function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e}({});const pq={...njt,index:e=>({[ijt.index]:String(e)}),...KD,value:()=>null},ALe=p.forwardRef(function(t,n){const{className:i,disabled:r=!1,onOpenChange:s,render:o,value:l,style:c,...u}=t,{ref:d,index:f}=Y_t(),h=Xw(n,d),{disabled:m,handleValueChange:g,state:b,value:v}=OLe(),y=tm(),w=l??y,x=r||m,O=v.indexOf(w)!==-1,k=ci((D,_)=>{s==null||s(D,_),!_.isCanceled&&g(w,D,_)}),S=X_t({open:O,onOpenChange:k,disabled:x}),C=p.useMemo(()=>({open:S.open,disabled:S.disabled,transitionStatus:S.transitionStatus}),[S.open,S.disabled,S.transitionStatus]),E=p.useMemo(()=>({...S,onOpenChange:k,state:C}),[S,C,k]),j=p.useMemo(()=>({...b,hidden:!O&&!S.mounted,index:f,disabled:x,open:O}),[S.mounted,x,f,O,b]),T=tm(),[R,A]=p.useState(),N=R===null?void 0:R??T,P=p.useMemo(()=>({defaultTriggerId:T,open:O,state:j,setTriggerId:A,triggerId:N}),[T,O,j,A,N]),I=Ra("div",t,{state:j,ref:h,props:u,stateAttributesMapping:pq});return a.jsx(SLe.Provider,{value:E,children:a.jsx(CLe.Provider,{value:P,children:I})})}),TLe=p.forwardRef(function(t,n){const{render:i,className:r,style:s,...o}=t,{state:l}=fq();return Ra("h3",t,{state:l,ref:n,props:o,stateAttributesMapping:pq})}),_Le=p.forwardRef(function(t,n){const{disabled:i,className:r,id:s,render:o,nativeButton:l=!0,style:c,...u}=t,{panelId:d,open:f,handleTrigger:h,disabled:m}=ELe(),g=i||m,{getButtonProps:b,buttonRef:v}=GD({disabled:g,focusableWhenDisabled:!0,native:l}),{defaultTriggerId:y,state:w,setTriggerId:x}=fq(),O=s||void 0,k=O??y;return Jn(()=>(x(E=>O??(E===null?void 0:E)),()=>{x(E=>E===O?null:E)}),[O,x]),Ra("button",t,{state:w,ref:[n,v],props:[{"aria-controls":f?d:void 0,"aria-expanded":f,id:k,onClick:h},u,b],stateAttributesMapping:tjt})}),xk={height:void 0,width:void 0};function rjt(e){const{externalRef:t,hiddenUntilFound:n,id:i,keepMounted:r,mounted:s,onOpenChange:o,open:l,setMounted:c,setOpen:u,transitionStatus:d}=e,f=p.useRef(null),h=p.useRef(null),[m,g]=p.useState(xk),b=p.useRef(xk),v=p.useRef(!1),y=p.useRef(l),w=p.useRef(!1),[x,O]=p.useState(!1),k=p.useRef(null),S=Xw(t,f),C=Zl(l),E=rV(f),j=!l&&!s,T=x?"idle":d,R=l&&(y.current||w.current),A=!l&&s&&h.current==="css-animation"&&m.height===void 0&&m.width===void 0?b.current:m,N=n&&j&&h.current!=="css-animation",P=ci((F,M=!0)=>{M&&(b.current=F),g(F)}),I=ci(()=>{var F;(F=k.current)==null||F.call(k),k.current=null}),D=ci(F=>{I(),k.current=()=>{k.current=null,F()}}),_=ci(()=>{l&&s&&h.current==="css-animation"&&(w.current=!0)});Jn(()=>{!x||d==="starting"||O(!1)},[x,d]),p.useEffect(()=>()=>{_(),I()},[_,I]),Jn(()=>{const F=f.current;if(!F)return;!l&&k.current&&I();const M=sjt(F,R);if(h.current=M,l&&d==="idle"&&y.current&&M==="css-animation"){b.current=Bv(F);return}if(l&&d==="starting"){const U=v.current;if(v.current=!1,M==="none"){P(Bv(F)),O(!0);return}if(M==="css-transition"){const Z=ajt(F);if(P(Bv(F)),!U)return Z;const ne=N_(F,"transition-duration","0s");return D(ne),O(!0),Z}P(Bv(F));const J=N_(F,"animation-name","none");if(!U){J();return}const z=N_(F,"animation-duration","0s");J(),D(z),O(!0);return}if(!l&&s&&(d==="idle"||d==="starting")){if(y.current=!1,w.current=!1,M==="none"){P(xk,!1),c(!1);return}P(Bv(F));return}if(d!=="ending")return;if(M==="none"){c(!1);return}const V=Bv(F);if(!(V.height>0||V.width>0)){c(!1);return}P(V),M==="css-animation"&&N_(F,"animation-name","none")()},[s,l,I,P,c,D,R,d]),zA({enabled:l&&s&&T==="idle",open:!0,ref:f,onComplete(){l&&P(xk,!1)}}),p.useEffect(()=>{if(l||!s||T!=="ending"||!f.current)return;const M=new AbortController;let V=-1;function q(){C.current||(c(!1),P(xk,!1))}return V=_c.request(()=>{E(q,M.signal)}),()=>{_c.cancel(V),M.abort()}},[C,s,l,T,E,P,c]),Jn(()=>{const F=f.current;!F||!n||!j||F.setAttribute("hidden","until-found")},[j,n]),p.useEffect(function(){const M=f.current;if(!M)return;function V(q){const U=fa(E_e,q);o(!0,U),!U.isCanceled&&(v.current=!0,u(!0))}return Ni(M,"beforematch",V)},[o,u]);const L=r||n||s||l;return{height:A.height,props:{...N?{[hq.startingStyle]:""}:void 0,hidden:j,id:i},ref:S,shouldPreventOpenAnimation:R,shouldRender:L,transitionStatus:T,width:A.width}}function Bv(e){return{height:e.scrollHeight,width:e.scrollWidth}}function sjt(e,t){const n=ta(e).getComputedStyle(e),i=(n.animationName.split(",").map(s=>s.trim()).some(s=>s!==""&&s!=="none")||t)&&Bne(n.animationDuration),r=Bne(n.transitionDuration);return i&&r||r?"css-transition":i?"css-animation":"none"}function Bne(e){return e.split(",").map(t=>t.trim()).some(t=>t!==""&&Number.parseFloat(t)>0)}function N_(e,t,n){const i=e.style.getPropertyValue(t),r=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{if(i===""){e.style.removeProperty(t);return}e.style.setProperty(t,i,r)}}function ajt(e){const t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(r=>{e.style.setProperty(r,"initial","important")});function n(){Object.entries(t).forEach(([r,s])=>{if(s===""){e.style.removeProperty(r);return}e.style.setProperty(r,s)})}const i=_c.request(n);return()=>{_c.cancel(i),n()}}let Une=function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e}({});const jLe=p.forwardRef(function(t,n){const{className:i,hiddenUntilFound:r,keepMounted:s,id:o,render:l,style:c,...u}=t,{hiddenUntilFound:d,keepMounted:f}=OLe(),{defaultPanelId:h,mounted:m,onOpenChange:g,open:b,setMounted:v,setOpen:y,setPanelIdState:w,transitionStatus:x}=ELe(),O=r??d,k=s??f,S=o||void 0,C=o??h;Jn(()=>(w(M=>S??(M===null?void 0:M)),()=>{w(M=>M===S?null:M)}),[S,w]);const{height:E,props:j,ref:T,shouldPreventOpenAnimation:R,shouldRender:A,transitionStatus:N,width:P}=rjt({externalRef:n,hiddenUntilFound:O,id:C,keepMounted:k,mounted:m,onOpenChange:g,open:b,setMounted:v,setOpen:y,transitionStatus:x}),{state:I,triggerId:D}=fq(),_={...I,transitionStatus:N},L=m_e(c,_),F=Ra("div",{...t,style:void 0},{state:_,ref:T,props:[j,{"aria-labelledby":D,role:"region",style:{[Une.accordionPanelHeight]:E===void 0?"auto":`${E}px`,[Une.accordionPanelWidth]:P===void 0?"auto":`${P}px`}},u,L?{style:L}:void 0,R?{style:{animationName:"none"}}:void 0],stateAttributesMapping:pq});return A?F:null}),ojt=(e,t)=>{const n=e.currentTarget,i={x:e.clientX,y:e.clientY},r=ljt(i,n.getBoundingClientRect()),s=cjt(i,r),o=ujt(t.getBoundingClientRect());return fjt([...s,...o])};function ljt(e,t){const n=Math.abs(t.top-e.y),i=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,i,r,s)){case s:return"left";case r:return"right";case n:return"top";case i:return"bottom";default:throw new Error("unreachable")}}function cjt(e,t,n=5){const i=[];switch(t){case"top":i.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":i.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":i.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":i.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return i}function ujt(e){const{top:t,right:n,bottom:i,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:i},{x:r,y:i}]}function djt(e,t){const{x:n,y:i}=e;let r=!1;for(let s=0,o=t.length-1;si!=h>i&&n<(f-u)*(i-d)/(h-d)+u&&(r=!r)}return r}function fjt(e){const t=e.slice();return t.sort((n,i)=>n.xi.x?1:n.yi.y?1:0),hjt(t)}function hjt(e){if(e.length<=1)return e.slice();const t=[];for(let i=0;i=2;){const s=t[t.length-1],o=t[t.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let i=e.length-1;i>=0;i--){const r=e[i];for(;n.length>=2;){const s=n[n.length-1],o=n[n.length-2];if((s.x-o.x)*(r.y-o.y)>=(s.y-o.y)*(r.x-o.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const pjt="_Transition_1wdpp_1",mjt="_Popover_1wdpp_3",NLe={Transition:pjt,Popover:mjt},RLe=p.createContext(null),LM=()=>{const e=p.use(RLe);if(!e)throw new Error("Popover components must be wrapped in ");return e},Lg=({open:e,onOpenChange:t,showOnHover:n=!1,hoverOpenDelay:i=150,children:r})=>{const[s,o]=p.useState(!1),[l,c]=p.useState(!1),u=p.useRef(null),d=p.useRef(null),f=p.useRef(void 0),h=p.useRef(!1),m=p.useRef(!1),g=e??s,[b,v]=p.useState(!1);OV(()=>v(!1),b?500:null);const y=rb(t),w=rb(C=>{var E,j;clearTimeout(f.current),g!==C&&(C||(c(!1),n&&h.current&&((E=u.current)==null||E.focus()),h.current=!1),(j=y.current)==null||j.call(y,C),o(C),n&&v(C))}),x=p.useCallback(C=>{w.current(C)},[w]),O=p.useCallback(()=>{f.current=setTimeout(()=>x(!0),i)},[x,i]),k=p.useCallback(()=>{clearTimeout(f.current)},[]);p.useEffect(()=>()=>{clearTimeout(f.current)},[]);const S=p.useMemo(()=>({open:g,setOpen:x,shake:l,setShake:c,showOnHover:n,temporarilyPreventClickToClose:b,onTriggerEnter:O,onTriggerLeave:k,isPointerInTransitRef:m,triggerRef:u,contentRef:d,hoverOpenFocusedWithTab:h}),[g,x,l,c,n,b,h,m,O,k]);return a.jsx(RLe,{value:S,children:a.jsx(IRe,{open:g,onOpenChange:x,modal:!1,children:r})})},gjt=({children:e,onPointerDown:t,onClick:n})=>{const{setOpen:i,showOnHover:r,temporarilyPreventClickToClose:s,onTriggerEnter:o,onTriggerLeave:l,isPointerInTransitRef:c,triggerRef:u,contentRef:d}=LM(),f=p.useRef(!1),h=b=>{!(b.currentTarget.nodeName.toLocaleLowerCase()==="a")&&s&&(b.preventDefault(),b.stopPropagation())},m=b=>{b.pointerType!=="touch"&&!f.current&&!c.current&&(o(),f.current=!0)},g=()=>{f.current&&(l(),f.current=!1)};return a.jsx(PRe,{asChild:!0,ref:u,onPointerDown:b=>{h(b),t==null||t(b)},onClick:b=>{h(b),n==null||n(b)},onPointerMove:r?m:void 0,onPointerLeave:r?g:void 0,onFocus:r?()=>i(!0):void 0,onBlur:r?()=>{setTimeout(()=>{var b;(b=d.current)!=null&&b.contains(document.activeElement)||i(!1)},50)}:void 0,children:e})},ILe=({children:e,avoidCollisions:t,width:n,minWidth:i,maxWidth:r,side:s,sideOffset:o=8,align:l,alignOffset:c,translucent:u,className:d,autoFocus:f=!0})=>{const{showOnHover:h,shake:m,contentRef:g}=LM(),b=v=>{const y=g.current;if(y&&v.target===y&&v.key==="Tab"&&v.shiftKey){v.preventDefault(),v.stopPropagation();const w=sNe(y),x=w[w.length-1];x==null||x.focus()}};return p.useEffect(()=>{const v=g.current;!v||!f||v!=null&&v.contains(document.activeElement)||h||v.focus({preventScroll:!0})},[g,h,f]),a.jsx(MRe,{forceMount:!0,ref:g,className:Ui(NLe.Popover,d),style:z0({"popover-width":n,"popover-min-width":i,"popover-max-width":r}),onCloseAutoFocus:h?Mp:void 0,"data-animate":m?"shake":void 0,"data-translucent":u?"true":void 0,side:s,sideOffset:o,align:l,alignOffset:c??(l==="center"?0:-5),avoidCollisions:t??!0,hideWhenDetached:!0,collisionPadding:20,onOpenAutoFocus:Mp,onEscapeKeyDown:Mp,onKeyDown:b,children:e})},bjt=e=>{const{setOpen:t,triggerRef:n,contentRef:i,isPointerInTransitRef:r,hoverOpenFocusedWithTab:s}=LM(),[o,l]=p.useState(null),c=p.useCallback(()=>{l(null),r.current=!1},[r]),u=p.useCallback((d,f)=>{const h=ojt(d,f);l(h),r.current=!0},[r]);return p.useEffect(()=>()=>c(),[c]),p.useEffect(()=>{const d=n.current,f=i.current;if(!d||!f)return;const h=g=>u(g,f),m=g=>u(g,d);return d.addEventListener("pointerleave",h),f.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",m)}},[i,n,u,c]),p.useEffect(()=>{if(!o)return;const d=f=>{const h=n.current,m=i.current,g=f.target,b={x:f.clientX,y:f.clientY},v=(h==null?void 0:h.contains(g))||(m==null?void 0:m.contains(g)),y=!djt(b,o),w=g.hasAttribute("aria-haspopup");v?c():(y||w)&&(c(),t(!1))};return document.addEventListener("pointermove",d),()=>document.removeEventListener("pointermove",d)},[o,t,c,n,i]),p.useEffect(()=>{const d=f=>{if(i.current&&f.key==="Tab"&&!f.shiftKey){const[h]=sNe(i.current);h&&(f.preventDefault(),h.focus(),s.current=!0,document.removeEventListener("keydown",d))}};return document.addEventListener("keydown",d),()=>{document.removeEventListener("keydown",d)}},[i,s]),a.jsx(ILe,{...e})},yjt=e=>{const{open:t,showOnHover:n,setOpen:i}=LM();return JA(t,()=>{i(!1)}),a.jsx(DRe,{forceMount:!0,children:a.jsx(Y1,{enterDuration:600,exitDuration:300,className:NLe.Transition,disableAnimations:!0,children:t&&(n?a.jsx(bjt,{...e},"popover-hover"):a.jsx(ILe,{...e},"popover"))})})};Lg.Trigger=gjt;Lg.Content=yjt;const vjt=["skill_hub","skill_space","knowledge_base","tool"];function PLe(e){return a.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m4 6 4 4 4-4"})})}function DLe({label:e}){return a.jsx("div",{className:"create-agent-card__loading",role:"status","aria-label":e,children:[0,1,2].map(t=>a.jsxs("div",{className:"create-agent-card__skeleton-row","aria-hidden":"true",children:[a.jsx("span",{}),a.jsx("span",{})]},t))})}function xjt(e,t){return e.kind==="tool"?t("blocks.createAgents.builtinTool"):e.kind==="knowledge_base"?t("blocks.createAgents.knowledgeBase"):e.source.startsWith("skill_hub:")?"Skill Hub":e.source.startsWith("skill_space:")?t("blocks.createAgents.skillCenter"):"Skill"}function L4({label:e,resources:t}){const{t:n}=Te("conversation");return t.length===0?null:a.jsxs("section",{className:"create-agent-card__popover-section",children:[a.jsx("h4",{children:e}),a.jsx("div",{className:"create-agent-card__popover-list",children:t.map(i=>a.jsxs("div",{className:"create-agent-card__popover-item",children:[a.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[a.jsx("strong",{children:i.name}),a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:xjt(i,n)})]}),i.description?a.jsx("p",{children:i.description}):null]},i.ref))})]})}function wjt({tools:e}){const{t}=Te("conversation");return e.length===0?null:a.jsxs("section",{className:"create-agent-card__popover-section",children:[a.jsx("h4",{children:t("blocks.createAgents.selfAuthoredTools")}),a.jsx(kLe,{children:e.map((n,i)=>a.jsxs(ALe,{className:"create-agent-card__python-tool",value:`${n.name}:${i}`,children:[a.jsx(TLe,{className:"create-agent-card__python-tool-header",children:a.jsxs(_Le,{className:"create-agent-card__python-tool-trigger",children:[a.jsxs("span",{children:[a.jsx("strong",{children:n.name}),n.description?a.jsx("small",{children:n.description}):null]}),a.jsxs("span",{className:"create-agent-card__python-tool-meta",children:[a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:t("blocks.createAgents.selfAuthoredTools")}),a.jsx(PLe,{className:"create-agent-card__python-tool-chevron"})]})]})}),a.jsxs(jLe,{className:"create-agent-card__python-tool-panel",children:[n.dependencies.length>0?a.jsx("div",{className:"create-agent-card__python-tool-dependencies",children:t("blocks.createAgents.dependencies",{items:n.dependencies.join(", ")})}):null,a.jsx("pre",{tabIndex:0,"aria-label":t("blocks.createAgents.fullCode",{name:n.name}),children:a.jsx("code",{children:n.code})})]})]},`${n.name}:${i}`))})]})}function Ojt({agents:e}){const{t}=Te("conversation");return e.length===0?null:a.jsxs("section",{className:"create-agent-card__popover-section",children:[a.jsx("h4",{children:t("blocks.createAgents.subAgents")}),a.jsx("div",{className:"create-agent-card__popover-list",children:e.map(n=>a.jsxs("div",{className:"create-agent-card__popover-item",children:[a.jsxs("div",{className:"create-agent-card__popover-item-heading",children:[a.jsx("strong",{children:n.id}),a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:t(`blocks.createAgents.agentTypes.${n.type}`,{defaultValue:n.type})})]}),n.description?a.jsx("p",{children:n.description}):null]},n.id))})]})}function R_({label:e,count:t,icon:n,children:i}){const{t:r}=Te("conversation"),s=a.jsxs("button",{className:"create-agent-card__resource-metric",type:"button",disabled:t===0,"aria-label":r("blocks.createAgents.itemCount",{label:e,count:t}),children:[n,a.jsx("span",{children:t})]});return t===0?s:a.jsxs(Lg,{showOnHover:!0,hoverOpenDelay:120,children:[a.jsx(Lg.Trigger,{children:s}),a.jsx(Lg.Content,{side:"top",align:"start",minWidth:"auto",maxWidth:360,className:"create-agent-card__resource-popover",children:i})]})}function kjt({response:e,status:t}){const{t:n}=Te("conversation"),i=p.useMemo(()=>({tool:n("blocks.createAgents.sourceLabels.tool"),knowledge:n("blocks.createAgents.sourceLabels.knowledge"),skillCenter:n("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:n("blocks.createAgents.sourceLabels.unknown"),unnamedResource:n("blocks.createAgents.unnamedResource"),unnamedAgent:n("blocks.createAgents.unnamedAgent")}),[n]),r=p.useMemo(()=>L_t(e,i),[i,e]),s=p.useMemo(()=>vjt.map(c=>{const u=$_t(r,c);return{value:c,label:n(`blocks.createAgents.categories.${c}`),...u,searchKeywords:[...new Set(u.sources.flatMap(d=>d.searchKeywords))]}}),[r,n]),o=t==="failed",l=o?MM(e):"";return a.jsx("section",{className:"create-agent-tool-card","aria-label":n("blocks.createAgents.collectionAria"),children:t==="running"?a.jsx(DLe,{label:n("blocks.createAgents.retrieving")}):o?a.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[a.jsx("span",{className:"create-agent-card__message-title",children:n("blocks.createAgents.retrievalFailed")}),a.jsx("span",{children:l||n("blocks.createAgents.checkConfig")})]}):a.jsx(kLe,{className:"create-agent-card__accordion",children:s.map(c=>a.jsxs(ALe,{className:"create-agent-card__accordion-item",value:c.value,children:[a.jsx(TLe,{className:"create-agent-card__accordion-header",children:a.jsxs(_Le,{className:"create-agent-card__accordion-trigger",children:[a.jsx("span",{children:c.label}),a.jsxs("span",{className:"create-agent-card__accordion-meta",children:[a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.notSearched"):n("blocks.createAgents.notConfigured"):c.resources.length}),a.jsx(PLe,{className:"create-agent-card__accordion-chevron"})]})]})}),a.jsx(jLe,{className:"create-agent-card__accordion-content",children:a.jsxs("div",{className:"create-agent-card__accordion-scroll",role:"region","aria-label":n("blocks.createAgents.resourceList",{label:c.label}),tabIndex:0,children:[c.value==="skill_hub"&&c.searchKeywords.length>0?a.jsxs("div",{className:"create-agent-card__search-keywords",children:[a.jsx("span",{children:n("blocks.createAgents.searchKeywords")}),a.jsx("span",{children:c.searchKeywords.join("、")})]}):null,c.resources.length>0?a.jsx("div",{className:"create-agent-card__resource-list",children:c.resources.map(u=>a.jsx("div",{className:"create-agent-card__resource",children:a.jsxs("div",{className:"create-agent-card__resource-main",children:[a.jsxs("div",{className:"create-agent-card__resource-title",children:[a.jsx("span",{className:"create-agent-card__resource-name",children:u.name}),u.version?a.jsx(Ya,{className:"create-agent-card__resource-version",color:"secondary",size:"sm",variant:"soft",children:u.version}):null]}),u.description?a.jsx("p",{children:u.description}):null]})},u.ref))}):a.jsxs("div",{className:"create-agent-card__empty-category",children:[a.jsx("p",{children:c.sources.length===0?c.value==="skill_hub"?n("blocks.createAgents.skillHubSkipped"):n("blocks.createAgents.sourceSkipped",{label:c.label}):n("blocks.createAgents.noResources")}),c.sources.filter(u=>u.message).map(u=>a.jsx("p",{className:"create-agent-card__raw-source-error",children:u.message},u.source))]})]})})]},c.value))},r.collectionId||"collected-resources")})}function Sjt({args:e,response:t,status:n}){const{t:i}=Te("conversation"),r=p.useMemo(()=>({tool:i("blocks.createAgents.sourceLabels.tool"),knowledge:i("blocks.createAgents.sourceLabels.knowledge"),skillCenter:i("blocks.createAgents.sourceLabels.skillCenter"),unknownSource:i("blocks.createAgents.sourceLabels.unknown"),unnamedResource:i("blocks.createAgents.unnamedResource"),unnamedAgent:i("blocks.createAgents.unnamedAgent")}),[i]),s=p.useMemo(()=>bLe(e,t,r),[e,r,t]),o=n==="failed"?MM(t):"";return a.jsxs("section",{className:"create-agent-tool-card is-agent-results","aria-label":i("blocks.createAgents.resultAria"),children:[o?a.jsxs("div",{className:"create-agent-card__message is-error",role:"alert",children:[a.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.creationFailed")}),a.jsx("span",{children:o})]}):null,s.agents.length>0?a.jsx("div",{className:"create-agent-card__agent-grid",children:s.agents.map(l=>{const c=n==="failed"?"failed":l.status,u=l.error||c==="failed"&&o,d=l.builtinTools.length+l.pythonTools.length;return a.jsxs(vH,{className:`create-agent-card__agent-card${u?" is-error":""}`,children:[a.jsx(xH,{leading:a.jsx(t1,{seed:l.name}),title:l.name,titleText:l.name,status:a.jsx(Ya,{color:"secondary",size:"sm",variant:"soft",children:i(`blocks.createAgents.agentTypes.${l.rootType}`,{defaultValue:l.rootType})})}),l.description?a.jsx(wH,{children:l.description}):null,u?a.jsx("div",{className:"create-agent-card__agent-result is-error",role:"alert",children:u}):null,a.jsxs("div",{className:"create-agent-card__agent-resources","aria-label":i("blocks.createAgents.agentResources",{name:l.name}),children:[a.jsx(R_,{label:i("blocks.createAgents.skill"),count:l.skills.length,icon:a.jsx(mN,{"aria-hidden":"true"}),children:a.jsx(L4,{label:i("blocks.createAgents.skill"),resources:l.skills})}),a.jsx(R_,{label:i("blocks.createAgents.knowledgeBase"),count:l.knowledgeBases.length,icon:a.jsx(mIe,{"aria-hidden":"true"}),children:a.jsx(L4,{label:i("blocks.createAgents.knowledgeBase"),resources:l.knowledgeBases})}),a.jsxs(R_,{label:i("blocks.createAgents.toolsLabel"),count:d,icon:a.jsx(pat,{"aria-hidden":"true"}),children:[a.jsx(L4,{label:i("blocks.createAgents.builtinTool"),resources:l.builtinTools}),a.jsx(wjt,{tools:l.pythonTools})]}),a.jsx(R_,{label:i("blocks.createAgents.subAgents"),count:l.subAgentCount,icon:a.jsx(gat,{"aria-hidden":"true"}),children:a.jsx(Ojt,{agents:l.subAgents})})]})]},l.name)})}):n==="running"?a.jsx(DLe,{label:i("blocks.createAgents.creating")}):a.jsxs("div",{className:"create-agent-card__message",children:[a.jsx("span",{className:"create-agent-card__message-title",children:i("blocks.createAgents.noAgents")}),a.jsx("span",{children:i("blocks.createAgents.noAgentResult")})]})]})}const Ejt={web_search:{name:"web_search",runningLabel:"Searching the web",doneLabel:"Web search complete",tone:"search",icon:Pne},link_reader:{name:"link_reader",runningLabel:"Reading webpage",doneLabel:"Webpage read complete",tone:"search",icon:Pne},run_code:{name:"run_code",runningLabel:"Running code in the AgentKit sandbox",doneLabel:"Code execution completed in the AgentKit sandbox",tone:"sandbox",icon:m_t},list_envs:{name:"list_envs",runningLabel:"Checking available environments",doneLabel:"Available environments loaded",tone:"resources",icon:b_t},get_env_manifest:{name:"get_env_manifest",runningLabel:"Loading the environment manifest",doneLabel:"Environment manifest loaded",tone:"knowledge",icon:y_t},execute_in_sandbox:{name:"execute_in_sandbox",runningLabel:"Running a command in the environment",doneLabel:"Command completed in the environment",tone:"sandbox",icon:Mne},delegate_to_codex_sandbox:{name:"delegate_to_codex_sandbox",runningLabel:"Codex Sandbox is running",doneLabel:"Codex Sandbox completed",failedLabel:"Codex Sandbox failed",tone:"sandbox",icon:Mne},image_generate:{name:"image_generate",runningLabel:"Generating image",doneLabel:"Image generated",tone:"image",icon:u_t},video_generate:{name:"video_generate",runningLabel:"Generating video",doneLabel:"Video generated",tone:"video",icon:lq},ppt_generate:{name:"ppt_generate",runningLabel:"Generating presentation",doneLabel:"Presentation generated",tone:"presentation",icon:d_t},load_memory:{name:"load_memory",runningLabel:"Searching long-term memory",doneLabel:"Memory search complete",tone:"memory",icon:f_t},load_knowledgebase:{name:"load_knowledgebase",runningLabel:"Searching the knowledge base",doneLabel:"Knowledge base search complete",tone:"knowledge",icon:h_t},load_skill:{name:"load_skill",runningLabel:"Loading skill",doneLabel:"Skill loaded",tone:"skill",icon:p_t},collect_resources:{name:"collect_resources",runningLabel:"Collecting available resources",doneLabel:"Resource collection complete",failedLabel:"Resource collection failed",tone:"resources",icon:g_t,detailRenderer:kjt},create_agents:{name:"create_agents",runningLabel:"Creating and running agents",doneLabel:"Agent creation complete",failedLabel:"Agent creation failed",tone:"agent",icon:Dne,detailRenderer:Sjt},branch_compare:{name:"branch_compare",runningLabel:"",doneLabel:"",failedLabel:"",tone:"search",icon:Dne,detailRenderer:U_t,hideHeader:!0}};function mq(e){return Ejt[e]}function Cjt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M6 3h8l4 4v14H6Z"}),a.jsx("path",{d:"M14 3v5h5"}),a.jsx("path",{d:"m10 12-2 2 2 2M14 12l2 2-2 2"})]})}function Ajt(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M12 3 19 6v5c0 4.6-2.8 7.8-7 10-4.2-2.2-7-5.4-7-10V6l7-3Z"}),a.jsx("path",{d:"m9 12 2 2 4-4"})]})}function Tjt(e,t){const n=new Map(e.map(o=>[o.path,o.content])),i=new Map(t.map(o=>[o.path,o.content])),r=new Set([...n.keys(),...i.keys()]),s=[];for(const o of[...r].sort((l,c)=>l.localeCompare(c))){const l=n.get(o),c=i.get(o);l!==c&&s.push({path:o,status:l===void 0?"added":c===void 0?"deleted":"modified",before:l??"",after:c??""})}return s}function Nb(e){return{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...e}}function MLe(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"m9 7-5 5 5 5M15 7l5 5-5 5M13.5 4l-3 16"})})}function $4(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"M6.5 3.75h7l4 4V20.25h-11zM13.5 3.75v4h4M9 12h6M9 15.5h4.5"})})}function _jt(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"M3.75 7.25h6l1.75 2h8.75v9.25H3.75zM3.75 7.25V5.5h5l1.5 1.75"})})}function jjt(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"m9 5 7 7-7 7"})})}function xT(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"m6.5 6.5 11 11M17.5 6.5l-11 11"})})}function Njt(e){return a.jsxs("svg",{...Nb(e),children:[a.jsx("circle",{cx:"12",cy:"12",r:"3.25"}),a.jsx("path",{d:"M12 2.75v2M12 19.25v2M2.75 12h2M19.25 12h2M5.45 5.45l1.4 1.4M17.15 17.15l1.4 1.4M18.55 5.45l-1.4 1.4M6.85 17.15l-1.4 1.4"})]})}function Rjt(e){return a.jsx("svg",{...Nb(e),children:a.jsx("path",{d:"M19.25 15.25A8 8 0 0 1 8.75 4.75a8 8 0 1 0 10.5 10.5Z"})})}function LLe(e){return a.jsxs("svg",{...Nb(e),children:[a.jsx("path",{d:"M19.25 8.25V4.5l-1.8 1.8a7.5 7.5 0 1 0 1.8 7.65"}),a.jsx("path",{d:"M19.25 4.5H15.5"})]})}const Ijt=p.lazy(()=>Zs(()=>Promise.resolve().then(()=>wFe),void 0)),Pjt=p.lazy(()=>Zs(()=>import("../chunks/CodeDiffEditor-BA7DPPzD.js"),[])),$Le="veadk-code-workspace-theme";function Djt(e){const t={name:"",children:new Map};for(const n of e){const i=n.path.split("/").filter(Boolean);let r=t;i.forEach((s,o)=>{let l=r.children.get(s);l||(l={name:s,children:new Map},r.children.set(s,l)),o===i.length-1&&(l.path=n.path),r=l})}return t}function Mjt(e,t=!1){return[...e.children.values()].sort((n,i)=>{const r=n.children.size>0&&n.path===void 0,s=i.children.size>0&&i.path===void 0;return r!==s?t?r?1:-1:r?-1:1:n.name.localeCompare(i.name)})}function Ljt(){if(typeof window>"u")return"light";try{return window.localStorage.getItem($Le)==="dark"?"dark":"light"}catch{return"light"}}function $jt(e){return e===""?0:e.split(` `).length}function a1({project:e,open:t,onClose:n,onChange:i,readOnly:r=!1,comparison:s}){var N;const{t:o}=Te("workspaceTools"),l=p.useId(),c=p.useRef(null),u=p.useRef(null),d=p.useRef(n),[f,h]=p.useState(Ljt),m=p.useMemo(()=>s?Tjt(s.baseProject.files,e.files):[],[s,e.files]),g=p.useMemo(()=>s?m.map(P=>({path:P.path,content:P.status==="deleted"?P.before:P.after})):e.files,[m,s,e.files]),b=p.useMemo(()=>new Map(m.map(P=>[P.path,P.status])),[m]),[v,y]=p.useState(((N=g[0])==null?void 0:N.path)??null),[w,x]=p.useState(new Set),O=p.useMemo(()=>Djt(g),[g]),k=g.find(P=>P.path===v)??null,S=m.find(P=>P.path===v)??null;if(d.current=n,p.useEffect(()=>{try{window.localStorage.setItem($Le,f)}catch{}},[f]),p.useEffect(()=>{var _;if(!t)return;const P=document.body.style.overflow,I=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(_=u.current)==null||_.focus();const D=L=>{if(L.key==="Escape"){L.preventDefault(),d.current();return}if(L.key!=="Tab"||!c.current)return;const F=[...c.current.querySelectorAll('button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')].filter(q=>q.offsetParent!==null);if(F.length===0)return;const M=F[0],V=F[F.length-1];L.shiftKey&&document.activeElement===M?(L.preventDefault(),V.focus()):!L.shiftKey&&document.activeElement===V&&(L.preventDefault(),M.focus())};return window.addEventListener("keydown",D),()=>{document.body.style.overflow=P,window.removeEventListener("keydown",D),I!=null&&I.isConnected&&I.focus()}},[t]),p.useEffect(()=>{k||g.length===0||y(g[0].path)},[g,k]),!t)return null;function C(P){x(I=>{const D=new Set(I);return D.has(P)?D.delete(P):D.add(P),D})}function E(P){return P?a.jsx("span",{className:`code-browser-change is-${P}`,children:o(`codeBrowser.change.${P}`)}):null}function j(P,I,D){return Mjt(P,I===0).map(_=>{const L=D?`${D}/${_.name}`:_.name;if(!(_.children.size>0&&_.path===void 0)&&_.path){const V=b.get(_.path);return a.jsxs("button",{type:"button",className:`code-browser-file${v===_.path?" is-active":""}`,style:{paddingLeft:`${12+I*16}px`},onClick:()=>y(_.path??null),title:_.path,"aria-pressed":v===_.path,children:[a.jsx($4,{}),a.jsx("span",{children:_.name}),E(V)]},L)}const M=w.has(L);return a.jsxs("div",{children:[a.jsxs("button",{type:"button",className:"code-browser-folder",style:{paddingLeft:`${10+I*16}px`},onClick:()=>C(L),"aria-expanded":!M,children:[a.jsx(jjt,{className:M?"":"is-open"}),a.jsx(_jt,{}),a.jsx("span",{children:_.name})]}),!M&&j(_,I+1,L)]},L)})}function T(P){!k||s||i({...e,files:e.files.map(I=>I.path===k.path?{...I,content:P}:I)})}const R=f==="light"?"dark":"light",A=o(s?"codeBrowser.noChanges":"codeBrowser.chooseFile");return yi.createPortal(a.jsx("div",{className:"code-browser-backdrop",onMouseDown:P=>{P.target===P.currentTarget&&n()},children:a.jsxs("section",{ref:c,className:`code-browser-dialog is-${f}`,role:"dialog","aria-modal":"true","aria-labelledby":l,children:[a.jsxs("header",{className:"code-browser-head",children:[a.jsxs("div",{className:"code-browser-title-wrap",children:[a.jsx("span",{className:"code-browser-title-icon",children:a.jsx(MLe,{})}),a.jsxs("div",{children:[a.jsx("h2",{id:l,children:o(s?"codeBrowser.compareTitle":"codeBrowser.workspaceTitle")}),a.jsx("p",{title:e.name,children:e.name||o("codeBrowser.projectFallback")})]})]}),a.jsxs("div",{className:"code-browser-head-actions",children:[a.jsx("button",{type:"button",className:"code-browser-icon-button",onClick:()=>h(R),"aria-label":o("codeBrowser.switchTheme"),title:o("codeBrowser.switchThemeTitle",{theme:o(`codeBrowser.themes.${R}`)}),children:f==="light"?a.jsx(Rjt,{}):a.jsx(Njt,{})}),a.jsx("button",{ref:u,type:"button",className:"code-browser-icon-button",onClick:n,"aria-label":o("codeBrowser.closeWorkspace"),title:o("codeBrowser.close"),children:a.jsx(xT,{})})]})]}),a.jsxs("div",{className:"code-browser-workspace",children:[a.jsxs("aside",{className:"code-browser-sidebar","aria-label":o(s?"codeBrowser.changedFiles":"codeBrowser.projectFiles"),children:[a.jsxs("div",{className:"code-browser-sidebar-head",children:[a.jsx("span",{children:o(s?"codeBrowser.changes":"codeBrowser.files")}),a.jsx("span",{children:g.length})]}),a.jsx("div",{className:"code-browser-tree",children:g.length>0?j(O,0,""):a.jsx("div",{className:"code-browser-empty",children:A})})]}),a.jsxs("main",{className:"code-browser-main",children:[a.jsx("div",{className:"code-browser-tabs",role:"tablist","aria-label":o("codeBrowser.openFiles"),children:k?a.jsxs("div",{className:"code-browser-tab",role:"tab","aria-selected":"true",children:[a.jsx($4,{}),a.jsx("span",{children:k.path.split("/").pop()}),E(S==null?void 0:S.status)]}):null}),a.jsxs("div",{className:"code-browser-path",children:[a.jsx($4,{}),a.jsx("span",{children:(k==null?void 0:k.path)??o("codeBrowser.noFileSelected")})]}),s?a.jsxs("div",{className:"code-browser-diff-labels","aria-label":o("codeBrowser.comparisonDirection"),children:[a.jsx("span",{children:s.baseLabel??o("codeBrowser.before")}),a.jsx("span",{children:s.targetLabel??o("codeBrowser.after")})]}):null,a.jsx("div",{className:"code-browser-editor",children:k?a.jsx(p.Suspense,{fallback:a.jsx("div",{className:"code-browser-empty",children:o("codeBrowser.loadingEditor")}),children:S?a.jsx(Pjt,{before:S.before,after:S.after,path:S.path,theme:f}):a.jsx(Ijt,{value:k.content,path:k.path,onChange:T,readOnly:r,theme:f})}):a.jsx("div",{className:"code-browser-empty",children:A})}),a.jsxs("footer",{className:"code-browser-statusbar",children:[a.jsx("span",{children:s?o("codeBrowser.changedFileCount",{count:m.length}):o("codeBrowser.fileCount",{count:e.files.length})}),a.jsx("span",{children:k?o("codeBrowser.lineCount",{count:$jt(k.content)}):"UTF-8"})]})]})]})]})}),document.body)}function Fjt({project:e,onChange:t,className:n="",label:i}){const{t:r}=Te("workspaceTools"),[s,o]=p.useState(!1),l=i??r("codeBrowser.viewSource");return a.jsxs(a.Fragment,{children:[a.jsxs("button",{type:"button",className:`code-browser-trigger ${n}`.trim(),onClick:()=>o(!0),"aria-label":r("codeBrowser.viewSourceAria"),title:l,children:[a.jsx(MLe,{}),a.jsx("span",{children:l})]}),a.jsx(a1,{project:e,open:s,onClose:()=>o(!1),onChange:t})]})}const my="••••••••",I_=5,Uv=8e3,Bjt=8,Ujt=/(?:authorization|cookie|password|passwd|secret|token|api[_-]?key|access[_-]?key|credential|signature|^env(?:ironment)?$|^ak$|^sk$)/i,FLe=/\u001b\[[0-?]*[ -/]*[@-~]/g,BLe=/\u001b\][^\u0007]*(?:\u0007|\u001b\\)/g,ULe=/[\u0000-\u0008\u000b\u000c\u000e-\u001a\u001c-\u001f\u007f-\u009f]/g,Qjt=new Set(["exec_command","commandExecution","command_execution","run_code","execute_in_sandbox","Run command"]),zjt=new Set(["web_search","search","grep","rg"]),Vjt=new Set(["read_file","read","list_files","glob","ls"]),Hjt=new Set(["apply_patch","file_change","fileChange"]),qjt=new Set(["create_goal","update_goal","get_goal"]);function vg(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)?e:void 0}function b0(...e){for(const t of e)if(typeof t=="string"&&t.trim())return t.trim();return""}function F4(...e){for(const t of e){if(typeof t=="number"&&Number.isFinite(t))return t;if(typeof t=="string"&&t.trim()&&Number.isFinite(Number(t)))return Number(t)}}function PI(e){const t=vg(e);if(!t)return[];const n=[t];for(const i of["payload","input","arguments","args","goal","result","display","safeCommandSummary","safeInputSummary"]){const r=vg(t[i]);r&&n.push(r)}return n}function mE(e,...t){return b0(...e.flatMap(n=>t.map(i=>n[i])))}function Wjt(e){let t=e.replace(FLe,"").replace(BLe,"").replace(ULe,"");return/[=:]|Bearer|Cookie|AKLT/i.test(t)&&(t=t.replace(/\bBearer\s+[^\s,;]+/gi,`Bearer ${my}`).replace(/\b(?:set-)?cookie\s*:\s*[^\r\n]*/gi,`cookie: ${my}`).replace(/\bAKLT[A-Za-z0-9_-]{6,}\b/g,my).replace(/((?:access[_-]?key(?:[_-]?id)?|secret(?:[_-]?(?:access)?[_-]?key)?|session[_-]?token|security[_-]?token|client[_-]?secret|api[_-]?key|authorization|cookie|[a-z0-9_-]{0,80}(?:password|secret|token)|credential|ak|sk)\s*[:=]\s*)(?:"[^"]*"|'[^']*'|[^\s,;&]+)/gi,`$1${my}`).replace(/([?&](?:access[_-]?key|api[_-]?key|client[_-]?secret|security[_-]?token|session[_-]?token|secret|token|password|authorization|cookie|credential)=)[^&#\s]+/gi,`$1${my}`).replace(/([?&](?:x-amz-(?:credential|signature|security-token)|x-tos-signature|signature)=)[^&#\s]+/gi,`$1${my}`)),t}function rf(e){return Wjt(e).replace(FLe,"").replace(BLe,"").replace(ULe,"")}function DI(e,t=0,n=new WeakSet){if(t>=Bjt)return"[truncated: maximum depth]";if(typeof e=="string")return rf(e);if(e===null||typeof e!="object")return e;if(n.has(e))return"[circular]";if(n.add(e),Array.isArray(e))return e.map(r=>DI(r,t+1,n));const i=vg(e);return i?Object.fromEntries(Object.entries(i).map(([r,s])=>[r,Ujt.test(r)?my:DI(s,t+1,n)])):e}function B4(e){const t=rf(e).trimEnd();if(!t)return;const n=t.split(/\r?\n/);return t.length>Uv*2?{text:t.slice(0,Uv)+t.slice(-Uv),head:[t.slice(0,Uv)],tail:[t.slice(-Uv)],omittedLines:0,omittedCharacters:t.length-Uv*2}:n.length<=I_*2?{text:t,head:n,tail:[],omittedLines:0,omittedCharacters:0}:{text:t,head:n.slice(0,I_),tail:n.slice(-I_),omittedLines:n.length-I_*2,omittedCharacters:0}}function Kjt(e){return qjt.has(e)?"goal":Qjt.has(e)?"command":zjt.has(e)||/search/i.test(e)?"search":Vjt.has(e)||/(?:read|list|glob)/i.test(e)?"read":Hjt.has(e)||/(?:write|edit|patch|file.?change)/i.test(e)?"file-change":/^(?:mcp|tool__)/i.test(e)||e.includes("/")?"mcp":/auth|credential|approval/i.test(e)?"authorization":"generic"}function Gjt(e,t){if(e.status)return e.status;const n=b0(t==null?void 0:t.status).toLowerCase();return(t==null?void 0:t.ok)===!1||["failed","error","cancelled","denied","timeout"].includes(n)?"failed":e.done||["completed","done","success"].includes(n)?"completed":"running"}function Qne(e){return typeof e=="string"?e.trim()?[e.trim()]:[]:Array.isArray(e)?e.flatMap(t=>{if(typeof t=="string")return t.trim()?[t.trim()]:[];const n=vg(t),i=b0(n==null?void 0:n.path,n==null?void 0:n.filename,n==null?void 0:n.name);return i?[i]:[]}):[]}function Xjt(e,t,n,i,r){const s=[...PI(n),...PI(i)];return e==="goal"?rf(mE(s,"objective","title","name")):e==="command"?rf(mE(s,"command","cmd","script","commandPreview","binary")):e==="search"?rf(mE(s,"query","pattern","search")):e==="read"||e==="file-change"?r.slice(0,2).map(rf).join(", "):rf(e==="mcp"?b0(n==null?void 0:n.query,n==null?void 0:n.resource,n==null?void 0:n.path):b0(n==null?void 0:n.title,n==null?void 0:n.name,i==null?void 0:i.message,i==null?void 0:i.status,t))}function gq(e){const t=vg(e.args),n=vg(e.response),i=e.args===void 0?void 0:DI(e.args),r=e.response===void 0?void 0:DI(e.response),s=[...PI(e.args),...PI(e.response)],o=Kjt(e.name),l=Gjt(e,n),c=vg(n==null?void 0:n.display)??vg(t==null?void 0:t.display),u=b0(n==null?void 0:n.aggregatedOutput,n==null?void 0:n.aggregated_output,n==null?void 0:n.output,n==null?void 0:n.errorMessage,n==null?void 0:n.error_message),d=[...Qne((t==null?void 0:t.paths)??(t==null?void 0:t.files)??(t==null?void 0:t.changes)??(t==null?void 0:t.path)),...Qne((n==null?void 0:n.paths)??(n==null?void 0:n.files)??(n==null?void 0:n.changes))],f=F4(n==null?void 0:n.exitCode,n==null?void 0:n.exit_code),h=F4(n==null?void 0:n.durationMs,n==null?void 0:n.duration_ms,c==null?void 0:c.durationMs),m=F4(n==null?void 0:n.count,n==null?void 0:n.total,n==null?void 0:n.totalCount);return{category:o,titleKey:o==="generic"?`generic.named.${l}`:`${o}.${l}`,titleParams:o==="generic"?{tool:e.name}:void 0,title:e.title,summary:Xjt(o,e.name,t,n,d),status:l,source:e.source,command:o==="command"?rf(b0(mE(s,"command","cmd","script","commandPreview","binary"))):void 0,cwd:o==="command"&&rf(mE(s,"cwd"))||void 0,output:B4(u),exitCode:f,durationMs:h,resultCount:m,paths:[...new Set(d.map(rf))],defaultOpen:e.defaultOpen===!0||l==="running"||l==="failed",rawArgs:i,rawResponse:r,rawArgsPreview:i===void 0?void 0:B4(zne(i)),rawResponsePreview:r===void 0?void 0:B4(zne(r))}}function zne(e){try{return JSON.stringify(e,null,2)}catch{return String(e)}}function Vne(e){return e.status==="completed"&&(e.category==="read"||e.category==="search")}function Nd(e){return{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,...e}}function Yjt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("rect",{x:"3.5",y:"4.5",width:"17",height:"15",rx:"2.5"}),a.jsx("path",{d:"m7.5 9 2.7 2.5L7.5 14M12.7 14h3.8M3.8 7.5h16.4"})]})}function QLe(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("path",{d:"M6 3.5h7l5 5v12H6zM13 3.5v5h5M8.8 13h5.7M8.8 16h3.8"}),a.jsx("circle",{cx:"16.8",cy:"16.5",r:"2.3"}),a.jsx("path",{d:"m18.5 18.2 1.8 1.8"})]})}function Zjt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("circle",{cx:"10.5",cy:"10.5",r:"5.75"}),a.jsx("path",{d:"m15 15 4.25 4.25"})]})}function Jjt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("path",{d:"M5.5 3.5h7l4 4v4M12.5 3.5v4h4M10.5 20.5h-5v-17"}),a.jsx("path",{d:"m12.5 17.5 5.6-5.6 2 2-5.6 5.6-2.8.8z"})]})}function eNt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("path",{d:"M8 8V4.5M16 8V4.5M6.5 8h11v3.5a5.5 5.5 0 0 1-11 0zM12 17v3"}),a.jsx("path",{d:"M5.5 4.5h5M13.5 4.5h5"})]})}function tNt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("path",{d:"M12 3.5 19 6v5.2c0 4.3-2.7 7.6-7 9.3-4.3-1.7-7-5-7-9.3V6z"}),a.jsx("path",{d:"m8.8 12 2 2 4.4-4.4"})]})}function Hne(e){return a.jsx("svg",{...Nd(e),children:a.jsx("path",{d:"M14.8 6.2a4.1 4.1 0 0 0-5.6 5.6l-5.4 5.4a2 2 0 0 0 2.8 2.8l5.4-5.4a4.1 4.1 0 0 0 5.6-5.6l-2.5 2.5-2.6-.6-.6-2.6z"})})}function bq(e){return a.jsx("svg",{...Nd(e),children:a.jsx("path",{d:"m9 5 7 7-7 7"})})}function zLe(e){return a.jsx("svg",{...Nd(e),children:a.jsx("path",{d:"m5 12.5 4.5 4.5L19 7.5"})})}function nNt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("circle",{cx:"12",cy:"12",r:"8.5"}),a.jsx("path",{d:"M12 7.5v5.25M12 16.25h.01"})]})}function iNt(e){return a.jsx("svg",{...Nd(e),children:a.jsx("path",{d:"M20 12a8 8 0 1 1-2.35-5.65"})})}function rNt(e){return a.jsxs("svg",{...Nd(e),children:[a.jsx("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2"}),a.jsx("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"})]})}const sNt={goal:Hne,command:Yjt,read:QLe,search:Zjt,"file-change":Jjt,mcp:eNt,authorization:tNt,generic:Hne};function aNt(e){return e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(e<1e4?1:0)} s`}function VLe(e){if(e===void 0)return"";if(typeof e=="string"){const t=e.trim();if(t.startsWith("{")||t.startsWith("["))try{return JSON.stringify(JSON.parse(t),null,2)}catch{return e}return e}try{return JSON.stringify(e,null,2)}catch{return String(e)}}function oNt({status:e}){return e==="running"||e==="queued"?a.jsx(iNt,{className:"tool-activity__status-icon is-spinning"}):e==="failed"?a.jsx(nNt,{className:"tool-activity__status-icon"}):a.jsx(zLe,{className:"tool-activity__status-icon"})}function lNt({presentation:e,callId:t}){const{t:n}=Te("conversation"),[i,r]=p.useState(!1),[s,o]=p.useState(""),[l,c]=p.useState(!1),u=p.useRef(void 0);p.useEffect(()=>()=>window.clearTimeout(u.current),[]);const d=async(f,h)=>{window.clearTimeout(u.current);try{await navigator.clipboard.writeText(typeof h=="string"?h:VLe(h)),o(f),c(!1),u.current=window.setTimeout(()=>o(""),1500)}catch{o(""),c(!0),u.current=window.setTimeout(()=>c(!1),3e3)}};return e.rawArgs===void 0&&e.rawResponse===void 0&&!t?null:a.jsxs("div",{className:"tool-activity__raw",children:[a.jsxs("button",{type:"button",onClick:()=>r(f=>!f),"aria-expanded":i,children:[n("blocks.toolActivity.rawData"),a.jsx(bq,{className:i?"is-open":""})]}),i?a.jsxs("div",{className:"tool-activity__raw-body",children:[t?a.jsxs("div",{className:"tool-activity__raw-id",children:[a.jsx("span",{children:n("blocks.toolActivity.callId")}),a.jsx("code",{children:t}),a.jsx("button",{type:"button",onClick:()=>void d("id",t),"aria-label":n("blocks.toolActivity.copyCallId"),children:a.jsx(rNt,{})})]}):null,e.rawArgs!==void 0?a.jsx(qne,{label:n("blocks.arguments"),value:e.rawArgs,preview:e.rawArgsPreview,copied:s==="input",onCopy:()=>void d("input",e.rawArgs)}):null,e.rawResponse!==void 0?a.jsx(qne,{label:n("blocks.result"),value:e.rawResponse,preview:e.rawResponsePreview,copied:s==="result",onCopy:()=>void d("result",e.rawResponse)}):null,l?a.jsx("span",{className:"tool-activity__copy-error",role:"alert",children:n("blocks.toolActivity.copyFailed")}):null]}):null]})}function qne({label:e,value:t,preview:n,copied:i,onCopy:r}){const{t:s}=Te("conversation");return a.jsxs("section",{className:"tool-activity__raw-section",children:[a.jsxs("div",{children:[a.jsx("span",{children:e}),a.jsx("button",{type:"button",onClick:r,children:s(i?"blocks.toolActivity.copied":"blocks.toolActivity.copy")})]}),a.jsxs("pre",{children:[(n==null?void 0:n.head.join(` `))??VLe(t),n&&n.omittedCharacters>0?` ${s("blocks.toolActivity.omittedCharacters",{count:n.omittedCharacters})} @@ -1088,9 +1088,9 @@ ${C.region} · ${C.runtimeId}`}});return a.jsxs("div",{className:"mpa-channels-c `))t.push(r);continue}const i=[[]];for(const r of n)r.text.split(` `).forEach((s,o)=>{o>0&&i.push([]),s&&i[i.length-1].push({...r,text:s})});for(const r of i){const s=r[r.length-1];s!=null&&s.text.endsWith("\r")&&(s.text=s.text.slice(0,-1)),t.push(r)}}return t}function LL({title:e="Request example",lines:t,language:n="auto",wordWrap:i=!1,showLineNumbers:r=!0,actions:s,children:o,scrollAreaProps:l,className:c="",...u}){const d=p.useId(),[f,h]=p.useState(""),m=p.useMemo(()=>t.map(x=>typeof x=="string"?x:x.map(O=>O.text).join("")).join(` `),[t]),g=p.useMemo(()=>Fnn(t),[t]),b=!o&&t.some(x=>typeof x=="string"),v=p.useMemo(()=>b?Lnn(m,n):[],[m,n,b]);async function y(){try{await navigator.clipboard.writeText(m),h("Copied")}catch{h("Unable to copy, select the code to copy manually")}}const w=o??a.jsx("div",{className:"studio-code-block__viewport",tabIndex:0,role:"region","aria-label":e,children:a.jsx("pre",{children:a.jsx("code",{children:g.map((x,O)=>{var k;return a.jsxs("span",{className:"studio-code-block__line",children:[r&&a.jsx("span",{className:"studio-code-block__number","aria-hidden":"true",children:String(O+1).padStart(2,"0")}),a.jsxs("span",{className:"studio-code-block__text",children:[typeof x=="string"?(k=v[O])==null?void 0:k.map((S,C)=>a.jsx("span",{className:S.color?`studio-code-block__token--${S.color}`:void 0,children:S.text},C)):x.map((S,C)=>a.jsx("span",{style:{color:S.color},children:S.text},C)),` -`]})]},O)})})})});return a.jsxs("section",{...u,"aria-labelledby":d,"data-word-wrap":i||void 0,"data-line-numbers":r,className:`studio-code-block ${c}`.trim(),children:[a.jsxs("header",{className:"studio-code-block__header",children:[a.jsx("h3",{id:d,children:e}),a.jsxs("div",{className:"studio-code-block__actions",children:[a.jsx(Wi,{variant:"ghost",iconOnly:!0,"aria-label":"Copy code",title:f||"Copy code",onClick:y,startIcon:a.jsx($nn,{})}),s]})]}),l?a.jsx(yf,{...l,children:w}):w,a.jsx("span",{className:"studio-code-block__status",role:"status",children:f})]})}function Bnn(e,t){if(t==="plaintext"||t==="text")return;const n=e.toLowerCase().split(".").pop(),i={js:"babel",jsx:"babel",javascript:"babel",mjs:"babel",cjs:"babel",ts:"typescript",tsx:"typescript",typescript:"typescript",mts:"typescript",cts:"typescript",json:"json",jsonc:"jsonc",json5:"json5",css:"css",scss:"scss",less:"less",html:"html",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown"};return(t&&Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0)??(n&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:void 0)}async function Unn(e){const t=()=>Zs(()=>import("../chunks/estree-B2JyRpo9.js"),[]).then(n=>n);return e==="typescript"?Promise.all([Zs(()=>import("../chunks/typescript-CNrcnk9t.js"),[]),t()]):["babel","json","jsonc","json5"].includes(e)?Promise.all([Zs(()=>import("../chunks/babel-q9-XJZEE.js"),[]),t()]):["css","scss","less"].includes(e)?[await Zs(()=>import("../chunks/postcss-DljguZco.js"),[])]:e==="html"?[await Zs(()=>import("../chunks/html-B-qLsy26.js"),[])]:e==="yaml"?[await Zs(()=>import("../chunks/yaml-BZTmqMMi.js"),[])]:[await Zs(()=>import("../chunks/markdown-pdCxO8nx.js"),[])]}async function Qnn(e,t,n){const i=Bnn(t,n);if(!i||!e.trim())return e;const[{format:r},s]=await Promise.all([Zs(()=>import("../chunks/standalone-BazYaFez.js"),[]),Unn(i)]);return r(e,{parser:i,plugins:s,printWidth:80,tabWidth:2,embeddedLanguageFormatting:"off"})}const znn=p.lazy(()=>Zs(()=>import("../chunks/FileExplorerEditor-CfXfRF6Z.js"),[]).then(e=>({default:e.FileExplorerEditor})));function J9e(e){return typeof e.content=="string"?e.content:e.content.map(t=>typeof t=="string"?t:t.map(n=>n.text).join("")).join(` +`]})]},O)})})})});return a.jsxs("section",{...u,"aria-labelledby":d,"data-word-wrap":i||void 0,"data-line-numbers":r,className:`studio-code-block ${c}`.trim(),children:[a.jsxs("header",{className:"studio-code-block__header",children:[a.jsx("h3",{id:d,children:e}),a.jsxs("div",{className:"studio-code-block__actions",children:[a.jsx(Wi,{variant:"ghost",iconOnly:!0,"aria-label":"Copy code",title:f||"Copy code",onClick:y,startIcon:a.jsx($nn,{})}),s]})]}),l?a.jsx(yf,{...l,children:w}):w,a.jsx("span",{className:"studio-code-block__status",role:"status",children:f})]})}function Bnn(e,t){if(t==="plaintext"||t==="text")return;const n=e.toLowerCase().split(".").pop(),i={js:"babel",jsx:"babel",javascript:"babel",mjs:"babel",cjs:"babel",ts:"typescript",tsx:"typescript",typescript:"typescript",mts:"typescript",cts:"typescript",json:"json",jsonc:"jsonc",json5:"json5",css:"css",scss:"scss",less:"less",html:"html",yaml:"yaml",yml:"yaml",md:"markdown",markdown:"markdown"};return(t&&Object.prototype.hasOwnProperty.call(i,t)?i[t]:void 0)??(n&&Object.prototype.hasOwnProperty.call(i,n)?i[n]:void 0)}async function Unn(e){const t=()=>Zs(()=>import("../chunks/estree-B2JyRpo9.js"),[]).then(n=>n);return e==="typescript"?Promise.all([Zs(()=>import("../chunks/typescript-CNrcnk9t.js"),[]),t()]):["babel","json","jsonc","json5"].includes(e)?Promise.all([Zs(()=>import("../chunks/babel-q9-XJZEE.js"),[]),t()]):["css","scss","less"].includes(e)?[await Zs(()=>import("../chunks/postcss-DljguZco.js"),[])]:e==="html"?[await Zs(()=>import("../chunks/html-B-qLsy26.js"),[])]:e==="yaml"?[await Zs(()=>import("../chunks/yaml-BZTmqMMi.js"),[])]:[await Zs(()=>import("../chunks/markdown-pdCxO8nx.js"),[])]}async function Qnn(e,t,n){const i=Bnn(t,n);if(!i||!e.trim())return e;const[{format:r},s]=await Promise.all([Zs(()=>import("../chunks/standalone-BazYaFez.js"),[]),Unn(i)]);return r(e,{parser:i,plugins:s,printWidth:80,tabWidth:2,embeddedLanguageFormatting:"off"})}const znn=p.lazy(()=>Zs(()=>import("../chunks/FileExplorerEditor-BkVCoGHv.js"),[]).then(e=>({default:e.FileExplorerEditor})));function J9e(e){return typeof e.content=="string"?e.content:e.content.map(t=>typeof t=="string"?t:t.map(n=>n.text).join("")).join(` `)}function Vnn(){return a.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M5 3.5h11L20.5 8v11a1.5 1.5 0 0 1-1.5 1.5H5A1.5 1.5 0 0 1 3.5 19V5A1.5 1.5 0 0 1 5 3.5Z"}),a.jsx("path",{d:"M7.5 3.5v6h8v-6M7.5 20.5v-7h9v7M13 5.5v2"})]})}function Hnn({file:e,draft:t,allowEdit:n,autoFormat:i,wordWrap:r,saving:s,error:o,canSave:l,onEdit:c,onSave:u}){const d=J9e(e),f=e.language??Z9e(e.name).language,h=t!==void 0,[m,g]=p.useState();p.useEffect(()=>{if(!i||h)return;let O=!1;return Qnn(d,e.name,f).then(k=>{O||g({source:d,language:f,name:e.name,content:k})},()=>{O||g({source:d,language:f,name:e.name,content:d,error:"无法格式化,已保留原文"})}),()=>{O=!0}},[d,e.name,f,i,h]);const b=!i||(m==null?void 0:m.source)===d&&m.language===f&&m.name===e.name,v=i&&b?(m==null?void 0:m.content)??d:d,y=(t==null?void 0:t.content)??v,w=t?t.content!==t.savedContent:!1,x=a.jsx("div",{className:"studio-file-explorer__editor-loading",children:a.jsx(u0,{size:28})});return a.jsxs("div",{className:"studio-file-explorer__pane",children:[a.jsx(LL,{className:"studio-file-explorer__code",title:e.name,language:f,wordWrap:r,scrollAreaProps:{orientation:r?"vertical":"both",className:"studio-file-explorer__content","aria-label":`${e.name} 文件内容`,tabIndex:0},lines:!t&&!i&&typeof e.content!="string"?e.content:y.split(` -`),onKeyDown:O=>{n&&(O.metaKey||O.ctrlKey)&&O.key.toLowerCase()==="s"&&!O.nativeEvent.isComposing&&(O.preventDefault(),l&&w&&!s&&u(y))},actions:n?a.jsx(Wi,{variant:"ghost",iconOnly:!0,startIcon:a.jsx(Vnn,{}),"aria-label":`保存 ${e.name}`,title:l?w?"保存文件":"没有未保存的修改":"未配置保存操作",disabled:!l||!w,loading:s,onClick:()=>u(y)}):void 0,children:n?b||t?a.jsx(p.Suspense,{fallback:x,children:a.jsx(znn,{name:e.name,language:f,value:y,wordWrap:r,onChange:O=>c(O,v)})}):x:void 0}),o?a.jsx("div",{className:"studio-file-explorer__message studio-file-explorer__message--error",role:"alert",children:o}):i&&b&&(m!=null&&m.error)?a.jsx("div",{className:"studio-file-explorer__message",role:"status",children:m.error}):null]})}function e7e(e,t){for(const n of e){if(n.type==="file"&&n.id===t)return n;if(n.type==="folder"){const i=e7e(n.children,t);if(i)return i}}}function t7e(e,t,n=0,i){return e.flatMap((r,s)=>[{entry:r,depth:n,parentId:i,position:s+1,count:e.length},...r.type==="folder"&&t.has(r.id)?t7e(r.children,t,n+1,r.id):[]])}function qnn({entries:e,selectedId:t,defaultSelectedId:n=null,onSelect:i,expandedIds:r,defaultExpandedIds:s=[],onExpandedChange:o,treeLabel:l="文件",allowEdit:c=!1,onEdit:u,onSave:d,autoFormat:f=!0,wordWrap:h=!0,renderPreview:m,height:g,narrowLayout:b="split",className:v="",style:y,...w}){var Y,X,ie;const[x,O]=p.useState(n),[k,S]=p.useState(s),[C,E]=p.useState(null),[j,T]=p.useState(new Map),[R,A]=p.useState(new Set),[N,P]=p.useState(new Map),I=p.useRef(new Set),D=p.useRef(!0);p.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const _=p.useRef(new Map),L=t===void 0?x:t,F=p.useMemo(()=>new Set(r??k),[r,k]),M=p.useMemo(()=>t7e(e,F),[e,F]),V=p.useMemo(()=>e7e(e,L),[e,L]),q=V?J9e(V):"",U=V?j.get(V.id):void 0,J=U&&(U.content!==U.savedContent||q===U.source||q===U.savedContent)?U:void 0,z=((Y=M.find(ee=>ee.entry.id===C))==null?void 0:Y.entry.id)??((X=M.find(ee=>ee.entry.id===L))==null?void 0:X.entry.id)??((ie=M[0])==null?void 0:ie.entry.id);function Z(ee,be){!V||!c||(T(ue=>new Map(ue).set(V.id,{source:q,content:ee,savedContent:(J==null?void 0:J.savedContent)??be})),P(ue=>new Map(ue).set(V.id,void 0)),u==null||u(V.id,ee,V))}async function ne(ee){if(!V||!c||!d||I.current.has(V.id))return;const be=V;I.current.add(be.id),A(new Set(I.current)),P(ue=>new Map(ue).set(be.id,void 0));try{await d(be.id,ee,be),D.current&&T(ue=>{var pe;return new Map(ue).set(be.id,{source:q,content:((pe=ue.get(be.id))==null?void 0:pe.content)??ee,savedContent:ee})})}catch{D.current&&P(ue=>new Map(ue).set(be.id,"保存失败,请重试"))}finally{I.current.delete(be.id),D.current&&A(new Set(I.current))}}function W(ee){const be=new Set(F);be.has(ee)?be.delete(ee):be.add(ee);const ue=[...be];r===void 0&&S(ue),o==null||o(ue)}function G(ee){ee.type==="folder"?W(ee.id):(t===void 0&&O(ee.id),i==null||i(ee.id,ee))}function H(ee){if(!ee)return;E(ee);const be=_.current.get(ee);be==null||be.focus({preventScroll:!0}),be==null||be.scrollIntoView({block:"nearest",inline:"nearest"})}function se(ee,be,ue){var ke,je,Pe,Ee,ze;const{entry:pe}=be;switch(ee.key){case"ArrowDown":ee.preventDefault(),H((ke=M[Math.min(ue+1,M.length-1)])==null?void 0:ke.entry.id);break;case"ArrowUp":ee.preventDefault(),H((je=M[Math.max(ue-1,0)])==null?void 0:je.entry.id);break;case"ArrowRight":ee.preventDefault(),pe.type==="folder"&&(F.has(pe.id)?H((Pe=pe.children[0])==null?void 0:Pe.id):W(pe.id));break;case"ArrowLeft":ee.preventDefault(),pe.type==="folder"&&F.has(pe.id)?W(pe.id):H(be.parentId);break;case"Home":ee.preventDefault(),H((Ee=M[0])==null?void 0:Ee.entry.id);break;case"End":ee.preventDefault(),H((ze=M[M.length-1])==null?void 0:ze.entry.id);break;case"Enter":case" ":ee.preventDefault(),G(pe);break}}return a.jsxs("div",{...w,className:`studio-file-explorer ${v}`.trim(),"data-narrow-layout":b,style:{height:g,...y},children:[a.jsx(yf,{className:"studio-file-explorer__tree-area","aria-label":l,children:a.jsxs("div",{role:"tree","aria-label":l,className:"studio-file-explorer__tree",children:[M.map((ee,be)=>{const{entry:ue}=ee,pe=ue.type==="folder",ke=pe&&F.has(ue.id),je=j.get(ue.id);return a.jsxs("button",{ref:Pe=>{Pe?_.current.set(ue.id,Pe):_.current.delete(ue.id)},type:"button",role:"treeitem",className:"studio-file-explorer__row",style:{"--file-explorer-depth":ee.depth},"aria-level":ee.depth+1,"aria-posinset":ee.position,"aria-setsize":ee.count,"aria-expanded":pe?ke:void 0,"aria-selected":ue.type==="file"?L===ue.id:void 0,tabIndex:z===ue.id?0:-1,title:ue.name,onFocus:()=>E(ue.id),onClick:()=>{E(ue.id),G(ue)},onKeyDown:Pe=>se(Pe,ee,be),children:[a.jsx("span",{className:"studio-file-explorer__guides","aria-hidden":"true",children:Array.from({length:ee.depth},(Pe,Ee)=>a.jsx("span",{style:{left:16+Ee*20}},Ee))}),a.jsx("span",{className:"studio-file-explorer__chevron","data-expanded":ke||void 0,children:pe&&a.jsx(Tnn,{})}),a.jsx("span",{className:"studio-file-explorer__icon",children:pe?a.jsx(_nn,{open:ke}):a.jsx(Inn,{name:ue.name})}),a.jsx("span",{className:"studio-file-explorer__name",children:ue.name}),ue.type==="file"&&je&&je.content!==je.savedContent&&a.jsx("span",{className:"studio-file-explorer__dirty",role:"img","aria-label":"未保存",title:"未保存"})]},ue.id)}),M.length===0&&a.jsx("div",{className:"studio-file-explorer__empty-tree",children:"暂无文件"})]})}),m?m(V):V?a.jsx(Hnn,{file:V,draft:J,allowEdit:c,autoFormat:f,wordWrap:h,saving:R.has(V.id),error:N.get(V.id),canSave:!!d,onEdit:Z,onSave:ee=>{ne(ee)}},V.id):a.jsx("div",{className:"studio-file-explorer__empty-content",children:"选择文件查看内容"})]})}function Wnn(){return a.jsxs("svg",{viewBox:"0 0 40 40",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{d:"M3.5 30V11.5A5.5 5.5 0 0 1 9 6h4.5l4 4H27a6 6 0 0 1 6 6v1"}),a.jsx("path",{d:"m3.5 30 6.2-10.8a4.5 4.5 0 0 1 3.9-2.2H35a3 3 0 0 1 2.6 4.5l-5.4 9.3a4.5 4.5 0 0 1-3.9 2.2H7a3.5 3.5 0 0 1-3.5-3Z"})]})}function mA({title:e,description:t,icon:n=a.jsx(Wnn,{}),actions:i,className:r="",...s}){return a.jsxs("div",{...s,className:`studio-empty-state ${r}`.trim(),children:[p.Children.toArray(n).length>0&&a.jsx("div",{className:"studio-empty-state__icon","aria-hidden":"true",children:a.jsx("span",{className:"studio-empty-state__icon-glyph",children:n})}),a.jsxs("div",{className:"studio-empty-state__info",children:[a.jsx("div",{className:"studio-empty-state__title",children:e}),p.Children.toArray(t).length>0&&a.jsx("div",{className:"studio-empty-state__description",children:t})]}),p.Children.toArray(i).length>0&&a.jsx("div",{className:"studio-empty-state__actions",children:i})]})}function Knn(){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{d:"M19.9898 3.99115C18.4371 2.46996 16.3085 2.41193 15.2251 3.4733L11.5251 7.09827C11.2292 7.38815 10.7543 7.38328 10.4645 7.0874C10.1746 6.79152 10.1795 6.31667 10.4753 6.02679L14.1754 2.40182C16.0113 0.603153 19.0891 1.00883 21.0395 2.91967C22.9927 4.8332 23.4179 7.87522 21.5681 9.68753L18.6609 12.5357C18.365 12.8256 17.8902 12.8208 17.6003 12.5249C17.3104 12.229 17.3153 11.7542 17.6112 11.4643L20.5184 8.61605C21.5878 7.56832 21.5398 5.50967 19.9898 3.99115Z",fill:"currentColor"}),a.jsx("path",{d:"M6.62424 3.58399C6.39448 3.23934 5.92882 3.14621 5.58418 3.37597C5.23953 3.60574 5.1464 4.07139 5.37617 4.41604L7.37617 7.41604C7.60593 7.76068 8.07158 7.85381 8.41623 7.62405C8.76088 7.39429 8.85401 6.92863 8.62424 6.58399L6.62424 3.58399Z",fill:"currentColor"}),a.jsx("path",{d:"M2.23737 7.2885C1.84442 7.15751 1.41968 7.36988 1.28869 7.76284C1.15771 8.1558 1.37008 8.58054 1.76303 8.71152L7.76303 10.7115C8.15599 10.8425 8.58073 10.6301 8.71172 10.2372C8.8427 9.84422 8.63033 9.41949 8.23737 9.2885L2.23737 7.2885Z",fill:"currentColor"}),a.jsx("path",{d:"M6.72775 12.506C7.00721 12.2003 6.98589 11.7259 6.68015 11.4464C6.37441 11.167 5.90001 11.1883 5.62056 11.494L4.3597 12.8735C2.63286 14.7628 3.01004 17.9268 4.86404 19.9552C6.72921 21.9958 9.73449 22.4595 11.5191 20.507L15.5538 16.0926C15.8333 15.7869 15.8119 15.3125 15.5062 15.033C15.2004 14.7536 14.7261 14.7749 14.4466 15.0806L10.4119 19.495C9.41099 20.59 7.44859 20.5596 5.97124 18.9432C4.48273 17.3147 4.4083 15.0437 5.4669 13.8855L6.72775 12.506Z",fill:"currentColor"})]})}function TK({className:e="",...t}){return a.jsx(mA,{...t,icon:a.jsx(Knn,{}),className:`studio-error-state ${e}`.trim()})}function Gnn(e){const t=[],n=new Map;for(const r of e){const s=r.path.split("/");let o=t,l="";for(const c of s.slice(0,-1)){l=l?`${l}/${c}`:c;let u=n.get(l);u||(u={id:`folder:${l}`,name:c,type:"folder",children:[]},n.set(l,u),o.push(u)),o=u.children}o.push({id:r.path,name:r.name,type:"file",content:""})}function i(r){r.sort((s,o)=>s.type===o.type?s.name.localeCompare(o.name):s.type==="folder"?-1:1);for(const s of r)s.type==="folder"&&i(s.children)}return i(t),t}function _K(e,t){const n=e.split(";",1)[0].toLowerCase();return n==="text/html"||/\.html?$/i.test(t)?"html":n==="text/markdown"||/\.(md|markdown)$/i.test(t)?"markdown":/^image\/(png|jpeg|gif|webp|svg\+xml|avif|bmp)$/.test(n)?"image":n.startsWith("text/")||n==="application/json"||/\.(txt|json|csv|yaml|yml|py|js|ts|css|log)$/i.test(t)?"text":"download"}function Xnn(e,t){let n;try{n=decodeURIComponent(t.split(/[?#]/,1)[0])}catch{return null}if(!n||/^[\/\\]/.test(n)||/[:\\\u0000-\u001f]/.test(n))return null;const i=e.split("/").slice(0,-1);for(const r of n.split("/"))if(!(!r||r==="."))if(r===".."){if(i.length===0)return null;i.pop()}else i.push(r);return i.join("/")||null}function Ynn(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>t(String(i.result)),i.onerror=()=>n(new Error("无法读取预览图片")),i.readAsDataURL(e)})}async function Znn(e,t,n,i){const r=new DOMParser().parseFromString(e,"text/html");for(const h of r.querySelectorAll("script,iframe,frame,object,embed,base,link,meta[http-equiv],form"))h.remove();for(const h of r.querySelectorAll("*")){for(const m of Array.from(h.attributes))(/^on/i.test(m.name)||["srcset","srcdoc","action","formaction","ping"].includes(m.name))&&h.removeAttribute(m.name);h.tagName!=="IMG"&&h.removeAttribute("src"),h.hasAttribute("href")&&h.removeAttribute("href")}const s=Array.from(r.querySelectorAll("img[src]"));if(s.length>32)throw new Error("此页面图片较多,请下载完整文件后查看");const o=s.map(h=>{const m=h.getAttribute("src")??"";if(h.removeAttribute("src"),/^data:image\/(png|jpeg|gif|webp|avif);base64,[a-z\d+/=\s]+$/i.test(m))return h.setAttribute("src",m),null;const g=Xnn(t,m);return g?{image:h,resource:g}:null}).filter(h=>h!==null),l=r.createElement("meta");l.httpEquiv="Content-Security-Policy",l.content="default-src 'none'; img-src data:; style-src 'unsafe-inline'; font-src data:; base-uri 'none'; form-action 'none'",r.head.prepend(l);const c=()=>`${r.documentElement.outerHTML}`;i==null||i(c());let u=0;const d=new Map;async function f({image:h,resource:m}){let g=d.get(m);g||(g=n(m).then(async b=>{if(u+=b.size,u>20*1024*1024)throw new Error("页面图片超过 20 MB,请下载后查看");if(_K(b.type,m)!=="image")throw new Error("HTML 引用的资源不是支持的图片");return Ynn(b)}),d.set(m,g)),h.setAttribute("src",await g)}for(let h=0;h{if(!o||typeof o!="object"||!("path"in o)||typeof o.path!="string"||!("name"in o)||typeof o.name!="string"||!("sizeBytes"in o)||typeof o.sizeBytes!="number"||!Number.isFinite(o.sizeBytes)||o.sizeBytes<0||!("mimeType"in o)||typeof o.mimeType!="string"||o.path.split("/").some(l=>!l||l==="."||l===".."||l.includes("\\")))throw new Error("产物列表包含无效文件信息");return{path:o.path,name:o.name,sizeBytes:o.sizeBytes,mimeType:o.mimeType,updatedAt:"updatedAt"in o&&typeof o.updatedAt=="string"?o.updatedAt:""}});return{available:r.available,items:s,reason:"reason"in r&&typeof r.reason=="string"?r.reason:void 0,nextCursor:"nextCursor"in r&&typeof r.nextCursor=="string"?r.nextCursor:null}}async function r7e(e,t,n,i=!1){var u,d;const r=await i7e(await yn(n7e(e,t,i),{signal:n},hr));if(i)return r.blob();const s=()=>new Error("文件超过 5 MB,请下载后查看");if(Number(r.headers.get("content-length"))>aU)throw await((u=r.body)==null?void 0:u.cancel()),s();const o=(d=r.body)==null?void 0:d.getReader();if(!o)return r.blob();const l=[];let c=0;try{for(;;){const{done:f,value:h}=await o.read();if(f)break;if(c+=h.byteLength,c>aU)throw await o.cancel(),s();l.push(new Uint8Array(h))}}finally{o.releaseLock()}return new Blob(l,{type:r.headers.get("content-type")??"application/octet-stream"})}function Cle(e,t){return JSON.stringify([e,t==null?void 0:t.updatedAt,t==null?void 0:t.sizeBytes,t==null?void 0:t.mimeType])}class tin{constructor(t=32*1024*1024,n=40){Zt(this,"entries",new Map);Zt(this,"bytes",0);this.maxBytes=t,this.maxEntries=n}get(t,n,i){const r=Cle(t,n),s=this.entries.get(r);if(s)return this.entries.delete(r),this.entries.set(r,s),s.promise;const o=new AbortController,l=i(o.signal).then(u=>{if(o.signal.aborted)throw new DOMException("Aborted","AbortError");return this.entries.get(r)===c&&(c.size=u.size,this.bytes+=u.size,this.trim()),u}).catch(u=>{throw this.entries.get(r)===c&&this.remove(r,c),u}),c={path:t,controller:o,promise:l,size:0};return this.entries.set(r,c),this.trim(),l}clear(){for(const t of this.entries.values())t.controller.abort();this.entries.clear(),this.bytes=0}reconcile(t,n){const i=new Map(t.map(r=>[r.path,Cle(r.path,r)]));for(const[r,s]of this.entries){const o=i.get(s.path);(o!==void 0&&o!==r||n&&o===void 0)&&this.remove(r,s)}}removePath(t){for(const[n,i]of this.entries)i.path===t&&this.remove(n,i)}remove(t,n){n.controller.abort(),this.bytes-=n.size,this.entries.delete(t)}trim(){for(;this.bytes>this.maxBytes||this.entries.size>this.maxEntries;){const t=this.entries.entries().next().value;if(!t)break;this.remove(...t)}}}async function nin(e,t,n){const i=u=>{const d=_K(u.mimeType,u.path);return d==="html"?0:d==="image"?1:d==="download"?3:2},r=e.filter(u=>i(u)<3).slice().sort((u,d)=>i(u)-i(d)),s=[];let o=0;for(const u of r){if(s.length===4)break;o+u.sizeBytes>1024*1024||(s.push(u),o+=u.sizeBytes)}let l=0;async function c(){for(;!n.aborted&&l{})}}await Promise.all([c(),c()])}const Ale=3e4;function iin(e,t,n){const[i,r]=p.useState(null),[s,o]=p.useState(!1),[l,c]=p.useState(""),[u,d]=p.useState(0),f=p.useMemo(()=>new tin,[e.runtimeId,e.region,e.appName,e.sessionId]),h=p.useRef(null),m=p.useRef(null),g=p.useRef(null),b=p.useRef(0),v=p.useRef(n),y=p.useRef(!1),w=p.useCallback(O=>{var k;return f.get(O,(k=h.current)==null?void 0:k.items.find(S=>S.path===O),S=>r7e(e,O,S)).catch(S=>{var C;throw S instanceof RE&&(S.status===401||S.status===403)?(f.clear(),(C=g.current)==null||C.abort(),h.current=null,r(null),c(S.message),b.current=0):S instanceof RE&&S.status===404&&f.removePath(O),S})},[f,e.runtimeId,e.region,e.appName,e.sessionId]),x=p.useCallback(async(O,k=!1)=>{var C,E;if(m.current){k&&(y.current=!0);return}const S=new AbortController;m.current=S,o(!0),c("");try{const j=await ein(e,S.signal,O);if(S.signal.aborted)return;const T=h.current,R=O&&T?{...j,items:[...new Map([...T.items,...j.items].map(N=>[N.path,N])).values()]}:j;f.reconcile(R.available?R.items:[],!R.available||R.nextCursor===null);const A=JSON.stringify(T)!==JSON.stringify(R);if(A&&(h.current=R,r(R),d(N=>N+1)),b.current=Date.now(),A&&R.available){(C=g.current)==null||C.abort();const N=new AbortController;g.current=N,nin(R.items,w,N.signal)}}catch(j){S.signal.aborted||(j instanceof RE&&[401,403,404].includes(j.status)&&(f.clear(),(E=g.current)==null||E.abort(),h.current=null,r(null),b.current=0),c(j instanceof Error?j.message:"无法加载会话产物,请重试"))}finally{S.signal.aborted||(m.current=null,o(!1),y.current&&(y.current=!1,x()))}},[f,w,e.runtimeId,e.region,e.appName,e.sessionId]);return p.useEffect(()=>(h.current=null,r(null),b.current=0,x(),()=>{var O,k;(O=m.current)==null||O.abort(),m.current=null,(k=g.current)==null||k.abort(),f.clear(),y.current=!1}),[f,x]),p.useEffect(()=>{v.current&&!n&&x(void 0,!0),v.current=n},[n,x]),p.useEffect(()=>{if(!t)return;const O=()=>{Date.now()-b.current>=Ale&&x()};O();const k=window.setInterval(O,Ale);return()=>window.clearInterval(k)},[t,x]),{listing:i,loading:s,error:l,previewRevision:u,loadPreview:w,refresh:x}}function rin({title:e,actions:t,ref:n,children:i,className:r="",...s}){const o=p.useId();return a.jsxs("article",{"aria-labelledby":o,...s,ref:n,className:`studio-info-card ${r}`.trim(),children:[t!=null?a.jsxs("div",{className:"studio-info-card__header",children:[a.jsx(Tle,{id:o,children:e}),a.jsx("div",{className:"studio-info-card__actions",children:t})]}):a.jsx(Tle,{id:o,children:e}),i]})}function Tle({children:e,className:t="",...n}){return a.jsx("h3",{...n,className:`studio-info-card__title ${t}`.trim(),children:e})}function sin({value:e,description:t,children:n,className:i="",...r}){return a.jsxs("div",{...r,className:`studio-info-card__body ${i}`.trim(),children:[e!=null&&a.jsx("p",{className:"studio-info-card__value",children:e}),t!=null&&a.jsx("p",{className:"studio-info-card__description",children:t}),n]})}function ain({label:e,buttonProps:t,open:n,defaultOpen:i=!1,onOpenChange:r,closeOnConfirm:s=!0,title:o,children:l,onClose:c,onCancel:u,onConfirm:d,...f}){const h=p.useRef(null);return a.jsxs(sv,{open:n,defaultOpen:i,onOpenChange:r,actionsRef:h,modal:!0,children:[a.jsx(TFe,{render:a.jsx(Wi,{...t}),children:e}),a.jsxs(rv,{children:[a.jsx(nv,{className:"studio-modal-button__backdrop"}),a.jsx(iv,{className:"studio-modal-button__popup","aria-modal":"true",render:a.jsx(u9e,{...f,title:a.jsx(yO,{render:a.jsx("span",{}),children:o}),onClose:()=>{var m;c==null||c(),(m=h.current)==null||m.close()},onCancel:()=>{var m;u==null||u(),(m=h.current)==null||m.close()},onConfirm:()=>{var m;d==null||d(),s&&((m=h.current)==null||m.close())},children:l!=null&&a.jsx(yf,{className:"studio-modal-button__body",children:l})})})]})]})}function _le(e){return typeof e=="string"||typeof e=="number"?String(e):void 0}function oin({direction:e}){return a.jsxs("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"m4.5 6 3.5-3.5L11.5 6",opacity:e==="desc"?.3:1}),a.jsx("path",{d:"m4.5 10 3.5 3.5 3.5-3.5",opacity:e==="asc"?.3:1})]})}function lin({columns:e,data:t,rowKey:n,caption:i,emptyContent:r="暂无数据",minWidth:s=640,layout:o="fixed",maxHeight:l,stickyHeader:c=!0,hideScrollbar:u=!0,toolbarStart:d,toolbarEnd:f,"aria-label":h,className:m=""}){const g=p.useRef(null);p.useLayoutEffect(()=>{var k,S;const y=g.current;if(!y||!e.some(C=>C.fixed))return;const w=Array.from(((S=(k=y.tHead)==null?void 0:k.rows[0])==null?void 0:S.cells)??[]);function x(){const C=w.map(T=>T.getBoundingClientRect().width);let E=0,j=0;e.forEach((T,R)=>{T.fixed==="left"&&(y.style.setProperty(`--table-fixed-${R}`,`${E}px`),E+=C[R]??0)});for(let T=e.length-1;T>=0;T--)e[T].fixed==="right"&&(y.style.setProperty(`--table-fixed-${T}`,`${j}px`),j+=C[T]??0)}x();const O=new ResizeObserver(x);return O.observe(y),w.forEach(C=>O.observe(C)),()=>O.disconnect()},[e]);function b(y,w){return{textAlign:y.align??"left",left:y.fixed==="left"?`var(--table-fixed-${w}, 0px)`:void 0,right:y.fixed==="right"?`var(--table-fixed-${w}, 0px)`:void 0}}function v(y,w){var x,O;if(y.fixed==="left"&&((x=e[w+1])==null?void 0:x.fixed)!=="left")return"left";if(y.fixed==="right"&&((O=e[w-1])==null?void 0:O.fixed)!=="right")return"right"}return a.jsxs("div",{className:`studio-table-container ${m}`.trim(),children:[(d!=null||f!=null)&&a.jsxs("div",{className:"studio-table-toolbar",children:[a.jsx("div",{className:"studio-table-toolbar__start",children:d}),a.jsx("div",{className:"studio-table-toolbar__end",children:f})]}),a.jsx(yf,{tabIndex:0,role:"region","aria-label":h??"表格滚动区域",orientation:l!=null?"both":"horizontal",maxHeight:l,hideScrollbar:u,className:"studio-table-scroll",children:a.jsxs("table",{ref:g,className:"studio-table","aria-label":h,"data-sticky-header":c&&l!=null||void 0,style:{minWidth:s,tableLayout:o},children:[i!=null&&a.jsx("caption",{children:i}),a.jsx("colgroup",{children:e.map(y=>a.jsx("col",{style:{width:y.width}},y.key))}),a.jsx("thead",{children:a.jsx("tr",{children:e.map((y,w)=>{const x=y.sort,O=y.filter,k=(x==null?void 0:x.direction)==="asc"?"desc":(x==null?void 0:x.direction)==="desc"?null:"asc",S=_le(y.title)??y.key,C=(x==null?void 0:x["aria-label"])??`${S}:${k==="asc"?"升序排列":k==="desc"?"降序排列":"恢复原顺序"}`;return a.jsx("th",{scope:"col","aria-sort":x?x.direction==="asc"?"ascending":x.direction==="desc"?"descending":"none":void 0,"data-fixed":y.fixed,"data-fixed-boundary":v(y,w),style:b(y,w),children:x||O?a.jsxs("div",{className:"studio-table__header-content","data-align":y.align??"left",children:[a.jsx("span",{className:"studio-table__header-title",children:y.title}),x&&a.jsx(Wi,{variant:"ghost",iconOnly:!0,className:"studio-table__sort-button","data-active":x.direction!=null||void 0,"aria-label":C,title:C,disabled:x.disabled,startIcon:a.jsx(oin,{direction:x.direction}),onClick:()=>x.onChange(k)}),O&&a.jsx(G9e,{className:"studio-table__filter","aria-label":O["aria-label"]??`筛选 ${S}`,value:O.value,options:O.options,disabled:O.disabled,onChange:E=>O.onChange(E.target.value)})]}):y.title},y.key)})})}),a.jsx("tbody",{children:t.length?t.map((y,w)=>a.jsx("tr",{children:e.map((x,O)=>{const k=x.render(y,w);return a.jsx("td",{"data-fixed":x.fixed,"data-fixed-boundary":v(x,O),style:b(x,O),children:a.jsx("div",{className:"studio-table__cell-value","data-overflow":x.overflow??"wrap",title:x.overflow==="ellipsis"?_le(k):void 0,children:k})},x.key)})},n(y))):a.jsx("tr",{children:a.jsx("td",{colSpan:Math.max(1,e.length),className:"studio-table__empty",children:r})})})]})})]})}function cin(){const e=p.useRef(null);return p.useLayoutEffect(()=>{const t=e.current;if(!t)return;const n=()=>{const o=t.querySelector('[aria-selected="true"]');if(!o){delete t.dataset.indicatorReady;return}const l=o.getBoundingClientRect(),c=t.getBoundingClientRect();t.style.setProperty("--tab-indicator-left",`${l.left-c.left}px`),t.style.setProperty("--tab-indicator-width",`${l.width}px`),t.dataset.indicatorReady="true"},i=t.querySelector('[aria-selected="true"]'),r=t.closest(".studio-tabs-scroll");if(i&&r){const o=i.getBoundingClientRect(),l=r.getBoundingClientRect();o.leftl.right&&(r.scrollLeft+=o.right-l.right)}n();const s=new ResizeObserver(n);s.observe(t);for(const o of t.children)s.observe(o);return()=>s.disconnect()}),e}function uin({items:e,value:t,defaultValue:n,onValueChange:i,"aria-label":r,className:s=""}){var b,v;const o=p.useId(),l=cin(),[c,u]=p.useState(n??((b=e[0])==null?void 0:b.value)),d=p.useRef([]),f=t??c,h=e.some(y=>y.value===f)?f:(v=e[0])==null?void 0:v.value;function m(y){t===void 0&&u(y),i==null||i(y)}function g(y,w){var O;let x;switch(y.key){case"ArrowRight":x=(w+1)%e.length;break;case"ArrowLeft":x=(w-1+e.length)%e.length;break;case"Home":x=0;break;case"End":x=e.length-1;break;default:return}y.preventDefault(),m(e[x].value),(O=d.current[x])==null||O.focus()}return a.jsx(yf,{orientation:"horizontal",hideScrollbar:!0,className:"studio-tabs-scroll",children:a.jsx("div",{ref:l,role:"tablist","aria-label":r,className:`studio-underline-tabs ${s}`.trim(),children:e.map((y,w)=>a.jsx("button",{ref:x=>{d.current[w]=x},type:"button",role:"tab",id:y.id??`${o}-${y.value}`,"aria-controls":y.panelId,"aria-selected":y.value===h,tabIndex:y.value===h?0:-1,className:"studio-underline-tabs__tab",onClick:()=>m(y.value),onKeyDown:x=>g(x,w),children:a.jsx("span",{className:"studio-underline-tabs__label",children:y.label})},y.value))})})}let k6,S6,jle=Promise.resolve(),din=0;function fin(){return k6??(k6=Zs(()=>import("../visualizations/echarts/index-CGT341lL.js"),[]).catch(e=>{throw k6=void 0,e})),k6}function hin(){return S6??(S6=Zs(()=>import("../visualizations/mermaid/mermaid.core-BmHujEI0.js").then(e=>e.ay),__vite__mapDeps([0,1])).then(e=>e.default).catch(e=>{throw S6=void 0,e})),S6}function pin(e,t){const n=jle.then(async()=>{if(e.length>5e4)throw new Error("Diagram exceeds the supported size");const i=await hin();return i.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,maxTextSize:5e4,theme:"base",fontFamily:t.font,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","theme","themeVariables","themeCSS","fontFamily"],themeVariables:{darkMode:t.dark,fontFamily:t.font,fontSize:"14px",background:t.panel,primaryColor:t.fill,primaryTextColor:t.text,primaryBorderColor:t.border,secondaryColor:t.panel,secondaryTextColor:t.text,secondaryBorderColor:t.border,tertiaryColor:t.fill,tertiaryTextColor:t.text,tertiaryBorderColor:t.border,lineColor:t.secondary,textColor:t.text,mainBkg:t.fill,nodeBorder:t.border,clusterBkg:t.panel,clusterBorder:t.border,edgeLabelBackground:t.panel,titleColor:t.text,actorBkg:t.fill,actorTextColor:t.text,actorBorder:t.border,actorLineColor:t.border,signalColor:t.secondary,signalTextColor:t.text,noteBkgColor:t.fill,noteTextColor:t.text,noteBorderColor:t.border}}),i.render(`studio-conversation-diagram-${++din}`,e)});return jle=n.then(()=>{},()=>{}),n}function min(e){const[t,n]=p.useState(null);return p.useEffect(()=>{const i=e.current;if(!i)return;const r=window.matchMedia("(prefers-reduced-motion: reduce)");function s(){var d;const l=getComputedStyle(i),c=(f,h)=>l.getPropertyValue(f).trim()||h,u={text:c("--studio-text-primary",l.color),secondary:c("--studio-text-secondary",l.color),tertiary:c("--studio-text-tertiary",l.color),subtle:c("--studio-text-subtle",l.color),border:c("--studio-border-subtle",l.color),panel:c("--studio-bg-panel",l.backgroundColor),fill:c("--studio-bg-secondary",l.backgroundColor),font:c("--studio-font-family-ui",l.fontFamily),dark:((d=i.closest("[data-theme]"))==null?void 0:d.getAttribute("data-theme"))!=="light",reducedMotion:r.matches};n(f=>JSON.stringify(f)===JSON.stringify(u)?f:u)}s();const o=new MutationObserver(s);for(let l=i;l;l=l.parentElement)o.observe(l,{attributes:!0,attributeFilter:["data-theme","class","style"]});return r.addEventListener("change",s),()=>{o.disconnect(),r.removeEventListener("change",s)}},[e]),t}function gin(e){const t={axisLine:{lineStyle:{color:e.border}},axisTick:{lineStyle:{color:e.border}},axisLabel:{color:e.secondary,fontFamily:e.font,fontSize:12},nameTextStyle:{color:e.secondary,fontFamily:e.font,fontSize:12},splitLine:{lineStyle:{color:e.border}},splitArea:{areaStyle:{color:["transparent",e.fill]}}};return{color:[e.text,e.tertiary,e.subtle,e.secondary],backgroundColor:"transparent",textStyle:{color:e.text,fontFamily:e.font,fontSize:12},title:{textStyle:{color:e.text,fontSize:14,fontWeight:400},subtextStyle:{color:e.secondary}},legend:{textStyle:{color:e.secondary,fontFamily:e.font,fontSize:12}},tooltip:{backgroundColor:e.panel,borderColor:e.border,textStyle:{color:e.text,fontFamily:e.font,fontSize:12}},categoryAxis:t,valueAxis:t,timeAxis:t,logAxis:t,radar:{axisLine:t.axisLine,splitLine:t.splitLine,splitArea:t.splitArea,axisName:{color:e.secondary}},line:{symbolSize:5},graph:{color:[e.text,e.tertiary,e.subtle]}}}function s7e({invalid:e=!1}){return a.jsx("div",{role:"alert",className:"studio-conversation-rich-visual__error",children:a.jsx(TK,{title:e?"图表定义无法解析":"图表暂时无法显示",description:"可以切换到源码查看完整内容"})})}function bin({source:e,title:t,theme:n}){const i=p.useRef(null),[r,s]=p.useState("loading");p.useEffect(()=>{let l=!1,c,u;const d=()=>c==null?void 0:c.resize();s("loading");let f;try{f=HMe(e,n.reducedMotion)}catch{s("invalid");return}const h=gin(n);return fin().then(m=>{l||!i.current||(c=m.init(i.current,h,{renderer:"svg"}),c.setOption({...f,color:f.color??h.color,backgroundColor:"transparent",textStyle:{...f.textStyle,...h.textStyle},animation:!n.reducedMotion&&f.animation!==!1,animationDuration:n.reducedMotion?0:240,animationDurationUpdate:n.reducedMotion?0:160},{notMerge:!0}),typeof ResizeObserver<"u"?(u=new ResizeObserver(d),u.observe(i.current)):window.addEventListener("resize",d),s("ready"))}).catch(()=>{c==null||c.dispose(),c=void 0,l||s("error")}),()=>{l=!0,u==null||u.disconnect(),window.removeEventListener("resize",d),c==null||c.dispose()}},[e,n]);const o=r==="invalid"||r==="error";return a.jsxs("div",{className:"studio-conversation-rich-visual__chart","aria-busy":r==="loading",children:[a.jsx("div",{ref:i,className:"studio-conversation-rich-visual__canvas",role:"img","aria-label":t,hidden:o}),r==="loading"&&a.jsx("div",{className:"studio-conversation-rich-visual__loading",children:a.jsx(u0,{size:24,label:"正在渲染图表"})}),o&&a.jsx(s7e,{invalid:r==="invalid"})]})}function iR({kind:e}){return a.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e==="expand"?a.jsx("path",{d:"M6 2.5H2.5V6m7.5-3.5h3.5V6m0 4v3.5H10M6 13.5H2.5V10"}):e==="minus"?a.jsx("path",{d:"M3.5 8h9"}):e==="plus"?a.jsx("path",{d:"M3.5 8h9M8 3.5v9"}):a.jsx(a.Fragment,{children:a.jsx("path",{d:"M3 5.5A5.1 5.1 0 1 1 3 10M3 2.5v3H6"})})})}function yin({source:e,title:t,theme:n}){const i=p.useRef(null),[r,s]=p.useState(null),[o,l]=p.useState(!1),[c,u]=p.useState(1);return p.useEffect(()=>{let d=!1;return s(null),l(!1),pin(e,n).then(f=>{d||s(f)}).catch(()=>{d||l(!0)}),()=>{d=!0}},[e,n]),p.useEffect(()=>{var d;i.current&&((d=r==null?void 0:r.bindFunctions)==null||d.call(r,i.current))},[r]),o?a.jsx(s7e,{invalid:!0}):r?a.jsxs(a.Fragment,{children:[a.jsx(yf,{orientation:"both",maxHeight:440,className:"studio-conversation-rich-visual__diagram-scroll",tabIndex:0,role:"region","aria-label":`${t}图表滚动区域`,children:a.jsx("div",{className:"studio-conversation-rich-visual__diagram-size",style:{width:`${c*100}%`},children:a.jsx("div",{ref:i,className:"studio-conversation-rich-visual__mermaid",role:"img","aria-label":t,dangerouslySetInnerHTML:{__html:r.svg}})})}),a.jsxs("div",{className:"studio-conversation-rich-visual__zoom",role:"group","aria-label":"图表缩放",children:[a.jsx(Wi,{variant:"ghost",iconOnly:!0,size:"compact","aria-label":"缩小图表",disabled:c<=.5,startIcon:a.jsx(iR,{kind:"minus"}),onClick:()=>u(d=>Math.max(.5,d-.25))}),a.jsxs("span",{"aria-live":"polite",children:[Math.round(c*100),"%"]}),a.jsx(Wi,{variant:"ghost",iconOnly:!0,size:"compact","aria-label":"放大图表",disabled:c>=2.5,startIcon:a.jsx(iR,{kind:"plus"}),onClick:()=>u(d=>Math.min(2.5,d+.25))}),a.jsx(Wi,{variant:"ghost",iconOnly:!0,size:"compact","aria-label":"重置图表缩放",startIcon:a.jsx(iR,{kind:"reset"}),onClick:()=>u(1)})]})]}):a.jsx("div",{className:"studio-conversation-rich-visual__placeholder",children:a.jsx(u0,{size:24,label:"正在渲染图表"})})}function a7e({kind:e,source:t,title:n=e==="echarts"?"数据图表":"流程图",streaming:i=!1,expanded:r=!1}){const s=p.useId(),o=p.useRef(null),l=min(o),[c,u]=p.useState("preview"),d=i?"source":c;return a.jsx(rin,{ref:o,title:n,className:"studio-conversation-rich-visual","data-kind":e,"data-expanded":r||void 0,actions:i?a.jsx(u0,{size:24,label:"正在生成图表定义"}):r?void 0:a.jsx(ain,{label:`展开${n}`,title:n,topGlow:!1,closeLabel:"关闭图表","data-theme":l?l.dark?"dark":"light":void 0,className:"studio-conversation-rich-visual__modal",buttonProps:{variant:"ghost",iconOnly:!0,startIcon:a.jsx(iR,{kind:"expand"}),"aria-label":`展开${n}`},children:a.jsx(a7e,{kind:e,source:t,title:n,expanded:!0})}),children:a.jsxs(sin,{className:"studio-conversation-rich-visual__body",children:[!i&&a.jsx(uin,{"aria-label":`${n}展示方式`,value:d,onValueChange:u,items:[{value:"preview",label:"预览",id:`${s}-preview-tab`,panelId:`${s}-preview`},{value:"source",label:"源码",id:`${s}-source-tab`,panelId:`${s}-source`}]}),a.jsx("div",{id:`${s}-${d}`,role:i?void 0:"tabpanel","aria-labelledby":i?void 0:`${s}-${d}-tab`,className:"studio-conversation-rich-visual__panel",children:d==="source"?a.jsx(LL,{title:e==="echarts"?"ECharts option":"Mermaid",language:e==="echarts"?"javascript":"plaintext",lines:t.split(` +`),onKeyDown:O=>{n&&(O.metaKey||O.ctrlKey)&&O.key.toLowerCase()==="s"&&!O.nativeEvent.isComposing&&(O.preventDefault(),l&&w&&!s&&u(y))},actions:n?a.jsx(Wi,{variant:"ghost",iconOnly:!0,startIcon:a.jsx(Vnn,{}),"aria-label":`保存 ${e.name}`,title:l?w?"保存文件":"没有未保存的修改":"未配置保存操作",disabled:!l||!w,loading:s,onClick:()=>u(y)}):void 0,children:n?b||t?a.jsx(p.Suspense,{fallback:x,children:a.jsx(znn,{name:e.name,language:f,value:y,wordWrap:r,onChange:O=>c(O,v)})}):x:void 0}),o?a.jsx("div",{className:"studio-file-explorer__message studio-file-explorer__message--error",role:"alert",children:o}):i&&b&&(m!=null&&m.error)?a.jsx("div",{className:"studio-file-explorer__message",role:"status",children:m.error}):null]})}function e7e(e,t){for(const n of e){if(n.type==="file"&&n.id===t)return n;if(n.type==="folder"){const i=e7e(n.children,t);if(i)return i}}}function t7e(e,t,n=0,i){return e.flatMap((r,s)=>[{entry:r,depth:n,parentId:i,position:s+1,count:e.length},...r.type==="folder"&&t.has(r.id)?t7e(r.children,t,n+1,r.id):[]])}function qnn({entries:e,selectedId:t,defaultSelectedId:n=null,onSelect:i,expandedIds:r,defaultExpandedIds:s=[],onExpandedChange:o,treeLabel:l="文件",allowEdit:c=!1,onEdit:u,onSave:d,autoFormat:f=!0,wordWrap:h=!0,renderPreview:m,height:g,narrowLayout:b="split",className:v="",style:y,...w}){var Y,X,ie;const[x,O]=p.useState(n),[k,S]=p.useState(s),[C,E]=p.useState(null),[j,T]=p.useState(new Map),[R,A]=p.useState(new Set),[N,P]=p.useState(new Map),I=p.useRef(new Set),D=p.useRef(!0);p.useEffect(()=>(D.current=!0,()=>{D.current=!1}),[]);const _=p.useRef(new Map),L=t===void 0?x:t,F=p.useMemo(()=>new Set(r??k),[r,k]),M=p.useMemo(()=>t7e(e,F),[e,F]),V=p.useMemo(()=>e7e(e,L),[e,L]),q=V?J9e(V):"",U=V?j.get(V.id):void 0,J=U&&(U.content!==U.savedContent||q===U.source||q===U.savedContent)?U:void 0,z=((Y=M.find(ee=>ee.entry.id===C))==null?void 0:Y.entry.id)??((X=M.find(ee=>ee.entry.id===L))==null?void 0:X.entry.id)??((ie=M[0])==null?void 0:ie.entry.id);function Z(ee,be){!V||!c||(T(ue=>new Map(ue).set(V.id,{source:q,content:ee,savedContent:(J==null?void 0:J.savedContent)??be})),P(ue=>new Map(ue).set(V.id,void 0)),u==null||u(V.id,ee,V))}async function ne(ee){if(!V||!c||!d||I.current.has(V.id))return;const be=V;I.current.add(be.id),A(new Set(I.current)),P(ue=>new Map(ue).set(be.id,void 0));try{await d(be.id,ee,be),D.current&&T(ue=>{var pe;return new Map(ue).set(be.id,{source:q,content:((pe=ue.get(be.id))==null?void 0:pe.content)??ee,savedContent:ee})})}catch{D.current&&P(ue=>new Map(ue).set(be.id,"保存失败,请重试"))}finally{I.current.delete(be.id),D.current&&A(new Set(I.current))}}function W(ee){const be=new Set(F);be.has(ee)?be.delete(ee):be.add(ee);const ue=[...be];r===void 0&&S(ue),o==null||o(ue)}function G(ee){ee.type==="folder"?W(ee.id):(t===void 0&&O(ee.id),i==null||i(ee.id,ee))}function H(ee){if(!ee)return;E(ee);const be=_.current.get(ee);be==null||be.focus({preventScroll:!0}),be==null||be.scrollIntoView({block:"nearest",inline:"nearest"})}function se(ee,be,ue){var ke,je,Pe,Ee,ze;const{entry:pe}=be;switch(ee.key){case"ArrowDown":ee.preventDefault(),H((ke=M[Math.min(ue+1,M.length-1)])==null?void 0:ke.entry.id);break;case"ArrowUp":ee.preventDefault(),H((je=M[Math.max(ue-1,0)])==null?void 0:je.entry.id);break;case"ArrowRight":ee.preventDefault(),pe.type==="folder"&&(F.has(pe.id)?H((Pe=pe.children[0])==null?void 0:Pe.id):W(pe.id));break;case"ArrowLeft":ee.preventDefault(),pe.type==="folder"&&F.has(pe.id)?W(pe.id):H(be.parentId);break;case"Home":ee.preventDefault(),H((Ee=M[0])==null?void 0:Ee.entry.id);break;case"End":ee.preventDefault(),H((ze=M[M.length-1])==null?void 0:ze.entry.id);break;case"Enter":case" ":ee.preventDefault(),G(pe);break}}return a.jsxs("div",{...w,className:`studio-file-explorer ${v}`.trim(),"data-narrow-layout":b,style:{height:g,...y},children:[a.jsx(yf,{className:"studio-file-explorer__tree-area","aria-label":l,children:a.jsxs("div",{role:"tree","aria-label":l,className:"studio-file-explorer__tree",children:[M.map((ee,be)=>{const{entry:ue}=ee,pe=ue.type==="folder",ke=pe&&F.has(ue.id),je=j.get(ue.id);return a.jsxs("button",{ref:Pe=>{Pe?_.current.set(ue.id,Pe):_.current.delete(ue.id)},type:"button",role:"treeitem",className:"studio-file-explorer__row",style:{"--file-explorer-depth":ee.depth},"aria-level":ee.depth+1,"aria-posinset":ee.position,"aria-setsize":ee.count,"aria-expanded":pe?ke:void 0,"aria-selected":ue.type==="file"?L===ue.id:void 0,tabIndex:z===ue.id?0:-1,title:ue.name,onFocus:()=>E(ue.id),onClick:()=>{E(ue.id),G(ue)},onKeyDown:Pe=>se(Pe,ee,be),children:[a.jsx("span",{className:"studio-file-explorer__guides","aria-hidden":"true",children:Array.from({length:ee.depth},(Pe,Ee)=>a.jsx("span",{style:{left:16+Ee*20}},Ee))}),a.jsx("span",{className:"studio-file-explorer__chevron","data-expanded":ke||void 0,children:pe&&a.jsx(Tnn,{})}),a.jsx("span",{className:"studio-file-explorer__icon",children:pe?a.jsx(_nn,{open:ke}):a.jsx(Inn,{name:ue.name})}),a.jsx("span",{className:"studio-file-explorer__name",children:ue.name}),ue.type==="file"&&je&&je.content!==je.savedContent&&a.jsx("span",{className:"studio-file-explorer__dirty",role:"img","aria-label":"未保存",title:"未保存"})]},ue.id)}),M.length===0&&a.jsx("div",{className:"studio-file-explorer__empty-tree",children:"暂无文件"})]})}),m?m(V):V?a.jsx(Hnn,{file:V,draft:J,allowEdit:c,autoFormat:f,wordWrap:h,saving:R.has(V.id),error:N.get(V.id),canSave:!!d,onEdit:Z,onSave:ee=>{ne(ee)}},V.id):a.jsx("div",{className:"studio-file-explorer__empty-content",children:"选择文件查看内容"})]})}function Wnn(){return a.jsxs("svg",{viewBox:"0 0 40 40",fill:"none",stroke:"currentColor",strokeWidth:"3.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{d:"M3.5 30V11.5A5.5 5.5 0 0 1 9 6h4.5l4 4H27a6 6 0 0 1 6 6v1"}),a.jsx("path",{d:"m3.5 30 6.2-10.8a4.5 4.5 0 0 1 3.9-2.2H35a3 3 0 0 1 2.6 4.5l-5.4 9.3a4.5 4.5 0 0 1-3.9 2.2H7a3.5 3.5 0 0 1-3.5-3Z"})]})}function mA({title:e,description:t,icon:n=a.jsx(Wnn,{}),actions:i,className:r="",...s}){return a.jsxs("div",{...s,className:`studio-empty-state ${r}`.trim(),children:[p.Children.toArray(n).length>0&&a.jsx("div",{className:"studio-empty-state__icon","aria-hidden":"true",children:a.jsx("span",{className:"studio-empty-state__icon-glyph",children:n})}),a.jsxs("div",{className:"studio-empty-state__info",children:[a.jsx("div",{className:"studio-empty-state__title",children:e}),p.Children.toArray(t).length>0&&a.jsx("div",{className:"studio-empty-state__description",children:t})]}),p.Children.toArray(i).length>0&&a.jsx("div",{className:"studio-empty-state__actions",children:i})]})}function Knn(){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",focusable:"false",children:[a.jsx("path",{d:"M19.9898 3.99115C18.4371 2.46996 16.3085 2.41193 15.2251 3.4733L11.5251 7.09827C11.2292 7.38815 10.7543 7.38328 10.4645 7.0874C10.1746 6.79152 10.1795 6.31667 10.4753 6.02679L14.1754 2.40182C16.0113 0.603153 19.0891 1.00883 21.0395 2.91967C22.9927 4.8332 23.4179 7.87522 21.5681 9.68753L18.6609 12.5357C18.365 12.8256 17.8902 12.8208 17.6003 12.5249C17.3104 12.229 17.3153 11.7542 17.6112 11.4643L20.5184 8.61605C21.5878 7.56832 21.5398 5.50967 19.9898 3.99115Z",fill:"currentColor"}),a.jsx("path",{d:"M6.62424 3.58399C6.39448 3.23934 5.92882 3.14621 5.58418 3.37597C5.23953 3.60574 5.1464 4.07139 5.37617 4.41604L7.37617 7.41604C7.60593 7.76068 8.07158 7.85381 8.41623 7.62405C8.76088 7.39429 8.85401 6.92863 8.62424 6.58399L6.62424 3.58399Z",fill:"currentColor"}),a.jsx("path",{d:"M2.23737 7.2885C1.84442 7.15751 1.41968 7.36988 1.28869 7.76284C1.15771 8.1558 1.37008 8.58054 1.76303 8.71152L7.76303 10.7115C8.15599 10.8425 8.58073 10.6301 8.71172 10.2372C8.8427 9.84422 8.63033 9.41949 8.23737 9.2885L2.23737 7.2885Z",fill:"currentColor"}),a.jsx("path",{d:"M6.72775 12.506C7.00721 12.2003 6.98589 11.7259 6.68015 11.4464C6.37441 11.167 5.90001 11.1883 5.62056 11.494L4.3597 12.8735C2.63286 14.7628 3.01004 17.9268 4.86404 19.9552C6.72921 21.9958 9.73449 22.4595 11.5191 20.507L15.5538 16.0926C15.8333 15.7869 15.8119 15.3125 15.5062 15.033C15.2004 14.7536 14.7261 14.7749 14.4466 15.0806L10.4119 19.495C9.41099 20.59 7.44859 20.5596 5.97124 18.9432C4.48273 17.3147 4.4083 15.0437 5.4669 13.8855L6.72775 12.506Z",fill:"currentColor"})]})}function TK({className:e="",...t}){return a.jsx(mA,{...t,icon:a.jsx(Knn,{}),className:`studio-error-state ${e}`.trim()})}function Gnn(e){const t=[],n=new Map;for(const r of e){const s=r.path.split("/");let o=t,l="";for(const c of s.slice(0,-1)){l=l?`${l}/${c}`:c;let u=n.get(l);u||(u={id:`folder:${l}`,name:c,type:"folder",children:[]},n.set(l,u),o.push(u)),o=u.children}o.push({id:r.path,name:r.name,type:"file",content:""})}function i(r){r.sort((s,o)=>s.type===o.type?s.name.localeCompare(o.name):s.type==="folder"?-1:1);for(const s of r)s.type==="folder"&&i(s.children)}return i(t),t}function _K(e,t){const n=e.split(";",1)[0].toLowerCase();return n==="text/html"||/\.html?$/i.test(t)?"html":n==="text/markdown"||/\.(md|markdown)$/i.test(t)?"markdown":/^image\/(png|jpeg|gif|webp|svg\+xml|avif|bmp)$/.test(n)?"image":n.startsWith("text/")||n==="application/json"||/\.(txt|json|csv|yaml|yml|py|js|ts|css|log)$/i.test(t)?"text":"download"}function Xnn(e,t){let n;try{n=decodeURIComponent(t.split(/[?#]/,1)[0])}catch{return null}if(!n||/^[\/\\]/.test(n)||/[:\\\u0000-\u001f]/.test(n))return null;const i=e.split("/").slice(0,-1);for(const r of n.split("/"))if(!(!r||r==="."))if(r===".."){if(i.length===0)return null;i.pop()}else i.push(r);return i.join("/")||null}function Ynn(e){return new Promise((t,n)=>{const i=new FileReader;i.onload=()=>t(String(i.result)),i.onerror=()=>n(new Error("无法读取预览图片")),i.readAsDataURL(e)})}async function Znn(e,t,n,i){const r=new DOMParser().parseFromString(e,"text/html");for(const h of r.querySelectorAll("script,iframe,frame,object,embed,base,link,meta[http-equiv],form"))h.remove();for(const h of r.querySelectorAll("*")){for(const m of Array.from(h.attributes))(/^on/i.test(m.name)||["srcset","srcdoc","action","formaction","ping"].includes(m.name))&&h.removeAttribute(m.name);h.tagName!=="IMG"&&h.removeAttribute("src"),h.hasAttribute("href")&&h.removeAttribute("href")}const s=Array.from(r.querySelectorAll("img[src]"));if(s.length>32)throw new Error("此页面图片较多,请下载完整文件后查看");const o=s.map(h=>{const m=h.getAttribute("src")??"";if(h.removeAttribute("src"),/^data:image\/(png|jpeg|gif|webp|avif);base64,[a-z\d+/=\s]+$/i.test(m))return h.setAttribute("src",m),null;const g=Xnn(t,m);return g?{image:h,resource:g}:null}).filter(h=>h!==null),l=r.createElement("meta");l.httpEquiv="Content-Security-Policy",l.content="default-src 'none'; img-src data:; style-src 'unsafe-inline'; font-src data:; base-uri 'none'; form-action 'none'",r.head.prepend(l);const c=()=>`${r.documentElement.outerHTML}`;i==null||i(c());let u=0;const d=new Map;async function f({image:h,resource:m}){let g=d.get(m);g||(g=n(m).then(async b=>{if(u+=b.size,u>20*1024*1024)throw new Error("页面图片超过 20 MB,请下载后查看");if(_K(b.type,m)!=="image")throw new Error("HTML 引用的资源不是支持的图片");return Ynn(b)}),d.set(m,g)),h.setAttribute("src",await g)}for(let h=0;h{if(!o||typeof o!="object"||!("path"in o)||typeof o.path!="string"||!("name"in o)||typeof o.name!="string"||!("sizeBytes"in o)||typeof o.sizeBytes!="number"||!Number.isFinite(o.sizeBytes)||o.sizeBytes<0||!("mimeType"in o)||typeof o.mimeType!="string"||o.path.split("/").some(l=>!l||l==="."||l===".."||l.includes("\\")))throw new Error("产物列表包含无效文件信息");return{path:o.path,name:o.name,sizeBytes:o.sizeBytes,mimeType:o.mimeType,updatedAt:"updatedAt"in o&&typeof o.updatedAt=="string"?o.updatedAt:""}});return{available:r.available,items:s,reason:"reason"in r&&typeof r.reason=="string"?r.reason:void 0,nextCursor:"nextCursor"in r&&typeof r.nextCursor=="string"?r.nextCursor:null}}async function r7e(e,t,n,i=!1){var u,d;const r=await i7e(await yn(n7e(e,t,i),{signal:n},hr));if(i)return r.blob();const s=()=>new Error("文件超过 5 MB,请下载后查看");if(Number(r.headers.get("content-length"))>aU)throw await((u=r.body)==null?void 0:u.cancel()),s();const o=(d=r.body)==null?void 0:d.getReader();if(!o)return r.blob();const l=[];let c=0;try{for(;;){const{done:f,value:h}=await o.read();if(f)break;if(c+=h.byteLength,c>aU)throw await o.cancel(),s();l.push(new Uint8Array(h))}}finally{o.releaseLock()}return new Blob(l,{type:r.headers.get("content-type")??"application/octet-stream"})}function Cle(e,t){return JSON.stringify([e,t==null?void 0:t.updatedAt,t==null?void 0:t.sizeBytes,t==null?void 0:t.mimeType])}class tin{constructor(t=32*1024*1024,n=40){Zt(this,"entries",new Map);Zt(this,"bytes",0);this.maxBytes=t,this.maxEntries=n}get(t,n,i){const r=Cle(t,n),s=this.entries.get(r);if(s)return this.entries.delete(r),this.entries.set(r,s),s.promise;const o=new AbortController,l=i(o.signal).then(u=>{if(o.signal.aborted)throw new DOMException("Aborted","AbortError");return this.entries.get(r)===c&&(c.size=u.size,this.bytes+=u.size,this.trim()),u}).catch(u=>{throw this.entries.get(r)===c&&this.remove(r,c),u}),c={path:t,controller:o,promise:l,size:0};return this.entries.set(r,c),this.trim(),l}clear(){for(const t of this.entries.values())t.controller.abort();this.entries.clear(),this.bytes=0}reconcile(t,n){const i=new Map(t.map(r=>[r.path,Cle(r.path,r)]));for(const[r,s]of this.entries){const o=i.get(s.path);(o!==void 0&&o!==r||n&&o===void 0)&&this.remove(r,s)}}removePath(t){for(const[n,i]of this.entries)i.path===t&&this.remove(n,i)}remove(t,n){n.controller.abort(),this.bytes-=n.size,this.entries.delete(t)}trim(){for(;this.bytes>this.maxBytes||this.entries.size>this.maxEntries;){const t=this.entries.entries().next().value;if(!t)break;this.remove(...t)}}}async function nin(e,t,n){const i=u=>{const d=_K(u.mimeType,u.path);return d==="html"?0:d==="image"?1:d==="download"?3:2},r=e.filter(u=>i(u)<3).slice().sort((u,d)=>i(u)-i(d)),s=[];let o=0;for(const u of r){if(s.length===4)break;o+u.sizeBytes>1024*1024||(s.push(u),o+=u.sizeBytes)}let l=0;async function c(){for(;!n.aborted&&l{})}}await Promise.all([c(),c()])}const Ale=3e4;function iin(e,t,n){const[i,r]=p.useState(null),[s,o]=p.useState(!1),[l,c]=p.useState(""),[u,d]=p.useState(0),f=p.useMemo(()=>new tin,[e.runtimeId,e.region,e.appName,e.sessionId]),h=p.useRef(null),m=p.useRef(null),g=p.useRef(null),b=p.useRef(0),v=p.useRef(n),y=p.useRef(!1),w=p.useCallback(O=>{var k;return f.get(O,(k=h.current)==null?void 0:k.items.find(S=>S.path===O),S=>r7e(e,O,S)).catch(S=>{var C;throw S instanceof RE&&(S.status===401||S.status===403)?(f.clear(),(C=g.current)==null||C.abort(),h.current=null,r(null),c(S.message),b.current=0):S instanceof RE&&S.status===404&&f.removePath(O),S})},[f,e.runtimeId,e.region,e.appName,e.sessionId]),x=p.useCallback(async(O,k=!1)=>{var C,E;if(m.current){k&&(y.current=!0);return}const S=new AbortController;m.current=S,o(!0),c("");try{const j=await ein(e,S.signal,O);if(S.signal.aborted)return;const T=h.current,R=O&&T?{...j,items:[...new Map([...T.items,...j.items].map(N=>[N.path,N])).values()]}:j;f.reconcile(R.available?R.items:[],!R.available||R.nextCursor===null);const A=JSON.stringify(T)!==JSON.stringify(R);if(A&&(h.current=R,r(R),d(N=>N+1)),b.current=Date.now(),A&&R.available){(C=g.current)==null||C.abort();const N=new AbortController;g.current=N,nin(R.items,w,N.signal)}}catch(j){S.signal.aborted||(j instanceof RE&&[401,403,404].includes(j.status)&&(f.clear(),(E=g.current)==null||E.abort(),h.current=null,r(null),b.current=0),c(j instanceof Error?j.message:"无法加载会话产物,请重试"))}finally{S.signal.aborted||(m.current=null,o(!1),y.current&&(y.current=!1,x()))}},[f,w,e.runtimeId,e.region,e.appName,e.sessionId]);return p.useEffect(()=>(h.current=null,r(null),b.current=0,x(),()=>{var O,k;(O=m.current)==null||O.abort(),m.current=null,(k=g.current)==null||k.abort(),f.clear(),y.current=!1}),[f,x]),p.useEffect(()=>{v.current&&!n&&x(void 0,!0),v.current=n},[n,x]),p.useEffect(()=>{if(!t)return;const O=()=>{Date.now()-b.current>=Ale&&x()};O();const k=window.setInterval(O,Ale);return()=>window.clearInterval(k)},[t,x]),{listing:i,loading:s,error:l,previewRevision:u,loadPreview:w,refresh:x}}function rin({title:e,actions:t,ref:n,children:i,className:r="",...s}){const o=p.useId();return a.jsxs("article",{"aria-labelledby":o,...s,ref:n,className:`studio-info-card ${r}`.trim(),children:[t!=null?a.jsxs("div",{className:"studio-info-card__header",children:[a.jsx(Tle,{id:o,children:e}),a.jsx("div",{className:"studio-info-card__actions",children:t})]}):a.jsx(Tle,{id:o,children:e}),i]})}function Tle({children:e,className:t="",...n}){return a.jsx("h3",{...n,className:`studio-info-card__title ${t}`.trim(),children:e})}function sin({value:e,description:t,children:n,className:i="",...r}){return a.jsxs("div",{...r,className:`studio-info-card__body ${i}`.trim(),children:[e!=null&&a.jsx("p",{className:"studio-info-card__value",children:e}),t!=null&&a.jsx("p",{className:"studio-info-card__description",children:t}),n]})}function ain({label:e,buttonProps:t,open:n,defaultOpen:i=!1,onOpenChange:r,closeOnConfirm:s=!0,title:o,children:l,onClose:c,onCancel:u,onConfirm:d,...f}){const h=p.useRef(null);return a.jsxs(sv,{open:n,defaultOpen:i,onOpenChange:r,actionsRef:h,modal:!0,children:[a.jsx(TFe,{render:a.jsx(Wi,{...t}),children:e}),a.jsxs(rv,{children:[a.jsx(nv,{className:"studio-modal-button__backdrop"}),a.jsx(iv,{className:"studio-modal-button__popup","aria-modal":"true",render:a.jsx(u9e,{...f,title:a.jsx(yO,{render:a.jsx("span",{}),children:o}),onClose:()=>{var m;c==null||c(),(m=h.current)==null||m.close()},onCancel:()=>{var m;u==null||u(),(m=h.current)==null||m.close()},onConfirm:()=>{var m;d==null||d(),s&&((m=h.current)==null||m.close())},children:l!=null&&a.jsx(yf,{className:"studio-modal-button__body",children:l})})})]})]})}function _le(e){return typeof e=="string"||typeof e=="number"?String(e):void 0}function oin({direction:e}){return a.jsxs("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[a.jsx("path",{d:"m4.5 6 3.5-3.5L11.5 6",opacity:e==="desc"?.3:1}),a.jsx("path",{d:"m4.5 10 3.5 3.5 3.5-3.5",opacity:e==="asc"?.3:1})]})}function lin({columns:e,data:t,rowKey:n,caption:i,emptyContent:r="暂无数据",minWidth:s=640,layout:o="fixed",maxHeight:l,stickyHeader:c=!0,hideScrollbar:u=!0,toolbarStart:d,toolbarEnd:f,"aria-label":h,className:m=""}){const g=p.useRef(null);p.useLayoutEffect(()=>{var k,S;const y=g.current;if(!y||!e.some(C=>C.fixed))return;const w=Array.from(((S=(k=y.tHead)==null?void 0:k.rows[0])==null?void 0:S.cells)??[]);function x(){const C=w.map(T=>T.getBoundingClientRect().width);let E=0,j=0;e.forEach((T,R)=>{T.fixed==="left"&&(y.style.setProperty(`--table-fixed-${R}`,`${E}px`),E+=C[R]??0)});for(let T=e.length-1;T>=0;T--)e[T].fixed==="right"&&(y.style.setProperty(`--table-fixed-${T}`,`${j}px`),j+=C[T]??0)}x();const O=new ResizeObserver(x);return O.observe(y),w.forEach(C=>O.observe(C)),()=>O.disconnect()},[e]);function b(y,w){return{textAlign:y.align??"left",left:y.fixed==="left"?`var(--table-fixed-${w}, 0px)`:void 0,right:y.fixed==="right"?`var(--table-fixed-${w}, 0px)`:void 0}}function v(y,w){var x,O;if(y.fixed==="left"&&((x=e[w+1])==null?void 0:x.fixed)!=="left")return"left";if(y.fixed==="right"&&((O=e[w-1])==null?void 0:O.fixed)!=="right")return"right"}return a.jsxs("div",{className:`studio-table-container ${m}`.trim(),children:[(d!=null||f!=null)&&a.jsxs("div",{className:"studio-table-toolbar",children:[a.jsx("div",{className:"studio-table-toolbar__start",children:d}),a.jsx("div",{className:"studio-table-toolbar__end",children:f})]}),a.jsx(yf,{tabIndex:0,role:"region","aria-label":h??"表格滚动区域",orientation:l!=null?"both":"horizontal",maxHeight:l,hideScrollbar:u,className:"studio-table-scroll",children:a.jsxs("table",{ref:g,className:"studio-table","aria-label":h,"data-sticky-header":c&&l!=null||void 0,style:{minWidth:s,tableLayout:o},children:[i!=null&&a.jsx("caption",{children:i}),a.jsx("colgroup",{children:e.map(y=>a.jsx("col",{style:{width:y.width}},y.key))}),a.jsx("thead",{children:a.jsx("tr",{children:e.map((y,w)=>{const x=y.sort,O=y.filter,k=(x==null?void 0:x.direction)==="asc"?"desc":(x==null?void 0:x.direction)==="desc"?null:"asc",S=_le(y.title)??y.key,C=(x==null?void 0:x["aria-label"])??`${S}:${k==="asc"?"升序排列":k==="desc"?"降序排列":"恢复原顺序"}`;return a.jsx("th",{scope:"col","aria-sort":x?x.direction==="asc"?"ascending":x.direction==="desc"?"descending":"none":void 0,"data-fixed":y.fixed,"data-fixed-boundary":v(y,w),style:b(y,w),children:x||O?a.jsxs("div",{className:"studio-table__header-content","data-align":y.align??"left",children:[a.jsx("span",{className:"studio-table__header-title",children:y.title}),x&&a.jsx(Wi,{variant:"ghost",iconOnly:!0,className:"studio-table__sort-button","data-active":x.direction!=null||void 0,"aria-label":C,title:C,disabled:x.disabled,startIcon:a.jsx(oin,{direction:x.direction}),onClick:()=>x.onChange(k)}),O&&a.jsx(G9e,{className:"studio-table__filter","aria-label":O["aria-label"]??`筛选 ${S}`,value:O.value,options:O.options,disabled:O.disabled,onChange:E=>O.onChange(E.target.value)})]}):y.title},y.key)})})}),a.jsx("tbody",{children:t.length?t.map((y,w)=>a.jsx("tr",{children:e.map((x,O)=>{const k=x.render(y,w);return a.jsx("td",{"data-fixed":x.fixed,"data-fixed-boundary":v(x,O),style:b(x,O),children:a.jsx("div",{className:"studio-table__cell-value","data-overflow":x.overflow??"wrap",title:x.overflow==="ellipsis"?_le(k):void 0,children:k})},x.key)})},n(y))):a.jsx("tr",{children:a.jsx("td",{colSpan:Math.max(1,e.length),className:"studio-table__empty",children:r})})})]})})]})}function cin(){const e=p.useRef(null);return p.useLayoutEffect(()=>{const t=e.current;if(!t)return;const n=()=>{const o=t.querySelector('[aria-selected="true"]');if(!o){delete t.dataset.indicatorReady;return}const l=o.getBoundingClientRect(),c=t.getBoundingClientRect();t.style.setProperty("--tab-indicator-left",`${l.left-c.left}px`),t.style.setProperty("--tab-indicator-width",`${l.width}px`),t.dataset.indicatorReady="true"},i=t.querySelector('[aria-selected="true"]'),r=t.closest(".studio-tabs-scroll");if(i&&r){const o=i.getBoundingClientRect(),l=r.getBoundingClientRect();o.leftl.right&&(r.scrollLeft+=o.right-l.right)}n();const s=new ResizeObserver(n);s.observe(t);for(const o of t.children)s.observe(o);return()=>s.disconnect()}),e}function uin({items:e,value:t,defaultValue:n,onValueChange:i,"aria-label":r,className:s=""}){var b,v;const o=p.useId(),l=cin(),[c,u]=p.useState(n??((b=e[0])==null?void 0:b.value)),d=p.useRef([]),f=t??c,h=e.some(y=>y.value===f)?f:(v=e[0])==null?void 0:v.value;function m(y){t===void 0&&u(y),i==null||i(y)}function g(y,w){var O;let x;switch(y.key){case"ArrowRight":x=(w+1)%e.length;break;case"ArrowLeft":x=(w-1+e.length)%e.length;break;case"Home":x=0;break;case"End":x=e.length-1;break;default:return}y.preventDefault(),m(e[x].value),(O=d.current[x])==null||O.focus()}return a.jsx(yf,{orientation:"horizontal",hideScrollbar:!0,className:"studio-tabs-scroll",children:a.jsx("div",{ref:l,role:"tablist","aria-label":r,className:`studio-underline-tabs ${s}`.trim(),children:e.map((y,w)=>a.jsx("button",{ref:x=>{d.current[w]=x},type:"button",role:"tab",id:y.id??`${o}-${y.value}`,"aria-controls":y.panelId,"aria-selected":y.value===h,tabIndex:y.value===h?0:-1,className:"studio-underline-tabs__tab",onClick:()=>m(y.value),onKeyDown:x=>g(x,w),children:a.jsx("span",{className:"studio-underline-tabs__label",children:y.label})},y.value))})})}let k6,S6,jle=Promise.resolve(),din=0;function fin(){return k6??(k6=Zs(()=>import("../visualizations/echarts/index-CGT341lL.js"),[]).catch(e=>{throw k6=void 0,e})),k6}function hin(){return S6??(S6=Zs(()=>import("../visualizations/mermaid/mermaid.core-l-gs7P2Q.js").then(e=>e.ay),__vite__mapDeps([0,1])).then(e=>e.default).catch(e=>{throw S6=void 0,e})),S6}function pin(e,t){const n=jle.then(async()=>{if(e.length>5e4)throw new Error("Diagram exceeds the supported size");const i=await hin();return i.initialize({startOnLoad:!1,securityLevel:"strict",suppressErrorRendering:!0,maxTextSize:5e4,theme:"base",fontFamily:t.font,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","theme","themeVariables","themeCSS","fontFamily"],themeVariables:{darkMode:t.dark,fontFamily:t.font,fontSize:"14px",background:t.panel,primaryColor:t.fill,primaryTextColor:t.text,primaryBorderColor:t.border,secondaryColor:t.panel,secondaryTextColor:t.text,secondaryBorderColor:t.border,tertiaryColor:t.fill,tertiaryTextColor:t.text,tertiaryBorderColor:t.border,lineColor:t.secondary,textColor:t.text,mainBkg:t.fill,nodeBorder:t.border,clusterBkg:t.panel,clusterBorder:t.border,edgeLabelBackground:t.panel,titleColor:t.text,actorBkg:t.fill,actorTextColor:t.text,actorBorder:t.border,actorLineColor:t.border,signalColor:t.secondary,signalTextColor:t.text,noteBkgColor:t.fill,noteTextColor:t.text,noteBorderColor:t.border}}),i.render(`studio-conversation-diagram-${++din}`,e)});return jle=n.then(()=>{},()=>{}),n}function min(e){const[t,n]=p.useState(null);return p.useEffect(()=>{const i=e.current;if(!i)return;const r=window.matchMedia("(prefers-reduced-motion: reduce)");function s(){var d;const l=getComputedStyle(i),c=(f,h)=>l.getPropertyValue(f).trim()||h,u={text:c("--studio-text-primary",l.color),secondary:c("--studio-text-secondary",l.color),tertiary:c("--studio-text-tertiary",l.color),subtle:c("--studio-text-subtle",l.color),border:c("--studio-border-subtle",l.color),panel:c("--studio-bg-panel",l.backgroundColor),fill:c("--studio-bg-secondary",l.backgroundColor),font:c("--studio-font-family-ui",l.fontFamily),dark:((d=i.closest("[data-theme]"))==null?void 0:d.getAttribute("data-theme"))!=="light",reducedMotion:r.matches};n(f=>JSON.stringify(f)===JSON.stringify(u)?f:u)}s();const o=new MutationObserver(s);for(let l=i;l;l=l.parentElement)o.observe(l,{attributes:!0,attributeFilter:["data-theme","class","style"]});return r.addEventListener("change",s),()=>{o.disconnect(),r.removeEventListener("change",s)}},[e]),t}function gin(e){const t={axisLine:{lineStyle:{color:e.border}},axisTick:{lineStyle:{color:e.border}},axisLabel:{color:e.secondary,fontFamily:e.font,fontSize:12},nameTextStyle:{color:e.secondary,fontFamily:e.font,fontSize:12},splitLine:{lineStyle:{color:e.border}},splitArea:{areaStyle:{color:["transparent",e.fill]}}};return{color:[e.text,e.tertiary,e.subtle,e.secondary],backgroundColor:"transparent",textStyle:{color:e.text,fontFamily:e.font,fontSize:12},title:{textStyle:{color:e.text,fontSize:14,fontWeight:400},subtextStyle:{color:e.secondary}},legend:{textStyle:{color:e.secondary,fontFamily:e.font,fontSize:12}},tooltip:{backgroundColor:e.panel,borderColor:e.border,textStyle:{color:e.text,fontFamily:e.font,fontSize:12}},categoryAxis:t,valueAxis:t,timeAxis:t,logAxis:t,radar:{axisLine:t.axisLine,splitLine:t.splitLine,splitArea:t.splitArea,axisName:{color:e.secondary}},line:{symbolSize:5},graph:{color:[e.text,e.tertiary,e.subtle]}}}function s7e({invalid:e=!1}){return a.jsx("div",{role:"alert",className:"studio-conversation-rich-visual__error",children:a.jsx(TK,{title:e?"图表定义无法解析":"图表暂时无法显示",description:"可以切换到源码查看完整内容"})})}function bin({source:e,title:t,theme:n}){const i=p.useRef(null),[r,s]=p.useState("loading");p.useEffect(()=>{let l=!1,c,u;const d=()=>c==null?void 0:c.resize();s("loading");let f;try{f=HMe(e,n.reducedMotion)}catch{s("invalid");return}const h=gin(n);return fin().then(m=>{l||!i.current||(c=m.init(i.current,h,{renderer:"svg"}),c.setOption({...f,color:f.color??h.color,backgroundColor:"transparent",textStyle:{...f.textStyle,...h.textStyle},animation:!n.reducedMotion&&f.animation!==!1,animationDuration:n.reducedMotion?0:240,animationDurationUpdate:n.reducedMotion?0:160},{notMerge:!0}),typeof ResizeObserver<"u"?(u=new ResizeObserver(d),u.observe(i.current)):window.addEventListener("resize",d),s("ready"))}).catch(()=>{c==null||c.dispose(),c=void 0,l||s("error")}),()=>{l=!0,u==null||u.disconnect(),window.removeEventListener("resize",d),c==null||c.dispose()}},[e,n]);const o=r==="invalid"||r==="error";return a.jsxs("div",{className:"studio-conversation-rich-visual__chart","aria-busy":r==="loading",children:[a.jsx("div",{ref:i,className:"studio-conversation-rich-visual__canvas",role:"img","aria-label":t,hidden:o}),r==="loading"&&a.jsx("div",{className:"studio-conversation-rich-visual__loading",children:a.jsx(u0,{size:24,label:"正在渲染图表"})}),o&&a.jsx(s7e,{invalid:r==="invalid"})]})}function iR({kind:e}){return a.jsx("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e==="expand"?a.jsx("path",{d:"M6 2.5H2.5V6m7.5-3.5h3.5V6m0 4v3.5H10M6 13.5H2.5V10"}):e==="minus"?a.jsx("path",{d:"M3.5 8h9"}):e==="plus"?a.jsx("path",{d:"M3.5 8h9M8 3.5v9"}):a.jsx(a.Fragment,{children:a.jsx("path",{d:"M3 5.5A5.1 5.1 0 1 1 3 10M3 2.5v3H6"})})})}function yin({source:e,title:t,theme:n}){const i=p.useRef(null),[r,s]=p.useState(null),[o,l]=p.useState(!1),[c,u]=p.useState(1);return p.useEffect(()=>{let d=!1;return s(null),l(!1),pin(e,n).then(f=>{d||s(f)}).catch(()=>{d||l(!0)}),()=>{d=!0}},[e,n]),p.useEffect(()=>{var d;i.current&&((d=r==null?void 0:r.bindFunctions)==null||d.call(r,i.current))},[r]),o?a.jsx(s7e,{invalid:!0}):r?a.jsxs(a.Fragment,{children:[a.jsx(yf,{orientation:"both",maxHeight:440,className:"studio-conversation-rich-visual__diagram-scroll",tabIndex:0,role:"region","aria-label":`${t}图表滚动区域`,children:a.jsx("div",{className:"studio-conversation-rich-visual__diagram-size",style:{width:`${c*100}%`},children:a.jsx("div",{ref:i,className:"studio-conversation-rich-visual__mermaid",role:"img","aria-label":t,dangerouslySetInnerHTML:{__html:r.svg}})})}),a.jsxs("div",{className:"studio-conversation-rich-visual__zoom",role:"group","aria-label":"图表缩放",children:[a.jsx(Wi,{variant:"ghost",iconOnly:!0,size:"compact","aria-label":"缩小图表",disabled:c<=.5,startIcon:a.jsx(iR,{kind:"minus"}),onClick:()=>u(d=>Math.max(.5,d-.25))}),a.jsxs("span",{"aria-live":"polite",children:[Math.round(c*100),"%"]}),a.jsx(Wi,{variant:"ghost",iconOnly:!0,size:"compact","aria-label":"放大图表",disabled:c>=2.5,startIcon:a.jsx(iR,{kind:"plus"}),onClick:()=>u(d=>Math.min(2.5,d+.25))}),a.jsx(Wi,{variant:"ghost",iconOnly:!0,size:"compact","aria-label":"重置图表缩放",startIcon:a.jsx(iR,{kind:"reset"}),onClick:()=>u(1)})]})]}):a.jsx("div",{className:"studio-conversation-rich-visual__placeholder",children:a.jsx(u0,{size:24,label:"正在渲染图表"})})}function a7e({kind:e,source:t,title:n=e==="echarts"?"数据图表":"流程图",streaming:i=!1,expanded:r=!1}){const s=p.useId(),o=p.useRef(null),l=min(o),[c,u]=p.useState("preview"),d=i?"source":c;return a.jsx(rin,{ref:o,title:n,className:"studio-conversation-rich-visual","data-kind":e,"data-expanded":r||void 0,actions:i?a.jsx(u0,{size:24,label:"正在生成图表定义"}):r?void 0:a.jsx(ain,{label:`展开${n}`,title:n,topGlow:!1,closeLabel:"关闭图表","data-theme":l?l.dark?"dark":"light":void 0,className:"studio-conversation-rich-visual__modal",buttonProps:{variant:"ghost",iconOnly:!0,startIcon:a.jsx(iR,{kind:"expand"}),"aria-label":`展开${n}`},children:a.jsx(a7e,{kind:e,source:t,title:n,expanded:!0})}),children:a.jsxs(sin,{className:"studio-conversation-rich-visual__body",children:[!i&&a.jsx(uin,{"aria-label":`${n}展示方式`,value:d,onValueChange:u,items:[{value:"preview",label:"预览",id:`${s}-preview-tab`,panelId:`${s}-preview`},{value:"source",label:"源码",id:`${s}-source-tab`,panelId:`${s}-source`}]}),a.jsx("div",{id:`${s}-${d}`,role:i?void 0:"tabpanel","aria-labelledby":i?void 0:`${s}-${d}-tab`,className:"studio-conversation-rich-visual__panel",children:d==="source"?a.jsx(LL,{title:e==="echarts"?"ECharts option":"Mermaid",language:e==="echarts"?"javascript":"plaintext",lines:t.split(` `),scrollAreaProps:{orientation:"both",maxHeight:r?600:320}}):l?e==="echarts"?a.jsx(bin,{source:t,title:n,theme:l}):a.jsx(yin,{source:t,title:n,theme:l}):a.jsx("div",{className:"studio-conversation-rich-visual__placeholder",children:a.jsx(u0,{size:24,label:"正在渲染图表"})})})]})})}const vin=p.memo(function(t){return a.jsx(a7e,{...t})});function px(e){return p.Children.toArray(e).filter(p.isValidElement)}function xin({children:e}){const t=px(e),n=t.find(l=>l.type==="thead"),i=t.find(l=>l.type==="tbody"),r=n?px(n.props.children)[0]:void 0,s=r?px(r.props.children):[],o=i?px(i.props.children).map((l,c)=>({id:c,cells:px(l.props.children).map(u=>u.props.children)})):[];return a.jsx(lin,{"aria-label":"回复中的表格",className:"studio-conversation-rich-markdown__table",columns:s.map((l,c)=>{var u;return{key:String(c),title:l.props.children,align:(u=l.props.style)==null?void 0:u.textAlign,render:d=>d.cells[c]}}),data:o,rowKey:l=>l.id,layout:"auto",minWidth:Math.max(320,s.length*112),maxHeight:360,hideScrollbar:!1})}function win(e){var r,s;const t=e.trimEnd().split(` `),n=(r=t[0])==null?void 0:r.match(/^\s{0,3}(`{3,}|~{3,})/);if(!n||t.length<2)return!1;const i=(s=t[t.length-1])==null?void 0:s.trim();return new RegExp(`^${n[1][0]}{${n[1].length},}$`).test(i)}const Oin=p.memo(function({text:t,streaming:n=!1}){const i=p.useMemo(()=>[bDe],[]);return a.jsx("div",{className:"studio-conversation-rich-markdown","data-streaming":n||void 0,children:a.jsx(qPe,{remarkPlugins:i,skipHtml:!0,components:{pre({children:r,node:s}){var d,f,h,m,g;const o=px(r)[0],l=typeof(o==null?void 0:o.props.children)=="string"?o.props.children.replace(/\n$/,""):String((o==null?void 0:o.props.children)??""),c=((h=(f=(d=o==null?void 0:o.props.className)==null?void 0:d.match(/language-([^\s]+)/))==null?void 0:f[1])==null?void 0:h.toLowerCase())??"plaintext",u=qMe(c);if(u){const b=(m=s==null?void 0:s.position)==null?void 0:m.start.offset,v=(g=s==null?void 0:s.position)==null?void 0:g.end.offset,y=n&&(b==null||v==null||!win(t.slice(b,v)));return a.jsx(vin,{kind:u,source:l,streaming:y})}return a.jsx(LL,{title:c==="plaintext"?"代码":c,language:c,lines:l.split(` `),scrollAreaProps:{orientation:"both",maxHeight:360}})},table:xin,a({children:r,href:s,title:o}){const l=s?/^https?:\/\//i.test(s):!1;return a.jsx("a",{href:s,title:o,target:l?"_blank":void 0,rel:l?"noopener noreferrer":void 0,children:r})},img({src:r,alt:s,title:o}){return a.jsx("img",{src:r,alt:s??"",title:o,loading:"lazy"})}},children:t})})});function kin(e){return a.jsxs("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M3.5 7.5V6A2 2 0 0 1 5.5 4h4l2 3h7A2 2 0 0 1 20.5 9v9a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2V7.5Z"}),a.jsx("path",{d:"M8 12h8M8 16h5"})]})}function Sin(){return a.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"M19 8a8 8 0 1 0 .6 7M19 4v4h-4"})})}function Ein(){return a.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"M12 3v12m-4-4 4 4 4-4M4 16v4h16v-4"})})}function Cin({scope:e,file:t,loadPreview:n}){const[i,r]=p.useState(null),[s,o]=p.useState(""),[l,c]=p.useState(""),[u,d]=p.useState(!1),[f,h]=p.useState(0),[m,g]=p.useState(!1),[b,v]=p.useState(""),[y,w]=p.useState(1),x=p.useRef(null),O=p.useRef(new Map),k=t?_K(t.mimeType,t.path):"download",S=!!(t&&t.sizeBytes>aU);p.useEffect(()=>{if(!t||k==="download"||S)return;const E=new AbortController;let j;r(null),o(""),c(""),d(!1);let T=!1;return n(t.path).then(async R=>{if(!E.signal.aborted)if(k==="image")j=URL.createObjectURL(R),E.signal.aborted?URL.revokeObjectURL(j):r({url:j});else{const A=await R.text();if(E.signal.aborted)return;const N=k==="html"?await Znn(A,t.path,P=>{if(E.signal.aborted)throw new DOMException("Aborted","AbortError");return n(P)},P=>{T=!0,E.signal.aborted||(r({text:P}),d(!0))}):A;E.signal.aborted||(r({text:N}),d(!1))}}).catch(R=>{if(!E.signal.aborted){const A=R instanceof Error?R.message:"无法加载文件,请重试";T?c(A):o(A),d(!1)}}),()=>{E.abort(),j&&URL.revokeObjectURL(j)}},[n,t==null?void 0:t.path,t==null?void 0:t.updatedAt,k,S,f]),p.useEffect(()=>{w(1)},[t==null?void 0:t.path]),p.useEffect(()=>()=>{var E;(E=x.current)==null||E.abort();for(const[j,T]of O.current)clearTimeout(j),URL.revokeObjectURL(T);O.current.clear()},[]);async function C(){if(!t||m)return;const E=new AbortController;x.current=E,g(!0),v("");try{const j=await r7e(e,t.path,E.signal,!0);if(E.signal.aborted)return;const T=URL.createObjectURL(j),R=document.createElement("a");R.href=T,R.download=t.name,document.body.append(R),R.click(),R.remove();const A=window.setTimeout(()=>{URL.revokeObjectURL(T),O.current.delete(A)},1e3);O.current.set(A,T)}catch(j){E.signal.aborted||v(j instanceof Error?j.message:"下载失败,请重试")}finally{E.signal.aborted||g(!1)}}return t?a.jsxs("section",{className:"runtime-artifact-preview","aria-label":`${t.name} 预览`,children:[a.jsxs("header",{className:"runtime-artifact-preview__header",children:[a.jsxs("div",{className:"runtime-artifact-preview__identity",children:[a.jsx("span",{title:t.path,children:t.path}),a.jsx("small",{children:Jnn(t.sizeBytes)})]}),a.jsx(Wi,{variant:"ghost",loading:m,startIcon:a.jsx(Ein,{}),onClick:()=>void C(),children:"下载"})]}),b&&a.jsx("div",{className:"runtime-artifact-preview__error",role:"alert",children:b}),u&&a.jsx("div",{className:"runtime-artifact-preview__resource-status",role:"status",children:a.jsx(fn,{children:"正在加载图片"})}),l&&a.jsxs("div",{className:"runtime-artifact-preview__error",role:"alert",children:["图片暂未加载:",l," ",a.jsx(Wi,{variant:"ghost",onClick:()=>h(E=>E+1),children:"重试图片"})]}),S||k==="download"?a.jsx("div",{className:"runtime-artifact-preview__empty",children:a.jsx(mA,{title:S?"文件较大":"此格式暂不支持预览",description:S?"超过 5 MB 的文件请下载后查看":"下载文件后使用对应应用打开"})}):s?a.jsxs("div",{className:"runtime-artifact-preview__empty",children:[a.jsx(TK,{title:"预览加载失败",description:s}),a.jsx(Wi,{variant:"outline",onClick:()=>h(E=>E+1),children:"重试"})]}):i?k==="html"?a.jsx("iframe",{className:"runtime-artifact-preview__html",title:`${t.name} HTML 预览`,sandbox:"",referrerPolicy:"no-referrer",srcDoc:i.text}):k==="image"?a.jsxs(a.Fragment,{children:[a.jsx(yf,{orientation:"both",className:"runtime-artifact-preview__image-scroll",tabIndex:0,"aria-label":"图片预览滚动区域",children:a.jsx("img",{className:"runtime-artifact-preview__image",src:i.url,alt:t.name,style:{width:`${y*100}%`,maxWidth:y===1?"100%":"none"},onError:()=>o("无法显示此图片,请下载后查看")})}),a.jsxs("div",{className:"runtime-artifact-preview__zoom",role:"group","aria-label":"图片缩放",children:[a.jsx(Wi,{variant:"ghost",disabled:y<=.5,onClick:()=>w(E=>Math.max(.5,E-.25)),children:"缩小"}),a.jsxs("span",{children:[Math.round(y*100),"%"]}),a.jsx(Wi,{variant:"ghost",disabled:y>=3,onClick:()=>w(E=>Math.min(3,E+.25)),children:"放大"}),a.jsx(Wi,{variant:"ghost",onClick:()=>w(1),children:"适应宽度"})]})]}):a.jsx(yf,{className:"runtime-artifact-preview__document",tabIndex:0,"aria-label":"文件预览内容",children:k==="markdown"?a.jsx(Oin,{text:i.text??""}):a.jsx(LL,{title:t.name,language:t.path.endsWith(".json")?"json":"plaintext",lines:(i.text??"").split(` @@ -1109,7 +1109,7 @@ ${t}`}function ksn(e,t){if(e.length<=t)return{text:e,omitted:!1};let n=e.slice(- `).length:0,truncated:!1,updatedAt:Date.now(),pendingMessage:oi==="running"?H("projectPreview.task.waitingGithubLog"):void 0},$n},Be=()=>{if(!(ai!=="build"||!(gn!=null&&gn.text)))return gn={...gn,status:"error",updatedAt:Date.now()},gn},at=sn=>ai==="build"&&(gn!=null&&gn.text)?Fy(gn.text,{preserveEnd:!0}):Fy(sn),ct=(sn,oi,Vt=0,fi="info")=>{var sr;const Un={level:fi,phase:sn,message:oi,pct:Vt};ai=sn,is=oi,re=void 0,rr.current&&(wt(Hn=>({...Hn,[sn]:Un})),tn(sn)),k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:Vn,region:bi,startedAt:pn,status:"running",phase:sn,label:((sr=Ms.find(Hn=>Hn.phase===sn))==null?void 0:sr.label)??sn,message:oi,pct:Vt,githubDelivery:!!(It||$n),mpaProfile:Nr,mpaSmoke:Nr&&!ie,...$n?{githubLog:$n}:{},...st("complete")})};try{let sn=Et;if(g&&(Et!=null&&Et.pipelineId)){ai="github";const Un=de(H("projectPreview.task.syncingGithub")),sr={level:"info",phase:"github",message:H("projectPreview.task.syncingGithub"),pct:0};rr.current&&(wt(gr=>({...gr,github:sr})),tn("github")),k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:Vn,region:bi,startedAt:pn,status:"running",phase:"github",label:H("projectPreview.task.syncGithubCode"),message:sr.message,pct:0,githubDelivery:!0,githubLog:Un});const Hn=await s2e({runtimeId:g,project:e,agentCategory:Mo?"mpa":"general"});if(sn=Hn,rr.current&&(At(Hn),wt(gr=>({...gr,github:{level:"success",phase:"github",message:H("projectPreview.task.githubSynced"),pct:100}})),tn(null)),($t=Hn.cicd)!=null&&$t.enabled){k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:g,region:q,startedAt:pn,status:"success",phase:"github",label:H("projectPreview.task.githubSubmitted"),message:H("projectPreview.task.githubUpdatingRuntime"),pct:100,githubDelivery:!0,githubLog:de(H("projectPreview.task.githubUpdatingRuntime"),"complete")});return}}const oi=await c(e,Un=>{var Hn;Un.runtimeName&&(wn=Un.runtimeName);const sr=_sn(ai,Un.phase);Un.buildLog?gn=Ssn(gn,Un.buildLog):Un.phase==="build"&&!gn&&(gn=Fe()),Un.phase===sr&&(is=Un.message,re=Un.messageCode),ai=sr,rr.current&&(wt(gr=>({...gr,[Un.phase]:Un})),tn(ai)),k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:g,region:q,startedAt:pn,status:"running",phase:ai,label:((Hn=Ms.find(gr=>gr.phase===ai))==null?void 0:Hn.label)??ai,message:is,messageCode:re,pct:Un.pct,mpaProfile:Nr,mpaSmoke:Nr&&!ie,...gn?{buildLog:gn}:{}})},{taskId:lt,runtimeName:Ln,sessionStorage:be?"in-memory":"persistent",minInstance:mr.min,maxInstance:mr.max,agentCategory:Mo?"mpa":"general",...ie?{}:{authentication:ti==="user_pool"?{type:"user_pool",userPoolUid:Zr}:{type:"api_key"}},createEvaluationSets:ws,...j?{im:{feishu:{enabled:!0}}}:{},envs:Re,...ie?{}:{resources:rt}});Vn=oi.runtimeId||g,bi=oi.region||q;let Vt=oi;if(La=Vt.mpaInstanceId||b,Nr&&!Vn)throw new Error(H("projectPreview.errors.mpaRuntimeIdMissing"));if(!g&&It&&Vt.runtimeId){ai="github";const Un=de(H("projectPreview.task.initializingGithub")),sr={level:"info",phase:"github",message:H("projectPreview.task.initializingGithubBranch"),pct:0};rr.current&&(wt(Hn=>({...Hn,github:sr})),tn("github")),k==null||k({id:lt,agentName:Vt.agentName||Lt,runtimeName:Vt.runtimeName||wn,runtimeId:Vt.runtimeId,region:Vt.region||q,startedAt:pn,status:"running",phase:"github",label:H("projectPreview.task.mountGithubDelivery"),message:sr.message,pct:0,githubDelivery:!0,githubLog:Un});try{const Hn=await n2e({project:e,githubUrl:It.githubUrl,githubToken:It.githubToken,baseBranch:It.baseBranch,runtimeName:Vt.agentName||wn,runtimeId:Vt.runtimeId,region:Vt.region||q,agentCategory:Mo?"mpa":"general",cloudProvider:It.cloudProvider,projectPath:".",volcengineAccessKey:It.volcengineAccessKey,volcengineSecretKey:It.volcengineSecretKey,volcengineSessionToken:It.volcengineSessionToken});sn=Hn,rr.current&&(At(Hn),Gt(null),wt(gr=>({...gr,github:{level:"success",phase:"github",message:H("projectPreview.task.githubBranchInitialized"),pct:100}})),tn(null)),k==null||k({id:lt,agentName:Vt.agentName||Lt,runtimeName:Vt.runtimeName||wn,runtimeId:Vt.runtimeId,region:Vt.region||q,startedAt:pn,status:"running",phase:"github",label:H("projectPreview.task.githubDeliveryMounted"),message:H("projectPreview.task.githubBranchInitialized"),pct:100,githubDelivery:!0,githubLog:de(H("projectPreview.task.githubBranchInitialized"),"complete")})}catch(Hn){const gr=de(H("projectPreview.task.githubMountFailedDetail",{message:Hn instanceof Error?Hn.message:String(Hn)}),"error");throw k==null||k({id:lt,agentName:Vt.agentName||Lt,runtimeName:Vt.runtimeName||wn,runtimeId:Vt.runtimeId,region:Vt.region||q,startedAt:pn,status:"error",phase:"github",label:H("projectPreview.task.githubMountFailed"),message:H("projectPreview.task.githubMountFailedHint"),pct:100,githubDelivery:!0,githubLog:gr}),new Error(H("projectPreview.errors.deployedButGithubMountFailed",{message:Hn instanceof Error?Hn.message:String(Hn)}))}}else if(!g&&(sn!=null&&sn.pipelineId)&&Vt.runtimeId)try{const Un=await Lz({pipelineId:sn.pipelineId,runtimeId:Vt.runtimeId,region:Vt.region||q,cloudProvider:sn.cloudProvider??V});sn=Un,rr.current&&At(Un)}catch(Un){rr.current&&nt(H("projectPreview.errors.deployedButGithubBindFailed",{message:Un instanceof Error?Un.message:String(Un)}))}let fi;if(Nr&&i&&(Vt.runtimeId||g)){const Un=String(Vt.runtimeId||g||""),sr=Vt.region||q;if(Vn=Un,bi=sr,wn=Vt.runtimeName||wn,ct("profile_applying",H("projectPreview.task.applyingMpaProfile")),fi=await eI({operationKind:ie?"update":"create",runtimeId:Un,region:sr,mpaInstanceId:b??Vt.mpaInstanceId,agentName:Lt,sourceDraftId:Wt.draftId,draft:i,runtimeName:Ln||Un,runtimeRevision:ie?y:void 0,taskId:lt}),fi.status!=="succeeded"){const Hn=fi.stage==="smoke_running"?"smoke_running":"profile_applying",gr=fi.safeErrorCode||H("projectPreview.errors.mpaOperationIncomplete");if(ct(Hn,gr,100,"error"),fi.status==="failed_retryable"){const ks=fi.operationId,zi={operationKind:ie?"update":"create",runtimeId:Un,region:sr,mpaInstanceId:b??Vt.mpaInstanceId??Un,sourceProfileId:(kn=Wt.draftId)!=null&&kn.trim()?`studio-draft:${Wt.draftId.trim()}`:`studio-agent:${Lt}:${lt}`,draft:i,targetKey:ie?b??Un:`runtime:${sr}:${Ln||Un}`,runtimeRevision:ie?y:void 0};oe=async()=>{const wr=await Nz(ks,zi);if(k==null||k({...Wt,runtimeName:Vt.runtimeName||wn,runtimeId:Un,mpaInstanceId:zi.mpaInstanceId,region:sr,status:wr.status==="succeeded"?"success":"error",phase:wr.stage,label:wr.status==="succeeded"?H("projectPreview.task.deploymentComplete"):H("projectPreview.task.deploymentFailed"),message:wr.safeErrorCode||void 0,pct:100,mpaProfile:!0,mpaSmoke:!ie,operationId:wr.operationId}),wr.status!=="succeeded")throw new Error(wr.safeErrorCode||H("projectPreview.errors.mpaOperationIncomplete"));await(d==null?void 0:d({...Vt,mpaOperation:wr}))}}throw new Error(gr)}ie?ct("profile_applying",H("projectPreview.task.mpaProfileApplied"),100,"success"):(ct("smoke_running",H("projectPreview.task.runningMpaSmoke"),100,"success"),ct("runnable",H("projectPreview.task.mpaReady"),100,"success")),Vt={...Vt,mpaOperation:fi}}rr.current&&(ft(Vt),tn(null)),jn.succeed({runtimeId:String(Vt.runtimeId||g||"")}),k==null||k({id:lt,agentName:Vt.agentName||Lt,runtimeName:Vt.runtimeName||wn,runtimeId:Vn,mpaInstanceId:Vt.mpaInstanceId,region:bi,startedAt:pn,status:"success",phase:fi&&!ie?"runnable":"complete",label:H("projectPreview.task.deploymentComplete"),message:fi&&!ie?H("projectPreview.task.mpaReady"):(Ti=Vt.warnings)==null?void 0:Ti.join(H("environmentCenter.listSeparator")),githubDelivery:!!(It||$n),mpaProfile:!!fi,mpaSmoke:!!(fi&&!ie),...$n?{githubLog:$n}:{},...st("complete")});try{await(d==null?void 0:d(Vt))}catch(Un){if(!(Un instanceof Oa))throw Un;k==null||k({id:lt,agentName:Vt.agentName||Lt,runtimeName:Vt.runtimeName||wn,runtimeId:Vn,region:bi,startedAt:pn,status:"success",phase:"complete",label:H("projectPreview.task.deployedNotConnected"),message:Un.message,mpaProfile:!!fi,mpaSmoke:!!(fi&&!ie),...st("complete")})}}catch(sn){const oi=sn instanceof Error?sn.message:String(sn);if(sn instanceof DOMException&&sn.name==="AbortError"){jn.fail({failedPhase:I6(ai),...Xo(sn,{phase:ai}),errorMessage:Fy(sn)}),rr.current&&(nt(null),tn(null)),k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:Vn,mpaInstanceId:La,region:bi,startedAt:pn,status:"cancelled",label:H("projectPreview.task.cancelled"),message:H("projectPreview.task.cancelledHint"),mpaProfile:ai==="profile_applying"||ai==="smoke_running",mpaSmoke:ai==="smoke_running",...st("complete")});return}if(zAe(sn)){rr.current&&(nt(null),ft(null),Ne(!0)),jn.fail({failedPhase:I6(ai),...Xo(sn,{phase:ai}),errorMessage:Fy(sn)}),k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:Vn,mpaInstanceId:La,region:bi,startedAt:pn,status:"running",statusUnconfirmed:!0,phase:ai,label:H("projectPreview.task.deploymentStatusUnconfirmed"),message:H("projectPreview.errors.deploymentStatusUnconfirmed"),mpaProfile:!!i,mpaSmoke:!!(i&&!ie),...gn?{buildLog:gn}:{}});return}rr.current&&nt(oi),rr.current&&ft(null);const fi=Be();jn.fail({failedPhase:I6(ai),...Xo(sn,{phase:ai}),errorMessage:at(sn)});const Un=!!fi,sr=ai==="github"&&!!$n;k==null||k({id:lt,agentName:Lt,runtimeName:wn,runtimeId:Vn,region:bi,startedAt:pn,status:"error",phase:ai,label:H("projectPreview.task.deploymentFailed"),message:Un?H("projectPreview.task.buildFailedHint"):sr?H("projectPreview.task.githubMountFailedHint"):oi,...fi?{buildLog:fi}:st("complete"),...sr?{githubDelivery:!0,githubLog:$n}:{},mpaProfile:ai==="profile_applying"||ai==="smoke_running",mpaSmoke:ai==="smoke_running",retry:oe??rn})}finally{rr.current&&tt(!1)}}function Os(){Nt(!1)}async function ts(){if(!(!et||Qt)){cn(!0),nt(null);try{const{addConnection:Re,addRuntimeConnection:lt,remoteAppId:Lt,loadConnections:Ln}=await Zs(async()=>{const{addConnection:jn,addRuntimeConnection:Wt,remoteAppId:gn,loadConnections:$n}=await Promise.resolve().then(()=>fae);return{addConnection:jn,addRuntimeConnection:Wt,remoteAppId:gn,loadConnections:$n}},void 0),{probeRuntimeApps:wn}=await Zs(async()=>{const{probeRuntimeApps:jn}=await Promise.resolve().then(()=>$tt);return{probeRuntimeApps:jn}},void 0);let pn;if(et.runtimeId){const jn=et.region??q,Wt=await wn(et.runtimeId,jn,{retryProbe:!0})??[];pn=lt(et.runtimeId,et.runtimeName,jn,Wt,Wt.length>0?{[Wt[0]]:et.agentName}:void 0,et.version)}else pn=await Re(et.agentName,et.url,et.apikey,"");if(pn.apps.length===0)nt(H("projectPreview.errors.noAgentAtEndpoint"));else{const jn={[pn.apps[0]]:et.agentName},Wt={...pn,appLabels:{...pn.appLabels??{},...jn}},$n=Ln().map(is=>is.id===pn.id?Wt:is);localStorage.setItem("veadk_agentkit_connections",JSON.stringify($n));const{registerConnections:ai}=await Zs(async()=>{const{registerConnections:is}=await Promise.resolve().then(()=>fae);return{registerConnections:is}},void 0);if(ai($n),u){const is=Lt(pn.id,pn.apps[0]);await u(is,et.agentName)}else alert(H("projectPreview.agentAdded",{name:et.agentName}))}}catch(Re){nt(H("projectPreview.errors.addAgent",{message:Re instanceof Error?Re.message:String(Re)}))}finally{cn(!1)}}}function ns(){const Re=$o(),lt=W9e({agentId:Re.agentId,deployAction:Re.deployAction,deploySource:Re.deploySource,createMode:Re.createMode,aiAssisted:Re.aiAssisted});try{const Lt=P7e(e.files),Ln=URL.createObjectURL(Lt),wn=document.createElement("a");wn.href=Ln,wn.download=`${e.name||"project"}.zip`,document.body.appendChild(wn),wn.click(),document.body.removeChild(wn),URL.revokeObjectURL(Ln),lt.succeed({fileCount:e.files.length,zipSizeBytes:Lt.size})}catch(Lt){throw lt.fail({fileCount:e.files.length,...Xo(Lt)}),Lt}}const $d=a.jsxs("div",{className:`pp-artifact-actions${t?" is-rail":""}`,"aria-label":H("projectPreview.artifactActions"),children:[ne&&a.jsxs("button",{type:"button",className:"pp-secondary",onClick:ne,children:[a.jsx(Rat,{className:"pp-ic"}),H("projectPreview.exportYaml")]}),X&&l&&a.jsx(Fjt,{project:e,onChange:l,className:"pp-artifact-source",label:H("projectPreview.viewSource")}),e.files.length>0&&a.jsxs("button",{type:"button",className:"pp-secondary",onClick:ns,children:[a.jsx(tM,{className:"pp-ic"}),H("projectPreview.downloadSource")]})]});function Fl(Re,lt,Lt){return Vsn(Re,lt===0).map(Ln=>{const wn=Lt?`${Lt}/${Ln.name}`:Ln.name,pn=Ln.path!==void 0,jn={paddingLeft:8+lt*14};if(pn){const gn=Ln.path===we;return a.jsxs("button",{type:"button",className:`pp-row pp-file${gn?" pp-active":""}`,style:jn,onClick:()=>Ae(Ln.path),title:Ln.path,children:[a.jsx(Dat,{className:"pp-ic"}),a.jsx("span",{className:"pp-label",children:Ln.name})]},wn)}const Wt=He.has(wn);return a.jsxs("div",{children:[a.jsxs("button",{type:"button",className:"pp-row pp-folder",style:jn,onClick:()=>Bo(wn),children:[a.jsx(HA,{className:`pp-ic pp-chevron${Wt?"":" pp-open"}`}),a.jsx(Lat,{className:"pp-ic"}),a.jsx("span",{className:"pp-label",children:Ln.name})]}),!Wt&&Fl(Ln,lt+1,wn)]},wn)})}return a.jsxs("div",{className:`pp-root${c?" is-deploy":""}${t?" is-embedded":""}${W?" has-primary-pane":""}`,children:[c&&!t&&a.jsx(qsn,{left:a.jsxs("div",{className:"pp-toolbar-left",children:[z&&a.jsxs("button",{type:"button",className:"pp-toolbar-back",onClick:z,children:[a.jsx(Dje,{className:"pp-ic"}),Y]}),a.jsxs("span",{className:"pp-toolbar-title",children:[H("projectPreview.deployTitle",{name:r||e.name||H("projectPreview.unnamedAgent")}),s&&s>1?H("projectPreview.additionalAgentCount",{count:s}):""]})]}),right:null}),a.jsxs("div",{className:"pp-body",children:[c&&!W&&a.jsx("section",{className:"pp-release-overview","aria-label":H("projectPreview.releaseOverview"),children:a.jsxs("div",{className:`pp-release-preview${t?" is-embedded":""}`,children:[a.jsxs("div",{className:"pp-flow-thumbnail",children:[i&&a.jsx(IP,{draft:i,direction:"horizontal",selectedPath:[],onSelect:Um,onAdd:Um,onInsert:Um,onDelete:Um,readOnly:!0,interactivePreview:!0}),a.jsx("button",{type:"button",className:"pp-flow-expand",onClick:()=>xn(!0),"aria-label":H("projectPreview.expandFlow"),title:H("projectPreview.expand"),children:a.jsx(iE,{"aria-hidden":!0})})]}),t&&$d,!t&&a.jsxs("div",{className:"pp-release-info",children:[a.jsx("div",{className:"pp-release-card-head",children:H("projectPreview.agentOverview")}),a.jsxs("div",{className:"pp-release-info-body",children:[a.jsxs("div",{className:"pp-release-info-main",children:[a.jsx("h2",{children:r||e.name||H("projectPreview.unnamedAgent")}),(i==null?void 0:i.description)&&a.jsx("p",{className:"pp-release-description",title:i.description,children:i.description}),a.jsxs("dl",{className:"pp-release-facts",children:[a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.agentCount")}),a.jsx("dd",{children:s??1})]}),o&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.model")}),a.jsx("dd",{children:o.modelName})]}),a.jsxs("div",{children:[a.jsx("dt",{children:H("common.description")}),a.jsx("dd",{className:"pp-release-fact-long",children:o.description})]}),a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.systemPrompt")}),a.jsx("dd",{className:"pp-release-fact-long pp-release-prompt",children:o.instruction})]}),a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.optimizations")}),a.jsx("dd",{children:o.optimizations.length>0?o.optimizations.join(H("environmentCenter.listSeparator")):H("projectPreview.notEnabled")})]}),o.effectiveOptimizations&&o.effectiveOptimizations.length>0&&a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.effectiveCapabilities")}),a.jsx("dd",{children:o.effectiveOptimizations.join(H("environmentCenter.listSeparator"))})]}),o.autoAddedOptimizations&&o.autoAddedOptimizations.length>0&&a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.automaticProtection")}),a.jsx("dd",{children:o.autoAddedOptimizations.join(H("environmentCenter.listSeparator"))})]}),o.planHash&&a.jsxs("div",{children:[a.jsx("dt",{children:H("projectPreview.planHash")}),a.jsx("dd",{className:"pp-release-fact-long",children:o.planHash})]})]})]})]}),$d]})]})]})}),a.jsxs("div",{className:"pp-files-area",children:[a.jsxs("div",{className:"pp-sidebar",children:[a.jsxs("div",{className:"pp-sidebar-head",children:[a.jsx("span",{className:"pp-project-name",title:e.name,children:H("projectPreview.files.preview")}),X&&a.jsx("button",{type:"button",className:"pp-icon-btn",title:H("projectPreview.files.new"),onClick:()=>{Pt(!0),Ct("")},children:a.jsx(Iat,{className:"pp-ic"})})]}),a.jsxs("div",{className:"pp-tree",children:[jt&&a.jsx("input",{className:"pp-new-input",autoFocus:!0,placeholder:"path/to/file.py",value:Kt,onChange:Re=>Ct(Re.target.value),onBlur:Md,onKeyDown:Re=>{Re.key==="Enter"&&Md(),Re.key==="Escape"&&(Pt(!1),Ct(""))}}),e.files.length===0&&!jt?a.jsx("div",{className:"pp-empty",children:H("projectPreview.files.empty")}):Fl(na,0,"")]})]}),a.jsxs("div",{className:"pp-main",children:[a.jsxs("div",{className:"pp-main-head",children:[a.jsx("span",{className:"pp-path",title:gi==null?void 0:gi.path,children:(gi==null?void 0:gi.path)??H("projectPreview.files.noneSelected")}),a.jsx("div",{className:"pp-actions",children:X&&gi&&a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"pp-icon-btn",title:H("projectPreview.files.rename"),onClick:yo,children:a.jsx(qat,{className:"pp-ic"})}),a.jsx("button",{type:"button",className:"pp-icon-btn pp-danger",title:H("common.delete"),onClick:Ld,children:a.jsx(Jg,{className:"pp-ic"})})]})})]}),a.jsx("div",{className:"pp-content",children:gi==null?a.jsx("div",{className:"pp-placeholder",children:H("projectPreview.files.selectToView")}):X?a.jsx("div",{className:"pp-codemirror",children:a.jsx(p.Suspense,{fallback:a.jsx("div",{className:"pp-editor-loading",children:H("projectPreview.files.loadingEditor")}),children:a.jsx(jsn,{value:gi.content,path:gi.path,onChange:Dd})})}):a.jsx("pre",{className:"pp-pre hljs",dangerouslySetInnerHTML:{__html:$sn(gi.content,gi.path)}})})]})]}),c&&a.jsxs("aside",{className:"pp-config","aria-label":H("projectPreview.deploymentConfiguration"),children:[a.jsx("div",{className:"pp-config-head",children:a.jsx("div",{className:"pp-config-title",children:H("projectPreview.deploymentConfiguration")})}),a.jsxs("div",{className:"pp-config-scroll",children:[W,!W&&a.jsxs("section",{className:"pp-config-section",children:[a.jsx("label",{className:"pp-config-label",htmlFor:Hs,children:H("projectPreview.runtimeName")}),a.jsxs("div",{className:"pp-runtime-name-field",children:[a.jsx("input",{id:Hs,className:"pp-runtime-name-input",value:Pe,disabled:xt||ae||ie,maxLength:64,autoComplete:"off","aria-label":H("projectPreview.runtimeName"),"aria-invalid":!!We,"aria-describedby":`${qs}${We?` ${Dr}`:""}`,onChange:Re=>{const lt=Re.currentTarget.value;_e(null),nt(null),x?x(lt):je(lt)}}),a.jsx("p",{id:qs,className:"pp-config-note",children:H(ie?"projectPreview.runtimeNamePreserved":"projectPreview.runtimeNameHint")}),We&&a.jsx("p",{id:Dr,className:"pp-runtime-name-error",role:"alert",children:We})]})]}),!W&&a.jsxs("section",{className:"pp-config-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.releaseRegion")}),gl(!1)]}),!W&&a.jsxs(a.Fragment,{children:[a.jsxs("section",{className:"pp-config-section pp-auth-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.accessAuthentication")}),ie?a.jsx("p",{className:"pp-config-note pp-auth-preserved-note",children:H("projectPreview.authenticationPreserved")}):a.jsxs("div",{className:"pp-auth-fields",children:[a.jsxs("label",{children:[a.jsx("span",{children:H("projectPreview.authenticationMethod")}),a.jsx(vf,{ariaLabel:H("projectPreview.authenticationAriaLabel"),value:ti,placeholder:H("projectPreview.authenticationPlaceholder"),options:Dsn(H),disabled:xt,onChange:Re=>{nt(null),Si(Re)}})]}),ti==="user_pool"&&a.jsxs("label",{children:[a.jsx("span",{children:H("projectPreview.userPool.label")}),a.jsx(Psn,{value:Zr,disabled:xt,onChange:Re=>{nt(null),Jr(Re)}})]})]})]}),S&&a.jsx(Tsn,{project:e,region:q,cloudProvider:V,runtimeId:g,agentCategory:Mo?"mpa":"general",binding:Et,showSetup:!ie,onPendingCicdChange:Gt,onBindingChange:Ma,disabled:xt||Ke||G||!!n})]}),!W&&C&&a.jsxs("section",{className:"pp-config-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.messageChannels")}),a.jsx(vsn,{enabled:j,updating:Ke,disabled:xt||ae||!T||!L,agentName:r||e.name,appId:D.FEISHU_APP_ID??"",appSecret:D.FEISHU_APP_SECRET??"",appIdConfigured:ee.has("FEISHU_APP_ID"),appSecretConfigured:ee.has("FEISHU_APP_SECRET"),onToggle:Ls,onCredentialsChange:(Re,lt)=>{L==null||L(Re,lt)}})]}),!ie&&a.jsxs("section",{className:"pp-config-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.instanceSettings")}),a.jsxs("div",{className:"pp-instance-fields",children:[a.jsxs("label",{htmlFor:"runtime-min-instance",children:[a.jsx("span",{children:H("projectPreview.minInstances")}),a.jsx("input",{id:"runtime-min-instance",type:"number",min:"0",step:"1",inputMode:"numeric",value:us,disabled:xt||ye,"aria-invalid":!mr.valid,onChange:Re=>he(Re.currentTarget.value)})]}),a.jsxs("label",{htmlFor:"runtime-max-instance",children:[a.jsx("span",{children:H("projectPreview.maxInstances")}),a.jsx("input",{id:"runtime-max-instance",type:"number",min:"1",step:"1",inputMode:"numeric",value:pr,disabled:xt||ye,"aria-invalid":!mr.valid,onChange:Re=>bo(Re.currentTarget.value)})]})]}),(be||ye)&&a.jsx("p",{className:"pp-instance-note",role:"note",children:H(ye?"projectPreview.sidecarSingleInstance":"projectPreview.inMemorySingleInstance")}),!mr.valid&&a.jsx("p",{className:"pp-instance-error",role:"alert",children:mr.error})]}),a.jsxs("section",{className:"pp-config-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.network")}),W&&gl(!0),ie&&a.jsx("p",{className:"pp-config-note",children:H("projectPreview.networkPreserved")}),a.jsxs("div",{className:"pp-network-layout",children:[a.jsx("div",{className:"pp-network-modes",role:"radiogroup","aria-label":H("projectPreview.networkMode"),children:["public","private","both"].map(Re=>a.jsxs("label",{className:"pp-network-option",children:[a.jsx("input",{type:"radio",name:"deployment-network-mode",value:Re,checked:Dl===Re,onChange:()=>Qu(Re),disabled:xt||ie||!M}),a.jsx("span",{children:Re==="public"?H("projectPreview.networkModes.public"):Re==="private"?"VPC":H("projectPreview.networkModes.both")})]},Re))}),Dl!=="public"&&a.jsxs("div",{className:"pp-network-fields",children:[a.jsxs("label",{children:[a.jsx("span",{children:"VPC ID"}),a.jsx("input",{value:(F==null?void 0:F.vpcId)??"",placeholder:"vpc-xxxxxxxx",disabled:xt||ie,onChange:Re=>xl({vpcId:Re.target.value})})]}),a.jsxs("label",{children:[a.jsxs("span",{children:[H("projectPreview.subnetId")," ",a.jsx("small",{children:H("projectPreview.subnetHint")})]}),a.jsx("input",{value:(F==null?void 0:F.subnetIds)??"",placeholder:"subnet-xxx, subnet-yyy",disabled:xt||ie,onChange:Re=>xl({subnetIds:Re.target.value})})]}),a.jsxs("label",{className:"pp-network-check",children:[a.jsx("input",{type:"checkbox",checked:!!(F!=null&&F.enableSharedInternetAccess),disabled:xt||ie,onChange:Re=>xl({enableSharedInternetAccess:Re.target.checked})}),H("projectPreview.sharedInternetAccess")]})]})]})]}),no&&a.jsxs("section",{className:"pp-config-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.evaluationSets")}),a.jsxs("label",{className:"pp-evaluation-set-option",children:[a.jsx("input",{type:"checkbox",checked:to,disabled:xt,onChange:Re=>fl(Re.currentTarget.checked)}),a.jsxs("span",{children:[a.jsx("strong",{children:H("projectPreview.createEvaluationSets")}),a.jsx("small",{children:H("projectPreview.createEvaluationSetsHint")})]})]})]}),!ie&&a.jsxs("section",{className:"pp-config-section pp-resource-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.resourceConfiguration")}),a.jsx(E9e,{value:rt,agentName:r||e.name||"agentkit-app",runtimeName:Pe,region:q,disabled:xt,validationError:Qe,onChange:Re=>{zt(Re),bt(null)}})]}),a.jsxs("section",{className:"pp-config-section pp-env-section",children:[a.jsx("div",{className:"pp-env-head",children:a.jsxs("div",{children:[a.jsxs("div",{className:"pp-config-label",children:[H("projectPreview.environmentVariables"),a.jsx("span",{className:"pp-agent-child-count pp-env-count",children:H("projectPreview.itemCount",{count:Fo})})]}),a.jsx("div",{className:"pp-env-sub",children:H("projectPreview.environmentVariablesHint")})]})}),a.jsxs("button",{type:"button",className:"pp-env-add",onClick:Da,disabled:xt,children:[a.jsx(ic,{className:"pp-ic"}),H("projectPreview.addVariable")]}),(bl.length>0||N.length>0||Me.length>0)&&a.jsxs("div",{className:"pp-env-table",children:[bl.length>0&&a.jsxs("div",{className:"pp-env-group",children:[a.jsxs("div",{className:"pp-env-group-head",children:[a.jsx("span",{children:H("projectPreview.componentGenerated")}),a.jsx("small",{children:H("projectPreview.itemCount",{count:bl.length})})]}),bl.map(Re=>{const lt=Re.readOnly||Re.key.startsWith("ENABLE_"),Lt=Re.serverManaged&&Re.key==="MODEL_AGENT_API_KEY",Ln=Lt?yl?Pa.value:H("projectPreview.injectedByApiKey"):Re.value,wn=IK(Re,D),pn=zn[Re.key],jn=`deployment-env-${Re.key.toLowerCase()}-error`,Wt=ece(Re)||Re.help||Re.comment,gn=Re.multiline||Re.format==="json";return a.jsxs("div",{className:`pp-env-row pp-env-row-derived${gn?" is-multiline":""}`,children:[a.jsxs("div",{className:"pp-env-key-fixed pp-env-key-cell","aria-label":H("projectPreview.envNameAriaLabel",{key:Re.key}),"aria-disabled":xt,children:[a.jsx("span",{title:Re.key,children:Re.key}),Wt&&a.jsxs("span",{className:"pp-env-help",tabIndex:0,"data-help":Wt,"aria-label":H("projectPreview.envDescriptionAriaLabel",{key:Re.key,description:Wt}),children:["?",a.jsx("span",{className:"pp-env-help-popover",role:"tooltip",children:Wt})]}),Re.link&&a.jsx("a",{className:"pp-env-link",href:Re.link.url,target:"_blank",rel:"noopener noreferrer",title:H("projectPreview.openOpenViking",{label:Re.link.label}),"aria-label":H("projectPreview.openOpenVikingAriaLabel",{key:Re.key,label:Re.link.label}),children:a.jsx(p0,{"aria-hidden":"true"})})]}),a.jsxs("div",{className:"pp-env-value-wrap",children:[gn?a.jsx("textarea",{ref:$n=>{$n?di.current.set(Re.key,$n):di.current.delete(Re.key)},className:"pp-env-value pp-env-json-value",value:Re.value,placeholder:Re.placeholder||(Re.required?H("projectPreview.requiredEmpty"):H("projectPreview.optionalEmpty")),readOnly:lt,disabled:xt||!lt&&!_,autoComplete:"off",spellCheck:!1,"aria-invalid":!!(pn||wn),"aria-describedby":pn?jn:void 0,"aria-label":H("projectPreview.envValueAriaLabel",{key:Re.key}),onChange:$n=>{const ai=$n.currentTarget.value;_==null||_(Re.key,ai),pn&&ai.trim()&&(Uo(Re.key),nt(null))}}):a.jsxs("div",{className:Lt?"pp-env-secret-control":void 0,children:[a.jsx("input",{ref:$n=>{$n?di.current.set(Re.key,$n):di.current.delete(Re.key)},className:"pp-env-value",type:Lt?"text":Re.secret?"password":"text",value:Ln,placeholder:Re.placeholder||(Re.required?H("projectPreview.requiredEmpty"):H("projectPreview.optionalEmpty")),readOnly:lt,disabled:xt||!lt&&!_,autoComplete:Re.secret?"new-password":"off",spellCheck:Re.secret?!1:void 0,"aria-invalid":!!(pn||wn),"aria-describedby":pn?jn:void 0,"aria-label":H("projectPreview.envValueAriaLabel",{key:Re.key}),onChange:$n=>{const ai=$n.currentTarget.value;_==null||_(Re.key,ai),pn&&ai.trim()&&(Uo(Re.key),nt(null))}}),Lt&&a.jsx("button",{type:"button",className:"pp-env-secret-toggle","aria-label":Uu,title:Uu,"aria-pressed":yl,disabled:Pa.status==="loading"||!Ye,onClick:()=>{yl?zr():ds()},children:Pa.status==="loading"?a.jsx(Fi,{className:"pp-env-secret-spinner","aria-hidden":"true"}):yl?a.jsx(Rsn,{}):a.jsx(Nsn,{})})]}),pn&&a.jsx("span",{id:jn,className:"pp-env-error",role:"alert",children:pn}),wn&&a.jsx("span",{className:"pp-env-error",children:wn}),Lt&&Pa.status==="error"&&a.jsx("span",{className:"pp-env-reveal-error",role:"alert",children:Pa.error})]}),a.jsx("span",{className:"pp-env-source",children:H(lt?"projectPreview.automatic":"projectPreview.synced")})]},Re.key)})]}),N.length>0&&a.jsxs("div",{className:"pp-env-group",children:[a.jsxs("div",{className:"pp-env-group-head",children:[a.jsx("span",{children:H("projectPreview.customModelCredentials")}),a.jsx("small",{children:H("projectPreview.itemCount",{count:N.length})})]}),N.map(Re=>{const lt=Bn===Re.key,Lt=`${Re.key.toLowerCase()}-error`,Ln=ei[Re.key]??"",wn=ee.has(Re.key);return a.jsxs("div",{className:"pp-env-row pp-env-row-derived",children:[a.jsx("label",{className:"pp-env-key-fixed pp-env-key-cell",htmlFor:Re.key,title:Re.label,children:a.jsx("span",{children:Re.key})}),a.jsxs("div",{className:"pp-env-value-wrap",children:[a.jsx("input",{id:Re.key,className:"pp-env-value",type:"password",value:Ln,placeholder:wn&&!Ln?"••••••":H("projectPreview.releaseOnlySecret"),disabled:xt,autoComplete:"new-password",spellCheck:!1,"aria-invalid":lt,"aria-describedby":lt?Lt:void 0,"aria-label":Re.label,onChange:pn=>{const jn=pn.currentTarget.value;I?I(Re.key,jn):Mn(Wt=>({...Wt,[Re.key]:jn})),lt&&jn.trim()&&(ki(null),nt(null))}}),lt&&a.jsx("span",{id:Lt,className:"pp-env-error",role:"alert",children:H("projectPreview.errors.modelApiKeyRequired")})]}),a.jsx("span",{className:"pp-env-source",children:wn&&!Ln.trim()?H("projectPreview.synced"):H("projectPreview.thisRelease")})]},Re.key)})]}),Me.length>0&&a.jsxs("div",{className:"pp-env-group-head pp-env-group-head-custom",children:[a.jsx("span",{children:H("projectPreview.customVariables")}),a.jsx("small",{children:H("projectPreview.itemCount",{count:Me.length})})]}),Me.map(Re=>a.jsxs("div",{className:"pp-env-row",children:[a.jsx("input",{value:Re.key,placeholder:H("common.name"),disabled:xt,autoComplete:"off",onChange:lt=>vl(Re.id,{key:lt.currentTarget.value})}),a.jsx("input",{type:"text",value:Re.value,placeholder:H("projectPreview.value"),disabled:xt,autoComplete:"off",onChange:lt=>vl(Re.id,{value:lt.currentTarget.value})}),a.jsx("button",{type:"button",className:"pp-icon-btn pp-env-remove",title:H("projectPreview.deleteVariable"),disabled:xt,onClick:()=>Ml(Re.id),children:a.jsx(Do,{className:"pp-ic"})})]},Re.id))]})]}),(xt||et||Object.keys(Xe).length>0)&&a.jsxs("section",{className:"pp-config-section pp-progress-section",children:[a.jsx("div",{className:"pp-config-label",children:H("projectPreview.deploymentProgress")}),a.jsx("ol",{className:"pp-steps",children:Ms.map((Re,lt)=>{const Lt=vt?Ms.findIndex(jn=>jn.phase===vt):-1,Ln=!!qe&&(Lt===-1?lt===0:lt===Lt),wn=Xe[Re.phase];let pn;return et||(wn==null?void 0:wn.level)==="success"?pn="done":Ln?pn="failed":Lt===-1?pn=xt?"active":"pending":ltRe.phase===vt))==null?void 0:io.label)??vt,message:qe}):qe,onRetry:rn,retryLabel:H(ie?"projectPreview.retryUpdate":"projectPreview.retryDeploy")}),mt&&a.jsxs("div",{className:"pp-status-unconfirmed",role:"status",children:[a.jsx("strong",{children:H("projectPreview.task.deploymentStatusUnconfirmed")}),a.jsx("span",{children:H("projectPreview.errors.deploymentStatusUnconfirmed")})]}),et&&a.jsxs("section",{className:"pp-deploy-result",children:[a.jsx("div",{className:"pp-deploy-result-header",children:H(ie?"projectPreview.updateSucceeded":"projectPreview.deploySucceeded")}),a.jsxs("div",{className:"pp-deploy-result-body",children:[et.warnings&&et.warnings.length>0&&a.jsx("div",{className:"pp-deploy-result-warning",role:"status",children:et.warnings.map(Re=>a.jsx("span",{children:Re},Re))}),et.region&&a.jsxs("div",{className:"pp-deploy-result-field",children:[a.jsx("label",{children:H("projectPreview.region")}),a.jsx("code",{children:wh(et.region,V)})]}),a.jsxs("div",{className:"pp-deploy-result-field",children:[a.jsx("label",{children:H("projectPreview.agentName")}),a.jsx("code",{children:et.agentName})]}),a.jsxs("div",{className:"pp-deploy-result-field",children:[a.jsx("label",{children:H("projectPreview.runtimeName")}),a.jsx("code",{children:et.runtimeName})]}),a.jsxs("div",{className:"pp-deploy-result-field",children:[a.jsx("label",{children:H("projectPreview.apiEndpoint")}),a.jsx("code",{className:"pp-deploy-result-url",children:et.url})]})]}),a.jsxs("div",{className:"pp-deploy-result-actions",children:[a.jsxs("button",{type:"button",className:"pp-deploy-result-btn",onClick:ts,disabled:Qt,children:[Qt?a.jsx(Fi,{className:"pp-ic spin"}):a.jsx(Bje,{className:"pp-ic"}),H(Qt?"projectPreview.connecting":"projectPreview.chatNow")]}),et.consoleUrl&&a.jsxs("a",{href:et.consoleUrl,target:"_blank",rel:"noopener noreferrer",className:"pp-console-link pp-console-link-btn",children:[a.jsx(p0,{className:"pp-ic"}),H("projectPreview.console")]})]})]})]}),a.jsx("div",{className:`pp-config-actions${Ws?" is-external":""}`,children:Ws?yi.createPortal(a.jsx("button",{type:"button",className:"pp-deploy studio-update-action",onClick:rn,disabled:xt||mt||ae||Ke||G||!!n||!!We,title:n||We||void 0,children:xt?H("projectPreview.actionInProgress",{action:se}):mt?H("projectPreview.task.deploymentStatusUnconfirmed"):ae?H("projectPreview.checkingName"):qe?H("projectPreview.retryAction",{action:se}):se}),Ws):a.jsx("button",{type:"button",className:"pp-deploy studio-update-action",onClick:rn,disabled:xt||mt||ae||Ke||G||!!n||!!We,title:n||We||void 0,children:xt?H("projectPreview.actionInProgress",{action:se}):mt?H("projectPreview.task.deploymentStatusUnconfirmed"):ae?H("projectPreview.checkingName"):qe?H("projectPreview.retryAction",{action:se}):se})})]})]}),Yt&&i&&yi.createPortal(a.jsx("div",{className:"pp-flow-backdrop",onMouseDown:Re=>{Re.target===Re.currentTarget&&xn(!1)},children:a.jsxs("section",{className:"pp-flow-dialog",role:"dialog","aria-modal":"true","aria-label":H("projectPreview.flowPreview"),children:[a.jsxs("header",{children:[a.jsxs("div",{children:[a.jsx("strong",{children:H("projectPreview.executionFlow")}),a.jsx("span",{children:H("projectPreview.flowPreviewHint")})]}),a.jsx("button",{type:"button",onClick:()=>xn(!1),"aria-label":H("projectPreview.closeFlowPreview"),children:a.jsx(Do,{"aria-hidden":!0})})]}),a.jsx("div",{className:"pp-flow-dialog-canvas",children:a.jsx(IP,{draft:i,direction:"horizontal",selectedPath:[],onSelect:Um,onAdd:Um,onInsert:Um,onDelete:Um,readOnly:!0,interactivePreview:!0})})]})}),document.body),a.jsx(Isn,{open:Ot,isUpdate:ie,...h,onCancel:Os,onConfirm:()=>void $l()})]})}const Wsn=new Set(["MODEL_AGENT_API_KEY"]),Ksn=new Set(["MODEL_AGENT_NAME","MODEL_NAME"]),Gsn=new Set(["VOLCENGINE_ACCESS_KEY","VOLCENGINE_SECRET_KEY","VOLCENGINE_SESSION_TOKEN","BYTEPLUS_ACCESS_KEY","BYTEPLUS_SECRET_KEY","BYTEPLUS_SESSION_TOKEN","VEADK_DISABLE_EXPIRE_AT"]);function i0(e){return!Gsn.has(e)}function gA(e){return Wsn.has(e)||/(?:API_KEY|ACCESS_KEY|SECRET_KEY|PRIVATE_KEY|TOKEN|SECRET|PASSWORD|PASSWD|PWD|CREDENTIAL)$/.test(e)}function Xsn(e,t){const n={},i=new Set([...e.environment.required,...e.environment.optional]);for(const r of i){if(!i0(r)||gA(r))continue;const s=r==="MODEL_AGENT_API_BASE"?Po(t):Ksn.has(r)?Gp(t):e.environment.defaults[r];s!=null&&s.trim()&&(n[r]=s)}return n}function Ysn({delivery:e,onBack:t,onAgentAdded:n,onDeploymentTaskChange:i,onDeploymentStarted:r,onDeploymentComplete:s,cloudProvider:o="volcengine",initialDeployRegion:l}){const{t:c}=Te("create"),[u,d]=p.useState(l??Zi(o)),[f,h]=p.useState(),[m,g]=p.useState(null),[b,v]=p.useState(!1),[y,w]=p.useState(()=>({name:mK(e.agentName),files:e.files??[]})),x=e.environment??{required:[],optional:[],defaults:{}},[O,k]=p.useState(()=>({...x.defaults})),S=x.required.filter(i0).filter(gA).map(R=>({key:R,label:R})),C=[...x.required.filter(i0).filter(R=>!gA(R)).map(R=>({key:R,required:!0,comment:R,placeholder:c("intelligentDeployment.env.requiredPlaceholder",{key:R})})),...x.optional.filter(i0).map(R=>({key:R,required:!1,comment:R,placeholder:c("intelligentDeployment.env.optionalPlaceholder",{key:R})}))],E=ov(y.name,R=>c(`validation.runtimeName.${R}`));p.useEffect(()=>{if(E){g(null);return}const R=new AbortController,A=window.setTimeout(()=>{v(!0),ND(y.name,u).then(N=>{R.signal.aborted||g(N.available===!0)}).catch(()=>{R.signal.aborted||g(null)}).finally(()=>{R.signal.aborted||v(!1)})},250);return()=>{window.clearTimeout(A),R.abort()}},[u,y.name,E]);const j={kind:"intelligentDevelopment",sessionId:e.sessionId,...e.projectId&&e.versionId?{projectId:e.projectId,versionId:e.versionId}:{},artifactSha256:e.artifactSha256,validationReportSha256:e.validationReportSha256,...e.verified?{}:{acknowledgeUnverified:!0}};async function T(R,A,N){const P=f&&f.mode!=="public"?{mode:f.mode,vpc_id:f.vpcId,subnet_ids:f.subnetIds,enable_shared_internet_access:f.enableSharedInternetAccess}:void 0;return U0(R.name,[],{region:u,projectName:"default",network:P},{...N,onStage:A,runtimeName:R.name,source:j})}return a.jsx(YT,{cloudProvider:o,project:y,agentName:y.name,onDeploy:T,onAgentAdded:n,onDeploymentTaskChange:i,onDeploymentStarted:r,onDeploymentComplete:s,network:f,onNetworkChange:h,deployRegion:u,onDeployRegionChange:d,deploymentEnv:C,requiredSecretEnv:S,deploymentEnvValues:O,onDeploymentEnvChange:(R,A)=>k(N=>({...N,[R]:A})),deploymentActionLabel:c("common.deploy"),deployDisabled:!!E||m===!1||b,deployDisabledReason:E??(m===!1?c("intelligentDeployment.runtimeNameExists"):b?c("intelligentDeployment.checkingRuntimeName"):void 0),deploymentTelemetry:{source:"intelligent_development",createMode:"intelligent",aiAssisted:!0},onBack:t,backLabel:c("intelligentDeployment.back"),deploymentPrimaryPane:a.jsxs("section",{className:"trusted-source-pane","aria-label":e.verified?c("intelligentDeployment.verifiedSource"):c("intelligentDeployment.deployableSource"),children:[a.jsx("div",{className:"trusted-source-pane__badge",children:e.verified?c("intelligentDeployment.verifiedByCodex"):c("intelligentDeployment.deployableSource")}),a.jsx("h2",{children:e.agentName}),a.jsxs("label",{className:"trusted-source-pane__runtime-name",children:[a.jsx("span",{children:c("intelligentDeployment.runtimeName")}),a.jsx("input",{value:y.name,maxLength:64,onChange:R=>w(A=>({...A,name:R.target.value}))})]}),a.jsxs("dl",{children:[a.jsxs("div",{children:[a.jsx("dt",{children:c("intelligentDeployment.entryPoint")}),a.jsx("dd",{children:a.jsx("code",{children:e.entryPoint})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:c("intelligentDeployment.files")}),a.jsx("dd",{children:e.fileCount})]}),a.jsxs("div",{children:[a.jsx("dt",{children:c("intelligentDeployment.artifact")}),a.jsx("dd",{children:a.jsx("code",{children:e.artifactSha256.slice(0,16)})})]}),a.jsxs("div",{children:[a.jsx("dt",{children:c("intelligentDeployment.validationReport")}),a.jsx("dd",{children:a.jsx("code",{children:e.validationReportSha256.slice(0,16)})})]})]}),a.jsx("p",{children:e.verified?c("intelligentDeployment.verifiedHint"):c("intelligentDeployment.unverifiedHint")})]})})}const Zsn="_Container_1tuad_1",Jsn="_Checkbox_1tuad_22",ean="_CheckMark_1tuad_92",tan="_Label_1tuad_162",_j={Container:Zsn,Checkbox:Jsn,CheckMark:ean,Label:tan},DK=({className:e,label:t,id:n,disabled:i,orientation:r="left",...s})=>{const o=p.useId(),l=n??o;return a.jsxs("div",{"data-disabled":i?"":void 0,"data-has-label":t?"":void 0,"data-orientation":r,className:Ui(e,_j.Container),children:[a.jsx(Mct,{className:_j.Checkbox,id:l,disabled:i,...s,children:a.jsx($ct,{className:_j.CheckMark})}),t&&a.jsx("label",{htmlFor:l,className:_j.Label,onMouseDown:c=>{!c.defaultPrevented&&c.detail>1&&c.preventDefault()},children:t})]})},nan="_RadioGroup_onrfm_1",ian="_RadioLabel_onrfm_9",ran="_RadioIndicatorWrapper_onrfm_26",san="_RadioItem_onrfm_43",aan="_RadioIndicator_onrfm_26",TS={RadioGroup:nan,RadioLabel:ian,RadioIndicatorWrapper:ran,RadioItem:san,RadioIndicator:aan},D7e=p.createContext(null),oan=()=>{const e=p.use(D7e);if(!e)throw new Error("RadioGroup components must be wrapped in ");return e},By=({onChange:e,children:t,className:n,direction:i="row",disabled:r=!1,...s})=>{const o=p.useMemo(()=>({disabled:r,direction:i}),[r,i]);return a.jsx(D7e,{value:o,children:a.jsx(Zdt,{className:Ui(TS.RadioGroup,n),"data-direction":i,onValueChange:e,disabled:r,...s,children:t})})},lan=({value:e,disabled:t=!1,required:n,children:i,className:r,block:s=!1,...o})=>{const{disabled:l}=oan(),c=l||t,u=p.useId(),d=`${e}-${u}`;return a.jsx("div",{className:"flex",...o,children:a.jsxs("label",{htmlFor:d,className:Ui(TS.RadioLabel,r),"data-disabled":c?"":void 0,"data-block":s?"":void 0,onMouseDown:f=>{!f.defaultPrevented&&f.detail>1&&f.preventDefault()},children:[a.jsx("div",{className:TS.RadioIndicatorWrapper,children:a.jsx(nft,{id:d,value:e,disabled:c,required:n,className:TS.RadioItem,children:a.jsx(rft,{className:TS.RadioIndicator})})}),i]})})};By.Item=lan;function can({className:e,...t}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t,children:[a.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}),a.jsx("path",{d:"M12 6.5c.4 2.4 1 3 3.4 3.4-2.4.4-3 1-3.4 3.4-.4-2.4-1-3-3.4-3.4 2.4-.4 3-1 3.4-3.4Z"})]})}function Bk(e,t){return{id:e,get label(){return Xt(`traditional.agentTypes.${e}.fullLabel`)},get desc(){return Xt(`traditional.agentTypes.${e}.description`)},icon:t}}const Uk={llm:Bk("llm",can),sequential:Bk("sequential",$at),parallel:Bk("parallel",Xat),loop:Bk("loop",Qje),a2a:Bk("a2a",nM)},uan=[Uk.llm,Uk.sequential,Uk.parallel,Uk.loop,Uk.a2a],M7e=e=>e==="sequential"||e==="parallel"||e==="loop",UL=e=>e==="a2a";function kg(e,t){const n=e.trim().toLocaleLowerCase();return n?t.some(i=>i==null?void 0:i.toLocaleLowerCase().includes(n)):!0}function L7e(e,t=[]){const n=new Set(e.flatMap(o=>[o.id,o.name])),i=[];for(const o of t){const l=o.modelId||o.name;n.has(o.name)||n.has(l)||(n.add(o.name),n.add(l),i.push({id:l,name:o.name,displayName:o.name,vendorName:"",activationState:"Unavailable",lifecycleStatus:o.state==="Shutdown"?"Shutdown":"Running",available:!1,apiKeyAllowed:!0,unavailableReason:o.state==="Available"?"Unknown":o.state}))}const r=e.findIndex(o=>o.apiKeyAllowed===!1),s=r<0?e.length:r;return[...e.slice(0,s),...i,...e.slice(s)]}function cU(e,t){const n=e.status==="Active"?"modelApiKey.enabled":e.status==="Restricted"?"modelApiKey.disabled":"modelApiKey.unknownStatus",i=e.allowAll===!0?"modelApiKey.allPermissions":e.allowAll===!1?"modelApiKey.customPermissions":"modelApiKey.unknownPermissions";return`${t(n)} · ${t(i)}`}function $7e(e,t,n){const i=s=>s.normalize("NFKC").toLocaleLowerCase(),r=i(`${t} ${n}`);return i(e).trim().split(/\s+/).every(s=>r.includes(s))}const F7e=new Set(["local","sqlite","mysql","postgresql"]),B7e=new Set(["local","opensearch","redis","viking","openviking","mem0"]),U7e=new Set(["opensearch","viking","context_search","openviking"]),Q7e=new Set(["apmplus","cozeloop","tls"]),z7e=new Set(["web_search","parallel_web_search","link_reader","web_scraper","image_generate","image_edit","video_generate","text_to_speech","run_code","vesearch"]),dan=new Set(["llm","sequential","parallel","loop","a2a"]),fan=new Set(["lark-cli","github-cli","pandoc"]),han=new Set(["default","ops"]);function Xn(e,t=""){return typeof e=="string"?e:t}function Tc(e){return e===!0}function pan(e){return typeof e=="string"&&han.has(e)?e:"default"}function _w(e){return Array.isArray(e)?e.filter(t=>typeof t=="string"):[]}function man(e){return Array.from(new Set(_w(e).filter(t=>fan.has(t))))}function gan(e){return!e||typeof e!="object"||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).filter(t=>typeof t[1]=="string"))}function V7e(e){return Array.isArray(e)?e.map(t=>t&&typeof t=="object"?{name:Xn(t.name),description:Xn(t.description)}:null).filter(t=>!!t&&!!t.name.trim()):[]}function jw(e,t,n){return typeof e=="string"&&t.has(e)?e:n}function H7e(e){return typeof e=="string"&&dan.has(e)?e:"llm"}function q7e(e){return e==="byteplus"?"byteplus":"volcengine"}function W7e(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):3}function K7e(e){const t=e&&typeof e=="object"?e:{};return{enabled:Tc(t.enabled),registrySpaceId:Xn(t.registrySpaceId),registryTopK:Xn(t.registryTopK),registryRegion:Xn(t.registryRegion),registryEndpoint:Xn(t.registryEndpoint)}}function ban(e){if(!e||typeof e!="object"||Array.isArray(e))return;const t=e,n=t.componentOverrides&&typeof t.componentOverrides=="object"?t.componentOverrides:{},i=Object.fromEntries(Z1.map(l=>[l,n[l]===!0])),r={enabled:Object.values(i).some(Boolean),profile:pan(t.profile),componentOverrides:i},s=Xn(t.catalogVersion).trim(),o=Xn(t.planHash).trim();return s&&(r.catalogVersion=s),o&&(r.planHash=o),uH(r)}function G7e(e,t="volcengine"){return Array.isArray(e)?e.map(n=>{const i=n&&typeof n=="object"?n:{},r=q7e(i.cloudProvider??t),s=i.memory&&typeof i.memory=="object"?i.memory:{},o=K7e(i.a2aRegistry),l=H7e(i.agentType),c=o.enabled&&l==="llm"?"a2a":l,u=C7e(i.modelName,i.modelFallbacks);return{...wd(r),cloudProvider:r,name:Xn(i.name),description:Xn(i.description),instruction:Xn(i.instruction),agentType:c,maxIterations:W7e(i.maxIterations),a2aUrl:Xn(i.a2aUrl),modelName:u.modelName,modelFallbacks:u.modelFallbacks,modelSource:i.modelSource==="custom"||i.modelSource==="ark"?i.modelSource:void 0,modelProvider:Xn(i.modelProvider),modelApiBase:Xn(i.modelApiBase),builtinTools:_w(i.builtinTools).filter(d=>z7e.has(d)),customTools:V7e(i.customTools),memory:{shortTerm:Tc(s.shortTerm),longTerm:Tc(s.longTerm)},shortTermBackend:jw(i.shortTermBackend,F7e,"local"),longTermBackend:jw(i.longTermBackend,B7e,"local"),longTermMemoryIndex:Xn(i.longTermMemoryIndex),autoSaveSession:Tc(i.autoSaveSession),knowledgebase:Tc(i.knowledgebase),knowledgebaseBackend:jw(i.knowledgebaseBackend,U7e,Dg),knowledgebaseIndex:Xn(i.knowledgebaseIndex),tracing:Tc(i.tracing),tracingExporters:_w(i.tracingExporters).filter(d=>Q7e.has(d)),a2aRegistry:c==="a2a"?{...o,enabled:!0}:o,subAgents:G7e(i.subAgents,r),selectedSkills:X7e(i)}}):[]}function X7e(e){if(!Array.isArray(e.selectedSkills))return[];const t=[];for(const n of e.selectedSkills){const i=n&&typeof n=="object"?n:{},r=Xn(i.source),s=r==="local"||r==="skillspace"||r==="skillhub"||r==="runtime"?r:"skillhub",o=Xn(i.name)||Xn(i.slug)||Xn(i.skillName)||Xn(i.skillId)||"skill",l=Xn(i.folder)||o,c=Xn(i.description);if(s==="runtime"){if(l!==o)continue;t.push({source:s,folder:l,name:o,description:c});continue}if(s==="skillhub"){const f=Xn(i.slug);if(!f)continue;t.push({source:s,folder:l,name:o,description:c,slug:f,namespace:Xn(i.namespace)||"public"});continue}if(s==="local"){const h=(Array.isArray(i.localFiles)?i.localFiles:[]).map(m=>{const g=m&&typeof m=="object"?m:{},b=Xn(g.path),v=Xn(g.content);return b?{path:b,content:v}:null}).filter(m=>m!==null);if(h.length===0)continue;t.push({source:s,folder:l,name:o,description:c,localFiles:h});continue}const u=Xn(i.skillSpaceId),d=Xn(i.skillId);!u||!d||t.push({source:s,folder:l,name:o,description:c,skillSpaceId:u,skillSpaceName:Xn(i.skillSpaceName),skillId:d,version:Xn(i.version)})}return t}function yan(e){const t=e&&typeof e=="object"?e:{},n=t.memory&&typeof t.memory=="object"?t.memory:{},i=t.deployment&&typeof t.deployment=="object"?t.deployment:{},r=gan(i.envValues),s=t.cloudEnvironment&&typeof t.cloudEnvironment=="object"?t.cloudEnvironment:{},o=K7e(t.a2aRegistry),l=H7e(t.agentType),c=o.enabled&&l==="llm"?"a2a":l,u=q7e(t.cloudProvider),d=C7e(t.modelName,t.modelFallbacks),f=Array.isArray(t.mcpTools)?t.mcpTools.map(h=>{const m=h&&typeof h=="object"?h:{},g=m.transport==="stdio"?"stdio":"http";return{name:Xn(m.name),transport:g,url:Xn(m.url),authToken:Xn(m.authToken),authTokenEnv:Xn(m.authTokenEnv),credentialConfigured:m.credentialConfigured===!0,command:Xn(m.command),args:_w(m.args)}}).filter(h=>h.transport==="http"?!!h.url:!!h.command):[];return{...wd(u),cloudProvider:u,name:Xn(t.name)||"my_agent",description:Xn(t.description),instruction:Xn(t.instruction)||"You are a helpful assistant.",dynamicAgentDelegation:Tc(t.dynamicAgentDelegation),agentType:c,maxIterations:W7e(t.maxIterations),a2aUrl:Xn(t.a2aUrl),modelName:d.modelName,modelFallbacks:d.modelFallbacks,modelSource:t.modelSource==="custom"||t.modelSource==="ark"?t.modelSource:void 0,modelProvider:Xn(t.modelProvider),modelApiBase:Xn(t.modelApiBase),builtinTools:_w(t.builtinTools).filter(h=>z7e.has(h)),customTools:V7e(t.customTools),mcpTools:f,a2aRegistry:c==="a2a"?{...o,enabled:!0}:o,memory:{shortTerm:Tc(n.shortTerm),longTerm:Tc(n.longTerm)},shortTermBackend:jw(t.shortTermBackend,F7e,"local"),longTermBackend:jw(t.longTermBackend,B7e,"local"),longTermMemoryIndex:Xn(t.longTermMemoryIndex),autoSaveSession:Tc(t.autoSaveSession),knowledgebase:Tc(t.knowledgebase),knowledgebaseBackend:jw(t.knowledgebaseBackend,U7e,Dg),knowledgebaseIndex:Xn(t.knowledgebaseIndex),tracing:Tc(t.tracing),tracingExporters:_w(t.tracingExporters).filter(h=>Q7e.has(h)),deployment:{feishuEnabled:Tc(i.feishuEnabled),runtimeName:Xn(i.runtimeName),runtimeNameCustomized:Tc(i.runtimeNameCustomized)||!!Xn(i.runtimeName).trim(),modelApiKeyId:Xn(i.modelApiKeyId),modelApiKeyName:Xn(i.modelApiKeyName),...Object.keys(r).length>0?{envValues:r}:{}},cloudEnvironment:{environmentId:Xn(s.environmentId),environmentVersionId:Xn(s.environmentVersionId),cliTools:man(s.cliTools),...typeof s.dockerfile=="string"?{dockerfile:s.dockerfile}:{}},harnessSidecar:ban(t.harnessSidecar),subAgents:G7e(t.subAgents,u),selectedSkills:X7e(t)}}function Y7e(e,t=e.cloudProvider??"volcengine"){const n=e.cloudProvider??t,i=new Set(NIe(n).map(r=>r.id));return{...e,builtinTools:(e.builtinTools??[]).filter(r=>i.has(r)),tracing:!1,tracingExporters:[],memory:{shortTerm:!1,longTerm:!1},shortTermBackend:"local",longTermBackend:"local",longTermMemoryIndex:"",autoSaveSession:!1,knowledgebase:!1,knowledgebaseBackend:Dg,knowledgebaseIndex:"",subAgents:e.subAgents.map(r=>Y7e(r,n))}}const van=/^[A-Za-z_][A-Za-z0-9_]*$/,QL=/^\$\{([A-Za-z_][A-Za-z0-9_]*)\}$/;function cce(e,t){return e.trim().toUpperCase().replace(/[^A-Z0-9]+/g,"_").replace(/^_+|_+$/g,"")||t}function xan(e,t){if(!t.has(e))return e;let n=2;for(;t.has(`${e}_${n}`);)n+=1;return`${e}_${n}`}function EO(e){var n,i,r;const t=(n=e.authTokenEnv)==null?void 0:n.trim();return t&&van.test(t)?t:((r=(i=e.authToken)==null?void 0:i.trim().match(QL))==null?void 0:r[1])??""}function FP(e,t){var n;for(const i of e.mcpTools??[])t(i);for(const i of e.subAgents)FP(i,t);for(const i of((n=e.workflow)==null?void 0:n.nodes)??[])FP(i.agent,t)}function Z7e(e){try{const t=(e??"").trim(),n=new URL(t);if(n.protocol!=="http:"&&n.protocol!=="https:"||n.username||n.password||n.search||n.hash)return null;const i=t.indexOf("://")+3,r=t.indexOf("/",i),s=(r>=0?t.slice(r):"").replace(/\/+$/,"");return`${n.protocol}//${n.host}${s}`}catch{return null}}function wan(e,t){let n=e.name.trim();if(!n){const i=Z7e(e.url),r=(i==null?void 0:i.split("/").filter(Boolean))??[];n=r[r.length-1]??""}return n=n.replace(/[^A-Za-z0-9_.-]+/g,"_").replace(/^[_.-]+|[_.-]+$/g,""),n||`mcp_${t+1}`}function J7e(e){const t=new Set,n=new Set;let i=null;const r=s=>{var o;(s.mcpTools??[]).forEach((l,c)=>{if(i||l.transport!=="http")return;const u=wan(l,c),d=Z7e(l.url);if(t.has(u)){i="duplicateName";return}if(d&&n.has(d)){i="duplicateUrl";return}t.add(u),d&&n.add(d)}),!i&&(s.subAgents.forEach(r),(o=s.workflow)==null||o.nodes.forEach(l=>r(l.agent)))};return r(e),i}function D6(e){const t=new Set;return FP(e,n=>{const i=EO(n);n.credentialConfigured&&i&&t.add(i)}),[...t]}function eUe(e){const t=new Set;return FP(e,n=>{const i=EO(n);i&&t.add(i)}),[...t]}function Oan(e,t){const n=new Set(eUe(t));return[...new Set(e)].filter(i=>!n.has(i))}function kan(e){if(e.authToken)return e.authToken;if(e.credentialConfigured)return"";const t=EO(e);return t?`\${${t}}`:""}function San(e,t){if(!t){const i={...e,credentialConfigured:!1};return delete i.authToken,delete i.authTokenEnv,delete i.credentialSourceUrl,delete i.credentialSourceAuthTokenEnv,i}const n=t.trim().match(QL);if(n){const i={...e,authTokenEnv:n[1],credentialConfigured:e.credentialConfigured&&EO(e)===n[1]};return delete i.authToken,i}return{...e,authToken:t,credentialConfigured:!1}}function Ean(e){if(!e.trim())return!1;try{return new URL(e).pathname.replace(/\/+$/,"")===""}catch{return!1}}function uce(e){return(e??"").trim().replace(/\/+$/,"")}function Can(e,t){return{...e,url:t}}function Aan(e,t){const n=new Map(t.map(r=>[[r.agentName.trim(),r.authTokenEnv.trim(),uce(r.url)].join("\0"),r.value])),i=r=>({...r,mcpTools:(r.mcpTools??[]).map(s=>{var c;const o=EO(s);if(!o)return s;const l=n.get([r.name.trim(),o,uce(s.url)].join("\0"));return l?{...s,authToken:l,credentialConfigured:!0,credentialSourceUrl:((c=s.url)==null?void 0:c.trim())??"",credentialSourceAuthTokenEnv:o}:s}),subAgents:r.subAgents.map(i),...r.workflow?{workflow:{...r.workflow,nodes:r.workflow.nodes.map(s=>({...s,agent:i(s.agent)}))}}:{}});return i(e)}function Tan(e){const t=CO(e),n={},i=o=>{var l,c;Object.assign(n,((l=o.deployment)==null?void 0:l.envValues)??{}),o.subAgents.forEach(i),(c=o.workflow)==null||c.nodes.forEach(u=>i(u.agent))};i(e),Object.assign(n,t.envValues);const r=[],s=o=>{var l,c,u;for(const d of o.mcpTools??[]){const f=((l=d.authTokenEnv)==null?void 0:l.trim())??"",h=f?(n[f]??"").trim():"";d.transport!=="http"||!h||r.push({agentName:o.name.trim(),name:d.name.trim(),url:((c=d.url)==null?void 0:c.trim())??"",value:h})}o.subAgents.forEach(s),(u=o.workflow)==null||u.nodes.forEach(d=>s(d.agent))};return s(t.draft),r}function _an(e){const t=[],n=i=>{var r,s,o;for(const l of i.mcpTools??[]){const c=((r=l.authToken)==null?void 0:r.trim())??"";l.transport!=="http"||!c||QL.test(c)||t.push({agentName:i.name.trim(),name:l.name.trim(),url:((s=l.url)==null?void 0:s.trim())??"",value:c})}i.subAgents.forEach(n),(o=i.workflow)==null||o.nodes.forEach(l=>n(l.agent))};return n(e),t}function CO(e){const t=new Set,n={},i=r=>{var u;const s=cce(r.name,"AGENT"),o=(u=r.mcpTools)==null?void 0:u.map((d,f)=>{var y,w;const h=((y=d.authToken)==null?void 0:y.trim())??"",m=((w=h.match(QL))==null?void 0:w[1])??"";let b=EO(d);if(!b&&h){const x=cce(d.name,`TOOL_${f+1}`);b=xan(`MCP_${s}_${x}_AUTH_TOKEN`,t)}b&&t.add(b),b&&h&&!m&&(n[b]=h);const v={...d};return delete v.authToken,delete v.credentialConfigured,delete v.credentialSourceUrl,delete v.credentialSourceAuthTokenEnv,b?v.authTokenEnv=b:delete v.authTokenEnv,v}),l=r.subAgents.map(i),c=r.workflow?{...r.workflow,nodes:r.workflow.nodes.map(d=>({...d,agent:i(d.agent)}))}:void 0;return{...r,subAgents:l,...o?{mcpTools:o}:{},...c?{workflow:c}:{}}};return{draft:i(e),envValues:n}}const jan={heading:"VeADK Agent 结构配置",importHint:"可在「创建 Agent」页通过「导入 YAML」重新载入。"};function tUe(e,t=!0){var s,o,l,c,u,d,f,h,m,g,b,v,y,w,x,O,k,S,C,E,j,T,R,A,N,P,I,D,_,L,F,M,V,q,U,J,z,Z,ne,W,G,H,se,Y;const n={agentType:e.agentType??"llm"};if(e.agentType==="a2a"){if((s=e.a2aRegistry)!=null&&s.enabled){const X=gM(e.cloudProvider??"volcengine"),ie={enabled:!0};(o=e.a2aRegistry.registrySpaceId)!=null&&o.trim()&&(ie.registrySpaceId=e.a2aRegistry.registrySpaceId.trim()),ie.registryTopK=((l=e.a2aRegistry.registryTopK)==null?void 0:l.trim())||X.topK,ie.registryRegion=((c=e.a2aRegistry.registryRegion)==null?void 0:c.trim())||X.region,ie.registryEndpoint=((u=e.a2aRegistry.registryEndpoint)==null?void 0:u.trim())||X.endpoint,n.a2aRegistry=ie}return n}n.name=e.name,n.description=e.description,n.instruction=e.instruction,e.agentType==="loop"&&(n.maxIterations=e.maxIterations??3);const i=((d=e.modelName)==null?void 0:d.trim())??"",r=Ru(i,e.modelFallbacks);if(i&&(n.modelName=i,r.length&&(n.modelFallbacks=r)),e.modelSource&&(n.modelSource=e.modelSource),e.modelSource!=="ark"&&((f=e.modelProvider)!=null&&f.trim()&&(n.modelProvider=e.modelProvider.trim()),(h=e.modelApiBase)!=null&&h.trim()&&(n.modelApiBase=e.modelApiBase.trim())),(m=e.builtinTools)!=null&&m.length&&(n.builtinTools=[...e.builtinTools]),(g=e.customTools)!=null&&g.length&&(n.customTools=e.customTools.map(X=>({name:X.name,description:X.description}))),(b=e.mcpTools)!=null&&b.length&&(n.mcpTools=e.mcpTools.map(X=>{var ee,be,ue,pe;const ie={name:X.name,transport:X.transport};return(ee=X.url)!=null&&ee.trim()&&(ie.url=X.url.trim()),(be=X.authTokenEnv)!=null&&be.trim()&&(ie.authTokenEnv=X.authTokenEnv.trim()),(ue=X.command)!=null&&ue.trim()&&(ie.command=X.command.trim()),(pe=X.args)!=null&&pe.length&&(ie.args=X.args),ie})),((v=e.memory)!=null&&v.shortTerm||(y=e.memory)!=null&&y.longTerm)&&(n.memory={shortTerm:!!e.memory.shortTerm,longTerm:!!e.memory.longTerm},e.memory.shortTerm&&(n.shortTermBackend=e.shortTermBackend||"local"),e.memory.longTerm&&(n.longTermBackend=e.longTermBackend||"local",(w=e.longTermMemoryIndex)!=null&&w.trim()&&(n.longTermMemoryIndex=e.longTermMemoryIndex.trim()),n.autoSaveSession=!!e.autoSaveSession)),e.knowledgebase&&(n.knowledgebase=!0,n.knowledgebaseBackend=e.knowledgebaseBackend||"viking",(x=e.knowledgebaseIndex)!=null&&x.trim()&&(n.knowledgebaseIndex=e.knowledgebaseIndex.trim())),e.tracing&&((O=e.tracingExporters)!=null&&O.length)&&(n.tracing=!0,n.tracingExporters=[...e.tracingExporters]),t&&((k=e.harnessSidecar)!=null&&k.enabled)&&(n.harnessSidecar={enabled:!0,profile:e.harnessSidecar.profile,componentOverrides:{...e.harnessSidecar.componentOverrides}}),((S=e.cloudEnvironment)!=null&&S.environmentId||(C=e.cloudEnvironment)!=null&&C.environmentVersionId||(j=(E=e.cloudEnvironment)==null?void 0:E.cliTools)!=null&&j.length||((T=e.cloudEnvironment)==null?void 0:T.dockerfile)!==void 0)&&(n.cloudEnvironment={environmentId:e.cloudEnvironment.environmentId,environmentVersionId:e.cloudEnvironment.environmentVersionId,...(R=e.cloudEnvironment.cliTools)!=null&&R.length?{cliTools:[...e.cloudEnvironment.cliTools]}:{},...e.cloudEnvironment.dockerfile!==void 0?{dockerfile:e.cloudEnvironment.dockerfile}:{}}),(A=e.deployment)!=null&&A.feishuEnabled||(P=(N=e.deployment)==null?void 0:N.runtimeName)!=null&&P.trim()||(I=e.deployment)!=null&&I.runtimeNameCustomized||(_=(D=e.deployment)==null?void 0:D.modelApiKeyId)!=null&&_.trim()||(F=(L=e.deployment)==null?void 0:L.modelApiKeyName)!=null&&F.trim()||Object.keys(((M=e.deployment)==null?void 0:M.envValues)??{}).length>0){const X={feishuEnabled:!!((V=e.deployment)!=null&&V.feishuEnabled)};(U=(q=e.deployment)==null?void 0:q.runtimeName)!=null&&U.trim()&&(X.runtimeName=e.deployment.runtimeName.trim()),(J=e.deployment)!=null&&J.runtimeNameCustomized&&(X.runtimeNameCustomized=!0),(Z=(z=e.deployment)==null?void 0:z.modelApiKeyId)!=null&&Z.trim()&&(X.modelApiKeyId=e.deployment.modelApiKeyId.trim()),(W=(ne=e.deployment)==null?void 0:ne.modelApiKeyName)!=null&&W.trim()&&(X.modelApiKeyName=e.deployment.modelApiKeyName.trim()),Object.keys(((G=e.deployment)==null?void 0:G.envValues)??{}).length>0&&(X.envValues={...(H=e.deployment)==null?void 0:H.envValues}),n.deployment=X}return(se=e.selectedSkills)!=null&&se.length&&(n.selectedSkills=e.selectedSkills.map(X=>{const ie={source:X.source,name:X.name,folder:X.folder};return X.description&&(ie.description=X.description),X.source==="skillhub"?(ie.slug=X.slug,ie.namespace=X.namespace??"public"):X.source==="local"?ie.localFiles=X.localFiles??[]:X.source==="skillspace"&&(ie.skillSpaceId=X.skillSpaceId,ie.skillSpaceName=X.skillSpaceName,ie.skillId=X.skillId,X.version&&(ie.version=X.version)),ie})),(Y=e.subAgents)!=null&&Y.length&&(n.subAgents=e.subAgents.map(X=>tUe(X,!1))),n}function Nan(e,t=jan){var s;const n=CO(e),i={...((s=n.draft.deployment)==null?void 0:s.envValues)??{},...n.envValues},r={...n.draft,deployment:{...n.draft.deployment??{feishuEnabled:!1},envValues:i}};return`# ${t.heading} # ${t.importHint} `+qM(tUe(r))}const Ran={missing_http_tool:"helpers.mcpGateway.missingHttpTool",missing_url:"helpers.mcpGateway.missingUrl"};function dce(e){return{ok:!1,reason:e,message:Xt(Ran[e])}}function Ian(e){try{const t=new URL(e);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function Pan(e){var o;const t=[],n=new Set,i=l=>{var c;n.has(l)||(n.add(l),t.push(l),l.subAgents.forEach(i),(c=l.workflow)==null||c.nodes.forEach(u=>i(u.agent)))};i(e);const r=t.flatMap(l=>(l.mcpTools??[]).filter(c=>c.transport==="http"));if(r.length===0)return dce("missing_http_tool");const s=[];for(const l of r){const c=((o=l.url)==null?void 0:o.trim())??"";if(!c||!Ian(c))return dce("missing_url");s.push(c)}return{ok:!0,urls:s}}function MK(e){const t=e==null?void 0:e.trim();if(!t)return!0;try{const n=new URL(t);return(n.protocol==="https:"||n.protocol==="http:")&&n.hostname.length>0&&n.username===""&&n.password===""}catch{return!1}}function Dan(e,t,n,i){return n0(e)?e:{modelName:e.trim(),modelProvider:"",modelApiBase:"",modelApiKeyEnv:S7e(t,n,i)}}function BP({variant:e,primaryModelName:t,agentName:n,value:i,secretValues:r,configuredSecretEnvKeys:s,showMissingApiKeyErrors:o,embedded:l,onChange:c,onSecretChange:u,renderSameProviderField:d}){const{t:f}=Te("create"),h=p.useId(),m=i??[],g=new Set(s??[]),b=(t??"").trim(),v=l?"cw-model-picker-field":e==="workbench"?"new-agent-workbench__field":"cw-field",y=l?"cw-model-picker-label":e==="workbench"?"new-agent-workbench__model-field-label":"cw-label",w=e==="workbench"?"model-fallback-fields__input model-fallback-fields__input--workbench":"model-fallback-fields__input cw-input",x=e==="workbench"?"model-fallback-fields__add new-agent-workbench__secondary-button":"model-fallback-fields__add cw-btn cw-btn-soft",O=e==="workbench"?"model-fallback-fields__remove new-agent-workbench__secondary-button":"model-fallback-fields__remove cw-btn cw-btn-ghost",k=Ru(b,m),S=m.filter(T=>{var R,A;return typeof T=="string"?!!T.trim():n0(T)&&!!(T.modelName.trim()||(R=T.modelProvider)!=null&&R.trim()||(A=T.modelApiBase)!=null&&A.trim())}).length,C=S>0&&k.length!==S,E=(T,R,A=!1)=>{const N=[...m];N[T]=R,c(A?Ru(b,N):N)},j=T=>{const R=m[T];n0(R)&&R.modelApiKeyEnv&&(u==null||u(R.modelApiKeyEnv,"")),c(m.filter((A,N)=>N!==T))};return a.jsxs("div",{className:v,children:[a.jsx("span",{className:y,children:f(`${e}.model.fallbacks`)}),a.jsxs("div",{className:"model-fallback-fields",children:[m.length?a.jsx("div",{className:"model-fallback-fields__rows",children:m.map((T,R)=>{const A=n0(T)?T:null,N=w7e(T),P=A?Zrn(n,R,m,A):jK(n,R),I=(r==null?void 0:r[P])??"",D=g.has(P),_=A!==null&&!I.trim()&&!D,L=`${h}-${R}-model`,F=A!==null&&!MK(A.modelApiBase);return a.jsxs("div",{className:`model-fallback-fields__item${A?" is-endpoint":""}`,children:[a.jsxs("div",{className:"model-fallback-fields__toolbar",children:[a.jsxs("div",{className:"model-fallback-fields__type",role:"radiogroup","aria-label":f(`${e}.model.fallbackType`),children:[a.jsx("button",{type:"button",role:"radio",className:A?"":"is-on","aria-checked":!A,onClick:()=>{A&&(A.modelApiKeyEnv&&(u==null||u(A.modelApiKeyEnv,"")),E(R,A.modelName))},children:f(`${e}.model.fallbackSameProvider`)}),a.jsx("button",{type:"button",role:"radio",className:A?"is-on":"","aria-checked":!!A,onClick:()=>{A||E(R,Dan(T,n,R,m))},children:f(`${e}.model.fallbackOtherProvider`)})]}),a.jsx("button",{type:"button",className:O,onClick:()=>j(R),children:f(`${e}.model.removeFallback`)})]}),a.jsxs("div",{className:"model-fallback-fields__model-name",children:[a.jsx("span",{className:"model-fallback-fields__field-label",children:f(`${e}.model.name`)}),A?a.jsx("input",{id:L,className:w,value:A.modelName,placeholder:f(`${e}.model.fallbackPlaceholder`),onChange:M=>E(R,{...A,modelName:M.currentTarget.value,modelApiKeyEnv:P})}):d?d({index:R,value:N,onChange:M=>E(R,M,!0)}):a.jsx("input",{id:L,className:w,value:N,placeholder:f(`${e}.model.fallbackPlaceholder`),onChange:M=>E(R,M.currentTarget.value)})]}),A?a.jsxs("div",{className:"model-fallback-fields__endpoint-details",children:[a.jsxs("label",{className:"model-fallback-fields__field",children:[a.jsx("span",{className:"model-fallback-fields__field-label",children:f(`${e}.model.provider`)}),a.jsx("input",{className:w,value:A.modelProvider??"",placeholder:"openai",onChange:M=>E(R,{...A,modelProvider:M.currentTarget.value,modelApiKeyEnv:P})})]}),a.jsxs("label",{className:"model-fallback-fields__field",children:[a.jsx("span",{className:"model-fallback-fields__field-label",children:"API Base"}),a.jsx("input",{className:w,type:"url",inputMode:"url",value:A.modelApiBase??"",placeholder:"https://api.example.com/v1","aria-invalid":F,onChange:M=>E(R,{...A,modelApiBase:M.currentTarget.value,modelApiKeyEnv:P})}),F?a.jsx("span",{className:"model-fallback-fields__error",children:f(`${e}.model.invalidApiBase`)}):null]}),a.jsxs("label",{className:"model-fallback-fields__field",children:[a.jsx("span",{className:"model-fallback-fields__field-label",children:"API Key"}),a.jsx("input",{className:w,type:"password",value:I,"aria-invalid":o&&_,placeholder:D&&!I?"••••••":f(`${e}.model.apiKeyPlaceholder`),autoComplete:"new-password",onChange:M=>{E(R,{...A,modelApiKeyEnv:P}),u==null||u(P,M.currentTarget.value)}}),o&&_?a.jsx("span",{className:"model-fallback-fields__error",role:"alert",children:f(`${e}.validation.apiKeyRequired`)}):null]})]}):null]},`fallback-row-${R}`)})}):null,a.jsx("div",{className:"model-fallback-fields__actions",children:a.jsx("button",{type:"button",className:x,onClick:()=>c([...m,""]),children:f(`${e}.model.addFallback`)})}),a.jsx("p",{className:"model-fallback-fields__help",children:f(`${e}.model.fallbackHelp`)}),C?a.jsx("p",{className:"model-fallback-fields__issue",children:f(`${e}.model.fallbackIgnored`)}):null]})]})}const uU="__default_environment__";function Man(e){return{value:uU,label:e("cloudEnvironment.defaultLabel"),description:e("cloudEnvironment.defaultDescription")}}function Lan(e){const t=e instanceof Error?e.message:String(e);return t.includes("HTTP 503")&&t.includes("管理员未配置持久化存储")}const $an={preparing:"cloudEnvironment.status.preparing",queued:"cloudEnvironment.status.queued",building:"cloudEnvironment.status.building",scanning:"cloudEnvironment.status.scanning",available:"cloudEnvironment.status.available",failed:"cloudEnvironment.status.failed"};function fce(e,t){return e.latestVersion?t($an[e.latestVersion.status]):t("cloudEnvironment.status.notBuilt")}function Fan(e){var t,n;return((t=e.latestVersion)==null?void 0:t.status)==="available"?"success":((n=e.latestVersion)==null?void 0:n.status)==="failed"?"danger":e.latestVersion?"warning":"secondary"}function nUe({value:e,onChange:t,disabled:n=!1,controlSize:i="lg",controlClassName:r,optionClassName:s}){var E,j;const{t:o}=Te("ui"),l=p.useId(),c=p.useRef(t),[u,d]=p.useState([]),[f,h]=p.useState(!0),[m,g]=p.useState(""),[b,v]=p.useState(!1),[y,w]=p.useState(0);p.useEffect(()=>{c.current=t},[t]),p.useEffect(()=>{const T=new AbortController;return h(!0),g(""),v(!1),BA(T.signal).then(R=>{T.signal.aborted||d(R)}).catch(R=>{!T.signal.aborted&&(R==null?void 0:R.name)!=="AbortError"&&(Lan(R)?(d([]),v(!0),c.current({environmentId:"",environmentVersionId:""})):g(R instanceof Error?R.message:String(R)))}).finally(()=>{T.signal.aborted||h(!1)}),()=>T.abort()},[y]);const x=p.useMemo(()=>[Man(o),...u.map(T=>{var R;return{value:T.id,label:T.name,description:`${RB(T.operatingSystem)} · ${$p(T.language)} · ${fce(T,o)}`,disabled:((R=T.latestVersion)==null?void 0:R.status)!=="available",environment:T}})],[u,o]),O=u.find(T=>T.id===e.environmentId),k=((E=O==null?void 0:O.latestVersion)==null?void 0:E.versionId)===e.environmentVersionId?O.latestVersion:null,S=O?pH.flatMap(T=>T.options).filter(T=>O.optionIds.includes(T.id)).map(T=>T.label):[],C=T=>{var A;if(T.value===uU||!T.environment){t({environmentId:"",environmentVersionId:""});return}const R=((A=T.environment.latestVersion)==null?void 0:A.versionId)??"";t({environmentId:T.value,environmentVersionId:R})};return f&&u.length===0?a.jsx("div",{className:"cloud-env-state",role:"status",children:a.jsx(fn,{duration:1.25,children:o("cloudEnvironment.loading")})}):m&&u.length===0?a.jsxs("div",{className:"cloud-env-state cloud-env-state--error",role:"alert",children:[a.jsxs("div",{children:[a.jsx("strong",{children:o("cloudEnvironment.loadFailed")}),a.jsx("p",{children:m})]}),a.jsx(_t,{color:"secondary",variant:"soft",size:"sm",onClick:()=>w(T=>T+1),children:o("common.retry")})]}):a.jsxs("section",{className:"cloud-env-config","aria-labelledby":`${l}-title`,children:[a.jsxs("label",{className:"cloud-env-field",id:`${l}-title`,htmlFor:l,children:[a.jsx("span",{children:o("cloudEnvironment.label")}),a.jsx(ha,{id:l,value:e.environmentId||uU,options:x,size:i,triggerClassName:r,optionClassName:s,pill:!1,disabled:n,placeholder:o("cloudEnvironment.placeholder"),searchPlaceholder:o("cloudEnvironment.search"),searchEmptyMessage:o("cloudEnvironment.noMatches"),onChange:C}),a.jsx("small",{children:o("cloudEnvironment.selectionHint")})]}),O?a.jsxs("div",{className:"cloud-env-summary","aria-live":"polite",children:[a.jsxs("div",{className:"cloud-env-summary__head",children:[a.jsxs("div",{children:[a.jsx("strong",{children:O.name}),O.description?a.jsx("p",{children:O.description}):null]}),a.jsx(Ya,{color:Fan(O),variant:"soft",size:"sm",children:fce(O,o)})]}),a.jsxs("dl",{className:"cloud-env-details",children:[a.jsxs("div",{children:[a.jsx("dt",{children:o("cloudEnvironment.operatingSystem")}),a.jsx("dd",{children:RB(O.operatingSystem)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:o("cloudEnvironment.language")}),a.jsx("dd",{children:$p(O.language)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:o("cloudEnvironment.tools")}),a.jsx("dd",{children:S.length?S.join(o("environmentCenter.listSeparator")):o("cloudEnvironment.noExtraTools")})]}),a.jsxs("div",{children:[a.jsx("dt",{children:o("cloudEnvironment.skills")}),a.jsx("dd",{children:(j=O.selectedSkills)!=null&&j.length?O.selectedSkills.map(T=>T.name).join(o("environmentCenter.listSeparator")):o("cloudEnvironment.noSkills")})]}),a.jsxs("div",{children:[a.jsx("dt",{children:o("cloudEnvironment.imageVersion")}),a.jsx("dd",{children:(k==null?void 0:k.versionId)||e.environmentVersionId||o("cloudEnvironment.unavailable")})]}),a.jsxs("div",{children:[a.jsx("dt",{children:o("cloudEnvironment.image")}),a.jsx("dd",{title:(k==null?void 0:k.image)||"",children:(k==null?void 0:k.image)||o("cloudEnvironment.versionMissing")})]})]}),k?null:a.jsx("p",{className:"cloud-env-version-warning",role:"alert",children:o("cloudEnvironment.versionChanged")})]}):e.environmentId?a.jsx("div",{className:"cloud-env-version-warning",role:"alert",children:o("cloudEnvironment.selectionUnavailable")}):a.jsx("p",{className:`cloud-env-guidance ${b?"cloud-env-guidance--fallback":""}`,children:b?o("cloudEnvironment.persistenceFallback"):u.length===0?o("cloudEnvironment.emptyFallback"):o("cloudEnvironment.defaultGuidance")})]})}const nh="new-agent-workbench__select-option";function hce({label:e,metadata:t}){return a.jsx("span",{className:"new-agent-workbench__model-option-view",children:a.jsxs("span",{className:"new-agent-workbench__model-option-copy",children:[a.jsx("span",{className:"new-agent-workbench__model-option-label",children:e}),t?a.jsx("span",{className:"new-agent-workbench__model-option-metadata",children:t}):null]})})}function pce(e,t){var i,r;const n=t.trim().toLocaleLowerCase();return n?[e.label,e.metadata,(i=e.model)==null?void 0:i.name,(r=e.model)==null?void 0:r.vendorName].some(s=>s==null?void 0:s.toLocaleLowerCase().includes(n)):!0}const Ban=["local","sqlite","mysql","postgresql"];function mce(e){return Ban.includes(e)}function Uan(e){return e==="local"?"in-memory":"persistent"}const jj=[{id:"agent"},{id:"environment"},{id:"deployment"}];function Qan({cloudProvider:e,source:t,agentName:n,value:i,apiKeyId:r,apiKeyName:s,provider:o,apiBase:l,customApiKey:c,customModelSecretValues:u,customModelApiKeyConfigured:d,configuredRuntimeEnvKeys:f,fallbacks:h,showModelFallbacks:m=!0,showMissingApiKeyErrors:g,onSourceChange:b,onApiKeyChange:v,onModelNameChange:y,onModelFallbacksChange:w,onProviderChange:x,onApiBaseChange:O,onCustomApiKeyChange:k,onCustomModelSecretChange:S,onLoadingChange:C}){const{t:E}=Te("create"),[j,T]=p.useState([]),[R,A]=p.useState([]),[N,P]=p.useState(!0),[I,D]=p.useState(!1),[_,L]=p.useState(null),[F,M]=p.useState("");p.useEffect(()=>{const W=new AbortController;if(t==="ark")return P(!0),M(""),xz(W.signal).then(G=>{if(W.signal.aborted)return;T(G.keys);const H=G.keys.find(se=>se.id===r)??G.keys.find(se=>se.name===s)??G.keys.find(se=>se.id===G.defaultKeyId)??G.keys.find(se=>se.status!=="Restricted");H&&H.id!==r&&v(H)}).catch(G=>{W.signal.aborted||M(G instanceof Error?G.message:E("workbench.model.credentialsLoadError"))}).finally(()=>{W.signal.aborted||P(!1)}),()=>W.abort()},[r,s,e,v,t,E]),p.useEffect(()=>{if(t!=="ark"||!r){A([]),D(!1),L(null);return}const W=new AbortController;return D(!0),L(null),M(""),B1({apiKeyId:r,signal:W.signal}).then(G=>{if(W.signal.aborted)return;const H=L7e(G.models,G.apiKeyModelPermissions);A(H);const se=new Set(H.filter(X=>X.apiKeyAllowed===!1||X.unavailableReason).map(X=>X.id));se.has(i.trim())&&y("");const Y=h.filter(X=>typeof X!="string"||!se.has(X));Y.length!==h.length&&w(Y)}).catch(G=>{W.signal.aborted||M(G instanceof Error?G.message:E("workbench.model.modelsLoadError"))}).finally(()=>{W.signal.aborted||(D(!1),L(r))}),()=>W.abort()},[r,e,t,E]),p.useEffect(()=>{C(t==="ark"&&(N||!!r&&(I||_!==r)))},[r,_,N,I,C,t]);const V=[{value:"ark",label:e==="byteplus"?"BytePlus ModelArk":E("workbench.model.volcengineArk")},{value:"custom",label:E("workbench.model.custom")},{value:"gateway",label:E("workbench.model.gateway"),description:E("workbench.model.comingSoon"),disabled:!0}],q=j.map(W=>({value:W.id,label:W.name||E("modelApiKey.unnamed"),description:cU(W,E),disabled:W.status==="Restricted"}));r&&!q.some(W=>W.value===r)&&q.unshift({value:r,label:s||E("workbench.model.currentApiKey")});const U=p.useMemo(()=>{const W=R.map(G=>({value:G.id,label:G.displayName||G.name||G.id,metadata:[G.id,G.vendorName,G.apiKeyAllowed===!1?E("modelApiKey.noModelPermission"):G.unavailableReason?E(`modelApiKey.permissionState.${G.unavailableReason}`):G.available||G.lifecycleStatus==="Retiring"?E("modelApiKey.modelAvailable"):E("traditional.model.notActivated")].filter(Boolean).join(" · "),disabled:G.apiKeyAllowed===!1||!!G.unavailableReason||!(G.available||G.lifecycleStatus==="Retiring"),model:G}));return i&&!W.some(G=>G.value===i)&&W.unshift({value:i,label:i,metadata:i}),W},[R,i,E]),J=p.useMemo(()=>new Set(E7e(i,h).map(W=>W.trim())),[h,i]),z=W=>{const G=W.trim(),H=U.filter(se=>{const Y=se.value.trim(),X=Y!==G&&J.has(Y),ie=Y!==G&&Y===i.trim();return!X&&!ie});return G&&!H.some(se=>se.value===G)&&H.unshift({value:G,label:G,metadata:E("workbench.model.currentConfiguration")}),H},Z=(W,G)=>{const H=[...h];H[W]=G,w(Ru(i,H))},ne=!MK(l);return a.jsxs("div",{className:"new-agent-workbench__model-group",children:[a.jsx("span",{className:"new-agent-workbench__model-group-label",children:E("workbench.model.label")}),a.jsxs("div",{className:"new-agent-workbench__model-fields",children:[a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsx("span",{className:"new-agent-workbench__model-field-label",children:E("workbench.model.source")}),a.jsx(ha,{value:t,options:V,size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,pill:!1,onChange:W=>b(W.value)})]}),t==="ark"?a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsxs("span",{className:"new-agent-workbench__model-field-label",children:["API Key",a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(ha,{value:r??"",options:q,loading:N,loadingPlaceholder:E("workbench.model.loadingApiKeys"),placeholder:E("workbench.model.selectApiKey"),searchPlaceholder:E("modelApiKey.search"),searchEmptyMessage:E("modelApiKey.noMatches"),searchPredicate:(W,G)=>$7e(G,W.label,typeof W.description=="string"?W.description:""),size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,pill:!1,onChange:W=>{const G=j.find(H=>H.id===W.value);G&&(C(!0),v(G))}})]}),a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsxs("span",{className:"new-agent-workbench__model-field-label",children:[E("workbench.model.label"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(ha,{value:i,options:U,loading:I,loadingPlaceholder:E("workbench.model.loadingModels"),placeholder:E("workbench.model.selectModel"),searchPlaceholder:E("workbench.model.searchModels"),searchEmptyMessage:E("workbench.model.noModels"),size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:`${nh} new-agent-workbench__model-option`,OptionView:hce,searchPredicate:pce,pill:!1,disabled:!r,onChange:W=>y(W.value)})]}),m?a.jsx(BP,{variant:"workbench",primaryModelName:i,agentName:n,value:h,secretValues:u,configuredSecretEnvKeys:f,showMissingApiKeyErrors:g,onChange:w,onSecretChange:S,renderSameProviderField:({index:W,value:G})=>a.jsx(ha,{value:G,options:z(G),loading:I,loadingPlaceholder:E("workbench.model.loadingModels"),placeholder:E("workbench.model.fallbackPlaceholder"),searchPlaceholder:E("workbench.model.searchModels"),searchEmptyMessage:E("workbench.model.noModels"),size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:`${nh} new-agent-workbench__model-option`,OptionView:hce,searchPredicate:pce,pill:!1,disabled:!r||I,onChange:H=>Z(W,H.value)})}):null]}):a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsxs("span",{className:"new-agent-workbench__model-field-label",children:[E("workbench.model.name"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(_s,{value:i,size:"xl",gutterSize:"md",pill:!1,onChange:W=>y(W.currentTarget.value)})]}),a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsx("span",{className:"new-agent-workbench__model-field-label",children:E("workbench.model.provider")}),a.jsx(_s,{value:o,placeholder:"openai",size:"xl",gutterSize:"md",pill:!1,onChange:W=>x(W.currentTarget.value)})]}),a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsx("span",{className:"new-agent-workbench__model-field-label",children:"API Base"}),a.jsx(_s,{type:"url",inputMode:"url",value:l,placeholder:Po(e),invalid:ne,size:"xl",gutterSize:"md",pill:!1,onChange:W=>O(W.currentTarget.value)}),ne?a.jsx("small",{className:"new-agent-workbench__error",children:E("workbench.model.invalidApiBase")}):null]}),a.jsxs("label",{className:"new-agent-workbench__field new-agent-workbench__model-field",children:[a.jsxs("span",{className:"new-agent-workbench__model-field-label",children:["API Key",a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(_s,{type:"password",value:c,placeholder:d&&!c?"••••••":E("workbench.model.apiKeyPlaceholder"),autoComplete:"new-password",size:"xl",gutterSize:"md",pill:!1,onChange:W=>k(W.currentTarget.value)})]}),m?a.jsx(BP,{variant:"workbench",primaryModelName:i,agentName:n,value:h,secretValues:u,configuredSecretEnvKeys:f,showMissingApiKeyErrors:g,onChange:w,onSecretChange:S}):null]}),F?a.jsx("p",{className:"new-agent-workbench__error",role:"alert",children:F}):null]})]})}function zan({value:e,disabled:t,onChange:n}){const{t:i}=Te("create"),[r,s]=p.useState([]),[o,l]=p.useState(!0),[c,u]=p.useState(""),[d,f]=p.useState(0);p.useEffect(()=>{const g=new AbortController;return l(!0),u(""),RD(g.signal).then(b=>{g.signal.aborted||s(b)}).catch(b=>{!g.signal.aborted&&(b==null?void 0:b.name)!=="AbortError"&&(s([]),u(b instanceof Error?b.message:String(b)))}).finally(()=>{g.signal.aborted||l(!1)}),()=>g.abort()},[d]);const h=p.useMemo(()=>[...r].sort((g,b)=>Number(b.isCurrent)-Number(g.isCurrent)).map(g=>({value:g.uid,label:g.name.trim()||i("workbench.identity.unnamedPool"),description:g.isCurrent?i("workbench.identity.currentPool",{value:g.domain||g.uid}):g.domain||g.uid})),[r,i]),m=r.find(g=>g.uid===e);return a.jsxs("div",{className:"new-agent-workbench__field",children:[a.jsxs("span",{children:[i("workbench.identity.userPool"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(ha,{value:e,options:h,loading:o,loadingPlaceholder:i("workbench.identity.loading"),placeholder:i("workbench.identity.placeholder"),searchPlaceholder:i("workbench.identity.search"),searchEmptyMessage:i("workbench.identity.empty"),size:"xl",pill:!1,disabled:t||!!c,triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,onChange:g=>n(g.value)}),c?a.jsxs("div",{className:"new-agent-workbench__inline-error",role:"alert",children:[a.jsx("span",{children:c}),a.jsx(_t,{color:"secondary",variant:"ghost",size:"sm",pill:!1,onClick:()=>f(g=>g+1),children:i("common.retry")})]}):m!=null&&m.isCurrent?a.jsx("small",{className:"new-agent-workbench__helper-text",children:i("workbench.identity.currentHint")}):m?a.jsx("small",{className:"new-agent-workbench__error",children:i("workbench.identity.mismatchHint")}):a.jsx("small",{className:"new-agent-workbench__helper-text",children:i("workbench.identity.selectionHint")})]})}function gce({name:e,value:t,required:n=!1,placeholder:i,locked:r=!1,onRename:s,onValueChange:o,onRemove:l}){const{t:c}=Te("create"),[u,d]=p.useState(e);p.useEffect(()=>d(e),[e]);const f=()=>{const h=u.trim().toUpperCase();if(!h){d(e);return}d(h),h!==e&&s(e,h)};return a.jsxs("div",{className:`new-agent-workbench__env-row${r?" is-locked":""}`,role:"row",children:[a.jsx("div",{className:"new-agent-workbench__env-cell",role:"cell",children:a.jsx(_s,{"aria-label":c("workbench.environmentVariables.nameAriaLabel"),value:u,title:r?e:void 0,size:"xl",gutterSize:"md",pill:!1,disabled:r,onChange:h=>d(h.currentTarget.value),onBlur:f,onKeyDown:h=>{h.key==="Enter"&&h.currentTarget.blur()}})}),a.jsx("div",{className:"new-agent-workbench__env-cell",role:"cell",children:a.jsx(_s,{"aria-label":c("workbench.environmentVariables.valueAriaLabel",{name:e}),value:t,size:"xl",gutterSize:"md",pill:!1,type:/(SECRET|PASSWORD|KEY|TOKEN)$/.test(e)?"password":"text",placeholder:i,required:n,onChange:h=>o(h.currentTarget.value)})}),a.jsx("div",{className:"new-agent-workbench__env-action",role:"cell",children:r?n?a.jsx("span",{className:"new-agent-workbench__required","aria-label":c("common.required"),children:"*"}):null:a.jsx(_t,{color:"secondary",variant:"ghost",size:"lg",uniform:!0,pill:!1,"aria-label":c("workbench.environmentVariables.deleteNamed",{name:e}),onClick:l,children:a.jsx(mat,{"aria-hidden":!0})})})]})}function Van({draft:e,cloudProvider:t,deployRegion:n,runtimeName:i,isRuntimeUpdate:r=!1,profileOnly:s=!1,deploying:o,deployStage:l,deployError:c,deploySucceeded:u,showErrors:d,onBack:f,onDraftPatch:h,onDeploymentPatch:m,onModelApiKeyChange:g,customModelApiKey:b,customModelSecretValues:v,customModelApiKeyConfigured:y,configuredRuntimeEnvKeys:w,showModelFallbacks:x=!0,onCustomModelApiKeyChange:O,onCustomModelSecretChange:k,onSelectedSkillsChange:S,onCloudEnvironmentChange:C,onDeployRegionChange:E,onRuntimeNameChange:j,onNetworkChange:T,onDeploy:R}){var At,It,Gt,Xe,wt,vt,tn,Qt,cn;const{t:A}=Te("create"),N=SD(),[P,I]=p.useState("agent"),[D,_]=p.useState(!1),L=p.useRef(null),[F,M]=p.useState(!1),[V,q]=p.useState(!1),[U,J]=p.useState(!0),[z,Z]=p.useState("api_key"),[ne,W]=p.useState(""),[G,H]=p.useState(()=>{const Me=e.shortTermBackend||"local";return e.memory.shortTerm&&mce(Me)?Me:"local"}),se=Uan(G),[Y,X]=p.useState("1"),[ie,ee]=p.useState(se==="in-memory"?"1":"5"),[be,ue]=p.useState(!1),[pe,ke]=p.useState(O9e),[je,Pe]=p.useState(""),[Ee,ze]=p.useState(null),[_e,ae]=p.useState({top:!1,bottom:!1}),le=p.useRef(null),ge=jj.findIndex(Me=>Me.id===P),Oe={...jj[ge],label:A(`workbench.steps.${P}.label`),title:A(`workbench.steps.${P}.title`),description:A(`workbench.steps.${P}.description`)},Se=d||F,We=Se||V,Ye=KT(e.name,Me=>A(`validation.agentName.${Me}`)),ye=Ye!==null,we=!e.description.trim(),Ae=!e.instruction.trim(),He=cm(e,t),Ue=!((At=e.modelName)!=null&&At.trim()),jt=p.useMemo(()=>T7e(e,Po(t),v,w),[t,w,v,e]),Pt=!s&&He==="ark"&&!((Gt=(It=e.deployment)==null?void 0:It.modelApiKeyId)!=null&&Gt.trim())||!!jt,Kt=Pt&&(Se||!U),Ct=ye||we||Ae||Ue||Pt,xt=((wt=(Xe=e.deployment)==null?void 0:Xe.network)==null?void 0:wt.mode)??"public",tt=(vt=e.deployment)==null?void 0:vt.network,mt=_u(t),Ne=((tn=e.deployment)==null?void 0:tn.envValues)??{},Ot=uw.find(Me=>Me.id===G)??uw[0],Nt=((Ot==null?void 0:Ot.env)??[]).filter(Me=>!Me.hidden),Yt=new Set(Nt.map(Me=>Me.key)),xn=Object.entries(Ne).filter(([Me])=>Me!=="FEISHU_APP_ID"&&Me!=="FEISHU_APP_SECRET"&&!Yt.has(Me)),Ke=(Me,on)=>{m({envValues:{...Ne,[Me]:on}})},St=(Me,on)=>{const On=Object.fromEntries(Object.entries(Ne).map(([Sn,Qi])=>Sn===Me?[on,Qi]:[Sn,Qi]));m({envValues:On})},qe=Me=>{const on={...Ne};delete on[Me],m({envValues:on})},nt=()=>{let Me=xn.length+1,on=`CUSTOM_ENV_${Me}`;for(;on in Ne;)on=`CUSTOM_ENV_${++Me}`;Ke(on,"")};p.useEffect(()=>{const Me=le.current;if(!Me)return;const on=()=>{const un={top:Me.scrollTop>1,bottom:Me.scrollTop+Me.clientHeightlr.top===un.top&&lr.bottom===un.bottom?lr:un)};Me.scrollTo({top:0,behavior:"auto"}),Me.addEventListener("scroll",on,{passive:!0});const On=new ResizeObserver(on);On.observe(Me);const Sn=new MutationObserver(on);Sn.observe(Me,{childList:!0,subtree:!0});const Qi=window.requestAnimationFrame(on);return()=>{window.cancelAnimationFrame(Qi),Me.removeEventListener("scroll",on),On.disconnect(),Sn.disconnect()}},[P]),p.useEffect(()=>{X("1"),ee(se==="in-memory"?"1":"5")},[se]);const et=()=>{if(ge===0){if(D)return;if(N){f();return}L.current=f,_(!0);return}I(jj[ge-1].id)},ft=()=>{if(!D)return;const Me=L.current;L.current=null,Me==null||Me()},Et=()=>{if(P==="agent"){if(M(!0),Ct)return;if(s){R({authentication:{type:"api_key"},sessionStorage:se,sessionBackend:G,minInstance:Number(Y)||1,maxInstance:Number(ie)||1,createEvaluationSets:!1,resources:pe});return}I("environment");return}if(P==="environment"){I("deployment");return}const Me=Number(Y),on=Number(ie);if(!Y.trim()||!ie.trim()||!Number.isSafeInteger(Me)||Me<0||!Number.isSafeInteger(on)||on<1){Pe(A("workbench.validation.instanceIntegers"));return}if(Me>on){Pe(A("workbench.validation.instanceOrder"));return}if(z==="user_pool"&&!ne){Pe(A("workbench.validation.userPoolRequired"));return}const On=S9e(pe);if(On){ze(On),Pe(On);return}ze(null),Pe(""),R({authentication:z==="user_pool"?{type:"user_pool",userPoolUid:ne}:{type:"api_key"},sessionStorage:se,sessionBackend:G,minInstance:Me,maxInstance:on,createEvaluationSets:t==="byteplus"?!1:be,resources:pe})};return a.jsxs(Cr.div,{className:`new-agent-workbench${D?" is-leaving":""}`,initial:N?!1:{opacity:0},animate:{opacity:D?0:1},transition:{duration:D?.12:.18,ease:[.16,1,.3,1]},onAnimationComplete:ft,children:[a.jsx("main",{className:"new-agent-workbench__main","aria-label":A("workbench.ariaLabel"),children:a.jsxs("section",{className:"new-agent-workbench__form","aria-labelledby":"new-agent-workbench-title",children:[a.jsx(ff,{mode:"wait",initial:!1,children:a.jsxs(Cr.div,{className:"new-agent-workbench__heading",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:"easeOut"},children:[a.jsx("h1",{id:"new-agent-workbench-title",children:Oe.title}),a.jsx("p",{children:Oe.description})]},`heading-${P}`)}),a.jsxs("div",{className:"new-agent-workbench__panel-frame",children:[a.jsx("div",{ref:le,className:"new-agent-workbench__panel",children:a.jsxs(ff,{mode:"wait",initial:!1,children:[P==="agent"?a.jsxs(Cr.div,{className:"new-agent-workbench__fields",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:"easeOut"},children:[a.jsxs("label",{className:"new-agent-workbench__field","data-validation-field":"name",children:[a.jsxs("span",{className:"new-agent-workbench__field-heading",children:[a.jsxs("span",{children:[A("common.name"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsxs("small",{children:[e.name.length,"/50"]})]}),a.jsx(_s,{value:e.name,maxLength:50,size:"xl",gutterSize:"md",pill:!1,invalid:We&&ye,placeholder:A("workbench.agent.namePlaceholder"),"aria-describedby":We&&Ye?"new-agent-workbench-name-error":void 0,onBlur:()=>q(!0),onChange:Me=>{q(!0),h({name:Me.currentTarget.value})}}),We&&Ye?a.jsx("small",{id:"new-agent-workbench-name-error",className:"new-agent-workbench__error",role:"alert",children:Ye}):null]}),a.jsxs("label",{className:"new-agent-workbench__field","data-validation-field":"description",children:[a.jsxs("span",{children:[A("common.description"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(vb,{value:e.description,rows:4,maxRows:8,autoResize:!0,size:"xl",gutterSize:"md",invalid:Se&&we,placeholder:A("workbench.agent.descriptionPlaceholder"),onChange:Me=>h({description:Me.currentTarget.value})}),Se&&we?a.jsx("small",{className:"new-agent-workbench__error",children:A("workbench.validation.descriptionRequired")}):null]}),a.jsxs("label",{className:"new-agent-workbench__field","data-validation-field":"instruction",children:[a.jsxs("span",{children:[A("workbench.agent.prompt"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(vb,{value:e.instruction,rows:10,maxRows:18,autoResize:!0,size:"xl",gutterSize:"md",invalid:Se&&Ae,placeholder:A("workbench.agent.promptPlaceholder"),onChange:Me=>h({instruction:Me.currentTarget.value})}),Se&&Ae?a.jsx("small",{className:"new-agent-workbench__error",children:A("workbench.validation.promptRequired")}):null]}),a.jsx(Qan,{cloudProvider:t,source:He,agentName:e.name,value:e.modelName??"",apiKeyId:(Qt=e.deployment)==null?void 0:Qt.modelApiKeyId,apiKeyName:(cn=e.deployment)==null?void 0:cn.modelApiKeyName,provider:e.modelProvider??"",apiBase:e.modelApiBase??"",customApiKey:b,customModelSecretValues:v,customModelApiKeyConfigured:y,configuredRuntimeEnvKeys:w,fallbacks:e.modelFallbacks??[],showModelFallbacks:x,showMissingApiKeyErrors:Kt,onSourceChange:Me=>{var On;J(Me==="ark");const on=Me==="custom"&&He==="ark"?"":Me==="ark"&&!((On=e.modelName)!=null&&On.trim())?Gp(t):e.modelName;h({modelSource:Me,modelName:on,modelFallbacks:Me==="custom"&&He==="ark"?[]:Ru(on,e.modelFallbacks)})},onApiKeyChange:g,onModelNameChange:Me=>h({modelName:Me,modelFallbacks:Ru(Me,e.modelFallbacks)}),onModelFallbacksChange:Me=>h({modelFallbacks:Me}),onProviderChange:Me=>h({modelProvider:Me}),onApiBaseChange:Me=>h({modelApiBase:Me}),onCustomApiKeyChange:O,onCustomModelSecretChange:k,onLoadingChange:J}),Se&&Ue?a.jsx("p",{className:"new-agent-workbench__error",role:"alert",children:A("workbench.validation.modelRequired")}):null,Kt?a.jsx("p",{className:"new-agent-workbench__error",role:"alert",children:A("workbench.validation.apiKeyRequired")}):null,a.jsxs("div",{className:"new-agent-workbench__field",children:[a.jsx("span",{children:A("workbench.agent.skills")}),a.jsx(yK,{selected:e.selectedSkills??[],onChange:S,cloudProvider:t,disabled:o,addLabel:A("workbench.agent.addSkill"),showSelectedCount:!1})]})]},"agent"):null,P==="environment"&&!s?a.jsx(Cr.div,{className:"new-agent-workbench__fields",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:"easeOut"},children:a.jsx("div",{className:"new-agent-workbench__environment",children:a.jsx(nUe,{value:e.cloudEnvironment??{environmentId:"",environmentVersionId:""},onChange:C,disabled:o,controlSize:"xl",controlClassName:"new-agent-workbench__select-trigger",optionClassName:nh})})},"environment"):null,P==="deployment"&&!s?a.jsxs(Cr.div,{className:"new-agent-workbench__fields",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:"easeOut"},children:[a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsxs("span",{children:[A("workbench.deployment.runtimeName"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(_s,{value:i,disabled:o||r,size:"xl",gutterSize:"md",pill:!1,placeholder:"agent-runtime",onChange:Me=>j(Me.currentTarget.value)}),a.jsx("small",{className:"new-agent-workbench__helper-text",children:A(r?"workbench.deployment.runtimeNameUpdateHint":"workbench.deployment.runtimeNameHint")})]}),a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsxs("span",{children:[A("workbench.deployment.region"),a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(ha,{value:n,options:mt,size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,pill:!1,disabled:o||r,onChange:Me=>E(Me.value)})]}),a.jsxs("div",{className:"new-agent-workbench__deployment-section",children:[a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsx("span",{children:A("workbench.deployment.authentication")}),a.jsx(ha,{value:z,options:[{value:"api_key",label:"API Key",description:A("workbench.deployment.apiKeyDescription")},{value:"user_pool",label:A("workbench.identity.userPool"),description:A("workbench.deployment.userPoolDescription")}],size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,pill:!1,disabled:o,onChange:Me=>{Z(Me.value),Pe("")}})]}),z==="user_pool"?a.jsx(zan,{value:ne,disabled:o,onChange:Me=>{W(Me),Pe("")}}):null]}),a.jsx("div",{className:"new-agent-workbench__deployment-section",children:a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsx("span",{children:A("workbench.deployment.sessionStorage")}),a.jsx(ha,{value:G,options:uw.map(Me=>({value:Me.id,label:Me.id==="local"?A("workbench.deployment.inMemoryStorage"):A(`workbench.deployment.backends.${Me.id}`,{defaultValue:Me.label})})),size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,pill:!1,disabled:o,onChange:Me=>{mce(Me.value)&&(H(Me.value),h({memory:{...e.memory,shortTerm:Me.value!=="local"},shortTermBackend:Me.value}),Pe(""))}})]})}),a.jsxs("div",{className:"new-agent-workbench__deployment-section",children:[a.jsx("strong",{className:"new-agent-workbench__section-title",children:A("workbench.deployment.instances")}),a.jsxs("div",{className:"new-agent-workbench__instance-fields",children:[a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsx("span",{className:"new-agent-workbench__model-field-label",children:A("workbench.deployment.minInstances")}),a.jsx(_s,{type:"number",min:0,step:1,value:Y,size:"xl",gutterSize:"md",pill:!1,disabled:o,onChange:Me=>{X(Me.currentTarget.value),Pe("")}})]}),a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsx("span",{className:"new-agent-workbench__model-field-label",children:A("workbench.deployment.maxInstances")}),a.jsx(_s,{type:"number",min:1,step:1,value:ie,size:"xl",gutterSize:"md",pill:!1,disabled:o,onChange:Me=>{ee(Me.currentTarget.value),Pe("")}})]})]}),se==="in-memory"?a.jsx("small",{className:"new-agent-workbench__helper-text",children:A("workbench.deployment.inMemoryHint")}):null]}),a.jsxs("div",{className:"new-agent-workbench__deployment-section",children:[a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsx("span",{children:A("workbench.deployment.networkMode")}),a.jsx(ha,{value:xt,options:[{value:"public",label:A("workbench.deployment.network.public")},{value:"private",label:A("workbench.deployment.network.private")},{value:"both",label:A("workbench.deployment.network.both")}],size:"xl",triggerClassName:"new-agent-workbench__select-trigger",optionClassName:nh,pill:!1,onChange:Me=>T(Me.value==="public"?void 0:{...tt??{},mode:Me.value})})]}),xt!=="public"?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"new-agent-workbench__field-row",children:[a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsxs("span",{children:["VPC ID",a.jsx("span",{className:"new-agent-workbench__required",children:"*"})]}),a.jsx(_s,{value:(tt==null?void 0:tt.vpcId)??"",size:"xl",gutterSize:"md",pill:!1,placeholder:"vpc-xxx",onChange:Me=>T({...tt??{mode:xt},vpcId:Me.currentTarget.value})})]}),a.jsxs("label",{className:"new-agent-workbench__field",children:[a.jsx("span",{children:A("workbench.deployment.subnetIds")}),a.jsx(_s,{value:(tt==null?void 0:tt.subnetIds)??"",size:"xl",gutterSize:"md",pill:!1,placeholder:"subnet-xxx",onChange:Me=>T({...tt??{mode:xt},subnetIds:Me.currentTarget.value})})]})]}),a.jsxs("div",{className:"new-agent-workbench__switch-row",children:[a.jsxs("div",{children:[a.jsx("strong",{children:A("workbench.deployment.sharedInternet")}),a.jsx("span",{children:A("workbench.deployment.sharedInternetHint")})]}),a.jsx(nU,{checked:!!(tt!=null&&tt.enableSharedInternetAccess),onCheckedChange:Me=>T({...tt??{mode:xt},enableSharedInternetAccess:Me}),"aria-label":A("workbench.deployment.sharedInternet")})]})]}):null]}),t!=="byteplus"?a.jsxs("div",{className:"new-agent-workbench__deployment-section",children:[a.jsx("strong",{className:"new-agent-workbench__section-title",children:A("workbench.deployment.evaluationSets")}),a.jsxs("div",{className:"new-agent-workbench__switch-row",children:[a.jsxs("div",{children:[a.jsx("strong",{children:A("workbench.deployment.createEvaluationSets")}),a.jsx("span",{children:A("workbench.deployment.evaluationSetsHint")})]}),a.jsx(nU,{checked:be,onCheckedChange:ue,"aria-label":A("workbench.deployment.createEvaluationSets")})]})]}):null,a.jsxs("div",{className:"new-agent-workbench__deployment-section",children:[a.jsx("strong",{className:"new-agent-workbench__section-title",children:A("workbench.deployment.resources")}),a.jsx(E9e,{value:pe,agentName:e.name||"agentkit-app",runtimeName:i,region:n,disabled:o,validationError:Ee,onChange:Me=>{ke(Me),ze(null),Pe("")}})]}),a.jsxs("div",{className:"new-agent-workbench__deployment-section",children:[a.jsxs("div",{className:"new-agent-workbench__env-head",children:[a.jsx("strong",{className:"new-agent-workbench__section-title",children:A("workbench.environmentVariables.title")}),a.jsxs(_t,{color:"secondary",variant:"ghost",size:"sm",pill:!1,onClick:nt,children:[a.jsx(Nje,{"aria-hidden":!0}),A("workbench.environmentVariables.add")]})]}),a.jsxs("div",{className:"new-agent-workbench__env-table",role:"table","aria-label":A("workbench.environmentVariables.title"),children:[a.jsxs("div",{className:"new-agent-workbench__env-table-head",role:"row",children:[a.jsx("span",{role:"columnheader",children:A("common.name")}),a.jsx("span",{role:"columnheader",children:A("common.value")}),a.jsx("span",{role:"columnheader",children:A("common.actions")})]}),a.jsxs("div",{className:"new-agent-workbench__env-table-body",role:"rowgroup",children:[Nt.map(Me=>a.jsx(gce,{name:Me.key,value:Ne[Me.key]??Me.defaultValue??"",required:Me.required,placeholder:Me.placeholder,locked:!0,onRename:()=>{},onValueChange:on=>Ke(Me.key,on),onRemove:()=>{}},Me.key)),xn.map(([Me,on])=>a.jsx(gce,{name:Me,value:on,onRename:St,onValueChange:On=>Ke(Me,On),onRemove:()=>qe(Me)},Me)),!Nt.length&&!xn.length?a.jsx("div",{className:"new-agent-workbench__empty-row new-agent-workbench__env-table-empty",role:"row",children:a.jsx("span",{role:"cell",children:A("common.none")})}):null]})]})]}),je?a.jsx(xb,{message:je,defaultExpanded:!0}):c?a.jsx(xb,{message:c,defaultExpanded:!0}):l||u?a.jsxs("div",{className:"new-agent-workbench__deploy-status",role:"status",children:[u?a.jsx(Tje,{"aria-hidden":!0}):null,a.jsx("span",{children:(l?mL(l):"")||A(u?"workbench.deployment.complete":"workbench.deployment.preparing")}),typeof(l==null?void 0:l.pct)=="number"?a.jsxs("strong",{children:[Math.round(l.pct),"%"]}):null]}):null]},"deployment"):null]})}),a.jsx("span",{className:`new-agent-workbench__scroll-fade is-top${_e.top?" is-visible":""}`,"aria-hidden":"true"}),a.jsx("span",{className:`new-agent-workbench__scroll-fade is-bottom${_e.bottom?" is-visible":""}`,"aria-hidden":"true"})]}),a.jsx(ff,{mode:"wait",initial:!1,children:a.jsxs(Cr.div,{className:"new-agent-workbench__actions",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.16,ease:"easeOut"},children:[a.jsxs(_t,{color:"secondary",variant:"outline",size:"lg",pill:!1,disabled:o,onClick:et,children:[a.jsx(Xst,{"aria-hidden":!0}),A(ge===0?"common.back":"common.previous")]}),a.jsx(_t,{color:"primary",size:"lg",pill:!1,loading:o,disabled:o||P==="agent"&&(U||Kt),onClick:Et,children:A(s?u?"workbench.actions.applyProfileAgain":"workbench.actions.applyProfile":P==="deployment"?u?r?"workbench.actions.updateAgain":"workbench.actions.deployAgain":r?"workbench.actions.updateAndPublish":"common.deploy":"common.next")})]},`actions-${P}`)})]})}),a.jsx("footer",{className:"new-agent-workbench__footer",children:a.jsx("div",{className:"new-agent-workbench__footer-inner",children:a.jsx("nav",{"aria-label":A("workbench.progress"),children:a.jsx("ol",{className:"new-agent-workbench__progress",children:jj.map((Me,on)=>a.jsx("li",{className:on===ge?"is-active":"","aria-current":on===ge?"step":void 0,"aria-label":A(`workbench.steps.${Me.id}.label`),title:A(`workbench.steps.${Me.id}.label`),children:a.jsx("span",{"aria-hidden":"true"})},Me.id))})})})})]})}async function Han(e){const t=await fetch(e,{headers:{accept:"application/json"},signal:po(void 0,ho)});if(t.status===409)throw new Error(Xt("helpers.a2aSpaces.credentialsMissing"));if(t.status===401)throw new Error(Xt("helpers.a2aSpaces.loginRequired"));if(!t.ok){let n="";try{n=(await t.json()).detail||""}catch{}throw new Error(Xt("helpers.requestFailed",{status:t.status,detail:n?`: ${n}`:""}))}return t.json()}async function qan(e={}){const t=new URLSearchParams({page_size:String(e.pageSize??100),project:e.project||"default"});return e.region&&t.set("region",e.region),(await Han(`/web/a2a-spaces?${t.toString()}`)).items||[]}async function Wan(e){const t=await fetch(e,{headers:{accept:"application/json"},signal:po(void 0,ho)});if(t.status===409)throw new Error(Xt("helpers.vikingKnowledge.credentialsMissing"));if(t.status===401)throw new Error(Xt("helpers.vikingKnowledge.loginRequired"));if(!t.ok){let n="";try{n=(await t.json()).detail||""}catch{}throw new Error(Xt("helpers.requestFailed",{status:t.status,detail:n?`: ${n}`:""}))}return t.json()}async function Kan(e={}){const t=new URLSearchParams;e.project&&t.set("project",e.project),e.region&&t.set("region",e.region);const n=t.toString();return(await Wan(`/web/viking-knowledgebases${n?`?${n}`:""}`)).items||[]}async function Gan(e){const t=await fetch(e,{headers:{accept:"application/json"},signal:po(void 0,ho)});if(t.status===409)throw new Error(Xt("helpers.vikingMemory.credentialsMissing"));if(t.status===401)throw new Error(Xt("helpers.vikingMemory.loginRequired"));if(!t.ok){let n="";try{n=(await t.json()).detail||""}catch{}throw new Error(Xt("helpers.requestFailed",{status:t.status,detail:n?`: ${n}`:""}))}return t.json()}async function Xan(e={}){const t=new URLSearchParams;e.project&&t.set("project",e.project),e.region&&t.set("region",e.region);const n=t.toString();return(await Gan(`/web/viking-memories${n?`?${n}`:""}`)).items||[]}const bce=["#6366f1","#0ea5e9","#10b981","#f59e0b","#f43f5e","#a855f7","#14b8a6","#f472b6"];function M6(e){let t=0;for(let n=0;n>>0;return bce[t%bce.length]}const Yan=2,Zan=1500;function Jan(e){return e.includes("HTTP 425")||e.includes("仍在采集中")?"collecting":e.includes("HTTP 404")||e.includes("未开启链路观测")?"disabled":/HTTP 40[13]/.test(e)||e.includes("无权限读取 APMPlus")?"forbidden":"error"}function eon(e){const t=new Map;e.forEach(u=>t.set(u.span_id,u));const n=new Map,i=[];for(const u of e)u.parent_span_id!=null&&t.has(u.parent_span_id)?(n.get(u.parent_span_id)??n.set(u.parent_span_id,[]).get(u.parent_span_id)).push(u):i.push(u);const r=(u,d)=>u.start_time-d.start_time,s=(u,d)=>({span:u,depth:d,children:(n.get(u.span_id)??[]).sort(r).map(f=>s(f,d+1))}),o=i.sort(r).map(u=>s(u,0)),l=e.length?Math.min(...e.map(u=>u.start_time)):0,c=e.length?Math.max(...e.map(u=>u.end_time)):1;return{rootNodes:o,min:l,total:c-l||1}}function ton(e,t){const n=[],i=r=>{n.push(r),t.has(r.span.span_id)||r.children.forEach(i)};return e.forEach(i),n}function yce(e){const t=e/1e6;return t>=1e3?`${(t/1e3).toFixed(2)} s`:`${t.toFixed(t<10?2:1)} ms`}const non=e=>e.replace(/^(gen_ai|a2ui|adk)\./,"");function vce(e){return Object.entries(e.attributes).filter(([,t])=>t!=null&&typeof t!="object").map(([t,n])=>{const i=String(n);return{key:non(t),value:i,long:i.length>80||i.includes(` -`)}}).sort((t,n)=>Number(t.long)-Number(n.long))}function iUe({appName:e,testRunId:t,sessionId:n,endTimeMs:i,onClose:r,title:s}){const{t:o}=Te("conversation"),[l,c]=p.useState(null),[u,d]=p.useState("loading"),[f,h]=p.useState(0),[m,g]=p.useState(new Set),[b,v]=p.useState(null),y=p.useRef(0),w=`${e??""}:${t??""}:${n}:${i??""}`,x=p.useRef(w);p.useEffect(()=>{x.current!==w&&(x.current=w,y.current=0),c(null),d("loading");let A=!1,N,P;if(t)P=N2e(t,n);else if(e)P=ZR(e,n,i);else{d("error");return}return P.then(I=>{A||(c(I),d("ready"),v(I.length?I.reduce((D,_)=>D.start_time<=_.start_time?D:_).span_id:null))}).catch(I=>{if(A)return;const D=Jan(I instanceof Error?I.message:String(I));d(D),D==="collecting"&&y.currenth(_=>_+1),Zan))}),()=>{A=!0,N!==void 0&&window.clearTimeout(N)}},[e,i,f,n,w,t]);const O=()=>{y.current=0,h(A=>A+1)},{rootNodes:k,min:S,total:C}=p.useMemo(()=>eon(l??[]),[l]),E=p.useMemo(()=>ton(k,m),[k,m]),j=(l==null?void 0:l.find(A=>A.span_id===b))??null,T=C/1e6,R=A=>g(N=>{const P=new Set(N);return P.has(A)?P.delete(A):P.add(A),P});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"drawer-scrim",onClick:r}),a.jsxs("aside",{className:"drawer drawer--trace",children:[a.jsxs("header",{className:"drawer-head",children:[a.jsxs("div",{children:[a.jsx("div",{className:"drawer-title",children:s??o("trace.title")}),a.jsx("div",{className:"drawer-sub",children:u==="ready"&&l?o("trace.callCount",{count:l.length,duration:T.toFixed(1)}):o(`trace.statuses.${u}`)})]}),a.jsx("button",{className:"drawer-close",onClick:r,"aria-label":o("trace.close"),children:a.jsx(Do,{className:"icon"})})]}),u==="loading"&&a.jsxs("div",{className:"drawer-loading",children:[a.jsx(Fi,{className:"icon spin"})," ",o("trace.loading")]}),u==="collecting"&&a.jsxs("div",{className:"drawer-loading",role:"status","aria-live":"polite",children:[a.jsx(Fi,{className:"icon spin"}),a.jsx("span",{children:o("trace.errors.collecting")}),a.jsx(_t,{type:"button",color:"secondary",variant:"outline",size:"sm",pill:!1,onClick:O,children:o("trace.retryNow")})]}),(u==="disabled"||u==="forbidden"||u==="error")&&a.jsxs("div",{className:"drawer-empty trace-state",role:"alert",children:[a.jsx("span",{children:o(`trace.errors.${u}`)}),u==="error"&&a.jsx(_t,{type:"button",color:"secondary",variant:"outline",size:"sm",pill:!1,onClick:O,children:o("trace.reload")})]}),u==="ready"&&l&&l.length===0&&a.jsx("div",{className:"drawer-empty",children:o("trace.empty")}),E.length>0&&a.jsxs("div",{className:"trace-split",children:[a.jsx("div",{className:"trace-tree scroll",children:E.map(A=>{const N=A.span,P=(N.start_time-S)/C*100,I=Math.max((N.end_time-N.start_time)/C*100,.6),D=A.children.length>0;return a.jsxs("button",{className:`trace-row ${b===N.span_id?"active":""}`,onClick:()=>v(N.span_id),children:[a.jsxs("span",{className:"trace-label",style:{paddingLeft:A.depth*14},children:[a.jsx("span",{className:`trace-caret ${D?"":"hidden"} ${m.has(N.span_id)?"":"open"}`,onClick:_=>{_.stopPropagation(),D&&R(N.span_id)},children:a.jsx(HA,{className:"chev"})}),a.jsx("span",{className:"trace-dot",style:{background:M6(N.name)}}),a.jsx("span",{className:"trace-name",title:N.name,children:N.name})]}),a.jsx("span",{className:"trace-dur",children:yce(N.end_time-N.start_time)}),a.jsx("span",{className:"trace-track",children:a.jsx("span",{className:"trace-bar",style:{left:`${P}%`,width:`${I}%`,background:M6(N.name)}})})]},N.span_id)})}),a.jsx("div",{className:"trace-detail scroll",children:j?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"td-title",children:j.name}),a.jsxs("div",{className:"td-dur",children:[a.jsx("span",{className:"td-dot",style:{background:M6(j.name)}}),yce(j.end_time-j.start_time)]}),a.jsx("div",{className:"td-section",children:o("trace.attributes")}),a.jsx("div",{className:"td-props",children:vce(j).filter(A=>!A.long).map(A=>a.jsxs("div",{className:"td-prop",children:[a.jsx("span",{className:"td-key",children:A.key}),a.jsx("span",{className:"td-val",children:A.value})]},A.key))}),vce(j).filter(A=>A.long).map(A=>a.jsxs("div",{className:"td-block",children:[a.jsx("div",{className:"td-section",children:A.key}),a.jsx("pre",{className:"td-pre",children:A.value})]},A.key))]}):a.jsx("div",{className:"drawer-empty",children:o("trace.selectCall")})})]})]})]})}const ion=p.lazy(()=>Zs(()=>import("../chunks/MarkdownPromptEditor-CiBW7wfN.js"),__vite__mapDeps([2,3]))),dU="veadk.generatedAgentTestRuns",L6=4;function LK(){if(typeof window>"u")return[];try{const e=JSON.parse(window.sessionStorage.getItem(dU)??"[]");return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.length>0):[]}catch{return[]}}function rUe(e){if(typeof window>"u")return;const t=Array.from(new Set(e)).slice(-20);try{t.length?window.sessionStorage.setItem(dU,JSON.stringify(t)):window.sessionStorage.removeItem(dU)}catch{}}function ron(e){rUe([...LK(),e])}function Qk(e){rUe(LK().filter(t=>t!==e))}function son(e,t,n="text/plain"){const i=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),r=document.createElement("a");r.href=i,r.download=e,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(i)}const aon=[{id:"type",label:"traditional.sections.type.label",hint:"traditional.sections.type.hint",icon:Gat,required:!0},{id:"basic",label:"traditional.sections.basic.label",hint:"traditional.sections.basic.hint",icon:_h,required:!0},{id:"model",label:"traditional.sections.model.label",hint:"traditional.sections.model.hint",icon:jat},{id:"tools",label:"traditional.sections.tools.label",hint:"traditional.sections.tools.hint",icon:Zat},{id:"skills",label:"traditional.sections.skills.label",hint:"traditional.sections.skills.hint",icon:hC},{id:"knowledge",label:"traditional.sections.knowledge.label",hint:"traditional.sections.knowledge.hint",icon:bN},{id:"memory",label:"traditional.sections.memory.label",hint:"traditional.sections.memory.hint",icon:Fje},{id:"subagents",label:"traditional.sections.subagents.label",hint:"traditional.sections.subagents.hint",icon:kat},{id:"review",label:"traditional.sections.review.label",hint:"traditional.sections.review.hint",icon:Kat}];function oon({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M9 7.15v9.7a1.15 1.15 0 0 0 1.78.96l7.2-4.85a1.15 1.15 0 0 0 0-1.92l-7.2-4.85A1.15 1.15 0 0 0 9 7.15Z"}),a.jsx("path",{d:"M5.75 8.25v7.5",opacity:"0.8"}),a.jsx("path",{d:"M3 10v4",opacity:"0.45"}),a.jsx("path",{d:"M17.9 5.25v2.2M19 6.35h-2.2",strokeWidth:"1.55"})]})}function xce({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M4.75 7.25h14.5"}),a.jsx("path",{d:"M9.1 4.75h5.8l.75 2.5h-7.3l.75-2.5Z"}),a.jsx("path",{d:"m6.75 7.25.75 12h9l.75-12"}),a.jsx("path",{d:"M10 10.25v5.75M14 10.25v5.75"})]})}function $K({className:e}){return a.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"m7 9 5 5 5-5"})})}function FK({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M18.25 8.2A7.1 7.1 0 0 0 6.1 6.65L4.5 8.25"}),a.jsx("path",{d:"M4.5 4.75v3.5H8"}),a.jsx("path",{d:"M5.75 15.8A7.1 7.1 0 0 0 17.9 17.35l1.6-1.6"}),a.jsx("path",{d:"M19.5 19.25v-3.5H16"})]})}const lon={llm:"traditional.agentTypes.llm.label",sequential:"traditional.agentTypes.sequential.label",parallel:"traditional.agentTypes.parallel.label",loop:"traditional.agentTypes.loop.label",a2a:"traditional.agentTypes.a2a.label"},wce={REGISTRY_SPACE_ID:"registrySpaceId",REGISTRY_TOP_K:"registryTopK",REGISTRY_REGION:"registryRegion",REGISTRY_ENDPOINT:"registryEndpoint"},sUe="REGISTRY_SPACE_ID",con=jIe.filter(e=>e.key!==sUe);function aUe(e,t,n="volcengine"){var s,o,l;if(!(e!=null&&e.enabled))return{};const i=gM(n),r={REGISTRY_SPACE_ID:e.registrySpaceId??""};return t.includeDefaults?(r.REGISTRY_TOP_K=((s=e.registryTopK)==null?void 0:s.trim())||i.topK,r.REGISTRY_REGION=((o=e.registryRegion)==null?void 0:o.trim())||i.region,r.REGISTRY_ENDPOINT=((l=e.registryEndpoint)==null?void 0:l.trim())||i.endpoint):(r.REGISTRY_TOP_K=e.registryTopK??"",r.REGISTRY_REGION=e.registryRegion??"",r.REGISTRY_ENDPOINT=e.registryEndpoint??""),r}function mx(e,t){if(t!=="byteplus")return e;const n=gM(t);return e.map(i=>i.key==="REGISTRY_REGION"?{...i,placeholder:n.region}:i.key==="REGISTRY_ENDPOINT"?{...i,placeholder:n.endpoint}:i.key==="MODEL_EMBEDDING_NAME"?{...i,placeholder:ott(t)}:i.key==="MODEL_EMBEDDING_API_BASE"?{...i,placeholder:Po(t)}:i.key==="MODEL_IMAGE_NAME"?{...i,placeholder:ctt(t)}:i.key==="MODEL_EDIT_NAME"?{...i,placeholder:utt(t)}:i.key==="MODEL_VIDEO_NAME"?{...i,placeholder:dtt(t)}:i.key==="MODEL_IMAGE_API_BASE"||i.key==="MODEL_EDIT_API_BASE"||i.key==="MODEL_VIDEO_API_BASE"?{...i,placeholder:Po(t)}:i)}function uon({items:e,selected:t,onToggle:n,scrollRows:i}){const{t:r}=Te("create");return a.jsx("div",{className:`cw-checklist ${i?"cw-checklist-tools":""}`,style:i?{"--cw-checklist-max-height":`${i*40+(i-1)*8}px`}:void 0,children:e.map(s=>{const o=t.includes(s.id);return a.jsx(DK,{id:`cw-check-${s.id}`,className:`cw-check ${o?"is-on":""}`,checked:o,onCheckedChange:l=>{l!==o&&n(s.id)},label:a.jsx("span",{className:"cw-check-text",children:a.jsx("span",{className:"cw-check-title",children:r(`traditional.catalog.${s.id}.label`,{defaultValue:s.label})})})},s.id)})})}function $6({options:e,value:t,onChange:n,translationGroup:i}){const{t:r}=Te("create");return a.jsx("div",{className:"cw-segmented",children:e.map(s=>{var l;const o=(t??((l=e[0])==null?void 0:l.id))===s.id;return a.jsx("button",{type:"button",className:`cw-seg ${o?"is-on":""}`,onClick:()=>n(s.id),"aria-pressed":o,children:a.jsx("span",{className:"cw-seg-title",children:r(`traditional.backends.${i}.${s.id}.label`,{defaultValue:s.label})})},s.id)})})}function don(e){return/(SECRET|PASSWORD|KEY|TOKEN)$/.test(e)}function zk({env:e,values:t,onChange:n,renderAfterField:i}){const{t:r}=Te("create"),s=e.filter(o=>!o.hidden);return s.length===0?a.jsx("p",{className:"cw-env-empty",children:r("traditional.env.noAdditionalParameters")}):a.jsx("div",{className:"cw-env-fields",children:s.map(o=>{const l=t[o.key]??o.defaultValue??"",c=IK(o,t,r("traditional.env.invalidJson")),u=`cw-env-${o.key}`;return a.jsxs(p.Fragment,{children:[a.jsxs("label",{className:"cw-env-field",htmlFor:u,children:[a.jsxs("span",{className:"cw-env-field-head",children:[a.jsxs("span",{className:"cw-env-field-title",children:[a.jsxs("span",{className:"cw-env-field-label",children:[o.comment||o.key,o.required&&a.jsx("span",{className:"cw-req",children:"*"})]}),o.help&&a.jsxs("span",{className:"cw-env-help",tabIndex:0,"data-help":o.help,"aria-label":r("traditional.env.helpAriaLabel",{label:o.comment||o.key,help:o.help}),children:["?",a.jsx("span",{className:"cw-env-help-popover",role:"tooltip",children:o.help})]}),o.link&&a.jsx("a",{className:"cw-env-link",href:o.link.url,target:"_blank",rel:"noopener noreferrer",title:r("traditional.env.openOpenViking",{label:o.link.label}),"aria-label":r("traditional.env.openOpenViking",{label:o.link.label}),onClick:d=>d.stopPropagation(),children:a.jsx(p0,{"aria-hidden":"true"})})]}),o.comment&&a.jsx("code",{title:o.key,children:o.key})]}),o.multiline||o.format==="json"?a.jsx("textarea",{id:u,className:"cw-input cw-env-textarea",value:l,placeholder:o.placeholder||r("traditional.env.valuePlaceholder"),autoComplete:"off",spellCheck:!1,"aria-invalid":!!c,onChange:d=>n(o.key,d.currentTarget.value)}):a.jsx("input",{id:u,className:"cw-input",type:don(o.key)?"password":"text",value:l,placeholder:o.placeholder||r("traditional.env.valuePlaceholder"),autoComplete:"off","aria-invalid":!!c,onChange:d=>n(o.key,d.currentTarget.value)}),c&&a.jsx("span",{className:"cw-env-error",children:c})]}),i==null?void 0:i(o)]},o.key)})})}function fon({value:e,onChange:t}){const{t:n}=Te("create"),i="cw-openviking-knowledge-index",r=n("traditional.env.openVikingIndexHelp");return a.jsxs("label",{className:"cw-env-field",htmlFor:i,children:[a.jsx("span",{className:"cw-env-field-head",children:a.jsxs("span",{className:"cw-env-field-title",children:[a.jsx("span",{className:"cw-env-field-label",children:n("traditional.env.openVikingIndex")}),a.jsxs("span",{className:"cw-env-help",tabIndex:0,"data-help":r,"aria-label":n("traditional.env.openVikingIndexAriaLabel",{help:r}),children:["?",a.jsx("span",{className:"cw-env-help-popover",role:"tooltip",children:r})]})]})}),a.jsx("input",{id:i,className:"cw-input",value:e,placeholder:"",autoComplete:"off",onChange:s=>t(s.currentTarget.value)})]})}function F6(e,t=Xt("traditional.resources.unnamedAgentCenter")){return e.name.trim()||t}function Oce(e,t=Xt("traditional.resources.unnamedKnowledgeBase")){const n=e.name.trim()||e.id||t,i=[e.sourceLabel,e.projectName].filter(Boolean);return i.length?`${n} · ${i.join(" · ")}`:n}function kce(e,t=Xt("traditional.resources.unnamedMemory")){return e.name.trim()||e.id||t}function Sce(e){return e.apiKeyAllowed===!1?"modelApiKey.noModelPermission":e.unavailableReason?`modelApiKey.permissionState.${e.unavailableReason}`:e.available?"traditional.model.available":e.lifecycleStatus==="Retiring"?"traditional.model.retiring":e.activationState&&e.activationState!=="Available"?"traditional.model.notActivated":"traditional.model.unavailable"}function Ece(e){return e.apiKeyAllowed!==!1&&!e.unavailableReason&&(e.available||e.lifecycleStatus==="Retiring")}function B6({selectedLabel:e,placeholder:t,disabled:n,triggerAriaLabel:i,menuAriaLabel:r,searchAriaLabel:s,searchValue:o,searchPlaceholder:l,onSearchChange:c,empty:u,emptyLabel:d,triggerClassName:f="",optionsClassName:h="",renderOptions:m}){const[g,b]=p.useState(!1),v=p.useRef(null),y=p.useRef(null),w=p.useRef(null),x=p.useId(),[O,k]=p.useState(null);p.useEffect(()=>{if(!g)return;const E=T=>{var A;const R=T.target;R instanceof Node&&v.current&&!v.current.contains(R)&&!((A=w.current)!=null&&A.contains(R))&&b(!1)},j=T=>{var R;T.key==="Escape"&&(b(!1),(R=y.current)==null||R.focus())};return window.addEventListener("pointerdown",E),window.addEventListener("keydown",j),()=>{window.removeEventListener("pointerdown",E),window.removeEventListener("keydown",j)}},[g]),p.useEffect(()=>{if(!g){k(null);return}const E=()=>{const j=y.current;if(!j)return;const T=j.getBoundingClientRect(),R=12,A=6,N=window.innerHeight-T.bottom-R-A,P=T.top-R-A,I=N<300&&P>N,D=Math.max(96,I?P:N),_=Math.min(T.width,window.innerWidth-R*2),L=Math.min(Math.max(R,T.left),window.innerWidth-R-_);k({...I?{bottom:window.innerHeight-T.top+A}:{top:T.bottom+A},left:L,width:_,maxHeight:D,opensUp:I})};return E(),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[g]);const S=()=>b(!1),C=E=>{var A,N;if(!["ArrowDown","ArrowUp","Home","End"].includes(E.key))return;const j=Array.from(((A=w.current)==null?void 0:A.querySelectorAll('[role="option"]:not(:disabled)'))??[]);if(!j.length)return;E.preventDefault();const T=j.findIndex(P=>P===document.activeElement),R=E.key==="Home"?0:E.key==="End"?j.length-1:E.key==="ArrowUp"?T<=0?j.length-1:T-1:T<0||T===j.length-1?0:T+1;(N=j[R])==null||N.focus()};return a.jsxs("div",{className:`cw-a2a-space-select-wrap cw-catalog-select${g?" is-open":""}`,ref:v,children:[a.jsxs("button",{ref:y,type:"button",className:`cw-a2a-space-trigger ${f}`.trim(),disabled:n,"aria-haspopup":"listbox","aria-controls":g?x:void 0,"aria-expanded":g,"aria-label":i,title:e,onClick:()=>{g||c(""),b(E=>!E)},children:[a.jsx("span",{className:t?"is-placeholder":void 0,children:e}),a.jsx($K,{className:"cw-a2a-space-trigger-icon"})]}),g&&O&&yi.createPortal(a.jsxs("div",{ref:w,className:`cw-a2a-space-menu cw-catalog-menu cw-catalog-menu-portal${O.opensUp?" is-up":""}`,style:{top:O.top??"auto",bottom:O.bottom??"auto",left:O.left,width:O.width,maxHeight:O.maxHeight},onKeyDown:C,children:[a.jsx("div",{className:"cw-picker-search",children:a.jsx("input",{className:"cw-picker-search-input",type:"search",value:o,autoFocus:!0,autoComplete:"off","aria-label":s,placeholder:l,onChange:E=>c(E.currentTarget.value)})}),a.jsxs("div",{id:x,className:`cw-picker-options cw-catalog-options ${h}`.trim(),role:"listbox","aria-label":r,children:[m(S),u&&a.jsx("div",{className:"cw-picker-empty",children:d})]})]}),document.body)]})}function hon({value:e,fallbacks:t,cloudProvider:n,agentName:i,apiKeyId:r,apiKeyName:s,customModelSecretValues:o,configuredRuntimeEnvKeys:l,showFallbacks:c=!0,showMissingApiKeyErrors:u,onApiKeyChange:d,onChange:f,onFallbacksChange:h,onCustomModelSecretChange:m}){const{t:g}=Te("create"),[b,v]=p.useState([]),[y,w]=p.useState(!1),[x,O]=p.useState([]),[k,S]=p.useState(null),[C,E]=p.useState(!1),[j,T]=p.useState(null),[R,A]=p.useState(0),[N,P]=p.useState(0),[I,D]=p.useState(""),[_,L]=p.useState(""),[F,M]=p.useState("");p.useEffect(()=>{const pe=new AbortController;return w(!0),T(null),xz(pe.signal,R>0).then(ke=>{if(pe.signal.aborted)return;v(ke.keys);const je=ke.keys.find(Pe=>Pe.id===r)??ke.keys.find(Pe=>Pe.name===s)??ke.keys.find(Pe=>Pe.id===ke.defaultKeyId)??ke.keys.find(Pe=>Pe.status!=="Restricted");je&&d(je)}).catch(ke=>{pe.signal.aborted||T(ke instanceof Error?ke.message:g("traditional.model.apiKeyLoadError"))}).finally(()=>{pe.signal.aborted||w(!1)}),()=>pe.abort()},[n,R,g]),p.useEffect(()=>{if(!r){O([]);return}const pe=new AbortController;return E(!0),T(null),S(null),B1({signal:pe.signal,apiKeyId:r,refresh:R>0||N>0}).then(ke=>{if(!pe.signal.aborted){const je=L7e(ke.models,ke.apiKeyModelPermissions);O(je),S(r);const Pe=new Set(je.filter(ze=>ze.apiKeyAllowed===!1||ze.unavailableReason).map(ze=>ze.id));Pe.has(e.trim())&&f("");const Ee=t.filter(ze=>typeof ze!="string"||!Pe.has(ze));Ee.length!==t.length&&h(Ee)}}).catch(ke=>{pe.signal.aborted||T(ke instanceof Error?ke.message:g("traditional.model.loadError"))}).finally(()=>{pe.signal.aborted||E(!1)}),()=>pe.abort()},[r,n,N,R,g]);const V=e.trim(),q=k===r,U=q?x:[],J=b.find(pe=>pe.id===r),z=J?J.name||g("modelApiKey.unnamed"):r?g("traditional.model.currentApiKey"):y?g("traditional.model.loadingApiKeys"):b.length===0?g("traditional.model.noApiKeys"):g("traditional.model.selectApiKey"),Z=p.useMemo(()=>b.filter(pe=>$7e(I,pe.name,cU(pe,g))),[I,b,g]),ne=U.find(pe=>pe.id===V),W=C&&!q?g("traditional.model.refreshing"):ne?`${ne.displayName} (${ne.id})`:V||g("traditional.model.selectModel"),G=p.useMemo(()=>U.filter(pe=>kg(_,[pe.displayName,pe.id,pe.name,pe.vendorName,pe.activationState,pe.lifecycleStatus])),[_,U]),H=!!(V&&!ne&&kg(_,[V])),se=U.filter(pe=>pe.available).length,Y=n==="byteplus"?"BytePlus ModelArk":g("traditional.model.volcengineArk"),X=att(n),ie=Ru(V,t),ee=new Set(E7e(V,ie)),be=pe=>{const ke=pe.trim();return U.filter(je=>{const Pe=je.id.trim();return!(Pe!==ke&&ee.has(Pe))&&!(Pe!==ke&&Pe===V)&&kg(F,[je.displayName,je.id,je.name,je.vendorName,je.activationState,je.lifecycleStatus])})},ue=(pe,ke)=>{const je=[...t];je[pe]=ke,h(Ru(V,je))};return a.jsxs("div",{className:"cw-a2a-space-picker cw-model-picker",children:[a.jsxs("div",{className:"cw-model-picker-stack",children:[a.jsxs("div",{className:"cw-model-picker-field",children:[a.jsx("span",{className:"cw-model-picker-label",children:"API Key"}),a.jsx(B6,{selectedLabel:z,placeholder:!r,disabled:y,triggerAriaLabel:g("traditional.model.selectApiKey"),menuAriaLabel:g("traditional.model.apiKeyList"),searchAriaLabel:g("traditional.model.searchApiKey"),searchValue:I,searchPlaceholder:g("modelApiKey.search"),onSearchChange:D,empty:Z.length===0,emptyLabel:g("traditional.model.noMatchingApiKey"),optionsClassName:"cw-model-key-options",renderOptions:pe=>Z.map(ke=>{const je=ke.id===r,Pe=cU(ke,g);return a.jsx("button",{type:"button",role:"option","aria-selected":je,disabled:ke.status==="Restricted",className:`cw-a2a-space-option cw-model-key-option ${je?"is-selected":""}`,title:`${ke.name||g("modelApiKey.unnamed")} · ${Pe}`,onClick:()=>{P(Ee=>Ee+1),d(ke),pe()},children:a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ke.name||g("modelApiKey.unnamed")}),a.jsx("small",{children:Pe})]})},ke.id)})})]}),a.jsxs("div",{className:"cw-model-picker-field",children:[a.jsx("span",{className:"cw-model-picker-label",children:g("traditional.model.label")}),a.jsxs("div",{className:"cw-a2a-space-row",children:[a.jsx(B6,{selectedLabel:W,placeholder:!V,disabled:C,triggerAriaLabel:g("traditional.model.selectProviderModel",{provider:Y}),menuAriaLabel:g("traditional.model.providerModels",{provider:Y}),searchAriaLabel:g("traditional.model.search"),searchValue:_,searchPlaceholder:g("traditional.model.searchPlaceholder"),onSearchChange:L,empty:!H&&G.length===0,emptyLabel:g("traditional.model.noMatches"),triggerClassName:"cw-model-trigger",optionsClassName:"cw-model-options",renderOptions:pe=>a.jsxs(a.Fragment,{children:[H&&a.jsxs("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option cw-model-option is-selected",onClick:()=>{f(V),pe()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:g("traditional.model.currentConfiguration")}),a.jsx("small",{children:V})]}),a.jsx("span",{className:"cw-model-status is-unknown",children:g("traditional.model.unknownStatus")})]}),G.map(ke=>{const je=ke.id===V,Pe=Ece(ke);return ke.apiKeyAllowed!==!1&&!ke.unavailableReason&&!Pe&&ke.activationState!=="Available"?a.jsxs("button",{type:"button",role:"option","aria-selected":!1,className:"cw-a2a-space-option cw-model-option is-activation-link",title:g("traditional.model.activate",{provider:Y,model:ke.displayName}),onClick:()=>{window.open(X,"_blank","noopener,noreferrer"),pe()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ke.displayName}),a.jsxs("small",{children:[ke.id,ke.vendorName?` · ${ke.vendorName}`:""]})]}),a.jsx("span",{className:"cw-model-status is-unavailable",children:g("traditional.model.activateAction")})]},ke.id):a.jsxs("button",{type:"button",role:"option","aria-selected":je,disabled:!Pe,className:`cw-a2a-space-option cw-model-option ${je?"is-selected":""}`,title:`${ke.displayName} (${ke.id})`,onClick:()=>{f(ke.id),pe()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ke.displayName}),a.jsxs("small",{children:[ke.id,ke.vendorName?` · ${ke.vendorName}`:""]})]}),a.jsx("span",{className:`cw-model-status ${ke.apiKeyAllowed===!1||ke.unavailableReason?"is-unavailable":ke.available?"is-available":ke.lifecycleStatus==="Retiring"?"is-retiring":"is-unavailable"}`,children:g(Sce(ke))})]},ke.id)})]})}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-a2a-space-refresh",title:g("traditional.model.refresh"),"aria-label":g("traditional.model.refresh"),disabled:C||y,onClick:()=>A(pe=>pe+1),children:C||y?a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}):a.jsx(FK,{className:"cw-i cw-i-sm"})})]})]}),c?a.jsx(BP,{variant:"traditional",embedded:!0,primaryModelName:V,agentName:i,value:t,secretValues:o,configuredSecretEnvKeys:l,showMissingApiKeyErrors:u,onChange:h,onSecretChange:m,renderSameProviderField:({index:pe,value:ke})=>{const je=U.find(_e=>_e.id===ke.trim()),Pe=be(ke),Ee=!!(ke.trim()&&!je&&kg(F,[ke])),ze=je?`${je.displayName} (${je.id})`:ke||g("traditional.model.fallbackPlaceholder");return a.jsx(B6,{selectedLabel:ze,placeholder:!ke.trim(),disabled:C||!r,triggerAriaLabel:g("traditional.model.selectProviderModel",{provider:Y}),menuAriaLabel:g("traditional.model.providerModels",{provider:Y}),searchAriaLabel:g("traditional.model.search"),searchValue:F,searchPlaceholder:g("traditional.model.searchPlaceholder"),onSearchChange:M,empty:!Ee&&Pe.length===0,emptyLabel:g("traditional.model.noMatches"),triggerClassName:"cw-model-trigger",optionsClassName:"cw-model-options",renderOptions:_e=>a.jsxs(a.Fragment,{children:[Ee&&a.jsxs("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option cw-model-option is-selected",onClick:()=>{ue(pe,ke),_e()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:g("traditional.model.currentConfiguration")}),a.jsx("small",{children:ke})]}),a.jsx("span",{className:"cw-model-status is-unknown",children:g("traditional.model.unknownStatus")})]}),Pe.map(ae=>{const le=ae.id===ke.trim(),ge=Ece(ae);return ae.apiKeyAllowed!==!1&&!ae.unavailableReason&&!ge&&ae.activationState!=="Available"?a.jsxs("button",{type:"button",role:"option","aria-selected":!1,className:"cw-a2a-space-option cw-model-option is-activation-link",title:g("traditional.model.activate",{provider:Y,model:ae.displayName}),onClick:()=>{window.open(X,"_blank","noopener,noreferrer"),_e()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ae.displayName}),a.jsxs("small",{children:[ae.id,ae.vendorName?` · ${ae.vendorName}`:""]})]}),a.jsx("span",{className:"cw-model-status is-unavailable",children:g("traditional.model.activateAction")})]},ae.id):a.jsxs("button",{type:"button",role:"option","aria-selected":le,disabled:!ge,className:`cw-a2a-space-option cw-model-option ${le?"is-selected":""}`,title:`${ae.displayName} (${ae.id})`,onClick:()=>{ue(pe,ae.id),_e()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ae.displayName}),a.jsxs("small",{children:[ae.id,ae.vendorName?` · ${ae.vendorName}`:""]})]}),a.jsx("span",{className:`cw-model-status ${ae.apiKeyAllowed===!1||ae.unavailableReason?"is-unavailable":ae.available?"is-available":ae.lifecycleStatus==="Retiring"?"is-retiring":"is-unavailable"}`,children:g(Sce(ae))})]},ae.id)})]})})}}):null]}),j?a.jsxs("div",{className:"cw-banner cw-a2a-space-error",role:"alert",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:j})]}):C?null:U.length===0?a.jsx("span",{className:"cw-help",children:g("traditional.model.empty")}):a.jsx("span",{className:"cw-help",children:g("traditional.model.loaded",{count:U.length,available:se})})]})}function pon({value:e,region:t,invalid:n,onChange:i}){const{t:r}=Te("create"),s=t.trim()||cw.region,[o,l]=p.useState([]),[c,u]=p.useState(!1),[d,f]=p.useState(null),[h,m]=p.useState(0),[g,b]=p.useState(!1),[v,y]=p.useState(""),w=p.useRef(null);p.useEffect(()=>{let T=!1;return u(!0),f(null),qan({region:s}).then(R=>{T||l(R)}).catch(R=>{T||(l([]),f(R instanceof Error?R.message:r("traditional.resources.loadError")))}).finally(()=>{T||u(!1)}),()=>{T=!0}},[s,h,r]);const x=!e||o.some(T=>T.id===e.trim()),O=o.find(T=>T.id===e.trim()),k=O?F6(O,r("traditional.resources.unnamedAgentCenter")):r(e&&!x?"traditional.resources.selectedAgentCenter":"traditional.resources.selectAgentCenter"),S=c&&o.length===0,C=p.useMemo(()=>o.filter(T=>kg(v,[F6(T,r("traditional.resources.unnamedAgentCenter")),T.id,T.projectName])),[v,o,r]),E=!!(e&&!x&&kg(v,[r("traditional.resources.selectedAgentCenter"),e]));p.useEffect(()=>{if(!g)return;const T=A=>{const N=A.target;N instanceof Node&&w.current&&!w.current.contains(N)&&b(!1)},R=A=>{A.key==="Escape"&&b(!1)};return window.addEventListener("pointerdown",T),window.addEventListener("keydown",R),()=>{window.removeEventListener("pointerdown",T),window.removeEventListener("keydown",R)}},[g]);const j=T=>{i(T),b(!1)};return a.jsxs("div",{className:`cw-a2a-space-picker${g?" is-open":""}`,ref:w,children:[a.jsxs("div",{className:"cw-a2a-space-row",children:[a.jsxs("div",{className:"cw-a2a-space-select-wrap",children:[a.jsxs("button",{type:"button",className:`cw-a2a-space-trigger ${n?"is-error":""}`,disabled:S,"aria-haspopup":"listbox","aria-expanded":g,"aria-label":r("traditional.resources.selectAgentKitCenter"),onClick:()=>{y(""),b(T=>!T)},children:[a.jsx("span",{className:e?void 0:"is-placeholder",children:k}),a.jsx($K,{className:"cw-a2a-space-trigger-icon"})]}),g&&a.jsxs("div",{className:"cw-a2a-space-menu",children:[a.jsx("div",{className:"cw-picker-search",children:a.jsx("input",{className:"cw-picker-search-input",type:"search",value:v,autoFocus:!0,autoComplete:"off","aria-label":r("traditional.resources.searchAgentKitCenter"),placeholder:r("traditional.resources.searchNameOrId"),onChange:T=>y(T.currentTarget.value)})}),a.jsxs("div",{className:"cw-picker-options",role:"listbox","aria-label":r("traditional.resources.agentKitCenter"),children:[E&&a.jsx("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option is-selected",onClick:()=>j(e),children:r("traditional.resources.selectedAgentCenter")}),C.map(T=>{const R=F6(T,r("traditional.resources.unnamedAgentCenter")),A=T.id===e;return a.jsx("button",{type:"button",role:"option","aria-selected":A,className:`cw-a2a-space-option ${A?"is-selected":""}`,title:`${R} (${T.id})`,onClick:()=>j(T.id),children:R},T.id)}),!E&&C.length===0&&a.jsx("div",{className:"cw-picker-empty",children:r("traditional.resources.noMatchingAgentCenters")})]})]})]}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-a2a-space-refresh",title:r("traditional.resources.refreshAgentCenters"),"aria-label":r("traditional.resources.refreshAgentCenters"),disabled:c,onClick:()=>m(T=>T+1),children:c?a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}):a.jsx(FK,{className:"cw-i cw-i-sm"})})]}),d?a.jsxs("div",{className:"cw-banner cw-a2a-space-error",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:d})]}):c?a.jsxs("span",{className:"cw-help cw-a2a-space-status",children:[a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}),r("traditional.resources.loadingAgentCenters")]}):o.length===0?a.jsx("span",{className:"cw-help",children:r("traditional.resources.noAgentCenters")}):a.jsx("span",{className:"cw-help",children:r("traditional.resources.agentCentersLoaded",{count:o.length})})]})}function oUe({value:e,items:t,loading:n,error:i,pickerClassName:r,selectLabel:s,searchLabel:o,listLabel:l,placeholder:c,emptyMessage:u,loadedMessage:d,refreshLabel:f,noMatchesMessage:h,getLabel:m,getSearchFields:g,getKey:b,getOptionIds:v,makeUnknownItem:y,onChange:w,onRefresh:x}){const{t:O}=Te("create"),[k,S]=p.useState(!1),[C,E]=p.useState(""),j=p.useRef(null),T=!e||t.some(_=>_.id===e.trim()),R=t.find(_=>_.id===e.trim()),A=R?m(R):e&&!T?e:c,N=n&&t.length===0,P=p.useMemo(()=>t.filter(_=>kg(C,g(_))),[g,t,C]),I=!!(e&&!T&&kg(C,[e]));p.useEffect(()=>{if(!k)return;const _=F=>{const M=F.target;M instanceof Node&&j.current&&!j.current.contains(M)&&S(!1)},L=F=>{F.key==="Escape"&&S(!1)};return window.addEventListener("pointerdown",_),window.addEventListener("keydown",L),()=>{window.removeEventListener("pointerdown",_),window.removeEventListener("keydown",L)}},[k]);const D=_=>{w(_),S(!1)};return n&&t.length===0?a.jsxs("span",{className:"cw-viking-kb-inline-status",role:"status",children:[a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}),O("common.loading")]}):a.jsxs("div",{className:`cw-a2a-space-picker ${r}${k?" is-open":""}`,ref:j,children:[a.jsxs("div",{className:"cw-a2a-space-row",children:[a.jsxs("div",{className:"cw-a2a-space-select-wrap",children:[a.jsxs("button",{type:"button",className:"cw-a2a-space-trigger",disabled:N,"aria-haspopup":"listbox","aria-expanded":k,"aria-label":s,onClick:()=>{E(""),S(_=>!_)},children:[a.jsx("span",{className:e?void 0:"is-placeholder",children:A}),a.jsx($K,{className:"cw-a2a-space-trigger-icon"})]}),k&&a.jsxs("div",{className:"cw-a2a-space-menu cw-viking-kb-menu",children:[a.jsx("div",{className:"cw-picker-search",children:a.jsx("input",{className:"cw-picker-search-input",type:"search",value:C,autoFocus:!0,autoComplete:"off","aria-label":o,placeholder:O("traditional.resources.searchNameOrId"),onChange:_=>E(_.currentTarget.value)})}),a.jsxs("div",{className:"cw-picker-options",role:"listbox","aria-label":l,children:[I&&a.jsx("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option is-selected",onClick:()=>D(y(e)),children:e}),P.map(_=>{const L=m(_),F=_.id===e,M=v(_).filter(Boolean).join(" / ");return a.jsx("button",{type:"button",role:"option","aria-selected":F,className:`cw-a2a-space-option ${F?"is-selected":""}`,title:M?`${L} (${M})`:L,onClick:()=>D(_),children:L},b(_))}),!I&&P.length===0&&a.jsx("div",{className:"cw-picker-empty",children:h})]})]})]}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-a2a-space-refresh cw-viking-kb-refresh",title:f,"aria-label":f,disabled:n,onClick:x,children:n?a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}):a.jsx(FK,{className:"cw-i cw-i-sm"})})]}),i?a.jsxs("div",{className:"cw-banner cw-a2a-space-error",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:i})]}):t.length===0?a.jsx("span",{className:"cw-help",children:u}):a.jsx("span",{className:"cw-help",children:d(t.length)})]})}function mon({value:e,onChange:t}){const{t:n}=Te("create"),[i,r]=p.useState([]),[s,o]=p.useState(!1),[l,c]=p.useState(null),[u,d]=p.useState(0);return p.useEffect(()=>{let f=!1;return o(!0),c(null),Kan().then(h=>{f||r(h)}).catch(h=>{f||(r([]),c(h instanceof Error?h.message:n("traditional.resources.loadError")))}).finally(()=>{f||o(!1)}),()=>{f=!0}},[u,n]),a.jsx(oUe,{value:e,items:i,loading:s,error:l,pickerClassName:"cw-viking-kb-picker",selectLabel:n("traditional.resources.selectKnowledgeBase"),searchLabel:n("traditional.resources.searchKnowledgeBase"),listLabel:n("traditional.resources.knowledgeBaseList"),placeholder:n("traditional.resources.knowledgeBasePlaceholder"),emptyMessage:n("traditional.resources.noKnowledgeBases"),loadedMessage:f=>n("traditional.resources.knowledgeBasesLoaded",{count:f}),refreshLabel:n("traditional.resources.refreshKnowledgeBases"),noMatchesMessage:n("traditional.resources.noMatchingKnowledgeBases"),getLabel:f=>Oce(f,n("traditional.resources.unnamedKnowledgeBase")),getSearchFields:f=>[Oce(f,n("traditional.resources.unnamedKnowledgeBase")),f.id,f.description,f.projectName,f.resourceId,f.agentkitKnowledgeId,f.providerKnowledgeId,f.sourceLabel],getKey:f=>f.id,getOptionIds:f=>[f.id,f.resourceId,f.agentkitKnowledgeId,f.providerKnowledgeId],makeUnknownItem:f=>({id:f,name:f,description:"",projectName:"",region:"",sourceKind:"knowledge",sourceLabel:"Knowledge Engine",resourceId:""}),onChange:t,onRefresh:()=>d(f=>f+1)})}function gon({value:e,onChange:t}){const{t:n}=Te("create"),[i,r]=p.useState([]),[s,o]=p.useState(!1),[l,c]=p.useState(null),[u,d]=p.useState(0);return p.useEffect(()=>{let f=!1;return o(!0),c(null),Xan().then(h=>{f||r(h)}).catch(h=>{f||(r([]),c(h instanceof Error?h.message:n("traditional.resources.loadError")))}).finally(()=>{f||o(!1)}),()=>{f=!0}},[u,n]),a.jsx(oUe,{value:e,items:i,loading:s,error:l,pickerClassName:"cw-viking-memory-picker",selectLabel:n("traditional.resources.selectMemory"),searchLabel:n("traditional.resources.searchMemory"),listLabel:n("traditional.resources.memoryList"),placeholder:n("traditional.resources.memoryPlaceholder"),emptyMessage:n("traditional.resources.noMemories"),loadedMessage:f=>n("traditional.resources.memoriesLoaded",{count:f}),refreshLabel:n("traditional.resources.refreshMemories"),noMatchesMessage:n("traditional.resources.noMatchingMemories"),getLabel:f=>kce(f,n("traditional.resources.unnamedMemory")),getSearchFields:f=>[kce(f,n("traditional.resources.unnamedMemory")),f.id,f.description,f.projectName,f.region,f.resourceId,...f.memoryTypes??[]],getKey:f=>`${f.projectName}:${f.region}:${f.id}`,getOptionIds:f=>[f.id,f.resourceId],makeUnknownItem:f=>({id:f,name:f,description:"",projectName:"",region:"",resourceId:"",memoryTypes:[]}),onChange:t,onRefresh:()=>d(f=>f+1)})}function bon({hidden:e}){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M3 3l18 18"}),a.jsx("path",{d:"M9.7 6.95A9.7 9.7 0 0 1 12 6.68c5.9 0 9.25 5.32 9.25 5.32a16 16 0 0 1-2.28 2.85"}),a.jsx("path",{d:"M14.35 14.55A3.25 3.25 0 0 1 9.5 10.2"}),a.jsx("path",{d:"M6.25 8.12A16.4 16.4 0 0 0 2.75 12S6.1 17.32 12 17.32c.8 0 1.55-.1 2.25-.27"})]}):a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M2.75 12s3.35-5.25 9.25-5.25S21.25 12 21.25 12 17.9 17.25 12 17.25 2.75 12 2.75 12Z"}),a.jsx("circle",{cx:"12",cy:"12",r:"2.5"})]})})}function yon({tools:e,conflict:t,showConflict:n,onChange:i}){const{t:r}=Te("create"),s=p.useId(),[o,l]=p.useState(null),c=n?t:null,u=(h,m)=>i(e.map((g,b)=>b===h?{...g,...m}:g)),d=h=>{l(m=>m==null||mg!==h))},f=()=>i([...e,{name:"",transport:"http",url:""}]);return a.jsxs("div",{className:"cw-mcp",children:[e.length>0&&a.jsx("div",{className:"cw-mcp-list",children:a.jsx(ff,{initial:!1,children:e.map((h,m)=>a.jsxs(Cr.div,{className:"cw-mcp-row",layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.16},children:[a.jsxs("div",{className:"cw-mcp-rowhead",children:[a.jsxs("div",{className:"cw-mcp-transport",children:[a.jsx("button",{type:"button",className:`cw-seg cw-seg-sm ${h.transport==="http"?"is-on":""}`,onClick:()=>u(m,{transport:"http"}),"aria-pressed":h.transport==="http",children:a.jsx("span",{className:"cw-seg-title",children:"HTTP"})}),a.jsx("button",{type:"button",className:`cw-seg cw-seg-sm ${h.transport==="stdio"?"is-on":""}`,onClick:()=>u(m,{transport:"stdio"}),"aria-pressed":h.transport==="stdio",children:a.jsx("span",{className:"cw-seg-title",children:"stdio"})})]}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-icon-danger",onClick:()=>d(m),"aria-label":r("traditional.mcp.removeTool"),children:a.jsx(Jg,{className:"cw-i cw-i-sm"})})]}),a.jsx("input",{className:"cw-input","data-validation-field":"mcp-name","aria-invalid":c==="duplicateName","aria-describedby":c==="duplicateName"?s:void 0,value:h.name,placeholder:r("traditional.mcp.namePlaceholder"),onChange:g=>u(m,{name:g.target.value})}),h.transport==="http"?a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"cw-input","data-validation-field":"mcp-url","aria-invalid":c==="duplicateUrl","aria-describedby":c==="duplicateUrl"?s:void 0,value:h.url??"",placeholder:r("traditional.mcp.urlPlaceholder"),onChange:g=>i(e.map((b,v)=>v===m?Can(b,g.target.value):b))}),Ean(h.url??"")&&a.jsxs("p",{className:"cw-mcp-warning",children:[a.jsx(_h,{"aria-hidden":"true"}),a.jsx("span",{children:r("traditional.mcp.pathWarning")})]}),a.jsxs("div",{className:"cw-mcp-token-field",children:[a.jsx("input",{className:"cw-input",type:o===m?"text":"password",value:kan(h),placeholder:r("traditional.mcp.tokenPlaceholder"),autoComplete:"new-password",spellCheck:!1,onChange:g=>i(e.map((b,v)=>v===m?San(b,g.target.value):b))}),a.jsx("button",{type:"button",className:"cw-mcp-token-toggle","aria-label":r(o===m?"traditional.mcp.hideToken":"traditional.mcp.showToken"),title:r(o===m?"traditional.mcp.hideToken":"traditional.mcp.showToken"),"aria-pressed":o===m,onClick:()=>l(g=>g===m?null:m),children:a.jsx(bon,{hidden:o!==m})})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"cw-input",value:h.command??"",placeholder:r("traditional.mcp.commandPlaceholder"),onChange:g=>u(m,{command:g.target.value})}),a.jsx("input",{className:"cw-input",value:(h.args??[]).join(" "),placeholder:r("traditional.mcp.argsPlaceholder"),onChange:g=>u(m,{args:g.target.value.split(/\s+/).filter(Boolean)})}),a.jsx("p",{className:"cw-mcp-note",children:r("traditional.mcp.stdioHint")})]})]},m))})}),c&&a.jsx("p",{className:"cw-error-text",id:s,role:"alert",children:r(c==="duplicateName"?"traditional.validation.mcpDuplicateName":"traditional.validation.mcpDuplicateUrl")}),a.jsxs("button",{type:"button",className:"cw-add-sub",onClick:f,children:[a.jsx(ic,{className:"cw-i"}),r("traditional.mcp.addTool")]})]})}function Nj({checked:e,onChange:t,title:n,desc:i,showDescription:r=!1}){return a.jsxs("button",{type:"button",className:`cw-toggle ${e?"is-on":""}`,onClick:()=>t(!e),"aria-pressed":e,children:[a.jsxs("span",{className:"cw-toggle-text",children:[a.jsx("span",{className:"cw-toggle-title",children:n}),r&&a.jsx("span",{className:"cw-toggle-help",children:i})]}),a.jsx("span",{className:"cw-switch","aria-hidden":!0,children:a.jsx(Cr.span,{className:"cw-switch-knob",layout:!0,transition:{type:"spring",stiffness:520,damping:34}})})]})}function von(e,t){var i;let n=e;for(const r of t)if(n=(i=n.subAgents)==null?void 0:i[r],!n)return!1;return!0}function Rj(e,t){let n=e;for(const i of t)n=n.subAgents[i];return n}function ZT(e,t,n){if(t.length===0)return n(e);const[i,...r]=t,s=e.subAgents.slice();return s[i]=ZT(s[i],r,n),{...e,subAgents:s}}function xon(e,t,n="volcengine"){return ZT(e,t,i=>({...i,subAgents:[...i.subAgents,wd(n)]}))}function won(e,t,n,i="volcengine"){return ZT(e,t,r=>{const s=r.subAgents.slice();return s.splice(n,0,wd(i)),{...r,subAgents:s}})}function Oon(e,t){if(t.length===0)return e;const n=t.slice(0,-1),i=t[t.length-1];return ZT(e,n,r=>({...r,subAgents:r.subAgents.filter((s,o)=>o!==i)}))}const UP=e=>!UL(e.agentType),Cce=3;function kon(e,t,n=!1){var r;if(UL(e.agentType))return n?"remoteRoot":(r=e.a2aRegistry)!=null&&r.registrySpaceId.trim()?null:"missingRegistry";const i=KT(e.name,s=>`name.${s}`);return i||(t.has(e.name)?"duplicateName":e.description.trim().length===0?"missingDescription":M7e(e.agentType)?e.subAgents.length===0?"missingSubagent":null:e.instruction.trim().length===0?"missingPrompt":null)}function lUe(e,t,n=[]){const i=[];if(n.length===0){const o=J7e(e);o&&i.push({path:n,name:e.name.trim(),agentType:e.agentType,problem:o==="duplicateName"?"mcpDuplicateName":"mcpDuplicateUrl"})}const r=UL(e.agentType),s=kon(e,t,n.length===0);return s&&i.push({path:n,name:r?"":e.name.trim(),agentType:e.agentType,problem:s}),UP(e)&&e.subAgents.forEach((o,l)=>i.push(...lUe(o,t,[...n,l]))),i}function Son(e,t){return t("traditional.validation.missingSubagentDetail",{type:t(`traditional.agentTypes.${e.agentType??"llm"}.fullLabel`)})}function cUe(e,t,n=[]){if((e.agentType===void 0||e.agentType==="llm")&&cm(e,t)==="ark")return n;if(!UP(e))return null;for(let r=0;rt+uUe(n),0)}function fU(e,t=!1){const n=CO(e),i=yI(n.draft).includes("mcp_resilience"),r=[],s={...n.envValues},o=n.draft.cloudProvider??"volcengine",l=dmt(n.draft).map(SN);let c=!1,u="";for(const h of FL(n.draft,Po(o))){const m=[{key:h.apiKeyKey,required:!0,comment:h.label}];h.providerKey&&(m.push({key:h.providerKey,required:!0}),s[h.providerKey]=h.provider),h.apiBaseKey&&(m.push({key:h.apiBaseKey,required:!0}),s[h.apiBaseKey]=h.apiBase),r.push({env:m})}const d=h=>{var m,g,b,v;h.agentType==="llm"&&cm(h,o)==="ark"&&(c=!0,u||(u=(h.modelName??"").trim()));for(const y of h.builtinTools??[]){const w=rT.find(x=>x.id===y);w&&r.push({env:mx(w.env,o)})}for(const y of h.mcpTools??[])y.authTokenEnv&&r.push({env:[{key:y.authTokenEnv,required:!1,comment:`${y.name.trim()||"MCP"} Bearer Token`,secret:!0,readOnly:i,serverManaged:i,hidden:i}]});if((m=h.a2aRegistry)!=null&&m.enabled&&(r.push({env:mx(jIe,o)}),Object.assign(s,aUe(h.a2aRegistry,{includeDefaults:!0},o))),h.memory.shortTerm&&r.push({env:mx(((g=uw.find(y=>y.id===(h.shortTermBackend??"local")))==null?void 0:g.env)??[],o)}),h.memory.longTerm&&r.push({env:mx(((b=_B.find(y=>y.id===(h.longTermBackend??"local")))==null?void 0:b.env)??[],o)}),h.knowledgebase&&r.push({env:mx(((v=jB.find(y=>y.id===(h.knowledgebaseBackend??Dg)))==null?void 0:v.env)??[],o)}),h.tracing)for(const y of h.tracingExporters??[]){const w=nmt.find(x=>x.id===y);w&&r.push({env:w.env,enableFlag:w.enableFlag})}h.subAgents.forEach(d)};if(d(n.draft),c){r.push({env:[{key:"MODEL_AGENT_PROVIDER",required:!0},{key:"MODEL_AGENT_API_BASE",required:!0},{key:"MODEL_AGENT_API_KEY",required:!0,comment:"Ark API Key",placeholder:Xt("helpers.deploymentEnv.selectedApiKeyPlaceholder"),secret:!0,readOnly:!0,serverManaged:!0,requiredBy:l}]}),s.MODEL_AGENT_PROVIDER="openai",s.MODEL_AGENT_API_BASE=Po(o);const h=u||Gp(o);s.MODEL_AGENT_NAME=h,s.MODEL_NAME=h}if(i){if(t){r.push({env:[{key:"MCP_SERVERS_JSON",required:!0,comment:Xt("helpers.deploymentEnv.mcpInjectedComment"),placeholder:Xt("helpers.deploymentEnv.restoredPlaceholder"),help:Xt("helpers.deploymentEnv.restoredHelp"),readOnly:!0,serverManaged:!0,hidden:!0,requiredBy:[SN("mcp_resilience")]}]});const g=oU(r);return{specs:g.specs,fixedValues:{...g.fixedValues,...s}}}const h=Pan(n.draft),m=h.ok?void 0:h.message;r.push({env:[{key:"MCP_SERVERS_JSON",required:!0,comment:Xt("helpers.deploymentEnv.mcpInjectedComment"),placeholder:Xt(t?"helpers.deploymentEnv.restoredPlaceholder":"helpers.deploymentEnv.generatedMcpPlaceholder"),help:Xt("helpers.deploymentEnv.mergedMcpHelp"),secret:!0,readOnly:!0,serverManaged:h.ok,hidden:!0,requiredBy:[SN("mcp_resilience")],missingError:m}]})}const f=oU(r);return{specs:f.specs,fixedValues:{...f.fixedValues,...s}}}function dUe(e,t){var i;if(e.id==="baseline")return t("traditional.debug.baseline");const n=(i=/^variant-(\d+)$/.exec(e.id))==null?void 0:i[1];return n?t("traditional.debug.comparison",{count:Number(n)}):e.name}function Eon(e,t){const n=i=>(i??"").trim().replace(/\/+$/,"");return n(e)===n(t)}function Con(e,t,n){if(e===""&&t===n)return!1;const i=(e??"").trim();return!i||i===Gp(t)?!0:i===Gp(n)?!1:n==="byteplus"&&i.includes("doubao-")}function Cy(e,t){const n=e.cloudProvider??"volcengine",i=cm(e,n),r=e.subAgents.map(u=>Cy(u,t)),s=i==="ark"&&Con(e.modelName,n,t)?Gp(t):e.modelName,l=Eon(e.modelApiBase,Po(n))||t==="byteplus"&&(e.modelApiBase??"").includes("volces.com")?Po(t):e.modelApiBase;return e.cloudProvider!==t||s!==e.modelName||l!==e.modelApiBase||r.some((u,d)=>u!==e.subAgents[d])?{...e,cloudProvider:t,modelName:s,modelApiBase:l,subAgents:r}:e}function Aon(e,t){var l;const n=Cy(e,t),i=NK(n,Po(t)),r=new Set(i.map(({key:c})=>c)),s=((l=n.deployment)==null?void 0:l.envValues)??{},o=Object.fromEntries(Object.entries(s).filter(([c,u])=>r.has(c)&&!!u.trim()));return Object.keys(o).length===0?{draft:n,customModelSecretValues:o}:{draft:{...n,deployment:{...n.deployment??{feishuEnabled:!1},envValues:Object.fromEntries(Object.entries(s).filter(([c])=>!r.has(c)))}},customModelSecretValues:o}}function _S(e){var i,r,s;const t=CO(e).draft;return{...N7e(t,t.cloudProvider??"volcengine"),deployment:{feishuEnabled:!!((i=e.deployment)!=null&&i.feishuEnabled),modelApiKeyId:((r=e.deployment)==null?void 0:r.modelApiKeyId)??"",modelApiKeyName:((s=e.deployment)==null?void 0:s.modelApiKeyName)??""}}}function hU(e){var n;const t=(n=e.modelName)==null?void 0:n.trim();if(t)return t;for(const i of e.subAgents){const r=hU(i);if(r)return r}return""}function fUe(e,t={}){var r,s,o,l;const n=fU(e),i={...((r=e.deployment)==null?void 0:r.envValues)??{},...t,...n.fixedValues};return{..._S(e),deployment:{feishuEnabled:!!((s=e.deployment)!=null&&s.feishuEnabled),modelApiKeyId:((o=e.deployment)==null?void 0:o.modelApiKeyId)??"",modelApiKeyName:((l=e.deployment)==null?void 0:l.modelApiKeyName)??"",envValues:Object.fromEntries(rsn(n.specs,i,CO(e).envValues).map(({key:c,value:u})=>[c,u]))}}}function Ton(e,t){const n=new Set;for(const i of FL(e,Po(t)))for(const r of[i.providerKey,i.apiBaseKey,i.apiKeyKey])r&&n.add(r);return n}function _on(e,t,n){const i=Ton(e,t);return(n??[]).filter(({key:r,value:s})=>i.has(r)&&s.trim())}function jon(e,t={}){return JSON.stringify(fUe(e,t))}function QP(e,t){return JSON.stringify({draftSnapshot:e,modelName:t.modelName,description:t.description,instruction:t.instruction})}function qx(e){return JSON.stringify({modelName:e.modelName.trim(),description:e.description.trim(),instruction:e.instruction.trim()})}function Non({enabled:e,disabledReason:t,variants:n,draftSnapshot:i,input:r,onInput:s,onSend:o,onStartVariant:l,onUseVariant:c,onAddVariant:u,onRemoveVariant:d,onToggleConfig:f,onCompleteConfig:h,onConfigChange:m,onOpenTrace:g}){const{t:b}=Te("create"),v=n.filter(x=>x.phase!=="ready"?!1:x.runtimeSnapshot===QP(i,x)),y=n.some(x=>x.phase==="sending"),w=v.length>0&&!y;return a.jsxs("section",{className:"cw-ab-workspace","aria-label":b("traditional.debug.ariaLabel"),children:[a.jsx("div",{className:"cw-ab-stage",children:e?a.jsx("div",{className:"cw-ab-grid",style:{"--cw-ab-column-count":n.length},children:n.map((x,O)=>{const k=dUe(x,b),S=x.modelName.trim(),C=x.description.trim(),E=x.instruction.trim(),j=qx(x),T=!!(S&&C&&E&&n.findIndex(M=>qx(M)===j)!==O),R=!S||!C||!E||T,A=!!(x.runtimeSnapshot&&x.runtimeSnapshot!==QP(i,x)),N=x.phase==="starting",P=x.phase==="ready"&&!A,I=N||x.phase==="sending",D=P&&x.phase!=="sending"&&x.messages.some(M=>M.role==="assistant"),_=I||x.configOpen||R,L=S?C?E?T?b("traditional.debug.duplicateConfiguration"):"":b("traditional.debug.enterPrompt"):b("traditional.debug.enterDescription"):b("traditional.debug.selectModel"),F=N?b("traditional.debug.starting"):A?b("traditional.debug.applyAndRestart"):P||x.phase==="error"?b("traditional.debug.restart"):b("traditional.debug.start");return a.jsx("article",{className:"cw-ab-card",children:a.jsxs("div",{className:`cw-ab-card-inner${x.configOpen?" is-flipped":""}`,children:[a.jsxs("section",{className:"cw-ab-card-face cw-ab-card-front","aria-hidden":x.configOpen,inert:x.configOpen,children:[a.jsxs("header",{className:"cw-ab-card-head",children:[a.jsxs("div",{className:"cw-ab-card-title",children:[a.jsx("strong",{children:k}),a.jsx("span",{children:x.modelName||b("traditional.debug.defaultModel")})]}),a.jsxs("div",{className:"cw-ab-card-actions",children:[a.jsx("button",{type:"button",className:"cw-ab-config-trigger",disabled:x.configOpen||I,onClick:()=>f(x.id),children:b("traditional.debug.testConfiguration")}),x.id!=="baseline"&&a.jsx("button",{type:"button",className:"cw-ab-remove","aria-label":b("traditional.debug.deleteVariant",{name:k}),disabled:x.configOpen||I,onClick:()=>d(x.id),children:a.jsx(xce,{className:"cw-i"})})]})]}),a.jsx("div",{className:"cw-ab-conversation",children:x.error?a.jsx(xb,{message:x.error,className:"cw-debug-error-detail",defaultExpanded:!0}):N?a.jsxs("div",{className:"cw-ab-empty cw-ab-starting",children:[a.jsx(Fi,{className:"cw-i cw-spin"}),a.jsx("span",{children:b("traditional.debug.creatingEnvironment")})]}):A?a.jsx("div",{className:"cw-ab-empty cw-ab-launch",children:a.jsx("span",{children:b("traditional.debug.configurationChanged")})}):x.messages.length===0?a.jsx("div",{className:"cw-ab-empty cw-ab-launch",children:P?a.jsxs(a.Fragment,{children:[a.jsx("strong",{className:"cw-ab-ready-title",children:b("traditional.debug.ready")}),a.jsx("span",{className:"cw-ab-launch-hint",children:b("traditional.debug.readyHint")})]}):a.jsx("span",{className:"cw-ab-launch-hint",children:L||b("traditional.debug.startHint")})}):x.messages.map((M,V)=>a.jsx("div",{className:`cw-debug-msg cw-debug-msg-${M.role}`,children:a.jsx("div",{className:"cw-debug-content",children:M.role==="user"?M.content:M.error?a.jsx(xb,{message:M.error,className:"cw-debug-msg-error",defaultExpanded:!0}):M.blocks&&M.blocks.length>0?a.jsx(y0,{blocks:M.blocks,onAction:()=>{}}):M.content?M.content:V===x.messages.length-1&&x.phase==="sending"?a.jsx(XLe,{}):null})},V))}),a.jsxs("footer",{className:"cw-ab-deploy-footer",children:[a.jsx("button",{type:"button",className:"cw-ab-trace",disabled:!D,title:D?b("traditional.debug.viewTraceNamed",{name:k}):b("traditional.debug.traceUnavailable"),onClick:()=>g(x.id),children:b("traditional.debug.trace")}),a.jsxs("button",{type:"button",className:"cw-ab-start cw-ab-footer-start",disabled:_,title:L||void 0,onClick:()=>l(x.id),children:[P||A||x.phase==="error"?a.jsx(Wat,{className:"cw-i"}):a.jsx(oon,{className:"cw-i cw-debug-run-icon"}),F]}),a.jsx("button",{type:"button",className:"cw-ab-deploy",disabled:I||!S,onClick:()=>c(x.id),children:b("traditional.debug.useConfiguration")})]})]}),a.jsxs("section",{className:"cw-ab-card-face cw-ab-card-back","aria-hidden":!x.configOpen,inert:!x.configOpen,children:[a.jsxs("header",{className:"cw-ab-config-head",children:[a.jsxs("div",{children:[a.jsx("strong",{children:b("traditional.debug.testConfiguration")}),a.jsx("span",{children:k})]}),a.jsxs("div",{className:"cw-ab-config-head-actions",children:[x.id!=="baseline"&&a.jsx("button",{type:"button",className:"cw-icon-btn cw-icon-danger cw-ab-config-remove","aria-label":b("traditional.debug.deleteVariant",{name:k}),title:b("traditional.debug.deleteVariantGroup"),disabled:I,onClick:()=>d(x.id),children:a.jsx(xce,{className:"cw-i cw-i-sm"})}),a.jsxs("span",{className:`cw-ab-config-done-wrap${L?" is-disabled":""}`,tabIndex:L?0:void 0,children:[a.jsx("button",{type:"button",className:"cw-ab-config-done",disabled:!x.configOpen||R,onClick:()=>h(x.id),children:x.id==="baseline"?b("traditional.debug.finishConfiguration"):b("traditional.debug.finishAndStart")}),L&&a.jsx("span",{className:"cw-ab-config-done-tip",role:"tooltip",children:L})]})]})]}),a.jsxs("div",{className:"cw-ab-config",children:[a.jsxs("label",{children:[a.jsx("span",{children:b("traditional.model.label")}),a.jsx("input",{value:x.modelName,placeholder:b("traditional.debug.currentAgentModel"),disabled:!x.configOpen,onChange:M=>m(x.id,"modelName",M.target.value)})]}),a.jsxs("label",{children:[a.jsx("span",{children:b("common.description")}),a.jsx("textarea",{rows:2,value:x.description,disabled:!x.configOpen,onChange:M=>m(x.id,"description",M.target.value)})]}),a.jsxs("label",{children:[a.jsx("span",{children:b("traditional.basic.systemPrompt")}),a.jsx("textarea",{rows:5,value:x.instruction,disabled:!x.configOpen,onChange:M=>m(x.id,"instruction",M.target.value)})]}),a.jsx("p",{children:b("traditional.debug.configurationHint")})]})]})]})},x.id)})}):a.jsx("div",{className:"cw-debug-empty",children:t})}),a.jsxs("div",{className:"cw-ab-composer",children:[a.jsxs("div",{className:"cw-debug-composerbox",children:[a.jsx("textarea",{className:"cw-debug-input",rows:1,value:r,placeholder:b(w?"traditional.debug.messagePlaceholder":"traditional.debug.startOneFirst"),disabled:!w,onChange:x=>s(x.target.value),onKeyDown:x=>{XT(x.nativeEvent)||x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),o())}}),a.jsx("button",{type:"button",className:"cw-debug-send",title:b("common.send"),disabled:!w||!r.trim(),onClick:o,children:y?a.jsx(Fi,{className:"cw-i cw-spin"}):a.jsx(wat,{className:"cw-i"})})]}),e&&n.length<3&&a.jsxs("button",{type:"button",className:"cw-btn cw-btn-soft cw-ab-add",onClick:u,children:[a.jsx(ic,{className:"cw-i"}),b("traditional.debug.addVariant")]})]})]})}function Ron({profile:e,optimizations:t,unavailableMessage:n,onProfileChange:i,onOptimizationChange:r}){const{t:s}=Te("create");return a.jsx("section",{className:"cw-optimize-workspace","aria-label":s("traditional.optimization.ariaLabel"),children:a.jsxs("div",{className:"cw-optimize-panel",children:[n?a.jsxs("div",{className:"cw-banner",role:"alert",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:n})]}):null,a.jsxs("fieldset",{className:"cw-optimize-section",children:[a.jsx("legend",{children:s("traditional.optimization.scenario")}),a.jsx(By,{className:"cw-optimize-profile-options","aria-label":s("traditional.optimization.scenario"),value:e,onChange:i,children:lH.map(o=>a.jsx("div",{className:`cw-optimize-profile-option${e===o.id?" is-on":""}`,children:a.jsx(By.Item,{value:o.id,block:!0,className:"cw-optimize-profile-control",children:a.jsxs("span",{className:"cw-optimize-profile-copy",children:[a.jsx("strong",{children:s(`traditional.optimization.profiles.${o.id}.label`)}),a.jsx("small",{children:s(`traditional.optimization.profiles.${o.id}.description`)})]})})},o.id))})]}),a.jsxs("fieldset",{className:"cw-optimize-section",children:[a.jsx("legend",{children:s("traditional.optimization.components")}),a.jsx("div",{className:"cw-optimize-option-list",children:imt.map(o=>a.jsxs("section",{className:"cw-optimize-option-group","aria-labelledby":`cw-optimize-group-${o.id}`,children:[a.jsx("h3",{id:`cw-optimize-group-${o.id}`,className:"cw-optimize-option-group-title",children:s(`traditional.optimization.groups.${o.id}`)}),a.jsx("div",{className:"cw-optimize-option-group-items",children:o.componentIds.map(l=>{const c=oH.find(d=>d.id===l);if(!c)return null;const u=t.includes(c.id);return a.jsx(DK,{checked:u,onCheckedChange:d=>{const f=!!d;f!==u&&r(c.id,f)},label:a.jsxs("span",{className:"cw-optimize-option-copy",children:[a.jsx("strong",{children:s(`traditional.optimization.options.${c.id}.label`)}),a.jsx("small",{children:s(`traditional.optimization.options.${c.id}.description`)})]}),className:"cw-optimize-option"},c.id)})})]},o.id))})]})]})})}const Ij=[{id:"build",label:"traditional.workspace.modes.build"},{id:"validate",label:"traditional.workspace.modes.validate"},{id:"optimize",label:"traditional.workspace.modes.optimize"},{id:"environment",label:"traditional.workspace.modes.environment"},{id:"publish",label:"traditional.workspace.modes.publish"}],Ion={build:"traditional.workspace.titles.build",validate:"traditional.workspace.titles.validate",optimize:"traditional.workspace.titles.optimize",environment:"traditional.workspace.titles.environment",publish:"traditional.workspace.titles.publish"};function Pon({mode:e}){const{t}=Te("create");return a.jsx("header",{className:"cw-workspace-header",children:a.jsx("h1",{children:t(Ion[e])})})}function Don({mode:e,busy:t,nextDisabled:n,onChange:i,assistant:r,accessory:s}){const{t:o}=Te("create"),l=Ij.findIndex(d=>d.id===e),c=Ij[l-1],u=Ij[l+1];return a.jsxs("footer",{className:"cw-workspace-footer",children:[s?a.jsx("div",{className:"cw-workspace-footer-accessory",children:s}):null,a.jsxs("div",{className:`cw-workspace-nav-actions${r?" has-assistant":""}`,children:[a.jsx("button",{type:"button",className:`cw-workspace-nav-button${e==="build"?" is-placeholder":""}`,"aria-hidden":e==="build"||void 0,tabIndex:e==="build"?-1:0,disabled:!c||t,onClick:()=>c&&i(c.id),children:o("common.previous")}),a.jsx("span",{"aria-hidden":"true"}),r?a.jsx("div",{className:"cw-workspace-ai-slot",children:r}):null,e==="publish"?a.jsx("div",{id:"cw-publish-primary-action",className:"cw-publish-action-slot"}):a.jsx("button",{type:"button",className:"cw-workspace-nav-button is-primary",disabled:!u||t||n,onClick:()=>u&&i(u.id),children:o("common.next")})]}),a.jsx("nav",{className:"cw-workspace-progress","aria-label":o("traditional.workspace.progress"),children:Ij.map((d,f)=>{const h=d.id===e;return a.jsx("button",{type:"button",className:`${h?"is-active":""}${fi(d.id),children:a.jsx("span",{"aria-hidden":"true"})},d.id)})})]})}function Mon({onBack:e,onCreate:t,onAgentAdded:n,initialDraft:i,features:r,onDeploymentTaskChange:s,createMode:o="custom",freshCreationSurface:l="traditional",workspaceDraftId:c,deploymentTarget:u,cloudProvider:d="volcengine",initialDeployRegion:f=Zi(d),onDeploymentComplete:h,onDeploymentStarted:m,onDraftChange:g,onDiscard:b}){var $d,Fl,zo,Bl,Kc,vo,ia,io,Re,lt,Lt,Ln,wn,pn,jn,Wt,gn,$n,ai,is,re,Vn,bi,La;const{t:v}=Te("create"),y=o==="custom"&&l==="vulcan",w=y&&!i,[x]=p.useState(()=>{const oe=i??wd(d),Le=w?{...oe,name:oe.name.trim()?oe.name:"assistant",dynamicAgentDelegation:!0}:oe;return Aon(Le,d)}),[O,k]=p.useState(x.draft),S=y,[C,E]=p.useState(x.customModelSecretValues),j=(u==null?void 0:u.configuredRuntimeEnvKeys)??[],T=p.useMemo(()=>new Set(j),[j]),R=(($d=O.deployment)==null?void 0:$d.runtimeName)??"",A=u?u.name:ZXt(O.name,R,(Fl=O.deployment)==null?void 0:Fl.runtimeNameCustomized),N=C,P=p.useCallback((oe,Le)=>{E(st=>{const Fe={...st};return Le?Fe[oe]=Le:delete Fe[oe],Fe})},[]);p.useEffect(()=>{k(oe=>Cy(oe,d))},[d]);const[I,D]=p.useState(""),[_,L]=p.useState(!1),[F,M]=p.useState(!1),[V,q]=p.useState(!1),[U,J]=p.useState(null),z=I.trim(),Z=z.length>0&&z.length{se.current=g},[g]),p.useEffect(()=>{var oe;G!==W.current&&(W.current=G,(oe=se.current)==null||oe.call(se,Cy(O,d),H))},[d,O,H,G]);const[Y,X]=p.useState("build"),[ie,ee]=p.useState(!1),[be,ue]=p.useState(()=>new Set),[pe,ke]=p.useState(0),[je,Pe]=p.useState(null),[Ee,ze]=p.useState(!1),[_e,ae]=p.useState((u==null?void 0:u.region)??f),le=(r==null?void 0:r.generatedAgentTestRun)===!0,ge=(r==null?void 0:r.generatedAgentTestRunDisabledReason)||v("traditional.debug.unavailable"),[Oe,Se]=p.useState(()=>{const oe=Cy(i??wd(d),d);return[{id:"baseline",name:v("traditional.debug.baseline"),modelName:hU(oe),description:oe.description,instruction:oe.instruction,configOpen:!1,phase:"idle",runtimeSnapshot:"",messages:[],error:null}]}),[We,Ye]=p.useState("baseline"),ye=p.useRef(1),we=p.useRef(!1),Ae=p.useRef(new Map),[He,Ue]=p.useState(0),[jt,Pt]=p.useState(""),[Kt,Ct]=p.useState(null),[xt,tt]=p.useState(!1),[mt,Ne]=p.useState(!1),Ot=p.useRef(null),[Nt,Yt]=p.useState(""),[xn,Ke]=p.useState(!1),[St,qe]=p.useState(null),[nt,et]=p.useState(""),[ft,Et]=p.useState(!1),[At,It]=p.useState(!1),[Gt,Xe]=p.useState([]),wt=p.useRef(null),vt=p.useRef({});async function tn(){const oe=new Set([...Ae.current.values()].map(({run:st})=>st.runId)),Le=LK().filter(st=>!oe.has(st));Le.length&&await Promise.all(Le.map(async st=>{try{await rx(st),Qk(st)}catch(Fe){console.warn("Failed to clean up stale debug run",Fe)}}))}p.useEffect(()=>(tn(),()=>{for(const{run:oe}of Ae.current.values())rx(oe.runId).then(()=>Qk(oe.runId)).catch(Le=>console.warn("Failed to clean up debug run",Le));Ae.current.clear()}),[]),p.useEffect(()=>()=>{var oe;(oe=Ot.current)==null||oe.call(Ot,!1),Ot.current=null},[]);const Qt=p.useRef(null);Qt.current||(Qt.current=({meta:oe,children:Le})=>a.jsxs("section",{ref:st=>{vt.current[oe.id]=st},id:`cw-sec-${oe.id}`,"data-step-id":oe.id,className:"cw-section",children:[a.jsx("header",{className:"cw-sec-head",children:a.jsx("h2",{className:"cw-sec-title",children:v(oe.label)})}),a.jsx("div",{className:"cw-sec-body",children:Le})]}));const cn=von(O,Gt)?Gt:[],Me=Rj(O,cn),on=cn.length===0,On=cn.join(".")||"root",Sn=()=>{ue(oe=>oe.has(On)?oe:new Set(oe).add(On))},Qi=`cw-a2a-registry-advanced-${cn.join("-")||"root"}`,un=oe=>k(Le=>ZT(Le,cn,st=>({...st,...oe}))),lr=oe=>k(Le=>{var st;return{...Le,deployment:{...Le.deployment??{feishuEnabled:!1},envValues:{...((st=Le.deployment)==null?void 0:st.envValues)??{},...oe}}}}),Mn=(oe,Le)=>lr({[oe]:Le}),ei=oe=>un({a2aRegistry:{...Me.a2aRegistry??{enabled:!1,registrySpaceId:"",registryTopK:"",registryRegion:"",registryEndpoint:""},...oe}}),Bn=(oe,Le)=>{if(!(oe in wce))return;const st=wce[oe];ei({[st]:Le}),Mn(oe,Le)},ki=oe=>{if(!(on&&oe==="a2a")){if(oe==="a2a"){un({agentType:oe,a2aRegistry:{...Me.a2aRegistry??{registrySpaceId:"",registryTopK:"",registryRegion:"",registryEndpoint:""},enabled:!0}});return}un({agentType:oe,a2aRegistry:Me.a2aRegistry?{...Me.a2aRegistry,enabled:!1}:void 0})}},zn=(oe,Le)=>{k(oe),Le&&Xe(Le)},Rn=async()=>{const oe=I.trim();if(!(!oe||_)&&!(oe.length{const Le=Rj(O,oe);if(!UP(Le)||oe.length>=Cce)return;const st=xon(O,oe,d),Fe=Rj(st,oe).subAgents.length-1;zn(st,[...oe,Fe])},rt=(oe,Le)=>{const st=Rj(O,oe);if(!UP(st)||oe.length>=Cce)return;const Fe=Math.max(0,Math.min(Le,st.subAgents.length)),de=won(O,oe,Fe,d);zn(de,[...oe,Fe])},zt=()=>{window.confirm(v("traditional.actions.clearRootConfirmation"))&&(k(wd(d)),Xe([]),ee(!1))},Qe=oe=>{if(oe.length===0){zt();return}zn(Oon(O,oe),oe.slice(0,-1))},bt=Me.builtinTools??[],Ht=p.useMemo(()=>NIe(d),[d]),_n=p.useMemo(()=>new Set(Ht.map(oe=>oe.id)),[Ht]),jr=Me.mcpTools??[],Hs=on?J7e(O):null,qs=Me.selectedSkills??[],Dr=oe=>{_n.has(oe)&&un({builtinTools:bt.includes(oe)?bt.filter(Le=>Le!==oe):[...bt,oe]})},ti=M7e(Me.agentType),Si=UL(Me.agentType),Zr=gM(d),Jr=cm(Me,d),ga=oe=>{var st;const Le=oe==="custom"&&Jr==="ark"?"":oe==="ark"&&!((st=Me.modelName)!=null&&st.trim())?Gp(d):Me.modelName;un({modelSource:oe,modelName:Le,modelFallbacks:oe==="custom"&&Jr==="ark"?[]:Ru(Le,Me.modelFallbacks)})},go=p.useMemo(()=>Ptn(O),[O]),us=Si?null:KT(Me.name,oe=>v(`validation.agentName.${oe}`))??(go.has(Me.name)?v("traditional.validation.duplicateName"):null),he=us!==null,pr=ie||be.has(On),bo=!Si&&Me.description.trim().length===0,to=Me.instruction.trim().length===0,fl=Si&&!((zo=Me.a2aRegistry)!=null&&zo.registrySpaceId.trim()),no=(oe,Le=ie)=>Le&&oe?`is-error cw-error-shake-${pe%2}`:"",ws=p.useMemo(()=>lUe(O,go),[O,go]),Ws=ws.length===0,Ai=p.useMemo(()=>Cy(O,d),[d,O]),rr=umt(O),Ds=yI(O),hl=rmt(d),pl=p.useMemo(()=>jon(Ai,N),[Ai,N]),mr=Oe.find(oe=>oe.id===We)??Oe[0],Mr=p.useMemo(()=>fU(Ai,(u==null?void 0:u.editMode)==="source-preserving"),[u==null?void 0:u.editMode,Ai]),ml=!u||u.editMode==="regenerate",Mo=p.useMemo(()=>NK(Ai,Po(d)),[d,Ai]),Nr=p.useMemo(()=>cUe(Ai,d),[d,Ai]),Lo=p.useMemo(()=>T7e(Ai,Po(d),C,j),[d,j,C,Ai]),es=Nr!==null&&!((Kc=(Bl=Ai.deployment)==null?void 0:Bl.modelApiKeyId)!=null&&Kc.trim()),ba=es||!!Lo,Di=Mo.find(oe=>oe.label===Xt("helpers.customModel.apiKeyLabel",{name:Me.name.trim()||Xt("helpers.customModel.fallbackName")})),Ms=Di?T.has(Di.key):!1,zr=Jr==="custom"&&Di!==void 0&&!((vo=C[Di.key])!=null&&vo.trim())&&!Ms,ds=Jr==="ark"&&!((io=(ia=Ai.deployment)==null?void 0:ia.modelApiKeyId)!=null&&io.trim()),gl=!MK(Me.modelApiBase),na=p.useCallback(oe=>{k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},modelApiKeyId:oe.id,modelApiKeyName:oe.name}}))},[]);function gi(oe){const Le=oe.problem==="mcpDuplicateName"||oe.problem==="mcpDuplicateUrl"?"tools":oe.problem==="missingSubagent"?"type":"basic",st=vt.current[Le];st==null||st.scrollIntoView({behavior:"smooth",block:"start"});const Fe=oe.problem==="mcpDuplicateName"?"mcp-name":oe.problem==="mcpDuplicateUrl"?"mcp-url":oe.problem==="missingDescription"?"description":oe.problem==="missingPrompt"?"instruction":oe.problem==="missingRegistry"?"a2a-registry":oe.problem==="missingSubagent"||oe.problem==="remoteRoot"?null:"name",de=Fe?st==null?void 0:st.querySelector(`[data-validation-field="${Fe}"]`):st,Be=de!=null&&de.matches('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])')?de:de==null?void 0:de.querySelector('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])');Be==null||Be.focus({preventScroll:!0})}function Dl(oe){Xe(oe),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{const Le=vt.current.model;Le==null||Le.scrollIntoView({behavior:"smooth",block:"start"});const st=(Le==null?void 0:Le.querySelector('[data-validation-field="model-api-key"]'))??Le,Fe=st!=null&&st.matches('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])')?st:st==null?void 0:st.querySelector('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])');Fe==null||Fe.focus({preventScroll:!0})})})}const $o=()=>Ws?ba?(ee(!0),ke(oe=>oe+1),Dl(es?Nr??[]:(Lo==null?void 0:Lo.path)??[]),!1):(Yt(""),!0):(ee(!0),ke(oe=>oe+1),ws[0]&&(Xe(ws[0].path),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>gi(ws[0]))})),!1),Ks=async()=>{Ct(null);const oe=[...Ae.current.values()];Ae.current.clear(),Ue(0),Se(Le=>Le.map(st=>({...st,phase:"idle",runtimeSnapshot:"",messages:[],error:null}))),await Promise.all(oe.map(async({run:Le})=>{try{await rx(Le.runId),Qk(Le.runId)}catch(st){console.warn("Failed to clean up debug run",st)}}))},bl=async oe=>{const Le=Ae.current.get(oe);if(Le){Ae.current.delete(oe),Ue(Ae.current.size);try{await rx(Le.run.runId),Qk(Le.run.runId)}catch(st){console.warn("Failed to clean up debug run",st)}}},Fo=oe=>{const Le=Ae.current.get(oe),st=Oe.find(Fe=>Fe.id===oe);!Le||!st||Ct({runId:Le.run.runId,sessionId:Le.sessionId,variantName:dUe(st,v)})},Pa=oe=>{const Le=Ot.current;Ot.current=null,Le==null||Le(oe)},yl=()=>{mt||(tt(!1),Pa(!1))},Uu=async()=>{if(!mt){Ne(!0);try{await Ks(),tt(!1),Pa(!0)}finally{Ne(!1)}}},Bo=async()=>Y!=="validate"||He===0?!0:Ot.current?!1:new Promise(oe=>{Ot.current=oe,tt(!0)}),hc=async oe=>{if(await Bo()){if(!$o()){X("build");return}oe&&Ye(oe),X("environment")}},Dd=async oe=>{var st,Fe;if(Yt(""),!$o()){X("build");return}if((st=Ai.harnessSidecar)!=null&&st.enabled&&hl){Yt(hl),X("optimize");return}const Le=lU(Mr.specs,((Fe=Ai.deployment)==null?void 0:Fe.envValues)??{});if(Le){Yt(`${Le.spec.comment||Le.spec.key}:${Le.error}`),X("build");return}ze(!0);try{const de=oe?Oe.find(ct=>ct.id===oe):mr;de&&Ye(de.id);const Be=de?cmt(Ai,de):Ai,at=await eE(_S(Be));k(Be),Pe(at),X("publish")}catch(de){Yt(de instanceof Error?de.message:String(de))}finally{ze(!1)}},Md=async()=>{if(await Bo()){if(!$o()){X("build");return}X("optimize")}},yo=async oe=>{if(!le||Ee||!$o())return;const Le=Oe.find(Vt=>Vt.id===oe);if(!Le||Le.phase==="starting"||Le.phase==="sending")return;const st=Le.modelName.trim(),Fe=Le.description.trim(),de=Le.instruction.trim(),Be=qx(Le),at=Oe.findIndex(Vt=>Vt.id===oe),ct=Oe.findIndex(Vt=>qx(Vt)===Be);if(!st||!Fe||!de||ct!==at)return;const $t=QP(pl,Le);Se(Vt=>Vt.map(fi=>fi.id===oe?{...fi,configOpen:!1,phase:"starting",messages:[],error:null}:fi)),Pt("");let kn=null,Ti="unknown";const sn=oe==="baseline"?"baseline":"comparison",oi=Rtn({agentId:String(Ai.name||"unknown"),variantType:sn});try{await bl(oe),await tn();const Vt={...Ai,modelName:Le.modelName||Ai.modelName,description:Le.description,instruction:Le.instruction};Ti="create_test_run",kn=await _2e(fUe(Vt,N),u?{runtimeId:u.runtimeId,region:u.region}:void 0),ron(kn.runId),Ti="create_test_session";const fi=await j2e(kn.runId,"test_user");Ae.current.set(oe,{run:kn,sessionId:fi}),Ue(Ae.current.size),Se(Un=>Un.map(sr=>sr.id===oe?{...sr,phase:"ready",runtimeSnapshot:$t}:sr)),oi.succeed({debugRunId:String(kn.runId)})}catch(Vt){if(kn)try{await rx(kn.runId),Qk(kn.runId)}catch(fi){console.warn("Failed to clean up debug run",fi)}Se(fi=>fi.map(Un=>Un.id===oe?{...Un,phase:"error",runtimeSnapshot:"",error:Vt instanceof Error?Vt.message:String(Vt)}:Un)),oi.fail({failedPhase:Ti,...Xo(Vt,{phase:Ti})})}},Ld=async()=>{const oe=jt.trim(),Le=Oe.filter(Fe=>Fe.phase==="ready"&&Fe.runtimeSnapshot===QP(pl,Fe)&&Ae.current.has(Fe.id));if(!oe||Le.length===0)return;Pt("");const st=new Set(Le.map(Fe=>Fe.id));Se(Fe=>Fe.map(de=>st.has(de.id)?{...de,phase:"sending",messages:[...de.messages,{role:"user",content:oe},{role:"assistant",content:"",blocks:[]}]}:de)),await Promise.all(Le.map(async Fe=>{const de=Ae.current.get(Fe.id);if(de)try{let Be=dB();for await(const at of R2e({runId:de.run.runId,userId:"test_user",sessionId:de.sessionId,text:oe})){const ct=at.error||at.errorMessage||at.error_message;if(ct||(Be=Zje(Be,at)),Se($t=>$t.map(kn=>{if(kn.id!==Fe.id)return kn;const Ti=[...kn.messages],sn={...Ti[Ti.length-1]};return ct?sn.error=String(ct):(sn.content=Be.blocks.filter(oi=>oi.kind==="text").map(oi=>oi.text).join(""),sn.blocks=Be.blocks),Ti[Ti.length-1]=sn,{...kn,messages:Ti}})),ct)break}}catch(Be){Se(at=>at.map(ct=>{if(ct.id!==Fe.id)return ct;const $t=[...ct.messages],kn={...$t[$t.length-1]};return kn.error=Be instanceof Error?Be.message:String(Be),$t[$t.length-1]=kn,{...ct,messages:$t}}))}finally{Se(Be=>Be.map(at=>at.id===Fe.id?{...at,phase:"ready"}:at))}}))},vl=()=>{Se(oe=>{if(oe.length>=3)return oe;const Le=ye.current++,st=`variant-${Le}`;return[...oe,{id:st,name:v("traditional.debug.comparison",{count:Le}),modelName:O.modelName??"",description:O.description,instruction:O.instruction,configOpen:!0,phase:"idle",runtimeSnapshot:"",messages:[],error:null}]})},Ml=async oe=>{await bl(oe),Se(Le=>Le.filter(st=>st.id!==oe)),We===oe&&Ye("baseline")},Da=(oe,Le)=>Se(st=>st.map(Fe=>Fe.id===oe?{...Fe,...Le}:Fe)),Uo=(oe,Le)=>{if(Le&&hl){Yt(hl);return}const st=Le?[...new Set([...Ds,oe])]:Ds.filter(de=>de!==oe),Fe=rr==="ops"?"default":rr;k(de=>({...de,harnessSidecar:jy(st,Fe)})),Yt(""),Pe(null)},Qo=oe=>{const Le=cH(oe);if(Le.length>0&&hl){Yt(hl);return}k(st=>({...st,harnessSidecar:jy(Le,oe)})),Yt(""),Pe(null)},Qu=(oe,Le,st)=>{oe==="baseline"&&Le==="modelName"&&(we.current=!0),Da(oe,{[Le]:st}),!(We!==oe||oe==="baseline")&&Ye("baseline")},xl=oe=>{const Le=Oe.find($t=>$t.id===oe);if(!Le)return;const st=Le.modelName.trim(),Fe=Le.description.trim(),de=Le.instruction.trim(),Be=qx(Le),at=Oe.findIndex($t=>$t.id===oe),ct=Oe.findIndex($t=>qx($t)===Be);if(!(!st||!Fe||!de||ct!==at)){if(oe==="baseline"){Da(oe,{configOpen:!1});return}yo(oe)}},Ll=async(oe,Le,st)=>{var ct,$t,kn;const Fe=(u==null?void 0:u.editMode)==="source-preserving",de=yI(O).includes("mcp_resilience"),Be=(ct=O.deployment)==null?void 0:ct.network,at=Be&&Be.mode&&Be.mode!=="public"?{mode:Be.mode,vpc_id:Be.vpcId,subnet_ids:Be.subnetIds,enable_shared_internet_access:Be.enableSharedInternetAccess}:void 0;return U0(oe.name,oe.files,{region:(u==null?void 0:u.region)??_e,projectName:"default",network:at},{...st,onStage:Le,runtimeId:u==null?void 0:u.runtimeId,runtimeName:(st==null?void 0:st.runtimeName)??A,appName:u==null?void 0:u.appName,agentCategory:"mpa",editMode:u==null?void 0:u.editMode,draft:u||de?_S(O):void 0,updateEtag:u==null?void 0:u.etag,baseRuntimeVersion:u==null?void 0:u.currentVersion,envs:Fe?_on(O,d,st==null?void 0:st.envs):st==null?void 0:st.envs,mcpSecretValues:Fe?_an(O):de?Tan(O):void 0,removeRuntimeEnvKeys:u?[...Oan(u.configuredMcpEnvKeys??[],O),...($t=O.deployment)!=null&&$t.feishuEnabled?[]:["FEISHU_APP_ID","FEISHU_APP_SECRET"]]:void 0,description:O.description,harnessSidecar:O.harnessSidecar,environment:(kn=O.cloudEnvironment)!=null&&kn.environmentId?{environmentId:O.cloudEnvironment.environmentId,environmentVersionId:O.cloudEnvironment.environmentVersionId}:void 0})},Ls=()=>{$o()&&(Se(oe=>oe.map(Le=>Le.id==="baseline"&&!Ae.current.has(Le.id)?{...Le,modelName:we.current?Le.modelName:hU(Ai),description:Ai.description,instruction:Ai.instruction}:Le)),X("validate"))},Ma=async oe=>{if(oe==="publish"){if(!await Bo())return;await Dd();return}if(oe==="validate"){Ls();return}if(oe==="optimize"){await Md();return}if(oe==="environment"){hc();return}await Bo()&&X(oe)},rn=oe=>{k(Le=>({...Le,cloudEnvironment:oe})),Yt(""),Pe(null)},$l=async oe=>{var Hn,gr,ks,zi,wr,Fd,Db,dv,fv,$h,Pf,Rr;if(xn||(et(""),Et(!1),!$o()))return;const Le=ov(A.trim());if(Le){et(Le);return}const st={...Ai,memory:{...Ai.memory,shortTerm:oe.sessionBackend!=="local"},shortTermBackend:oe.sessionBackend},Fe=fU(st,(u==null?void 0:u.editMode)==="source-preserving"),de=(Hn=st.deployment)==null?void 0:Hn.network;if((de==null?void 0:de.mode)!==void 0&&de.mode!=="public"&&!((gr=de.vpcId)!=null&&gr.trim())){et(v("traditional.deployment.vpcRequired"));return}if(cm(st,d)==="ark"&&!((zi=(ks=st.deployment)==null?void 0:ks.modelApiKeyId)!=null&&zi.trim())){et(v("traditional.deployment.apiKeyRequired"));return}const Be={...((wr=st.deployment)==null?void 0:wr.envValues)??{},...C,...Fe.fixedValues},at=Object.keys(Be).find(wl=>wl&&!/^[A-Za-z_][A-Za-z0-9_]*$/.test(wl));if(at){et(v("traditional.deployment.invalidEnvName",{key:at}));return}const ct=(Fd=st.deployment)!=null&&Fd.feishuEnabled?[...Fe.specs,...uS]:Fe.specs,$t=ssn(ct,Be,j);if($t){et(v("traditional.deployment.requiredEnv",{name:$t.comment||$t.key}));return}const kn=lU(ct,Be);if(kn){et(`${kn.spec.comment||kn.spec.key}:${kn.error}`);return}Ke(!0),qe({level:"info",phase:"prepare",message:v("traditional.deployment.generatingConfiguration"),pct:0});let Ti=null,sn="prepare",oi=v("traditional.deployment.preparing"),Vt=v("traditional.deployment.generatingConfiguration"),fi=u==null?void 0:u.runtimeId,Un=(u==null?void 0:u.region)??_e,sr;try{if(!u&&!(await ND(A.trim(),_e)).available)throw new Error(v("traditional.deployment.runtimeNameExists"));const wl=await eE(_S(st));Pe(wl);const zu=crypto.randomUUID(),pc=Date.now(),$a={id:zu,...c?{draftId:c}:{},agentName:st.name,runtimeName:A.trim(),runtimeId:u==null?void 0:u.runtimeId,region:(u==null?void 0:u.region)??_e,startedAt:pc,agentDraft:st,mpaProfile:!0,mpaSmoke:!u},Om={...$a,status:"running",phase:sn,label:oi,message:Vt,pct:0};if(Ti=Om,s==null||s(Om),m==null||m(Om),u!=null&&u.mpaProfileOnly){sn="profile_applying",oi=v("traditional.deployment.stages.applyMpaProfile"),Vt=v("traditional.deployment.applyingMpaProfile"),qe({level:"info",phase:sn,message:Vt,pct:0}),s==null||s({...$a,status:"running",phase:sn,label:oi,message:Vt,pct:0,mpaProfile:!0,mpaSmoke:!1});const Xi=u.etag?"update":"create",Fa=await eI({draft:st,taskId:zu,agentName:st.name,runtimeId:u.runtimeId,region:u.region,operationKind:Xi,mpaInstanceId:u.mpaInstanceId,runtimeName:A.trim(),sourceDraftId:c,runtimeRevision:u.etag});if(Fa.status!=="succeeded")throw Vt=Fa.safeErrorCode||v("traditional.deployment.mpaOperationIncomplete"),qe({level:"error",phase:sn,message:Vt,pct:100}),new Error(Vt);Et(!0),qe({level:"success",phase:sn,message:v("traditional.deployment.mpaProfileApplied"),pct:100}),s==null||s({...$a,status:"success",phase:"complete",label:v("traditional.deployment.complete"),message:v("traditional.deployment.mpaProfileApplied"),pct:100,mpaProfile:!0,mpaSmoke:!1}),await(h==null?void 0:h({apikey:"",url:"",agentName:st.name,runtimeName:A.trim(),runtimeId:u.runtimeId,mpaInstanceId:u.mpaInstanceId,region:u.region,version:u.currentVersion,mpaOperation:Fa}));return}const Vu=new Map(Object.entries(Be).map(([Xi,Fa])=>[Xi.trim(),Fa]).filter(([Xi,Fa])=>Xi&&Fa.trim()));for(const Xi of RK(ct,Be))Vu.set(Xi.key,Xi.value);const Df=(dv=(Db=st.deployment)==null?void 0:Db.modelApiKeyId)==null?void 0:dv.trim(),Ul=($h=(fv=st.deployment)==null?void 0:fv.modelApiKeyName)==null?void 0:$h.trim();Df&&Vu.set("MODEL_AGENT_API_KEY_ID",Df),Ul&&Vu.set("MODEL_AGENT_API_KEY_NAME",Ul);const ro=await Ll(wl,Xi=>{sn=Xi.phase,oi=Xi.phase==="build"?v("traditional.deployment.stages.build"):Xi.phase==="deploy"?v("traditional.deployment.stages.deploy"):Xi.phase==="publish"?v("traditional.deployment.stages.publish"):v("traditional.deployment.stages.running"),Vt=Xi.message,qe(Xi),s==null||s({...$a,runtimeName:Xi.runtimeName||$a.runtimeName,status:"running",phase:sn,label:oi,message:Vt,messageCode:Xi.messageCode,pct:Xi.pct,...Xi.buildLog?{buildLog:Xi.buildLog}:{}})},{taskId:zu,runtimeName:A.trim(),sessionStorage:oe.sessionStorage,minInstance:oe.minInstance,maxInstance:oe.maxInstance,authentication:oe.authentication,createEvaluationSets:oe.createEvaluationSets,resources:oe.resources,...(Pf=st.deployment)!=null&&Pf.feishuEnabled?{im:{feishu:{enabled:!0}}}:{},envs:[...Vu].map(([Xi,Fa])=>({key:Xi,value:Fa}))});let mc=ro;const yt=ro.runtimeId||(u==null?void 0:u.runtimeId)||"",Vo=ro.region||(u==null?void 0:u.region)||_e;if(fi=yt||fi,Un=Vo,yt){sn="profile_applying",oi=v("traditional.deployment.stages.applyMpaProfile"),Vt=v("traditional.deployment.applyingMpaProfile"),qe({level:"info",phase:sn,message:Vt,pct:0}),s==null||s({...$a,runtimeName:ro.runtimeName||$a.runtimeName,runtimeId:yt,region:Vo,status:"running",phase:sn,label:oi,message:Vt,pct:0,mpaProfile:!0,mpaSmoke:!u});const Xi=await eI({draft:st,taskId:zu,agentName:st.name,runtimeId:yt,region:Vo,operationKind:u?"update":"create",mpaInstanceId:(u==null?void 0:u.mpaInstanceId)??ro.mpaInstanceId,runtimeName:A.trim()||ro.runtimeName,sourceDraftId:c,runtimeRevision:u==null?void 0:u.etag});if(Xi.status!=="succeeded"){if(sn=Xi.stage==="smoke_running"?"smoke_running":"profile_applying",oi=v(sn==="smoke_running"?"traditional.deployment.stages.verifyMpaRuntime":"traditional.deployment.stages.applyMpaProfile"),Vt=Xi.safeErrorCode||v("traditional.deployment.mpaOperationIncomplete"),qe({level:"error",phase:sn,message:Vt,pct:100}),Xi.status==="failed_retryable"){const Fa={operationKind:u?"update":"create",runtimeId:yt,region:Vo,mpaInstanceId:(u==null?void 0:u.mpaInstanceId)??ro.mpaInstanceId??yt,sourceProfileId:c!=null&&c.trim()?`studio-draft:${c.trim()}`:`studio-agent:${st.name}:${zu}`,draft:st,targetKey:u?u.mpaInstanceId??yt:`runtime:${Vo}:${A.trim()||ro.runtimeName}`,runtimeRevision:u==null?void 0:u.etag};sr=async()=>{const Nn=await Nz(Xi.operationId,Fa);if(s==null||s({...$a,runtimeId:yt,mpaInstanceId:Fa.mpaInstanceId,region:Vo,status:Nn.status==="succeeded"?"success":"error",phase:Nn.stage,label:Nn.status==="succeeded"?v("traditional.deployment.complete"):v("traditional.deployment.failed"),message:Nn.safeErrorCode||void 0,pct:100,mpaProfile:!0,mpaSmoke:!u,operationId:Nn.operationId}),Nn.status!=="succeeded")throw new Error(Nn.safeErrorCode||v("traditional.deployment.mpaOperationIncomplete"));await(h==null?void 0:h({...ro,mpaOperation:Nn}))}}throw new Error(Vt)}u?(Vt=v("traditional.deployment.mpaProfileApplied"),qe({level:"success",phase:sn,message:Vt,pct:100})):(sn="smoke_running",oi=v("traditional.deployment.stages.verifyMpaRuntime"),Vt=v("traditional.deployment.runningMpaSmoke"),s==null||s({...$a,runtimeName:ro.runtimeName||$a.runtimeName,runtimeId:yt,region:Vo,status:"running",phase:sn,label:oi,message:Vt,pct:100,mpaProfile:!0,mpaSmoke:!0}),sn="runnable",oi=v("traditional.deployment.stages.mpaReady"),Vt=v("traditional.deployment.mpaReady"),qe({level:"success",phase:sn,message:Vt,pct:100})),mc={...ro,mpaOperation:Xi}}Et(!0),qe({level:"success",phase:"complete",message:v("traditional.deployment.complete"),pct:100}),s==null||s({...$a,runtimeName:mc.runtimeName||$a.runtimeName,runtimeId:mc.runtimeId||(u==null?void 0:u.runtimeId),region:mc.region||(u==null?void 0:u.region)||_e,status:"success",phase:mc.mpaOperation&&!u?"runnable":"complete",label:v("traditional.deployment.complete"),message:mc.mpaOperation&&!u?v("traditional.deployment.mpaReady"):(Rr=mc.warnings)==null?void 0:Rr.join(";"),pct:100,mpaProfile:!0,mpaSmoke:!!(mc.mpaOperation&&!u)}),await(h==null?void 0:h(mc))}catch(wl){const zu=wl instanceof Error?wl.message:String(wl);et(zu),qe(null);const pc={...Ti??{id:crypto.randomUUID(),agentName:Ai.name||v("traditional.basic.unnamedAgent"),runtimeName:A.trim(),region:_e,startedAt:Date.now()},status:"error",runtimeId:fi,region:Un,phase:sn,label:v("traditional.deployment.failed"),message:zu,mpaProfile:!0,mpaSmoke:!u,operationId:void 0,retry:sr??(()=>$l(oe))};s==null||s(pc)}finally{Ke(!1)}},Os=Qt.current,ts=oe=>aon.find(Le=>Le.id===oe),ns=a.jsx("section",{className:`cw-ai-compose${_?" is-generating":""}${F?" is-success":""}`,"aria-label":v("traditional.ai.ariaLabel"),children:a.jsx(ff,{initial:!1,mode:"wait",children:F?a.jsxs(Cr.div,{className:"cw-ai-compose-success",role:"status",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.22,ease:[.22,1,.36,1]},children:[a.jsx("span",{className:"cw-ai-success-check","aria-hidden":!0}),a.jsx("strong",{children:v("traditional.ai.success")}),a.jsx("button",{type:"button",className:"cw-ai-regenerate",onClick:()=>M(!1),children:v("traditional.ai.regenerate")})]},"success"):a.jsxs(Cr.div,{className:"cw-ai-compose-entry",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.2,ease:[.22,1,.36,1]},children:[a.jsxs("form",{className:"cw-ai-compose-form",onSubmit:oe=>{oe.preventDefault(),Rn()},children:[a.jsx("input",{type:"text",value:I,maxLength:8e3,disabled:_,placeholder:v("traditional.ai.placeholder",{model:ltt(d)}),"aria-invalid":!!Z,"aria-describedby":Z?"ai-requirement-error":void 0,onChange:oe=>D(oe.target.value),onKeyDown:oe=>{XT(oe.nativeEvent)||oe.key==="Enter"&&(oe.preventDefault(),Rn())}}),a.jsx("button",{type:"submit",disabled:_||!z||!!Z,"aria-label":v(_?"traditional.ai.generating":"traditional.ai.generate"),children:_?a.jsx("span",{className:"cw-ai-orb","aria-hidden":!0,children:a.jsx("span",{})}):v("traditional.ai.generate")})]}),Z&&a.jsx("p",{className:"cw-ai-requirement-error",id:"ai-requirement-error",role:"alert",children:Z})]},"compose")})});return S?a.jsx(Van,{draft:Ai,cloudProvider:d,deployRegion:_e,runtimeName:A,isRuntimeUpdate:!!u,profileOnly:u==null?void 0:u.mpaProfileOnly,deploying:xn,deployStage:St,deployError:nt,deploySucceeded:ft,showErrors:ie,onBack:e,onDraftPatch:oe=>{k(Le=>({...Le,...oe})),Pe(null),Yt("")},onDeploymentPatch:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},...oe}})),onModelApiKeyChange:na,customModelApiKey:Di?C[Di.key]??"":"",customModelSecretValues:C,customModelApiKeyConfigured:Ms,configuredRuntimeEnvKeys:j,showModelFallbacks:ml,onCustomModelApiKeyChange:oe=>{Di&&P(Di.key,oe)},onCustomModelSecretChange:P,onSelectedSkillsChange:oe=>k(Le=>({...Le,selectedSkills:oe})),onCloudEnvironmentChange:rn,onDeployRegionChange:ae,onRuntimeNameChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},runtimeName:oe,runtimeNameCustomized:!0}})),onNetworkChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},network:oe}})),onDeploy:oe=>void $l(oe)}):a.jsxs("div",{className:`cw-root is-${Y}`,children:[a.jsx(Pon,{mode:Y}),Nt&&a.jsx(xb,{className:"cw-workspace-alert",message:Nt}),a.jsxs("main",{className:"cw-workspace-main",id:"cw-workspace-main",children:[Y==="build"&&a.jsx("div",{className:"cw-build-workspace",children:a.jsxs("div",{className:"cw-editor",children:[a.jsx(IP,{draft:O,direction:"horizontal",selectedPath:cn,onSelect:Xe,onAdd:di,onInsert:rt,onDelete:Qe}),a.jsx("div",{className:"cw-detail",children:a.jsx("div",{className:"cw-detail-scroll",ref:wt,children:a.jsx("div",{className:"cw-detail-inner",children:a.jsx("div",{className:"cw-lower",children:a.jsxs("div",{className:"cw-form-col",children:[a.jsxs(Os,{meta:ts("type"),children:[a.jsx(By,{className:"cw-agent-type-options","aria-label":v("traditional.agentTypes.ariaLabel"),value:Me.agentType??"llm",onChange:ki,children:uan.map(oe=>{const Le=(Me.agentType??"llm")===oe.id,st=on&&oe.id==="a2a",Fe=st?"cw-remote-agent-disabled-hint":void 0;return a.jsxs("div",{"data-agent-type":oe.id,className:`cw-agent-type-option ${Le?"is-on":""} ${st?"is-disabled":""}`,tabIndex:st?0:void 0,"aria-describedby":Fe,children:[a.jsx(By.Item,{value:oe.id,disabled:st,block:!0,className:"cw-agent-type-control",children:a.jsx("span",{className:"cw-agent-type-copy",children:a.jsx("strong",{children:v(lon[oe.id])})})}),st&&a.jsx("span",{id:Fe,className:"cw-agent-type-disabled-hint",role:"tooltip",children:v("traditional.agentTypes.remoteChildOnly")})]},oe.id)})}),ie&&ti&&Me.subAgents.length===0&&a.jsx("span",{className:"cw-error-text",children:Son({name:Me.name.trim(),agentType:Me.agentType},v)})]}),a.jsx(Os,{meta:ts("basic"),children:a.jsxs("div",{className:"cw-form",children:[!Si&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"cw-field",children:[a.jsxs("label",{className:"cw-label",children:[v(on?"traditional.basic.agentName":"traditional.basic.name"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx("input",{className:`cw-input ${no(he,pr)}`,"data-validation-field":"name",value:Me.name,placeholder:"assistant","aria-invalid":pr&&he,"aria-describedby":pr&&us?"cw-agent-name-error":void 0,onBlur:Sn,onChange:oe=>{Sn(),un({name:oe.target.value})}}),pr&&us?a.jsx("span",{id:"cw-agent-name-error",role:"alert",className:"cw-error-text",children:us}):a.jsx("span",{className:"cw-help",children:v("traditional.basic.nameHelp")})]}),a.jsxs("div",{className:"cw-field",children:[a.jsxs("label",{className:"cw-label",children:[v(on?"common.description":"traditional.basic.agentDescription"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx("textarea",{className:`cw-textarea cw-textarea-sm ${no(bo)}`,"data-validation-field":"description",value:Me.description,placeholder:v("traditional.basic.descriptionPlaceholder"),"aria-invalid":ie&&bo,"aria-describedby":ie&&bo?"cw-agent-description-error":void 0,onChange:oe=>un({description:oe.target.value})}),ie&&bo?a.jsx("span",{id:"cw-agent-description-error",role:"alert",className:"cw-error-text",children:v("traditional.validation.missingDescription")}):a.jsx("span",{className:"cw-help",children:v(on?"traditional.basic.rootDescriptionHelp":"traditional.basic.descriptionHelp")})]})]}),ti?a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"cw-section-desc cw-dependency-hint",children:v("traditional.basic.orchestratorHelp")}),Me.agentType==="loop"&&a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.basic.maxIterations")}),a.jsx("input",{className:"cw-input",type:"number",min:1,value:Me.maxIterations??3,onChange:oe=>un({maxIterations:Math.max(1,Number(oe.target.value)||1)})}),a.jsx("span",{className:"cw-help",children:v("traditional.basic.maxIterationsHelp")})]})]}):Si?a.jsxs("div",{className:"cw-field cw-remote-center-fields","data-validation-field":"a2a-registry",children:[a.jsxs("div",{className:"cw-remote-center-head",children:[a.jsxs("div",{className:"cw-label",children:[v("traditional.basic.agentCenter"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx("p",{className:"cw-help cw-remote-center-description",children:v("traditional.basic.agentCenterHelp")})]}),a.jsx(pon,{value:((Re=Me.a2aRegistry)==null?void 0:Re.registrySpaceId)??"",region:((lt=Me.a2aRegistry)==null?void 0:lt.registryRegion)||Zr.region,invalid:ie&&fl,onChange:oe=>Bn(sUe,oe)}),a.jsxs("button",{type:"button",className:"cw-more-options","aria-expanded":At,"aria-controls":Qi,onClick:()=>It(oe=>!oe),children:[a.jsx("span",{children:v("traditional.basic.moreOptions")}),a.jsx(HA,{className:`cw-more-options-chevron ${At?"is-open":""}`,"aria-hidden":!0})]}),a.jsx(ff,{initial:!1,children:At&&a.jsx(Cr.div,{id:Qi,className:"cw-model-advanced",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.18,ease:"easeOut"},children:a.jsx(zk,{env:mx(con,d),values:aUe(Me.a2aRegistry,{includeDefaults:!1},d),onChange:Bn})})}),ie&&fl&&a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.validation.missingRegistry")})]}):a.jsxs("div",{className:"cw-field","data-validation-field":"instruction",children:[a.jsxs("label",{className:"cw-label",children:[v("traditional.basic.systemPrompt"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx(p.Suspense,{fallback:a.jsx("div",{className:"cw-markdown-loading",role:"status",children:v("traditional.basic.loadingMarkdown")}),children:a.jsx(ion,{value:Me.instruction,invalid:to,onChange:oe=>un({instruction:oe})})}),ie&&to?a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.validation.missingPrompt")}):a.jsx("span",{className:"cw-help",children:v("traditional.basic.markdownHelp")})]})]})}),!ti&&!Si&&a.jsxs(a.Fragment,{children:[a.jsx(Os,{meta:ts("model"),children:a.jsxs("div",{className:"cw-form",children:[a.jsxs("div",{className:"cw-field cw-model-source-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.model.source")}),a.jsx(By,{className:"cw-model-source-options","aria-label":v("traditional.model.source"),value:Jr,onChange:oe=>{oe!=="gateway"&&ga(oe)},children:[{value:"ark",label:v(d==="byteplus"?"traditional.model.bytePlusModelArk":"traditional.model.volcanoArk")},{value:"custom",label:v("traditional.model.custom")},{value:"gateway",label:v("traditional.model.gateway"),disabled:!0}].map(oe=>a.jsx("div",{className:`cw-model-source-option ${Jr===oe.value?"is-on":""}${oe.disabled?" is-disabled":""}`,children:a.jsxs(By.Item,{value:oe.value,disabled:oe.disabled,block:!0,className:"cw-model-source-control",children:[a.jsx("span",{children:oe.label}),oe.disabled&&a.jsx("span",{className:"cw-model-source-coming-soon",children:v("traditional.model.comingSoon")})]})},oe.value))})]}),Jr==="ark"?a.jsxs("div",{className:"cw-field","data-validation-field":"model-api-key",children:[a.jsx("label",{className:"cw-label",children:v("traditional.model.configuration")}),a.jsx(hon,{value:Me.modelName??"",fallbacks:Me.modelFallbacks??[],cloudProvider:d,agentName:Me.name,apiKeyId:(Lt=O.deployment)==null?void 0:Lt.modelApiKeyId,apiKeyName:(Ln=O.deployment)==null?void 0:Ln.modelApiKeyName,customModelSecretValues:C,configuredRuntimeEnvKeys:j,showFallbacks:ml,showMissingApiKeyErrors:ie,onApiKeyChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},modelApiKeyId:oe.id,modelApiKeyName:oe.name}})),onChange:oe=>un({modelName:oe,modelFallbacks:Ru(oe,Me.modelFallbacks)}),onFallbacksChange:oe=>un({modelFallbacks:oe}),onCustomModelSecretChange:P}),ie&&ds?a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.deployment.apiKeyRequired")}):null]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.model.name")}),a.jsx("input",{className:"cw-input",value:Me.modelName??"",onChange:oe=>un({modelName:oe.target.value,modelFallbacks:Ru(oe.target.value,Me.modelFallbacks)})})]}),a.jsxs("div",{className:"cw-field",children:[a.jsxs("label",{className:"cw-label cw-label-with-link",children:[a.jsx("span",{children:v("traditional.model.provider")}),a.jsxs("a",{href:"https://docs.litellm.ai/docs/providers",target:"_blank",rel:"noopener noreferrer",onClick:oe=>oe.stopPropagation(),children:[v("traditional.model.liteLlmProviders"),a.jsx(p0,{"aria-hidden":"true"})]})]}),a.jsx("input",{className:"cw-input",value:Me.modelProvider??"",placeholder:"openai",onChange:oe=>un({modelProvider:oe.target.value})})]}),a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:"API Base"}),a.jsx("input",{className:"cw-input",type:"url",inputMode:"url",value:Me.modelApiBase??"",placeholder:Po(d),"aria-invalid":gl,onChange:oe=>un({modelApiBase:oe.target.value})}),gl?a.jsx("span",{className:"cw-env-error",children:v("traditional.model.invalidApiBase")}):null]}),a.jsxs("div",{className:"cw-field","data-validation-field":"model-api-key",children:[a.jsx("label",{className:"cw-label",children:"API Key"}),a.jsx("input",{className:`cw-input ${no(zr)}`,type:"password",value:Di?C[Di.key]??"":"",placeholder:Ms&&!(Di&&C[Di.key])?"••••••":v("traditional.model.apiKeyPlaceholder"),autoComplete:"new-password",onChange:oe=>{if(!Di)return;const Le=oe.currentTarget.value;P(Di.key,Le)}}),ie&&zr?a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.deployment.apiKeyRequired")}):null]})]}),Jr==="custom"&&ml&&a.jsx(BP,{variant:"traditional",primaryModelName:Me.modelName??"",agentName:Me.name,value:Me.modelFallbacks??[],secretValues:C,configuredSecretEnvKeys:j,showMissingApiKeyErrors:ie,onChange:oe=>un({modelFallbacks:oe}),onSecretChange:P})]})}),a.jsx(Os,{meta:ts("tools"),children:a.jsxs("div",{className:"cw-form",children:[a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.tools.builtIn")}),a.jsx("span",{className:"cw-help",children:v("traditional.tools.builtInHelp")}),a.jsx("div",{className:"cw-tools-list-shell",children:a.jsx(uon,{items:Ht,selected:bt,onToggle:Dr,scrollRows:6})}),a.jsx(ff,{initial:!1,children:bt.includes("run_code")&&a.jsxs(Cr.div,{className:"cw-tool-config",initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.16,ease:"easeOut"},children:[a.jsxs("div",{className:"cw-tool-config-head",children:[a.jsx("span",{className:"cw-label",children:v("traditional.tools.codeExecution")}),a.jsx("span",{className:"cw-help",children:v("traditional.tools.codeExecutionHelp")})]}),a.jsx(zk,{env:((wn=rT.find(oe=>oe.id==="run_code"))==null?void 0:wn.env)??[],values:((pn=O.deployment)==null?void 0:pn.envValues)??{},onChange:Mn})]})})]}),a.jsxs("div",{className:"cw-field cw-mcp-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.tools.mcp")}),a.jsx(yon,{tools:jr,conflict:Hs,showConflict:ie,onChange:oe=>un({mcpTools:oe})})]})]})}),a.jsx(Os,{meta:ts("skills"),children:a.jsx("div",{className:"cw-form",children:a.jsx(yK,{selected:qs,onChange:oe=>un({selectedSkills:oe}),cloudProvider:d})})}),a.jsx(Os,{meta:ts("knowledge"),children:a.jsxs("div",{className:"cw-form cw-toggle-stack",children:[a.jsx(Nj,{checked:Me.knowledgebase,onChange:oe=>un({knowledgebase:oe}),title:v("traditional.knowledge.title"),desc:v("traditional.knowledge.description"),icon:bN}),Me.knowledgebase&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.knowledge.backend")}),a.jsx($6,{options:jB,value:Me.knowledgebaseBackend,translationGroup:"knowledge",onChange:oe=>un({knowledgebaseBackend:oe,knowledgebaseIndex:oe==="viking"||oe==="openviking"?Me.knowledgebaseIndex:""})}),(Me.knowledgebaseBackend??Dg)==="viking"&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.knowledge.vikingDatabase")}),a.jsx(mon,{value:Me.knowledgebaseIndex??"",onChange:oe=>{un({knowledgebaseIndex:oe.id}),oe.projectName&&Mn("DATABASE_VIKING_PROJECT",oe.projectName),oe.region&&Mn("DATABASE_VIKING_REGION",oe.region),oe.sourceKind&&Mn("DATABASE_VIKING_COLLECTION_KIND",oe.sourceKind),Mn("DATABASE_VIKING_RESOURCE_ID",oe.resourceId??"")}})]}),a.jsx(zk,{env:((jn=jB.find(oe=>oe.id===(Me.knowledgebaseBackend??Dg)))==null?void 0:jn.env)??[],values:((Wt=O.deployment)==null?void 0:Wt.envValues)??{},onChange:Mn,renderAfterField:(Me.knowledgebaseBackend??Dg)==="openviking"?oe=>oe.key==="DATABASE_OPENVIKING_USER_ID"?a.jsx(fon,{value:Me.knowledgebaseIndex??"",onChange:Le=>un({knowledgebaseIndex:Le})}):null:void 0})]})]})}),on&&a.jsx(Os,{meta:ts("memory"),children:a.jsxs("div",{className:"cw-form cw-toggle-stack",children:[a.jsx(Nj,{checked:Me.memory.shortTerm,onChange:oe=>un({memory:{...Me.memory,shortTerm:oe}}),title:v("traditional.memory.shortTerm"),desc:v("traditional.memory.shortTermDescription"),showDescription:!0,icon:Fje}),Me.memory.shortTerm&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.memory.shortTermBackend")}),a.jsx($6,{options:uw,value:Me.shortTermBackend,translationGroup:"shortTerm",onChange:oe=>un({shortTermBackend:oe})}),a.jsx(zk,{env:((gn=uw.find(oe=>oe.id===(Me.shortTermBackend??"local")))==null?void 0:gn.env)??[],values:(($n=O.deployment)==null?void 0:$n.envValues)??{},onChange:Mn})]}),a.jsx(Nj,{checked:Me.memory.longTerm,onChange:oe=>un({memory:{...Me.memory,longTerm:oe}}),title:v("traditional.memory.longTerm"),desc:v("traditional.memory.longTermDescription"),showDescription:!0,icon:bN}),Me.memory.longTerm&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.memory.longTermBackend")}),a.jsx($6,{options:_B,value:Me.longTermBackend,translationGroup:"longTerm",onChange:oe=>un({longTermBackend:oe,longTermMemoryIndex:oe==="viking"?Me.longTermMemoryIndex:""})}),(Me.longTermBackend??"local")==="viking"&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.memory.vikingDatabase")}),a.jsx(gon,{value:Me.longTermMemoryIndex??"",onChange:oe=>{un({longTermMemoryIndex:oe.id}),Mn("DATABASE_VIKINGMEM_PROJECT",oe.projectName),Mn("DATABASE_VIKING_REGION",oe.region),Mn("DATABASE_VIKINGMEM_MEMORY_TYPE",(oe.memoryTypes??[]).join(","))}})]}),a.jsx(zk,{env:((ai=_B.find(oe=>oe.id===(Me.longTermBackend??"local")))==null?void 0:ai.env)??[],values:((is=O.deployment)==null?void 0:is.envValues)??{},onChange:Mn}),a.jsx(Nj,{checked:!!Me.autoSaveSession,onChange:oe=>un({autoSaveSession:oe}),title:v("traditional.memory.autoSave"),desc:v("traditional.memory.autoSaveDescription"),icon:bN})]})]})})]})]})})})})})]})}),Y==="validate"&&a.jsx("div",{className:"cw-validation-workspace",children:a.jsx("div",{className:"cw-validation-content",children:a.jsx(Non,{enabled:le,disabledReason:ge,variants:Oe,draftSnapshot:pl,input:jt,onInput:Pt,onSend:Ld,onStartVariant:yo,onUseVariant:oe=>void hc(oe),onAddVariant:vl,onRemoveVariant:Ml,onToggleConfig:oe=>{const Le=Oe.find(st=>st.id===oe);Le&&Da(oe,{configOpen:!Le.configOpen})},onCompleteConfig:xl,onConfigChange:Qu,onOpenTrace:Fo})})}),Y==="optimize"&&a.jsx(Ron,{profile:rr,optimizations:Ds,unavailableMessage:hl,onProfileChange:Qo,onOptimizationChange:Uo}),Y==="environment"&&a.jsx("div",{className:"cw-environment-workspace",children:a.jsx(nUe,{value:O.cloudEnvironment??{environmentId:"",environmentVersionId:""},onChange:rn,disabled:Ee})}),Y==="publish"&&a.jsx("div",{className:"cw-preview-body",children:je?a.jsx(YT,{embedded:!0,cloudProvider:d,project:je,agentDraft:O,agentName:O.name||v("traditional.basic.unnamedAgent"),agentCount:uUe(O),releaseConfiguration:mr?{modelName:mr.modelName||O.modelName||v("traditional.debug.defaultModel"),description:mr.description,instruction:mr.instruction,optimizations:[v("traditional.optimization.releaseScenario",{profile:v(`traditional.optimization.profiles.${rr}.label`)}),...Ds.map(oe=>v(`traditional.optimization.options.${oe}.label`))]}:void 0,onChange:Pe,onDeploy:Ll,onAgentAdded:n,onDeploymentTaskChange:s,deploymentActionLabel:v(u?"traditional.deployment.updateAndPublish":"common.deploy"),deploymentActionTargetId:"cw-publish-primary-action",deploymentRuntimeId:u==null?void 0:u.runtimeId,deploymentMpaInstanceId:u==null?void 0:u.mpaInstanceId,deploymentRuntimeName:A,deploymentRuntimeRevision:u==null?void 0:u.etag,deploymentRuntimeNameCustomized:!!u||!!((re=O.deployment)!=null&&re.runtimeNameCustomized),onDeploymentRuntimeNameChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},runtimeName:oe,runtimeNameCustomized:!0}})),onDeploymentStarted:m,onDeploymentComplete:h,feishuEnabled:!!((Vn=O.deployment)!=null&&Vn.feishuEnabled),configuredRuntimeEnvKeys:u==null?void 0:u.configuredRuntimeEnvKeys,onFeishuEnabledChange:async oe=>{const Le={...O,deployment:{...O.deployment??{feishuEnabled:!1},feishuEnabled:oe}},st=await eE(_S(Le));k(Le),Pe(st)},deploymentEnv:Mr.specs,requiredSecretEnv:Mo,requiredSecretEnvValues:C,onRequiredSecretEnvChange:P,deploymentEnvValues:{...(bi=Ai.deployment)==null?void 0:bi.envValues,...C,...Mr.fixedValues},onDeploymentEnvChange:Mn,onFeishuCredentialsChange:(oe,Le)=>lr({FEISHU_APP_ID:oe,FEISHU_APP_SECRET:Le}),network:(La=O.deployment)==null?void 0:La.network,onNetworkChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},network:oe}})),deployRegion:_e,onDeployRegionChange:ae,deploymentTelemetry:{source:"scratch",createMode:o,aiAssisted:V},onExportYaml:()=>son(`${Ai.name||"agent"}.yaml`,Nan(Ai,{heading:v("yaml.heading"),importHint:v("yaml.importHint")}),"text/yaml")}):a.jsxs("div",{className:"cw-publish-loading",role:"status",children:[a.jsx(Fi,{className:"cw-i cw-spin"}),a.jsx("strong",{children:v("traditional.publish.generating")}),a.jsx("span",{children:v("traditional.publish.validating")})]})})]}),a.jsx(Don,{mode:Y,busy:Ee,nextDisabled:Y==="build"&&ba&&ie,onChange:Ma,assistant:Y==="build"?ns:void 0}),Kt&&a.jsx(iUe,{testRunId:Kt.runId,sessionId:Kt.sessionId,title:v("traditional.debug.traceTitle",{name:Kt.variantName}),onClose:()=>Ct(null)}),xt&&a.jsx(Cd,{variant:"warning",title:v("traditional.debug.leaveTitle"),description:v("traditional.debug.leaveDescription"),confirmLabel:v(mt?"traditional.debug.cleaning":"traditional.debug.confirmLeave"),closeLabel:v("traditional.debug.closeLeaveConfirmation"),busy:mt,onCancel:yl,onConfirm:()=>void Uu()}),U&&a.jsx("div",{className:"confirm-scrim",onClick:()=>J(null),children:a.jsxs("div",{className:"confirm-box cw-ai-error-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":"ai-generate-error-title","aria-describedby":"ai-generate-error-message",onClick:oe=>oe.stopPropagation(),children:[a.jsx("div",{className:"confirm-title",id:"ai-generate-error-title",children:v("traditional.ai.failed")}),a.jsx("div",{className:"cw-ai-error-message",id:"ai-generate-error-message",children:U}),a.jsx("div",{className:"confirm-actions",children:a.jsx("button",{type:"button",className:"confirm-btn cw-ai-error-close",onClick:()=>J(null),children:v("common.close")})})]})})]})}const Lon=p.lazy(()=>Zs(()=>import("../chunks/QuickAgentCreateDialog-8cpgojnf.js"),__vite__mapDeps([4,5])));function Kd({name:e}){const t={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};switch(e){case"branch":return a.jsxs("svg",{...t,children:[a.jsx("circle",{cx:"6",cy:"5",r:"2"}),a.jsx("circle",{cx:"18",cy:"7",r:"2"}),a.jsx("circle",{cx:"18",cy:"17",r:"2"}),a.jsx("path",{d:"M8 5h2.5A3.5 3.5 0 0 1 14 8.5v7A1.5 1.5 0 0 0 15.5 17H16"}),a.jsx("path",{d:"M14 10.5v-2A1.5 1.5 0 0 1 15.5 7H16"})]});case"plan":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M6.5 3.5h11a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2Z"}),a.jsx("path",{d:"m8 9 1.4 1.4L12 7.8M13.5 10H16M8 15l1.4 1.4 2.6-2.6M13.5 16H16"})]});case"collaborate":return a.jsxs("svg",{...t,children:[a.jsx("circle",{cx:"8",cy:"8",r:"3"}),a.jsx("circle",{cx:"17",cy:"9",r:"2.5"}),a.jsx("path",{d:"M3.5 19a4.5 4.5 0 0 1 9 0M13.5 15.5A4 4 0 0 1 20.5 18"})]});case"summary":return a.jsx("svg",{...t,children:a.jsx("path",{d:"M5 4h14v16H5zM8 8h8M8 12h8M8 16h5"})});case"skills":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M5 5h5v5H5zM14 5h5v5h-5zM5 14h5v5H5z"}),a.jsx("path",{d:"M14 16.5h5M16.5 14v5"})]});case"trace":return a.jsxs("svg",{...t,children:[a.jsx("circle",{cx:"6",cy:"6",r:"2"}),a.jsx("circle",{cx:"18",cy:"12",r:"2"}),a.jsx("circle",{cx:"8",cy:"18",r:"2"}),a.jsx("path",{d:"M8 6h3a3 3 0 0 1 3 3v0a3 3 0 0 0 2 2.83M16.2 13.2 9.8 16.8"})]});case"structure":return a.jsxs("svg",{...t,children:[a.jsx("rect",{x:"3.5",y:"4",width:"7",height:"5",rx:"1"}),a.jsx("rect",{x:"13.5",y:"15",width:"7",height:"5",rx:"1"}),a.jsx("path",{d:"M10.5 6.5h3A3.5 3.5 0 0 1 17 10v5M7 9v7a2 2 0 0 0 2 2h4.5"})]});case"model":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M8 3.5v3M16 3.5v3M8 17.5v3M16 17.5v3M3.5 8h3M17.5 8h3M3.5 16h3M17.5 16h3"}),a.jsx("rect",{x:"6.5",y:"6.5",width:"11",height:"11",rx:"2"}),a.jsx("path",{d:"M10 10h4v4h-4z"})]});case"environment":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M4 7.5h16M7 4h10l3 3.5v10L17 20H7l-3-2.5v-10Z"}),a.jsx("path",{d:"m8 12 2 2-2 2M12.5 16H16"})]});case"deploy":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M12 3.5v11M7.5 8 12 3.5 16.5 8"}),a.jsx("path",{d:"M5 13.5v5A1.5 1.5 0 0 0 6.5 20h11a1.5 1.5 0 0 0 1.5-1.5v-5"})]});case"workflow":return a.jsxs("svg",{...t,children:[a.jsx("rect",{x:"4",y:"4",width:"6",height:"5",rx:"1"}),a.jsx("rect",{x:"14",y:"15",width:"6",height:"5",rx:"1"}),a.jsx("path",{d:"M10 6.5h2a4 4 0 0 1 4 4V15M7 9v3a4 4 0 0 0 4 4h3"})]})}}function $on({onSelectVulcan:e,onSelectDeepseek:t,onSelectTraditional:n}){const{t:i}=Te("create"),r=SD(),[s,o]=p.useState(!1),[l,c]=p.useState(!1),[u,d]=p.useState(!1),f=p.useRef(null),h=g=>{if(!s){if(r){g();return}f.current=g,o(!0)}},m=()=>{if(!s)return;const g=f.current;f.current=null,g==null||g()};return a.jsxs(Cr.main,{className:`agent-creation-mode-picker${s?" is-leaving":""}`,initial:r?!1:{opacity:0},animate:{opacity:s?0:1},transition:{duration:s?.12:.18,ease:[.16,1,.3,1]},onAnimationComplete:m,children:[a.jsxs("section",{className:"agent-creation-mode-picker__content","aria-labelledby":"agent-creation-mode-picker-title",children:[a.jsxs("header",{className:"agent-creation-mode-picker__header",children:[a.jsx("h1",{id:"agent-creation-mode-picker-title",children:i("modePicker.title")}),a.jsx("p",{children:i("modePicker.subtitle")})]}),a.jsxs("div",{className:"agent-creation-mode-picker__options",children:[a.jsxs(_t,{type:"button",className:"agent-creation-mode-picker__card",color:"secondary",variant:"outline",pill:!1,block:!0,onClick:()=>{d(!0),c(!0)},children:[a.jsxs("span",{className:"agent-creation-mode-picker__card-header",children:[a.jsx(t1,{className:"agent-creation-mode-picker__avatar is-vulcan",seed:i("modePicker.quick.title")}),a.jsxs("span",{className:"agent-creation-mode-picker__card-copy",children:[a.jsx("span",{className:"agent-creation-mode-picker__card-title",children:i("modePicker.quick.title")}),a.jsx("span",{className:"agent-creation-mode-picker__card-description",children:i("modePicker.quick.description")})]})]}),a.jsx("span",{className:"agent-creation-mode-picker__divider","aria-hidden":"true"}),a.jsxs("span",{className:"agent-creation-mode-picker__features",children:[a.jsx("span",{children:i("modePicker.features")}),a.jsxs("span",{className:"agent-creation-mode-picker__feature-grid",children:[a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"branch"})}),a.jsx("span",{children:i("modePicker.quick.features.dynamicSubagents")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"plan"})}),a.jsx("span",{children:i("modePicker.quick.features.autonomousPlanning")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"collaborate"})}),a.jsx("span",{children:i("modePicker.quick.features.collaboration")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"summary"})}),a.jsx("span",{children:i("modePicker.quick.features.summary")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"skills"})}),a.jsx("span",{children:i("modePicker.quick.features.skills")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"trace"})}),a.jsx("span",{children:i("modePicker.quick.features.trace")})]})]})]})]}),a.jsxs(_t,{type:"button",className:"agent-creation-mode-picker__card",color:"secondary",variant:"outline",pill:!1,block:!0,onClick:()=>h(n),children:[a.jsxs("span",{className:"agent-creation-mode-picker__card-header",children:[a.jsx(t1,{className:"agent-creation-mode-picker__avatar is-traditional",seed:i("modePicker.traditional.title")}),a.jsxs("span",{className:"agent-creation-mode-picker__card-copy",children:[a.jsx("span",{className:"agent-creation-mode-picker__card-title",children:i("modePicker.traditional.title")}),a.jsx("span",{className:"agent-creation-mode-picker__card-description",children:i("modePicker.traditional.description")})]})]}),a.jsx("span",{className:"agent-creation-mode-picker__divider","aria-hidden":"true"}),a.jsxs("span",{className:"agent-creation-mode-picker__features",children:[a.jsx("span",{children:i("modePicker.features")}),a.jsxs("span",{className:"agent-creation-mode-picker__feature-grid",children:[a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"structure"})}),a.jsx("span",{children:i("modePicker.traditional.features.visualConfig")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"model"})}),a.jsx("span",{children:i("modePicker.traditional.features.migration")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"environment"})}),a.jsx("span",{children:i("modePicker.traditional.features.debugging")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"deploy"})}),a.jsx("span",{children:i("modePicker.traditional.features.optimization")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"workflow"})}),a.jsx("span",{children:i("modePicker.traditional.features.parameters")})]})]})]})]})]})]}),u&&a.jsx(p.Suspense,{fallback:null,children:a.jsx(Lon,{open:l,onClose:()=>c(!1),onSelect:g=>{c(!1),h(g==="deepseek"?t:e)}})})]})}const Pj="\0custom";function hUe({label:e,value:t,options:n,onChange:i,allowCustom:r=!1,allowEmpty:s=!0,disabled:o=!1,placeholder:l,error:c,describedBy:u}){const{t:d}=Te("deepseek"),f=p.useId(),[h,m]=p.useState(!1),g=r&&(h||!!(t&&!n.includes(t)));return a.jsxs("div",{className:"dsh-native-choice",children:[a.jsx(vf,{ariaLabel:e,value:g?Pj:t,valueLabel:t,placeholder:l??d("optional"),disabled:o,options:[...s?[{value:"",label:d("optional")}]:[],...n.map(b=>({value:b,label:b})),...r?[{value:Pj,label:d("customValue")}]:[]],onChange:b=>{m(b===Pj),b!==Pj&&i(b)}}),g&&a.jsxs("div",{className:"dsh-custom-value",children:[a.jsx("label",{className:"cw-label",htmlFor:f,children:d("customField",{field:e})}),a.jsx("input",{id:f,className:"cw-input",value:t,autoComplete:"off",spellCheck:!1,placeholder:d("enterCustomValue"),"aria-invalid":!!c,"aria-describedby":u,onChange:b=>i(b.target.value)})]})]})}const Fon=String.raw`import { createServer } from 'node:http'; +`)}}).sort((t,n)=>Number(t.long)-Number(n.long))}function iUe({appName:e,testRunId:t,sessionId:n,endTimeMs:i,onClose:r,title:s}){const{t:o}=Te("conversation"),[l,c]=p.useState(null),[u,d]=p.useState("loading"),[f,h]=p.useState(0),[m,g]=p.useState(new Set),[b,v]=p.useState(null),y=p.useRef(0),w=`${e??""}:${t??""}:${n}:${i??""}`,x=p.useRef(w);p.useEffect(()=>{x.current!==w&&(x.current=w,y.current=0),c(null),d("loading");let A=!1,N,P;if(t)P=N2e(t,n);else if(e)P=ZR(e,n,i);else{d("error");return}return P.then(I=>{A||(c(I),d("ready"),v(I.length?I.reduce((D,_)=>D.start_time<=_.start_time?D:_).span_id:null))}).catch(I=>{if(A)return;const D=Jan(I instanceof Error?I.message:String(I));d(D),D==="collecting"&&y.currenth(_=>_+1),Zan))}),()=>{A=!0,N!==void 0&&window.clearTimeout(N)}},[e,i,f,n,w,t]);const O=()=>{y.current=0,h(A=>A+1)},{rootNodes:k,min:S,total:C}=p.useMemo(()=>eon(l??[]),[l]),E=p.useMemo(()=>ton(k,m),[k,m]),j=(l==null?void 0:l.find(A=>A.span_id===b))??null,T=C/1e6,R=A=>g(N=>{const P=new Set(N);return P.has(A)?P.delete(A):P.add(A),P});return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"drawer-scrim",onClick:r}),a.jsxs("aside",{className:"drawer drawer--trace",children:[a.jsxs("header",{className:"drawer-head",children:[a.jsxs("div",{children:[a.jsx("div",{className:"drawer-title",children:s??o("trace.title")}),a.jsx("div",{className:"drawer-sub",children:u==="ready"&&l?o("trace.callCount",{count:l.length,duration:T.toFixed(1)}):o(`trace.statuses.${u}`)})]}),a.jsx("button",{className:"drawer-close",onClick:r,"aria-label":o("trace.close"),children:a.jsx(Do,{className:"icon"})})]}),u==="loading"&&a.jsxs("div",{className:"drawer-loading",children:[a.jsx(Fi,{className:"icon spin"})," ",o("trace.loading")]}),u==="collecting"&&a.jsxs("div",{className:"drawer-loading",role:"status","aria-live":"polite",children:[a.jsx(Fi,{className:"icon spin"}),a.jsx("span",{children:o("trace.errors.collecting")}),a.jsx(_t,{type:"button",color:"secondary",variant:"outline",size:"sm",pill:!1,onClick:O,children:o("trace.retryNow")})]}),(u==="disabled"||u==="forbidden"||u==="error")&&a.jsxs("div",{className:"drawer-empty trace-state",role:"alert",children:[a.jsx("span",{children:o(`trace.errors.${u}`)}),u==="error"&&a.jsx(_t,{type:"button",color:"secondary",variant:"outline",size:"sm",pill:!1,onClick:O,children:o("trace.reload")})]}),u==="ready"&&l&&l.length===0&&a.jsx("div",{className:"drawer-empty",children:o("trace.empty")}),E.length>0&&a.jsxs("div",{className:"trace-split",children:[a.jsx("div",{className:"trace-tree scroll",children:E.map(A=>{const N=A.span,P=(N.start_time-S)/C*100,I=Math.max((N.end_time-N.start_time)/C*100,.6),D=A.children.length>0;return a.jsxs("button",{className:`trace-row ${b===N.span_id?"active":""}`,onClick:()=>v(N.span_id),children:[a.jsxs("span",{className:"trace-label",style:{paddingLeft:A.depth*14},children:[a.jsx("span",{className:`trace-caret ${D?"":"hidden"} ${m.has(N.span_id)?"":"open"}`,onClick:_=>{_.stopPropagation(),D&&R(N.span_id)},children:a.jsx(HA,{className:"chev"})}),a.jsx("span",{className:"trace-dot",style:{background:M6(N.name)}}),a.jsx("span",{className:"trace-name",title:N.name,children:N.name})]}),a.jsx("span",{className:"trace-dur",children:yce(N.end_time-N.start_time)}),a.jsx("span",{className:"trace-track",children:a.jsx("span",{className:"trace-bar",style:{left:`${P}%`,width:`${I}%`,background:M6(N.name)}})})]},N.span_id)})}),a.jsx("div",{className:"trace-detail scroll",children:j?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"td-title",children:j.name}),a.jsxs("div",{className:"td-dur",children:[a.jsx("span",{className:"td-dot",style:{background:M6(j.name)}}),yce(j.end_time-j.start_time)]}),a.jsx("div",{className:"td-section",children:o("trace.attributes")}),a.jsx("div",{className:"td-props",children:vce(j).filter(A=>!A.long).map(A=>a.jsxs("div",{className:"td-prop",children:[a.jsx("span",{className:"td-key",children:A.key}),a.jsx("span",{className:"td-val",children:A.value})]},A.key))}),vce(j).filter(A=>A.long).map(A=>a.jsxs("div",{className:"td-block",children:[a.jsx("div",{className:"td-section",children:A.key}),a.jsx("pre",{className:"td-pre",children:A.value})]},A.key))]}):a.jsx("div",{className:"drawer-empty",children:o("trace.selectCall")})})]})]})]})}const ion=p.lazy(()=>Zs(()=>import("../chunks/MarkdownPromptEditor-CgQNwz-v.js"),__vite__mapDeps([2,3]))),dU="veadk.generatedAgentTestRuns",L6=4;function LK(){if(typeof window>"u")return[];try{const e=JSON.parse(window.sessionStorage.getItem(dU)??"[]");return Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.length>0):[]}catch{return[]}}function rUe(e){if(typeof window>"u")return;const t=Array.from(new Set(e)).slice(-20);try{t.length?window.sessionStorage.setItem(dU,JSON.stringify(t)):window.sessionStorage.removeItem(dU)}catch{}}function ron(e){rUe([...LK(),e])}function Qk(e){rUe(LK().filter(t=>t!==e))}function son(e,t,n="text/plain"){const i=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),r=document.createElement("a");r.href=i,r.download=e,document.body.appendChild(r),r.click(),r.remove(),URL.revokeObjectURL(i)}const aon=[{id:"type",label:"traditional.sections.type.label",hint:"traditional.sections.type.hint",icon:Gat,required:!0},{id:"basic",label:"traditional.sections.basic.label",hint:"traditional.sections.basic.hint",icon:_h,required:!0},{id:"model",label:"traditional.sections.model.label",hint:"traditional.sections.model.hint",icon:jat},{id:"tools",label:"traditional.sections.tools.label",hint:"traditional.sections.tools.hint",icon:Zat},{id:"skills",label:"traditional.sections.skills.label",hint:"traditional.sections.skills.hint",icon:hC},{id:"knowledge",label:"traditional.sections.knowledge.label",hint:"traditional.sections.knowledge.hint",icon:bN},{id:"memory",label:"traditional.sections.memory.label",hint:"traditional.sections.memory.hint",icon:Fje},{id:"subagents",label:"traditional.sections.subagents.label",hint:"traditional.sections.subagents.hint",icon:kat},{id:"review",label:"traditional.sections.review.label",hint:"traditional.sections.review.hint",icon:Kat}];function oon({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M9 7.15v9.7a1.15 1.15 0 0 0 1.78.96l7.2-4.85a1.15 1.15 0 0 0 0-1.92l-7.2-4.85A1.15 1.15 0 0 0 9 7.15Z"}),a.jsx("path",{d:"M5.75 8.25v7.5",opacity:"0.8"}),a.jsx("path",{d:"M3 10v4",opacity:"0.45"}),a.jsx("path",{d:"M17.9 5.25v2.2M19 6.35h-2.2",strokeWidth:"1.55"})]})}function xce({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M4.75 7.25h14.5"}),a.jsx("path",{d:"M9.1 4.75h5.8l.75 2.5h-7.3l.75-2.5Z"}),a.jsx("path",{d:"m6.75 7.25.75 12h9l.75-12"}),a.jsx("path",{d:"M10 10.25v5.75M14 10.25v5.75"})]})}function $K({className:e}){return a.jsx("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:"m7 9 5 5 5-5"})})}function FK({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("path",{d:"M18.25 8.2A7.1 7.1 0 0 0 6.1 6.65L4.5 8.25"}),a.jsx("path",{d:"M4.5 4.75v3.5H8"}),a.jsx("path",{d:"M5.75 15.8A7.1 7.1 0 0 0 17.9 17.35l1.6-1.6"}),a.jsx("path",{d:"M19.5 19.25v-3.5H16"})]})}const lon={llm:"traditional.agentTypes.llm.label",sequential:"traditional.agentTypes.sequential.label",parallel:"traditional.agentTypes.parallel.label",loop:"traditional.agentTypes.loop.label",a2a:"traditional.agentTypes.a2a.label"},wce={REGISTRY_SPACE_ID:"registrySpaceId",REGISTRY_TOP_K:"registryTopK",REGISTRY_REGION:"registryRegion",REGISTRY_ENDPOINT:"registryEndpoint"},sUe="REGISTRY_SPACE_ID",con=jIe.filter(e=>e.key!==sUe);function aUe(e,t,n="volcengine"){var s,o,l;if(!(e!=null&&e.enabled))return{};const i=gM(n),r={REGISTRY_SPACE_ID:e.registrySpaceId??""};return t.includeDefaults?(r.REGISTRY_TOP_K=((s=e.registryTopK)==null?void 0:s.trim())||i.topK,r.REGISTRY_REGION=((o=e.registryRegion)==null?void 0:o.trim())||i.region,r.REGISTRY_ENDPOINT=((l=e.registryEndpoint)==null?void 0:l.trim())||i.endpoint):(r.REGISTRY_TOP_K=e.registryTopK??"",r.REGISTRY_REGION=e.registryRegion??"",r.REGISTRY_ENDPOINT=e.registryEndpoint??""),r}function mx(e,t){if(t!=="byteplus")return e;const n=gM(t);return e.map(i=>i.key==="REGISTRY_REGION"?{...i,placeholder:n.region}:i.key==="REGISTRY_ENDPOINT"?{...i,placeholder:n.endpoint}:i.key==="MODEL_EMBEDDING_NAME"?{...i,placeholder:ott(t)}:i.key==="MODEL_EMBEDDING_API_BASE"?{...i,placeholder:Po(t)}:i.key==="MODEL_IMAGE_NAME"?{...i,placeholder:ctt(t)}:i.key==="MODEL_EDIT_NAME"?{...i,placeholder:utt(t)}:i.key==="MODEL_VIDEO_NAME"?{...i,placeholder:dtt(t)}:i.key==="MODEL_IMAGE_API_BASE"||i.key==="MODEL_EDIT_API_BASE"||i.key==="MODEL_VIDEO_API_BASE"?{...i,placeholder:Po(t)}:i)}function uon({items:e,selected:t,onToggle:n,scrollRows:i}){const{t:r}=Te("create");return a.jsx("div",{className:`cw-checklist ${i?"cw-checklist-tools":""}`,style:i?{"--cw-checklist-max-height":`${i*40+(i-1)*8}px`}:void 0,children:e.map(s=>{const o=t.includes(s.id);return a.jsx(DK,{id:`cw-check-${s.id}`,className:`cw-check ${o?"is-on":""}`,checked:o,onCheckedChange:l=>{l!==o&&n(s.id)},label:a.jsx("span",{className:"cw-check-text",children:a.jsx("span",{className:"cw-check-title",children:r(`traditional.catalog.${s.id}.label`,{defaultValue:s.label})})})},s.id)})})}function $6({options:e,value:t,onChange:n,translationGroup:i}){const{t:r}=Te("create");return a.jsx("div",{className:"cw-segmented",children:e.map(s=>{var l;const o=(t??((l=e[0])==null?void 0:l.id))===s.id;return a.jsx("button",{type:"button",className:`cw-seg ${o?"is-on":""}`,onClick:()=>n(s.id),"aria-pressed":o,children:a.jsx("span",{className:"cw-seg-title",children:r(`traditional.backends.${i}.${s.id}.label`,{defaultValue:s.label})})},s.id)})})}function don(e){return/(SECRET|PASSWORD|KEY|TOKEN)$/.test(e)}function zk({env:e,values:t,onChange:n,renderAfterField:i}){const{t:r}=Te("create"),s=e.filter(o=>!o.hidden);return s.length===0?a.jsx("p",{className:"cw-env-empty",children:r("traditional.env.noAdditionalParameters")}):a.jsx("div",{className:"cw-env-fields",children:s.map(o=>{const l=t[o.key]??o.defaultValue??"",c=IK(o,t,r("traditional.env.invalidJson")),u=`cw-env-${o.key}`;return a.jsxs(p.Fragment,{children:[a.jsxs("label",{className:"cw-env-field",htmlFor:u,children:[a.jsxs("span",{className:"cw-env-field-head",children:[a.jsxs("span",{className:"cw-env-field-title",children:[a.jsxs("span",{className:"cw-env-field-label",children:[o.comment||o.key,o.required&&a.jsx("span",{className:"cw-req",children:"*"})]}),o.help&&a.jsxs("span",{className:"cw-env-help",tabIndex:0,"data-help":o.help,"aria-label":r("traditional.env.helpAriaLabel",{label:o.comment||o.key,help:o.help}),children:["?",a.jsx("span",{className:"cw-env-help-popover",role:"tooltip",children:o.help})]}),o.link&&a.jsx("a",{className:"cw-env-link",href:o.link.url,target:"_blank",rel:"noopener noreferrer",title:r("traditional.env.openOpenViking",{label:o.link.label}),"aria-label":r("traditional.env.openOpenViking",{label:o.link.label}),onClick:d=>d.stopPropagation(),children:a.jsx(p0,{"aria-hidden":"true"})})]}),o.comment&&a.jsx("code",{title:o.key,children:o.key})]}),o.multiline||o.format==="json"?a.jsx("textarea",{id:u,className:"cw-input cw-env-textarea",value:l,placeholder:o.placeholder||r("traditional.env.valuePlaceholder"),autoComplete:"off",spellCheck:!1,"aria-invalid":!!c,onChange:d=>n(o.key,d.currentTarget.value)}):a.jsx("input",{id:u,className:"cw-input",type:don(o.key)?"password":"text",value:l,placeholder:o.placeholder||r("traditional.env.valuePlaceholder"),autoComplete:"off","aria-invalid":!!c,onChange:d=>n(o.key,d.currentTarget.value)}),c&&a.jsx("span",{className:"cw-env-error",children:c})]}),i==null?void 0:i(o)]},o.key)})})}function fon({value:e,onChange:t}){const{t:n}=Te("create"),i="cw-openviking-knowledge-index",r=n("traditional.env.openVikingIndexHelp");return a.jsxs("label",{className:"cw-env-field",htmlFor:i,children:[a.jsx("span",{className:"cw-env-field-head",children:a.jsxs("span",{className:"cw-env-field-title",children:[a.jsx("span",{className:"cw-env-field-label",children:n("traditional.env.openVikingIndex")}),a.jsxs("span",{className:"cw-env-help",tabIndex:0,"data-help":r,"aria-label":n("traditional.env.openVikingIndexAriaLabel",{help:r}),children:["?",a.jsx("span",{className:"cw-env-help-popover",role:"tooltip",children:r})]})]})}),a.jsx("input",{id:i,className:"cw-input",value:e,placeholder:"",autoComplete:"off",onChange:s=>t(s.currentTarget.value)})]})}function F6(e,t=Xt("traditional.resources.unnamedAgentCenter")){return e.name.trim()||t}function Oce(e,t=Xt("traditional.resources.unnamedKnowledgeBase")){const n=e.name.trim()||e.id||t,i=[e.sourceLabel,e.projectName].filter(Boolean);return i.length?`${n} · ${i.join(" · ")}`:n}function kce(e,t=Xt("traditional.resources.unnamedMemory")){return e.name.trim()||e.id||t}function Sce(e){return e.apiKeyAllowed===!1?"modelApiKey.noModelPermission":e.unavailableReason?`modelApiKey.permissionState.${e.unavailableReason}`:e.available?"traditional.model.available":e.lifecycleStatus==="Retiring"?"traditional.model.retiring":e.activationState&&e.activationState!=="Available"?"traditional.model.notActivated":"traditional.model.unavailable"}function Ece(e){return e.apiKeyAllowed!==!1&&!e.unavailableReason&&(e.available||e.lifecycleStatus==="Retiring")}function B6({selectedLabel:e,placeholder:t,disabled:n,triggerAriaLabel:i,menuAriaLabel:r,searchAriaLabel:s,searchValue:o,searchPlaceholder:l,onSearchChange:c,empty:u,emptyLabel:d,triggerClassName:f="",optionsClassName:h="",renderOptions:m}){const[g,b]=p.useState(!1),v=p.useRef(null),y=p.useRef(null),w=p.useRef(null),x=p.useId(),[O,k]=p.useState(null);p.useEffect(()=>{if(!g)return;const E=T=>{var A;const R=T.target;R instanceof Node&&v.current&&!v.current.contains(R)&&!((A=w.current)!=null&&A.contains(R))&&b(!1)},j=T=>{var R;T.key==="Escape"&&(b(!1),(R=y.current)==null||R.focus())};return window.addEventListener("pointerdown",E),window.addEventListener("keydown",j),()=>{window.removeEventListener("pointerdown",E),window.removeEventListener("keydown",j)}},[g]),p.useEffect(()=>{if(!g){k(null);return}const E=()=>{const j=y.current;if(!j)return;const T=j.getBoundingClientRect(),R=12,A=6,N=window.innerHeight-T.bottom-R-A,P=T.top-R-A,I=N<300&&P>N,D=Math.max(96,I?P:N),_=Math.min(T.width,window.innerWidth-R*2),L=Math.min(Math.max(R,T.left),window.innerWidth-R-_);k({...I?{bottom:window.innerHeight-T.top+A}:{top:T.bottom+A},left:L,width:_,maxHeight:D,opensUp:I})};return E(),window.addEventListener("resize",E),window.addEventListener("scroll",E,!0),()=>{window.removeEventListener("resize",E),window.removeEventListener("scroll",E,!0)}},[g]);const S=()=>b(!1),C=E=>{var A,N;if(!["ArrowDown","ArrowUp","Home","End"].includes(E.key))return;const j=Array.from(((A=w.current)==null?void 0:A.querySelectorAll('[role="option"]:not(:disabled)'))??[]);if(!j.length)return;E.preventDefault();const T=j.findIndex(P=>P===document.activeElement),R=E.key==="Home"?0:E.key==="End"?j.length-1:E.key==="ArrowUp"?T<=0?j.length-1:T-1:T<0||T===j.length-1?0:T+1;(N=j[R])==null||N.focus()};return a.jsxs("div",{className:`cw-a2a-space-select-wrap cw-catalog-select${g?" is-open":""}`,ref:v,children:[a.jsxs("button",{ref:y,type:"button",className:`cw-a2a-space-trigger ${f}`.trim(),disabled:n,"aria-haspopup":"listbox","aria-controls":g?x:void 0,"aria-expanded":g,"aria-label":i,title:e,onClick:()=>{g||c(""),b(E=>!E)},children:[a.jsx("span",{className:t?"is-placeholder":void 0,children:e}),a.jsx($K,{className:"cw-a2a-space-trigger-icon"})]}),g&&O&&yi.createPortal(a.jsxs("div",{ref:w,className:`cw-a2a-space-menu cw-catalog-menu cw-catalog-menu-portal${O.opensUp?" is-up":""}`,style:{top:O.top??"auto",bottom:O.bottom??"auto",left:O.left,width:O.width,maxHeight:O.maxHeight},onKeyDown:C,children:[a.jsx("div",{className:"cw-picker-search",children:a.jsx("input",{className:"cw-picker-search-input",type:"search",value:o,autoFocus:!0,autoComplete:"off","aria-label":s,placeholder:l,onChange:E=>c(E.currentTarget.value)})}),a.jsxs("div",{id:x,className:`cw-picker-options cw-catalog-options ${h}`.trim(),role:"listbox","aria-label":r,children:[m(S),u&&a.jsx("div",{className:"cw-picker-empty",children:d})]})]}),document.body)]})}function hon({value:e,fallbacks:t,cloudProvider:n,agentName:i,apiKeyId:r,apiKeyName:s,customModelSecretValues:o,configuredRuntimeEnvKeys:l,showFallbacks:c=!0,showMissingApiKeyErrors:u,onApiKeyChange:d,onChange:f,onFallbacksChange:h,onCustomModelSecretChange:m}){const{t:g}=Te("create"),[b,v]=p.useState([]),[y,w]=p.useState(!1),[x,O]=p.useState([]),[k,S]=p.useState(null),[C,E]=p.useState(!1),[j,T]=p.useState(null),[R,A]=p.useState(0),[N,P]=p.useState(0),[I,D]=p.useState(""),[_,L]=p.useState(""),[F,M]=p.useState("");p.useEffect(()=>{const pe=new AbortController;return w(!0),T(null),xz(pe.signal,R>0).then(ke=>{if(pe.signal.aborted)return;v(ke.keys);const je=ke.keys.find(Pe=>Pe.id===r)??ke.keys.find(Pe=>Pe.name===s)??ke.keys.find(Pe=>Pe.id===ke.defaultKeyId)??ke.keys.find(Pe=>Pe.status!=="Restricted");je&&d(je)}).catch(ke=>{pe.signal.aborted||T(ke instanceof Error?ke.message:g("traditional.model.apiKeyLoadError"))}).finally(()=>{pe.signal.aborted||w(!1)}),()=>pe.abort()},[n,R,g]),p.useEffect(()=>{if(!r){O([]);return}const pe=new AbortController;return E(!0),T(null),S(null),B1({signal:pe.signal,apiKeyId:r,refresh:R>0||N>0}).then(ke=>{if(!pe.signal.aborted){const je=L7e(ke.models,ke.apiKeyModelPermissions);O(je),S(r);const Pe=new Set(je.filter(ze=>ze.apiKeyAllowed===!1||ze.unavailableReason).map(ze=>ze.id));Pe.has(e.trim())&&f("");const Ee=t.filter(ze=>typeof ze!="string"||!Pe.has(ze));Ee.length!==t.length&&h(Ee)}}).catch(ke=>{pe.signal.aborted||T(ke instanceof Error?ke.message:g("traditional.model.loadError"))}).finally(()=>{pe.signal.aborted||E(!1)}),()=>pe.abort()},[r,n,N,R,g]);const V=e.trim(),q=k===r,U=q?x:[],J=b.find(pe=>pe.id===r),z=J?J.name||g("modelApiKey.unnamed"):r?g("traditional.model.currentApiKey"):y?g("traditional.model.loadingApiKeys"):b.length===0?g("traditional.model.noApiKeys"):g("traditional.model.selectApiKey"),Z=p.useMemo(()=>b.filter(pe=>$7e(I,pe.name,cU(pe,g))),[I,b,g]),ne=U.find(pe=>pe.id===V),W=C&&!q?g("traditional.model.refreshing"):ne?`${ne.displayName} (${ne.id})`:V||g("traditional.model.selectModel"),G=p.useMemo(()=>U.filter(pe=>kg(_,[pe.displayName,pe.id,pe.name,pe.vendorName,pe.activationState,pe.lifecycleStatus])),[_,U]),H=!!(V&&!ne&&kg(_,[V])),se=U.filter(pe=>pe.available).length,Y=n==="byteplus"?"BytePlus ModelArk":g("traditional.model.volcengineArk"),X=att(n),ie=Ru(V,t),ee=new Set(E7e(V,ie)),be=pe=>{const ke=pe.trim();return U.filter(je=>{const Pe=je.id.trim();return!(Pe!==ke&&ee.has(Pe))&&!(Pe!==ke&&Pe===V)&&kg(F,[je.displayName,je.id,je.name,je.vendorName,je.activationState,je.lifecycleStatus])})},ue=(pe,ke)=>{const je=[...t];je[pe]=ke,h(Ru(V,je))};return a.jsxs("div",{className:"cw-a2a-space-picker cw-model-picker",children:[a.jsxs("div",{className:"cw-model-picker-stack",children:[a.jsxs("div",{className:"cw-model-picker-field",children:[a.jsx("span",{className:"cw-model-picker-label",children:"API Key"}),a.jsx(B6,{selectedLabel:z,placeholder:!r,disabled:y,triggerAriaLabel:g("traditional.model.selectApiKey"),menuAriaLabel:g("traditional.model.apiKeyList"),searchAriaLabel:g("traditional.model.searchApiKey"),searchValue:I,searchPlaceholder:g("modelApiKey.search"),onSearchChange:D,empty:Z.length===0,emptyLabel:g("traditional.model.noMatchingApiKey"),optionsClassName:"cw-model-key-options",renderOptions:pe=>Z.map(ke=>{const je=ke.id===r,Pe=cU(ke,g);return a.jsx("button",{type:"button",role:"option","aria-selected":je,disabled:ke.status==="Restricted",className:`cw-a2a-space-option cw-model-key-option ${je?"is-selected":""}`,title:`${ke.name||g("modelApiKey.unnamed")} · ${Pe}`,onClick:()=>{P(Ee=>Ee+1),d(ke),pe()},children:a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ke.name||g("modelApiKey.unnamed")}),a.jsx("small",{children:Pe})]})},ke.id)})})]}),a.jsxs("div",{className:"cw-model-picker-field",children:[a.jsx("span",{className:"cw-model-picker-label",children:g("traditional.model.label")}),a.jsxs("div",{className:"cw-a2a-space-row",children:[a.jsx(B6,{selectedLabel:W,placeholder:!V,disabled:C,triggerAriaLabel:g("traditional.model.selectProviderModel",{provider:Y}),menuAriaLabel:g("traditional.model.providerModels",{provider:Y}),searchAriaLabel:g("traditional.model.search"),searchValue:_,searchPlaceholder:g("traditional.model.searchPlaceholder"),onSearchChange:L,empty:!H&&G.length===0,emptyLabel:g("traditional.model.noMatches"),triggerClassName:"cw-model-trigger",optionsClassName:"cw-model-options",renderOptions:pe=>a.jsxs(a.Fragment,{children:[H&&a.jsxs("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option cw-model-option is-selected",onClick:()=>{f(V),pe()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:g("traditional.model.currentConfiguration")}),a.jsx("small",{children:V})]}),a.jsx("span",{className:"cw-model-status is-unknown",children:g("traditional.model.unknownStatus")})]}),G.map(ke=>{const je=ke.id===V,Pe=Ece(ke);return ke.apiKeyAllowed!==!1&&!ke.unavailableReason&&!Pe&&ke.activationState!=="Available"?a.jsxs("button",{type:"button",role:"option","aria-selected":!1,className:"cw-a2a-space-option cw-model-option is-activation-link",title:g("traditional.model.activate",{provider:Y,model:ke.displayName}),onClick:()=>{window.open(X,"_blank","noopener,noreferrer"),pe()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ke.displayName}),a.jsxs("small",{children:[ke.id,ke.vendorName?` · ${ke.vendorName}`:""]})]}),a.jsx("span",{className:"cw-model-status is-unavailable",children:g("traditional.model.activateAction")})]},ke.id):a.jsxs("button",{type:"button",role:"option","aria-selected":je,disabled:!Pe,className:`cw-a2a-space-option cw-model-option ${je?"is-selected":""}`,title:`${ke.displayName} (${ke.id})`,onClick:()=>{f(ke.id),pe()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ke.displayName}),a.jsxs("small",{children:[ke.id,ke.vendorName?` · ${ke.vendorName}`:""]})]}),a.jsx("span",{className:`cw-model-status ${ke.apiKeyAllowed===!1||ke.unavailableReason?"is-unavailable":ke.available?"is-available":ke.lifecycleStatus==="Retiring"?"is-retiring":"is-unavailable"}`,children:g(Sce(ke))})]},ke.id)})]})}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-a2a-space-refresh",title:g("traditional.model.refresh"),"aria-label":g("traditional.model.refresh"),disabled:C||y,onClick:()=>A(pe=>pe+1),children:C||y?a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}):a.jsx(FK,{className:"cw-i cw-i-sm"})})]})]}),c?a.jsx(BP,{variant:"traditional",embedded:!0,primaryModelName:V,agentName:i,value:t,secretValues:o,configuredSecretEnvKeys:l,showMissingApiKeyErrors:u,onChange:h,onSecretChange:m,renderSameProviderField:({index:pe,value:ke})=>{const je=U.find(_e=>_e.id===ke.trim()),Pe=be(ke),Ee=!!(ke.trim()&&!je&&kg(F,[ke])),ze=je?`${je.displayName} (${je.id})`:ke||g("traditional.model.fallbackPlaceholder");return a.jsx(B6,{selectedLabel:ze,placeholder:!ke.trim(),disabled:C||!r,triggerAriaLabel:g("traditional.model.selectProviderModel",{provider:Y}),menuAriaLabel:g("traditional.model.providerModels",{provider:Y}),searchAriaLabel:g("traditional.model.search"),searchValue:F,searchPlaceholder:g("traditional.model.searchPlaceholder"),onSearchChange:M,empty:!Ee&&Pe.length===0,emptyLabel:g("traditional.model.noMatches"),triggerClassName:"cw-model-trigger",optionsClassName:"cw-model-options",renderOptions:_e=>a.jsxs(a.Fragment,{children:[Ee&&a.jsxs("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option cw-model-option is-selected",onClick:()=>{ue(pe,ke),_e()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:g("traditional.model.currentConfiguration")}),a.jsx("small",{children:ke})]}),a.jsx("span",{className:"cw-model-status is-unknown",children:g("traditional.model.unknownStatus")})]}),Pe.map(ae=>{const le=ae.id===ke.trim(),ge=Ece(ae);return ae.apiKeyAllowed!==!1&&!ae.unavailableReason&&!ge&&ae.activationState!=="Available"?a.jsxs("button",{type:"button",role:"option","aria-selected":!1,className:"cw-a2a-space-option cw-model-option is-activation-link",title:g("traditional.model.activate",{provider:Y,model:ae.displayName}),onClick:()=>{window.open(X,"_blank","noopener,noreferrer"),_e()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ae.displayName}),a.jsxs("small",{children:[ae.id,ae.vendorName?` · ${ae.vendorName}`:""]})]}),a.jsx("span",{className:"cw-model-status is-unavailable",children:g("traditional.model.activateAction")})]},ae.id):a.jsxs("button",{type:"button",role:"option","aria-selected":le,disabled:!ge,className:`cw-a2a-space-option cw-model-option ${le?"is-selected":""}`,title:`${ae.displayName} (${ae.id})`,onClick:()=>{ue(pe,ae.id),_e()},children:[a.jsxs("span",{className:"cw-model-option-copy",children:[a.jsx("strong",{children:ae.displayName}),a.jsxs("small",{children:[ae.id,ae.vendorName?` · ${ae.vendorName}`:""]})]}),a.jsx("span",{className:`cw-model-status ${ae.apiKeyAllowed===!1||ae.unavailableReason?"is-unavailable":ae.available?"is-available":ae.lifecycleStatus==="Retiring"?"is-retiring":"is-unavailable"}`,children:g(Sce(ae))})]},ae.id)})]})})}}):null]}),j?a.jsxs("div",{className:"cw-banner cw-a2a-space-error",role:"alert",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:j})]}):C?null:U.length===0?a.jsx("span",{className:"cw-help",children:g("traditional.model.empty")}):a.jsx("span",{className:"cw-help",children:g("traditional.model.loaded",{count:U.length,available:se})})]})}function pon({value:e,region:t,invalid:n,onChange:i}){const{t:r}=Te("create"),s=t.trim()||cw.region,[o,l]=p.useState([]),[c,u]=p.useState(!1),[d,f]=p.useState(null),[h,m]=p.useState(0),[g,b]=p.useState(!1),[v,y]=p.useState(""),w=p.useRef(null);p.useEffect(()=>{let T=!1;return u(!0),f(null),qan({region:s}).then(R=>{T||l(R)}).catch(R=>{T||(l([]),f(R instanceof Error?R.message:r("traditional.resources.loadError")))}).finally(()=>{T||u(!1)}),()=>{T=!0}},[s,h,r]);const x=!e||o.some(T=>T.id===e.trim()),O=o.find(T=>T.id===e.trim()),k=O?F6(O,r("traditional.resources.unnamedAgentCenter")):r(e&&!x?"traditional.resources.selectedAgentCenter":"traditional.resources.selectAgentCenter"),S=c&&o.length===0,C=p.useMemo(()=>o.filter(T=>kg(v,[F6(T,r("traditional.resources.unnamedAgentCenter")),T.id,T.projectName])),[v,o,r]),E=!!(e&&!x&&kg(v,[r("traditional.resources.selectedAgentCenter"),e]));p.useEffect(()=>{if(!g)return;const T=A=>{const N=A.target;N instanceof Node&&w.current&&!w.current.contains(N)&&b(!1)},R=A=>{A.key==="Escape"&&b(!1)};return window.addEventListener("pointerdown",T),window.addEventListener("keydown",R),()=>{window.removeEventListener("pointerdown",T),window.removeEventListener("keydown",R)}},[g]);const j=T=>{i(T),b(!1)};return a.jsxs("div",{className:`cw-a2a-space-picker${g?" is-open":""}`,ref:w,children:[a.jsxs("div",{className:"cw-a2a-space-row",children:[a.jsxs("div",{className:"cw-a2a-space-select-wrap",children:[a.jsxs("button",{type:"button",className:`cw-a2a-space-trigger ${n?"is-error":""}`,disabled:S,"aria-haspopup":"listbox","aria-expanded":g,"aria-label":r("traditional.resources.selectAgentKitCenter"),onClick:()=>{y(""),b(T=>!T)},children:[a.jsx("span",{className:e?void 0:"is-placeholder",children:k}),a.jsx($K,{className:"cw-a2a-space-trigger-icon"})]}),g&&a.jsxs("div",{className:"cw-a2a-space-menu",children:[a.jsx("div",{className:"cw-picker-search",children:a.jsx("input",{className:"cw-picker-search-input",type:"search",value:v,autoFocus:!0,autoComplete:"off","aria-label":r("traditional.resources.searchAgentKitCenter"),placeholder:r("traditional.resources.searchNameOrId"),onChange:T=>y(T.currentTarget.value)})}),a.jsxs("div",{className:"cw-picker-options",role:"listbox","aria-label":r("traditional.resources.agentKitCenter"),children:[E&&a.jsx("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option is-selected",onClick:()=>j(e),children:r("traditional.resources.selectedAgentCenter")}),C.map(T=>{const R=F6(T,r("traditional.resources.unnamedAgentCenter")),A=T.id===e;return a.jsx("button",{type:"button",role:"option","aria-selected":A,className:`cw-a2a-space-option ${A?"is-selected":""}`,title:`${R} (${T.id})`,onClick:()=>j(T.id),children:R},T.id)}),!E&&C.length===0&&a.jsx("div",{className:"cw-picker-empty",children:r("traditional.resources.noMatchingAgentCenters")})]})]})]}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-a2a-space-refresh",title:r("traditional.resources.refreshAgentCenters"),"aria-label":r("traditional.resources.refreshAgentCenters"),disabled:c,onClick:()=>m(T=>T+1),children:c?a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}):a.jsx(FK,{className:"cw-i cw-i-sm"})})]}),d?a.jsxs("div",{className:"cw-banner cw-a2a-space-error",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:d})]}):c?a.jsxs("span",{className:"cw-help cw-a2a-space-status",children:[a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}),r("traditional.resources.loadingAgentCenters")]}):o.length===0?a.jsx("span",{className:"cw-help",children:r("traditional.resources.noAgentCenters")}):a.jsx("span",{className:"cw-help",children:r("traditional.resources.agentCentersLoaded",{count:o.length})})]})}function oUe({value:e,items:t,loading:n,error:i,pickerClassName:r,selectLabel:s,searchLabel:o,listLabel:l,placeholder:c,emptyMessage:u,loadedMessage:d,refreshLabel:f,noMatchesMessage:h,getLabel:m,getSearchFields:g,getKey:b,getOptionIds:v,makeUnknownItem:y,onChange:w,onRefresh:x}){const{t:O}=Te("create"),[k,S]=p.useState(!1),[C,E]=p.useState(""),j=p.useRef(null),T=!e||t.some(_=>_.id===e.trim()),R=t.find(_=>_.id===e.trim()),A=R?m(R):e&&!T?e:c,N=n&&t.length===0,P=p.useMemo(()=>t.filter(_=>kg(C,g(_))),[g,t,C]),I=!!(e&&!T&&kg(C,[e]));p.useEffect(()=>{if(!k)return;const _=F=>{const M=F.target;M instanceof Node&&j.current&&!j.current.contains(M)&&S(!1)},L=F=>{F.key==="Escape"&&S(!1)};return window.addEventListener("pointerdown",_),window.addEventListener("keydown",L),()=>{window.removeEventListener("pointerdown",_),window.removeEventListener("keydown",L)}},[k]);const D=_=>{w(_),S(!1)};return n&&t.length===0?a.jsxs("span",{className:"cw-viking-kb-inline-status",role:"status",children:[a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}),O("common.loading")]}):a.jsxs("div",{className:`cw-a2a-space-picker ${r}${k?" is-open":""}`,ref:j,children:[a.jsxs("div",{className:"cw-a2a-space-row",children:[a.jsxs("div",{className:"cw-a2a-space-select-wrap",children:[a.jsxs("button",{type:"button",className:"cw-a2a-space-trigger",disabled:N,"aria-haspopup":"listbox","aria-expanded":k,"aria-label":s,onClick:()=>{E(""),S(_=>!_)},children:[a.jsx("span",{className:e?void 0:"is-placeholder",children:A}),a.jsx($K,{className:"cw-a2a-space-trigger-icon"})]}),k&&a.jsxs("div",{className:"cw-a2a-space-menu cw-viking-kb-menu",children:[a.jsx("div",{className:"cw-picker-search",children:a.jsx("input",{className:"cw-picker-search-input",type:"search",value:C,autoFocus:!0,autoComplete:"off","aria-label":o,placeholder:O("traditional.resources.searchNameOrId"),onChange:_=>E(_.currentTarget.value)})}),a.jsxs("div",{className:"cw-picker-options",role:"listbox","aria-label":l,children:[I&&a.jsx("button",{type:"button",role:"option","aria-selected":!0,className:"cw-a2a-space-option is-selected",onClick:()=>D(y(e)),children:e}),P.map(_=>{const L=m(_),F=_.id===e,M=v(_).filter(Boolean).join(" / ");return a.jsx("button",{type:"button",role:"option","aria-selected":F,className:`cw-a2a-space-option ${F?"is-selected":""}`,title:M?`${L} (${M})`:L,onClick:()=>D(_),children:L},b(_))}),!I&&P.length===0&&a.jsx("div",{className:"cw-picker-empty",children:h})]})]})]}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-a2a-space-refresh cw-viking-kb-refresh",title:f,"aria-label":f,disabled:n,onClick:x,children:n?a.jsx(Fi,{className:"cw-i cw-i-sm cw-spin"}):a.jsx(FK,{className:"cw-i cw-i-sm"})})]}),i?a.jsxs("div",{className:"cw-banner cw-a2a-space-error",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:i})]}):t.length===0?a.jsx("span",{className:"cw-help",children:u}):a.jsx("span",{className:"cw-help",children:d(t.length)})]})}function mon({value:e,onChange:t}){const{t:n}=Te("create"),[i,r]=p.useState([]),[s,o]=p.useState(!1),[l,c]=p.useState(null),[u,d]=p.useState(0);return p.useEffect(()=>{let f=!1;return o(!0),c(null),Kan().then(h=>{f||r(h)}).catch(h=>{f||(r([]),c(h instanceof Error?h.message:n("traditional.resources.loadError")))}).finally(()=>{f||o(!1)}),()=>{f=!0}},[u,n]),a.jsx(oUe,{value:e,items:i,loading:s,error:l,pickerClassName:"cw-viking-kb-picker",selectLabel:n("traditional.resources.selectKnowledgeBase"),searchLabel:n("traditional.resources.searchKnowledgeBase"),listLabel:n("traditional.resources.knowledgeBaseList"),placeholder:n("traditional.resources.knowledgeBasePlaceholder"),emptyMessage:n("traditional.resources.noKnowledgeBases"),loadedMessage:f=>n("traditional.resources.knowledgeBasesLoaded",{count:f}),refreshLabel:n("traditional.resources.refreshKnowledgeBases"),noMatchesMessage:n("traditional.resources.noMatchingKnowledgeBases"),getLabel:f=>Oce(f,n("traditional.resources.unnamedKnowledgeBase")),getSearchFields:f=>[Oce(f,n("traditional.resources.unnamedKnowledgeBase")),f.id,f.description,f.projectName,f.resourceId,f.agentkitKnowledgeId,f.providerKnowledgeId,f.sourceLabel],getKey:f=>f.id,getOptionIds:f=>[f.id,f.resourceId,f.agentkitKnowledgeId,f.providerKnowledgeId],makeUnknownItem:f=>({id:f,name:f,description:"",projectName:"",region:"",sourceKind:"knowledge",sourceLabel:"Knowledge Engine",resourceId:""}),onChange:t,onRefresh:()=>d(f=>f+1)})}function gon({value:e,onChange:t}){const{t:n}=Te("create"),[i,r]=p.useState([]),[s,o]=p.useState(!1),[l,c]=p.useState(null),[u,d]=p.useState(0);return p.useEffect(()=>{let f=!1;return o(!0),c(null),Xan().then(h=>{f||r(h)}).catch(h=>{f||(r([]),c(h instanceof Error?h.message:n("traditional.resources.loadError")))}).finally(()=>{f||o(!1)}),()=>{f=!0}},[u,n]),a.jsx(oUe,{value:e,items:i,loading:s,error:l,pickerClassName:"cw-viking-memory-picker",selectLabel:n("traditional.resources.selectMemory"),searchLabel:n("traditional.resources.searchMemory"),listLabel:n("traditional.resources.memoryList"),placeholder:n("traditional.resources.memoryPlaceholder"),emptyMessage:n("traditional.resources.noMemories"),loadedMessage:f=>n("traditional.resources.memoriesLoaded",{count:f}),refreshLabel:n("traditional.resources.refreshMemories"),noMatchesMessage:n("traditional.resources.noMatchingMemories"),getLabel:f=>kce(f,n("traditional.resources.unnamedMemory")),getSearchFields:f=>[kce(f,n("traditional.resources.unnamedMemory")),f.id,f.description,f.projectName,f.region,f.resourceId,...f.memoryTypes??[]],getKey:f=>`${f.projectName}:${f.region}:${f.id}`,getOptionIds:f=>[f.id,f.resourceId],makeUnknownItem:f=>({id:f,name:f,description:"",projectName:"",region:"",resourceId:"",memoryTypes:[]}),onChange:t,onRefresh:()=>d(f=>f+1)})}function bon({hidden:e}){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:e?a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M3 3l18 18"}),a.jsx("path",{d:"M9.7 6.95A9.7 9.7 0 0 1 12 6.68c5.9 0 9.25 5.32 9.25 5.32a16 16 0 0 1-2.28 2.85"}),a.jsx("path",{d:"M14.35 14.55A3.25 3.25 0 0 1 9.5 10.2"}),a.jsx("path",{d:"M6.25 8.12A16.4 16.4 0 0 0 2.75 12S6.1 17.32 12 17.32c.8 0 1.55-.1 2.25-.27"})]}):a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M2.75 12s3.35-5.25 9.25-5.25S21.25 12 21.25 12 17.9 17.25 12 17.25 2.75 12 2.75 12Z"}),a.jsx("circle",{cx:"12",cy:"12",r:"2.5"})]})})}function yon({tools:e,conflict:t,showConflict:n,onChange:i}){const{t:r}=Te("create"),s=p.useId(),[o,l]=p.useState(null),c=n?t:null,u=(h,m)=>i(e.map((g,b)=>b===h?{...g,...m}:g)),d=h=>{l(m=>m==null||mg!==h))},f=()=>i([...e,{name:"",transport:"http",url:""}]);return a.jsxs("div",{className:"cw-mcp",children:[e.length>0&&a.jsx("div",{className:"cw-mcp-list",children:a.jsx(ff,{initial:!1,children:e.map((h,m)=>a.jsxs(Cr.div,{className:"cw-mcp-row",layout:!0,initial:{opacity:0,y:6},animate:{opacity:1,y:0},exit:{opacity:0,y:-6},transition:{duration:.16},children:[a.jsxs("div",{className:"cw-mcp-rowhead",children:[a.jsxs("div",{className:"cw-mcp-transport",children:[a.jsx("button",{type:"button",className:`cw-seg cw-seg-sm ${h.transport==="http"?"is-on":""}`,onClick:()=>u(m,{transport:"http"}),"aria-pressed":h.transport==="http",children:a.jsx("span",{className:"cw-seg-title",children:"HTTP"})}),a.jsx("button",{type:"button",className:`cw-seg cw-seg-sm ${h.transport==="stdio"?"is-on":""}`,onClick:()=>u(m,{transport:"stdio"}),"aria-pressed":h.transport==="stdio",children:a.jsx("span",{className:"cw-seg-title",children:"stdio"})})]}),a.jsx("button",{type:"button",className:"cw-icon-btn cw-icon-danger",onClick:()=>d(m),"aria-label":r("traditional.mcp.removeTool"),children:a.jsx(Jg,{className:"cw-i cw-i-sm"})})]}),a.jsx("input",{className:"cw-input","data-validation-field":"mcp-name","aria-invalid":c==="duplicateName","aria-describedby":c==="duplicateName"?s:void 0,value:h.name,placeholder:r("traditional.mcp.namePlaceholder"),onChange:g=>u(m,{name:g.target.value})}),h.transport==="http"?a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"cw-input","data-validation-field":"mcp-url","aria-invalid":c==="duplicateUrl","aria-describedby":c==="duplicateUrl"?s:void 0,value:h.url??"",placeholder:r("traditional.mcp.urlPlaceholder"),onChange:g=>i(e.map((b,v)=>v===m?Can(b,g.target.value):b))}),Ean(h.url??"")&&a.jsxs("p",{className:"cw-mcp-warning",children:[a.jsx(_h,{"aria-hidden":"true"}),a.jsx("span",{children:r("traditional.mcp.pathWarning")})]}),a.jsxs("div",{className:"cw-mcp-token-field",children:[a.jsx("input",{className:"cw-input",type:o===m?"text":"password",value:kan(h),placeholder:r("traditional.mcp.tokenPlaceholder"),autoComplete:"new-password",spellCheck:!1,onChange:g=>i(e.map((b,v)=>v===m?San(b,g.target.value):b))}),a.jsx("button",{type:"button",className:"cw-mcp-token-toggle","aria-label":r(o===m?"traditional.mcp.hideToken":"traditional.mcp.showToken"),title:r(o===m?"traditional.mcp.hideToken":"traditional.mcp.showToken"),"aria-pressed":o===m,onClick:()=>l(g=>g===m?null:m),children:a.jsx(bon,{hidden:o!==m})})]})]}):a.jsxs(a.Fragment,{children:[a.jsx("input",{className:"cw-input",value:h.command??"",placeholder:r("traditional.mcp.commandPlaceholder"),onChange:g=>u(m,{command:g.target.value})}),a.jsx("input",{className:"cw-input",value:(h.args??[]).join(" "),placeholder:r("traditional.mcp.argsPlaceholder"),onChange:g=>u(m,{args:g.target.value.split(/\s+/).filter(Boolean)})}),a.jsx("p",{className:"cw-mcp-note",children:r("traditional.mcp.stdioHint")})]})]},m))})}),c&&a.jsx("p",{className:"cw-error-text",id:s,role:"alert",children:r(c==="duplicateName"?"traditional.validation.mcpDuplicateName":"traditional.validation.mcpDuplicateUrl")}),a.jsxs("button",{type:"button",className:"cw-add-sub",onClick:f,children:[a.jsx(ic,{className:"cw-i"}),r("traditional.mcp.addTool")]})]})}function Nj({checked:e,onChange:t,title:n,desc:i,showDescription:r=!1}){return a.jsxs("button",{type:"button",className:`cw-toggle ${e?"is-on":""}`,onClick:()=>t(!e),"aria-pressed":e,children:[a.jsxs("span",{className:"cw-toggle-text",children:[a.jsx("span",{className:"cw-toggle-title",children:n}),r&&a.jsx("span",{className:"cw-toggle-help",children:i})]}),a.jsx("span",{className:"cw-switch","aria-hidden":!0,children:a.jsx(Cr.span,{className:"cw-switch-knob",layout:!0,transition:{type:"spring",stiffness:520,damping:34}})})]})}function von(e,t){var i;let n=e;for(const r of t)if(n=(i=n.subAgents)==null?void 0:i[r],!n)return!1;return!0}function Rj(e,t){let n=e;for(const i of t)n=n.subAgents[i];return n}function ZT(e,t,n){if(t.length===0)return n(e);const[i,...r]=t,s=e.subAgents.slice();return s[i]=ZT(s[i],r,n),{...e,subAgents:s}}function xon(e,t,n="volcengine"){return ZT(e,t,i=>({...i,subAgents:[...i.subAgents,wd(n)]}))}function won(e,t,n,i="volcengine"){return ZT(e,t,r=>{const s=r.subAgents.slice();return s.splice(n,0,wd(i)),{...r,subAgents:s}})}function Oon(e,t){if(t.length===0)return e;const n=t.slice(0,-1),i=t[t.length-1];return ZT(e,n,r=>({...r,subAgents:r.subAgents.filter((s,o)=>o!==i)}))}const UP=e=>!UL(e.agentType),Cce=3;function kon(e,t,n=!1){var r;if(UL(e.agentType))return n?"remoteRoot":(r=e.a2aRegistry)!=null&&r.registrySpaceId.trim()?null:"missingRegistry";const i=KT(e.name,s=>`name.${s}`);return i||(t.has(e.name)?"duplicateName":e.description.trim().length===0?"missingDescription":M7e(e.agentType)?e.subAgents.length===0?"missingSubagent":null:e.instruction.trim().length===0?"missingPrompt":null)}function lUe(e,t,n=[]){const i=[];if(n.length===0){const o=J7e(e);o&&i.push({path:n,name:e.name.trim(),agentType:e.agentType,problem:o==="duplicateName"?"mcpDuplicateName":"mcpDuplicateUrl"})}const r=UL(e.agentType),s=kon(e,t,n.length===0);return s&&i.push({path:n,name:r?"":e.name.trim(),agentType:e.agentType,problem:s}),UP(e)&&e.subAgents.forEach((o,l)=>i.push(...lUe(o,t,[...n,l]))),i}function Son(e,t){return t("traditional.validation.missingSubagentDetail",{type:t(`traditional.agentTypes.${e.agentType??"llm"}.fullLabel`)})}function cUe(e,t,n=[]){if((e.agentType===void 0||e.agentType==="llm")&&cm(e,t)==="ark")return n;if(!UP(e))return null;for(let r=0;rt+uUe(n),0)}function fU(e,t=!1){const n=CO(e),i=yI(n.draft).includes("mcp_resilience"),r=[],s={...n.envValues},o=n.draft.cloudProvider??"volcengine",l=dmt(n.draft).map(SN);let c=!1,u="";for(const h of FL(n.draft,Po(o))){const m=[{key:h.apiKeyKey,required:!0,comment:h.label}];h.providerKey&&(m.push({key:h.providerKey,required:!0}),s[h.providerKey]=h.provider),h.apiBaseKey&&(m.push({key:h.apiBaseKey,required:!0}),s[h.apiBaseKey]=h.apiBase),r.push({env:m})}const d=h=>{var m,g,b,v;h.agentType==="llm"&&cm(h,o)==="ark"&&(c=!0,u||(u=(h.modelName??"").trim()));for(const y of h.builtinTools??[]){const w=rT.find(x=>x.id===y);w&&r.push({env:mx(w.env,o)})}for(const y of h.mcpTools??[])y.authTokenEnv&&r.push({env:[{key:y.authTokenEnv,required:!1,comment:`${y.name.trim()||"MCP"} Bearer Token`,secret:!0,readOnly:i,serverManaged:i,hidden:i}]});if((m=h.a2aRegistry)!=null&&m.enabled&&(r.push({env:mx(jIe,o)}),Object.assign(s,aUe(h.a2aRegistry,{includeDefaults:!0},o))),h.memory.shortTerm&&r.push({env:mx(((g=uw.find(y=>y.id===(h.shortTermBackend??"local")))==null?void 0:g.env)??[],o)}),h.memory.longTerm&&r.push({env:mx(((b=_B.find(y=>y.id===(h.longTermBackend??"local")))==null?void 0:b.env)??[],o)}),h.knowledgebase&&r.push({env:mx(((v=jB.find(y=>y.id===(h.knowledgebaseBackend??Dg)))==null?void 0:v.env)??[],o)}),h.tracing)for(const y of h.tracingExporters??[]){const w=nmt.find(x=>x.id===y);w&&r.push({env:w.env,enableFlag:w.enableFlag})}h.subAgents.forEach(d)};if(d(n.draft),c){r.push({env:[{key:"MODEL_AGENT_PROVIDER",required:!0},{key:"MODEL_AGENT_API_BASE",required:!0},{key:"MODEL_AGENT_API_KEY",required:!0,comment:"Ark API Key",placeholder:Xt("helpers.deploymentEnv.selectedApiKeyPlaceholder"),secret:!0,readOnly:!0,serverManaged:!0,requiredBy:l}]}),s.MODEL_AGENT_PROVIDER="openai",s.MODEL_AGENT_API_BASE=Po(o);const h=u||Gp(o);s.MODEL_AGENT_NAME=h,s.MODEL_NAME=h}if(i){if(t){r.push({env:[{key:"MCP_SERVERS_JSON",required:!0,comment:Xt("helpers.deploymentEnv.mcpInjectedComment"),placeholder:Xt("helpers.deploymentEnv.restoredPlaceholder"),help:Xt("helpers.deploymentEnv.restoredHelp"),readOnly:!0,serverManaged:!0,hidden:!0,requiredBy:[SN("mcp_resilience")]}]});const g=oU(r);return{specs:g.specs,fixedValues:{...g.fixedValues,...s}}}const h=Pan(n.draft),m=h.ok?void 0:h.message;r.push({env:[{key:"MCP_SERVERS_JSON",required:!0,comment:Xt("helpers.deploymentEnv.mcpInjectedComment"),placeholder:Xt(t?"helpers.deploymentEnv.restoredPlaceholder":"helpers.deploymentEnv.generatedMcpPlaceholder"),help:Xt("helpers.deploymentEnv.mergedMcpHelp"),secret:!0,readOnly:!0,serverManaged:h.ok,hidden:!0,requiredBy:[SN("mcp_resilience")],missingError:m}]})}const f=oU(r);return{specs:f.specs,fixedValues:{...f.fixedValues,...s}}}function dUe(e,t){var i;if(e.id==="baseline")return t("traditional.debug.baseline");const n=(i=/^variant-(\d+)$/.exec(e.id))==null?void 0:i[1];return n?t("traditional.debug.comparison",{count:Number(n)}):e.name}function Eon(e,t){const n=i=>(i??"").trim().replace(/\/+$/,"");return n(e)===n(t)}function Con(e,t,n){if(e===""&&t===n)return!1;const i=(e??"").trim();return!i||i===Gp(t)?!0:i===Gp(n)?!1:n==="byteplus"&&i.includes("doubao-")}function Cy(e,t){const n=e.cloudProvider??"volcengine",i=cm(e,n),r=e.subAgents.map(u=>Cy(u,t)),s=i==="ark"&&Con(e.modelName,n,t)?Gp(t):e.modelName,l=Eon(e.modelApiBase,Po(n))||t==="byteplus"&&(e.modelApiBase??"").includes("volces.com")?Po(t):e.modelApiBase;return e.cloudProvider!==t||s!==e.modelName||l!==e.modelApiBase||r.some((u,d)=>u!==e.subAgents[d])?{...e,cloudProvider:t,modelName:s,modelApiBase:l,subAgents:r}:e}function Aon(e,t){var l;const n=Cy(e,t),i=NK(n,Po(t)),r=new Set(i.map(({key:c})=>c)),s=((l=n.deployment)==null?void 0:l.envValues)??{},o=Object.fromEntries(Object.entries(s).filter(([c,u])=>r.has(c)&&!!u.trim()));return Object.keys(o).length===0?{draft:n,customModelSecretValues:o}:{draft:{...n,deployment:{...n.deployment??{feishuEnabled:!1},envValues:Object.fromEntries(Object.entries(s).filter(([c])=>!r.has(c)))}},customModelSecretValues:o}}function _S(e){var i,r,s;const t=CO(e).draft;return{...N7e(t,t.cloudProvider??"volcengine"),deployment:{feishuEnabled:!!((i=e.deployment)!=null&&i.feishuEnabled),modelApiKeyId:((r=e.deployment)==null?void 0:r.modelApiKeyId)??"",modelApiKeyName:((s=e.deployment)==null?void 0:s.modelApiKeyName)??""}}}function hU(e){var n;const t=(n=e.modelName)==null?void 0:n.trim();if(t)return t;for(const i of e.subAgents){const r=hU(i);if(r)return r}return""}function fUe(e,t={}){var r,s,o,l;const n=fU(e),i={...((r=e.deployment)==null?void 0:r.envValues)??{},...t,...n.fixedValues};return{..._S(e),deployment:{feishuEnabled:!!((s=e.deployment)!=null&&s.feishuEnabled),modelApiKeyId:((o=e.deployment)==null?void 0:o.modelApiKeyId)??"",modelApiKeyName:((l=e.deployment)==null?void 0:l.modelApiKeyName)??"",envValues:Object.fromEntries(rsn(n.specs,i,CO(e).envValues).map(({key:c,value:u})=>[c,u]))}}}function Ton(e,t){const n=new Set;for(const i of FL(e,Po(t)))for(const r of[i.providerKey,i.apiBaseKey,i.apiKeyKey])r&&n.add(r);return n}function _on(e,t,n){const i=Ton(e,t);return(n??[]).filter(({key:r,value:s})=>i.has(r)&&s.trim())}function jon(e,t={}){return JSON.stringify(fUe(e,t))}function QP(e,t){return JSON.stringify({draftSnapshot:e,modelName:t.modelName,description:t.description,instruction:t.instruction})}function qx(e){return JSON.stringify({modelName:e.modelName.trim(),description:e.description.trim(),instruction:e.instruction.trim()})}function Non({enabled:e,disabledReason:t,variants:n,draftSnapshot:i,input:r,onInput:s,onSend:o,onStartVariant:l,onUseVariant:c,onAddVariant:u,onRemoveVariant:d,onToggleConfig:f,onCompleteConfig:h,onConfigChange:m,onOpenTrace:g}){const{t:b}=Te("create"),v=n.filter(x=>x.phase!=="ready"?!1:x.runtimeSnapshot===QP(i,x)),y=n.some(x=>x.phase==="sending"),w=v.length>0&&!y;return a.jsxs("section",{className:"cw-ab-workspace","aria-label":b("traditional.debug.ariaLabel"),children:[a.jsx("div",{className:"cw-ab-stage",children:e?a.jsx("div",{className:"cw-ab-grid",style:{"--cw-ab-column-count":n.length},children:n.map((x,O)=>{const k=dUe(x,b),S=x.modelName.trim(),C=x.description.trim(),E=x.instruction.trim(),j=qx(x),T=!!(S&&C&&E&&n.findIndex(M=>qx(M)===j)!==O),R=!S||!C||!E||T,A=!!(x.runtimeSnapshot&&x.runtimeSnapshot!==QP(i,x)),N=x.phase==="starting",P=x.phase==="ready"&&!A,I=N||x.phase==="sending",D=P&&x.phase!=="sending"&&x.messages.some(M=>M.role==="assistant"),_=I||x.configOpen||R,L=S?C?E?T?b("traditional.debug.duplicateConfiguration"):"":b("traditional.debug.enterPrompt"):b("traditional.debug.enterDescription"):b("traditional.debug.selectModel"),F=N?b("traditional.debug.starting"):A?b("traditional.debug.applyAndRestart"):P||x.phase==="error"?b("traditional.debug.restart"):b("traditional.debug.start");return a.jsx("article",{className:"cw-ab-card",children:a.jsxs("div",{className:`cw-ab-card-inner${x.configOpen?" is-flipped":""}`,children:[a.jsxs("section",{className:"cw-ab-card-face cw-ab-card-front","aria-hidden":x.configOpen,inert:x.configOpen,children:[a.jsxs("header",{className:"cw-ab-card-head",children:[a.jsxs("div",{className:"cw-ab-card-title",children:[a.jsx("strong",{children:k}),a.jsx("span",{children:x.modelName||b("traditional.debug.defaultModel")})]}),a.jsxs("div",{className:"cw-ab-card-actions",children:[a.jsx("button",{type:"button",className:"cw-ab-config-trigger",disabled:x.configOpen||I,onClick:()=>f(x.id),children:b("traditional.debug.testConfiguration")}),x.id!=="baseline"&&a.jsx("button",{type:"button",className:"cw-ab-remove","aria-label":b("traditional.debug.deleteVariant",{name:k}),disabled:x.configOpen||I,onClick:()=>d(x.id),children:a.jsx(xce,{className:"cw-i"})})]})]}),a.jsx("div",{className:"cw-ab-conversation",children:x.error?a.jsx(xb,{message:x.error,className:"cw-debug-error-detail",defaultExpanded:!0}):N?a.jsxs("div",{className:"cw-ab-empty cw-ab-starting",children:[a.jsx(Fi,{className:"cw-i cw-spin"}),a.jsx("span",{children:b("traditional.debug.creatingEnvironment")})]}):A?a.jsx("div",{className:"cw-ab-empty cw-ab-launch",children:a.jsx("span",{children:b("traditional.debug.configurationChanged")})}):x.messages.length===0?a.jsx("div",{className:"cw-ab-empty cw-ab-launch",children:P?a.jsxs(a.Fragment,{children:[a.jsx("strong",{className:"cw-ab-ready-title",children:b("traditional.debug.ready")}),a.jsx("span",{className:"cw-ab-launch-hint",children:b("traditional.debug.readyHint")})]}):a.jsx("span",{className:"cw-ab-launch-hint",children:L||b("traditional.debug.startHint")})}):x.messages.map((M,V)=>a.jsx("div",{className:`cw-debug-msg cw-debug-msg-${M.role}`,children:a.jsx("div",{className:"cw-debug-content",children:M.role==="user"?M.content:M.error?a.jsx(xb,{message:M.error,className:"cw-debug-msg-error",defaultExpanded:!0}):M.blocks&&M.blocks.length>0?a.jsx(y0,{blocks:M.blocks,onAction:()=>{}}):M.content?M.content:V===x.messages.length-1&&x.phase==="sending"?a.jsx(XLe,{}):null})},V))}),a.jsxs("footer",{className:"cw-ab-deploy-footer",children:[a.jsx("button",{type:"button",className:"cw-ab-trace",disabled:!D,title:D?b("traditional.debug.viewTraceNamed",{name:k}):b("traditional.debug.traceUnavailable"),onClick:()=>g(x.id),children:b("traditional.debug.trace")}),a.jsxs("button",{type:"button",className:"cw-ab-start cw-ab-footer-start",disabled:_,title:L||void 0,onClick:()=>l(x.id),children:[P||A||x.phase==="error"?a.jsx(Wat,{className:"cw-i"}):a.jsx(oon,{className:"cw-i cw-debug-run-icon"}),F]}),a.jsx("button",{type:"button",className:"cw-ab-deploy",disabled:I||!S,onClick:()=>c(x.id),children:b("traditional.debug.useConfiguration")})]})]}),a.jsxs("section",{className:"cw-ab-card-face cw-ab-card-back","aria-hidden":!x.configOpen,inert:!x.configOpen,children:[a.jsxs("header",{className:"cw-ab-config-head",children:[a.jsxs("div",{children:[a.jsx("strong",{children:b("traditional.debug.testConfiguration")}),a.jsx("span",{children:k})]}),a.jsxs("div",{className:"cw-ab-config-head-actions",children:[x.id!=="baseline"&&a.jsx("button",{type:"button",className:"cw-icon-btn cw-icon-danger cw-ab-config-remove","aria-label":b("traditional.debug.deleteVariant",{name:k}),title:b("traditional.debug.deleteVariantGroup"),disabled:I,onClick:()=>d(x.id),children:a.jsx(xce,{className:"cw-i cw-i-sm"})}),a.jsxs("span",{className:`cw-ab-config-done-wrap${L?" is-disabled":""}`,tabIndex:L?0:void 0,children:[a.jsx("button",{type:"button",className:"cw-ab-config-done",disabled:!x.configOpen||R,onClick:()=>h(x.id),children:x.id==="baseline"?b("traditional.debug.finishConfiguration"):b("traditional.debug.finishAndStart")}),L&&a.jsx("span",{className:"cw-ab-config-done-tip",role:"tooltip",children:L})]})]})]}),a.jsxs("div",{className:"cw-ab-config",children:[a.jsxs("label",{children:[a.jsx("span",{children:b("traditional.model.label")}),a.jsx("input",{value:x.modelName,placeholder:b("traditional.debug.currentAgentModel"),disabled:!x.configOpen,onChange:M=>m(x.id,"modelName",M.target.value)})]}),a.jsxs("label",{children:[a.jsx("span",{children:b("common.description")}),a.jsx("textarea",{rows:2,value:x.description,disabled:!x.configOpen,onChange:M=>m(x.id,"description",M.target.value)})]}),a.jsxs("label",{children:[a.jsx("span",{children:b("traditional.basic.systemPrompt")}),a.jsx("textarea",{rows:5,value:x.instruction,disabled:!x.configOpen,onChange:M=>m(x.id,"instruction",M.target.value)})]}),a.jsx("p",{children:b("traditional.debug.configurationHint")})]})]})]})},x.id)})}):a.jsx("div",{className:"cw-debug-empty",children:t})}),a.jsxs("div",{className:"cw-ab-composer",children:[a.jsxs("div",{className:"cw-debug-composerbox",children:[a.jsx("textarea",{className:"cw-debug-input",rows:1,value:r,placeholder:b(w?"traditional.debug.messagePlaceholder":"traditional.debug.startOneFirst"),disabled:!w,onChange:x=>s(x.target.value),onKeyDown:x=>{XT(x.nativeEvent)||x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),o())}}),a.jsx("button",{type:"button",className:"cw-debug-send",title:b("common.send"),disabled:!w||!r.trim(),onClick:o,children:y?a.jsx(Fi,{className:"cw-i cw-spin"}):a.jsx(wat,{className:"cw-i"})})]}),e&&n.length<3&&a.jsxs("button",{type:"button",className:"cw-btn cw-btn-soft cw-ab-add",onClick:u,children:[a.jsx(ic,{className:"cw-i"}),b("traditional.debug.addVariant")]})]})]})}function Ron({profile:e,optimizations:t,unavailableMessage:n,onProfileChange:i,onOptimizationChange:r}){const{t:s}=Te("create");return a.jsx("section",{className:"cw-optimize-workspace","aria-label":s("traditional.optimization.ariaLabel"),children:a.jsxs("div",{className:"cw-optimize-panel",children:[n?a.jsxs("div",{className:"cw-banner",role:"alert",children:[a.jsx(_h,{className:"cw-i"}),a.jsx("span",{children:n})]}):null,a.jsxs("fieldset",{className:"cw-optimize-section",children:[a.jsx("legend",{children:s("traditional.optimization.scenario")}),a.jsx(By,{className:"cw-optimize-profile-options","aria-label":s("traditional.optimization.scenario"),value:e,onChange:i,children:lH.map(o=>a.jsx("div",{className:`cw-optimize-profile-option${e===o.id?" is-on":""}`,children:a.jsx(By.Item,{value:o.id,block:!0,className:"cw-optimize-profile-control",children:a.jsxs("span",{className:"cw-optimize-profile-copy",children:[a.jsx("strong",{children:s(`traditional.optimization.profiles.${o.id}.label`)}),a.jsx("small",{children:s(`traditional.optimization.profiles.${o.id}.description`)})]})})},o.id))})]}),a.jsxs("fieldset",{className:"cw-optimize-section",children:[a.jsx("legend",{children:s("traditional.optimization.components")}),a.jsx("div",{className:"cw-optimize-option-list",children:imt.map(o=>a.jsxs("section",{className:"cw-optimize-option-group","aria-labelledby":`cw-optimize-group-${o.id}`,children:[a.jsx("h3",{id:`cw-optimize-group-${o.id}`,className:"cw-optimize-option-group-title",children:s(`traditional.optimization.groups.${o.id}`)}),a.jsx("div",{className:"cw-optimize-option-group-items",children:o.componentIds.map(l=>{const c=oH.find(d=>d.id===l);if(!c)return null;const u=t.includes(c.id);return a.jsx(DK,{checked:u,onCheckedChange:d=>{const f=!!d;f!==u&&r(c.id,f)},label:a.jsxs("span",{className:"cw-optimize-option-copy",children:[a.jsx("strong",{children:s(`traditional.optimization.options.${c.id}.label`)}),a.jsx("small",{children:s(`traditional.optimization.options.${c.id}.description`)})]}),className:"cw-optimize-option"},c.id)})})]},o.id))})]})]})})}const Ij=[{id:"build",label:"traditional.workspace.modes.build"},{id:"validate",label:"traditional.workspace.modes.validate"},{id:"optimize",label:"traditional.workspace.modes.optimize"},{id:"environment",label:"traditional.workspace.modes.environment"},{id:"publish",label:"traditional.workspace.modes.publish"}],Ion={build:"traditional.workspace.titles.build",validate:"traditional.workspace.titles.validate",optimize:"traditional.workspace.titles.optimize",environment:"traditional.workspace.titles.environment",publish:"traditional.workspace.titles.publish"};function Pon({mode:e}){const{t}=Te("create");return a.jsx("header",{className:"cw-workspace-header",children:a.jsx("h1",{children:t(Ion[e])})})}function Don({mode:e,busy:t,nextDisabled:n,onChange:i,assistant:r,accessory:s}){const{t:o}=Te("create"),l=Ij.findIndex(d=>d.id===e),c=Ij[l-1],u=Ij[l+1];return a.jsxs("footer",{className:"cw-workspace-footer",children:[s?a.jsx("div",{className:"cw-workspace-footer-accessory",children:s}):null,a.jsxs("div",{className:`cw-workspace-nav-actions${r?" has-assistant":""}`,children:[a.jsx("button",{type:"button",className:`cw-workspace-nav-button${e==="build"?" is-placeholder":""}`,"aria-hidden":e==="build"||void 0,tabIndex:e==="build"?-1:0,disabled:!c||t,onClick:()=>c&&i(c.id),children:o("common.previous")}),a.jsx("span",{"aria-hidden":"true"}),r?a.jsx("div",{className:"cw-workspace-ai-slot",children:r}):null,e==="publish"?a.jsx("div",{id:"cw-publish-primary-action",className:"cw-publish-action-slot"}):a.jsx("button",{type:"button",className:"cw-workspace-nav-button is-primary",disabled:!u||t||n,onClick:()=>u&&i(u.id),children:o("common.next")})]}),a.jsx("nav",{className:"cw-workspace-progress","aria-label":o("traditional.workspace.progress"),children:Ij.map((d,f)=>{const h=d.id===e;return a.jsx("button",{type:"button",className:`${h?"is-active":""}${fi(d.id),children:a.jsx("span",{"aria-hidden":"true"})},d.id)})})]})}function Mon({onBack:e,onCreate:t,onAgentAdded:n,initialDraft:i,features:r,onDeploymentTaskChange:s,createMode:o="custom",freshCreationSurface:l="traditional",workspaceDraftId:c,deploymentTarget:u,cloudProvider:d="volcengine",initialDeployRegion:f=Zi(d),onDeploymentComplete:h,onDeploymentStarted:m,onDraftChange:g,onDiscard:b}){var $d,Fl,zo,Bl,Kc,vo,ia,io,Re,lt,Lt,Ln,wn,pn,jn,Wt,gn,$n,ai,is,re,Vn,bi,La;const{t:v}=Te("create"),y=o==="custom"&&l==="vulcan",w=y&&!i,[x]=p.useState(()=>{const oe=i??wd(d),Le=w?{...oe,name:oe.name.trim()?oe.name:"assistant",dynamicAgentDelegation:!0}:oe;return Aon(Le,d)}),[O,k]=p.useState(x.draft),S=y,[C,E]=p.useState(x.customModelSecretValues),j=(u==null?void 0:u.configuredRuntimeEnvKeys)??[],T=p.useMemo(()=>new Set(j),[j]),R=(($d=O.deployment)==null?void 0:$d.runtimeName)??"",A=u?u.name:ZXt(O.name,R,(Fl=O.deployment)==null?void 0:Fl.runtimeNameCustomized),N=C,P=p.useCallback((oe,Le)=>{E(st=>{const Fe={...st};return Le?Fe[oe]=Le:delete Fe[oe],Fe})},[]);p.useEffect(()=>{k(oe=>Cy(oe,d))},[d]);const[I,D]=p.useState(""),[_,L]=p.useState(!1),[F,M]=p.useState(!1),[V,q]=p.useState(!1),[U,J]=p.useState(null),z=I.trim(),Z=z.length>0&&z.length{se.current=g},[g]),p.useEffect(()=>{var oe;G!==W.current&&(W.current=G,(oe=se.current)==null||oe.call(se,Cy(O,d),H))},[d,O,H,G]);const[Y,X]=p.useState("build"),[ie,ee]=p.useState(!1),[be,ue]=p.useState(()=>new Set),[pe,ke]=p.useState(0),[je,Pe]=p.useState(null),[Ee,ze]=p.useState(!1),[_e,ae]=p.useState((u==null?void 0:u.region)??f),le=(r==null?void 0:r.generatedAgentTestRun)===!0,ge=(r==null?void 0:r.generatedAgentTestRunDisabledReason)||v("traditional.debug.unavailable"),[Oe,Se]=p.useState(()=>{const oe=Cy(i??wd(d),d);return[{id:"baseline",name:v("traditional.debug.baseline"),modelName:hU(oe),description:oe.description,instruction:oe.instruction,configOpen:!1,phase:"idle",runtimeSnapshot:"",messages:[],error:null}]}),[We,Ye]=p.useState("baseline"),ye=p.useRef(1),we=p.useRef(!1),Ae=p.useRef(new Map),[He,Ue]=p.useState(0),[jt,Pt]=p.useState(""),[Kt,Ct]=p.useState(null),[xt,tt]=p.useState(!1),[mt,Ne]=p.useState(!1),Ot=p.useRef(null),[Nt,Yt]=p.useState(""),[xn,Ke]=p.useState(!1),[St,qe]=p.useState(null),[nt,et]=p.useState(""),[ft,Et]=p.useState(!1),[At,It]=p.useState(!1),[Gt,Xe]=p.useState([]),wt=p.useRef(null),vt=p.useRef({});async function tn(){const oe=new Set([...Ae.current.values()].map(({run:st})=>st.runId)),Le=LK().filter(st=>!oe.has(st));Le.length&&await Promise.all(Le.map(async st=>{try{await rx(st),Qk(st)}catch(Fe){console.warn("Failed to clean up stale debug run",Fe)}}))}p.useEffect(()=>(tn(),()=>{for(const{run:oe}of Ae.current.values())rx(oe.runId).then(()=>Qk(oe.runId)).catch(Le=>console.warn("Failed to clean up debug run",Le));Ae.current.clear()}),[]),p.useEffect(()=>()=>{var oe;(oe=Ot.current)==null||oe.call(Ot,!1),Ot.current=null},[]);const Qt=p.useRef(null);Qt.current||(Qt.current=({meta:oe,children:Le})=>a.jsxs("section",{ref:st=>{vt.current[oe.id]=st},id:`cw-sec-${oe.id}`,"data-step-id":oe.id,className:"cw-section",children:[a.jsx("header",{className:"cw-sec-head",children:a.jsx("h2",{className:"cw-sec-title",children:v(oe.label)})}),a.jsx("div",{className:"cw-sec-body",children:Le})]}));const cn=von(O,Gt)?Gt:[],Me=Rj(O,cn),on=cn.length===0,On=cn.join(".")||"root",Sn=()=>{ue(oe=>oe.has(On)?oe:new Set(oe).add(On))},Qi=`cw-a2a-registry-advanced-${cn.join("-")||"root"}`,un=oe=>k(Le=>ZT(Le,cn,st=>({...st,...oe}))),lr=oe=>k(Le=>{var st;return{...Le,deployment:{...Le.deployment??{feishuEnabled:!1},envValues:{...((st=Le.deployment)==null?void 0:st.envValues)??{},...oe}}}}),Mn=(oe,Le)=>lr({[oe]:Le}),ei=oe=>un({a2aRegistry:{...Me.a2aRegistry??{enabled:!1,registrySpaceId:"",registryTopK:"",registryRegion:"",registryEndpoint:""},...oe}}),Bn=(oe,Le)=>{if(!(oe in wce))return;const st=wce[oe];ei({[st]:Le}),Mn(oe,Le)},ki=oe=>{if(!(on&&oe==="a2a")){if(oe==="a2a"){un({agentType:oe,a2aRegistry:{...Me.a2aRegistry??{registrySpaceId:"",registryTopK:"",registryRegion:"",registryEndpoint:""},enabled:!0}});return}un({agentType:oe,a2aRegistry:Me.a2aRegistry?{...Me.a2aRegistry,enabled:!1}:void 0})}},zn=(oe,Le)=>{k(oe),Le&&Xe(Le)},Rn=async()=>{const oe=I.trim();if(!(!oe||_)&&!(oe.length{const Le=Rj(O,oe);if(!UP(Le)||oe.length>=Cce)return;const st=xon(O,oe,d),Fe=Rj(st,oe).subAgents.length-1;zn(st,[...oe,Fe])},rt=(oe,Le)=>{const st=Rj(O,oe);if(!UP(st)||oe.length>=Cce)return;const Fe=Math.max(0,Math.min(Le,st.subAgents.length)),de=won(O,oe,Fe,d);zn(de,[...oe,Fe])},zt=()=>{window.confirm(v("traditional.actions.clearRootConfirmation"))&&(k(wd(d)),Xe([]),ee(!1))},Qe=oe=>{if(oe.length===0){zt();return}zn(Oon(O,oe),oe.slice(0,-1))},bt=Me.builtinTools??[],Ht=p.useMemo(()=>NIe(d),[d]),_n=p.useMemo(()=>new Set(Ht.map(oe=>oe.id)),[Ht]),jr=Me.mcpTools??[],Hs=on?J7e(O):null,qs=Me.selectedSkills??[],Dr=oe=>{_n.has(oe)&&un({builtinTools:bt.includes(oe)?bt.filter(Le=>Le!==oe):[...bt,oe]})},ti=M7e(Me.agentType),Si=UL(Me.agentType),Zr=gM(d),Jr=cm(Me,d),ga=oe=>{var st;const Le=oe==="custom"&&Jr==="ark"?"":oe==="ark"&&!((st=Me.modelName)!=null&&st.trim())?Gp(d):Me.modelName;un({modelSource:oe,modelName:Le,modelFallbacks:oe==="custom"&&Jr==="ark"?[]:Ru(Le,Me.modelFallbacks)})},go=p.useMemo(()=>Ptn(O),[O]),us=Si?null:KT(Me.name,oe=>v(`validation.agentName.${oe}`))??(go.has(Me.name)?v("traditional.validation.duplicateName"):null),he=us!==null,pr=ie||be.has(On),bo=!Si&&Me.description.trim().length===0,to=Me.instruction.trim().length===0,fl=Si&&!((zo=Me.a2aRegistry)!=null&&zo.registrySpaceId.trim()),no=(oe,Le=ie)=>Le&&oe?`is-error cw-error-shake-${pe%2}`:"",ws=p.useMemo(()=>lUe(O,go),[O,go]),Ws=ws.length===0,Ai=p.useMemo(()=>Cy(O,d),[d,O]),rr=umt(O),Ds=yI(O),hl=rmt(d),pl=p.useMemo(()=>jon(Ai,N),[Ai,N]),mr=Oe.find(oe=>oe.id===We)??Oe[0],Mr=p.useMemo(()=>fU(Ai,(u==null?void 0:u.editMode)==="source-preserving"),[u==null?void 0:u.editMode,Ai]),ml=!u||u.editMode==="regenerate",Mo=p.useMemo(()=>NK(Ai,Po(d)),[d,Ai]),Nr=p.useMemo(()=>cUe(Ai,d),[d,Ai]),Lo=p.useMemo(()=>T7e(Ai,Po(d),C,j),[d,j,C,Ai]),es=Nr!==null&&!((Kc=(Bl=Ai.deployment)==null?void 0:Bl.modelApiKeyId)!=null&&Kc.trim()),ba=es||!!Lo,Di=Mo.find(oe=>oe.label===Xt("helpers.customModel.apiKeyLabel",{name:Me.name.trim()||Xt("helpers.customModel.fallbackName")})),Ms=Di?T.has(Di.key):!1,zr=Jr==="custom"&&Di!==void 0&&!((vo=C[Di.key])!=null&&vo.trim())&&!Ms,ds=Jr==="ark"&&!((io=(ia=Ai.deployment)==null?void 0:ia.modelApiKeyId)!=null&&io.trim()),gl=!MK(Me.modelApiBase),na=p.useCallback(oe=>{k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},modelApiKeyId:oe.id,modelApiKeyName:oe.name}}))},[]);function gi(oe){const Le=oe.problem==="mcpDuplicateName"||oe.problem==="mcpDuplicateUrl"?"tools":oe.problem==="missingSubagent"?"type":"basic",st=vt.current[Le];st==null||st.scrollIntoView({behavior:"smooth",block:"start"});const Fe=oe.problem==="mcpDuplicateName"?"mcp-name":oe.problem==="mcpDuplicateUrl"?"mcp-url":oe.problem==="missingDescription"?"description":oe.problem==="missingPrompt"?"instruction":oe.problem==="missingRegistry"?"a2a-registry":oe.problem==="missingSubagent"||oe.problem==="remoteRoot"?null:"name",de=Fe?st==null?void 0:st.querySelector(`[data-validation-field="${Fe}"]`):st,Be=de!=null&&de.matches('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])')?de:de==null?void 0:de.querySelector('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])');Be==null||Be.focus({preventScroll:!0})}function Dl(oe){Xe(oe),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{const Le=vt.current.model;Le==null||Le.scrollIntoView({behavior:"smooth",block:"start"});const st=(Le==null?void 0:Le.querySelector('[data-validation-field="model-api-key"]'))??Le,Fe=st!=null&&st.matches('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])')?st:st==null?void 0:st.querySelector('input, textarea, button:not([disabled]), [contenteditable="true"], [tabindex]:not([tabindex="-1"])');Fe==null||Fe.focus({preventScroll:!0})})})}const $o=()=>Ws?ba?(ee(!0),ke(oe=>oe+1),Dl(es?Nr??[]:(Lo==null?void 0:Lo.path)??[]),!1):(Yt(""),!0):(ee(!0),ke(oe=>oe+1),ws[0]&&(Xe(ws[0].path),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>gi(ws[0]))})),!1),Ks=async()=>{Ct(null);const oe=[...Ae.current.values()];Ae.current.clear(),Ue(0),Se(Le=>Le.map(st=>({...st,phase:"idle",runtimeSnapshot:"",messages:[],error:null}))),await Promise.all(oe.map(async({run:Le})=>{try{await rx(Le.runId),Qk(Le.runId)}catch(st){console.warn("Failed to clean up debug run",st)}}))},bl=async oe=>{const Le=Ae.current.get(oe);if(Le){Ae.current.delete(oe),Ue(Ae.current.size);try{await rx(Le.run.runId),Qk(Le.run.runId)}catch(st){console.warn("Failed to clean up debug run",st)}}},Fo=oe=>{const Le=Ae.current.get(oe),st=Oe.find(Fe=>Fe.id===oe);!Le||!st||Ct({runId:Le.run.runId,sessionId:Le.sessionId,variantName:dUe(st,v)})},Pa=oe=>{const Le=Ot.current;Ot.current=null,Le==null||Le(oe)},yl=()=>{mt||(tt(!1),Pa(!1))},Uu=async()=>{if(!mt){Ne(!0);try{await Ks(),tt(!1),Pa(!0)}finally{Ne(!1)}}},Bo=async()=>Y!=="validate"||He===0?!0:Ot.current?!1:new Promise(oe=>{Ot.current=oe,tt(!0)}),hc=async oe=>{if(await Bo()){if(!$o()){X("build");return}oe&&Ye(oe),X("environment")}},Dd=async oe=>{var st,Fe;if(Yt(""),!$o()){X("build");return}if((st=Ai.harnessSidecar)!=null&&st.enabled&&hl){Yt(hl),X("optimize");return}const Le=lU(Mr.specs,((Fe=Ai.deployment)==null?void 0:Fe.envValues)??{});if(Le){Yt(`${Le.spec.comment||Le.spec.key}:${Le.error}`),X("build");return}ze(!0);try{const de=oe?Oe.find(ct=>ct.id===oe):mr;de&&Ye(de.id);const Be=de?cmt(Ai,de):Ai,at=await eE(_S(Be));k(Be),Pe(at),X("publish")}catch(de){Yt(de instanceof Error?de.message:String(de))}finally{ze(!1)}},Md=async()=>{if(await Bo()){if(!$o()){X("build");return}X("optimize")}},yo=async oe=>{if(!le||Ee||!$o())return;const Le=Oe.find(Vt=>Vt.id===oe);if(!Le||Le.phase==="starting"||Le.phase==="sending")return;const st=Le.modelName.trim(),Fe=Le.description.trim(),de=Le.instruction.trim(),Be=qx(Le),at=Oe.findIndex(Vt=>Vt.id===oe),ct=Oe.findIndex(Vt=>qx(Vt)===Be);if(!st||!Fe||!de||ct!==at)return;const $t=QP(pl,Le);Se(Vt=>Vt.map(fi=>fi.id===oe?{...fi,configOpen:!1,phase:"starting",messages:[],error:null}:fi)),Pt("");let kn=null,Ti="unknown";const sn=oe==="baseline"?"baseline":"comparison",oi=Rtn({agentId:String(Ai.name||"unknown"),variantType:sn});try{await bl(oe),await tn();const Vt={...Ai,modelName:Le.modelName||Ai.modelName,description:Le.description,instruction:Le.instruction};Ti="create_test_run",kn=await _2e(fUe(Vt,N),u?{runtimeId:u.runtimeId,region:u.region}:void 0),ron(kn.runId),Ti="create_test_session";const fi=await j2e(kn.runId,"test_user");Ae.current.set(oe,{run:kn,sessionId:fi}),Ue(Ae.current.size),Se(Un=>Un.map(sr=>sr.id===oe?{...sr,phase:"ready",runtimeSnapshot:$t}:sr)),oi.succeed({debugRunId:String(kn.runId)})}catch(Vt){if(kn)try{await rx(kn.runId),Qk(kn.runId)}catch(fi){console.warn("Failed to clean up debug run",fi)}Se(fi=>fi.map(Un=>Un.id===oe?{...Un,phase:"error",runtimeSnapshot:"",error:Vt instanceof Error?Vt.message:String(Vt)}:Un)),oi.fail({failedPhase:Ti,...Xo(Vt,{phase:Ti})})}},Ld=async()=>{const oe=jt.trim(),Le=Oe.filter(Fe=>Fe.phase==="ready"&&Fe.runtimeSnapshot===QP(pl,Fe)&&Ae.current.has(Fe.id));if(!oe||Le.length===0)return;Pt("");const st=new Set(Le.map(Fe=>Fe.id));Se(Fe=>Fe.map(de=>st.has(de.id)?{...de,phase:"sending",messages:[...de.messages,{role:"user",content:oe},{role:"assistant",content:"",blocks:[]}]}:de)),await Promise.all(Le.map(async Fe=>{const de=Ae.current.get(Fe.id);if(de)try{let Be=dB();for await(const at of R2e({runId:de.run.runId,userId:"test_user",sessionId:de.sessionId,text:oe})){const ct=at.error||at.errorMessage||at.error_message;if(ct||(Be=Zje(Be,at)),Se($t=>$t.map(kn=>{if(kn.id!==Fe.id)return kn;const Ti=[...kn.messages],sn={...Ti[Ti.length-1]};return ct?sn.error=String(ct):(sn.content=Be.blocks.filter(oi=>oi.kind==="text").map(oi=>oi.text).join(""),sn.blocks=Be.blocks),Ti[Ti.length-1]=sn,{...kn,messages:Ti}})),ct)break}}catch(Be){Se(at=>at.map(ct=>{if(ct.id!==Fe.id)return ct;const $t=[...ct.messages],kn={...$t[$t.length-1]};return kn.error=Be instanceof Error?Be.message:String(Be),$t[$t.length-1]=kn,{...ct,messages:$t}}))}finally{Se(Be=>Be.map(at=>at.id===Fe.id?{...at,phase:"ready"}:at))}}))},vl=()=>{Se(oe=>{if(oe.length>=3)return oe;const Le=ye.current++,st=`variant-${Le}`;return[...oe,{id:st,name:v("traditional.debug.comparison",{count:Le}),modelName:O.modelName??"",description:O.description,instruction:O.instruction,configOpen:!0,phase:"idle",runtimeSnapshot:"",messages:[],error:null}]})},Ml=async oe=>{await bl(oe),Se(Le=>Le.filter(st=>st.id!==oe)),We===oe&&Ye("baseline")},Da=(oe,Le)=>Se(st=>st.map(Fe=>Fe.id===oe?{...Fe,...Le}:Fe)),Uo=(oe,Le)=>{if(Le&&hl){Yt(hl);return}const st=Le?[...new Set([...Ds,oe])]:Ds.filter(de=>de!==oe),Fe=rr==="ops"?"default":rr;k(de=>({...de,harnessSidecar:jy(st,Fe)})),Yt(""),Pe(null)},Qo=oe=>{const Le=cH(oe);if(Le.length>0&&hl){Yt(hl);return}k(st=>({...st,harnessSidecar:jy(Le,oe)})),Yt(""),Pe(null)},Qu=(oe,Le,st)=>{oe==="baseline"&&Le==="modelName"&&(we.current=!0),Da(oe,{[Le]:st}),!(We!==oe||oe==="baseline")&&Ye("baseline")},xl=oe=>{const Le=Oe.find($t=>$t.id===oe);if(!Le)return;const st=Le.modelName.trim(),Fe=Le.description.trim(),de=Le.instruction.trim(),Be=qx(Le),at=Oe.findIndex($t=>$t.id===oe),ct=Oe.findIndex($t=>qx($t)===Be);if(!(!st||!Fe||!de||ct!==at)){if(oe==="baseline"){Da(oe,{configOpen:!1});return}yo(oe)}},Ll=async(oe,Le,st)=>{var ct,$t,kn;const Fe=(u==null?void 0:u.editMode)==="source-preserving",de=yI(O).includes("mcp_resilience"),Be=(ct=O.deployment)==null?void 0:ct.network,at=Be&&Be.mode&&Be.mode!=="public"?{mode:Be.mode,vpc_id:Be.vpcId,subnet_ids:Be.subnetIds,enable_shared_internet_access:Be.enableSharedInternetAccess}:void 0;return U0(oe.name,oe.files,{region:(u==null?void 0:u.region)??_e,projectName:"default",network:at},{...st,onStage:Le,runtimeId:u==null?void 0:u.runtimeId,runtimeName:(st==null?void 0:st.runtimeName)??A,appName:u==null?void 0:u.appName,agentCategory:"mpa",editMode:u==null?void 0:u.editMode,draft:u||de?_S(O):void 0,updateEtag:u==null?void 0:u.etag,baseRuntimeVersion:u==null?void 0:u.currentVersion,envs:Fe?_on(O,d,st==null?void 0:st.envs):st==null?void 0:st.envs,mcpSecretValues:Fe?_an(O):de?Tan(O):void 0,removeRuntimeEnvKeys:u?[...Oan(u.configuredMcpEnvKeys??[],O),...($t=O.deployment)!=null&&$t.feishuEnabled?[]:["FEISHU_APP_ID","FEISHU_APP_SECRET"]]:void 0,description:O.description,harnessSidecar:O.harnessSidecar,environment:(kn=O.cloudEnvironment)!=null&&kn.environmentId?{environmentId:O.cloudEnvironment.environmentId,environmentVersionId:O.cloudEnvironment.environmentVersionId}:void 0})},Ls=()=>{$o()&&(Se(oe=>oe.map(Le=>Le.id==="baseline"&&!Ae.current.has(Le.id)?{...Le,modelName:we.current?Le.modelName:hU(Ai),description:Ai.description,instruction:Ai.instruction}:Le)),X("validate"))},Ma=async oe=>{if(oe==="publish"){if(!await Bo())return;await Dd();return}if(oe==="validate"){Ls();return}if(oe==="optimize"){await Md();return}if(oe==="environment"){hc();return}await Bo()&&X(oe)},rn=oe=>{k(Le=>({...Le,cloudEnvironment:oe})),Yt(""),Pe(null)},$l=async oe=>{var Hn,gr,ks,zi,wr,Fd,Db,dv,fv,$h,Pf,Rr;if(xn||(et(""),Et(!1),!$o()))return;const Le=ov(A.trim());if(Le){et(Le);return}const st={...Ai,memory:{...Ai.memory,shortTerm:oe.sessionBackend!=="local"},shortTermBackend:oe.sessionBackend},Fe=fU(st,(u==null?void 0:u.editMode)==="source-preserving"),de=(Hn=st.deployment)==null?void 0:Hn.network;if((de==null?void 0:de.mode)!==void 0&&de.mode!=="public"&&!((gr=de.vpcId)!=null&&gr.trim())){et(v("traditional.deployment.vpcRequired"));return}if(cm(st,d)==="ark"&&!((zi=(ks=st.deployment)==null?void 0:ks.modelApiKeyId)!=null&&zi.trim())){et(v("traditional.deployment.apiKeyRequired"));return}const Be={...((wr=st.deployment)==null?void 0:wr.envValues)??{},...C,...Fe.fixedValues},at=Object.keys(Be).find(wl=>wl&&!/^[A-Za-z_][A-Za-z0-9_]*$/.test(wl));if(at){et(v("traditional.deployment.invalidEnvName",{key:at}));return}const ct=(Fd=st.deployment)!=null&&Fd.feishuEnabled?[...Fe.specs,...uS]:Fe.specs,$t=ssn(ct,Be,j);if($t){et(v("traditional.deployment.requiredEnv",{name:$t.comment||$t.key}));return}const kn=lU(ct,Be);if(kn){et(`${kn.spec.comment||kn.spec.key}:${kn.error}`);return}Ke(!0),qe({level:"info",phase:"prepare",message:v("traditional.deployment.generatingConfiguration"),pct:0});let Ti=null,sn="prepare",oi=v("traditional.deployment.preparing"),Vt=v("traditional.deployment.generatingConfiguration"),fi=u==null?void 0:u.runtimeId,Un=(u==null?void 0:u.region)??_e,sr;try{if(!u&&!(await ND(A.trim(),_e)).available)throw new Error(v("traditional.deployment.runtimeNameExists"));const wl=await eE(_S(st));Pe(wl);const zu=crypto.randomUUID(),pc=Date.now(),$a={id:zu,...c?{draftId:c}:{},agentName:st.name,runtimeName:A.trim(),runtimeId:u==null?void 0:u.runtimeId,region:(u==null?void 0:u.region)??_e,startedAt:pc,agentDraft:st,mpaProfile:!0,mpaSmoke:!u},Om={...$a,status:"running",phase:sn,label:oi,message:Vt,pct:0};if(Ti=Om,s==null||s(Om),m==null||m(Om),u!=null&&u.mpaProfileOnly){sn="profile_applying",oi=v("traditional.deployment.stages.applyMpaProfile"),Vt=v("traditional.deployment.applyingMpaProfile"),qe({level:"info",phase:sn,message:Vt,pct:0}),s==null||s({...$a,status:"running",phase:sn,label:oi,message:Vt,pct:0,mpaProfile:!0,mpaSmoke:!1});const Xi=u.etag?"update":"create",Fa=await eI({draft:st,taskId:zu,agentName:st.name,runtimeId:u.runtimeId,region:u.region,operationKind:Xi,mpaInstanceId:u.mpaInstanceId,runtimeName:A.trim(),sourceDraftId:c,runtimeRevision:u.etag});if(Fa.status!=="succeeded")throw Vt=Fa.safeErrorCode||v("traditional.deployment.mpaOperationIncomplete"),qe({level:"error",phase:sn,message:Vt,pct:100}),new Error(Vt);Et(!0),qe({level:"success",phase:sn,message:v("traditional.deployment.mpaProfileApplied"),pct:100}),s==null||s({...$a,status:"success",phase:"complete",label:v("traditional.deployment.complete"),message:v("traditional.deployment.mpaProfileApplied"),pct:100,mpaProfile:!0,mpaSmoke:!1}),await(h==null?void 0:h({apikey:"",url:"",agentName:st.name,runtimeName:A.trim(),runtimeId:u.runtimeId,mpaInstanceId:u.mpaInstanceId,region:u.region,version:u.currentVersion,mpaOperation:Fa}));return}const Vu=new Map(Object.entries(Be).map(([Xi,Fa])=>[Xi.trim(),Fa]).filter(([Xi,Fa])=>Xi&&Fa.trim()));for(const Xi of RK(ct,Be))Vu.set(Xi.key,Xi.value);const Df=(dv=(Db=st.deployment)==null?void 0:Db.modelApiKeyId)==null?void 0:dv.trim(),Ul=($h=(fv=st.deployment)==null?void 0:fv.modelApiKeyName)==null?void 0:$h.trim();Df&&Vu.set("MODEL_AGENT_API_KEY_ID",Df),Ul&&Vu.set("MODEL_AGENT_API_KEY_NAME",Ul);const ro=await Ll(wl,Xi=>{sn=Xi.phase,oi=Xi.phase==="build"?v("traditional.deployment.stages.build"):Xi.phase==="deploy"?v("traditional.deployment.stages.deploy"):Xi.phase==="publish"?v("traditional.deployment.stages.publish"):v("traditional.deployment.stages.running"),Vt=Xi.message,qe(Xi),s==null||s({...$a,runtimeName:Xi.runtimeName||$a.runtimeName,status:"running",phase:sn,label:oi,message:Vt,messageCode:Xi.messageCode,pct:Xi.pct,...Xi.buildLog?{buildLog:Xi.buildLog}:{}})},{taskId:zu,runtimeName:A.trim(),sessionStorage:oe.sessionStorage,minInstance:oe.minInstance,maxInstance:oe.maxInstance,authentication:oe.authentication,createEvaluationSets:oe.createEvaluationSets,resources:oe.resources,...(Pf=st.deployment)!=null&&Pf.feishuEnabled?{im:{feishu:{enabled:!0}}}:{},envs:[...Vu].map(([Xi,Fa])=>({key:Xi,value:Fa}))});let mc=ro;const yt=ro.runtimeId||(u==null?void 0:u.runtimeId)||"",Vo=ro.region||(u==null?void 0:u.region)||_e;if(fi=yt||fi,Un=Vo,yt){sn="profile_applying",oi=v("traditional.deployment.stages.applyMpaProfile"),Vt=v("traditional.deployment.applyingMpaProfile"),qe({level:"info",phase:sn,message:Vt,pct:0}),s==null||s({...$a,runtimeName:ro.runtimeName||$a.runtimeName,runtimeId:yt,region:Vo,status:"running",phase:sn,label:oi,message:Vt,pct:0,mpaProfile:!0,mpaSmoke:!u});const Xi=await eI({draft:st,taskId:zu,agentName:st.name,runtimeId:yt,region:Vo,operationKind:u?"update":"create",mpaInstanceId:(u==null?void 0:u.mpaInstanceId)??ro.mpaInstanceId,runtimeName:A.trim()||ro.runtimeName,sourceDraftId:c,runtimeRevision:u==null?void 0:u.etag});if(Xi.status!=="succeeded"){if(sn=Xi.stage==="smoke_running"?"smoke_running":"profile_applying",oi=v(sn==="smoke_running"?"traditional.deployment.stages.verifyMpaRuntime":"traditional.deployment.stages.applyMpaProfile"),Vt=Xi.safeErrorCode||v("traditional.deployment.mpaOperationIncomplete"),qe({level:"error",phase:sn,message:Vt,pct:100}),Xi.status==="failed_retryable"){const Fa={operationKind:u?"update":"create",runtimeId:yt,region:Vo,mpaInstanceId:(u==null?void 0:u.mpaInstanceId)??ro.mpaInstanceId??yt,sourceProfileId:c!=null&&c.trim()?`studio-draft:${c.trim()}`:`studio-agent:${st.name}:${zu}`,draft:st,targetKey:u?u.mpaInstanceId??yt:`runtime:${Vo}:${A.trim()||ro.runtimeName}`,runtimeRevision:u==null?void 0:u.etag};sr=async()=>{const Nn=await Nz(Xi.operationId,Fa);if(s==null||s({...$a,runtimeId:yt,mpaInstanceId:Fa.mpaInstanceId,region:Vo,status:Nn.status==="succeeded"?"success":"error",phase:Nn.stage,label:Nn.status==="succeeded"?v("traditional.deployment.complete"):v("traditional.deployment.failed"),message:Nn.safeErrorCode||void 0,pct:100,mpaProfile:!0,mpaSmoke:!u,operationId:Nn.operationId}),Nn.status!=="succeeded")throw new Error(Nn.safeErrorCode||v("traditional.deployment.mpaOperationIncomplete"));await(h==null?void 0:h({...ro,mpaOperation:Nn}))}}throw new Error(Vt)}u?(Vt=v("traditional.deployment.mpaProfileApplied"),qe({level:"success",phase:sn,message:Vt,pct:100})):(sn="smoke_running",oi=v("traditional.deployment.stages.verifyMpaRuntime"),Vt=v("traditional.deployment.runningMpaSmoke"),s==null||s({...$a,runtimeName:ro.runtimeName||$a.runtimeName,runtimeId:yt,region:Vo,status:"running",phase:sn,label:oi,message:Vt,pct:100,mpaProfile:!0,mpaSmoke:!0}),sn="runnable",oi=v("traditional.deployment.stages.mpaReady"),Vt=v("traditional.deployment.mpaReady"),qe({level:"success",phase:sn,message:Vt,pct:100})),mc={...ro,mpaOperation:Xi}}Et(!0),qe({level:"success",phase:"complete",message:v("traditional.deployment.complete"),pct:100}),s==null||s({...$a,runtimeName:mc.runtimeName||$a.runtimeName,runtimeId:mc.runtimeId||(u==null?void 0:u.runtimeId),region:mc.region||(u==null?void 0:u.region)||_e,status:"success",phase:mc.mpaOperation&&!u?"runnable":"complete",label:v("traditional.deployment.complete"),message:mc.mpaOperation&&!u?v("traditional.deployment.mpaReady"):(Rr=mc.warnings)==null?void 0:Rr.join(";"),pct:100,mpaProfile:!0,mpaSmoke:!!(mc.mpaOperation&&!u)}),await(h==null?void 0:h(mc))}catch(wl){const zu=wl instanceof Error?wl.message:String(wl);et(zu),qe(null);const pc={...Ti??{id:crypto.randomUUID(),agentName:Ai.name||v("traditional.basic.unnamedAgent"),runtimeName:A.trim(),region:_e,startedAt:Date.now()},status:"error",runtimeId:fi,region:Un,phase:sn,label:v("traditional.deployment.failed"),message:zu,mpaProfile:!0,mpaSmoke:!u,operationId:void 0,retry:sr??(()=>$l(oe))};s==null||s(pc)}finally{Ke(!1)}},Os=Qt.current,ts=oe=>aon.find(Le=>Le.id===oe),ns=a.jsx("section",{className:`cw-ai-compose${_?" is-generating":""}${F?" is-success":""}`,"aria-label":v("traditional.ai.ariaLabel"),children:a.jsx(ff,{initial:!1,mode:"wait",children:F?a.jsxs(Cr.div,{className:"cw-ai-compose-success",role:"status",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.22,ease:[.22,1,.36,1]},children:[a.jsx("span",{className:"cw-ai-success-check","aria-hidden":!0}),a.jsx("strong",{children:v("traditional.ai.success")}),a.jsx("button",{type:"button",className:"cw-ai-regenerate",onClick:()=>M(!1),children:v("traditional.ai.regenerate")})]},"success"):a.jsxs(Cr.div,{className:"cw-ai-compose-entry",initial:{opacity:0,scale:.98},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.98},transition:{duration:.2,ease:[.22,1,.36,1]},children:[a.jsxs("form",{className:"cw-ai-compose-form",onSubmit:oe=>{oe.preventDefault(),Rn()},children:[a.jsx("input",{type:"text",value:I,maxLength:8e3,disabled:_,placeholder:v("traditional.ai.placeholder",{model:ltt(d)}),"aria-invalid":!!Z,"aria-describedby":Z?"ai-requirement-error":void 0,onChange:oe=>D(oe.target.value),onKeyDown:oe=>{XT(oe.nativeEvent)||oe.key==="Enter"&&(oe.preventDefault(),Rn())}}),a.jsx("button",{type:"submit",disabled:_||!z||!!Z,"aria-label":v(_?"traditional.ai.generating":"traditional.ai.generate"),children:_?a.jsx("span",{className:"cw-ai-orb","aria-hidden":!0,children:a.jsx("span",{})}):v("traditional.ai.generate")})]}),Z&&a.jsx("p",{className:"cw-ai-requirement-error",id:"ai-requirement-error",role:"alert",children:Z})]},"compose")})});return S?a.jsx(Van,{draft:Ai,cloudProvider:d,deployRegion:_e,runtimeName:A,isRuntimeUpdate:!!u,profileOnly:u==null?void 0:u.mpaProfileOnly,deploying:xn,deployStage:St,deployError:nt,deploySucceeded:ft,showErrors:ie,onBack:e,onDraftPatch:oe=>{k(Le=>({...Le,...oe})),Pe(null),Yt("")},onDeploymentPatch:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},...oe}})),onModelApiKeyChange:na,customModelApiKey:Di?C[Di.key]??"":"",customModelSecretValues:C,customModelApiKeyConfigured:Ms,configuredRuntimeEnvKeys:j,showModelFallbacks:ml,onCustomModelApiKeyChange:oe=>{Di&&P(Di.key,oe)},onCustomModelSecretChange:P,onSelectedSkillsChange:oe=>k(Le=>({...Le,selectedSkills:oe})),onCloudEnvironmentChange:rn,onDeployRegionChange:ae,onRuntimeNameChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},runtimeName:oe,runtimeNameCustomized:!0}})),onNetworkChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},network:oe}})),onDeploy:oe=>void $l(oe)}):a.jsxs("div",{className:`cw-root is-${Y}`,children:[a.jsx(Pon,{mode:Y}),Nt&&a.jsx(xb,{className:"cw-workspace-alert",message:Nt}),a.jsxs("main",{className:"cw-workspace-main",id:"cw-workspace-main",children:[Y==="build"&&a.jsx("div",{className:"cw-build-workspace",children:a.jsxs("div",{className:"cw-editor",children:[a.jsx(IP,{draft:O,direction:"horizontal",selectedPath:cn,onSelect:Xe,onAdd:di,onInsert:rt,onDelete:Qe}),a.jsx("div",{className:"cw-detail",children:a.jsx("div",{className:"cw-detail-scroll",ref:wt,children:a.jsx("div",{className:"cw-detail-inner",children:a.jsx("div",{className:"cw-lower",children:a.jsxs("div",{className:"cw-form-col",children:[a.jsxs(Os,{meta:ts("type"),children:[a.jsx(By,{className:"cw-agent-type-options","aria-label":v("traditional.agentTypes.ariaLabel"),value:Me.agentType??"llm",onChange:ki,children:uan.map(oe=>{const Le=(Me.agentType??"llm")===oe.id,st=on&&oe.id==="a2a",Fe=st?"cw-remote-agent-disabled-hint":void 0;return a.jsxs("div",{"data-agent-type":oe.id,className:`cw-agent-type-option ${Le?"is-on":""} ${st?"is-disabled":""}`,tabIndex:st?0:void 0,"aria-describedby":Fe,children:[a.jsx(By.Item,{value:oe.id,disabled:st,block:!0,className:"cw-agent-type-control",children:a.jsx("span",{className:"cw-agent-type-copy",children:a.jsx("strong",{children:v(lon[oe.id])})})}),st&&a.jsx("span",{id:Fe,className:"cw-agent-type-disabled-hint",role:"tooltip",children:v("traditional.agentTypes.remoteChildOnly")})]},oe.id)})}),ie&&ti&&Me.subAgents.length===0&&a.jsx("span",{className:"cw-error-text",children:Son({name:Me.name.trim(),agentType:Me.agentType},v)})]}),a.jsx(Os,{meta:ts("basic"),children:a.jsxs("div",{className:"cw-form",children:[!Si&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"cw-field",children:[a.jsxs("label",{className:"cw-label",children:[v(on?"traditional.basic.agentName":"traditional.basic.name"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx("input",{className:`cw-input ${no(he,pr)}`,"data-validation-field":"name",value:Me.name,placeholder:"assistant","aria-invalid":pr&&he,"aria-describedby":pr&&us?"cw-agent-name-error":void 0,onBlur:Sn,onChange:oe=>{Sn(),un({name:oe.target.value})}}),pr&&us?a.jsx("span",{id:"cw-agent-name-error",role:"alert",className:"cw-error-text",children:us}):a.jsx("span",{className:"cw-help",children:v("traditional.basic.nameHelp")})]}),a.jsxs("div",{className:"cw-field",children:[a.jsxs("label",{className:"cw-label",children:[v(on?"common.description":"traditional.basic.agentDescription"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx("textarea",{className:`cw-textarea cw-textarea-sm ${no(bo)}`,"data-validation-field":"description",value:Me.description,placeholder:v("traditional.basic.descriptionPlaceholder"),"aria-invalid":ie&&bo,"aria-describedby":ie&&bo?"cw-agent-description-error":void 0,onChange:oe=>un({description:oe.target.value})}),ie&&bo?a.jsx("span",{id:"cw-agent-description-error",role:"alert",className:"cw-error-text",children:v("traditional.validation.missingDescription")}):a.jsx("span",{className:"cw-help",children:v(on?"traditional.basic.rootDescriptionHelp":"traditional.basic.descriptionHelp")})]})]}),ti?a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"cw-section-desc cw-dependency-hint",children:v("traditional.basic.orchestratorHelp")}),Me.agentType==="loop"&&a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.basic.maxIterations")}),a.jsx("input",{className:"cw-input",type:"number",min:1,value:Me.maxIterations??3,onChange:oe=>un({maxIterations:Math.max(1,Number(oe.target.value)||1)})}),a.jsx("span",{className:"cw-help",children:v("traditional.basic.maxIterationsHelp")})]})]}):Si?a.jsxs("div",{className:"cw-field cw-remote-center-fields","data-validation-field":"a2a-registry",children:[a.jsxs("div",{className:"cw-remote-center-head",children:[a.jsxs("div",{className:"cw-label",children:[v("traditional.basic.agentCenter"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx("p",{className:"cw-help cw-remote-center-description",children:v("traditional.basic.agentCenterHelp")})]}),a.jsx(pon,{value:((Re=Me.a2aRegistry)==null?void 0:Re.registrySpaceId)??"",region:((lt=Me.a2aRegistry)==null?void 0:lt.registryRegion)||Zr.region,invalid:ie&&fl,onChange:oe=>Bn(sUe,oe)}),a.jsxs("button",{type:"button",className:"cw-more-options","aria-expanded":At,"aria-controls":Qi,onClick:()=>It(oe=>!oe),children:[a.jsx("span",{children:v("traditional.basic.moreOptions")}),a.jsx(HA,{className:`cw-more-options-chevron ${At?"is-open":""}`,"aria-hidden":!0})]}),a.jsx(ff,{initial:!1,children:At&&a.jsx(Cr.div,{id:Qi,className:"cw-model-advanced",initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.18,ease:"easeOut"},children:a.jsx(zk,{env:mx(con,d),values:aUe(Me.a2aRegistry,{includeDefaults:!1},d),onChange:Bn})})}),ie&&fl&&a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.validation.missingRegistry")})]}):a.jsxs("div",{className:"cw-field","data-validation-field":"instruction",children:[a.jsxs("label",{className:"cw-label",children:[v("traditional.basic.systemPrompt"),a.jsx("span",{className:"cw-req",children:"*"})]}),a.jsx(p.Suspense,{fallback:a.jsx("div",{className:"cw-markdown-loading",role:"status",children:v("traditional.basic.loadingMarkdown")}),children:a.jsx(ion,{value:Me.instruction,invalid:to,onChange:oe=>un({instruction:oe})})}),ie&&to?a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.validation.missingPrompt")}):a.jsx("span",{className:"cw-help",children:v("traditional.basic.markdownHelp")})]})]})}),!ti&&!Si&&a.jsxs(a.Fragment,{children:[a.jsx(Os,{meta:ts("model"),children:a.jsxs("div",{className:"cw-form",children:[a.jsxs("div",{className:"cw-field cw-model-source-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.model.source")}),a.jsx(By,{className:"cw-model-source-options","aria-label":v("traditional.model.source"),value:Jr,onChange:oe=>{oe!=="gateway"&&ga(oe)},children:[{value:"ark",label:v(d==="byteplus"?"traditional.model.bytePlusModelArk":"traditional.model.volcanoArk")},{value:"custom",label:v("traditional.model.custom")},{value:"gateway",label:v("traditional.model.gateway"),disabled:!0}].map(oe=>a.jsx("div",{className:`cw-model-source-option ${Jr===oe.value?"is-on":""}${oe.disabled?" is-disabled":""}`,children:a.jsxs(By.Item,{value:oe.value,disabled:oe.disabled,block:!0,className:"cw-model-source-control",children:[a.jsx("span",{children:oe.label}),oe.disabled&&a.jsx("span",{className:"cw-model-source-coming-soon",children:v("traditional.model.comingSoon")})]})},oe.value))})]}),Jr==="ark"?a.jsxs("div",{className:"cw-field","data-validation-field":"model-api-key",children:[a.jsx("label",{className:"cw-label",children:v("traditional.model.configuration")}),a.jsx(hon,{value:Me.modelName??"",fallbacks:Me.modelFallbacks??[],cloudProvider:d,agentName:Me.name,apiKeyId:(Lt=O.deployment)==null?void 0:Lt.modelApiKeyId,apiKeyName:(Ln=O.deployment)==null?void 0:Ln.modelApiKeyName,customModelSecretValues:C,configuredRuntimeEnvKeys:j,showFallbacks:ml,showMissingApiKeyErrors:ie,onApiKeyChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},modelApiKeyId:oe.id,modelApiKeyName:oe.name}})),onChange:oe=>un({modelName:oe,modelFallbacks:Ru(oe,Me.modelFallbacks)}),onFallbacksChange:oe=>un({modelFallbacks:oe}),onCustomModelSecretChange:P}),ie&&ds?a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.deployment.apiKeyRequired")}):null]}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.model.name")}),a.jsx("input",{className:"cw-input",value:Me.modelName??"",onChange:oe=>un({modelName:oe.target.value,modelFallbacks:Ru(oe.target.value,Me.modelFallbacks)})})]}),a.jsxs("div",{className:"cw-field",children:[a.jsxs("label",{className:"cw-label cw-label-with-link",children:[a.jsx("span",{children:v("traditional.model.provider")}),a.jsxs("a",{href:"https://docs.litellm.ai/docs/providers",target:"_blank",rel:"noopener noreferrer",onClick:oe=>oe.stopPropagation(),children:[v("traditional.model.liteLlmProviders"),a.jsx(p0,{"aria-hidden":"true"})]})]}),a.jsx("input",{className:"cw-input",value:Me.modelProvider??"",placeholder:"openai",onChange:oe=>un({modelProvider:oe.target.value})})]}),a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:"API Base"}),a.jsx("input",{className:"cw-input",type:"url",inputMode:"url",value:Me.modelApiBase??"",placeholder:Po(d),"aria-invalid":gl,onChange:oe=>un({modelApiBase:oe.target.value})}),gl?a.jsx("span",{className:"cw-env-error",children:v("traditional.model.invalidApiBase")}):null]}),a.jsxs("div",{className:"cw-field","data-validation-field":"model-api-key",children:[a.jsx("label",{className:"cw-label",children:"API Key"}),a.jsx("input",{className:`cw-input ${no(zr)}`,type:"password",value:Di?C[Di.key]??"":"",placeholder:Ms&&!(Di&&C[Di.key])?"••••••":v("traditional.model.apiKeyPlaceholder"),autoComplete:"new-password",onChange:oe=>{if(!Di)return;const Le=oe.currentTarget.value;P(Di.key,Le)}}),ie&&zr?a.jsx("span",{className:"cw-error-text",role:"alert",children:v("traditional.deployment.apiKeyRequired")}):null]})]}),Jr==="custom"&&ml&&a.jsx(BP,{variant:"traditional",primaryModelName:Me.modelName??"",agentName:Me.name,value:Me.modelFallbacks??[],secretValues:C,configuredSecretEnvKeys:j,showMissingApiKeyErrors:ie,onChange:oe=>un({modelFallbacks:oe}),onSecretChange:P})]})}),a.jsx(Os,{meta:ts("tools"),children:a.jsxs("div",{className:"cw-form",children:[a.jsxs("div",{className:"cw-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.tools.builtIn")}),a.jsx("span",{className:"cw-help",children:v("traditional.tools.builtInHelp")}),a.jsx("div",{className:"cw-tools-list-shell",children:a.jsx(uon,{items:Ht,selected:bt,onToggle:Dr,scrollRows:6})}),a.jsx(ff,{initial:!1,children:bt.includes("run_code")&&a.jsxs(Cr.div,{className:"cw-tool-config",initial:{opacity:0,y:-4},animate:{opacity:1,y:0},exit:{opacity:0,y:-4},transition:{duration:.16,ease:"easeOut"},children:[a.jsxs("div",{className:"cw-tool-config-head",children:[a.jsx("span",{className:"cw-label",children:v("traditional.tools.codeExecution")}),a.jsx("span",{className:"cw-help",children:v("traditional.tools.codeExecutionHelp")})]}),a.jsx(zk,{env:((wn=rT.find(oe=>oe.id==="run_code"))==null?void 0:wn.env)??[],values:((pn=O.deployment)==null?void 0:pn.envValues)??{},onChange:Mn})]})})]}),a.jsxs("div",{className:"cw-field cw-mcp-field",children:[a.jsx("label",{className:"cw-label",children:v("traditional.tools.mcp")}),a.jsx(yon,{tools:jr,conflict:Hs,showConflict:ie,onChange:oe=>un({mcpTools:oe})})]})]})}),a.jsx(Os,{meta:ts("skills"),children:a.jsx("div",{className:"cw-form",children:a.jsx(yK,{selected:qs,onChange:oe=>un({selectedSkills:oe}),cloudProvider:d})})}),a.jsx(Os,{meta:ts("knowledge"),children:a.jsxs("div",{className:"cw-form cw-toggle-stack",children:[a.jsx(Nj,{checked:Me.knowledgebase,onChange:oe=>un({knowledgebase:oe}),title:v("traditional.knowledge.title"),desc:v("traditional.knowledge.description"),icon:bN}),Me.knowledgebase&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.knowledge.backend")}),a.jsx($6,{options:jB,value:Me.knowledgebaseBackend,translationGroup:"knowledge",onChange:oe=>un({knowledgebaseBackend:oe,knowledgebaseIndex:oe==="viking"||oe==="openviking"?Me.knowledgebaseIndex:""})}),(Me.knowledgebaseBackend??Dg)==="viking"&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.knowledge.vikingDatabase")}),a.jsx(mon,{value:Me.knowledgebaseIndex??"",onChange:oe=>{un({knowledgebaseIndex:oe.id}),oe.projectName&&Mn("DATABASE_VIKING_PROJECT",oe.projectName),oe.region&&Mn("DATABASE_VIKING_REGION",oe.region),oe.sourceKind&&Mn("DATABASE_VIKING_COLLECTION_KIND",oe.sourceKind),Mn("DATABASE_VIKING_RESOURCE_ID",oe.resourceId??"")}})]}),a.jsx(zk,{env:((jn=jB.find(oe=>oe.id===(Me.knowledgebaseBackend??Dg)))==null?void 0:jn.env)??[],values:((Wt=O.deployment)==null?void 0:Wt.envValues)??{},onChange:Mn,renderAfterField:(Me.knowledgebaseBackend??Dg)==="openviking"?oe=>oe.key==="DATABASE_OPENVIKING_USER_ID"?a.jsx(fon,{value:Me.knowledgebaseIndex??"",onChange:Le=>un({knowledgebaseIndex:Le})}):null:void 0})]})]})}),on&&a.jsx(Os,{meta:ts("memory"),children:a.jsxs("div",{className:"cw-form cw-toggle-stack",children:[a.jsx(Nj,{checked:Me.memory.shortTerm,onChange:oe=>un({memory:{...Me.memory,shortTerm:oe}}),title:v("traditional.memory.shortTerm"),desc:v("traditional.memory.shortTermDescription"),showDescription:!0,icon:Fje}),Me.memory.shortTerm&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.memory.shortTermBackend")}),a.jsx($6,{options:uw,value:Me.shortTermBackend,translationGroup:"shortTerm",onChange:oe=>un({shortTermBackend:oe})}),a.jsx(zk,{env:((gn=uw.find(oe=>oe.id===(Me.shortTermBackend??"local")))==null?void 0:gn.env)??[],values:(($n=O.deployment)==null?void 0:$n.envValues)??{},onChange:Mn})]}),a.jsx(Nj,{checked:Me.memory.longTerm,onChange:oe=>un({memory:{...Me.memory,longTerm:oe}}),title:v("traditional.memory.longTerm"),desc:v("traditional.memory.longTermDescription"),showDescription:!0,icon:bN}),Me.memory.longTerm&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.memory.longTermBackend")}),a.jsx($6,{options:_B,value:Me.longTermBackend,translationGroup:"longTerm",onChange:oe=>un({longTermBackend:oe,longTermMemoryIndex:oe==="viking"?Me.longTermMemoryIndex:""})}),(Me.longTermBackend??"local")==="viking"&&a.jsxs("div",{className:"cw-field cw-subfield",children:[a.jsx("label",{className:"cw-label",children:v("traditional.memory.vikingDatabase")}),a.jsx(gon,{value:Me.longTermMemoryIndex??"",onChange:oe=>{un({longTermMemoryIndex:oe.id}),Mn("DATABASE_VIKINGMEM_PROJECT",oe.projectName),Mn("DATABASE_VIKING_REGION",oe.region),Mn("DATABASE_VIKINGMEM_MEMORY_TYPE",(oe.memoryTypes??[]).join(","))}})]}),a.jsx(zk,{env:((ai=_B.find(oe=>oe.id===(Me.longTermBackend??"local")))==null?void 0:ai.env)??[],values:((is=O.deployment)==null?void 0:is.envValues)??{},onChange:Mn}),a.jsx(Nj,{checked:!!Me.autoSaveSession,onChange:oe=>un({autoSaveSession:oe}),title:v("traditional.memory.autoSave"),desc:v("traditional.memory.autoSaveDescription"),icon:bN})]})]})})]})]})})})})})]})}),Y==="validate"&&a.jsx("div",{className:"cw-validation-workspace",children:a.jsx("div",{className:"cw-validation-content",children:a.jsx(Non,{enabled:le,disabledReason:ge,variants:Oe,draftSnapshot:pl,input:jt,onInput:Pt,onSend:Ld,onStartVariant:yo,onUseVariant:oe=>void hc(oe),onAddVariant:vl,onRemoveVariant:Ml,onToggleConfig:oe=>{const Le=Oe.find(st=>st.id===oe);Le&&Da(oe,{configOpen:!Le.configOpen})},onCompleteConfig:xl,onConfigChange:Qu,onOpenTrace:Fo})})}),Y==="optimize"&&a.jsx(Ron,{profile:rr,optimizations:Ds,unavailableMessage:hl,onProfileChange:Qo,onOptimizationChange:Uo}),Y==="environment"&&a.jsx("div",{className:"cw-environment-workspace",children:a.jsx(nUe,{value:O.cloudEnvironment??{environmentId:"",environmentVersionId:""},onChange:rn,disabled:Ee})}),Y==="publish"&&a.jsx("div",{className:"cw-preview-body",children:je?a.jsx(YT,{embedded:!0,cloudProvider:d,project:je,agentDraft:O,agentName:O.name||v("traditional.basic.unnamedAgent"),agentCount:uUe(O),releaseConfiguration:mr?{modelName:mr.modelName||O.modelName||v("traditional.debug.defaultModel"),description:mr.description,instruction:mr.instruction,optimizations:[v("traditional.optimization.releaseScenario",{profile:v(`traditional.optimization.profiles.${rr}.label`)}),...Ds.map(oe=>v(`traditional.optimization.options.${oe}.label`))]}:void 0,onChange:Pe,onDeploy:Ll,onAgentAdded:n,onDeploymentTaskChange:s,deploymentActionLabel:v(u?"traditional.deployment.updateAndPublish":"common.deploy"),deploymentActionTargetId:"cw-publish-primary-action",deploymentRuntimeId:u==null?void 0:u.runtimeId,deploymentMpaInstanceId:u==null?void 0:u.mpaInstanceId,deploymentRuntimeName:A,deploymentRuntimeRevision:u==null?void 0:u.etag,deploymentRuntimeNameCustomized:!!u||!!((re=O.deployment)!=null&&re.runtimeNameCustomized),onDeploymentRuntimeNameChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},runtimeName:oe,runtimeNameCustomized:!0}})),onDeploymentStarted:m,onDeploymentComplete:h,feishuEnabled:!!((Vn=O.deployment)!=null&&Vn.feishuEnabled),configuredRuntimeEnvKeys:u==null?void 0:u.configuredRuntimeEnvKeys,onFeishuEnabledChange:async oe=>{const Le={...O,deployment:{...O.deployment??{feishuEnabled:!1},feishuEnabled:oe}},st=await eE(_S(Le));k(Le),Pe(st)},deploymentEnv:Mr.specs,requiredSecretEnv:Mo,requiredSecretEnvValues:C,onRequiredSecretEnvChange:P,deploymentEnvValues:{...(bi=Ai.deployment)==null?void 0:bi.envValues,...C,...Mr.fixedValues},onDeploymentEnvChange:Mn,onFeishuCredentialsChange:(oe,Le)=>lr({FEISHU_APP_ID:oe,FEISHU_APP_SECRET:Le}),network:(La=O.deployment)==null?void 0:La.network,onNetworkChange:oe=>k(Le=>({...Le,deployment:{...Le.deployment??{feishuEnabled:!1},network:oe}})),deployRegion:_e,onDeployRegionChange:ae,deploymentTelemetry:{source:"scratch",createMode:o,aiAssisted:V},onExportYaml:()=>son(`${Ai.name||"agent"}.yaml`,Nan(Ai,{heading:v("yaml.heading"),importHint:v("yaml.importHint")}),"text/yaml")}):a.jsxs("div",{className:"cw-publish-loading",role:"status",children:[a.jsx(Fi,{className:"cw-i cw-spin"}),a.jsx("strong",{children:v("traditional.publish.generating")}),a.jsx("span",{children:v("traditional.publish.validating")})]})})]}),a.jsx(Don,{mode:Y,busy:Ee,nextDisabled:Y==="build"&&ba&&ie,onChange:Ma,assistant:Y==="build"?ns:void 0}),Kt&&a.jsx(iUe,{testRunId:Kt.runId,sessionId:Kt.sessionId,title:v("traditional.debug.traceTitle",{name:Kt.variantName}),onClose:()=>Ct(null)}),xt&&a.jsx(Cd,{variant:"warning",title:v("traditional.debug.leaveTitle"),description:v("traditional.debug.leaveDescription"),confirmLabel:v(mt?"traditional.debug.cleaning":"traditional.debug.confirmLeave"),closeLabel:v("traditional.debug.closeLeaveConfirmation"),busy:mt,onCancel:yl,onConfirm:()=>void Uu()}),U&&a.jsx("div",{className:"confirm-scrim",onClick:()=>J(null),children:a.jsxs("div",{className:"confirm-box cw-ai-error-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":"ai-generate-error-title","aria-describedby":"ai-generate-error-message",onClick:oe=>oe.stopPropagation(),children:[a.jsx("div",{className:"confirm-title",id:"ai-generate-error-title",children:v("traditional.ai.failed")}),a.jsx("div",{className:"cw-ai-error-message",id:"ai-generate-error-message",children:U}),a.jsx("div",{className:"confirm-actions",children:a.jsx("button",{type:"button",className:"confirm-btn cw-ai-error-close",onClick:()=>J(null),children:v("common.close")})})]})})]})}const Lon=p.lazy(()=>Zs(()=>import("../chunks/QuickAgentCreateDialog-BJaDUd6y.js"),__vite__mapDeps([4,5])));function Kd({name:e}){const t={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};switch(e){case"branch":return a.jsxs("svg",{...t,children:[a.jsx("circle",{cx:"6",cy:"5",r:"2"}),a.jsx("circle",{cx:"18",cy:"7",r:"2"}),a.jsx("circle",{cx:"18",cy:"17",r:"2"}),a.jsx("path",{d:"M8 5h2.5A3.5 3.5 0 0 1 14 8.5v7A1.5 1.5 0 0 0 15.5 17H16"}),a.jsx("path",{d:"M14 10.5v-2A1.5 1.5 0 0 1 15.5 7H16"})]});case"plan":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M6.5 3.5h11a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2h-11a2 2 0 0 1-2-2v-13a2 2 0 0 1 2-2Z"}),a.jsx("path",{d:"m8 9 1.4 1.4L12 7.8M13.5 10H16M8 15l1.4 1.4 2.6-2.6M13.5 16H16"})]});case"collaborate":return a.jsxs("svg",{...t,children:[a.jsx("circle",{cx:"8",cy:"8",r:"3"}),a.jsx("circle",{cx:"17",cy:"9",r:"2.5"}),a.jsx("path",{d:"M3.5 19a4.5 4.5 0 0 1 9 0M13.5 15.5A4 4 0 0 1 20.5 18"})]});case"summary":return a.jsx("svg",{...t,children:a.jsx("path",{d:"M5 4h14v16H5zM8 8h8M8 12h8M8 16h5"})});case"skills":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M5 5h5v5H5zM14 5h5v5h-5zM5 14h5v5H5z"}),a.jsx("path",{d:"M14 16.5h5M16.5 14v5"})]});case"trace":return a.jsxs("svg",{...t,children:[a.jsx("circle",{cx:"6",cy:"6",r:"2"}),a.jsx("circle",{cx:"18",cy:"12",r:"2"}),a.jsx("circle",{cx:"8",cy:"18",r:"2"}),a.jsx("path",{d:"M8 6h3a3 3 0 0 1 3 3v0a3 3 0 0 0 2 2.83M16.2 13.2 9.8 16.8"})]});case"structure":return a.jsxs("svg",{...t,children:[a.jsx("rect",{x:"3.5",y:"4",width:"7",height:"5",rx:"1"}),a.jsx("rect",{x:"13.5",y:"15",width:"7",height:"5",rx:"1"}),a.jsx("path",{d:"M10.5 6.5h3A3.5 3.5 0 0 1 17 10v5M7 9v7a2 2 0 0 0 2 2h4.5"})]});case"model":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M8 3.5v3M16 3.5v3M8 17.5v3M16 17.5v3M3.5 8h3M17.5 8h3M3.5 16h3M17.5 16h3"}),a.jsx("rect",{x:"6.5",y:"6.5",width:"11",height:"11",rx:"2"}),a.jsx("path",{d:"M10 10h4v4h-4z"})]});case"environment":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M4 7.5h16M7 4h10l3 3.5v10L17 20H7l-3-2.5v-10Z"}),a.jsx("path",{d:"m8 12 2 2-2 2M12.5 16H16"})]});case"deploy":return a.jsxs("svg",{...t,children:[a.jsx("path",{d:"M12 3.5v11M7.5 8 12 3.5 16.5 8"}),a.jsx("path",{d:"M5 13.5v5A1.5 1.5 0 0 0 6.5 20h11a1.5 1.5 0 0 0 1.5-1.5v-5"})]});case"workflow":return a.jsxs("svg",{...t,children:[a.jsx("rect",{x:"4",y:"4",width:"6",height:"5",rx:"1"}),a.jsx("rect",{x:"14",y:"15",width:"6",height:"5",rx:"1"}),a.jsx("path",{d:"M10 6.5h2a4 4 0 0 1 4 4V15M7 9v3a4 4 0 0 0 4 4h3"})]})}}function $on({onSelectVulcan:e,onSelectDeepseek:t,onSelectTraditional:n}){const{t:i}=Te("create"),r=SD(),[s,o]=p.useState(!1),[l,c]=p.useState(!1),[u,d]=p.useState(!1),f=p.useRef(null),h=g=>{if(!s){if(r){g();return}f.current=g,o(!0)}},m=()=>{if(!s)return;const g=f.current;f.current=null,g==null||g()};return a.jsxs(Cr.main,{className:`agent-creation-mode-picker${s?" is-leaving":""}`,initial:r?!1:{opacity:0},animate:{opacity:s?0:1},transition:{duration:s?.12:.18,ease:[.16,1,.3,1]},onAnimationComplete:m,children:[a.jsxs("section",{className:"agent-creation-mode-picker__content","aria-labelledby":"agent-creation-mode-picker-title",children:[a.jsxs("header",{className:"agent-creation-mode-picker__header",children:[a.jsx("h1",{id:"agent-creation-mode-picker-title",children:i("modePicker.title")}),a.jsx("p",{children:i("modePicker.subtitle")})]}),a.jsxs("div",{className:"agent-creation-mode-picker__options",children:[a.jsxs(_t,{type:"button",className:"agent-creation-mode-picker__card",color:"secondary",variant:"outline",pill:!1,block:!0,onClick:()=>{d(!0),c(!0)},children:[a.jsxs("span",{className:"agent-creation-mode-picker__card-header",children:[a.jsx(t1,{className:"agent-creation-mode-picker__avatar is-vulcan",seed:i("modePicker.quick.title")}),a.jsxs("span",{className:"agent-creation-mode-picker__card-copy",children:[a.jsx("span",{className:"agent-creation-mode-picker__card-title",children:i("modePicker.quick.title")}),a.jsx("span",{className:"agent-creation-mode-picker__card-description",children:i("modePicker.quick.description")})]})]}),a.jsx("span",{className:"agent-creation-mode-picker__divider","aria-hidden":"true"}),a.jsxs("span",{className:"agent-creation-mode-picker__features",children:[a.jsx("span",{children:i("modePicker.features")}),a.jsxs("span",{className:"agent-creation-mode-picker__feature-grid",children:[a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"branch"})}),a.jsx("span",{children:i("modePicker.quick.features.dynamicSubagents")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"plan"})}),a.jsx("span",{children:i("modePicker.quick.features.autonomousPlanning")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"collaborate"})}),a.jsx("span",{children:i("modePicker.quick.features.collaboration")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"summary"})}),a.jsx("span",{children:i("modePicker.quick.features.summary")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"skills"})}),a.jsx("span",{children:i("modePicker.quick.features.skills")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"trace"})}),a.jsx("span",{children:i("modePicker.quick.features.trace")})]})]})]})]}),a.jsxs(_t,{type:"button",className:"agent-creation-mode-picker__card",color:"secondary",variant:"outline",pill:!1,block:!0,onClick:()=>h(n),children:[a.jsxs("span",{className:"agent-creation-mode-picker__card-header",children:[a.jsx(t1,{className:"agent-creation-mode-picker__avatar is-traditional",seed:i("modePicker.traditional.title")}),a.jsxs("span",{className:"agent-creation-mode-picker__card-copy",children:[a.jsx("span",{className:"agent-creation-mode-picker__card-title",children:i("modePicker.traditional.title")}),a.jsx("span",{className:"agent-creation-mode-picker__card-description",children:i("modePicker.traditional.description")})]})]}),a.jsx("span",{className:"agent-creation-mode-picker__divider","aria-hidden":"true"}),a.jsxs("span",{className:"agent-creation-mode-picker__features",children:[a.jsx("span",{children:i("modePicker.features")}),a.jsxs("span",{className:"agent-creation-mode-picker__feature-grid",children:[a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"structure"})}),a.jsx("span",{children:i("modePicker.traditional.features.visualConfig")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"model"})}),a.jsx("span",{children:i("modePicker.traditional.features.migration")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"environment"})}),a.jsx("span",{children:i("modePicker.traditional.features.debugging")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"deploy"})}),a.jsx("span",{children:i("modePicker.traditional.features.optimization")})]}),a.jsxs("span",{className:"agent-creation-mode-picker__feature",children:[a.jsx("span",{className:"agent-creation-mode-picker__feature-icon",children:a.jsx(Kd,{name:"workflow"})}),a.jsx("span",{children:i("modePicker.traditional.features.parameters")})]})]})]})]})]})]}),u&&a.jsx(p.Suspense,{fallback:null,children:a.jsx(Lon,{open:l,onClose:()=>c(!1),onSelect:g=>{c(!1),h(g==="deepseek"?t:e)}})})]})}const Pj="\0custom";function hUe({label:e,value:t,options:n,onChange:i,allowCustom:r=!1,allowEmpty:s=!0,disabled:o=!1,placeholder:l,error:c,describedBy:u}){const{t:d}=Te("deepseek"),f=p.useId(),[h,m]=p.useState(!1),g=r&&(h||!!(t&&!n.includes(t)));return a.jsxs("div",{className:"dsh-native-choice",children:[a.jsx(vf,{ariaLabel:e,value:g?Pj:t,valueLabel:t,placeholder:l??d("optional"),disabled:o,options:[...s?[{value:"",label:d("optional")}]:[],...n.map(b=>({value:b,label:b})),...r?[{value:Pj,label:d("customValue")}]:[]],onChange:b=>{m(b===Pj),b!==Pj&&i(b)}}),g&&a.jsxs("div",{className:"dsh-custom-value",children:[a.jsx("label",{className:"cw-label",htmlFor:f,children:d("customField",{field:e})}),a.jsx("input",{id:f,className:"cw-input",value:t,autoComplete:"off",spellCheck:!1,placeholder:d("enterCustomValue"),"aria-invalid":!!c,"aria-describedby":u,onChange:b=>i(b.target.value)})]})]})}const Fon=String.raw`import { createServer } from 'node:http'; import { randomUUID } from 'node:crypto'; export const name = 'agentkit-runtime'; @@ -1381,7 +1381,7 @@ Source: ${mUe}/docs/config-catalog.md `).filter(Boolean),L=RUe.map(z=>({id:z,label:Y6(z,t,!0)})),F=L.findIndex(z=>z.id===i.progressStage),M=s==="submitting"&&i.progressStage!=="idle"&&F<0,V=async z=>{try{await navigator.clipboard.writeText(z.join(` `)),w("copied")}catch{w("error")}},q=()=>{var z;v(!1),w("idle"),d(""),h(null),g(S.current||((z=A[0])==null?void 0:z.version)||""),o("confirm")};return a.jsxs(a.Fragment,{children:[a.jsxs("button",{type:"button",className:e==="feature-link"?"welcome-feature-link studio-update-trigger--feature":`studio-update-trigger is-${s}`,title:s==="checking-permissions"?t("studioUpdate.checkingPermissions"):s==="permission"?t("studioUpdate.authorizationRequired"):s==="submitting"?t("studioUpdate.updating"):s==="published"?t("studioUpdate.updated"):t("studioUpdate.updateToVersion",{version:i.latestVersion}),onClick:()=>{var z;s==="published"?window.location.reload():(s==="checking-permissions"||s==="permission"||s==="submitting"||s==="error"||(g(((z=A[0])==null?void 0:z.version)||i.latestVersion),o("confirm")),c(!0))},children:[e!=="feature-link"&&a.jsx(zce,{className:"studio-update-icon"}),s==="checking-permissions"?a.jsx(fn,{as:"span",children:t("studioUpdate.checkPermissions")}):s==="permission"?a.jsx("span",{children:t("studioUpdate.authorizationNeeded")}):s==="submitting"?a.jsx(fn,{as:"span",children:t("studioUpdate.updatingShort")}):s==="published"?a.jsx("span",{children:t("studioUpdate.refreshForNewVersion")}):s==="error"?a.jsx("span",{children:t("studioUpdate.updateFailed")}):e==="feature-link"?a.jsx("span",{children:t("studioUpdate.updateNow")}):a.jsx("span",{children:t("studioUpdate.newVersionAvailable")})]}),l&&s!=="idle"&&yi.createPortal(a.jsx("div",{className:"confirm-scrim",role:"presentation",children:a.jsxs("section",{className:`confirm-box studio-update-dialog${s==="submitting"||s==="published"||s==="error"?" is-progress":""}`,role:"dialog","aria-modal":"true","aria-labelledby":"studio-update-title",children:[a.jsx("div",{className:"studio-update-dialog-mark",children:a.jsx(zce,{})}),a.jsx("div",{id:"studio-update-title",className:"confirm-title",children:t(s==="error"?"studioUpdate.dialog.failed":s==="checking-permissions"?"studioUpdate.dialog.checkingPermissions":s==="permission"?"studioUpdate.dialog.authorizationRequired":s==="submitting"?"studioUpdate.dialog.updating":s==="published"?"studioUpdate.dialog.completed":"studioUpdate.dialog.newVersion")}),s==="checking-permissions"?a.jsxs("div",{className:"studio-update-permission-checking",role:"status",children:[a.jsx(fn,{as:"p",children:t("studioUpdate.permissionCheck")}),a.jsx("p",{children:t("studioUpdate.permissionCheckHint")})]}):s==="permission"&&f?a.jsxs("div",{className:"studio-update-authorization-panel",children:[a.jsx("p",{className:"confirm-text",children:t("studioUpdate.missingPermissionCount",{count:f.missingActions.length})}),a.jsxs("dl",{className:"studio-update-authorization-principal",children:[a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.functionRole")}),a.jsx("dd",{children:f.principalName||t("studioUpdate.currentRole")})]}),f.policyName&&a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.policyToUpdate")}),a.jsx("dd",{children:f.policyName})]})]}),a.jsxs("ol",{className:"studio-update-authorization-steps",children:[a.jsx("li",{children:t("studioUpdate.authorizationSteps.open")}),a.jsx("li",{children:t("studioUpdate.authorizationSteps.debug")}),a.jsx("li",{children:t("studioUpdate.authorizationSteps.return")})]}),a.jsxs("div",{className:"studio-update-missing-actions",children:[a.jsx("span",{children:t("studioUpdate.missingPermissions")}),a.jsx("ul",{children:f.missingActions.map(z=>a.jsx("li",{children:a.jsx("code",{children:z})},z))})]}),a.jsxs("a",{className:"studio-update-authorization-link",href:f.authorizationUrl||f.iamConsoleUrl,target:"_blank",rel:"noreferrer",children:[f.authorizationUrl?t("studioUpdate.openPrefilledAuthorization"):t("studioUpdate.openIamManually"),a.jsx(kU,{})]}),!f.authorizationUrl&&a.jsx("p",{className:"studio-update-authorization-note",children:t("studioUpdate.noSafePolicy")})]}):s==="error"?a.jsxs("div",{className:"studio-update-error-panel",children:[a.jsx("p",{className:"confirm-text studio-update-error",children:u}),a.jsxs("dl",{className:"studio-update-error-meta",children:[a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.failedStage")}),a.jsx("dd",{children:Y6(i.errorStage,t)})]}),a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.errorId")}),a.jsx("dd",{children:i.errorId||t("studioUpdate.notGenerated")})]})]}),i.updateLogsVisible!==!1&&a.jsx(Hce,{lines:_,phase:"error",copyState:y,onCopy:z=>void V(z)}),i.updateLogsVisible===!1&&a.jsx(Vce,{href:i.permissionConsoleUrl}),i.consoleUrl&&a.jsxs("a",{className:"studio-update-console-link",href:i.consoleUrl,target:"_blank",rel:"noreferrer",children:[t("studioUpdate.openFunctionLogs"),a.jsx(kU,{})]})]}):s==="submitting"||s==="published"?a.jsxs("div",{className:"studio-update-progress-body",children:[a.jsxs("div",{className:"studio-update-progress-summary",children:[a.jsxs("div",{children:[a.jsx("span",{children:t("studioUpdate.targetVersion")}),a.jsx("strong",{children:S.current||N})]}),a.jsxs("div",{children:[a.jsx("span",{children:t(s==="published"?"studioUpdate.updateStatus":"studioUpdate.elapsed")}),a.jsx("strong",{children:s==="published"?t("studioUpdate.completed"):Xcn(x,t)})]})]}),a.jsxs("ol",{className:"studio-update-progress","aria-label":t("studioUpdate.progressAriaLabel"),children:[M&&a.jsxs("li",{className:"is-active","aria-current":"step",children:[a.jsx("span",{className:"studio-update-progress-dot","aria-hidden":!0}),a.jsxs("div",{children:[a.jsx("span",{children:Y6(i.progressStage,t)||t("studioUpdate.processingUpdate")}),a.jsx(fn,{as:"small",children:i.progressMessage||u||t("studioUpdate.processing")})]})]}),L.map((z,Z)=>{const ne=s==="published"||Zvoid V(z)}),i.updateLogsVisible===!1&&a.jsx(Vce,{href:i.permissionConsoleUrl}),a.jsx("p",{className:"studio-update-progress-note",children:t("studioUpdate.backgroundHint")})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"confirm-text",children:t("studioUpdate.confirmDescription")}),a.jsxs("div",{className:"studio-update-field",ref:k,children:[a.jsx("span",{children:t("studioUpdate.selectVersion")}),a.jsxs("button",{type:"button",className:"studio-update-version-trigger","aria-label":t("studioUpdate.selectVersion"),"aria-haspopup":"listbox","aria-expanded":b,onClick:()=>v(z=>!z),onKeyDown:z=>{(z.key==="ArrowDown"||z.key==="ArrowUp")&&(z.preventDefault(),v(!0))},children:[a.jsx("span",{children:N}),a.jsx(nun,{})]}),b&&a.jsx("div",{className:"studio-update-version-menu",role:"listbox","aria-label":t("studioUpdate.selectVersion"),children:A.map(z=>{const Z=z.version===N;return a.jsxs("button",{type:"button",role:"option","aria-selected":Z,className:`studio-update-version-option${Z?" is-selected":""}`,onClick:()=>{g(z.version),v(!1)},children:[a.jsx("span",{children:z.version}),Z&&a.jsx(iun,{})]},z.version)})})]}),a.jsxs("dl",{className:"studio-update-versions",children:[a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.currentVersion")}),a.jsx("dd",{children:i.currentVersion})]}),a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.targetVersion")}),a.jsx("dd",{children:N})]}),a.jsxs("div",{children:[a.jsx("dt",{children:t("studioUpdate.commit")}),a.jsx("dd",{children:((P==null?void 0:P.gitSha)||i.latestGitSha).slice(0,8)})]})]}),a.jsxs("section",{className:"studio-update-changelog","aria-labelledby":"studio-update-changelog-title",children:[a.jsx("div",{id:"studio-update-changelog-title",children:t("studioUpdate.changelog")}),I.length?a.jsx("ul",{children:I.map(z=>a.jsx("li",{children:z},z))}):a.jsx("p",{children:t("studioUpdate.noChangelog")})]})]}),a.jsxs("div",{className:"confirm-actions",children:[a.jsx("button",{type:"button",className:"confirm-btn",onClick:()=>{c(!1),v(!1),s==="confirm"&&(o("idle"),d(""))},children:t(s==="submitting"?"studioUpdate.runInBackground":s==="confirm"?"common.cancel":"common.close")}),s==="confirm"&&a.jsx("button",{type:"button",className:"confirm-btn studio-update-confirm",onClick:()=>void D(),children:t("studioUpdate.updateNow")}),s==="permission"&&a.jsx("button",{type:"button",className:"confirm-btn studio-update-confirm",onClick:()=>void D(),children:t("studioUpdate.authorizedRecheck")}),s==="error"&&a.jsx("button",{type:"button",className:"confirm-btn studio-update-confirm",onClick:q,children:t("studioUpdate.tryAgain")})]})]})}),document.body)]})}const qce=Hcn();function sun({canUpdate:e=!1}){const{t}=Te("newChat"),n=qce.length?qce:[t("featureNotice.defaultNotes.multiRegion"),t("featureNotice.defaultNotes.switchAgent"),t("featureNotice.defaultNotes.visualCanvas")];return a.jsxs("div",{className:"welcome-feature-pill",children:[a.jsx("span",{children:t("featureNotice.badge")}),a.jsx("span",{className:"welcome-feature-divider","aria-hidden":"true"}),a.jsx("button",{type:"button",className:"welcome-feature-link","aria-describedby":"welcome-feature-popover",children:t("featureNotice.view")}),a.jsxs("section",{id:"welcome-feature-popover",className:"welcome-feature-popover",role:"tooltip",children:[a.jsx("strong",{children:t("featureNotice.title")}),a.jsx("ul",{children:n.map(i=>a.jsx("li",{children:i},i))})]}),e&&a.jsx(run,{variant:"feature-link"})]})}const aun=1e4;async function IUe(e,t){const n=await fetch(Ta(e),{headers:ul(uc({Accept:"application/json"})),signal:po(t,aun)});if(!n.ok)throw new Error(Q("newChatCapabilities.loadFailed",{status:n.status}));const i=await n.json();if(typeof i.enabled!="boolean")throw new Error(Q("newChatCapabilities.invalidResponse"));return{enabled:i.enabled,reason:typeof i.reason=="string"?i.reason:void 0,endpointExportEnabled:i.endpointExportEnabled===!0,persistentEnabled:i.persistentEnabled===!0,persistentReason:typeof i.persistentReason=="string"?i.persistentReason:void 0,persistentRequired:i.persistentRequired===!0,storageMode:i.storageMode==="disk"?"disk":"snapshot",diskGbDefault:typeof i.diskGbDefault=="number"?i.diskGbDefault:void 0,diskGbMin:typeof i.diskGbMin=="number"?i.diskGbMin:void 0,diskGbMax:typeof i.diskGbMax=="number"?i.diskGbMax:void 0}}async function PUe(e){return IUe("/web/sandbox/capabilities",e)}async function DUe(e,t){return IUe(`/web/${e}/capabilities`,t)}function oun(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m7 7 10 10M17 7 7 17"})})}function lun(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M12 3.5v11m-4-4 4 4 4-4"}),a.jsx("path",{d:"M5 19.5h14"})]})}function Wce(e){return a.jsxs("svg",{viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",...e,children:[a.jsx("circle",{cx:"8",cy:"8",r:"5.5",stroke:"currentColor",strokeWidth:"1.5",opacity:"0.22"}),a.jsx("path",{d:"M8 2.5A5.5 5.5 0 0 1 13.5 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}function cun({open:e,task:t,onClose:n,onRetry:i,onDownload:r}){const{t:s,i18n:o}=Te("newChat"),l=p.useId(),c=p.useRef(null),u=p.useRef(null),d=p.useRef(null),[f,h]=p.useState(()=>Date.now()),m=p.useRef(n);if(m.current=n,p.useEffect(()=>{if(!e||!t)return;d.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const E=document.body.style.overflow;document.body.style.overflow="hidden";const j=window.requestAnimationFrame(()=>{var R;return(R=u.current)==null?void 0:R.focus()}),T=R=>{var I;if(R.key==="Escape"){R.preventDefault(),m.current();return}if(R.key!=="Tab")return;const A=Array.from(((I=c.current)==null?void 0:I.querySelectorAll('button:not(:disabled), a[href], video[controls], [tabindex]:not([tabindex="-1"])'))??[]);if(A.length===0)return;const N=A[0],P=A[A.length-1];if(document.activeElement===u.current){R.preventDefault(),(R.shiftKey?P:N).focus();return}R.shiftKey&&document.activeElement===N?(R.preventDefault(),P.focus()):!R.shiftKey&&document.activeElement===P&&(R.preventDefault(),N.focus())};return window.addEventListener("keydown",T),()=>{var R;window.cancelAnimationFrame(j),document.body.style.overflow=E,window.removeEventListener("keydown",T),(R=d.current)!=null&&R.isConnected&&d.current.focus()}},[e,t==null?void 0:t.localId]),p.useEffect(()=>{if(!e||(t==null?void 0:t.status)!=="generating"||t.generationStartedAt===null)return;const E=()=>h(Date.now());E();const j=window.setInterval(E,1e3);return()=>window.clearInterval(j)},[e,t==null?void 0:t.localId,t==null?void 0:t.runId,t==null?void 0:t.status,t==null?void 0:t.generationStartedAt]),!e||!t)return null;const g=o.resolvedLanguage??o.language,b=d7e(t,g),v=t.status==="optimizing"||t.status==="generating",y=t.errorStage==="optimization"?s("video.task.retryOptimization"):s("video.task.retryGeneration"),w=u7e(t.resolvedMode??t.requestedMode,g),x=t.error.includes("尚未开通"),O=vrn(t,g),k=t.generationStartedAt===null?"":yrn(f-t.generationStartedAt,g),S=t.providerStatus==="queued"?s("video.task.providerQueued"):t.providerStatus==="running"?s("video.task.providerRunning"):s("video.task.providerSubmitting"),C=t.providerStatus==="queued"?s("video.task.queuedHint"):s("video.task.runningHint");return yi.createPortal(a.jsx("div",{className:"new-chat-video-task-backdrop",onMouseDown:E=>{E.target===E.currentTarget&&n()},children:a.jsxs("section",{ref:c,className:`new-chat-video-task-dialog is-${t.status}`,role:"dialog","aria-modal":"true","aria-labelledby":l,"aria-busy":v||void 0,children:[a.jsxs("header",{className:"new-chat-video-task-dialog__head",children:[a.jsxs("div",{children:[a.jsx("h2",{ref:u,id:l,tabIndex:-1,children:s("video.task.title")}),a.jsxs("p",{children:[w," · ",t.generationModel]})]}),a.jsx("button",{type:"button",className:"new-chat-video-task-dialog__close",onClick:n,"aria-label":s("video.task.closeAria"),children:a.jsx(oun,{})})]}),a.jsxs("div",{className:"new-chat-video-task-dialog__body",children:[a.jsx("ol",{className:"new-chat-video-task-steps","aria-label":s("video.task.progressAria"),"aria-live":"polite","aria-atomic":"true",children:b.map(E=>a.jsx("li",{className:`is-${E.status}`,children:a.jsxs("span",{className:"new-chat-video-task-step__label",children:[E.status==="active"?a.jsx(Wce,{className:"new-chat-video-task-step__loading"}):null,a.jsx("span",{children:E.label})]})},E.id))}),t.error?a.jsx("div",{className:"new-chat-video-task-error",role:"alert",children:a.jsx("p",{children:t.error})}):null,t.optimizedPrompt?a.jsxs("section",{className:"new-chat-video-task-prompt","aria-labelledby":`${l}-prompt`,children:[a.jsx("h3",{id:`${l}-prompt`,children:s("video.task.optimizedPrompt")}),a.jsx("p",{children:t.optimizedPrompt})]}):null,t.status==="generating"?a.jsxs("div",{className:"new-chat-video-task-preview is-loading",children:[a.jsx(Wce,{className:"new-chat-video-task-preview__loading"}),a.jsx(fn,{as:"strong",duration:2.2,spread:18,"aria-live":"polite",children:O}),a.jsx("div",{className:"new-chat-video-task-progress",role:"progressbar","aria-label":s("video.task.processingAria",{task:w}),"aria-valuetext":k?s("video.task.waitingAria",{status:O,elapsed:k}):O,children:a.jsx("span",{"aria-hidden":"true"})}),a.jsxs("div",{className:"new-chat-video-task-progress__meta",children:[a.jsx("span",{children:S}),k?a.jsx("span",{children:s("video.task.elapsed",{elapsed:k})}):null]}),a.jsx("span",{children:C})]}):t.output?a.jsx("div",{className:"new-chat-video-task-preview",children:a.jsx("video",{src:t.output.previewUrl,controls:!0,playsInline:!0,preload:"metadata","aria-label":s("video.task.previewAria")})}):null]}),a.jsxs("footer",{className:"new-chat-video-task-dialog__actions",children:[a.jsx("p",{children:v?s("video.task.backgroundHint"):t.status==="success"?s("video.task.successHint"):s(x?"video.task.activationHint":"video.task.retryHint")}),a.jsxs("div",{children:[a.jsx("button",{type:"button",className:"new-chat-video-task-button",onClick:n,children:s("video.task.close")}),t.status==="error"?a.jsx("button",{type:"button",className:"new-chat-video-task-button is-primary",onClick:i,children:y}):t.output?a.jsxs("button",{type:"button",className:"new-chat-video-task-button is-primary",onClick:r,children:[a.jsx(lun,{}),s("video.task.download")]}):null]})]})]})}),document.body)}const qk="/web/agentkit-cli",Lj=6e4,uun=33e4;function WP(){return Q("agentkitCli.unconfigured")}WP();function Wk(e=!1){const t=ul({Accept:"application/json"});return e&&t.set("Content-Type","application/json"),t}async function Kk(e,t){return new Error(await Ft(e,t))}function Kce(e){const t=e;if(typeof(t==null?void 0:t.sessionId)!="string"||typeof t.status!="string")throw new Error(Q("agentkitCli.invalidSession"));return{id:t.sessionId,status:t.status,displayName:typeof t.displayName=="string"?t.displayName:"",expireAt:typeof t.expireAt=="string"?t.expireAt:""}}const bx={async capabilities(e={}){const t=await yn(`${qk}/capabilities`,{headers:Wk(),signal:e.signal},Lj);if(!t.ok)throw await Kk(t,Q("agentkitCli.loadCapabilitiesFailed"));const n=await t.json();if(typeof n.enabled!="boolean")throw new Error(Q("agentkitCli.invalidCapabilities"));return{enabled:n.enabled,reason:typeof n.reason=="string"?n.reason:""}},async listSessions(e={}){const t=await yn(`${qk}/sessions`,{headers:Wk(),signal:e.signal},Lj);if(!t.ok)throw await Kk(t,Q("agentkitCli.listSessionsFailed"));const n=await t.json();if(!Array.isArray(n.sessions))throw new Error(Q("agentkitCli.invalidSessionList"));return n.sessions.map(Kce)},async createSession(e={}){const t=await yn(`${qk}/sessions`,{method:"POST",headers:Wk(!0),body:JSON.stringify({persistent:!1}),signal:e.signal},uun);if(!t.ok)throw await Kk(t,Q("agentkitCli.createSessionFailed"));return Kce(await t.json())},async openSession(e,t={}){const n=await yn(`${qk}/sessions/${encodeURIComponent(e)}/open`,{method:"POST",headers:Wk(),signal:t.signal},Lj);if(!n.ok)throw await Kk(n,Q("agentkitCli.openSessionFailed"))},async launchTerminal(e,t={}){const n=await yn(`${qk}/sessions/${encodeURIComponent(e)}/terminal`,{method:"POST",headers:Wk(),signal:t.signal},Lj);if(!n.ok)throw await Kk(n,Q("agentkitCli.openTerminalFailed"));const i=await n.json();if(typeof i.url!="string"||!i.url)throw new Error(Q("agentkitCli.invalidTerminalUrl"));return{url:i.url,...typeof i.shellSessionId=="string"?{shellSessionId:i.shellSessionId}:{}}}},MUe=new Set(["creating","pending","running","starting","initializing"]),LUe="ready",dun=1500,fun=80;function SU(e){return e.status.trim().toLowerCase()}function hun(e){return new Promise((t,n)=>{const i=window.setTimeout(t,dun);e.addEventListener("abort",()=>{window.clearTimeout(i),n(new DOMException("Aborted","AbortError"))},{once:!0})})}async function pun(e,t,n){let i=e;for(let r=0;rc.id===i.id);if(!l)throw new Error(n("agentKitCli.sessionExpired"));i=l}throw new Error(n("agentKitCli.initializationTimeout"))}async function mun(e,t,n){t("searching");const i=await bx.capabilities({signal:e});if(!i.enabled)throw new Error(i.reason||WP());const r=await bx.listSessions({signal:e});let s=r.find(o=>SU(o)===LUe)??r.find(o=>MUe.has(SU(o)));return s?t("connecting"):(t("creating"),s=await bx.createSession({signal:e})),s=await pun(s,e,n),t("connecting"),await bx.openSession(s.id,{signal:e}),{launch:await bx.launchTerminal(s.id,{signal:e}),session:s}}function gun(e){return e==="searching"||e==="creating"||e==="connecting"}function bun(e,t){const n=Date.parse(e);return Number.isFinite(n)&&n>t}function yun(e,t,n){const i=Date.parse(e);if(!Number.isFinite(i))return n("agentKitCli.nonPersistent");const r=Math.max(0,Math.ceil((i-t)/6e4)),s=Math.floor(r/60),o=r%60;return s>0?n("agentKitCli.recyclingHoursMinutes",{hours:s,minutes:o}):n("agentKitCli.recyclingMinutes",{minutes:o})}function vun(e,t){const n=e instanceof Error?e.message:String(e);return e instanceof TypeError?t("agentKitCli.connectionError",{message:n}):n}function xun({open:e,onClose:t}){const{t:n}=Te("workspaceTools"),[i,r]=p.useState("searching"),[s,o]=p.useState(null),[l,c]=p.useState(""),[u,d]=p.useState(""),[f,h]=p.useState(0),[m,g]=p.useState(()=>Date.now());p.useEffect(()=>{if(!e||!l)return;g(Date.now());const v=window.setInterval(()=>g(Date.now()),6e4);return()=>window.clearInterval(v)},[l,e]),p.useEffect(()=>{if(!e)return;if(s&&bun(l,Date.now())){d(""),r("ready");return}const v=new AbortController;return r("searching"),o(null),c(""),d(""),mun(v.signal,r,n).then(({launch:y,session:w})=>{v.signal.aborted||(o(y),c(w.expireAt),r("ready"))}).catch(y=>{if(v.signal.aborted)return;const w=vun(y,n);d(w),r(w.includes(WP())?"unconfigured":"error")}),()=>v.abort()},[f,l,s,e,n]);const b=gun(i);return a.jsxs(Mh,{open:e,keepMounted:!0,title:"AgentKit CLI",icon:a.jsx(c0,{}),className:"sandbox-tool-dialog sandbox-tool-dialog--terminal agentkit-cli-dialog",onClose:t,children:[a.jsx("div",{className:"sandbox-tool-toolbar",children:a.jsxs("span",{children:[a.jsx("i",{className:b?"is-loading":i==="ready"?"is-ready":""}),b?n(`agentKitCli.loading.${i}`):i==="ready"?yun(l,m,n):n("agentKitCli.unavailable")]})}),a.jsx("div",{className:"sandbox-tool-surface agentkit-cli-surface",children:b?a.jsxs("div",{className:"agentkit-cli-state",role:"status","aria-live":"polite",children:[a.jsx(WA,{size:20}),a.jsx(fn,{as:"strong",children:n(`agentKitCli.loading.${i}`)})]}):i==="unconfigured"?a.jsxs("div",{className:"agentkit-cli-state",role:"status",children:[a.jsx(c0,{}),a.jsx("strong",{children:WP()})]}):i==="error"?a.jsxs("div",{className:"agentkit-cli-state is-error",role:"alert",children:[a.jsx("strong",{children:n("agentKitCli.requestFailed")}),a.jsx("pre",{className:"agentkit-cli-error-detail",children:u}),a.jsx("button",{type:"button",onClick:()=>h(v=>v+1),children:n("agentKitCli.retry")})]}):s?a.jsx("iframe",{src:s.url,title:n("agentKitCli.terminalTitle"),allow:"clipboard-read; clipboard-write",sandbox:"allow-downloads allow-forms allow-modals allow-popups allow-pointer-lock allow-same-origin allow-scripts"}):null})]})}function wun({open:e,state:t,agentKind:n="codex",error:i,persistentEnabled:r=!0,persistentReason:s="",persistentRequired:o=!1,storageMode:l="snapshot",diskGbDefault:c=10,diskGbMin:u=5,diskGbMax:d=100,onCancel:f,onConfirm:h}){const{t:m}=Te("sandbox"),g=n==="codex"?"Codex":n==="deepseek-harness"?"DeepSeek Harness":n==="openclaw"?"OpenClaw":"Hermes",b=n==="codex"?m("launch.defaultName"):m("launch.namedDefault",{agent:g}),v=p.useRef(null),y=p.useRef(null),w=p.useRef(null),x=p.useRef(!1),O=p.useRef(f),[k,S]=p.useState(b),[C,E]=p.useState(!0),[j,T]=p.useState(c);if(O.current=f,p.useEffect(()=>{if(!e)return;S(b),E(o||r),T(c);const I=document.body.style.overflow;document.body.style.overflow="hidden";const D=window.requestAnimationFrame(()=>{var L,F;(L=y.current)==null||L.focus(),(F=y.current)==null||F.select()}),_=L=>{var q;if(L.key==="Escape"){L.preventDefault(),O.current();return}if(L.key!=="Tab")return;const F=(q=v.current)==null?void 0:q.querySelectorAll("input:not(:disabled), button:not(:disabled)");if(!(F!=null&&F.length))return;const M=F[0],V=F[F.length-1];L.shiftKey&&document.activeElement===M?(L.preventDefault(),V.focus()):!L.shiftKey&&document.activeElement===V&&(L.preventDefault(),M.focus())};return window.addEventListener("keydown",_),()=>{window.cancelAnimationFrame(D),document.body.style.overflow=I,window.removeEventListener("keydown",_)}},[b,c,e,r,o]),!e)return null;const R=t==="loading",A=k.trim(),N=Number.isInteger(j)&&j>=u&&j<=d,P=R?m("launch.creatingTitle",{agent:g}):t==="error"?m("launch.failedTitle"):m("launch.createTitle",{agent:g});return yi.createPortal(a.jsx("div",{className:"sandbox-dialog-backdrop",onMouseDown:I=>{I.target===I.currentTarget&&!R&&f()},children:a.jsxs("form",{ref:v,className:"sandbox-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"sandbox-dialog-title","aria-describedby":t==="confirm"?void 0:"sandbox-dialog-description",onSubmit:I=>{I.preventDefault(),!R&&!x.current&&A&&(l!=="disk"||N)&&h(A,l==="disk"?!0:C,l==="disk"?j:void 0)},children:[a.jsxs("div",{className:"sandbox-dialog-visual","aria-hidden":"true",children:[a.jsx("span",{className:"sandbox-dialog-orbit"}),a.jsx("span",{className:"sandbox-dialog-icon",children:R?a.jsx("span",{className:"sandbox-spinner"}):a.jsx(hA,{kind:n})})]}),a.jsxs("div",{className:"sandbox-dialog-copy",children:[a.jsx("h2",{id:"sandbox-dialog-title",children:P}),t==="error"?a.jsx("p",{id:"sandbox-dialog-description",className:"sandbox-dialog-error",role:"alert",children:i||m("launch.fallbackError")}):R?a.jsx("p",{id:"sandbox-dialog-description","aria-live":"polite",children:m("launch.creatingDescription",{agent:g})}):null,a.jsxs("label",{className:"sandbox-dialog-field",children:[a.jsxs("span",{className:"sandbox-dialog-field-label",children:[a.jsx("span",{children:m("launch.name")}),a.jsxs("span",{"aria-hidden":"true",children:[k.length,"/",G8]})]}),a.jsx("input",{ref:y,type:"text",required:!0,value:k,maxLength:G8,disabled:R,placeholder:b,autoComplete:"off",onChange:I=>S(I.target.value),onCompositionStart:()=>{x.current=!0},onCompositionEnd:()=>{x.current=!1},onKeyDown:I=>{const{nativeEvent:D}=I;I.key==="Enter"&&(x.current||D.isComposing||D.keyCode===229)&&I.preventDefault()}})]}),l==="disk"?a.jsxs("label",{className:"sandbox-dialog-field sandbox-dialog-disk-field",children:[a.jsxs("span",{className:"sandbox-dialog-field-label",children:[a.jsx("span",{children:m("launch.storageSize")}),a.jsx("span",{children:"GiB"})]}),a.jsx("input",{type:"number",required:!0,min:u,max:d,step:1,value:j,disabled:R,onChange:I=>T(I.currentTarget.valueAsNumber)}),a.jsx("span",{className:"sandbox-dialog-field-help",children:m("launch.storageHelp",{min:u,max:d})})]}):a.jsxs("div",{className:"sandbox-dialog-persistence",role:"group","aria-describedby":"sandbox-persistence-description",children:[a.jsx(DK,{id:"sandbox-persistence",className:"sandbox-dialog-persistence-control",checked:C,disabled:R||!r||o,onCheckedChange:E,label:m("launch.persistent")}),a.jsx("p",{id:"sandbox-persistence-description",className:`sandbox-dialog-persistence-description${C?"":" is-warning"}`,role:C?void 0:"status",children:r?m(C?"launch.persistentHelp":"launch.temporaryHelp"):s||m("launch.persistenceUnsupported")})]})]}),a.jsxs("footer",{className:"sandbox-dialog-actions",children:[a.jsx("button",{ref:w,type:"button",onClick:f,children:m(R?"launch.cancelCreation":"common.cancel")}),!R&&a.jsx("button",{type:"submit",className:"is-primary",disabled:!A||l==="disk"&&!N,children:m(t==="error"?"launch.retry":"launch.confirm")})]})]})}),document.body)}function Oun({agentName:e,expireAt:t,exitLabel:n,onExit:i}){const{t:r,i18n:s}=Te("sandbox"),[o,l]=p.useState(()=>Date.now());p.useEffect(()=>{if(!t)return;const h=window.setInterval(()=>l(Date.now()),6e4);return()=>window.clearInterval(h)},[t]);const c=t?Date.parse(t):Number.NaN,u=Number.isFinite(c)?Math.max(0,Math.ceil((c-o)/6e4)):null,d=u===null?"":u===0?r("session.expired"):u>=60?r("session.remainingHours",{hours:Math.floor(u/60),minutes:u%60}):r("session.remainingMinutes",{minutes:u}),f=Number.isFinite(c)?new Date(c).toLocaleString(s.resolvedLanguage??s.language,{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}):"";return a.jsxs("div",{className:`sandbox-session-warning${t?" is-expiring":""}`,role:"status",children:[a.jsx("span",{className:"sandbox-session-warning-dot","aria-hidden":"true"}),a.jsx("span",{className:"sandbox-session-warning-copy",children:f?r("session.expiryWarning",{expiry:f,remaining:d}):r("session.usingAgent",{agent:e})}),a.jsx("button",{type:"button",onClick:i,children:n??r("session.exit")})]})}function kun({activity:e,time:t}){var i;const{t:n}=Te("sandbox");return a.jsxs("aside",{className:"sandbox-activity-record",role:"status","aria-label":n("session.activityAria"),children:[a.jsxs("div",{className:"sandbox-activity-summary",children:[a.jsx("span",{className:"sandbox-activity-dot","aria-hidden":"true"}),a.jsx("span",{className:"sandbox-activity-label",children:n("session.activity")}),a.jsx("strong",{children:e.title}),t?a.jsx("time",{children:t}):null]}),(i=e.details)!=null&&i.length?a.jsx("dl",{className:"sandbox-activity-details",children:e.details.map(r=>a.jsxs("div",{children:[a.jsx("dt",{children:r.label}),a.jsx("dd",{title:r.value,children:r.code?a.jsx("code",{children:r.value}):r.value})]},`${r.label}:${r.value}`))}):null]})}function Sun(e){return e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}m`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}k`:String(e)}function Eun({usage:e}){const{t,i18n:n}=Te("sandbox"),i=[["total",t("session.tokenLabels.total"),e.totalTokens],["input",t("session.tokenLabels.input"),e.inputTokens],...e.cachedInputTokens>0?[["cachedInput",t("session.tokenLabels.cachedInput"),e.cachedInputTokens]]:[],["output",t("session.tokenLabels.output"),e.outputTokens],...e.reasoningOutputTokens>0?[["reasoningOutput",t("session.tokenLabels.reasoningOutput"),e.reasoningOutputTokens]]:[]],r=n.resolvedLanguage??n.language;return a.jsx("div",{className:"sandbox-token-usage","aria-label":t("session.tokenUsageAria"),children:i.map(([s,o,l])=>a.jsxs("span",{title:t("session.tokens",{label:o,value:l.toLocaleString(r)}),children:[a.jsx("small",{children:o}),a.jsx("strong",{children:Sun(l)})]},s))})}const Cun={codex:"Codex","deepseek-harness":"DeepSeek Harness",openclaw:"OpenClaw",hermes:"Hermes"};function Gce(e,t){if(!e)return"—";const n=new Date(e);return Number.isNaN(n.getTime())?e:new Intl.DateTimeFormat(t,{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).format(n)}function Aun({session:e,onBack:t,onOpen:n,onDelete:i}){var k;const{t:r,i18n:s}=Te("sandbox"),[o,l]=p.useState(!1),[c,u]=p.useState(!1),[d,f]=p.useState(!1),[h,m]=p.useState(""),g=Cun[e.toolName],b=e.resourceType==="snapshot",v=b?e.sourceSessionId||e.snapshotId:e.id,y=e.displayName||r("common.agentFallback",{agent:g}),w=s.resolvedLanguage??s.language,x=async()=>{if(!(c||d)){u(!0),m("");try{await n()}catch(S){m(S instanceof Error?S.message:String(S))}finally{u(!1)}}},O=async()=>{if(!(d||c)){f(!0),m("");try{await i()}catch(S){m(S instanceof Error?S.message:String(S)),l(!1)}finally{f(!1)}}};return a.jsxs("section",{className:"sandbox-agent-details",children:[a.jsxs("header",{className:"sandbox-agent-details-header",children:[a.jsx(ZD,{label:r("agentDetails.back"),onClick:t}),a.jsxs("div",{children:[a.jsx("h1",{children:y}),a.jsx("p",{children:r("agentDetails.subtitle",{agent:g})})]})]}),h?a.jsx("div",{className:"sandbox-agent-detail-error",role:"alert",children:h}):null,a.jsxs("div",{className:"sandbox-agent-detail-panel",children:[a.jsxs("dl",{children:[a.jsxs("div",{children:[a.jsx("dt",{children:r("agentDetails.type")}),a.jsx("dd",{children:g})]}),a.jsxs("div",{children:[a.jsx("dt",{children:r("agentDetails.status")}),a.jsx("dd",{children:$z(MD(e.status))})]}),a.jsxs("div",{children:[a.jsx("dt",{children:r("agentDetails.createdBy")}),a.jsx("dd",{children:((k=e.createdBy)==null?void 0:k.trim())||r("common.unknownSource")})]}),a.jsxs("div",{children:[a.jsx("dt",{children:r("agentDetails.createdAt")}),a.jsx("dd",{children:Gce(e.createdAt,w)})]}),b?null:a.jsxs("div",{children:[a.jsx("dt",{children:r("agentDetails.expiresAt")}),a.jsx("dd",{children:Gce(e.expireAt,w)})]}),a.jsxs("div",{className:"is-wide",children:[a.jsx("dt",{children:r("agentDetails.agentId")}),a.jsx("dd",{children:v})]})]}),b&&e.status.toLowerCase()==="wakeable"?a.jsx("p",{className:"sandbox-agent-wake-note",role:c?"status":void 0,children:c?a.jsx(fn,{children:r("agentDetails.wakingHint")}):r("agentDetails.sleepingHint")}):null,a.jsxs("footer",{children:[a.jsx("button",{type:"button",className:"sandbox-agent-delete",disabled:c||d,onClick:()=>l(!0),children:r("agentDetails.delete")}),a.jsx("button",{type:"button",className:"sandbox-agent-open",disabled:c||d||!["ready","wakeable"].includes(e.status.toLowerCase()),"aria-busy":c||void 0,onClick:()=>void x(),children:r(c?b?"agentDetails.waking":"agentDetails.opening":b?"agentDetails.wake":"agentDetails.open")})]})]}),o?a.jsx("div",{className:"confirm-scrim",onClick:()=>!d&&l(!1),children:a.jsxs("div",{className:"confirm-box",role:"alertdialog","aria-modal":"true","aria-labelledby":"sandbox-agent-delete-title",onClick:S=>S.stopPropagation(),children:[a.jsx("div",{className:"confirm-title",id:"sandbox-agent-delete-title",children:r("agentDetails.deleteTitle")}),a.jsx("div",{className:"confirm-text",children:r("agentDetails.deleteDescription",{name:y})}),a.jsxs("div",{className:"confirm-actions",children:[a.jsx("button",{type:"button",className:"confirm-btn",disabled:d,onClick:()=>l(!1),children:r("common.cancel")}),a.jsx("button",{type:"button",className:"confirm-btn confirm-btn--danger",disabled:d,onClick:()=>void O(),children:r(d?"agentDetails.deleting":"agentDetails.confirmDelete")})]})]})}):null]})}function Tun({workspace:e,onBack:t}){var g;const{t:n}=Te("sandbox"),[i,r]=p.useState("main"),[s,o]=p.useState(""),[l,c]=p.useState(!1),[u,d]=p.useState(""),f=e.kind==="deepseek-harness"?"DeepSeek Harness":e.kind==="openclaw"?"OpenClaw":"Hermes",h=e.session.displayName||n("common.agentFallback",{agent:f});p.useEffect(()=>{r("main"),o(""),d(""),c(!1)},[e.session.id]);const m=async()=>{if(r("terminal"),!(s||l)){c(!0),d("");try{const b=await Br.launchAgentTerminal(e.kind,e.session.id);o(b.url)}catch(b){d(b instanceof Error?b.message:String(b))}finally{c(!1)}}};return a.jsxs("section",{className:"sandbox-agent-workspace",children:[a.jsxs("header",{children:[a.jsxs("div",{className:"sandbox-agent-workspace-title",children:[a.jsx("button",{type:"button",onClick:t,"aria-label":n("agentWorkspace.back"),children:a.jsx("svg",{viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:a.jsx("path",{d:"m14.5 6-6 6 6 6",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})})}),a.jsxs("div",{children:[a.jsx("h1",{children:h}),a.jsxs("p",{children:[a.jsx("span",{children:n("agentWorkspace.createdBy",{creator:((g=e.session.createdBy)==null?void 0:g.trim())||n("common.unknownSource")})}),a.jsx("span",{className:"sandbox-agent-workspace-status","data-ready":e.session.status.toLowerCase()==="ready"||void 0,children:$z(e.session.status)})]})]})]}),a.jsxs(ld,{className:"sandbox-agent-workspace-tabs",value:i,size:"lg",gutterSize:"lg",block:!0,pill:!1,"aria-label":n("agentWorkspace.ariaLabel"),onChange:b=>{b==="terminal"?m():r("main")},children:[a.jsx(ld.Option,{value:"main",children:n("agentWorkspace.main")}),a.jsx(ld.Option,{value:"terminal",children:n("agentWorkspace.terminal")})]})]}),a.jsxs("div",{className:"sandbox-agent-workspace-surface",children:[a.jsx("iframe",{src:e.webuiUrl,title:n("agentWorkspace.mainTitle",{agent:f}),allow:"clipboard-read; clipboard-write",hidden:i!=="main"}),s?a.jsx("iframe",{src:s,title:n("agentWorkspace.terminalTitle",{agent:f}),hidden:i!=="terminal"}):i==="terminal"&&l?a.jsx("div",{className:"sandbox-agent-workspace-state",role:"status",children:n("agentWorkspace.openingTerminal")}):i==="terminal"&&u?a.jsxs("div",{className:"sandbox-agent-workspace-state is-error",role:"alert",children:[a.jsx("p",{children:u}),a.jsx("button",{type:"button",onClick:()=>void m(),children:n("common.tryAgain")})]}):null]})]})}bn.hasResourceBundle("en-US","sandbox")||bn.addResourceBundle("en-US","sandbox",Tme,!0,!0);bn.hasResourceBundle("zh-CN","sandbox")||bn.addResourceBundle("zh-CN","sandbox",Pwe,!0,!0);function ua(e,t={}){return bn.t(e,{...t,ns:"sandbox"})}const VL=[{name:"model",usage:"/model [model]"},{name:"models",usage:"/models"},{name:"skill",usage:"/skill"},{name:"skills",usage:"/skills"},{name:"new",usage:"/new"},{name:"resume",usage:"/resume [thread]"},{name:"fork",usage:"/fork"},{name:"compact",usage:"/compact"},{name:"archive",usage:"/archive"},{name:"status",usage:"/status"},{name:"clear",usage:"/clear"},{name:"help",usage:"/help"}];function $Ue(e){return{...e,description:ua(`commands.${e.name}.description`),keywords:ua(`commands.${e.name}.keywords`).split(/\s+/)}}function _un(e){var n;const t=e.trim().match(/^\/([^\s]+)(?:\s+([\s\S]*))?$/);if(t)return{name:t[1].toLocaleLowerCase(),argument:((n=t[2])==null?void 0:n.trim())??""}}function jun(e){const t=e.toLocaleLowerCase();return VL.map($Ue).filter(n=>!t||[n.name,n.description,...n.keywords].some(i=>i.toLocaleLowerCase().includes(t))).sort((n,i)=>Xce(n,t)-Xce(i,t)).slice(0,12)}function Xce(e,t){return t?e.name===t?0:e.name.startsWith(t)?1:e.name.includes(t)?2:3:VL.findIndex(n=>n.name===e.name)}function Nun(e,t){const n=t.toLocaleLowerCase();return e.filter(i=>!n||`${i.id} ${i.displayName} ${i.description}`.toLocaleLowerCase().includes(n)).sort((i,r)=>{if(!n)return Number(r.isDefault)-Number(i.isDefault);const s=i.id.toLocaleLowerCase(),o=r.id.toLocaleLowerCase(),l=(c,u)=>c===n?0:c.startsWith(n)?1:u.toLocaleLowerCase().startsWith(n)?2:3;return l(s,i.displayName)-l(o,r.displayName)}).slice(0,12)}function Run(){return VL.map($Ue).map(e=>({label:e.usage,value:e.description}))}function Iun(e,t){return e.map(n=>{const i=n.displayName.trim(),r=i&&i!==n.id?`${i} · ${n.id}`:n.id;return{label:n.id===t?ua("commands.currentModel"):ua("commands.availableModel"),value:n.description?`${r} — ${n.description}`:r,code:!1}})}function Pun(e){const t=[{label:"Thread",value:e.threadId,code:!0},{label:ua("commands.workspace"),value:e.cwd||ua("commands.notSet"),code:!!e.cwd}];return e.model&&t.push({label:ua("commands.modelLabel"),value:e.model,code:!0}),t.push({label:ua("commands.statusLabel"),value:e.busy?ua("commands.running"):ua("commands.idle")}),e.threadTotal&&t.push({label:ua("commands.totalTokens"),value:e.threadTotal.totalTokens.toLocaleString(bn.resolvedLanguage??bn.language)}),e.modelContextWindow!==void 0&&t.push({label:ua("commands.contextWindow"),value:e.modelContextWindow.toLocaleString(bn.resolvedLanguage??bn.language)}),t}function FUe(e){return e.messages.map(t=>{var i,r;const n=[];return t.role==="user"&&((i=t.skillNames)!=null&&i.length)&&n.push({kind:"invocation",value:{skills:t.skillNames.map(s=>({name:s,description:""}))}}),t.role==="user"&&((r=t.images)!=null&&r.length)&&n.push({kind:"attachment",files:t.images.map((s,o)=>({id:`${t.id}-image-${o}`,mimeType:s.mimeType,data:s.data,name:s.alt||s.name||ua("commands.imageFallback")}))}),t.content&&n.push({kind:"text",text:t.content}),{role:t.role,blocks:n,meta:{localId:t.id,ts:t.timestamp/1e3}}})}function Dun({appName:e,value:t,onChange:n,onSubmit:i,onStop:r,disabled:s,busy:o,attachments:l,onAddFiles:c,onRemoveAttachment:u,actions:d,models:f,modelsLoading:h,modelsLoaded:m,currentModel:g,onRequestModels:b,skills:v,skillsLoading:y,skillsLoaded:w,selectedSkills:x,onRequestSkills:O,onSelectedSkillsChange:k,textOnly:S=!1,allowSteer:C=!1,sending:E=!1,stopping:j=!1,statusText:T,errorText:R,onResume:A}){const{t:N,i18n:P}=Te("sandbox"),I=p.useRef(null),D=p.useRef(null),_=p.useRef(null),L=p.useRef(null),[F,M]=p.useState(!1),[V,q]=p.useState(0),[U,J]=p.useState(!1);p.useLayoutEffect(()=>{const ue=I.current;ue&&(ue.style.height="auto",ue.style.height=`${Math.min(ue.scrollHeight,200)}px`)},[t]);const z=p.useMemo(()=>{if(!t.startsWith("/")||t.includes(` `))return;const ue=t.slice(1),pe=ue.search(/\s/),ke=(pe<0?ue:ue.slice(0,pe)).toLocaleLowerCase(),je=pe<0?"":ue.slice(pe).trim();if(!(pe>=0&&ke!=="model"))return{command:ke,argument:je,modelMode:pe>=0}},[t]),Z=p.useMemo(()=>{const ue=/(^|\s)\$([^\s$]*)$/.exec(t);if(ue)return{query:ue[2],start:t.length-ue[2].length-1,end:t.length}},[t]),ne=p.useMemo(()=>{if(Z){const ue=Z.query.toLocaleLowerCase();return v.filter(pe=>!x.some(ke=>ke.id===pe.id||ke.name===pe.name)).filter(pe=>`${pe.name} ${pe.description}`.toLocaleLowerCase().includes(ue)).slice(0,12).map(pe=>({kind:"skill",skill:pe}))}return z!=null&&z.modelMode?Nun(f,z.argument).map(ue=>({kind:"model",model:ue})):z?jun(z.command).map(ue=>({kind:"command",command:ue})):[]},[P.resolvedLanguage,Z,f,x,v,z]),W=!S&&!U&&!!(Z||z);p.useEffect(()=>{q(0)},[t]),p.useEffect(()=>{z!=null&&z.modelMode&&!m&&!h&&b()},[m,h,b,z==null?void 0:z.modelMode]),p.useEffect(()=>{Z&&!w&&!y&&O()},[Z,O,w,y]);const G=l.some(ue=>ue.status!=="ready"),H=(o||E)&&!!r,se=!s&&(!o||C)&&!E&&!j&&!G&&(t.trim().length>0||l.length>0);function Y(ue){J(!1),M(!1),n(ue)}function X(ue){if(ue.kind==="skill"){if(!Z)return;const pe=t.slice(0,Z.start)+t.slice(Z.end);k([...x,ue.skill]),Y(pe),J(!0),requestAnimationFrame(()=>{var ke,je;(ke=I.current)==null||ke.focus(),(je=I.current)==null||je.setSelectionRange(Z.start,Z.start)});return}if(ue.kind==="model"){Y(`/model ${ue.model.id}`),J(!0),requestAnimationFrame(()=>{var pe;return(pe=I.current)==null?void 0:pe.focus()});return}if(ue.command.name==="model"){Y("/model "),b(),requestAnimationFrame(()=>{var pe;return(pe=I.current)==null?void 0:pe.focus()});return}if(ue.command.name==="skill"||ue.command.name==="skills"){Y(`/${ue.command.name}`),J(!0),requestAnimationFrame(()=>{var pe;return(pe=I.current)==null?void 0:pe.focus()});return}Y(`/${ue.command.name}`),J(!0),requestAnimationFrame(()=>{var pe;return(pe=I.current)==null?void 0:pe.focus()})}function ie(ue){var pe;M(!1),(pe=ue.current)==null||pe.click()}function ee(ue){const pe=ue.target.files?Array.from(ue.target.files):[];pe.length&&c(pe),ue.target.value=""}const be=Z?N("composer.availableSkills"):z!=null&&z.modelMode?N("composer.selectModel"):N("composer.commands");return a.jsxs("div",{className:"composer sandbox-codex-composer",children:[T||j||R||A?a.jsxs("div",{className:"sandbox-run-status",children:[a.jsx("span",{role:R?"alert":"status",children:R||(j?N("composer.stopping"):T)}),A?a.jsx("button",{type:"button",className:"cw-btn cw-btn-ghost",onClick:A,disabled:j,children:N("composer.resume")}):null]}):null,l.length>0?a.jsx(DM,{appName:e,compact:!0,items:l,onRemove:u}):null,a.jsxs("div",{className:"composer-box",children:[W?a.jsxs("div",{className:"composer-command-menu",role:"listbox","aria-label":be,children:[a.jsxs("div",{className:"composer-command-head",children:[a.jsx(eet,{}),a.jsx("span",{children:be}),z!=null&&z.modelMode&&g?a.jsx("small",{children:N("composer.currentModel",{model:g})}):null,a.jsx("kbd",{children:Z?"$":"/"})]}),Z&&y?a.jsxs("div",{className:"composer-command-empty",children:[a.jsx(Rc,{className:"spin"})," ",N("composer.loadingSkills")]}):z!=null&&z.modelMode&&h?a.jsxs("div",{className:"composer-command-empty",children:[a.jsx(Rc,{className:"spin"})," ",N("composer.loadingModels")]}):ne.length===0?a.jsx("div",{className:"composer-command-empty",children:Z?N("composer.noSkillMatches"):z!=null&&z.modelMode?N("composer.noModelMatches"):N("composer.noCommandMatches")}):a.jsx("div",{className:"composer-command-list",children:ne.map((ue,pe)=>{const ke=ue.kind==="command"?`command:${ue.command.name}`:ue.kind==="model"?`model:${ue.model.id}`:`skill:${ue.skill.id}`,je=ue.kind==="command"?ue.command.usage:ue.kind==="model"?ue.model.displayName:`$${ue.skill.name}`,Pe=ue.kind==="command"?ue.command.description:ue.kind==="model"?ue.model.description||ue.model.id:ue.skill.description||N("composer.skillFallback");return a.jsxs("button",{type:"button",role:"option","aria-selected":pe===V,className:`composer-command-item${pe===V?" is-active":""}`,onMouseDown:Ee=>{Ee.preventDefault(),X(ue)},onMouseEnter:()=>q(pe),children:[a.jsx("span",{className:`composer-command-icon composer-command-icon--${ue.kind}`,"aria-hidden":"true",children:ue.kind==="command"?"/":ue.kind==="model"?"◇":"$"}),a.jsxs("span",{className:"composer-command-copy",children:[a.jsx("strong",{children:je}),a.jsx("span",{children:Pe})]}),pe===V?a.jsx("kbd",{children:"↵"}):null]},ke)})})]}):null,a.jsx("div",{className:"composer-left-controls",children:!S&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"composer-menu-wrap",children:[a.jsx("button",{type:"button",className:"comp-icon",title:N("composer.add"),"aria-label":N("composer.add"),disabled:s,onClick:()=>M(ue=>!ue),children:a.jsx(XJe,{className:"icon"})}),F?a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"menu-scrim",onClick:()=>M(!1)}),a.jsxs("div",{className:"composer-menu",role:"menu",children:[a.jsxs("button",{type:"button",className:"menu-item",disabled:d.uploadBusy,onClick:()=>ie(D),children:[a.jsx(YJe,{className:"icon"}),N("composer.uploadImage")]}),a.jsxs("button",{type:"button",className:"menu-item",disabled:d.uploadBusy,onClick:()=>ie(_),children:[a.jsx(ZJe,{className:"icon"}),N("composer.uploadDocument")]}),a.jsxs("button",{type:"button",className:"menu-item",disabled:d.uploadBusy,onClick:()=>ie(L),children:[a.jsx(JJe,{className:"icon"}),N("composer.uploadVideo")]}),a.jsx("div",{className:"composer-menu-separator",role:"separator"}),a.jsxs("button",{type:"button",className:"menu-item",onClick:()=>{M(!1),d.onOpenTerminal()},children:[a.jsx(c0,{className:"icon"}),N("composer.openTerminal")]}),a.jsxs("button",{type:"button",className:"menu-item",onClick:()=>{M(!1),d.onOpenBrowser()},children:[a.jsx(LAe,{className:"icon"}),N("composer.viewBrowser")]})]})]}):null]}),a.jsx("button",{type:"button",className:"comp-icon sandbox-composer-control",title:N("composer.permissions"),"aria-label":N("composer.permissions"),disabled:d.settingsBusy||o,onClick:d.onOpenPermissions,children:a.jsx(hz,{})}),a.jsx("button",{type:"button",className:`comp-icon sandbox-composer-control${d.workspaceLocked?" is-locked":""}`,title:d.workspaceLocked?N("composer.workspaceLocked"):N("composer.selectWorkspace"),"aria-label":N("composer.workspace"),disabled:d.settingsBusy||o,onClick:d.onOpenWorkspace,children:a.jsx(aN,{})}),d.endpointCopyEnabled&&d.onCopyEndpoint?a.jsx("button",{type:"button",className:"comp-icon sandbox-composer-control",title:d.endpointCopyState==="copied"?N("composer.endpointCopied"):N("composer.copyEndpoint"),"aria-label":d.endpointCopyState==="copied"?N("composer.endpointCopied"):N("composer.copyEndpoint"),disabled:d.endpointCopyState==="copying",onClick:d.onCopyEndpoint,children:d.endpointCopyState==="copying"?a.jsx(Rc,{className:"spin"}):d.endpointCopyState==="copied"?a.jsx(FAe,{}):a.jsx(net,{})}):null]})}),a.jsxs("div",{className:"composer-input-stack sandbox-composer-input",children:[!S&&x.length>0?a.jsx(PM,{skillPrefix:"$",value:{skills:x.map(({name:ue,description:pe})=>({name:ue,description:pe}))},onRemoveSkill:ue=>k(x.filter(pe=>pe.name!==ue))}):null,a.jsx("textarea",{ref:I,className:"comp-input scroll",rows:1,value:t,disabled:s,placeholder:N(S?o&&C?"composer.steerPlaceholder":"composer.continuePlaceholder":"composer.messagePlaceholder"),"aria-expanded":W,onChange:ue=>Y(ue.target.value),onBlur:()=>window.setTimeout(()=>J(!0),0),onKeyDown:ue=>{if(!XT(ue.nativeEvent)){if(W){if((ue.key==="ArrowDown"||ue.key==="Tab"&&!ue.shiftKey)&&ne.length>0){ue.preventDefault(),q(pe=>(pe+1)%ne.length);return}if((ue.key==="ArrowUp"||ue.key==="Tab"&&ue.shiftKey)&&ne.length>0){ue.preventDefault(),q(pe=>(pe-1+ne.length)%ne.length);return}if(ue.key==="Enter"&&!ue.shiftKey&&ne[V]){ue.preventDefault(),X(ne[V]);return}if(ue.key==="Escape"){ue.preventDefault(),J(!0);return}}if(ue.key==="Backspace"&&!t&&ue.currentTarget.selectionStart===0&&x.length>0){ue.preventDefault(),k(x.slice(0,-1));return}ue.key==="Enter"&&!ue.shiftKey&&(ue.preventDefault(),se&&i(t))}}})]}),C?a.jsxs("div",{className:"sandbox-run-actions",children:[H?a.jsx("button",{type:"button",className:"comp-send",disabled:j,onClick:r,"aria-label":N(j?"composer.stopping":"composer.stop"),title:N("composer.stop"),children:a.jsx(VZ,{className:"icon"})}):null,a.jsx("button",{type:"button",className:"comp-send",disabled:!se,onClick:()=>i(t),"aria-label":N(o?"composer.steer":"composer.send"),title:N(o?"composer.steer":"composer.send"),children:E?a.jsx(Rc,{className:"icon spin"}):a.jsx(zZ,{className:"icon"})})]}):a.jsx("button",{type:"button",className:"comp-send",disabled:H?!1:!se,onClick:H?r:()=>i(t),"aria-label":N(H?"composer.stop":"composer.send"),title:H?N("composer.stop"):void 0,children:H?a.jsx(VZ,{className:"icon"}):o?a.jsx(Rc,{className:"icon spin"}):a.jsx(zZ,{className:"icon"})})]}),a.jsx("input",{ref:D,type:"file",accept:"image/*",multiple:!0,hidden:!0,onChange:ee}),a.jsx("input",{ref:_,type:"file",accept:".txt,.md,.markdown,.pdf,text/plain,text/markdown,application/pdf",multiple:!0,hidden:!0,onChange:ee}),a.jsx("input",{ref:L,type:"file",accept:"video/mp4,video/webm,video/quicktime",multiple:!0,hidden:!0,onChange:ee})]})}function Mun(e){return e.trim().replace(/\/+$/,"")||window.location.origin}function Lun(e){const t=Mun(e.studioUrl);return ua("handoff.prompt",{studioUrl:t,pairingCode:e.pairingCode})}function BUe(){return["codex plugin marketplace add volcengine/veadk-python","--sparse .agents/plugins","--sparse plugins/agentkit-studio","&& codex plugin add agentkit-studio@veadk-python"].join(" ")}function $un(){return ua("handoff.installPrompt",{command:BUe()})}function Yce(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m6.5 6.5 11 11M17.5 6.5l-11 11"})})}function Zce(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("rect",{x:"8",y:"8",width:"11",height:"11",rx:"2"}),a.jsx("path",{d:"M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2"})]})}function J6(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m5 12.5 4.25 4.25L19 7"})})}function Jce(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M19 8a8 8 0 1 0 .35 7"}),a.jsx("path",{d:"M19 4v4h-4"})]})}function Fun(e,t){const n=Math.max(0,Math.ceil((Date.parse(e)-t)/1e3)),i=Math.floor(n/3600),r=Math.floor(n%3600/60),s=n%60;return[i,r,s].map(o=>String(o).padStart(2,"0")).join(":")}const Bun=[{id:"request"},{id:"session"},{id:"restore"},{id:"continue"}];function Uun(e){switch(e.state){case"issued":return 0;case"creating":return 1;case"session-created":return 2;case"continuing":return 3;case"running":return 4;case"completed":return 4;case"failed":return e.failedStage==="creating-session"?1:e.failedStage==="uploading-project"||e.failedStage==="restoring-project"?2:3}}function Qun(e,t){const n=Uun(e);return e.state==="failed"&&t===n?"failed":t$un(),[s.resolvedLanguage]),I=p.useMemo(()=>BUe(),[]),D=p.useMemo(()=>g?Lun(g):"",[s.resolvedLanguage,g]);if(p.useEffect(()=>{if(!e)return;b(null),y(null),m("conversation"),R(null),N(""),j(!1),C(Date.now());const U=new AbortController,J=++u.current;return k(!0),Br.createCodexProjectHandoffPairing({signal:U.signal}).then(z=>{u.current===J&&(b(z),y({state:"issued",expireAt:z.expireAt}))}).catch(z=>{(z==null?void 0:z.name)!=="AbortError"&&u.current===J&&R({message:z instanceof Error?z.message:String(z),retryPairing:!0})}).finally(()=>{u.current===J&&k(!1)}),()=>{U.abort()}},[w,e]),p.useEffect(()=>{if(!e||!g)return;C(Date.now());const U=window.setInterval(()=>C(Date.now()),1e3);return()=>window.clearInterval(U)},[e,g]),p.useEffect(()=>{if(!e||!g)return;let U=!1,J;const z=new AbortController,Z=async()=>{if(!(U||Date.now()>=Date.parse(g.expireAt))){try{const ne=await Br.getCodexProjectHandoffStatus(g.pairingCode,{signal:z.signal});if(U||(y(ne),ne.state==="completed"||ne.state==="failed"))return;J=window.setTimeout(()=>void Z(),1500);return}catch(ne){if((ne==null?void 0:ne.name)==="AbortError"||U)return;R({message:ne instanceof Error?ne.message:String(ne),retryPairing:!1})}J=window.setTimeout(()=>void Z(),1500)}};return Z(),()=>{U=!0,z.abort(),J!==void 0&&window.clearTimeout(J)}},[e,g]),p.useEffect(()=>{(v==null?void 0:v.state)!=="running"&&(v==null?void 0:v.state)!=="completed"||!g||f.current===g.pairingCode||(f.current=g.pairingCode,n())},[v==null?void 0:v.state,n,g]),p.useEffect(()=>()=>{d.current!==void 0&&window.clearTimeout(d.current)},[]),p.useEffect(()=>{if(!e)return;const U=document.body.style.overflow;document.body.style.overflow="hidden";const J=window.requestAnimationFrame(()=>{var Z;return(Z=l.current)==null?void 0:Z.focus()}),z=Z=>{var H;if(Z.key==="Escape"){Z.preventDefault(),c.current();return}if(Z.key!=="Tab")return;const ne=(H=o.current)==null?void 0:H.querySelectorAll('button:not(:disabled), input:not(:disabled), [tabindex]:not([tabindex="-1"])');if(!(ne!=null&&ne.length))return;const W=ne[0],G=ne[ne.length-1];Z.shiftKey&&document.activeElement===W?(Z.preventDefault(),G.focus()):!Z.shiftKey&&document.activeElement===G&&(Z.preventDefault(),W.focus())};return window.addEventListener("keydown",z),()=>{window.cancelAnimationFrame(J),document.body.style.overflow=U,window.removeEventListener("keydown",z)}},[e]),!e)return null;async function _(U,J){var z;if(!(!U||A)){R(null),N(J);try{if(!((z=navigator.clipboard)!=null&&z.writeText))throw new Error(r("handoff.clipboardUnsupported"));await navigator.clipboard.writeText(U),d.current!==void 0&&window.clearTimeout(d.current),d.current=window.setTimeout(()=>{N(Z=>Z===J?"":Z),d.current=void 0},1400)}catch(Z){N(""),R({message:Z instanceof Error?Z.message:String(Z),retryPairing:!1})}}}async function L(){const U=v==null?void 0:v.sessionId;if(!(!U||E)){R(null),j(!0);try{await i(U)}catch(J){R({message:J instanceof Error?J.message:String(J),retryPairing:!1}),j(!1)}}}function F(U){var J;m(U),(J=document.getElementById(`sandbox-project-upload-install-${U}-tab`))==null||J.focus()}function M(U){const J=["conversation","terminal"],z=J.indexOf(h);let Z=null;U.key==="ArrowRight"&&(Z=(z+1)%J.length),U.key==="ArrowLeft"&&(Z=(z-1+J.length)%J.length),U.key==="Home"&&(Z=0),U.key==="End"&&(Z=J.length-1),Z!==null&&(U.preventDefault(),F(J[Z]))}const V=g?Fun(g.expireAt,S):"00:00:00",q=g?S>=Date.parse(g.expireAt):!1;return yi.createPortal(a.jsx("div",{className:"sandbox-project-upload-backdrop",onMouseDown:U=>{U.target===U.currentTarget&&t()},children:a.jsxs("section",{ref:o,className:"sandbox-project-upload-dialog",role:"dialog","aria-modal":"true","aria-labelledby":"sandbox-project-upload-title","aria-describedby":"sandbox-project-upload-description",children:[a.jsxs("header",{className:"sandbox-project-upload-head",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"sandbox-project-upload-title-row",children:[a.jsx("h2",{id:"sandbox-project-upload-title",children:r("handoff.title")}),a.jsx(Ya,{className:"sandbox-project-upload-beta",color:"discovery",size:"sm",pill:!0,children:"Beta"})]}),a.jsx("p",{id:"sandbox-project-upload-description",children:r("handoff.description")})]}),a.jsx("button",{ref:l,type:"button",className:"sandbox-project-upload-close",onClick:t,"aria-label":r("handoff.closeAria"),children:a.jsx(Yce,{})})]}),a.jsxs("div",{className:"sandbox-project-upload-body",children:[T?a.jsxs("div",{className:"sandbox-project-upload-error",role:"alert",children:[a.jsx("span",{children:T.message}),T.retryPairing?a.jsxs("button",{type:"button",onClick:()=>x(U=>U+1),children:[a.jsx(Jce,{}),r("common.retry")]}):null]}):null,a.jsxs("section",{className:"sandbox-project-upload-stage",children:[a.jsxs("div",{className:"sandbox-project-upload-stage-head",children:[a.jsx("span",{className:"sandbox-project-upload-stage-number",children:"1"}),a.jsxs("div",{children:[a.jsx("h3",{children:r("handoff.installTitle")}),a.jsx("p",{children:r("handoff.installDescription")})]}),a.jsxs("button",{type:"button",onClick:()=>void _(h==="conversation"?P:I,h==="conversation"?"install-conversation":"install-terminal"),disabled:A!=="",children:[A===`install-${h}`?a.jsx(J6,{}):a.jsx(Zce,{}),A===`install-${h}`?r("handoff.copied"):r(h==="conversation"?"handoff.copyInstallPrompt":"handoff.copyInstallCommand")]})]}),a.jsxs("div",{className:`sandbox-project-upload-install-tabs is-${h}`,role:"tablist","aria-label":r("handoff.installMethodAria"),children:[a.jsx("span",{"aria-hidden":"true"}),a.jsx("button",{id:"sandbox-project-upload-install-conversation-tab",type:"button",role:"tab","aria-controls":"sandbox-project-upload-install-panel","aria-selected":h==="conversation",tabIndex:h==="conversation"?0:-1,onClick:()=>m("conversation"),onKeyDown:M,children:r("handoff.conversationInstall")}),a.jsx("button",{id:"sandbox-project-upload-install-terminal-tab",type:"button",role:"tab","aria-controls":"sandbox-project-upload-install-panel","aria-selected":h==="terminal",tabIndex:h==="terminal"?0:-1,onClick:()=>m("terminal"),onKeyDown:M,children:r("handoff.terminalInstall")})]}),a.jsx("div",{id:"sandbox-project-upload-install-panel",className:`sandbox-project-upload-prompt${h==="terminal"?" is-command":""}`,role:"tabpanel","aria-labelledby":`sandbox-project-upload-install-${h}-tab`,children:a.jsx("pre",{tabIndex:0,children:a.jsx("code",{children:h==="conversation"?P:I})})})]}),a.jsxs("section",{className:"sandbox-project-upload-stage",children:[a.jsxs("div",{className:"sandbox-project-upload-stage-head",children:[a.jsx("span",{className:"sandbox-project-upload-stage-number",children:"2"}),a.jsxs("div",{children:[a.jsx("h3",{children:r("handoff.taskTitle")}),a.jsx("p",{children:r("handoff.taskDescription")})]}),a.jsxs("button",{type:"button",onClick:()=>void _(D,"handoff"),disabled:!D||O||A!=="",children:[A==="handoff"?a.jsx(J6,{}):a.jsx(Zce,{}),r(A==="handoff"?"handoff.copied":"handoff.copyHandoffPrompt")]})]}),a.jsxs("div",{className:"sandbox-project-upload-pairing-notice",role:"status",children:[a.jsx("span",{children:O?r("handoff.generatingPairing"):q?r("handoff.pairingExpired"):r("handoff.pairingRemaining",{countdown:V})}),a.jsxs("button",{type:"button",disabled:O,onClick:()=>x(U=>U+1),children:[a.jsx(Jce,{}),r(O?"handoff.refreshing":"handoff.refreshPairing")]})]}),a.jsx("div",{className:"sandbox-project-upload-prompt",children:O?a.jsxs("div",{className:"sandbox-project-upload-loading",role:"status",children:[a.jsx("i",{"aria-hidden":"true"}),r("handoff.pairingLoading")]}):D?a.jsx("pre",{tabIndex:0,children:a.jsx("code",{children:D})}):a.jsx("div",{className:"sandbox-project-upload-loading",children:r("handoff.pairingUnavailable")})}),g&&v?a.jsxs("section",{className:"sandbox-project-upload-progress","aria-live":"polite","aria-label":r("handoff.statusAria"),children:[a.jsxs("header",{children:[a.jsxs("div",{children:[a.jsx("span",{children:r("handoff.statusTitle")}),v.state!=="issued"?a.jsx("p",{children:v.agentName||v.projectName?r("handoff.requestReceivedNamed",{name:v.agentName||v.projectName}):r("handoff.requestReceivedCurrent")}):a.jsx("p",{children:r("handoff.requestHelp")})]}),a.jsx("strong",{"data-state":v.state,children:zun(v)})]}),a.jsx("ol",{children:Bun.map((U,J)=>{const z=Qun(v,J);return a.jsxs("li",{"data-state":z,children:[a.jsxs("span",{className:"sandbox-project-upload-progress-marker",children:[z==="done"?a.jsx(J6,{}):null,z==="failed"?a.jsx(Yce,{}):null]}),a.jsx("span",{children:r(`handoff.steps.${U.id}`)})]},U.id)})}),v.state==="failed"&&v.error?a.jsx("p",{className:"sandbox-project-upload-progress-error",role:"alert",children:v.error}):null]}):null]})]}),a.jsxs("footer",{className:"sandbox-project-upload-actions",children:[a.jsx("button",{type:"button",onClick:t,children:r("common.close")}),((v==null?void 0:v.state)==="running"||(v==null?void 0:v.state)==="completed")&&v.sessionId?a.jsx("button",{type:"button",className:"is-primary",disabled:E,onClick:()=>void L(),children:r(E?"handoff.entering":"handoff.enterCodex")}):null]})]})}),document.body)}function Hun({client:e=Br,allowSkillSelection:t=!0,allowThreadManagement:n=!0,session:i,conversationBusy:r,onInputChange:s,onSessionPatch:o,onSnapshot:l,onActivity:c,onError:u}){const{t:d}=Te("sandbox"),f=p.useRef((i==null?void 0:i.id)??""),h=p.useRef(0),m=p.useRef(null);f.current=(i==null?void 0:i.id)??"";const[g,b]=p.useState(!1),[v,y]=p.useState([]),[w,x]=p.useState(!1),[O,k]=p.useState(!1),[S,C]=p.useState([]),[E,j]=p.useState(!1),[T,R]=p.useState(!1),[A,N]=p.useState([]),[P,I]=p.useState(!1),[D,_]=p.useState([]),[L,F]=p.useState(!1),[M,V]=p.useState(""),[q,U]=p.useState(""),[J,z]=p.useState("");p.useEffect(()=>{var ke;(ke=m.current)==null||ke.abort(),m.current=null,h.current+=1,b(!1),y([]),x(!1),k(!1),C([]),j(!1),R(!1),N([]),I(!1),_([]),F(!1),V(""),U(""),z("")},[i==null?void 0:i.id]);const Z=p.useCallback(async()=>{const ke=f.current;if(!ke)return[];x(!0);try{const je=await e.listModels(ke);return f.current===ke&&(y(je),k(!0)),je}catch(je){return f.current===ke&&(k(!0),u(je instanceof Error?je.message:String(je))),[]}finally{f.current===ke&&x(!1)}},[e,u]),ne=p.useCallback(async()=>{if(!t)return[];const ke=f.current;if(!ke)return[];j(!0);try{const je=await e.listSkills(ke);return f.current===ke&&(C(je),R(!0)),je}catch(je){return f.current===ke&&(R(!0),u(je instanceof Error?je.message:String(je))),[]}finally{f.current===ke&&j(!1)}},[t,e,u]),W=p.useCallback(async(ke="",je=!1)=>{var _e;const Pe=f.current;if(!Pe)return;(_e=m.current)==null||_e.abort();const Ee=new AbortController;m.current=Ee;const ze=++h.current;F(!0),V("");try{const ae=await e.listThreads(Pe,ke?{cursor:ke}:{},{signal:Ee.signal});f.current===Pe&&h.current===ze&&(_(le=>{if(!je)return ae.threads;const ge=new Map(le.map(Oe=>[Oe.id,Oe]));for(const Oe of ae.threads)ge.set(Oe.id,Oe);return[...ge.values()]}),U(ae.nextCursor??""))}catch(ae){if((ae==null?void 0:ae.name)==="AbortError")return;f.current===Pe&&h.current===ze&&V(ae instanceof Error?ae.message:String(ae))}finally{m.current===Ee&&(m.current=null),f.current===Pe&&h.current===ze&&F(!1)}},[e]),G=p.useCallback(()=>W("",!1),[W]),H=p.useCallback(async()=>{!q||L||await W(q,!0)},[W,L,q]),se=p.useCallback(async()=>{I(!0),await G()},[G]);p.useEffect(()=>{if(!(!n||!(i!=null&&i.id)))return G(),()=>{var ke;(ke=m.current)==null||ke.abort(),m.current=null,h.current+=1}},[n,G,i==null?void 0:i.id]);function Y(ke){l(ke),_(je=>[ke.thread,...je.filter(Pe=>Pe.id!==ke.thread.id)]),N([]),C([]),R(!1),I(!1)}async function X(ke){const je=await e.newThread(ke);f.current===ke&&(Y(je),c(d("commands.activity.new"),[{label:"Thread",value:je.threadId,code:!0}]))}async function ie(){const ke=f.current;if(!(!ke||g||r)){b(!0),V(""),u("");try{await X(ke)}catch(je){if(f.current===ke){const Pe=je instanceof Error?je.message:String(je);V(Pe),u(Pe)}}finally{f.current===ke&&b(!1)}}}async function ee(ke){const je=f.current;if(!(!je||g||r)){if(ke===(i==null?void 0:i.threadId)){I(!1);return}b(!0),u("");try{const Pe=await e.resumeThread(je,ke);if(f.current!==je)return;Y(Pe),c(d("commands.activity.resumed"),[{label:"Thread",value:Pe.threadId,code:!0}])}catch(Pe){f.current===je&&u(Pe instanceof Error?Pe.message:String(Pe))}finally{f.current===je&&b(!1)}}}async function be(ke){const je=f.current;if(!je||g||r)return!1;h.current+=1,F(!1),b(!0),z(ke),V(""),u("");try{const Pe=await e.deleteThread(je,ke);return f.current!==je?!1:(Pe.snapshot&&Y(Pe.snapshot),_(Ee=>Ee.filter(ze=>ze.id!==ke)),c(d("commands.activity.deleted"),[{label:"Thread",value:ke,code:!0}]),!0)}catch(Pe){if(f.current===je){const Ee=Pe instanceof Error?Pe.message:String(Pe);V(Ee),u(Ee)}return!1}finally{f.current===je&&(b(!1),z(""))}}async function ue(ke){const je=i,Pe=ke.trim();if(!Pe.startsWith("/"))return!1;if(!je||r||g)return!0;const Ee=_un(Pe),ze=Ee&&VL.find(_e=>_e.name===Ee.name);if(!Ee||!ze)return u(d("commands.unknown",{command:Pe.split(/\s/,1)[0]})),!0;if(u(""),N([]),ze.name==="model"&&!Ee.argument)return s("/model "),O||await Z(),!0;if(ze.name==="skill"||ze.name==="skills")return t?(s("$"),T||(await ne()).length===0&&s(""),!0):(u(d("commands.automaticSkills")),!0);if(ze.name==="resume"&&!Ee.argument)return s(""),await se(),!0;s(""),b(!0);try{if(ze.name==="model"){const _e=await e.setModel(je.id,Ee.argument);if(f.current!==je.id)return!0;o({model:_e}),c(d("commands.activity.modelChanged"),[{label:d("commands.modelLabel"),value:_e,code:!0}])}else if(ze.name==="models"){const _e=O?v:await Z();if(f.current!==je.id)return!0;c(_e.length>0?d("commands.activity.availableModels"):d("commands.activity.noModels"),Iun(_e,je.model))}else if(ze.name==="new"||ze.name==="clear")await X(je.id);else if(ze.name==="resume"){const _e=await e.resumeThread(je.id,Ee.argument);if(f.current!==je.id)return!0;Y(_e),c(d("commands.activity.resumed"),[{label:"Thread",value:_e.threadId,code:!0}])}else if(ze.name==="fork"){const _e=await e.forkThread(je.id);if(f.current!==je.id)return!0;Y(_e),c(d("commands.activity.forked"),[{label:"Thread",value:_e.threadId,code:!0}])}else if(ze.name==="compact"){if(await e.compactThread(je.id),f.current!==je.id)return!0;c(d("commands.activity.compacting"),[{label:"Thread",value:je.threadId,code:!0}])}else if(ze.name==="archive"){const _e=je.threadId,ae=await e.archiveThread(je.id,_e);if(f.current!==je.id)return!0;ae.snapshot&&Y(ae.snapshot),_(le=>le.filter(ge=>ge.id!==_e)),c(d("commands.activity.archived"),[{label:"Thread",value:_e,code:!0}])}else if(ze.name==="status"){const _e=await e.getStatus(je.id);if(f.current!==je.id)return!0;o(_e),c(d("commands.activity.status"),Pun(_e))}else ze.name==="help"&&c(d("commands.activity.help"),Run())}catch(_e){f.current===je.id&&(s(Pe),u(_e instanceof Error?_e.message:String(_e)))}finally{f.current===je.id&&b(!1)}return!0}function pe(){C([]),R(!1),N([])}return{commandBusy:g,models:v,modelsLoading:w,modelsLoaded:O,loadModels:Z,skills:S,skillsLoading:E,skillsLoaded:T,loadSkills:ne,selectedSkills:A,setSelectedSkills:N,invalidateSkills:pe,threadsOpen:P,threads:D,threadsLoading:L,threadsError:M,threadsHasMore:!!q,threadActionId:J,openThreads:se,refreshThreads:G,loadMoreThreads:H,closeThreads:()=>{g||(I(!1),V(""))},newThread:ie,resumeThread:ee,deleteThread:be,executeSlash:ue}}const qun={volcengine:"https://docs.volcengine.com/docs/86681/1925174?lang=zh",byteplus:"https://docs.byteplus.com/en/docs/legal"};function Wun(e){return e.toLowerCase()==="github"?a.jsx(Fat,{className:"icon"}):a.jsx(Uat,{className:"icon"})}function Kun({branding:e,cloudProvider:t,onUsername:n}){const{t:i}=Te("shell"),[r,s]=p.useState(null),[o,l]=p.useState(""),[c,u]=p.useState(0),[d,f]=p.useState(""),h=p.useRef(null);p.useEffect(()=>{let y=!0;return s(null),l(""),UAe().then(w=>{y&&s(w)}).catch(w=>{y&&l(w instanceof Error?w.message:String(w))}),()=>{y=!1}},[c]);const m=r!==null&&r.length===0;p.useEffect(()=>{var y;m&&((y=h.current)==null||y.focus())},[m]);const g=fet.test(d),b=t==="byteplus"?aH:pM,v=()=>{g&&n(d)};return a.jsxs("div",{className:"login",children:[a.jsx("header",{className:"login-top",children:a.jsxs("span",{className:"login-brand",children:[a.jsx("img",{className:"login-brand-logo",src:e.logoUrl||b,width:20,height:20,alt:"","aria-hidden":!0}),e.title]})}),a.jsx("main",{className:"login-main",children:a.jsxs("div",{className:"login-card",children:[a.jsx(fn,{as:"h1",className:"login-title",duration:4.8,spread:22,children:e.title}),o?a.jsxs("div",{className:"login-provider-error",role:"alert",children:[a.jsx("p",{children:o}),a.jsx("button",{type:"button",onClick:()=>u(y=>y+1),children:i("login.retry")})]}):r===null?null:r.length>0?a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"login-sub",children:i("login.signInToContinue")}),a.jsx("div",{className:"login-providers",children:r.map(y=>a.jsxs("button",{className:"login-btn",onClick:()=>pet(y.loginUrl),children:[Wun(y.id),a.jsx("span",{children:i("login.signInWith",{provider:y.id==="veidentity"?i(`login.identityProvider.${t}`):y.label})})]},y.id))})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{className:"login-sub",children:i("login.enterUsername")}),a.jsxs("form",{className:"login-name",onSubmit:y=>{y.preventDefault(),v()},children:[a.jsx("input",{ref:h,className:"login-name-input",value:d,onChange:y=>f(y.target.value),placeholder:i("login.usernamePlaceholder"),maxLength:16}),a.jsx("button",{type:"submit",className:"login-name-go",disabled:!g,"aria-label":i("login.enter"),children:a.jsx(nE,{className:"icon"})})]}),a.jsx("p",{className:"login-hint","aria-live":"polite",children:d&&!g?i("login.usernameInvalid"):""})]}),a.jsx("p",{className:"login-powered",children:i(`login.powered.${t}`)}),a.jsxs("p",{className:"login-legal",children:[i("login.legalPrefix")," ",a.jsx("a",{href:qun[t],target:"_blank",rel:"noreferrer",children:i("login.terms")})]})]})}),a.jsx("footer",{className:"login-footer",children:i("login.copyright",{year:2026})})]})}function Gun({open:e,checking:t,error:n,onLogin:i}){const{t:r}=Te("shell"),s=p.useRef(null);return p.useEffect(()=>{var l;if(!e)return;const o=document.body.style.overflow;return document.body.style.overflow="hidden",(l=s.current)==null||l.focus(),()=>{document.body.style.overflow=o}},[e]),e?yi.createPortal(a.jsx("div",{className:"auth-expired-backdrop",children:a.jsxs("section",{className:"auth-expired-dialog",role:"alertdialog","aria-modal":"true","aria-labelledby":"auth-expired-title","aria-describedby":"auth-expired-description",children:[a.jsx("div",{className:"auth-expired-mark","aria-hidden":"true",children:a.jsx(gN,{})}),a.jsxs("div",{className:"auth-expired-copy",children:[a.jsx("h2",{id:"auth-expired-title",children:r("authExpired.title")}),a.jsx("p",{id:"auth-expired-description",children:r("authExpired.description")}),n&&a.jsx("p",{className:"auth-expired-error",role:"alert",children:n})]}),a.jsx("footer",{className:"auth-expired-actions",children:a.jsx("button",{ref:s,type:"button",onClick:i,disabled:t,children:r(t?"authExpired.waiting":"authExpired.signInAgain")})})]})}),document.body):null}const Xun=["slow","crash","incorrect","tool_error","other"];function Yun(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"m7 7 10 10"}),a.jsx("path",{d:"m17 7-10 10"})]})}function Zun(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m5 12.5 4.2 4.2L19 7"})})}function Jun({onClose:e,onSubmit:t}){const{t:n}=Te("feedback"),i=p.useId(),r=p.useId(),s=p.useRef(null),o=p.useRef(null),l=p.useRef(!1),c=p.useRef(e),[u,d]=p.useState(()=>new Set),[f,h]=p.useState(""),[m,g]=p.useState(!1),[b,v]=p.useState(""),[y,w]=p.useState(!1);l.current=m,c.current=e,p.useEffect(()=>{var j;const S=document.body.style.overflow,C=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(j=o.current)==null||j.focus();const E=T=>{var P;if(T.key==="Escape"&&!l.current){T.preventDefault(),c.current();return}if(T.key!=="Tab")return;const R=Array.from(((P=s.current)==null?void 0:P.querySelectorAll("button:not(:disabled), textarea:not(:disabled)"))??[]);if(R.length===0)return;const A=R[0],N=R[R.length-1];T.shiftKey&&document.activeElement===A?(T.preventDefault(),N.focus()):!T.shiftKey&&document.activeElement===N&&(T.preventDefault(),A.focus())};return window.addEventListener("keydown",E),()=>{document.body.style.overflow=S,window.removeEventListener("keydown",E),C!=null&&C.isConnected&&C.focus()}},[]);const x=S=>{d(C=>{const E=new Set(C);return E.has(S)?E.delete(S):E.add(S),E})},O=async()=>{if(!(m||y)){g(!0),v("");try{await t({issues:[...u],description:f.trim()}),w(!0)}catch(S){v(S instanceof Error?S.message:String(S))}finally{g(!1)}}},k=u.size>0||f.trim().length>0;return yi.createPortal(a.jsx("div",{className:"issue-feedback-backdrop",onMouseDown:S=>{S.target===S.currentTarget&&!m&&e()},children:a.jsxs("section",{ref:s,className:"issue-feedback-dialog",role:"dialog","aria-modal":"true","aria-labelledby":i,"aria-describedby":y?`${r}-success`:r,"aria-busy":m||void 0,children:[a.jsxs("header",{className:"issue-feedback-head",children:[a.jsx("h2",{id:i,children:n("title")}),a.jsx("button",{type:"button",className:"issue-feedback-close",onClick:e,disabled:m,"aria-label":n("dialog.close"),children:a.jsx(Yun,{})})]}),y?a.jsxs("div",{className:"issue-feedback-success",role:"status","aria-live":"polite",children:[a.jsx("span",{className:"issue-feedback-success-mark","aria-hidden":"true",children:a.jsx(Zun,{})}),a.jsxs("div",{children:[a.jsx("h3",{children:n("success.title")}),a.jsx("p",{id:`${r}-success`,children:n("success.description")})]})]}):a.jsxs("div",{className:"issue-feedback-body",children:[a.jsx("p",{id:r,className:"issue-feedback-intro",children:n("dialog.intro")}),a.jsx("p",{className:"issue-feedback-privacy",role:"alert",children:n("dialog.privacy")}),a.jsx("div",{className:"issue-feedback-chips","aria-label":n("commonIssues"),children:Xun.map(S=>a.jsx("button",{type:"button",className:"issue-feedback-chip","aria-pressed":u.has(S),onClick:()=>x(S),disabled:m,children:n(`dialog.issues.${S}`)},S))}),a.jsxs("label",{className:"issue-feedback-field",children:[a.jsx("span",{children:n("descriptionLabel")}),a.jsx("textarea",{ref:o,value:f,onChange:S=>h(S.target.value),placeholder:n("dialog.descriptionPlaceholder"),maxLength:4e3,rows:5,disabled:m})]}),b&&a.jsx("p",{className:"issue-feedback-error",role:"alert",children:b})]}),a.jsx("footer",{className:"issue-feedback-actions",children:y?a.jsx("button",{type:"button",className:"is-primary",onClick:e,children:n("done")}):a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",onClick:e,disabled:m,children:n("cancel")}),a.jsx("button",{type:"button",className:"is-primary",onClick:()=>void O(),disabled:!k||m,children:n(m?"submitting":"submit")})]})})]})}),document.body)}function edn(e,t){if(e.match(/^[a-z]+:\/\//i))return e;if(e.match(/^\/\//))return window.location.protocol+e;if(e.match(/^[a-z]+:/i))return e;const n=document.implementation.createHTMLDocument(),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),t&&(i.href=t),r.href=e,r.href}const tdn=(()=>{let e=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(e+=1,`u${t()}${e}`)})();function Qg(e){const t=[];for(let n=0,i=e.length;nau||e.height>au)&&(e.width>au&&e.height>au?e.width>e.height?(e.height*=au/e.width,e.width=au):(e.width*=au/e.height,e.height=au):e.width>au?(e.height*=au/e.width,e.width=au):(e.width*=au/e.height,e.height=au))}function adn(e,t={}){return e.toBlob?new Promise(n=>{e.toBlob(n,t.type?t.type:"image/png",t.quality?t.quality:1)}):new Promise(n=>{const i=window.atob(e.toDataURL(t.type?t.type:void 0,t.quality?t.quality:void 0).split(",")[1]),r=i.length,s=new Uint8Array(r);for(let o=0;o{const i=new Image;i.onload=()=>{i.decode().then(()=>{requestAnimationFrame(()=>t(i))})},i.onerror=n,i.crossOrigin="anonymous",i.decoding="async",i.src=e})}async function odn(e){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function ldn(e,t,n){const i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),s=document.createElementNS(i,"foreignObject");return r.setAttribute("width",`${t}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${t} ${n}`),s.setAttribute("width","100%"),s.setAttribute("height","100%"),s.setAttribute("x","0"),s.setAttribute("y","0"),s.setAttribute("externalResourcesRequired","true"),r.appendChild(s),s.appendChild(e),odn(r)}const Uc=(e,t)=>{if(e instanceof t)return!0;const n=Object.getPrototypeOf(e);return n===null?!1:n.constructor.name===t.name||Uc(n,t)};function cdn(e){const t=e.getPropertyValue("content");return`${e.cssText} content: '${t.replace(/'|"/g,"")}';`}function udn(e,t){return UUe(t).map(n=>{const i=e.getPropertyValue(n),r=e.getPropertyPriority(n);return`${n}: ${i}${r?" !important":""};`}).join(" ")}function ddn(e,t,n,i){const r=`.${e}:${t}`,s=n.cssText?cdn(n):udn(n,i);return document.createTextNode(`${r}{${s}}`)}function eue(e,t,n,i){const r=window.getComputedStyle(e,n),s=r.getPropertyValue("content");if(s===""||s==="none")return;const o=tdn();try{t.className=`${t.className} ${o}`}catch{return}const l=document.createElement("style");l.appendChild(ddn(o,n,r,i)),t.appendChild(l)}function fdn(e,t,n){eue(e,t,":before",n),eue(e,t,":after",n)}const tue="application/font-woff",nue="image/jpeg",hdn={woff:tue,woff2:tue,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:nue,jpeg:nue,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function pdn(e){const t=/\.([^./]*?)$/g.exec(e);return t?t[1]:""}function HK(e){const t=pdn(e).toLowerCase();return hdn[t]||""}function mdn(e){return e.split(/,/)[1]}function EU(e){return e.search(/^(data:)/)!==-1}function gdn(e,t){return`data:${t};base64,${e}`}async function zUe(e,t,n){const i=await fetch(e,t);if(i.status===404)throw new Error(`Resource "${i.url}" not found`);const r=await i.blob();return new Promise((s,o)=>{const l=new FileReader;l.onerror=o,l.onloadend=()=>{try{s(n({res:i,result:l.result}))}catch(c){o(c)}},l.readAsDataURL(r)})}const eF={};function bdn(e,t,n){let i=e.replace(/\?.*/,"");return n&&(i=e),/ttf|otf|eot|woff2?/i.test(i)&&(i=i.replace(/.*\//,"")),t?`[${t}]${i}`:i}async function qK(e,t,n){const i=bdn(e,t,n.includeQueryParams);if(eF[i]!=null)return eF[i];n.cacheBust&&(e+=(/\?/.test(e)?"&":"?")+new Date().getTime());let r;try{const s=await zUe(e,n.fetchRequestInit,({res:o,result:l})=>(t||(t=o.headers.get("Content-Type")||""),mdn(l)));r=gdn(s,t)}catch(s){r=n.imagePlaceholder||"";let o=`Failed to fetch resource: ${e}`;s&&(o=typeof s=="string"?s:s.message),o&&console.warn(o)}return eF[i]=r,r}async function ydn(e){const t=e.toDataURL();return t==="data:,"?e.cloneNode(!1):GP(t)}async function vdn(e,t){if(e.currentSrc){const s=document.createElement("canvas"),o=s.getContext("2d");s.width=e.clientWidth,s.height=e.clientHeight,o==null||o.drawImage(e,0,0,s.width,s.height);const l=s.toDataURL();return GP(l)}const n=e.poster,i=HK(n),r=await qK(n,i,t);return GP(r)}async function xdn(e,t){var n;try{if(!((n=e==null?void 0:e.contentDocument)===null||n===void 0)&&n.body)return await HL(e.contentDocument.body,t,!0)}catch{}return e.cloneNode(!1)}async function wdn(e,t){return Uc(e,HTMLCanvasElement)?ydn(e):Uc(e,HTMLVideoElement)?vdn(e,t):Uc(e,HTMLIFrameElement)?xdn(e,t):e.cloneNode(VUe(e))}const Odn=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SLOT",VUe=e=>e.tagName!=null&&e.tagName.toUpperCase()==="SVG";async function kdn(e,t,n){var i,r;if(VUe(t))return t;let s=[];return Odn(e)&&e.assignedNodes?s=Qg(e.assignedNodes()):Uc(e,HTMLIFrameElement)&&(!((i=e.contentDocument)===null||i===void 0)&&i.body)?s=Qg(e.contentDocument.body.childNodes):s=Qg(((r=e.shadowRoot)!==null&&r!==void 0?r:e).childNodes),s.length===0||Uc(e,HTMLVideoElement)||await s.reduce((o,l)=>o.then(()=>HL(l,n)).then(c=>{c&&t.appendChild(c)}),Promise.resolve()),t}function Sdn(e,t,n){const i=t.style;if(!i)return;const r=window.getComputedStyle(e);r.cssText?(i.cssText=r.cssText,i.transformOrigin=r.transformOrigin):UUe(n).forEach(s=>{let o=r.getPropertyValue(s);s==="font-size"&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),Uc(e,HTMLIFrameElement)&&s==="display"&&o==="inline"&&(o="block"),s==="d"&&t.getAttribute("d")&&(o=`path(${t.getAttribute("d")})`),i.setProperty(s,o,r.getPropertyPriority(s))})}function Edn(e,t){Uc(e,HTMLTextAreaElement)&&(t.innerHTML=e.value),Uc(e,HTMLInputElement)&&t.setAttribute("value",e.value)}function Cdn(e,t){if(Uc(e,HTMLSelectElement)){const n=t,i=Array.from(n.children).find(r=>e.value===r.getAttribute("value"));i&&i.setAttribute("selected","")}}function Adn(e,t,n){return Uc(t,Element)&&(Sdn(e,t,n),fdn(e,t,n),Edn(e,t),Cdn(e,t)),t}async function Tdn(e,t){const n=e.querySelectorAll?e.querySelectorAll("use"):[];if(n.length===0)return e;const i={};for(let s=0;swdn(i,t)).then(i=>kdn(e,i,t)).then(i=>Adn(e,i,t)).then(i=>Tdn(i,t))}const HUe=/url\((['"]?)([^'"]+?)\1\)/g,_dn=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,jdn=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function Ndn(e){const t=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function Rdn(e){const t=[];return e.replace(HUe,(n,i,r)=>(t.push(r),n)),t.filter(n=>!EU(n))}async function Idn(e,t,n,i,r){try{const s=n?edn(t,n):t,o=HK(t);let l;return r||(l=await qK(s,o,i)),e.replace(Ndn(t),`$1${l}$3`)}catch{}return e}function Pdn(e,{preferredFontFormat:t}){return t?e.replace(jdn,n=>{for(;;){const[i,,r]=_dn.exec(n)||[];if(!r)return"";if(r===t)return`src: ${i};`}}):e}function qUe(e){return e.search(HUe)!==-1}async function WUe(e,t,n){if(!qUe(e))return e;const i=Pdn(e,n);return Rdn(i).reduce((s,o)=>s.then(l=>Idn(l,o,t,n)),Promise.resolve(i))}async function Jv(e,t,n){var i;const r=(i=t.style)===null||i===void 0?void 0:i.getPropertyValue(e);if(r){const s=await WUe(r,null,n);return t.style.setProperty(e,s,t.style.getPropertyPriority(e)),!0}return!1}async function Ddn(e,t){await Jv("background",e,t)||await Jv("background-image",e,t),await Jv("mask",e,t)||await Jv("-webkit-mask",e,t)||await Jv("mask-image",e,t)||await Jv("-webkit-mask-image",e,t)}async function Mdn(e,t){const n=Uc(e,HTMLImageElement);if(!(n&&!EU(e.src))&&!(Uc(e,SVGImageElement)&&!EU(e.href.baseVal)))return;const i=n?e.src:e.href.baseVal,r=await qK(i,HK(i),t);await new Promise((s,o)=>{e.onload=s,e.onerror=t.onImageErrorHandler?(...c)=>{try{s(t.onImageErrorHandler(...c))}catch(u){o(u)}}:o;const l=e;l.decode&&(l.decode=s),l.loading==="lazy"&&(l.loading="eager"),n?(e.srcset="",e.src=r):e.href.baseVal=r})}async function Ldn(e,t){const i=Qg(e.childNodes).map(r=>KUe(r,t));await Promise.all(i).then(()=>e)}async function KUe(e,t){Uc(e,Element)&&(await Ddn(e,t),await Mdn(e,t),await Ldn(e,t))}function $dn(e,t){const{style:n}=e;t.backgroundColor&&(n.backgroundColor=t.backgroundColor),t.width&&(n.width=`${t.width}px`),t.height&&(n.height=`${t.height}px`);const i=t.style;return i!=null&&Object.keys(i).forEach(r=>{n[r]=i[r]}),e}const iue={};async function rue(e){let t=iue[e];if(t!=null)return t;const i=await(await fetch(e)).text();return t={url:e,cssText:i},iue[e]=t,t}async function sue(e,t){let n=e.cssText;const i=/url\(["']?([^"')]+)["']?\)/g,s=(n.match(/url\([^)]+\)/g)||[]).map(async o=>{let l=o.replace(i,"$1");return l.startsWith("https://")||(l=new URL(l,e.url).href),zUe(l,t.fetchRequestInit,({result:c})=>(n=n.replace(o,`url(${c})`),[o,c]))});return Promise.all(s).then(()=>n)}function aue(e){if(e==null)return[];const t=[],n=/(\/\*[\s\S]*?\*\/)/gi;let i=e.replace(n,"");const r=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const c=r.exec(i);if(c===null)break;t.push(c[0])}i=i.replace(r,"");const s=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",l=new RegExp(o,"gi");for(;;){let c=s.exec(i);if(c===null){if(c=l.exec(i),c===null)break;s.lastIndex=l.lastIndex}else l.lastIndex=s.lastIndex;t.push(c[0])}return t}async function Fdn(e,t){const n=[],i=[];return e.forEach(r=>{if("cssRules"in r)try{Qg(r.cssRules||[]).forEach((s,o)=>{if(s.type===CSSRule.IMPORT_RULE){let l=o+1;const c=s.href,u=rue(c).then(d=>sue(d,t)).then(d=>aue(d).forEach(f=>{try{r.insertRule(f,f.startsWith("@import")?l+=1:r.cssRules.length)}catch(h){console.error("Error inserting rule from remote css",{rule:f,error:h})}})).catch(d=>{console.error("Error loading remote css",d.toString())});i.push(u)}})}catch(s){const o=e.find(l=>l.href==null)||document.styleSheets[0];r.href!=null&&i.push(rue(r.href).then(l=>sue(l,t)).then(l=>aue(l).forEach(c=>{o.insertRule(c,o.cssRules.length)})).catch(l=>{console.error("Error loading remote stylesheet",l)})),console.error("Error inlining remote css file",s)}}),Promise.all(i).then(()=>(e.forEach(r=>{if("cssRules"in r)try{Qg(r.cssRules||[]).forEach(s=>{n.push(s)})}catch(s){console.error(`Error while reading CSS rules from ${r.href}`,s)}}),n))}function Bdn(e){return e.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>qUe(t.style.getPropertyValue("src")))}async function Udn(e,t){if(e.ownerDocument==null)throw new Error("Provided element is not within a Document");const n=Qg(e.ownerDocument.styleSheets),i=await Fdn(n,t);return Bdn(i)}function GUe(e){return e.trim().replace(/["']/g,"")}function Qdn(e){const t=new Set;function n(i){(i.style.fontFamily||getComputedStyle(i).fontFamily).split(",").forEach(s=>{t.add(GUe(s))}),Array.from(i.children).forEach(s=>{s instanceof HTMLElement&&n(s)})}return n(e),t}async function XUe(e,t){const n=await Udn(e,t),i=Qdn(e);return(await Promise.all(n.filter(s=>i.has(GUe(s.style.fontFamily))).map(s=>{const o=s.parentStyleSheet?s.parentStyleSheet.href:null;return WUe(s.cssText,o,t)}))).join(` -`)}async function zdn(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await XUe(e,t);if(n){const i=document.createElement("style"),r=document.createTextNode(n);i.appendChild(r),e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}}async function Vdn(e,t={}){const{width:n,height:i}=QUe(e,t),r=await HL(e,t,!0);return await zdn(r,t),await KUe(r,t),$dn(r,t),await ldn(r,n,i)}async function Hdn(e,t={}){const{width:n,height:i}=QUe(e,t),r=await Vdn(e,t),s=await GP(r),o=document.createElement("canvas"),l=o.getContext("2d"),c=t.pixelRatio||rdn(),u=t.canvasWidth||n,d=t.canvasHeight||i;return o.width=u*c,o.height=d*c,t.skipAutoScale||sdn(o),o.style.width=`${u}`,o.style.height=`${d}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,o.width,o.height)),l.drawImage(s,0,0,o.width,o.height),o}async function qdn(e,t={}){const n=await Hdn(e,t);return await adn(n)}async function Wdn(e,t={}){return XUe(e,t)}const Kdn=816,oR=1154,Gdn=12e3,Xdn=.72,Ydn=oR*1.12,$j=10,YUe=[".turn--user",".turn--assistant",".codex-sandbox-run__event",".block-tool",".block-thinking",".block-progress",".block-plan",".tool-result",".share-message-export-note","p","pre","li"].join(", ");function Zdn(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}function Jdn(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"m7 7 10 10"}),a.jsx("path",{d:"m17 7-10 10"})]})}function efn(){const e=getComputedStyle(document.documentElement).getPropertyValue("--background").trim();return e?`hsl(${e})`:"white"}function tfn(e){const t=e.closest(".transcript");if(!t)return[e];const n=Array.from(t.children).filter(r=>r instanceof HTMLElement&&r.matches(".turn--user, .turn--assistant")),i=n.indexOf(e);return i>=0?n.slice(0,i+1):[e]}function nfn(e){e.querySelectorAll(".block-tool, .block-thinking, .block-progress, .block-plan").forEach(t=>{t.style.opacity="1",t.style.transform="none",t.style.animation="none"}),e.querySelectorAll(".think-collapse").forEach(t=>{t.classList.add("open"),t.style.gridTemplateRows="1fr",t.style.transition="none"}),e.querySelectorAll(".codex-sandbox-run__stream, .think-body, .tool-result").forEach(t=>{t.style.height="auto",t.style.maxHeight="none",t.style.overflow="visible",t.scrollTop=0,t.scrollLeft=0}),e.querySelectorAll(".tool-args").forEach(t=>{t.style.maxWidth="100%",t.style.overflowWrap="anywhere",t.style.whiteSpace="pre-wrap"}),e.querySelectorAll(".think-collapse-inner").forEach(t=>{t.style.height="auto",t.style.overflow="visible"})}function ifn(e){e.querySelectorAll(".codex-sandbox-run").forEach(t=>{var n,i;(i=(n=t.parentElement)==null?void 0:n.querySelector(":scope > .tool-detail"))==null||i.remove()})}function rfn(e){const t=document.createElement("section");t.className="share-message-export",t.setAttribute("aria-hidden","true");for(const i of tfn(e)){const r=i.cloneNode(!0);r.removeAttribute("data-share-message-source"),r.classList.remove("is-feedback-target"),r.style.opacity="1",r.style.transform="none",r.style.animation="none",r.querySelectorAll("[data-share-image-exclude]").forEach(s=>s.remove()),nfn(r),ifn(r),t.append(r)}const n=document.createElement("p");return n.className="share-message-export-note",n.textContent=bn.t("share.exportNote",{ns:"conversation"}),t.append(n),document.body.append(t),t}function sfn(e){const t=Math.max(1,Math.ceil(e.scrollHeight)),n=e.getBoundingClientRect().top,i=Array.from(e.querySelectorAll(YUe)).map(o=>{const l=o.getBoundingClientRect();return{top:Math.floor(l.top-n),bottom:Math.ceil(l.bottom-n),height:Math.ceil(l.height)}}).filter(({bottom:o,height:l})=>o>0&&o0).sort((o,l)=>o.bottom-l.bottom),r=[];let s=0;for(;sh.top>=c&&h.top>s&&h.topl&&h.height<=oR?f===void 0?h.top:Math.min(f,h.top):f,void 0)??i.reduce((f,h)=>h.bottom>=c&&h.bottom<=l?h.bottom:f,l);r.push({top:s,height:Math.max(1,d-s)}),s=d}return r}function afn(e){const t=[];for(const n of e){const i=t[t.length-1],r=n.top+n.height;i&&r-i.top<=Gdn?(i.pages.push(n),i.height=r-i.top):t.push({top:n.top,height:n.height,pages:[n]})}return t}function ofn(e){const t=e.getBoundingClientRect().top,n=new WeakMap;return e.querySelectorAll("*").forEach(i=>{const r=i.getBoundingClientRect();n.set(i,{top:r.top-t,bottom:r.bottom-t,height:r.height,position:getComputedStyle(i).position})}),n}function ZUe(e,t,n,i){if(e.matches(YUe))return;const r=Array.from(e.children).filter(l=>l instanceof HTMLElement),s=Array.from(t.children).filter(l=>l instanceof HTMLElement),o=n.top+n.height;for(let l=r.length-1;l>=0;l-=1){const c=r[l],u=s[l],d=i.get(c);if(!u||!d)continue;if(d.bottom>n.top&&d.top{e.toBlob(i=>{i?t(i):n(new Error(bn.t("share.imageFailed",{ns:"conversation"})))},"image/png")})}async function ufn(e,t,n){const i=await createImageBitmap(e),r=i.width/t,s=i.height/n.height,o=[];try{for(const l of n.pages){const c=document.createElement("canvas");c.width=t,c.height=l.height;const u=c.getContext("2d");if(!u)throw new Error(bn.t("share.browserUnsupported",{ns:"conversation"}));u.drawImage(i,0,(l.top-n.top)*s,t*r,l.height*s,0,0,t,l.height),o.push({blob:await cfn(c),width:t,height:l.height}),c.width=0,c.height=0}}finally{i.close()}return o}async function dfn(e){var n;(n=document.fonts)!=null&&n.ready&&await document.fonts.ready;const t=rfn(e);try{const i=Math.max(Kdn,Math.ceil(t.scrollWidth)),r=sfn(t),s=afn(r),o=ofn(t),l=await Wdn(t),c=[];for(const[u,d]of s.entries()){const f=lfn(t,d,u+1,s.length,o);try{const h=await qdn(f,{width:i,height:d.height,pixelRatio:1,backgroundColor:efn(),fontEmbedCSS:l,style:{position:"static",top:"auto",left:"auto",width:`${i}px`,height:`${d.height}px`,margin:"0",overflow:"hidden",animation:"none"}});if(!h)throw new Error(bn.t("share.imageFailed",{ns:"conversation"}));c.push(...await ufn(h,i,d))}finally{f.remove()}}return c}finally{t.remove()}}function ffn(e){return`agentkit-conversation-${e}.pdf`}function JUe(e,t,n){const i=Math.max(2,String(t).length);return`agentkit-conversation-${n}-page-${String(e).padStart(i,"0")}.png`}function hfn(e){return`agentkit-conversation-${e}-png-pages.zip`}const pfn=Array.from({length:256},(e,t)=>{let n=t;for(let i=0;i<8;i+=1)n=n&1?3988292384^n>>>1:n>>>1;return n>>>0});function mfn(e){let t=4294967295;for(const n of e)t=pfn[(t^n)&255]^t>>>8;return(t^4294967295)>>>0}async function gfn(e,t){const n=new TextEncoder,i=[],r=[];let s=0,o=0;for(const[u,d]of e.entries()){const f=JUe(u+1,e.length,t),h=n.encode(f),m=new Uint8Array(await d.blob.arrayBuffer()),g=mfn(m),b=new ArrayBuffer(30),v=new DataView(b);v.setUint32(0,67324752,!0),v.setUint16(4,20,!0),v.setUint16(6,2048,!0),v.setUint16(8,0,!0),v.setUint32(14,g,!0),v.setUint32(18,m.byteLength,!0),v.setUint32(22,m.byteLength,!0),v.setUint16(26,h.byteLength,!0),i.push(b,h,m);const y=new ArrayBuffer(46),w=new DataView(y);w.setUint32(0,33639248,!0),w.setUint16(4,20,!0),w.setUint16(6,20,!0),w.setUint16(8,2048,!0),w.setUint16(10,0,!0),w.setUint32(16,g,!0),w.setUint32(20,m.byteLength,!0),w.setUint32(24,m.byteLength,!0),w.setUint16(28,h.byteLength,!0),w.setUint32(42,s,!0),r.push(y,h),s+=30+h.byteLength+m.byteLength,o+=46+h.byteLength}const l=new ArrayBuffer(22),c=new DataView(l);return c.setUint32(0,101010256,!0),c.setUint16(8,e.length,!0),c.setUint16(10,e.length,!0),c.setUint32(12,o,!0),c.setUint32(16,s,!0),new Blob([...i,...r,l],{type:"application/zip"})}async function bfn(e){const{jsPDF:t}=await Zs(async()=>{const{jsPDF:l}=await import("../chunks/jspdf.es.min-CdGYO913.js").then(c=>c.j);return{jsPDF:l}},[]),n=new t({orientation:"portrait",unit:"mm",format:"a4",compress:!0}),i=n.internal.pageSize.getWidth(),r=n.internal.pageSize.getHeight(),s=i-$j*2,o=r-$j*2;for(const[l,c]of e.entries()){const u=new Uint8Array(await c.blob.arrayBuffer()),d=Math.min(s/c.width,o/c.height),f=c.width*d,h=c.height*d;l>0&&n.addPage(),n.addImage(u,"PNG",$j+(s-f)/2,$j,f,h,`conversation-export-${l}`,"FAST")}return new Blob([n.output("arraybuffer")],{type:"application/pdf"})}function tF(e,t){const n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=t,i.style.display="none",document.body.append(i),i.click(),i.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)}function yfn({targetTurn:e,onClose:t}){const{t:n}=Te("conversation"),i=p.useId(),r=p.useId(),s=p.useId(),o=p.useRef(null),l=p.useRef(null),c=p.useRef(t),u=p.useRef(void 0),d=p.useRef(!0),[f,h]=p.useState("generating"),[m,g]=p.useState(0),[b,v]=p.useState([]),[y,w]=p.useState(""),[x,O]=p.useState(""),[k,S]=p.useState("idle"),[C,E]=p.useState("idle"),[j,T]=p.useState("png");c.current=t,p.useEffect(()=>{var L;d.current=!0;const I=document.body.style.overflow,D=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(L=l.current)==null||L.focus();const _=F=>{var U;if(F.key==="Escape"){F.preventDefault(),c.current();return}if(F.key!=="Tab")return;const M=Array.from(((U=o.current)==null?void 0:U.querySelectorAll("button:not(:disabled)"))??[]);if(M.length===0)return;const V=M[0],q=M[M.length-1];F.shiftKey&&document.activeElement===V?(F.preventDefault(),q.focus()):!F.shiftKey&&document.activeElement===q&&(F.preventDefault(),V.focus())};return window.addEventListener("keydown",_),()=>{d.current=!1,document.body.style.overflow=I,window.removeEventListener("keydown",_),u.current!==void 0&&window.clearTimeout(u.current),D!=null&&D.isConnected&&D.focus()}},[]),p.useEffect(()=>{let I=!1,D="";return h("generating"),v([]),w(""),O(""),S("idle"),(async()=>{try{if(await Zdn(),I)return;const L=await dfn(e);if(L.length===0)throw new Error(n("share.imageFailed"));if(D=URL.createObjectURL(L[0].blob),I){URL.revokeObjectURL(D);return}v(L),w(D),h("ready")}catch(L){if(I)return;h("error"),O(L instanceof Error?L.message:String(L))}})(),()=>{I=!0,D&&URL.revokeObjectURL(D)}},[m,e]);const R=async()=>{var D;const I=b[0];if(!(!I||k==="copying")){S("copying"),O("");try{if(!((D=navigator.clipboard)!=null&&D.write)||typeof ClipboardItem>"u")throw new Error(n("share.copyUnsupported"));await navigator.clipboard.write([new ClipboardItem({"image/png":I.blob})]),S("copied"),u.current=window.setTimeout(()=>S("idle"),1500)}catch(_){S("idle"),O(_ instanceof Error?_.message:String(_))}}},A=I=>{T(I),S("idle"),O("")},N=(I,D)=>{var V,q;const _=["png","pdf"],L=_.indexOf(D);let F=L;if(I.key==="ArrowRight"||I.key==="ArrowDown")F=(L+1)%_.length;else if(I.key==="ArrowLeft"||I.key==="ArrowUp")F=(L-1+_.length)%_.length;else if(I.key==="Home")F=0;else if(I.key==="End")F=_.length-1;else return;I.preventDefault();const M=_[F];A(M),(q=(V=o.current)==null?void 0:V.querySelector(`[data-export-format="${M}"]`))==null||q.focus()},P=async()=>{if(!(b.length===0||C==="downloading")){E("downloading"),O("");try{const I=new Date().toISOString().replace(/[:.]/g,"-");if(j==="pdf"){const D=await bfn(b);tF(D,ffn(I))}else if(b.length===1)tF(b[0].blob,JUe(1,1,I));else{const D=await gfn(b,I);tF(D,hfn(I))}}catch(I){d.current&&O(I instanceof Error?I.message:n("share.exportFailed"))}finally{d.current&&E("idle")}}};return yi.createPortal(a.jsx("div",{className:"share-message-backdrop",onMouseDown:I=>{I.target===I.currentTarget&&t()},children:a.jsxs("section",{ref:o,className:"share-message-dialog",role:"dialog","aria-modal":"true","aria-labelledby":i,"aria-describedby":r,"aria-busy":f==="generating"||C==="downloading",children:[a.jsxs("header",{className:"share-message-head",children:[a.jsxs("div",{children:[a.jsx("h2",{id:i,children:n("share.title")}),a.jsx("p",{id:r,children:n("share.description")})]}),a.jsx("button",{ref:l,type:"button",className:"share-message-close","aria-label":n("share.close"),title:n("share.close"),onClick:t,children:a.jsx(Jdn,{})})]}),a.jsxs("div",{className:"share-message-body",children:[f==="generating"?a.jsx("div",{className:"share-message-generating",role:"status",children:a.jsx(fn,{children:n("share.generatingContent")})}):f==="error"?a.jsxs("div",{className:"share-message-failure",children:[a.jsx("p",{role:"alert",children:x||n("share.imageFailed")}),a.jsx("button",{type:"button",onClick:()=>g(I=>I+1),children:n("share.retry")})]}):a.jsxs("figure",{className:"share-message-preview",children:[a.jsx("figcaption",{className:"share-message-preview-meta",children:n("share.previewPage",{count:b.length})}),a.jsx("img",{src:y,alt:n("share.previewAlt",{count:b.length})})]}),f!=="error"&&x&&a.jsx("p",{className:"share-message-error",role:"alert",children:x})]}),a.jsxs("div",{className:"share-message-options",children:[a.jsx("span",{id:s,className:"share-message-format-label",children:n("share.format")}),a.jsx("div",{className:"share-message-format",role:"radiogroup","aria-labelledby":s,children:["png","pdf"].map(I=>a.jsx("button",{type:"button",role:"radio","data-export-format":I,className:j===I?"is-active":"","aria-checked":j===I,tabIndex:j===I?0:-1,disabled:C==="downloading",onClick:()=>A(I),onKeyDown:D=>N(D,I),children:I.toUpperCase()},I))})]}),a.jsxs("footer",{className:"share-message-actions",children:[a.jsx("span",{className:"share-message-download-status","aria-live":"polite",children:C==="downloading"?n("share.generatingFormat",{format:j.toUpperCase()}):""}),j==="png"&&a.jsx("button",{type:"button",onClick:()=>void R(),disabled:b.length===0||f!=="ready"||k==="copying",children:k==="copying"?n("share.copying"):k==="copied"?b.length>1?n("share.copiedFirst"):n("share.copied"):b.length>1?n("share.copyFirst"):n("share.copyImage")}),a.jsx("button",{type:"button",className:"is-primary",onClick:()=>void P(),disabled:b.length===0||f!=="ready"||C==="downloading",children:C==="downloading"?n("share.generating"):j==="png"&&b.length>1?n("share.downloadArchive",{count:b.length}):n("share.downloadFormat",{format:j.toUpperCase()})})]})]})}),document.body)}const vfn=2e3,xfn=700,eQe=1200;function WK(e,t){const n=Array.from(e);return n.length<=t?e:`${n.slice(0,t-1).join("").trimEnd()}…`}function tQe(e){return WK(e.trim(),xfn)}function nQe(e){return WK(e,eQe)}function oue(e){return e.trim().length>0}function wfn(e,t,n={selectedExcerpt:"选中片段",annotation:"批注",separator:":"}){const i=tQe(e),r=nQe(t.trim());return WK(`${n.selectedExcerpt}${n.separator}${i} +`)}async function zdn(e,t){const n=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await XUe(e,t);if(n){const i=document.createElement("style"),r=document.createTextNode(n);i.appendChild(r),e.firstChild?e.insertBefore(i,e.firstChild):e.appendChild(i)}}async function Vdn(e,t={}){const{width:n,height:i}=QUe(e,t),r=await HL(e,t,!0);return await zdn(r,t),await KUe(r,t),$dn(r,t),await ldn(r,n,i)}async function Hdn(e,t={}){const{width:n,height:i}=QUe(e,t),r=await Vdn(e,t),s=await GP(r),o=document.createElement("canvas"),l=o.getContext("2d"),c=t.pixelRatio||rdn(),u=t.canvasWidth||n,d=t.canvasHeight||i;return o.width=u*c,o.height=d*c,t.skipAutoScale||sdn(o),o.style.width=`${u}`,o.style.height=`${d}`,t.backgroundColor&&(l.fillStyle=t.backgroundColor,l.fillRect(0,0,o.width,o.height)),l.drawImage(s,0,0,o.width,o.height),o}async function qdn(e,t={}){const n=await Hdn(e,t);return await adn(n)}async function Wdn(e,t={}){return XUe(e,t)}const Kdn=816,oR=1154,Gdn=12e3,Xdn=.72,Ydn=oR*1.12,$j=10,YUe=[".turn--user",".turn--assistant",".codex-sandbox-run__event",".block-tool",".block-thinking",".block-progress",".block-plan",".tool-result",".share-message-export-note","p","pre","li"].join(", ");function Zdn(){return new Promise(e=>{window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>e())})})}function Jdn(e){return a.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round","aria-hidden":"true",...e,children:[a.jsx("path",{d:"m7 7 10 10"}),a.jsx("path",{d:"m17 7-10 10"})]})}function efn(){const e=getComputedStyle(document.documentElement).getPropertyValue("--background").trim();return e?`hsl(${e})`:"white"}function tfn(e){const t=e.closest(".transcript");if(!t)return[e];const n=Array.from(t.children).filter(r=>r instanceof HTMLElement&&r.matches(".turn--user, .turn--assistant")),i=n.indexOf(e);return i>=0?n.slice(0,i+1):[e]}function nfn(e){e.querySelectorAll(".block-tool, .block-thinking, .block-progress, .block-plan").forEach(t=>{t.style.opacity="1",t.style.transform="none",t.style.animation="none"}),e.querySelectorAll(".think-collapse").forEach(t=>{t.classList.add("open"),t.style.gridTemplateRows="1fr",t.style.transition="none"}),e.querySelectorAll(".codex-sandbox-run__stream, .think-body, .tool-result").forEach(t=>{t.style.height="auto",t.style.maxHeight="none",t.style.overflow="visible",t.scrollTop=0,t.scrollLeft=0}),e.querySelectorAll(".tool-args").forEach(t=>{t.style.maxWidth="100%",t.style.overflowWrap="anywhere",t.style.whiteSpace="pre-wrap"}),e.querySelectorAll(".think-collapse-inner").forEach(t=>{t.style.height="auto",t.style.overflow="visible"})}function ifn(e){e.querySelectorAll(".codex-sandbox-run").forEach(t=>{var n,i;(i=(n=t.parentElement)==null?void 0:n.querySelector(":scope > .tool-detail"))==null||i.remove()})}function rfn(e){const t=document.createElement("section");t.className="share-message-export",t.setAttribute("aria-hidden","true");for(const i of tfn(e)){const r=i.cloneNode(!0);r.removeAttribute("data-share-message-source"),r.classList.remove("is-feedback-target"),r.style.opacity="1",r.style.transform="none",r.style.animation="none",r.querySelectorAll("[data-share-image-exclude]").forEach(s=>s.remove()),nfn(r),ifn(r),t.append(r)}const n=document.createElement("p");return n.className="share-message-export-note",n.textContent=bn.t("share.exportNote",{ns:"conversation"}),t.append(n),document.body.append(t),t}function sfn(e){const t=Math.max(1,Math.ceil(e.scrollHeight)),n=e.getBoundingClientRect().top,i=Array.from(e.querySelectorAll(YUe)).map(o=>{const l=o.getBoundingClientRect();return{top:Math.floor(l.top-n),bottom:Math.ceil(l.bottom-n),height:Math.ceil(l.height)}}).filter(({bottom:o,height:l})=>o>0&&o0).sort((o,l)=>o.bottom-l.bottom),r=[];let s=0;for(;sh.top>=c&&h.top>s&&h.topl&&h.height<=oR?f===void 0?h.top:Math.min(f,h.top):f,void 0)??i.reduce((f,h)=>h.bottom>=c&&h.bottom<=l?h.bottom:f,l);r.push({top:s,height:Math.max(1,d-s)}),s=d}return r}function afn(e){const t=[];for(const n of e){const i=t[t.length-1],r=n.top+n.height;i&&r-i.top<=Gdn?(i.pages.push(n),i.height=r-i.top):t.push({top:n.top,height:n.height,pages:[n]})}return t}function ofn(e){const t=e.getBoundingClientRect().top,n=new WeakMap;return e.querySelectorAll("*").forEach(i=>{const r=i.getBoundingClientRect();n.set(i,{top:r.top-t,bottom:r.bottom-t,height:r.height,position:getComputedStyle(i).position})}),n}function ZUe(e,t,n,i){if(e.matches(YUe))return;const r=Array.from(e.children).filter(l=>l instanceof HTMLElement),s=Array.from(t.children).filter(l=>l instanceof HTMLElement),o=n.top+n.height;for(let l=r.length-1;l>=0;l-=1){const c=r[l],u=s[l],d=i.get(c);if(!u||!d)continue;if(d.bottom>n.top&&d.top{e.toBlob(i=>{i?t(i):n(new Error(bn.t("share.imageFailed",{ns:"conversation"})))},"image/png")})}async function ufn(e,t,n){const i=await createImageBitmap(e),r=i.width/t,s=i.height/n.height,o=[];try{for(const l of n.pages){const c=document.createElement("canvas");c.width=t,c.height=l.height;const u=c.getContext("2d");if(!u)throw new Error(bn.t("share.browserUnsupported",{ns:"conversation"}));u.drawImage(i,0,(l.top-n.top)*s,t*r,l.height*s,0,0,t,l.height),o.push({blob:await cfn(c),width:t,height:l.height}),c.width=0,c.height=0}}finally{i.close()}return o}async function dfn(e){var n;(n=document.fonts)!=null&&n.ready&&await document.fonts.ready;const t=rfn(e);try{const i=Math.max(Kdn,Math.ceil(t.scrollWidth)),r=sfn(t),s=afn(r),o=ofn(t),l=await Wdn(t),c=[];for(const[u,d]of s.entries()){const f=lfn(t,d,u+1,s.length,o);try{const h=await qdn(f,{width:i,height:d.height,pixelRatio:1,backgroundColor:efn(),fontEmbedCSS:l,style:{position:"static",top:"auto",left:"auto",width:`${i}px`,height:`${d.height}px`,margin:"0",overflow:"hidden",animation:"none"}});if(!h)throw new Error(bn.t("share.imageFailed",{ns:"conversation"}));c.push(...await ufn(h,i,d))}finally{f.remove()}}return c}finally{t.remove()}}function ffn(e){return`agentkit-conversation-${e}.pdf`}function JUe(e,t,n){const i=Math.max(2,String(t).length);return`agentkit-conversation-${n}-page-${String(e).padStart(i,"0")}.png`}function hfn(e){return`agentkit-conversation-${e}-png-pages.zip`}const pfn=Array.from({length:256},(e,t)=>{let n=t;for(let i=0;i<8;i+=1)n=n&1?3988292384^n>>>1:n>>>1;return n>>>0});function mfn(e){let t=4294967295;for(const n of e)t=pfn[(t^n)&255]^t>>>8;return(t^4294967295)>>>0}async function gfn(e,t){const n=new TextEncoder,i=[],r=[];let s=0,o=0;for(const[u,d]of e.entries()){const f=JUe(u+1,e.length,t),h=n.encode(f),m=new Uint8Array(await d.blob.arrayBuffer()),g=mfn(m),b=new ArrayBuffer(30),v=new DataView(b);v.setUint32(0,67324752,!0),v.setUint16(4,20,!0),v.setUint16(6,2048,!0),v.setUint16(8,0,!0),v.setUint32(14,g,!0),v.setUint32(18,m.byteLength,!0),v.setUint32(22,m.byteLength,!0),v.setUint16(26,h.byteLength,!0),i.push(b,h,m);const y=new ArrayBuffer(46),w=new DataView(y);w.setUint32(0,33639248,!0),w.setUint16(4,20,!0),w.setUint16(6,20,!0),w.setUint16(8,2048,!0),w.setUint16(10,0,!0),w.setUint32(16,g,!0),w.setUint32(20,m.byteLength,!0),w.setUint32(24,m.byteLength,!0),w.setUint16(28,h.byteLength,!0),w.setUint32(42,s,!0),r.push(y,h),s+=30+h.byteLength+m.byteLength,o+=46+h.byteLength}const l=new ArrayBuffer(22),c=new DataView(l);return c.setUint32(0,101010256,!0),c.setUint16(8,e.length,!0),c.setUint16(10,e.length,!0),c.setUint32(12,o,!0),c.setUint32(16,s,!0),new Blob([...i,...r,l],{type:"application/zip"})}async function bfn(e){const{jsPDF:t}=await Zs(async()=>{const{jsPDF:l}=await import("../chunks/jspdf.es.min-USQmc3i1.js").then(c=>c.j);return{jsPDF:l}},[]),n=new t({orientation:"portrait",unit:"mm",format:"a4",compress:!0}),i=n.internal.pageSize.getWidth(),r=n.internal.pageSize.getHeight(),s=i-$j*2,o=r-$j*2;for(const[l,c]of e.entries()){const u=new Uint8Array(await c.blob.arrayBuffer()),d=Math.min(s/c.width,o/c.height),f=c.width*d,h=c.height*d;l>0&&n.addPage(),n.addImage(u,"PNG",$j+(s-f)/2,$j,f,h,`conversation-export-${l}`,"FAST")}return new Blob([n.output("arraybuffer")],{type:"application/pdf"})}function tF(e,t){const n=URL.createObjectURL(e),i=document.createElement("a");i.href=n,i.download=t,i.style.display="none",document.body.append(i),i.click(),i.remove(),window.setTimeout(()=>URL.revokeObjectURL(n),1e3)}function yfn({targetTurn:e,onClose:t}){const{t:n}=Te("conversation"),i=p.useId(),r=p.useId(),s=p.useId(),o=p.useRef(null),l=p.useRef(null),c=p.useRef(t),u=p.useRef(void 0),d=p.useRef(!0),[f,h]=p.useState("generating"),[m,g]=p.useState(0),[b,v]=p.useState([]),[y,w]=p.useState(""),[x,O]=p.useState(""),[k,S]=p.useState("idle"),[C,E]=p.useState("idle"),[j,T]=p.useState("png");c.current=t,p.useEffect(()=>{var L;d.current=!0;const I=document.body.style.overflow,D=document.activeElement instanceof HTMLElement?document.activeElement:null;document.body.style.overflow="hidden",(L=l.current)==null||L.focus();const _=F=>{var U;if(F.key==="Escape"){F.preventDefault(),c.current();return}if(F.key!=="Tab")return;const M=Array.from(((U=o.current)==null?void 0:U.querySelectorAll("button:not(:disabled)"))??[]);if(M.length===0)return;const V=M[0],q=M[M.length-1];F.shiftKey&&document.activeElement===V?(F.preventDefault(),q.focus()):!F.shiftKey&&document.activeElement===q&&(F.preventDefault(),V.focus())};return window.addEventListener("keydown",_),()=>{d.current=!1,document.body.style.overflow=I,window.removeEventListener("keydown",_),u.current!==void 0&&window.clearTimeout(u.current),D!=null&&D.isConnected&&D.focus()}},[]),p.useEffect(()=>{let I=!1,D="";return h("generating"),v([]),w(""),O(""),S("idle"),(async()=>{try{if(await Zdn(),I)return;const L=await dfn(e);if(L.length===0)throw new Error(n("share.imageFailed"));if(D=URL.createObjectURL(L[0].blob),I){URL.revokeObjectURL(D);return}v(L),w(D),h("ready")}catch(L){if(I)return;h("error"),O(L instanceof Error?L.message:String(L))}})(),()=>{I=!0,D&&URL.revokeObjectURL(D)}},[m,e]);const R=async()=>{var D;const I=b[0];if(!(!I||k==="copying")){S("copying"),O("");try{if(!((D=navigator.clipboard)!=null&&D.write)||typeof ClipboardItem>"u")throw new Error(n("share.copyUnsupported"));await navigator.clipboard.write([new ClipboardItem({"image/png":I.blob})]),S("copied"),u.current=window.setTimeout(()=>S("idle"),1500)}catch(_){S("idle"),O(_ instanceof Error?_.message:String(_))}}},A=I=>{T(I),S("idle"),O("")},N=(I,D)=>{var V,q;const _=["png","pdf"],L=_.indexOf(D);let F=L;if(I.key==="ArrowRight"||I.key==="ArrowDown")F=(L+1)%_.length;else if(I.key==="ArrowLeft"||I.key==="ArrowUp")F=(L-1+_.length)%_.length;else if(I.key==="Home")F=0;else if(I.key==="End")F=_.length-1;else return;I.preventDefault();const M=_[F];A(M),(q=(V=o.current)==null?void 0:V.querySelector(`[data-export-format="${M}"]`))==null||q.focus()},P=async()=>{if(!(b.length===0||C==="downloading")){E("downloading"),O("");try{const I=new Date().toISOString().replace(/[:.]/g,"-");if(j==="pdf"){const D=await bfn(b);tF(D,ffn(I))}else if(b.length===1)tF(b[0].blob,JUe(1,1,I));else{const D=await gfn(b,I);tF(D,hfn(I))}}catch(I){d.current&&O(I instanceof Error?I.message:n("share.exportFailed"))}finally{d.current&&E("idle")}}};return yi.createPortal(a.jsx("div",{className:"share-message-backdrop",onMouseDown:I=>{I.target===I.currentTarget&&t()},children:a.jsxs("section",{ref:o,className:"share-message-dialog",role:"dialog","aria-modal":"true","aria-labelledby":i,"aria-describedby":r,"aria-busy":f==="generating"||C==="downloading",children:[a.jsxs("header",{className:"share-message-head",children:[a.jsxs("div",{children:[a.jsx("h2",{id:i,children:n("share.title")}),a.jsx("p",{id:r,children:n("share.description")})]}),a.jsx("button",{ref:l,type:"button",className:"share-message-close","aria-label":n("share.close"),title:n("share.close"),onClick:t,children:a.jsx(Jdn,{})})]}),a.jsxs("div",{className:"share-message-body",children:[f==="generating"?a.jsx("div",{className:"share-message-generating",role:"status",children:a.jsx(fn,{children:n("share.generatingContent")})}):f==="error"?a.jsxs("div",{className:"share-message-failure",children:[a.jsx("p",{role:"alert",children:x||n("share.imageFailed")}),a.jsx("button",{type:"button",onClick:()=>g(I=>I+1),children:n("share.retry")})]}):a.jsxs("figure",{className:"share-message-preview",children:[a.jsx("figcaption",{className:"share-message-preview-meta",children:n("share.previewPage",{count:b.length})}),a.jsx("img",{src:y,alt:n("share.previewAlt",{count:b.length})})]}),f!=="error"&&x&&a.jsx("p",{className:"share-message-error",role:"alert",children:x})]}),a.jsxs("div",{className:"share-message-options",children:[a.jsx("span",{id:s,className:"share-message-format-label",children:n("share.format")}),a.jsx("div",{className:"share-message-format",role:"radiogroup","aria-labelledby":s,children:["png","pdf"].map(I=>a.jsx("button",{type:"button",role:"radio","data-export-format":I,className:j===I?"is-active":"","aria-checked":j===I,tabIndex:j===I?0:-1,disabled:C==="downloading",onClick:()=>A(I),onKeyDown:D=>N(D,I),children:I.toUpperCase()},I))})]}),a.jsxs("footer",{className:"share-message-actions",children:[a.jsx("span",{className:"share-message-download-status","aria-live":"polite",children:C==="downloading"?n("share.generatingFormat",{format:j.toUpperCase()}):""}),j==="png"&&a.jsx("button",{type:"button",onClick:()=>void R(),disabled:b.length===0||f!=="ready"||k==="copying",children:k==="copying"?n("share.copying"):k==="copied"?b.length>1?n("share.copiedFirst"):n("share.copied"):b.length>1?n("share.copyFirst"):n("share.copyImage")}),a.jsx("button",{type:"button",className:"is-primary",onClick:()=>void P(),disabled:b.length===0||f!=="ready"||C==="downloading",children:C==="downloading"?n("share.generating"):j==="png"&&b.length>1?n("share.downloadArchive",{count:b.length}):n("share.downloadFormat",{format:j.toUpperCase()})})]})]})}),document.body)}const vfn=2e3,xfn=700,eQe=1200;function WK(e,t){const n=Array.from(e);return n.length<=t?e:`${n.slice(0,t-1).join("").trimEnd()}…`}function tQe(e){return WK(e.trim(),xfn)}function nQe(e){return WK(e,eQe)}function oue(e){return e.trim().length>0}function wfn(e,t,n={selectedExcerpt:"选中片段",annotation:"批注",separator:":"}){const i=tQe(e),r=nQe(t.trim());return WK(`${n.selectedExcerpt}${n.separator}${i} ${n.annotation}${n.separator}${r}`,vfn)}function lue(e){return e?e instanceof Element?e:e.parentElement:null}function Ofn(e,t){if(!t||t.isCollapsed||t.rangeCount===0)return null;const n=lue(t.anchorNode),i=lue(t.focusNode);if(!n||!i||!e.contains(n)||!e.contains(i)||!n.closest(".bubble")||!i.closest(".bubble"))return null;const r=t.toString().trim();if(!r)return null;const s=t.getRangeAt(0).getBoundingClientRect();return s.width<=0||s.height<=0?null:{text:r,anchor:{left:s.left+s.width/2,top:s.top,height:s.height}}}function kfn({anchor:e,selectedText:t,onClose:n,onSubmit:i}){const{t:r}=Te("conversation"),s=p.useRef(!1),[o,l]=p.useState(""),[c,u]=p.useState(!1),[d,f]=p.useState(""),[h,m]=p.useState(!1),g=tQe(t),b=p.useCallback(()=>{var y;(y=window.getSelection())==null||y.removeAllRanges(),n()},[n]);s.current=c,p.useEffect(()=>{const y=()=>{s.current||b()},w=x=>{const O=x.target;O instanceof Element&&O.closest(".response-annotation-popover")||s.current||b()};return window.addEventListener("resize",y),window.addEventListener("scroll",w,!0),()=>{window.removeEventListener("resize",y),window.removeEventListener("scroll",w,!0)}},[b]);const v=async()=>{if(!(c||h||!oue(o))){u(!0),f("");try{await i(o.trim()),m(!0)}catch(y){f(y instanceof Error?y.message:String(y))}finally{u(!1)}}};return a.jsxs(Lg,{open:!0,onOpenChange:y=>{!y&&!c&&b()},children:[a.jsx(Lg.Trigger,{children:a.jsx("span",{className:"response-annotation-anchor",style:{left:e.left,top:e.top,height:e.height},"aria-hidden":"true"})}),a.jsx(Lg.Content,{side:"top",sideOffset:8,align:"center",minWidth:"auto",className:"response-annotation-popover",children:h?a.jsxs("div",{className:"response-annotation-success",role:"status","aria-live":"polite",children:[a.jsxs("div",{children:[a.jsx("strong",{children:r("annotation.successTitle")}),a.jsx("p",{children:r("annotation.successDescription")})]}),a.jsx(_t,{type:"button",color:"secondary",size:"sm",pill:!1,onClick:b,children:r("annotation.done")})]}):a.jsxs("form",{className:"response-annotation-form","aria-label":r("annotation.ariaLabel"),"aria-busy":c||void 0,onSubmit:y=>{y.preventDefault(),v()},children:[a.jsx("div",{className:"response-annotation-header",children:a.jsx("h2",{children:r("annotation.title")})}),a.jsx("blockquote",{title:g,children:g}),a.jsxs("label",{className:"response-annotation-field",children:[a.jsx("span",{children:r("annotation.content")}),a.jsx(vb,{value:o,rows:3,maxRows:6,autoResize:!0,maxLength:eQe,disabled:c,invalid:!!d,"aria-label":r("annotation.content"),placeholder:r("annotation.placeholder"),onChange:y=>{l(nQe(y.target.value)),d&&f("")}})]}),d&&a.jsx("p",{className:"response-annotation-error",role:"alert",children:r("annotation.retryError",{error:d})}),a.jsxs("div",{className:"response-annotation-actions",children:[a.jsx(_t,{className:"response-annotation-action",type:"button",color:"secondary",variant:"ghost",size:"sm",pill:!1,disabled:c,onClick:b,children:r("annotation.cancel")}),a.jsx(_t,{className:"response-annotation-action",type:"submit",color:"primary",size:"sm",pill:!1,loading:c,disabled:!oue(o),children:r("annotation.submit")})]})]})})]})}const Sfn=["conversation","agents","applications","search","other"],Efn=["page_slow","feature_unavailable","display_error","no_response","other"],Cfn=["noResponse","loading","incomplete","error"];function Afn(e){return a.jsx("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...e,children:a.jsx("path",{d:"m5 12.5 4.2 4.2L19 7"})})}function Tfn({initialModule:e,onSubmit:t}){const{t:n}=Te("feedback"),i=p.useRef(null),[r,s]=p.useState(()=>new Set),[o,l]=p.useState(e),[c,u]=p.useState(""),[d,f]=p.useState(!1),[h,m]=p.useState(""),[g,b]=p.useState(!1),v=O=>{s(k=>{const S=new Set(k);return S.has(O)?S.delete(O):S.add(O),S})},y=O=>{var k;u(S=>S.trim()?S.includes(O)?S:`${S.trimEnd()} ${O}`:O),(k=i.current)==null||k.focus()},w=async O=>{if(O.preventDefault(),!(d||g)){f(!0),m("");try{await t({module:o,issues:[...r],description:c.trim()}),b(!0)}catch(k){m(k instanceof Error?k.message:String(k))}finally{f(!1)}}},x=r.size>0||c.trim().length>0;return a.jsxs("div",{className:"platform-feedback-page",children:[a.jsxs("header",{className:"platform-feedback-header",children:[a.jsx("h1",{children:n("title")}),a.jsx("p",{children:n("page.description")})]}),a.jsx("div",{className:"platform-feedback-scroll",children:g?a.jsxs("section",{className:"platform-feedback-success","aria-labelledby":"feedback-success-title","aria-live":"polite",role:"status",children:[a.jsx("span",{className:"platform-feedback-success-icon","aria-hidden":"true",children:a.jsx(Afn,{})}),a.jsxs("div",{children:[a.jsx("h2",{id:"feedback-success-title",children:n("success.title")}),a.jsx("p",{children:n("success.description")})]})]}):a.jsxs("form",{className:"platform-feedback-form",onSubmit:O=>void w(O),children:[a.jsxs("section",{className:"platform-feedback-section",children:[a.jsx("div",{className:"platform-feedback-section-heading",children:a.jsx("h2",{children:n("page.module")})}),a.jsx("div",{className:"platform-feedback-pills","aria-label":n("page.module"),children:Sfn.map(O=>a.jsx("button",{type:"button","aria-pressed":o===O,onClick:()=>l(O),disabled:d,children:n(`page.modules.${O}`)},O))})]}),a.jsx("section",{className:"platform-feedback-section",children:a.jsxs("div",{className:"platform-feedback-suggestions",children:[a.jsx("span",{children:n("page.commonIssuesMultiple")}),a.jsx("div",{className:"platform-feedback-pills","aria-label":n("page.issueTypes"),children:Efn.map(O=>a.jsx("button",{type:"button","aria-pressed":r.has(O),onClick:()=>v(O),disabled:d,children:n(`page.issues.${O}`)},O))})]})}),a.jsxs("section",{className:"platform-feedback-section",children:[a.jsxs("label",{className:"platform-feedback-field",children:[a.jsx("span",{children:n("descriptionLabel")}),a.jsx("textarea",{ref:i,value:c,onChange:O=>u(O.target.value),placeholder:n("page.descriptionPlaceholder"),maxLength:4e3,rows:6,disabled:d})]}),a.jsxs("div",{className:"platform-feedback-suggestions",children:[a.jsx("span",{children:n("page.quickAdd")}),a.jsx("div",{className:"platform-feedback-pills","aria-label":n("page.suggestionsLabel"),children:Cfn.map(O=>{const k=n(`page.suggestions.${O}`);return a.jsx("button",{type:"button",onClick:()=>y(k),disabled:d,children:k},O)})})]})]}),a.jsx("p",{className:"platform-feedback-privacy",role:"alert",children:n("page.privacy")}),h&&a.jsx("p",{className:"platform-feedback-error",role:"alert",children:h}),a.jsx("div",{className:"platform-feedback-actions",children:a.jsx("button",{type:"submit",disabled:!x||d,children:n(d?"submitting":"submit")})})]})})]})}function _fn({node:e,ctx:t}){const n=e.variant??"default";return a.jsx("button",{type:"button",className:`a2ui-button a2ui-button--${n}`,"data-a2ui-id":e.id,"data-a2ui-component":e.component,onClick:()=>t.dispatchAction(e.action,e),children:t.render(e.child)})}tv("Button",_fn);function jfn({node:e,ctx:t}){return a.jsx("div",{className:"a2ui-card","data-a2ui-id":e.id,"data-a2ui-component":e.component,children:t.render(e.child)})}tv("Card",jfn);const Nfn={start:"flex-start",center:"center",end:"flex-end",spaceBetween:"space-between",spaceAround:"space-around",spaceEvenly:"space-evenly",stretch:"stretch"},Rfn={start:"flex-start",center:"center",end:"flex-end",stretch:"stretch"};function iQe(e){return Nfn[e]??"flex-start"}function rQe(e){return Rfn[e]??"stretch"}function Ifn({node:e,ctx:t}){const n=e.children??[];return a.jsx("div",{className:"a2ui-column","data-a2ui-id":e.id,"data-a2ui-component":e.component,style:{display:"flex",flexDirection:"column",justifyContent:iQe(e.justify),alignItems:rQe(e.align)},children:n.map(i=>t.render(i))})}tv("Column",Ifn);function Pfn({node:e}){const t=e.axis==="vertical";return a.jsx("div",{className:`a2ui-divider ${t?"a2ui-divider--v":"a2ui-divider--h"}`,"data-a2ui-id":e.id,"data-a2ui-component":e.component})}tv("Divider",Pfn);const Dfn={send:"✈️",check:"✅",close:"✖️",star:"⭐",favorite:"❤️",info:"ℹ️",help:"❓",error:"⛔",calendarToday:"📅",event:"📅",schedule:"🕒",locationOn:"📍",accountCircle:"👤",mail:"✉️",call:"📞",home:"🏠",settings:"⚙️",search:"🔍"};function Mfn({node:e}){const t=e.name??"";return a.jsx("span",{className:"a2ui-icon",title:t,"aria-label":t,"data-a2ui-id":e.id,"data-a2ui-component":e.component,children:Dfn[t]??"•"})}tv("Icon",Mfn);function Lfn({node:e,ctx:t}){const n=e.children??[];return a.jsx("div",{className:"a2ui-row","data-a2ui-id":e.id,"data-a2ui-component":e.component,style:{display:"flex",flexDirection:"row",justifyContent:iQe(e.justify),alignItems:rQe(e.align??"center")},children:n.map(i=>t.render(i))})}tv("Row",Lfn);const $fn=new Set(["h1","h2","h3","h4","h5"]);function Ffn({node:e,ctx:t}){const n=e.variant??"body",i=t.resolveString(e.text),r=$fn.has(n)?n:"p";return a.jsx(r,{className:`a2ui-text a2ui-text--${n}`,"data-a2ui-id":e.id,"data-a2ui-component":e.component,children:i})}tv("Text",Ffn);function Bfn(e){return e==="agents"?"agents":e==="applications"?"applications":e==="search"?"search":["conversation","new-chat","sandbox"].includes(e)?"conversation":"other"}function Ufn(e){const t=e instanceof Error?e.message:String(e??"");return t.includes("HTTP 503")&&(t.includes("未配置持久化存储")||t.includes("storage is not configured"))}async function nF(e){const[t,n,i]=await Promise.allSettled([PUe(),DUe("deepseek-harness"),NM()]);return{agentId:e,ready:!0,temporaryEnabled:t.status==="fulfilled"&&t.value.enabled,deepseekHarnessEnabled:n.status==="fulfilled"&&n.value.enabled,sandboxEndpointExportEnabled:t.status==="fulfilled"&&t.value.endpointExportEnabled===!0,skillCustomizationEnabled:i.status==="fulfilled"&&i.value.enabled}}async function cue(e,t){const n=await kz(e,t);if(JR(e))return n;const i=await Promise.allSettled(n.map(s=>{var o;return(o=s.events)!=null&&o.length?Promise.resolve(s):sC(e,t,s.id)})),r=i.find(s=>s.status==="rejected"&&!/get session failed:\s*404\b/i.test(String(s.reason)));if((r==null?void 0:r.status)==="rejected")throw r.reason;return i.flatMap(s=>s.status==="fulfilled"?[s.value]:[])}const kc={app:"veadk.appName",view:"veadk.view",session:"veadk.sessionId"},Qfn=600,zfn=1e3,uue=5e3,Vfn=500,Gk=["list_envs","get_env_manifest","execute_in_sandbox","delegate_to_codex_sandbox"],sQe="veadk.sessionEnvironmentMounts.v1",aQe="veadk.sessionSkillMounts.v1";function due(){return{mounts:{},workspaceIds:{}}}function Hfn(){if(typeof localStorage>"u")return due();try{const e=JSON.parse(localStorage.getItem(sQe)??"{}"),t=(r,s)=>!r||typeof r!="object"||Array.isArray(r)?{}:Object.fromEntries(Object.entries(r).slice(-200).map(([o,l])=>[o,s(l)])),n=t(e.mounts,r=>Array.isArray(r)?r.slice(0,20).flatMap(s=>{if(!s||typeof s!="object"||Array.isArray(s))return[];const o=s;return typeof o.environment_id!="string"||typeof o.environment_version_id!="string"||o.mount_instance_id!==void 0&&typeof o.mount_instance_id!="string"?[]:[{environment_id:o.environment_id,environment_version_id:o.environment_version_id,...o.mount_instance_id?{mount_instance_id:o.mount_instance_id}:{}}]}):[]),i=t(e.workspaceIds,r=>Array.isArray(r)?r.filter(s=>typeof s=="string").slice(0,20):[]);return{mounts:n,workspaceIds:i}}catch{return due()}}function qfn(e,t){if(!(typeof localStorage>"u"))try{localStorage.setItem(sQe,JSON.stringify({mounts:e,workspaceIds:t}))}catch{}}function Wfn(){if(typeof localStorage>"u")return{};try{const e=JSON.parse(localStorage.getItem(aQe)??"{}");return!e||typeof e!="object"||Array.isArray(e)?{}:Object.fromEntries(Object.entries(e).slice(-200).map(([t,n])=>[t,Array.isArray(n)?n.slice(0,20).filter(i=>!!i&&typeof i=="object"&&!Array.isArray(i)&&i.source==="skillspace"&&typeof i.name=="string"&&typeof i.folder=="string"&&typeof i.skillSpaceId=="string"&&typeof i.skillId=="string"&&typeof i.version=="string"):[]]))}catch{return{}}}function Kfn(e){if(!(typeof localStorage>"u"))try{localStorage.setItem(aQe,JSON.stringify(e))}catch{}}function ou(){return{skills:[]}}function Fj(e,t,n){return`${e}\0${t}\0${n}`}async function fue(e){let t;if(e.threadId)try{const r=await Br.readThread(e.id,e.threadId);if(r.messages.length>0)return r}catch(r){t=r}const n=await Br.listThreads(e.id),i=n.threads.find(r=>r.id!==e.threadId)??n.threads[0];if(!i){if(t)throw t;return null}return Br.resumeThread(e.id,i.id)}function iF(e,t){const n=FUe(e),i=n[n.length-1];return!t||(i==null?void 0:i.role)!=="user"?n:[...n,{role:"assistant",blocks:[],meta:{localId:`sandbox-background-${e.threadId}`}}]}function rF(e){return`${zL(e)}.active`}function CU(e){return`veadk.agentOrder.${encodeURIComponent(e)}`}function Gfn(e){if(!e)return[];try{const t=JSON.parse(localStorage.getItem(CU(e))||"[]");return Array.isArray(t)?t.filter(n=>typeof n=="string"):[]}catch{return[]}}function AU(e,t){if(e.name===t||e.id===t)return e;for(const n of e.children){const i=AU(n,t);if(i)return i}}function hue(e){return e.replace(/__[0-9a-f]{10}(?:__.*)?$/i,"")}function pue(e,t,n,i,r){var s,o;return((s=e.meta)==null?void 0:s.streaming)===!0||((o=e.meta)==null?void 0:o.streaming)!==!1&&t===n-1&&(i||r)}function oQe(e){const t=[];for(const n of e.children)n.mentionable&&(t.push({name:n.name,description:n.description,type:n.type,path:n.path}),t.push(...oQe(n)));return t}function mue(){const e=typeof localStorage<"u"?localStorage.getItem(kc.view):null;return e==="intelligent"?e:["menu","custom","template","workflow"].includes(e??"")?"custom":e==="package"||e==="migration"||e==="deepseek"?e:null}function sF(e){const t=e.trim().toLowerCase();switch(t){case"creating":case"starting":case"initializing":case"pending":case"running":case"ready":case"failed":case"error":case"stopped":case"expired":case"deleting":case"deleted":return t;default:return"unknown"}}function gue({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.45",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("rect",{x:"3.75",y:"3.75",width:"16.5",height:"16.5",rx:"3.25"}),a.jsx("path",{d:"M12 8.5v7M8.5 12h7"}),a.jsx("path",{d:"M6.75 6.75h1M16.25 17.25h1",opacity:"0.6"})]})}function Xfn({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.45",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("rect",{x:"3.5",y:"5",width:"17",height:"14.75",rx:"2.25"}),a.jsx("path",{d:"M3.5 9h17M9.25 12.25 7.1 14.4l2.15 2.15M14.75 12.25l2.15 2.15-2.15 2.15M12.8 11.85l-1.6 5.1"})]})}function Yfn({className:e}){return a.jsxs("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.45",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[a.jsx("rect",{x:"2.75",y:"5",width:"6.5",height:"14",rx:"1.6"}),a.jsx("path",{d:"M5.25 8.5h1.5M5.25 11.5h1.5"}),a.jsx("rect",{x:"14.75",y:"5",width:"6.5",height:"14",rx:"1.6"}),a.jsx("path",{d:"M17.25 15.5h1.5M17.25 12.5h1.5M8.75 12h6.5m-2.5-2.5 2.5 2.5-2.5 2.5"})]})}function Zfn(){return a.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":!0,children:[a.jsx("rect",{x:"3",y:"4",width:"14",height:"3.2",rx:"1.2",fill:"currentColor",stroke:"none"}),a.jsx("rect",{x:"6",y:"10.4",width:"13",height:"3.2",rx:"1.2",fill:"currentColor",stroke:"none",opacity:"0.7"}),a.jsx("rect",{x:"9",y:"16.8",width:"9",height:"3.2",rx:"1.2",fill:"currentColor",stroke:"none",opacity:"0.45"})]})}function TU(e){return e?new Date(e*1e3).toLocaleString(bn.resolvedLanguage??bn.language,{timeZone:"Asia/Shanghai",hour12:!1,month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}):""}function Jfn(e){if(!e)return"";const t=[];return e.ts&&t.push(TU(e.ts)),e.tokens!=null&&t.push(`${e.tokens.toLocaleString()} tokens`),t.join(" · ")}function Hm(e){return e.blocks.map(t=>t.kind==="text"?t.text:"").join("").trim()}function aF(e,t){for(let n=t-1;n>=0;n-=1)if(e[n].role==="user")return Hm(e[n]);return""}const ehn="send_a2ui_json_to_client";function Xk(e){return e.blocks.some(t=>t.kind==="text"?t.text.trim().length>0:t.kind==="attachment"||t.kind==="artifact"?t.files.length>0:t.kind==="delivery"||t.kind==="turn-summary"?!0:t.kind==="tool"?!(t.name===ehn&&t.done):t.kind==="agent-transfer"?!1:t.kind==="a2ui"?dLe(t.messages).some(n=>n.components[n.rootId]):t.kind==="auth")}function oF(e){return e.blocks.some(t=>t.kind==="auth"&&!t.done)}function thn(e){return new Promise((t,n)=>{let i="";try{i=new URL(e,window.location.href).protocol}catch{}if(i!=="http:"&&i!=="https:"){n(new Error(Bt("oauth.unsupportedUrl")));return}const r=window.open(e,"veadk_oauth","width=520,height=720");if(!r){n(new Error(Bt("oauth.popupBlocked")));return}let s=!1;const o=()=>{clearInterval(u),window.removeEventListener("message",c)},l=d=>{if(!s){s=!0,o();try{r.close()}catch{}t(d)}},c=d=>{if(d.origin!==window.location.origin)return;const f=d.data;f&&f.veadkOAuth&&typeof f.url=="string"&&l(f.url)};window.addEventListener("message",c);const u=setInterval(()=>{if(!s){if(r.closed){o();const d=window.prompt(Bt("oauth.pasteCallbackUrl"));d&&d.trim()?(s=!0,t(d.trim())):n(new Error(Bt("oauth.cancelled")));return}try{const d=r.location.href;d&&d!=="about:blank"&&new URL(d).origin===window.location.origin&&/[?&](code|state|error)=/.test(d)&&l(d)}catch{}}},500)})}function nhn(e,t){const n=JSON.parse(JSON.stringify(e??{})),i=n.exchangedAuthCredential??n.exchanged_auth_credential??{},r=i.oauth2??{};return r.authResponseUri=t,r.auth_response_uri=t,i.oauth2=r,n.exchangedAuthCredential=i,n}function bue({text:e}){const[t,n]=p.useState(!1);return a.jsx("button",{className:"icon-btn",title:Bt(t?"actions.copied":"actions.copy"),disabled:!e,onClick:async()=>{if(e)try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)}catch{}},children:t?a.jsx(Ef,{className:"icon"}):a.jsx(eM,{className:"icon"})})}function ihn({onClick:e}){return a.jsx("button",{type:"button",className:"icon-btn","aria-label":Bt("actions.exportConversation"),title:Bt("actions.exportConversation"),onClick:e,children:a.jsx(fat,{className:"icon","aria-hidden":"true"})})}const yue=Array.from({length:14},(e,t)=>`greetings.${t}`),vue=()=>yue[Math.floor(Math.random()*yue.length)];function Bt(e,t){return bn.t(e,{ns:"app",...t})}function lF(e,t){return bn.t(e,{ns:"ui",...t})}function cF(e){var t;for(const n of e)(t=n.previewUrl)!=null&&t.startsWith("blob:")&&URL.revokeObjectURL(n.previewUrl)}function xue(){return`draft-${Date.now()}-${Math.random().toString(36).slice(2)}`}function wue(e){var n;if(e.type)return e.type;const t=(n=e.name.split(".").pop())==null?void 0:n.toLowerCase();return t==="md"||t==="markdown"?"text/markdown":t==="txt"?"text/plain":"application/octet-stream"}const rhn={"read-only":"sandbox.mode.readOnly","workspace-write":"sandbox.mode.workspaceWrite","danger-full-access":"sandbox.mode.fullAccess"},shn={untrusted:"sandbox.approvalPolicy.untrusted","on-request":"sandbox.approvalPolicy.onRequest",never:"sandbox.approvalPolicy.never"},ahn={user:"sandbox.reviewer.user",auto_review:"sandbox.reviewer.autoReview"};function ohn(e,t){const n=Bt(e.kind==="file"?"approval.subject.file":"approval.subject.command");return Bt(`approval.decision.${t}`,{subject:n})}function lhn(e){var n,i,r;const t=[];return(n=e.command)!=null&&n.trim()&&t.push({label:Bt("approval.details.command"),value:e.command.trim(),code:!0}),(i=e.grantRoot)!=null&&i.trim()&&t.push({label:Bt("approval.details.grantRoot"),value:e.grantRoot.trim(),code:!0}),(r=e.cwd)!=null&&r.trim()&&t.push({label:Bt("approval.details.cwd"),value:e.cwd.trim(),code:!0}),t}function Oue(e){return e.flatMap(t=>t.apps.map(n=>gf(t.id,n)))}function chn(e,t){var n;return((n=e.find(i=>i.runtimeId&&i.apps.some(r=>gf(i.id,r)===t)))==null?void 0:n.runtimeId)??""}function kue(e,t){for(const n of e){const i=n.apps.find(r=>gf(n.id,r)===t);if(i&&n.runtimeId)return{runtimeId:n.runtimeId,region:n.region??"cn-beijing",appName:i}}return null}function Sue(e){return e.taskMode==="text_to_video"?[]:(e.taskMode==="first_last_frame"?[e.firstFrame?{file:e.firstFrame,kind:"first_frame"}:null,e.lastFrame?{file:e.lastFrame,kind:"last_frame"}:null]:[e.referenceImage?{file:e.referenceImage,kind:"reference_image"}:null,e.referenceVideo?{file:e.referenceVideo,kind:"reference_video"}:null]).filter(n=>n!==null)}function uhn(e,t){return`video-${e.replace(/[^A-Za-z0-9_-]/g,"").slice(0,36)||"result"}.${t}`}function Yk(e,t){return`${e}${t}`}function uF(e){var n,i;const t=(i=(n=[...e??[]].reverse().find(r=>{var s;return r.role==="assistant"&&((s=r.meta)==null?void 0:s.eventId)}))==null?void 0:n.meta)==null?void 0:i.eventId;return(t==null?void 0:t.trim())||void 0}function dhn(){var jG;const{t:e}=Te("app"),[t,n]=p.useState([]),[i,r]=p.useState(()=>typeof localStorage<"u"&&localStorage.getItem(kc.app)||""),[s,o]=p.useState([]),[l,c]=p.useState(()=>typeof localStorage<"u"&&localStorage.getItem(kc.session)||""),u=p.useRef(null),d=p.useRef(0),f=p.useRef(0),h=p.useRef(null),[m,g]=p.useState(!1),[b,v]=p.useState([]),[y,w]=p.useState(null),[x,O]=p.useState([]),[k,S]=p.useState(!1),[C,E]=p.useState(!1),[j,T]=p.useState(""),[R,A]=p.useState(!1),[N,P]=p.useState(!1),[I,D]=p.useState(null),[_,L]=p.useState(null),[F,M]=p.useState(!1),[V,q]=p.useState(""),[U,J]=p.useState(null),[z,Z]=p.useState(!1),[ne,W]=p.useState(""),[G,H]=p.useState(!1),[se,Y]=p.useState("idle"),[X,ie]=p.useState(!1),[ee,be]=p.useState("confirm"),[ue,pe]=p.useState(""),[ke,je]=p.useState("codex"),[Pe,Ee]=p.useState(!0),[ze,_e]=p.useState(""),[ae,le]=p.useState(!1),[ge,Oe]=p.useState("snapshot"),[Se,We]=p.useState(10),[Ye,ye]=p.useState(5),[we,Ae]=p.useState(100),[He,Ue]=p.useState(!1),[jt,Pt]=p.useState(!1),[Kt,Ct]=p.useState(0),[xt,tt]=p.useState("general"),[mt,Ne]=p.useState(null),[Ot,Nt]=p.useState(null),[Yt,xn]=p.useState(null),Ke=p.useRef(null),St=p.useRef(null),qe=p.useRef(null),nt=p.useRef(null),et=p.useRef(null),ft=p.useRef((y==null?void 0:y.id)??""),Et=p.useRef(""),At=p.useRef(0),It=p.useRef(void 0),Gt=p.useRef(new Set);ft.current=(y==null?void 0:y.id)??"",p.useEffect(()=>()=>{var $;($=St.current)==null||$.abort()},[]),p.useEffect(()=>()=>{It.current!==void 0&&window.clearTimeout(It.current);for(const $ of Gt.current)URL.revokeObjectURL($);Gt.current.clear()},[]);function Xe($){const K=URL.createObjectURL($);return Gt.current.add(K),K}function wt($){!$||!Gt.current.delete($)||URL.revokeObjectURL($)}function vt(){for(const $ of Gt.current)URL.revokeObjectURL($);Gt.current.clear()}const tn=p.useCallback(()=>{It.current!==void 0&&(window.clearTimeout(It.current),It.current=void 0),Y("idle")},[]);p.useEffect(()=>{tn()},[tn,y==null?void 0:y.id]);const[Qt,cn]=p.useState({}),[Me,on]=p.useState({}),On=l?Qt[l]??[]:b,Sn=y?x:On,Qi=l?Me[Yk(i,l)]??rE:rE,un=($,K)=>cn(te=>({...te,[$]:typeof K=="function"?K(te[$]??[]):K})),lr=($,K,te)=>{const me=Yk($,K);on(De=>{const Ve=De[me]??rE,ve=yV(Ve,te);return ve===Ve?De:{...De,[me]:ve}})};function Mn($,K,te=[],me=""){if(ft.current!==$)return;const De=crypto.randomUUID(),Ve={role:"system",blocks:[],activity:{id:De,title:K,...te.length>0?{details:te}:{}},meta:{localId:De,ts:Date.now()/1e3}};O(ve=>{if(!me)return[...ve,Ve];const ot=ve.findIndex(it=>{var ut;return((ut=it.meta)==null?void 0:ut.localId)===me});return ot<0?[...ve,Ve]:[...ve.slice(0,ot),Ve,...ve.slice(ot)]})}const[ei,Bn]=p.useState(""),[ki,zn]=p.useState("agent"),[Rn,di]=p.useState("agent"),[rt,zt]=p.useState("create"),[Qe,bt]=p.useState(null),[Ht,_n]=p.useState(null),[jr,Hs]=p.useState(null),[qs,Dr]=p.useState(!0),[ti,Si]=p.useState(""),[Zr,Jr]=p.useState(),[ga,go]=p.useState(0),[us,he]=p.useState(""),[pr,bo]=p.useState(null),[to,fl]=p.useState(),[no,ws]=p.useState(null),Ws=p.useCallback($=>{ws($);const K=new URL(window.location.href);if($)K.searchParams.set("view","runtime-deploy"),K.searchParams.set("source","intelligent-development"),K.searchParams.set("sessionId",$.sessionId),K.searchParams.set("artifactSha256",$.artifactSha256),K.searchParams.set("validationReportSha256",$.validationReportSha256),$.projectId&&$.versionId?(K.searchParams.set("projectId",$.projectId),K.searchParams.set("versionId",$.versionId)):(K.searchParams.delete("projectId"),K.searchParams.delete("versionId"));else for(const te of["view","source","sessionId","artifactSha256","validationReportSha256","projectId","versionId"])K.searchParams.delete(te);window.history.replaceState(null,"",K)},[]),Ai=p.useCallback($=>$.projectId&&$.versionId?Yle($.projectId,$.versionId,$.sessionId,$.artifactSha256,$.validationReportSha256):Zle($.sessionId,$.artifactSha256,$.validationReportSha256),[]),rr=p.useCallback(async $=>{if(!$.projectId||!$.versionId||!$.parentVersionId)throw new Error(Bt("errors.noOptimizationBaseline"));const K=await b7e($.projectId),te=K.find(ve=>ve.versionId===$.versionId),me=K.find(ve=>ve.versionId===$.parentVersionId);if(!te||!me)throw new Error(Bt("errors.optimizationVersionMissing"));const[De,Ve]=await Promise.all([Hx(me),Hx(te)]);return{base:De,target:Ve}},[]),Ds=p.useCallback(async $=>{const K=W9e({agentId:$.agentName,deployAction:"create",deploySource:"intelligent_development",createMode:"intelligent",aiAssisted:1});try{const{blob:te,filename:me}=await Mrn($),De=URL.createObjectURL(te),Ve=document.createElement("a");Ve.href=De,Ve.download=me,Ve.hidden=!0;try{document.body.appendChild(Ve),Ve.click()}finally{Ve.remove(),window.setTimeout(()=>URL.revokeObjectURL(De),1e3)}K.succeed({fileCount:$.fileCount,zipSizeBytes:te.size})}catch(te){throw K.fail({fileCount:$.fileCount,...Xo(te)}),te}},[]),[hl,pl]=p.useState(null),[mr,Mr]=p.useState(!1),[ml,Mo]=p.useState(!1),Nr=p.useRef(null),Lo=p.useRef(null),[es,ba]=p.useState({}),Di=p.useRef(new Map),Ms=es.ready===!0&&es.agentId===i,[zr,ds]=p.useState([]),[gl,na]=p.useState(ou),[gi,Dl]=p.useState(null),[$o,Ks]=p.useState(!1),[bl,Fo]=p.useState();p.useEffect(()=>Fo(void 0),[i]);const[Pa,yl]=p.useState(null),[Uu]=p.useState(()=>Wfn());p.useEffect(()=>Kfn(Uu),[Uu]);const[Bo,hc]=p.useState([]),[Dd,Md]=p.useState([]),[yo,Ld]=p.useState(!1),[vl,Ml]=p.useState(""),Da=p.useRef(null),Uo=p.useRef(null);Uo.current===null&&(Uo.current=Hfn());const[Qo,Qu]=p.useState(()=>{var $;return(($=Uo.current)==null?void 0:$.mounts)??{}}),[xl,Ll]=p.useState(()=>{var $;return(($=Uo.current)==null?void 0:$.workspaceIds)??{}});p.useEffect(()=>{qfn(Qo,xl)},[Qo,xl]);const[Ls,Ma]=p.useState({}),[rn,$l]=p.useState(null),[Os,ts]=p.useState({}),ns=p.useRef({}),[$d,Fl]=p.useState(!1),[zo,Bl]=p.useState({}),[Kc,vo]=p.useState(0),ia=p.useRef(""),[io,Re]=p.useState(!1),lt=p.useRef(new Set),[Lt,Ln]=p.useState(()=>new Set),[wn,pn]=p.useState(()=>new Set),[jn,Wt]=p.useState(()=>new Set),gn=p.useRef(new Map),$n=p.useRef(new Map),ai=p.useRef(void 0),is=p.useRef(()=>{}),re=($,K)=>Ln(te=>{const me=new Set(te);return K?me.add($):me.delete($),me}),Vn=$=>{const K=$n.current.get($);K!==void 0&&window.clearTimeout(K),$n.current.delete($),pn(te=>new Set(te).add($))},bi=$=>{const K=$n.current.get($);K!==void 0&&window.clearTimeout(K),$n.current.delete($),pn(te=>{if(!te.has($))return te;const me=new Set(te);return me.delete($),me})},La=$=>{const K=$n.current.get($);K!==void 0&&window.clearTimeout(K);const te=window.setTimeout(()=>{bi($)},2400);$n.current.set($,te)},oe=($,K)=>{Wt(te=>{if(te.has($)===K)return te;const me=new Set(te);return me.delete($),me})},Le=p.useRef(""),[st,Fe]=p.useState("");function de($,K,te){const me=Nr.current;if(!me||me.localId!==$||me.runId!==K)return null;const De=Vle(me,te);return Nr.current=De,pl(De),De}async function Be($,K,te){var Ve;(Ve=Lo.current)==null||Ve.abort();const me=new AbortController;Lo.current=me;let De=te;try{let ve=Nr.current;if(!ve||ve.localId!==$||ve.runId!==K)return;if(De==="optimization"&&ve.assetIds.length===0){const it=Sue(ve.config);if(it.length>0){const ut=await Promise.all(it.map(dn=>Nin(dn.file,dn.kind,me.signal)));if(me.signal.aborted||(ve=de($,K,{type:"assets_uploaded",assetIds:ut.map(dn=>dn.assetId)}),!ve))return}}if(De==="optimization"){const it=await Rin({prompt:ve.requestedPrompt,taskMode:ve.requestedMode,assetIds:ve.assetIds,ratio:ve.config.aspectRatio,resolution:ve.config.resolution,durationSeconds:ve.config.durationSeconds},me.signal);if(me.signal.aborted||(ve=de($,K,{type:"optimization_succeeded",optimizedPrompt:it.enhancedPrompt,resolvedMode:it.resolvedTaskMode,enhancerModel:it.enhancerModel}),!ve))return;De="generation"}if(!ve.optimizedPrompt||!ve.resolvedMode)throw new Error(Bt("errors.incompletePromptOptimization"));const ot=await Iin({enhancedPrompt:ve.optimizedPrompt,resolvedTaskMode:ve.resolvedMode,assetIds:ve.assetIds,ratio:ve.config.aspectRatio,resolution:ve.config.resolution,durationSeconds:ve.config.durationSeconds},me.signal);if(me.signal.aborted||(ve=de($,K,{type:"generation_started",remoteTaskId:ot.taskId,generationModel:ot.generationModel,startedAt:Date.now()}),!ve))return;for(;!me.signal.aborted;){const it=await Pin(ot.taskId,me.signal);if(me.signal.aborted)return;if((it.status==="queued"||it.status==="running")&&de($,K,{type:"generation_status_changed",providerStatus:it.status}),it.status==="failed")throw new Error(it.error||Bt("errors.videoGenerationFailed"));if(it.status==="succeeded"){if(!it.videoUrl)throw new Error(Bt("errors.videoPreviewMissing"));de($,K,{type:"generation_succeeded",output:{previewUrl:Min(it.videoUrl),fileName:uhn(ot.taskId,it.outputFormat),mimeType:it.outputFormat==="mov"?"video/quicktime":"video/mp4"}});return}await new Promise(ut=>window.setTimeout(ut,1800))}}catch(ve){if(me.signal.aborted)return;de($,K,{type:"failed",stage:De,error:ve instanceof Error?ve.message:String(ve)})}}function at($,K,te){if(f7e(Nr.current)){Mr(!0);return}if(K.taskMode==="video_editing"&&!K.referenceVideo){Fe(Bt("errors.videoEditRequiresVideo"));return}if(K.taskMode==="video_extension"&&!K.referenceVideo){Fe(Bt("errors.videoExtendRequiresVideo"));return}if(K.taskMode==="reference_to_video"&&!K.referenceImage&&!K.referenceVideo){Fe(Bt("errors.videoReferenceRequired"));return}if(K.taskMode==="text_to_video"&&(K.referenceImage||K.referenceVideo||K.firstFrame||K.lastFrame)){Fe(Bt("errors.textVideoRejectsReferences"));return}if(K.taskMode==="first_last_frame"&&!K.firstFrame){Fe(Bt("errors.firstFrameRequired"));return}if(te.supportedModes.length>0&&K.taskMode!=="auto"&&!te.supportedModes.includes(K.taskMode)){Fe(Bt("errors.videoModeUnsupported"));return}const me=Sue(K);if(me.length>0&&!te.assetStorageAvailable){Fe(Bt("errors.persistentStorageNotConfigured"));return}const De=me.find(({file:ve})=>te.maxAssetBytes>0&&ve.size>te.maxAssetBytes);if(De){Fe(Bt("errors.mediaTooLarge",{fileName:De.file.name}));return}const Ve=brn({prompt:$,config:K,enhancerModel:te.enhancerModel,generationModel:te.generationModel});Nr.current=Ve,pl(Ve),Mr(!0),Bn(""),Fe(""),Be(Ve.localId,Ve.runId,"optimization")}function ct(){const $=Nr.current;if(!$||$.status!=="error"||!$.errorStage)return;const K=$.errorStage,te=Vle($,{type:"retry",stage:K});Nr.current=te,pl(te),Mr(!0),Be(te.localId,te.runId,K)}async function $t(){const $=Nr.current;if(!(!($!=null&&$.remoteTaskId)||!$.output))try{const K=await Din($.remoteTaskId),te=URL.createObjectURL(K),me=document.createElement("a");me.href=te,me.download=$.output.fileName,me.click(),window.setTimeout(()=>URL.revokeObjectURL(te),1e3)}catch(K){Fe(K instanceof Error?K.message:String(K))}}p.useEffect(()=>()=>{var $;($=Lo.current)==null||$.abort()},[]);const[kn,Ti]=p.useState(""),[sn,oi]=p.useState(()=>new Set),[Vt,fi]=p.useState(null),[Un,sr]=p.useState(null),[Hn,gr]=p.useState(null),[ks,zi]=p.useState(null);p.useEffect(()=>{gr(null)},[i,l]);const[wr,Fd]=p.useState(!1),[Db,dv]=p.useState(),[fv,$h]=p.useState(vue),Pf=e(fv),[Rr,wl]=p.useState(null),[zu,pc]=p.useState(!1),[$a,Om]=p.useState(!1),[Vu,Df]=p.useState(""),Ul=p.useRef(!1),[ro,mc]=p.useState(null),[yt,Vo]=p.useState(""),[Xi,Fa]=p.useState(),[Nn,Bd]=p.useState(null),TO=(Nn==null?void 0:Nn.capabilities.runtimeScope)??"mine",[hv,Mb]=p.useState({newChat:!0,search:!0,skillCenter:!0,history:!0,addAgent:!0,manageAgents:!0,agentUsage:!1,addAgentkit:!0}),[gc,JT]=p.useState("cloud"),[Mf,Ba]=p.useState(aC),[Dn,e2]=p.useState("volcengine"),[t2,Fh]=p.useState(""),[Lb,qL]=p.useState(""),[$b,n2]=p.useState(!1),[km,Fb]=p.useState(!1),[Vr,i2]=p.useState(!1),pv=Lt.has(l),Hu=wn.has(l),Sm=pv||m,Gc=y?k:Sm,Bh=Gc||!y&&Hu,Lf=(y==null?void 0:y.intelligentDevelopment)===!0?Nv:Br,Pi=Hun({client:Lf,allowSkillSelection:(y==null?void 0:y.intelligentDevelopment)!==!0,allowThreadManagement:(y==null?void 0:y.intelligentDevelopment)!==!0,session:y,conversationBusy:k,onInputChange:Bn,onSessionPatch:$=>{const K=ft.current;w(te=>(te==null?void 0:te.id)===K?{...te,...$}:te)},onSnapshot:$=>{const K=ft.current;vt(),O(FUe($)),w(te=>(te==null?void 0:te.id)===K?{...te,threadId:$.threadId,cwd:$.cwd??te.cwd,model:$.model??te.model,workspaceLocked:$.workspaceLocked,permissions:$.permissions,busy:!1}:te)},onActivity:($,K=[])=>{const te=ft.current;te&&Mn(te,$,K)},onError:Fe});p.useEffect(()=>{const $=y;if(!$||$.intelligentDevelopment||!k||et.current)return;let K=!1,te;const me=new AbortController,De=async()=>{try{const Ve=$.intelligentDevelopment?Nv:Br,ve=await Ve.getStatus($.id,{signal:me.signal});if(K||ft.current!==$.id)return;const ot=ve.threadId?await Ve.readThread($.id,ve.threadId,{signal:me.signal}):null;if(K||ft.current!==$.id)return;if(ot&&O(iF(ot,ve.busy)),w(it=>(it==null?void 0:it.id)===$.id?{...it,...ve,...ot?{threadId:ot.threadId,cwd:ot.cwd??ve.cwd,model:ot.model??ve.model,workspaceLocked:ot.workspaceLocked,permissions:ot.permissions}:{}}:it),S(ve.busy),!ve.busy){const it=ot==null?void 0:ot.messages[ot.messages.length-1];(it==null?void 0:it.role)==="user"&&Fe(Bt("errors.cloudCodexEmptyReply"));return}}catch(Ve){if((Ve==null?void 0:Ve.name)==="AbortError"||K)return;if($.intelligentDevelopment){Fe(Vtt(Ve)),te=window.setTimeout(De,1500);return}S(!1),w(ve=>(ve==null?void 0:ve.id)===$.id?{...ve,busy:!1}:ve),Fe(Ve instanceof Error?Ve.message:String(Ve));return}te=window.setTimeout(De,1500)};return te=window.setTimeout(De,1500),()=>{K=!0,me.abort(),te!==void 0&&window.clearTimeout(te)}},[k,y==null?void 0:y.id]);const so=ent({sessionId:y!=null&&y.intelligentDevelopment?y.id:"",ownerId:yt,onTurns:O,onBusy:$=>{S($),w(K=>K!=null&&K.intelligentDevelopment?{...K,busy:$}:K)}}),fs=rn==null?void 0:rn.graph,_O=[rn==null?void 0:rn.name,fs==null?void 0:fs.name,fs==null?void 0:fs.id].filter($=>!!$),jO=gl.targetAgent&&fs?AU(fs,gl.targetAgent.name):fs,NO=(jO==null?void 0:jO.skills)??(gl.targetAgent?[]:(rn==null?void 0:rn.skills)??[]),r2=fs?oQe(fs):[],RO=(fs==null?void 0:fs.instruction)??((jG=rn==null?void 0:rn.draft)==null?void 0:jG.instruction),WL=rn&&RO!==void 0?iot({instruction:RO,tools:[...new Set([...(fs==null?void 0:fs.tools)??rn.tools,...l&&(Qo[Fj(i,yt,l)]??[]).length>0?[...Gk]:[]])],skills:(fs==null?void 0:fs.skills)??rn.skills}):null;function mv($){cF($);for(const K of $)K.status==="uploading"?lt.current.add(K.id):K.uri&&uN(i,K.uri).catch(te=>Fe(String(te)))}async function s2($){try{await M8(i,yt,$),await D8(i,yt,$),o(K=>K.filter(te=>te.id!==$)),cn(K=>{const{[$]:te,...me}=K;return me})}catch(K){Fe(String(K))}}function Em($){const K=zr.find(De=>De.id===$);if(!K)return;const te=zr.filter(De=>De.id!==$);cF([K]),K.status==="uploading"&<.current.add($),ds(te),te.length===0&&!ei.trim()&&!!l&&Sn.length===0?(Le.current="",c(""),s2(l)):K.uri&&uN(i,K.uri).catch(De=>Fe(String(De)))}const[xo,In]=p.useState(mue),[Cm,IO]=p.useState(Von),[PO,a2]=p.useState([]),[KL,DO]=p.useState({}),Ud=p.useCallback($=>{a2(K=>{const te=K.findIndex(De=>De.id===$.id);if(te===-1)return[$,...K];const me=[...K];return me[te]={...me[te],...$},me})},[]),o2=p.useCallback($=>{const K=$.status==="succeeded",te=$.status==="failed_retryable"||$.status==="failed_terminal",me=Date.parse($.createdAt??$.updatedAt??"");return{id:`mpa-operation:${$.operationId}`,agentName:$.mpaInstanceId||$.runtimeId||$.operationId,runtimeName:$.mpaInstanceId||$.runtimeId||$.operationId,runtimeId:$.runtimeId,mpaInstanceId:$.mpaInstanceId,region:$.runtimeRegion||"cn-beijing",startedAt:Number.isFinite(me)?me:Date.now(),status:K?"success":te?"error":"running",phase:$.stage,label:lF(te?"agentWorkspace.deploymentFailed":K?"agentWorkspace.deployStatus.success":"agentWorkspace.deployStatus.running"),message:$.safeErrorCode||void 0,pct:K||te?100:void 0,mpaProfile:!0,mpaSmoke:$.operationKind==="create",operationId:$.operationId}},[]),MO=p.useRef(new Set),[l2,c2]=p.useState(!0),[Uh,Ss]=p.useState(!1),[u2,gv]=p.useState("skills"),[bv,LO]=p.useState({kind:"key",key:"titles.skillLibrary"}),GL=bv.kind==="key"?e(bv.key,{name:bv.name}):bv.title,XL=p.useCallback($=>{LO(K=>K.kind==="literal"&&K.title===$?K:{kind:"literal",title:$})},[]),[YL,yv]=p.useState(null),[Bb,rs]=p.useState(!1),[Am,mi]=p.useState(!1),[d2,bc]=p.useState("entry"),[vv,Qd]=p.useState("traditional"),[$O,ra]=p.useState(null),[f2,ce]=p.useState("custom"),[$e,Ge]=p.useState("workspaces"),[pt,ln]=p.useState(!1),[Ze,En]=p.useState(0),[Lr,Ri]=p.useState([]),hs=p.useRef([]),sa=p.useRef(null),Qh=p.useRef(null),[FO,Ub]=p.useState([]),[Ua,Ol]=p.useState(""),Ho=p.useRef(null),[BO,Gs]=p.useState(!1),[Tm,Or]=p.useState(!1),[KK,ZL]=p.useState(""),[lQe,cQe]=p.useState("good"),[uQe,h2]=p.useState("basic"),[dQe,fQe]=p.useState("good"),[UO,p2]=p.useState(""),[hQe,pQe]=p.useState(null),[Xc,Ir]=p.useState(!1),[m2,qu]=p.useState(!1),[JL,kl]=p.useState(!1),[GK,qo]=p.useState([]),xv=GK[GK.length-1],_m=xv==null?void 0:xv.page,g2=_m==="users",e5=_m==="system-info",t5=_m==="developer-resources",b2=_m==="review-center",y2=p.useCallback($=>{qo(K=>{var te;return((te=K[K.length-1])==null?void 0:te.page)===$.page?K:[...K,$]})},[]),jm=p.useCallback($=>{qo(K=>{var me;if(((me=K[K.length-1])==null?void 0:me.page)===$)return K.slice(0,-1);const te=K.findIndex(De=>De.page===$);return te===-1?K:K.filter((De,Ve)=>Ve!==te)})},[]),[mQe,gQe]=p.useState("development"),[yc,Qa]=p.useState(null),[v2,Yc]=p.useState(!1),n5=p.useRef(null),[Wu,QO]=p.useState(()=>{const $=sf();return vO($),$}),[bQe,XK]=p.useState(!1),[yQe,YK]=p.useState(""),[ZK,zO]=p.useState(null),[i5,JK]=p.useState({}),[vQe,eG]=p.useState(()=>new Set),[zd,Ql]=p.useState(null),[Qb,x2]=p.useState(Zi(Dn)),[tG,aa]=p.useState("");p.useEffect(()=>{if(Rr!=="authenticated")return;const $=new AbortController,K=async te=>{if(MO.current.has(te.operationId))return;MO.current.add(te.operationId);let me=te;try{for(;!$.signal.aborted;){me=await kTe(me.operationId,$.signal);const De=o2(me);if(Ud(De),me.operationKind==="create"&&(aa(De.id),oa(""),Or(!0)),me.status!=="active")return;await new Promise(Ve=>window.setTimeout(Ve,500))}}finally{MO.current.delete(te.operationId)}};return OTe().then(te=>Promise.all(te.map(K))).catch(()=>{}),()=>$.abort()},[Rr,o2,Ud]);const[nG,oa]=p.useState(""),[Mi,wo]=p.useState(null),Vd=p.useCallback(()=>{jm("agent-detail"),wo(null),Ir(!1),Or(!1)},[jm]),[xQe,r5]=p.useState(!1),w2=p.useRef(!1),wv=p.useRef(!1),$f=p.useCallback($=>{if(!yt)return!1;try{Uce(localStorage,yt,$)}catch(K){return Ti(K instanceof Error?K.message:Bt("errors.saveDraftRejected")),!1}return hs.current=$,Ri($),Ti(""),!0},[yt]),Ff=p.useCallback($=>{var K;$&&((K=sa.current)==null?void 0:K.id)!==$||(sa.current=null,Qh.current!==null&&(window.clearTimeout(Qh.current),Qh.current=null))},[]),Nm=p.useCallback(()=>{const $=sa.current;if(!$)return!0;const K=$f([$,...hs.current.filter(te=>te.id!==$.id)]);return K&&Ff(),K},[Ff,$f]),wQe=p.useCallback(($,K,te,me)=>{!$||!yt||(sa.current&&sa.current.id!==$&&Nm(),sa.current={id:$,draft:K,updatedAt:Date.now(),deploymentTarget:te,creationMode:me},Qh.current!==null&&window.clearTimeout(Qh.current),Qh.current=window.setTimeout(Nm,Qfn))},[Nm,yt]),s5=p.useCallback($=>{!$||!yt||(Ff($),$f(hs.current.filter(K=>K.id!==$)))},[Ff,$f,yt]),iG=p.useCallback($=>{if(!yt||$.length===0)return;const K=new Set($.map(te=>te.id));sa.current&&K.has(sa.current.id)&&Ff(),$f(hs.current.filter(te=>!K.has(te.id))),DO(te=>Object.fromEntries(Object.entries(te).filter(([me])=>!K.has(me)))),K.has(Ua)&&(Ol(""),ra(null),Ql(null),Ho.current=null,localStorage.removeItem(rF(yt)))},[Ff,$f,Ua,yt]),rG=p.useCallback($=>{if(!$||!yt)return;Ff($);const K=Ho.current,te=hs.current.filter(me=>me.id!==$);$f((K==null?void 0:K.id)===$?[K,...te]:te)},[Ff,$f,yt]);p.useEffect(()=>(window.addEventListener("pagehide",Nm),()=>{window.removeEventListener("pagehide",Nm)}),[Nm]),p.useEffect(()=>{if(!yt){Ff(),hs.current=[],Ri([]),Ub([]),Ol(""),Ti(""),Ho.current=null;return}let $=[],K="";try{$=Qcn(localStorage,yt),localStorage.getItem(zL(yt))!==null&&Uce(localStorage,yt,$),K=localStorage.getItem(rF(yt))||"",Ti("")}catch(me){Ti(me instanceof Error?me.message:Bt("errors.readDraftFailed"))}hs.current=$,Ri($),Ub(Gfn(yt));const te=$.find(me=>me.id===K);Ho.current=te??null,xo==="custom"&&te&&(Ol(te.id),ra(te.draft),Qd(X6(te)==="quick"?"vulcan":"traditional"),Ql(te.deploymentTarget??null))},[Ff,yt]),p.useEffect(()=>{if(!yt)return;const $=rF(yt);try{xo==="custom"&&Ua?localStorage.setItem($,Ua):localStorage.removeItem($)}catch{Ti(Bt("errors.saveDraftLocationRejected"))}},[xo,Ua,yt]);const OQe=p.useCallback($=>{if(!yt)return;const K=[...new Set($.filter(Boolean))];Ub(K),localStorage.setItem(CU(yt),JSON.stringify(K))},[yt]),kQe=p.useCallback(async $=>{const K=$.filter(it=>!!it.runtimeId&&it.canDelete===!0);if(K.length===0)return;const te=chn(Wu,i),me=new Set(K.map(it=>it.runtimeId));eG(it=>{const ut=new Set(it);for(const dn of me)ut.add(dn);return ut}),Zm(me);const De=new Set,Ve=new Set,ve=new Set,ot=[];for(const it of K)try{if(!it.region)throw new Error(Bt("errors.runtimeRegionMissingForDelete"));await S2e(it.runtimeId,it.region,{agentCategory:it.agentCategory,mpaInstanceId:it.agentCategory==="mpa"?it.mpaInstanceId??it.runtimeId:void 0}),vP(it.runtimeId),De.add(it.runtimeId),Ve.add(it.id)}catch(ut){const dn=ut instanceof Error?ut.message:String(ut);ve.add(it.runtimeId),ot.push(`${it.label}: ${dn}`)}if(De.size>0&&(Zm(De),QO(sf()),zO(ut=>{if(!ut)return ut;const dn=new Set(ut);for(const Cn of De)dn.delete(Cn);return dn}),JK(ut=>Object.fromEntries(Object.entries(ut).filter(([dn])=>!De.has(dn)))),Ub(ut=>{const dn=ut.filter(Cn=>!Ve.has(Cn));return yt&&localStorage.setItem(CU(yt),JSON.stringify(dn)),dn}),$f(hs.current.filter(ut=>{var dn;return!((dn=ut.deploymentTarget)!=null&&dn.runtimeId)||!De.has(ut.deploymentTarget.runtimeId)})),(te?De.has(te):K.some(ut=>ut.id===i))&&(XQe(),In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),wo(null),aa(""),oa(""),Ir(!0),Fe("")),Mi!=null&&Mi.runtime&&De.has(Mi.runtime.runtimeId)&&(In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Vd(),aa(""),oa(""),Ir(!0),Fe(""))),ve.size>0&&eG(it=>{const ut=new Set(it);for(const dn of ve)ut.delete(dn);return ut}),ot.length>0){const it=ot.slice(0,3).join(";"),ut=ot.length>3?Bt("errors.additionalAgentDeleteFailures",{count:ot.length-3}):"";throw new Error(Bt("errors.agentDeleteFailures",{count:ot.length,failures:it,suffix:ut}))}},[Mi,i,$f,Wu,Vd,yt]),a5=p.useCallback(async()=>{XK(!0),YK("");try{const $=[];let K="";do{const te=await Q0({scope:TO,region:"all",pageSize:100,nextToken:K});$.push(...te.runtimes),K=te.nextToken}while(K&&$.length<2e3);zO(new Set($.map(te=>te.runtimeId))),JK(Object.fromEntries($.map(te=>[te.runtimeId,{canDelete:te.canDelete,agentCategory:te.agentCategory,mpaInstanceId:te.mpaInstanceId}])))}catch($){YK($ instanceof Error?$.message:String($))}finally{XK(!1)}},[TO]);function SQe($){console.log("create agent draft:",$),In(null),zh()}function o5($,K){console.log("Agent added, navigating to:",$,K),QO(sf()),zO(null),Zm(),s5(Ua),Ol(""),Ho.current=null,Ql(null),aa(""),oa($),h2("basic"),In(null),Or(!0),r($)}const EQe=p.useCallback($=>{In(null),mi(!1),Vd(),Or(!0),oa(""),h2("basic"),aa($.id),Fe("")},[Vd]),VO=p.useCallback($=>{Nm();const K=Ua?{...$,draftId:Ua}:$;Ua&&DO(te=>({...te,[Ua]:$.id})),Ud(K)},[Ua,Nm,Ud]),O2=p.useCallback(async $=>{if(!$.runtimeId)throw new Error(Bt("errors.deploymentRuntimeIdMissing"));const K=Ua;K&&(s5(K),DO(Ve=>{if(!Ve[K])return Ve;const ve={...Ve};return delete ve[K],ve})),Ol(""),Ho.current=null,Ql(null);const te=(zd==null?void 0:zd.region)??Qb,me=await XN($.runtimeId,$.runtimeName,$.region??te,$.version,{waitForReady:!0,agentName:$.agentName,agentCategory:$.mpaOperation?"mpa":"general",mpaInstanceId:$.mpaInstanceId});QO(sf()),vo(Ve=>Ve+1);const De=await nF(me);Di.current.set(me,De),ba(De),zO(Ve=>{const ve=new Set(Ve??[]);return ve.add($.runtimeId),ve}),Zm(),oa(me),h2("basic"),aa(""),In(null),Or(!0),r(me)},[Ua,Qb,s5,zd]),Ov=p.useRef(null),l5=p.useRef(new Map),CQe=p.useRef(0),sG=p.useRef(new Map),Hd=p.useMemo(()=>Lot(Sn,ip(i),Gc||Hu),[Sn,i,Wu,Gc,Hu]),aG=Wu.some($=>!!($.runtimeId&&$.region)&&$.apps.some(K=>gf($.id,K)===i));p.useLayoutEffect(()=>{const $=new Map;Hd.forEach((K,te)=>{var ve;const me=((ve=K.meta)==null?void 0:ve.eventId)??"",De=!!(aG&&me&&Hm(K)),Ve=pue(K,te,Hd.length,Gc,Hu);$.set(te,{enabled:!!(De&&Dn!=="byteplus"&&!Ve&&!oF(K)),turn:K,input:De?aF(Hd,te):""})}),sG.current=$},[Gc,Dn,Hu,aG,Hd]);const oG=p.useCallback(()=>{var ve;const $=window.getSelection(),K=($==null?void 0:$.anchorNode)instanceof Element?$.anchorNode:(ve=$==null?void 0:$.anchorNode)==null?void 0:ve.parentElement,te=K==null?void 0:K.closest(".turn--assistant");if(!te)return;const me=Number(te.dataset.responseAnnotationIndex);if(!Number.isInteger(me))return;const De=sG.current.get(me);if(!(De!=null&&De.enabled))return;const Ve=Ofn(te,$);Ve&&gr({selectionId:++CQe.current,turn:De.turn,input:De.input,selectedText:Ve.text,anchor:Ve.anchor})},[]);p.useEffect(()=>{let $=null;const K=te=>{te.target instanceof Element&&te.target.closest(".response-annotation-popover")||($!==null&&window.cancelAnimationFrame($),$=window.requestAnimationFrame(()=>{$=null,oG()}))};return document.addEventListener("mouseup",K,!0),document.addEventListener("keyup",K,!0),()=>{$!==null&&window.cancelAnimationFrame($),document.removeEventListener("mouseup",K,!0),document.removeEventListener("keyup",K,!0)}},[oG]);const Rm=p.useRef(!0),Im=p.useRef(!1),zb=p.useRef(null),lG=p.useRef({key:"",turnCount:0}),c5=(y==null?void 0:y.id)??l;p.useLayoutEffect(()=>{const $=Ov.current,K=lG.current,te=K.key!==c5,me=!te&&Sn.length>K.turnCount;if(lG.current={key:c5,turnCount:Sn.length},!$||Sn.length===0||!te&&!me)return;Rm.current=!0,Im.current=!1,zb.current!==null&&(window.clearTimeout(zb.current),zb.current=null);const De=window.matchMedia("(prefers-reduced-motion: reduce)").matches;if(te||De){$.scrollTop=$.scrollHeight;return}Im.current=!0,$.scrollTo({top:$.scrollHeight,behavior:"smooth"}),zb.current=window.setTimeout(()=>{Im.current=!1,zb.current=null;const Ve=Ov.current;Ve&&Rm.current&&(Ve.scrollTop=Ve.scrollHeight)},450)},[c5,Sn.length]),p.useLayoutEffect(()=>{const $=Ov.current;!$||!Rm.current||Im.current||($.scrollTop=$.scrollHeight)},[Gc,Sn]),p.useEffect(()=>{if(!UO||Tm||Sn.length===0)return;const $=l5.current.get(UO);if(!$)return;Rm.current=!1,$.scrollIntoView({behavior:"smooth",block:"center"});const K=window.setTimeout(()=>{p2("")},2600);return()=>window.clearTimeout(K)},[UO,Tm,Sn]),p.useEffect(()=>()=>{zb.current!==null&&window.clearTimeout(zb.current)},[]);const AQe=p.useCallback(()=>{const $=Ov.current;!$||Im.current||(Rm.current=$.scrollHeight-$.scrollTop-$.clientHeight<32)},[]),TQe=p.useCallback($=>{$.deltaY<0&&(Im.current=!1,Rm.current=!1)},[]),_Qe=p.useCallback(()=>{Im.current=!1,Rm.current=!1},[]),jQe=p.useCallback(()=>{const $=Ov.current;!$||!Rm.current||Im.current||($.scrollTop=$.scrollHeight)},[]),u5=p.useCallback(()=>{mc(null),N8().then($=>{Vo($.userId),Fa($.info),Fb(!!$.local),wl($.status),$.status==="authenticated"&&!localStorage.getItem(kc.session)&&(w2.current=!0,wv.current=!0,localStorage.removeItem(kc.app),r(""),In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),Ir(!1))}).catch($=>{mc($ instanceof Error?$.message:String($))})},[]);p.useEffect(()=>{u5()},[u5]),p.useEffect(()=>{const $=()=>{Df(""),pc(!0)};return window.addEventListener(R8,$),ket()&&$(),()=>window.removeEventListener(R8,$)},[]);const NQe=p.useCallback(async()=>{if(Ul.current)return;Ul.current=!0;const $=met();if(!$){Ul.current=!1,Df(Bt("errors.loginPopupBlocked"));return}Om(!0),Df("");try{for(;;){await new Promise(K=>window.setTimeout(K,1e3));try{const K=await N8();if(K.status==="authenticated"){Vo(K.userId),Fa(K.info),Fb(!!K.local),wl(K.status),pc(!1),Eet(),$.close();return}}catch{}if($.closed){Df(Bt("errors.loginPopupClosed"));return}}}finally{Ul.current=!1,Om(!1)}},[]);p.useEffect(()=>{km&&yt&&qZ(yt)},[km,yt]),p.useEffect(()=>{if(Rr!=="authenticated"||!yt||no)return;const $=new URLSearchParams(window.location.search);if($.get("view")!=="runtime-deploy"||$.get("source")!=="intelligent-development")return;const K=$.get("sessionId")??"",te=$.get("artifactSha256")??"",me=$.get("validationReportSha256")??"",De=$.get("projectId")??"",Ve=$.get("versionId")??"";if(!K||!te||!me)return;const ve=new AbortController;return(De&&Ve?Yle(De,Ve,K,te,me,ve.signal):Zle(K,te,me,ve.signal)).then(it=>{if(!ve.signal.aborted){if(!it.deployable){Si(Bt("errors.sourceNotReady"));return}ws({...it,validatedAt:it.validatedAt||"",gateSummary:it.gateSummary||[]})}}).catch(it=>{ve.signal.aborted||Si(it instanceof Error?it.message:String(it))}),()=>ve.abort()},[Rr,no,yt]),p.useEffect(()=>{if(!Am&&!["intelligent","migration"].includes(xo??""))return;if(Rr!=="authenticated"||!yt){Hs(null),Si(""),Dr(!0);return}const $=new AbortController;return Dr(!0),Si(""),fetch(Ta("/web/intelligent-development/capabilities"),{headers:uc({Accept:"application/json"}),signal:$.signal}).then(async K=>{if(!K.ok)throw new Error(Bt("errors.intelligentCapabilityCheckFailed",{status:K.status}));return K.json()}).then(K=>{if($.signal.aborted)return;const te={enabled:K.enabled===!0,reason:typeof K.reason=="string"?K.reason:"",projectStorageEnabled:K.projectStorageEnabled===!0,projectStorageReason:typeof K.projectStorageReason=="string"?K.projectStorageReason:""};if(K.model!==void 0){if(typeof K.model!="object"||K.model===null)throw new Error(Bt("errors.invalidIntelligentCapability"));const me=K.model;if(typeof me.configured=="boolean"&&typeof me.id=="string")te.model={configured:me.configured,id:me.id};else throw new Error(Bt("errors.invalidIntelligentCapability"))}Hs(te)}).catch(K=>{$.signal.aborted||Si(K instanceof Error?K.message:String(K))}).finally(()=>{$.signal.aborted||Dr(!1)}),()=>$.abort()},[Am,Rr,xo,yt]),p.useEffect(()=>{if(Rr!=="authenticated"||!yt){ba({});return}const $=h.current;if(($==null?void 0:$.agentId)===i&&$.userId===yt)return;const K=Di.current.get(i);if(K){ba(K);return}let te=!1;return ba({}),nF(i).then(me=>{te||(Di.current.set(i,me),ba(me))}),()=>{te=!0}},[i,Rr,yt]),p.useLayoutEffect(()=>{!Ms||es.skillCustomizationEnabled!==!1||Rn!=="skill"||(di("agent"),bt(null),_n(null))},[es.skillCustomizationEnabled,Ms,Rn]),p.useEffect(()=>{if(Rr!=="authenticated"||!yt){Bd(null);return}let $=!1;return Bd(null),c2e().then(K=>{$||Bd(K)}).catch(K=>{console.warn("[app] /web/access failed; using ordinary-user access:",K),$||Bd(l2e)}),()=>{$=!0}},[Rr,yt]),p.useEffect(()=>{o2e().then($=>{const K="prod";Ctn({enabled:$.telemetry.enabled,environment:K});const te=$.telemetry.studio;Atn({userPoolId:(te==null?void 0:te.userPoolId)??"",studioDeployId:(te==null?void 0:te.deployId)??"",applicationId:(te==null?void 0:te.applicationId)??"",functionId:(te==null?void 0:te.functionId)??"",studioRegion:(te==null?void 0:te.region)??"",studioProject:(te==null?void 0:te.project)??"",studioVersion:(te==null?void 0:te.version)||$.version,environment:K,cloudProvider:$.provider,accountId:(te==null?void 0:te.accountId)??"",accountIdResolutionError:(te==null?void 0:te.accountIdResolutionError)??""}),_tn({authState:"anonymous"}),Mb($.features),JT($.agentsSource),e2($.provider),qL((te==null?void 0:te.region)||Zi($.provider)),Ba($.branding),Fh($.version),n2(!0)})},[]),p.useEffect(()=>{if(Rr!=="authenticated"||!Xi||!Nn||!$b)return;const $=String(Nn.telemetry.userId).trim();$&&(Ttn({userUniqueId:$,accountId:Nn.telemetry.accountId??"",userRole:Nn.role==="admin"||Nn.role==="super_admin"?"admin":"member",userSource:km?"local":"sso"}),jtn({agentsSource:gc}))},[Nn,gc,Rr,km,$b,Xi]),p.useEffect(()=>{x2($=>{const K=Zi(Dn);return!$||Dn==="byteplus"&&$.startsWith("cn-")||Dn==="volcengine"&&$.startsWith("ap-")?K:$})},[Dn]),p.useEffect(()=>{Nn&&(Nn.capabilities.createAgents||(In(null),ra(null),rs(!1),mi(!1),a2([])),Nn.capabilities.manageAgents||Or(!1),Nn.capabilities.manageUsers||qo($=>$.filter(K=>K.page!=="users")),Nn.role!=="admin"&&Nn.role!=="super_admin"&&qo($=>$.filter(K=>K.page!=="review-center")))},[Nn]);let Wo={kind:"home"};if(Rr==="authenticated"){if(ks!==null)Wo={kind:"page",title:e("titles.issueFeedback")};else if(g2)Wo={kind:"page",title:e("title",{ns:"users"})};else if(e5)Wo={kind:"page",title:e("titles.systemInfo")};else if(b2)Wo={kind:"page",title:e("titles.reviewCenter")};else if(v2)Wo={kind:"page",title:e("titles.cronJobs")};else if(yc)Wo={kind:"page",title:yc==="catalog"?e("titles.automations"):e(`cards.${yc}.name`,{ns:"automations"})};else if(Ot)Wo={kind:"page",title:Ot.session.displayName||e("titles.agent")};else if(mt)Wo={kind:"page",title:mt.displayName||e("titles.agent")};else if(Xc||Tm)Wo={kind:"page",title:(Mi==null?void 0:Mi.name)||e("titles.agent")};else if(Am)Wo={kind:"page",title:e("titles.createAgent")};else if(BO)Wo={kind:"page",title:e("titles.search")};else if(Bb)Wo={kind:"page",title:e("titles.addAgent")};else if(Uh)Wo={kind:"page",title:GL||e("titles.library")};else if(xo)Wo={kind:"page",title:xo==="custom"?zd!=null&&zd.name?e("titles.updateAgent",{name:zd.name}):e("titles.createAgent"):e(xo==="deepseek"?"deepseek:pageTitle":xo==="package"?"titles.addFromPackage":xo==="workspace"?"titles.codeProjects":"titles.migrateAgent")};else if(y){const $=Pi.threads.find(K=>K.id===y.threadId);Wo={kind:"conversation",title:($==null?void 0:$.name)||($==null?void 0:$.preview)||y.displayName}}else if(l){const $=s.find(me=>me.id===l),K=e("titles.newConversation"),te=iM($==null?void 0:$.events,K);Wo=te===K?{kind:"home"}:{kind:"conversation",title:te}}}const cG=Enn(Mf.title,Wo);p.useEffect(()=>{Rr!=="authenticated"||gc!=="cloud"||!$b||!Tm||Mi||a5()},[Mi,gc,Rr,Tm,a5,$b]),p.useEffect(()=>{document.title=cG;let $=document.querySelector('link[rel~="icon"]');$||($=document.createElement("link"),$.rel="icon",document.head.appendChild($)),$.removeAttribute("type"),$.href=Mf.logoUrl||(Dn==="byteplus"?aH:pM)},[Dn,Mf.logoUrl,cG]),p.useEffect(()=>{fetch("/web/runtime-config",{signal:AbortSignal.timeout(1e4)}).then($=>$.ok?$.json():null).then($=>{$&&c2(!!$.credentials)}).catch($=>{console.warn("[app] /web/runtime-config probe failed; workbench stays hidden:",$)})},[]);function RQe($){qZ($),w2.current=!0,wv.current=!0,localStorage.removeItem(kc.app),Bd(null),In(null),ra(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),zh(),r(""),Ir(!1),Vo($),Fa({name:$}),Fb(!0),wl("authenticated")}function IQe(){Bd(null),km?(het(),Vo(""),Fa(void 0),wl("unauthenticated")):bet()}p.useEffect(()=>{if(Rr==="authenticated"){if(gc==="cloud"){const $=Oue(Wu);r(K=>K&&$.includes(K)?K:(K&&(wv.current=!0,localStorage.removeItem(kc.app)),""));return}XAe().then($=>{n($);const K=Oue(Wu);r(te=>te&&($.includes(te)||K.includes(te))?te:(te&&(wv.current=!0,localStorage.removeItem(kc.app)),""))}).catch($=>Fe(String($)))}},[Rr,gc,Wu]),p.useEffect(()=>{i?(wv.current=!1,localStorage.setItem(kc.app,i)):localStorage.removeItem(kc.app)},[i]),p.useEffect(()=>{const $=h.current;if(($==null?void 0:$.agentId)===i&&$.userId===yt){ia.current=i,Re(!1);return}let K=!1;const te=new AbortController;if(ia.current!==i&&$l(null),ia.current=i,na(ou()),Rr!=="authenticated"||Xc||Mi||!i){Re(!1);return}return Re(!0),$8(i,te.signal).then(me=>{K||$l(me)}).catch(()=>{K||$l(me=>(me==null?void 0:me.agentCategory)==="mpa"?{...me,mpa:{agentsMd:null,agentsMdStatus:"error",skillSpaces:[],skillSpacesStatus:"error"}}:null)}).finally(()=>{K||Re(!1)}),()=>{K=!0,te.abort()}},[Mi,i,Kc,Rr,Xc]),p.useEffect(()=>{Nn&&localStorage.setItem(kc.view,Nn.capabilities.createAgents?xo??"chat":"chat")},[Nn,xo]),p.useEffect(()=>{localStorage.setItem(kc.session,l),Le.current=l},[l]),p.useEffect(()=>{const $=kue(Wu,i);if(!$||!yt){is.current=()=>{},Wt(hi=>hi.size===0?hi:new Set);return}const{runtimeId:K,region:te,appName:me}=$;let De=!1,Ve=0;function ve(){ai.current!==void 0&&(window.clearTimeout(ai.current),ai.current=void 0)}function ot(hi){ve(),ai.current=window.setTimeout(()=>void ut(),hi)}function it(hi){const vi=new Set(hi.items.filter(Vi=>Vi.state==="running").map(Vi=>Vi.sessionId));if(Wt(Vi=>Vi.size===vi.size&&[...vi].every(Li=>Vi.has(Li))?Vi:vi),vi.size>0){ot(zfn);return}const cr=hi.items.filter(Vi=>Vi.state==="pending").map(Vi=>Date.parse(Vi.dueAt)).filter(Number.isFinite);cr.length>0&&ot(Math.max(Vfn,Math.min(...cr)-Date.now()))}async function ut(){const hi=++Ve;try{const vi=await P8({runtimeId:K,region:te,appName:me,userId:yt});if(De||hi!==Ve)return;it(vi)}catch{!De&&hi===Ve&&ot(uue)}}const dn=()=>{ve(),ut()};is.current=dn;const Cn=h.current;return(Cn==null?void 0:Cn.agentId)===i&&Cn.userId===yt?Cn.automaticEvaluationStatuses?it(Cn.automaticEvaluationStatuses):ot(uue):dn(),()=>{De=!0,Ve+=1,ve(),is.current===dn&&(is.current=()=>{})}},[i,Wu,yt]),p.useEffect(()=>()=>{f.current+=1,h.current=null},[]),p.useEffect(()=>()=>gn.current.forEach($=>$.abort()),[]),p.useEffect(()=>()=>$n.current.forEach($=>{window.clearTimeout($)}),[]),p.useEffect(()=>()=>{var $,K,te;($=Ke.current)==null||$.abort(),(K=qe.current)==null||K.abort(),(te=et.current)==null||te.abort()},[]),p.useEffect(()=>{if(Xc||Mi||y||!i||!yt)return;const $=h.current;if(($==null?void 0:$.agentId)===i&&$.userId===yt){h.current=null;return}let K=!1;return(async()=>{const te=await kv(i);if(!K){if(!w2.current){w2.current=!0;const me=localStorage.getItem(kc.session)||"";if(mue()===null&&me&&te.some(De=>De.id===me)){qO(me);return}}zh()}})(),()=>{K=!0}},[Mi,i,Xc,y,yt]),p.useEffect(()=>{const $=n5.current;$&&$.app===i&&(n5.current=null,qO($.sid))},[i]);function uG($,K){Gs(!1),$===i?qO(K):(n5.current={app:$,sid:K},r($))}function dG($,K){on(te=>{const me={...te};for(const De of K)me[Yk($,De.id)]=YJ(De.events??[]);return me}),o(K)}async function kv($){const K=d.current+1;d.current=K;try{const te=await cue($,yt);return d.current!==K||dG($,te),te}catch(te){return d.current===K&&Fe(String(te)),[]}}async function d5($,K,te){try{const me=await sC($,yt,K),De=see(me.events??[],me.state,{mpaA2a:ip($)});cn(Ve=>{const ve=Ve[K]??[],ot=Pot(ve,De,te);return ot===ve?Ve:{...Ve,[K]:ot}})}catch{}}function f5($="codex",K=!1){var De;if(y)return;Fe(""),pe(""),be("confirm"),je($),Ee(!1),_e(Bt("sandbox.checkingPersistence")),le(!1),Oe("snapshot"),We(10),ye(5),Ae(100),(De=St.current)==null||De.abort();const te=new AbortController;St.current=te,($==="codex"?PUe(te.signal):DUe($,te.signal)).then(Ve=>{te.signal.aborted||(Ee(Ve.persistentEnabled===!0),_e(Ve.persistentReason??""),le(Ve.persistentRequired===!0),Oe(Ve.storageMode??"snapshot"),We(Ve.diskGbDefault??10),ye(Ve.diskGbMin??5),Ae(Ve.diskGbMax??100))}).catch(Ve=>{(Ve==null?void 0:Ve.name)!=="AbortError"&&(Ee(!1),_e(Bt("sandbox.persistenceUnknown")))}),Ue(K),ie(!0)}function PQe(){var $,K;($=St.current)==null||$.abort(),St.current=null,(K=Ke.current)==null||K.abort(),Ke.current=null,ie(!1),be("confirm"),pe(""),!y&&ki!=="agent"&&!He&&zn("agent")}async function DQe($,K,te){var Ve;(Ve=Ke.current)==null||Ve.abort();const me=new AbortController;Ke.current=me,be("loading"),pe("");const De=Ntn({sandboxKind:ke,sandboxSource:He?"my_agents":"new_chat"});try{const ve=ke==="codex"?await Br.startSession({displayName:$,persistent:K,diskGb:te,signal:me.signal}):await Br.startAgentSession(ke,{displayName:$,persistent:K,diskGb:te,signal:me.signal});if(Ke.current!==me){De.fail({errorKind:"abort"});return}if(De.succeed({sandboxId:String(ve.id)}),He){Ct(it=>it+1),ie(!1),be("confirm"),Ir(!0);return}if(ke!=="codex"){const it=await Br.openAgentSession(ke,ve.id,{signal:me.signal});if(Ke.current!==me)return;Le.current="",c(""),v([]),Bn(""),na(ou()),zn(ke==="deepseek-harness"?"deepseek-harness":"agent"),mv(zr),ds([]),vt(),O([]),w(null),In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),wo(null),Ir(!1),Ne(null),Nt(it),ie(!1),be("confirm");return}const ot=await Br.connectSession(ve.id,{signal:me.signal});if(Ke.current!==me)return;Le.current="",c(""),v([]),Bn(""),na(ou()),zn("temporary"),mv(zr),ds([]),vt(),O([]),w(ot),In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),wo(null),Ir(!1),Ne(null),Nt(null),ie(!1),be("confirm")}catch(ve){if(De.fail(Xo(ve)),(ve==null?void 0:ve.name)==="AbortError"||Ke.current!==me)return;pe(ve instanceof Error?ve.message:String(ve)),be("error")}finally{Ke.current===me&&(Ke.current=null)}}function fG($,K){Le.current="",c(""),v([]),Bn(""),na(ou()),mv(zr),ds([]),vt(),O(K),ft.current=$.id,w($),S($.busy),In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),wo(null),Ir(!1),qo([]),Qa(null),Yc(!1),Ne(null),Nt(null)}async function hG($,K){const te=await Nv.connectSession($,{signal:K});K.aborted||(Fe(""),fl(void 0),fG(te,[]))}async function k2($,K="my_agents"){Fe("");const te=Ej({targetId:String($.id),agentKind:$.toolName,connectSource:K});try{const me=$.resourceType==="snapshot"?await Br.resumeSnapshot($.toolName,$.snapshotId):$;if($.resourceType==="snapshot"&&Ct(Ve=>Ve+1),me.toolName==="codex"){const Ve=await Br.connectSession(me.id),ve=await fue(Ve);te.succeed({sandboxStatus:sF(Ve.status)}),Le.current="",c(""),v([]),Bn(""),na(ou()),vt(),ve?(O(iF(ve,Ve.busy)),w({...Ve,threadId:ve.threadId,cwd:ve.cwd??Ve.cwd,workspaceLocked:ve.workspaceLocked,permissions:ve.permissions,...ve.model?{model:ve.model}:{}})):(O([]),w(Ve)),S(Ve.busy),jm("sandbox-agent-detail"),Ne(null),Nt(null),Ir(!1),Or(!1);return}const De=await Br.openAgentSession(me.toolName,me.id);te.succeed({sandboxStatus:sF(De.session.status)}),jm("sandbox-agent-detail"),Nt(De),Ne(null),Ir(!1),Or(!1)}catch(me){throw te.fail(Xo(me)),Fe(me instanceof Error?me.message:String(me)),me}}async function MQe($){const te=(await Br.listSessions()).find(me=>me.resourceType==="session"&&me.toolName==="codex"&&me.id===$);if(!te)throw new Error(Bt("errors.cloudCodexSessionMissing"));await k2(te,"my_agents"),Pt(!1)}async function pG($,K="my_agents"){Fe("");const te=Ej({targetId:String($),agentKind:"codex",connectSource:K});try{const me=await Br.connectSession($),De=await fue(me);te.succeed({sandboxStatus:sF(me.status)}),Le.current="",c(""),v([]),Bn(""),na(ou()),vt(),De?(O(iF(De,me.busy)),w({...me,threadId:De.threadId,cwd:De.cwd??me.cwd,workspaceLocked:De.workspaceLocked,permissions:De.permissions,...De.model?{model:De.model}:{}})):(O([]),w(me)),S(me.busy),In(null),Ss(!1),rs(!1),mi(!1),Gs(!1),Or(!1),wo(null),Ir(!1),Qa(null),Yc(!1),Ne(null),Nt(null)}catch(me){throw te.fail(Xo(me)),Fe(me instanceof Error?me.message:String(me)),me}}function LQe($){tt($.toolName),y2({page:"sandbox-agent-detail",returnTo:"agents"}),Ne($),Nt(null),Ir(!0),Or(!1),Fe("")}async function $Qe($){$.resourceType==="snapshot"?await Br.deleteSnapshot($.toolName,$.snapshotId):((y==null?void 0:y.id)===$.id&&Zc(),$.toolName==="codex"?await Br.deleteSession($.id):await Br.deleteAgentSession($.toolName,$.id)),tt($.toolName),jm("sandbox-agent-detail"),Ne(null),Nt(null),Ct(K=>K+1),Ir(!0)}async function FQe(){const $=Yt;if(!$)return;await Pi.deleteThread($.id)&&xn(null)}function Zc($=!0){var te;(te=et.current)==null||te.abort(),et.current=null,ft.current="",Et.current="",S(!1),vt(),O([]),ds([]),Bn(""),Fe(""),zn("agent"),E(!1),T(""),A(!1),P(!1),D(null),L(null),M(!1),q(""),J(null),Z(!1),W(""),tn(),xn(null),H(!1),At.current+=1;const K=y;w(null),K&&$&&!K.intelligentDevelopment&&(K.intelligentDevelopment?Nv:Br).closeSession(K.id).catch(De=>Fe(String(De)))}async function h5($){const K=y;if(K){D($),L(null),q(""),M(!0);try{const te=$==="terminal"?await Lf.launchTerminal(K.id):await Lf.launchBrowser(K.id);L(te)}catch(te){q(te instanceof Error?te.message:String(te))}finally{M(!1)}}}async function BQe(){var K;const $=y;if(!(!$||se==="copying")){Y("copying"),Fe("");try{if(!((K=navigator.clipboard)!=null&&K.writeText))throw new Error(Bt("errors.clipboardUnsupported"));const te=await Br.getEndpoint($.id);if(await navigator.clipboard.writeText(te.endpoint),ft.current!==$.id)return;Y("copied"),It.current!==void 0&&window.clearTimeout(It.current),It.current=window.setTimeout(()=>{Y("idle"),It.current=void 0},1600)}catch(te){if(ft.current!==$.id)return;Y("idle"),Fe(te instanceof Error?te.message:String(te))}}}async function UQe($){const K=y;if(!(!K||C)){E(!0),T("");try{const te=await Lf.updatePermissions(K.id,$);w(me=>(me==null?void 0:me.id)===K.id?{...me,permissions:te}:me),Mn(K.id,Bt("sandbox.permissionsUpdated"),[{label:Bt("sandbox.labels.mode"),value:Bt(rhn[te.sandboxMode])},{label:Bt("sandbox.labels.approvalPolicy"),value:Bt(shn[te.approvalPolicy])},{label:Bt("sandbox.labels.reviewer"),value:Bt(ahn[te.approvalsReviewer])},{label:Bt("sandbox.labels.networkAccess"),value:Bt(te.networkAccess?"sandbox.network.allowed":"sandbox.network.disabled")}]),ft.current===K.id&&A(!1)}catch(te){T(te instanceof Error?te.message:String(te))}finally{E(!1)}}}const QQe=p.useCallback(async $=>{const K=y==null?void 0:y.id;if(!K)throw new Error(Bt("errors.noConnectedSandbox"));return Lf.listDirectories(K,$)},[y==null?void 0:y.id]);async function zQe($){const K=y;if(!(!K||K.workspaceLocked||C)){E(!0),T("");try{const te=await Lf.updateWorkspace(K.id,$);w(me=>(me==null?void 0:me.id)===K.id?{...me,cwd:te}:me),Pi.invalidateSkills(),Mn(K.id,Bt("sandbox.workspaceUpdated"),[{label:Bt("sandbox.labels.workingDirectory"),value:te,code:!0}]),ft.current===K.id&&P(!1)}catch(te){T(te instanceof Error?te.message:String(te))}finally{E(!1)}}}async function VQe($){const K=y,te=U;if(!(!K||!te||z)){Z(!0),W("");try{await Lf.resolveApproval(K.id,te.id,$),Mn(K.id,ohn(te,$),lhn(te),Et.current),J(me=>(me==null?void 0:me.id)===te.id?null:me)}catch(me){W(me instanceof Error?me.message:String(me))}finally{Z(!1)}}}async function HQe($){const K=y;if(!K||G)return;const te=++At.current;Fe(""),H(!0);const me=Array.from($).map(De=>{const Ve={id:xue(),mimeType:wue(De),name:De.name,sizeBytes:De.size,status:"uploading",previewUrl:Xe(De)};return{file:De,attachment:Ve}});ds(De=>[...De,...me.map(({attachment:Ve})=>Ve)]);try{const Ve=(await Promise.all(me.map(async({file:ve,attachment:ot})=>{try{const it=await Lf.uploadFile(K.id,ve);return At.current!==te?null:(ds(ut=>ut.map(dn=>dn.id===ot.id?{...dn,id:it.id,uri:it.path,name:it.name,mimeType:it.mimeType,sizeBytes:it.sizeBytes,status:"ready"}:dn)),it)}catch(it){if(At.current!==te)return null;const ut=it instanceof Error?it.message:String(it);return ds(dn=>dn.map(Cn=>Cn.id===ot.id?{...Cn,status:"error",error:ut}:Cn)),Fe(ut),null}}))).filter(ve=>ve!==null);At.current===te&&Ve.length>0&&Mn(K.id,Ve.length===1?Bt("sandbox.fileUploaded"):Bt("sandbox.filesUploaded",{count:Ve.length}),Ve.map((ve,ot)=>({label:Ve.length===1?Bt("sandbox.labels.file"):Bt("sandbox.labels.fileNumber",{number:ot+1}),value:ve.path,code:!0})))}finally{if(At.current===te)H(!1);else for(const{attachment:De}of me)wt(De.previewUrl)}}function qQe($){const K=zr.find(te=>te.id===$);K&&(wt(K.previewUrl),ds(te=>te.filter(me=>me.id!==$)))}function WQe(){const $=et.current,K=y;if(K!=null&&K.intelligentDevelopment){so.stop();return}$&&($.abort(),K&&Br.interruptSession(K.id).catch(te=>{ft.current===K.id&&Fe(te instanceof Error?te.message:String(te))}))}function zl($){$()}async function S2($,K=[],te=[],me){var br;const De=me??y;if(De!=null&&De.intelligentDevelopment){await so.submit($.trim(),De.id)&&Bn(li=>li===$?"":li);return}const Ve=K.filter(nn=>nn.status==="ready"&&nn.uri);if(!De||k||!$.trim()&&Ve.length===0)return;Fe(""),J(null),W("");const ve=hle({agentId:String(De.id),agentKind:De.toolName,messageSource:"composer",sessionState:"existing",sessionId:String(De.id)}),ot=new AbortController;(br=et.current)==null||br.abort(),et.current=ot;const it=[];te.length>0&&it.push({kind:"invocation",value:{skills:te.map(({name:nn,description:li})=>({name:nn,description:li}))}}),Ve.length>0&&it.push({kind:"attachment",files:Ve.map(nn=>({id:nn.id,mimeType:nn.mimeType,name:nn.name,sizeBytes:nn.sizeBytes,previewUrl:nn.previewUrl}))}),$.trim()&&it.push({kind:"text",text:$});const ut=Ve.map(nn=>nn.uri).filter(nn=>!!nn),Cn=[te.map(nn=>`$${nn.name}`).join(" "),$.trim()].filter(Boolean).join(" "),hi=ut.length>0?[Cn,Bt("sandbox.uploadedFilesPrompt"),...ut.map(nn=>`- ${nn}`)].filter(Boolean).join(` diff --git a/veadk/webui/assets/chunks/CodeDiffEditor-DWA74Z9P.js b/veadk/webui/assets/chunks/CodeDiffEditor-BA7DPPzD.js similarity index 99% rename from veadk/webui/assets/chunks/CodeDiffEditor-DWA74Z9P.js rename to veadk/webui/assets/chunks/CodeDiffEditor-BA7DPPzD.js index ac1123d4e..fbc45b507 100644 --- a/veadk/webui/assets/chunks/CodeDiffEditor-DWA74Z9P.js +++ b/veadk/webui/assets/chunks/CodeDiffEditor-BA7DPPzD.js @@ -1,3 +1,3 @@ -import{T as Fe,k as $,h as L,E as te,d as Ve,w as R,C as Ie,x as W,ak as je,M as at,F as Ue,y as dt,D as B,o as G,G as oe,W as J,at as ft,an as ht,R as We,ao as ct,as as ne,p as ut,au as He,aD as Q,aA as mt,N as gt}from"../app/index-B71Wq9_t.js";class v{constructor(e,n,l,r){this.fromA=e,this.toA=n,this.fromB=l,this.toB=r}offset(e,n=e){return new v(this.fromA+e,this.toA+e,this.fromB+n,this.toB+n)}}function y(t,e,n,l,r,i){if(t==l)return[];let s=de(t,e,n,l,r,i),o=fe(t,e+s,n,l,r+s,i);e+=s,n-=o,r+=s,i-=o;let d=n-e,h=i-r;if(!d||!h)return[new v(e,n,r,i)];if(d>h){let f=t.slice(e,n).indexOf(l.slice(r,i));if(f>-1)return[new v(e,e+f,r,r),new v(e+f+h,n,i,i)]}else if(h>d){let f=l.slice(r,i).indexOf(t.slice(e,n));if(f>-1)return[new v(e,e,r,r+f),new v(n,n,r+f+d,i)]}if(d==1||h==1)return[new v(e,n,r,i)];let a=qe(t,e,n,l,r,i);if(a){let[f,c,u]=a;return y(t,e,f,l,r,c).concat(y(t,f+u,n,l,c+u,i))}return pt(t,e,n,l,r,i)}let I=1e9,j=0,ae=!1;function pt(t,e,n,l,r,i){let s=n-e,o=i-r;if(I<1e9&&Math.min(s,o)>I*16||j>0&&Date.now()>j)return Math.min(s,o)>I*64?[new v(e,n,r,i)]:ge(t,e,n,l,r,i);let d=Math.ceil((s+o)/2);X.reset(d),ee.reset(d);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(r+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(i-m-1),f=(s-o)%2!=0?ee:null,c=f?null:X;for(let u=0;uI||j>0&&!(u&63)&&Date.now()>j)return ge(t,e,n,l,r,i);let m=X.advance(u,s,o,d,f,!1,h)||ee.advance(u,s,o,d,c,!0,a);if(m)return Ct(t,e,n,e+m[0],l,r,i,r+m[1])}return[new v(e,n,r,i)]}class Pe{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;nn)this.end+=2;else if(f>l)this.start+=2;else if(i){let c=r+(n-l)-d;if(c>=0&&c=n-a)return[u,r+u-c]}else{let u=n-i.vec[c];if(a>=u)return[a,f]}}}return null}}const X=new Pe,ee=new Pe;function Ct(t,e,n,l,r,i,s,o){let d=!1;return!N(t,l)&&++l==n&&(d=!0),!N(r,o)&&++o==s&&(d=!0),d?[new v(e,n,i,s)]:y(t,e,l,r,i,o).concat(y(t,l,n,r,o,s))}function ze(t,e){let n=1,l=Math.min(t,e);for(;nn||a>i||t.slice(o,h)!=l.slice(d,a)){if(s==1)return o-e-(N(t,o)?0:1);s=s>>1}else{if(h==n||a==i)return h-e;o=h,d=a}}}function fe(t,e,n,l,r,i){if(e==n||r==i||t.charCodeAt(n-1)!=l.charCodeAt(i-1))return 0;let s=ze(n-e,i-r);for(let o=n,d=i;;){let h=o-s,a=d-s;if(h>1}else{if(h==e||a==r)return n-h;o=h,d=a}}}function ie(t,e,n,l,r,i,s,o){let d=l.slice(r,i),h=null;for(;;){if(h||s=n)break;let c=t.slice(a,f),u=-1;for(;(u=d.indexOf(c,u+1))!=-1;){let m=de(t,f,n,l,r+u+c.length,i),p=fe(t,e,a,l,r,r+u),g=c.length+m+p;(!h||h[2]>1}}function qe(t,e,n,l,r,i){let s=n-e,o=i-r;if(sr.fromA-e&&l.toB>r.fromB-e&&(t[n-1]=new v(l.fromA,r.toA,l.fromB,r.toB),t.splice(n--,1))}}function vt(t,e,n){for(;;){_e(n,1);let l=!1;for(let r=0;r3||o>3){let d=r==t.length-1?e.length:t[r+1].fromA,h=i.fromA-l,a=d-i.toA,f=Ce(e,i.fromA,h),c=pe(e,i.toA,a),u=i.fromA-f,m=c-i.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,S]=s?[e,i.fromA,i.toA]:[n,i.fromB,i.toB];p>u&&e.slice(f,i.fromA)==g.slice(S-u,S)?(i=t[r]=new v(f,f+s,i.fromB-u,i.toB-u),f=i.fromA,c=pe(e,i.toA,d-i.toA)):p>m&&e.slice(i.toA,c)==g.slice(C,C+m)&&(i=t[r]=new v(c-s,c,i.fromB+m,i.toB+m),c=i.toA,f=Ce(e,i.fromA,i.fromA-l)),u=i.fromA-f,m=c-i.toA}if(u||m)i=t[r]=new v(i.fromA-u,i.toA+m,i.fromB-u,i.toB+m);else if(s){if(!o){let p=Ae(e,i.fromA,i.toA),g,C=p<0?-1:ve(e,i.toA,i.fromA);p>-1&&(g=p-i.fromA)<=a&&e.slice(i.fromA,p)==e.slice(i.toA,i.toA+g)?i=t[r]=i.offset(g):C>-1&&(g=i.toA-C)<=h&&e.slice(i.fromA-g,i.fromA)==e.slice(C,i.toA)&&(i=t[r]=i.offset(-g))}}else{let p=Ae(n,i.fromB,i.toB),g,C=p<0?-1:ve(n,i.toB,i.fromB);p>-1&&(g=p-i.fromB)<=a&&n.slice(i.fromB,p)==n.slice(i.toB,i.toB+g)?i=t[r]=i.offset(g):C>-1&&(g=i.toB-C)<=h&&n.slice(i.fromB-g,i.fromB)==n.slice(C,i.toB)&&(i=t[r]=i.offset(-g))}}l=i.toA}return _e(t,3),t}let O;try{O=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Qe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function Ye(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Qe(n)?1:0:O?!Ke(n)||e==t.length-1?O.test(String.fromCharCode(n))?1:0:O.test(t.slice(e,e+2))?2:0:0}function $e(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Qe(n)?1:0:O?!Ze(n)||e==1?O.test(String.fromCharCode(n))?1:0:O.test(t.slice(e-2,e))?2:0:0}const Je=8;function pe(t,e,n){if(e==t.length||!$e(t,e))return e;for(let l=e,r=e+n,i=0;ir)return l;l+=s}return e}function Ce(t,e,n){if(!e||!Ye(t,e))return e;for(let l=e,r=e-n,i=0;it>=55296&&t<=56319,Ze=t=>t>=56320&&t<=57343;function N(t,e){return!e||e==t.length||!Ke(t.charCodeAt(e-1))||!Ze(t.charCodeAt(e))}function xt(t,e,n){var l;let r=n==null?void 0:n.override;return r?r(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,j=n!=null&&n.timeout?Date.now()+n.timeout:0,ae=!1,vt(t,e,y(t,0,t.length,e,0,e.length)))}function Xe(){return!ae}function et(t,e,n){return At(xt(t,e,n),t,e)}const b=Ue.define({combine:t=>t[0]}),re=R.define(),tt=Ue.define(),k=W.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(re)&&(t=n.value);for(let n of e.state.facet(tt))t=n(t,e);return t}});class E{constructor(e,n,l,r,i,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=r,this.toB=i,this.precise=s}offset(e,n){return e||n?new E(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let r=et(e.toString(),n.toString(),l);return nt(r,e,n,0,0,Xe())}static updateA(e,n,l,r,i){return Be(be(e,r,!0,l.length),e,n,l,i)}static updateB(e,n,l,r,i){return Be(be(e,r,!1,n.length),e,n,l,i)}}function xe(t,e,n,l){let r=n.lineAt(t),i=l.lineAt(e);return r.to==t&&i.to==e&&tf+1&&g>c+1)break;u.push(m.offset(-h+l,-a+r)),[f,c]=we(m.toA+l,m.toB+r,e,n),o++}s.push(new E(u,h,Math.max(h,f),a,Math.max(a,c),i))}return s}const H=1e3;function ke(t,e,n,l){let r=0,i=t.length;for(;;){if(r==i){let a=0,f=0;r&&({toA:a,toB:f}=t[r-1]);let c=e-(n?a:f);return[a+c,f+c]}let s=r+i>>1,o=t[s],[d,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(d>e)i=s;else if(h<=e)r=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function be(t,e,n,l){let r=[];return e.iterChangedRanges((i,s,o,d)=>{let h=0,a=n?e.length:l,f=0,c=n?l:e.length;i>H&&([h,f]=ke(t,i-H,n,!0)),s=h?r[r.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:r.push({fromA:h,toA:a,fromB:f,toB:c,diffA:p,diffB:g})}),r}function Be(t,e,n,l,r){if(!t.length)return e;let i=[];for(let s=0,o=0,d=0,h=0;;s++){let a=s==t.length?null:t[s],f=a?a.fromA+o:n.length,c=a?a.fromB+d:l.length;for(;hf||g.toB+d>c))break;i.push(g.offset(o,d)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+d+a.diffB,p=et(n.sliceString(f,u),l.sliceString(c,m),r);for(let g of nt(p,n,l,f,c,Xe()))i.push(g);for(o+=a.diffA,d+=a.diffB;hu&&g.fromB+d>m)break;h++}}return i}const it={scanLimit:500},K=at.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Le(t))}update(t){(t.docChanged||t.viewportChanged||wt(t.startState,t.state)||kt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Le(t.view))}},{decorations:t=>t.deco}),P=$.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(K))===null||e===void 0?void 0:e.gutter)||We.empty}}));function wt(t,e){return t.field(k,!1)!=e.field(k,!1)}function kt(t,e){return t.facet(b)!=e.facet(b)}const Me=B.line({class:"cm-changedLine"}),rt=B.mark({class:"cm-changedText"}),bt=B.mark({tagName:"ins",class:"cm-insertedLine"}),Bt=B.mark({tagName:"del",class:"cm-deletedLine"}),De=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Mt(t,e,n,l,r,i){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,d=0;if(s!=o){r.add(s,s,Me),r.add(s,o,n?Bt:bt),i&&i.add(s,s,De);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,r.add(a,a,Me),i&&i.add(a,a,De);continue}let f=a+h.value.length;if(l)for(;d=a)break;(s?f.toA:f.toB)>h&&(!i||!i(t.state,f,o,d))&&Mt(f,t.state.doc,s,l,o,d)}return{deco:o.finish(),gutter:d&&d.finish()}}class z extends J{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const Y=R.define({map:(t,e)=>t.map(e)}),U=W.define({create:()=>B.none,update:(t,e)=>{for(let n of e.effects)if(n.is(Y))return n.value;return t.map(e.changes)},provide:t=>L.decorations.from(t)}),q=.01;function Se(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function Dt(t,e,n){let l=new G,r=new G,i=t.state.field(U).iter(),s=e.state.field(U).iter(),o=0,d=0,h=0,a=0,f=t.viewport,c=e.viewport;for(let g=0;;g++){let C=gq&&(a+=w,r.add(d,d,B.widget({widget:new z(w),block:!0,side:-1})))}if(S>o+1e3&&of.from&&dc.from){let x=Math.min(f.from-o,c.from-d);o+=x,d+=x,g--}else if(C)o=C.toA,d=C.toB;else break;for(;i.value&&i.fromq&&r.add(e.state.doc.length,e.state.doc.length,B.widget({widget:new z(u),block:!0,side:1}));let m=l.finish(),p=r.finish();Se(m,t.state.field(U))||t.dispatch({effects:Y.of(m)}),Se(p,e.state.field(U))||e.dispatch({effects:Y.of(p)})}const le=R.define({map:(t,e)=>e.mapPos(t)});class Lt extends J{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let r=e.posAtDOM(l.target);e.dispatch({effects:le.of(r)});let{side:i,sibling:s}=e.state.facet(b);s&&s().dispatch({effects:le.of(St(r,e.state.field(k),i=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function St(t,e,n){let l=0,r=0;for(let i=0;;i++){let s=i=t)return r+(t-l);[l,r]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const Et=W.define({create(t){return B.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(le)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(k)!=e.startState.field(k,!1)){let n=e.state.facet(b).side=="a",l=[];for(let r of e.state.field(k))t.between(n?r.fromA:r.fromB,n?r.toA:r.toB,i=>{l.push(i)});l.length&&(t=t.update({filter:r=>l.indexOf(r)<0}))}return t},provide:t=>L.decorations.from(t)});function se({margin:t=3,minSize:e=4}){return Et.init(n=>Ot(n,t,e))}function Ot(t,e,n){let l=new G,r=t.facet(b).side=="a",i=t.field(k),s=1;for(let o=0;;o++){let d=o=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,B.replace({widget:new Lt(f),block:!0})),!d)break;s=t.doc.lineAt(Math.min(t.doc.length,r?d.toA:d.toB)).number}return l.finish()}const yt=L.styleModule.of(new dt({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),lt=L.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Ee=new Ve,_=new Ve;class Tt{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||it;let n=[$.low(K),lt,yt,U,L.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(c=>c.effects.some(u=>u.is(Y)))&&this.measure()})],l=[b.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(P);let r=te.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],L.editorAttributes.of({class:"cm-merge-a"}),_.of(l),n]}),i=[b.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(P);let s=te.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],L.editorAttributes.of({class:"cm-merge-b"}),_.of(i),n]});this.chunks=E.build(r.doc,s.doc,this.diffConf);let o=[k.init(()=>this.chunks),Ee.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];r=r.update({effects:R.appendConfig.of(o)}).state,s=s.update({effects:R.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let d=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(d=="a-b"?h:a),this.editorDOM.appendChild(d=="a-b"?a:h),this.a=new L({state:r,parent:h,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new L({state:s,parent:a,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],r=e.reduce((s,o)=>s.compose(o.changes),Ie.empty(e[0].startState.doc.length));this.chunks=n==this.a?E.updateA(this.chunks,l.newDoc,this.b.state.doc,r,this.diffConf):E.updateB(this.chunks,this.a.state.doc,l.newDoc,r,this.diffConf),n.update([...e,l.state.update({effects:re.of(this.chunks)})]);let i=n==this.a?this.b:this.a;i.update([i.state.update({effects:re.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let i=e.orientation!="b-a";if(i!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(i?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(i?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let i=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(i=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(i,s,o)}let n="highlightChanges"in e,l="gutter"in e,r="collapseUnchanged"in e;if(n||l||r){let i=[],s=[];if(n||l){let o=this.a.state.facet(b),d=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;i.push(_.reconfigure([b.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:d}),d?P:[]])),s.push(_.reconfigure([b.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:d}),d?P:[]]))}if(r){let o=Ee.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);i.push(o),s.push(o)}this.a.dispatch({effects:i}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",r=>this.revertClicked(r)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){Dt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,r=this.b.viewport;for(let i=0;il.to||s.fromB>r.to)break;if(s.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Oe(t){let e=t.nextSibling;return t.remove(),e}const Rt=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Gt=$.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(K))===null||e===void 0?void 0:e.gutter)||We.empty},widgetMarker:(t,e)=>e instanceof st?Rt:null}));function Nt(t){var e;let n=typeof t.original=="string"?Fe.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||it;return[$.low(K),jt,lt,L.editorAttributes.of({class:"cm-merge-b"}),tt.of((r,i)=>{let s=i.effects.find(o=>o.is(he));return s&&(r=E.updateA(r,s.value.doc,i.startState.doc,s.value.changes,l)),i.docChanged&&(r=E.updateB(r,i.state.field(F),i.newDoc,i.changes,l)),r}),b.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:Pt,side:"b"}),F.init(()=>n),t.gutter!==!1?Gt:[],t.collapseUnchanged?se(t.collapseUnchanged):[],k.init(r=>E.build(n,r.doc,l))]}const he=R.define(),F=W.define({create:()=>Fe.empty,update(t,e){for(let n of e.effects)n.is(he)&&(t=n.value.doc);return t}}),ye=new WeakMap;class st extends J{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Ft(t,e,n){let l=ye.get(e.changes);if(l)return l;let r=s=>{let{highlightChanges:o,syntaxHighlightDeletions:d,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(b),f=document.createElement("div");if(f.className="cm-deletedChunk",a){let x=f.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let M=A=>{A.preventDefault(),Vt(s,s.posAtDOM(f))},w=A=>{A.preventDefault(),It(s,s.posAtDOM(f))};if(typeof a=="function")x.appendChild(a("accept",M)),x.appendChild(a("reject",w));else{let A=x.appendChild(document.createElement("button"));A.name="accept",A.textContent=t.phrase("Accept"),A.onmousedown=M;let D=x.appendChild(document.createElement("button"));D.name="reject",D.textContent=t.phrase("Reject"),D.onmousedown=w}}if(n||e.fromA>=e.toA)return f;let c=s.state.field(F).sliceString(e.fromA,e.endA),u=d&&t.facet(ft),m=S(),p=e.changes,g=0,C=!1;function S(){let x=f.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function T(x,M,w){for(let A=x;Ah){let f=t.slice(e,n).indexOf(l.slice(r,i));if(f>-1)return[new v(e,e+f,r,r),new v(e+f+h,n,i,i)]}else if(h>d){let f=l.slice(r,i).indexOf(t.slice(e,n));if(f>-1)return[new v(e,e,r,r+f),new v(n,n,r+f+d,i)]}if(d==1||h==1)return[new v(e,n,r,i)];let a=qe(t,e,n,l,r,i);if(a){let[f,c,u]=a;return y(t,e,f,l,r,c).concat(y(t,f+u,n,l,c+u,i))}return pt(t,e,n,l,r,i)}let I=1e9,j=0,ae=!1;function pt(t,e,n,l,r,i){let s=n-e,o=i-r;if(I<1e9&&Math.min(s,o)>I*16||j>0&&Date.now()>j)return Math.min(s,o)>I*64?[new v(e,n,r,i)]:ge(t,e,n,l,r,i);let d=Math.ceil((s+o)/2);X.reset(d),ee.reset(d);let h=(u,m)=>t.charCodeAt(e+u)==l.charCodeAt(r+m),a=(u,m)=>t.charCodeAt(n-u-1)==l.charCodeAt(i-m-1),f=(s-o)%2!=0?ee:null,c=f?null:X;for(let u=0;uI||j>0&&!(u&63)&&Date.now()>j)return ge(t,e,n,l,r,i);let m=X.advance(u,s,o,d,f,!1,h)||ee.advance(u,s,o,d,c,!0,a);if(m)return Ct(t,e,n,e+m[0],l,r,i,r+m[1])}return[new v(e,n,r,i)]}class Pe{constructor(){this.vec=[]}reset(e){this.len=e<<1;for(let n=0;nn)this.end+=2;else if(f>l)this.start+=2;else if(i){let c=r+(n-l)-d;if(c>=0&&c=n-a)return[u,r+u-c]}else{let u=n-i.vec[c];if(a>=u)return[a,f]}}}return null}}const X=new Pe,ee=new Pe;function Ct(t,e,n,l,r,i,s,o){let d=!1;return!N(t,l)&&++l==n&&(d=!0),!N(r,o)&&++o==s&&(d=!0),d?[new v(e,n,i,s)]:y(t,e,l,r,i,o).concat(y(t,l,n,r,o,s))}function ze(t,e){let n=1,l=Math.min(t,e);for(;nn||a>i||t.slice(o,h)!=l.slice(d,a)){if(s==1)return o-e-(N(t,o)?0:1);s=s>>1}else{if(h==n||a==i)return h-e;o=h,d=a}}}function fe(t,e,n,l,r,i){if(e==n||r==i||t.charCodeAt(n-1)!=l.charCodeAt(i-1))return 0;let s=ze(n-e,i-r);for(let o=n,d=i;;){let h=o-s,a=d-s;if(h>1}else{if(h==e||a==r)return n-h;o=h,d=a}}}function ie(t,e,n,l,r,i,s,o){let d=l.slice(r,i),h=null;for(;;){if(h||s=n)break;let c=t.slice(a,f),u=-1;for(;(u=d.indexOf(c,u+1))!=-1;){let m=de(t,f,n,l,r+u+c.length,i),p=fe(t,e,a,l,r,r+u),g=c.length+m+p;(!h||h[2]>1}}function qe(t,e,n,l,r,i){let s=n-e,o=i-r;if(sr.fromA-e&&l.toB>r.fromB-e&&(t[n-1]=new v(l.fromA,r.toA,l.fromB,r.toB),t.splice(n--,1))}}function vt(t,e,n){for(;;){_e(n,1);let l=!1;for(let r=0;r3||o>3){let d=r==t.length-1?e.length:t[r+1].fromA,h=i.fromA-l,a=d-i.toA,f=Ce(e,i.fromA,h),c=pe(e,i.toA,a),u=i.fromA-f,m=c-i.toA;if((!s||!o)&&u&&m){let p=Math.max(s,o),[g,C,S]=s?[e,i.fromA,i.toA]:[n,i.fromB,i.toB];p>u&&e.slice(f,i.fromA)==g.slice(S-u,S)?(i=t[r]=new v(f,f+s,i.fromB-u,i.toB-u),f=i.fromA,c=pe(e,i.toA,d-i.toA)):p>m&&e.slice(i.toA,c)==g.slice(C,C+m)&&(i=t[r]=new v(c-s,c,i.fromB+m,i.toB+m),c=i.toA,f=Ce(e,i.fromA,i.fromA-l)),u=i.fromA-f,m=c-i.toA}if(u||m)i=t[r]=new v(i.fromA-u,i.toA+m,i.fromB-u,i.toB+m);else if(s){if(!o){let p=Ae(e,i.fromA,i.toA),g,C=p<0?-1:ve(e,i.toA,i.fromA);p>-1&&(g=p-i.fromA)<=a&&e.slice(i.fromA,p)==e.slice(i.toA,i.toA+g)?i=t[r]=i.offset(g):C>-1&&(g=i.toA-C)<=h&&e.slice(i.fromA-g,i.fromA)==e.slice(C,i.toA)&&(i=t[r]=i.offset(-g))}}else{let p=Ae(n,i.fromB,i.toB),g,C=p<0?-1:ve(n,i.toB,i.fromB);p>-1&&(g=p-i.fromB)<=a&&n.slice(i.fromB,p)==n.slice(i.toB,i.toB+g)?i=t[r]=i.offset(g):C>-1&&(g=i.toB-C)<=h&&n.slice(i.fromB-g,i.fromB)==n.slice(C,i.toB)&&(i=t[r]=i.offset(-g))}}l=i.toA}return _e(t,3),t}let O;try{O=new RegExp("[\\p{Alphabetic}\\p{Number}]","u")}catch{}function Qe(t){return t>48&&t<58||t>64&&t<91||t>96&&t<123}function Ye(t,e){if(e==t.length)return 0;let n=t.charCodeAt(e);return n<192?Qe(n)?1:0:O?!Ke(n)||e==t.length-1?O.test(String.fromCharCode(n))?1:0:O.test(t.slice(e,e+2))?2:0:0}function $e(t,e){if(!e)return 0;let n=t.charCodeAt(e-1);return n<192?Qe(n)?1:0:O?!Ze(n)||e==1?O.test(String.fromCharCode(n))?1:0:O.test(t.slice(e-2,e))?2:0:0}const Je=8;function pe(t,e,n){if(e==t.length||!$e(t,e))return e;for(let l=e,r=e+n,i=0;ir)return l;l+=s}return e}function Ce(t,e,n){if(!e||!Ye(t,e))return e;for(let l=e,r=e-n,i=0;it>=55296&&t<=56319,Ze=t=>t>=56320&&t<=57343;function N(t,e){return!e||e==t.length||!Ke(t.charCodeAt(e-1))||!Ze(t.charCodeAt(e))}function xt(t,e,n){var l;let r=n==null?void 0:n.override;return r?r(t,e):(I=((l=n==null?void 0:n.scanLimit)!==null&&l!==void 0?l:1e9)>>1,j=n!=null&&n.timeout?Date.now()+n.timeout:0,ae=!1,vt(t,e,y(t,0,t.length,e,0,e.length)))}function Xe(){return!ae}function et(t,e,n){return At(xt(t,e,n),t,e)}const b=Ue.define({combine:t=>t[0]}),re=R.define(),tt=Ue.define(),k=W.define({create(t){return null},update(t,e){for(let n of e.effects)n.is(re)&&(t=n.value);for(let n of e.state.facet(tt))t=n(t,e);return t}});class E{constructor(e,n,l,r,i,s=!0){this.changes=e,this.fromA=n,this.toA=l,this.fromB=r,this.toB=i,this.precise=s}offset(e,n){return e||n?new E(this.changes,this.fromA+e,this.toA+e,this.fromB+n,this.toB+n,this.precise):this}get endA(){return Math.max(this.fromA,this.toA-1)}get endB(){return Math.max(this.fromB,this.toB-1)}static build(e,n,l){let r=et(e.toString(),n.toString(),l);return nt(r,e,n,0,0,Xe())}static updateA(e,n,l,r,i){return Be(be(e,r,!0,l.length),e,n,l,i)}static updateB(e,n,l,r,i){return Be(be(e,r,!1,n.length),e,n,l,i)}}function xe(t,e,n,l){let r=n.lineAt(t),i=l.lineAt(e);return r.to==t&&i.to==e&&tf+1&&g>c+1)break;u.push(m.offset(-h+l,-a+r)),[f,c]=we(m.toA+l,m.toB+r,e,n),o++}s.push(new E(u,h,Math.max(h,f),a,Math.max(a,c),i))}return s}const H=1e3;function ke(t,e,n,l){let r=0,i=t.length;for(;;){if(r==i){let a=0,f=0;r&&({toA:a,toB:f}=t[r-1]);let c=e-(n?a:f);return[a+c,f+c]}let s=r+i>>1,o=t[s],[d,h]=n?[o.fromA,o.toA]:[o.fromB,o.toB];if(d>e)i=s;else if(h<=e)r=s+1;else return l?[o.fromA,o.fromB]:[o.toA,o.toB]}}function be(t,e,n,l){let r=[];return e.iterChangedRanges((i,s,o,d)=>{let h=0,a=n?e.length:l,f=0,c=n?l:e.length;i>H&&([h,f]=ke(t,i-H,n,!0)),s=h?r[r.length-1]={fromA:m.fromA,fromB:m.fromB,toA:a,toB:c,diffA:m.diffA+p,diffB:m.diffB+g}:r.push({fromA:h,toA:a,fromB:f,toB:c,diffA:p,diffB:g})}),r}function Be(t,e,n,l,r){if(!t.length)return e;let i=[];for(let s=0,o=0,d=0,h=0;;s++){let a=s==t.length?null:t[s],f=a?a.fromA+o:n.length,c=a?a.fromB+d:l.length;for(;hf||g.toB+d>c))break;i.push(g.offset(o,d)),h++}if(!a)break;let u=a.toA+o+a.diffA,m=a.toB+d+a.diffB,p=et(n.sliceString(f,u),l.sliceString(c,m),r);for(let g of nt(p,n,l,f,c,Xe()))i.push(g);for(o+=a.diffA,d+=a.diffB;hu&&g.fromB+d>m)break;h++}}return i}const it={scanLimit:500},K=at.fromClass(class{constructor(t){({deco:this.deco,gutter:this.gutter}=Le(t))}update(t){(t.docChanged||t.viewportChanged||wt(t.startState,t.state)||kt(t.startState,t.state))&&({deco:this.deco,gutter:this.gutter}=Le(t.view))}},{decorations:t=>t.deco}),P=$.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(K))===null||e===void 0?void 0:e.gutter)||We.empty}}));function wt(t,e){return t.field(k,!1)!=e.field(k,!1)}function kt(t,e){return t.facet(b)!=e.facet(b)}const Me=B.line({class:"cm-changedLine"}),rt=B.mark({class:"cm-changedText"}),bt=B.mark({tagName:"ins",class:"cm-insertedLine"}),Bt=B.mark({tagName:"del",class:"cm-deletedLine"}),De=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-changedLineGutter"}};function Mt(t,e,n,l,r,i){let s=n?t.fromA:t.fromB,o=n?t.toA:t.toB,d=0;if(s!=o){r.add(s,s,Me),r.add(s,o,n?Bt:bt),i&&i.add(s,s,De);for(let h=e.iterRange(s,o-1),a=s;!h.next().done;){if(h.lineBreak){a++,r.add(a,a,Me),i&&i.add(a,a,De);continue}let f=a+h.value.length;if(l)for(;d=a)break;(s?f.toA:f.toB)>h&&(!i||!i(t.state,f,o,d))&&Mt(f,t.state.doc,s,l,o,d)}return{deco:o.finish(),gutter:d&&d.finish()}}class z extends J{constructor(e){super(),this.height=e}eq(e){return this.height==e.height}toDOM(){let e=document.createElement("div");return e.className="cm-mergeSpacer",e.style.height=this.height+"px",e}updateDOM(e){return e.style.height=this.height+"px",!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}const Y=R.define({map:(t,e)=>t.map(e)}),U=W.define({create:()=>B.none,update:(t,e)=>{for(let n of e.effects)if(n.is(Y))return n.value;return t.map(e.changes)},provide:t=>L.decorations.from(t)}),q=.01;function Se(t,e){if(t.size!=e.size)return!1;let n=t.iter(),l=e.iter();for(;n.value;){if(n.from!=l.from||Math.abs(n.value.spec.widget.height-l.value.spec.widget.height)>1)return!1;n.next(),l.next()}return!0}function Dt(t,e,n){let l=new G,r=new G,i=t.state.field(U).iter(),s=e.state.field(U).iter(),o=0,d=0,h=0,a=0,f=t.viewport,c=e.viewport;for(let g=0;;g++){let C=gq&&(a+=w,r.add(d,d,B.widget({widget:new z(w),block:!0,side:-1})))}if(S>o+1e3&&of.from&&dc.from){let x=Math.min(f.from-o,c.from-d);o+=x,d+=x,g--}else if(C)o=C.toA,d=C.toB;else break;for(;i.value&&i.fromq&&r.add(e.state.doc.length,e.state.doc.length,B.widget({widget:new z(u),block:!0,side:1}));let m=l.finish(),p=r.finish();Se(m,t.state.field(U))||t.dispatch({effects:Y.of(m)}),Se(p,e.state.field(U))||e.dispatch({effects:Y.of(p)})}const le=R.define({map:(t,e)=>e.mapPos(t)});class Lt extends J{constructor(e){super(),this.lines=e}eq(e){return this.lines==e.lines}toDOM(e){let n=document.createElement("div");return n.className="cm-collapsedLines",n.textContent=e.state.phrase("$ unchanged lines",this.lines),n.addEventListener("click",l=>{let r=e.posAtDOM(l.target);e.dispatch({effects:le.of(r)});let{side:i,sibling:s}=e.state.facet(b);s&&s().dispatch({effects:le.of(St(r,e.state.field(k),i=="a"))})}),n}ignoreEvent(e){return e instanceof MouseEvent}get estimatedHeight(){return 27}get type(){return"collapsed-unchanged-code"}}function St(t,e,n){let l=0,r=0;for(let i=0;;i++){let s=i=t)return r+(t-l);[l,r]=n?[s.toA,s.toB]:[s.toB,s.toA]}}const Et=W.define({create(t){return B.none},update(t,e){t=t.map(e.changes);for(let n of e.effects)n.is(le)&&(t=t.update({filter:l=>l!=n.value}));if(t.size&&e.state.field(k)!=e.startState.field(k,!1)){let n=e.state.facet(b).side=="a",l=[];for(let r of e.state.field(k))t.between(n?r.fromA:r.fromB,n?r.toA:r.toB,i=>{l.push(i)});l.length&&(t=t.update({filter:r=>l.indexOf(r)<0}))}return t},provide:t=>L.decorations.from(t)});function se({margin:t=3,minSize:e=4}){return Et.init(n=>Ot(n,t,e))}function Ot(t,e,n){let l=new G,r=t.facet(b).side=="a",i=t.field(k),s=1;for(let o=0;;o++){let d=o=n&&l.add(t.doc.line(h).from,t.doc.line(a).to,B.replace({widget:new Lt(f),block:!0})),!d)break;s=t.doc.lineAt(Math.min(t.doc.length,r?d.toA:d.toB)).number}return l.finish()}const yt=L.styleModule.of(new dt({".cm-mergeView":{overflowY:"auto"},".cm-mergeViewEditors":{display:"flex",alignItems:"stretch"},".cm-mergeViewEditor":{flexGrow:1,flexBasis:0,overflow:"hidden"},".cm-merge-revert":{width:"1.6em",flexGrow:0,flexShrink:0,position:"relative"},".cm-merge-revert button":{position:"absolute",display:"block",width:"100%",boxSizing:"border-box",textAlign:"center",background:"none",border:"none",font:"inherit",cursor:"pointer"}})),lt=L.baseTheme({".cm-mergeView & .cm-scroller, .cm-mergeView &":{height:"auto !important",overflowY:"visible !important"},"&.cm-merge-a .cm-changedLine, .cm-deletedChunk":{backgroundColor:"rgba(160, 128, 100, .08)"},"&.cm-merge-b .cm-changedLine, .cm-inlineChangedLine":{backgroundColor:"rgba(100, 160, 128, .08)"},"&light.cm-merge-a .cm-changedText, &light .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ee443366, #ee443366) bottom/100% 2px no-repeat"},"&dark.cm-merge-a .cm-changedText, &dark .cm-deletedChunk .cm-deletedText":{background:"linear-gradient(#ffaa9966, #ffaa9966) bottom/100% 2px no-repeat"},"&light.cm-merge-b .cm-changedText":{background:"linear-gradient(#22bb22aa, #22bb22aa) bottom/100% 2px no-repeat"},"&dark.cm-merge-b .cm-changedText":{background:"linear-gradient(#88ff88aa, #88ff88aa) bottom/100% 2px no-repeat"},"&.cm-merge-b .cm-deletedText":{background:"#ff000033"},".cm-insertedLine, .cm-deletedLine, .cm-deletedLine del":{textDecoration:"none"},".cm-deletedChunk":{paddingLeft:"6px","& .cm-chunkButtons":{position:"absolute",insetInlineEnd:"5px"},"& button":{border:"none",cursor:"pointer",color:"white",margin:"0 2px",borderRadius:"3px","&[name=accept]":{background:"#2a2"},"&[name=reject]":{background:"#d43"}}},".cm-collapsedLines":{padding:"5px 5px 5px 10px",cursor:"pointer","&:before":{content:'"⦚"',marginInlineEnd:"7px"},"&:after":{content:'"⦚"',marginInlineStart:"7px"}},"&light .cm-collapsedLines":{color:"#444",background:"linear-gradient(to bottom, transparent 0, #f3f3f3 30%, #f3f3f3 70%, transparent 100%)"},"&dark .cm-collapsedLines":{color:"#ddd",background:"linear-gradient(to bottom, transparent 0, #222 30%, #222 70%, transparent 100%)"},".cm-changeGutter":{width:"3px",paddingLeft:"1px"},"&light.cm-merge-a .cm-changedLineGutter, &light .cm-deletedLineGutter":{background:"#e43"},"&dark.cm-merge-a .cm-changedLineGutter, &dark .cm-deletedLineGutter":{background:"#fa9"},"&light.cm-merge-b .cm-changedLineGutter":{background:"#2b2"},"&dark.cm-merge-b .cm-changedLineGutter":{background:"#8f8"},".cm-inlineChangedLineGutter":{background:"#75d"}}),Ee=new Ve,_=new Ve;class Tt{constructor(e){this.revertDOM=null,this.revertToA=!1,this.revertToLeft=!1,this.measuring=-1,this.diffConf=e.diffConfig||it;let n=[$.low(K),lt,yt,U,L.updateListener.of(f=>{this.measuring<0&&(f.heightChanged||f.viewportChanged)&&!f.transactions.some(c=>c.effects.some(u=>u.is(Y)))&&this.measure()})],l=[b.of({side:"a",sibling:()=>this.b,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&l.push(P);let r=te.create({doc:e.a.doc,selection:e.a.selection,extensions:[e.a.extensions||[],L.editorAttributes.of({class:"cm-merge-a"}),_.of(l),n]}),i=[b.of({side:"b",sibling:()=>this.a,highlightChanges:e.highlightChanges!==!1,markGutter:e.gutter!==!1})];e.gutter!==!1&&i.push(P);let s=te.create({doc:e.b.doc,selection:e.b.selection,extensions:[e.b.extensions||[],L.editorAttributes.of({class:"cm-merge-b"}),_.of(i),n]});this.chunks=E.build(r.doc,s.doc,this.diffConf);let o=[k.init(()=>this.chunks),Ee.of(e.collapseUnchanged?se(e.collapseUnchanged):[])];r=r.update({effects:R.appendConfig.of(o)}).state,s=s.update({effects:R.appendConfig.of(o)}).state,this.dom=document.createElement("div"),this.dom.className="cm-mergeView",this.editorDOM=this.dom.appendChild(document.createElement("div")),this.editorDOM.className="cm-mergeViewEditors";let d=e.orientation||"a-b",h=document.createElement("div");h.className="cm-mergeViewEditor";let a=document.createElement("div");a.className="cm-mergeViewEditor",this.editorDOM.appendChild(d=="a-b"?h:a),this.editorDOM.appendChild(d=="a-b"?a:h),this.a=new L({state:r,parent:h,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.a)}),this.b=new L({state:s,parent:a,root:e.root,dispatchTransactions:f=>this.dispatch(f,this.b)}),this.setupRevertControls(!!e.revertControls,e.revertControls=="b-to-a",e.renderRevertControl),e.parent&&e.parent.appendChild(this.dom),this.scheduleMeasure()}dispatch(e,n){if(e.some(l=>l.docChanged)){let l=e[e.length-1],r=e.reduce((s,o)=>s.compose(o.changes),Ie.empty(e[0].startState.doc.length));this.chunks=n==this.a?E.updateA(this.chunks,l.newDoc,this.b.state.doc,r,this.diffConf):E.updateB(this.chunks,this.a.state.doc,l.newDoc,r,this.diffConf),n.update([...e,l.state.update({effects:re.of(this.chunks)})]);let i=n==this.a?this.b:this.a;i.update([i.state.update({effects:re.of(this.chunks)})]),this.scheduleMeasure()}else n.update(e)}reconfigure(e){if("diffConfig"in e&&(this.diffConf=e.diffConfig),"orientation"in e){let i=e.orientation!="b-a";if(i!=(this.editorDOM.firstChild==this.a.dom.parentNode)){let s=this.a.dom.parentNode,o=this.b.dom.parentNode;s.remove(),o.remove(),this.editorDOM.insertBefore(i?s:o,this.editorDOM.firstChild),this.editorDOM.appendChild(i?o:s),this.revertToLeft=!this.revertToLeft,this.revertDOM&&(this.revertDOM.textContent="")}}if("revertControls"in e||"renderRevertControl"in e){let i=!!this.revertDOM,s=this.revertToA,o=this.renderRevert;"revertControls"in e&&(i=!!e.revertControls,s=e.revertControls=="b-to-a"),"renderRevertControl"in e&&(o=e.renderRevertControl),this.setupRevertControls(i,s,o)}let n="highlightChanges"in e,l="gutter"in e,r="collapseUnchanged"in e;if(n||l||r){let i=[],s=[];if(n||l){let o=this.a.state.facet(b),d=l?e.gutter!==!1:o.markGutter,h=n?e.highlightChanges!==!1:o.highlightChanges;i.push(_.reconfigure([b.of({side:"a",sibling:()=>this.b,highlightChanges:h,markGutter:d}),d?P:[]])),s.push(_.reconfigure([b.of({side:"b",sibling:()=>this.a,highlightChanges:h,markGutter:d}),d?P:[]]))}if(r){let o=Ee.reconfigure(e.collapseUnchanged?se(e.collapseUnchanged):[]);i.push(o),s.push(o)}this.a.dispatch({effects:i}),this.b.dispatch({effects:s})}this.scheduleMeasure()}setupRevertControls(e,n,l){this.revertToA=n,this.revertToLeft=this.revertToA==(this.editorDOM.firstChild==this.a.dom.parentNode),this.renderRevert=l,!e&&this.revertDOM?(this.revertDOM.remove(),this.revertDOM=null):e&&!this.revertDOM?(this.revertDOM=this.editorDOM.insertBefore(document.createElement("div"),this.editorDOM.firstChild.nextSibling),this.revertDOM.addEventListener("mousedown",r=>this.revertClicked(r)),this.revertDOM.className="cm-merge-revert"):this.revertDOM&&(this.revertDOM.textContent="")}scheduleMeasure(){if(this.measuring<0){let e=this.dom.ownerDocument.defaultView||window;this.measuring=e.requestAnimationFrame(()=>{this.measuring=-1,this.measure()})}}measure(){Dt(this.a,this.b,this.chunks),this.revertDOM&&this.updateRevertButtons()}updateRevertButtons(){let e=this.revertDOM,n=e.firstChild,l=this.a.viewport,r=this.b.viewport;for(let i=0;il.to||s.fromB>r.to)break;if(s.fromA-1&&(this.dom.ownerDocument.defaultView||window).cancelAnimationFrame(this.measuring),this.dom.remove()}}function Oe(t){let e=t.nextSibling;return t.remove(),e}const Rt=new class extends oe{constructor(){super(...arguments),this.elementClass="cm-deletedLineGutter"}},Gt=$.low(je({class:"cm-changeGutter",markers:t=>{var e;return((e=t.plugin(K))===null||e===void 0?void 0:e.gutter)||We.empty},widgetMarker:(t,e)=>e instanceof st?Rt:null}));function Nt(t){var e;let n=typeof t.original=="string"?Fe.of(t.original.split(/\r?\n/)):t.original,l=t.diffConfig||it;return[$.low(K),jt,lt,L.editorAttributes.of({class:"cm-merge-b"}),tt.of((r,i)=>{let s=i.effects.find(o=>o.is(he));return s&&(r=E.updateA(r,s.value.doc,i.startState.doc,s.value.changes,l)),i.docChanged&&(r=E.updateB(r,i.state.field(F),i.newDoc,i.changes,l)),r}),b.of({highlightChanges:t.highlightChanges!==!1,markGutter:t.gutter!==!1,syntaxHighlightDeletions:t.syntaxHighlightDeletions!==!1,syntaxHighlightDeletionsMaxLength:3e3,mergeControls:(e=t.mergeControls)!==null&&e!==void 0?e:!0,overrideChunk:Pt,side:"b"}),F.init(()=>n),t.gutter!==!1?Gt:[],t.collapseUnchanged?se(t.collapseUnchanged):[],k.init(r=>E.build(n,r.doc,l))]}const he=R.define(),F=W.define({create:()=>Fe.empty,update(t,e){for(let n of e.effects)n.is(he)&&(t=n.value.doc);return t}}),ye=new WeakMap;class st extends J{constructor(e){super(),this.buildDOM=e,this.dom=null}eq(e){return this.dom==e.dom}toDOM(e){return this.dom||(this.dom=this.buildDOM(e))}}function Ft(t,e,n){let l=ye.get(e.changes);if(l)return l;let r=s=>{let{highlightChanges:o,syntaxHighlightDeletions:d,syntaxHighlightDeletionsMaxLength:h,mergeControls:a}=t.facet(b),f=document.createElement("div");if(f.className="cm-deletedChunk",a){let x=f.appendChild(document.createElement("div"));x.className="cm-chunkButtons";let M=A=>{A.preventDefault(),Vt(s,s.posAtDOM(f))},w=A=>{A.preventDefault(),It(s,s.posAtDOM(f))};if(typeof a=="function")x.appendChild(a("accept",M)),x.appendChild(a("reject",w));else{let A=x.appendChild(document.createElement("button"));A.name="accept",A.textContent=t.phrase("Accept"),A.onmousedown=M;let D=x.appendChild(document.createElement("button"));D.name="reject",D.textContent=t.phrase("Reject"),D.onmousedown=w}}if(n||e.fromA>=e.toA)return f;let c=s.state.field(F).sliceString(e.fromA,e.endA),u=d&&t.facet(ft),m=S(),p=e.changes,g=0,C=!1;function S(){let x=f.appendChild(document.createElement("div"));return x.className="cm-deletedLine",x.appendChild(document.createElement("del"))}function T(x,M,w){for(let A=x;A-1&&ZA){let V=document.createTextNode(c.slice(A,D));if(ce){let me=m.appendChild(document.createElement("span"));me.className=ce,me.appendChild(V)}else m.appendChild(V);A=D}ue&&(C=!C)}}if(u&&e.toA-e.fromA<=h){let x=u.parser.parse(c),M=0;ht(x,{style:w=>ct(t,w)},(w,A,D)=>{w>M&&T(M,w,""),T(w,A,D),M=A}),T(M,c.length,"")}else T(0,c.length,"");return m.firstChild||m.appendChild(document.createElement("br")),f},i=B.widget({block:!0,side:-1,widget:new st(r)});return ye.set(e.changes,i),i}function Vt(t,e){let{state:n}=t,l=e??n.selection.main.head,r=t.state.field(k).find(d=>d.fromB<=l&&d.endB>=l);if(!r)return!1;let i=t.state.sliceDoc(r.fromB,Math.max(r.fromB,r.toB-1)),s=t.state.field(F);r.fromB!=r.toB&&r.toA<=s.length&&(i+=t.state.lineBreak);let o=Ie.of({from:r.fromA,to:Math.min(s.length,r.toA),insert:i},s.length);return t.dispatch({effects:he.of({doc:o.apply(s),changes:o}),userEvent:"accept"}),!0}function It(t,e){let{state:n}=t,l=e??n.selection.main.head,r=n.field(k).find(o=>o.fromB<=l&&o.endB>=l);if(!r)return!1;let s=n.field(F).sliceString(r.fromA,Math.max(r.fromA,r.toA-1));return r.fromA!=r.toA&&r.toB<=n.doc.length&&(s+=n.lineBreak),t.dispatch({changes:{from:r.fromB,to:Math.min(n.doc.length,r.toB),insert:s},userEvent:"revert"}),!0}function Te(t){let e=new G;for(let n of t.field(k)){let l=t.facet(b).overrideChunk&&ot(t,n);e.add(n.fromB,n.fromB,Ft(t,n,!!l))}return e.finish()}const jt=W.define({create:t=>Te(t),update(t,e){return e.state.field(k,!1)!=e.startState.field(k,!1)?Te(e.state):t},provide:t=>L.decorations.from(t)}),Re=new WeakMap;function ot(t,e){let n=Re.get(e);if(n!==void 0)return n;n=null;let l=t.field(F),r=t.doc,i=l.lineAt(e.endA).number-l.lineAt(e.fromA).number+1,s=r.lineAt(e.endB).number-r.lineAt(e.fromB).number+1;e:if(i==s&&i<10){let o=[],d=0,h=e.fromA,a=e.fromB;for(let f of e.changes){if(f.fromA=e.endB)break;s=t.doc.lineAt(s.to+1)}return!0}const Ge="(max-width: 760px)";function zt(){const[t,e]=Q.useState(()=>typeof window<"u"&&window.matchMedia(Ge).matches);return Q.useEffect(()=>{const n=window.matchMedia(Ge),l=()=>e(n.matches);return l(),n.addEventListener("change",l),()=>n.removeEventListener("change",l)},[]),t}function Ne(t,e){return[gt({lineNumbers:!0,foldGutter:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,autocompletion:!1}),...He(t),te.readOnly.of(!0),...e==="dark"?[mt]:[]]}function qt({before:t,after:e,path:n,theme:l}){const r=Q.useRef(null);return Q.useEffect(()=>{if(!r.current)return;const i=new Tt({a:{doc:t,extensions:Ne(n,l)},b:{doc:e,extensions:Ne(n,l)},parent:r.current,highlightChanges:!0,gutter:!0,collapseUnchanged:{margin:3,minSize:6},diffConfig:{scanLimit:2e3,timeout:1e3}});return()=>i.destroy()},[e,t,n,l]),ne.jsx("div",{ref:r,className:"code-browser-merge"})}function Qt(t){return zt()?ne.jsx(ut,{value:t.after,height:"100%",theme:t.theme,editable:!1,extensions:[...He(t.path),...Nt({original:t.before,highlightChanges:!0,gutter:!0,mergeControls:!1,collapseUnchanged:{margin:3,minSize:6},diffConfig:{scanLimit:2e3,timeout:1e3}})],basicSetup:{lineNumbers:!0,foldGutter:!0,highlightActiveLine:!1,highlightActiveLineGutter:!1,autocompletion:!1}}):ne.jsx(qt,{...t})}export{Qt as default}; diff --git a/veadk/webui/assets/chunks/FileExplorerEditor-CfXfRF6Z.js b/veadk/webui/assets/chunks/FileExplorerEditor-BkVCoGHv.js similarity index 96% rename from veadk/webui/assets/chunks/FileExplorerEditor-CfXfRF6Z.js rename to veadk/webui/assets/chunks/FileExplorerEditor-BkVCoGHv.js index 42582ded0..cc4b2524c 100644 --- a/veadk/webui/assets/chunks/FileExplorerEditor-CfXfRF6Z.js +++ b/veadk/webui/assets/chunks/FileExplorerEditor-BkVCoGHv.js @@ -1 +1 @@ -import{aD as m,h as r,as as c,b as p,aK as g,H as x,aL as o}from"../app/index-B71Wq9_t.js";const v=r.theme({"&":{backgroundColor:"transparent",color:"var(--studio-code-text)",fontSize:"13px"},"&.cm-focused":{outline:"none"},".cm-scroller":{fontFamily:'"Geist Mono", "Noto Sans SC", monospace',lineHeight:"19.5px",overflow:"visible"},".cm-content":{padding:"12px 0 16px",caretColor:"var(--studio-text-primary)"},".cm-line":{padding:"0 16px"},".cm-gutters":{backgroundColor:"var(--studio-surface-input)",color:"var(--studio-code-line-number)",border:"none"},".cm-lineNumbers .cm-gutterElement":{minWidth:"26px",padding:"0 4px"},".cm-activeLine, .cm-activeLineGutter":{backgroundColor:"var(--studio-fill-hover)"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"var(--studio-text-primary)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"var(--studio-fill-active)"}}),b=g(x.define([{tag:o.comment,color:"var(--studio-code-comment)"},{tag:[o.keyword,o.operatorKeyword],color:"var(--studio-code-keyword)"},{tag:[o.string,o.attributeValue],color:"var(--studio-code-string)"},{tag:[o.number,o.bool,o.null],color:"var(--studio-code-number)"},{tag:[o.function(o.variableName),o.function(o.propertyName)],color:"var(--studio-code-function)"},{tag:[o.typeName,o.className],color:"var(--studio-code-constant)"},{tag:[o.tagName,o.attributeName],color:"var(--studio-code-variable)"}]));function f({value:s,name:e,language:t,wordWrap:i,onChange:l}){const d=m.useMemo(()=>[v,b,r.contentAttributes.of({"aria-label":`${e} 编辑器`}),...i?[r.lineWrapping]:[]],[e,i]),a={javascript:"jsx",typescript:"tsx",python:"py",markdown:"md",yaml:"yaml",json:"json"},n=t&&Object.prototype.hasOwnProperty.call(a,t)?a[t]:void 0,u=t==="plaintext"?"file.txt":n?`file.${n}`:e;return c.jsx("div",{className:"studio-file-explorer__editor",children:c.jsx(p,{value:s,path:u,theme:"none",height:"auto",extensions:d,onChange:l})})}export{f as FileExplorerEditor}; +import{aD as m,h as r,as as c,b as p,aK as g,H as x,aL as o}from"../app/index-BKQXvMzA.js";const v=r.theme({"&":{backgroundColor:"transparent",color:"var(--studio-code-text)",fontSize:"13px"},"&.cm-focused":{outline:"none"},".cm-scroller":{fontFamily:'"Geist Mono", "Noto Sans SC", monospace',lineHeight:"19.5px",overflow:"visible"},".cm-content":{padding:"12px 0 16px",caretColor:"var(--studio-text-primary)"},".cm-line":{padding:"0 16px"},".cm-gutters":{backgroundColor:"var(--studio-surface-input)",color:"var(--studio-code-line-number)",border:"none"},".cm-lineNumbers .cm-gutterElement":{minWidth:"26px",padding:"0 4px"},".cm-activeLine, .cm-activeLineGutter":{backgroundColor:"var(--studio-fill-hover)"},".cm-cursor, .cm-dropCursor":{borderLeftColor:"var(--studio-text-primary)"},"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"var(--studio-fill-active)"}}),b=g(x.define([{tag:o.comment,color:"var(--studio-code-comment)"},{tag:[o.keyword,o.operatorKeyword],color:"var(--studio-code-keyword)"},{tag:[o.string,o.attributeValue],color:"var(--studio-code-string)"},{tag:[o.number,o.bool,o.null],color:"var(--studio-code-number)"},{tag:[o.function(o.variableName),o.function(o.propertyName)],color:"var(--studio-code-function)"},{tag:[o.typeName,o.className],color:"var(--studio-code-constant)"},{tag:[o.tagName,o.attributeName],color:"var(--studio-code-variable)"}]));function f({value:s,name:e,language:t,wordWrap:i,onChange:l}){const d=m.useMemo(()=>[v,b,r.contentAttributes.of({"aria-label":`${e} 编辑器`}),...i?[r.lineWrapping]:[]],[e,i]),a={javascript:"jsx",typescript:"tsx",python:"py",markdown:"md",yaml:"yaml",json:"json"},n=t&&Object.prototype.hasOwnProperty.call(a,t)?a[t]:void 0,u=t==="plaintext"?"file.txt":n?`file.${n}`:e;return c.jsx("div",{className:"studio-file-explorer__editor",children:c.jsx(p,{value:s,path:u,theme:"none",height:"auto",extensions:d,onChange:l})})}export{f as FileExplorerEditor}; diff --git a/veadk/webui/assets/chunks/MarkdownPromptEditor-CiBW7wfN.js b/veadk/webui/assets/chunks/MarkdownPromptEditor-CgQNwz-v.js similarity index 99% rename from veadk/webui/assets/chunks/MarkdownPromptEditor-CiBW7wfN.js rename to veadk/webui/assets/chunks/MarkdownPromptEditor-CgQNwz-v.js index 867defb24..c07847c0d 100644 --- a/veadk/webui/assets/chunks/MarkdownPromptEditor-CiBW7wfN.js +++ b/veadk/webui/assets/chunks/MarkdownPromptEditor-CgQNwz-v.js @@ -1,4 +1,4 @@ -var T0=Object.defineProperty;var E0=(n,e,t)=>e in n?T0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $=(n,e,t)=>E0(n,typeof e!="symbol"?e+"":e,t);import{aD as I,aO as Rn,as as F,A as k0,m as Kt,X as at,aT as jo,P as N0,l as M0,aN as hc,aS as Fh,aC as Uo,a0 as Rh,Z as $0,am as L0,aR as O0,q as A0,i as I0,g as P0,$ as Hh,a2 as D0,e as F0,L as R0,aQ as Vh,aP as Fu,u as H0,I as V0,J as B0,a1 as Bh,a3 as zh,t as z0,z as J0,aa as Ru,ab as K0,a5 as W0,a7 as aa,aB as j0,aV as U0,al as Z0,r as T,a4 as Hu,O as Vu,V as Qe,az as nn,aJ as Di,aH as $l,aE as q0,Q as Bu,av as jt,ax as hs,a9 as gc,aw as Wn,aM as En,aI as Pt,Y as So,ac as G0,ag as Y0,ae as X0,af as Q0,ad as e5,aj as t5,ah as n5,ai as r5,n as o5,v as i5,K as s5,j as l5,f as a5,aU as c5}from"../app/index-B71Wq9_t.js";var u5=Object.defineProperty,f5=(n,e)=>u5(n,"name",{value:e,configurable:!0});function Jh(n){const e=I.useRef({value:n,previous:n});return I.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}f5(Jh,"usePrevious");var d5=Object.defineProperty,h5=(n,e)=>d5(n,"name",{value:e,configurable:!0});function ca(n,[e,t]){return Math.min(t,Math.max(e,n))}h5(ca,"clamp");var g5=Object.defineProperty,be=(n,e)=>g5(n,"name",{value:e,configurable:!0}),p5=[" ","Enter","ArrowUp","ArrowDown"],m5=[" ","Enter"],oo="Select",[Us,pc,_5]=$0(oo),[vr,gv]=Hh(oo,[_5,Rh]),mc=Rh(),[x5,Hn]=vr(oo),[y5,C5]=vr(oo);function Kh(n){const{__scopeSelect:e,children:t,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:c,name:u,autoComplete:f,disabled:d,required:g,form:h,internal_do_not_use_render:_}=n,m=mc(e),[p,y]=I.useState(null),[C,x]=I.useState(null),[w,k]=I.useState(!1),b=Vh(c),[v,E]=Fu({prop:r,defaultProp:o??!1,onChange:i,caller:oo}),[M,L]=Fu({prop:s,defaultProp:l,onChange:a,caller:oo}),H=I.useRef(null),R=I.useRef(M);I.useEffect(()=>{const Te=h?p==null?void 0:p.ownerDocument.getElementById(h):p==null?void 0:p.form;if(Te instanceof HTMLFormElement){const Se=be(()=>L(R.current),"reset");return Te.addEventListener("reset",Se),()=>Te.removeEventListener("reset",Se)}},[h,p,L]);const V=p?!!h||!!p.closest("form"):!0,[Z,G]=I.useState(new Set),z=Fh(),re=Array.from(Z).map(Te=>Te.props.value).join(";"),ee=I.useCallback(Te=>{G(Se=>new Set(Se).add(Te))},[]),ne=I.useCallback(Te=>{G(Se=>{const Ke=new Set(Se);return Ke.delete(Te),Ke})},[]),ae={required:g,trigger:p,onTriggerChange:y,valueNode:C,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:k,contentId:z,value:M,onValueChange:L,open:v,onOpenChange:E,dir:b,triggerPointerDownPosRef:H,disabled:d,name:u,autoComplete:f,form:h,nativeOptions:Z,nativeSelectKey:re,isFormControl:V};return F.jsx(H0,{...m,children:F.jsx(x5,{scope:e,...ae,children:F.jsx(Us.Provider,{scope:e,children:F.jsx(y5,{scope:e,onNativeOptionAdd:ee,onNativeOptionRemove:ne,children:jh(_)?_(ae):t})})})})}be(Kh,"SelectProvider");var v5=be(n=>{const{__scopeSelect:e,children:t,...r}=n;return F.jsx(Kh,{__scopeSelect:e,...r,internal_do_not_use_render:({isFormControl:o})=>F.jsxs(F.Fragment,{children:[t,o?F.jsx(j5,{__scopeSelect:e}):null]})})},"Select"),b5="SelectTrigger",S5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,disabled:o=!1,...i}=e,s=mc(r),l=Hn(b5,r),a=l.disabled||o,c=Rn(t,l.onTriggerChange),u=pc(r),f=I.useRef("touch"),[d,g,h]=_c(m=>{const p=u().filter(x=>!x.disabled),y=p.find(x=>x.value===l.value),C=xc(p,m,y);C!==void 0&&l.onValueChange(C.value)}),_=be(m=>{a||(l.onOpenChange(!0),h()),m&&(l.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},"handleOpen");return F.jsx(k0,{asChild:!0,...s,children:F.jsx(Kt.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":yi(l.value)?"":void 0,...i,ref:c,onClick:at(i.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&_(m)}),onPointerDown:at(i.onPointerDown,m=>{f.current=m.pointerType;const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(_(m),m.preventDefault())}),onKeyDown:at(i.onKeyDown,m=>{const p=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(p&&m.key===" ")&&p5.includes(m.key)&&(_(),m.preventDefault())})})})},"SelectTrigger")),w5="SelectValue",T5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,className:o,style:i,children:s,placeholder:l="",...a}=e,c=Hn(w5,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=Rn(t,c.onValueNodeChange);jo(()=>{u(f)},[u,f]);const g=yi(c.value);return F.jsx(Kt.span,{...a,asChild:g?!1:a.asChild,ref:d,style:{pointerEvents:"none"},children:F.jsx(I.Fragment,{children:g?l:s},g?"placeholder":"value")})},"SelectValue")),E5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,children:o,...i}=e;return F.jsx(Kt.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})},"SelectIcon")),k5="SelectPortal",[N5,M5]=vr(k5,{forceMount:void 0}),$5=be(n=>{const{__scopeSelect:e,forceMount:t,...r}=n;return F.jsx(N5,{scope:n.__scopeSelect,forceMount:t,children:F.jsx(N0,{asChild:!0,...r})})},"SelectPortal"),sr="SelectContent",L5=I.forwardRef(be(function(e,t){const r=M5(sr,e.__scopeSelect),{forceMount:o=r.forceMount,...i}=e,s=Hn(sr,e.__scopeSelect),[l,a]=I.useState();return jo(()=>{a(new DocumentFragment)},[]),F.jsx(M0,{present:o||s.open,children:({present:c})=>c?F.jsx(I5,{...i,ref:t}):F.jsx(O5,{...i,fragment:l})})},"SelectContent")),O5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,children:o,fragment:i}=e;return i?Uo.createPortal(F.jsx(Wh,{scope:r,children:F.jsx(Us.Slot,{scope:r,children:F.jsx("div",{ref:t,children:o})})}),i):null},"SelectContentFragment")),Ft=10,[Wh,Zs]=vr(sr),A5=D0("SelectContent.RemoveScroll"),I5=I.forwardRef(be(function(e,t){const{__scopeSelect:r}=e,{position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:g,collisionPadding:h,sticky:_,hideWhenDetached:m,avoidCollisions:p,...y}=e,C=Hn(sr,r),[x,w]=I.useState(null),[k,b]=I.useState(null),v=Rn(t,w),[E,M]=I.useState(null),[L,H]=I.useState(null),R=pc(r),[V,Z]=I.useState(!1),G=I.useRef(!1);I.useEffect(()=>{if(x)return L0(x)},[x]),O0();const z=I.useCallback(W=>{const[ce,...Ie]=R().map(xe=>xe.ref.current),[ue]=Ie.slice(-1),de=document.activeElement;for(const xe of W)if(xe===de||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===ce&&k&&(k.scrollTop=0),xe===ue&&k&&(k.scrollTop=k.scrollHeight),xe==null||xe.focus(),document.activeElement!==de))return},[R,k]),re=I.useCallback(()=>z([E,x]),[z,E,x]);I.useEffect(()=>{V&&re()},[V,re]);const{onOpenChange:ee,triggerPointerDownPosRef:ne}=C;I.useEffect(()=>{if(x){let W={x:0,y:0};const ce=be(ue=>{var de,xe;W={x:Math.abs(Math.round(ue.pageX)-(((de=ne.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(ue.pageY)-(((xe=ne.current)==null?void 0:xe.y)??0))}},"handlePointerMove"),Ie=be(ue=>{W.x<=10&&W.y<=10?ue.preventDefault():ue.composedPath().includes(x)||ee(!1),document.removeEventListener("pointermove",ce),ne.current=null},"handlePointerUp");return ne.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",Ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",Ie,{capture:!0})}}},[x,ee,ne]),I.useEffect(()=>{const W=be(()=>ee(!1),"close");return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[ee]);const[ae,Te]=_c(W=>{const ce=R().filter(de=>!de.disabled),Ie=ce.find(de=>de.ref.current===document.activeElement),ue=xc(ce,W,Ie);ue&&setTimeout(()=>{var de;return(de=ue.ref.current)==null?void 0:de.focus()})}),Se=I.useCallback((W,ce,Ie)=>{const ue=!G.current&&!Ie;(C.value!==void 0&&C.value===ce||ue)&&(M(W),ue&&(G.current=!0))},[C.value]),Ke=I.useCallback(()=>x==null?void 0:x.focus(),[x]),Ye=I.useCallback((W,ce,Ie)=>{const ue=!G.current&&!Ie;(C.value!==void 0&&C.value===ce||ue)&&H(W)},[C.value]),ie=o==="popper"?zu:P5,_e=ie===zu?{side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:g,collisionPadding:h,sticky:_,hideWhenDetached:m,avoidCollisions:p}:{};return F.jsx(Wh,{scope:r,content:x,viewport:k,onViewportChange:b,itemRefCallback:Se,selectedItem:E,onItemLeave:Ke,itemTextRefCallback:Ye,focusSelectedItem:re,selectedItemText:L,position:o,isPositioned:V,searchRef:ae,children:F.jsx(A0,{as:A5,allowPinchZoom:!0,children:F.jsx(I0,{asChild:!0,trapped:C.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:at(i,W=>{var ce;(ce=C.trigger)==null||ce.focus({preventScroll:!0}),W.preventDefault()}),children:F.jsx(P0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:F.jsx(ie,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:W=>W.preventDefault(),...y,..._e,onPlaced:()=>Z(!0),ref:v,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:at(y.onKeyDown,W=>{const ce=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!ce&&W.key.length===1&&Te(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ue=R().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const de=W.target,xe=ue.indexOf(de);ue=ue.slice(xe+1)}setTimeout(()=>z(ue)),W.preventDefault()}})})})})})})},"SelectContentImpl")),P5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,onPlaced:o,...i}=e,s=Hn(sr,r),l=Zs(sr,r),[a,c]=I.useState(null),[u,f]=I.useState(null),d=Rn(t,f),g=pc(r),h=I.useRef(!1),_=I.useRef(!0),{viewport:m,selectedItem:p,selectedItemText:y,focusSelectedItem:C}=l,x=I.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&p&&y){const v=s.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(s.dir!=="rtl"){const de=L.left-E.left,xe=M.left-de,en=v.left-xe,tn=v.width+en,Ir=Math.max(tn,E.width),bo=window.innerWidth-Ft,Pr=ca(xe,[Ft,Math.max(Ft,bo-Ir)]);a.style.minWidth=tn+"px",a.style.left=Pr+"px"}else{const de=E.right-L.right,xe=window.innerWidth-M.right-de,en=window.innerWidth-v.right-xe,tn=v.width+en,Ir=Math.max(tn,E.width),bo=window.innerWidth-Ft,Pr=ca(xe,[Ft,Math.max(Ft,bo-Ir)]);a.style.minWidth=tn+"px",a.style.right=Pr+"px"}const H=g(),R=window.innerHeight-Ft*2,V=m.scrollHeight,Z=window.getComputedStyle(u),G=parseInt(Z.borderTopWidth,10),z=parseInt(Z.paddingTop,10),re=parseInt(Z.borderBottomWidth,10),ee=parseInt(Z.paddingBottom,10),ne=G+z+V+ee+re,ae=Math.min(p.offsetHeight*5,ne),Te=window.getComputedStyle(m),Se=parseInt(Te.paddingTop,10),Ke=parseInt(Te.paddingBottom,10),Ye=v.top+v.height/2-Ft,ie=R-Ye,_e=p.offsetHeight/2,W=p.offsetTop+_e,ce=G+z+W,Ie=ne-ce;if(ce<=Ye){const de=H.length>0&&p===H[H.length-1].ref.current;a.style.bottom="0px";const xe=u.clientHeight-m.offsetTop-m.offsetHeight,en=Math.max(ie,_e+(de?Ke:0)+xe+re),tn=ce+en;a.style.height=tn+"px"}else{const de=H.length>0&&p===H[0].ref.current;a.style.top="0px";const en=Math.max(Ye,G+m.offsetTop+(de?Se:0)+_e)+Ie;a.style.height=en+"px",m.scrollTop=ce-Ye+m.offsetTop}a.style.margin=`${Ft}px 0`,a.style.minHeight=ae+"px",a.style.maxHeight=R+"px",o==null||o(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,a,u,m,p,y,s.dir,o]);jo(()=>x(),[x]);const[w,k]=I.useState();jo(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const b=I.useCallback(v=>{v&&_.current===!0&&(x(),C==null||C(),_.current=!1)},[x,C]);return F.jsx(D5,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:b,children:F.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:F.jsx(Kt.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),zu=I.forwardRef(be(function(e,t){const{__scopeSelect:r,align:o="start",collisionPadding:i=Ft,...s}=e,l=mc(r);return F.jsx(F0,{...l,...s,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[D5,F5]=vr(sr,{}),Ju="SelectViewport",R5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,nonce:o,...i}=e,s=Zs(Ju,r),l=F5(Ju,r),a=Rn(t,s.onViewportChange),c=I.useRef(0);return F.jsxs(F.Fragment,{children:[F.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),F.jsx(Us.Slot,{scope:r,children:F.jsx(Kt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:at(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&d){const h=Math.abs(c.current-f.scrollTop);if(h>0){const _=window.innerHeight-Ft*2,m=parseFloat(d.style.minHeight),p=parseFloat(d.style.height),y=Math.max(m,p);if(y<_){const C=y+h,x=Math.min(_,C),w=C-x;d.style.height=x+"px",d.style.bottom==="0px"&&(f.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})},"SelectViewport")),H5="SelectGroup",[pv,mv]=vr(H5),ua="SelectItem",[V5,B5]=vr(ua),z5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...l}=e,a=Hn(ua,r),c=Zs(ua,r),u=a.value===o,[f,d]=I.useState(s??""),[g,h]=I.useState(!1),_=hc(x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,o,i)}),m=Rn(t,_),p=Fh(),y=I.useRef("touch"),C=be(()=>{i||(a.onValueChange(o),a.onOpenChange(!1))},"handleSelect");return F.jsx(V5,{scope:r,value:o,disabled:i,textId:p,isSelected:u,onItemTextChange:I.useCallback(x=>{d(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:F.jsx(Us.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:F.jsx(Kt.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:m,onFocus:at(l.onFocus,()=>h(!0)),onBlur:at(l.onBlur,()=>h(!1)),onClick:at(l.onClick,()=>{y.current!=="mouse"&&C()}),onPointerUp:at(l.onPointerUp,()=>{y.current==="mouse"&&C()}),onPointerDown:at(l.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:at(l.onPointerMove,x=>{var w;y.current=x.pointerType,i?(w=c.onItemLeave)==null||w.call(c):y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:at(l.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:at(l.onKeyDown,x=>{var k;i||x.target!==x.currentTarget||((k=c.searchRef)==null?void 0:k.current)!==""&&x.key===" "||(m5.includes(x.key)&&C(),x.key===" "&&x.preventDefault())})})})})},"SelectItem")),Fi="SelectItemText",J5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,className:o,style:i,...s}=e,l=Hn(Fi,r),a=Zs(Fi,r),c=B5(Fi,r),u=C5(Fi,r),[f,d]=I.useState(null),g=hc(C=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,C,c.value,c.disabled)}),h=Rn(t,d,c.onItemTextChange,g),_=f==null?void 0:f.textContent,m=I.useMemo(()=>F.jsx("option",{value:c.value,disabled:c.disabled,children:_},c.value),[c.disabled,c.value,_]),{onNativeOptionAdd:p,onNativeOptionRemove:y}=u;return jo(()=>(p(m),()=>y(m)),[p,y,m]),F.jsxs(F.Fragment,{children:[F.jsx(Kt.span,{id:c.textId,...s,ref:h}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!yi(l.value)?Uo.createPortal(s.children,l.valueNode):null]})},"SelectItemText")),K5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,...o}=e;return F.jsx(Kt.div,{"aria-hidden":!0,...o,ref:t})},"SelectSeparator")),W5="SelectBubbleInput",j5=I.forwardRef(be(function({__scopeSelect:e,...t},r){const o=Hn(W5,e),{value:i,onValueChange:s,required:l,disabled:a,name:c,autoComplete:u,form:f}=o,{nativeOptions:d,nativeSelectKey:g}=o,h=I.useRef(null),_=Rn(r,h),m=i??"",p=Jh(m),y=Array.from(d).some(C=>(C.props.value??"")==="");return I.useEffect(()=>{const C=h.current;if(!C)return;const x=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(x,"value").set;if(p!==m&&k){const b=new Event("change",{bubbles:!0});k.call(C,m),C.dispatchEvent(b)}},[p,m]),F.jsxs(Kt.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:c,autoComplete:u,disabled:a,form:f,onChange:C=>s(C.target.value),...t,style:{...R0,...t.style},ref:_,defaultValue:m,children:[yi(i)&&!y?F.jsx("option",{value:""}):null,Array.from(d)]},g)},"SelectBubbleInput"));function jh(n){return typeof n=="function"}be(jh,"isFunction");function yi(n){return n===""||n===void 0}be(yi,"shouldShowPlaceholder");function _c(n){const e=hc(n),t=I.useRef(""),r=I.useRef(0),o=I.useCallback(s=>{const l=t.current+s;e(l),be(function a(c){t.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>a(""),1e3))},"updateSearch")(l)},[e]),i=I.useCallback(()=>{t.current="",window.clearTimeout(r.current)},[]);return I.useEffect(()=>()=>window.clearTimeout(r.current),[]),[t,o,i]}be(_c,"useTypeaheadSearch");function xc(n,e,t){const o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Uh(n,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==t));const a=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==t?a:void 0}be(xc,"findNextItem");function Uh(n,e){return n.map((t,r)=>n[(e+r)%n.length])}be(Uh,"wrapArray");var U5=Object.defineProperty,qs=(n,e)=>U5(n,"name",{value:e,configurable:!0}),Zh="Toolbar",[Z5,_v]=Hh(Zh,[Bh,zh]),qh=Bh(),Gh=zh(),[q5,G5]=Z5(Zh),Y5=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,orientation:o="horizontal",dir:i,loop:s=!0,...l}=e,a=qh(r),c=Vh(i);return F.jsx(q5,{scope:r,orientation:o,dir:c,children:F.jsx(z0,{asChild:!0,...a,orientation:o,dir:c,loop:s,children:F.jsx(Kt.div,{role:"toolbar","aria-orientation":o,dir:c,...l,ref:t})})})},"Toolbar")),Yh=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,...o}=e,i=qh(r);return F.jsx(V0,{asChild:!0,...i,focusable:!e.disabled,children:F.jsx(Kt.button,{type:"button",...o,ref:t})})},"ToolbarButton")),X5="ToolbarToggleGroup",Q5=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,...o}=e,i=G5(X5,r),s=Gh(r);return F.jsx(J0,{"data-orientation":i.orientation,dir:i.dir,...s,...o,ref:t,rovingFocus:!1})},"ToolbarToggleGroup")),e2=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,...o}=e,i=Gh(r),s={__scopeToolbar:e.__scopeToolbar};return F.jsx(Yh,{asChild:!0,...s,children:F.jsx(B0,{...i,...o,ref:t})})},"ToolbarToggleItem")),t2=Y5,n2=Yh,yc=Q5,r2=e2;const o2={}.hasOwnProperty;function Xh(n,e){let t=-1,r;if(e.extensions)for(;++te in n?T0(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $=(n,e,t)=>E0(n,typeof e!="symbol"?e+"":e,t);import{aD as I,aO as Rn,as as F,A as k0,m as Kt,X as at,aT as jo,P as N0,l as M0,aN as hc,aS as Fh,aC as Uo,a0 as Rh,Z as $0,am as L0,aR as O0,q as A0,i as I0,g as P0,$ as Hh,a2 as D0,e as F0,L as R0,aQ as Vh,aP as Fu,u as H0,I as V0,J as B0,a1 as Bh,a3 as zh,t as z0,z as J0,aa as Ru,ab as K0,a5 as W0,a7 as aa,aB as j0,aV as U0,al as Z0,r as T,a4 as Hu,O as Vu,V as Qe,az as nn,aJ as Di,aH as $l,aE as q0,Q as Bu,av as jt,ax as hs,a9 as gc,aw as Wn,aM as En,aI as Pt,Y as So,ac as G0,ag as Y0,ae as X0,af as Q0,ad as e5,aj as t5,ah as n5,ai as r5,n as o5,v as i5,K as s5,j as l5,f as a5,aU as c5}from"../app/index-BKQXvMzA.js";var u5=Object.defineProperty,f5=(n,e)=>u5(n,"name",{value:e,configurable:!0});function Jh(n){const e=I.useRef({value:n,previous:n});return I.useMemo(()=>(e.current.value!==n&&(e.current.previous=e.current.value,e.current.value=n),e.current.previous),[n])}f5(Jh,"usePrevious");var d5=Object.defineProperty,h5=(n,e)=>d5(n,"name",{value:e,configurable:!0});function ca(n,[e,t]){return Math.min(t,Math.max(e,n))}h5(ca,"clamp");var g5=Object.defineProperty,be=(n,e)=>g5(n,"name",{value:e,configurable:!0}),p5=[" ","Enter","ArrowUp","ArrowDown"],m5=[" ","Enter"],oo="Select",[Us,pc,_5]=$0(oo),[vr,gv]=Hh(oo,[_5,Rh]),mc=Rh(),[x5,Hn]=vr(oo),[y5,C5]=vr(oo);function Kh(n){const{__scopeSelect:e,children:t,open:r,defaultOpen:o,onOpenChange:i,value:s,defaultValue:l,onValueChange:a,dir:c,name:u,autoComplete:f,disabled:d,required:g,form:h,internal_do_not_use_render:_}=n,m=mc(e),[p,y]=I.useState(null),[C,x]=I.useState(null),[w,k]=I.useState(!1),b=Vh(c),[v,E]=Fu({prop:r,defaultProp:o??!1,onChange:i,caller:oo}),[M,L]=Fu({prop:s,defaultProp:l,onChange:a,caller:oo}),H=I.useRef(null),R=I.useRef(M);I.useEffect(()=>{const Te=h?p==null?void 0:p.ownerDocument.getElementById(h):p==null?void 0:p.form;if(Te instanceof HTMLFormElement){const Se=be(()=>L(R.current),"reset");return Te.addEventListener("reset",Se),()=>Te.removeEventListener("reset",Se)}},[h,p,L]);const V=p?!!h||!!p.closest("form"):!0,[Z,G]=I.useState(new Set),z=Fh(),re=Array.from(Z).map(Te=>Te.props.value).join(";"),ee=I.useCallback(Te=>{G(Se=>new Set(Se).add(Te))},[]),ne=I.useCallback(Te=>{G(Se=>{const Ke=new Set(Se);return Ke.delete(Te),Ke})},[]),ae={required:g,trigger:p,onTriggerChange:y,valueNode:C,onValueNodeChange:x,valueNodeHasChildren:w,onValueNodeHasChildrenChange:k,contentId:z,value:M,onValueChange:L,open:v,onOpenChange:E,dir:b,triggerPointerDownPosRef:H,disabled:d,name:u,autoComplete:f,form:h,nativeOptions:Z,nativeSelectKey:re,isFormControl:V};return F.jsx(H0,{...m,children:F.jsx(x5,{scope:e,...ae,children:F.jsx(Us.Provider,{scope:e,children:F.jsx(y5,{scope:e,onNativeOptionAdd:ee,onNativeOptionRemove:ne,children:jh(_)?_(ae):t})})})})}be(Kh,"SelectProvider");var v5=be(n=>{const{__scopeSelect:e,children:t,...r}=n;return F.jsx(Kh,{__scopeSelect:e,...r,internal_do_not_use_render:({isFormControl:o})=>F.jsxs(F.Fragment,{children:[t,o?F.jsx(j5,{__scopeSelect:e}):null]})})},"Select"),b5="SelectTrigger",S5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,disabled:o=!1,...i}=e,s=mc(r),l=Hn(b5,r),a=l.disabled||o,c=Rn(t,l.onTriggerChange),u=pc(r),f=I.useRef("touch"),[d,g,h]=_c(m=>{const p=u().filter(x=>!x.disabled),y=p.find(x=>x.value===l.value),C=xc(p,m,y);C!==void 0&&l.onValueChange(C.value)}),_=be(m=>{a||(l.onOpenChange(!0),h()),m&&(l.triggerPointerDownPosRef.current={x:Math.round(m.pageX),y:Math.round(m.pageY)})},"handleOpen");return F.jsx(k0,{asChild:!0,...s,children:F.jsx(Kt.button,{type:"button",role:"combobox","aria-controls":l.open?l.contentId:void 0,"aria-expanded":l.open,"aria-required":l.required,"aria-autocomplete":"none",dir:l.dir,"data-state":l.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":yi(l.value)?"":void 0,...i,ref:c,onClick:at(i.onClick,m=>{m.currentTarget.focus(),f.current!=="mouse"&&_(m)}),onPointerDown:at(i.onPointerDown,m=>{f.current=m.pointerType;const p=m.target;p.hasPointerCapture(m.pointerId)&&p.releasePointerCapture(m.pointerId),m.button===0&&m.ctrlKey===!1&&m.pointerType==="mouse"&&(_(m),m.preventDefault())}),onKeyDown:at(i.onKeyDown,m=>{const p=d.current!=="";!(m.ctrlKey||m.altKey||m.metaKey)&&m.key.length===1&&g(m.key),!(p&&m.key===" ")&&p5.includes(m.key)&&(_(),m.preventDefault())})})})},"SelectTrigger")),w5="SelectValue",T5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,className:o,style:i,children:s,placeholder:l="",...a}=e,c=Hn(w5,r),{onValueNodeHasChildrenChange:u}=c,f=s!==void 0,d=Rn(t,c.onValueNodeChange);jo(()=>{u(f)},[u,f]);const g=yi(c.value);return F.jsx(Kt.span,{...a,asChild:g?!1:a.asChild,ref:d,style:{pointerEvents:"none"},children:F.jsx(I.Fragment,{children:g?l:s},g?"placeholder":"value")})},"SelectValue")),E5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,children:o,...i}=e;return F.jsx(Kt.span,{"aria-hidden":!0,...i,ref:t,children:o||"▼"})},"SelectIcon")),k5="SelectPortal",[N5,M5]=vr(k5,{forceMount:void 0}),$5=be(n=>{const{__scopeSelect:e,forceMount:t,...r}=n;return F.jsx(N5,{scope:n.__scopeSelect,forceMount:t,children:F.jsx(N0,{asChild:!0,...r})})},"SelectPortal"),sr="SelectContent",L5=I.forwardRef(be(function(e,t){const r=M5(sr,e.__scopeSelect),{forceMount:o=r.forceMount,...i}=e,s=Hn(sr,e.__scopeSelect),[l,a]=I.useState();return jo(()=>{a(new DocumentFragment)},[]),F.jsx(M0,{present:o||s.open,children:({present:c})=>c?F.jsx(I5,{...i,ref:t}):F.jsx(O5,{...i,fragment:l})})},"SelectContent")),O5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,children:o,fragment:i}=e;return i?Uo.createPortal(F.jsx(Wh,{scope:r,children:F.jsx(Us.Slot,{scope:r,children:F.jsx("div",{ref:t,children:o})})}),i):null},"SelectContentFragment")),Ft=10,[Wh,Zs]=vr(sr),A5=D0("SelectContent.RemoveScroll"),I5=I.forwardRef(be(function(e,t){const{__scopeSelect:r}=e,{position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:l,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:g,collisionPadding:h,sticky:_,hideWhenDetached:m,avoidCollisions:p,...y}=e,C=Hn(sr,r),[x,w]=I.useState(null),[k,b]=I.useState(null),v=Rn(t,w),[E,M]=I.useState(null),[L,H]=I.useState(null),R=pc(r),[V,Z]=I.useState(!1),G=I.useRef(!1);I.useEffect(()=>{if(x)return L0(x)},[x]),O0();const z=I.useCallback(W=>{const[ce,...Ie]=R().map(xe=>xe.ref.current),[ue]=Ie.slice(-1),de=document.activeElement;for(const xe of W)if(xe===de||(xe==null||xe.scrollIntoView({block:"nearest"}),xe===ce&&k&&(k.scrollTop=0),xe===ue&&k&&(k.scrollTop=k.scrollHeight),xe==null||xe.focus(),document.activeElement!==de))return},[R,k]),re=I.useCallback(()=>z([E,x]),[z,E,x]);I.useEffect(()=>{V&&re()},[V,re]);const{onOpenChange:ee,triggerPointerDownPosRef:ne}=C;I.useEffect(()=>{if(x){let W={x:0,y:0};const ce=be(ue=>{var de,xe;W={x:Math.abs(Math.round(ue.pageX)-(((de=ne.current)==null?void 0:de.x)??0)),y:Math.abs(Math.round(ue.pageY)-(((xe=ne.current)==null?void 0:xe.y)??0))}},"handlePointerMove"),Ie=be(ue=>{W.x<=10&&W.y<=10?ue.preventDefault():ue.composedPath().includes(x)||ee(!1),document.removeEventListener("pointermove",ce),ne.current=null},"handlePointerUp");return ne.current!==null&&(document.addEventListener("pointermove",ce),document.addEventListener("pointerup",Ie,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ce),document.removeEventListener("pointerup",Ie,{capture:!0})}}},[x,ee,ne]),I.useEffect(()=>{const W=be(()=>ee(!1),"close");return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[ee]);const[ae,Te]=_c(W=>{const ce=R().filter(de=>!de.disabled),Ie=ce.find(de=>de.ref.current===document.activeElement),ue=xc(ce,W,Ie);ue&&setTimeout(()=>{var de;return(de=ue.ref.current)==null?void 0:de.focus()})}),Se=I.useCallback((W,ce,Ie)=>{const ue=!G.current&&!Ie;(C.value!==void 0&&C.value===ce||ue)&&(M(W),ue&&(G.current=!0))},[C.value]),Ke=I.useCallback(()=>x==null?void 0:x.focus(),[x]),Ye=I.useCallback((W,ce,Ie)=>{const ue=!G.current&&!Ie;(C.value!==void 0&&C.value===ce||ue)&&H(W)},[C.value]),ie=o==="popper"?zu:P5,_e=ie===zu?{side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:d,collisionBoundary:g,collisionPadding:h,sticky:_,hideWhenDetached:m,avoidCollisions:p}:{};return F.jsx(Wh,{scope:r,content:x,viewport:k,onViewportChange:b,itemRefCallback:Se,selectedItem:E,onItemLeave:Ke,itemTextRefCallback:Ye,focusSelectedItem:re,selectedItemText:L,position:o,isPositioned:V,searchRef:ae,children:F.jsx(A0,{as:A5,allowPinchZoom:!0,children:F.jsx(I0,{asChild:!0,trapped:C.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:at(i,W=>{var ce;(ce=C.trigger)==null||ce.focus({preventScroll:!0}),W.preventDefault()}),children:F.jsx(P0,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>C.onOpenChange(!1),children:F.jsx(ie,{role:"listbox",id:C.contentId,"data-state":C.open?"open":"closed",dir:C.dir,onContextMenu:W=>W.preventDefault(),...y,..._e,onPlaced:()=>Z(!0),ref:v,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:at(y.onKeyDown,W=>{const ce=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!ce&&W.key.length===1&&Te(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ue=R().filter(de=>!de.disabled).map(de=>de.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ue=ue.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const de=W.target,xe=ue.indexOf(de);ue=ue.slice(xe+1)}setTimeout(()=>z(ue)),W.preventDefault()}})})})})})})},"SelectContentImpl")),P5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,onPlaced:o,...i}=e,s=Hn(sr,r),l=Zs(sr,r),[a,c]=I.useState(null),[u,f]=I.useState(null),d=Rn(t,f),g=pc(r),h=I.useRef(!1),_=I.useRef(!0),{viewport:m,selectedItem:p,selectedItemText:y,focusSelectedItem:C}=l,x=I.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&m&&p&&y){const v=s.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),M=s.valueNode.getBoundingClientRect(),L=y.getBoundingClientRect();if(s.dir!=="rtl"){const de=L.left-E.left,xe=M.left-de,en=v.left-xe,tn=v.width+en,Ir=Math.max(tn,E.width),bo=window.innerWidth-Ft,Pr=ca(xe,[Ft,Math.max(Ft,bo-Ir)]);a.style.minWidth=tn+"px",a.style.left=Pr+"px"}else{const de=E.right-L.right,xe=window.innerWidth-M.right-de,en=window.innerWidth-v.right-xe,tn=v.width+en,Ir=Math.max(tn,E.width),bo=window.innerWidth-Ft,Pr=ca(xe,[Ft,Math.max(Ft,bo-Ir)]);a.style.minWidth=tn+"px",a.style.right=Pr+"px"}const H=g(),R=window.innerHeight-Ft*2,V=m.scrollHeight,Z=window.getComputedStyle(u),G=parseInt(Z.borderTopWidth,10),z=parseInt(Z.paddingTop,10),re=parseInt(Z.borderBottomWidth,10),ee=parseInt(Z.paddingBottom,10),ne=G+z+V+ee+re,ae=Math.min(p.offsetHeight*5,ne),Te=window.getComputedStyle(m),Se=parseInt(Te.paddingTop,10),Ke=parseInt(Te.paddingBottom,10),Ye=v.top+v.height/2-Ft,ie=R-Ye,_e=p.offsetHeight/2,W=p.offsetTop+_e,ce=G+z+W,Ie=ne-ce;if(ce<=Ye){const de=H.length>0&&p===H[H.length-1].ref.current;a.style.bottom="0px";const xe=u.clientHeight-m.offsetTop-m.offsetHeight,en=Math.max(ie,_e+(de?Ke:0)+xe+re),tn=ce+en;a.style.height=tn+"px"}else{const de=H.length>0&&p===H[0].ref.current;a.style.top="0px";const en=Math.max(Ye,G+m.offsetTop+(de?Se:0)+_e)+Ie;a.style.height=en+"px",m.scrollTop=ce-Ye+m.offsetTop}a.style.margin=`${Ft}px 0`,a.style.minHeight=ae+"px",a.style.maxHeight=R+"px",o==null||o(),requestAnimationFrame(()=>h.current=!0)}},[g,s.trigger,s.valueNode,a,u,m,p,y,s.dir,o]);jo(()=>x(),[x]);const[w,k]=I.useState();jo(()=>{u&&k(window.getComputedStyle(u).zIndex)},[u]);const b=I.useCallback(v=>{v&&_.current===!0&&(x(),C==null||C(),_.current=!1)},[x,C]);return F.jsx(D5,{scope:r,contentWrapper:a,shouldExpandOnScrollRef:h,onScrollButtonChange:b,children:F.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w},children:F.jsx(Kt.div,{...i,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})},"SelectItemAlignedPosition")),zu=I.forwardRef(be(function(e,t){const{__scopeSelect:r,align:o="start",collisionPadding:i=Ft,...s}=e,l=mc(r);return F.jsx(F0,{...l,...s,ref:t,align:o,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})},"SelectPopperPosition")),[D5,F5]=vr(sr,{}),Ju="SelectViewport",R5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,nonce:o,...i}=e,s=Zs(Ju,r),l=F5(Ju,r),a=Rn(t,s.onViewportChange),c=I.useRef(0);return F.jsxs(F.Fragment,{children:[F.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),F.jsx(Us.Slot,{scope:r,children:F.jsx(Kt.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:at(i.onScroll,u=>{const f=u.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:g}=l;if(g!=null&&g.current&&d){const h=Math.abs(c.current-f.scrollTop);if(h>0){const _=window.innerHeight-Ft*2,m=parseFloat(d.style.minHeight),p=parseFloat(d.style.height),y=Math.max(m,p);if(y<_){const C=y+h,x=Math.min(_,C),w=C-x;d.style.height=x+"px",d.style.bottom==="0px"&&(f.scrollTop=w>0?w:0,d.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})},"SelectViewport")),H5="SelectGroup",[pv,mv]=vr(H5),ua="SelectItem",[V5,B5]=vr(ua),z5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,value:o,disabled:i=!1,textValue:s,...l}=e,a=Hn(ua,r),c=Zs(ua,r),u=a.value===o,[f,d]=I.useState(s??""),[g,h]=I.useState(!1),_=hc(x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,o,i)}),m=Rn(t,_),p=Fh(),y=I.useRef("touch"),C=be(()=>{i||(a.onValueChange(o),a.onOpenChange(!1))},"handleSelect");return F.jsx(V5,{scope:r,value:o,disabled:i,textId:p,isSelected:u,onItemTextChange:I.useCallback(x=>{d(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:F.jsx(Us.ItemSlot,{scope:r,value:o,disabled:i,textValue:f,children:F.jsx(Kt.div,{role:"option","aria-labelledby":p,"data-highlighted":g?"":void 0,"aria-selected":u&&g,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...l,ref:m,onFocus:at(l.onFocus,()=>h(!0)),onBlur:at(l.onBlur,()=>h(!1)),onClick:at(l.onClick,()=>{y.current!=="mouse"&&C()}),onPointerUp:at(l.onPointerUp,()=>{y.current==="mouse"&&C()}),onPointerDown:at(l.onPointerDown,x=>{y.current=x.pointerType}),onPointerMove:at(l.onPointerMove,x=>{var w;y.current=x.pointerType,i?(w=c.onItemLeave)==null||w.call(c):y.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:at(l.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:at(l.onKeyDown,x=>{var k;i||x.target!==x.currentTarget||((k=c.searchRef)==null?void 0:k.current)!==""&&x.key===" "||(m5.includes(x.key)&&C(),x.key===" "&&x.preventDefault())})})})})},"SelectItem")),Fi="SelectItemText",J5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,className:o,style:i,...s}=e,l=Hn(Fi,r),a=Zs(Fi,r),c=B5(Fi,r),u=C5(Fi,r),[f,d]=I.useState(null),g=hc(C=>{var x;return(x=a.itemTextRefCallback)==null?void 0:x.call(a,C,c.value,c.disabled)}),h=Rn(t,d,c.onItemTextChange,g),_=f==null?void 0:f.textContent,m=I.useMemo(()=>F.jsx("option",{value:c.value,disabled:c.disabled,children:_},c.value),[c.disabled,c.value,_]),{onNativeOptionAdd:p,onNativeOptionRemove:y}=u;return jo(()=>(p(m),()=>y(m)),[p,y,m]),F.jsxs(F.Fragment,{children:[F.jsx(Kt.span,{id:c.textId,...s,ref:h}),c.isSelected&&l.valueNode&&!l.valueNodeHasChildren&&!yi(l.value)?Uo.createPortal(s.children,l.valueNode):null]})},"SelectItemText")),K5=I.forwardRef(be(function(e,t){const{__scopeSelect:r,...o}=e;return F.jsx(Kt.div,{"aria-hidden":!0,...o,ref:t})},"SelectSeparator")),W5="SelectBubbleInput",j5=I.forwardRef(be(function({__scopeSelect:e,...t},r){const o=Hn(W5,e),{value:i,onValueChange:s,required:l,disabled:a,name:c,autoComplete:u,form:f}=o,{nativeOptions:d,nativeSelectKey:g}=o,h=I.useRef(null),_=Rn(r,h),m=i??"",p=Jh(m),y=Array.from(d).some(C=>(C.props.value??"")==="");return I.useEffect(()=>{const C=h.current;if(!C)return;const x=window.HTMLSelectElement.prototype,k=Object.getOwnPropertyDescriptor(x,"value").set;if(p!==m&&k){const b=new Event("change",{bubbles:!0});k.call(C,m),C.dispatchEvent(b)}},[p,m]),F.jsxs(Kt.select,{"aria-hidden":!0,required:l,tabIndex:-1,name:c,autoComplete:u,disabled:a,form:f,onChange:C=>s(C.target.value),...t,style:{...R0,...t.style},ref:_,defaultValue:m,children:[yi(i)&&!y?F.jsx("option",{value:""}):null,Array.from(d)]},g)},"SelectBubbleInput"));function jh(n){return typeof n=="function"}be(jh,"isFunction");function yi(n){return n===""||n===void 0}be(yi,"shouldShowPlaceholder");function _c(n){const e=hc(n),t=I.useRef(""),r=I.useRef(0),o=I.useCallback(s=>{const l=t.current+s;e(l),be(function a(c){t.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>a(""),1e3))},"updateSearch")(l)},[e]),i=I.useCallback(()=>{t.current="",window.clearTimeout(r.current)},[]);return I.useEffect(()=>()=>window.clearTimeout(r.current),[]),[t,o,i]}be(_c,"useTypeaheadSearch");function xc(n,e,t){const o=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,i=t?n.indexOf(t):-1;let s=Uh(n,Math.max(i,0));o.length===1&&(s=s.filter(c=>c!==t));const a=s.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return a!==t?a:void 0}be(xc,"findNextItem");function Uh(n,e){return n.map((t,r)=>n[(e+r)%n.length])}be(Uh,"wrapArray");var U5=Object.defineProperty,qs=(n,e)=>U5(n,"name",{value:e,configurable:!0}),Zh="Toolbar",[Z5,_v]=Hh(Zh,[Bh,zh]),qh=Bh(),Gh=zh(),[q5,G5]=Z5(Zh),Y5=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,orientation:o="horizontal",dir:i,loop:s=!0,...l}=e,a=qh(r),c=Vh(i);return F.jsx(q5,{scope:r,orientation:o,dir:c,children:F.jsx(z0,{asChild:!0,...a,orientation:o,dir:c,loop:s,children:F.jsx(Kt.div,{role:"toolbar","aria-orientation":o,dir:c,...l,ref:t})})})},"Toolbar")),Yh=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,...o}=e,i=qh(r);return F.jsx(V0,{asChild:!0,...i,focusable:!e.disabled,children:F.jsx(Kt.button,{type:"button",...o,ref:t})})},"ToolbarButton")),X5="ToolbarToggleGroup",Q5=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,...o}=e,i=G5(X5,r),s=Gh(r);return F.jsx(J0,{"data-orientation":i.orientation,dir:i.dir,...s,...o,ref:t,rovingFocus:!1})},"ToolbarToggleGroup")),e2=I.forwardRef(qs(function(e,t){const{__scopeToolbar:r,...o}=e,i=Gh(r),s={__scopeToolbar:e.__scopeToolbar};return F.jsx(Yh,{asChild:!0,...s,children:F.jsx(B0,{...i,...o,ref:t})})},"ToolbarToggleItem")),t2=Y5,n2=Yh,yc=Q5,r2=e2;const o2={}.hasOwnProperty;function Xh(n,e){let t=-1,r;if(e.extensions)for(;++t{var k;if(!l)return;const e=document.activeElement instanceof HTMLElement?document.activeElement:null,x=document.body.style.overflow,s=document.getElementById("root"),j=(s==null?void 0:s.inert)??!1;s&&(s.inert=!0),document.body.style.overflow="hidden",(k=p.current)==null||k.focus();const g=n=>{if(n.defaultPrevented||n.isComposing||(n.key==="Escape"&&(n.preventDefault(),y.current()),n.key!=="Tab"||!u.current))return;const m=[...u.current.querySelectorAll('button:not([disabled]), input[type="radio"]:checked')].filter(E=>E.getClientRects().length>0),i=m[0],r=m[m.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),r==null||r.focus()):!n.shiftKey&&document.activeElement===r&&(n.preventDefault(),i==null||i.focus())};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g),document.body.style.overflow=x,s&&(s.inert=j),e!=null&&e.isConnected&&e.focus()}},[l]),l?D.createPortal(t.jsx("div",{className:"cw-skill-dialog-backdrop quick-agent-type-backdrop",onClick:e=>{e.target===e.currentTarget&&o()},children:t.jsxs("section",{className:"cw-skill-dialog quick-agent-type-dialog",role:"dialog","aria-modal":"true","aria-labelledby":`${d}-title`,ref:u,children:[t.jsxs("header",{className:"cw-skill-dialog-head",children:[t.jsx("h2",{id:`${d}-title`,children:c("agentType")}),t.jsx("button",{type:"button",className:"cw-skill-dialog-close",onClick:o,ref:p,"aria-label":c("close"),children:t.jsx(v,{})})]}),t.jsxs("form",{onSubmit:e=>{e.preventDefault(),b(f)},children:[t.jsx("fieldset",{className:"cw-agent-type-options quick-agent-type-options",role:"radiogroup","aria-label":c("agentType"),children:["veadk","deepseek"].map(e=>t.jsxs("label",{className:`cw-agent-type-option quick-agent-type-option${f===e?" is-on":""}`,children:[t.jsx("input",{type:"radio",name:`${d}-kind`,value:e,checked:f===e,onChange:()=>w(e)}),t.jsx("span",{children:e==="veadk"?"VeADK Agent":"DeepSeek Harness"}),e==="deepseek"&&t.jsx(R,{className:"quick-agent-beta",color:"secondary",variant:"soft",size:"sm",children:"Beta"})]},e))}),t.jsxs("footer",{className:"quick-agent-type-actions",children:[t.jsx(h,{type:"button",className:"cw-btn cw-btn-ghost",color:"secondary",variant:"ghost",onClick:o,children:c("cancel")}),t.jsx(h,{type:"submit",className:"cw-btn cw-btn-primary",color:"primary",children:c("continue")})]})]})]})}),document.body):null}export{C as default}; +import{aU as N,aD as a,aC as D,as as t,S as v,B as R,a as h}from"../app/index-BKQXvMzA.js";function C({open:l,onClose:o,onSelect:b}){const{t:c}=N("deepseek"),d=a.useId(),u=a.useRef(null),p=a.useRef(null),y=a.useRef(o),[f,w]=a.useState("veadk");return y.current=o,a.useEffect(()=>{var k;if(!l)return;const e=document.activeElement instanceof HTMLElement?document.activeElement:null,x=document.body.style.overflow,s=document.getElementById("root"),j=(s==null?void 0:s.inert)??!1;s&&(s.inert=!0),document.body.style.overflow="hidden",(k=p.current)==null||k.focus();const g=n=>{if(n.defaultPrevented||n.isComposing||(n.key==="Escape"&&(n.preventDefault(),y.current()),n.key!=="Tab"||!u.current))return;const m=[...u.current.querySelectorAll('button:not([disabled]), input[type="radio"]:checked')].filter(E=>E.getClientRects().length>0),i=m[0],r=m[m.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),r==null||r.focus()):!n.shiftKey&&document.activeElement===r&&(n.preventDefault(),i==null||i.focus())};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g),document.body.style.overflow=x,s&&(s.inert=j),e!=null&&e.isConnected&&e.focus()}},[l]),l?D.createPortal(t.jsx("div",{className:"cw-skill-dialog-backdrop quick-agent-type-backdrop",onClick:e=>{e.target===e.currentTarget&&o()},children:t.jsxs("section",{className:"cw-skill-dialog quick-agent-type-dialog",role:"dialog","aria-modal":"true","aria-labelledby":`${d}-title`,ref:u,children:[t.jsxs("header",{className:"cw-skill-dialog-head",children:[t.jsx("h2",{id:`${d}-title`,children:c("agentType")}),t.jsx("button",{type:"button",className:"cw-skill-dialog-close",onClick:o,ref:p,"aria-label":c("close"),children:t.jsx(v,{})})]}),t.jsxs("form",{onSubmit:e=>{e.preventDefault(),b(f)},children:[t.jsx("fieldset",{className:"cw-agent-type-options quick-agent-type-options",role:"radiogroup","aria-label":c("agentType"),children:["veadk","deepseek"].map(e=>t.jsxs("label",{className:`cw-agent-type-option quick-agent-type-option${f===e?" is-on":""}`,children:[t.jsx("input",{type:"radio",name:`${d}-kind`,value:e,checked:f===e,onChange:()=>w(e)}),t.jsx("span",{children:e==="veadk"?"VeADK Agent":"DeepSeek Harness"}),e==="deepseek"&&t.jsx(R,{className:"quick-agent-beta",color:"secondary",variant:"soft",size:"sm",children:"Beta"})]},e))}),t.jsxs("footer",{className:"quick-agent-type-actions",children:[t.jsx(h,{type:"button",className:"cw-btn cw-btn-ghost",color:"secondary",variant:"ghost",onClick:o,children:c("cancel")}),t.jsx(h,{type:"submit",className:"cw-btn cw-btn-primary",color:"primary",children:c("continue")})]})]})]})}),document.body):null}export{C as default}; diff --git a/veadk/webui/assets/chunks/arc-DjcXfbMc.js b/veadk/webui/assets/chunks/arc-DdnIeIBk.js similarity index 98% rename from veadk/webui/assets/chunks/arc-DjcXfbMc.js rename to veadk/webui/assets/chunks/arc-DdnIeIBk.js index ad92472bb..5fe50c778 100644 --- a/veadk/webui/assets/chunks/arc-DjcXfbMc.js +++ b/veadk/webui/assets/chunks/arc-DdnIeIBk.js @@ -1 +1 @@ -import{ba as ln,aE as an,E as B,aY as b,D as S,ab as un,Q as y,b1 as tn,aZ as G,az as _,b as rn,l as o,ax as on,i as sn,c as fn}from"../visualizations/mermaid/mermaid.core-BmHujEI0.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,q,w,v,A,Y,a){var z=q-l,i=w-h,n=Y-v,d=a-A,u=d*z-n*i;if(!(u*ur*r+j*j&&(O=E,Q=p),{cx:O,cy:Q,x01:-n,y01:-d,x11:O*(v/T-1),y11:Q*(v/T-1)}}function hn(){var l=cn,h=yn,q=S(0),w=null,v=gn,A=dn,Y=mn,a=null,z=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,Z=rn(c-f),t=c>f;if(a||(a=n=z()),sy))a.moveTo(0,0);else if(Z>tn-y)a.moveTo(s*B(f),s*b(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*B(c),u*b(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=Z,I=Z,O=Y.apply(this,arguments)/2,Q=O>y&&(w?+w.apply(this,arguments):G(u*u+s*s)),E=_(rn(s-u)/2,+q.apply(this,arguments)),p=E,x=E,e,r;if(Q>y){var j=sn(Q/u*b(O)),H=sn(Q/s*b(O));(P-=j*2)>y?(j*=t?1:-1,R+=j,T-=j):(P=0,R=T=(f+c)/2),(I-=H*2)>y?(H*=t?1:-1,m+=H,g-=H):(I=0,m=g=(f+c)/2)}var C=s*B(m),F=s*b(m),J=u*B(T),K=u*b(T);if(E>y){var L=s*B(g),M=s*b(g),U=u*B(R),V=u*b(R),D;if(Zy?x>y?(e=N(U,V,C,F,s,x,t),r=N(L,M,J,K,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(J,K):p>y?(e=N(J,K,L,M,u,-p,t),r=N(C,F,U,V,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+j*j&&(O=E,Q=p),{cx:O,cy:Q,x01:-n,y01:-d,x11:O*(v/T-1),y11:Q*(v/T-1)}}function hn(){var l=cn,h=yn,q=S(0),w=null,v=gn,A=dn,Y=mn,a=null,z=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,Z=rn(c-f),t=c>f;if(a||(a=n=z()),sy))a.moveTo(0,0);else if(Z>tn-y)a.moveTo(s*B(f),s*b(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*B(c),u*b(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=Z,I=Z,O=Y.apply(this,arguments)/2,Q=O>y&&(w?+w.apply(this,arguments):G(u*u+s*s)),E=_(rn(s-u)/2,+q.apply(this,arguments)),p=E,x=E,e,r;if(Q>y){var j=sn(Q/u*b(O)),H=sn(Q/s*b(O));(P-=j*2)>y?(j*=t?1:-1,R+=j,T-=j):(P=0,R=T=(f+c)/2),(I-=H*2)>y?(H*=t?1:-1,m+=H,g-=H):(I=0,m=g=(f+c)/2)}var C=s*B(m),F=s*b(m),J=u*B(T),K=u*b(T);if(E>y){var L=s*B(g),M=s*b(g),U=u*B(R),V=u*b(R),D;if(Zy?x>y?(e=N(U,V,C,F,s,x,t),r=N(L,M,J,K,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(J,K):p>y?(e=N(J,K,L,M,u,-p,t),r=N(C,F,U,V,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),pa.lang.round(n.parse(r)[o]);export{t as c}; +import{U as a,C as n}from"../visualizations/mermaid/mermaid.core-l-gs7P2Q.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/veadk/webui/assets/chunks/index.es-CvwIedKw.js b/veadk/webui/assets/chunks/index.es--qdfqpum.js similarity index 99% rename from veadk/webui/assets/chunks/index.es-CvwIedKw.js rename to veadk/webui/assets/chunks/index.es--qdfqpum.js index ded0735de..739ecb9f7 100644 --- a/veadk/webui/assets/chunks/index.es-CvwIedKw.js +++ b/veadk/webui/assets/chunks/index.es--qdfqpum.js @@ -1,4 +1,4 @@ -import{U as Ke,ad as Do}from"../app/index-B71Wq9_t.js";import{_ as Xa}from"./jspdf.es.min-CdGYO913.js";var vt=function(a){return a&&a.Math===Math&&a},_=vt(typeof globalThis=="object"&&globalThis)||vt(typeof window=="object"&&window)||vt(typeof self=="object"&&self)||vt(typeof Ke=="object"&&Ke)||vt(typeof Ke=="object"&&Ke)||function(){return this}()||Function("return this")(),$t={},D=function(a){try{return!!a()}catch{return!0}},Pl=D,he=!Pl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Rl=D,br=!Rl(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),Nl=br,Ft=Function.prototype.call,Y=Nl?Ft.bind(Ft):function(){return Ft.apply(Ft,arguments)},Lo={},ko={}.propertyIsEnumerable,Bo=Object.getOwnPropertyDescriptor,Il=Bo&&!ko.call({1:2},1);Lo.f=Il?function(e){var t=Bo(this,e);return!!t&&t.enumerable}:ko;var Si=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},jo=br,Fo=Function.prototype,Wa=Fo.call,Ml=jo&&Fo.bind.bind(Wa,Wa),L=jo?Ml:function(a){return function(){return Wa.apply(a,arguments)}},Uo=L,_l=Uo({}.toString),Vl=Uo("".slice),Ce=function(a){return Vl(_l(a),8,-1)},Dl=L,Ll=D,kl=Ce,ea=Object,Bl=Dl("".split),Go=Ll(function(){return!ea("z").propertyIsEnumerable(0)})?function(a){return kl(a)==="String"?Bl(a,""):ea(a)}:ea,xr=function(a){return a==null},jl=xr,Fl=TypeError,ve=function(a){if(jl(a))throw new Fl("Can't call method on "+a);return a},Ul=Go,Gl=ve,wt=function(a){return Ul(Gl(a))},ta=typeof document=="object"&&document.all,k=typeof ta>"u"&&ta!==void 0?function(a){return typeof a=="function"||a===ta}:function(a){return typeof a=="function"},zl=k,ae=function(a){return typeof a=="object"?a!==null:zl(a)},ra=_,Hl=k,Yl=function(a){return Hl(a)?a:void 0},Fe=function(a,e){return arguments.length<2?Yl(ra[a]):ra[a]&&ra[a][e]},Xl=L,Tr=Xl({}.isPrototypeOf),Wl=_,pn=Wl.navigator,yn=pn&&pn.userAgent,Ct=yn?String(yn):"",zo=_,aa=Ct,mn=zo.process,bn=zo.Deno,xn=mn&&mn.versions||bn&&bn.version,Tn=xn&&xn.v8,le,cr;Tn&&(le=Tn.split("."),cr=le[0]>0&&le[0]<4?1:+(le[0]+le[1]));!cr&&aa&&(le=aa.match(/Edge\/(\d+)/),(!le||le[1]>=74)&&(le=aa.match(/Chrome\/(\d+)/),le&&(cr=+le[1])));var Ei=cr,On=Ei,ql=D,Ql=_,Kl=Ql.String,Ho=!!Object.getOwnPropertySymbols&&!ql(function(){var a=Symbol("symbol detection");return!Kl(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&On&&On<41}),Zl=Ho,Yo=Zl&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Jl=Fe,eh=k,th=Tr,rh=Yo,ah=Object,Xo=rh?function(a){return typeof a=="symbol"}:function(a){var e=Jl("Symbol");return eh(e)&&th(e.prototype,ah(a))},ih=String,Or=function(a){try{return ih(a)}catch{return"Object"}},nh=k,sh=Or,oh=TypeError,Ae=function(a){if(nh(a))return a;throw new oh(sh(a)+" is not a function")},uh=Ae,lh=xr,ot=function(a,e){var t=a[e];return lh(t)?void 0:uh(t)},ia=Y,na=k,sa=ae,hh=TypeError,vh=function(a,e){var t,r;if(e==="string"&&na(t=a.toString)&&!sa(r=ia(t,a))||na(t=a.valueOf)&&!sa(r=ia(t,a))||e!=="string"&&na(t=a.toString)&&!sa(r=ia(t,a)))return r;throw new hh("Can't convert object to primitive value")},Wo={exports:{}},Sn=_,fh=Object.defineProperty,$i=function(a,e){try{fh(Sn,a,{value:e,configurable:!0,writable:!0})}catch{Sn[a]=e}return e},ch=_,gh=$i,En="__core-js_shared__",$n=Wo.exports=ch[En]||gh(En,{});($n.versions||($n.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"});var wi=Wo.exports,wn=wi,dh=Object.create||Object,Ci=function(a,e){return wn[a]||(wn[a]=e||dh(null))},ph=ve,yh=Object,Sr=function(a){return yh(ph(a))},mh=L,bh=Sr,xh=mh({}.hasOwnProperty),fe=Object.hasOwn||function(e,t){return xh(bh(e),t)},Th=L,Oh=0,Sh=Math.random(),Eh=Th(1.1.toString),qo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+Eh(++Oh+Sh,36)},$h=_,wh=Ci,Cn=fe,Ch=qo,Ah=Ho,Ph=Yo,Ze=$h.Symbol,oa=wh("wks"),Rh=Ph?Ze.for||Ze:Ze&&Ze.withoutSetter||Ch,z=function(a){return Cn(oa,a)||(oa[a]=Ah&&Cn(Ze,a)?Ze[a]:Rh("Symbol."+a)),oa[a]},Nh=Y,An=ae,Pn=Xo,Ih=ot,Mh=vh,_h=z,Vh=TypeError,Dh=_h("toPrimitive"),Lh=function(a,e){if(!An(a)||Pn(a))return a;var t=Ih(a,Dh),r;if(t){if(e===void 0&&(e="default"),r=Nh(t,a,e),!An(r)||Pn(r))return r;throw new Vh("Can't convert object to primitive value")}return e===void 0&&(e="number"),Mh(a,e)},kh=Lh,Bh=Xo,Qo=function(a){var e=kh(a,"string");return Bh(e)?e:e+""},jh=_,Rn=ae,qa=jh.document,Fh=Rn(qa)&&Rn(qa.createElement),Er=function(a){return Fh?qa.createElement(a):{}},Uh=he,Gh=D,zh=Er,Ko=!Uh&&!Gh(function(){return Object.defineProperty(zh("div"),"a",{get:function(){return 7}}).a!==7}),Hh=he,Yh=Y,Xh=Lo,Wh=Si,qh=wt,Qh=Qo,Kh=fe,Zh=Ko,Nn=Object.getOwnPropertyDescriptor;$t.f=Hh?Nn:function(e,t){if(e=qh(e),t=Qh(t),Zh)try{return Nn(e,t)}catch{}if(Kh(e,t))return Wh(!Yh(Xh.f,e,t),e[t])};var Te={},Jh=he,ev=D,Zo=Jh&&ev(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),tv=ae,rv=String,av=TypeError,J=function(a){if(tv(a))return a;throw new av(rv(a)+" is not an object")},iv=he,nv=Ko,sv=Zo,Ut=J,In=Qo,ov=TypeError,ua=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,la="enumerable",ha="configurable",va="writable";Te.f=iv?sv?function(e,t,r){if(Ut(e),t=In(t),Ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&va in r&&!r[va]){var i=uv(e,t);i&&i[va]&&(e[t]=r.value,r={configurable:ha in r?r[ha]:i[ha],enumerable:la in r?r[la]:i[la],writable:!1})}return ua(e,t,r)}:ua:function(e,t,r){if(Ut(e),t=In(t),Ut(r),nv)try{return ua(e,t,r)}catch{}if("get"in r||"set"in r)throw new ov("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var lv=he,hv=Te,vv=Si,At=lv?function(a,e,t){return hv.f(a,e,vv(1,t))}:function(a,e,t){return a[e]=t,a},Jo={exports:{}},Qa=he,fv=fe,eu=Function.prototype,cv=Qa&&Object.getOwnPropertyDescriptor,tu=fv(eu,"name"),gv=tu&&(function(){}).name==="something",dv=tu&&(!Qa||Qa&&cv(eu,"name").configurable),$r={PROPER:gv,CONFIGURABLE:dv},pv=L,yv=k,Ka=wi,mv=pv(Function.toString);yv(Ka.inspectSource)||(Ka.inspectSource=function(a){return mv(a)});var Ai=Ka.inspectSource,bv=_,xv=k,Mn=bv.WeakMap,Tv=xv(Mn)&&/native code/.test(String(Mn)),Ov=Ci,Sv=qo,_n=Ov("keys"),Pi=function(a){return _n[a]||(_n[a]=Sv(a))},Ri={},Ev=Tv,ru=_,$v=ae,wv=At,fa=fe,ca=wi,Cv=Pi,Av=Ri,Vn="Object already initialized",Za=ru.TypeError,Pv=ru.WeakMap,gr,Ot,dr,Rv=function(a){return dr(a)?Ot(a):gr(a,{})},Nv=function(a){return function(e){var t;if(!$v(e)||(t=Ot(e)).type!==a)throw new Za("Incompatible receiver, "+a+" required");return t}};if(Ev||ca.state){var de=ca.state||(ca.state=new Pv);de.get=de.get,de.has=de.has,de.set=de.set,gr=function(a,e){if(de.has(a))throw new Za(Vn);return e.facade=a,de.set(a,e),e},Ot=function(a){return de.get(a)||{}},dr=function(a){return de.has(a)}}else{var Ye=Cv("state");Av[Ye]=!0,gr=function(a,e){if(fa(a,Ye))throw new Za(Vn);return e.facade=a,wv(a,Ye,e),e},Ot=function(a){return fa(a,Ye)?a[Ye]:{}},dr=function(a){return fa(a,Ye)}}var wr={set:gr,get:Ot,has:dr,enforce:Rv,getterFor:Nv},Ni=L,Iv=D,Mv=k,Gt=fe,Ja=he,_v=$r.CONFIGURABLE,Vv=Ai,au=wr,Dv=au.enforce,Lv=au.get,Dn=String,or=Object.defineProperty,kv=Ni("".slice),Bv=Ni("".replace),jv=Ni([].join),Fv=Ja&&!Iv(function(){return or(function(){},"length",{value:8}).length!==8}),Uv=String(String).split("String"),Gv=Jo.exports=function(a,e,t){kv(Dn(e),0,7)==="Symbol("&&(e="["+Bv(Dn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Gt(a,"name")||_v&&a.name!==e)&&(Ja?or(a,"name",{value:e,configurable:!0}):a.name=e),Fv&&t&&Gt(t,"arity")&&a.length!==t.arity&&or(a,"length",{value:t.arity});try{t&&Gt(t,"constructor")&&t.constructor?Ja&&or(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Dv(a);return Gt(r,"source")||(r.source=jv(Uv,typeof e=="string"?e:"")),a};Function.prototype.toString=Gv(function(){return Mv(this)&&Lv(this).source||Vv(this)},"toString");var iu=Jo.exports,zv=k,Hv=Te,Yv=iu,Xv=$i,Ue=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(zv(t)&&Yv(t,n,r),r.global)i?a[e]=t:Xv(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:Hv.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},nu={},Wv=Math.ceil,qv=Math.floor,Qv=Math.trunc||function(e){var t=+e;return(t>0?qv:Wv)(t)},Kv=Qv,Cr=function(a){var e=+a;return e!==e||e===0?0:Kv(e)},Zv=Cr,Jv=Math.max,ef=Math.min,tf=function(a,e){var t=Zv(a);return t<0?Jv(t+e,0):ef(t,e)},rf=Cr,af=Math.min,ut=function(a){var e=rf(a);return e>0?af(e,9007199254740991):0},nf=ut,Ii=function(a){return nf(a.length)},sf=wt,of=tf,uf=Ii,lf=function(a){return function(e,t,r){var i=sf(e),n=uf(i);if(n===0)return!a&&-1;var o=of(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},su={indexOf:lf(!1)},hf=L,ga=fe,vf=wt,ff=su.indexOf,cf=Ri,Ln=hf([].push),ou=function(a,e){var t=vf(a),r=0,i=[],n;for(n in t)!ga(cf,n)&&ga(t,n)&&Ln(i,n);for(;e.length>r;)ga(t,n=e[r++])&&(~ff(i,n)||Ln(i,n));return i},Mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gf=ou,df=Mi,pf=df.concat("length","prototype");nu.f=Object.getOwnPropertyNames||function(e){return gf(e,pf)};var uu={};uu.f=Object.getOwnPropertySymbols;var yf=Fe,mf=L,bf=nu,xf=uu,Tf=J,Of=mf([].concat),Sf=yf("Reflect","ownKeys")||function(e){var t=bf.f(Tf(e)),r=xf.f;return r?Of(t,r(e)):t},kn=fe,Ef=Sf,$f=$t,wf=Te,Cf=function(a,e,t){for(var r=Ef(e),i=wf.f,n=$f.f,o=0;of;f++)if(v=y(a[f]),v&&ms(xs,v))return v;return new hr(!1)}l=wd(a,h)}for(g=n?a.next:l.next;!(d=Td(g,l)).done;){var T=d.value;try{v=y(T)}catch(b){if(l)bs(l,"throw",b);else throw b}if(typeof v=="object"&&v&&ms(xs,v))return v}return new hr(!1)},Pd=z,Gu=Pd("iterator"),zu=!1;try{var Rd=0,Ts={next:function(){return{done:!!Rd++}},return:function(){zu=!0}};Ts[Gu]=function(){return this},Array.from(Ts,function(){throw 2})}catch{}var Nd=function(a,e){try{if(!e&&!zu)return!1}catch{return!1}var t=!1;try{var r={};r[Gu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},Id=Nr,Md=Nd,_d=Rt.CONSTRUCTOR,Hu=_d||!Md(function(a){Id.all(a).then(void 0,function(){})}),Vd=ee,Dd=Y,Ld=Ae,kd=lt,Bd=Li,jd=Uu,Fd=Hu;Vd({target:"Promise",stat:!0,forced:Fd},{all:function(e){var t=this,r=kd.f(t),i=r.resolve,n=r.reject,o=Bd(function(){var s=Ld(t.resolve),u=[],l=0,h=1;jd(e,function(f){var c=l++,v=!1;h++,Dd(s,t,f).then(function(g){v||(v=!0,u[c]=g,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var Ud=ee,Gd=Rt.CONSTRUCTOR,si=Nr,zd=Fe,Hd=k,Yd=Ue,Os=si&&si.prototype;Ud({target:"Promise",proto:!0,forced:Gd,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Hd(si)){var Ss=zd("Promise").prototype.catch;Os.catch!==Ss&&Yd(Os,"catch",Ss,{unsafe:!0})}var Xd=ee,Wd=Y,qd=Ae,Qd=lt,Kd=Li,Zd=Uu,Jd=Hu;Xd({target:"Promise",stat:!0,forced:Jd},{race:function(e){var t=this,r=Qd.f(t),i=r.reject,n=Kd(function(){var o=qd(t.resolve);Zd(e,function(s){Wd(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var ep=ee,tp=lt,rp=Rt.CONSTRUCTOR;ep({target:"Promise",stat:!0,forced:rp},{reject:function(e){var t=tp.f(this),r=t.reject;return r(e),t.promise}});var ap=J,ip=ae,np=lt,sp=function(a,e){if(ap(a),ip(e)&&e.constructor===a)return e;var t=np.f(a),r=t.resolve;return r(e),t.promise},op=ee,up=Fe,lp=Rt.CONSTRUCTOR,hp=sp;up("Promise");op({target:"Promise",stat:!0,forced:lp},{resolve:function(e){return hp(this,e)}});function Es(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function xe(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Es(n,r,i,o,s,"next",u)}function s(u){Es(n,r,i,o,s,"throw",u)}o(void 0)})}}var vp=cu,fp=String,pe=function(a){if(vp(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return fp(a)},cp=J,Yu=function(){var a=cp(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},Ui=D,gp=_,Gi=gp.RegExp,zi=Ui(function(){var a=Gi("a","y");return a.lastIndex=2,a.exec("abcd")!==null});zi||Ui(function(){return!Gi("a","y").sticky});var dp=zi||Ui(function(){var a=Gi("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),Xu={BROKEN_CARET:dp,UNSUPPORTED_Y:zi},Wu={},pp=ou,yp=Mi,mp=Object.keys||function(e){return pp(e,yp)},bp=he,xp=Zo,Tp=Te,Op=J,Sp=wt,Ep=mp;Wu.f=bp&&!xp?Object.defineProperties:function(e,t){Op(e);for(var r=Sp(t),i=Ep(t),n=i.length,o=0,s;n>o;)Tp.f(e,s=i[o++],r[s]);return e};var $p=J,wp=Wu,$s=Mi,Cp=Ri,Ap=Tu,Pp=Er,Rp=Pi,ws=">",Cs="<",oi="prototype",ui="script",qu=Rp("IE_PROTO"),wa=function(){},Qu=function(a){return Cs+ui+ws+a+Cs+"/"+ui+ws},As=function(a){a.write(Qu("")),a.close();var e=a.parentWindow.Object;return a=null,e},Np=function(){var a=Pp("iframe"),e="java"+ui+":",t;return a.style.display="none",Ap.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(Qu("document.F=Object")),t.close(),t.F},Zt,vr=function(){try{Zt=new ActiveXObject("htmlfile")}catch{}vr=typeof document<"u"?document.domain&&Zt?As(Zt):Np():As(Zt);for(var a=$s.length;a--;)delete vr[oi][$s[a]];return vr()};Cp[qu]=!0;var Hi=Object.create||function(e,t){var r;return e!==null?(wa[oi]=$p(e),r=new wa,wa[oi]=null,r[qu]=e):r=vr(),t===void 0?r:wp.f(r,t)},Ip=D,Mp=_,_p=Mp.RegExp,Vp=Ip(function(){var a=_p(".","s");return!(a.dotAll&&a.test(` +import{U as Ke,ad as Do}from"../app/index-BKQXvMzA.js";import{_ as Xa}from"./jspdf.es.min-USQmc3i1.js";var vt=function(a){return a&&a.Math===Math&&a},_=vt(typeof globalThis=="object"&&globalThis)||vt(typeof window=="object"&&window)||vt(typeof self=="object"&&self)||vt(typeof Ke=="object"&&Ke)||vt(typeof Ke=="object"&&Ke)||function(){return this}()||Function("return this")(),$t={},D=function(a){try{return!!a()}catch{return!0}},Pl=D,he=!Pl(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Rl=D,br=!Rl(function(){var a=(function(){}).bind();return typeof a!="function"||a.hasOwnProperty("prototype")}),Nl=br,Ft=Function.prototype.call,Y=Nl?Ft.bind(Ft):function(){return Ft.apply(Ft,arguments)},Lo={},ko={}.propertyIsEnumerable,Bo=Object.getOwnPropertyDescriptor,Il=Bo&&!ko.call({1:2},1);Lo.f=Il?function(e){var t=Bo(this,e);return!!t&&t.enumerable}:ko;var Si=function(a,e){return{enumerable:!(a&1),configurable:!(a&2),writable:!(a&4),value:e}},jo=br,Fo=Function.prototype,Wa=Fo.call,Ml=jo&&Fo.bind.bind(Wa,Wa),L=jo?Ml:function(a){return function(){return Wa.apply(a,arguments)}},Uo=L,_l=Uo({}.toString),Vl=Uo("".slice),Ce=function(a){return Vl(_l(a),8,-1)},Dl=L,Ll=D,kl=Ce,ea=Object,Bl=Dl("".split),Go=Ll(function(){return!ea("z").propertyIsEnumerable(0)})?function(a){return kl(a)==="String"?Bl(a,""):ea(a)}:ea,xr=function(a){return a==null},jl=xr,Fl=TypeError,ve=function(a){if(jl(a))throw new Fl("Can't call method on "+a);return a},Ul=Go,Gl=ve,wt=function(a){return Ul(Gl(a))},ta=typeof document=="object"&&document.all,k=typeof ta>"u"&&ta!==void 0?function(a){return typeof a=="function"||a===ta}:function(a){return typeof a=="function"},zl=k,ae=function(a){return typeof a=="object"?a!==null:zl(a)},ra=_,Hl=k,Yl=function(a){return Hl(a)?a:void 0},Fe=function(a,e){return arguments.length<2?Yl(ra[a]):ra[a]&&ra[a][e]},Xl=L,Tr=Xl({}.isPrototypeOf),Wl=_,pn=Wl.navigator,yn=pn&&pn.userAgent,Ct=yn?String(yn):"",zo=_,aa=Ct,mn=zo.process,bn=zo.Deno,xn=mn&&mn.versions||bn&&bn.version,Tn=xn&&xn.v8,le,cr;Tn&&(le=Tn.split("."),cr=le[0]>0&&le[0]<4?1:+(le[0]+le[1]));!cr&&aa&&(le=aa.match(/Edge\/(\d+)/),(!le||le[1]>=74)&&(le=aa.match(/Chrome\/(\d+)/),le&&(cr=+le[1])));var Ei=cr,On=Ei,ql=D,Ql=_,Kl=Ql.String,Ho=!!Object.getOwnPropertySymbols&&!ql(function(){var a=Symbol("symbol detection");return!Kl(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&On&&On<41}),Zl=Ho,Yo=Zl&&!Symbol.sham&&typeof Symbol.iterator=="symbol",Jl=Fe,eh=k,th=Tr,rh=Yo,ah=Object,Xo=rh?function(a){return typeof a=="symbol"}:function(a){var e=Jl("Symbol");return eh(e)&&th(e.prototype,ah(a))},ih=String,Or=function(a){try{return ih(a)}catch{return"Object"}},nh=k,sh=Or,oh=TypeError,Ae=function(a){if(nh(a))return a;throw new oh(sh(a)+" is not a function")},uh=Ae,lh=xr,ot=function(a,e){var t=a[e];return lh(t)?void 0:uh(t)},ia=Y,na=k,sa=ae,hh=TypeError,vh=function(a,e){var t,r;if(e==="string"&&na(t=a.toString)&&!sa(r=ia(t,a))||na(t=a.valueOf)&&!sa(r=ia(t,a))||e!=="string"&&na(t=a.toString)&&!sa(r=ia(t,a)))return r;throw new hh("Can't convert object to primitive value")},Wo={exports:{}},Sn=_,fh=Object.defineProperty,$i=function(a,e){try{fh(Sn,a,{value:e,configurable:!0,writable:!0})}catch{Sn[a]=e}return e},ch=_,gh=$i,En="__core-js_shared__",$n=Wo.exports=ch[En]||gh(En,{});($n.versions||($n.versions=[])).push({version:"3.50.0",mode:"global",copyright:"© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.",license:"https://github.com/zloirock/core-js/blob/v3.50.0/LICENSE",source:"https://github.com/zloirock/core-js"});var wi=Wo.exports,wn=wi,dh=Object.create||Object,Ci=function(a,e){return wn[a]||(wn[a]=e||dh(null))},ph=ve,yh=Object,Sr=function(a){return yh(ph(a))},mh=L,bh=Sr,xh=mh({}.hasOwnProperty),fe=Object.hasOwn||function(e,t){return xh(bh(e),t)},Th=L,Oh=0,Sh=Math.random(),Eh=Th(1.1.toString),qo=function(a){return"Symbol("+(a===void 0?"":a)+")_"+Eh(++Oh+Sh,36)},$h=_,wh=Ci,Cn=fe,Ch=qo,Ah=Ho,Ph=Yo,Ze=$h.Symbol,oa=wh("wks"),Rh=Ph?Ze.for||Ze:Ze&&Ze.withoutSetter||Ch,z=function(a){return Cn(oa,a)||(oa[a]=Ah&&Cn(Ze,a)?Ze[a]:Rh("Symbol."+a)),oa[a]},Nh=Y,An=ae,Pn=Xo,Ih=ot,Mh=vh,_h=z,Vh=TypeError,Dh=_h("toPrimitive"),Lh=function(a,e){if(!An(a)||Pn(a))return a;var t=Ih(a,Dh),r;if(t){if(e===void 0&&(e="default"),r=Nh(t,a,e),!An(r)||Pn(r))return r;throw new Vh("Can't convert object to primitive value")}return e===void 0&&(e="number"),Mh(a,e)},kh=Lh,Bh=Xo,Qo=function(a){var e=kh(a,"string");return Bh(e)?e:e+""},jh=_,Rn=ae,qa=jh.document,Fh=Rn(qa)&&Rn(qa.createElement),Er=function(a){return Fh?qa.createElement(a):{}},Uh=he,Gh=D,zh=Er,Ko=!Uh&&!Gh(function(){return Object.defineProperty(zh("div"),"a",{get:function(){return 7}}).a!==7}),Hh=he,Yh=Y,Xh=Lo,Wh=Si,qh=wt,Qh=Qo,Kh=fe,Zh=Ko,Nn=Object.getOwnPropertyDescriptor;$t.f=Hh?Nn:function(e,t){if(e=qh(e),t=Qh(t),Zh)try{return Nn(e,t)}catch{}if(Kh(e,t))return Wh(!Yh(Xh.f,e,t),e[t])};var Te={},Jh=he,ev=D,Zo=Jh&&ev(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),tv=ae,rv=String,av=TypeError,J=function(a){if(tv(a))return a;throw new av(rv(a)+" is not an object")},iv=he,nv=Ko,sv=Zo,Ut=J,In=Qo,ov=TypeError,ua=Object.defineProperty,uv=Object.getOwnPropertyDescriptor,la="enumerable",ha="configurable",va="writable";Te.f=iv?sv?function(e,t,r){if(Ut(e),t=In(t),Ut(r),typeof e=="function"&&t==="prototype"&&"value"in r&&va in r&&!r[va]){var i=uv(e,t);i&&i[va]&&(e[t]=r.value,r={configurable:ha in r?r[ha]:i[ha],enumerable:la in r?r[la]:i[la],writable:!1})}return ua(e,t,r)}:ua:function(e,t,r){if(Ut(e),t=In(t),Ut(r),nv)try{return ua(e,t,r)}catch{}if("get"in r||"set"in r)throw new ov("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var lv=he,hv=Te,vv=Si,At=lv?function(a,e,t){return hv.f(a,e,vv(1,t))}:function(a,e,t){return a[e]=t,a},Jo={exports:{}},Qa=he,fv=fe,eu=Function.prototype,cv=Qa&&Object.getOwnPropertyDescriptor,tu=fv(eu,"name"),gv=tu&&(function(){}).name==="something",dv=tu&&(!Qa||Qa&&cv(eu,"name").configurable),$r={PROPER:gv,CONFIGURABLE:dv},pv=L,yv=k,Ka=wi,mv=pv(Function.toString);yv(Ka.inspectSource)||(Ka.inspectSource=function(a){return mv(a)});var Ai=Ka.inspectSource,bv=_,xv=k,Mn=bv.WeakMap,Tv=xv(Mn)&&/native code/.test(String(Mn)),Ov=Ci,Sv=qo,_n=Ov("keys"),Pi=function(a){return _n[a]||(_n[a]=Sv(a))},Ri={},Ev=Tv,ru=_,$v=ae,wv=At,fa=fe,ca=wi,Cv=Pi,Av=Ri,Vn="Object already initialized",Za=ru.TypeError,Pv=ru.WeakMap,gr,Ot,dr,Rv=function(a){return dr(a)?Ot(a):gr(a,{})},Nv=function(a){return function(e){var t;if(!$v(e)||(t=Ot(e)).type!==a)throw new Za("Incompatible receiver, "+a+" required");return t}};if(Ev||ca.state){var de=ca.state||(ca.state=new Pv);de.get=de.get,de.has=de.has,de.set=de.set,gr=function(a,e){if(de.has(a))throw new Za(Vn);return e.facade=a,de.set(a,e),e},Ot=function(a){return de.get(a)||{}},dr=function(a){return de.has(a)}}else{var Ye=Cv("state");Av[Ye]=!0,gr=function(a,e){if(fa(a,Ye))throw new Za(Vn);return e.facade=a,wv(a,Ye,e),e},Ot=function(a){return fa(a,Ye)?a[Ye]:{}},dr=function(a){return fa(a,Ye)}}var wr={set:gr,get:Ot,has:dr,enforce:Rv,getterFor:Nv},Ni=L,Iv=D,Mv=k,Gt=fe,Ja=he,_v=$r.CONFIGURABLE,Vv=Ai,au=wr,Dv=au.enforce,Lv=au.get,Dn=String,or=Object.defineProperty,kv=Ni("".slice),Bv=Ni("".replace),jv=Ni([].join),Fv=Ja&&!Iv(function(){return or(function(){},"length",{value:8}).length!==8}),Uv=String(String).split("String"),Gv=Jo.exports=function(a,e,t){kv(Dn(e),0,7)==="Symbol("&&(e="["+Bv(Dn(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),t&&t.getter&&(e="get "+e),t&&t.setter&&(e="set "+e),(!Gt(a,"name")||_v&&a.name!==e)&&(Ja?or(a,"name",{value:e,configurable:!0}):a.name=e),Fv&&t&&Gt(t,"arity")&&a.length!==t.arity&&or(a,"length",{value:t.arity});try{t&&Gt(t,"constructor")&&t.constructor?Ja&&or(a,"prototype",{writable:!1}):a.prototype&&(a.prototype=void 0)}catch{}var r=Dv(a);return Gt(r,"source")||(r.source=jv(Uv,typeof e=="string"?e:"")),a};Function.prototype.toString=Gv(function(){return Mv(this)&&Lv(this).source||Vv(this)},"toString");var iu=Jo.exports,zv=k,Hv=Te,Yv=iu,Xv=$i,Ue=function(a,e,t,r){r||(r={});var i=r.enumerable,n=r.name!==void 0?r.name:e;if(zv(t)&&Yv(t,n,r),r.global)i?a[e]=t:Xv(e,t);else{try{r.unsafe?a[e]&&(i=!0):delete a[e]}catch{}i?a[e]=t:Hv.f(a,e,{value:t,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return a},nu={},Wv=Math.ceil,qv=Math.floor,Qv=Math.trunc||function(e){var t=+e;return(t>0?qv:Wv)(t)},Kv=Qv,Cr=function(a){var e=+a;return e!==e||e===0?0:Kv(e)},Zv=Cr,Jv=Math.max,ef=Math.min,tf=function(a,e){var t=Zv(a);return t<0?Jv(t+e,0):ef(t,e)},rf=Cr,af=Math.min,ut=function(a){var e=rf(a);return e>0?af(e,9007199254740991):0},nf=ut,Ii=function(a){return nf(a.length)},sf=wt,of=tf,uf=Ii,lf=function(a){return function(e,t,r){var i=sf(e),n=uf(i);if(n===0)return!a&&-1;var o=of(r,n),s;if(a&&t!==t){for(;n>o;)if(s=i[o++],s!==s)return!0}else for(;n>o;o++)if((a||o in i)&&i[o]===t)return a||o||0;return!a&&-1}},su={indexOf:lf(!1)},hf=L,ga=fe,vf=wt,ff=su.indexOf,cf=Ri,Ln=hf([].push),ou=function(a,e){var t=vf(a),r=0,i=[],n;for(n in t)!ga(cf,n)&&ga(t,n)&&Ln(i,n);for(;e.length>r;)ga(t,n=e[r++])&&(~ff(i,n)||Ln(i,n));return i},Mi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],gf=ou,df=Mi,pf=df.concat("length","prototype");nu.f=Object.getOwnPropertyNames||function(e){return gf(e,pf)};var uu={};uu.f=Object.getOwnPropertySymbols;var yf=Fe,mf=L,bf=nu,xf=uu,Tf=J,Of=mf([].concat),Sf=yf("Reflect","ownKeys")||function(e){var t=bf.f(Tf(e)),r=xf.f;return r?Of(t,r(e)):t},kn=fe,Ef=Sf,$f=$t,wf=Te,Cf=function(a,e,t){for(var r=Ef(e),i=wf.f,n=$f.f,o=0;of;f++)if(v=y(a[f]),v&&ms(xs,v))return v;return new hr(!1)}l=wd(a,h)}for(g=n?a.next:l.next;!(d=Td(g,l)).done;){var T=d.value;try{v=y(T)}catch(b){if(l)bs(l,"throw",b);else throw b}if(typeof v=="object"&&v&&ms(xs,v))return v}return new hr(!1)},Pd=z,Gu=Pd("iterator"),zu=!1;try{var Rd=0,Ts={next:function(){return{done:!!Rd++}},return:function(){zu=!0}};Ts[Gu]=function(){return this},Array.from(Ts,function(){throw 2})}catch{}var Nd=function(a,e){try{if(!e&&!zu)return!1}catch{return!1}var t=!1;try{var r={};r[Gu]=function(){return{next:function(){return{done:t=!0}}}},a(r)}catch{}return t},Id=Nr,Md=Nd,_d=Rt.CONSTRUCTOR,Hu=_d||!Md(function(a){Id.all(a).then(void 0,function(){})}),Vd=ee,Dd=Y,Ld=Ae,kd=lt,Bd=Li,jd=Uu,Fd=Hu;Vd({target:"Promise",stat:!0,forced:Fd},{all:function(e){var t=this,r=kd.f(t),i=r.resolve,n=r.reject,o=Bd(function(){var s=Ld(t.resolve),u=[],l=0,h=1;jd(e,function(f){var c=l++,v=!1;h++,Dd(s,t,f).then(function(g){v||(v=!0,u[c]=g,--h||i(u))},n)}),--h||i(u)});return o.error&&n(o.value),r.promise}});var Ud=ee,Gd=Rt.CONSTRUCTOR,si=Nr,zd=Fe,Hd=k,Yd=Ue,Os=si&&si.prototype;Ud({target:"Promise",proto:!0,forced:Gd,real:!0},{catch:function(a){return this.then(void 0,a)}});if(Hd(si)){var Ss=zd("Promise").prototype.catch;Os.catch!==Ss&&Yd(Os,"catch",Ss,{unsafe:!0})}var Xd=ee,Wd=Y,qd=Ae,Qd=lt,Kd=Li,Zd=Uu,Jd=Hu;Xd({target:"Promise",stat:!0,forced:Jd},{race:function(e){var t=this,r=Qd.f(t),i=r.reject,n=Kd(function(){var o=qd(t.resolve);Zd(e,function(s){Wd(o,t,s).then(r.resolve,i)})});return n.error&&i(n.value),r.promise}});var ep=ee,tp=lt,rp=Rt.CONSTRUCTOR;ep({target:"Promise",stat:!0,forced:rp},{reject:function(e){var t=tp.f(this),r=t.reject;return r(e),t.promise}});var ap=J,ip=ae,np=lt,sp=function(a,e){if(ap(a),ip(e)&&e.constructor===a)return e;var t=np.f(a),r=t.resolve;return r(e),t.promise},op=ee,up=Fe,lp=Rt.CONSTRUCTOR,hp=sp;up("Promise");op({target:"Promise",stat:!0,forced:lp},{resolve:function(e){return hp(this,e)}});function Es(a,e,t,r,i,n,o){try{var s=a[n](o),u=s.value}catch(l){return void t(l)}s.done?e(u):Promise.resolve(u).then(r,i)}function xe(a){return function(){var e=this,t=arguments;return new Promise(function(r,i){var n=a.apply(e,t);function o(u){Es(n,r,i,o,s,"next",u)}function s(u){Es(n,r,i,o,s,"throw",u)}o(void 0)})}}var vp=cu,fp=String,pe=function(a){if(vp(a)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return fp(a)},cp=J,Yu=function(){var a=cp(this),e="";return a.hasIndices&&(e+="d"),a.global&&(e+="g"),a.ignoreCase&&(e+="i"),a.multiline&&(e+="m"),a.dotAll&&(e+="s"),a.unicode&&(e+="u"),a.unicodeSets&&(e+="v"),a.sticky&&(e+="y"),e},Ui=D,gp=_,Gi=gp.RegExp,zi=Ui(function(){var a=Gi("a","y");return a.lastIndex=2,a.exec("abcd")!==null});zi||Ui(function(){return!Gi("a","y").sticky});var dp=zi||Ui(function(){var a=Gi("^r","gy");return a.lastIndex=2,a.exec("str")!==null}),Xu={BROKEN_CARET:dp,UNSUPPORTED_Y:zi},Wu={},pp=ou,yp=Mi,mp=Object.keys||function(e){return pp(e,yp)},bp=he,xp=Zo,Tp=Te,Op=J,Sp=wt,Ep=mp;Wu.f=bp&&!xp?Object.defineProperties:function(e,t){Op(e);for(var r=Sp(t),i=Ep(t),n=i.length,o=0,s;n>o;)Tp.f(e,s=i[o++],r[s]);return e};var $p=J,wp=Wu,$s=Mi,Cp=Ri,Ap=Tu,Pp=Er,Rp=Pi,ws=">",Cs="<",oi="prototype",ui="script",qu=Rp("IE_PROTO"),wa=function(){},Qu=function(a){return Cs+ui+ws+a+Cs+"/"+ui+ws},As=function(a){a.write(Qu("")),a.close();var e=a.parentWindow.Object;return a=null,e},Np=function(){var a=Pp("iframe"),e="java"+ui+":",t;return a.style.display="none",Ap.appendChild(a),a.src=String(e),t=a.contentWindow.document,t.open(),t.write(Qu("document.F=Object")),t.close(),t.F},Zt,vr=function(){try{Zt=new ActiveXObject("htmlfile")}catch{}vr=typeof document<"u"?document.domain&&Zt?As(Zt):Np():As(Zt);for(var a=$s.length;a--;)delete vr[oi][$s[a]];return vr()};Cp[qu]=!0;var Hi=Object.create||function(e,t){var r;return e!==null?(wa[oi]=$p(e),r=new wa,wa[oi]=null,r[qu]=e):r=vr(),t===void 0?r:wp.f(r,t)},Ip=D,Mp=_,_p=Mp.RegExp,Vp=Ip(function(){var a=_p(".","s");return!(a.dotAll&&a.test(` `)&&a.flags==="s")}),Dp=D,Lp=_,kp=Lp.RegExp,Bp=Dp(function(){var a=kp("(?b)","g");return a.exec("b").groups.a!=="b"||"b".replace(a,"$c")!=="bc"}),et=Y,_r=L,jp=pe,Fp=Yu,Up=Xu,Gp=Ci,zp=Hi,Hp=wr.get,Yp=Vp,Xp=Bp,Wp=Gp("native-string-replace",String.prototype.replace),mr=RegExp.prototype.exec,li=mr,qp=_r("".charAt),Qp=_r("".indexOf),Kp=_r("".replace),Ps=_r("".slice),hi=function(){var a=/a/,e=/b*/g;return et(mr,a,"a"),et(mr,e,"a"),a.lastIndex!==0||e.lastIndex!==0}(),Ku=Up.BROKEN_CARET,vi=/()??/.exec("")[1]!==void 0,Zp=hi||vi||Ku||Yp||Xp,Rs=function(a,e){for(var t=a.groups=zp(null),r=0;r0&&qp(i,t.lastIndex-1);t.lastIndex>0&&(!t.multiline||t.multiline&&d!==` `&&d!=="\r"&&d!=="\u2028"&&d!=="\u2029")&&(c="(?: (?:"+c+"))",g=" "+g,v++),s=new RegExp("^(?:"+c+")",f)}vi&&(s=new RegExp("^"+c+"$(?!\\s)",f)),hi&&(u=t.lastIndex);var p=et(mr,h?s:t,g);return h?p?(p.input=i,p[0]=Ps(p[0],v),p.index=t.lastIndex,t.lastIndex+=p[0].length):t.lastIndex=0:hi&&p&&(t.lastIndex=t.global?p.index+p[0].length:u),vi&&p&&p.length>1&&et(Wp,p[0],s,function(){for(var y=1;y=n?a?"":void 0:(o=Vs(r,i),o<55296||o>56319||i+1===n||(s=Vs(r,i+1))<56320||s>57343?a?sy(r,i):o:a?oy(r,i,i+2):(o-55296<<10)+(s-56320)+65536)}},ly={charAt:uy(!0)},hy=ly.charAt,qi=function(a,e,t){return e+(t&&hy(a,e).length||1)},vy=_,fy=D,Ds=vy.RegExp,cy=!fy(function(){var a=!0;try{Ds(".","d")}catch{a=!1}var e={},t="",r=a?"dgimsy":"gimsy",i=function(u,l){Object.defineProperty(e,u,{get:function(){return t+=l,!0}})},n={dotAll:"s",global:"g",ignoreCase:"i",multiline:"m",sticky:"y"};a&&(n.hasIndices="d");for(var o in n)i(o,n[o]);var s=Object.getOwnPropertyDescriptor(Ds.prototype,"flags").get.call(e);return s!==r||t!==r}),gy={correct:cy},dy=Y,py=fe,yy=Tr,Ls=gy,my=Yu,by=RegExp.prototype,Vr=Ls.correct?function(a){return a.flags}:function(a){return!Ls.correct&&yy(by,a)&&!py(a,"flags")?dy(my,a):a.flags},ks=Y,xy=J,Ty=k,Oy=Ce,Sy=Yi,Ey=TypeError,Qi=function(a,e){var t=a.exec;if(Ty(t)){var r=ks(t,a,e);return r!==null&&xy(r),r}if(Oy(a)==="RegExp")return ks(Sy,a,e);throw new Ey("RegExp#exec called on incompatible receiver")},$y=Y,wy=L,Cy=Xi,Ay=J,Py=ae,Ry=ut,Jt=pe,Ny=ve,Iy=ot,My=qi,_y=Vr,Bs=Qi,Aa=wy("".indexOf);Cy("match",function(a,e,t){return[function(i){var n=Ny(this),o=Py(i)?Iy(i,a):void 0;if(o)return $y(o,i,n);var s=Jt(n);return new RegExp(i)[a](s)},function(r){var i=Ay(this),n=Jt(r),o=t(e,i,n);if(o.done)return o.value;var s=Jt(_y(i));if(!~Aa(s,"g"))return Bs(i,n);var u=!!~Aa(s,"u")||!!~Aa(s,"v");i.lastIndex=0;for(var l=[],h=0,f;(f=Bs(i,n))!==null;){var c=Jt(f[0]);l[h]=c,c===""&&(i.lastIndex=My(n,Ry(i.lastIndex),u)),h++}return h===0?null:l}]});var Ki=L,Vy=Sr,Dy=Math.floor,Pa=Ki("".charAt),Ly=Ki("".replace),Ra=Ki("".slice),ky=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,By=/\$([$&'`]|\d{1,2})/g,jy=function(a,e,t,r,i,n){var o=t+a.length,s=r.length,u=By;return i!==void 0&&(i=Vy(i),u=ky),Ly(n,u,function(l,h){var f;switch(Pa(h,0)){case"$":return"$";case"&":return a;case"`":return Ra(e,0,t);case"'":return Ra(e,o);case"<":f=i[Ra(h,1,-1)];break;default:var c=+h;if(c===0)return l;if(c>s){var v=Dy(c/10);return v===0?l:v<=s?r[v-1]===void 0?Pa(h,1):r[v-1]+Pa(h,1):l}f=r[c-1]}return f===void 0?"":f})},Fy=xu,js=Y,Dr=L,Uy=Xi,Gy=D,zy=J,Hy=k,Yy=ae,Xy=Cr,Wy=ut,_e=pe,qy=ve,Qy=qi,Ky=ot,Zy=jy,Jy=Vr,em=Qi,tm=z,fi=tm("replace"),rm=Math.max,am=Math.min,im=Dr([].concat),Na=Dr([].push),We=Dr("".indexOf),Fs=Dr("".slice),nm=function(a){return a===void 0?a:String(a)},sm=function(){return"a".replace(/./,"$0")==="$0"}(),Us=function(){return/./[fi]?/./[fi]("a","$0")==="":!1}(),om=!Gy(function(){var a=/./;return a.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(a,"$")!=="7"});Uy("replace",function(a,e,t){var r=Us?"$":"$0";return[function(n,o){var s=qy(this),u=Yy(n)?Ky(n,fi):void 0;return u?js(u,n,s,o):js(e,_e(s),n,o)},function(i,n){var o=zy(this),s=_e(i),u=Hy(n);u||(n=_e(n));var l=_e(Jy(o));if(typeof n=="string"&&!~We(n,r)&&!~We(n,"$<")&&!~We(l,"y")){var h=t(e,o,s,n);if(h.done)return h.value}var f=!!~We(l,"g"),c;f&&(c=!!~We(l,"u")||!!~We(l,"v"),o.lastIndex=0);for(var v=[],g;g=em(o,s),!(g===null||(Na(v,g),!f));){var d=_e(g[0]);d===""&&(o.lastIndex=Qy(s,Wy(o.lastIndex),c))}for(var p="",y=0,T=0;T=y&&(p+=Fs(s,y,x)+E,y=x+b.length)}return p+Fs(s,y)}]},!om||!sm||Us);var um=ae,lm=Ce,hm=z,vm=hm("match"),fm=function(a){var e;return um(a)&&((e=a[vm])!==void 0?!!e:lm(a)==="RegExp")},cm=fm,gm=TypeError,Zi=function(a){if(cm(a))throw new gm("The method doesn't accept regular expressions");return a},dm=z,pm=dm("match"),Ji=function(a){var e=/./;try{"/./"[a](e)}catch{try{return e[pm]=!1,"/./"[a](e)}catch{}}return!1},ym=ee,mm=Rr,bm=$t.f,xm=ut,Gs=pe,Tm=Zi,Om=ve,Sm=Ji,Em=mm("".slice),$m=Math.min,Ju=Sm("startsWith"),wm=!Ju&&!!function(){var a=bm(String.prototype,"startsWith");return a&&!a.writable}();ym({target:"String",proto:!0,forced:!wm&&!Ju},{startsWith:function(e){var t=Gs(Om(this));Tm(e);var r=Gs(e),i=xm($m(arguments.length>1?arguments[1]:void 0,t.length));return Em(t,i,i+r.length)===r}});var Cm=z,Am=Hi,Pm=Te.f,ci=Cm("unscopables"),gi=Array.prototype;gi[ci]===void 0&&Pm(gi,ci,{configurable:!0,value:Am(null)});var Rm=function(a){gi[ci][a]=!0},Nm=D,Im=!Nm(function(){function a(){}return a.prototype.constructor=null,Object.getPrototypeOf(new a)!==a.prototype}),Mm=fe,_m=k,Vm=Sr,Dm=Pi,Lm=Im,zs=Dm("IE_PROTO"),di=Object,km=di.prototype,el=Lm?di.getPrototypeOf:function(a){var e=Vm(a);if(Mm(e,zs))return e[zs];var t=e.constructor;return _m(t)&&e instanceof t?t.prototype:e instanceof di?km:null},Bm=D,jm=k,Fm=ae,Hs=el,Um=Ue,Gm=z,pi=Gm("iterator"),tl=!1,Be,Ia,Ma;[].keys&&(Ma=[].keys(),"next"in Ma?(Ia=Hs(Hs(Ma)),Ia!==Object.prototype&&(Be=Ia)):tl=!0);var zm=!Fm(Be)||Bm(function(){var a={};return Be[pi].call(a)!==a});zm&&(Be={});jm(Be[pi])||Um(Be,pi,function(){return this});var rl={IteratorPrototype:Be,BUGGY_SAFARI_ITERATORS:tl},Hm=rl.IteratorPrototype,Ym=Hi,Xm=Si,Wm=Pr,qm=Mr,Qm=function(){return this},Km=function(a,e,t,r){var i=e+" Iterator";return a.prototype=Ym(Hm,{next:Xm(+!r,t)}),Wm(a,i,!1),qm[i]=Qm,a},Zm=ee,Jm=Y,al=$r,e0=k,t0=Km,Ys=el,Xs=vu,r0=Pr,a0=At,_a=Ue,i0=z,n0=Mr,il=rl,s0=al.PROPER,o0=al.CONFIGURABLE,Ws=il.IteratorPrototype,er=il.BUGGY_SAFARI_ITERATORS,gt=i0("iterator"),qs="keys",dt="values",Qs="entries",u0=function(){return this},l0=function(a,e,t,r,i,n,o){t0(t,e,r);var s=function(y){if(y===i&&c)return c;if(!er&&y&&y in h)return h[y];switch(y){case qs:return function(){return new t(this,y)};case dt:return function(){return new t(this,y)};case Qs:return function(){return new t(this,y)}}return function(){return new t(this)}},u=e+" Iterator",l=!1,h=a.prototype,f=h[gt]||h["@@iterator"]||i&&h[i],c=!er&&f||s(i),v=e==="Array"&&h.entries||f,g,d,p;if(v&&(g=Ys(v.call(new a)),g!==Object.prototype&&g.next&&(Ys(g)!==Ws&&(Xs?Xs(g,Ws):e0(g[gt])||_a(g,gt,u0)),r0(g,u,!0))),s0&&i===dt&&f&&f.name!==dt&&(o0?a0(h,"name",dt):(l=!0,c=function(){return Jm(f,this)})),i)if(d={values:s(dt),keys:n?c:s(qs),entries:s(Qs)},o)for(p in d)(er||l||!(p in h))&&_a(h,p,d[p]);else Zm({target:e,proto:!0,forced:er||l},d);return h[gt]!==c&&_a(h,gt,c,{name:i}),n0[e]=c,d},h0=function(a,e){return{value:a,done:e}},v0=wt,en=Rm,Ks=Mr,nl=wr,f0=Te.f,c0=l0,tr=h0,g0=he,sl="Array Iterator",d0=nl.set,p0=nl.getterFor(sl),y0=c0(Array,"Array",function(a,e){d0(this,{type:sl,target:v0(a),index:0,kind:e})},function(){var a=p0(this),e=a.target,t=a.index++;if(!e||t>=e.length)return a.target=null,tr(void 0,!0);switch(a.kind){case"keys":return tr(t,!1);case"values":return tr(e[t],!1)}return tr([t,e[t]],!1)},"values"),Zs=Ks.Arguments=Ks.Array;en("keys");en("values");en("entries");if(g0&&Zs.name!=="values")try{f0(Zs,"name",{value:"values"})}catch{}var m0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},b0=Er,Va=b0("span").classList,Js=Va&&Va.constructor&&Va.constructor.prototype,x0=Js===Object.prototype?void 0:Js,eo=_,ol=m0,T0=x0,yt=y0,to=At,O0=Pr,S0=z,Da=S0("iterator"),La=yt.values,ul=function(a,e){if(a){if(a[Da]!==La)try{to(a,Da,La)}catch{a[Da]=La}if(O0(a,e,!0),ol[e]){for(var t in yt)if(a[t]!==yt[t])try{to(a,t,yt[t])}catch{a[t]=yt[t]}}}};for(var ka in ol)ul(eo[ka]&&eo[ka].prototype,ka);ul(T0,"DOMTokenList");function E0(a,e){if(Xa(a)!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(Xa(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function $0(a){var e=E0(a,"string");return Xa(e)=="symbol"?e:e+""}function tn(a,e,t){return(e=$0(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}var w0=Ae,C0=Sr,A0=Go,P0=Ii,ro=TypeError,ao="Reduce of empty array with no initial value",R0=function(a){return function(e,t,r,i){var n=C0(e),o=A0(n),s=P0(n);if(w0(t),s===0&&r<2)throw new ro(ao);var u=a?s-1:0,l=a?-1:1;if(r<2)for(;;){if(u in o){i=o[u],u+=l;break}if(u+=l,a?u<0:s<=u)throw new ro(ao)}for(;a?u>=0:s>u;u+=l)u in o&&(i=t(i,o[u],u,n));return i}},N0={left:R0(!1)},I0=D,ll=function(a,e){var t=[][a];return!!t&&I0(function(){t.call(null,e||function(){return 1},1)})},M0=ee,_0=N0.left,V0=ll,io=Ei,D0=Ar,L0=!D0&&io>79&&io<83,k0=L0||!V0("reduce");M0({target:"Array",proto:!0,forced:k0},{reduce:function(e){var t=arguments.length;return _0(this,e,t,t>1?arguments[1]:void 0)}});var B0=ee,j0=Rr,F0=$t.f,U0=ut,no=pe,G0=Zi,z0=ve,H0=Ji,Y0=j0("".slice),X0=Math.min,hl=H0("endsWith"),W0=!hl&&!!function(){var a=F0(String.prototype,"endsWith");return a&&!a.writable}();B0({target:"String",proto:!0,forced:!W0&&!hl},{endsWith:function(e){var t=no(z0(this));G0(e);var r=no(e),i=arguments.length>1?arguments[1]:void 0,n=t.length,o=i===void 0?n:X0(U0(i),n);return Y0(t,o-r.length,o)===r}});var Ba=Y,rn=L,q0=Xi,Q0=J,K0=ae,Z0=ve,J0=mu,eb=qi,tb=ut,ja=pe,rb=ot,ab=Vr,so=Qi,ib=Xu,nb=D,qe=ib.UNSUPPORTED_Y,sb=4294967295,ob=Math.min,Fa=rn([].push),Ua=rn("".slice),rr=rn("".indexOf),ub=!nb(function(){var a=/(?:)/,e=a.exec;a.exec=function(){return e.apply(this,arguments)};var t="ab".split(a);return t.length!==2||t[0]!=="a"||t[1]!=="b"}),oo="abbc".split(/(b)*/)[1]==="c"||"test".split(/(?:)/,-1).length!==4||"ab".split(/(?:ab)*/).length!==2||".".split(/(.?)(.?)/).length!==4||".".split(/()()/).length>1||"".split(/.?/).length;q0("split",function(a,e,t){var r="0".split(void 0,0).length?function(i,n){return i===void 0&&n===0?[]:Ba(e,this,i,n)}:e;return[function(n,o){var s=Z0(this),u=K0(n)?rb(n,a):void 0;return u?Ba(u,n,s,o):Ba(r,ja(s),n,o)},function(i,n){var o=Q0(this),s=ja(i);if(!oo){var u=t(r,o,s,n,r!==e);if(u.done)return u.value}var l=J0(o,RegExp),h=ja(ab(o)),f=!!~rr(h,"u")||!!~rr(h,"v");qe?~rr(h,"g")||(h+="g"):~rr(h,"y")||(h+="y");var c=new l(qe?"^(?:"+o.source+")":o,h),v=n===void 0?sb:n>>>0;if(v===0)return[];if(s.length===0)return so(c,s)===null?[s]:[];for(var g=0,d=0,p=[];d"u"?Ke:window,ar=["moz","webkit"],rt="AnimationFrame",st=be["request"+rt],Et=be["cancel"+rt]||be["cancelRequest"+rt];for(var pt=0;!st&&pt3&&(this.alpha=s[3]),this.ok=!0}}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.alpha=this.alpha<0?0:this.alpha>1||isNaN(this.alpha)?1:this.alpha,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toRGBA=function(){return"rgba("+this.r+", "+this.g+", "+this.b+", "+this.alpha+")"},this.toHex=function(){var u=this.r.toString(16),l=this.g.toString(16),h=this.b.toString(16);return u.length==1&&(u="0"+u),l.length==1&&(l="0"+l),h.length==1&&(h="0"+h),"#"+u+l+h},this.getHelpXML=function(){for(var u=new Array,l=0;l "+d.toRGB()+" -> "+d.toHex());g.appendChild(p),g.appendChild(y),v.appendChild(g)}catch{}return v}};const mi=Do(wb);var Cb=ee,Ab=Rr,Pb=su.indexOf,Rb=ll,bi=Ab([].indexOf),fl=!!bi&&1/bi([1],1,-0)<0,Nb=fl||!Rb("indexOf");Cb({target:"Array",proto:!0,forced:Nb},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return fl?bi(this,e,t)||0:Pb(this,e,t)}});var Ib=ee,Mb=L,_b=Zi,Vb=ve,fo=pe,Db=Ji,Lb=Mb("".indexOf);Ib({target:"String",proto:!0,forced:!Db("includes")},{includes:function(e){return!!~Lb(fo(Vb(this)),fo(_b(e)),arguments.length>1?arguments[1]:void 0)}});var kb=Ce,Bb=Array.isArray||function(e){return kb(e)==="Array"},jb=ee,Fb=L,Ub=Bb,Gb=Fb([].reverse),co=[1,2];jb({target:"Array",proto:!0,forced:String(co)===String(co.reverse())},{reverse:function(){return Ub(this)&&(this.length=this.length),Gb(this)}});/*! ***************************************************************************** diff --git a/veadk/webui/assets/chunks/jspdf.es.min-CdGYO913.js b/veadk/webui/assets/chunks/jspdf.es.min-USQmc3i1.js similarity index 99% rename from veadk/webui/assets/chunks/jspdf.es.min-CdGYO913.js rename to veadk/webui/assets/chunks/jspdf.es.min-USQmc3i1.js index e4cbdd2d4..a5e0a4eb5 100644 --- a/veadk/webui/assets/chunks/jspdf.es.min-CdGYO913.js +++ b/veadk/webui/assets/chunks/jspdf.es.min-USQmc3i1.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/chunks/index.es-CvwIedKw.js","assets/app/index-B71Wq9_t.js","assets/styles/index-_lutWX9f.css"])))=>i.map(i=>d[i]); -var kh=Object.defineProperty;var Ph=(r,e,t)=>e in r?kh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var _e=(r,e,t)=>Ph(r,typeof e!="symbol"?e+"":e,t);import{_ as go}from"../app/index-B71Wq9_t.js";function Ae(r){"@babel/helpers - typeof";return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(r)}var Qr=Uint8Array,Or=Uint16Array,Jo=Int32Array,Ko=new Qr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xo=new Qr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ml=new Qr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zu=function(r,e){for(var t=new Or(31),i=0;i<31;++i)t[i]=e+=1<>1|(Fe&21845)<<1;Qn=(Qn&52428)>>2|(Qn&13107)<<2,Qn=(Qn&61680)>>4|(Qn&3855)<<4,To[Fe]=((Qn&65280)>>8|(Qn&255)<<8)>>1}var Ia=function(r,e,t){for(var i=r.length,s=0,a=new Or(e);s>h]=d}else for(l=new Or(i),s=0;s>15-r[s]);return l},Ii=new Qr(288);for(var Fe=0;Fe<144;++Fe)Ii[Fe]=8;for(var Fe=144;Fe<256;++Fe)Ii[Fe]=9;for(var Fe=256;Fe<280;++Fe)Ii[Fe]=7;for(var Fe=280;Fe<288;++Fe)Ii[Fe]=8;var Fs=new Qr(32);for(var Fe=0;Fe<32;++Fe)Fs[Fe]=5;var Fh=Ia(Ii,9,0),Eh=Ia(Fs,5,0),tf=function(r){return(r+7)/8|0},Oh=function(r,e,t){return(t==null||t>r.length)&&(t=r.length),new Qr(r.subarray(e,t))},Bn=function(r,e,t){t<<=e&7;var i=e/8|0;r[i]|=t,r[i+1]|=t>>8},ka=function(r,e,t){t<<=e&7;var i=e/8|0;r[i]|=t,r[i+1]|=t>>8,r[i+2]|=t>>16},mo=function(r,e){for(var t=[],i=0;ik&&(k=a[i].s);var p=new Or(k+1),j=Do(t[m-1],p,0);if(j>e){var i=0,O=0,M=j-e,S=1<e)O+=S-(1<>=M;O>0;){var G=a[i].s;p[G]=0&&O;--i){var D=a[i].s;p[D]==e&&(--p[D],++O)}j=e}return{t:new Qr(p),l:j}},Do=function(r,e,t){return r.s==-1?Math.max(Do(r.l,e,t+1),Do(r.r,e,t+1)):e[r.s]=t},Tl=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new Or(++e),i=0,s=r[0],a=1,c=function(h){t[i++]=h},l=1;l<=e;++l)if(r[l]==s&&l!=e)++a;else{if(!s&&a>2){for(;a>138;a-=138)c(32754);a>2&&(c(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(c(s),--a;a>6;a-=6)c(8304);a>2&&(c(a-3<<5|8208),a=0)}for(;a--;)c(s);a=1,s=r[l]}return{c:t.subarray(0,i),n:e}},Pa=function(r,e){for(var t=0,i=0;i>8,r[s+2]=r[s]^255,r[s+3]=r[s+1]^255;for(var a=0;a4&&!tt[Ml[F-1]];--F);var z=d+5<<3,U=Pa(s,Ii)+Pa(a,Fs)+c,nt=Pa(s,k)+Pa(a,O)+c+14+3*F+Pa(ct,tt)+2*ct[16]+3*ct[17]+7*ct[18];if(h>=0&&z<=U&&z<=nt)return ef(e,m,r.subarray(h,h+d));var ot,ut,rt,ht;if(Bn(e,m,1+(nt15&&(Bn(e,m,B[K]>>5&127),m+=B[K]>>12)}}else ot=Fh,ut=Ii,rt=Eh,ht=Fs;for(var K=0;K255){var T=H>>18&31;ka(e,m,ot[T+257]),m+=ut[T+257],T>7&&(Bn(e,m,H>>23&31),m+=Ko[T]);var J=H&31;ka(e,m,rt[J]),m+=ht[J],J>3&&(ka(e,m,H>>5&8191),m+=Xo[J])}else ka(e,m,ot[H]),m+=ut[H]}return ka(e,m,ot[256]),m+ut[256]},jh=new Jo([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rf=new Qr(0),Bh=function(r,e,t,i,s,a){var c=a.z||r.length,l=new Qr(i+c+5*(1+Math.ceil(c/7e3))+s),h=l.subarray(i,l.length-s),d=a.l,m=(a.r||0)&7;if(e){m&&(h[0]=a.r>>3);for(var _=jh[e-1],k=_>>13,p=_&8191,j=(1<7e3||tt>24576)&&(ot>423||!d)){m=Dl(r,h,0,D,it,mt,K,tt,F,R-F,m),tt=ct=K=0,F=R;for(var ut=0;ut<286;++ut)it[ut]=0;for(var ut=0;ut<30;++ut)mt[ut]=0}var rt=2,ht=0,At=p,wt=U-nt&32767;if(ot>2&&z==G(R-wt))for(var x=Math.min(k,ot)-1,B=Math.min(32767,R),T=Math.min(258,ot);wt<=B&&--At&&U!=nt;){if(r[R+rt]==r[R+rt-wt]){for(var H=0;Hrt){if(rt=H,ht=wt,H>x)break;for(var J=Math.min(wt,H-2),Z=0,ut=0;utZ&&(Z=gt,nt=at)}}}U=nt,nt=O[U],wt+=U-nt&32767}if(ht){D[tt++]=268435456|Ro[rt]<<18|Rl[ht];var _t=Ro[rt]&31,kt=Rl[ht]&31;K+=Ko[_t]+Xo[kt],++it[257+_t],++mt[kt],N=R+rt,++ct}else D[tt++]=r[R],++it[r[R]]}}for(R=Math.max(R,N);R=c&&(h[m/8|0]=d,St=c),m=ef(h,m+1,r.subarray(R,St))}a.i=c}return Oh(l,0,i+tf(m)+s)},nf=function(){var r=1,e=0;return{p:function(t){for(var i=r,s=e,a=t.length|0,c=0;c!=a;){for(var l=Math.min(c+2655,a);c>16),s=(s&65535)+15*(s>>16)}r=i,e=s},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},Mh=function(r,e,t,i,s){if(!s&&(s={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),c=new Qr(a.length+r.length);c.set(a),c.set(r,a.length),r=c,s.w=a.length}return Bh(r,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,t,i,s)},af=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},Rh=function(r,e){var t=e.level,i=t==0?0:t<6?1:t==9?3:2;if(r[0]=120,r[1]=i<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var s=nf();s.p(e.dictionary),af(r,2,s.d())}};function qo(r,e){e||(e={});var t=nf();t.p(r);var i=Mh(r,e,e.dictionary?6:2,4);return Rh(i,e),af(i,i.length-4,t.d()),i}var Th=typeof TextDecoder<"u"&&new TextDecoder,Dh=0;try{Th.decode(rf,{stream:!0}),Dh=1}catch{}function qh(r){if(Array.isArray(r))return r}function Uh(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,s,a,c,l=[],h=!0,d=!1;try{if(a=(t=t.call(r)).next,e!==0)for(;!(h=(i=a.call(t)).done)&&(l.push(i.value),l.length!==e);h=!0);}catch(m){d=!0,s=m}finally{try{if(!h&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(d)throw s}}return l}}function ql(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=Array(e);ti.map(i=>d[i]); +var kh=Object.defineProperty;var Ph=(r,e,t)=>e in r?kh(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var _e=(r,e,t)=>Ph(r,typeof e!="symbol"?e+"":e,t);import{_ as go}from"../app/index-BKQXvMzA.js";function Ae(r){"@babel/helpers - typeof";return Ae=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ae(r)}var Qr=Uint8Array,Or=Uint16Array,Jo=Int32Array,Ko=new Qr([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Xo=new Qr([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),Ml=new Qr([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Zu=function(r,e){for(var t=new Or(31),i=0;i<31;++i)t[i]=e+=1<>1|(Fe&21845)<<1;Qn=(Qn&52428)>>2|(Qn&13107)<<2,Qn=(Qn&61680)>>4|(Qn&3855)<<4,To[Fe]=((Qn&65280)>>8|(Qn&255)<<8)>>1}var Ia=function(r,e,t){for(var i=r.length,s=0,a=new Or(e);s>h]=d}else for(l=new Or(i),s=0;s>15-r[s]);return l},Ii=new Qr(288);for(var Fe=0;Fe<144;++Fe)Ii[Fe]=8;for(var Fe=144;Fe<256;++Fe)Ii[Fe]=9;for(var Fe=256;Fe<280;++Fe)Ii[Fe]=7;for(var Fe=280;Fe<288;++Fe)Ii[Fe]=8;var Fs=new Qr(32);for(var Fe=0;Fe<32;++Fe)Fs[Fe]=5;var Fh=Ia(Ii,9,0),Eh=Ia(Fs,5,0),tf=function(r){return(r+7)/8|0},Oh=function(r,e,t){return(t==null||t>r.length)&&(t=r.length),new Qr(r.subarray(e,t))},Bn=function(r,e,t){t<<=e&7;var i=e/8|0;r[i]|=t,r[i+1]|=t>>8},ka=function(r,e,t){t<<=e&7;var i=e/8|0;r[i]|=t,r[i+1]|=t>>8,r[i+2]|=t>>16},mo=function(r,e){for(var t=[],i=0;ik&&(k=a[i].s);var p=new Or(k+1),j=Do(t[m-1],p,0);if(j>e){var i=0,O=0,M=j-e,S=1<e)O+=S-(1<>=M;O>0;){var G=a[i].s;p[G]=0&&O;--i){var D=a[i].s;p[D]==e&&(--p[D],++O)}j=e}return{t:new Qr(p),l:j}},Do=function(r,e,t){return r.s==-1?Math.max(Do(r.l,e,t+1),Do(r.r,e,t+1)):e[r.s]=t},Tl=function(r){for(var e=r.length;e&&!r[--e];);for(var t=new Or(++e),i=0,s=r[0],a=1,c=function(h){t[i++]=h},l=1;l<=e;++l)if(r[l]==s&&l!=e)++a;else{if(!s&&a>2){for(;a>138;a-=138)c(32754);a>2&&(c(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(c(s),--a;a>6;a-=6)c(8304);a>2&&(c(a-3<<5|8208),a=0)}for(;a--;)c(s);a=1,s=r[l]}return{c:t.subarray(0,i),n:e}},Pa=function(r,e){for(var t=0,i=0;i>8,r[s+2]=r[s]^255,r[s+3]=r[s+1]^255;for(var a=0;a4&&!tt[Ml[F-1]];--F);var z=d+5<<3,U=Pa(s,Ii)+Pa(a,Fs)+c,nt=Pa(s,k)+Pa(a,O)+c+14+3*F+Pa(ct,tt)+2*ct[16]+3*ct[17]+7*ct[18];if(h>=0&&z<=U&&z<=nt)return ef(e,m,r.subarray(h,h+d));var ot,ut,rt,ht;if(Bn(e,m,1+(nt15&&(Bn(e,m,B[K]>>5&127),m+=B[K]>>12)}}else ot=Fh,ut=Ii,rt=Eh,ht=Fs;for(var K=0;K255){var T=H>>18&31;ka(e,m,ot[T+257]),m+=ut[T+257],T>7&&(Bn(e,m,H>>23&31),m+=Ko[T]);var J=H&31;ka(e,m,rt[J]),m+=ht[J],J>3&&(ka(e,m,H>>5&8191),m+=Xo[J])}else ka(e,m,ot[H]),m+=ut[H]}return ka(e,m,ot[256]),m+ut[256]},jh=new Jo([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),rf=new Qr(0),Bh=function(r,e,t,i,s,a){var c=a.z||r.length,l=new Qr(i+c+5*(1+Math.ceil(c/7e3))+s),h=l.subarray(i,l.length-s),d=a.l,m=(a.r||0)&7;if(e){m&&(h[0]=a.r>>3);for(var _=jh[e-1],k=_>>13,p=_&8191,j=(1<7e3||tt>24576)&&(ot>423||!d)){m=Dl(r,h,0,D,it,mt,K,tt,F,R-F,m),tt=ct=K=0,F=R;for(var ut=0;ut<286;++ut)it[ut]=0;for(var ut=0;ut<30;++ut)mt[ut]=0}var rt=2,ht=0,At=p,wt=U-nt&32767;if(ot>2&&z==G(R-wt))for(var x=Math.min(k,ot)-1,B=Math.min(32767,R),T=Math.min(258,ot);wt<=B&&--At&&U!=nt;){if(r[R+rt]==r[R+rt-wt]){for(var H=0;Hrt){if(rt=H,ht=wt,H>x)break;for(var J=Math.min(wt,H-2),Z=0,ut=0;utZ&&(Z=gt,nt=at)}}}U=nt,nt=O[U],wt+=U-nt&32767}if(ht){D[tt++]=268435456|Ro[rt]<<18|Rl[ht];var _t=Ro[rt]&31,kt=Rl[ht]&31;K+=Ko[_t]+Xo[kt],++it[257+_t],++mt[kt],N=R+rt,++ct}else D[tt++]=r[R],++it[r[R]]}}for(R=Math.max(R,N);R=c&&(h[m/8|0]=d,St=c),m=ef(h,m+1,r.subarray(R,St))}a.i=c}return Oh(l,0,i+tf(m)+s)},nf=function(){var r=1,e=0;return{p:function(t){for(var i=r,s=e,a=t.length|0,c=0;c!=a;){for(var l=Math.min(c+2655,a);c>16),s=(s&65535)+15*(s>>16)}r=i,e=s},d:function(){return r%=65521,e%=65521,(r&255)<<24|(r&65280)<<8|(e&255)<<8|e>>8}}},Mh=function(r,e,t,i,s){if(!s&&(s={l:1},e.dictionary)){var a=e.dictionary.subarray(-32768),c=new Qr(a.length+r.length);c.set(a),c.set(r,a.length),r=c,s.w=a.length}return Bh(r,e.level==null?6:e.level,e.mem==null?s.l?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):20:12+e.mem,t,i,s)},af=function(r,e,t){for(;t;++e)r[e]=t,t>>>=8},Rh=function(r,e){var t=e.level,i=t==0?0:t<6?1:t==9?3:2;if(r[0]=120,r[1]=i<<6|(e.dictionary&&32),r[1]|=31-(r[0]<<8|r[1])%31,e.dictionary){var s=nf();s.p(e.dictionary),af(r,2,s.d())}};function qo(r,e){e||(e={});var t=nf();t.p(r);var i=Mh(r,e,e.dictionary?6:2,4);return Rh(i,e),af(i,i.length-4,t.d()),i}var Th=typeof TextDecoder<"u"&&new TextDecoder,Dh=0;try{Th.decode(rf,{stream:!0}),Dh=1}catch{}function qh(r){if(Array.isArray(r))return r}function Uh(r,e){var t=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(t!=null){var i,s,a,c,l=[],h=!0,d=!1;try{if(a=(t=t.call(r)).next,e!==0)for(;!(h=(i=a.call(t)).done)&&(l.push(i.value),l.length!==e);h=!0);}catch(m){d=!0,s=m}finally{try{if(!h&&t.return!=null&&(c=t.return(),Object(c)!==c))return}finally{if(d)throw s}}return l}}function ql(r,e){(e==null||e>r.length)&&(e=r.length);for(var t=0,i=Array(e);t{const r=new Uint8Array(4),e=new Uint32Array(r.buffer);return!((e[0]=1)&r[0])})(),vo={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class $o{constructor(e=Gh,t={}){_e(this,"buffer");_e(this,"byteLength");_e(this,"byteOffset");_e(this,"length");_e(this,"offset");_e(this,"lastWrittenByte");_e(this,"littleEndian");_e(this,"_data");_e(this,"_mark");_e(this,"_marks");let i=!1;typeof e=="number"?e=new ArrayBuffer(e):(i=!0,this.lastWrittenByte=e.byteLength);const s=t.offset?t.offset>>>0:0,a=e.byteLength-s;let c=s;(ArrayBuffer.isView(e)||e instanceof $o)&&(e.byteLength!==e.buffer.byteLength&&(c=e.byteOffset+s),e=e.buffer),i?this.lastWrittenByte=a:this.lastWrittenByte=0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=c,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,c,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const i=(this.offset+e)*2,s=new Uint8Array(i);s.set(new Uint8Array(this.buffer)),this.buffer=s.buffer,this.length=i,this.byteLength=i,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,t){const i=vo[t].BYTES_PER_ELEMENT*e,s=this.byteOffset+this.offset,a=this.buffer.slice(s,s+i);if(this.littleEndian===Yh&&t!=="uint8"&&t!=="int8"){const l=new Uint8Array(this.buffer.slice(s,s+i));l.reverse();const h=new vo[t](l.buffer);return this.offset+=i,h.reverse(),h}const c=new vo[t](a);return this.offset+=i,c}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t="";for(let i=0;ithis.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Zi(r){let e=r.length;for(;--e>=0;)r[e]=0}const Jh=3,Kh=258,sf=29,Xh=256,$h=Xh+1+sf,of=30,Zh=512,Qh=new Array(($h+2)*2);Zi(Qh);const tc=new Array(of*2);Zi(tc);const ec=new Array(Zh);Zi(ec);const rc=new Array(Kh-Jh+1);Zi(rc);const nc=new Array(sf);Zi(nc);const ic=new Array(of);Zi(ic);const ac=(r,e,t,i)=>{let s=r&65535|0,a=r>>>16&65535|0,c=0;for(;t!==0;){c=t>2e3?2e3:t,t-=c;do s=s+e[i++]|0,a=a+s|0;while(--c);s%=65521,a%=65521}return s|a<<16|0};var Uo=ac;const sc=()=>{let r,e=[];for(var t=0;t<256;t++){r=t;for(var i=0;i<8;i++)r=r&1?3988292384^r>>>1:r>>>1;e[t]=r}return e},oc=new Uint32Array(sc()),lc=(r,e,t,i)=>{const s=oc,a=i+t;r^=-1;for(let c=i;c>>8^s[(r^e[c])&255];return r^-1};var cn=lc,zo={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},lf={Z_NO_FLUSH:0,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_DEFLATED:8};const uc=(r,e)=>Object.prototype.hasOwnProperty.call(r,e);var fc=function(r){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const t=e.shift();if(t){if(typeof t!="object")throw new TypeError(t+"must be non-object");for(const i in t)uc(t,i)&&(r[i]=t[i])}}return r},hc=r=>{let e=0;for(let i=0,s=r.length;i=252?6:r>=248?5:r>=240?4:r>=224?3:r>=192?2:1;Ba[254]=Ba[255]=1;var cc=r=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(r);let e,t,i,s,a,c=r.length,l=0;for(s=0;s>>6,e[a++]=128|t&63):t<65536?(e[a++]=224|t>>>12,e[a++]=128|t>>>6&63,e[a++]=128|t&63):(e[a++]=240|t>>>18,e[a++]=128|t>>>12&63,e[a++]=128|t>>>6&63,e[a++]=128|t&63);return e};const dc=(r,e)=>{if(e<65534&&r.subarray&&ff)return String.fromCharCode.apply(null,r.length===e?r:r.subarray(0,e));let t="";for(let i=0;i{const t=e||r.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(r.subarray(0,e));let i,s;const a=new Array(t*2);for(s=0,i=0;i4){a[s++]=65533,i+=l-1;continue}for(c&=l===2?31:l===3?15:7;l>1&&i1){a[s++]=65533;continue}c<65536?a[s++]=c:(c-=65536,a[s++]=55296|c>>10&1023,a[s++]=56320|c&1023)}return dc(a,s)},gc=(r,e)=>{e=e||r.length,e>r.length&&(e=r.length);let t=e-1;for(;t>=0&&(r[t]&192)===128;)t--;return t<0||t===0?e:t+Ba[r[t]]>e?t:e},Ho={string2buf:cc,buf2string:pc,utf8border:gc};function mc(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var vc=mc;const ys=16209,bc=16191;var wc=function(e,t){let i,s,a,c,l,h,d,m,_,k,p,j,O,M,S,V,G,D,it,mt,ct,K,R,tt;const N=e.state;i=e.next_in,R=e.input,s=i+(e.avail_in-5),a=e.next_out,tt=e.output,c=a-(t-e.avail_out),l=a+(e.avail_out-257),h=N.dmax,d=N.wsize,m=N.whave,_=N.wnext,k=N.window,p=N.hold,j=N.bits,O=N.lencode,M=N.distcode,S=(1<>>24,p>>>=D,j-=D,D=G>>>16&255,D===0)tt[a++]=G&65535;else if(D&16){it=G&65535,D&=15,D&&(j>>=D,j-=D),j<15&&(p+=R[i++]<>>24,p>>>=D,j-=D,D=G>>>16&255,D&16){if(mt=G&65535,D&=15,jh){e.msg="invalid distance too far back",N.mode=ys;break t}if(p>>>=D,j-=D,D=a-c,mt>D){if(D=mt-D,D>m&&N.sane){e.msg="invalid distance too far back",N.mode=ys;break t}if(ct=0,K=k,_===0){if(ct+=d-D,D2;)tt[a++]=K[ct++],tt[a++]=K[ct++],tt[a++]=K[ct++],it-=3;it&&(tt[a++]=K[ct++],it>1&&(tt[a++]=K[ct++]))}else{ct=a-mt;do tt[a++]=tt[ct++],tt[a++]=tt[ct++],tt[a++]=tt[ct++],it-=3;while(it>2);it&&(tt[a++]=tt[ct++],it>1&&(tt[a++]=tt[ct++]))}}else if(D&64){e.msg="invalid distance code",N.mode=ys;break t}else{G=M[(G&65535)+(p&(1<>3,i-=it,j-=it<<3,p&=(1<{const h=l.bits;let d=0,m=0,_=0,k=0,p=0,j=0,O=0,M=0,S=0,V=0,G,D,it,mt,ct,K=null,R;const tt=new Uint16Array(Gi+1),N=new Uint16Array(Gi+1);let F=null,z,U,nt;for(d=0;d<=Gi;d++)tt[d]=0;for(m=0;m=1&&tt[k]===0;k--);if(p>k&&(p=k),k===0)return s[a++]=1<<24|64<<16|0,s[a++]=1<<24|64<<16|0,l.bits=1,0;for(_=1;_0&&(r===Vl||k!==1))return-1;for(N[1]=0,d=1;dHl||r===Gl&&S>Wl)return 1;for(;;){z=d-O,c[m]+1=R?(U=F[c[m]-R],nt=K[c[m]-R]):(U=96,nt=0),G=1<>O)+D]=z<<24|U<<16|nt|0;while(D!==0);for(G=1<>=1;if(G!==0?(V&=G-1,V+=G):V=0,m++,--tt[d]===0){if(d===k)break;d=e[t+c[m]]}if(d>p&&(V&mt)!==it){for(O===0&&(O=p),ct+=_,j=d-O,M=1<Hl||r===Gl&&S>Wl)return 1;it=V&mt,s[it]=p<<24|j<<16|ct-a|0}}return V!==0&&(s[ct+V]=d-O<<24|64<<16|0),l.bits=p,0};var Ca=Nc;const Lc=0,hf=1,cf=2,{Z_FINISH:Yl,Z_BLOCK:Sc,Z_TREES:xs,Z_OK:Ci,Z_STREAM_END:kc,Z_NEED_DICT:Pc,Z_STREAM_ERROR:Hr,Z_DATA_ERROR:df,Z_MEM_ERROR:pf,Z_BUF_ERROR:Ic,Z_DEFLATED:Jl}=lf,js=16180,Kl=16181,Xl=16182,$l=16183,Zl=16184,Ql=16185,tu=16186,eu=16187,ru=16188,nu=16189,Es=16190,Mn=16191,wo=16192,iu=16193,yo=16194,au=16195,su=16196,ou=16197,lu=16198,_s=16199,As=16200,uu=16201,fu=16202,hu=16203,cu=16204,du=16205,xo=16206,pu=16207,gu=16208,je=16209,gf=16210,mf=16211,Cc=852,Fc=592,Ec=15,Oc=Ec,mu=r=>(r>>>24&255)+(r>>>8&65280)+((r&65280)<<8)+((r&255)<<24);function jc(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Fi=r=>{if(!r)return 1;const e=r.state;return!e||e.strm!==r||e.modemf?1:0},vf=r=>{if(Fi(r))return Hr;const e=r.state;return r.total_in=r.total_out=e.total=0,r.msg="",e.wrap&&(r.adler=e.wrap&1),e.mode=js,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(Cc),e.distcode=e.distdyn=new Int32Array(Fc),e.sane=1,e.back=-1,Ci},bf=r=>{if(Fi(r))return Hr;const e=r.state;return e.wsize=0,e.whave=0,e.wnext=0,vf(r)},wf=(r,e)=>{let t;if(Fi(r))return Hr;const i=r.state;return e<0?(t=0,e=-e):(t=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?Hr:(i.window!==null&&i.wbits!==e&&(i.window=null),i.wrap=t,i.wbits=e,bf(r))},yf=(r,e)=>{if(!r)return Hr;const t=new jc;r.state=t,t.strm=r,t.window=null,t.mode=js;const i=wf(r,e);return i!==Ci&&(r.state=null),i},Bc=r=>yf(r,Oc);let vu=!0,_o,Ao;const Mc=r=>{if(vu){_o=new Int32Array(512),Ao=new Int32Array(32);let e=0;for(;e<144;)r.lens[e++]=8;for(;e<256;)r.lens[e++]=9;for(;e<280;)r.lens[e++]=7;for(;e<288;)r.lens[e++]=8;for(Ca(hf,r.lens,0,288,_o,0,r.work,{bits:9}),e=0;e<32;)r.lens[e++]=5;Ca(cf,r.lens,0,32,Ao,0,r.work,{bits:5}),vu=!1}r.lencode=_o,r.lenbits=9,r.distcode=Ao,r.distbits=5},xf=(r,e,t,i)=>{let s;const a=r.state;return a.window===null&&(a.window=new Uint8Array(1<=a.wsize?(a.window.set(e.subarray(t-a.wsize,t),0),a.wnext=0,a.whave=a.wsize):(s=a.wsize-a.wnext,s>i&&(s=i),a.window.set(e.subarray(t-i,t-i+s),a.wnext),i-=s,i?(a.window.set(e.subarray(t-i,t),0),a.wnext=i,a.whave=a.wsize):(a.wnext+=s,a.wnext===a.wsize&&(a.wnext=0),a.whave{let t,i,s,a,c,l,h,d,m,_,k,p,j,O,M=0,S,V,G,D,it,mt,ct,K;const R=new Uint8Array(4);let tt,N;const F=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Fi(r)||!r.output||!r.input&&r.avail_in!==0)return Hr;t=r.state,t.mode===Mn&&(t.mode=wo),c=r.next_out,s=r.output,h=r.avail_out,a=r.next_in,i=r.input,l=r.avail_in,d=t.hold,m=t.bits,_=l,k=h,K=Ci;t:for(;;)switch(t.mode){case js:if(t.wrap===0){t.mode=wo;break}for(;m<16;){if(l===0)break t;l--,d+=i[a++]<>>8&255,t.check=cn(t.check,R,2,0),d=0,m=0,t.mode=Kl;break}if(t.head&&(t.head.done=!1),!(t.wrap&1)||(((d&255)<<8)+(d>>8))%31){r.msg="incorrect header check",t.mode=je;break}if((d&15)!==Jl){r.msg="unknown compression method",t.mode=je;break}if(d>>>=4,m-=4,ct=(d&15)+8,t.wbits===0&&(t.wbits=ct),ct>15||ct>t.wbits){r.msg="invalid window size",t.mode=je;break}t.dmax=1<>8&1),t.flags&512&&t.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,t.check=cn(t.check,R,2,0)),d=0,m=0,t.mode=Xl;case Xl:for(;m<32;){if(l===0)break t;l--,d+=i[a++]<>>8&255,R[2]=d>>>16&255,R[3]=d>>>24&255,t.check=cn(t.check,R,4,0)),d=0,m=0,t.mode=$l;case $l:for(;m<16;){if(l===0)break t;l--,d+=i[a++]<>8),t.flags&512&&t.wrap&4&&(R[0]=d&255,R[1]=d>>>8&255,t.check=cn(t.check,R,2,0)),d=0,m=0,t.mode=Zl;case Zl:if(t.flags&1024){for(;m<16;){if(l===0)break t;l--,d+=i[a++]<>>8&255,t.check=cn(t.check,R,2,0)),d=0,m=0}else t.head&&(t.head.extra=null);t.mode=Ql;case Ql:if(t.flags&1024&&(p=t.length,p>l&&(p=l),p&&(t.head&&(ct=t.head.extra_len-t.length,t.head.extra||(t.head.extra=new Uint8Array(t.head.extra_len)),t.head.extra.set(i.subarray(a,a+p),ct)),t.flags&512&&t.wrap&4&&(t.check=cn(t.check,i,p,a)),l-=p,a+=p,t.length-=p),t.length))break t;t.length=0,t.mode=tu;case tu:if(t.flags&2048){if(l===0)break t;p=0;do ct=i[a+p++],t.head&&ct&&t.length<65536&&(t.head.name+=String.fromCharCode(ct));while(ct&&p>9&1,t.head.done=!0),r.adler=t.check=0,t.mode=Mn;break;case nu:for(;m<32;){if(l===0)break t;l--,d+=i[a++]<>>=m&7,m-=m&7,t.mode=xo;break}for(;m<3;){if(l===0)break t;l--,d+=i[a++]<>>=1,m-=1,d&3){case 0:t.mode=iu;break;case 1:if(Mc(t),t.mode=_s,e===xs){d>>>=2,m-=2;break t}break;case 2:t.mode=su;break;case 3:r.msg="invalid block type",t.mode=je}d>>>=2,m-=2;break;case iu:for(d>>>=m&7,m-=m&7;m<32;){if(l===0)break t;l--,d+=i[a++]<>>16^65535)){r.msg="invalid stored block lengths",t.mode=je;break}if(t.length=d&65535,d=0,m=0,t.mode=yo,e===xs)break t;case yo:t.mode=au;case au:if(p=t.length,p){if(p>l&&(p=l),p>h&&(p=h),p===0)break t;s.set(i.subarray(a,a+p),c),l-=p,a+=p,h-=p,c+=p,t.length-=p;break}t.mode=Mn;break;case su:for(;m<14;){if(l===0)break t;l--,d+=i[a++]<>>=5,m-=5,t.ndist=(d&31)+1,d>>>=5,m-=5,t.ncode=(d&15)+4,d>>>=4,m-=4,t.nlen>286||t.ndist>30){r.msg="too many length or distance symbols",t.mode=je;break}t.have=0,t.mode=ou;case ou:for(;t.have>>=3,m-=3}for(;t.have<19;)t.lens[F[t.have++]]=0;if(t.lencode=t.lendyn,t.lenbits=7,tt={bits:t.lenbits},K=Ca(Lc,t.lens,0,19,t.lencode,0,t.work,tt),t.lenbits=tt.bits,K){r.msg="invalid code lengths set",t.mode=je;break}t.have=0,t.mode=lu;case lu:for(;t.have>>24,V=M>>>16&255,G=M&65535,!(S<=m);){if(l===0)break t;l--,d+=i[a++]<>>=S,m-=S,t.lens[t.have++]=G;else{if(G===16){for(N=S+2;m>>=S,m-=S,t.have===0){r.msg="invalid bit length repeat",t.mode=je;break}ct=t.lens[t.have-1],p=3+(d&3),d>>>=2,m-=2}else if(G===17){for(N=S+3;m>>=S,m-=S,ct=0,p=3+(d&7),d>>>=3,m-=3}else{for(N=S+7;m>>=S,m-=S,ct=0,p=11+(d&127),d>>>=7,m-=7}if(t.have+p>t.nlen+t.ndist){r.msg="invalid bit length repeat",t.mode=je;break}for(;p--;)t.lens[t.have++]=ct}}if(t.mode===je)break;if(t.lens[256]===0){r.msg="invalid code -- missing end-of-block",t.mode=je;break}if(t.lenbits=9,tt={bits:t.lenbits},K=Ca(hf,t.lens,0,t.nlen,t.lencode,0,t.work,tt),t.lenbits=tt.bits,K){r.msg="invalid literal/lengths set",t.mode=je;break}if(t.distbits=6,t.distcode=t.distdyn,tt={bits:t.distbits},K=Ca(cf,t.lens,t.nlen,t.ndist,t.distcode,0,t.work,tt),t.distbits=tt.bits,K){r.msg="invalid distances set",t.mode=je;break}if(t.mode=_s,e===xs)break t;case _s:t.mode=As;case As:if(l>=6&&h>=258){r.next_out=c,r.avail_out=h,r.next_in=a,r.avail_in=l,t.hold=d,t.bits=m,wc(r,k),c=r.next_out,s=r.output,h=r.avail_out,a=r.next_in,i=r.input,l=r.avail_in,d=t.hold,m=t.bits,t.mode===Mn&&(t.back=-1);break}for(t.back=0;M=t.lencode[d&(1<>>24,V=M>>>16&255,G=M&65535,!(S<=m);){if(l===0)break t;l--,d+=i[a++]<>D)],S=M>>>24,V=M>>>16&255,G=M&65535,!(D+S<=m);){if(l===0)break t;l--,d+=i[a++]<>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,t.length=G,V===0){t.mode=du;break}if(V&32){t.back=-1,t.mode=Mn;break}if(V&64){r.msg="invalid literal/length code",t.mode=je;break}t.extra=V&15,t.mode=uu;case uu:if(t.extra){for(N=t.extra;m>>=t.extra,m-=t.extra,t.back+=t.extra}t.was=t.length,t.mode=fu;case fu:for(;M=t.distcode[d&(1<>>24,V=M>>>16&255,G=M&65535,!(S<=m);){if(l===0)break t;l--,d+=i[a++]<>D)],S=M>>>24,V=M>>>16&255,G=M&65535,!(D+S<=m);){if(l===0)break t;l--,d+=i[a++]<>>=D,m-=D,t.back+=D}if(d>>>=S,m-=S,t.back+=S,V&64){r.msg="invalid distance code",t.mode=je;break}t.offset=G,t.extra=V&15,t.mode=hu;case hu:if(t.extra){for(N=t.extra;m>>=t.extra,m-=t.extra,t.back+=t.extra}if(t.offset>t.dmax){r.msg="invalid distance too far back",t.mode=je;break}t.mode=cu;case cu:if(h===0)break t;if(p=k-h,t.offset>p){if(p=t.offset-p,p>t.whave&&t.sane){r.msg="invalid distance too far back",t.mode=je;break}p>t.wnext?(p-=t.wnext,j=t.wsize-p):j=t.wnext-p,p>t.length&&(p=t.length),O=t.window}else O=s,j=c-t.offset,p=t.length;p>h&&(p=h),h-=p,t.length-=p;do s[c++]=O[j++];while(--p);t.length===0&&(t.mode=As);break;case du:if(h===0)break t;s[c++]=t.length,h--,t.mode=As;break;case xo:if(t.wrap){for(;m<32;){if(l===0)break t;l--,d|=i[a++]<{if(Fi(r))return Hr;let e=r.state;return e.window&&(e.window=null),r.state=null,Ci},Dc=(r,e)=>{if(Fi(r))return Hr;const t=r.state;return t.wrap&2?(t.head=e,e.done=!1,Ci):Hr},qc=(r,e)=>{const t=e.length;let i,s,a;return Fi(r)||(i=r.state,i.wrap!==0&&i.mode!==Es)?Hr:i.mode===Es&&(s=1,s=Uo(s,e,t,0),s!==i.check)?df:(a=xf(r,e,t,t),a?(i.mode=gf,pf):(i.havedict=1,Ci))};var Uc=bf,zc=wf,Hc=vf,Wc=Bc,Vc=yf,Gc=Rc,Yc=Tc,Jc=Dc,Kc=qc,Xc="pako inflate (from Nodeca project)",pn={inflateReset:Uc,inflateReset2:zc,inflateResetKeep:Hc,inflateInit:Wc,inflateInit2:Vc,inflate:Gc,inflateEnd:Yc,inflateGetHeader:Jc,inflateSetDictionary:Kc,inflateInfo:Xc};function $c(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var Zc=$c;const _f=Object.prototype.toString,{Z_NO_FLUSH:Qc,Z_FINISH:bu,Z_OK:$i,Z_STREAM_END:No,Z_NEED_DICT:Lo,Z_STREAM_ERROR:t1,Z_DATA_ERROR:wu,Z_MEM_ERROR:e1,Z_BUF_ERROR:yu}=lf,r1={chunkSize:1024*64,windowBits:15,to:""};function Ra(r){this.options=uf.assign({},r1,r||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(r&&r.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new vc,this.strm.avail_out=0;let t=pn.inflateInit2(this.strm,e.windowBits);if(t!==$i)throw new Error(zo[t]);if(this.header=new Zc,pn.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Ho.string2buf(e.dictionary):_f.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(t=pn.inflateSetDictionary(this.strm,e.dictionary),t!==$i)))throw new Error(zo[t])}Ra.prototype.push=function(r,e){const t=this.strm,i=this.options.chunkSize,s=this.options.dictionary;let a,c,l;if(this.ended)return!1;for(e===~~e?c=e:c=e===!0?bu:Qc,_f.call(r)==="[object ArrayBuffer]"?t.input=new Uint8Array(r):t.input=r,t.next_in=0,t.avail_in=t.input.length;;){for(t.avail_out===0&&(t.output=new Uint8Array(i),t.next_out=0,t.avail_out=i),a=pn.inflate(t,c),a===Lo&&s&&(a=pn.inflateSetDictionary(t,s),a===$i?a=pn.inflate(t,c):a===wu&&(a=Lo));t.avail_in>0&&a===No&&t.state.wrap&2&&t.state.flags!==0&&t.input[t.next_in]!==0;)pn.inflateReset(t),a=pn.inflate(t,c);switch(a){case t1:case wu:case Lo:case e1:return this.onEnd(a),this.ended=!0,!1}if(l=t.avail_out,t.next_out&&(t.avail_out===0||a===No||c>0))if(this.options.to==="string"){let h=Ho.utf8border(t.output,t.next_out),d=t.next_out-h,m=Ho.buf2string(t.output,h);t.next_out=d,t.avail_out=i-d,d&&t.output.set(t.output.subarray(h,h+d),0),this.onData(m)}else this.onData(t.output.length===t.next_out?t.output:t.output.subarray(0,t.next_out)),t.avail_out=0,t.next_out=0;if(!((a===$i||a===yu)&&l===0)){if(a===No)return a=pn.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(t.avail_in===0){if(c===bu)return a=pn.inflateEnd(this.strm),this.onEnd(a===$i?yu:a),this.ended=!0,!1;break}}}return!0};Ra.prototype.onData=function(r){this.chunks.push(r)};Ra.prototype.onEnd=function(r){r===$i&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=uf.flattenChunks(this.chunks)),this.chunks=[],this.err=r,this.msg=this.strm.msg};function n1(r,e){const t=new Ra(e);if(t.push(r,!0),t.err)throw t.msg||zo[t.err];return t.result}var i1=Ra,a1=n1,s1={Inflate:i1,inflate:a1};const{Inflate:o1,inflate:l1}=s1;var xu=o1,u1=l1;const Af=[];for(let r=0;r<256;r++){let e=r;for(let t=0;t<8;t++)e&1?e=3988292384^e>>>1:e=e>>>1;Af[r]=e}const _u=4294967295;function f1(r,e,t){let i=r;for(let s=0;s>>8;return i}function h1(r,e){return(f1(_u,r,e)^_u)>>>0}function Au(r,e,t){const i=r.readUint32(),s=h1(new Uint8Array(r.buffer,r.byteOffset+r.offset-e-4,e),e);if(s!==i)throw new Error(`CRC mismatch for chunk ${t}. Expected ${i}, found ${s}`)}function Nf(r,e,t){for(let i=0;i>1)&255}else{for(;a>1)&255;for(;a>1)&255}}function Pf(r,e,t,i,s){let a=0;if(t.length===0){for(;a=t||mt>=i))for(let ct=0;ct>8&255}const w1=new Uint16Array([255]),y1=new Uint8Array(w1.buffer),x1=y1[0]===255,_1=new Uint8Array(0);function Nu(r){const{data:e,width:t,height:i,channels:s,depth:a}=r,c=Math.ceil(a/8)*s,l=Math.ceil(a/8*s*t),h=new Uint8Array(i*l);let d=_1,m=0,_,k;for(let p=0;p>8&255}const Is=Uint8Array.of(137,80,78,71,13,10,26,10);function Lu(r){if(!N1(r.readBytes(Is.length)))throw new Error("wrong PNG signature")}function N1(r){if(r.length79)throw new Error("keyword length must be between 1 and 79")}const P1=/^[\u0000-\u00FF]*$/;function I1(r){if(!P1.test(r))throw new Error("invalid latin1 text")}function C1(r,e,t){const i=Cf(e);r[i]=F1(e,t-i.length-1)}function Cf(r){for(r.mark();r.readByte()!==S1;);const e=r.offset;r.reset();const t=If.decode(r.readBytes(e-r.offset-1));return r.skip(1),k1(t),t}function F1(r,e){return If.decode(r.readBytes(e))}const Er={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},So={UNKNOWN:-1,DEFLATE:0},Su={UNKNOWN:-1,ADAPTIVE:0},ko={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},Ns={NONE:0,BACKGROUND:1,PREVIOUS:2},Po={SOURCE:0,OVER:1};class E1 extends $o{constructor(t,i={}){super(t);_e(this,"_checkCrc");_e(this,"_inflator");_e(this,"_png");_e(this,"_apng");_e(this,"_end");_e(this,"_hasPalette");_e(this,"_palette");_e(this,"_hasTransparency");_e(this,"_transparency");_e(this,"_compressionMethod");_e(this,"_filterMethod");_e(this,"_interlaceMethod");_e(this,"_colorType");_e(this,"_isAnimated");_e(this,"_numberOfFrames");_e(this,"_numberOfPlays");_e(this,"_frames");_e(this,"_writingDataChunks");const{checkCrc:s=!1}=i;this._checkCrc=s,this._inflator=new xu,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=So.UNKNOWN,this._filterMethod=Su.UNKNOWN,this._interlaceMethod=ko.UNKNOWN,this._colorType=Er.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Lu(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeChunk(t,i)}return this.decodeImage(),this._png}decodeApng(){for(Lu(this);!this._end;){const t=this.readUint32(),i=this.readChars(4);this.decodeApngChunk(t,i)}return this.decodeApngImage(),this._apng}decodeChunk(t,i){const s=this.offset;switch(i){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(t);break;case"IDAT":this.decodeIDAT(t);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(t);break;case"iCCP":this.decodeiCCP(t);break;case L1:C1(this._png.text,this,t);break;case"pHYs":this.decodepHYs();break;default:this.skip(t);break}if(this.offset-s!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?Au(this,t+4,i):this.skip(4)}decodeApngChunk(t,i){const s=this.offset;switch(i!=="fdAT"&&i!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),i){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(t);break;default:this.decodeChunk(t,i),this.offset=s+t;break}if(this.offset-s!==t)throw new Error(`Length mismatch while decoding chunk ${i}`);this._checkCrc?Au(this,t+4,i):this.skip(4)}decodeIHDR(){const t=this._png;t.width=this.readUint32(),t.height=this.readUint32(),t.depth=O1(this.readUint8());const i=this.readUint8();this._colorType=i;let s;switch(i){case Er.GREYSCALE:s=1;break;case Er.TRUECOLOUR:s=3;break;case Er.INDEXED_COLOUR:s=1;break;case Er.GREYSCALE_ALPHA:s=2;break;case Er.TRUECOLOUR_ALPHA:s=4;break;case Er.UNKNOWN:default:throw new Error(`Unknown color type: ${i}`)}if(this._png.channels=s,this._compressionMethod=this.readUint8(),this._compressionMethod!==So.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const t={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(t)}decodePLTE(t){if(t%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${t}`);const i=t/3;this._hasPalette=!0;const s=[];this._palette=s;for(let a=0;athis._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${t/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(t/2);for(let i=0;ithis._palette.length)throw new Error(`tRNS chunk contains more alpha values than there are palette colors (${t} vs ${this._palette.length})`);let i=0;for(;i{const h=((c+i.yOffset)*this._png.width+i.xOffset+l)*this._png.channels,d=(c*i.width+l)*this._png.channels;return{index:h,frameIndex:d}};switch(i.blendOp){case Po.SOURCE:for(let c=0;c=200&&e.status<=299}function Ls(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(e)}}var Ai=Jt.saveAs||((typeof window>"u"?"undefined":Ae(window))!=="object"||window!==Jt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,e,t){var i=Jt.URL||Jt.webkitURL,s=document.createElement("a");e=e||r.name||"download",s.download=e,s.rel="noopener",typeof r=="string"?(s.href=r,s.origin!==location.origin?Pu(s.href)?Co(r,e,t):Ls(s,s.target="_blank"):Ls(s)):(s.href=i.createObjectURL(r),setTimeout(function(){i.revokeObjectURL(s.href)},4e4),setTimeout(function(){Ls(s)},0))}:"msSaveOrOpenBlob"in navigator?function(r,e,t){if(e=e||r.name||"download",typeof r=="string")if(Pu(r))Co(r,e,t);else{var i=document.createElement("a");i.href=r,i.target="_blank",setTimeout(function(){Ls(i)})}else navigator.msSaveOrOpenBlob(function(s,a){return a===void 0?a={autoBom:!1}:Ae(a)!=="object"&&(Se.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(s.type)?new Blob(["\uFEFF",s],{type:s.type}):s}(r,t),e)}:function(r,e,t,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),typeof r=="string")return Co(r,e,t);var s=r.type==="application/octet-stream",a=/constructor/i.test(Jt.HTMLElement)||Jt.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||s&&a)&&(typeof FileReader>"u"?"undefined":Ae(FileReader))==="object"){var l=new FileReader;l.onloadend=function(){var m=l.result;m=c?m:m.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=m:location=m,i=null},l.readAsDataURL(r)}else{var h=Jt.URL||Jt.webkitURL,d=h.createObjectURL(r);i?i.location=d:location.href=d,i=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});/** * A class to parse color values * @author Stoyan Stefanov @@ -114,7 +114,7 @@ T* `):u.join(` Tj endobj\r `},t.outline.count_r=function(i,s){for(var a=0;a1){U=!0,ot=void 0;var J=R*tt;ut=new Uint8Array(J);for(var Z=new DataView(N.buffer),at=0;at=0;r--){for(var i=this.bottom_up?r:this.height-1-r,s=0;s>7-l&1];this.data[c+4*l]=h.blue,this.data[c+4*l+1]=h.green,this.data[c+4*l+2]=h.red,this.data[c+4*l+3]=255}t!==0&&(this.pos+=4-t)}},Zr.prototype.bit4=function(){for(var r=Math.ceil(this.width/2),e=r%4,t=this.height-1;t>=0;t--){for(var i=this.bottom_up?t:this.height-1-t,s=0;s>4,h=15&a,d=this.palette[l];if(this.data[c]=d.blue,this.data[c+1]=d.green,this.data[c+2]=d.red,this.data[c+3]=255,2*s+1>=this.width)break;d=this.palette[h],this.data[c+4]=d.blue,this.data[c+4+1]=d.green,this.data[c+4+2]=d.red,this.data[c+4+3]=255}e!==0&&(this.pos+=4-e)}},Zr.prototype.bit8=function(){for(var r=this.width%4,e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,i=0;i=0;t--){for(var i=this.bottom_up?t:this.height-1-t,s=0;s>5&e)/e*255|0,h=(a>>10&e)/e*255|0,d=a>>15?255:0,m=i*this.width*4+4*s;this.data[m]=h,this.data[m+1]=l,this.data[m+2]=c,this.data[m+3]=d}this.pos+=r}},Zr.prototype.bit16=function(){for(var r=this.width%3,e=parseInt("11111",2),t=parseInt("111111",2),i=this.height-1;i>=0;i--){for(var s=this.bottom_up?i:this.height-1-i,a=0;a>5&t)/t*255|0,d=(c>>11)/e*255|0,m=s*this.width*4+4*a;this.data[m]=d,this.data[m+1]=h,this.data[m+2]=l,this.data[m+3]=255}this.pos+=r}},Zr.prototype.bit24=function(){for(var r=this.height-1;r>=0;r--){for(var e=this.bottom_up?r:this.height-1-r,t=0;t=0;r--)for(var e=this.bottom_up?r:this.height-1-r,t=0;ti&&(s.push(r.slice(h,a)),l=0,h=a),l+=e[a],a++;return h!==a&&s.push(r.slice(h,a)),s},zu=function(r,e,t){t||(t={});var i,s,a,c,l,h,d,m=[],_=[m],k=t.textIndent||0,p=0,j=0,O=r.split(" "),M=Ps.apply(this,[" ",t])[0];if(h=t.lineIndent===-1?O[0].length+2:t.lineIndent||0){var S=Array(h).join(" "),V=[];O.map(function(D){(D=D.split(/\s*\n/)).length>1?V=V.concat(D.map(function(it,mt){return(mt&&it.length?` `:"")+it})):V.push(D[0])}),O=V,h=qu.apply(this,[S,t])}for(a=0,c=O.length;ae||G){if(j>e){for(l=Uu.apply(this,[i,s,e-(k+p),e]),m.push(l.shift()),m=[l.pop()];l.length;)_.push([l.shift()]);j=s.slice(i.length-(m[0]?m[0].length:0)).reduce(function(D,it){return D+it},0)}else m=[i];_.push(m),k=j+h,p=M}else m.push(i),k+=p+j,p=M}return d=h?function(D,it){return(it?S:"")+D.join(" ")}:function(D){return D.join(" ")},_.map(d)},Ji.splitTextToSize=function(r,e,t){var i,s=(t=t||{}).fontSize||this.internal.getFontSize(),a=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var _=this.internal.getFont(m.fontName,m.fontStyle),k="Unicode";return _.metadata[k]?{widths:_.metadata[k].widths||{0:1},kerning:_.metadata[k].kerning||{}}:{font:_.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);i=Array.isArray(r)?r:String(r).split(/\r?\n/);var c=1*this.internal.scaleFactor*e/s;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/s:0,a.lineIndent=t.lineIndent;var l,h,d=[];for(l=0,h=i.length;limport("./index.es-CvwIedKw.js"),__vite__mapDeps([0,1,2]))).catch(function(k){return Promise.reject(new Error("Could not load canvg: "+k))}).then(function(k){return k.default?k.default:k}).then(function(k){return k.fromString(d,r,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(k){return k.render(m)}).then(function(){_.addImage(h.toDataURL("image/jpeg",1),e,t,i,s,c,l)})},Mt.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var s=0;s1){for(m=0;me||G){if(j>e){for(l=Uu.apply(this,[i,s,e-(k+p),e]),m.push(l.shift()),m=[l.pop()];l.length;)_.push([l.shift()]);j=s.slice(i.length-(m[0]?m[0].length:0)).reduce(function(D,it){return D+it},0)}else m=[i];_.push(m),k=j+h,p=M}else m.push(i),k+=p+j,p=M}return d=h?function(D,it){return(it?S:"")+D.join(" ")}:function(D){return D.join(" ")},_.map(d)},Ji.splitTextToSize=function(r,e,t){var i,s=(t=t||{}).fontSize||this.internal.getFontSize(),a=(function(m){if(m.widths&&m.kerning)return{widths:m.widths,kerning:m.kerning};var _=this.internal.getFont(m.fontName,m.fontStyle),k="Unicode";return _.metadata[k]?{widths:_.metadata[k].widths||{0:1},kerning:_.metadata[k].kerning||{}}:{font:_.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,t);i=Array.isArray(r)?r:String(r).split(/\r?\n/);var c=1*this.internal.scaleFactor*e/s;a.textIndent=t.textIndent?1*t.textIndent*this.internal.scaleFactor/s:0,a.lineIndent=t.lineIndent;var l,h,d=[];for(l=0,h=i.length;limport("./index.es--qdfqpum.js"),__vite__mapDeps([0,1,2]))).catch(function(k){return Promise.reject(new Error("Could not load canvg: "+k))}).then(function(k){return k.default?k.default:k}).then(function(k){return k.fromString(d,r,m)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(k){return k.render(m)}).then(function(){_.addImage(h.toDataURL("image/jpeg",1),e,t,i,s,c,l)})},Mt.API.putTotalPages=function(r){var e,t=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(r,"g"),t=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(r,this.internal.getFont()),"g"),t=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var i=1;i<=this.internal.getNumberOfPages();i++)for(var s=0;s1){for(m=0;mr?1:n>=r?0:NaN}function z(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function w(n){let r,i,t;n.length!==2?(r=g,i=(u,o)=>g(n(u),o),t=(u,o)=>n(u)-o):(r=n===g||n===z?n:I,i=n,t=n);function f(u,o,e=0,m=u.length){if(e>>1;i(u[l],o)<0?e=l+1:m=l}while(e>>1;i(u[l],o)<=0?e=l+1:m=l}while(ee&&t(u[l-1],o)>-t(u[l],o)?l-1:l}return{left:f,center:a,right:c}}function I(){return 0}function P(n){return n===null?NaN:+n}const $=w(g),j=$.right;w(P).center;const x=Math.sqrt(50),B=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,i){const t=(r-n)/Math.max(0,i),f=Math.floor(Math.log10(t)),c=t/Math.pow(10,f),a=c>=x?10:c>=B?5:c>=C?2:1;let u,o,e;return f<0?(e=Math.pow(10,-f)/a,u=Math.round(n*e),o=Math.round(r*e),u/er&&--o,e=-e):(e=Math.pow(10,f)*a,u=Math.round(n/e),o=Math.round(r/e),u*er&&--o),o0))return[];if(n===r)return[n];const t=r=f))return[];const u=c-f+1,o=new Array(u);if(t)if(a<0)for(let e=0;er&&(i=n,n=r,r=i),function(t){return Math.max(n,Math.min(r,t))}}function Q(n,r,i){var t=n[0],f=n[1],c=r[0],a=r[1];return f2?T:Q,o=e=null,l}function l(h){return h==null||isNaN(h=+h)?c:(o||(o=u(n.map(t),r,i)))(t(a(h)))}return l.invert=function(h){return a(f((e||(e=u(r,n.map(t),y)))(h)))},l.domain=function(h){return arguments.length?(n=Array.from(h,L),m()):n.slice()},l.range=function(h){return arguments.length?(r=Array.from(h),m()):r.slice()},l.rangeRound=function(h){return r=Array.from(h),i=S,m()},l.clamp=function(h){return arguments.length?(a=h?!0:s,m()):a!==s},l.interpolate=function(h){return arguments.length?(i=h,m()):i},l.unknown=function(h){return arguments.length?(c=h,l):c},function(h,k){return t=h,f=k,m()}}function W(){return V()(s,s)}function X(n,r,i,t){var f=E(n,r,i),c;switch(t=R(t??",f"),t.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return t.precision==null&&!isNaN(c=H(f,a))&&(t.precision=c),q(t,a)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(c=J(f,Math.max(Math.abs(n),Math.abs(r))))&&(t.precision=c-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(c=G(f))&&(t.precision=c-(t.type==="%")*2);break}}return F(t)}function Y(n){var r=n.domain;return n.ticks=function(i){var t=r();return D(t[0],t[t.length-1],i??10)},n.tickFormat=function(i,t){var f=r();return X(f[0],f[f.length-1],i??10,t)},n.nice=function(i){i==null&&(i=10);var t=r(),f=0,c=t.length-1,a=t[f],u=t[c],o,e,m=10;for(u0;){if(e=d(a,u,i),e===o)return t[f]=a,t[c]=u,r(t);if(e>0)a=Math.floor(a/e)*e,u=Math.ceil(u/e)*e;else if(e<0)a=Math.ceil(a*e)/e,u=Math.floor(u*e)/e;else break;o=e}return n},n}function Z(){var n=W();return n.copy=function(){return U(n,Z())},A.apply(n,arguments),Y(n)}export{U as a,w as b,W as c,Z as l,E as t}; +import{ar as y,aq as b}from"../app/index-BKQXvMzA.js";import{i as A}from"./init-Gi6I4Gst.js";import{e as M,b as R,a as q,f as F}from"./defaultLocale-CrowFXzY.js";function S(n,r){return n=+n,r=+r,function(i){return Math.round(n*(1-i)+r*i)}}function g(n,r){return n==null||r==null?NaN:nr?1:n>=r?0:NaN}function z(n,r){return n==null||r==null?NaN:rn?1:r>=n?0:NaN}function w(n){let r,i,t;n.length!==2?(r=g,i=(u,o)=>g(n(u),o),t=(u,o)=>n(u)-o):(r=n===g||n===z?n:I,i=n,t=n);function f(u,o,e=0,m=u.length){if(e>>1;i(u[l],o)<0?e=l+1:m=l}while(e>>1;i(u[l],o)<=0?e=l+1:m=l}while(ee&&t(u[l-1],o)>-t(u[l],o)?l-1:l}return{left:f,center:a,right:c}}function I(){return 0}function P(n){return n===null?NaN:+n}const $=w(g),j=$.right;w(P).center;const x=Math.sqrt(50),B=Math.sqrt(10),C=Math.sqrt(2);function v(n,r,i){const t=(r-n)/Math.max(0,i),f=Math.floor(Math.log10(t)),c=t/Math.pow(10,f),a=c>=x?10:c>=B?5:c>=C?2:1;let u,o,e;return f<0?(e=Math.pow(10,-f)/a,u=Math.round(n*e),o=Math.round(r*e),u/er&&--o,e=-e):(e=Math.pow(10,f)*a,u=Math.round(n/e),o=Math.round(r/e),u*er&&--o),o0))return[];if(n===r)return[n];const t=r=f))return[];const u=c-f+1,o=new Array(u);if(t)if(a<0)for(let e=0;er&&(i=n,n=r,r=i),function(t){return Math.max(n,Math.min(r,t))}}function Q(n,r,i){var t=n[0],f=n[1],c=r[0],a=r[1];return f2?T:Q,o=e=null,l}function l(h){return h==null||isNaN(h=+h)?c:(o||(o=u(n.map(t),r,i)))(t(a(h)))}return l.invert=function(h){return a(f((e||(e=u(r,n.map(t),y)))(h)))},l.domain=function(h){return arguments.length?(n=Array.from(h,L),m()):n.slice()},l.range=function(h){return arguments.length?(r=Array.from(h),m()):r.slice()},l.rangeRound=function(h){return r=Array.from(h),i=S,m()},l.clamp=function(h){return arguments.length?(a=h?!0:s,m()):a!==s},l.interpolate=function(h){return arguments.length?(i=h,m()):i},l.unknown=function(h){return arguments.length?(c=h,l):c},function(h,k){return t=h,f=k,m()}}function W(){return V()(s,s)}function X(n,r,i,t){var f=E(n,r,i),c;switch(t=R(t??",f"),t.type){case"s":{var a=Math.max(Math.abs(n),Math.abs(r));return t.precision==null&&!isNaN(c=H(f,a))&&(t.precision=c),q(t,a)}case"":case"e":case"g":case"p":case"r":{t.precision==null&&!isNaN(c=J(f,Math.max(Math.abs(n),Math.abs(r))))&&(t.precision=c-(t.type==="e"));break}case"f":case"%":{t.precision==null&&!isNaN(c=G(f))&&(t.precision=c-(t.type==="%")*2);break}}return F(t)}function Y(n){var r=n.domain;return n.ticks=function(i){var t=r();return D(t[0],t[t.length-1],i??10)},n.tickFormat=function(i,t){var f=r();return X(f[0],f[f.length-1],i??10,t)},n.nice=function(i){i==null&&(i=10);var t=r(),f=0,c=t.length-1,a=t[f],u=t[c],o,e,m=10;for(u0;){if(e=d(a,u,i),e===o)return t[f]=a,t[c]=u,r(t);if(e>0)a=Math.floor(a/e)*e,u=Math.ceil(u/e)*e;else if(e<0)a=Math.ceil(a*e)/e,u=Math.floor(u*e)/e;else break;o=e}return n},n}function Z(){var n=W();return n.copy=function(){return U(n,Z())},A.apply(n,arguments),Y(n)}export{U as a,w as b,W as c,Z as l,E as t}; diff --git a/veadk/webui/assets/visualizations/mermaid/abnfDiagram-N423BO3Z-DJZZ0-Xb.js b/veadk/webui/assets/visualizations/mermaid/abnfDiagram-N423BO3Z-CvKroTip.js similarity index 86% rename from veadk/webui/assets/visualizations/mermaid/abnfDiagram-N423BO3Z-DJZZ0-Xb.js rename to veadk/webui/assets/visualizations/mermaid/abnfDiagram-N423BO3Z-CvKroTip.js index c4291c6ef..6e542d348 100644 --- a/veadk/webui/assets/visualizations/mermaid/abnfDiagram-N423BO3Z-DJZZ0-Xb.js +++ b/veadk/webui/assets/visualizations/mermaid/abnfDiagram-N423BO3Z-CvKroTip.js @@ -1 +1 @@ -import{g as p,r as u,d as n}from"./chunk-6Q2QTUOP-BK6W1hz6.js";import{p as f}from"./chunk-JWPE2WC7-BHkERHFx.js";import{a,at as o}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import{M as c,c as d}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../chunks/purify.es-BnINGy_Y.js";var v=d().RailroadAbnf.parser.LangiumParser,i=a(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=a(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=a(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=a(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=a(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 i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=a(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=a(e=>{f(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(P(r)))},"populateDb"),R={parse:a(e=>{n.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:n}},F={parser:R,db:n,renderer:u,styles:p};export{F as diagram}; +import{g as p,r as u,d as n}from"./chunk-6Q2QTUOP-CKQiwqPP.js";import{p as f}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a,at as o}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import{M as c,c as d}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../chunks/purify.es-BnINGy_Y.js";var v=d().RailroadAbnf.parser.LangiumParser,i=a(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=a(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=a(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=a(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=a(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 i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=a(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=a(e=>{f(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(P(r)))},"populateDb"),R={parse:a(e=>{n.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:n}},F={parser:R,db:n,renderer:u,styles:p};export{F as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DYHZqCQm.js b/veadk/webui/assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DHyZBlpG.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DYHZqCQm.js rename to veadk/webui/assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DHyZBlpG.js index 7f36df8a7..31432696d 100644 --- a/veadk/webui/assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DYHZqCQm.js +++ b/veadk/webui/assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DHyZBlpG.js @@ -1,4 +1,4 @@ -import{p as qe}from"./chunk-JWPE2WC7-BHkERHFx.js";import{a as ct,aP as Qe,aW as Je,at as Se,aR as Ke,W as je,aT as _e,$ as tr,V as er,aQ as rr,s as ir,r as ar,X as nr,O as or,Y as me,F as Ee,a2 as ve,aN as sr,a0 as hr,aJ as lr,b7 as fr}from"./mermaid.core-BmHujEI0.js";import{p as cr}from"./cynefin-OW5HDTMX-DjTRskiD.js";import{c as Fe}from"../../chunks/cytoscape.esm-Dz9tvMTw.js";import{U as Te,ad as gr,aG as ur}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var be={exports:{}},ue={exports:{}},de={exports:{}},De;function dr(){return De||(De=1,function(I,M){(function(x,N){I.exports=N()})(Te,function(){return function(C){var x={};function N(v){if(x[v])return x[v].exports;var l=x[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=C,N.c=x,N.i=function(v){return v},N.d=function(v,l,n){N.o(v,l)||Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(l,"a",l),l},N.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},N.p="",N(N.s=28)}([function(C,x,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v},function(C,x,N){var v=N(2),l=N(8),n=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r},function(C,x,N){function v(l){this.vGraphObject=l}C.exports=v},function(C,x,N){var v=N(2),l=N(10),n=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;hs?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e},function(C,x,N){var v=N(0);function l(){}for(var n in v)l[n]=v[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l},function(C,x,N){function v(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v},function(C,x,N){var v=N(2),l=N(10),n=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,h,T){v.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof i){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),u,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(P,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;wT&&(c=T),h>u&&(h=u)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,P,V,Y=this.nodes,B=Y.length,A=0;AL&&(h=L),Tw&&(u=w),dL&&(h=L),Tw&&(u=w),d=this.nodes.length){var B=0;T.forEach(function(A){A.owner==c&&B++}),B==this.nodes.length&&(this.isConnected=!0)}},C.exports=s},function(C,x,N){var v,l=N(1);function n(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(r){if(r instanceof v){var i=r;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var e,g=f.length,t=0;t=r.getRight()?i[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]t)return i[0]=f,i[1]=o,i[2]=g,i[3]=Y,!1;if(eg)return i[0]=s,i[1]=e,i[2]=P,i[3]=t,!1;if(fg?(i[0]=h,i[1]=T,a=!0):(i[0]=c,i[1]=o,a=!0):p===y&&(f>g?(i[0]=s,i[1]=o,a=!0):(i[0]=u,i[1]=T,a=!0)),-m===y?g>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=P,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=B,i[3]=Y,E=!0)),a&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!a)switch(S){case 1:W=o,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=h,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(D){case 1:Q=w,R=g+-j/y,i[2]=R,i[3]=Q;break;case 2:R=B,Q=t+A*y,i[2]=R,i[3]=Q;break;case 3:Q=Y,R=g+j/y,i[2]=R,i[3]=Q;break;case 4:R=V,Q=t+-A*y,i[2]=R,i[3]=Q;break}}return!1},l.getCardinalDirection=function(n,r,i){return n>r?i:1+i%4},l.getIntersection=function(n,r,i,f){if(f==null)return this.getIntersection2(n,r,i);var e=n.x,g=n.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,P=void 0,V=void 0,Y=void 0,B=void 0;return L=s-g,w=e-t,V=t*g-e*s,b=T-c,P=o-h,Y=h*c-o*T,B=L*P-b*w,B===0?null:(u=(w*Y-P*V)/B,d=(b*V-L*Y)/B,new v(u,d))},l.angleOfVector=function(n,r,i,f){var e=void 0;return n!==i?(e=Math.atan((f-r)/(i-n)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l},function(C,x,N){function v(){}v.sign=function(l){return l>0?1:l<0?-1:0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v},function(C,x,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v},function(C,x,N){var v=function(){function e(g,t){for(var s=0;s"u"?"undefined":v(n);return n==null||r!="object"&&r!="function"},C.exports=l},function(C,x,N){function v(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c0&&c;){for(L.push(w[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var V=P.getEdges(),u=0;u-1&&w.splice(j,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(h),u=0;u=0&&c.splice(Y,1);var B=b.getNeighborsList();B.forEach(function(a){if(h.indexOf(a)<0){var E=T.get(a),p=E-1;p==1&&P.push(a),T.set(a,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=s},function(C,x,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v},function(C,x,N){var v=N(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),r},l.prototype.transformY=function(n){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),r},l.prototype.inverseTransformX=function(n){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),r},l.prototype.inverseTransformY=function(n){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),r},l.prototype.inverseTransformPoint=function(n){var r=new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},C.exports=l},function(C,x,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var b=0;be}}]),i}();C.exports=r},function(C,x,N){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(Math.min(this.m+1,this.n)),this.U=function(Tt){var wt=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)wt.push(0);return wt}(this.n),i=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if(function(Tt,wt){return Tt&&wt}(z0;){var J=void 0,It=void 0;for(J=a-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===a-2)It=4;else{var Nt=void 0;for(Nt=a-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==a?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===a-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[a-2];r[a-2]=0;for(var ut=a-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},C.exports=v},function(C,x,N){var v=function(){function r(i,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===n&&f.callback===r&&this.listeners.splice(i,1)}},l.emit=function(n,r){for(var i=0;i{var x={45:(n,r,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),n.exports=f},806:(n,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,n.exports=e},767:(n,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e},880:(n,r,i)=>{var f=i(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e},578:(n,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e},765:(n,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),o=i(806),c=i(902),h=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,P=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,B=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var j in f)A[j]=f[j];A.prototype.newGraphManager=function(){var a=new e(this);return this.graphManager=a,a},A.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},A.prototype.newNode=function(a){return new t(this.graphManager,a)},A.prototype.newEdge=function(a){return new s(null,null,a)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.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 a=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var D=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(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),Z=O[tt],O[tt]=O[H],O[H]=Z;return O},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(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,Z=D.has(O.right)?D.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(Z)||(a.nodesInRelativeHorizontal.push(Z),a.nodeToRelativeConstraintMapHorizontal.set(Z,[]),a.dummyToNodeForVerticalAlignment.has(Z)?a.nodeToTempPositionMapHorizontal.set(Z,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(Z)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(Z,a.idToNodeMap.get(Z).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:Z,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(Z).push({left:H,gap:O.gap})}else{var tt=F.has(O.top)?F.get(O.top):O.top,ht=F.has(O.bottom)?F.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(tt)||(a.nodesInRelativeVertical.push(tt),a.nodeToRelativeConstraintMapVertical.set(tt,[]),a.dummyToNodeForHorizontalAlignment.has(tt)?a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(tt).getCenterY())),a.nodesInRelativeVertical.includes(ht)||(a.nodesInRelativeVertical.push(ht),a.nodeToRelativeConstraintMapVertical.set(ht,[]),a.dummyToNodeForHorizontalAlignment.has(ht)?a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(ht).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,Z=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(Z):Q.set(H,[Z]),Q.has(Z)?Q.get(Z).push(H):Q.set(Z,[H])}else{var tt=F.has(O.top)?F.get(O.top):O.top,ht=F.has(O.bottom)?F.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,Z){var tt=[],ht=[],J=new B,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),Z.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,a.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},A.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=a.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var F;for(F=0;Fm&&(m=Math.floor(D.y)),S=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(a,E,p){var m=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(a),S=new Y;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var D=0;D1;){var Z=H[0];H.splice(0,1);var tt=z.indexOf(Z);tt>=0&&z.splice(tt,1),$--,X--}E!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%$){var It=z[J].getOtherEnd(a);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,a,Nt,vt,y+S,S),rt++}}},A.maxDiagonalInTree=function(a){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var a=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var R="DummyCompound_"+W;a.memberGroups[R]=E[W];var Q=E[W][0].getParent(),z=new t(a.graphManager);z.id=R,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,a.idToDummyNode[R]=z;var X=a.getGraphManager().add(a.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var E=this.compoundOrder[a],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=a.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,D=m.labelMarginLeft,F=m.labelMarginTop;a.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,D,F)})},A.prototype.getToBeTiled=function(a){var E=a.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=a.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(a){a.id;for(var E=a.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+a.verticalPadding}},A.prototype.tileCompoundMembers=function(a,E){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(a[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var S=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(a,E){var p=this.tileNodesByFavoringDim(a,E,!0),m=this.tileNodesByFavoringDim(a,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),D;return SF&&(F=$.getWidth())});var W=S/y,R=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(R+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return F>rt&&(rt=F),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(a,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,S=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(D.idealRowWidth=this.calcIdealRowWidth(a,p));var F=function(O){return O.rect.width*O.rect.height},W=function(O,H){return F(H)-F(O)};a.sort(function($,O){var H=W;return D.idealRowWidth?(H=S,H($.id,O.id)):H($,O)});for(var R=0,Q=0,z=0;z0&&(D+=a.horizontalPadding),a.rowWidth[p]=D,a.width0&&(F+=a.verticalPadding);var W=0;F>a.rowHeight[p]&&(W=a.rowHeight[p],a.rowHeight[p]=F,W=a.rowHeight[p]-W),a.height+=W,a.rows[p].push(E)},A.prototype.getShortestRowIndex=function(a){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=a.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(a,E,p){if(a.idealRowWidth){var m=a.rows.length-1,y=a.rowWidth[m];return y+E+a.horizontalPadding<=a.idealRowWidth}var S=this.getShortestRowIndex(a);if(S<0)return!0;var D=a.rowWidth[S];if(D+a.horizontalPadding+E<=a.width)return!0;var F=0;a.rowHeight[S]0&&(F=p+a.verticalPadding-a.rowHeight[S]);var W;a.width-D>=E+a.horizontalPadding?W=(a.height+F)/(D+E+a.horizontalPadding):W=(a.height+F)/a.width,F=p+a.verticalPadding;var R;return a.widthS&&E!=p){m.splice(-1,1),a.rows[p].push(y),a.rowWidth[E]=a.rowWidth[E]-S,a.rowWidth[p]=a.rowWidth[p]+S,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var D=Number.MIN_VALUE,F=0;FD&&(D=m[F].height);E>0&&(D+=a.verticalPadding);var W=a.rowHeight[E]+a.rowHeight[p];a.rowHeight[E]=D,a.rowHeight[p]0)for(var rt=y;rt<=S;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(S0)for(var rt=D;rt<=F;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,O,H,Z=0;Z{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,u.has(st)?d[u.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,u.has(st)?L[u.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=u.has(st)?d[u.get(st)]:q.get(st):ft+=u.has(st)?L[u.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=Zt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw $t}}var he=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+he)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},j=function(U){var k=0,K=0,q=0,at=0;if(U.forEach(function(_){_.left?d[u.get(_.left)]-d[u.get(_.right)]>=0?k++:K++:L[u.get(_.top)]-L[u.get(_.bottom)]>=0?q++:at++}),k>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)h.fixedNodeConstraint.forEach(function(G,U){m[U]=[G.position.x,G.position.y],y[U]=[d[u.get(G.nodeId)],L[u.get(G.nodeId)]]}),S=!0;else if(h.alignmentConstraint)(function(){var G=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,k=function(et){var _=new Set;U[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(_).x,U[et].forEach(function(pt){m[G]=[Mt,L[u.get(pt)]],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},K=0;K0?Mt=d[u.get(dt.values().next().value)]:Mt=B(_).y,q[et].forEach(function(pt){m[G]=[d[u.get(pt)],Mt],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(G,U){var k={x:d[u.get(G.nodeId)],y:L[u.get(G.nodeId)]},K=G.position,q=Y(K,k);mt.x+=q.x,mt.y+=q.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(G,U){d[U]+=mt.x}),L.forEach(function(G,U){L[U]+=mt.y}),h.fixedNodeConstraint.forEach(function(G){d[u.get(G.nodeId)]=G.position.x,L[u.get(G.nodeId)]=G.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Ot=h.alignmentConstraint.vertical,Rt=function(U){var k=new Set;Ot[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=B(k).x,k.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht0?q=L[u.get(K.values().next().value)]:q=B(k).y,k.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft{n.exports=C}},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return x[n](i,i.exports,v),i.exports}var l=v(45);return l})()})}(ue)),ue.exports}(function(I,M){(function(x,N){I.exports=N(vr())})(Te,function(C){return(()=>{var x={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e{var f=function(){function t(s,o){var c=[],h=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(h=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(b){T=!0,u=b}finally{try{!h&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o0&&S.merge(R)});for(var D=0;D1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var V=P.value,Y=f(V,2),B=Y[0],A=Y[1],j=o.cy.getElementById(B);if(j){var a=j.boundingBox(),E=s.xCoords[A]-a.w/2,p=s.xCoords[A]+a.w/2,m=s.yCoords[A]-a.h/2,y=s.yCoords[A]+a.h/2;Eh&&(h=p),mu&&(u=y)}}}catch(R){L=!0,b=R}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(h+c)/2,D=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(R){return R+S}),s.yCoords=s.yCoords.map(function(R){return R+D})}else{Object.keys(s).forEach(function(R){var Q=s[R],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zh&&(h=X),rtu&&(u=$)});var F=t.x-(h+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(R){var Q=s[R];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,B=0;BL&&(h=L),Tw&&(u=w),d{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,P=w.nodes(),V=w.edges(),Y=void 0,B=void 0,A=void 0,j={};d.randomize&&(Y=L.nodeIndexes,B=L.xCoords,A=L.yCoords);var a=function(R){return typeof R=="function"},E=function(R,Q){return a(R)?R(Q):R},p=f.calcParentsWithoutChildren(b,w),m=function W(R,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),Z),W(J,H,z,X)}}},y=function(R,Q,z){for(var X=0,rt=0,$=0;$0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:a(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(R,Q){Q.fixedNodeConstraint&&(R.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(R.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(R.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new e,F=D.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(P),D,d),y(D,F,V),S(D,d),D.runLayout(),j};n.exports={coseLayout:T}},212:(n,r,i)=>{var f=function(){function d(L,b){for(var w=0;w0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(A=t.connectComponents(P,w.eles,S),A.forEach(function(vt){var it=vt.boundingBox();j.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&A.forEach(function(vt){w.eles=vt,Y.push(o(w))}),w.quality=="default"||w.quality=="proof"){var D=P.collection();if(w.tile){var F=new Map,W=[],R=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:R},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();j.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var $=X.length-1;$>=0;$--)A.splice(X[$],1),Y.splice(X[$],1),j.splice(X[$],1)}}A.forEach(function(vt,it){w.eles=vt,B.push(h(w,Y[it])),t.relocateComponent(j[it],B[it],w)})}else A.forEach(function(vt,it){t.relocateComponent(j[it],Y[it],w)});var O=new Set;if(A.length>1){var H=[],Z=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(Z).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(Z).forEach(function(Dt){if(w.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else B[it][Dt.id()]&&Et.nodes.push({x:B[it][Dt.id()].getLeft(),y:B[it][Dt.id()].getTop(),width:B[it][Dt.id()].getWidth(),height:B[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else B[it][mt.id()]&&B[it][Ot.id()]&&Et.edges.push({startX:B[it][mt.id()].getCenterX(),startY:B[it][mt.id()].getCenterY(),endX:B[it][Ot.id()].getCenterX(),endY:B[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys(B[vt]).forEach(function(it){var ut=B[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(j.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);Y.push(y)}w.quality=="default"||w.quality=="proof"?(B.push(h(w,Y[0])),t.relocateComponent(j[0],B[0],w)):t.relocateComponent(j[0],Y[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return B.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),w.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});w.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();n.exports=u},657:(n,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),u=h.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],P=[],V=[],Y=[],B=[],A=[],j=[],a=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,S=o.samplingType,D=o.nodeSeparation,F=void 0,W=function(){for(var U=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=B[Lt],Mt=Lt)}return Mt},Q=function(U){var k=void 0;if(U){k=Math.floor(Math.random()*E);for(var q=0;q=1)break;_=et}for(var pt=0;pt=1)break;_=et}for(var lt=0;lt0&&(k.isParent()?w[U].push(b.get(k.id())):w[U].push(k.id()))})});var Nt=function(U){var k=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[k].push(K),w[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(G){it=!0,ut=G}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),n.exports=e},140:n=>{n.exports=C}},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return x[n](i,i.exports,v),i.exports}var l=v(579);return l})()})})(be);var pr=be.exports;const yr=gr(pr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:ct(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:ct(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:ct(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:ct((I,M)=>I-M+2,"L"),R:ct((I,M)=>I-2,"R"),T:ct((I,M)=>I-M+2,"T"),B:ct((I,M)=>I-2,"B")},mr=ct(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(I){const M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=ct(function(I){const M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=ct(function(I){const M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),Ne=ct(function(I,M){const C=Wt(I)&&qt(M),x=qt(I)&&Wt(M);return C||x},"isArchitectureDirectionXY"),Er=ct(function(I){const M=I[0],C=I[1],x=Wt(M)&&qt(C),N=qt(M)&&Wt(C);return x||N},"isArchitecturePairXY"),Tr=ct(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(I,M){const C=`${I}${M}`;return Tr(C)?C:void 0},"getArchitectureDirectionPair"),Nr=ct(function([I,M],C){const x=C[0],N=C[1];return Wt(x)?qt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:Wt(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Lr=ct(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=ct(function(I,M){return Ne(I,M)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Cr=ct(function(I){return I.type==="service"},"isArchitectureService"),Mr=ct(function(I){return I.type==="junction"},"isArchitectureJunction"),Ge=ct((I,M)=>{const[C,x]=[I,M].sort();return`${JSON.stringify(C)}-${JSON.stringify(x)}`},"architectureGroupAlignmentKey"),Pe=ct(I=>I.data(),"edgeData"),ie=ct(I=>I.data(),"nodeData"),Ar=or.architecture,ae,Ue=(ae=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=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}setDiagramId(M){this.diagramId=M}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="",ir()}addService({id:M,icon:C,in:x,title:N,iconText:v}){if(this.registeredIds.has(M))throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The service [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(x)==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"service",icon:C,iconText:v,title:N,edges:[],in:x})}getServices(){return[...this.nodes.values()].filter(Cr)}addJunction({id:M,in:C}){if(this.registeredIds.has(M))throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(C!==void 0){if(M===C)throw new Error(`The junction [${M}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(Mr)}getNodes(){return[...this.nodes.values()]}getNode(M){return this.nodes.get(M)??null}addGroup({id:M,icon:C,in:x,title:N}){if(this.registeredIds.has(M))throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The group [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(x)==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds.set(M,"group"),this.groups.set(M,{id:M,icon:C,title:N,in:x})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:v,rhsInto:l,lhsGroup:n,rhsGroup:r,title:i}){if(!Re(x))throw new Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(M)&&!this.groups.has(M))throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes.get(M).in,e=this.nodes.get(C).in;if(n&&f&&e&&f==e)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:M,lhsDir:x,lhsInto:v,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:l,rhsGroup:r,title:i};this.edges.push(g);const t=this.nodes.get(M),s=this.nodes.get(C);t&&s&&(t.edges.push(this.edges[this.edges.length-1]),s.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(M){if(M.members.length<2)throw new Error(`An align directive requires at least two members; got ${M.members.length}`);const C=new Set;M.members.forEach(x=>{if(this.registeredIds.get(x)!=="node")throw new Error(`align ${M.direction} references [${x}], which is not a service or junction`);if(C.has(x))throw new Error(`align ${M.direction} lists [${x}] more than once`);C.add(x)}),this.layoutHints.push(M)}getLayoutHints(){return this.layoutHints}getDataStructures(){var M,C;if(this.dataStructures===void 0){const x=new Map,N=new Map;for(const[i,f]of this.nodes.entries()){const e=new Map;for(const g of f.edges){const t=(M=this.getNode(g.lhsId))==null?void 0:M.in,s=(C=this.getNode(g.rhsId))==null?void 0:C.in;if(t&&s&&t!==s){const o=wr(g.lhsDir,g.rhsDir);o!=="bend"&&x.set(Ge(t,s),o)}if(g.lhsId===i){const o=pe(g.lhsDir,g.rhsDir);o&&e.set(o,g.rhsId)}else{const o=pe(g.rhsDir,g.lhsDir);o&&e.set(o,g.lhsId)}}N.set(i,e)}const v=new Set,l=new Set(N.keys()),n=ct(i=>{const f=new Map([[i,[0,0]]]),e=[i];for(;e.length>0;){const g=e.shift();if(g){v.add(g),l.delete(g);const t=N.get(g);if(!t)throw new Error(`BFS error: adjacency list for id ${g} not found. Please report this as a bug.`);const s=f.get(g);if(!s)throw new Error(`BFS error: position for id ${g} not found in spatial map. Please report this as a bug.`);const[o,c]=s;t.forEach((h,T)=>{v.has(h)||(f.set(h,Nr([o,c],T)),e.push(h))})}}return f},"BFS"),r=[];for(;l.size>0;){const i=l.values().next().value;r.push(n(i))}this.dataStructures={adjList:N,spatialMaps:r,groupAlignments:x}}return this.dataStructures}setElementForId(M,C){this.elements.set(M,C)}getElementById(M){return this.elements.get(M)}getConfig(){return ar({...Ar,...nr().architecture})}getConfigField(M){return this.getConfig()[M]}},ct(ae,"ArchitectureDB"),ae),Dr=ct((I,M)=>{var C;qe(I,M),I.groups.map(x=>M.addGroup(x)),I.services.map(x=>M.addService({...x,type:"service"})),I.junctions.map(x=>M.addJunction({...x,type:"junction"})),I.edges.map(x=>M.addEdge(x)),(C=I.alignments)==null||C.map(x=>M.addLayoutHint({direction:x.direction,members:[...x.members]}))},"populateDb"),Ye={parser:{yy:void 0},parse:ct(async I=>{var x;const M=await cr("architecture",I);Se.debug(M);const C=(x=Ye.parser)==null?void 0:x.yy;if(!(C instanceof Ue))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.");Dr(M,C)},"parse")},Or=ct(I=>` +import{p as qe}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a as ct,aP as Qe,aW as Je,at as Se,aR as Ke,W as je,aT as _e,$ as tr,V as er,aQ as rr,s as ir,r as ar,X as nr,O as or,Y as me,F as Ee,a2 as ve,aN as sr,a0 as hr,aJ as lr,b7 as fr}from"./mermaid.core-l-gs7P2Q.js";import{p as cr}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import{c as Fe}from"../../chunks/cytoscape.esm-Dz9tvMTw.js";import{U as Te,ad as gr,aG as ur}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var be={exports:{}},ue={exports:{}},de={exports:{}},De;function dr(){return De||(De=1,function(I,M){(function(x,N){I.exports=N()})(Te,function(){return function(C){var x={};function N(v){if(x[v])return x[v].exports;var l=x[v]={i:v,l:!1,exports:{}};return C[v].call(l.exports,l,l.exports,N),l.l=!0,l.exports}return N.m=C,N.c=x,N.i=function(v){return v},N.d=function(v,l,n){N.o(v,l)||Object.defineProperty(v,l,{configurable:!1,enumerable:!0,get:n})},N.n=function(v){var l=v&&v.__esModule?function(){return v.default}:function(){return v};return N.d(l,"a",l),l},N.o=function(v,l){return Object.prototype.hasOwnProperty.call(v,l)},N.p="",N(N.s=28)}([function(C,x,N){function v(){}v.QUALITY=1,v.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,v.DEFAULT_INCREMENTAL=!1,v.DEFAULT_ANIMATION_ON_LAYOUT=!0,v.DEFAULT_ANIMATION_DURING_LAYOUT=!1,v.DEFAULT_ANIMATION_PERIOD=50,v.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,v.DEFAULT_GRAPH_MARGIN=15,v.NODE_DIMENSIONS_INCLUDE_LABELS=!1,v.SIMPLE_NODE_SIZE=40,v.SIMPLE_NODE_HALF_SIZE=v.SIMPLE_NODE_SIZE/2,v.EMPTY_COMPOUND_NODE_SIZE=40,v.MIN_EDGE_LENGTH=1,v.WORLD_BOUNDARY=1e6,v.INITIAL_WORLD_BOUNDARY=v.WORLD_BOUNDARY/1e3,v.WORLD_CENTER_X=1200,v.WORLD_CENTER_Y=900,C.exports=v},function(C,x,N){var v=N(2),l=N(8),n=N(9);function r(f,e,g){v.call(this,g),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=g,this.bendpoints=[],this.source=f,this.target=e}r.prototype=Object.create(v.prototype);for(var i in v)r[i]=v[i];r.prototype.getSource=function(){return this.source},r.prototype.getTarget=function(){return this.target},r.prototype.isInterGraph=function(){return this.isInterGraph},r.prototype.getLength=function(){return this.length},r.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},r.prototype.getBendpoints=function(){return this.bendpoints},r.prototype.getLca=function(){return this.lca},r.prototype.getSourceInLca=function(){return this.sourceInLca},r.prototype.getTargetInLca=function(){return this.targetInLca},r.prototype.getOtherEnd=function(f){if(this.source===f)return this.target;if(this.target===f)return this.source;throw"Node is not incident with this edge"},r.prototype.getOtherEndInGraph=function(f,e){for(var g=this.getOtherEnd(f),t=e.getGraphManager().getRoot();;){if(g.getOwner()==e)return g;if(g.getOwner()==t)break;g=g.getOwner().getParent()}return null},r.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=l.getIntersection(this.target.getRect(),this.source.getRect(),f),this.isOverlapingSourceAndTarget||(this.lengthX=f[0]-f[2],this.lengthY=f[1]-f[3],Math.abs(this.lengthX)<1&&(this.lengthX=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},r.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=n.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=n.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},C.exports=r},function(C,x,N){function v(l){this.vGraphObject=l}C.exports=v},function(C,x,N){var v=N(2),l=N(10),n=N(13),r=N(0),i=N(16),f=N(5);function e(t,s,o,c){o==null&&c==null&&(c=s),v.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=l.MIN_VALUE,this.inclusionTreeDepth=l.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new n(s.x,s.y,o.width,o.height):this.rect=new n}e.prototype=Object.create(v.prototype);for(var g in v)e[g]=v[g];e.prototype.getEdges=function(){return this.edges},e.prototype.getChild=function(){return this.child},e.prototype.getOwner=function(){return this.owner},e.prototype.getWidth=function(){return this.rect.width},e.prototype.setWidth=function(t){this.rect.width=t},e.prototype.getHeight=function(){return this.rect.height},e.prototype.setHeight=function(t){this.rect.height=t},e.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},e.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},e.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},e.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},e.prototype.getRect=function(){return this.rect},e.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},e.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},e.prototype.setRect=function(t,s){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=s.width,this.rect.height=s.height},e.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},e.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},e.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},e.prototype.getEdgeListToNode=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(c.target==t){if(c.source!=o)throw"Incorrect edge source!";s.push(c)}}),s},e.prototype.getEdgesBetween=function(t){var s=[],o=this;return o.edges.forEach(function(c){if(!(c.source==o||c.target==o))throw"Incorrect edge source and/or target";(c.target==t||c.source==t)&&s.push(c)}),s},e.prototype.getNeighborsList=function(){var t=new Set,s=this;return s.edges.forEach(function(o){if(o.source==s)t.add(o.target);else{if(o.target!=s)throw"Incorrect incidency!";t.add(o.source)}}),t},e.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),h=0;hs?(this.rect.x-=(this.labelWidth-s)/2,this.setWidth(this.labelWidth)):this.labelPosHorizontal=="right"&&this.setWidth(s+this.labelWidth)),this.labelHeight&&(this.labelPosVertical=="top"?(this.rect.y-=this.labelHeight,this.setHeight(o+this.labelHeight)):this.labelPosVertical=="center"&&this.labelHeight>o?(this.rect.y-=(this.labelHeight-o)/2,this.setHeight(this.labelHeight)):this.labelPosVertical=="bottom"&&this.setHeight(o+this.labelHeight))}}},e.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==l.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},e.prototype.transform=function(t){var s=this.rect.x;s>r.WORLD_BOUNDARY?s=r.WORLD_BOUNDARY:s<-r.WORLD_BOUNDARY&&(s=-r.WORLD_BOUNDARY);var o=this.rect.y;o>r.WORLD_BOUNDARY?o=r.WORLD_BOUNDARY:o<-r.WORLD_BOUNDARY&&(o=-r.WORLD_BOUNDARY);var c=new f(s,o),h=t.inverseTransformPoint(c);this.setLocation(h.x,h.y)},e.prototype.getLeft=function(){return this.rect.x},e.prototype.getRight=function(){return this.rect.x+this.rect.width},e.prototype.getTop=function(){return this.rect.y},e.prototype.getBottom=function(){return this.rect.y+this.rect.height},e.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},C.exports=e},function(C,x,N){var v=N(0);function l(){}for(var n in v)l[n]=v[n];l.MAX_ITERATIONS=2500,l.DEFAULT_EDGE_LENGTH=50,l.DEFAULT_SPRING_STRENGTH=.45,l.DEFAULT_REPULSION_STRENGTH=4500,l.DEFAULT_GRAVITY_STRENGTH=.4,l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,l.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,l.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,l.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,l.COOLING_ADAPTATION_FACTOR=.33,l.ADAPTATION_LOWER_NODE_LIMIT=1e3,l.ADAPTATION_UPPER_NODE_LIMIT=5e3,l.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,l.MAX_NODE_DISPLACEMENT=l.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,l.MIN_REPULSION_DIST=l.DEFAULT_EDGE_LENGTH/10,l.CONVERGENCE_CHECK_PERIOD=100,l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,l.MIN_EDGE_LENGTH=1,l.GRID_CALCULATION_CHECK_PERIOD=10,C.exports=l},function(C,x,N){function v(l,n){l==null&&n==null?(this.x=0,this.y=0):(this.x=l,this.y=n)}v.prototype.getX=function(){return this.x},v.prototype.getY=function(){return this.y},v.prototype.setX=function(l){this.x=l},v.prototype.setY=function(l){this.y=l},v.prototype.getDifference=function(l){return new DimensionD(this.x-l.x,this.y-l.y)},v.prototype.getCopy=function(){return new v(this.x,this.y)},v.prototype.translate=function(l){return this.x+=l.width,this.y+=l.height,this},C.exports=v},function(C,x,N){var v=N(2),l=N(10),n=N(0),r=N(7),i=N(3),f=N(1),e=N(13),g=N(12),t=N(11);function s(c,h,T){v.call(this,T),this.estimatedSize=l.MIN_VALUE,this.margin=n.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,h!=null&&h instanceof r?this.graphManager=h:h!=null&&h instanceof Layout&&(this.graphManager=h.graphManager)}s.prototype=Object.create(v.prototype);for(var o in v)s[o]=v[o];s.prototype.getNodes=function(){return this.nodes},s.prototype.getEdges=function(){return this.edges},s.prototype.getGraphManager=function(){return this.graphManager},s.prototype.getParent=function(){return this.parent},s.prototype.getLeft=function(){return this.left},s.prototype.getRight=function(){return this.right},s.prototype.getTop=function(){return this.top},s.prototype.getBottom=function(){return this.bottom},s.prototype.isConnected=function(){return this.isConnected},s.prototype.add=function(c,h,T){if(h==null&&T==null){var u=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var d=c;if(!(this.getNodes().indexOf(h)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(h.owner==T.owner&&h.owner==this))throw"Both owners must be this graph!";return h.owner!=T.owner?null:(d.source=h,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),h.edges.push(d),T!=h&&T.edges.push(d),d)}},s.prototype.remove=function(c){var h=c;if(c instanceof i){if(h==null)throw"Node is null!";if(!(h.owner!=null&&h.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=h.edges.slice(),u,d=T.length,L=0;L-1&&P>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(w,1),u.target!=u.source&&u.target.edges.splice(P,1);var b=u.source.owner.getEdges().indexOf(u);if(b==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=l.MAX_VALUE,h=l.MAX_VALUE,T,u,d,L=this.getNodes(),b=L.length,w=0;wT&&(c=T),h>u&&(h=u)}return c==l.MAX_VALUE?null:(L[0].getParent().paddingLeft!=null?d=L[0].getParent().paddingLeft:d=this.margin,this.left=h-d,this.top=c-d,new g(this.left,this.top))},s.prototype.updateBounds=function(c){for(var h=l.MAX_VALUE,T=-l.MAX_VALUE,u=l.MAX_VALUE,d=-l.MAX_VALUE,L,b,w,P,V,Y=this.nodes,B=Y.length,A=0;AL&&(h=L),Tw&&(u=w),dL&&(h=L),Tw&&(u=w),d=this.nodes.length){var B=0;T.forEach(function(A){A.owner==c&&B++}),B==this.nodes.length&&(this.isConnected=!0)}},C.exports=s},function(C,x,N){var v,l=N(1);function n(r){v=N(6),this.layout=r,this.graphs=[],this.edges=[]}n.prototype.addRoot=function(){var r=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(r,i);return this.setRootGraph(f),this.rootGraph},n.prototype.add=function(r,i,f,e,g){if(f==null&&e==null&&g==null){if(r==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(r)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(r),r.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return r.parent=i,i.child=r,r}else{g=f,e=i,f=r;var t=e.getOwner(),s=g.getOwner();if(!(t!=null&&t.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(s!=null&&s.getGraphManager()==this))throw"Target not in this graph mgr!";if(t==s)return f.isInterGraph=!1,t.add(f,e,g);if(f.isInterGraph=!0,f.source=e,f.target=g,this.edges.indexOf(f)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(f),!(f.source!=null&&f.target!=null))throw"Edge source and/or target is null!";if(!(f.source.edges.indexOf(f)==-1&&f.target.edges.indexOf(f)==-1))throw"Edge already in source and/or target incidency list!";return f.source.edges.push(f),f.target.edges.push(f),f}},n.prototype.remove=function(r){if(r instanceof v){var i=r;if(i.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(i==this.rootGraph||i.parent!=null&&i.parent.graphManager==this))throw"Invalid parent node!";var f=[];f=f.concat(i.getEdges());for(var e,g=f.length,t=0;t=r.getRight()?i[0]+=Math.min(r.getX()-n.getX(),n.getRight()-r.getRight()):r.getX()<=n.getX()&&r.getRight()>=n.getRight()&&(i[0]+=Math.min(n.getX()-r.getX(),r.getRight()-n.getRight())),n.getY()<=r.getY()&&n.getBottom()>=r.getBottom()?i[1]+=Math.min(r.getY()-n.getY(),n.getBottom()-r.getBottom()):r.getY()<=n.getY()&&r.getBottom()>=n.getBottom()&&(i[1]+=Math.min(n.getY()-r.getY(),r.getBottom()-n.getBottom()));var g=Math.abs((r.getCenterY()-n.getCenterY())/(r.getCenterX()-n.getCenterX()));r.getCenterY()===n.getCenterY()&&r.getCenterX()===n.getCenterX()&&(g=1);var t=g*i[0],s=i[1]/g;i[0]t)return i[0]=f,i[1]=o,i[2]=g,i[3]=Y,!1;if(eg)return i[0]=s,i[1]=e,i[2]=P,i[3]=t,!1;if(fg?(i[0]=h,i[1]=T,a=!0):(i[0]=c,i[1]=o,a=!0):p===y&&(f>g?(i[0]=s,i[1]=o,a=!0):(i[0]=u,i[1]=T,a=!0)),-m===y?g>f?(i[2]=V,i[3]=Y,E=!0):(i[2]=P,i[3]=w,E=!0):m===y&&(g>f?(i[2]=b,i[3]=w,E=!0):(i[2]=B,i[3]=Y,E=!0)),a&&E)return!1;if(f>g?e>t?(S=this.getCardinalDirection(p,y,4),D=this.getCardinalDirection(m,y,2)):(S=this.getCardinalDirection(-p,y,3),D=this.getCardinalDirection(-m,y,1)):e>t?(S=this.getCardinalDirection(-p,y,1),D=this.getCardinalDirection(-m,y,3)):(S=this.getCardinalDirection(p,y,2),D=this.getCardinalDirection(m,y,4)),!a)switch(S){case 1:W=o,F=f+-L/y,i[0]=F,i[1]=W;break;case 2:F=u,W=e+d*y,i[0]=F,i[1]=W;break;case 3:W=T,F=f+L/y,i[0]=F,i[1]=W;break;case 4:F=h,W=e+-d*y,i[0]=F,i[1]=W;break}if(!E)switch(D){case 1:Q=w,R=g+-j/y,i[2]=R,i[3]=Q;break;case 2:R=B,Q=t+A*y,i[2]=R,i[3]=Q;break;case 3:Q=Y,R=g+j/y,i[2]=R,i[3]=Q;break;case 4:R=V,Q=t+-A*y,i[2]=R,i[3]=Q;break}}return!1},l.getCardinalDirection=function(n,r,i){return n>r?i:1+i%4},l.getIntersection=function(n,r,i,f){if(f==null)return this.getIntersection2(n,r,i);var e=n.x,g=n.y,t=r.x,s=r.y,o=i.x,c=i.y,h=f.x,T=f.y,u=void 0,d=void 0,L=void 0,b=void 0,w=void 0,P=void 0,V=void 0,Y=void 0,B=void 0;return L=s-g,w=e-t,V=t*g-e*s,b=T-c,P=o-h,Y=h*c-o*T,B=L*P-b*w,B===0?null:(u=(w*Y-P*V)/B,d=(b*V-L*Y)/B,new v(u,d))},l.angleOfVector=function(n,r,i,f){var e=void 0;return n!==i?(e=Math.atan((f-r)/(i-n)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),u=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:u>=0&&u<=1?[u]:d}else return null},l.HALF_PI=.5*Math.PI,l.ONE_AND_HALF_PI=1.5*Math.PI,l.TWO_PI=2*Math.PI,l.THREE_PI=3*Math.PI,C.exports=l},function(C,x,N){function v(){}v.sign=function(l){return l>0?1:l<0?-1:0},v.floor=function(l){return l<0?Math.ceil(l):Math.floor(l)},v.ceil=function(l){return l<0?Math.floor(l):Math.ceil(l)},C.exports=v},function(C,x,N){function v(){}v.MAX_VALUE=2147483647,v.MIN_VALUE=-2147483648,C.exports=v},function(C,x,N){var v=function(){function e(g,t){for(var s=0;s"u"?"undefined":v(n);return n==null||r!="object"&&r!="function"},C.exports=l},function(C,x,N){function v(o){if(Array.isArray(o)){for(var c=0,h=Array(o.length);c0&&c;){for(L.push(w[0]);L.length>0&&c;){var P=L[0];L.splice(0,1),d.add(P);for(var V=P.getEdges(),u=0;u-1&&w.splice(j,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],h=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),u=0;u0){for(var T=this.edgeToDummyNodes.get(h),u=0;u=0&&c.splice(Y,1);var B=b.getNeighborsList();B.forEach(function(a){if(h.indexOf(a)<0){var E=T.get(a),p=E-1;p==1&&P.push(a),T.set(a,p)}})}h=h.concat(P),(c.length==1||c.length==2)&&(u=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},C.exports=s},function(C,x,N){function v(){}v.seed=1,v.x=0,v.nextDouble=function(){return v.x=Math.sin(v.seed++)*1e4,v.x-Math.floor(v.x)},C.exports=v},function(C,x,N){var v=N(5);function l(n,r){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}l.prototype.getWorldOrgX=function(){return this.lworldOrgX},l.prototype.setWorldOrgX=function(n){this.lworldOrgX=n},l.prototype.getWorldOrgY=function(){return this.lworldOrgY},l.prototype.setWorldOrgY=function(n){this.lworldOrgY=n},l.prototype.getWorldExtX=function(){return this.lworldExtX},l.prototype.setWorldExtX=function(n){this.lworldExtX=n},l.prototype.getWorldExtY=function(){return this.lworldExtY},l.prototype.setWorldExtY=function(n){this.lworldExtY=n},l.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},l.prototype.setDeviceOrgX=function(n){this.ldeviceOrgX=n},l.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},l.prototype.setDeviceOrgY=function(n){this.ldeviceOrgY=n},l.prototype.getDeviceExtX=function(){return this.ldeviceExtX},l.prototype.setDeviceExtX=function(n){this.ldeviceExtX=n},l.prototype.getDeviceExtY=function(){return this.ldeviceExtY},l.prototype.setDeviceExtY=function(n){this.ldeviceExtY=n},l.prototype.transformX=function(n){var r=0,i=this.lworldExtX;return i!=0&&(r=this.ldeviceOrgX+(n-this.lworldOrgX)*this.ldeviceExtX/i),r},l.prototype.transformY=function(n){var r=0,i=this.lworldExtY;return i!=0&&(r=this.ldeviceOrgY+(n-this.lworldOrgY)*this.ldeviceExtY/i),r},l.prototype.inverseTransformX=function(n){var r=0,i=this.ldeviceExtX;return i!=0&&(r=this.lworldOrgX+(n-this.ldeviceOrgX)*this.lworldExtX/i),r},l.prototype.inverseTransformY=function(n){var r=0,i=this.ldeviceExtY;return i!=0&&(r=this.lworldOrgY+(n-this.ldeviceOrgY)*this.lworldExtY/i),r},l.prototype.inverseTransformPoint=function(n){var r=new v(this.inverseTransformX(n.x),this.inverseTransformY(n.y));return r},C.exports=l},function(C,x,N){function v(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sn.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*n.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-n.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>n.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(n.COOLING_ADAPTATION_FACTOR,1-(t-n.ADAPTATION_LOWER_NODE_LIMIT)/(n.ADAPTATION_UPPER_NODE_LIMIT-n.ADAPTATION_LOWER_NODE_LIMIT)*(1-n.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=n.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*n.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},e.prototype.calcSpringForces=function(){for(var t=this.getAllEdges(),s,o=0;o0&&arguments[0]!==void 0?arguments[0]:!0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o,c,h,T,u=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%n.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oL||d>L)&&(t.gravitationForceX=-this.gravityConstant*h,t.gravitationForceY=-this.gravityConstant*T)):(L=s.getEstimatedSize()*this.compoundGravityRangeFactor,(u>L||d>L)&&(t.gravitationForceX=-this.gravityConstant*h*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},e.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=u.length||L>=u[0].length)){for(var b=0;be}}]),i}();C.exports=r},function(C,x,N){function v(){}v.svd=function(l){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=l.length,this.n=l[0].length;var n=Math.min(this.m,this.n);this.s=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(Math.min(this.m+1,this.n)),this.U=function(Tt){var wt=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)wt.push(0);return wt}(this.n),i=function(Tt){for(var wt=[];Tt-- >0;)wt.push(0);return wt}(this.m),f=!0,e=Math.min(this.m-1,this.n),g=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;m--)if(this.s[m]!==0){for(var y=m+1;y=0;z--){if(function(Tt,wt){return Tt&&wt}(z0;){var J=void 0,It=void 0;for(J=a-2;J>=-1&&J!==-1;J--)if(Math.abs(r[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){r[J]=0;break}if(J===a-2)It=4;else{var Nt=void 0;for(Nt=a-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==a?Math.abs(r[Nt]):0)+(Nt!==J+1?Math.abs(r[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===a-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=r[a-2];r[a-2]=0;for(var ut=a-2;ut>=J;ut--){var Et=v.hypot(this.s[ut],it),Ct=this.s[ut]/Et,Dt=it/Et;this.s[ut]=Et,ut!==J&&(it=-Dt*r[ut-1],r[ut-1]=Ct*r[ut-1]);for(var mt=0;mt=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(n)?(r=n/l,r=Math.abs(l)*Math.sqrt(1+r*r)):n!=0?(r=l/n,r=Math.abs(n)*Math.sqrt(1+r*r)):r=0,r},C.exports=v},function(C,x,N){var v=function(){function r(i,f){for(var e=0;e2&&arguments[2]!==void 0?arguments[2]:1,g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;l(this,r),this.sequence1=i,this.sequence2=f,this.match_score=e,this.mismatch_penalty=g,this.gap_penalty=t,this.iMax=i.length+1,this.jMax=f.length+1,this.grid=new Array(this.iMax);for(var s=0;s=0;i--){var f=this.listeners[i];f.event===n&&f.callback===r&&this.listeners.splice(i,1)}},l.emit=function(n,r){for(var i=0;i{var x={45:(n,r,i)=>{var f={};f.layoutBase=i(551),f.CoSEConstants=i(806),f.CoSEEdge=i(767),f.CoSEGraph=i(880),f.CoSEGraphManager=i(578),f.CoSELayout=i(765),f.CoSENode=i(991),f.ConstraintHandler=i(902),n.exports=f},806:(n,r,i)=>{var f=i(551).FDLayoutConstants;function e(){}for(var g in f)e[g]=f[g];e.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,e.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,e.DEFAULT_COMPONENT_SEPERATION=60,e.TILE=!0,e.TILING_PADDING_VERTICAL=10,e.TILING_PADDING_HORIZONTAL=10,e.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,e.ENFORCE_CONSTRAINTS=!0,e.APPLY_LAYOUT=!0,e.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,e.TREE_REDUCTION_ON_INCREMENTAL=!0,e.PURE_INCREMENTAL=e.DEFAULT_INCREMENTAL,n.exports=e},767:(n,r,i)=>{var f=i(551).FDLayoutEdge;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e},880:(n,r,i)=>{var f=i(551).LGraph;function e(t,s,o){f.call(this,t,s,o)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e},578:(n,r,i)=>{var f=i(551).LGraphManager;function e(t){f.call(this,t)}e.prototype=Object.create(f.prototype);for(var g in f)e[g]=f[g];n.exports=e},765:(n,r,i)=>{var f=i(551).FDLayout,e=i(578),g=i(880),t=i(991),s=i(767),o=i(806),c=i(902),h=i(551).FDLayoutConstants,T=i(551).LayoutConstants,u=i(551).Point,d=i(551).PointD,L=i(551).DimensionD,b=i(551).Layout,w=i(551).Integer,P=i(551).IGeometry,V=i(551).LGraph,Y=i(551).Transform,B=i(551).LinkedList;function A(){f.call(this),this.toBeTiled={},this.constraints={}}A.prototype=Object.create(f.prototype);for(var j in f)A[j]=f[j];A.prototype.newGraphManager=function(){var a=new e(this);return this.graphManager=a,a},A.prototype.newGraph=function(a){return new g(null,this.graphManager,a)},A.prototype.newNode=function(a){return new t(this.graphManager,a)},A.prototype.newEdge=function(a){return new s(null,null,a)},A.prototype.initParameters=function(){f.prototype.initParameters.call(this,arguments),this.isSubLayout||(o.DEFAULT_EDGE_LENGTH<10?this.idealEdgeLength=10:this.idealEdgeLength=o.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=o.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.gravityConstant=h.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=h.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=h.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},A.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/h.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},A.prototype.layout=function(){var a=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return a&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},A.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(o.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(S){return E.has(S)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var a=this.getFlatForest();if(a.length>0)this.positionNodesRadially(a);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var E=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(m){return E.has(m)});this.graphManager.setAllNodesToApplyGravitation(p),this.positionNodesRandomly()}}return Object.keys(this.constraints).length>0&&(c.handleConstraints(this),this.initConstraintVariables()),this.initSpringEmbedder(),o.APPLY_LAYOUT&&this.runSpringEmbedder(),!0},A.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 a=new Set(this.getAllNodes()),E=this.nodesWithGravity.filter(function(y){return a.has(y)});this.graphManager.setAllNodesToApplyGravitation(E),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2: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()),o.PURE_INCREMENTAL?this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=h.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,m=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,m),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},A.prototype.getPositionsData=function(){for(var a=this.graphManager.getAllNodes(),E={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(m.fixedNodeWeight=S)}}if(this.constraints.relativePlacementConstraint){var D=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(O){a.fixedNodesOnHorizontal.add(O),a.fixedNodesOnVertical.add(O)}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var W=this.constraints.alignmentConstraint.vertical,p=0;p=2*O.length/3;tt--)H=Math.floor(Math.random()*(tt+1)),Z=O[tt],O[tt]=O[H],O[H]=Z;return O},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(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,Z=D.has(O.right)?D.get(O.right):O.right;a.nodesInRelativeHorizontal.includes(H)||(a.nodesInRelativeHorizontal.push(H),a.nodeToRelativeConstraintMapHorizontal.set(H,[]),a.dummyToNodeForVerticalAlignment.has(H)?a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(H,a.idToNodeMap.get(H).getCenterX())),a.nodesInRelativeHorizontal.includes(Z)||(a.nodesInRelativeHorizontal.push(Z),a.nodeToRelativeConstraintMapHorizontal.set(Z,[]),a.dummyToNodeForVerticalAlignment.has(Z)?a.nodeToTempPositionMapHorizontal.set(Z,a.idToNodeMap.get(a.dummyToNodeForVerticalAlignment.get(Z)[0]).getCenterX()):a.nodeToTempPositionMapHorizontal.set(Z,a.idToNodeMap.get(Z).getCenterX())),a.nodeToRelativeConstraintMapHorizontal.get(H).push({right:Z,gap:O.gap}),a.nodeToRelativeConstraintMapHorizontal.get(Z).push({left:H,gap:O.gap})}else{var tt=F.has(O.top)?F.get(O.top):O.top,ht=F.has(O.bottom)?F.get(O.bottom):O.bottom;a.nodesInRelativeVertical.includes(tt)||(a.nodesInRelativeVertical.push(tt),a.nodeToRelativeConstraintMapVertical.set(tt,[]),a.dummyToNodeForHorizontalAlignment.has(tt)?a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(tt,a.idToNodeMap.get(tt).getCenterY())),a.nodesInRelativeVertical.includes(ht)||(a.nodesInRelativeVertical.push(ht),a.nodeToRelativeConstraintMapVertical.set(ht,[]),a.dummyToNodeForHorizontalAlignment.has(ht)?a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(a.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):a.nodeToTempPositionMapVertical.set(ht,a.idToNodeMap.get(ht).getCenterY())),a.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),a.nodeToRelativeConstraintMapVertical.get(ht).push({top:tt,gap:O.gap})}});else{var Q=new Map,z=new Map;this.constraints.relativePlacementConstraint.forEach(function(O){if(O.left){var H=D.has(O.left)?D.get(O.left):O.left,Z=D.has(O.right)?D.get(O.right):O.right;Q.has(H)?Q.get(H).push(Z):Q.set(H,[Z]),Q.has(Z)?Q.get(Z).push(H):Q.set(Z,[H])}else{var tt=F.has(O.top)?F.get(O.top):O.top,ht=F.has(O.bottom)?F.get(O.bottom):O.bottom;z.has(tt)?z.get(tt).push(ht):z.set(tt,[ht]),z.has(ht)?z.get(ht).push(tt):z.set(ht,[tt])}});var X=function(H,Z){var tt=[],ht=[],J=new B,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var ut=it;for(J.push(ut),It.add(ut),tt[Nt].push(ut);J.length!=0;){ut=J.shift(),Z.has(ut)&&(ht[Nt]=!0);var Et=H.get(ut);Et.forEach(function(Ct){It.has(Ct)||(J.push(Ct),It.add(Ct),tt[Nt].push(Ct))})}Nt++}}),{components:tt,isFixed:ht}},rt=X(Q,a.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=X(z,a.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},A.prototype.updateDisplacements=function(){var a=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=a.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var E=this.constraints.alignmentConstraint.vertical,p=0;p1){var F;for(F=0;Fm&&(m=Math.floor(D.y)),S=Math.floor(D.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-D.x/2,T.WORLD_CENTER_Y-D.y/2))},A.radialLayout=function(a,E,p){var m=Math.max(this.maxDiagonalInTree(a),o.DEFAULT_RADIAL_SEPARATION);A.branchRadialLayout(E,null,0,359,0,m);var y=V.calculateBounds(a),S=new Y;S.setDeviceOrgX(y.getMinX()),S.setDeviceOrgY(y.getMinY()),S.setWorldOrgX(p.x),S.setWorldOrgY(p.y);for(var D=0;D1;){var Z=H[0];H.splice(0,1);var tt=z.indexOf(Z);tt>=0&&z.splice(tt,1),$--,X--}E!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(m-p)/X,J=O;rt!=X;J=++J%$){var It=z[J].getOtherEnd(a);if(It!=E){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;A.branchRadialLayout(It,a,Nt,vt,y+S,S),rt++}}},A.maxDiagonalInTree=function(a){for(var E=w.MIN_VALUE,p=0;pE&&(E=y)}return E},A.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},A.prototype.groupZeroDegreeMembers=function(){var a=this,E={};this.memberGroups={},this.idToDummyNode={};for(var p=[],m=this.graphManager.getAllNodes(),y=0;y"u"&&(E[F]=[]),E[F]=E[F].concat(S)}Object.keys(E).forEach(function(W){if(E[W].length>1){var R="DummyCompound_"+W;a.memberGroups[R]=E[W];var Q=E[W][0].getParent(),z=new t(a.graphManager);z.id=R,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,a.idToDummyNode[R]=z;var X=a.getGraphManager().add(a.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(m.rect.x-=(m.labelWidth-y)/2,m.setWidth(m.labelWidth),m.labelMarginLeft=(m.labelWidth-y)/2):m.labelPosHorizontal=="right"&&m.setWidth(y+m.labelWidth)),m.labelHeight&&(m.labelPosVertical=="top"?(m.rect.y-=m.labelHeight,m.setHeight(S+m.labelHeight),m.labelMarginTop=m.labelHeight):m.labelPosVertical=="center"&&m.labelHeight>S?(m.rect.y-=(m.labelHeight-S)/2,m.setHeight(m.labelHeight),m.labelMarginTop=(m.labelHeight-S)/2):m.labelPosVertical=="bottom"&&m.setHeight(S+m.labelHeight))}})},A.prototype.repopulateCompounds=function(){for(var a=this.compoundOrder.length-1;a>=0;a--){var E=this.compoundOrder[a],p=E.id,m=E.paddingLeft,y=E.paddingTop,S=E.labelMarginLeft,D=E.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],E.rect.x,E.rect.y,m,y,S,D)}},A.prototype.repopulateZeroDegreeMembers=function(){var a=this,E=this.tiledZeroDegreePack;Object.keys(E).forEach(function(p){var m=a.idToDummyNode[p],y=m.paddingLeft,S=m.paddingTop,D=m.labelMarginLeft,F=m.labelMarginTop;a.adjustLocations(E[p],m.rect.x,m.rect.y,y,S,D,F)})},A.prototype.getToBeTiled=function(a){var E=a.id;if(this.toBeTiled[E]!=null)return this.toBeTiled[E];var p=a.getChild();if(p==null)return this.toBeTiled[E]=!1,!1;for(var m=p.getNodes(),y=0;y0)return this.toBeTiled[E]=!1,!1;if(S.getChild()==null){this.toBeTiled[S.id]=!1;continue}if(!this.getToBeTiled(S))return this.toBeTiled[E]=!1,!1}return this.toBeTiled[E]=!0,!0},A.prototype.getNodeDegree=function(a){a.id;for(var E=a.getEdges(),p=0,m=0;mQ&&(Q=X.rect.height)}p+=Q+a.verticalPadding}},A.prototype.tileCompoundMembers=function(a,E){var p=this;this.tiledMemberPack=[],Object.keys(a).forEach(function(m){var y=E[m];if(p.tiledMemberPack[m]=p.tileNodes(a[m],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[m].width,y.rect.height=p.tiledMemberPack[m].height,y.setCenter(p.tiledMemberPack[m].centerX,p.tiledMemberPack[m].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var S=y.rect.width,D=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(S+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>S?(y.rect.x-=(y.labelWidth-S)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-S)/2):y.labelPosHorizontal=="right"&&y.setWidth(S+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(D+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>D?(y.rect.y-=(y.labelHeight-D)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-D)/2):y.labelPosVertical=="bottom"&&y.setHeight(D+y.labelHeight))}})},A.prototype.tileNodes=function(a,E){var p=this.tileNodesByFavoringDim(a,E,!0),m=this.tileNodesByFavoringDim(a,E,!1),y=this.getOrgRatio(p),S=this.getOrgRatio(m),D;return SF&&(F=$.getWidth())});var W=S/y,R=D/y,Q=Math.pow(p-m,2)+4*(W+m)*(R+p)*y,z=(m-p+Math.sqrt(Q))/(2*(W+m)),X;E?(X=Math.ceil(z),X==z&&X++):X=Math.floor(z);var rt=X*(W+m)-m;return F>rt&&(rt=F),rt+=m*2,rt},A.prototype.tileNodesByFavoringDim=function(a,E,p){var m=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,S=o.TILING_COMPARE_BY,D={rows:[],rowWidth:[],rowHeight:[],width:0,height:E,verticalPadding:m,horizontalPadding:y,centerX:0,centerY:0};S&&(D.idealRowWidth=this.calcIdealRowWidth(a,p));var F=function(O){return O.rect.width*O.rect.height},W=function(O,H){return F(H)-F(O)};a.sort(function($,O){var H=W;return D.idealRowWidth?(H=S,H($.id,O.id)):H($,O)});for(var R=0,Q=0,z=0;z0&&(D+=a.horizontalPadding),a.rowWidth[p]=D,a.width0&&(F+=a.verticalPadding);var W=0;F>a.rowHeight[p]&&(W=a.rowHeight[p],a.rowHeight[p]=F,W=a.rowHeight[p]-W),a.height+=W,a.rows[p].push(E)},A.prototype.getShortestRowIndex=function(a){for(var E=-1,p=Number.MAX_VALUE,m=0;mp&&(E=m,p=a.rowWidth[m]);return E},A.prototype.canAddHorizontal=function(a,E,p){if(a.idealRowWidth){var m=a.rows.length-1,y=a.rowWidth[m];return y+E+a.horizontalPadding<=a.idealRowWidth}var S=this.getShortestRowIndex(a);if(S<0)return!0;var D=a.rowWidth[S];if(D+a.horizontalPadding+E<=a.width)return!0;var F=0;a.rowHeight[S]0&&(F=p+a.verticalPadding-a.rowHeight[S]);var W;a.width-D>=E+a.horizontalPadding?W=(a.height+F)/(D+E+a.horizontalPadding):W=(a.height+F)/a.width,F=p+a.verticalPadding;var R;return a.widthS&&E!=p){m.splice(-1,1),a.rows[p].push(y),a.rowWidth[E]=a.rowWidth[E]-S,a.rowWidth[p]=a.rowWidth[p]+S,a.width=a.rowWidth[instance.getLongestRowIndex(a)];for(var D=Number.MIN_VALUE,F=0;FD&&(D=m[F].height);E>0&&(D+=a.verticalPadding);var W=a.rowHeight[E]+a.rowHeight[p];a.rowHeight[E]=D,a.rowHeight[p]0)for(var rt=y;rt<=S;rt++)X[0]+=this.grid[rt][D-1].length+this.grid[rt][D].length-1;if(S0)for(var rt=D;rt<=F;rt++)X[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=w.MAX_VALUE,O,H,Z=0;Z{var f=i(551).FDLayoutNode,e=i(551).IMath;function g(s,o,c,h){f.call(this,s,o,c,h)}g.prototype=Object.create(f.prototype);for(var t in f)g[t]=f[t];g.prototype.calculateDisplacement=function(){var s=this.graphManager.getLayout();this.getChild()!=null&&this.fixedNodeWeight?(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=s.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=s.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementX=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*e.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},g.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),h,T=0;T{function f(c){if(Array.isArray(c)){for(var h=0,T=Array(c.length);h0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,u.has(st)?d[u.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,u.has(st)?L[u.get(st)]:q.get(st)),Lt+=et.get(st))}),Lt=Lt/ot.length,lt.forEach(function(st){K.has(st)||et.set(st,Lt)})}else{var ft=0;lt.forEach(function(st){k=="horizontal"?ft+=u.has(st)?d[u.get(st)]:q.get(st):ft+=u.has(st)?L[u.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var Mt=function(){var ot=dt.shift(),Lt=U.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=Zt),KtXt&&(Xt=Kt)}}catch(ee){wt=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(wt)throw $t}}var he=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),oe;!(Qt=(oe=Jt.next()).done);Qt=!0){var te=oe.value;et.set(te,et.get(te)+he)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},j=function(U){var k=0,K=0,q=0,at=0;if(U.forEach(function(_){_.left?d[u.get(_.left)]-d[u.get(_.right)]>=0?k++:K++:L[u.get(_.top)]-L[u.get(_.bottom)]>=0?q++:at++}),k>K&&q>at)for(var gt=0;gtK)for(var nt=0;ntat)for(var et=0;et1)h.fixedNodeConstraint.forEach(function(G,U){m[U]=[G.position.x,G.position.y],y[U]=[d[u.get(G.nodeId)],L[u.get(G.nodeId)]]}),S=!0;else if(h.alignmentConstraint)(function(){var G=0;if(h.alignmentConstraint.vertical){for(var U=h.alignmentConstraint.vertical,k=function(et){var _=new Set;U[et].forEach(function(pt){_.add(pt)});var dt=new Set([].concat(f(_)).filter(function(pt){return F.has(pt)})),Mt=void 0;dt.size>0?Mt=d[u.get(dt.values().next().value)]:Mt=B(_).x,U[et].forEach(function(pt){m[G]=[Mt,L[u.get(pt)]],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},K=0;K0?Mt=d[u.get(dt.values().next().value)]:Mt=B(_).y,q[et].forEach(function(pt){m[G]=[d[u.get(pt)],Mt],y[G]=[d[u.get(pt)],L[u.get(pt)]],G++})},gt=0;gtz&&(z=Q[rt].length,X=rt);if(z0){var mt={x:0,y:0};h.fixedNodeConstraint.forEach(function(G,U){var k={x:d[u.get(G.nodeId)],y:L[u.get(G.nodeId)]},K=G.position,q=Y(K,k);mt.x+=q.x,mt.y+=q.y}),mt.x/=h.fixedNodeConstraint.length,mt.y/=h.fixedNodeConstraint.length,d.forEach(function(G,U){d[U]+=mt.x}),L.forEach(function(G,U){L[U]+=mt.y}),h.fixedNodeConstraint.forEach(function(G){d[u.get(G.nodeId)]=G.position.x,L[u.get(G.nodeId)]=G.position.y})}if(h.alignmentConstraint){if(h.alignmentConstraint.vertical)for(var Ot=h.alignmentConstraint.vertical,Rt=function(U){var k=new Set;Ot[U].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return F.has(at)})),q=void 0;K.size>0?q=d[u.get(K.values().next().value)]:q=B(k).x,k.forEach(function(at){F.has(at)||(d[u.get(at)]=q)})},Ht=0;Ht0?q=L[u.get(K.values().next().value)]:q=B(k).y,k.forEach(function(at){F.has(at)||(L[u.get(at)]=q)})},Ft=0;Ft{n.exports=C}},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return x[n](i,i.exports,v),i.exports}var l=v(45);return l})()})}(ue)),ue.exports}(function(I,M){(function(x,N){I.exports=N(vr())})(Te,function(C){return(()=>{var x={658:n=>{n.exports=Object.assign!=null?Object.assign.bind(Object):function(r){for(var i=arguments.length,f=Array(i>1?i-1:0),e=1;e{var f=function(){function t(s,o){var c=[],h=!0,T=!1,u=void 0;try{for(var d=s[Symbol.iterator](),L;!(h=(L=d.next()).done)&&(c.push(L.value),!(o&&c.length===o));h=!0);}catch(b){T=!0,u=b}finally{try{!h&&d.return&&d.return()}finally{if(T)throw u}}return c}return function(s,o){if(Array.isArray(s))return s;if(Symbol.iterator in Object(s))return t(s,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),e=i(140).layoutBase.LinkedList,g={};g.getTopMostNodes=function(t){for(var s={},o=0;o0&&S.merge(R)});for(var D=0;D1){L=u[0],b=L.connectedEdges().length,u.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),Y},g.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,h=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,L=!1,b=void 0;try{for(var w=s.nodeIndexes[Symbol.iterator](),P;!(d=(P=w.next()).done);d=!0){var V=P.value,Y=f(V,2),B=Y[0],A=Y[1],j=o.cy.getElementById(B);if(j){var a=j.boundingBox(),E=s.xCoords[A]-a.w/2,p=s.xCoords[A]+a.w/2,m=s.yCoords[A]-a.h/2,y=s.yCoords[A]+a.h/2;Eh&&(h=p),mu&&(u=y)}}}catch(R){L=!0,b=R}finally{try{!d&&w.return&&w.return()}finally{if(L)throw b}}var S=t.x-(h+c)/2,D=t.y-(u+T)/2;s.xCoords=s.xCoords.map(function(R){return R+S}),s.yCoords=s.yCoords.map(function(R){return R+D})}else{Object.keys(s).forEach(function(R){var Q=s[R],z=Q.getRect().x,X=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zh&&(h=X),rtu&&(u=$)});var F=t.x-(h+c)/2,W=t.y-(u+T)/2;Object.keys(s).forEach(function(R){var Q=s[R];Q.setCenter(Q.getCenterX()+F,Q.getCenterY()+W)})}}},g.calcBoundingBox=function(t,s,o,c){for(var h=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,u=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,L=void 0,b=void 0,w=void 0,P=void 0,V=t.descendants().not(":parent"),Y=V.length,B=0;BL&&(h=L),Tw&&(u=w),d{var f=i(548),e=i(140).CoSELayout,g=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,h=i(140).CoSEConstants,T=function(d,L){var b=d.cy,w=d.eles,P=w.nodes(),V=w.edges(),Y=void 0,B=void 0,A=void 0,j={};d.randomize&&(Y=L.nodeIndexes,B=L.xCoords,A=L.yCoords);var a=function(R){return typeof R=="function"},E=function(R,Q){return a(R)?R(Q):R},p=f.calcParentsWithoutChildren(b,w),m=function W(R,Q,z,X){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),Z),W(J,H,z,X)}}},y=function(R,Q,z){for(var X=0,rt=0,$=0;$0?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=X/rt:a(d.idealEdgeLength)?h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:h.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,h.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,h.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},S=function(R,Q){Q.fixedNodeConstraint&&(R.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(R.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(R.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(h.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(h.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(h.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(h.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(h.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,h.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,h.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,h.TILE=d.tile,h.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,h.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,h.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,h.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!1),d.step=="enforced"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!1),d.step=="cose"&&(h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!1,h.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?h.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:h.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,h.ENFORCE_CONSTRAINTS=!0,h.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?h.TREE_REDUCTION_ON_INCREMENTAL=!1:h.TREE_REDUCTION_ON_INCREMENTAL=!0;var D=new e,F=D.newGraphManager();return m(F.addRoot(),f.getTopMostNodes(P),D,d),y(D,F,V),S(D,d),D.runLayout(),j};n.exports={coseLayout:T}},212:(n,r,i)=>{var f=function(){function d(L,b){for(var w=0;w0)if(p){var S=t.getTopMostNodes(w.eles.nodes());if(A=t.connectComponents(P,w.eles,S),A.forEach(function(vt){var it=vt.boundingBox();j.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),w.randomize&&A.forEach(function(vt){w.eles=vt,Y.push(o(w))}),w.quality=="default"||w.quality=="proof"){var D=P.collection();if(w.tile){var F=new Map,W=[],R=[],Q=0,z={nodeIndexes:F,xCoords:W,yCoords:R},X=[];if(A.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(ut,Et){D.merge(vt.nodes()[Et]),ut.isParent()||(z.nodeIndexes.set(vt.nodes()[Et].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),X.push(it))}),D.length>1){var rt=D.boundingBox();j.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),A.push(D),Y.push(z);for(var $=X.length-1;$>=0;$--)A.splice(X[$],1),Y.splice(X[$],1),j.splice(X[$],1)}}A.forEach(function(vt,it){w.eles=vt,B.push(h(w,Y[it])),t.relocateComponent(j[it],B[it],w)})}else A.forEach(function(vt,it){t.relocateComponent(j[it],Y[it],w)});var O=new Set;if(A.length>1){var H=[],Z=V.filter(function(vt){return vt.css("display")=="none"});A.forEach(function(vt,it){var ut=void 0;if(w.quality=="draft"&&(ut=Y[it].nodeIndexes),vt.nodes().not(Z).length>0){var Et={};Et.edges=[],Et.nodes=[];var Ct=void 0;vt.nodes().not(Z).forEach(function(Dt){if(w.quality=="draft")if(!Dt.isParent())Ct=ut.get(Dt.id()),Et.nodes.push({x:Y[it].xCoords[Ct]-Dt.boundingbox().w/2,y:Y[it].yCoords[Ct]-Dt.boundingbox().h/2,width:Dt.boundingbox().w,height:Dt.boundingbox().h});else{var mt=t.calcBoundingBox(Dt,Y[it].xCoords,Y[it].yCoords,ut);Et.nodes.push({x:mt.topLeftX,y:mt.topLeftY,width:mt.width,height:mt.height})}else B[it][Dt.id()]&&Et.nodes.push({x:B[it][Dt.id()].getLeft(),y:B[it][Dt.id()].getTop(),width:B[it][Dt.id()].getWidth(),height:B[it][Dt.id()].getHeight()})}),vt.edges().forEach(function(Dt){var mt=Dt.source(),Ot=Dt.target();if(mt.css("display")!="none"&&Ot.css("display")!="none")if(w.quality=="draft"){var Rt=ut.get(mt.id()),Ht=ut.get(Ot.id()),Ut=[],Gt=[];if(mt.isParent()){var Ft=t.calcBoundingBox(mt,Y[it].xCoords,Y[it].yCoords,ut);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(Y[it].xCoords[Rt]),Ut.push(Y[it].yCoords[Rt]);if(Ot.isParent()){var Yt=t.calcBoundingBox(Ot,Y[it].xCoords,Y[it].yCoords,ut);Gt.push(Yt.topLeftX+Yt.width/2),Gt.push(Yt.topLeftY+Yt.height/2)}else Gt.push(Y[it].xCoords[Ht]),Gt.push(Y[it].yCoords[Ht]);Et.edges.push({startX:Ut[0],startY:Ut[1],endX:Gt[0],endY:Gt[1]})}else B[it][mt.id()]&&B[it][Ot.id()]&&Et.edges.push({startX:B[it][mt.id()].getCenterX(),startY:B[it][mt.id()].getCenterY(),endX:B[it][Ot.id()].getCenterX(),endY:B[it][Ot.id()].getCenterY()})}),Et.nodes.length>0&&(H.push(Et),O.add(it))}});var tt=E.packComponents(H,w.randomize).shifts;if(w.quality=="draft")Y.forEach(function(vt,it){var ut=vt.xCoords.map(function(Ct){return Ct+tt[it].dx}),Et=vt.yCoords.map(function(Ct){return Ct+tt[it].dy});vt.xCoords=ut,vt.yCoords=Et});else{var ht=0;O.forEach(function(vt){Object.keys(B[vt]).forEach(function(it){var ut=B[vt][it];ut.setCenter(ut.getCenterX()+tt[ht].dx,ut.getCenterY()+tt[ht].dy)}),ht++})}}}else{var m=w.eles.boundingBox();if(j.push({x:m.x1+m.w/2,y:m.y1+m.h/2}),w.randomize){var y=o(w);Y.push(y)}w.quality=="default"||w.quality=="proof"?(B.push(h(w,Y[0])),t.relocateComponent(j[0],B[0],w)):t.relocateComponent(j[0],Y[0],w)}var J=function(it,ut){if(w.quality=="default"||w.quality=="proof"){typeof it=="number"&&(it=ut);var Et=void 0,Ct=void 0,Dt=it.data("id");return B.forEach(function(Ot){Dt in Ot&&(Et={x:Ot[Dt].getRect().getCenterX(),y:Ot[Dt].getRect().getCenterY()},Ct=Ot[Dt])}),w.nodeDimensionsIncludeLabels&&(Ct.labelWidth&&(Ct.labelPosHorizontal=="left"?Et.x+=Ct.labelWidth/2:Ct.labelPosHorizontal=="right"&&(Et.x-=Ct.labelWidth/2)),Ct.labelHeight&&(Ct.labelPosVertical=="top"?Et.y+=Ct.labelHeight/2:Ct.labelPosVertical=="bottom"&&(Et.y-=Ct.labelHeight/2))),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}else{var mt=void 0;return Y.forEach(function(Ot){var Rt=Ot.nodeIndexes.get(it.id());Rt!=null&&(mt={x:Ot.xCoords[Rt],y:Ot.yCoords[Rt]})}),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}};if(w.quality=="default"||w.quality=="proof"||w.randomize){var It=t.calcParentsWithoutChildren(P,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});w.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,w,J),It.length>0&&It.forEach(function(vt){vt.position(J(vt))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),d}();n.exports=u},657:(n,r,i)=>{var f=i(548),e=i(140).layoutBase.Matrix,g=i(140).layoutBase.SVD,t=function(o){var c=o.cy,h=o.eles,T=h.nodes(),u=h.nodes(":parent"),d=new Map,L=new Map,b=new Map,w=[],P=[],V=[],Y=[],B=[],A=[],j=[],a=[],E=void 0,p=1e8,m=1e-9,y=o.piTol,S=o.samplingType,D=o.nodeSeparation,F=void 0,W=function(){for(var U=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=w[nt],lt=0;ltdt&&(dt=B[Lt],Mt=Lt)}return Mt},Q=function(U){var k=void 0;if(U){k=Math.floor(Math.random()*E);for(var q=0;q=1)break;_=et}for(var pt=0;pt=1)break;_=et}for(var lt=0;lt0&&(k.isParent()?w[U].push(b.get(k.id())):w[U].push(k.id()))})});var Nt=function(U){var k=L.get(U),K=void 0;d.get(U).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,w[k].push(K),w[L.get(K)].push(U)})},vt=!0,it=!1,ut=void 0;try{for(var Et=d.keys()[Symbol.iterator](),Ct;!(vt=(Ct=Et.next()).done);vt=!0){var Dt=Ct.value;Nt(Dt)}}catch(G){it=!0,ut=G}finally{try{!vt&&Et.return&&Et.return()}finally{if(it)throw ut}}E=L.size;var mt=void 0;if(E>2){F=E{var f=i(212),e=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&e(cytoscape),n.exports=e},140:n=>{n.exports=C}},N={};function v(n){var r=N[n];if(r!==void 0)return r.exports;var i=N[n]={exports:{}};return x[n](i,i.exports,v),i.exports}var l=v(579);return l})()})})(be);var pr=be.exports;const yr=gr(pr);var xe={L:"left",R:"right",T:"top",B:"bottom"},Ie={L:ct(I=>`${I},${I/2} 0,${I} 0,0`,"L"),R:ct(I=>`0,${I/2} ${I},0 ${I},${I}`,"R"),T:ct(I=>`0,0 ${I},0 ${I/2},${I}`,"T"),B:ct(I=>`${I/2},0 ${I},${I} 0,${I}`,"B")},se={L:ct((I,M)=>I-M+2,"L"),R:ct((I,M)=>I-2,"R"),T:ct((I,M)=>I-M+2,"T"),B:ct((I,M)=>I-2,"B")},mr=ct(function(I){return Wt(I)?I==="L"?"R":"L":I==="T"?"B":"T"},"getOppositeArchitectureDirection"),Re=ct(function(I){const M=I;return M==="L"||M==="R"||M==="T"||M==="B"},"isArchitectureDirection"),Wt=ct(function(I){const M=I;return M==="L"||M==="R"},"isArchitectureDirectionX"),qt=ct(function(I){const M=I;return M==="T"||M==="B"},"isArchitectureDirectionY"),Ne=ct(function(I,M){const C=Wt(I)&&qt(M),x=qt(I)&&Wt(M);return C||x},"isArchitectureDirectionXY"),Er=ct(function(I){const M=I[0],C=I[1],x=Wt(M)&&qt(C),N=qt(M)&&Wt(C);return x||N},"isArchitecturePairXY"),Tr=ct(function(I){return I!=="LL"&&I!=="RR"&&I!=="TT"&&I!=="BB"},"isValidArchitectureDirectionPair"),pe=ct(function(I,M){const C=`${I}${M}`;return Tr(C)?C:void 0},"getArchitectureDirectionPair"),Nr=ct(function([I,M],C){const x=C[0],N=C[1];return Wt(x)?qt(N)?[I+(x==="L"?-1:1),M+(N==="T"?1:-1)]:[I+(x==="L"?-1:1),M]:Wt(N)?[I+(N==="L"?1:-1),M+(x==="T"?1:-1)]:[I,M+(x==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Lr=ct(function(I){return I==="LT"||I==="TL"?[1,1]:I==="BL"||I==="LB"?[1,-1]:I==="BR"||I==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),wr=ct(function(I,M){return Ne(I,M)?"bend":Wt(I)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Cr=ct(function(I){return I.type==="service"},"isArchitectureService"),Mr=ct(function(I){return I.type==="junction"},"isArchitectureJunction"),Ge=ct((I,M)=>{const[C,x]=[I,M].sort();return`${JSON.stringify(C)}-${JSON.stringify(x)}`},"architectureGroupAlignmentKey"),Pe=ct(I=>I.data(),"edgeData"),ie=ct(I=>I.data(),"nodeData"),Ar=or.architecture,ae,Ue=(ae=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=Ke,this.getAccTitle=je,this.setDiagramTitle=_e,this.getDiagramTitle=tr,this.getAccDescription=er,this.setAccDescription=rr,this.clear()}setDiagramId(M){this.diagramId=M}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="",ir()}addService({id:M,icon:C,in:x,title:N,iconText:v}){if(this.registeredIds.has(M))throw new Error(`The service id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The service [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The service [${M}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(x)==="node")throw new Error(`The service [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"service",icon:C,iconText:v,title:N,edges:[],in:x})}getServices(){return[...this.nodes.values()].filter(Cr)}addJunction({id:M,in:C}){if(this.registeredIds.has(M))throw new Error(`The junction id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(C!==void 0){if(M===C)throw new Error(`The junction [${M}] cannot be placed within itself`);if(!this.registeredIds.has(C))throw new Error(`The junction [${M}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(C)==="node")throw new Error(`The junction [${M}]'s parent is not a group`)}this.registeredIds.set(M,"node"),this.nodes.set(M,{id:M,type:"junction",edges:[],in:C})}getJunctions(){return[...this.nodes.values()].filter(Mr)}getNodes(){return[...this.nodes.values()]}getNode(M){return this.nodes.get(M)??null}addGroup({id:M,icon:C,in:x,title:N}){if(this.registeredIds.has(M))throw new Error(`The group id [${M}] is already in use by another ${this.registeredIds.get(M)}`);if(x!==void 0){if(M===x)throw new Error(`The group [${M}] cannot be placed within itself`);if(!this.registeredIds.has(x))throw new Error(`The group [${M}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(x)==="node")throw new Error(`The group [${M}]'s parent is not a group`)}this.registeredIds.set(M,"group"),this.groups.set(M,{id:M,icon:C,title:N,in:x})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:M,rhsId:C,lhsDir:x,rhsDir:N,lhsInto:v,rhsInto:l,lhsGroup:n,rhsGroup:r,title:i}){if(!Re(x))throw new Error(`Invalid direction given for left hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(x)}`);if(!Re(N))throw new Error(`Invalid direction given for right hand side of edge ${M}--${C}. Expected (L,R,T,B) got ${String(N)}`);if(!this.nodes.has(M)&&!this.groups.has(M))throw new Error(`The left-hand id [${M}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(C)&&!this.groups.has(C))throw new Error(`The right-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);const f=this.nodes.get(M).in,e=this.nodes.get(C).in;if(n&&f&&e&&f==e)throw new Error(`The left-hand id [${M}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(r&&f&&e&&f==e)throw new Error(`The right-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:M,lhsDir:x,lhsInto:v,lhsGroup:n,rhsId:C,rhsDir:N,rhsInto:l,rhsGroup:r,title:i};this.edges.push(g);const t=this.nodes.get(M),s=this.nodes.get(C);t&&s&&(t.edges.push(this.edges[this.edges.length-1]),s.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(M){if(M.members.length<2)throw new Error(`An align directive requires at least two members; got ${M.members.length}`);const C=new Set;M.members.forEach(x=>{if(this.registeredIds.get(x)!=="node")throw new Error(`align ${M.direction} references [${x}], which is not a service or junction`);if(C.has(x))throw new Error(`align ${M.direction} lists [${x}] more than once`);C.add(x)}),this.layoutHints.push(M)}getLayoutHints(){return this.layoutHints}getDataStructures(){var M,C;if(this.dataStructures===void 0){const x=new Map,N=new Map;for(const[i,f]of this.nodes.entries()){const e=new Map;for(const g of f.edges){const t=(M=this.getNode(g.lhsId))==null?void 0:M.in,s=(C=this.getNode(g.rhsId))==null?void 0:C.in;if(t&&s&&t!==s){const o=wr(g.lhsDir,g.rhsDir);o!=="bend"&&x.set(Ge(t,s),o)}if(g.lhsId===i){const o=pe(g.lhsDir,g.rhsDir);o&&e.set(o,g.rhsId)}else{const o=pe(g.rhsDir,g.lhsDir);o&&e.set(o,g.lhsId)}}N.set(i,e)}const v=new Set,l=new Set(N.keys()),n=ct(i=>{const f=new Map([[i,[0,0]]]),e=[i];for(;e.length>0;){const g=e.shift();if(g){v.add(g),l.delete(g);const t=N.get(g);if(!t)throw new Error(`BFS error: adjacency list for id ${g} not found. Please report this as a bug.`);const s=f.get(g);if(!s)throw new Error(`BFS error: position for id ${g} not found in spatial map. Please report this as a bug.`);const[o,c]=s;t.forEach((h,T)=>{v.has(h)||(f.set(h,Nr([o,c],T)),e.push(h))})}}return f},"BFS"),r=[];for(;l.size>0;){const i=l.values().next().value;r.push(n(i))}this.dataStructures={adjList:N,spatialMaps:r,groupAlignments:x}}return this.dataStructures}setElementForId(M,C){this.elements.set(M,C)}getElementById(M){return this.elements.get(M)}getConfig(){return ar({...Ar,...nr().architecture})}getConfigField(M){return this.getConfig()[M]}},ct(ae,"ArchitectureDB"),ae),Dr=ct((I,M)=>{var C;qe(I,M),I.groups.map(x=>M.addGroup(x)),I.services.map(x=>M.addService({...x,type:"service"})),I.junctions.map(x=>M.addJunction({...x,type:"junction"})),I.edges.map(x=>M.addEdge(x)),(C=I.alignments)==null||C.map(x=>M.addLayoutHint({direction:x.direction,members:[...x.members]}))},"populateDb"),Ye={parser:{yy:void 0},parse:ct(async I=>{var x;const M=await cr("architecture",I);Se.debug(M);const C=(x=Ye.parser)==null?void 0:x.yy;if(!(C instanceof Ue))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.");Dr(M,C)},"parse")},Or=ct(I=>` .edge { stroke-width: ${I.archEdgeWidth}; stroke: ${I.archEdgeColor}; diff --git a/veadk/webui/assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-CzbrD03k.js b/veadk/webui/assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-DMtlrKi5.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-CzbrD03k.js rename to veadk/webui/assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-DMtlrKi5.js index a3c3c7d3d..fadeb01f6 100644 --- a/veadk/webui/assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-CzbrD03k.js +++ b/veadk/webui/assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-DMtlrKi5.js @@ -1,4 +1,4 @@ -import{g as de}from"./chunk-5VM5RSS4-C2BXfYOP.js";import{am as fe,a7 as Ut,an as pe,b4 as ye,b3 as xe,b6 as be,b5 as we,b0 as me,a_ as Se,aV as Le,aI as ve,aB as Ee,aA as _e,au as ke,ai as Te,ah as De,aj as Ne,S as Ie,R as Be,K as Ce,m as Oe,I as Re,g as Ae,h as ze,e as Me,a as u,X as nt,B as Pe,at as v,s as Fe,aM as We,Y as M,a3 as Ye,aq as He,G as Ke,a9 as Ue,a1 as Y,F as Et,z as rt,a6 as Xe,b9 as at,x as Ve,a5 as je,aN as Ot,M as Rt,A as Ge}from"./mermaid.core-BmHujEI0.js";import{aG as O}from"../../app/index-B71Wq9_t.js";import{G as Ze}from"../../chunks/graph-Dqkl27Ch.js";import{c as qe}from"../../chunks/channel-BdZyURAQ.js";import"../../chunks/purify.es-BnINGy_Y.js";function Je(e){return Array.isArray(e)}function Qe(e){if(fe(e))return e;const t=Ut(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(pe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Ut(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Be:case Ie:case Ne:case De:case Te:case ke:case _e:case Ee:case ve:case Le:case Se:case me:case we:case be:case xe:case ye:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=function(){var e=u(function(N,b,d,y){for(d=d||{},y=N.length;y--;d[N[y]]=b);return d},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],g=[8,30],h=[8,10,21,28,29,30,31,39,43,46],p=[1,23],m=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:u(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:u(function(b,d,y,w,D,o,k){var f=o.length-1;switch(D){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",o[f-1]),w.setHierarchy(o[f-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:w.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:w.getLogger().debug("Rule: link: ",o[f],b),this.$={edgeTypeStr:o[f],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const E=parseInt(o[f]),T=w.generateId();this.$={id:T,type:"space",label:"",width:E,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const z=w.edgeStrToEdgeData(o[f-1].edgeTypeStr),F=w.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),q=w.edgeStrToThickness(o[f-1].edgeTypeStr),I=w.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:q,pattern:I,directions:o[f].directions,arrowTypeEnd:z,arrowTypeStart:F},{id:o[f].id,label:o[f].label,type:w.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:w.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:w.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),w.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const K=w.generateId();this.$={id:K,type:"composite",label:"",children:o[f-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:w.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(g,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:p,16:m}),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(x,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(g,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:m,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[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:_},{15:[1,50]},e(h,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(b,d){if(d.recoverable)this.trace(b);else{var y=new Error(b);throw y.hash=d,y}},"parseError"),parse:u(function(b){var d=this,y=[0],w=[],D=[null],o=[],k=this.table,f="",E=0,T=0,z=2,F=1,q=o.slice.call(arguments,1),I=Object.create(this.lexer),K={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(K.yy[J]=this.yy[J]);I.setInput(b,K.yy),K.yy.lexer=I,K.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var et=I.yylloc;o.push(et);var ft=I.options&&I.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(U){y.length=y.length-2*U,D.length=D.length-U,o.length=o.length-U}u(ue,"popStack");function Bt(){var U;return U=w.pop()||I.lex()||F,typeof U!="number"&&(U instanceof Array&&(w=U,U=w.pop()),U=d.symbols_[U]||U),U}u(Bt,"lex");for(var H,$,V,pt,tt={},ct,Q,Ct,lt;;){if($=y[y.length-1],this.defaultActions[$]?V=this.defaultActions[$]:((H===null||typeof H>"u")&&(H=Bt()),V=k[$]&&k[$][H]),typeof V>"u"||!V.length||!V[0]){var yt="";lt=[];for(ct in k[$])this.terminals_[ct]&&ct>z&<.push("'"+this.terminals_[ct]+"'");I.showPosition?yt="Parse error on line "+(E+1)+`: +import{g as de}from"./chunk-5VM5RSS4-CqwEymVq.js";import{am as fe,a7 as Ut,an as pe,b4 as ye,b3 as xe,b6 as be,b5 as we,b0 as me,a_ as Se,aV as Le,aI as ve,aB as Ee,aA as _e,au as ke,ai as Te,ah as De,aj as Ne,S as Ie,R as Be,K as Ce,m as Oe,I as Re,g as Ae,h as ze,e as Me,a as u,X as nt,B as Pe,at as v,s as Fe,aM as We,Y as M,a3 as Ye,aq as He,G as Ke,a9 as Ue,a1 as Y,F as Et,z as rt,a6 as Xe,b9 as at,x as Ve,a5 as je,aN as Ot,M as Rt,A as Ge}from"./mermaid.core-l-gs7P2Q.js";import{aG as O}from"../../app/index-BKQXvMzA.js";import{G as Ze}from"../../chunks/graph-Dqkl27Ch.js";import{c as qe}from"../../chunks/channel-B_2bNWok.js";import"../../chunks/purify.es-BnINGy_Y.js";function Je(e){return Array.isArray(e)}function Qe(e){if(fe(e))return e;const t=Ut(e);if(!$e(e))return{};if(Je(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(pe(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?er(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return rr(a,e),xt(a,e),tr(a,e),a}function $e(e){switch(Ut(e)){case Me:case ze:case Ae:case Re:case Oe:case Ce:case Be:case Ie:case Ne:case De:case Te:case ke:case _e:case Ee:case ve:case Le:case Se:case me:case we:case be:case xe:case ye:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function tr(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function rr(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=function(){var e=u(function(N,b,d,y){for(d=d||{},y=N.length;y--;d[N[y]]=b);return d},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],g=[8,30],h=[8,10,21,28,29,30,31,39,43,46],p=[1,23],m=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],S=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:u(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:u(function(b,d,y,w,D,o,k){var f=o.length-1;switch(D){case 4:w.getLogger().debug("Rule: separator (NL) ");break;case 5:w.getLogger().debug("Rule: separator (Space) ");break;case 6:w.getLogger().debug("Rule: separator (EOF) ");break;case 7:w.getLogger().debug("Rule: hierarchy: ",o[f-1]),w.setHierarchy(o[f-1]);break;case 8:w.getLogger().debug("Stop NL ");break;case 9:w.getLogger().debug("Stop EOF ");break;case 10:w.getLogger().debug("Stop NL2 ");break;case 11:w.getLogger().debug("Stop EOF2 ");break;case 12:w.getLogger().debug("Rule: statement: ",o[f]),typeof o[f].length=="number"?this.$=o[f]:this.$=[o[f]];break;case 13:w.getLogger().debug("Rule: statement #2: ",o[f-1]),this.$=[o[f-1]].concat(o[f]);break;case 14:w.getLogger().debug("Rule: link: ",o[f],b),this.$={edgeTypeStr:o[f],label:""};break;case 15:w.getLogger().debug("Rule: LABEL link: ",o[f-3],o[f-1],o[f]),this.$={edgeTypeStr:o[f],label:o[f-1]};break;case 18:const E=parseInt(o[f]),T=w.generateId();this.$={id:T,type:"space",label:"",width:E,children:[]};break;case 23:w.getLogger().debug("Rule: (nodeStatement link node) ",o[f-2],o[f-1],o[f]," typestr: ",o[f-1].edgeTypeStr);const z=w.edgeStrToEdgeData(o[f-1].edgeTypeStr),F=w.edgeStrToEdgeStartData(o[f-1].edgeTypeStr),q=w.edgeStrToThickness(o[f-1].edgeTypeStr),I=w.edgeStrToPattern(o[f-1].edgeTypeStr);this.$=[{id:o[f-2].id,label:o[f-2].label,type:o[f-2].type,directions:o[f-2].directions},{id:o[f-2].id+"-"+o[f].id,start:o[f-2].id,end:o[f].id,label:o[f-1].label,type:"edge",thickness:q,pattern:I,directions:o[f].directions,arrowTypeEnd:z,arrowTypeStart:F},{id:o[f].id,label:o[f].label,type:w.typeStr2Type(o[f].typeStr),directions:o[f].directions}];break;case 24:w.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[f-1],o[f]),this.$={id:o[f-1].id,label:o[f-1].label,type:w.typeStr2Type(o[f-1].typeStr),directions:o[f-1].directions,widthInColumns:parseInt(o[f],10)};break;case 25:w.getLogger().debug("Rule: nodeStatement (node) ",o[f]),this.$={id:o[f].id,label:o[f].label,type:w.typeStr2Type(o[f].typeStr),directions:o[f].directions,widthInColumns:1};break;case 26:w.getLogger().debug("APA123",this?this:"na"),w.getLogger().debug("COLUMNS: ",o[f]),this.$={type:"column-setting",columns:o[f]==="auto"?-1:parseInt(o[f])};break;case 27:w.getLogger().debug("Rule: id-block statement : ",o[f-2],o[f-1]),w.generateId(),this.$={...o[f-2],type:"composite",children:o[f-1]};break;case 28:w.getLogger().debug("Rule: blockStatement : ",o[f-2],o[f-1],o[f]);const K=w.generateId();this.$={id:K,type:"composite",label:"",children:o[f-1]};break;case 29:w.getLogger().debug("Rule: node (NODE_ID separator): ",o[f]),this.$={id:o[f]};break;case 30:w.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[f-1],o[f]),this.$={id:o[f-1],label:o[f].label,typeStr:o[f].typeStr,directions:o[f].directions};break;case 31:w.getLogger().debug("Rule: dirList: ",o[f]),this.$=[o[f]];break;case 32:w.getLogger().debug("Rule: dirList: ",o[f-1],o[f]),this.$=[o[f-1]].concat(o[f]);break;case 33:w.getLogger().debug("Rule: nodeShapeNLabel: ",o[f-2],o[f-1],o[f]),this.$={typeStr:o[f-2]+o[f],label:o[f-1]};break;case 34:w.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[f-3],o[f-2]," #3:",o[f-1],o[f]),this.$={typeStr:o[f-3]+o[f],label:o[f-2],directions:o[f-1]};break;case 35:case 36:this.$={type:"classDef",id:o[f-1].trim(),css:o[f].trim()};break;case 37:this.$={type:"applyClass",id:o[f-1].trim(),styleClass:o[f].trim()};break;case 38:this.$={type:"applyStyles",id:o[f-1].trim(),stylesStr:o[f].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(g,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:p,16:m}),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(x,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(S,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(g,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:p,16:m,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(S,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[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:_},{15:[1,50]},e(h,[2,27]),e(S,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(S,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(b,d){if(d.recoverable)this.trace(b);else{var y=new Error(b);throw y.hash=d,y}},"parseError"),parse:u(function(b){var d=this,y=[0],w=[],D=[null],o=[],k=this.table,f="",E=0,T=0,z=2,F=1,q=o.slice.call(arguments,1),I=Object.create(this.lexer),K={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(K.yy[J]=this.yy[J]);I.setInput(b,K.yy),K.yy.lexer=I,K.yy.parser=this,typeof I.yylloc>"u"&&(I.yylloc={});var et=I.yylloc;o.push(et);var ft=I.options&&I.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(U){y.length=y.length-2*U,D.length=D.length-U,o.length=o.length-U}u(ue,"popStack");function Bt(){var U;return U=w.pop()||I.lex()||F,typeof U!="number"&&(U instanceof Array&&(w=U,U=w.pop()),U=d.symbols_[U]||U),U}u(Bt,"lex");for(var H,$,V,pt,tt={},ct,Q,Ct,lt;;){if($=y[y.length-1],this.defaultActions[$]?V=this.defaultActions[$]:((H===null||typeof H>"u")&&(H=Bt()),V=k[$]&&k[$][H]),typeof V>"u"||!V.length||!V[0]){var yt="";lt=[];for(ct in k[$])this.terminals_[ct]&&ct>z&<.push("'"+this.terminals_[ct]+"'");I.showPosition?yt="Parse error on line "+(E+1)+`: `+I.showPosition()+` Expecting `+lt.join(", ")+", got '"+(this.terminals_[H]||H)+"'":yt="Parse error on line "+(E+1)+": Unexpected "+(H==F?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(yt,{text:I.match,token:this.terminals_[H]||H,line:I.yylineno,loc:et,expected:lt})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+H);switch(V[0]){case 1:y.push(H),D.push(I.yytext),o.push(I.yylloc),y.push(V[1]),H=null,T=I.yyleng,f=I.yytext,E=I.yylineno,et=I.yylloc;break;case 2:if(Q=this.productions_[V[1]][1],tt.$=D[D.length-Q],tt._$={first_line:o[o.length-(Q||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Q||1)].first_column,last_column:o[o.length-1].last_column},ft&&(tt._$.range=[o[o.length-(Q||1)].range[0],o[o.length-1].range[1]]),pt=this.performAction.apply(tt,[f,T,E,K.yy,V[1],D,o].concat(q)),typeof pt<"u")return pt;Q&&(y=y.slice(0,-1*Q*2),D=D.slice(0,-1*Q),o=o.slice(0,-1*Q)),y.push(this.productions_[V[1]][0]),D.push(tt.$),o.push(tt._$),Ct=k[y[y.length-2]][y[y.length-1]],y.push(Ct);break;case 3:return!0}}return!0},"parse")},B=function(){var N={EOF:1,parseError:u(function(d,y){if(this.yy.parser)this.yy.parser.parseError(d,y);else throw new Error(d)},"parseError"),setInput:u(function(b,d){return this.yy=d||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:u(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var d=b.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),b},"input"),unput:u(function(b){var d=b.length,y=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;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),y.length-1&&(this.yylineno-=y.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:y?(y.length===w.length?this.yylloc.first_column:0)+w[w.length-y.length].length-y[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(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:u(function(b){this.unput(this.match.slice(b))},"less"),pastInput:u(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:u(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:u(function(){var b=this.pastInput(),d=new Array(b.length+1).join("-");return b+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BpEevA0S.js b/veadk/webui/assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BFmGnVzX.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BpEevA0S.js rename to veadk/webui/assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BFmGnVzX.js index 4819951c6..bc71ff316 100644 --- a/veadk/webui/assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BpEevA0S.js +++ b/veadk/webui/assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BFmGnVzX.js @@ -1,4 +1,4 @@ -import{g as Se,e as De}from"./chunk-2GRJ4B5K-CbPivXt6.js";import{aQ as Pe,V as Be,W as Ie,aR as Me,a as y,Y as Bt,at as de,B as Le,j as Ne,q as Tt,aN as ge,aO as Ye,bb as je,x as $t,p as fe}from"./mermaid.core-BmHujEI0.js";import{aG as jt}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var Ft=function(){var a=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],r=[1,27],l=[1,28],e=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y(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:y(function(x,v,E,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;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:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},a(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(Ct,[2,14]),a(Qt,[2,16],{12:[1,76]}),a(Ct,[2,36],{12:[1,77]}),a(St,[2,19]),a(St,[2,20]),{25:[1,78]},{27:[1,79]},a(St,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},a(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},a(Ct,[2,15]),a(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:r,28:l}),a(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:r,28:l,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(St,[2,21]),a(St,[2,22]),a(T,[2,39]),a(le,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),a(Mt,[2,73]),{78:[1,133]},a(Mt,[2,75]),a(Mt,[2,76]),a(T,[2,40]),a(T,[2,41]),a(T,[2,42]),a(T,[2,43]),a(T,[2,44]),a(T,[2,45]),a(T,[2,46]),a(T,[2,47]),a(T,[2,48]),a(T,[2,49]),a(T,[2,50]),a(T,[2,51]),a(T,[2,52]),a(T,[2,53]),a(T,[2,54]),a(T,[2,55]),a(T,[2,56]),a(T,[2,57]),a(T,[2,58]),a(T,[2,60]),a(T,[2,61]),a(T,[2,62]),a(T,[2,63]),a(T,[2,64]),a(T,[2,65]),a(T,[2,66]),a(T,[2,67]),a(T,[2,68]),a(T,[2,69]),a(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},a(vt,[2,28]),a(vt,[2,29]),a(vt,[2,30]),a(vt,[2,31]),a(vt,[2,32]),a(vt,[2,33]),a(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},a(Qt,[2,18]),a(Ct,[2,38]),a(le,[2,72]),a(Mt,[2,74]),a(T,[2,24]),a(T,[2,35]),a(Ht,[2,25]),a(Ht,[2,26],{12:[1,138]}),a(Ht,[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:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(At.yy[Gt]=this.yy[Gt]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(he,"lex");for(var I,kt,N,Jt,wt={},Nt,X,ue,Yt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=he()),N=Dt[kt]&&Dt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[kt])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: +import{g as Se,e as De}from"./chunk-2GRJ4B5K-CS99z7QO.js";import{aQ as Pe,V as Be,W as Ie,aR as Me,a as y,Y as Bt,at as de,B as Le,j as Ne,q as Tt,aN as ge,aO as Ye,bb as je,x as $t,p as fe}from"./mermaid.core-l-gs7P2Q.js";import{aG as jt}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var Ft=function(){var a=y(function(_t,x,v,E){for(v=v||{},E=_t.length;E--;v[_t[E]]=x);return v},"o"),t=[1,24],s=[1,25],o=[1,26],r=[1,27],l=[1,28],e=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],f=[1,68],g=[1,69],m=[1,29],O=[1,30],S=[1,31],P=[1,32],M=[1,33],U=[1,34],H=[1,35],q=[1,36],G=[1,37],K=[1,38],J=[1,39],Z=[1,40],$=[1,41],tt=[1,42],et=[1,43],at=[1,44],it=[1,45],nt=[1,46],st=[1,47],rt=[1,48],lt=[1,50],ot=[1,51],ct=[1,52],ht=[1,53],ut=[1,54],dt=[1,55],ft=[1,56],pt=[1,57],yt=[1,58],gt=[1,59],bt=[1,60],Ct=[14,42],Qt=[14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],St=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],A=[1,82],k=[1,83],C=[1,84],w=[1,85],T=[12,14,42],le=[12,14,33,42],Mt=[12,14,33,42,76,77,79,80],vt=[12,33],Ht=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],qt={trace:y(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:y(function(x,v,E,b,R,h,Dt){var p=h.length-1;switch(R){case 3:b.setDirection("TB");break;case 4:b.setDirection("BT");break;case 5:b.setDirection("RL");break;case 6:b.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:b.setC4Type(h[p-3]);break;case 19:b.setTitle(h[p].substring(6)),this.$=h[p].substring(6);break;case 20:b.setAccDescription(h[p].substring(15)),this.$=h[p].substring(15);break;case 21:this.$=h[p].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[p].trim(),b.setAccDescription(this.$);break;case 28:h[p].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 29:h[p].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 30:b.addPersonOrSystemBoundary(...h[p]),this.$=h[p];break;case 31:h[p].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[p]),this.$=h[p];break;case 32:b.addDeploymentNode("node",...h[p]),this.$=h[p];break;case 33:b.addDeploymentNode("nodeL",...h[p]),this.$=h[p];break;case 34:b.addDeploymentNode("nodeR",...h[p]),this.$=h[p];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[p]),this.$=h[p];break;case 40:b.addPersonOrSystem("external_person",...h[p]),this.$=h[p];break;case 41:b.addPersonOrSystem("system",...h[p]),this.$=h[p];break;case 42:b.addPersonOrSystem("system_db",...h[p]),this.$=h[p];break;case 43:b.addPersonOrSystem("system_queue",...h[p]),this.$=h[p];break;case 44:b.addPersonOrSystem("external_system",...h[p]),this.$=h[p];break;case 45:b.addPersonOrSystem("external_system_db",...h[p]),this.$=h[p];break;case 46:b.addPersonOrSystem("external_system_queue",...h[p]),this.$=h[p];break;case 47:b.addContainer("container",...h[p]),this.$=h[p];break;case 48:b.addContainer("container_db",...h[p]),this.$=h[p];break;case 49:b.addContainer("container_queue",...h[p]),this.$=h[p];break;case 50:b.addContainer("external_container",...h[p]),this.$=h[p];break;case 51:b.addContainer("external_container_db",...h[p]),this.$=h[p];break;case 52:b.addContainer("external_container_queue",...h[p]),this.$=h[p];break;case 53:b.addComponent("component",...h[p]),this.$=h[p];break;case 54:b.addComponent("component_db",...h[p]),this.$=h[p];break;case 55:b.addComponent("component_queue",...h[p]),this.$=h[p];break;case 56:b.addComponent("external_component",...h[p]),this.$=h[p];break;case 57:b.addComponent("external_component_db",...h[p]),this.$=h[p];break;case 58:b.addComponent("external_component_queue",...h[p]),this.$=h[p];break;case 60:b.addRel("rel",...h[p]),this.$=h[p];break;case 61:b.addRel("birel",...h[p]),this.$=h[p];break;case 62:b.addRel("rel_u",...h[p]),this.$=h[p];break;case 63:b.addRel("rel_d",...h[p]),this.$=h[p];break;case 64:b.addRel("rel_l",...h[p]),this.$=h[p];break;case 65:b.addRel("rel_r",...h[p]),this.$=h[p];break;case 66:b.addRel("rel_b",...h[p]),this.$=h[p];break;case 67:h[p].splice(0,1),b.addRel("rel",...h[p]),this.$=h[p];break;case 68:b.updateElStyle("update_el_style",...h[p]),this.$=h[p];break;case 69:b.updateRelStyle("update_rel_style",...h[p]),this.$=h[p];break;case 70:b.updateLayoutConfig("update_layout_config",...h[p]),this.$=h[p];break;case 71:this.$=[h[p]];break;case 72:h[p].unshift(h[p-1]),this.$=h[p];break;case 73:case 75:this.$=h[p].trim();break;case 74:let Et={};Et[h[p-1].trim()]=h[p].trim(),this.$=Et;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:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:70,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:71,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:72,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{13:73,19:20,20:21,21:22,22:t,23:s,24:o,26:r,28:l,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{14:[1,74]},a(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(Ct,[2,14]),a(Qt,[2,16],{12:[1,76]}),a(Ct,[2,36],{12:[1,77]}),a(St,[2,19]),a(St,[2,20]),{25:[1,78]},{27:[1,79]},a(St,[2,23]),{35:80,75:81,76:A,77:k,79:C,80:w},{35:86,75:81,76:A,77:k,79:C,80:w},{35:87,75:81,76:A,77:k,79:C,80:w},{35:88,75:81,76:A,77:k,79:C,80:w},{35:89,75:81,76:A,77:k,79:C,80:w},{35:90,75:81,76:A,77:k,79:C,80:w},{35:91,75:81,76:A,77:k,79:C,80:w},{35:92,75:81,76:A,77:k,79:C,80:w},{35:93,75:81,76:A,77:k,79:C,80:w},{35:94,75:81,76:A,77:k,79:C,80:w},{35:95,75:81,76:A,77:k,79:C,80:w},{35:96,75:81,76:A,77:k,79:C,80:w},{35:97,75:81,76:A,77:k,79:C,80:w},{35:98,75:81,76:A,77:k,79:C,80:w},{35:99,75:81,76:A,77:k,79:C,80:w},{35:100,75:81,76:A,77:k,79:C,80:w},{35:101,75:81,76:A,77:k,79:C,80:w},{35:102,75:81,76:A,77:k,79:C,80:w},{35:103,75:81,76:A,77:k,79:C,80:w},{35:104,75:81,76:A,77:k,79:C,80:w},a(T,[2,59]),{35:105,75:81,76:A,77:k,79:C,80:w},{35:106,75:81,76:A,77:k,79:C,80:w},{35:107,75:81,76:A,77:k,79:C,80:w},{35:108,75:81,76:A,77:k,79:C,80:w},{35:109,75:81,76:A,77:k,79:C,80:w},{35:110,75:81,76:A,77:k,79:C,80:w},{35:111,75:81,76:A,77:k,79:C,80:w},{35:112,75:81,76:A,77:k,79:C,80:w},{35:113,75:81,76:A,77:k,79:C,80:w},{35:114,75:81,76:A,77:k,79:C,80:w},{35:115,75:81,76:A,77:k,79:C,80:w},{20:116,29:49,30:61,32:62,34:e,36:n,37:i,38:u,39:d,40:f,41:g,43:23,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt},{12:[1,118],33:[1,117]},{35:119,75:81,76:A,77:k,79:C,80:w},{35:120,75:81,76:A,77:k,79:C,80:w},{35:121,75:81,76:A,77:k,79:C,80:w},{35:122,75:81,76:A,77:k,79:C,80:w},{35:123,75:81,76:A,77:k,79:C,80:w},{35:124,75:81,76:A,77:k,79:C,80:w},{35:125,75:81,76:A,77:k,79:C,80:w},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},a(Ct,[2,15]),a(Qt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:r,28:l}),a(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:r,28:l,34:e,36:n,37:i,38:u,39:d,40:f,41:g,44:m,45:O,46:S,47:P,48:M,49:U,50:H,51:q,52:G,53:K,54:J,55:Z,56:$,57:tt,58:et,59:at,60:it,61:nt,62:st,63:rt,64:lt,65:ot,66:ct,67:ht,68:ut,69:dt,70:ft,71:pt,72:yt,73:gt,74:bt}),a(St,[2,21]),a(St,[2,22]),a(T,[2,39]),a(le,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),a(Mt,[2,73]),{78:[1,133]},a(Mt,[2,75]),a(Mt,[2,76]),a(T,[2,40]),a(T,[2,41]),a(T,[2,42]),a(T,[2,43]),a(T,[2,44]),a(T,[2,45]),a(T,[2,46]),a(T,[2,47]),a(T,[2,48]),a(T,[2,49]),a(T,[2,50]),a(T,[2,51]),a(T,[2,52]),a(T,[2,53]),a(T,[2,54]),a(T,[2,55]),a(T,[2,56]),a(T,[2,57]),a(T,[2,58]),a(T,[2,60]),a(T,[2,61]),a(T,[2,62]),a(T,[2,63]),a(T,[2,64]),a(T,[2,65]),a(T,[2,66]),a(T,[2,67]),a(T,[2,68]),a(T,[2,69]),a(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},a(vt,[2,28]),a(vt,[2,29]),a(vt,[2,30]),a(vt,[2,31]),a(vt,[2,32]),a(vt,[2,33]),a(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},a(Qt,[2,18]),a(Ct,[2,38]),a(le,[2,72]),a(Mt,[2,74]),a(T,[2,24]),a(T,[2,35]),a(Ht,[2,25]),a(Ht,[2,26],{12:[1,138]}),a(Ht,[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:y(function(x,v){if(v.recoverable)this.trace(x);else{var E=new Error(x);throw E.hash=v,E}},"parseError"),parse:y(function(x){var v=this,E=[0],b=[],R=[null],h=[],Dt=this.table,p="",Et=0,oe=0,we=2,ce=1,Te=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Gt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gt)&&(At.yy[Gt]=this.yy[Gt]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Kt=D.yylloc;h.push(Kt);var Oe=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Re(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Re,"popStack");function he(){var L;return L=b.pop()||D.lex()||ce,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(he,"lex");for(var I,kt,N,Jt,wt={},Nt,X,ue,Yt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=he()),N=Dt[kt]&&Dt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Zt="";Yt=[];for(Nt in Dt[kt])this.terminals_[Nt]&&Nt>we&&Yt.push("'"+this.terminals_[Nt]+"'");D.showPosition?Zt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Yt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Zt="Parse error on line "+(Et+1)+": Unexpected "+(I==ce?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Zt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:Kt,expected:Yt})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+kt+", token: "+I);switch(N[0]){case 1:E.push(I),R.push(D.yytext),h.push(D.yylloc),E.push(N[1]),I=null,oe=D.yyleng,p=D.yytext,Et=D.yylineno,Kt=D.yylloc;break;case 2:if(X=this.productions_[N[1]][1],wt.$=R[R.length-X],wt._$={first_line:h[h.length-(X||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(X||1)].first_column,last_column:h[h.length-1].last_column},Oe&&(wt._$.range=[h[h.length-(X||1)].range[0],h[h.length-1].range[1]]),Jt=this.performAction.apply(wt,[p,oe,Et,At.yy,N[1],R,h].concat(Te)),typeof Jt<"u")return Jt;X&&(E=E.slice(0,-1*X*2),R=R.slice(0,-1*X),h=h.slice(0,-1*X)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ue=Dt[E[E.length-2]][E[E.length-1]],E.push(ue);break;case 3:return!0}}return!0},"parse")},Ce=function(){var _t={EOF:1,parseError:y(function(v,E){if(this.yy.parser)this.yy.parser.parseError(v,E);else throw new Error(v)},"parseError"),setInput:y(function(x,v){return this.yy=v||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:y(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var v=x.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),x},"input"),unput:y(function(x){var v=x.length,E=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;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),E.length-1&&(this.yylineno-=E.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:E?(E.length===b.length?this.yylloc.first_column:0)+b[b.length-E.length].length-E[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:y(function(){return this._more=!0,this},"more"),reject:y(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:y(function(x){this.unput(this.match.slice(x))},"less"),pastInput:y(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:y(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:y(function(){var x=this.pastInput(),v=new Array(x.length+1).join("-");return x+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-2GRJ4B5K-CbPivXt6.js b/veadk/webui/assets/visualizations/mermaid/chunk-2GRJ4B5K-CS99z7QO.js similarity index 93% rename from veadk/webui/assets/visualizations/mermaid/chunk-2GRJ4B5K-CbPivXt6.js rename to veadk/webui/assets/visualizations/mermaid/chunk-2GRJ4B5K-CS99z7QO.js index 21c853dfc..678076b4c 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-2GRJ4B5K-CbPivXt6.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-2GRJ4B5K-CS99z7QO.js @@ -1 +1 @@ -import{a as i,ar as d,aO as o}from"./mermaid.core-BmHujEI0.js";import{aG as l}from"../../app/index-B71Wq9_t.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const a in t.attrs)e.attr(a,t.attrs[a]);return t.class&&e.attr("class",t.class),e},"drawRect"),y=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),m=i((r,t)=>{const e=t.text.replace(d," "),a=r.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),a},"drawText"),g=i((r,t,e,a)=>{const s=r.append("image");s.attr("x",t),s.attr("y",e);const n=o(a);s.attr("xlink:href",n)},"drawImage"),f=i((r,t,e,a)=>{const s=r.append("use");s.attr("x",t),s.attr("y",e);const n=o(a);s.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),w=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),k=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("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")),r},"createTooltip");export{f as a,g as b,k as c,y as d,x as e,m as f,h as g,w as h}; +import{a as i,ar as d,aO as o}from"./mermaid.core-l-gs7P2Q.js";import{aG as l}from"../../app/index-BKQXvMzA.js";var x=i((r,t)=>{const e=r.append("rect");if(e.attr("x",t.x),e.attr("y",t.y),e.attr("fill",t.fill),e.attr("stroke",t.stroke),e.attr("width",t.width),e.attr("height",t.height),t.name&&e.attr("name",t.name),t.rx&&e.attr("rx",t.rx),t.ry&&e.attr("ry",t.ry),t.attrs!==void 0)for(const a in t.attrs)e.attr(a,t.attrs[a]);return t.class&&e.attr("class",t.class),e},"drawRect"),y=i((r,t)=>{const e={x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,stroke:t.stroke,class:"rect"};x(r,e).lower()},"drawBackgroundRect"),m=i((r,t)=>{const e=t.text.replace(d," "),a=r.append("text");a.attr("x",t.x),a.attr("y",t.y),a.attr("class","legend"),a.style("text-anchor",t.anchor),t.class&&a.attr("class",t.class);const s=a.append("tspan");return s.attr("x",t.x+t.textMargin*2),s.text(e),a},"drawText"),g=i((r,t,e,a)=>{const s=r.append("image");s.attr("x",t),s.attr("y",e);const n=o(a);s.attr("xlink:href",n)},"drawImage"),f=i((r,t,e,a)=>{const s=r.append("use");s.attr("x",t),s.attr("y",e);const n=o(a);s.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),h=i(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),w=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),k=i(()=>{let r=l(".mermaidTooltip");return r.empty()&&(r=l("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")),r},"createTooltip");export{f as a,g as b,k as c,y as d,x as e,m as f,h as g,w as h}; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-2Q5K7J3B-DM9SBI1P.js b/veadk/webui/assets/visualizations/mermaid/chunk-2Q5K7J3B-BiO2G8-N.js similarity index 66% rename from veadk/webui/assets/visualizations/mermaid/chunk-2Q5K7J3B-DM9SBI1P.js rename to veadk/webui/assets/visualizations/mermaid/chunk-2Q5K7J3B-BiO2G8-N.js index a39f53081..c2e42b200 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-2Q5K7J3B-DM9SBI1P.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-2Q5K7J3B-BiO2G8-N.js @@ -1 +1 @@ -import{a as s}from"./mermaid.core-BmHujEI0.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; +import{a as s}from"./mermaid.core-l-gs7P2Q.js";var t,e=(t=class{constructor(i){this.init=i,this.records=this.init()}reset(){this.records=this.init()}},s(t,"ImperativeState"),t);export{e as I}; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-5RXB4S5H-Vs8JZSfc.js b/veadk/webui/assets/visualizations/mermaid/chunk-5RXB4S5H-DevQkzhU.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/chunk-5RXB4S5H-Vs8JZSfc.js rename to veadk/webui/assets/visualizations/mermaid/chunk-5RXB4S5H-DevQkzhU.js index 330477ab4..4b56b711b 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-5RXB4S5H-Vs8JZSfc.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-5RXB4S5H-DevQkzhU.js @@ -1,4 +1,4 @@ -import{g as ee}from"./chunk-XXDRQBXY-CLLbPKnJ.js";import{s as se}from"./chunk-KBJHAD2P-fr6wew8I.js";import{a as S,at as b,Y as F,aK as ie,b9 as re,W as ae,aR as ne,V as oe,aQ as le,aT as ce,$ as he,T as ue,x as K,s as de}from"./mermaid.core-BmHujEI0.js";import{c as fe}from"./chunk-2GRJ4B5K-CbPivXt6.js";import{aG as Dt}from"../../app/index-B71Wq9_t.js";import pe from"../../chunks/purify.es-BnINGy_Y.js";var Ct=function(){var t=S(function(W,l,d,n){for(d=d||{},n=W.length;n--;d[W[n]]=l);return d},"o"),e=[1,2],s=[1,3],a=[1,4],i=[2,4],o=[1,9],h=[1,11],p=[1,16],f=[1,17],T=[1,18],E=[1,19],m=[1,33],R=[1,20],C=[1,21],x=[1,22],$=[1,23],O=[1,24],u=[1,26],L=[1,27],k=[1,28],V=[1,29],P=[1,30],v=[1,31],Y=[1,32],j=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],J=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Lt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:S(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:S(function(l,d,n,g,_,r,B){var c=r.length-1;switch(_){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const et=r[c-1];et.description=g.trimColon(r[c]),this.$=et;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var G=r[c],q=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");G=ut[0],q=[q,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:q};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([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:o,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:f,19:T,22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:p,17:f,19:T,22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,7]),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(y,[2,11]),t(y,[2,12],{14:[1,40],15:[1,41]}),t(y,[2,16]),{18:[1,42]},t(y,[2,18],{20:[1,43]}),{23:[1,44]},t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(y,[2,28]),{34:[1,49]},{36:[1,50]},t(y,[2,31]),{13:51,24:m,57:J},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ct,[2,44],{58:[1,56]}),t(ct,[2,45],{58:[1,57]}),t(y,[2,38]),t(y,[2,39]),t(y,[2,40]),t(y,[2,41]),t(y,[2,6]),t(y,[2,13]),{13:58,24:m,57:J},t(y,[2,17]),t(Lt,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(y,[2,29]),t(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(y,[2,14],{14:[1,71]}),{4:o,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:f,19:T,21:[1,72],22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(ct,[2,46]),t(ct,[2,47]),t(y,[2,15]),t(y,[2,19]),t(Lt,i,{7:78}),t(y,[2,26]),t(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:f,19:T,21:[1,81],22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,32]),t(y,[2,33]),t(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:S(function(l,d){if(d.recoverable)this.trace(l);else{var n=new Error(l);throw n.hash=d,n}},"parseError"),parse:S(function(l){var d=this,n=[0],g=[],_=[null],r=[],B=this.table,c="",G=0,q=0,ut=2,et=1,Tt=r.slice.call(arguments,1),D=Object.create(this.lexer),H={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(H.yy[Et]=this.yy[Et]);D.setInput(l,H.yy),H.yy.lexer=D,H.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var _t=D.yylloc;r.push(_t);var Zt=D.options&&D.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(I){n.length=n.length-2*I,_.length=_.length-I,r.length=r.length-I}S(te,"popStack");function wt(){var I;return I=g.pop()||D.lex()||et,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=d.symbols_[I]||I),I}S(wt,"lex");for(var w,z,N,mt,Q={},dt,M,Rt,ft;;){if(z=n[n.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((w===null||typeof w>"u")&&(w=wt()),N=B[z]&&B[z][w]),typeof N>"u"||!N.length||!N[0]){var bt="";ft=[];for(dt in B[z])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");D.showPosition?bt="Parse error on line "+(G+1)+`: +import{g as ee}from"./chunk-XXDRQBXY-B5A5gE3j.js";import{s as se}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{a as S,at as b,Y as F,aK as ie,b9 as re,W as ae,aR as ne,V as oe,aQ as le,aT as ce,$ as he,T as ue,x as K,s as de}from"./mermaid.core-l-gs7P2Q.js";import{c as fe}from"./chunk-2GRJ4B5K-CS99z7QO.js";import{aG as Dt}from"../../app/index-BKQXvMzA.js";import pe from"../../chunks/purify.es-BnINGy_Y.js";var Ct=function(){var t=S(function(W,l,d,n){for(d=d||{},n=W.length;n--;d[W[n]]=l);return d},"o"),e=[1,2],s=[1,3],a=[1,4],i=[2,4],o=[1,9],h=[1,11],p=[1,16],f=[1,17],T=[1,18],E=[1,19],m=[1,33],R=[1,20],C=[1,21],x=[1,22],$=[1,23],O=[1,24],u=[1,26],L=[1,27],k=[1,28],V=[1,29],P=[1,30],v=[1,31],Y=[1,32],j=[1,35],nt=[1,36],ot=[1,37],lt=[1,38],J=[1,34],y=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],ct=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Lt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],gt={trace:S(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:S(function(l,d,n,g,_,r,B){var c=r.length-1;switch(_){case 3:return g.setRootDoc(r[c]),r[c];case 4:this.$=[];break;case 5:r[c]!="nl"&&(r[c-1].push(r[c]),this.$=r[c-1]);break;case 6:case 7:this.$=r[c];break;case 8:this.$="nl";break;case 12:this.$=r[c];break;case 13:const et=r[c-1];et.description=g.trimColon(r[c]),this.$=et;break;case 14:this.$={stmt:"relation",state1:r[c-2],state2:r[c]};break;case 15:const Tt=g.trimColon(r[c]);this.$={stmt:"relation",state1:r[c-3],state2:r[c-1],description:Tt};break;case 19:this.$={stmt:"state",id:r[c-3],type:"default",description:"",doc:r[c-1]};break;case 20:var G=r[c],q=r[c-2].trim();if(r[c].match(":")){var ut=r[c].split(":");G=ut[0],q=[q,ut[1]]}this.$={stmt:"state",id:G,type:"default",description:q};break;case 21:this.$={stmt:"state",id:r[c-3],type:"default",description:r[c-5],doc:r[c-1]};break;case 22:this.$={stmt:"state",id:r[c],type:"fork"};break;case 23:this.$={stmt:"state",id:r[c],type:"join"};break;case 24:this.$={stmt:"state",id:r[c],type:"choice"};break;case 25:this.$={stmt:"state",id:g.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:r[c-1].trim(),note:{position:r[c-2].trim(),text:r[c].trim()}};break;case 29:this.$=r[c].trim(),g.setAccTitle(this.$);break;case 30:case 31:this.$=r[c].trim(),g.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:r[c-3],url:r[c-2],tooltip:r[c-1]};break;case 33:this.$={stmt:"click",id:r[c-3],url:r[c-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:r[c-1].trim(),classes:r[c].trim()};break;case 36:this.$={stmt:"style",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 37:this.$={stmt:"applyClass",id:r[c-1].trim(),styleClass:r[c].trim()};break;case 38:g.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:g.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:g.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:g.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:r[c].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:r[c-2].trim(),classes:[r[c].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:s,6:a},{1:[3]},{3:5,4:e,5:s,6:a},{3:6,4:e,5:s,6:a},t([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:o,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:f,19:T,22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:p,17:f,19:T,22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,7]),t(y,[2,8]),t(y,[2,9]),t(y,[2,10]),t(y,[2,11]),t(y,[2,12],{14:[1,40],15:[1,41]}),t(y,[2,16]),{18:[1,42]},t(y,[2,18],{20:[1,43]}),{23:[1,44]},t(y,[2,22]),t(y,[2,23]),t(y,[2,24]),t(y,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(y,[2,28]),{34:[1,49]},{36:[1,50]},t(y,[2,31]),{13:51,24:m,57:J},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(ct,[2,44],{58:[1,56]}),t(ct,[2,45],{58:[1,57]}),t(y,[2,38]),t(y,[2,39]),t(y,[2,40]),t(y,[2,41]),t(y,[2,6]),t(y,[2,13]),{13:58,24:m,57:J},t(y,[2,17]),t(Lt,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(y,[2,29]),t(y,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(y,[2,14],{14:[1,71]}),{4:o,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:f,19:T,21:[1,72],22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(y,[2,34]),t(y,[2,35]),t(y,[2,36]),t(y,[2,37]),t(ct,[2,46]),t(ct,[2,47]),t(y,[2,15]),t(y,[2,19]),t(Lt,i,{7:78}),t(y,[2,26]),t(y,[2,27]),{5:[1,79]},{5:[1,80]},{4:o,5:h,8:8,9:10,10:12,11:13,12:14,13:15,16:p,17:f,19:T,21:[1,81],22:E,24:m,25:R,26:C,27:x,28:$,29:O,32:25,33:u,35:L,37:k,38:V,41:P,45:v,48:Y,51:j,52:nt,53:ot,54:lt,57:J},t(y,[2,32]),t(y,[2,33]),t(y,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:S(function(l,d){if(d.recoverable)this.trace(l);else{var n=new Error(l);throw n.hash=d,n}},"parseError"),parse:S(function(l){var d=this,n=[0],g=[],_=[null],r=[],B=this.table,c="",G=0,q=0,ut=2,et=1,Tt=r.slice.call(arguments,1),D=Object.create(this.lexer),H={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(H.yy[Et]=this.yy[Et]);D.setInput(l,H.yy),H.yy.lexer=D,H.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var _t=D.yylloc;r.push(_t);var Zt=D.options&&D.options.ranges;typeof H.yy.parseError=="function"?this.parseError=H.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function te(I){n.length=n.length-2*I,_.length=_.length-I,r.length=r.length-I}S(te,"popStack");function wt(){var I;return I=g.pop()||D.lex()||et,typeof I!="number"&&(I instanceof Array&&(g=I,I=g.pop()),I=d.symbols_[I]||I),I}S(wt,"lex");for(var w,z,N,mt,Q={},dt,M,Rt,ft;;){if(z=n[n.length-1],this.defaultActions[z]?N=this.defaultActions[z]:((w===null||typeof w>"u")&&(w=wt()),N=B[z]&&B[z][w]),typeof N>"u"||!N.length||!N[0]){var bt="";ft=[];for(dt in B[z])this.terminals_[dt]&&dt>ut&&ft.push("'"+this.terminals_[dt]+"'");D.showPosition?bt="Parse error on line "+(G+1)+`: `+D.showPosition()+` Expecting `+ft.join(", ")+", got '"+(this.terminals_[w]||w)+"'":bt="Parse error on line "+(G+1)+": Unexpected "+(w==et?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(bt,{text:D.match,token:this.terminals_[w]||w,line:D.yylineno,loc:_t,expected:ft})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+w);switch(N[0]){case 1:n.push(w),_.push(D.yytext),r.push(D.yylloc),n.push(N[1]),w=null,q=D.yyleng,c=D.yytext,G=D.yylineno,_t=D.yylloc;break;case 2:if(M=this.productions_[N[1]][1],Q.$=_[_.length-M],Q._$={first_line:r[r.length-(M||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(M||1)].first_column,last_column:r[r.length-1].last_column},Zt&&(Q._$.range=[r[r.length-(M||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(Q,[c,q,G,H.yy,N[1],_,r].concat(Tt)),typeof mt<"u")return mt;M&&(n=n.slice(0,-1*M*2),_=_.slice(0,-1*M),r=r.slice(0,-1*M)),n.push(this.productions_[N[1]][0]),_.push(Q.$),r.push(Q._$),Rt=B[n[n.length-2]][n[n.length-1]],n.push(Rt);break;case 3:return!0}}return!0},"parse")},Qt=function(){var W={EOF:1,parseError:S(function(d,n){if(this.yy.parser)this.yy.parser.parseError(d,n);else throw new Error(d)},"parseError"),setInput:S(function(l,d){return this.yy=d||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:S(function(){var l=this._input[0];this.yytext+=l,this.yyleng++,this.offset++,this.match+=l,this.matched+=l;var d=l.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),l},"input"),unput:S(function(l){var d=l.length,n=l.split(/(?:\r\n?|\n)/g);this._input=l+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;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),n.length-1&&(this.yylineno-=n.length-1);var _=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===g.length?this.yylloc.first_column:0)+g[g.length-n.length].length-n[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:S(function(){return this._more=!0,this},"more"),reject:S(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:S(function(l){this.unput(this.match.slice(l))},"less"),pastInput:S(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:S(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:S(function(){var l=this.pastInput(),d=new Array(l.length+1).join("-");return l+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-5VM5RSS4-C2BXfYOP.js b/veadk/webui/assets/visualizations/mermaid/chunk-5VM5RSS4-CqwEymVq.js similarity index 83% rename from veadk/webui/assets/visualizations/mermaid/chunk-5VM5RSS4-C2BXfYOP.js rename to veadk/webui/assets/visualizations/mermaid/chunk-5VM5RSS4-CqwEymVq.js index 585f2d228..9622dd7ca 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-5VM5RSS4-C2BXfYOP.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-5VM5RSS4-CqwEymVq.js @@ -1,4 +1,4 @@ -import{a as e}from"./mermaid.core-BmHujEI0.js";var l=e(()=>` +import{a as e}from"./mermaid.core-l-gs7P2Q.js";var l=e(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-6Q2QTUOP-BK6W1hz6.js b/veadk/webui/assets/visualizations/mermaid/chunk-6Q2QTUOP-CKQiwqPP.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/chunk-6Q2QTUOP-BK6W1hz6.js rename to veadk/webui/assets/visualizations/mermaid/chunk-6Q2QTUOP-CKQiwqPP.js index 6624a4ddf..24174b475 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-6Q2QTUOP-BK6W1hz6.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-6Q2QTUOP-CKQiwqPP.js @@ -1,4 +1,4 @@ -import{a as p,at as k,aP as H,X as _,s as q,a8 as G,B as U,aN as j,Y as K}from"./mermaid.core-BmHujEI0.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),k.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),k.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};k.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&k.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),k.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,` +import{a as p,at as k,aP as H,X as _,s as q,a8 as G,B as U,aN as j,Y as K}from"./mermaid.core-l-gs7P2Q.js";var A="",M="",O="",D=[],b=new Map,v=p(e=>j(e,K()),"sanitizeText"),y=p(e=>{switch(e.type){case"terminal":return{...e,value:v(e.value)};case"nonterminal":return{...e,name:v(e.name)};case"sequence":return{...e,elements:e.elements.map(y)};case"choice":return{...e,alternatives:e.alternatives.map(y)};case"optional":return{...e,element:y(e.element)};case"repetition":return{...e,element:y(e.element),separator:e.separator?y(e.separator):void 0};case"special":return{...e,text:v(e.text)}}},"sanitizeAstNode"),J=p(()=>{A="",M="",O="",D.length=0,b.clear(),q(),k.debug("[Railroad] Database cleared")},"clear"),Y=p(e=>{A=v(e),k.debug("[Railroad] Title set:",e)},"setTitle"),P=p(()=>A,"getTitle"),Q=p(e=>{const i={...e,name:v(e.name),definition:y(e.definition),comment:e.comment?v(e.comment):void 0};k.debug("[Railroad] Adding rule:",i.name),b.has(i.name)&&k.warn(`[Railroad] Rule '${i.name}' is already defined. Overwriting.`),D.push(i),b.set(i.name,i)},"addRule"),Z=p(()=>D,"getRules"),V=p(e=>b.get(e),"getRule"),ee=p(e=>{M=v(e).replace(/^\s+/g,""),k.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),te=p(()=>M,"getAccTitle"),re=p(e=>{O=v(e).replace(/\n\s+/g,` `),k.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),ie=p(()=>O,"getAccDescription"),ae=Y,ne=P,oe={clear:J,setTitle:Y,getTitle:P,addRule:Q,getRules:Z,getRule:V,setAccTitle:ee,getAccTitle:te,setAccDescription:re,getAccDescription:ie,setDiagramTitle:ae,getDiagramTitle:ne},f={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},le=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,se=/^[\w "',.-]+$/,de=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"]),L=p(e=>e?Object.keys(e).every(i=>i==="railroad"||de.has(i)):!1,"isRailroadStyleOptions"),ce=p(e=>e?"railroad"in e&&e.railroad?e.railroad:L(e)?e:{}:{},"extractRailroadOverrides"),me=p(e=>{if(!e||L(e))return{};const{railroad:i,svgId:n,theme:a,look:t,...r}=e;return r},"extractThemeOverrides"),m=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return le.test(n)?n:i},"sanitizeColorValue"),X=p((e,i)=>{if(typeof e!="string")return i;const n=e.trim();return se.test(n)?n:i},"sanitizeFontFamilyValue"),F=p((e,i)=>{const n=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(n)&&n>=0?n:i},"sanitizeNumberValue"),he=p(e=>{const i=typeof e=="number"?e:typeof e=="string"?Number.parseFloat(e):Number.NaN;return Number.isFinite(i)&&i>0?i:void 0},"parseThemeFontSize"),pe=p(e=>{const i=X(e.fontFamily,f.fontFamily),n=he(e.fontSize)??f.fontSize;return{...f,fontFamily:i,fontSize:n,terminalFill:m(e.secondBkg??e.secondaryColor,f.terminalFill),terminalStroke:m(e.secondaryBorderColor??e.lineColor,f.terminalStroke),terminalTextColor:m(e.secondaryTextColor??e.textColor,f.terminalTextColor),nonTerminalFill:m(e.mainBkg??e.background,f.nonTerminalFill),nonTerminalStroke:m(e.primaryBorderColor??e.lineColor,f.nonTerminalStroke),nonTerminalTextColor:m(e.primaryTextColor??e.textColor,f.nonTerminalTextColor),lineColor:m(e.lineColor,f.lineColor),markerFill:m(e.lineColor,f.markerFill),commentFill:m(e.labelBackground??e.tertiaryColor,f.commentFill),commentStroke:m(e.tertiaryBorderColor??e.lineColor,f.commentStroke),commentTextColor:m(e.tertiaryTextColor??e.textColor,f.commentTextColor),specialFill:m(e.tertiaryColor??e.secondaryColor,f.specialFill),specialStroke:m(e.tertiaryBorderColor??e.secondaryBorderColor,f.specialStroke),ruleNameColor:m(e.titleColor??e.textColor,f.ruleNameColor)}},"buildThemeDefaults"),E=p(e=>{const i=_(),n={...G(),...i.themeVariables??{},...me(e)},a=pe(n),t={...i.railroad??{},...ce(e)};return{compactMode:t.compactMode??a.compactMode,padding:F(t.padding,a.padding),verticalSeparation:F(t.verticalSeparation,a.verticalSeparation),horizontalSeparation:F(t.horizontalSeparation,a.horizontalSeparation),arcRadius:F(t.arcRadius,a.arcRadius),fontSize:F(t.fontSize,a.fontSize),fontFamily:X(t.fontFamily,a.fontFamily),terminalFill:m(t.terminalFill,a.terminalFill),terminalStroke:m(t.terminalStroke,a.terminalStroke),terminalTextColor:m(t.terminalTextColor,a.terminalTextColor),nonTerminalFill:m(t.nonTerminalFill,a.nonTerminalFill),nonTerminalStroke:m(t.nonTerminalStroke,a.nonTerminalStroke),nonTerminalTextColor:m(t.nonTerminalTextColor,a.nonTerminalTextColor),lineColor:m(t.lineColor,a.lineColor),strokeWidth:F(t.strokeWidth,a.strokeWidth),markerFill:m(t.markerFill,a.markerFill),commentFill:m(t.commentFill,a.commentFill),commentStroke:m(t.commentStroke,a.commentStroke),commentTextColor:m(t.commentTextColor,a.commentTextColor),specialFill:m(t.specialFill,a.specialFill),specialStroke:m(t.specialStroke,a.specialStroke),ruleNameColor:m(t.ruleNameColor,a.ruleNameColor),showMarkers:t.showMarkers??a.showMarkers,markerRadius:F(t.markerRadius,a.markerRadius)}},"buildRailroadStyleOptions"),Te=p(e=>{const{fontFamily:i,fontSize:n,terminalFill:a,terminalStroke:t,terminalTextColor:r,nonTerminalFill:o,nonTerminalStroke:g,nonTerminalTextColor:l,lineColor:s,strokeWidth:h,markerFill:u,commentFill:c,commentStroke:w,commentTextColor:d,specialFill:T,specialStroke:z,ruleNameColor:S}=E(e);return` .railroad-diagram { font-family: ${i}; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-GF5L2VYU-_IA0EfRa.js b/veadk/webui/assets/visualizations/mermaid/chunk-GF5L2VYU-CvS75Pir.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/chunk-GF5L2VYU-_IA0EfRa.js rename to veadk/webui/assets/visualizations/mermaid/chunk-GF5L2VYU-CvS75Pir.js index 9f3c2b296..6c94a4bab 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-GF5L2VYU-_IA0EfRa.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-GF5L2VYU-CvS75Pir.js @@ -1,4 +1,4 @@ -import{g as st}from"./chunk-5VM5RSS4-C2BXfYOP.js";import{g as it}from"./chunk-XXDRQBXY-CLLbPKnJ.js";import{s as at}from"./chunk-KBJHAD2P-fr6wew8I.js";import{a as m,at as we,Y as F,a4 as rt,aK as nt,b9 as Ve,aR as ut,W as lt,aQ as ct,V as ot,aT as ht,$ as dt,x as I,s as pt,a0 as At,aN as ft,aD as z}from"./mermaid.core-BmHujEI0.js";import{c as mt}from"./chunk-2GRJ4B5K-CbPivXt6.js";import{aG as fe}from"../../app/index-B71Wq9_t.js";import gt from"../../chunks/purify.es-BnINGy_Y.js";var Pe=function(){var s=m(function(O,o,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=o);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],f=[1,24],c=[1,25],g=[1,32],B=[1,33],R=[1,34],b=[1,45],ge=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],G=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[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],ue=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],le=[1,103],W=[1,121],Q=[1,117],j=[1,113],X=[1,119],q=[1,114],H=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ce=[12,39],Ne=[1,8,9,39,41,44,46],oe=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:m(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:m(function(o,d,p,l,C,e,ee){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:l.addRelation(e[t]);break;case 20:e[t-1].title=l.cleanupLabel(e[t]),l.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[t-3],e[t-1][0],e[t-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[t-4],e[t-1][0],e[t-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[t]);break;case 37:this.$=l.addNamespace(e[t-1],e[t]);break;case 38:this.$=[[e[t]],[]];break;case 39:this.$=[[e[t-1]],[]];break;case 40:e[t][0].unshift(e[t-2]),this.$=e[t];break;case 41:this.$=[[],[e[t]]];break;case 42:this.$=[[],[e[t-1]]];break;case 43:e[t][1].unshift(e[t-2]),this.$=e[t];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[t];break;case 48:l.setCssClass(e[t-2],e[t]);break;case 49:l.addMembers(e[t-3],e[t-1]);break;case 51:l.setCssClass(e[t-5],e[t-3]),l.addMembers(e[t-5],e[t-1]);break;case 52:l.addAnnotation(e[t-3],e[t-1]);break;case 53:l.addAnnotation(e[t-6],e[t-4]),l.addMembers(e[t-6],e[t-1]);break;case 54:l.addAnnotation(e[t-5],e[t-3]);break;case 55:this.$=e[t],l.addClass(e[t]);break;case 56:this.$=e[t-1],l.addClass(e[t-1]),l.setClassLabel(e[t-1],e[t]);break;case 60:l.addAnnotation(e[t],e[t-2]);break;case 61:case 74:this.$=[e[t]];break;case 62:e[t].push(e[t-1]),this.$=e[t];break;case 63:break;case 64:l.addMember(e[t-1],l.cleanupLabel(e[t]));break;case 65:break;case 66:break;case 67:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 69:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 70:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 71:this.$=l.addNote(e[t],e[t-1]);break;case 72:this.$=l.addNote(e[t]);break;case 73:this.$=e[t-2],l.defineClass(e[t-1],e[t]);break;case 75:this.$=e[t-2].concat([e[t]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 81:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 82:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[t-2],l.setClickEvent(e[t-1],e[t]);break;case 92:case 98:this.$=e[t-3],l.setClickEvent(e[t-2],e[t-1]),l.setTooltip(e[t-2],e[t]);break;case 93:this.$=e[t-2],l.setLink(e[t-1],e[t]);break;case 94:this.$=e[t-3],l.setLink(e[t-2],e[t-1],e[t]);break;case 95:this.$=e[t-3],l.setLink(e[t-2],e[t-1]),l.setTooltip(e[t-2],e[t]);break;case 96:this.$=e[t-4],l.setLink(e[t-3],e[t-2],e[t]),l.setTooltip(e[t-3],e[t-1]);break;case 99:this.$=e[t-3],l.setClickEvent(e[t-2],e[t-1],e[t]);break;case 100:this.$=e[t-4],l.setClickEvent(e[t-3],e[t-2],e[t-1]),l.setTooltip(e[t-3],e[t]);break;case 101:this.$=e[t-3],l.setLink(e[t-2],e[t]);break;case 102:this.$=e[t-4],l.setLink(e[t-3],e[t-1],e[t]);break;case 103:this.$=e[t-4],l.setLink(e[t-3],e[t-1]),l.setTooltip(e[t-3],e[t]);break;case 104:this.$=e[t-5],l.setLink(e[t-4],e[t-2],e[t]),l.setTooltip(e[t-4],e[t-1]);break;case 105:this.$=e[t-2],l.setCssStyle(e[t-1],e[t]);break;case 106:l.setCssClass(e[t-1],e[t]);break;case 107:this.$=[e[t]];break;case 108:e[t-2].push(e[t]),this.$=e[t-2];break;case 110:this.$=e[t-1]+e[t];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:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:f,52:c,54:g,56:B,57:R,60:b,62:ge,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Be,[2,5],{8:[1,48]}),{8:[1,49]},s(A,[2,19],{22:[1,50]}),s(A,[2,21]),s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),s(A,[2,26]),s(A,[2,27]),s(A,[2,28]),s(A,[2,29]),s(A,[2,30]),{34:[1,51]},{36:[1,52]},s(A,[2,33]),s(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},s(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),s(A,[2,65]),s(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},s(A,[2,76]),s(A,[2,77]),s(A,[2,78]),s(A,[2,79]),s(G,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),s(G,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},s(ne,[2,133]),s(ne,[2,134]),s(ne,[2,135]),s(ne,[2,136]),s([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),s(Be,[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:i,35:a,37:r,42:n,46:u,48:h,51:f,52:c,54:g,56:B,57:R,60:b,62:ge,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{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:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:f,52:c,54:g,56:B,57:R,60:b,62:ge,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},s(A,[2,20]),s(A,[2,31]),s(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},s(A,[2,64]),{67:93,73:_e,74:Se},s(ue,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),s(K,[2,84]),s(K,[2,85]),s(K,[2,86]),s(K,[2,87]),s(K,[2,88]),s(Re,[2,89]),s(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:g,56:B},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:le},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:j,82:X,84:111,85:112,86:q,87:H,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},s(S,[2,72]),s(S,[2,138]),{22:W,50:Q,59:124,60:j,61:[1,125],82:X,84:111,85:112,86:q,87:H,88:J,89:Z,90:$},s(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},s(G,[2,16]),s(G,[2,17]),s(G,[2,18]),{11:127,12:Ue,39:[2,36]},s(ce,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),s(ce,[2,10]),s(Ne,[2,55],{11:131,12:Ue}),s(Be,[2,7]),{9:[1,132]},s(oe,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},s(ue,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),s(ue,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:g,56:B},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},s(S,[2,48],{39:[1,142]}),{41:[1,143]},s(S,[2,50]),{41:[2,61],45:144,51:le},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},s(A,[2,91],{13:[1,147]}),s(A,[2,93],{13:[1,149],77:[1,148]}),s(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},s(A,[2,105],{61:ze}),s(Ye,[2,107],{85:154,22:W,50:Q,60:j,82:X,86:q,87:H,88:J,89:Z,90:$}),s(x,[2,109]),s(x,[2,111]),s(x,[2,112]),s(x,[2,113]),s(x,[2,114]),s(x,[2,115]),s(x,[2,116]),s(x,[2,117]),s(x,[2,118]),s(x,[2,119]),s(A,[2,106]),s(S,[2,71]),s(A,[2,73],{61:ze}),{60:[1,155]},s(G,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},s(ce,[2,12]),s(Ne,[2,56]),{1:[2,4]},s(oe,[2,69]),s(oe,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},s(ue,[2,80]),s(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:g,56:B},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:g,56:B},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:g,56:B},{45:163,51:le},s(S,[2,49]),{41:[2,62]},s(S,[2,52],{39:[1,164]}),s(A,[2,60]),s(A,[2,92]),s(A,[2,94]),s(A,[2,95],{77:[1,165]}),s(A,[2,98]),s(A,[2,99],{13:[1,166]}),s(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:j,82:X,84:169,85:112,86:q,87:H,88:J,89:Z,90:$},s(x,[2,110]),s(Ge,[2,75]),{14:[1,170]},s(ce,[2,11]),s(oe,[2,70]),s(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:le},s(A,[2,96]),s(A,[2,100]),s(A,[2,102]),s(A,[2,103],{77:[1,174]}),s(Ye,[2,108],{85:154,22:W,50:Q,60:j,82:X,86:q,87:H,88:J,89:Z,90:$}),s(Ne,[2,8]),s(S,[2,51]),{41:[1,175]},s(S,[2,54]),s(A,[2,104]),s(S,[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:m(function(o,d){if(d.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=d,p}},"parseError"),parse:m(function(o){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,t="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(o,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}m(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}m(Qe,"lex");for(var _,P,L,Ie,U={},pe,v,je,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=Qe()),L=ee[P]&&ee[P][_]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`: +import{g as st}from"./chunk-5VM5RSS4-CqwEymVq.js";import{g as it}from"./chunk-XXDRQBXY-B5A5gE3j.js";import{s as at}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{a as m,at as we,Y as F,a4 as rt,aK as nt,b9 as Ve,aR as ut,W as lt,aQ as ct,V as ot,aT as ht,$ as dt,x as I,s as pt,a0 as At,aN as ft,aD as z}from"./mermaid.core-l-gs7P2Q.js";import{c as mt}from"./chunk-2GRJ4B5K-CS99z7QO.js";import{aG as fe}from"../../app/index-BKQXvMzA.js";import gt from"../../chunks/purify.es-BnINGy_Y.js";var Pe=function(){var s=m(function(O,o,d,p){for(d=d||{},p=O.length;p--;d[O[p]]=o);return d},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],u=[1,26],h=[1,42],f=[1,24],c=[1,25],g=[1,32],B=[1,33],R=[1,34],b=[1,45],ge=[1,35],Ce=[1,36],be=[1,37],ke=[1,38],Ee=[1,27],Te=[1,28],ye=[1,29],De=[1,30],Fe=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],Be=[1,9],A=[1,8,9],te=[1,58],se=[1,59],ie=[1,60],ae=[1,61],re=[1,62],_e=[1,63],Se=[1,64],S=[1,8,9,41],Me=[1,77],G=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ne=[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],ue=[13,60,86,100,102,103],K=[13,60,73,74,86,100,102,103],Re=[13,60,68,69,70,71,72,86,100,102,103],le=[1,103],W=[1,121],Q=[1,117],j=[1,113],X=[1,119],q=[1,114],H=[1,115],J=[1,116],Z=[1,118],$=[1,120],Ge=[22,50,60,61,82,86,87,88,89,90],Ue=[1,128],ce=[12,39],Ne=[1,8,9,39,41,44,46],oe=[1,8,9,22],ze=[1,153],Ye=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Le={trace:m(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:m(function(o,d,p,l,C,e,ee){var t=e.length-1;switch(C){case 8:this.$=e[t-1];break;case 9:case 10:case 13:case 15:this.$=e[t];break;case 11:case 14:this.$=e[t-2]+"."+e[t];break;case 12:case 16:this.$=e[t-1]+e[t];break;case 17:case 18:this.$=e[t-1]+"~"+e[t]+"~";break;case 19:l.addRelation(e[t]);break;case 20:e[t-1].title=l.cleanupLabel(e[t]),l.addRelation(e[t-1]);break;case 31:this.$=e[t].trim(),l.setAccTitle(this.$);break;case 32:case 33:this.$=e[t].trim(),l.setAccDescription(this.$);break;case 34:l.addClassesToNamespace(e[t-3],e[t-1][0],e[t-1][1]),l.popNamespace();break;case 35:l.addClassesToNamespace(e[t-4],e[t-1][0],e[t-1][1]),l.popNamespace();break;case 36:this.$=l.addNamespace(e[t]);break;case 37:this.$=l.addNamespace(e[t-1],e[t]);break;case 38:this.$=[[e[t]],[]];break;case 39:this.$=[[e[t-1]],[]];break;case 40:e[t][0].unshift(e[t-2]),this.$=e[t];break;case 41:this.$=[[],[e[t]]];break;case 42:this.$=[[],[e[t-1]]];break;case 43:e[t][1].unshift(e[t-2]),this.$=e[t];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[t];break;case 48:l.setCssClass(e[t-2],e[t]);break;case 49:l.addMembers(e[t-3],e[t-1]);break;case 51:l.setCssClass(e[t-5],e[t-3]),l.addMembers(e[t-5],e[t-1]);break;case 52:l.addAnnotation(e[t-3],e[t-1]);break;case 53:l.addAnnotation(e[t-6],e[t-4]),l.addMembers(e[t-6],e[t-1]);break;case 54:l.addAnnotation(e[t-5],e[t-3]);break;case 55:this.$=e[t],l.addClass(e[t]);break;case 56:this.$=e[t-1],l.addClass(e[t-1]),l.setClassLabel(e[t-1],e[t]);break;case 60:l.addAnnotation(e[t],e[t-2]);break;case 61:case 74:this.$=[e[t]];break;case 62:e[t].push(e[t-1]),this.$=e[t];break;case 63:break;case 64:l.addMember(e[t-1],l.cleanupLabel(e[t]));break;case 65:break;case 66:break;case 67:this.$={id1:e[t-2],id2:e[t],relation:e[t-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[t-3],id2:e[t],relation:e[t-1],relationTitle1:e[t-2],relationTitle2:"none"};break;case 69:this.$={id1:e[t-3],id2:e[t],relation:e[t-2],relationTitle1:"none",relationTitle2:e[t-1]};break;case 70:this.$={id1:e[t-4],id2:e[t],relation:e[t-2],relationTitle1:e[t-3],relationTitle2:e[t-1]};break;case 71:this.$=l.addNote(e[t],e[t-1]);break;case 72:this.$=l.addNote(e[t]);break;case 73:this.$=e[t-2],l.defineClass(e[t-1],e[t]);break;case 75:this.$=e[t-2].concat([e[t]]);break;case 76:l.setDirection("TB");break;case 77:l.setDirection("BT");break;case 78:l.setDirection("RL");break;case 79:l.setDirection("LR");break;case 80:this.$={type1:e[t-2],type2:e[t],lineType:e[t-1]};break;case 81:this.$={type1:"none",type2:e[t],lineType:e[t-1]};break;case 82:this.$={type1:e[t-1],type2:"none",lineType:e[t]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[t]};break;case 84:this.$=l.relationType.AGGREGATION;break;case 85:this.$=l.relationType.EXTENSION;break;case 86:this.$=l.relationType.COMPOSITION;break;case 87:this.$=l.relationType.DEPENDENCY;break;case 88:this.$=l.relationType.LOLLIPOP;break;case 89:this.$=l.lineType.LINE;break;case 90:this.$=l.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[t-2],l.setClickEvent(e[t-1],e[t]);break;case 92:case 98:this.$=e[t-3],l.setClickEvent(e[t-2],e[t-1]),l.setTooltip(e[t-2],e[t]);break;case 93:this.$=e[t-2],l.setLink(e[t-1],e[t]);break;case 94:this.$=e[t-3],l.setLink(e[t-2],e[t-1],e[t]);break;case 95:this.$=e[t-3],l.setLink(e[t-2],e[t-1]),l.setTooltip(e[t-2],e[t]);break;case 96:this.$=e[t-4],l.setLink(e[t-3],e[t-2],e[t]),l.setTooltip(e[t-3],e[t-1]);break;case 99:this.$=e[t-3],l.setClickEvent(e[t-2],e[t-1],e[t]);break;case 100:this.$=e[t-4],l.setClickEvent(e[t-3],e[t-2],e[t-1]),l.setTooltip(e[t-3],e[t]);break;case 101:this.$=e[t-3],l.setLink(e[t-2],e[t]);break;case 102:this.$=e[t-4],l.setLink(e[t-3],e[t-1],e[t]);break;case 103:this.$=e[t-4],l.setLink(e[t-3],e[t-1]),l.setTooltip(e[t-3],e[t]);break;case 104:this.$=e[t-5],l.setLink(e[t-4],e[t-2],e[t]),l.setTooltip(e[t-4],e[t-1]);break;case 105:this.$=e[t-2],l.setCssStyle(e[t-1],e[t]);break;case 106:l.setCssClass(e[t-1],e[t]);break;case 107:this.$=[e[t]];break;case 108:e[t-2].push(e[t]),this.$=e[t-2];break;case 110:this.$=e[t-1]+e[t];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:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:f,52:c,54:g,56:B,57:R,60:b,62:ge,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},s(Be,[2,5],{8:[1,48]}),{8:[1,49]},s(A,[2,19],{22:[1,50]}),s(A,[2,21]),s(A,[2,22]),s(A,[2,23]),s(A,[2,24]),s(A,[2,25]),s(A,[2,26]),s(A,[2,27]),s(A,[2,28]),s(A,[2,29]),s(A,[2,30]),{34:[1,51]},{36:[1,52]},s(A,[2,33]),s(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se}),{39:[1,65]},s(S,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),s(A,[2,65]),s(A,[2,66]),{16:69,60:b,86:k,100:E,102:T},{16:39,17:40,19:70,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:71,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:72,60:b,86:k,100:E,102:T,103:y},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:b,86:k,100:E,102:T,103:y},{13:Me,55:76},{58:78,60:[1,79]},s(A,[2,76]),s(A,[2,77]),s(A,[2,78]),s(A,[2,79]),s(G,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),s(G,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:b,86:k,100:E,102:T,103:y},{16:39,17:40,19:87,60:b,86:k,100:E,102:T,103:y},s(ne,[2,133]),s(ne,[2,134]),s(ne,[2,135]),s(ne,[2,136]),s([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),s(Be,[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:i,35:a,37:r,42:n,46:u,48:h,51:f,52:c,54:g,56:B,57:R,60:b,62:ge,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y}),{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:i,35:a,37:r,38:22,42:n,43:23,46:u,48:h,51:f,52:c,54:g,56:B,57:R,60:b,62:ge,63:Ce,64:be,65:ke,75:Ee,76:Te,78:ye,82:De,83:Fe,86:k,100:E,102:T,103:y},s(A,[2,20]),s(A,[2,31]),s(A,[2,32]),{13:[1,91],16:39,17:40,19:90,60:b,86:k,100:E,102:T,103:y},{53:92,66:56,67:57,68:te,69:se,70:ie,71:ae,72:re,73:_e,74:Se},s(A,[2,64]),{67:93,73:_e,74:Se},s(ue,[2,83],{66:94,68:te,69:se,70:ie,71:ae,72:re}),s(K,[2,84]),s(K,[2,85]),s(K,[2,86]),s(K,[2,87]),s(K,[2,88]),s(Re,[2,89]),s(Re,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:h,54:g,56:B},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:le},{16:104,60:b,86:k,100:E,102:T},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:W,50:Q,59:110,60:j,82:X,84:111,85:112,86:q,87:H,88:J,89:Z,90:$},{60:[1,122]},{13:Me,55:123},s(S,[2,72]),s(S,[2,138]),{22:W,50:Q,59:124,60:j,61:[1,125],82:X,84:111,85:112,86:q,87:H,88:J,89:Z,90:$},s(Ge,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},s(G,[2,16]),s(G,[2,17]),s(G,[2,18]),{11:127,12:Ue,39:[2,36]},s(ce,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),s(ce,[2,10]),s(Ne,[2,55],{11:131,12:Ue}),s(Be,[2,7]),{9:[1,132]},s(oe,[2,67]),{16:39,17:40,19:133,60:b,86:k,100:E,102:T,103:y},{13:[1,135],16:39,17:40,19:134,60:b,86:k,100:E,102:T,103:y},s(ue,[2,82],{66:136,68:te,69:se,70:ie,71:ae,72:re}),s(ue,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:h,54:g,56:B},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},s(S,[2,48],{39:[1,142]}),{41:[1,143]},s(S,[2,50]),{41:[2,61],45:144,51:le},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},s(A,[2,91],{13:[1,147]}),s(A,[2,93],{13:[1,149],77:[1,148]}),s(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},s(A,[2,105],{61:ze}),s(Ye,[2,107],{85:154,22:W,50:Q,60:j,82:X,86:q,87:H,88:J,89:Z,90:$}),s(x,[2,109]),s(x,[2,111]),s(x,[2,112]),s(x,[2,113]),s(x,[2,114]),s(x,[2,115]),s(x,[2,116]),s(x,[2,117]),s(x,[2,118]),s(x,[2,119]),s(A,[2,106]),s(S,[2,71]),s(A,[2,73],{61:ze}),{60:[1,155]},s(G,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},s(ce,[2,12]),s(Ne,[2,56]),{1:[2,4]},s(oe,[2,69]),s(oe,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},s(ue,[2,80]),s(S,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:h,54:g,56:B},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:h,54:g,56:B},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:h,54:g,56:B},{45:163,51:le},s(S,[2,49]),{41:[2,62]},s(S,[2,52],{39:[1,164]}),s(A,[2,60]),s(A,[2,92]),s(A,[2,94]),s(A,[2,95],{77:[1,165]}),s(A,[2,98]),s(A,[2,99],{13:[1,166]}),s(A,[2,101],{13:[1,168],77:[1,167]}),{22:W,50:Q,60:j,82:X,84:169,85:112,86:q,87:H,88:J,89:Z,90:$},s(x,[2,110]),s(Ge,[2,75]),{14:[1,170]},s(ce,[2,11]),s(oe,[2,70]),s(S,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:le},s(A,[2,96]),s(A,[2,100]),s(A,[2,102]),s(A,[2,103],{77:[1,174]}),s(Ye,[2,108],{85:154,22:W,50:Q,60:j,82:X,86:q,87:H,88:J,89:Z,90:$}),s(Ne,[2,8]),s(S,[2,51]),{41:[1,175]},s(S,[2,54]),s(A,[2,104]),s(S,[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:m(function(o,d){if(d.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=d,p}},"parseError"),parse:m(function(o){var d=this,p=[0],l=[],C=[null],e=[],ee=this.table,t="",de=0,Ke=0,Ze=2,We=1,$e=e.slice.call(arguments,1),D=Object.create(this.lexer),V={yy:{}};for(var xe in this.yy)Object.prototype.hasOwnProperty.call(this.yy,xe)&&(V.yy[xe]=this.yy[xe]);D.setInput(o,V.yy),V.yy.lexer=D,V.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var ve=D.yylloc;e.push(ve);var et=D.options&&D.options.ranges;typeof V.yy.parseError=="function"?this.parseError=V.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(N){p.length=p.length-2*N,C.length=C.length-N,e.length=e.length-N}m(tt,"popStack");function Qe(){var N;return N=l.pop()||D.lex()||We,typeof N!="number"&&(N instanceof Array&&(l=N,N=l.pop()),N=d.symbols_[N]||N),N}m(Qe,"lex");for(var _,P,L,Ie,U={},pe,v,je,Ae;;){if(P=p[p.length-1],this.defaultActions[P]?L=this.defaultActions[P]:((_===null||typeof _>"u")&&(_=Qe()),L=ee[P]&&ee[P][_]),typeof L>"u"||!L.length||!L[0]){var Oe="";Ae=[];for(pe in ee[P])this.terminals_[pe]&&pe>Ze&&Ae.push("'"+this.terminals_[pe]+"'");D.showPosition?Oe="Parse error on line "+(de+1)+`: `+D.showPosition()+` Expecting `+Ae.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Oe="Parse error on line "+(de+1)+": Unexpected "+(_==We?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Oe,{text:D.match,token:this.terminals_[_]||_,line:D.yylineno,loc:ve,expected:Ae})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+_);switch(L[0]){case 1:p.push(_),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),_=null,Ke=D.yyleng,t=D.yytext,de=D.yylineno,ve=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],U.$=C[C.length-v],U._$={first_line:e[e.length-(v||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(v||1)].first_column,last_column:e[e.length-1].last_column},et&&(U._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),Ie=this.performAction.apply(U,[t,Ke,de,V.yy,L[1],C,e].concat($e)),typeof Ie<"u")return Ie;v&&(p=p.slice(0,-1*v*2),C=C.slice(0,-1*v),e=e.slice(0,-1*v)),p.push(this.productions_[L[1]][0]),C.push(U.$),e.push(U._$),je=ee[p[p.length-2]][p[p.length-1]],p.push(je);break;case 3:return!0}}return!0},"parse")},Je=function(){var O={EOF:1,parseError:m(function(d,p){if(this.yy.parser)this.yy.parser.parseError(d,p);else throw new Error(d)},"parseError"),setInput:m(function(o,d){return this.yy=d||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:m(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var d=o.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),o},"input"),unput:m(function(o){var d=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var l=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 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:p?(p.length===l.length?this.yylloc.first_column:0)+l[l.length-p.length].length-p[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:m(function(){return this._more=!0,this},"more"),reject:m(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:m(function(o){this.unput(this.match.slice(o))},"less"),pastInput:m(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:m(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:m(function(){var o=this.pastInput(),d=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-JWPE2WC7-BHkERHFx.js b/veadk/webui/assets/visualizations/mermaid/chunk-JWPE2WC7-BDxoW4e4.js similarity index 78% rename from veadk/webui/assets/visualizations/mermaid/chunk-JWPE2WC7-BHkERHFx.js rename to veadk/webui/assets/visualizations/mermaid/chunk-JWPE2WC7-BDxoW4e4.js index 14c07c7e5..a0218d96d 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-JWPE2WC7-BHkERHFx.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-JWPE2WC7-BDxoW4e4.js @@ -1 +1 @@ -import{a as l}from"./mermaid.core-BmHujEI0.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; +import{a as l}from"./mermaid.core-l-gs7P2Q.js";function m(e,c){var i,t,o;e.accDescr&&((i=c.setAccDescription)==null||i.call(c,e.accDescr)),e.accTitle&&((t=c.setAccTitle)==null||t.call(c,e.accTitle)),e.title&&((o=c.setDiagramTitle)==null||o.call(c,e.title))}l(m,"populateCommonDb");export{m as p}; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-KBJHAD2P-fr6wew8I.js b/veadk/webui/assets/visualizations/mermaid/chunk-KBJHAD2P-mhv9-tYP.js similarity index 87% rename from veadk/webui/assets/visualizations/mermaid/chunk-KBJHAD2P-fr6wew8I.js rename to veadk/webui/assets/visualizations/mermaid/chunk-KBJHAD2P-mhv9-tYP.js index 0363a1c25..44c1bfb56 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-KBJHAD2P-fr6wew8I.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-KBJHAD2P-mhv9-tYP.js @@ -1 +1 @@ -import{a,B as w,at as x}from"./mermaid.core-BmHujEI0.js";var g=a((t,e,i,o)=>{t.attr("class",i);const{width:r,height:h,x:n,y:c}=u(t,e);w(t,h,r,o);const s=B(n,c,r,h,e);t.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${e}`)},"setupViewPortForSVG"),u=a((t,e)=>{var o;const i=((o=t.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((t,e,i,o,r)=>`${t-r} ${e-r} ${i} ${o}`,"createViewBox");export{g as s}; +import{a,B as w,at as x}from"./mermaid.core-l-gs7P2Q.js";var g=a((t,e,i,o)=>{t.attr("class",i);const{width:r,height:h,x:n,y:c}=u(t,e);w(t,h,r,o);const s=B(n,c,r,h,e);t.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${e}`)},"setupViewPortForSVG"),u=a((t,e)=>{var o;const i=((o=t.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+e*2,height:i.height+e*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),B=a((t,e,i,o,r)=>`${t-r} ${e-r} ${i} ${o}`,"createViewBox");export{g as s}; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-RYQCIY6F-CnbyImnC.js b/veadk/webui/assets/visualizations/mermaid/chunk-RYQCIY6F-ChBtCdXE.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/chunk-RYQCIY6F-CnbyImnC.js rename to veadk/webui/assets/visualizations/mermaid/chunk-RYQCIY6F-ChBtCdXE.js index 33223bad3..8dc043f21 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-RYQCIY6F-CnbyImnC.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-RYQCIY6F-ChBtCdXE.js @@ -1 +1 @@ -import{a as d,at as i}from"./mermaid.core-BmHujEI0.js";import{Q as C,G as y}from"../../chunks/graph-Dqkl27Ch.js";import{c as j,m as X}from"../../chunks/map-8WAJQ6ap.js";var p=4;function F(e){return j(e,p)}function b(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:R(e)};return C(e.graph())||(r.value=F(e.graph())),r}function M(e){return X(e.nodes(),function(r){var s=e.node(r),n=e.parent(r),a={v:r};return C(s)||(a.value=s),C(n)||(a.parent=n),a})}function R(e){return X(e.edges(),function(r){var s=e.edge(r),n={v:r.v,w:r.w};return C(r.name)||(n.name=r.name),C(s)||(n.value=s),n})}var c=new Map,v=new Map,A=new Map,J=d(()=>{v.clear(),A.clear(),c.clear()},"clear"),g=d((e,r)=>{const s=v.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",s.includes(e)),s.includes(e)},"isDescendant"),_=d((e,r)=>{const s=v.get(r)||[];return i.info("Descendants of ",r," is ",s),i.info("Edge is ",e),e.v===r||e.w===r?!1:s?s.includes(e.v)||g(e.v,r)||g(e.w,r)||s.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),x=d((e,r,s,n)=>{i.warn("Copying children of ",e,"root",n,"data",r.node(e),n);const a=r.children(e)||[];e!==n&&a.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach(o=>{if(r.children(o).length>0)x(o,r,s,n);else{const l=r.node(o);i.info("cp ",o," to ",n," with parent ",e),s.setNode(o,l),n!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),s.setParent(o,r.parent(o))),e!==n&&o!==e?(i.debug("Setting parent",o,e),s.setParent(o,e)):(i.info("In copy ",e,"root",n,"data",r.node(e),n),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==n,"node!==clusterId",o!==e));const u=r.edges(o);i.debug("Copying Edges",u),u.forEach(t=>{i.info("Edge",t);const f=r.edge(t.v,t.w,t.name);i.info("Edge data",f,n);try{if(_(t,n)){const w=v.get(n)||[],m=w.includes(t.v)||g(t.v,n)||t.v===n,D=w.includes(t.w)||g(t.w,n)||t.w===n;if(m&&D)i.info("Copying as ",t.v,t.w,f,t.name),s.setEdge(t.v,t.w,f,t.name),i.info("newGraph edges ",s.edges(),s.edge(s.edges()[0]));else{const N=m?n:t.v,h=D?n:t.w;i.info("Rebinding cross-boundary edge as ",N,h,f,t.name),r.setEdge(N,h,f,t.name)}}else i.info("Skipping copy of edge ",t.v,"-->",t.w," rootId: ",n," clusterId:",e)}catch(w){i.error(w)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=d((e,r)=>{const s=r.children(e);let n=[...s];for(const a of s)A.set(a,e),n=[...n,...O(a,r)];return n},"extractDescendants"),P=d((e,r,s)=>{const n=e.edges().filter(t=>t.v===r||t.w===r),a=e.edges().filter(t=>t.v===s||t.w===s),o=n.map(t=>({v:t.v===r?s:t.v,w:t.w===r?r:t.w})),l=a.map(t=>({v:t.v,w:t.w}));return o.filter(t=>l.some(f=>t.v===f.v&&t.w===f.w))},"findCommonEdges"),E=d((e,r,s)=>{const n=r.children(e);if(i.trace("Searching children of id ",e,n),n.length<1)return e;let a;for(const o of n){const l=E(o,r,s),u=P(r,s,l);if(l)if(u.length>0)a=l;else return l}return a},"findNonClusterChild"),S=d(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),Q=d((e,r)=>{var s;if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",E(n,e,n)),v.set(n,O(n,e)),c.set(n,{id:E(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),o=e.edges();a.length>0?(i.debug("Cluster identified",n,v),o.forEach(l=>{const u=g(l.v,n),t=g(l.w,n);u^t&&(i.warn("Edge: ",l," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",v.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,v)});for(let n of c.keys()){const a=c.get(n).id,o=e.parent(a);o!==n&&c.has(o)&&!c.get(o).externalConnections&&(c.get(n).id=o);const l=e.edges().some(u=>u.v===n);if(a&&((s=c.get(n))!=null&&s.externalConnections)&&l&&L(e,a,n)){const u=T(e,n,e.parent(a));u&&(c.get(n).id=u)}}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let o=n.v,l=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),o=S(n.v),l=S(n.w),e.removeEdge(n.v,n.w,n.name),o!==n.v){const u=e.parent(o);c.get(u).externalConnections=!0,a.fromCluster=n.v}if(l!==n.w){const u=e.parent(l);c.get(u).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",o,l,n.name),e.setEdge(o,l,a,n.name)}}),i.warn("Adjusted Graph",b(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=d((e,r)=>{var a,o,l,u;if(i.warn("extractor - ",r,b(e),e.children("D")),r>10){i.error("Bailing out");return}let s=e.nodes(),n=!1;for(const t of s){const f=e.children(t);n=n||f.length>0}if(!n){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",s,r);for(const t of s)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if((o=(a=c.get(t))==null?void 0:a.clusterData)!=null&&o.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const f=c.get(t).clusterData.dir,w=new y({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});x(t,e,w,t);const m=e.node(t)||{};e.setNode(t,{...m,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:w}),i.warn("Subgraph for cluster with explicit dir created:",t,b(w))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let w=e.graph().rankdir==="TB"?"LR":"TB";(u=(l=c.get(t))==null?void 0:l.clusterData)!=null&&u.dir&&(w=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,w));const m=new y({multigraph:!0,compound:!0}).setGraph({rankdir:w,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});x(t,e,m,t);const D=e.node(t)||{};e.setNode(t,{...D,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:m}),i.debug("Old graph after copy",b(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);s=e.nodes(),i.warn("New list of nodes",s);for(const t of s){const f=e.node(t);i.warn(" Now next level",t,f),f!=null&&f.clusterNode&&k(f.graph,r+1)}},"extractor"),B=d((e,r)=>{if(r.length===0)return[];let s=Object.assign([],r);return r.forEach(n=>{const a=e.children(n),o=B(e,a);s=[...s,...o]}),s},"sorter"),U=d(e=>B(e,e.children()),"sortNodesByHierarchy"),L=d((e,r,s)=>{let n=e.parent(r);for(;n&&n!==s;){const a=c.get(n);if(a&&!a.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),T=d((e,r,s)=>{const n=e.children(r)??[];for(const a of n){if(a===s||g(a,s))continue;const o=E(a,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{Q as a,c as b,J as c,E as f,U as s,b as w}; +import{a as d,at as i}from"./mermaid.core-l-gs7P2Q.js";import{Q as C,G as y}from"../../chunks/graph-Dqkl27Ch.js";import{c as j,m as X}from"../../chunks/map-8WAJQ6ap.js";var p=4;function F(e){return j(e,p)}function b(e){var r={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:M(e),edges:R(e)};return C(e.graph())||(r.value=F(e.graph())),r}function M(e){return X(e.nodes(),function(r){var s=e.node(r),n=e.parent(r),a={v:r};return C(s)||(a.value=s),C(n)||(a.parent=n),a})}function R(e){return X(e.edges(),function(r){var s=e.edge(r),n={v:r.v,w:r.w};return C(r.name)||(n.name=r.name),C(s)||(n.value=s),n})}var c=new Map,v=new Map,A=new Map,J=d(()=>{v.clear(),A.clear(),c.clear()},"clear"),g=d((e,r)=>{const s=v.get(r)||[];return i.trace("In isDescendant",r," ",e," = ",s.includes(e)),s.includes(e)},"isDescendant"),_=d((e,r)=>{const s=v.get(r)||[];return i.info("Descendants of ",r," is ",s),i.info("Edge is ",e),e.v===r||e.w===r?!1:s?s.includes(e.v)||g(e.v,r)||g(e.w,r)||s.includes(e.w):(i.debug("Tilt, ",r,",not in descendants"),!1)},"edgeInCluster"),x=d((e,r,s,n)=>{i.warn("Copying children of ",e,"root",n,"data",r.node(e),n);const a=r.children(e)||[];e!==n&&a.push(e),i.warn("Copying (nodes) clusterId",e,"nodes",a),a.forEach(o=>{if(r.children(o).length>0)x(o,r,s,n);else{const l=r.node(o);i.info("cp ",o," to ",n," with parent ",e),s.setNode(o,l),n!==r.parent(o)&&(i.warn("Setting parent",o,r.parent(o)),s.setParent(o,r.parent(o))),e!==n&&o!==e?(i.debug("Setting parent",o,e),s.setParent(o,e)):(i.info("In copy ",e,"root",n,"data",r.node(e),n),i.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==n,"node!==clusterId",o!==e));const u=r.edges(o);i.debug("Copying Edges",u),u.forEach(t=>{i.info("Edge",t);const f=r.edge(t.v,t.w,t.name);i.info("Edge data",f,n);try{if(_(t,n)){const w=v.get(n)||[],m=w.includes(t.v)||g(t.v,n)||t.v===n,D=w.includes(t.w)||g(t.w,n)||t.w===n;if(m&&D)i.info("Copying as ",t.v,t.w,f,t.name),s.setEdge(t.v,t.w,f,t.name),i.info("newGraph edges ",s.edges(),s.edge(s.edges()[0]));else{const N=m?n:t.v,h=D?n:t.w;i.info("Rebinding cross-boundary edge as ",N,h,f,t.name),r.setEdge(N,h,f,t.name)}}else i.info("Skipping copy of edge ",t.v,"-->",t.w," rootId: ",n," clusterId:",e)}catch(w){i.error(w)}})}i.debug("Removing node",o),r.removeNode(o)})},"copy"),O=d((e,r)=>{const s=r.children(e);let n=[...s];for(const a of s)A.set(a,e),n=[...n,...O(a,r)];return n},"extractDescendants"),P=d((e,r,s)=>{const n=e.edges().filter(t=>t.v===r||t.w===r),a=e.edges().filter(t=>t.v===s||t.w===s),o=n.map(t=>({v:t.v===r?s:t.v,w:t.w===r?r:t.w})),l=a.map(t=>({v:t.v,w:t.w}));return o.filter(t=>l.some(f=>t.v===f.v&&t.w===f.w))},"findCommonEdges"),E=d((e,r,s)=>{const n=r.children(e);if(i.trace("Searching children of id ",e,n),n.length<1)return e;let a;for(const o of n){const l=E(o,r,s),u=P(r,s,l);if(l)if(u.length>0)a=l;else return l}return a},"findNonClusterChild"),S=d(e=>!c.has(e)||!c.get(e).externalConnections?e:c.has(e)?c.get(e).id:e,"getAnchorId"),Q=d((e,r)=>{var s;if(!e||r>10){i.debug("Opting out, no graph ");return}else i.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(i.warn("Cluster identified",n," Replacement id in edges: ",E(n,e,n)),v.set(n,O(n,e)),c.set(n,{id:E(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const a=e.children(n),o=e.edges();a.length>0?(i.debug("Cluster identified",n,v),o.forEach(l=>{const u=g(l.v,n),t=g(l.w,n);u^t&&(i.warn("Edge: ",l," leaves cluster ",n),i.warn("Descendants of XXX ",n,": ",v.get(n)),c.get(n).externalConnections=!0)})):i.debug("Not a cluster ",n,v)});for(let n of c.keys()){const a=c.get(n).id,o=e.parent(a);o!==n&&c.has(o)&&!c.get(o).externalConnections&&(c.get(n).id=o);const l=e.edges().some(u=>u.v===n);if(a&&((s=c.get(n))!=null&&s.externalConnections)&&l&&L(e,a,n)){const u=T(e,n,e.parent(a));u&&(c.get(n).id=u)}}e.edges().forEach(function(n){const a=e.edge(n);i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),i.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let o=n.v,l=n.w;if(i.warn("Fix XXX",c,"ids:",n.v,n.w,"Translating: ",c.get(n.v)," --- ",c.get(n.w)),c.get(n.v)||c.get(n.w)){if(i.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),o=S(n.v),l=S(n.w),e.removeEdge(n.v,n.w,n.name),o!==n.v){const u=e.parent(o);c.get(u).externalConnections=!0,a.fromCluster=n.v}if(l!==n.w){const u=e.parent(l);c.get(u).externalConnections=!0,a.toCluster=n.w}i.warn("Fix Replacing with XXX",o,l,n.name),e.setEdge(o,l,a,n.name)}}),i.warn("Adjusted Graph",b(e)),k(e,0),i.trace(c)},"adjustClustersAndEdges"),k=d((e,r)=>{var a,o,l,u;if(i.warn("extractor - ",r,b(e),e.children("D")),r>10){i.error("Bailing out");return}let s=e.nodes(),n=!1;for(const t of s){const f=e.children(t);n=n||f.length>0}if(!n){i.debug("Done, no node has children",e.nodes());return}i.debug("Nodes = ",s,r);for(const t of s)if(i.debug("Extracting node",t,c,c.has(t)&&!c.get(t).externalConnections,!e.parent(t),e.node(t),e.children("D")," Depth ",r),!c.has(t))i.debug("Not a cluster",t,r);else if((o=(a=c.get(t))==null?void 0:a.clusterData)!=null&&o.explicitDir&&e.children(t)&&e.children(t).length>0){i.warn("Cluster with explicit dir, creating subgraph for children",t,r);const f=c.get(t).clusterData.dir,w=new y({multigraph:!0,compound:!0}).setGraph({rankdir:f,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});x(t,e,w,t);const m=e.node(t)||{};e.setNode(t,{...m,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:w}),i.warn("Subgraph for cluster with explicit dir created:",t,b(w))}else if(!c.get(t).externalConnections&&e.children(t)&&e.children(t).length>0){i.warn("Cluster without external connections, without a parent and with children",t,r);let w=e.graph().rankdir==="TB"?"LR":"TB";(u=(l=c.get(t))==null?void 0:l.clusterData)!=null&&u.dir&&(w=c.get(t).clusterData.dir,i.warn("Fixing dir",c.get(t).clusterData.dir,w));const m=new y({multigraph:!0,compound:!0}).setGraph({rankdir:w,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});x(t,e,m,t);const D=e.node(t)||{};e.setNode(t,{...D,clusterNode:!0,id:t,clusterData:c.get(t).clusterData,label:c.get(t).label,graph:m}),i.debug("Old graph after copy",b(e))}else i.warn("Cluster ** ",t," **not meeting the criteria !externalConnections:",!c.get(t).externalConnections," no parent: ",!e.parent(t)," children ",e.children(t)&&e.children(t).length>0,e.children("D"),r),i.debug(c);s=e.nodes(),i.warn("New list of nodes",s);for(const t of s){const f=e.node(t);i.warn(" Now next level",t,f),f!=null&&f.clusterNode&&k(f.graph,r+1)}},"extractor"),B=d((e,r)=>{if(r.length===0)return[];let s=Object.assign([],r);return r.forEach(n=>{const a=e.children(n),o=B(e,a);s=[...s,...o]}),s},"sorter"),U=d(e=>B(e,e.children()),"sortNodesByHierarchy"),L=d((e,r,s)=>{let n=e.parent(r);for(;n&&n!==s;){const a=c.get(n);if(a&&!a.externalConnections)return!0;n=e.parent(n)}return!1},"isNodeInExtractableCluster"),T=d((e,r,s)=>{const n=e.children(r)??[];for(const a of n){if(a===s||g(a,s))continue;const o=E(a,e,r);if(o&&!L(e,o,r))return o}return null},"findSafeAnchorNode");export{Q as a,c as b,J as c,E as f,U as s,b as w}; diff --git a/veadk/webui/assets/visualizations/mermaid/chunk-XXDRQBXY-CLLbPKnJ.js b/veadk/webui/assets/visualizations/mermaid/chunk-XXDRQBXY-B5A5gE3j.js similarity index 53% rename from veadk/webui/assets/visualizations/mermaid/chunk-XXDRQBXY-CLLbPKnJ.js rename to veadk/webui/assets/visualizations/mermaid/chunk-XXDRQBXY-B5A5gE3j.js index e4ba9cedb..b2148b254 100644 --- a/veadk/webui/assets/visualizations/mermaid/chunk-XXDRQBXY-CLLbPKnJ.js +++ b/veadk/webui/assets/visualizations/mermaid/chunk-XXDRQBXY-B5A5gE3j.js @@ -1 +1 @@ -import{a as n}from"./mermaid.core-BmHujEI0.js";import{aG as o}from"../../app/index-B71Wq9_t.js";var d=n((t,e)=>{let a;return e==="sandbox"&&(a=o("#i"+t)),(e==="sandbox"?o(a.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; +import{a as n}from"./mermaid.core-l-gs7P2Q.js";import{aG as o}from"../../app/index-BKQXvMzA.js";var d=n((t,e)=>{let a;return e==="sandbox"&&(a=o("#i"+t)),(e==="sandbox"?o(a.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-Td6lpiVM.js b/veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-Td6lpiVM.js deleted file mode 100644 index 503ebc85d..000000000 --- a/veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-Td6lpiVM.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,a as s,c as e,C as t}from"./chunk-GF5L2VYU-_IA0EfRa.js";import{a as i}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"./chunk-5VM5RSS4-C2BXfYOP.js";import"./chunk-XXDRQBXY-CLLbPKnJ.js";import"./chunk-KBJHAD2P-fr6wew8I.js";import"./chunk-2GRJ4B5K-CbPivXt6.js";import"../../chunks/purify.es-BnINGy_Y.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-ZlJQDxsM.js b/veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-ZlJQDxsM.js new file mode 100644 index 000000000..f832e9943 --- /dev/null +++ b/veadk/webui/assets/visualizations/mermaid/classDiagram-JCYQIIEL-ZlJQDxsM.js @@ -0,0 +1 @@ +import{s as a,a as s,c as e,C as t}from"./chunk-GF5L2VYU-CvS75Pir.js";import{a as i}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"./chunk-5VM5RSS4-CqwEymVq.js";import"./chunk-XXDRQBXY-B5A5gE3j.js";import"./chunk-KBJHAD2P-mhv9-tYP.js";import"./chunk-2GRJ4B5K-CS99z7QO.js";import"../../chunks/purify.es-BnINGy_Y.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-Td6lpiVM.js b/veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-Td6lpiVM.js deleted file mode 100644 index 503ebc85d..000000000 --- a/veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-Td6lpiVM.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,a as s,c as e,C as t}from"./chunk-GF5L2VYU-_IA0EfRa.js";import{a as i}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"./chunk-5VM5RSS4-C2BXfYOP.js";import"./chunk-XXDRQBXY-CLLbPKnJ.js";import"./chunk-KBJHAD2P-fr6wew8I.js";import"./chunk-2GRJ4B5K-CbPivXt6.js";import"../../chunks/purify.es-BnINGy_Y.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-ZlJQDxsM.js b/veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-ZlJQDxsM.js new file mode 100644 index 000000000..f832e9943 --- /dev/null +++ b/veadk/webui/assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-ZlJQDxsM.js @@ -0,0 +1 @@ +import{s as a,a as s,c as e,C as t}from"./chunk-GF5L2VYU-CvS75Pir.js";import{a as i}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"./chunk-5VM5RSS4-CqwEymVq.js";import"./chunk-XXDRQBXY-B5A5gE3j.js";import"./chunk-KBJHAD2P-mhv9-tYP.js";import"./chunk-2GRJ4B5K-CS99z7QO.js";import"../../chunks/purify.es-BnINGy_Y.js";var f={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{f as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/cose-bilkent-JH36ORCC-J3LbU0Uq.js b/veadk/webui/assets/visualizations/mermaid/cose-bilkent-JH36ORCC-CrvhfXGX.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/cose-bilkent-JH36ORCC-J3LbU0Uq.js rename to veadk/webui/assets/visualizations/mermaid/cose-bilkent-JH36ORCC-CrvhfXGX.js index c63de789c..4cce72bdc 100644 --- a/veadk/webui/assets/visualizations/mermaid/cose-bilkent-JH36ORCC-J3LbU0Uq.js +++ b/veadk/webui/assets/visualizations/mermaid/cose-bilkent-JH36ORCC-CrvhfXGX.js @@ -1 +1 @@ -import{a as V,at as k}from"./mermaid.core-BmHujEI0.js";import{c as J}from"../../chunks/cytoscape.esm-Dz9tvMTw.js";import{U as $,ad as lt,aG as gt}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var tt={exports:{}},Z={exports:{}},Q={exports:{}},q;function ut(){return q||(q=1,function(G,b){(function(I,T){G.exports=T()})($,function(){return function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o},function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i},function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n},function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;my&&(v=y),Ds&&(u=s),Ey&&(v=y),Ds&&(u=s),E=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h},function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,C=!0):(l[0]=p,l[1]=a,C=!0):S===w&&(g>d?(l[0]=h,l[1]=a,C=!0):(l[0]=u,l[1]=D,C=!0)),-Y===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),C&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!C)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+E*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-E*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-R/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=L,_=d+R/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o},function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o},function(N,I,T){var o=function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e},function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(R,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(C){if(v.indexOf(C)<0){var M=D.get(C),S=M-1;S==1&&f.push(C),D.set(C,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h},function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o},function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e},function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;ay||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l}();N.exports=i},function(N,I,T){var o=function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.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),g.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},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.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%d.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 s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.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=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var C;for(C=0;CL&&(L=Math.floor(R.y)),m=Math.floor(R.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-R.x/2,r.WORLD_CENTER_Y-R.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var R=0;R1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(L-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A"u"&&(f[C]=[]),f[C]=f[C].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;LM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(C,M){return C.rect.width*C.rect.height>M.rect.width*M.rect.height?-1:C.rect.width*C.rect.height0&&(R+=s.horizontalPadding),s.rowWidth[c]=R,s.width0&&(C+=s.verticalPadding);var M=0;C>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=C,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;Lc&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]0&&(m=c+s.verticalPadding-s.rowHeight[L]);var R;s.width-A>=f+s.horizontalPadding?R=(s.height+m)/(A+f+s.horizontalPadding):R=(s.height+m)/s.width,m=c+s.verticalPadding;var C;return s.widthm&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,C=0;CR&&(R=L[C].height);f>0&&(R+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=R,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(m0)for(var F=R;F<=C;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var C;C=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(C,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v}])})})(tt);var ct=tt.exports;const pt=lt(ct);J.use(pt);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=J({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),T=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var dt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Tt=dt;export{Tt as render}; +import{a as V,at as k}from"./mermaid.core-l-gs7P2Q.js";import{c as J}from"../../chunks/cytoscape.esm-Dz9tvMTw.js";import{U as $,ad as lt,aG as gt}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var tt={exports:{}},Z={exports:{}},Q={exports:{}},q;function ut(){return q||(q=1,function(G,b){(function(I,T){G.exports=T()})($,function(){return function(N){var I={};function T(o){if(I[o])return I[o].exports;var e=I[o]={i:o,l:!1,exports:{}};return N[o].call(e.exports,e,e.exports,T),e.l=!0,e.exports}return T.m=N,T.c=I,T.i=function(o){return o},T.d=function(o,e,t){T.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},T.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return T.d(e,"a",e),e},T.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},T.p="",T(T.s=26)}([function(N,I,T){function o(){}o.QUALITY=1,o.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,o.DEFAULT_INCREMENTAL=!1,o.DEFAULT_ANIMATION_ON_LAYOUT=!0,o.DEFAULT_ANIMATION_DURING_LAYOUT=!1,o.DEFAULT_ANIMATION_PERIOD=50,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,o.DEFAULT_GRAPH_MARGIN=15,o.NODE_DIMENSIONS_INCLUDE_LABELS=!1,o.SIMPLE_NODE_SIZE=40,o.SIMPLE_NODE_HALF_SIZE=o.SIMPLE_NODE_SIZE/2,o.EMPTY_COMPOUND_NODE_SIZE=40,o.MIN_EDGE_LENGTH=1,o.WORLD_BOUNDARY=1e6,o.INITIAL_WORLD_BOUNDARY=o.WORLD_BOUNDARY/1e3,o.WORLD_CENTER_X=1200,o.WORLD_CENTER_Y=900,N.exports=o},function(N,I,T){var o=T(2),e=T(8),t=T(9);function i(g,n,d){o.call(this,d),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=d,this.bendpoints=[],this.source=g,this.target=n}i.prototype=Object.create(o.prototype);for(var l in o)i[l]=o[l];i.prototype.getSource=function(){return this.source},i.prototype.getTarget=function(){return this.target},i.prototype.isInterGraph=function(){return this.isInterGraph},i.prototype.getLength=function(){return this.length},i.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},i.prototype.getBendpoints=function(){return this.bendpoints},i.prototype.getLca=function(){return this.lca},i.prototype.getSourceInLca=function(){return this.sourceInLca},i.prototype.getTargetInLca=function(){return this.targetInLca},i.prototype.getOtherEnd=function(g){if(this.source===g)return this.target;if(this.target===g)return this.source;throw"Node is not incident with this edge"},i.prototype.getOtherEndInGraph=function(g,n){for(var d=this.getOtherEnd(g),r=n.getGraphManager().getRoot();;){if(d.getOwner()==n)return d;if(d.getOwner()==r)break;d=d.getOwner().getParent()}return null},i.prototype.updateLength=function(){var g=new Array(4);this.isOverlapingSourceAndTarget=e.getIntersection(this.target.getRect(),this.source.getRect(),g),this.isOverlapingSourceAndTarget||(this.lengthX=g[0]-g[2],this.lengthY=g[1]-g[3],Math.abs(this.lengthX)<1&&(this.lengthX=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},i.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=t.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=t.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},N.exports=i},function(N,I,T){function o(e){this.vGraphObject=e}N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(13),i=T(0),l=T(16),g=T(4);function n(r,h,a,p){a==null&&p==null&&(p=h),o.call(this,p),r.graphManager!=null&&(r=r.graphManager),this.estimatedSize=e.MIN_VALUE,this.inclusionTreeDepth=e.MAX_VALUE,this.vGraphObject=p,this.edges=[],this.graphManager=r,a!=null&&h!=null?this.rect=new t(h.x,h.y,a.width,a.height):this.rect=new t}n.prototype=Object.create(o.prototype);for(var d in o)n[d]=o[d];n.prototype.getEdges=function(){return this.edges},n.prototype.getChild=function(){return this.child},n.prototype.getOwner=function(){return this.owner},n.prototype.getWidth=function(){return this.rect.width},n.prototype.setWidth=function(r){this.rect.width=r},n.prototype.getHeight=function(){return this.rect.height},n.prototype.setHeight=function(r){this.rect.height=r},n.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},n.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},n.prototype.getCenter=function(){return new g(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},n.prototype.getLocation=function(){return new g(this.rect.x,this.rect.y)},n.prototype.getRect=function(){return this.rect},n.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},n.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},n.prototype.setRect=function(r,h){this.rect.x=r.x,this.rect.y=r.y,this.rect.width=h.width,this.rect.height=h.height},n.prototype.setCenter=function(r,h){this.rect.x=r-this.rect.width/2,this.rect.y=h-this.rect.height/2},n.prototype.setLocation=function(r,h){this.rect.x=r,this.rect.y=h},n.prototype.moveBy=function(r,h){this.rect.x+=r,this.rect.y+=h},n.prototype.getEdgeListToNode=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(p.target==r){if(p.source!=a)throw"Incorrect edge source!";h.push(p)}}),h},n.prototype.getEdgesBetween=function(r){var h=[],a=this;return a.edges.forEach(function(p){if(!(p.source==a||p.target==a))throw"Incorrect edge source and/or target";(p.target==r||p.source==r)&&h.push(p)}),h},n.prototype.getNeighborsList=function(){var r=new Set,h=this;return h.edges.forEach(function(a){if(a.source==h)r.add(a.target);else{if(a.target!=h)throw"Incorrect incidency!";r.add(a.source)}}),r},n.prototype.withChildren=function(){var r=new Set,h,a;if(r.add(this),this.child!=null)for(var p=this.child.getNodes(),v=0;vh&&(this.rect.x-=(this.labelWidth-h)/2,this.setWidth(this.labelWidth)),this.labelHeight>a&&(this.labelPos=="center"?this.rect.y-=(this.labelHeight-a)/2:this.labelPos=="top"&&(this.rect.y-=this.labelHeight-a),this.setHeight(this.labelHeight))}}},n.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==e.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},n.prototype.transform=function(r){var h=this.rect.x;h>i.WORLD_BOUNDARY?h=i.WORLD_BOUNDARY:h<-i.WORLD_BOUNDARY&&(h=-i.WORLD_BOUNDARY);var a=this.rect.y;a>i.WORLD_BOUNDARY?a=i.WORLD_BOUNDARY:a<-i.WORLD_BOUNDARY&&(a=-i.WORLD_BOUNDARY);var p=new g(h,a),v=r.inverseTransformPoint(p);this.setLocation(v.x,v.y)},n.prototype.getLeft=function(){return this.rect.x},n.prototype.getRight=function(){return this.rect.x+this.rect.width},n.prototype.getTop=function(){return this.rect.y},n.prototype.getBottom=function(){return this.rect.y+this.rect.height},n.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},N.exports=n},function(N,I,T){function o(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}o.prototype.getX=function(){return this.x},o.prototype.getY=function(){return this.y},o.prototype.setX=function(e){this.x=e},o.prototype.setY=function(e){this.y=e},o.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},o.prototype.getCopy=function(){return new o(this.x,this.y)},o.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},N.exports=o},function(N,I,T){var o=T(2),e=T(10),t=T(0),i=T(6),l=T(3),g=T(1),n=T(13),d=T(12),r=T(11);function h(p,v,D){o.call(this,D),this.estimatedSize=e.MIN_VALUE,this.margin=t.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=p,v!=null&&v instanceof i?this.graphManager=v:v!=null&&v instanceof Layout&&(this.graphManager=v.graphManager)}h.prototype=Object.create(o.prototype);for(var a in o)h[a]=o[a];h.prototype.getNodes=function(){return this.nodes},h.prototype.getEdges=function(){return this.edges},h.prototype.getGraphManager=function(){return this.graphManager},h.prototype.getParent=function(){return this.parent},h.prototype.getLeft=function(){return this.left},h.prototype.getRight=function(){return this.right},h.prototype.getTop=function(){return this.top},h.prototype.getBottom=function(){return this.bottom},h.prototype.isConnected=function(){return this.isConnected},h.prototype.add=function(p,v,D){if(v==null&&D==null){var u=p;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(u)>-1)throw"Node already in graph!";return u.owner=this,this.getNodes().push(u),u}else{var E=p;if(!(this.getNodes().indexOf(v)>-1&&this.getNodes().indexOf(D)>-1))throw"Source or target not in graph!";if(!(v.owner==D.owner&&v.owner==this))throw"Both owners must be this graph!";return v.owner!=D.owner?null:(E.source=v,E.target=D,E.isInterGraph=!1,this.getEdges().push(E),v.edges.push(E),D!=v&&D.edges.push(E),E)}},h.prototype.remove=function(p){var v=p;if(p instanceof l){if(v==null)throw"Node is null!";if(!(v.owner!=null&&v.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var D=v.edges.slice(),u,E=D.length,y=0;y-1&&f>-1))throw"Source and/or target doesn't know this edge!";u.source.edges.splice(s,1),u.target!=u.source&&u.target.edges.splice(f,1);var O=u.source.owner.getEdges().indexOf(u);if(O==-1)throw"Not in owner's edge list!";u.source.owner.getEdges().splice(O,1)}},h.prototype.updateLeftTop=function(){for(var p=e.MAX_VALUE,v=e.MAX_VALUE,D,u,E,y=this.getNodes(),O=y.length,s=0;sD&&(p=D),v>u&&(v=u)}return p==e.MAX_VALUE?null:(y[0].getParent().paddingLeft!=null?E=y[0].getParent().paddingLeft:E=this.margin,this.left=v-E,this.top=p-E,new d(this.left,this.top))},h.prototype.updateBounds=function(p){for(var v=e.MAX_VALUE,D=-e.MAX_VALUE,u=e.MAX_VALUE,E=-e.MAX_VALUE,y,O,s,f,c,L=this.nodes,A=L.length,m=0;my&&(v=y),Ds&&(u=s),Ey&&(v=y),Ds&&(u=s),E=this.nodes.length){var A=0;D.forEach(function(m){m.owner==p&&A++}),A==this.nodes.length&&(this.isConnected=!0)}},N.exports=h},function(N,I,T){var o,e=T(1);function t(i){o=T(5),this.layout=i,this.graphs=[],this.edges=[]}t.prototype.addRoot=function(){var i=this.layout.newGraph(),l=this.layout.newNode(null),g=this.add(i,l);return this.setRootGraph(g),this.rootGraph},t.prototype.add=function(i,l,g,n,d){if(g==null&&n==null&&d==null){if(i==null)throw"Graph is null!";if(l==null)throw"Parent node is null!";if(this.graphs.indexOf(i)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(i),i.parent!=null)throw"Already has a parent!";if(l.child!=null)throw"Already has a child!";return i.parent=l,l.child=i,i}else{d=g,n=l,g=i;var r=n.getOwner(),h=d.getOwner();if(!(r!=null&&r.getGraphManager()==this))throw"Source not in this graph mgr!";if(!(h!=null&&h.getGraphManager()==this))throw"Target not in this graph mgr!";if(r==h)return g.isInterGraph=!1,r.add(g,n,d);if(g.isInterGraph=!0,g.source=n,g.target=d,this.edges.indexOf(g)>-1)throw"Edge already in inter-graph edge list!";if(this.edges.push(g),!(g.source!=null&&g.target!=null))throw"Edge source and/or target is null!";if(!(g.source.edges.indexOf(g)==-1&&g.target.edges.indexOf(g)==-1))throw"Edge already in source and/or target incidency list!";return g.source.edges.push(g),g.target.edges.push(g),g}},t.prototype.remove=function(i){if(i instanceof o){var l=i;if(l.getGraphManager()!=this)throw"Graph not in this graph mgr";if(!(l==this.rootGraph||l.parent!=null&&l.parent.graphManager==this))throw"Invalid parent node!";var g=[];g=g.concat(l.getEdges());for(var n,d=g.length,r=0;r=i.getRight()?l[0]+=Math.min(i.getX()-t.getX(),t.getRight()-i.getRight()):i.getX()<=t.getX()&&i.getRight()>=t.getRight()&&(l[0]+=Math.min(t.getX()-i.getX(),i.getRight()-t.getRight())),t.getY()<=i.getY()&&t.getBottom()>=i.getBottom()?l[1]+=Math.min(i.getY()-t.getY(),t.getBottom()-i.getBottom()):i.getY()<=t.getY()&&i.getBottom()>=t.getBottom()&&(l[1]+=Math.min(t.getY()-i.getY(),i.getBottom()-t.getBottom()));var d=Math.abs((i.getCenterY()-t.getCenterY())/(i.getCenterX()-t.getCenterX()));i.getCenterY()===t.getCenterY()&&i.getCenterX()===t.getCenterX()&&(d=1);var r=d*l[0],h=l[1]/d;l[0]r)return l[0]=g,l[1]=a,l[2]=d,l[3]=L,!1;if(nd)return l[0]=h,l[1]=n,l[2]=f,l[3]=r,!1;if(gd?(l[0]=v,l[1]=D,C=!0):(l[0]=p,l[1]=a,C=!0):S===w&&(g>d?(l[0]=h,l[1]=a,C=!0):(l[0]=u,l[1]=D,C=!0)),-Y===w?d>g?(l[2]=c,l[3]=L,M=!0):(l[2]=f,l[3]=s,M=!0):Y===w&&(d>g?(l[2]=O,l[3]=s,M=!0):(l[2]=A,l[3]=L,M=!0)),C&&M)return!1;if(g>d?n>r?(x=this.getCardinalDirection(S,w,4),F=this.getCardinalDirection(Y,w,2)):(x=this.getCardinalDirection(-S,w,3),F=this.getCardinalDirection(-Y,w,1)):n>r?(x=this.getCardinalDirection(-S,w,1),F=this.getCardinalDirection(-Y,w,3)):(x=this.getCardinalDirection(S,w,2),F=this.getCardinalDirection(Y,w,4)),!C)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+E*w,l[0]=U,l[1]=P;break;case 3:P=D,U=g+y/w,l[0]=U,l[1]=P;break;case 4:U=v,P=n+-E*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-R/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=L,_=d+R/w,l[2]=_,l[3]=X;break;case 4:_=c,X=r+-m*w,l[2]=_,l[3]=X;break}}return!1},e.getCardinalDirection=function(t,i,l){return t>i?l:1+l%4},e.getIntersection=function(t,i,l,g){if(g==null)return this.getIntersection2(t,i,l);var n=t.x,d=t.y,r=i.x,h=i.y,a=l.x,p=l.y,v=g.x,D=g.y,u=void 0,E=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,L=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,L=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*L-f*c)/A,E=(O*c-y*L)/A,new o(u,E))},e.angleOfVector=function(t,i,l,g){var n=void 0;return t!==l?(n=Math.atan((g-i)/(l-t)),l0?1:e<0?-1:0},o.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},o.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},N.exports=o},function(N,I,T){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o},function(N,I,T){var o=function(){function n(d,r){for(var h=0;h"u"?"undefined":o(t);return t==null||i!="object"&&i!="function"},N.exports=e},function(N,I,T){function o(a){if(Array.isArray(a)){for(var p=0,v=Array(a.length);p0&&p;){for(y.push(s[0]);y.length>0&&p;){var f=y[0];y.splice(0,1),E.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(R,1)}E=new Set,O=new Map}}return a},h.prototype.createDummyNodesForBendpoints=function(a){for(var p=[],v=a.source,D=this.graphManager.calcLowestCommonAncestor(a.source,a.target),u=0;u0){for(var D=this.edgeToDummyNodes.get(v),u=0;u=0&&p.splice(L,1);var A=O.getNeighborsList();A.forEach(function(C){if(v.indexOf(C)<0){var M=D.get(C),S=M-1;S==1&&f.push(C),D.set(C,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,E=p[0])}return E},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h},function(N,I,T){function o(){}o.seed=1,o.x=0,o.nextDouble=function(){return o.x=Math.sin(o.seed++)*1e4,o.x-Math.floor(o.x)},N.exports=o},function(N,I,T){var o=T(4);function e(t,i){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}e.prototype.getWorldOrgX=function(){return this.lworldOrgX},e.prototype.setWorldOrgX=function(t){this.lworldOrgX=t},e.prototype.getWorldOrgY=function(){return this.lworldOrgY},e.prototype.setWorldOrgY=function(t){this.lworldOrgY=t},e.prototype.getWorldExtX=function(){return this.lworldExtX},e.prototype.setWorldExtX=function(t){this.lworldExtX=t},e.prototype.getWorldExtY=function(){return this.lworldExtY},e.prototype.setWorldExtY=function(t){this.lworldExtY=t},e.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},e.prototype.setDeviceOrgX=function(t){this.ldeviceOrgX=t},e.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},e.prototype.setDeviceOrgY=function(t){this.ldeviceOrgY=t},e.prototype.getDeviceExtX=function(){return this.ldeviceExtX},e.prototype.setDeviceExtX=function(t){this.ldeviceExtX=t},e.prototype.getDeviceExtY=function(){return this.ldeviceExtY},e.prototype.setDeviceExtY=function(t){this.ldeviceExtY=t},e.prototype.transformX=function(t){var i=0,l=this.lworldExtX;return l!=0&&(i=this.ldeviceOrgX+(t-this.lworldOrgX)*this.ldeviceExtX/l),i},e.prototype.transformY=function(t){var i=0,l=this.lworldExtY;return l!=0&&(i=this.ldeviceOrgY+(t-this.lworldOrgY)*this.ldeviceExtY/l),i},e.prototype.inverseTransformX=function(t){var i=0,l=this.ldeviceExtX;return l!=0&&(i=this.lworldOrgX+(t-this.ldeviceOrgX)*this.lworldExtX/l),i},e.prototype.inverseTransformY=function(t){var i=0,l=this.ldeviceExtY;return l!=0&&(i=this.lworldOrgY+(t-this.ldeviceOrgY)*this.lworldExtY/l),i},e.prototype.inverseTransformPoint=function(t){var i=new o(this.inverseTransformX(t.x),this.inverseTransformY(t.y));return i},N.exports=e},function(N,I,T){function o(r){if(Array.isArray(r)){for(var h=0,a=Array(r.length);ht.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*t.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-t.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT_INCREMENTAL):(r>t.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(t.COOLING_ADAPTATION_FACTOR,1-(r-t.ADAPTATION_LOWER_NODE_LIMIT)/(t.ADAPTATION_UPPER_NODE_LIMIT-t.ADAPTATION_LOWER_NODE_LIMIT)*(1-t.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=t.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},n.prototype.calcSpringForces=function(){for(var r=this.getAllEdges(),h,a=0;a0&&arguments[0]!==void 0?arguments[0]:!0,h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a,p,v,D,u=this.getAllNodes(),E;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),E=new Set,a=0;ay||E>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||E>y)&&(r.gravitationForceX=-this.gravityConstant*v*this.compoundGravityConstant,r.gravitationForceY=-this.gravityConstant*D*this.compoundGravityConstant))},n.prototype.isConverged=function(){var r,h=!1;return this.totalIterations>this.maxIterations/3&&(h=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),r=this.totalDisplacement=u.length||y>=u[0].length)){for(var O=0;On}}]),l}();N.exports=i},function(N,I,T){var o=function(){function i(l,g){for(var n=0;n2&&arguments[2]!==void 0?arguments[2]:1,d=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,r=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;e(this,i),this.sequence1=l,this.sequence2=g,this.match_score=n,this.mismatch_penalty=d,this.gap_penalty=r,this.iMax=l.length+1,this.jMax=g.length+1,this.grid=new Array(this.iMax);for(var h=0;h=0;l--){var g=this.listeners[l];g.event===t&&g.callback===i&&this.listeners.splice(l,1)}},e.emit=function(t,i){for(var l=0;lg.coolingFactor*g.maxNodeDisplacement&&(this.displacementX=g.coolingFactor*g.maxNodeDisplacement*t.sign(this.displacementX)),Math.abs(this.displacementY)>g.coolingFactor*g.maxNodeDisplacement&&(this.displacementY=g.coolingFactor*g.maxNodeDisplacement*t.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),g.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},i.prototype.propogateDisplacementToChildren=function(g,n){for(var d=this.getChild().getNodes(),r,h=0;h0)this.positionNodesRadially(s);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var f=new Set(this.getAllNodes()),c=this.nodesWithGravity.filter(function(L){return f.has(L)});this.graphManager.setAllNodesToApplyGravitation(c),this.positionNodesRandomly()}}return this.initSpringEmbedder(),this.runSpringEmbedder(),!0},y.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%d.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 s=new Set(this.getAllNodes()),f=this.nodesWithGravity.filter(function(A){return s.has(A)});this.graphManager.setAllNodesToApplyGravitation(f),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=d.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=d.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var c=!this.isTreeGrowing&&!this.isGrowthFinished,L=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,L),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var C;for(C=0;CL&&(L=Math.floor(R.y)),m=Math.floor(R.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-R.x/2,r.WORLD_CENTER_Y-R.y/2))},y.radialLayout=function(s,f,c){var L=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,L);var A=u.calculateBounds(s),m=new E;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var R=0;R1;){var X=_[0];_.splice(0,1);var H=w.indexOf(X);H>=0&&w.splice(H,1),U--,x--}f!=null?P=(w.indexOf(_[0])+1)%U:P=0;for(var W=Math.abs(L-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var j=(c+F*W)%360,ht=(j+W)%360;y.branchRadialLayout(K,s,j,ht,A+m,m),F++}}},y.maxDiagonalInTree=function(s){for(var f=v.MIN_VALUE,c=0;cf&&(f=A)}return f},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var s=this,f={};this.memberGroups={},this.idToDummyNode={};for(var c=[],L=this.graphManager.getAllNodes(),A=0;A"u"&&(f[C]=[]),f[C]=f[C].concat(m)}Object.keys(f).forEach(function(M){if(f[M].length>1){var S="DummyCompound_"+M;s.memberGroups[S]=f[M];var Y=f[M][0].getParent(),w=new l(s.graphManager);w.id=S,w.paddingLeft=Y.paddingLeft||0,w.paddingRight=Y.paddingRight||0,w.paddingBottom=Y.paddingBottom||0,w.paddingTop=Y.paddingTop||0,s.idToDummyNode[S]=w;var x=s.getGraphManager().add(s.newGraph(),w),F=Y.getChild();F.add(w);for(var U=0;U=0;s--){var f=this.compoundOrder[s],c=f.id,L=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,L,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var L=s.idToDummyNode[c],A=L.paddingLeft,m=L.paddingTop;s.adjustLocations(f[c],L.rect.x,L.rect.y,A,m)})},y.prototype.getToBeTiled=function(s){var f=s.id;if(this.toBeTiled[f]!=null)return this.toBeTiled[f];var c=s.getChild();if(c==null)return this.toBeTiled[f]=!1,!1;for(var L=c.getNodes(),A=0;A0)return this.toBeTiled[f]=!1,!1;if(m.getChild()==null){this.toBeTiled[m.id]=!1;continue}if(!this.getToBeTiled(m))return this.toBeTiled[f]=!1,!1}return this.toBeTiled[f]=!0,!0},y.prototype.getNodeDegree=function(s){s.id;for(var f=s.getEdges(),c=0,L=0;LM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(L){var A=f[L];c.tiledMemberPack[L]=c.tileNodes(s[L],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[L].width,A.rect.height=c.tiledMemberPack[L].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,L=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:L};s.sort(function(C,M){return C.rect.width*C.rect.height>M.rect.width*M.rect.height?-1:C.rect.width*C.rect.height0&&(R+=s.horizontalPadding),s.rowWidth[c]=R,s.width0&&(C+=s.verticalPadding);var M=0;C>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=C,M=s.rowHeight[c]-M),s.height+=M,s.rows[c].push(f)},y.prototype.getShortestRowIndex=function(s){for(var f=-1,c=Number.MAX_VALUE,L=0;Lc&&(f=L,c=s.rowWidth[L]);return f},y.prototype.canAddHorizontal=function(s,f,c){var L=this.getShortestRowIndex(s);if(L<0)return!0;var A=s.rowWidth[L];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[L]0&&(m=c+s.verticalPadding-s.rowHeight[L]);var R;s.width-A>=f+s.horizontalPadding?R=(s.height+m)/(A+f+s.horizontalPadding):R=(s.height+m)/s.width,m=c+s.verticalPadding;var C;return s.widthm&&f!=c){L.splice(-1,1),s.rows[c].push(A),s.rowWidth[f]=s.rowWidth[f]-m,s.rowWidth[c]=s.rowWidth[c]+m,s.width=s.rowWidth[instance.getLongestRowIndex(s)];for(var R=Number.MIN_VALUE,C=0;CR&&(R=L[C].height);f>0&&(R+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=R,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][R-1].length+this.grid[F][R].length-1;if(m0)for(var F=R;F<=C;F++)x[3]+=this.grid[A-1][F].length+this.grid[A][F].length-1;for(var U=v.MAX_VALUE,P,_,X=0;X0){var C;C=E.getGraphManager().add(E.newGraph(),c),this.processChildrenList(C,f,E)}}},a.prototype.stop=function(){return this.stopped=!0,this};var v=function(u){u("layout","cose-bilkent",a)};typeof cytoscape<"u"&&v(cytoscape),I.exports=v}])})})(tt);var ct=tt.exports;const pt=lt(ct);J.use(pt);function et(G,b){G.forEach(N=>{const I={id:N.id,labelText:N.label,height:N.height,width:N.width,padding:N.padding??0};Object.keys(N).forEach(T=>{["id","label","height","width","padding","x","y"].includes(T)||(I[T]=N[T])}),b.add({group:"nodes",data:I,position:{x:N.x??0,y:N.y??0}})})}V(et,"addNodes");function rt(G,b){G.forEach(N=>{const I={id:N.id,source:N.start,target:N.end};Object.keys(N).forEach(T=>{["id","start","end"].includes(T)||(I[T]=N[T])}),b.add({group:"edges",data:I})})}V(rt,"addEdges");function it(G){return new Promise(b=>{const N=gt("body").append("div").attr("id","cy").attr("style","display:none"),I=J({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});N.remove(),et(G.nodes,I),rt(G.edges,I),I.nodes().forEach(function(o){o.layoutDimensions=()=>{const e=o.data();return{w:e.width,h:e.height}}});const T={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(T).run(),I.ready(o=>{k.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),T={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(T[o]=N[o])}),T})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,T={id:N.id,source:N.source,target:N.target,startX:I.startX,startY:I.startY,midX:I.midX,midY:I.midY,endX:I.endX,endY:I.endY};return Object.keys(N).forEach(o=>{["id","source","target"].includes(o)||(T[o]=N[o])}),T})}V(ot,"extractPositionedEdges");async function st(G,b){k.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),T=ot(N);return k.debug(`Layout completed: ${I.length} nodes, ${T.length} edges`),{nodes:I,edges:T}}catch(N){throw k.error("Error in cose-bilkent layout algorithm:",N),N}}V(st,"executeCoseBilkentLayout");function at(G){if(!G)throw new Error("Layout data is required");if(!G.config)throw new Error("Configuration is required in layout data");if(!G.rootNode)throw new Error("Root node is required");if(!G.nodes||!Array.isArray(G.nodes))throw new Error("No nodes found in layout data");if(!Array.isArray(G.edges))throw new Error("Edges array is required in layout data");return!0}V(at,"validateLayoutData");var dt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:T,insertMarkers:o,insertNode:e,log:t,positionEdgeLabel:i},{algorithm:l})=>{const g={},n={},d=b.select("g");o(d,G.markers,G.type,G.diagramId);const r=d.insert("g").attr("class","subgraphs"),h=d.insert("g").attr("class","edgePaths"),a=d.insert("g").attr("class","edgeLabels"),p=d.insert("g").attr("class","nodes");t.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(G.nodes.map(async u=>{if(u.isGroup){const E={...u};n[u.id]=E,g[u.id]=E,await N(r,u)}else{const E={...u};g[u.id]=E;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();E.width=O.width,E.height=O.height,E.domId=y,t.debug(`Node ${u.id} dimensions: ${O.width}x${O.height}`)}})),t.debug("Running cose-bilkent layout algorithm");const v={...G,nodes:G.nodes.map(u=>{const E=g[u.id];return{...u,width:E.width,height:E.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const E=g[u.id];E!=null&&E.domId&&(E.domId.attr("transform",`translate(${u.x}, ${u.y})`),E.x=u.x,E.y=u.y,t.debug(`Positioned node ${E.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const E=G.edges.find(y=>y.id===u.id);E&&(E.points=[{x:u.startX,y:u.startY},{x:u.midX,y:u.midY},{x:u.endX,y:u.endY}])}),t.debug("Inserting and positioning edges"),await Promise.all(G.edges.map(async u=>{await T(a,u);const E=g[u.start??""],y=g[u.end??""];if(E&&y){const O=D.edges.find(s=>s.id===u.id);if(O){t.debug("APA01 positionedEdge",O);const s={...u},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:E.x||0,y:E.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,E,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Tt=dt;export{Tt as render}; diff --git a/veadk/webui/assets/visualizations/mermaid/cynefin-OW5HDTMX-DjTRskiD.js b/veadk/webui/assets/visualizations/mermaid/cynefin-OW5HDTMX-C5XPyQRb.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/cynefin-OW5HDTMX-DjTRskiD.js rename to veadk/webui/assets/visualizations/mermaid/cynefin-OW5HDTMX-C5XPyQRb.js index 403521ade..8f139b459 100644 --- a/veadk/webui/assets/visualizations/mermaid/cynefin-OW5HDTMX-DjTRskiD.js +++ b/veadk/webui/assets/visualizations/mermaid/cynefin-OW5HDTMX-C5XPyQRb.js @@ -1,4 +1,4 @@ -var dk=Object.defineProperty;var pk=(t,e,r)=>e in t?dk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Br=(t,e,r)=>pk(t,typeof e!="symbol"?e+"":e,r);import{_ as ut}from"../../app/index-B71Wq9_t.js";var mk=Object.create,Du=Object.defineProperty,hk=Object.getOwnPropertyDescriptor,Th=Object.getOwnPropertyNames,yk=Object.getPrototypeOf,gk=Object.prototype.hasOwnProperty,s=(t,e)=>Du(t,"name",{value:e,configurable:!0}),vk=(t,e)=>function(){return t&&(e=(0,t[Th(t)[0]])(t=0)),e},X=(t,e)=>function(){return e||(0,t[Th(t)[0]])((e={exports:{}}).exports,e),e.exports},tn=(t,e)=>{for(var r in e)Du(t,r,{get:e[r],enumerable:!0})},$h=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Th(e))!gk.call(t,a)&&a!==r&&Du(t,a,{get:()=>e[a],enumerable:!(n=hk(e,a))||n.enumerable});return t},Of=(t,e,r)=>($h(t,e,"default"),r),Rh=(t,e,r)=>(r=t!=null?mk(yk(t)):{},$h(Du(r,"default",{value:t,enumerable:!0}),t)),Ah=t=>$h(Du({},"__esModule",{value:!0}),t),Lf={};tn(Lf,{AnnotatedTextEdit:()=>Ar,ChangeAnnotation:()=>mn,ChangeAnnotationIdentifier:()=>et,CodeAction:()=>Qp,CodeActionContext:()=>Zp,CodeActionKind:()=>Jp,CodeActionTriggerKind:()=>Xl,CodeDescription:()=>Ip,CodeLens:()=>em,Color:()=>Ec,ColorInformation:()=>Ep,ColorPresentation:()=>Cp,Command:()=>pn,CompletionItem:()=>Fp,CompletionItemKind:()=>Op,CompletionItemLabelDetails:()=>Gp,CompletionItemTag:()=>Dp,CompletionList:()=>zp,CreateFile:()=>_a,DeleteFile:()=>wa,Diagnostic:()=>Vl,DiagnosticRelatedInformation:()=>Cc,DiagnosticSeverity:()=>Sp,DiagnosticTag:()=>wp,DocumentHighlight:()=>Wp,DocumentHighlightKind:()=>Kp,DocumentLink:()=>rm,DocumentSymbol:()=>Xp,DocumentUri:()=>$p,EOL:()=>x$,FoldingRange:()=>_p,FoldingRangeKind:()=>bp,FormattingOptions:()=>tm,Hover:()=>jp,InlayHint:()=>fm,InlayHintKind:()=>Sc,InlayHintLabelPart:()=>wc,InlineCompletionContext:()=>gm,InlineCompletionItem:()=>pm,InlineCompletionList:()=>mm,InlineCompletionTriggerKind:()=>hm,InlineValueContext:()=>cm,InlineValueEvaluatableExpression:()=>um,InlineValueText:()=>om,InlineValueVariableLookup:()=>lm,InsertReplaceEdit:()=>Mp,InsertTextFormat:()=>Lp,InsertTextMode:()=>xp,Location:()=>Wl,LocationLink:()=>Ap,MarkedString:()=>Yl,MarkupContent:()=>Ia,MarkupKind:()=>_c,OptionalVersionedTextDocumentIdentifier:()=>Hl,ParameterInformation:()=>Bp,Position:()=>oe,Range:()=>te,RenameFile:()=>Sa,SelectedCompletionInfo:()=>ym,SelectionRange:()=>nm,SemanticTokenModifiers:()=>im,SemanticTokenTypes:()=>am,SemanticTokens:()=>sm,SignatureInformation:()=>Up,StringValue:()=>dm,SymbolInformation:()=>Hp,SymbolKind:()=>Vp,SymbolTag:()=>qp,TextDocument:()=>Tm,TextDocumentEdit:()=>ql,TextDocumentIdentifier:()=>Np,TextDocumentItem:()=>kp,TextEdit:()=>ar,URI:()=>Ac,VersionedTextDocumentIdentifier:()=>Pp,WorkspaceChange:()=>M$,WorkspaceEdit:()=>bc,WorkspaceFolder:()=>vm,WorkspaceSymbol:()=>Yp,integer:()=>Rp,uinteger:()=>Kl});var $p,Ac,Rp,Kl,oe,te,Wl,Ap,Ec,Ep,Cp,bp,_p,Cc,Sp,wp,Ip,Vl,pn,ar,mn,et,Ar,ql,_a,Sa,wa,bc,kl,Ud,M$,Np,Pp,Hl,kp,_c,Ia,Op,Lp,Dp,Mp,xp,Gp,Fp,zp,Yl,jp,Bp,Up,Kp,Wp,Vp,qp,Hp,Yp,Xp,Jp,Xl,Zp,Qp,em,tm,rm,nm,am,im,sm,om,lm,um,cm,Sc,wc,fm,dm,pm,mm,hm,ym,gm,vm,x$,Tm,iv,C,Mu=vk({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})($p||($p={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(Ac||(Ac={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Rp||(Rp={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Kl||(Kl={})),function(a){function i(u,l){return u===Number.MAX_VALUE&&(u=Kl.MAX_VALUE),l===Number.MAX_VALUE&&(l=Kl.MAX_VALUE),{line:u,character:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&C.uinteger(l.line)&&C.uinteger(l.character)}s(o,"is"),a.is=o}(oe||(oe={})),function(a){function i(u,l,c,f){if(C.uinteger(u)&&C.uinteger(l)&&C.uinteger(c)&&C.uinteger(f))return{start:oe.create(u,l),end:oe.create(c,f)};if(oe.is(u)&&oe.is(l))return{start:u,end:l};throw new Error(`Range#create called with invalid arguments[${u}, ${l}, ${c}, ${f}]`)}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&oe.is(l.start)&&oe.is(l.end)}s(o,"is"),a.is=o}(te||(te={})),function(a){function i(u,l){return{uri:u,range:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&te.is(l.range)&&(C.string(l.uri)||C.undefined(l.uri))}s(o,"is"),a.is=o}(Wl||(Wl={})),function(a){function i(u,l,c,f){return{targetUri:u,targetRange:l,targetSelectionRange:c,originSelectionRange:f}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&te.is(l.targetRange)&&C.string(l.targetUri)&&te.is(l.targetSelectionRange)&&(te.is(l.originSelectionRange)||C.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(Ap||(Ap={})),function(a){function i(u,l,c,f){return{red:u,green:l,blue:c,alpha:f}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.numberRange(l.red,0,1)&&C.numberRange(l.green,0,1)&&C.numberRange(l.blue,0,1)&&C.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(Ec||(Ec={})),function(a){function i(u,l){return{range:u,color:l}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&te.is(l.range)&&Ec.is(l.color)}s(o,"is"),a.is=o}(Ep||(Ep={})),function(a){function i(u,l,c){return{label:u,textEdit:l,additionalTextEdits:c}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.string(l.label)&&(C.undefined(l.textEdit)||ar.is(l))&&(C.undefined(l.additionalTextEdits)||C.typedArray(l.additionalTextEdits,ar.is))}s(o,"is"),a.is=o}(Cp||(Cp={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(bp||(bp={})),function(a){function i(u,l,c,f,d,p){const h={startLine:u,endLine:l};return C.defined(c)&&(h.startCharacter=c),C.defined(f)&&(h.endCharacter=f),C.defined(d)&&(h.kind=d),C.defined(p)&&(h.collapsedText=p),h}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.uinteger(l.startLine)&&C.uinteger(l.startLine)&&(C.undefined(l.startCharacter)||C.uinteger(l.startCharacter))&&(C.undefined(l.endCharacter)||C.uinteger(l.endCharacter))&&(C.undefined(l.kind)||C.string(l.kind))}s(o,"is"),a.is=o}(_p||(_p={})),function(a){function i(u,l){return{location:u,message:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&Wl.is(l.location)&&C.string(l.message)}s(o,"is"),a.is=o}(Cc||(Cc={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(Sp||(Sp={})),function(a){a.Unnecessary=1,a.Deprecated=2}(wp||(wp={})),function(a){function i(o){const u=o;return C.objectLiteral(u)&&C.string(u.href)}s(i,"is"),a.is=i}(Ip||(Ip={})),function(a){function i(u,l,c,f,d,p){let h={range:u,message:l};return C.defined(c)&&(h.severity=c),C.defined(f)&&(h.code=f),C.defined(d)&&(h.source=d),C.defined(p)&&(h.relatedInformation=p),h}s(i,"create"),a.create=i;function o(u){var l;let c=u;return C.defined(c)&&te.is(c.range)&&C.string(c.message)&&(C.number(c.severity)||C.undefined(c.severity))&&(C.integer(c.code)||C.string(c.code)||C.undefined(c.code))&&(C.undefined(c.codeDescription)||C.string((l=c.codeDescription)===null||l===void 0?void 0:l.href))&&(C.string(c.source)||C.undefined(c.source))&&(C.undefined(c.relatedInformation)||C.typedArray(c.relatedInformation,Cc.is))}s(o,"is"),a.is=o}(Vl||(Vl={})),function(a){function i(u,l,...c){let f={title:u,command:l};return C.defined(c)&&c.length>0&&(f.arguments=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.title)&&C.string(l.command)}s(o,"is"),a.is=o}(pn||(pn={})),function(a){function i(c,f){return{range:c,newText:f}}s(i,"replace"),a.replace=i;function o(c,f){return{range:{start:c,end:c},newText:f}}s(o,"insert"),a.insert=o;function u(c){return{range:c,newText:""}}s(u,"del"),a.del=u;function l(c){const f=c;return C.objectLiteral(f)&&C.string(f.newText)&&te.is(f.range)}s(l,"is"),a.is=l}(ar||(ar={})),function(a){function i(u,l,c){const f={label:u};return l!==void 0&&(f.needsConfirmation=l),c!==void 0&&(f.description=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.string(l.label)&&(C.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(C.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(mn||(mn={})),function(a){function i(o){const u=o;return C.string(u)}s(i,"is"),a.is=i}(et||(et={})),function(a){function i(c,f,d){return{range:c,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(c,f,d){return{range:{start:c,end:c},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function u(c,f){return{range:c,newText:"",annotationId:f}}s(u,"del"),a.del=u;function l(c){const f=c;return ar.is(f)&&(mn.is(f.annotationId)||et.is(f.annotationId))}s(l,"is"),a.is=l}(Ar||(Ar={})),function(a){function i(u,l){return{textDocument:u,edits:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&Hl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(ql||(ql={})),function(a){function i(u,l,c){let f={kind:"create",uri:u};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="create"&&C.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||C.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||C.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o}(_a||(_a={})),function(a){function i(u,l,c,f){let d={kind:"rename",oldUri:u,newUri:l};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(d.options=c),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="rename"&&C.string(l.oldUri)&&C.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||C.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||C.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o}(Sa||(Sa={})),function(a){function i(u,l,c){let f={kind:"delete",uri:u};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="delete"&&C.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||C.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||C.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o}(wa||(wa={})),function(a){function i(o){let u=o;return u&&(u.changes!==void 0||u.documentChanges!==void 0)&&(u.documentChanges===void 0||u.documentChanges.every(l=>C.string(l.kind)?_a.is(l)||Sa.is(l)||wa.is(l):ql.is(l)))}s(i,"is"),a.is=i}(bc||(bc={})),kl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,u){let l,c;if(u===void 0?l=ar.insert(i,o):et.is(u)?(c=u,l=Ar.insert(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.insert(i,o,c)),this.edits.push(l),c!==void 0)return c}replace(i,o,u){let l,c;if(u===void 0?l=ar.replace(i,o):et.is(u)?(c=u,l=Ar.replace(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.replace(i,o,c)),this.edits.push(l),c!==void 0)return c}delete(i,o){let u,l;if(o===void 0?u=ar.del(i):et.is(o)?(l=o,u=Ar.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),u=Ar.del(i,l)),this.edits.push(u),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Ud=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let u;if(et.is(i)?u=i:(u=this.nextId(),o=i),this._annotations[u]!==void 0)throw new Error(`Id ${u} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${u}`);return this._annotations[u]=o,this._size++,u}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),M$=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Ud(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(ql.is(o)){const u=new kl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=u}})):i.changes&&Object.keys(i.changes).forEach(o=>{const u=new kl(i.changes[o]);this._textEditChanges[o]=u})):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(i){if(Hl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let u=this._textEditChanges[o.uri];if(!u){const l=[],c={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(c),u=new kl(l,this._changeAnnotations),this._textEditChanges[o.uri]=u}return u}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let u=[];this._workspaceEdit.changes[i]=u,o=new kl(u),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ud,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(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;mn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=_a.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=_a.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}renameFile(i,o,u,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let c;mn.is(u)||et.is(u)?c=u:l=u;let f,d;if(c===void 0?f=Sa.create(i,o,l):(d=et.is(c)?c:this._changeAnnotations.manage(c),f=Sa.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;mn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=wa.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=wa.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(u){return{uri:u}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)}s(o,"is"),a.is=o}(Np||(Np={})),function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)&&C.integer(l.version)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)&&(l.version===null||C.integer(l.version))}s(o,"is"),a.is=o}(Hl||(Hl={})),function(a){function i(u,l,c,f){return{uri:u,languageId:l,version:c,text:f}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)&&C.string(l.languageId)&&C.integer(l.version)&&C.string(l.text)}s(o,"is"),a.is=o}(kp||(kp={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const u=o;return u===a.PlainText||u===a.Markdown}s(i,"is"),a.is=i}(_c||(_c={})),function(a){function i(o){const u=o;return C.objectLiteral(o)&&_c.is(u.kind)&&C.string(u.value)}s(i,"is"),a.is=i}(Ia||(Ia={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(Op||(Op={})),function(a){a.PlainText=1,a.Snippet=2}(Lp||(Lp={})),function(a){a.Deprecated=1}(Dp||(Dp={})),function(a){function i(u,l,c){return{newText:u,insert:l,replace:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l&&C.string(l.newText)&&te.is(l.insert)&&te.is(l.replace)}s(o,"is"),a.is=o}(Mp||(Mp={})),function(a){a.asIs=1,a.adjustIndentation=2}(xp||(xp={})),function(a){function i(o){const u=o;return u&&(C.string(u.detail)||u.detail===void 0)&&(C.string(u.description)||u.description===void 0)}s(i,"is"),a.is=i}(Gp||(Gp={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(Fp||(Fp={})),function(a){function i(o,u){return{items:o||[],isIncomplete:!!u}}s(i,"create"),a.create=i}(zp||(zp={})),function(a){function i(u){return u.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(u){const l=u;return C.string(l)||C.objectLiteral(l)&&C.string(l.language)&&C.string(l.value)}s(o,"is"),a.is=o}(Yl||(Yl={})),function(a){function i(o){let u=o;return!!u&&C.objectLiteral(u)&&(Ia.is(u.contents)||Yl.is(u.contents)||C.typedArray(u.contents,Yl.is))&&(o.range===void 0||te.is(o.range))}s(i,"is"),a.is=i}(jp||(jp={})),function(a){function i(o,u){return u?{label:o,documentation:u}:{label:o}}s(i,"create"),a.create=i}(Bp||(Bp={})),function(a){function i(o,u,...l){let c={label:o};return C.defined(u)&&(c.documentation=u),C.defined(l)?c.parameters=l:c.parameters=[],c}s(i,"create"),a.create=i}(Up||(Up={})),function(a){a.Text=1,a.Read=2,a.Write=3}(Kp||(Kp={})),function(a){function i(o,u){let l={range:o};return C.number(u)&&(l.kind=u),l}s(i,"create"),a.create=i}(Wp||(Wp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(Vp||(Vp={})),function(a){a.Deprecated=1}(qp||(qp={})),function(a){function i(o,u,l,c,f){let d={name:o,kind:u,location:{uri:c,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i}(Hp||(Hp={})),function(a){function i(o,u,l,c){return c!==void 0?{name:o,kind:u,location:{uri:l,range:c}}:{name:o,kind:u,location:{uri:l}}}s(i,"create"),a.create=i}(Yp||(Yp={})),function(a){function i(u,l,c,f,d,p){let h={name:u,detail:l,kind:c,range:f,selectionRange:d};return p!==void 0&&(h.children=p),h}s(i,"create"),a.create=i;function o(u){let l=u;return l&&C.string(l.name)&&C.number(l.kind)&&te.is(l.range)&&te.is(l.selectionRange)&&(l.detail===void 0||C.string(l.detail))&&(l.deprecated===void 0||C.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}(Xp||(Xp={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(Jp||(Jp={})),function(a){a.Invoked=1,a.Automatic=2}(Xl||(Xl={})),function(a){function i(u,l,c){let f={diagnostics:u};return l!=null&&(f.only=l),c!=null&&(f.triggerKind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.typedArray(l.diagnostics,Vl.is)&&(l.only===void 0||C.typedArray(l.only,C.string))&&(l.triggerKind===void 0||l.triggerKind===Xl.Invoked||l.triggerKind===Xl.Automatic)}s(o,"is"),a.is=o}(Zp||(Zp={})),function(a){function i(u,l,c){let f={title:u},d=!0;return typeof l=="string"?(d=!1,f.kind=l):pn.is(l)?f.command=l:f.edit=l,d&&c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&C.string(l.title)&&(l.diagnostics===void 0||C.typedArray(l.diagnostics,Vl.is))&&(l.kind===void 0||C.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||pn.is(l.command))&&(l.isPreferred===void 0||C.boolean(l.isPreferred))&&(l.edit===void 0||bc.is(l.edit))}s(o,"is"),a.is=o}(Qp||(Qp={})),function(a){function i(u,l){let c={range:u};return C.defined(l)&&(c.data=l),c}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&te.is(l.range)&&(C.undefined(l.command)||pn.is(l.command))}s(o,"is"),a.is=o}(em||(em={})),function(a){function i(u,l){return{tabSize:u,insertSpaces:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.uinteger(l.tabSize)&&C.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(tm||(tm={})),function(a){function i(u,l,c){return{range:u,target:l,data:c}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&te.is(l.range)&&(C.undefined(l.target)||C.string(l.target))}s(o,"is"),a.is=o}(rm||(rm={})),function(a){function i(u,l){return{range:u,parent:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&te.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(nm||(nm={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(am||(am={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(im||(im={})),function(a){function i(o){const u=o;return C.objectLiteral(u)&&(u.resultId===void 0||typeof u.resultId=="string")&&Array.isArray(u.data)&&(u.data.length===0||typeof u.data[0]=="number")}s(i,"is"),a.is=i}(sm||(sm={})),function(a){function i(u,l){return{range:u,text:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&C.string(l.text)}s(o,"is"),a.is=o}(om||(om={})),function(a){function i(u,l,c){return{range:u,variableName:l,caseSensitiveLookup:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&C.boolean(l.caseSensitiveLookup)&&(C.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(lm||(lm={})),function(a){function i(u,l){return{range:u,expression:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&(C.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(um||(um={})),function(a){function i(u,l){return{frameId:u,stoppedLocation:l}}s(i,"create"),a.create=i;function o(u){const l=u;return C.defined(l)&&te.is(u.stoppedLocation)}s(o,"is"),a.is=o}(cm||(cm={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(Sc||(Sc={})),function(a){function i(u){return{value:u}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&(l.tooltip===void 0||C.string(l.tooltip)||Ia.is(l.tooltip))&&(l.location===void 0||Wl.is(l.location))&&(l.command===void 0||pn.is(l.command))}s(o,"is"),a.is=o}(wc||(wc={})),function(a){function i(u,l,c){const f={position:u,label:l};return c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&oe.is(l.position)&&(C.string(l.label)||C.typedArray(l.label,wc.is))&&(l.kind===void 0||Sc.is(l.kind))&&l.textEdits===void 0||C.typedArray(l.textEdits,ar.is)&&(l.tooltip===void 0||C.string(l.tooltip)||Ia.is(l.tooltip))&&(l.paddingLeft===void 0||C.boolean(l.paddingLeft))&&(l.paddingRight===void 0||C.boolean(l.paddingRight))}s(o,"is"),a.is=o}(fm||(fm={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(dm||(dm={})),function(a){function i(o,u,l,c){return{insertText:o,filterText:u,range:l,command:c}}s(i,"create"),a.create=i}(pm||(pm={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(mm||(mm={})),function(a){a.Invoked=0,a.Automatic=1}(hm||(hm={})),function(a){function i(o,u){return{range:o,text:u}}s(i,"create"),a.create=i}(ym||(ym={})),function(a){function i(o,u){return{triggerKind:o,selectedCompletionInfo:u}}s(i,"create"),a.create=i}(gm||(gm={})),function(a){function i(o){const u=o;return C.objectLiteral(u)&&Ac.is(u.uri)&&C.string(u.name)}s(i,"is"),a.is=i}(vm||(vm={})),x$=[` +var dk=Object.defineProperty;var pk=(t,e,r)=>e in t?dk(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var Br=(t,e,r)=>pk(t,typeof e!="symbol"?e+"":e,r);import{_ as ut}from"../../app/index-BKQXvMzA.js";var mk=Object.create,Du=Object.defineProperty,hk=Object.getOwnPropertyDescriptor,Th=Object.getOwnPropertyNames,yk=Object.getPrototypeOf,gk=Object.prototype.hasOwnProperty,s=(t,e)=>Du(t,"name",{value:e,configurable:!0}),vk=(t,e)=>function(){return t&&(e=(0,t[Th(t)[0]])(t=0)),e},X=(t,e)=>function(){return e||(0,t[Th(t)[0]])((e={exports:{}}).exports,e),e.exports},tn=(t,e)=>{for(var r in e)Du(t,r,{get:e[r],enumerable:!0})},$h=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Th(e))!gk.call(t,a)&&a!==r&&Du(t,a,{get:()=>e[a],enumerable:!(n=hk(e,a))||n.enumerable});return t},Of=(t,e,r)=>($h(t,e,"default"),r),Rh=(t,e,r)=>(r=t!=null?mk(yk(t)):{},$h(Du(r,"default",{value:t,enumerable:!0}),t)),Ah=t=>$h(Du({},"__esModule",{value:!0}),t),Lf={};tn(Lf,{AnnotatedTextEdit:()=>Ar,ChangeAnnotation:()=>mn,ChangeAnnotationIdentifier:()=>et,CodeAction:()=>Qp,CodeActionContext:()=>Zp,CodeActionKind:()=>Jp,CodeActionTriggerKind:()=>Xl,CodeDescription:()=>Ip,CodeLens:()=>em,Color:()=>Ec,ColorInformation:()=>Ep,ColorPresentation:()=>Cp,Command:()=>pn,CompletionItem:()=>Fp,CompletionItemKind:()=>Op,CompletionItemLabelDetails:()=>Gp,CompletionItemTag:()=>Dp,CompletionList:()=>zp,CreateFile:()=>_a,DeleteFile:()=>wa,Diagnostic:()=>Vl,DiagnosticRelatedInformation:()=>Cc,DiagnosticSeverity:()=>Sp,DiagnosticTag:()=>wp,DocumentHighlight:()=>Wp,DocumentHighlightKind:()=>Kp,DocumentLink:()=>rm,DocumentSymbol:()=>Xp,DocumentUri:()=>$p,EOL:()=>x$,FoldingRange:()=>_p,FoldingRangeKind:()=>bp,FormattingOptions:()=>tm,Hover:()=>jp,InlayHint:()=>fm,InlayHintKind:()=>Sc,InlayHintLabelPart:()=>wc,InlineCompletionContext:()=>gm,InlineCompletionItem:()=>pm,InlineCompletionList:()=>mm,InlineCompletionTriggerKind:()=>hm,InlineValueContext:()=>cm,InlineValueEvaluatableExpression:()=>um,InlineValueText:()=>om,InlineValueVariableLookup:()=>lm,InsertReplaceEdit:()=>Mp,InsertTextFormat:()=>Lp,InsertTextMode:()=>xp,Location:()=>Wl,LocationLink:()=>Ap,MarkedString:()=>Yl,MarkupContent:()=>Ia,MarkupKind:()=>_c,OptionalVersionedTextDocumentIdentifier:()=>Hl,ParameterInformation:()=>Bp,Position:()=>oe,Range:()=>te,RenameFile:()=>Sa,SelectedCompletionInfo:()=>ym,SelectionRange:()=>nm,SemanticTokenModifiers:()=>im,SemanticTokenTypes:()=>am,SemanticTokens:()=>sm,SignatureInformation:()=>Up,StringValue:()=>dm,SymbolInformation:()=>Hp,SymbolKind:()=>Vp,SymbolTag:()=>qp,TextDocument:()=>Tm,TextDocumentEdit:()=>ql,TextDocumentIdentifier:()=>Np,TextDocumentItem:()=>kp,TextEdit:()=>ar,URI:()=>Ac,VersionedTextDocumentIdentifier:()=>Pp,WorkspaceChange:()=>M$,WorkspaceEdit:()=>bc,WorkspaceFolder:()=>vm,WorkspaceSymbol:()=>Yp,integer:()=>Rp,uinteger:()=>Kl});var $p,Ac,Rp,Kl,oe,te,Wl,Ap,Ec,Ep,Cp,bp,_p,Cc,Sp,wp,Ip,Vl,pn,ar,mn,et,Ar,ql,_a,Sa,wa,bc,kl,Ud,M$,Np,Pp,Hl,kp,_c,Ia,Op,Lp,Dp,Mp,xp,Gp,Fp,zp,Yl,jp,Bp,Up,Kp,Wp,Vp,qp,Hp,Yp,Xp,Jp,Xl,Zp,Qp,em,tm,rm,nm,am,im,sm,om,lm,um,cm,Sc,wc,fm,dm,pm,mm,hm,ym,gm,vm,x$,Tm,iv,C,Mu=vk({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})($p||($p={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(Ac||(Ac={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Rp||(Rp={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(Kl||(Kl={})),function(a){function i(u,l){return u===Number.MAX_VALUE&&(u=Kl.MAX_VALUE),l===Number.MAX_VALUE&&(l=Kl.MAX_VALUE),{line:u,character:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&C.uinteger(l.line)&&C.uinteger(l.character)}s(o,"is"),a.is=o}(oe||(oe={})),function(a){function i(u,l,c,f){if(C.uinteger(u)&&C.uinteger(l)&&C.uinteger(c)&&C.uinteger(f))return{start:oe.create(u,l),end:oe.create(c,f)};if(oe.is(u)&&oe.is(l))return{start:u,end:l};throw new Error(`Range#create called with invalid arguments[${u}, ${l}, ${c}, ${f}]`)}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&oe.is(l.start)&&oe.is(l.end)}s(o,"is"),a.is=o}(te||(te={})),function(a){function i(u,l){return{uri:u,range:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&te.is(l.range)&&(C.string(l.uri)||C.undefined(l.uri))}s(o,"is"),a.is=o}(Wl||(Wl={})),function(a){function i(u,l,c,f){return{targetUri:u,targetRange:l,targetSelectionRange:c,originSelectionRange:f}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&te.is(l.targetRange)&&C.string(l.targetUri)&&te.is(l.targetSelectionRange)&&(te.is(l.originSelectionRange)||C.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(Ap||(Ap={})),function(a){function i(u,l,c,f){return{red:u,green:l,blue:c,alpha:f}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.numberRange(l.red,0,1)&&C.numberRange(l.green,0,1)&&C.numberRange(l.blue,0,1)&&C.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(Ec||(Ec={})),function(a){function i(u,l){return{range:u,color:l}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&te.is(l.range)&&Ec.is(l.color)}s(o,"is"),a.is=o}(Ep||(Ep={})),function(a){function i(u,l,c){return{label:u,textEdit:l,additionalTextEdits:c}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.string(l.label)&&(C.undefined(l.textEdit)||ar.is(l))&&(C.undefined(l.additionalTextEdits)||C.typedArray(l.additionalTextEdits,ar.is))}s(o,"is"),a.is=o}(Cp||(Cp={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(bp||(bp={})),function(a){function i(u,l,c,f,d,p){const h={startLine:u,endLine:l};return C.defined(c)&&(h.startCharacter=c),C.defined(f)&&(h.endCharacter=f),C.defined(d)&&(h.kind=d),C.defined(p)&&(h.collapsedText=p),h}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.uinteger(l.startLine)&&C.uinteger(l.startLine)&&(C.undefined(l.startCharacter)||C.uinteger(l.startCharacter))&&(C.undefined(l.endCharacter)||C.uinteger(l.endCharacter))&&(C.undefined(l.kind)||C.string(l.kind))}s(o,"is"),a.is=o}(_p||(_p={})),function(a){function i(u,l){return{location:u,message:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&Wl.is(l.location)&&C.string(l.message)}s(o,"is"),a.is=o}(Cc||(Cc={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(Sp||(Sp={})),function(a){a.Unnecessary=1,a.Deprecated=2}(wp||(wp={})),function(a){function i(o){const u=o;return C.objectLiteral(u)&&C.string(u.href)}s(i,"is"),a.is=i}(Ip||(Ip={})),function(a){function i(u,l,c,f,d,p){let h={range:u,message:l};return C.defined(c)&&(h.severity=c),C.defined(f)&&(h.code=f),C.defined(d)&&(h.source=d),C.defined(p)&&(h.relatedInformation=p),h}s(i,"create"),a.create=i;function o(u){var l;let c=u;return C.defined(c)&&te.is(c.range)&&C.string(c.message)&&(C.number(c.severity)||C.undefined(c.severity))&&(C.integer(c.code)||C.string(c.code)||C.undefined(c.code))&&(C.undefined(c.codeDescription)||C.string((l=c.codeDescription)===null||l===void 0?void 0:l.href))&&(C.string(c.source)||C.undefined(c.source))&&(C.undefined(c.relatedInformation)||C.typedArray(c.relatedInformation,Cc.is))}s(o,"is"),a.is=o}(Vl||(Vl={})),function(a){function i(u,l,...c){let f={title:u,command:l};return C.defined(c)&&c.length>0&&(f.arguments=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.title)&&C.string(l.command)}s(o,"is"),a.is=o}(pn||(pn={})),function(a){function i(c,f){return{range:c,newText:f}}s(i,"replace"),a.replace=i;function o(c,f){return{range:{start:c,end:c},newText:f}}s(o,"insert"),a.insert=o;function u(c){return{range:c,newText:""}}s(u,"del"),a.del=u;function l(c){const f=c;return C.objectLiteral(f)&&C.string(f.newText)&&te.is(f.range)}s(l,"is"),a.is=l}(ar||(ar={})),function(a){function i(u,l,c){const f={label:u};return l!==void 0&&(f.needsConfirmation=l),c!==void 0&&(f.description=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&C.string(l.label)&&(C.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(C.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(mn||(mn={})),function(a){function i(o){const u=o;return C.string(u)}s(i,"is"),a.is=i}(et||(et={})),function(a){function i(c,f,d){return{range:c,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(c,f,d){return{range:{start:c,end:c},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function u(c,f){return{range:c,newText:"",annotationId:f}}s(u,"del"),a.del=u;function l(c){const f=c;return ar.is(f)&&(mn.is(f.annotationId)||et.is(f.annotationId))}s(l,"is"),a.is=l}(Ar||(Ar={})),function(a){function i(u,l){return{textDocument:u,edits:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&Hl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(ql||(ql={})),function(a){function i(u,l,c){let f={kind:"create",uri:u};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="create"&&C.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||C.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||C.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o}(_a||(_a={})),function(a){function i(u,l,c,f){let d={kind:"rename",oldUri:u,newUri:l};return c!==void 0&&(c.overwrite!==void 0||c.ignoreIfExists!==void 0)&&(d.options=c),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="rename"&&C.string(l.oldUri)&&C.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||C.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||C.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o}(Sa||(Sa={})),function(a){function i(u,l,c){let f={kind:"delete",uri:u};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),c!==void 0&&(f.annotationId=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&l.kind==="delete"&&C.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||C.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||C.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||et.is(l.annotationId))}s(o,"is"),a.is=o}(wa||(wa={})),function(a){function i(o){let u=o;return u&&(u.changes!==void 0||u.documentChanges!==void 0)&&(u.documentChanges===void 0||u.documentChanges.every(l=>C.string(l.kind)?_a.is(l)||Sa.is(l)||wa.is(l):ql.is(l)))}s(i,"is"),a.is=i}(bc||(bc={})),kl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,u){let l,c;if(u===void 0?l=ar.insert(i,o):et.is(u)?(c=u,l=Ar.insert(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.insert(i,o,c)),this.edits.push(l),c!==void 0)return c}replace(i,o,u){let l,c;if(u===void 0?l=ar.replace(i,o):et.is(u)?(c=u,l=Ar.replace(i,o,u)):(this.assertChangeAnnotations(this.changeAnnotations),c=this.changeAnnotations.manage(u),l=Ar.replace(i,o,c)),this.edits.push(l),c!==void 0)return c}delete(i,o){let u,l;if(o===void 0?u=ar.del(i):et.is(o)?(l=o,u=Ar.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),u=Ar.del(i,l)),this.edits.push(u),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),Ud=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let u;if(et.is(i)?u=i:(u=this.nextId(),o=i),this._annotations[u]!==void 0)throw new Error(`Id ${u} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${u}`);return this._annotations[u]=o,this._size++,u}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),M$=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new Ud(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(ql.is(o)){const u=new kl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=u}})):i.changes&&Object.keys(i.changes).forEach(o=>{const u=new kl(i.changes[o]);this._textEditChanges[o]=u})):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(i){if(Hl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let u=this._textEditChanges[o.uri];if(!u){const l=[],c={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(c),u=new kl(l,this._changeAnnotations),this._textEditChanges[o.uri]=u}return u}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let u=[];this._workspaceEdit.changes[i]=u,o=new kl(u),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Ud,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(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;mn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=_a.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=_a.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}renameFile(i,o,u,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let c;mn.is(u)||et.is(u)?c=u:l=u;let f,d;if(c===void 0?f=Sa.create(i,o,l):(d=et.is(c)?c:this._changeAnnotations.manage(c),f=Sa.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,u){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;mn.is(o)||et.is(o)?l=o:u=o;let c,f;if(l===void 0?c=wa.create(i,u):(f=et.is(l)?l:this._changeAnnotations.manage(l),c=wa.create(i,u,f)),this._workspaceEdit.documentChanges.push(c),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(u){return{uri:u}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)}s(o,"is"),a.is=o}(Np||(Np={})),function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)&&C.integer(l.version)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){function i(u,l){return{uri:u,version:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)&&(l.version===null||C.integer(l.version))}s(o,"is"),a.is=o}(Hl||(Hl={})),function(a){function i(u,l,c,f){return{uri:u,languageId:l,version:c,text:f}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.string(l.uri)&&C.string(l.languageId)&&C.integer(l.version)&&C.string(l.text)}s(o,"is"),a.is=o}(kp||(kp={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const u=o;return u===a.PlainText||u===a.Markdown}s(i,"is"),a.is=i}(_c||(_c={})),function(a){function i(o){const u=o;return C.objectLiteral(o)&&_c.is(u.kind)&&C.string(u.value)}s(i,"is"),a.is=i}(Ia||(Ia={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(Op||(Op={})),function(a){a.PlainText=1,a.Snippet=2}(Lp||(Lp={})),function(a){a.Deprecated=1}(Dp||(Dp={})),function(a){function i(u,l,c){return{newText:u,insert:l,replace:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l&&C.string(l.newText)&&te.is(l.insert)&&te.is(l.replace)}s(o,"is"),a.is=o}(Mp||(Mp={})),function(a){a.asIs=1,a.adjustIndentation=2}(xp||(xp={})),function(a){function i(o){const u=o;return u&&(C.string(u.detail)||u.detail===void 0)&&(C.string(u.description)||u.description===void 0)}s(i,"is"),a.is=i}(Gp||(Gp={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(Fp||(Fp={})),function(a){function i(o,u){return{items:o||[],isIncomplete:!!u}}s(i,"create"),a.create=i}(zp||(zp={})),function(a){function i(u){return u.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(u){const l=u;return C.string(l)||C.objectLiteral(l)&&C.string(l.language)&&C.string(l.value)}s(o,"is"),a.is=o}(Yl||(Yl={})),function(a){function i(o){let u=o;return!!u&&C.objectLiteral(u)&&(Ia.is(u.contents)||Yl.is(u.contents)||C.typedArray(u.contents,Yl.is))&&(o.range===void 0||te.is(o.range))}s(i,"is"),a.is=i}(jp||(jp={})),function(a){function i(o,u){return u?{label:o,documentation:u}:{label:o}}s(i,"create"),a.create=i}(Bp||(Bp={})),function(a){function i(o,u,...l){let c={label:o};return C.defined(u)&&(c.documentation=u),C.defined(l)?c.parameters=l:c.parameters=[],c}s(i,"create"),a.create=i}(Up||(Up={})),function(a){a.Text=1,a.Read=2,a.Write=3}(Kp||(Kp={})),function(a){function i(o,u){let l={range:o};return C.number(u)&&(l.kind=u),l}s(i,"create"),a.create=i}(Wp||(Wp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(Vp||(Vp={})),function(a){a.Deprecated=1}(qp||(qp={})),function(a){function i(o,u,l,c,f){let d={name:o,kind:u,location:{uri:c,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i}(Hp||(Hp={})),function(a){function i(o,u,l,c){return c!==void 0?{name:o,kind:u,location:{uri:l,range:c}}:{name:o,kind:u,location:{uri:l}}}s(i,"create"),a.create=i}(Yp||(Yp={})),function(a){function i(u,l,c,f,d,p){let h={name:u,detail:l,kind:c,range:f,selectionRange:d};return p!==void 0&&(h.children=p),h}s(i,"create"),a.create=i;function o(u){let l=u;return l&&C.string(l.name)&&C.number(l.kind)&&te.is(l.range)&&te.is(l.selectionRange)&&(l.detail===void 0||C.string(l.detail))&&(l.deprecated===void 0||C.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}(Xp||(Xp={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(Jp||(Jp={})),function(a){a.Invoked=1,a.Automatic=2}(Xl||(Xl={})),function(a){function i(u,l,c){let f={diagnostics:u};return l!=null&&(f.only=l),c!=null&&(f.triggerKind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.typedArray(l.diagnostics,Vl.is)&&(l.only===void 0||C.typedArray(l.only,C.string))&&(l.triggerKind===void 0||l.triggerKind===Xl.Invoked||l.triggerKind===Xl.Automatic)}s(o,"is"),a.is=o}(Zp||(Zp={})),function(a){function i(u,l,c){let f={title:u},d=!0;return typeof l=="string"?(d=!1,f.kind=l):pn.is(l)?f.command=l:f.edit=l,d&&c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){let l=u;return l&&C.string(l.title)&&(l.diagnostics===void 0||C.typedArray(l.diagnostics,Vl.is))&&(l.kind===void 0||C.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||pn.is(l.command))&&(l.isPreferred===void 0||C.boolean(l.isPreferred))&&(l.edit===void 0||bc.is(l.edit))}s(o,"is"),a.is=o}(Qp||(Qp={})),function(a){function i(u,l){let c={range:u};return C.defined(l)&&(c.data=l),c}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&te.is(l.range)&&(C.undefined(l.command)||pn.is(l.command))}s(o,"is"),a.is=o}(em||(em={})),function(a){function i(u,l){return{tabSize:u,insertSpaces:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&C.uinteger(l.tabSize)&&C.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(tm||(tm={})),function(a){function i(u,l,c){return{range:u,target:l,data:c}}s(i,"create"),a.create=i;function o(u){let l=u;return C.defined(l)&&te.is(l.range)&&(C.undefined(l.target)||C.string(l.target))}s(o,"is"),a.is=o}(rm||(rm={})),function(a){function i(u,l){return{range:u,parent:l}}s(i,"create"),a.create=i;function o(u){let l=u;return C.objectLiteral(l)&&te.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(nm||(nm={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(am||(am={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(im||(im={})),function(a){function i(o){const u=o;return C.objectLiteral(u)&&(u.resultId===void 0||typeof u.resultId=="string")&&Array.isArray(u.data)&&(u.data.length===0||typeof u.data[0]=="number")}s(i,"is"),a.is=i}(sm||(sm={})),function(a){function i(u,l){return{range:u,text:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&C.string(l.text)}s(o,"is"),a.is=o}(om||(om={})),function(a){function i(u,l,c){return{range:u,variableName:l,caseSensitiveLookup:c}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&C.boolean(l.caseSensitiveLookup)&&(C.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(lm||(lm={})),function(a){function i(u,l){return{range:u,expression:l}}s(i,"create"),a.create=i;function o(u){const l=u;return l!=null&&te.is(l.range)&&(C.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(um||(um={})),function(a){function i(u,l){return{frameId:u,stoppedLocation:l}}s(i,"create"),a.create=i;function o(u){const l=u;return C.defined(l)&&te.is(u.stoppedLocation)}s(o,"is"),a.is=o}(cm||(cm={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(Sc||(Sc={})),function(a){function i(u){return{value:u}}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&(l.tooltip===void 0||C.string(l.tooltip)||Ia.is(l.tooltip))&&(l.location===void 0||Wl.is(l.location))&&(l.command===void 0||pn.is(l.command))}s(o,"is"),a.is=o}(wc||(wc={})),function(a){function i(u,l,c){const f={position:u,label:l};return c!==void 0&&(f.kind=c),f}s(i,"create"),a.create=i;function o(u){const l=u;return C.objectLiteral(l)&&oe.is(l.position)&&(C.string(l.label)||C.typedArray(l.label,wc.is))&&(l.kind===void 0||Sc.is(l.kind))&&l.textEdits===void 0||C.typedArray(l.textEdits,ar.is)&&(l.tooltip===void 0||C.string(l.tooltip)||Ia.is(l.tooltip))&&(l.paddingLeft===void 0||C.boolean(l.paddingLeft))&&(l.paddingRight===void 0||C.boolean(l.paddingRight))}s(o,"is"),a.is=o}(fm||(fm={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(dm||(dm={})),function(a){function i(o,u,l,c){return{insertText:o,filterText:u,range:l,command:c}}s(i,"create"),a.create=i}(pm||(pm={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(mm||(mm={})),function(a){a.Invoked=0,a.Automatic=1}(hm||(hm={})),function(a){function i(o,u){return{range:o,text:u}}s(i,"create"),a.create=i}(ym||(ym={})),function(a){function i(o,u){return{triggerKind:o,selectedCompletionInfo:u}}s(i,"create"),a.create=i}(gm||(gm={})),function(a){function i(o){const u=o;return C.objectLiteral(u)&&Ac.is(u.uri)&&C.string(u.name)}s(i,"is"),a.is=i}(vm||(vm={})),x$=[` `,`\r `,"\r"],function(a){function i(c,f,d,p){return new iv(c,f,d,p)}s(i,"create"),a.create=i;function o(c){let f=c;return!!(C.defined(f)&&C.string(f.uri)&&(C.undefined(f.languageId)||C.string(f.languageId))&&C.uinteger(f.lineCount)&&C.func(f.getText)&&C.func(f.positionAt)&&C.func(f.offsetAt))}s(o,"is"),a.is=o;function u(c,f){let d=c.getText(),p=l(f,(y,v)=>{let E=y.range.start.line-v.range.start.line;return E===0?y.range.start.character-v.range.start.character:E}),h=d.length;for(let y=p.length-1;y>=0;y--){let v=p[y],E=c.offsetAt(v.range.start),T=c.offsetAt(v.range.end);if(T<=h)d=d.substring(0,E)+v.newText+d.substring(T,d.length);else throw new Error("Overlapping edit");h=E}return d}s(u,"applyEdits"),a.applyEdits=u;function l(c,f){if(c.length<=1)return c;const d=c.length/2|0,p=c.slice(0,d),h=c.slice(d);l(p,f),l(h,f);let y=0,v=0,E=0;for(;y({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(X.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Pt=s(()=>Q({...At.cynefin,...U().cynefin}),"getConfig"),Nt=s(()=>{kt(),H=rt()},"clear"),O={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Pt,clear:Nt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,O),O.setDomains(t.domains),O.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);X.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Vt=s(()=>{const t=ot(),e=U();return Q(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Ft=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Vt();X.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,V=i+b*2,F=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},T=Dt(e);Tt(T,F,V,o.useMaxWidth??!0),T.attr("viewBox",`0 0 ${V} ${F}`),d&&T.append("title").text(d),D&&T.append("desc").text(D);const k=T.append("g").attr("transform",`translate(${b}, ${b})`),_=Rt(i,f),Z=it(o.seed,e),mt=k.append("g").attr("class","cynefin-backgrounds"),Y=["complex","complicated","chaotic","clear"];for(const l of Y){const r=_[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=k.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;k.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=k.append("g").attr("class","cynefin-labels");for(const l of Y){const r=_[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=k.append("g").attr("class","cynefin-subtitles");for(const r of Y){const u=_[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=k.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=_[l],y=l==="confusion";let L=r.items,P=0;y&&r.items.length>q&&(P=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),N=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=N.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),N.attr("x",C/2).attr("y",A/2)}),P>0){const g=B+L.length*(A+4),S=`+${P} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let N=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(N=W.width)}const x=N+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=T.select("defs").empty()?T.append("defs"):T.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).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");const u=k.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=_[y.from],P=_[y.to];if(!L||!P)return;if(y.from===y.to){X.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=P.cx,w=P.cy,M=(B+S)/2,N=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=N+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&k.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),_t={draw:Ft},Et=s(()=>{const t=ot(),e=U();return Q(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` +import{p as xt}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{aQ as gt,V as $t,$ as bt,aT as wt,W as Ct,aR as vt,a as s,at as X,aP as Dt,B as Tt,s as kt,r as Q,X as U,O as At,a8 as ot}from"./mermaid.core-l-gs7P2Q.js";import{p as Bt}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var rt=s(()=>({domains:new Map,transitions:[]}),"createDefaultData"),H=rt(),St=s(()=>H.domains,"getDomains"),Mt=s(()=>H.transitions,"getTransitions"),zt=s(t=>{if(t)for(const e of t){const n=e.domain,a=(e.items??[]).map(c=>({label:c.label}));H.domains.set(n,{name:n,items:a})}},"setDomains"),Lt=s(t=>{t&&(H.transitions=t.filter(e=>e.from===e.to?(X.warn(`Cynefin: self-loop transition on domain "${e.from}" is not meaningful and will be skipped.`),!1):!0).map(e=>({from:e.from,to:e.to,label:e.label||void 0})))},"setTransitions"),Pt=s(()=>Q({...At.cynefin,...U().cynefin}),"getConfig"),Nt=s(()=>{kt(),H=rt()},"clear"),O={getDomains:St,getTransitions:Mt,setDomains:zt,setTransitions:Lt,getConfig:Pt,clear:Nt,setAccTitle:vt,getAccTitle:Ct,setDiagramTitle:wt,getDiagramTitle:bt,getAccDescription:$t,setAccDescription:gt},Wt=s(t=>{xt(t,O),O.setDomains(t.domains),O.setTransitions(t.transitions)},"populate"),It={parse:s(async t=>{const e=await Bt("cynefin",t);X.debug(e),Wt(e)},"parse")};function E(t){let e=t+1831565813|0;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}s(E,"seededRandom");function st(t){let e=0;for(let n=0;n{const n=t/2,a=e/2;return{complex:{cx:n/2,cy:a/2,x:0,y:0,w:n,h:a},complicated:{cx:n+n/2,cy:a/2,x:n,y:0,w:n,h:a},chaotic:{cx:n/2,cy:a+a/2,x:0,y:a,w:n,h:a},clear:{cx:n+n/2,cy:a+a/2,x:n,y:a,w:n,h:a},confusion:{cx:n,cy:a,x:n*.7,y:a*.7,w:n*.6,h:a*.6}}},"getDomainLayouts"),Vt=s(()=>{const t=ot(),e=U();return Q(t,e.themeVariables).cynefin},"getCynefinDomainColors"),q=3,Ft=s((t,e,n,a)=>{const c=a.db,m=c.getDomains(),v=c.getTransitions(),I=c.getDiagramTitle(),d=c.getAccTitle(),D=c.getAccDescription(),o=c.getConfig(),p=Vt();X.debug("Rendering Cynefin diagram");const i=o.width,f=o.height,b=o.padding,h=o.showDomainDescriptions,R=o.boundaryAmplitude,V=i+b*2,F=f+b*2,z={complex:p.complexBg,complicated:p.complicatedBg,clear:p.clearBg,chaotic:p.chaoticBg,confusion:p.confusionBg},T=Dt(e);Tt(T,F,V,o.useMaxWidth??!0),T.attr("viewBox",`0 0 ${V} ${F}`),d&&T.append("title").text(d),D&&T.append("desc").text(D);const k=T.append("g").attr("transform",`translate(${b}, ${b})`),_=Rt(i,f),Z=it(o.seed,e),mt=k.append("g").attr("class","cynefin-backgrounds"),Y=["complex","complicated","chaotic","clear"];for(const l of Y){const r=_[l];mt.append("rect").attr("class","cynefinDomain").attr("x",r.x).attr("y",r.y).attr("width",r.w).attr("height",r.h).attr("fill",z[l]).attr("fill-opacity",.4).attr("stroke","none")}const j=k.append("g").attr("class","cynefin-boundaries");j.append("path").attr("class","cynefinBoundary").attr("d",ct(i,f,Z,R)).attr("fill","none"),j.append("path").attr("class","cynefinBoundary").attr("d",lt(i,f,Z+100,R)).attr("fill","none"),j.append("path").attr("class","cynefinCliff").attr("d",dt(i,f)).attr("fill","none");const pt=i*.15,yt=f*.15;k.append("path").attr("class","cynefinConfusion").attr("d",ft(i/2,f/2,pt,yt)).attr("fill",z.confusion).attr("fill-opacity",.5);const J=k.append("g").attr("class","cynefin-labels");for(const l of Y){const r=_[l];J.append("text").attr("class","cynefinDomainLabel").attr("x",r.cx).attr("y",h?r.cy-30:r.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(l.charAt(0).toUpperCase()+l.slice(1))}if(J.append("text").attr("class","cynefinDomainLabel").attr("x",i/2).attr("y",h?f/2-10:f/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),h){const l=k.append("g").attr("class","cynefin-subtitles");for(const r of Y){const u=_[r],y=at[r];l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.model),l.append("text").attr("class","cynefinSubtitle").attr("x",u.cx).attr("y",u.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(y.practice)}l.append("text").attr("class","cynefinSubtitle").attr("x",i/2).attr("y",f/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(at.confusion.practice)}const K=k.append("g").attr("class","cynefin-items"),A=26,tt=10,ut=["complex","complicated","chaotic","clear","confusion"];for(const l of ut){const r=m.get(l);if(!r||r.items.length===0)continue;const u=_[l],y=l==="confusion";let L=r.items,P=0;y&&r.items.length>q&&(P=r.items.length-q,L=r.items.slice(0,q));let B;if(y){const g=h?22:14;B=u.cy+g}else B=u.cy+(h?25:15);if([...L].forEach((g,S)=>{const w=B+S*(A+4),M=K.append("g"),N=M.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(g.label);let $=g.label.length*7;const x=N.node();if(x&&typeof x.getBBox=="function"){const G=x.getBBox();G.width>0&&($=G.width)}const C=$+tt*2,W=u.cx-C/2;M.attr("transform",`translate(${W}, ${w})`),M.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",C).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.95),N.attr("x",C/2).attr("y",A/2)}),P>0){const g=B+L.length*(A+4),S=`+${P} more`,w=K.append("g"),M=w.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",A/2).attr("text-anchor","middle").attr("dominant-baseline","central").text(S);let N=S.length*7;const $=M.node();if($&&typeof $.getBBox=="function"){const W=$.getBBox();W.width>0&&(N=W.width)}const x=N+tt*2,C=u.cx-x/2;w.attr("transform",`translate(${C}, ${g})`),w.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",x).attr("height",A).attr("rx",4).attr("ry",4).attr("fill",z[l]).attr("fill-opacity",.6),M.attr("x",x/2).attr("y",A/2)}}if(v.length>0){const l=T.select("defs").empty()?T.append("defs"):T.select("defs"),r=`cynefin-arrow-${e}`;l.append("marker").attr("id",r).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");const u=k.append("g").attr("class","cynefin-arrows");v.forEach(y=>{const L=_[y.from],P=_[y.to];if(!L||!P)return;if(y.from===y.to){X.warn(`Cynefin renderer: skipping self-loop on domain "${y.from}"`);return}const B=L.cx,g=L.cy,S=P.cx,w=P.cy,M=(B+S)/2,N=(g+w)/2,$=S-B,x=w-g,C=Math.sqrt($*$+x*x),W=C*.15,G=-x/C,ht=$/C,et=M+G*W,nt=N+ht*W;u.append("path").attr("class","cynefinArrowLine").attr("d",`M${B},${g} Q${et},${nt} ${S},${w}`).attr("fill","none").attr("marker-end",`url(#${r})`),y.label&&u.append("text").attr("class","cynefinArrowLabel").attr("x",et).attr("y",nt-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(y.label)})}I&&k.append("text").attr("class","cynefinTitle").attr("x",i/2).attr("y",-b/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(I)},"draw"),_t={draw:Ft},Et=s(()=>{const t=ot(),e=U();return Q(t,e.themeVariables).cynefin},"getCynefinTheme"),Ht=s(()=>{const t=Et();return` .cynefinDomain { stroke: none; } diff --git a/veadk/webui/assets/visualizations/mermaid/dagre-VZM6K2ZE-CQJoiPmN.js b/veadk/webui/assets/visualizations/mermaid/dagre-VZM6K2ZE-DE-32FKg.js similarity index 97% rename from veadk/webui/assets/visualizations/mermaid/dagre-VZM6K2ZE-CQJoiPmN.js rename to veadk/webui/assets/visualizations/mermaid/dagre-VZM6K2ZE-DE-32FKg.js index c341e89c1..418ae0c5d 100644 --- a/veadk/webui/assets/visualizations/mermaid/dagre-VZM6K2ZE-CQJoiPmN.js +++ b/veadk/webui/assets/visualizations/mermaid/dagre-VZM6K2ZE-DE-32FKg.js @@ -1,4 +1,4 @@ -import{c as O,w as M,a as J,f as P,b as N,s as A}from"./chunk-RYQCIY6F-CnbyImnC.js";import{a as X,aw as v,v as D,t as Y,u as H,at as d,Y as _,b8 as F,aU as W,ag as $,a6 as j,aG as R,ad as U,ae as q,aF as z,af as G}from"./mermaid.core-BmHujEI0.js";import{G as K}from"../../chunks/graph-Dqkl27Ch.js";import{l as Q}from"../../chunks/layout-B6FSD_Du.js";import"../../chunks/map-8WAJQ6ap.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var C=X((o,s,l)=>Math.max(s,Math.min(l,o)),"clamp"),B=X((o="TB")=>{switch(o){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=X(o=>o==="flowchart"||o==="flowchart-v2"||o==="stateDiagram","shouldMergeSelfLoopSegments"),Z=X((o,s,l,y,a)=>{const f=[],p=new Set;if(l.forEach(({start:r,end:t})=>{r!==y&&p.add(r),t!==y&&p.add(t)}),p.forEach(r=>{const t=o.node(r);typeof(t==null?void 0:t.x)=="number"&&typeof(t==null?void 0:t.y)=="number"&&f.push(t)}),f.length===0&&l.forEach(({edge:r})=>{(r.points??[]).forEach(t=>{typeof(t==null?void 0:t.x)=="number"&&typeof(t==null?void 0:t.y)=="number"&&f.push(t)})}),f.length===0)return B(a);const c=f.reduce((r,t)=>({x:r.x+t.x/f.length,y:r.y+t.y/f.length}),{x:0,y:0}),h=c.x-s.x,i=c.y-s.y;return Math.abs(h)>Math.abs(i)?h>0?"right":"left":Math.abs(i)>0?i>0?"bottom":"top":B(a)},"getSelfLoopSide"),ee=X((o,s="top",l=0,y=0)=>{const a=o.x,f=o.y-l,p=o.width/2,c=o.height/2,h=Math.max(36,Math.min(100,o.width*.8)),i=C(Math.max(y,o.width*.35),36,h),r=C(Math.min(o.width,o.height)*.45,24,48);switch(s){case"bottom":{const t=f+c;return[{x:a-i/2,y:t},{x:a-i/2,y:t+r},{x:a+i/2,y:t+r},{x:a+i/2,y:t}]}case"right":{const t=a+p;return[{x:t,y:f-i/2},{x:t+r,y:f-i/2},{x:t+r,y:f+i/2},{x:t,y:f+i/2}]}case"left":{const t=a-p;return[{x:t,y:f-i/2},{x:t-r,y:f-i/2},{x:t-r,y:f+i/2},{x:t,y:f+i/2}]}case"top":default:{const t=f-c;return[{x:a-i/2,y:t},{x:a-i/2,y:t-r},{x:a+i/2,y:t-r},{x:a+i/2,y:t}]}}},"getSelfLoopPoints"),te=X((o,s,l="top",y=0,a={})=>{const p=o.x,c=o.y-y,h=a.width??0,i=a.height??0;switch(l){case"bottom":return{x:p,y:Math.max(...s.map(r=>r.y))+i/2+4};case"right":return{x:Math.max(...s.map(r=>r.x))+h/2+4,y:c};case"left":return{x:Math.min(...s.map(r=>r.x))-h/2-4,y:c};case"top":default:return{x:p,y:Math.min(...s.map(r=>r.y))-i/2-4}}},"getSelfLoopLabelPosition"),se=X((o,s=0,{mergeSelfLoops:l=!0}={})=>{var p;const y=new Map,a=[],f=(p=o.graph())==null?void 0:p.rankdir;return o.edges().forEach(c=>{const h=o.edge(c);if(l&&h.selfLoop){const i=h.selfLoop.id;y.has(i)||y.set(i,[]),y.get(i).push({edge:h,start:c.v,end:c.w})}else a.push({edge:h,start:c.v,end:c.w})}),y.forEach(c=>{if(c.length!==3){c.forEach(n=>a.push(n));return}c.sort((n,e)=>n.edge.selfLoop.order-e.edge.selfLoop.order);const[h,i,r]=c,t=h.edge.originalEdge??i.edge.originalEdge??r.edge.originalEdge??i.edge,g=o.node(t.start);if(!g){c.forEach(n=>a.push(n));return}const S={width:i.edge.width,height:i.edge.height},w=Z(o,g,c,t.start,f),b=ee(g,w,s,S.width??0),E=te(g,b,w,s,S),m={...i.edge,...t,id:t.id,points:b,start:t.start,end:t.end,x:E.x,y:E.y,width:S.width,height:S.height,labelStyle:i.edge.labelStyle,fromCluster:h.edge.fromCluster??i.edge.fromCluster??r.edge.fromCluster,toCluster:h.edge.toCluster??i.edge.toCluster??r.edge.toCluster};delete m.selfLoop,delete m.originalEdge,a.push({edge:m,start:m.start,end:m.end})}),a},"getEdgesToRender"),T=X(async(o,s,l,y,a,f)=>{d.warn("Graph in recursive render:XAX",M(s),a);const p=s.graph().rankdir;d.trace("Dir in recursive render - dir:",p);const c=o.insert("g").attr("class","root");s.nodes()?d.info("Recursive render XXX",s.nodes()):d.info("No nodes found for",s),s.edges().length>0&&d.info("Recursive edges",s.edge(s.edges()[0]));const h=c.insert("g").attr("class","clusters"),i=c.insert("g").attr("class","edgePaths"),r=c.insert("g").attr("class","edgeLabels"),t=c.insert("g").attr("class","nodes"),g=V(l);await Promise.all(s.nodes().map(async function(n){const e=s.node(n);if(a!==void 0){const u=JSON.parse(JSON.stringify(a.clusterData));d.trace(`Setting data for parent cluster XXX +import{c as O,w as M,a as J,f as P,b as N,s as A}from"./chunk-RYQCIY6F-ChBtCdXE.js";import{a as X,aw as v,v as D,t as Y,u as H,at as d,Y as _,b8 as F,aU as W,ag as $,a6 as j,aG as R,ad as U,ae as q,aF as z,af as G}from"./mermaid.core-l-gs7P2Q.js";import{G as K}from"../../chunks/graph-Dqkl27Ch.js";import{l as Q}from"../../chunks/layout-B6FSD_Du.js";import"../../chunks/map-8WAJQ6ap.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var C=X((o,s,l)=>Math.max(s,Math.min(l,o)),"clamp"),B=X((o="TB")=>{switch(o){case"BT":return"bottom";case"LR":return"right";case"RL":return"left";case"TB":default:return"top"}},"getDefaultSelfLoopSide"),V=X(o=>o==="flowchart"||o==="flowchart-v2"||o==="stateDiagram","shouldMergeSelfLoopSegments"),Z=X((o,s,l,y,a)=>{const f=[],p=new Set;if(l.forEach(({start:r,end:t})=>{r!==y&&p.add(r),t!==y&&p.add(t)}),p.forEach(r=>{const t=o.node(r);typeof(t==null?void 0:t.x)=="number"&&typeof(t==null?void 0:t.y)=="number"&&f.push(t)}),f.length===0&&l.forEach(({edge:r})=>{(r.points??[]).forEach(t=>{typeof(t==null?void 0:t.x)=="number"&&typeof(t==null?void 0:t.y)=="number"&&f.push(t)})}),f.length===0)return B(a);const c=f.reduce((r,t)=>({x:r.x+t.x/f.length,y:r.y+t.y/f.length}),{x:0,y:0}),h=c.x-s.x,i=c.y-s.y;return Math.abs(h)>Math.abs(i)?h>0?"right":"left":Math.abs(i)>0?i>0?"bottom":"top":B(a)},"getSelfLoopSide"),ee=X((o,s="top",l=0,y=0)=>{const a=o.x,f=o.y-l,p=o.width/2,c=o.height/2,h=Math.max(36,Math.min(100,o.width*.8)),i=C(Math.max(y,o.width*.35),36,h),r=C(Math.min(o.width,o.height)*.45,24,48);switch(s){case"bottom":{const t=f+c;return[{x:a-i/2,y:t},{x:a-i/2,y:t+r},{x:a+i/2,y:t+r},{x:a+i/2,y:t}]}case"right":{const t=a+p;return[{x:t,y:f-i/2},{x:t+r,y:f-i/2},{x:t+r,y:f+i/2},{x:t,y:f+i/2}]}case"left":{const t=a-p;return[{x:t,y:f-i/2},{x:t-r,y:f-i/2},{x:t-r,y:f+i/2},{x:t,y:f+i/2}]}case"top":default:{const t=f-c;return[{x:a-i/2,y:t},{x:a-i/2,y:t-r},{x:a+i/2,y:t-r},{x:a+i/2,y:t}]}}},"getSelfLoopPoints"),te=X((o,s,l="top",y=0,a={})=>{const p=o.x,c=o.y-y,h=a.width??0,i=a.height??0;switch(l){case"bottom":return{x:p,y:Math.max(...s.map(r=>r.y))+i/2+4};case"right":return{x:Math.max(...s.map(r=>r.x))+h/2+4,y:c};case"left":return{x:Math.min(...s.map(r=>r.x))-h/2-4,y:c};case"top":default:return{x:p,y:Math.min(...s.map(r=>r.y))-i/2-4}}},"getSelfLoopLabelPosition"),se=X((o,s=0,{mergeSelfLoops:l=!0}={})=>{var p;const y=new Map,a=[],f=(p=o.graph())==null?void 0:p.rankdir;return o.edges().forEach(c=>{const h=o.edge(c);if(l&&h.selfLoop){const i=h.selfLoop.id;y.has(i)||y.set(i,[]),y.get(i).push({edge:h,start:c.v,end:c.w})}else a.push({edge:h,start:c.v,end:c.w})}),y.forEach(c=>{if(c.length!==3){c.forEach(n=>a.push(n));return}c.sort((n,e)=>n.edge.selfLoop.order-e.edge.selfLoop.order);const[h,i,r]=c,t=h.edge.originalEdge??i.edge.originalEdge??r.edge.originalEdge??i.edge,g=o.node(t.start);if(!g){c.forEach(n=>a.push(n));return}const S={width:i.edge.width,height:i.edge.height},w=Z(o,g,c,t.start,f),b=ee(g,w,s,S.width??0),E=te(g,b,w,s,S),m={...i.edge,...t,id:t.id,points:b,start:t.start,end:t.end,x:E.x,y:E.y,width:S.width,height:S.height,labelStyle:i.edge.labelStyle,fromCluster:h.edge.fromCluster??i.edge.fromCluster??r.edge.fromCluster,toCluster:h.edge.toCluster??i.edge.toCluster??r.edge.toCluster};delete m.selfLoop,delete m.originalEdge,a.push({edge:m,start:m.start,end:m.end})}),a},"getEdgesToRender"),T=X(async(o,s,l,y,a,f)=>{d.warn("Graph in recursive render:XAX",M(s),a);const p=s.graph().rankdir;d.trace("Dir in recursive render - dir:",p);const c=o.insert("g").attr("class","root");s.nodes()?d.info("Recursive render XXX",s.nodes()):d.info("No nodes found for",s),s.edges().length>0&&d.info("Recursive edges",s.edge(s.edges()[0]));const h=c.insert("g").attr("class","clusters"),i=c.insert("g").attr("class","edgePaths"),r=c.insert("g").attr("class","edgeLabels"),t=c.insert("g").attr("class","nodes"),g=V(l);await Promise.all(s.nodes().map(async function(n){const e=s.node(n);if(a!==void 0){const u=JSON.parse(JSON.stringify(a.clusterData));d.trace(`Setting data for parent cluster XXX Node.id = `,n,` data=`,u.height,` Parent cluster`,a.height),s.setNode(a.id,u),s.parent(n)||(d.trace("Setting parent",n,a.id),s.setParent(n,a.id,u))}if(d.info("(Insert) Node XXX"+n+": "+JSON.stringify(s.node(n))),e!=null&&e.clusterNode){d.info("Cluster identified XBX",n,e.width,s.node(n));const{ranksep:u,nodesep:x}=s.graph();e.graph.setGraph({...e.graph.graph(),ranksep:u+25,nodesep:x});const L=await T(t,e.graph,l,y,s.node(n),f),I=L.elem;F(e,I),e.diff=L.diff||0,d.info("New compound node after recursive render XAX",n,"width",e.width,"height",e.height),W(I,e)}else s.children(n).length>0?(d.trace("Cluster - the non recursive path XBX",n,e.id,e,e.width,"Graph:",s),d.trace(P(e.id,s)),N.set(e.id,{id:P(e.id,s),node:e})):(d.trace("Node - the non recursive path XAX",n,t,s.node(n),p),await $(t,s.node(n),{config:f,dir:p}))})),await X(async()=>{const n=s.edges().map(async function(e){const u=s.edge(e.v,e.w,e.name);if(d.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),d.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(s.edge(e))),d.info("Fix",N,"ids:",e.v,e.w,"Translating: ",N.get(e.v),N.get(e.w)),g&&u.selfLoop){if(u.selfLoop.order!==1)return;const x=u.id;u.id=u.selfLoop.id,await G(r,u),u.id=x;return}await G(r,u)});await Promise.all(n)},"processEdges")(),d.info("Graph before layout:",JSON.stringify(M(s))),d.info("############################################# XXX"),d.info("### Layout ### XXX"),d.info("############################################# XXX"),Q(s),d.info("Graph after layout:",JSON.stringify(M(s)));let w=0,{subGraphTitleTotalMargin:b}=j(f);await Promise.all(A(s).map(async function(n){var u;const e=s.node(n);if(d.info("Position XBX => "+n+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e!=null&&e.clusterNode)e.y+=b,d.info("A tainted cluster node XBX1",n,e.id,e.width,e.height,e.x,e.y,s.parent(n)),N.get(e.id).node=e,R(e);else if(s.children(n).length>0){d.info("A pure cluster node XBX1",n,e.id,e.x,e.y,e.width,e.height,s.parent(n)),e.height+=b,s.node(e.parentId);const x=(e==null?void 0:e.padding)/2||0,L=((u=e==null?void 0:e.labelBBox)==null?void 0:u.height)||0,I=L-x||0;d.debug("OffsetY",I,"labelHeight",L,"halfPadding",x),await U(h,e),N.get(e.id).node=e}else{const x=s.node(e.parentId);e.y+=b/2,d.info("A regular node XBX1 - using the padding",e.id,"parent",e.parentId,e.width,e.height,e.x,e.y,"offsetY",e.offsetY,"parent",x,x==null?void 0:x.offsetY,e),R(e)}}));const E=b/2;return se(s,E,{mergeSelfLoops:g}).forEach(function({edge:n,start:e,end:u}){d.info("Edge "+e+" -> "+u+": "+JSON.stringify(n),n),n.points.forEach(k=>k.y+=E);const x=s.node(e),L=s.node(u),I=q(i,n,N,l,x,L,y);z(n,I)}),s.nodes().forEach(function(n){const e=s.node(n);d.info(n,e.type,e.diff),e.isGroup&&(w=e.diff)}),d.warn("Returning from recursive render XAX",c,w),{elem:c,diff:w}},"recursiveRender"),le=X(async(o,s)=>{var f,p,c,h,i,r;const l=new K({multigraph:!0,compound:!0}).setGraph({rankdir:o.direction,nodesep:((f=o.config)==null?void 0:f.nodeSpacing)||((c=(p=o.config)==null?void 0:p.flowchart)==null?void 0:c.nodeSpacing)||o.nodeSpacing,ranksep:((h=o.config)==null?void 0:h.rankSpacing)||((r=(i=o.config)==null?void 0:i.flowchart)==null?void 0:r.rankSpacing)||o.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),y=s.select("g");v(y,o.markers,o.type,o.diagramId),D(),Y(),H(),O(),o.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),d.debug("Edges:",o.edges),o.edges.forEach(t=>{if(t.start===t.end){const g=t.start,S=g+"---"+g+"---1",w=g+"---"+g+"---2",b=l.node(g);l.setNode(S,{domId:S,id:S,parentId:b.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(S,b.parentId),l.setNode(w,{domId:w,id:w,parentId:b.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(w,b.parentId);const E=structuredClone(t),m=structuredClone(t),n=structuredClone(t),e=structuredClone(t);m.originalEdge=E,m.selfLoop={id:E.id,order:0},n.originalEdge=E,n.selfLoop={id:E.id,order:1},e.originalEdge=E,e.selfLoop={id:E.id,order:2},m.label="",m.arrowTypeEnd="none",m.endLabelLeft="",m.endLabelRight="",m.startLabelLeft="",m.id=g+"-cyclic-special-1",n.startLabelRight="",n.startLabelLeft="",n.endLabelLeft="",n.endLabelRight="",n.arrowTypeStart="none",n.arrowTypeEnd="none",n.id=g+"-cyclic-special-mid",e.label="",e.startLabelRight="",e.startLabelLeft="",e.arrowTypeStart="none",b.isGroup&&(m.fromCluster=g,e.toCluster=g),e.id=g+"-cyclic-special-2",e.arrowTypeStart="none",l.setEdge(g,S,m,g+"-cyclic-special-0"),l.setEdge(S,w,n,g+"-cyclic-special-1"),l.setEdge(w,g,e,g+"-cyclic-special-2")}else l.setEdge(t.start,t.end,{...t},t.id)}),d.warn("Graph at first:",JSON.stringify(M(l))),J(l),d.warn("Graph after XAX:",JSON.stringify(M(l)));const a=_();await T(y,l,o.type,o.diagramId,void 0,a)},"render");export{se as getEdgesToRender,le as render}; diff --git a/veadk/webui/assets/visualizations/mermaid/diagram-7IWD3JNH-BsrwcXvB.js b/veadk/webui/assets/visualizations/mermaid/diagram-7IWD3JNH-nHKkQ5Y4.js similarity index 96% rename from veadk/webui/assets/visualizations/mermaid/diagram-7IWD3JNH-BsrwcXvB.js rename to veadk/webui/assets/visualizations/mermaid/diagram-7IWD3JNH-nHKkQ5Y4.js index 20630b046..ee9005fea 100644 --- a/veadk/webui/assets/visualizations/mermaid/diagram-7IWD3JNH-BsrwcXvB.js +++ b/veadk/webui/assets/visualizations/mermaid/diagram-7IWD3JNH-nHKkQ5Y4.js @@ -1,4 +1,4 @@ -import{I as z}from"./chunk-2Q5K7J3B-DM9SBI1P.js";import{p as O}from"./chunk-JWPE2WC7-BHkERHFx.js";import{aT as G,aR as P,aQ as Y,$ as F,V as j,W as Z,a as p,r as A,at as D,aP as q,B as U,X as E,s as J,aN as Q,a2 as K,O as ee,aJ as te}from"./mermaid.core-BmHujEI0.js";import{p as re}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var S=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,$=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function _(r){return r.some(e=>S.test(e))}p(_,"isBoxDrawingFormat");function M(r){for(const e of r){const t=L.exec(e);if(t!=null&&t.index&&t.index>0)return t.index}return 4}p(M,"inferSegmentWidth");function R(r,e){return r.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{const o=parseInt(i,10),c=e.get(o);return c?`line ${c}`:t})}p(R,"remapErrorLines");function H(r){const e=r.split(` +import{I as z}from"./chunk-2Q5K7J3B-BiO2G8-N.js";import{p as O}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{aT as G,aR as P,aQ as Y,$ as F,V as j,W as Z,a as p,r as A,at as D,aP as q,B as U,X as E,s as J,aN as Q,a2 as K,O as ee,aJ as te}from"./mermaid.core-l-gs7P2Q.js";import{p as re}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var S=/[─━│┃└┗├┣]/,L=/[└┗├┣]/,ne=/[─━]/,$=/^[\s│┃]+$/,T=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,k=/^\s*%%/,ie=" ";function _(r){return r.some(e=>S.test(e))}p(_,"isBoxDrawingFormat");function M(r){for(const e of r){const t=L.exec(e);if(t!=null&&t.index&&t.index>0)return t.index}return 4}p(M,"inferSegmentWidth");function R(r,e){return r.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{const o=parseInt(i,10),c=e.get(o);return c?`line ${c}`:t})}p(R,"remapErrorLines");function H(r){const e=r.split(` `),t=new Map;let i=-1;for(const[a,s]of e.entries())if(s.trim()==="treeView-beta"){i=a;break}if(i===-1)return{text:r,lineMap:t};const o=[];for(let a=i+1;a({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),oe=p(()=>{x.reset(),J()},"clear"),se=p(()=>x.records.stack[0],"getRoot"),ae=p(()=>x.records.cnt,"getCount"),ce=ee.treeView,le=p(()=>A(ce,E().treeView),"getConfig"),de=p((r,e,t,i,o,c)=>{for(;r<=x.records.stack[x.records.stack.length-1].level;)x.records.stack.pop();const n={id:x.records.cnt++,level:r,name:e,nodeType:t,icon:o,cssClass:i,description:c,children:[]};x.records.stack[x.records.stack.length-1].children.push(n),x.records.stack.push(n)},"addNode"),he={clear:oe,addNode:de,getRoot:se,getCount:ae,getConfig:le,getAccTitle:Z,getAccDescription:j,getDiagramTitle:F,setAccDescription:Y,setAccTitle:P,setDiagramTitle:G},y=he,pe=p(r=>{O(r,y);for(const e of r.nodes){const t=typeof e.indent=="number"?e.indent:0;let i=e.name;const o=i.endsWith("/");o&&(i=i.slice(0,-1));const c=o?"directory":"file",n=e.classAnnotation||void 0,l=e.iconAnnotation,a=l!==void 0?l||"none":void 0,s=e.descAnnotation||void 0,u=s?Q(s,E()):void 0;y.addNode(t,i,c,n,a,u)}},"populate"),fe={parse:p(async r=>{const{text:e,lineMap:t}=H(r);try{const i=await re("treeView",e);D.debug(i),pe(i)}catch(i){throw t.size>0&&i instanceof Error&&(i.message=R(i.message,t)),i}},"parse")},C={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:''},file:{body:''}}};function W(r,e){var o;const t=(o=e==null?void 0:e.filenameIcons)==null?void 0:o[r];if(t)return t;const i=r.lastIndexOf(".");if(i>0){const c=r.substring(i).toLowerCase(),n=e==null?void 0:e.extensionIcons;return(n==null?void 0:n[c])??(n==null?void 0:n[c.slice(1)])}}p(W,"detectIcon");function I(r,e){return r.includes(":")?r:r in C.icons||!e?`${C.prefix}:${r}`:`${e}:${r}`}p(I,"qualifyIcon");function V(r,e){if(r.icon!=="none"){if(r.icon)return I(r.icon,e.defaultIconPack);if(e.showIcons){if(r.nodeType==="file"){const t=W(r.name,e);if(t==="none")return;if(t)return I(t,e.defaultIconPack)}return`${C.prefix}:${r.nodeType==="directory"?"folder":"file"}`}}}p(V,"getNodeIcon");te([{name:C.prefix,icons:C}]);var B=14,ge=4,ue=16,X=p((r,e)=>`tv-icon-${r}-${e.replace(/[^\w-]/g,"-")}`,"iconSymbolId"),we=p(async(r,e,t,i)=>{const o=new Set,c=p(a=>{const s=V(a,t);s&&o.add(s),a.children.forEach(c)},"collect");if(c(e),o.size===0)return;const n=await Promise.all([...o].map(async a=>({icon:a,svg:await K(a,{height:B,width:B})}))),l=r.append("defs");for(const{icon:a,svg:s}of n)l.append("g").attr("id",X(i,a)).html(s)},"injectIconDefs"),me=p((r,e,t,i,o,c)=>{var b;const n=i.append("g");let l="treeView-node-label";t.nodeType==="directory"&&(l+=" treeView-node-dir"),t.cssClass&&(l+=` ${t.cssClass}`);const a=B+ge,s=V(t,o),u=s!==void 0;s&&n.append("use").attr("xlink:href",`#${X(c,s)}`).attr("x",r+o.paddingX).attr("y",e+o.paddingY).attr("class","treeView-node-icon");const d=n.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:f,width:h}=d.node().getBBox(),m=f+o.paddingY*2,w=r+o.paddingX+(u?a:0);d.attr("x",w),d.attr("y",e+m/2);const g=w+h,v=h+o.paddingX*2+(u?a:0);return t.BBox={x:r,y:e,width:v,height:m},(b=t.cssClass)!=null&&b.split(/\s+/).includes("highlight")&&n.insert("rect",":first-child").attr("x",r).attr("y",e+1).attr("width",0).attr("height",m-2).attr("rx",3).attr("class","treeView-highlight-bg"),{node:t,nodeGroup:n,labelRightEdge:g,centerY:e+m/2}},"positionLabel"),N=p((r,e,t,i,o,c)=>r.append("line").attr("x1",e).attr("y1",t).attr("x2",i).attr("y2",o).attr("stroke-width",c).attr("class","treeView-node-line"),"positionLine"),ve=p((r,e,t,i)=>{var u;let o=0,c=0;const n=[],l=p((d,f,h,m)=>{const w=m*(h.rowIndent+h.paddingX),g=me(w,o,f,d,h,i);n.push(g);const{height:v,width:b}=f.BBox;N(d,w-h.rowIndent,o+v/2,w,o+v/2,h.lineThickness),c=Math.max(c,w+b),o+=v},"drawNode"),a=p((d,f=0)=>{l(r,d,t,f),d.children.forEach(g=>{a(g,f+1)});const{x:h,y:m,height:w}=d.BBox;if(d.children.length){const{y:g,height:v}=d.children[d.children.length-1].BBox;N(r,h+t.paddingX,m+w,h+t.paddingX,g+v/2+t.lineThickness/2,t.lineThickness)}},"processNode");a(e);const s=n.filter(d=>d.node.description);if(s.length>0){const f=Math.max(...n.map(h=>h.labelRightEdge))+ue;for(const h of s){const w=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();c=Math.max(c,f+w.width+t.paddingX)}}for(const d of n)if((u=d.node.cssClass)!=null&&u.split(/\s+/).includes("highlight")){const f=d.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){const h=c-d.node.BBox.x+8;f.attr("width",h),c=Math.max(c,d.node.BBox.x+h+2)}}return{totalHeight:o,totalWidth:c}},"drawTree"),xe=p(async(r,e,t,i)=>{D.debug(`Rendering treeView diagram `+r);const o=i.db,c=o.getRoot(),n=o.getConfig(),l=q(e);await we(l,c,n,e);const a=l.append("g");a.attr("class","tree-view");const{totalHeight:s,totalWidth:u}=ve(a,c,n,e);l.attr("viewBox",`-${n.lineThickness/2} 0 ${u} ${s}`),U(l,s,u,n.useMaxWidth)},"draw"),be={draw:xe},Ce=be,ye={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},Ie=p(({treeView:r})=>{const{labelFontSize:e,labelColor:t,lineColor:i,iconColor:o,descriptionColor:c,highlightBg:n,highlightStroke:l}=A(ye,r);return` diff --git a/veadk/webui/assets/visualizations/mermaid/diagram-B4RE2ZJO-D-dGX5fr.js b/veadk/webui/assets/visualizations/mermaid/diagram-B4RE2ZJO-C-VEU8cy.js similarity index 97% rename from veadk/webui/assets/visualizations/mermaid/diagram-B4RE2ZJO-D-dGX5fr.js rename to veadk/webui/assets/visualizations/mermaid/diagram-B4RE2ZJO-C-VEU8cy.js index d0b1286d3..be879369e 100644 --- a/veadk/webui/assets/visualizations/mermaid/diagram-B4RE2ZJO-D-dGX5fr.js +++ b/veadk/webui/assets/visualizations/mermaid/diagram-B4RE2ZJO-C-VEU8cy.js @@ -1,3 +1,3 @@ -import{p as oe}from"./chunk-JWPE2WC7-BHkERHFx.js";import{$ as se,aT as de,aQ as le,V as ce,W as me,aR as ue,a as o,at as g,Y as T,aX as xe,s as fe,r as ge,X as E,O as he,aN as P,bb as S,o as pe}from"./mermaid.core-BmHujEI0.js";import{p as be,i as ve}from"./cynefin-OW5HDTMX-DjTRskiD.js";import{aG as we}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var N="position frame",D="frame positioned",M="position relation",C="relation positioned",ye=o(function(e){g.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){O(),fe()},"clear");function O(){R={}}o(O,"reset");var ke=he.eventmodeling,Me=o(()=>ge({...ke,...E().eventmodeling}),"getConfig"),R={};function W(){let e=Be;const{ast:n}=R,t=A();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=w(e,{$kind:N,index:a,frame:i,textProps:r});let d;Q(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=w(e,{$kind:M,index:a,frame:i,sourceFrame:l})})):e=w(e,{$kind:M,index:a,frame:i})}),e={...e,sortedSwimlanesArray:$(e.swimlanes)},e}o(W,"getState");function I(e){R.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:450-2*10,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}o(A,"getDiagramProps");var Be={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function H(e){const n=e.split(".");if(n.length===2)return n[0]}o(H,"extractNamespace");function U(e){const n=e.split(".");return n.length===2?n[1]:e}o(U,"extractName");function V(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(V,"findSwimlaneByNamespace");function v(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(v,"findNextAvailableIndex");function X(e,n){const t=H(e.entityIdentifier),i=V(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:v(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:v(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:v(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(X,"calculateSwimlaneProps");function _(e){const{themeVariables:n}=E();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(_,"calculateEntityVisualProps");function G(e,n,t){const i=E(),a=P(U(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${S(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(y=>{var b;return y.name===((b=e.dataReference)==null?void 0:b.$refText)});p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ +import{p as oe}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{$ as se,aT as de,aQ as le,V as ce,W as me,aR as ue,a as o,at as g,Y as T,aX as xe,s as fe,r as ge,X as E,O as he,aN as P,bb as S,o as pe}from"./mermaid.core-l-gs7P2Q.js";import{p as be,i as ve}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import{aG as we}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var N="position frame",D="frame positioned",M="position relation",C="relation positioned",ye=o(function(e){g.debug("options str",e)},"setOptions"),Pe=o(function(){return{}},"getOptions"),Se=o(function(){O(),fe()},"clear");function O(){R={}}o(O,"reset");var ke=he.eventmodeling,Me=o(()=>ge({...ke,...E().eventmodeling}),"getConfig"),R={};function W(){let e=Be;const{ast:n}=R,t=A();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=w(e,{$kind:N,index:a,frame:i,textProps:r});let d;Q(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=w(e,{$kind:M,index:a,frame:i,sourceFrame:l})})):e=w(e,{$kind:M,index:a,frame:i})}),e={...e,sortedSwimlanesArray:$(e.swimlanes)},e}o(W,"getState");function I(e){R.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:450-2*10,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function A(){return s}o(A,"getDiagramProps");var Be={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function H(e){const n=e.split(".");if(n.length===2)return n[0]}o(H,"extractNamespace");function U(e){const n=e.split(".");return n.length===2?n[1]:e}o(U,"extractName");function V(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(V,"findSwimlaneByNamespace");function v(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&aNumber.parseInt(i)))+1}o(v,"findNextAvailableIndex");function X(e,n){const t=H(e.entityIdentifier),i=V(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:v(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:v(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};case"evt":case"event":default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:v(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(X,"calculateSwimlaneProps");function _(e){const{themeVariables:n}=E();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(_,"calculateEntityVisualProps");function G(e,n,t){const i=E(),a=P(U(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"
"};let c=`${S(a,t.textMaxWidth,d)}`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(y=>{var b;return y.name===((b=e.dataReference)==null?void 0:b.$refText)});p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{ `)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=P(r,i),r=S(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="
")}const m=r!==void 0;m&&(c+=`

${r}`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=pe(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function L(e,n){const t=n,i=_(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:D,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(L,"decidePositionFrame");function Y(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(Y,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function $(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o($,"sortedSwimlanesArray");function z(e,n){const t=n,i=X(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=Y(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=$(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p0}o(Q,"hasSourceFrame");function B(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(B,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(ve(t.frame)||K(t.index,t.frame))return[];const i=B(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=B(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:C,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Z(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Z,"evolveRelationPositioned");var Fe={[N]:L,[M]:J},Ee={[D]:z,[C]:Z};function ee(e,n){const t=Fe[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(ee,"decide");function te(e,n){const t=n.reduce((i,a)=>{const r=Ee[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(te,"evolve");function w(e,n){const t=ee(e,n);return te(e,t)}o(w,"dispatch");var F={getConfig:Me,setOptions:ye,getOptions:Pe,clear:Se,setAccTitle:ue,getAccTitle:me,getAccDescription:ce,setAccDescription:le,setDiagramTitle:de,getDiagramTitle:se,setAst:I,getDiagramProps:A,getState:W},Re={parse:o(async e=>{const n=await be("eventmodeling",e);g.debug(n),F.setAst(n),oe(n,F)},"parse")},k=T(),Ae=k==null?void 0:k.eventmodeling;function ne(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.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(t.text)}}o(ne,"renderD3Box");function ie(e,n){return e>n}o(ie,"dirUpwards");function ae(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ie(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ae,"renderD3Relation");function re(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(re,"renderD3Swimlane");var $e=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+` `,"id:",n,t),!Ae)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=T(),l=we(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(re(l,m.maxR,c,r)),m.boxes.forEach(ne(l,c)),m.relations.forEach(ae(l,c,x,r)),l.append("defs").append("marker").attr("id",x).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",u),xe(void 0,l,(d==null?void 0:d.padding)??30,d==null?void 0:d.useMaxWidth)},"draw"),Te={draw:$e},Ne=o(e=>"","getStyles"),De=Ne,Ue={parser:Re,db:F,renderer:Te,styles:De};export{Ue as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/diagram-LBJQPF4R-D7NktxbC.js b/veadk/webui/assets/visualizations/mermaid/diagram-LBJQPF4R-Cf65bt31.js similarity index 94% rename from veadk/webui/assets/visualizations/mermaid/diagram-LBJQPF4R-D7NktxbC.js rename to veadk/webui/assets/visualizations/mermaid/diagram-LBJQPF4R-Cf65bt31.js index 71d9d1142..4a755fd3e 100644 --- a/veadk/webui/assets/visualizations/mermaid/diagram-LBJQPF4R-D7NktxbC.js +++ b/veadk/webui/assets/visualizations/mermaid/diagram-LBJQPF4R-Cf65bt31.js @@ -1,4 +1,4 @@ -import{p as B}from"./chunk-JWPE2WC7-BHkERHFx.js";import{a as b,r as m,aP as C,B as S,at as w,aR as T,W as D,aT as P,$ as z,V as E,aQ as F,X as A,O as W,s as _}from"./mermaid.core-BmHujEI0.js";import{p as N}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=T,this.getAccTitle=D,this.setDiagramTitle=P,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=F}getConfig(){const t=m({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,O=b((e,t)=>{B(e,t);let s=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i{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*s)return[e,void 0];const r=t*s-1,n=t*s;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),s=(r=x.parser)==null?void 0:r.yy;if(!(s instanceof v))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.");w.debug(t),O(t,s)},"parse")},I=b((e,t,s,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())R(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),R=b((e,t,s,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=s*(r+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),X={draw:I},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:e}={})=>{const t=m(j,e);return` +import{p as B}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a as b,r as m,aP as C,B as S,at as w,aR as T,W as D,aT as P,$ as z,V as E,aQ as F,X as A,O as W,s as _}from"./mermaid.core-l-gs7P2Q.js";import{p as N}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var L=W.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=T,this.getAccTitle=D,this.setDiagramTitle=P,this.getDiagramTitle=z,this.getAccDescription=E,this.setAccDescription=F}getConfig(){const t=m({...L,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){_(),this.packet=[]}},b(u,"PacketDB"),u),M=1e4,O=b((e,t)=>{B(e,t);let s=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i{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*s)return[e,void 0];const r=t*s-1,n=t*s;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),s=(r=x.parser)==null?void 0:r.yy;if(!(s instanceof v))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.");w.debug(t),O(t,s)},"parse")},I=b((e,t,s,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=C(t);f.attr("viewBox",`0 0 ${k} ${g}`),S(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())R(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),R=b((e,t,s,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=s*(r+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),X={draw:I},j={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=b(({packet:e}={})=>{const t=m(j,e);return` .packetByte { font-size: ${t.byteFontSize}; } diff --git a/veadk/webui/assets/visualizations/mermaid/diagram-Q27KOJAE-6zI0fV8V.js b/veadk/webui/assets/visualizations/mermaid/diagram-Q27KOJAE-DGFV5XF3.js similarity index 98% rename from veadk/webui/assets/visualizations/mermaid/diagram-Q27KOJAE-6zI0fV8V.js rename to veadk/webui/assets/visualizations/mermaid/diagram-Q27KOJAE-DGFV5XF3.js index 0f3974a5c..7500f6450 100644 --- a/veadk/webui/assets/visualizations/mermaid/diagram-Q27KOJAE-6zI0fV8V.js +++ b/veadk/webui/assets/visualizations/mermaid/diagram-Q27KOJAE-DGFV5XF3.js @@ -1,4 +1,4 @@ -import{p as ge}from"./chunk-JWPE2WC7-BHkERHFx.js";import{a as w,a8 as ye,X as ae,r as ee,aP as Se,B as ve,at as te,a$ as B,aR as xe,W as be,aT as we,$ as Ce,V as Te,aQ as $e,O as Le,al as Ae,s as Fe}from"./mermaid.core-BmHujEI0.js";import{s as Ne}from"./chunk-KBJHAD2P-fr6wew8I.js";import{p as Me}from"./cynefin-OW5HDTMX-DjTRskiD.js";import{aG as Q}from"../../app/index-B71Wq9_t.js";import{f as O}from"../../chunks/defaultLocale-CrowFXzY.js";import{o as K}from"../../chunks/ordinal-Cboi1Yqb.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function Ve(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function ze(t,a){for(var l=this,n=[l],r,s,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function De(t,a){for(var l=this,n=[l],r=[],s,h,d,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(h=0,d=s.length;h=0;)l+=n[r].value;a.value=l})}function Re(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function We(t){for(var a=this,l=Ee(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Ee(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Xe(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r=0;--d)r.push(s=h[d]=new U(h[d])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ue)}function qe(){return ne(this).eachBefore(Qe)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ue(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=ne.prototype={constructor:U,count:ke,each:Ve,eachAfter:De,eachBefore:ze,find:Pe,sum:Be,sort:Re,path:We,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:qe,[Symbol.iterator]:Xe};function Ze(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function X(t){return function(){return t}}function Je(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ke(t,a,l,n,r){for(var s=t.children,h,d=-1,g=s.length,c=t.value&&(n-a)/t.value;++dM&&(M=c),_=p*p*E,A=Math.max(M/_,_/y),A>z){p-=c;break}z=A}h.push(g={value:p,dice:x1?n:1)},l}(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],s=G,h=G,d=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Je),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,y=i.y1-x;p{Ae(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(W,"TreeMapDB"),W);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const h=s.item;if(!h)continue;const d=s.indent?parseInt(s.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],u=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(b)}const n=ce(l),r=w((s,h)=>{for(const d of s)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Me("treemap",t);te.debug("Treemap AST:",n);const r=(a=he.parser)==null?void 0:a.yy;if(!(r instanceof oe))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.");rt(n,r)}catch(l){throw te.error("Error parsing treemap:",l),l}},"parse")},it=10,R=10,q=25,ot=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),h=s.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const u=d?30:0,b=Se(a),i=s.nodeWidth?s.nodeWidth*R:960,x=s.nodeHeight?s.nodeHeight*R:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),A=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),E=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?q+R:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?R:0).paddingRight(e=>e.children&&e.children.length>0?R:0).paddingBottom(e=>e.children&&e.children.length>0?R:0).round(!0)(E),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=z.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",q),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=Q(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,$=6;let T;s.showValues!==!1&&e.value?T=C-10-30-10-$:T=C-$-6;const m=Math.max(15,T),k=o.node();if(k.getComputedTextLength()>m){const L="...";let V=f;for(;V.length>0;){if(V=f.substring(0,V.length-1),V.length===0){o.text(L),k.getComputedTextLength()>m&&o.text("");break}if(o.text(V+L),k.getComputedTextLength()<=m)break}}}),s.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),F=re.length>20,ue=F?16:38,Y=F?14:28,D=F?4:8,I=F?4:6,Z=F?2:4,se=F?8:10,J=F?1:2,j=z.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:`+A(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=Q(this),f=e.x1-e.x0,C=e.y1-e.y0,$=o.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,o.style("font-size",`${m}px`);let N=Math.max(I,Math.min(Y,Math.round(m*k))),L=m+J+N;for(;L>P&&m>D&&(m--,N=Math.max(I,Math.min(Y,Math.round(m*k))),!(NT||m(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:`+A(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=Q(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=Q(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const T=parseFloat($.style("font-size")),m=Math.max(I,Math.min(Y,Math.round(T*.6)));f.style("font-size",`${m}px`);const N=(o.y1-o.y0)/2+T/2+J;f.attr("y",N);const L=o.x1-o.x0,ie=o.y1-o.y0-4,me=L-2*Z;f.node().getComputedTextLength()>me||N+m>ie||m{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),s=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return` +import{p as ge}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a as w,a8 as ye,X as ae,r as ee,aP as Se,B as ve,at as te,a$ as B,aR as xe,W as be,aT as we,$ as Ce,V as Te,aQ as $e,O as Le,al as Ae,s as Fe}from"./mermaid.core-l-gs7P2Q.js";import{s as Ne}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{p as Me}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import{aG as Q}from"../../app/index-BKQXvMzA.js";import{f as O}from"../../chunks/defaultLocale-CrowFXzY.js";import{o as K}from"../../chunks/ordinal-Cboi1Yqb.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";function _e(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ke(){return this.eachAfter(_e)}function Ve(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function ze(t,a){for(var l=this,n=[l],r,s,h=-1;l=n.pop();)if(t.call(a,l,++h,this),r=l.children)for(s=r.length-1;s>=0;--s)n.push(r[s]);return this}function De(t,a){for(var l=this,n=[l],r=[],s,h,d,g=-1;l=n.pop();)if(r.push(l),s=l.children)for(h=0,d=s.length;h=0;)l+=n[r].value;a.value=l})}function Re(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function We(t){for(var a=this,l=Ee(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Ee(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function He(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function Ie(){return Array.from(this)}function Oe(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function Ge(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Xe(){var t=this,a,l=[t],n,r,s;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,s=n.length;r=0;--d)r.push(s=h[d]=new U(h[d])),s.parent=n,s.depth=n.depth+1;return l.eachBefore(Ue)}function qe(){return ne(this).eachBefore(Qe)}function Ye(t){return t.children}function je(t){return Array.isArray(t)?t[1]:null}function Qe(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ue(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function U(t){this.data=t,this.depth=this.height=0,this.parent=null}U.prototype=ne.prototype={constructor:U,count:ke,each:Ve,eachAfter:De,eachBefore:ze,find:Pe,sum:Be,sort:Re,path:We,ancestors:He,descendants:Ie,leaves:Oe,links:Ge,copy:qe,[Symbol.iterator]:Xe};function Ze(t){if(typeof t!="function")throw new Error;return t}function G(){return 0}function X(t){return function(){return t}}function Je(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Ke(t,a,l,n,r){for(var s=t.children,h,d=-1,g=s.length,c=t.value&&(n-a)/t.value;++dM&&(M=c),_=p*p*E,A=Math.max(M/_,_/y),A>z){p-=c;break}z=A}h.push(g={value:p,dice:x1?n:1)},l}(tt);function lt(){var t=nt,a=!1,l=1,n=1,r=[0],s=G,h=G,d=G,g=G,c=G;function u(i){return i.x0=i.y0=0,i.x1=l,i.y1=n,i.eachBefore(b),r=[0],a&&i.eachBefore(Je),i}function b(i){var x=r[i.depth],S=i.x0+x,v=i.y0+x,p=i.x1-x,y=i.y1-x;p{Ae(s)&&(n!=null&&n.textStyles?n.textStyles.push(s):n.textStyles=[s]),n!=null&&n.styles?n.styles.push(s):n.styles=[s]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){var l;return((l=this.classes.get(a))==null?void 0:l.styles)??[]}clear(){Fe(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},w(W,"TreeMapDB"),W);function ce(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n==null?void 0:n.classSelector,n!=null&&n.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const s=l[l.length-1].node;s.children?s.children.push(r):s.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}w(ce,"buildHierarchy");var rt=w((t,a)=>{ge(t,a);const l=[];for(const s of t.TreemapRows??[])s.$type==="ClassDefStatement"&&a.addClass(s.className??"",s.styleText??"");for(const s of t.TreemapRows??[]){const h=s.item;if(!h)continue;const d=s.indent?parseInt(s.indent):0,g=st(h),c=h.classSelector?a.getStylesForClass(h.classSelector):[],u=c.length>0?c:void 0,b={level:d,name:g,type:h.$type,value:h.value,classSelector:h.classSelector,cssCompiledStyles:u};l.push(b)}const n=ce(l),r=w((s,h)=>{for(const d of s)a.addNode(d,h),d.children&&d.children.length>0&&r(d.children,h+1)},"addNodesRecursively");r(n,0)},"populate"),st=w(t=>t.name?String(t.name):"","getItemName"),he={parser:{yy:void 0},parse:w(async t=>{var a;try{const n=await Me("treemap",t);te.debug("Treemap AST:",n);const r=(a=he.parser)==null?void 0:a.yy;if(!(r instanceof oe))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.");rt(n,r)}catch(l){throw te.error("Error parsing treemap:",l),l}},"parse")},it=10,R=10,q=25,ot=w((t,a,l,n)=>{const r=n.db,s=r.getConfig(),h=s.padding??it,d=r.getDiagramTitle(),g=r.getRoot(),{themeVariables:c}=ae();if(!g)return;const u=d?30:0,b=Se(a),i=s.nodeWidth?s.nodeWidth*R:960,x=s.nodeHeight?s.nodeHeight*R:500,S=i,v=x+u;b.attr("viewBox",`0 0 ${S} ${v}`),ve(b,v,S,s.useMaxWidth);let p;try{const e=s.valueFormat||",";if(e==="$0,0")p=w(o=>"$"+O(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),f=o?o[0]:"";p=w(C=>"$"+O(","+f)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);p=w(f=>"$"+O(o||"")(f),"valueFormat")}else p=O(e)}catch(e){te.error("Error creating format function:",e),p=O(",")}const y=K().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),M=K().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),A=K().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);d&&b.append("text").attr("x",S/2).attr("y",u/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(d);const z=b.append("g").attr("transform",`translate(0, ${u})`).attr("class","treemapContainer"),E=ne(g).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),le=lt().size([i,x]).paddingTop(e=>e.children&&e.children.length>0?q+R:0).paddingInner(h).paddingLeft(e=>e.children&&e.children.length>0?R:0).paddingRight(e=>e.children&&e.children.length>0?R:0).paddingBottom(e=>e.children&&e.children.length>0?R:0).round(!0)(E),de=le.descendants().filter(e=>e.children&&e.children.length>0),H=z.selectAll(".treemapSection").data(de).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",q).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),H.append("clipPath").attr("id",(e,o)=>`clip-section-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",q),H.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,o)=>`treemapSection section${o}`).attr("fill",e=>y(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>M(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=B({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),H.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",q/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,o)=>`url(#clip-section-${a}-${o})`).attr("style",e=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=Q(this),f=e.data.name;o.text(f);const C=e.x1-e.x0,$=6;let T;s.showValues!==!1&&e.value?T=C-10-30-10-$:T=C-$-6;const m=Math.max(15,T),k=o.node();if(k.getComputedTextLength()>m){const L="...";let V=f;for(;V.length>0;){if(V=f.substring(0,V.length-1),V.length===0){o.text(L),k.getComputedTextLength()>m&&o.text("");break}if(o.text(V+L),k.getComputedTextLength()<=m)break}}}),s.showValues!==!1&&H.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",q/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?p(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+A(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")});const re=le.leaves(),F=re.length>20,ue=F?16:38,Y=F?14:28,D=F?4:8,I=F?4:6,Z=F?2:4,se=F?8:10,J=F?1:2,j=z.selectAll(".treemapLeafGroup").data(re).enter().append("g").attr("class",(e,o)=>`treemapNode treemapLeafGroup leaf${o}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);j.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("style",e=>B({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?y(e.parent.data.name):y(e.data.name)).attr("stroke-width",3),j.append("clipPath").attr("id",(e,o)=>`clip-${a}-${o}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),j.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:`+A(e.data.name)+";",f=B({cssCompiledStyles:e.data.cssCompiledStyles});return o+f.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=Q(this),f=e.x1-e.x0,C=e.y1-e.y0,$=o.node(),T=f-2*Z,P=C-2*Z;if(TT&&m>D;)m--,o.style("font-size",`${m}px`);let N=Math.max(I,Math.min(Y,Math.round(m*k))),L=m+J+N;for(;L>P&&m>D&&(m--,N=Math.max(I,Math.min(Y,Math.round(m*k))),!(NT||m(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const f=`text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:`+A(o.data.name)+";",C=B({cssCompiledStyles:o.data.cssCompiledStyles});return f+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,f)=>`url(#clip-${a}-${f})`).text(o=>o.value?p(o.value):"").each(function(o){const f=Q(this),C=this.parentNode;if(!C){f.style("display","none");return}const $=Q(C).select(".treemapLabel");if($.empty()||$.style("display")==="none"){f.style("display","none");return}const T=parseFloat($.style("font-size")),m=Math.max(I,Math.min(Y,Math.round(T*.6)));f.style("font-size",`${m}px`);const N=(o.y1-o.y0)/2+T/2+J;f.attr("y",N);const L=o.x1-o.x0,ie=o.y1-o.y0-4,me=L-2*Z;f.node().getComputedTextLength()>me||N+m>ie||m{const a=ye(),l=ae(),n=ee(a,l.themeVariables),r=ee(dt,t),s=r.titleColor??n.titleColor,h=r.labelColor??n.textColor,d=r.valueColor??n.textColor;return` .treemapNode.section { stroke: ${r.sectionStrokeColor}; stroke-width: ${r.sectionStrokeWidth}; diff --git a/veadk/webui/assets/visualizations/mermaid/diagram-UB23O5K3-CRpFtaV-.js b/veadk/webui/assets/visualizations/mermaid/diagram-UB23O5K3-XFaYvyOH.js similarity index 95% rename from veadk/webui/assets/visualizations/mermaid/diagram-UB23O5K3-CRpFtaV-.js rename to veadk/webui/assets/visualizations/mermaid/diagram-UB23O5K3-XFaYvyOH.js index 4288ef4fe..bed4c332f 100644 --- a/veadk/webui/assets/visualizations/mermaid/diagram-UB23O5K3-CRpFtaV-.js +++ b/veadk/webui/assets/visualizations/mermaid/diagram-UB23O5K3-XFaYvyOH.js @@ -1,4 +1,4 @@ -import{p as I}from"./chunk-JWPE2WC7-BHkERHFx.js";import{aQ as _,V as E,$ as F,aT as D,W as P,aR as z,a as c,aP as G,s as B,r as w,X as C,O as W,at as b,a8 as V,B as H}from"./mermaid.core-BmHujEI0.js";import{p as X}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var x={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"},y=32,A={axes:[],curves:[],options:x},m=structuredClone(A),j=W.radar,U=c(()=>w({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),K=c(()=>m.curves,"getCurves"),N=c(()=>m.options,"getOptions"),Q=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var n;return((n=s.axis)==null?void 0:n.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),q=c(a=>{var e,r,s,n,l;const t=a.reduce((o,i)=>(o[i.name]=i,o),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??x.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??x.ticks,max:((s=t.max)==null?void 0:s.value)??x.max,min:((n=t.min)==null?void 0:n.value)??x.min,graticule:((l=t.graticule)==null?void 0:l.value)??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),J=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:K,getOptions:N,setAxes:Q,setCurves:Y,setOptions:q,getConfig:U,clear:J,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,n=s.getAxes(),l=s.getCurves(),o=s.getOptions(),i=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,i),g=o.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=o.min,v=Math.min(i.width,i.height)/2;st(u,n,v,o.ticks,o.graticule),nt(u,n,v,i),L(u,n,l,h,g,o.graticule,i),k(u,l,o.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let n=0;n{const u=2*p*Math.PI/n-Math.PI/2,g=o*Math.cos(u),h=o*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let n=0;n.01?"start":i<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*i+g*i).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,n,l){const o=t.length,i=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==o)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/o-Math.PI/2,f=T(g,r,s,i),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});n==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):n==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${n+i*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;rw({...j,...C().radar}),"getConfig"),M=c(()=>m.axes,"getAxes"),K=c(()=>m.curves,"getCurves"),N=c(()=>m.options,"getOptions"),Q=c(a=>{m.axes=a.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),Y=c(a=>{m.curves=a.map(t=>({name:t.name,label:t.label??t.name,entries:Z(t.entries)}))},"setCurves"),Z=c(a=>{if(a[0].axis==null)return a.map(e=>e.value);const t=M();if(t.length===0)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{const r=a.find(s=>{var n;return((n=s.axis)==null?void 0:n.$refText)===e.name});if(r===void 0)throw new Error("Missing entry for axis "+e.label);return r.value})},"computeCurveEntries"),q=c(a=>{var e,r,s,n,l;const t=a.reduce((o,i)=>(o[i.name]=i,o),{});m.options={showLegend:((e=t.showLegend)==null?void 0:e.value)??x.showLegend,ticks:((r=t.ticks)==null?void 0:r.value)??x.ticks,max:((s=t.max)==null?void 0:s.value)??x.max,min:((n=t.min)==null?void 0:n.value)??x.min,graticule:((l=t.graticule)==null?void 0:l.value)??x.graticule},m.options.ticks>y&&(b.warn(`Radar diagram ticks (${m.options.ticks}) exceeds maximum allowed (${y}). Using ${y} instead.`),m.options.ticks=y)},"setOptions"),J=c(()=>{B(),m=structuredClone(A)},"clear"),$={getAxes:M,getCurves:K,getOptions:N,setAxes:Q,setCurves:Y,setOptions:q,getConfig:U,clear:J,setAccTitle:z,getAccTitle:P,setDiagramTitle:D,getDiagramTitle:F,getAccDescription:E,setAccDescription:_},tt=c(a=>{I(a,$);const{axes:t,curves:e,options:r}=a;$.setAxes(t),$.setCurves(e),$.setOptions(r)},"populate"),et={parse:c(async a=>{const t=await X("radar",a);b.debug(t),tt(t)},"parse")},at=c((a,t,e,r)=>{const s=r.db,n=s.getAxes(),l=s.getCurves(),o=s.getOptions(),i=s.getConfig(),d=s.getDiagramTitle(),p=G(t),u=rt(p,i),g=o.max??Math.max(...l.map(f=>Math.max(...f.entries))),h=o.min,v=Math.min(i.width,i.height)/2;st(u,n,v,o.ticks,o.graticule),nt(u,n,v,i),L(u,n,l,h,g,o.graticule,i),k(u,l,o.showLegend,i),u.append("text").attr("class","radarTitle").text(d).attr("x",0).attr("y",-i.height/2-i.marginTop)},"draw"),rt=c((a,t)=>{const e=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,s={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return H(a,r,e,t.useMaxWidth??!0),a.attr("viewBox",`0 0 ${e} ${r}`).attr("overflow","visible"),a.append("g").attr("transform",`translate(${s.x}, ${s.y})`)},"drawFrame"),st=c((a,t,e,r,s)=>{if(s==="circle")for(let n=0;n{const u=2*p*Math.PI/n-Math.PI/2,g=o*Math.cos(u),h=o*Math.sin(u);return`${g},${h}`}).join(" ");a.append("polygon").attr("points",i).attr("class","radarGraticule")}}},"drawGraticule"),nt=c((a,t,e,r)=>{const s=t.length;for(let n=0;n.01?"start":i<-.01?"end":"middle",u=d>.01?"hanging":d<-.01?"auto":"central",g=4;a.append("text").text(l).attr("x",e*r.axisLabelFactor*i+g*i).attr("y",e*r.axisLabelFactor*d+g*d).attr("text-anchor",p).attr("dominant-baseline",u).attr("class","radarAxisLabel")}},"drawAxes");function L(a,t,e,r,s,n,l){const o=t.length,i=Math.min(l.width,l.height)/2;e.forEach((d,p)=>{if(d.entries.length!==o)return;const u=d.entries.map((g,h)=>{const v=2*Math.PI*h/o-Math.PI/2,f=T(g,r,s,i),O=f*Math.cos(v),R=f*Math.sin(v);return{x:O,y:R}});n==="circle"?a.append("path").attr("d",S(u,l.curveTension)).attr("class",`radarCurve-${p}`):n==="polygon"&&a.append("polygon").attr("points",u.map(g=>`${g.x},${g.y}`).join(" ")).attr("class",`radarCurve-${p}`)})}c(L,"drawCurves");function T(a,t,e,r){const s=Math.min(Math.max(a,t),e);return r*(s-t)/(e-t)}c(T,"relativeRadius");function S(a,t){const e=a.length;let r=`M${a[0].x},${a[0].y}`;for(let s=0;s{const d=a.append("g").attr("transform",`translate(${s}, ${n+i*l})`);d.append("rect").attr("width",12).attr("height",12).attr("class",`radarLegendBox-${i}`),d.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(o.label)})}c(k,"drawLegend");var ot={draw:at},it=c((a,t)=>{let e="";for(let r=0;r{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(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 s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$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:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:l,styles:m};export{S as diagram}; +import{g as m,r as l,d as n}from"./chunk-6Q2QTUOP-CKQiwqPP.js";import{p}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a as t,at as o}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../chunks/purify.es-BnINGy_Y.js";var c=f().RailroadEbnf.parser.LangiumParser,s=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(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 s(e.element);case"EbnfOptional":return{type:"optional",element:s(e.element)};case"EbnfRepetition":return{type:"repetition",element:s(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$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:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:s(e.definition)}),"transformRule"),v=t(e=>{p(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),o.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;o.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),o.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},S={parser:g,db:n,renderer:l,styles:m};export{S as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/erDiagram-JOGREHBK-12XpgwsP.js b/veadk/webui/assets/visualizations/mermaid/erDiagram-JOGREHBK-CzTFZT70.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/erDiagram-JOGREHBK-12XpgwsP.js rename to veadk/webui/assets/visualizations/mermaid/erDiagram-JOGREHBK-CzTFZT70.js index 891451e63..9e37a48c7 100644 --- a/veadk/webui/assets/visualizations/mermaid/erDiagram-JOGREHBK-12XpgwsP.js +++ b/veadk/webui/assets/visualizations/mermaid/erDiagram-JOGREHBK-CzTFZT70.js @@ -1,4 +1,4 @@ -import{g as Bt}from"./chunk-XXDRQBXY-CLLbPKnJ.js";import{s as Ft}from"./chunk-KBJHAD2P-fr6wew8I.js";import{a as p,aR as Yt,W as Pt,aQ as zt,V as Gt,aT as Kt,$ as Ut,Y as rt,at as V,s as Zt,a0 as jt,aM as Wt,_ as Qt,a4 as Xt,aK as qt,b9 as Ht}from"./mermaid.core-BmHujEI0.js";import{aG as Jt}from"../../app/index-B71Wq9_t.js";import{c as $t}from"../../chunks/channel-BdZyURAQ.js";import"../../chunks/purify.es-BnINGy_Y.js";var gt=function(){var s=p(function(R,n,a,l){for(a=a||{},l=R.length;l--;a[R[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],y=[1,23],d=[1,24],m=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],I=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,71,72],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],bt=[66,67,68,69,70],kt=[1,85],mt=[1,84],Et=[1,82],Tt=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],Z=[19,58],Ot=[1,102],Nt=[1,101],ut=[19,58,61,63],dt={trace:p(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,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType: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:73,$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",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"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],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 68:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 80:case 81:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 67:case 70:this.$=t[e];break;case 66:this.$=t[e-1]+t[e];break;case 69:t[e-2].push(t[e]),this.$=t[e-2];break;case 71:this.$=t[e].replace(/"/g,"");break;case 72:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:m,36:W,37:Q,40:T,43:X,44:B,48:D,50:I,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:m,36:W,37:Q,40:T,43:X,44:B,48:D,50:I,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:at,67:ct,68:ot,69:lt,70:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:I,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:I,51:S,52:x},{65:57,71:[1,58],72:[1,59]},s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(P,[2,77]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(q,[2,37]),s(q,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:at,67:ct,68:ot,69:lt,70:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:at,67:ct,68:ot,69:lt,70:ht},s(bt,[2,78]),s(bt,[2,79]),{6:kt,10:mt,39:81,42:Et,47:Tt},{40:[1,86],41:[1,87]},s(St,[2,43],{46:88,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:kt,10:mt,39:89,42:Et,47:Tt},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:T,48:D,50:I,51:S,52:x},{18:96,19:[1,97],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:98,57:99,60:100,62:Ot,63:Nt}),s([19,58,62,63],[2,67]),{58:[2,66]},s(i,[2,22],{15:[1,104],17:[1,103]}),s([40,48,50,51,52],[2,72]),s(i,[2,36]),{13:z,41:G,45:105,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(q,[2,39]),s(q,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,80]),s(i,[2,81]),s(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},s(i,[2,15]),s(Z,[2,62],{57:110,61:[1,111],63:Nt}),s(Z,[2,63]),s(ut,[2,68]),s(Z,[2,71]),s(ut,[2,70]),{18:112,19:[1,113],53:53,54:54,58:Y},{16:114,40:O,41:N},s(St,[2,44],{46:88,13:z,41:G,48:K,49:U}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},s(i,[2,13]),s(Z,[2,64]),{60:118,62:Ot},{19:[1,119]},s(i,[2,20]),s(i,[2,23],{17:[1,120],42:A}),s(i,[2,11]),{13:[1,121],42:A},s(i,[2,10]),s(ut,[2,69]),s(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:Y},{14:124,40:H,50:J,73:$},{19:[1,125]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,Rt=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,f.length=f.length-b,t.length=t.length-b}p(Mt,"popStack");function It(){var b;return b=r.pop()||_.lex()||Rt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(It,"lex");for(var g,v,k,yt,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=j[v]&&j[v][g]),typeof k>"u"||!k.length||!k[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`: +import{g as Bt}from"./chunk-XXDRQBXY-B5A5gE3j.js";import{s as Ft}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{a as p,aR as Yt,W as Pt,aQ as zt,V as Gt,aT as Kt,$ as Ut,Y as rt,at as V,s as Zt,a0 as jt,aM as Wt,_ as Qt,a4 as Xt,aK as qt,b9 as Ht}from"./mermaid.core-l-gs7P2Q.js";import{aG as Jt}from"../../app/index-BKQXvMzA.js";import{c as $t}from"../../chunks/channel-B_2bNWok.js";import"../../chunks/purify.es-BnINGy_Y.js";var gt=function(){var s=p(function(R,n,a,l){for(a=a||{},l=R.length;l--;a[R[l]]=n);return a},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],o=[1,10],h=[1,11],c=[1,12],u=[1,13],y=[1,23],d=[1,24],m=[1,25],W=[1,26],Q=[1,27],T=[1,19],X=[1,28],B=[1,29],D=[1,20],I=[1,18],S=[1,21],x=[1,22],at=[1,36],ct=[1,37],ot=[1,38],lt=[1,39],ht=[1,40],F=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,66,67,68,69,70],O=[1,45],N=[1,46],Y=[1,55],P=[40,48,50,51,52,71,72],z=[1,66],G=[1,64],A=[1,61],K=[1,65],U=[1,67],q=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,66,67,68,69,70],bt=[66,67,68,69,70],kt=[1,85],mt=[1,84],Et=[1,82],Tt=[1,83],St=[6,10,42,47],L=[6,10,13,41,42,47,48,49],H=[1,93],J=[1,92],$=[1,91],Z=[19,58],Ot=[1,102],Nt=[1,101],ut=[19,58,61,63],dt={trace:p(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,"?":59,attributeKeyType:60,",":61,ATTRIBUTE_KEY:62,COMMENT:63,cardinality:64,relType: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:73,$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",59:"?",61:",",62:"ATTRIBUTE_KEY",63:"COMMENT",66:"ZERO_OR_ONE",67:"ZERO_OR_MORE",68:"ONE_OR_MORE",69:"ONLY_ONE",70:"MD_PARENT",71:"NON_IDENTIFYING",72:"IDENTIFYING",73:"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],[54,2],[55,1],[56,1],[56,3],[60,1],[57,1],[12,3],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,1],[14,1],[14,1],[14,1]],performAction:p(function(n,a,l,r,f,t,j){var e=t.length-1;switch(f){case 1:break;case 2:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:this.$=t[e];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(t[e-4]),r.addEntity(t[e-2]),r.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:r.addEntity(t[e-8]),r.addEntity(t[e-4]),r.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),r.setClass([t[e-8]],t[e-6]),r.setClass([t[e-4]],t[e-2]);break;case 10:r.addEntity(t[e-6]),r.addEntity(t[e-2]),r.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),r.setClass([t[e-6]],t[e-4]);break;case 11:r.addEntity(t[e-6]),r.addEntity(t[e-4]),r.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),r.setClass([t[e-4]],t[e-2]);break;case 12:r.addEntity(t[e-3]),r.addAttributes(t[e-3],t[e-1]);break;case 13:r.addEntity(t[e-5]),r.addAttributes(t[e-5],t[e-1]),r.setClass([t[e-5]],t[e-3]);break;case 14:r.addEntity(t[e-2]);break;case 15:r.addEntity(t[e-4]),r.setClass([t[e-4]],t[e-2]);break;case 16:r.addEntity(t[e]);break;case 17:r.addEntity(t[e-2]),r.setClass([t[e-2]],t[e]);break;case 18:r.addEntity(t[e-6],t[e-4]),r.addAttributes(t[e-6],t[e-1]);break;case 19:r.addEntity(t[e-8],t[e-6]),r.addAttributes(t[e-8],t[e-1]),r.setClass([t[e-8]],t[e-3]);break;case 20:r.addEntity(t[e-5],t[e-3]);break;case 21:r.addEntity(t[e-7],t[e-5]),r.setClass([t[e-7]],t[e-2]);break;case 22:r.addEntity(t[e-3],t[e-1]);break;case 23:r.addEntity(t[e-5],t[e-3]),r.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection("TB");break;case 33:r.setDirection("BT");break;case 34:r.setDirection("RL");break;case 35:r.setDirection("LR");break;case 36:this.$=t[e-3],r.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 59:case 68:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],r.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],r.addCssStyles(t[e-2],t[e-1]);break;case 43:this.$=[t[e]];break;case 44:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 80:case 81:this.$=t[e].replace(/"/g,"");break;case 55:case 56:case 57:case 58:case 82:this.$=t[e];break;case 60:t[e].push(t[e-1]),this.$=t[e];break;case 61:this.$={type:t[e-1],name:t[e]};break;case 62:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 63:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 64:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 65:case 67:case 70:this.$=t[e];break;case 66:this.$=t[e-1]+t[e];break;case 69:t[e-2].push(t[e]),this.$=t[e-2];break;case 71:this.$=t[e].replace(/"/g,"");break;case 72:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 73:this.$=r.Cardinality.ZERO_OR_ONE;break;case 74:this.$=r.Cardinality.ZERO_OR_MORE;break;case 75:this.$=r.Cardinality.ONE_OR_MORE;break;case 76:this.$=r.Cardinality.ONLY_ONE;break;case 77:this.$=r.Cardinality.MD_PARENT;break;case 78:this.$=r.Identification.NON_IDENTIFYING;break;case 79:this.$=r.Identification.IDENTIFYING;break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:m,36:W,37:Q,40:T,43:X,44:B,48:D,50:I,51:S,52:x},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:30,11:9,22:o,24:h,26:c,28:u,29:14,30:15,31:16,32:17,33:y,34:d,35:m,36:W,37:Q,40:T,43:X,44:B,48:D,50:I,51:S,52:x},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:31,64:35,15:[1,32],17:[1,33],20:[1,34],66:at,67:ct,68:ot,69:lt,70:ht}),{23:[1,41]},{25:[1,42]},{27:[1,43]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(F,[2,54]),s(F,[2,55]),s(F,[2,56]),s(F,[2,57]),s(F,[2,58]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:44,40:O,41:N},{16:47,40:O,41:N},{16:48,40:O,41:N},s(i,[2,4]),{11:49,40:T,48:D,50:I,51:S,52:x},{16:50,40:O,41:N},{18:51,19:[1,52],53:53,54:54,58:Y},{11:56,40:T,48:D,50:I,51:S,52:x},{65:57,71:[1,58],72:[1,59]},s(P,[2,73]),s(P,[2,74]),s(P,[2,75]),s(P,[2,76]),s(P,[2,77]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:z,38:60,41:G,42:A,45:62,46:63,48:K,49:U},s(q,[2,37]),s(q,[2,38]),{16:68,40:O,41:N,42:A},{13:z,38:69,41:G,42:A,45:62,46:63,48:K,49:U},{13:[1,70],15:[1,71]},s(i,[2,17],{64:35,12:72,17:[1,73],42:A,66:at,67:ct,68:ot,69:lt,70:ht}),{19:[1,74]},s(i,[2,14]),{18:75,19:[2,59],53:53,54:54,58:Y},{55:76,58:[1,77]},{58:[2,65],59:[1,78]},{21:[1,79]},{64:80,66:at,67:ct,68:ot,69:lt,70:ht},s(bt,[2,78]),s(bt,[2,79]),{6:kt,10:mt,39:81,42:Et,47:Tt},{40:[1,86],41:[1,87]},s(St,[2,43],{46:88,13:z,41:G,48:K,49:U}),s(L,[2,45]),s(L,[2,50]),s(L,[2,51]),s(L,[2,52]),s(L,[2,53]),s(i,[2,41],{42:A}),{6:kt,10:mt,39:89,42:Et,47:Tt},{14:90,40:H,50:J,73:$},{16:94,40:O,41:N},{11:95,40:T,48:D,50:I,51:S,52:x},{18:96,19:[1,97],53:53,54:54,58:Y},s(i,[2,12]),{19:[2,60]},s(Z,[2,61],{56:98,57:99,60:100,62:Ot,63:Nt}),s([19,58,62,63],[2,67]),{58:[2,66]},s(i,[2,22],{15:[1,104],17:[1,103]}),s([40,48,50,51,52],[2,72]),s(i,[2,36]),{13:z,41:G,45:105,46:63,48:K,49:U},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(q,[2,39]),s(q,[2,40]),s(L,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,80]),s(i,[2,81]),s(i,[2,82]),{13:[1,106],42:A},{13:[1,108],15:[1,107]},{19:[1,109]},s(i,[2,15]),s(Z,[2,62],{57:110,61:[1,111],63:Nt}),s(Z,[2,63]),s(ut,[2,68]),s(Z,[2,71]),s(ut,[2,70]),{18:112,19:[1,113],53:53,54:54,58:Y},{16:114,40:O,41:N},s(St,[2,44],{46:88,13:z,41:G,48:K,49:U}),{14:115,40:H,50:J,73:$},{16:116,40:O,41:N},{14:117,40:H,50:J,73:$},s(i,[2,13]),s(Z,[2,64]),{60:118,62:Ot},{19:[1,119]},s(i,[2,20]),s(i,[2,23],{17:[1,120],42:A}),s(i,[2,11]),{13:[1,121],42:A},s(i,[2,10]),s(ut,[2,69]),s(i,[2,18]),{18:122,19:[1,123],53:53,54:54,58:Y},{14:124,40:H,50:J,73:$},{19:[1,125]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{75:[2,60],78:[2,66]},parseError:p(function(n,a){if(a.recoverable)this.trace(n);else{var l=new Error(n);throw l.hash=a,l}},"parseError"),parse:p(function(n){var a=this,l=[0],r=[],f=[null],t=[],j=this.table,e="",et=0,At=0,Lt=2,Rt=1,wt=t.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var pt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,pt)&&(C.yy[pt]=this.yy[pt]);_.setInput(n,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var ft=_.yylloc;t.push(ft);var Vt=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Mt(b){l.length=l.length-2*b,f.length=f.length-b,t.length=t.length-b}p(Mt,"popStack");function It(){var b;return b=r.pop()||_.lex()||Rt,typeof b!="number"&&(b instanceof Array&&(r=b,b=r.pop()),b=a.symbols_[b]||b),b}p(It,"lex");for(var g,v,k,yt,w={},st,E,xt,it;;){if(v=l[l.length-1],this.defaultActions[v]?k=this.defaultActions[v]:((g===null||typeof g>"u")&&(g=It()),k=j[v]&&j[v][g]),typeof k>"u"||!k.length||!k[0]){var _t="";it=[];for(st in j[v])this.terminals_[st]&&st>Lt&&it.push("'"+this.terminals_[st]+"'");_.showPosition?_t="Parse error on line "+(et+1)+`: `+_.showPosition()+` Expecting `+it.join(", ")+", got '"+(this.terminals_[g]||g)+"'":_t="Parse error on line "+(et+1)+": Unexpected "+(g==Rt?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(_t,{text:_.match,token:this.terminals_[g]||g,line:_.yylineno,loc:ft,expected:it})}if(k[0]instanceof Array&&k.length>1)throw new Error("Parse Error: multiple actions possible at state: "+v+", token: "+g);switch(k[0]){case 1:l.push(g),f.push(_.yytext),t.push(_.yylloc),l.push(k[1]),g=null,At=_.yyleng,e=_.yytext,et=_.yylineno,ft=_.yylloc;break;case 2:if(E=this.productions_[k[1]][1],w.$=f[f.length-E],w._$={first_line:t[t.length-(E||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(E||1)].first_column,last_column:t[t.length-1].last_column},Vt&&(w._$.range=[t[t.length-(E||1)].range[0],t[t.length-1].range[1]]),yt=this.performAction.apply(w,[e,At,et,C.yy,k[1],f,t].concat(wt)),typeof yt<"u")return yt;E&&(l=l.slice(0,-1*E*2),f=f.slice(0,-1*E),t=t.slice(0,-1*E)),l.push(this.productions_[k[1]][0]),f.push(w.$),t.push(w._$),xt=j[l[l.length-2]][l[l.length-1]],l.push(xt);break;case 3:return!0}}return!0},"parse")},Dt=function(){var R={EOF:1,parseError:p(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:p(function(n,a){return this.yy=a||this.yy||{},this._input=n,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:p(function(){var n=this._input[0];this.yytext+=n,this.yyleng++,this.offset++,this.match+=n,this.matched+=n;var a=n.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),n},"input"),unput:p(function(n){var a=n.length,l=n.split(/(?:\r\n?|\n)/g);this._input=n+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var r=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),l.length-1&&(this.yylineno-=l.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:l?(l.length===r.length?this.yylloc.first_column:0)+r[r.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:p(function(){return this._more=!0,this},"more"),reject:p(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:p(function(n){this.unput(this.match.slice(n))},"less"),pastInput:p(function(){var n=this.matched.substr(0,this.matched.length-this.match.length);return(n.length>20?"...":"")+n.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:p(function(){var n=this.match;return n.length<20&&(n+=this._input.substr(0,20-n.length)),(n.substr(0,20)+(n.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:p(function(){var n=this.pastInput(),a=new Array(n.length+1).join("-");return n+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/flowDiagram-UKHOOZJN-R6bpi1xK.js b/veadk/webui/assets/visualizations/mermaid/flowDiagram-UKHOOZJN-DzYHoGpB.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/flowDiagram-UKHOOZJN-R6bpi1xK.js rename to veadk/webui/assets/visualizations/mermaid/flowDiagram-UKHOOZJN-DzYHoGpB.js index cbdd42c07..91a821848 100644 --- a/veadk/webui/assets/visualizations/mermaid/flowDiagram-UKHOOZJN-R6bpi1xK.js +++ b/veadk/webui/assets/visualizations/mermaid/flowDiagram-UKHOOZJN-DzYHoGpB.js @@ -1,4 +1,4 @@ -import{g as Xt}from"./chunk-5VM5RSS4-C2BXfYOP.js";import{g as Qt}from"./chunk-XXDRQBXY-CLLbPKnJ.js";import{s as Jt}from"./chunk-KBJHAD2P-fr6wew8I.js";import{a as m,aa as Zt,aS as Mt,at as J,Y as g1,a4 as $t,aK as te,b9 as rt,aR as ee,aQ as se,aT as ie,W as re,V as ae,$ as ne,x as ue,as as le,J as oe,ao as ce,a0 as st,s as he,N as de,aM as pe}from"./mermaid.core-BmHujEI0.js";import{c as fe}from"./chunk-2GRJ4B5K-CbPivXt6.js";import{aG as it}from"../../app/index-B71Wq9_t.js";import ge from"../../chunks/purify.es-BnINGy_Y.js";import{c as be}from"../../chunks/channel-BdZyURAQ.js";var Ae="flowchart-",G1,ke=(G1=class{constructor(){this.vertexCounter=0,this.config=g1(),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=ee,this.setAccDescription=se,this.setDiagramTitle=ie,this.getAccTitle=re,this.getAccDescription=ae,this.getDiagramTitle=ne,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")}sanitizeText(i){return ue.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,u,o,h,c={},g){var L,y;if(!i||i.trim().length===0)return;let r;if(g!==void 0){let f;g.includes(` +import{g as Xt}from"./chunk-5VM5RSS4-CqwEymVq.js";import{g as Qt}from"./chunk-XXDRQBXY-B5A5gE3j.js";import{s as Jt}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{a as m,aa as Zt,aS as Mt,at as J,Y as g1,a4 as $t,aK as te,b9 as rt,aR as ee,aQ as se,aT as ie,W as re,V as ae,$ as ne,x as ue,as as le,J as oe,ao as ce,a0 as st,s as he,N as de,aM as pe}from"./mermaid.core-l-gs7P2Q.js";import{c as fe}from"./chunk-2GRJ4B5K-CS99z7QO.js";import{aG as it}from"../../app/index-BKQXvMzA.js";import ge from"../../chunks/purify.es-BnINGy_Y.js";import{c as be}from"../../chunks/channel-B_2bNWok.js";var Ae="flowchart-",G1,ke=(G1=class{constructor(){this.vertexCounter=0,this.config=g1(),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=ee,this.setAccDescription=se,this.setDiagramTitle=ie,this.getAccTitle=re,this.getAccDescription=ae,this.getDiagramTitle=ne,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")}sanitizeText(i){return ue.sanitizeText(i,this.config)}sanitizeNodeLabelType(i){switch(i){case"markdown":case"string":case"text":return i;default:return"markdown"}}setDiagramId(i){this.diagramId=i}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return this.diagramId?`${this.diagramId}-${a.domId}`:a.domId;return this.diagramId?`${this.diagramId}-${i}`:i}addVertex(i,a,n,u,o,h,c={},g){var L,y;if(!i||i.trim().length===0)return;let r;if(g!==void 0){let f;g.includes(` `)?f=g+` `:f=`{ `+g+` diff --git a/veadk/webui/assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-WAuAqH0n.js b/veadk/webui/assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-3Xvb05xn.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-WAuAqH0n.js rename to veadk/webui/assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-3Xvb05xn.js index a9f0bc2c0..b9af487c0 100644 --- a/veadk/webui/assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-WAuAqH0n.js +++ b/veadk/webui/assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-3Xvb05xn.js @@ -1,4 +1,4 @@ -import{V as An,aQ as Wn,$ as On,aT as $n,W as Hn,aR as Nn,a as d,Y as Yt,B as Vn,L as it,at as Tt,x as Pn,aO as zn,s as Rn,b9 as Bn}from"./mermaid.core-BmHujEI0.js";import{s as Ke,aF as Zn,a6 as tn,a8 as en,c as nn,ay as ae,ap as Xn,U as re,ad as ie,aG as Xt}from"../../app/index-B71Wq9_t.js";import{b as Gn,t as Oe,c as qn,a as jn,l as Qn}from"../../chunks/linear-BV49BAJJ.js";import{i as Jn}from"../../chunks/init-Gi6I4Gst.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/defaultLocale-CrowFXzY.js";const Kn=Math.PI/180,tr=180/Math.PI,Jt=18,rn=.96422,sn=1,an=.82521,on=4/29,Ft=6/29,cn=3*Ft*Ft,er=Ft*Ft*Ft;function un(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return ln(t);t instanceof Ke||(t=Zn(t));var e=le(t.r),n=le(t.g),r=le(t.b),i=oe((.2225045*e+.7168786*n+.0606169*r)/sn),s,a;return e===n&&n===r?s=a=i:(s=oe((.4360747*e+.3850649*n+.1430804*r)/rn),a=oe((.0139322*e+.0971045*n+.7141733*r)/an)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function nr(t,e,n,r){return arguments.length===1?un(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}tn(ft,nr,en(nn,{brighter(t){return new ft(this.l+Jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-Jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=rn*ce(e),t=sn*ce(t),n=an*ce(n),new Ke(ue(3.1338561*e-1.6168667*t-.4906146*n),ue(-.9787684*e+1.9161415*t+.033454*n),ue(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function oe(t){return t>er?Math.pow(t,1/3):t/cn+on}function ce(t){return t>Ft?t*t*t:cn*(t-on)}function ue(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function le(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=un(t)),t.a===0&&t.b===0)return new ht(NaN,0=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function or(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function cr(t){return t}var qt=1,fe=2,ve=3,Gt=4,$e=1e-6;function ur(t){return"translate("+t+",0)"}function lr(t){return"translate(0,"+t+")"}function fr(t){return e=>+t(e)}function dr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function hr(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===qt||t===Gt?-1:1,w=t===Gt||t===fe?"x":"y",V=t===qt||t===ve?ur:lr;function _(Y){var G=r??(e.ticks?e.ticks.apply(e,n):e.domain()),Z=i??(e.tickFormat?e.tickFormat.apply(e,n):cr),v=Math.max(s,0)+y,U=e.range(),z=+U[0]+F,E=+U[U.length-1]+F,R=(e.bandwidth?dr:fr)(e.copy(),F),q=Y.selection?Y.selection():Y,T=q.selectAll(".domain").data([null]),k=q.selectAll(".tick").data(G,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===qt?"0em":t===ve?"0.71em":"0.32em")),Y!==q&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",$e).attr("transform",function(M){return isFinite(M=R(M))?V(M+F):this.getAttribute("transform")}),L.attr("opacity",$e).attr("transform",function(M){var D=this.parentNode.__axis;return V((D&&isFinite(D=D(M))?D:R(M))+F)})),p.remove(),T.attr("d",t===Gt||t===fe?a?"M"+S*a+","+z+"H"+F+"V"+E+"H"+S*a:"M"+F+","+z+"V"+E:a?"M"+z+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+z+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return V(R(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(Z),q.filter(hr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===fe?"start":t===Gt?"end":"middle"),q.each(function(){this.__axis=R})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function mr(t){return fn(qt,t)}function gr(t){return fn(ve,t)}function yr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(de.setTime(+s),he.setTime(+a),t(de),t(he),Math.floor(n(de,he))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,De=yt*7,He=yt*30,me=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const kr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());kr.range;const Vt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Vt.range;const pr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());pr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const Me=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);Me.range;const vr=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));vr.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/De)}const Rt=Dt(0),Pt=Dt(1),dn=Dt(2),hn=Dt(3),bt=Dt(4),mn=Dt(5),gn=Dt(6);Rt.range;Pt.range;dn.range;hn.range;bt.range;mn.range;gn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/De)}const yn=Mt(0),Kt=Mt(1),Tr=Mt(2),xr=Mt(3),It=Mt(4),br=Mt(5),wr=Mt(6);yn.range;Kt.range;Tr.range;xr.range;It.range;br.range;wr.range;const zt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());zt.range;const Dr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Dr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function Mr(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,De],[e,1,He],[e,3,3*He],[t,1,me]];function y(S,w,V){const _=wv).right(a,_);if(Y===a.length)return t.every(Oe(S/me,w/me,V));if(Y===0)return Et.every(Math.max(Oe(S,w,V),1));const[G,Z]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ye(Ot(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?Kt.ceil(A):Kt(A),A=Me.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=ge(Ot(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Pt.ceil(A):Pt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ye(Ot(f.y,0,1)).getUTCDay():ge(Ot(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ye(f)):ge(f)}}function p(h,N,P,f){for(var tt=0,A=N.length,Q=P.length,X,st;tt=Q)return-1;if(X=N.charCodeAt(tt++),X===37){if(X=N.charAt(tt++),st=q[X in Ne?N.charAt(tt++):X],!st||(f=st(h,P,f))<0)return-1}else if(X!=P.charCodeAt(f++))return-1}return f}function L(h,N,P){var f=S.exec(N.slice(P));return f?(h.p=w.get(f[0].toLowerCase()),P+f[0].length):-1}function x(h,N,P){var f=Y.exec(N.slice(P));return f?(h.w=G.get(f[0].toLowerCase()),P+f[0].length):-1}function C(h,N,P){var f=V.exec(N.slice(P));return f?(h.w=_.get(f[0].toLowerCase()),P+f[0].length):-1}function M(h,N,P){var f=U.exec(N.slice(P));return f?(h.m=z.get(f[0].toLowerCase()),P+f[0].length):-1}function D(h,N,P){var f=Z.exec(N.slice(P));return f?(h.m=v.get(f[0].toLowerCase()),P+f[0].length):-1}function c(h,N,P){return p(h,e,N,P)}function g(h,N,P){return p(h,n,N,P)}function b(h,N,P){return p(h,r,N,P)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function O(h){return s[h.getUTCDay()]}function $(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",R);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Ne={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Yr=/^%/,Fr=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Er(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Pe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Or(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Re(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Br(t,e,n){var r=Yr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Zr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Xr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Be(t,e){return B(t.getDate(),e,2)}function Gr(t,e){return B(t.getHours(),e,2)}function qr(t,e){return B(t.getHours()%12||12,e,2)}function jr(t,e){return B(1+xt.count(kt(t),t),e,3)}function kn(t,e){return B(t.getMilliseconds(),e,3)}function Qr(t,e){return kn(t,e)+"000"}function Jr(t,e){return B(t.getMonth()+1,e,2)}function Kr(t,e){return B(t.getMinutes(),e,2)}function ti(t,e){return B(t.getSeconds(),e,2)}function ei(t){var e=t.getDay();return e===0?7:e}function ni(t,e){return B(Rt.count(kt(t)-1,t),e,2)}function pn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ri(t,e){return t=pn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ii(t){return t.getDay()}function si(t,e){return B(Pt.count(kt(t)-1,t),e,2)}function ai(t,e){return B(t.getFullYear()%100,e,2)}function oi(t,e){return t=pn(t),B(t.getFullYear()%100,e,2)}function ci(t,e){return B(t.getFullYear()%1e4,e,4)}function ui(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function li(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Ze(t,e){return B(t.getUTCDate(),e,2)}function fi(t,e){return B(t.getUTCHours(),e,2)}function di(t,e){return B(t.getUTCHours()%12||12,e,2)}function hi(t,e){return B(1+Me.count(wt(t),t),e,3)}function vn(t,e){return B(t.getUTCMilliseconds(),e,3)}function mi(t,e){return vn(t,e)+"000"}function gi(t,e){return B(t.getUTCMonth()+1,e,2)}function yi(t,e){return B(t.getUTCMinutes(),e,2)}function ki(t,e){return B(t.getUTCSeconds(),e,2)}function pi(t){var e=t.getUTCDay();return e===0?7:e}function vi(t,e){return B(yn.count(wt(t)-1,t),e,2)}function Tn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function Ti(t,e){return t=Tn(t),B(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function xi(t){return t.getUTCDay()}function bi(t,e){return B(Kt.count(wt(t)-1,t),e,2)}function wi(t,e){return B(t.getUTCFullYear()%100,e,2)}function Di(t,e){return t=Tn(t),B(t.getUTCFullYear()%100,e,2)}function Mi(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function Ci(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function Si(){return"+0000"}function Xe(){return"%"}function Ge(t){return+t}function qe(t){return Math.floor(+t/1e3)}var St,te;_i({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"]});function _i(t){return St=_r(t),te=St.format,St.parse,St.utcFormat,St.utcParse,St}function Yi(t){return new Date(t)}function Fi(t){return t instanceof Date?+t:+new Date(+t)}function xn(t,e,n,r,i,s,a,y,F,S){var w=qn(),V=w.invert,_=w.domain,Y=S(".%L"),G=S(":%S"),Z=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),z=S("%b %d"),E=S("%B"),R=S("%Y");function q(T){return(F(T)4&&(Y+=7),_.add(Y,n));return G.diff(Z,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var V=this.$utils(),_=!!V.u(w)||w;return V.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}})})(bn);var Ei=bn.exports;const Ii=ie(Ei);var wn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(re,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},V=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(U){if(!U||U==="Z")return 0;var z=U.match(/([+-]|\d\d)/g),E=60*z[1]+(+z[2]||0);return E===0?0:z[0]==="+"?-E:E}(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var z,E=F.meridiem;if(E){for(var R=1;R<=24;R+=1)if(v.indexOf(E(R,0,U))>-1){z=R>12;break}}else z=v===(U?"pm":"PM");return z},G={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,z=v.match(/\d+/);if(this.day=z[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),z=(_("monthsShort")||U.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(z<1)throw new Error;this.month=z%12||z}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:V,ZZ:V};function Z(v){var U,z;U=v,z=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(x,C,M){var D=M&&M.toUpperCase();return C||z[M]||n[M]||z[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,g,b){return g||b.slice(1)})})).match(r),R=E.length,q=0;q-1)return new Date((I==="X"?1e3:1)*m);var u=Z(I)(m),K=u.year,l=u.month,O=u.day,$=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,P=new Date,f=O||(K||l?1:P.getDate()),tt=K||P.getFullYear(),A=0;K&&!l||(A=l>0?l-1:P.getMonth());var Q,X=$||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,X,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,X,st,at,pt)):(Q=new Date(tt,A,f,X,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}}(T,L,k,z),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=z.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else R.call(this,q)}}})})(wn);var Li=wn.exports;const Ai=ie(Li);var Dn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(re,function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"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(V){switch(V){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),V==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),V==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),V==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return V}});return s.bind(this)(w)}}})})(Dn);var Wi=Dn.exports;const Oi=ie(Wi);var Mn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(re,function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,V=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof R},G=function(T,k,p){return new R(T,p,k.$l)},Z=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},z=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+z(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},R=function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return G(p*_[Z(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach(function(c){C.$d[Z(c)]=p[c]}),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map(function(c){return c!=null?Number(c):0});return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce(function(L,x){return L+(p.$d[x]||0)*_[x]},0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(V,function(C,M){return M||String(x[C])})},k.as=function(p){return this.$ms/_[Z(p)]},k.get=function(p){var L=this.$ms,x=Z(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[Z(L)]:Y(p)?p.$ms:G(p,this).$ms,G(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return G(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T}(),q=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return G(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?q(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?q(this,C,-1):x.bind(this)(C,M)}}})})(Mn);var $i=Mn.exports;const Hi=ie($i);var Te=function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],V=[1,9],_=[1,10],Y=[1,11],G=[1,12],Z=[1,13],v=[1,14],U=[1,15],z=[1,16],E=[1,19],R=[1,20],q=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(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:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:V,23:_,24:Y,25:G,26:Z,27:v,28:U,29:z,30:E,31:R,33:q,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:V,23:_,24:Y,25:G,26:Z,27:v,28:U,29:z,30:E,31:R,33:q,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,O=2,$=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var P=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||$,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,X,st,at={},pt,ut,We,Zt;;){if(Q=b[b.length-1],this.defaultActions[Q]?X=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),X=W[Q]&&W[Q][A]),typeof X>"u"||!X.length||!X[0]){var se="";Zt=[];for(pt in W[Q])this.terminals_[pt]&&pt>O&&Zt.push("'"+this.terminals_[pt]+"'");H.showPosition?se="Parse error on line "+(K+1)+`: +import{V as An,aQ as Wn,$ as On,aT as $n,W as Hn,aR as Nn,a as d,Y as Yt,B as Vn,L as it,at as Tt,x as Pn,aO as zn,s as Rn,b9 as Bn}from"./mermaid.core-l-gs7P2Q.js";import{s as Ke,aF as Zn,a6 as tn,a8 as en,c as nn,ay as ae,ap as Xn,U as re,ad as ie,aG as Xt}from"../../app/index-BKQXvMzA.js";import{b as Gn,t as Oe,c as qn,a as jn,l as Qn}from"../../chunks/linear-apY3LTrF.js";import{i as Jn}from"../../chunks/init-Gi6I4Gst.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/defaultLocale-CrowFXzY.js";const Kn=Math.PI/180,tr=180/Math.PI,Jt=18,rn=.96422,sn=1,an=.82521,on=4/29,Ft=6/29,cn=3*Ft*Ft,er=Ft*Ft*Ft;function un(t){if(t instanceof ft)return new ft(t.l,t.a,t.b,t.opacity);if(t instanceof ht)return ln(t);t instanceof Ke||(t=Zn(t));var e=le(t.r),n=le(t.g),r=le(t.b),i=oe((.2225045*e+.7168786*n+.0606169*r)/sn),s,a;return e===n&&n===r?s=a=i:(s=oe((.4360747*e+.3850649*n+.1430804*r)/rn),a=oe((.0139322*e+.0971045*n+.7141733*r)/an)),new ft(116*i-16,500*(s-i),200*(i-a),t.opacity)}function nr(t,e,n,r){return arguments.length===1?un(t):new ft(t,e,n,r??1)}function ft(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}tn(ft,nr,en(nn,{brighter(t){return new ft(this.l+Jt*(t??1),this.a,this.b,this.opacity)},darker(t){return new ft(this.l-Jt*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return e=rn*ce(e),t=sn*ce(t),n=an*ce(n),new Ke(ue(3.1338561*e-1.6168667*t-.4906146*n),ue(-.9787684*e+1.9161415*t+.033454*n),ue(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}}));function oe(t){return t>er?Math.pow(t,1/3):t/cn+on}function ce(t){return t>Ft?t*t*t:cn*(t-on)}function ue(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function le(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function rr(t){if(t instanceof ht)return new ht(t.h,t.c,t.l,t.opacity);if(t instanceof ft||(t=un(t)),t.a===0&&t.b===0)return new ht(NaN,0=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n=i)&&(n=i)}return n}function or(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function cr(t){return t}var qt=1,fe=2,ve=3,Gt=4,$e=1e-6;function ur(t){return"translate("+t+",0)"}function lr(t){return"translate(0,"+t+")"}function fr(t){return e=>+t(e)}function dr(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function hr(){return!this.__axis}function fn(t,e){var n=[],r=null,i=null,s=6,a=6,y=3,F=typeof window<"u"&&window.devicePixelRatio>1?0:.5,S=t===qt||t===Gt?-1:1,w=t===Gt||t===fe?"x":"y",V=t===qt||t===ve?ur:lr;function _(Y){var G=r??(e.ticks?e.ticks.apply(e,n):e.domain()),Z=i??(e.tickFormat?e.tickFormat.apply(e,n):cr),v=Math.max(s,0)+y,U=e.range(),z=+U[0]+F,E=+U[U.length-1]+F,R=(e.bandwidth?dr:fr)(e.copy(),F),q=Y.selection?Y.selection():Y,T=q.selectAll(".domain").data([null]),k=q.selectAll(".tick").data(G,e).order(),p=k.exit(),L=k.enter().append("g").attr("class","tick"),x=k.select("line"),C=k.select("text");T=T.merge(T.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(L),x=x.merge(L.append("line").attr("stroke","currentColor").attr(w+"2",S*s)),C=C.merge(L.append("text").attr("fill","currentColor").attr(w,S*v).attr("dy",t===qt?"0em":t===ve?"0.71em":"0.32em")),Y!==q&&(T=T.transition(Y),k=k.transition(Y),x=x.transition(Y),C=C.transition(Y),p=p.transition(Y).attr("opacity",$e).attr("transform",function(M){return isFinite(M=R(M))?V(M+F):this.getAttribute("transform")}),L.attr("opacity",$e).attr("transform",function(M){var D=this.parentNode.__axis;return V((D&&isFinite(D=D(M))?D:R(M))+F)})),p.remove(),T.attr("d",t===Gt||t===fe?a?"M"+S*a+","+z+"H"+F+"V"+E+"H"+S*a:"M"+F+","+z+"V"+E:a?"M"+z+","+S*a+"V"+F+"H"+E+"V"+S*a:"M"+z+","+F+"H"+E),k.attr("opacity",1).attr("transform",function(M){return V(R(M)+F)}),x.attr(w+"2",S*s),C.attr(w,S*v).text(Z),q.filter(hr).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===fe?"start":t===Gt?"end":"middle"),q.each(function(){this.__axis=R})}return _.scale=function(Y){return arguments.length?(e=Y,_):e},_.ticks=function(){return n=Array.from(arguments),_},_.tickArguments=function(Y){return arguments.length?(n=Y==null?[]:Array.from(Y),_):n.slice()},_.tickValues=function(Y){return arguments.length?(r=Y==null?null:Array.from(Y),_):r&&r.slice()},_.tickFormat=function(Y){return arguments.length?(i=Y,_):i},_.tickSize=function(Y){return arguments.length?(s=a=+Y,_):s},_.tickSizeInner=function(Y){return arguments.length?(s=+Y,_):s},_.tickSizeOuter=function(Y){return arguments.length?(a=+Y,_):a},_.tickPadding=function(Y){return arguments.length?(y=+Y,_):y},_.offset=function(Y){return arguments.length?(F=+Y,_):F},_}function mr(t){return fn(qt,t)}function gr(t){return fn(ve,t)}function yr(t,e){t=t.slice();var n=0,r=t.length-1,i=t[n],s=t[r],a;return s(t(s=new Date(+s)),s),i.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),i.round=s=>{const a=i(s),y=i.ceil(s);return s-a(e(s=new Date(+s),a==null?1:Math.floor(a)),s),i.range=(s,a,y)=>{const F=[];if(s=i.ceil(s),y=y==null?1:Math.floor(y),!(s0))return F;let S;do F.push(S=new Date(+s)),e(s,y),t(s);while(Snt(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,y)=>{if(a>=a)if(y<0)for(;++y<=0;)for(;e(a,-1),!s(a););else for(;--y>=0;)for(;e(a,1),!s(a););}),n&&(i.count=(s,a)=>(de.setTime(+s),he.setTime(+a),t(de),t(he),Math.floor(n(de,he))),i.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?i.filter(r?a=>r(a)%s===0:a=>i.count(0,a)%s===0):i)),i}const Et=nt(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);Et.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?nt(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):Et);Et.range;const mt=1e3,ct=mt*60,gt=ct*60,yt=gt*24,De=yt*7,He=yt*30,me=yt*365,vt=nt(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*mt)},(t,e)=>(e-t)/mt,t=>t.getUTCSeconds());vt.range;const Nt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getMinutes());Nt.range;const kr=nt(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ct)},(t,e)=>(e-t)/ct,t=>t.getUTCMinutes());kr.range;const Vt=nt(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*mt-t.getMinutes()*ct)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getHours());Vt.range;const pr=nt(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*gt)},(t,e)=>(e-t)/gt,t=>t.getUTCHours());pr.range;const xt=nt(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ct)/yt,t=>t.getDate()-1);xt.range;const Me=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>t.getUTCDate()-1);Me.range;const vr=nt(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/yt,t=>Math.floor(t/yt));vr.range;function Dt(t){return nt(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,n)=>{e.setDate(e.getDate()+n*7)},(e,n)=>(n-e-(n.getTimezoneOffset()-e.getTimezoneOffset())*ct)/De)}const Rt=Dt(0),Pt=Dt(1),dn=Dt(2),hn=Dt(3),bt=Dt(4),mn=Dt(5),gn=Dt(6);Rt.range;Pt.range;dn.range;hn.range;bt.range;mn.range;gn.range;function Mt(t){return nt(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCDate(e.getUTCDate()+n*7)},(e,n)=>(n-e)/De)}const yn=Mt(0),Kt=Mt(1),Tr=Mt(2),xr=Mt(3),It=Mt(4),br=Mt(5),wr=Mt(6);yn.range;Kt.range;Tr.range;xr.range;It.range;br.range;wr.range;const zt=nt(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());zt.range;const Dr=nt(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());Dr.range;const kt=nt(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());kt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)});kt.range;const wt=nt(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());wt.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:nt(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)});wt.range;function Mr(t,e,n,r,i,s){const a=[[vt,1,mt],[vt,5,5*mt],[vt,15,15*mt],[vt,30,30*mt],[s,1,ct],[s,5,5*ct],[s,15,15*ct],[s,30,30*ct],[i,1,gt],[i,3,3*gt],[i,6,6*gt],[i,12,12*gt],[r,1,yt],[r,2,2*yt],[n,1,De],[e,1,He],[e,3,3*He],[t,1,me]];function y(S,w,V){const _=wv).right(a,_);if(Y===a.length)return t.every(Oe(S/me,w/me,V));if(Y===0)return Et.every(Math.max(Oe(S,w,V),1));const[G,Z]=a[_/a[Y-1][2]53)return null;"w"in f||(f.w=1),"Z"in f?(A=ye(Ot(f.y,0,1)),Q=A.getUTCDay(),A=Q>4||Q===0?Kt.ceil(A):Kt(A),A=Me.offset(A,(f.V-1)*7),f.y=A.getUTCFullYear(),f.m=A.getUTCMonth(),f.d=A.getUTCDate()+(f.w+6)%7):(A=ge(Ot(f.y,0,1)),Q=A.getDay(),A=Q>4||Q===0?Pt.ceil(A):Pt(A),A=xt.offset(A,(f.V-1)*7),f.y=A.getFullYear(),f.m=A.getMonth(),f.d=A.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),Q="Z"in f?ye(Ot(f.y,0,1)).getUTCDay():ge(Ot(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+f.W*7-(Q+5)%7:f.w+f.U*7-(Q+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,ye(f)):ge(f)}}function p(h,N,P,f){for(var tt=0,A=N.length,Q=P.length,X,st;tt=Q)return-1;if(X=N.charCodeAt(tt++),X===37){if(X=N.charAt(tt++),st=q[X in Ne?N.charAt(tt++):X],!st||(f=st(h,P,f))<0)return-1}else if(X!=P.charCodeAt(f++))return-1}return f}function L(h,N,P){var f=S.exec(N.slice(P));return f?(h.p=w.get(f[0].toLowerCase()),P+f[0].length):-1}function x(h,N,P){var f=Y.exec(N.slice(P));return f?(h.w=G.get(f[0].toLowerCase()),P+f[0].length):-1}function C(h,N,P){var f=V.exec(N.slice(P));return f?(h.w=_.get(f[0].toLowerCase()),P+f[0].length):-1}function M(h,N,P){var f=U.exec(N.slice(P));return f?(h.m=z.get(f[0].toLowerCase()),P+f[0].length):-1}function D(h,N,P){var f=Z.exec(N.slice(P));return f?(h.m=v.get(f[0].toLowerCase()),P+f[0].length):-1}function c(h,N,P){return p(h,e,N,P)}function g(h,N,P){return p(h,n,N,P)}function b(h,N,P){return p(h,r,N,P)}function m(h){return a[h.getDay()]}function I(h){return s[h.getDay()]}function o(h){return F[h.getMonth()]}function W(h){return y[h.getMonth()]}function u(h){return i[+(h.getHours()>=12)]}function K(h){return 1+~~(h.getMonth()/3)}function l(h){return a[h.getUTCDay()]}function O(h){return s[h.getUTCDay()]}function $(h){return F[h.getUTCMonth()]}function j(h){return y[h.getUTCMonth()]}function H(h){return i[+(h.getUTCHours()>=12)]}function J(h){return 1+~~(h.getUTCMonth()/3)}return{format:function(h){var N=T(h+="",E);return N.toString=function(){return h},N},parse:function(h){var N=k(h+="",!1);return N.toString=function(){return h},N},utcFormat:function(h){var N=T(h+="",R);return N.toString=function(){return h},N},utcParse:function(h){var N=k(h+="",!0);return N.toString=function(){return h},N}}}var Ne={"-":"",_:" ",0:"0"},rt=/^\s*\d+/,Yr=/^%/,Fr=/[\\^$*+?|[\]().{}]/g;function B(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",s=i.length;return r+(s[e.toLowerCase(),n]))}function Er(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ir(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Lr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Ar(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Wr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function Ve(t,e,n){var r=rt.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Pe(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function Or(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function $r(t,e,n){var r=rt.exec(e.slice(n,n+1));return r?(t.q=r[0]*3-3,n+r[0].length):-1}function Hr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ze(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Nr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Re(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Vr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Pr(t,e,n){var r=rt.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function zr(t,e,n){var r=rt.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Rr(t,e,n){var r=rt.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Br(t,e,n){var r=Yr.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Zr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Xr(t,e,n){var r=rt.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Be(t,e){return B(t.getDate(),e,2)}function Gr(t,e){return B(t.getHours(),e,2)}function qr(t,e){return B(t.getHours()%12||12,e,2)}function jr(t,e){return B(1+xt.count(kt(t),t),e,3)}function kn(t,e){return B(t.getMilliseconds(),e,3)}function Qr(t,e){return kn(t,e)+"000"}function Jr(t,e){return B(t.getMonth()+1,e,2)}function Kr(t,e){return B(t.getMinutes(),e,2)}function ti(t,e){return B(t.getSeconds(),e,2)}function ei(t){var e=t.getDay();return e===0?7:e}function ni(t,e){return B(Rt.count(kt(t)-1,t),e,2)}function pn(t){var e=t.getDay();return e>=4||e===0?bt(t):bt.ceil(t)}function ri(t,e){return t=pn(t),B(bt.count(kt(t),t)+(kt(t).getDay()===4),e,2)}function ii(t){return t.getDay()}function si(t,e){return B(Pt.count(kt(t)-1,t),e,2)}function ai(t,e){return B(t.getFullYear()%100,e,2)}function oi(t,e){return t=pn(t),B(t.getFullYear()%100,e,2)}function ci(t,e){return B(t.getFullYear()%1e4,e,4)}function ui(t,e){var n=t.getDay();return t=n>=4||n===0?bt(t):bt.ceil(t),B(t.getFullYear()%1e4,e,4)}function li(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+B(e/60|0,"0",2)+B(e%60,"0",2)}function Ze(t,e){return B(t.getUTCDate(),e,2)}function fi(t,e){return B(t.getUTCHours(),e,2)}function di(t,e){return B(t.getUTCHours()%12||12,e,2)}function hi(t,e){return B(1+Me.count(wt(t),t),e,3)}function vn(t,e){return B(t.getUTCMilliseconds(),e,3)}function mi(t,e){return vn(t,e)+"000"}function gi(t,e){return B(t.getUTCMonth()+1,e,2)}function yi(t,e){return B(t.getUTCMinutes(),e,2)}function ki(t,e){return B(t.getUTCSeconds(),e,2)}function pi(t){var e=t.getUTCDay();return e===0?7:e}function vi(t,e){return B(yn.count(wt(t)-1,t),e,2)}function Tn(t){var e=t.getUTCDay();return e>=4||e===0?It(t):It.ceil(t)}function Ti(t,e){return t=Tn(t),B(It.count(wt(t),t)+(wt(t).getUTCDay()===4),e,2)}function xi(t){return t.getUTCDay()}function bi(t,e){return B(Kt.count(wt(t)-1,t),e,2)}function wi(t,e){return B(t.getUTCFullYear()%100,e,2)}function Di(t,e){return t=Tn(t),B(t.getUTCFullYear()%100,e,2)}function Mi(t,e){return B(t.getUTCFullYear()%1e4,e,4)}function Ci(t,e){var n=t.getUTCDay();return t=n>=4||n===0?It(t):It.ceil(t),B(t.getUTCFullYear()%1e4,e,4)}function Si(){return"+0000"}function Xe(){return"%"}function Ge(t){return+t}function qe(t){return Math.floor(+t/1e3)}var St,te;_i({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"]});function _i(t){return St=_r(t),te=St.format,St.parse,St.utcFormat,St.utcParse,St}function Yi(t){return new Date(t)}function Fi(t){return t instanceof Date?+t:+new Date(+t)}function xn(t,e,n,r,i,s,a,y,F,S){var w=qn(),V=w.invert,_=w.domain,Y=S(".%L"),G=S(":%S"),Z=S("%I:%M"),v=S("%I %p"),U=S("%a %d"),z=S("%b %d"),E=S("%B"),R=S("%Y");function q(T){return(F(T)4&&(Y+=7),_.add(Y,n));return G.diff(Z,"week")+1},y.isoWeekday=function(S){return this.$utils().u(S)?this.day()||7:this.day(this.day()%7?S:S-7)};var F=y.startOf;y.startOf=function(S,w){var V=this.$utils(),_=!!V.u(w)||w;return V.p(S)==="isoweek"?_?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):F.bind(this)(S,w)}}})})(bn);var Ei=bn.exports;const Ii=ie(Ei);var wn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(re,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,i=/\d/,s=/\d\d/,a=/\d\d?/,y=/\d*[^-_:/,()\s\d]+/,F={},S=function(v){return(v=+v)+(v>68?1900:2e3)},w=function(v){return function(U){this[v]=+U}},V=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(U){if(!U||U==="Z")return 0;var z=U.match(/([+-]|\d\d)/g),E=60*z[1]+(+z[2]||0);return E===0?0:z[0]==="+"?-E:E}(v)}],_=function(v){var U=F[v];return U&&(U.indexOf?U:U.s.concat(U.f))},Y=function(v,U){var z,E=F.meridiem;if(E){for(var R=1;R<=24;R+=1)if(v.indexOf(E(R,0,U))>-1){z=R>12;break}}else z=v===(U?"pm":"PM");return z},G={A:[y,function(v){this.afternoon=Y(v,!1)}],a:[y,function(v){this.afternoon=Y(v,!0)}],Q:[i,function(v){this.month=3*(v-1)+1}],S:[i,function(v){this.milliseconds=100*+v}],SS:[s,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[a,w("seconds")],ss:[a,w("seconds")],m:[a,w("minutes")],mm:[a,w("minutes")],H:[a,w("hours")],h:[a,w("hours")],HH:[a,w("hours")],hh:[a,w("hours")],D:[a,w("day")],DD:[s,w("day")],Do:[y,function(v){var U=F.ordinal,z=v.match(/\d+/);if(this.day=z[0],U)for(var E=1;E<=31;E+=1)U(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[a,w("week")],ww:[s,w("week")],M:[a,w("month")],MM:[s,w("month")],MMM:[y,function(v){var U=_("months"),z=(_("monthsShort")||U.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(z<1)throw new Error;this.month=z%12||z}],MMMM:[y,function(v){var U=_("months").indexOf(v)+1;if(U<1)throw new Error;this.month=U%12||U}],Y:[/[+-]?\d+/,w("year")],YY:[s,function(v){this.year=S(v)}],YYYY:[/\d{4}/,w("year")],Z:V,ZZ:V};function Z(v){var U,z;U=v,z=F&&F.formats;for(var E=(v=U.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(x,C,M){var D=M&&M.toUpperCase();return C||z[M]||n[M]||z[D].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(c,g,b){return g||b.slice(1)})})).match(r),R=E.length,q=0;q-1)return new Date((I==="X"?1e3:1)*m);var u=Z(I)(m),K=u.year,l=u.month,O=u.day,$=u.hours,j=u.minutes,H=u.seconds,J=u.milliseconds,h=u.zone,N=u.week,P=new Date,f=O||(K||l?1:P.getDate()),tt=K||P.getFullYear(),A=0;K&&!l||(A=l>0?l-1:P.getMonth());var Q,X=$||0,st=j||0,at=H||0,pt=J||0;return h?new Date(Date.UTC(tt,A,f,X,st,at,pt+60*h.offset*1e3)):o?new Date(Date.UTC(tt,A,f,X,st,at,pt)):(Q=new Date(tt,A,f,X,st,at,pt),N&&(Q=W(Q).week(N).toDate()),Q)}catch{return new Date("")}}(T,L,k,z),this.init(),D&&D!==!0&&(this.$L=this.locale(D).$L),M&&T!=this.format(L)&&(this.$d=new Date("")),F={}}else if(L instanceof Array)for(var c=L.length,g=1;g<=c;g+=1){p[1]=L[g-1];var b=z.apply(this,p);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}g===c&&(this.$d=new Date(""))}else R.call(this,q)}}})})(wn);var Li=wn.exports;const Ai=ie(Li);var Dn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(re,function(){return function(n,r){var i=r.prototype,s=i.format;i.format=function(a){var y=this,F=this.$locale();if(!this.isValid())return s.bind(this)(a);var S=this.$utils(),w=(a||"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(V){switch(V){case"Q":return Math.ceil((y.$M+1)/3);case"Do":return F.ordinal(y.$D);case"gggg":return y.weekYear();case"GGGG":return y.isoWeekYear();case"wo":return F.ordinal(y.week(),"W");case"w":case"ww":return S.s(y.week(),V==="w"?1:2,"0");case"W":case"WW":return S.s(y.isoWeek(),V==="W"?1:2,"0");case"k":case"kk":return S.s(String(y.$H===0?24:y.$H),V==="k"?1:2,"0");case"X":return Math.floor(y.$d.getTime()/1e3);case"x":return y.$d.getTime();case"z":return"["+y.offsetName()+"]";case"zzz":return"["+y.offsetName("long")+"]";default:return V}});return s.bind(this)(w)}}})})(Dn);var Wi=Dn.exports;const Oi=ie(Wi);var Mn={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(re,function(){var n,r,i=1e3,s=6e4,a=36e5,y=864e5,F=31536e6,S=2628e6,w=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,V=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,_={years:F,months:S,days:y,hours:a,minutes:s,seconds:i,milliseconds:1,weeks:6048e5},Y=function(T){return T instanceof R},G=function(T,k,p){return new R(T,p,k.$l)},Z=function(T){return r.p(T)+"s"},v=function(T){return T<0},U=function(T){return v(T)?Math.ceil(T):Math.floor(T)},z=function(T){return Math.abs(T)},E=function(T,k){return T?v(T)?{negative:!0,format:""+z(T)+k}:{negative:!1,format:""+T+k}:{negative:!1,format:""}},R=function(){function T(p,L,x){var C=this;if(this.$d={},this.$l=x,p===void 0&&(this.$ms=0,this.parseFromMilliseconds()),L)return G(p*_[Z(L)],this);if(typeof p=="number")return this.$ms=p,this.parseFromMilliseconds(),this;if(typeof p=="object")return Object.keys(p).forEach(function(c){C.$d[Z(c)]=p[c]}),this.calMilliseconds(),this;if(typeof p=="string"){var M=p.match(w);if(M){var D=M.slice(2).map(function(c){return c!=null?Number(c):0});return this.$d.years=D[0],this.$d.months=D[1],this.$d.weeks=D[2],this.$d.days=D[3],this.$d.hours=D[4],this.$d.minutes=D[5],this.$d.seconds=D[6],this.calMilliseconds(),this}}return this}var k=T.prototype;return k.calMilliseconds=function(){var p=this;this.$ms=Object.keys(this.$d).reduce(function(L,x){return L+(p.$d[x]||0)*_[x]},0)},k.parseFromMilliseconds=function(){var p=this.$ms;this.$d.years=U(p/F),p%=F,this.$d.months=U(p/S),p%=S,this.$d.days=U(p/y),p%=y,this.$d.hours=U(p/a),p%=a,this.$d.minutes=U(p/s),p%=s,this.$d.seconds=U(p/i),p%=i,this.$d.milliseconds=p},k.toISOString=function(){var p=E(this.$d.years,"Y"),L=E(this.$d.months,"M"),x=+this.$d.days||0;this.$d.weeks&&(x+=7*this.$d.weeks);var C=E(x,"D"),M=E(this.$d.hours,"H"),D=E(this.$d.minutes,"M"),c=this.$d.seconds||0;this.$d.milliseconds&&(c+=this.$d.milliseconds/1e3,c=Math.round(1e3*c)/1e3);var g=E(c,"S"),b=p.negative||L.negative||C.negative||M.negative||D.negative||g.negative,m=M.format||D.format||g.format?"T":"",I=(b?"-":"")+"P"+p.format+L.format+C.format+m+M.format+D.format+g.format;return I==="P"||I==="-P"?"P0D":I},k.toJSON=function(){return this.toISOString()},k.format=function(p){var L=p||"YYYY-MM-DDTHH:mm:ss",x={Y:this.$d.years,YY:r.s(this.$d.years,2,"0"),YYYY:r.s(this.$d.years,4,"0"),M:this.$d.months,MM:r.s(this.$d.months,2,"0"),D:this.$d.days,DD:r.s(this.$d.days,2,"0"),H:this.$d.hours,HH:r.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:r.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:r.s(this.$d.seconds,2,"0"),SSS:r.s(this.$d.milliseconds,3,"0")};return L.replace(V,function(C,M){return M||String(x[C])})},k.as=function(p){return this.$ms/_[Z(p)]},k.get=function(p){var L=this.$ms,x=Z(p);return x==="milliseconds"?L%=1e3:L=x==="weeks"?U(L/_[x]):this.$d[x],L||0},k.add=function(p,L,x){var C;return C=L?p*_[Z(L)]:Y(p)?p.$ms:G(p,this).$ms,G(this.$ms+C*(x?-1:1),this)},k.subtract=function(p,L){return this.add(p,L,!0)},k.locale=function(p){var L=this.clone();return L.$l=p,L},k.clone=function(){return G(this.$ms,this)},k.humanize=function(p){return n().add(this.$ms,"ms").locale(this.$l).fromNow(!p)},k.valueOf=function(){return this.asMilliseconds()},k.milliseconds=function(){return this.get("milliseconds")},k.asMilliseconds=function(){return this.as("milliseconds")},k.seconds=function(){return this.get("seconds")},k.asSeconds=function(){return this.as("seconds")},k.minutes=function(){return this.get("minutes")},k.asMinutes=function(){return this.as("minutes")},k.hours=function(){return this.get("hours")},k.asHours=function(){return this.as("hours")},k.days=function(){return this.get("days")},k.asDays=function(){return this.as("days")},k.weeks=function(){return this.get("weeks")},k.asWeeks=function(){return this.as("weeks")},k.months=function(){return this.get("months")},k.asMonths=function(){return this.as("months")},k.years=function(){return this.get("years")},k.asYears=function(){return this.as("years")},T}(),q=function(T,k,p){return T.add(k.years()*p,"y").add(k.months()*p,"M").add(k.days()*p,"d").add(k.hours()*p,"h").add(k.minutes()*p,"m").add(k.seconds()*p,"s").add(k.milliseconds()*p,"ms")};return function(T,k,p){n=p,r=p().$utils(),p.duration=function(C,M){var D=p.locale();return G(C,{$l:D},M)},p.isDuration=Y;var L=k.prototype.add,x=k.prototype.subtract;k.prototype.add=function(C,M){return Y(C)?q(this,C,1):L.bind(this)(C,M)},k.prototype.subtract=function(C,M){return Y(C)?q(this,C,-1):x.bind(this)(C,M)}}})})(Mn);var $i=Mn.exports;const Hi=ie($i);var Te=function(){var t=d(function(D,c,g,b){for(g=g||{},b=D.length;b--;g[D[b]]=c);return g},"o"),e=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],s=[1,29],a=[1,30],y=[1,31],F=[1,32],S=[1,33],w=[1,34],V=[1,9],_=[1,10],Y=[1,11],G=[1,12],Z=[1,13],v=[1,14],U=[1,15],z=[1,16],E=[1,19],R=[1,20],q=[1,21],T=[1,22],k=[1,23],p=[1,25],L=[1,35],x={trace:d(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:d(function(c,g,b,m,I,o,W){var u=o.length-1;switch(I){case 1:return o[u-1];case 2:this.$=[];break;case 3:o[u-1].push(o[u]),this.$=o[u-1];break;case 4:case 5:this.$=o[u];break;case 6:case 7:this.$=[];break;case 8:m.setWeekday("monday");break;case 9:m.setWeekday("tuesday");break;case 10:m.setWeekday("wednesday");break;case 11:m.setWeekday("thursday");break;case 12:m.setWeekday("friday");break;case 13:m.setWeekday("saturday");break;case 14:m.setWeekday("sunday");break;case 15:m.setWeekend("friday");break;case 16:m.setWeekend("saturday");break;case 17:m.setDateFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 18:m.enableInclusiveEndDates(),this.$=o[u].substr(18);break;case 19:m.TopAxis(),this.$=o[u].substr(8);break;case 20:m.setAxisFormat(o[u].substr(11)),this.$=o[u].substr(11);break;case 21:m.setTickInterval(o[u].substr(13)),this.$=o[u].substr(13);break;case 22:m.setExcludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 23:m.setIncludes(o[u].substr(9)),this.$=o[u].substr(9);break;case 24:m.setTodayMarker(o[u].substr(12)),this.$=o[u].substr(12);break;case 27:m.setDiagramTitle(o[u].substr(6)),this.$=o[u].substr(6);break;case 28:this.$=o[u].trim(),m.setAccTitle(this.$);break;case 29:case 30:this.$=o[u].trim(),m.setAccDescription(this.$);break;case 31:m.addSection(o[u].substr(8)),this.$=o[u].substr(8);break;case 33:m.addTask(o[u-1],o[u]),this.$="task";break;case 34:this.$=o[u-1],m.setClickEvent(o[u-1],o[u],null);break;case 35:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],o[u]);break;case 36:this.$=o[u-2],m.setClickEvent(o[u-2],o[u-1],null),m.setLink(o[u-2],o[u]);break;case 37:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-2],o[u-1]),m.setLink(o[u-3],o[u]);break;case 38:this.$=o[u-2],m.setClickEvent(o[u-2],o[u],null),m.setLink(o[u-2],o[u-1]);break;case 39:this.$=o[u-3],m.setClickEvent(o[u-3],o[u-1],o[u]),m.setLink(o[u-3],o[u-2]);break;case 40:this.$=o[u-1],m.setLink(o[u-1],o[u]);break;case 41:case 47:this.$=o[u-1]+" "+o[u];break;case 42:case 43:case 45:this.$=o[u-2]+" "+o[u-1]+" "+o[u];break;case 44:case 46:this.$=o[u-3]+" "+o[u-2]+" "+o[u-1]+" "+o[u];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:V,23:_,24:Y,25:G,26:Z,27:v,28:U,29:z,30:E,31:R,33:q,35:T,36:k,37:24,38:p,40:L},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:s,16:a,17:y,18:F,19:18,20:S,21:w,22:V,23:_,24:Y,25:G,26:Z,27:v,28:U,29:z,30:E,31:R,33:q,35:T,36:k,37:24,38:p,40:L},t(e,[2,5]),t(e,[2,6]),t(e,[2,17]),t(e,[2,18]),t(e,[2,19]),t(e,[2,20]),t(e,[2,21]),t(e,[2,22]),t(e,[2,23]),t(e,[2,24]),t(e,[2,25]),t(e,[2,26]),t(e,[2,27]),{32:[1,37]},{34:[1,38]},t(e,[2,30]),t(e,[2,31]),t(e,[2,32]),{39:[1,39]},t(e,[2,8]),t(e,[2,9]),t(e,[2,10]),t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),{41:[1,40],43:[1,41]},t(e,[2,4]),t(e,[2,28]),t(e,[2,29]),t(e,[2,33]),t(e,[2,34],{42:[1,42],43:[1,43]}),t(e,[2,40],{41:[1,44]}),t(e,[2,35],{43:[1,45]}),t(e,[2,36]),t(e,[2,38],{42:[1,46]}),t(e,[2,37]),t(e,[2,39])],defaultActions:{},parseError:d(function(c,g){if(g.recoverable)this.trace(c);else{var b=new Error(c);throw b.hash=g,b}},"parseError"),parse:d(function(c){var g=this,b=[0],m=[],I=[null],o=[],W=this.table,u="",K=0,l=0,O=2,$=1,j=o.slice.call(arguments,1),H=Object.create(this.lexer),J={yy:{}};for(var h in this.yy)Object.prototype.hasOwnProperty.call(this.yy,h)&&(J.yy[h]=this.yy[h]);H.setInput(c,J.yy),J.yy.lexer=H,J.yy.parser=this,typeof H.yylloc>"u"&&(H.yylloc={});var N=H.yylloc;o.push(N);var P=H.options&&H.options.ranges;typeof J.yy.parseError=="function"?this.parseError=J.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function f(ot){b.length=b.length-2*ot,I.length=I.length-ot,o.length=o.length-ot}d(f,"popStack");function tt(){var ot;return ot=m.pop()||H.lex()||$,typeof ot!="number"&&(ot instanceof Array&&(m=ot,ot=m.pop()),ot=g.symbols_[ot]||ot),ot}d(tt,"lex");for(var A,Q,X,st,at={},pt,ut,We,Zt;;){if(Q=b[b.length-1],this.defaultActions[Q]?X=this.defaultActions[Q]:((A===null||typeof A>"u")&&(A=tt()),X=W[Q]&&W[Q][A]),typeof X>"u"||!X.length||!X[0]){var se="";Zt=[];for(pt in W[Q])this.terminals_[pt]&&pt>O&&Zt.push("'"+this.terminals_[pt]+"'");H.showPosition?se="Parse error on line "+(K+1)+`: `+H.showPosition()+` Expecting `+Zt.join(", ")+", got '"+(this.terminals_[A]||A)+"'":se="Parse error on line "+(K+1)+": Unexpected "+(A==$?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(se,{text:H.match,token:this.terminals_[A]||A,line:H.yylineno,loc:N,expected:Zt})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+A);switch(X[0]){case 1:b.push(A),I.push(H.yytext),o.push(H.yylloc),b.push(X[1]),A=null,l=H.yyleng,u=H.yytext,K=H.yylineno,N=H.yylloc;break;case 2:if(ut=this.productions_[X[1]][1],at.$=I[I.length-ut],at._$={first_line:o[o.length-(ut||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(ut||1)].first_column,last_column:o[o.length-1].last_column},P&&(at._$.range=[o[o.length-(ut||1)].range[0],o[o.length-1].range[1]]),st=this.performAction.apply(at,[u,l,K,J.yy,X[1],I,o].concat(j)),typeof st<"u")return st;ut&&(b=b.slice(0,-1*ut*2),I=I.slice(0,-1*ut),o=o.slice(0,-1*ut)),b.push(this.productions_[X[1]][0]),I.push(at.$),o.push(at._$),We=W[b[b.length-2]][b[b.length-1]],b.push(We);break;case 3:return!0}}return!0},"parse")},C=function(){var D={EOF:1,parseError:d(function(g,b){if(this.yy.parser)this.yy.parser.parseError(g,b);else throw new Error(g)},"parseError"),setInput:d(function(c,g){return this.yy=g||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:d(function(){var c=this._input[0];this.yytext+=c,this.yyleng++,this.offset++,this.match+=c,this.matched+=c;var g=c.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),c},"input"),unput:d(function(c){var g=c.length,b=c.split(/(?:\r\n?|\n)/g);this._input=c+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;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),b.length-1&&(this.yylineno-=b.length-1);var I=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:b?(b.length===m.length?this.yylloc.first_column:0)+m[m.length-b.length].length-b[0].length:this.yylloc.first_column-g},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-g]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(c){this.unput(this.match.slice(c))},"less"),pastInput:d(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:d(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:d(function(){var c=this.pastInput(),g=new Array(c.length+1).join("-");return c+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-BWMNUzLG.js b/veadk/webui/assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-65BqAvcN.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-BWMNUzLG.js rename to veadk/webui/assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-65BqAvcN.js index 99c43a713..5149547af 100644 --- a/veadk/webui/assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-BWMNUzLG.js +++ b/veadk/webui/assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-65BqAvcN.js @@ -1,4 +1,4 @@ -import{I as he}from"./chunk-2Q5K7J3B-DM9SBI1P.js";import{p as $e}from"./chunk-JWPE2WC7-BHkERHFx.js";import{$ as fe,aT as ge,aQ as ue,V as ye,W as xe,aR as me,a as $,X as J,at as k,Y as z,b9 as pe,aX as be,s as we,x as L,r as ke,O as ve,aH as Ee}from"./mermaid.core-BmHujEI0.js";import{p as Ce}from"./cynefin-OW5HDTMX-DjTRskiD.js";import{aG as Be}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=ve.gitGraph,D=$(()=>ke({...Te,...J().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))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 ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),we()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),We=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:We,getCommitsArray:se,getCurrentBranch:Pe,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Ce("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Q=12,ee=new Set(["redux-color","redux-dark-color"]),Qe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Je=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Qe.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",` +import{I as he}from"./chunk-2Q5K7J3B-BiO2G8-N.js";import{p as $e}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{$ as fe,aT as ge,aQ as ue,V as ye,W as xe,aR as me,a as $,X as J,at as k,Y as z,b9 as pe,aX as be,s as we,x as L,r as ke,O as ve,aH as Ee}from"./mermaid.core-l-gs7P2Q.js";import{p as Ce}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import{aG as Be}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=ve.gitGraph,D=$(()=>ke({...Te,...J().gitGraph}),"getConfig"),i=new he(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ee({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))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 ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),we()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),We=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:We,getCommitsArray:se,getCurrentBranch:Pe,getDirection:qe,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{$e(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Ce("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Q=12,ee=new Set(["redux-color","redux-dark-color"]),Qe=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Je=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Qe.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",` ${o-n/2-M/2},${u+I} ${o-n/2-M/2},${u-I} ${t.posWithOffset-n/2-M},${u-x-I} diff --git a/veadk/webui/assets/visualizations/mermaid/infoDiagram-6WML65LV-0JM35C6y.js b/veadk/webui/assets/visualizations/mermaid/infoDiagram-6WML65LV-BQIcZuqW.js similarity index 69% rename from veadk/webui/assets/visualizations/mermaid/infoDiagram-6WML65LV-0JM35C6y.js rename to veadk/webui/assets/visualizations/mermaid/infoDiagram-6WML65LV-BQIcZuqW.js index 0b3958e0e..9fb41b568 100644 --- a/veadk/webui/assets/visualizations/mermaid/infoDiagram-6WML65LV-0JM35C6y.js +++ b/veadk/webui/assets/visualizations/mermaid/infoDiagram-6WML65LV-BQIcZuqW.js @@ -1,2 +1,2 @@ -import{a as e,at as s,aP as n,B as i}from"./mermaid.core-BmHujEI0.js";import{p}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},v={version:"11.16.1"},d=e(()=>v.version,"getVersion"),m={getVersion:d},c=e((r,a,o)=>{s.debug(`rendering info diagram +import{a as e,at as s,aP as n,B as i}from"./mermaid.core-l-gs7P2Q.js";import{p}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var g={parse:e(async r=>{const a=await p("info",r);s.debug(a)},"parse")},v={version:"11.16.1"},d=e(()=>v.version,"getVersion"),m={getVersion:d},c=e((r,a,o)=>{s.debug(`rendering info diagram `+r);const t=n(a);i(t,100,400,!0),t.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${o}`)},"draw"),f={draw:c},w={parser:g,db:m,renderer:f};export{w as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-BXVf3hK9.js b/veadk/webui/assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-Cinhiu5k.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-BXVf3hK9.js rename to veadk/webui/assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-Cinhiu5k.js index 9d8b40af2..d18e127af 100644 --- a/veadk/webui/assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-BXVf3hK9.js +++ b/veadk/webui/assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-Cinhiu5k.js @@ -1,4 +1,4 @@ -import{a as o,Y as ot,aC as ut,aP as dt,k as yt,s as ft,x as pt,aT as it,W as gt,aR as kt,V as mt,aQ as wt,$ as _t,B as xt}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var tt=function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],b=[1,6,7,11,13,14],N={trace:o(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:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(b,[2,11]),e(b,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),x=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);x.setInput(t,C.yy),C.yy.lexer=x,C.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var T=x.yylloc;n.push(T);var D=x.options&&x.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||x.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,Q,H={},Z,V,et,X;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var q="";X=[];for(Z in v[W])this.terminals_[Z]&&Z>L&&X.push("'"+this.terminals_[Z]+"'");x.showPosition?q="Parse error on line "+(I+1)+`: +import{a as o,Y as ot,aC as ut,aP as dt,k as yt,s as ft,x as pt,aT as it,W as gt,aR as kt,V as mt,aQ as wt,$ as _t,B as xt}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var tt=function(){var e=o(function(M,t,s,i){for(s=s||{},i=M.length;i--;s[M[i]]=t);return s},"o"),h=[1,4],r=[1,14],a=[1,12],l=[1,13],y=[6,7,8],f=[1,20],d=[1,18],m=[1,19],c=[6,7,11],k=[1,6,13,14],g=[1,23],_=[1,24],b=[1,6,7,11,13,14],N={trace:o(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:o(function(t,s,i,u,p,n,v){var w=n.length-1;switch(p){case 6:case 7:return u;case 15:u.addNode(n[w-1].length,n[w].trim());break;case 16:u.addNode(0,n[w].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:h},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:h},{6:r,7:[1,10],9:9,12:11,13:a,14:l},e(y,[2,3]),{1:[2,2]},e(y,[2,4]),e(y,[2,5]),{1:[2,6],6:r,12:15,13:a,14:l},{6:r,9:16,12:11,13:a,14:l},{6:f,7:d,10:17,11:m},e(c,[2,18],{14:[1,21]}),e(c,[2,16]),e(c,[2,17]),{6:f,7:d,10:22,11:m},{1:[2,7],6:r,12:15,13:a,14:l},e(k,[2,14],{7:g,11:_}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(c,[2,15]),e(k,[2,13],{7:g,11:_}),e(b,[2,11]),e(b,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:o(function(t,s){if(s.recoverable)this.trace(t);else{var i=new Error(t);throw i.hash=s,i}},"parseError"),parse:o(function(t){var s=this,i=[0],u=[],p=[null],n=[],v=this.table,w="",I=0,S=0,L=2,E=1,R=n.slice.call(arguments,1),x=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);x.setInput(t,C.yy),C.yy.lexer=x,C.yy.parser=this,typeof x.yylloc>"u"&&(x.yylloc={});var T=x.yylloc;n.push(T);var D=x.options&&x.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function j(P){i.length=i.length-2*P,p.length=p.length-P,n.length=n.length-P}o(j,"popStack");function z(){var P;return P=u.pop()||x.lex()||E,typeof P!="number"&&(P instanceof Array&&(u=P,P=u.pop()),P=s.symbols_[P]||P),P}o(z,"lex");for(var A,W,B,Q,H={},Z,V,et,X;;){if(W=i[i.length-1],this.defaultActions[W]?B=this.defaultActions[W]:((A===null||typeof A>"u")&&(A=z()),B=v[W]&&v[W][A]),typeof B>"u"||!B.length||!B[0]){var q="";X=[];for(Z in v[W])this.terminals_[Z]&&Z>L&&X.push("'"+this.terminals_[Z]+"'");x.showPosition?q="Parse error on line "+(I+1)+`: `+x.showPosition()+` Expecting `+X.join(", ")+", got '"+(this.terminals_[A]||A)+"'":q="Parse error on line "+(I+1)+": Unexpected "+(A==E?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(q,{text:x.match,token:this.terminals_[A]||A,line:x.yylineno,loc:T,expected:X})}if(B[0]instanceof Array&&B.length>1)throw new Error("Parse Error: multiple actions possible at state: "+W+", token: "+A);switch(B[0]){case 1:i.push(A),p.push(x.yytext),n.push(x.yylloc),i.push(B[1]),A=null,S=x.yyleng,w=x.yytext,I=x.yylineno,T=x.yylloc;break;case 2:if(V=this.productions_[B[1]][1],H.$=p[p.length-V],H._$={first_line:n[n.length-(V||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(V||1)].first_column,last_column:n[n.length-1].last_column},D&&(H._$.range=[n[n.length-(V||1)].range[0],n[n.length-1].range[1]]),Q=this.performAction.apply(H,[w,S,I,C.yy,B[1],p,n].concat(R)),typeof Q<"u")return Q;V&&(i=i.slice(0,-1*V*2),p=p.slice(0,-1*V),n=n.slice(0,-1*V)),i.push(this.productions_[B[1]][0]),p.push(H.$),n.push(H._$),et=v[i[i.length-2]][i[i.length-1]],i.push(et);break;case 3:return!0}}return!0},"parse")},O=function(){var M={EOF:1,parseError:o(function(s,i){if(this.yy.parser)this.yy.parser.parseError(s,i);else throw new Error(s)},"parseError"),setInput:o(function(t,s){return this.yy=s||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:o(function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var s=t.match(/(?:\r\n?|\n).*/g);return s?(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:o(function(t){var s=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-s),this.offset-=s;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),i.length-1&&(this.yylineno-=i.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:i?(i.length===u.length?this.yylloc.first_column:0)+u[u.length-i.length].length-i[0].length:this.yylloc.first_column-s},this.options.ranges&&(this.yylloc.range=[p[0],p[0]+this.yyleng-s]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(t){this.unput(this.match.slice(t))},"less"),pastInput:o(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:o(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:o(function(){var t=this.pastInput(),s=new Array(t.length+1).join("-");return t+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-BFiK1ovb.js b/veadk/webui/assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-CRQkoUAO.js similarity index 98% rename from veadk/webui/assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-BFiK1ovb.js rename to veadk/webui/assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-CRQkoUAO.js index 802b62758..2a38c2388 100644 --- a/veadk/webui/assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-BFiK1ovb.js +++ b/veadk/webui/assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-CRQkoUAO.js @@ -1,4 +1,4 @@ -import{g as gt}from"./chunk-5VM5RSS4-C2BXfYOP.js";import{d as mt,g as lt,f as xt,e as kt}from"./chunk-2GRJ4B5K-CbPivXt6.js";import{V as _t,aQ as vt,W as bt,aR as wt,$ as Tt,aT as St,a as s,Y as R,B as $t,s as Mt}from"./mermaid.core-BmHujEI0.js";import{aG as X}from"../../app/index-B71Wq9_t.js";import{d as it}from"../../chunks/arc-DjcXfbMc.js";import"../../chunks/purify.es-BnINGy_Y.js";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(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:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,K=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,W;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var G="";W=[];for(N in v[A])this.terminals_[N]&&N>yt&&W.push("'"+this.terminals_[N]+"'");_.showPosition?G="Parse error on line "+(C+1)+`: +import{g as gt}from"./chunk-5VM5RSS4-CqwEymVq.js";import{d as mt,g as lt,f as xt,e as kt}from"./chunk-2GRJ4B5K-CS99z7QO.js";import{V as _t,aQ as vt,W as bt,aR as wt,$ as Tt,aT as St,a as s,Y as R,B as $t,s as Mt}from"./mermaid.core-l-gs7P2Q.js";import{aG as X}from"../../app/index-BKQXvMzA.js";import{d as it}from"../../chunks/arc-DdnIeIBk.js";import"../../chunks/purify.es-BnINGy_Y.js";var U=function(){var t=s(function(h,r,n,l){for(n=n||{},l=h.length;l--;n[h[l]]=r);return n},"o"),e=[6,8,10,11,12,14,16,17,18],a=[1,9],f=[1,10],i=[1,11],u=[1,12],p=[1,13],o=[1,14],g={trace:s(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:s(function(r,n,l,y,d,c,v){var k=c.length-1;switch(d){case 1:return c[k-1];case 2:this.$=[];break;case 3:c[k-1].push(c[k]),this.$=c[k-1];break;case 4:case 5:this.$=c[k];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(c[k].substr(6)),this.$=c[k].substr(6);break;case 9:this.$=c[k].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=c[k].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(c[k].substr(8)),this.$=c[k].substr(8);break;case 13:y.addTask(c[k-1],c[k]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:a,12:f,14:i,16:u,17:p,18:o},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,n){if(n.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=n,l}},"parseError"),parse:s(function(r){var n=this,l=[0],y=[],d=[null],c=[],v=this.table,k="",C=0,K=0,yt=2,D=1,dt=c.slice.call(arguments,1),_=Object.create(this.lexer),I={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(I.yy[O]=this.yy[O]);_.setInput(r,I.yy),I.yy.lexer=_,I.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var Y=_.yylloc;c.push(Y);var ft=_.options&&_.options.ranges;typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(w){l.length=l.length-2*w,d.length=d.length-w,c.length=c.length-w}s(pt,"popStack");function tt(){var w;return w=y.pop()||_.lex()||D,typeof w!="number"&&(w instanceof Array&&(y=w,w=y.pop()),w=n.symbols_[w]||w),w}s(tt,"lex");for(var b,A,T,q,F={},N,M,et,W;;){if(A=l[l.length-1],this.defaultActions[A]?T=this.defaultActions[A]:((b===null||typeof b>"u")&&(b=tt()),T=v[A]&&v[A][b]),typeof T>"u"||!T.length||!T[0]){var G="";W=[];for(N in v[A])this.terminals_[N]&&N>yt&&W.push("'"+this.terminals_[N]+"'");_.showPosition?G="Parse error on line "+(C+1)+`: `+_.showPosition()+` Expecting `+W.join(", ")+", got '"+(this.terminals_[b]||b)+"'":G="Parse error on line "+(C+1)+": Unexpected "+(b==D?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(G,{text:_.match,token:this.terminals_[b]||b,line:_.yylineno,loc:Y,expected:W})}if(T[0]instanceof Array&&T.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+b);switch(T[0]){case 1:l.push(b),d.push(_.yytext),c.push(_.yylloc),l.push(T[1]),b=null,K=_.yyleng,k=_.yytext,C=_.yylineno,Y=_.yylloc;break;case 2:if(M=this.productions_[T[1]][1],F.$=d[d.length-M],F._$={first_line:c[c.length-(M||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(M||1)].first_column,last_column:c[c.length-1].last_column},ft&&(F._$.range=[c[c.length-(M||1)].range[0],c[c.length-1].range[1]]),q=this.performAction.apply(F,[k,K,C,I.yy,T[1],d,c].concat(dt)),typeof q<"u")return q;M&&(l=l.slice(0,-1*M*2),d=d.slice(0,-1*M),c=c.slice(0,-1*M)),l.push(this.productions_[T[1]][0]),d.push(F.$),c.push(F._$),et=v[l[l.length-2]][l[l.length-1]],l.push(et);break;case 3:return!0}}return!0},"parse")},m=function(){var h={EOF:1,parseError:s(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:s(function(r,n){return this.yy=n||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:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var n=r.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),r},"input"),unput:s(function(r){var n=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),l.length-1&&(this.yylineno-=l.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:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(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:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(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:s(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:s(function(){var r=this.pastInput(),n=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/kanban-definition-27J2QSJJ-C7k96D1U.js b/veadk/webui/assets/visualizations/mermaid/kanban-definition-27J2QSJJ-xw8e9791.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/kanban-definition-27J2QSJJ-C7k96D1U.js rename to veadk/webui/assets/visualizations/mermaid/kanban-definition-27J2QSJJ-xw8e9791.js index f276dc517..3ab656453 100644 --- a/veadk/webui/assets/visualizations/mermaid/kanban-definition-27J2QSJJ-C7k96D1U.js +++ b/veadk/webui/assets/visualizations/mermaid/kanban-definition-27J2QSJJ-xw8e9791.js @@ -1,4 +1,4 @@ -import{a as c,at as te,Y as W,aP as fe,ad as ye,ag as be,aG as me,aW as ke,O as K,aN as F,as as Ee,J as _e,ak as Se,ap as le,H as ce}from"./mermaid.core-BmHujEI0.js";import{g as Ne}from"./chunk-5VM5RSS4-C2BXfYOP.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var $=function(){var t=c(function(k,s,n,a){for(n=n||{},a=k.length;a--;n[k[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],H=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],M=[1,35],U=[1,36],A=[1,6,7,11,13,16,17,20,23],j=[1,38],V={trace:c(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:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){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: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:H}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:M,11:U}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:H}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:j}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:M,11:U}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:j}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;e.push(q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var _,R,v,Q,G={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((_===null||typeof _>"u")&&(_=ae()),v=B[R]&&B[R][_]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");m.showPosition?Z="Parse error on line "+(z+1)+`: +import{a as c,at as te,Y as W,aP as fe,ad as ye,ag as be,aG as me,aW as ke,O as K,aN as F,as as Ee,J as _e,ak as Se,ap as le,H as ce}from"./mermaid.core-l-gs7P2Q.js";import{g as Ne}from"./chunk-5VM5RSS4-CqwEymVq.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var $=function(){var t=c(function(k,s,n,a){for(n=n||{},a=k.length;a--;n[k[a]]=s);return n},"o"),g=[1,4],d=[1,13],r=[1,12],p=[1,15],E=[1,16],f=[1,20],h=[1,19],L=[6,7,8],C=[1,26],w=[1,24],N=[1,25],i=[6,7,11],H=[1,31],x=[6,7,11,24],P=[1,6,13,16,17,20,23],M=[1,35],U=[1,36],A=[1,6,7,11,13,16,17,20,23],j=[1,38],V={trace:c(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:c(function(s,n,a,o,u,e,B){var l=e.length-1;switch(u){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: ",e[l-1].id),o.addNode(e[l-2].length,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 16:o.getLogger().info("Node: ",e[l].id),o.addNode(e[l-1].length,e[l].id,e[l].descr,e[l].type);break;case 17:o.getLogger().trace("Icon: ",e[l]),o.decorateNode({icon:e[l]});break;case 18:case 23:o.decorateNode({class:e[l]});break;case 19:o.getLogger().trace("SPACELIST");break;case 20:o.getLogger().trace("Node: ",e[l-1].id),o.addNode(0,e[l-1].id,e[l-1].descr,e[l-1].type,e[l]);break;case 21:o.getLogger().trace("Node: ",e[l].id),o.addNode(0,e[l].id,e[l].descr,e[l].type);break;case 22:o.decorateNode({icon:e[l]});break;case 27:o.getLogger().trace("node found ..",e[l-2]),this.$={id:e[l-1],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 28:this.$={id:e[l],descr:e[l],type:0};break;case 29:o.getLogger().trace("node found ..",e[l-3]),this.$={id:e[l-3],descr:e[l-1],type:o.getType(e[l-2],e[l])};break;case 30:this.$=e[l-1]+e[l];break;case 31:this.$=e[l];break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:g},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:g},{6:d,7:[1,10],9:9,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(L,[2,3]),{1:[2,2]},t(L,[2,4]),t(L,[2,5]),{1:[2,6],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:d,9:22,12:11,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},{6:C,7:w,10:23,11:N},t(i,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:f,23:h}),t(i,[2,19]),t(i,[2,21],{15:30,24:H}),t(i,[2,22]),t(i,[2,23]),t(x,[2,25]),t(x,[2,26]),t(x,[2,28],{20:[1,32]}),{21:[1,33]},{6:C,7:w,10:34,11:N},{1:[2,7],6:d,12:21,13:r,14:14,16:p,17:E,18:17,19:18,20:f,23:h},t(P,[2,14],{7:M,11:U}),t(A,[2,8]),t(A,[2,9]),t(A,[2,10]),t(i,[2,16],{15:37,24:H}),t(i,[2,17]),t(i,[2,18]),t(i,[2,20],{24:j}),t(x,[2,31]),{21:[1,39]},{22:[1,40]},t(P,[2,13],{7:M,11:U}),t(A,[2,11]),t(A,[2,12]),t(i,[2,15],{24:j}),t(x,[2,30]),{22:[1,41]},t(x,[2,27]),t(x,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:c(function(s,n){if(n.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=n,a}},"parseError"),parse:c(function(s){var n=this,a=[0],o=[],u=[null],e=[],B=this.table,l="",z=0,ie=0,ue=2,re=1,ge=e.slice.call(arguments,1),m=Object.create(this.lexer),T={yy:{}};for(var J in this.yy)Object.prototype.hasOwnProperty.call(this.yy,J)&&(T.yy[J]=this.yy[J]);m.setInput(s,T.yy),T.yy.lexer=m,T.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var q=m.yylloc;e.push(q);var de=m.options&&m.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pe(S){a.length=a.length-2*S,u.length=u.length-S,e.length=e.length-S}c(pe,"popStack");function ae(){var S;return S=o.pop()||m.lex()||re,typeof S!="number"&&(S instanceof Array&&(o=S,S=o.pop()),S=n.symbols_[S]||S),S}c(ae,"lex");for(var _,R,v,Q,G={},X,I,oe,Y;;){if(R=a[a.length-1],this.defaultActions[R]?v=this.defaultActions[R]:((_===null||typeof _>"u")&&(_=ae()),v=B[R]&&B[R][_]),typeof v>"u"||!v.length||!v[0]){var Z="";Y=[];for(X in B[R])this.terminals_[X]&&X>ue&&Y.push("'"+this.terminals_[X]+"'");m.showPosition?Z="Parse error on line "+(z+1)+`: `+m.showPosition()+` Expecting `+Y.join(", ")+", got '"+(this.terminals_[_]||_)+"'":Z="Parse error on line "+(z+1)+": Unexpected "+(_==re?"end of input":"'"+(this.terminals_[_]||_)+"'"),this.parseError(Z,{text:m.match,token:this.terminals_[_]||_,line:m.yylineno,loc:q,expected:Y})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+R+", token: "+_);switch(v[0]){case 1:a.push(_),u.push(m.yytext),e.push(m.yylloc),a.push(v[1]),_=null,ie=m.yyleng,l=m.yytext,z=m.yylineno,q=m.yylloc;break;case 2:if(I=this.productions_[v[1]][1],G.$=u[u.length-I],G._$={first_line:e[e.length-(I||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(I||1)].first_column,last_column:e[e.length-1].last_column},de&&(G._$.range=[e[e.length-(I||1)].range[0],e[e.length-1].range[1]]),Q=this.performAction.apply(G,[l,ie,z,T.yy,v[1],u,e].concat(ge)),typeof Q<"u")return Q;I&&(a=a.slice(0,-1*I*2),u=u.slice(0,-1*I),e=e.slice(0,-1*I)),a.push(this.productions_[v[1]][0]),u.push(G.$),e.push(G._$),oe=B[a[a.length-2]][a[a.length-1]],a.push(oe);break;case 3:return!0}}return!0},"parse")},y=function(){var k={EOF:1,parseError:c(function(n,a){if(this.yy.parser)this.yy.parser.parseError(n,a);else throw new Error(n)},"parseError"),setInput:c(function(s,n){return this.yy=n||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:c(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var n=s.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),s},"input"),unput:c(function(s){var n=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===o.length?this.yylloc.first_column:0)+o[o.length-a.length].length-a[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:c(function(){return this._more=!0,this},"more"),reject:c(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:c(function(s){this.unput(this.match.slice(s))},"less"),pastInput:c(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:c(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:c(function(){var s=this.pastInput(),n=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/mermaid.core-BmHujEI0.js b/veadk/webui/assets/visualizations/mermaid/mermaid.core-l-gs7P2Q.js similarity index 98% rename from veadk/webui/assets/visualizations/mermaid/mermaid.core-BmHujEI0.js rename to veadk/webui/assets/visualizations/mermaid/mermaid.core-l-gs7P2Q.js index b84057933..e164e90b4 100644 --- a/veadk/webui/assets/visualizations/mermaid/mermaid.core-BmHujEI0.js +++ b/veadk/webui/assets/visualizations/mermaid/mermaid.core-l-gs7P2Q.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/dagre-VZM6K2ZE-CQJoiPmN.js","assets/visualizations/mermaid/chunk-RYQCIY6F-CnbyImnC.js","assets/chunks/graph-Dqkl27Ch.js","assets/chunks/map-8WAJQ6ap.js","assets/chunks/layout-B6FSD_Du.js","assets/app/index-B71Wq9_t.js","assets/styles/index-_lutWX9f.css","assets/chunks/purify.es-BnINGy_Y.js","assets/visualizations/mermaid/swimlanes-SLNWSIFB-CdZ5MJJx.js","assets/visualizations/mermaid/cose-bilkent-JH36ORCC-J3LbU0Uq.js","assets/chunks/cytoscape.esm-Dz9tvMTw.js","assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BpEevA0S.js","assets/visualizations/mermaid/chunk-2GRJ4B5K-CbPivXt6.js","assets/visualizations/mermaid/flowDiagram-UKHOOZJN-R6bpi1xK.js","assets/visualizations/mermaid/chunk-5VM5RSS4-C2BXfYOP.js","assets/visualizations/mermaid/chunk-XXDRQBXY-CLLbPKnJ.js","assets/visualizations/mermaid/chunk-KBJHAD2P-fr6wew8I.js","assets/chunks/channel-BdZyURAQ.js","assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-BMkr3t22.js","assets/visualizations/mermaid/erDiagram-JOGREHBK-12XpgwsP.js","assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-BWMNUzLG.js","assets/visualizations/mermaid/chunk-2Q5K7J3B-DM9SBI1P.js","assets/visualizations/mermaid/chunk-JWPE2WC7-BHkERHFx.js","assets/visualizations/mermaid/cynefin-OW5HDTMX-DjTRskiD.js","assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-WAuAqH0n.js","assets/chunks/linear-BV49BAJJ.js","assets/chunks/init-Gi6I4Gst.js","assets/chunks/defaultLocale-CrowFXzY.js","assets/visualizations/mermaid/infoDiagram-6WML65LV-0JM35C6y.js","assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-BrA5klpF.js","assets/chunks/arc-DjcXfbMc.js","assets/chunks/ordinal-Cboi1Yqb.js","assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CDVP-ZKS.js","assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-CPeU8I9x.js","assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-QwdhgEBj.js","assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-C9N8vEHe.js","assets/visualizations/mermaid/classDiagram-JCYQIIEL-Td6lpiVM.js","assets/visualizations/mermaid/chunk-GF5L2VYU-_IA0EfRa.js","assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-Td6lpiVM.js","assets/visualizations/mermaid/stateDiagram-OKZ733FA-BL0QLRfE.js","assets/visualizations/mermaid/chunk-5RXB4S5H-Vs8JZSfc.js","assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-CpJ0zz2a.js","assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-BFiK1ovb.js","assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Bn8XN_8j.js","assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cpyl-vxZ.js","assets/visualizations/mermaid/kanban-definition-27J2QSJJ-C7k96D1U.js","assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CvITRODF.js","assets/visualizations/mermaid/diagram-LBJQPF4R-D7NktxbC.js","assets/visualizations/mermaid/diagram-UB23O5K3-CRpFtaV-.js","assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-CzbrD03k.js","assets/visualizations/mermaid/diagram-7IWD3JNH-BsrwcXvB.js","assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DYHZqCQm.js","assets/visualizations/mermaid/diagram-B4RE2ZJO-D-dGX5fr.js","assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-BXVf3hK9.js","assets/visualizations/mermaid/vennDiagram-T6HMQDX7-Cg1-J_4F.js","assets/visualizations/mermaid/diagram-Q27KOJAE-6zI0fV8V.js","assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-BBivfUdi.js","assets/visualizations/mermaid/cynefinDiagram-MW4NZA55-D1e-nCDk.js","assets/visualizations/mermaid/railroadDiagram-AXF67PYL-BLzRIX9p.js","assets/visualizations/mermaid/chunk-6Q2QTUOP-BK6W1hz6.js","assets/visualizations/mermaid/ebnfDiagram-BXEA7PRR-BqBwA3d9.js","assets/visualizations/mermaid/abnfDiagram-N423BO3Z-DJZZ0-Xb.js","assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bl4rZ4lT.js"])))=>i.map(i=>d[i]); -var gg=Object.defineProperty;var pg=(e,t,r)=>t in e?gg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xt=(e,t,r)=>pg(e,typeof t!="symbol"?t+"":t,r);import{ad as fg,U as mg,_ as ht,aG as ct}from"../../app/index-B71Wq9_t.js";import fr from"../../chunks/purify.es-BnINGy_Y.js";var pl=Object.defineProperty,p=(e,t)=>pl(e,"name",{value:t,configurable:!0}),yg=(e,t)=>{for(var r in t)pl(e,r,{get:t[r],enumerable:!0})},fl={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(mg,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",l="minute",n="hour",c="day",h="week",d="month",g="quarter",u="year",y="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,b={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($){var F=["th","st","nd","rd"],_=$%100;return"["+$+(F[(_-20)%10]||F[_]||F[0])+"]"}},k=function($,F,_){var E=String($);return!E||E.length>=F?$:""+Array(F+1-E.length).join(_)+$},S={s:k,z:function($){var F=-$.utcOffset(),_=Math.abs(F),E=Math.floor(_/60),M=_%60;return(F<=0?"+":"-")+k(E,2,"0")+":"+k(M,2,"0")},m:function $(F,_){if(F.date()<_.date())return-$(_,F);var E=12*(_.year()-F.year())+(_.month()-F.month()),M=F.clone().add(E,d),R=_-M<0,N=F.clone().add(E+(R?-1:1),d);return+(-(E+(_-M)/(R?M-N:N-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:y,h:n,m:l,s:o,ms:a,Q:g}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},T="en",w={};w[T]=b;var L="$isDayjsObject",v=function($){return $ instanceof H||!(!$||!$[L])},W=function $(F,_,E){var M;if(!F)return T;if(typeof F=="string"){var R=F.toLowerCase();w[R]&&(M=R),_&&(w[R]=_,M=R);var N=F.split("-");if(!M&&N.length>1)return $(N[0])}else{var U=F.name;w[U]=F,M=U}return!E&&M&&(T=M),M||!E&&T},P=function($,F){if(v($))return $.clone();var _=typeof F=="object"?F:{};return _.date=$,_.args=arguments,new H(_)},A=S;A.l=W,A.i=v,A.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var H=function(){function $(_){this.$L=W(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[L]=!0}var F=$.prototype;return F.parse=function(_){this.$d=function(E){var M=E.date,R=E.utc;if(M===null)return new Date(NaN);if(A.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var N=M.match(m);if(N){var U=N[2]-1||0,Z=(N[7]||"0").substring(0,3);return R?new Date(Date.UTC(N[1],U,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Z)):new Date(N[1],U,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Z)}}return new Date(M)}(_),this.init()},F.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},F.$utils=function(){return A},F.isValid=function(){return this.$d.toString()!==f},F.isSame=function(_,E){var M=P(_);return this.startOf(E)<=M&&M<=this.endOf(E)},F.isAfter=function(_,E){return P(_){},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ua=p(function(e="fatal"){let t=ue.fatal;typeof e=="string"?e.toLowerCase()in ue&&(t=ue[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=ue.fatal&&(z.fatal=console.error?console.error.bind(console,Xt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Xt("FATAL"))),t<=ue.error&&(z.error=console.error?console.error.bind(console,Xt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Xt("ERROR"))),t<=ue.warn&&(z.warn=console.warn?console.warn.bind(console,Xt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Xt("WARN"))),t<=ue.info&&(z.info=console.info?console.info.bind(console,Xt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Xt("INFO"))),t<=ue.debug&&(z.debug=console.debug?console.debug.bind(console,Xt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xt("DEBUG"))),t<=ue.trace&&(z.trace=console.debug?console.debug.bind(console,Xt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xt("TRACE")))},"setLogLevel"),Xt=p(e=>`%c${xg().format("ss.SSS")} : ${e} : `,"format");const di={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=>{const 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<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return di.hue2rgb(a,s,e+1/3)*255;case"g":return di.hue2rgb(a,s,e)*255;case"b":return di.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const l=s-a,n=o>.5?l/(2-s-a):l/(s+a);if(i==="s")return n*100;switch(s){case e:return((t-r)/l+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},kg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:di,lang:bg,unit:kg},xe={};for(let e=0;e<=255;e++)xe[e]=nt.unit.dec2hex(e);const Ot={ALL:0,RGB:1,HSL:2};class Sg{constructor(){this.type=Ot.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=Ot.ALL}is(t){return this.type===t}}class Tg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Sg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ot.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ot.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ot.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ot.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ot.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ot.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ot.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ui=new Tg({r:0,g:0,b:0,a:0},"transparent"),Je={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Je.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,l=o?1:17,n=o?8:4,c=a?0:-1,h=o?255:15;return Ui.set({r:(i>>n*(c+3)&h)*l,g:(i>>n*(c+2)&h)*l,b:(i>>n*(c+1)&h)*l,a:a?(i&h)*l/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${xe[Math.round(t)]}${xe[Math.round(r)]}${xe[Math.round(i)]}${xe[Math.round(s*255)]}`:`#${xe[Math.round(t)]}${xe[Math.round(r)]}${xe[Math.round(i)]}`}},$e={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=>{const t=e.match($e.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match($e.re);if(!r)return;const[,i,s,a,o,l]=r;return Ui.set({h:$e._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Ir={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();const t=Ir.colors[e];if(t)return Je.parse(t)},stringify:e=>{const t=Je.stringify(e);for(const r in Ir.colors)if(Ir.colors[r]===t)return r}},Mr={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=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Mr.re);if(!r)return;const[,i,s,a,o,l,n,c,h]=r;return Ui.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(n?parseFloat(l)*2.55:parseFloat(l)),a:c?nt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},oe={format:{keyword:Ir,hex:Je,rgb:Mr,rgba:Mr,hsl:$e,hsla:$e},parse:e=>{if(typeof e!="string")return e;const t=Je.parse(e)||Mr.parse(e)||$e.parse(e)||Ir.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ot.HSL)||e.data.r===void 0?$e.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Mr.stringify(e):Je.stringify(e)},ml=(e,t)=>{const r=oe.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return oe.stringify(r)},Se=(e,t,r=0,i=1)=>{if(typeof e!="number")return ml(e,{a:t});const s=Ui.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return oe.stringify(s)},wg=e=>{const{r:t,g:r,b:i}=oe.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},Bg=e=>wg(e)>=.5,re=e=>!Bg(e),yl=(e,t,r)=>{const i=oe.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),oe.stringify(i)},I=(e,t)=>yl(e,"l",t),D=(e,t)=>yl(e,"l",-t),x=(e,t)=>{const r=oe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return ml(e,i)},_g=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=oe.parse(e),{r:l,g:n,b:c,a:h}=oe.parse(t),d=r/100,g=d*2-1,u=o-h,f=((g*u===-1?g:(g+u)/(1+g*u))+1)/2,m=1-f,C=i*f+l*m,b=s*f+n*m,k=a*f+c*m,S=o*d+h*(1-d);return Se(C,b,k,S)},B=(e,t=100)=>{const r=oe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_g(r,e,t)};var ks=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ks(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),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"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=ks(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Ft=ks,ne="#ffffff",he="#f2f2f2",at=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),er,vg=(er=class{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(){var r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft,O;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10)):(this.rowOdd=this.rowOdd||I(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let lt=0;lt{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(er,"Theme"),er),Lg=p(e=>{const t=new vg;return t.calculate(e),t},"getThemeVariables"),rr,Fg=(rr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Se(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=D("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=D(this.sectionBkgColor,10),this.taskBorderColor=Se(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Se(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||I(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.secondBkg=I(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=I(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=I(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=B(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let O=0;O{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(rr,"Theme"),rr),Mg=p(e=>{const t=new Fg;return t.calculate(e),t},"getThemeVariables"),ir,Ag=(ir=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=at(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=Se(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let O=0;O{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ir,"Theme"),ir),Eg=p(e=>{const t=new Ag;return t.calculate(e),t},"getThemeVariables"),sr,$g=(sr=class{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=I("#cde498",10),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.primaryColor),this.lineColor=B(this.background),this.textColor=B(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.actorBorder=D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let O=0;O{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(sr,"Theme"),sr),Og=p(e=>{const t=new $g;return t.calculate(e),t},"getThemeVariables"),ar,Ig=(ar=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=I(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(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||I(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.secondBkg=I(this.contrast,55),this.border2=this.contrast,this.actorBorder=I(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 O=0;O{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ar,"Theme"),ar),Dg=p(e=>{const t=new Ig;return t.calculate(e),t},"getThemeVariables"),or,Pg=(or=class{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=at(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(){var a,o,l,n,c,h,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||I(t,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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(or,"Theme"),or),Rg=p(e=>{const t=new Pg;return t.calculate(e),t},"getThemeVariables"),lr,qg=(lr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.border1="#ccc",this.border2=Se(255,255,255,.25),this.arrowheadColor=B(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(){var r,i,s,a,o,l,n,c,h,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(lr,"Theme"),lr),Wg=p(e=>{const t=new qg;return t.calculate(e),t},"getThemeVariables"),nr,zg=(nr=class{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=at("#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(){var a,o,l,n,c,h,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||I(t,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 m=0;m{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(nr,"Theme"),nr),Ng=p(e=>{const t=new zg;return t.calculate(e),t},"getThemeVariables"),hr,Hg=(hr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.border1="#ccc",this.border2=Se(255,255,255,.25),this.arrowheadColor=B(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(){var r,i,s,a,o,l,n,c,h,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(hr,"Theme"),hr),Yg=p(e=>{const t=new Hg;return t.calculate(e),t},"getThemeVariables"),cr,jg=(cr=class{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=at(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(){var a,o,l,n,c,h,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||I(t,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 m=0;m{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(cr,"Theme"),cr),Ug=p(e=>{const t=new jg;return t.calculate(e),t},"getThemeVariables"),dr,Xg=(dr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.border1="#ccc",this.border2=Se(255,255,255,.25),this.arrowheadColor=B(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(){var r,i,s,a,o,l,n,c,h,d,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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 u=0;u{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(dr,"Theme"),dr),Gg=p(e=>{const t=new Xg;return t.calculate(e),t},"getThemeVariables"),fe={base:{getThemeVariables:Lg},dark:{getThemeVariables:Mg},default:{getThemeVariables:Eg},forest:{getThemeVariables:Og},neutral:{getThemeVariables:Dg},neo:{getThemeVariables:Rg},"neo-dark":{getThemeVariables:Wg},redux:{getThemeVariables:Ng},"redux-dark":{getThemeVariables:Yg},"redux-color":{getThemeVariables:Ug},"redux-dark-color":{getThemeVariables:Gg}},At={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,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},Cl={...At,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:fe.default.getThemeVariables(),sequence:{...At.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...At.gantt,tickInterval:void 0,useWidth:void 0},c4:{...At.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...At.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...At.pie,useWidth:984},xyChart:{...At.xyChart,useWidth:void 0},requirement:{...At.requirement,useWidth:void 0},packet:{...At.packet},eventmodeling:{...At.eventmodeling},treeView:{...At.treeView,useWidth:void 0},radar:{...At.radar},railroad:{...At.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:{...At.ishikawa},sankey:{...At.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:{...At.venn},cynefin:{...At.cynefin}},xl=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...xl(e[i],"")]:[...r,t+i],[]),"keyify"),Vg=new Set(xl(Cl,"")),bl=Cl,Zg={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Qg=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(z.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ki=p(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ki(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Vg.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Zg[t];i?Qg(e[t],i):(z.debug("sanitizing object",t),ki(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=kl(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),kl=p(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ht=Ft({},mr),Si,Pe=[],Dr=Ft({},mr),Vr=p((e,t)=>{let r=Ft({},e),i={};for(const s of t)wl(s),i=Ft(i,s);if(r=Ft(r,i),i.theme&&i.theme in fe){const s=Ft({},Si),a=Ft(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in fe&&(r.themeVariables=fe[r.theme].getThemeVariables(a))}return Dr=r,ip(Dr),Dr},"updateCurrentConfig"),Kg=p(e=>(Ht=Ft({},mr),Ht=Ft(Ht,e),e.theme&&fe[e.theme]&&(Ht.themeVariables=fe[e.theme].getThemeVariables(e.themeVariables)),Vr(Ht,Pe),Ht),"setSiteConfig"),Jg=p(e=>{Si=Ft({},e)},"saveConfigFromInitialize"),tp=p(e=>(Ht=Ft(Ht,e),Vr(Ht,Pe),Ht),"updateSiteConfig"),Sl=p(()=>Ft({},Ht),"getSiteConfig"),Tl=p(e=>(Vr(Dr,[e]),Tt()),"setConfig"),Tt=p(()=>Ft({},Dr),"getConfig"),wl=p(e=>{e&&(["secure",...Ht.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&wl(e[t])}))},"sanitize"),ep=p(e=>{var t;ki(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Pe.push(e),Vr(Ht,Pe)},"addDirective"),Ti=p((e=Ht)=>{Pe=[],Vr(e,Pe)},"reset"),rp={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."},no={},Bl=p(e=>{no[e]||(z.warn(rp[e]),no[e]=!0)},"issueWarning"),ip=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Bl("LAZY_LOAD_DEPRECATED")},"checkConfig"),$1=p(()=>{let e={};Si&&(e=Ft(e,Si));for(const t of Pe)e=Ft(e,t);return e},"getUserDefinedConfig"),zt=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Bl("FLOWCHART_HTML_LABELS_DEPRECATED"),ce(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),_l=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Pr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sp=/\s*%%.*\n/gm,ur,vl=(ur=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(ur,"UnknownDiagramError"),ur),Re={},ga=p(function(e,t){e=e.replace(_l,"").replace(Pr,"").replace(sp,` +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/dagre-VZM6K2ZE-DE-32FKg.js","assets/visualizations/mermaid/chunk-RYQCIY6F-ChBtCdXE.js","assets/chunks/graph-Dqkl27Ch.js","assets/chunks/map-8WAJQ6ap.js","assets/chunks/layout-B6FSD_Du.js","assets/app/index-BKQXvMzA.js","assets/styles/index-_lutWX9f.css","assets/chunks/purify.es-BnINGy_Y.js","assets/visualizations/mermaid/swimlanes-SLNWSIFB-jvKPpuQV.js","assets/visualizations/mermaid/cose-bilkent-JH36ORCC-CrvhfXGX.js","assets/chunks/cytoscape.esm-Dz9tvMTw.js","assets/visualizations/mermaid/c4Diagram-5PPSVZJV-BFmGnVzX.js","assets/visualizations/mermaid/chunk-2GRJ4B5K-CS99z7QO.js","assets/visualizations/mermaid/flowDiagram-UKHOOZJN-DzYHoGpB.js","assets/visualizations/mermaid/chunk-5VM5RSS4-CqwEymVq.js","assets/visualizations/mermaid/chunk-XXDRQBXY-B5A5gE3j.js","assets/visualizations/mermaid/chunk-KBJHAD2P-mhv9-tYP.js","assets/chunks/channel-B_2bNWok.js","assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-C8NvlDQ9.js","assets/visualizations/mermaid/erDiagram-JOGREHBK-CzTFZT70.js","assets/visualizations/mermaid/gitGraphDiagram-DS77QQ5N-65BqAvcN.js","assets/visualizations/mermaid/chunk-2Q5K7J3B-BiO2G8-N.js","assets/visualizations/mermaid/chunk-JWPE2WC7-BDxoW4e4.js","assets/visualizations/mermaid/cynefin-OW5HDTMX-C5XPyQRb.js","assets/visualizations/mermaid/ganttDiagram-PKOTCBZU-3Xvb05xn.js","assets/chunks/linear-apY3LTrF.js","assets/chunks/init-Gi6I4Gst.js","assets/chunks/defaultLocale-CrowFXzY.js","assets/visualizations/mermaid/infoDiagram-6WML65LV-BQIcZuqW.js","assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-Q4qQKLJC.js","assets/chunks/arc-DdnIeIBk.js","assets/chunks/ordinal-Cboi1Yqb.js","assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CganP-3e.js","assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-BDJd28OA.js","assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-L5P0T9H0.js","assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-DKbPiUDi.js","assets/visualizations/mermaid/classDiagram-JCYQIIEL-ZlJQDxsM.js","assets/visualizations/mermaid/chunk-GF5L2VYU-CvS75Pir.js","assets/visualizations/mermaid/classDiagram-v2-OCEON4UE-ZlJQDxsM.js","assets/visualizations/mermaid/stateDiagram-OKZ733FA-RX0oBJXb.js","assets/visualizations/mermaid/chunk-5RXB4S5H-DevQkzhU.js","assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-DPY60Pq_.js","assets/visualizations/mermaid/journeyDiagram-NVQOT4AX-CRQkoUAO.js","assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Can7C2Bd.js","assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cv0OruxG.js","assets/visualizations/mermaid/kanban-definition-27J2QSJJ-xw8e9791.js","assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CxpNyMw0.js","assets/visualizations/mermaid/diagram-LBJQPF4R-Cf65bt31.js","assets/visualizations/mermaid/diagram-UB23O5K3-XFaYvyOH.js","assets/visualizations/mermaid/blockDiagram-VBNYF7ZC-DMtlrKi5.js","assets/visualizations/mermaid/diagram-7IWD3JNH-nHKkQ5Y4.js","assets/visualizations/mermaid/architectureDiagram-T3A2C74G-DHyZBlpG.js","assets/visualizations/mermaid/diagram-B4RE2ZJO-C-VEU8cy.js","assets/visualizations/mermaid/ishikawaDiagram-WSZJBQD7-Cinhiu5k.js","assets/visualizations/mermaid/vennDiagram-T6HMQDX7-3MobAuu9.js","assets/visualizations/mermaid/diagram-Q27KOJAE-DGFV5XF3.js","assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-DqpjWRCB.js","assets/visualizations/mermaid/cynefinDiagram-MW4NZA55-DVZnWpVZ.js","assets/visualizations/mermaid/railroadDiagram-AXF67PYL-CzUuBkaY.js","assets/visualizations/mermaid/chunk-6Q2QTUOP-CKQiwqPP.js","assets/visualizations/mermaid/ebnfDiagram-BXEA7PRR-CGft_6NF.js","assets/visualizations/mermaid/abnfDiagram-N423BO3Z-CvKroTip.js","assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bf8InnTD.js"])))=>i.map(i=>d[i]); +var gg=Object.defineProperty;var pg=(e,t,r)=>t in e?gg(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var xt=(e,t,r)=>pg(e,typeof t!="symbol"?t+"":t,r);import{ad as fg,U as mg,_ as ht,aG as ct}from"../../app/index-BKQXvMzA.js";import fr from"../../chunks/purify.es-BnINGy_Y.js";var pl=Object.defineProperty,p=(e,t)=>pl(e,"name",{value:t,configurable:!0}),yg=(e,t)=>{for(var r in t)pl(e,r,{get:t[r],enumerable:!0})},fl={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(mg,function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",l="minute",n="hour",c="day",h="week",d="month",g="quarter",u="year",y="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|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,b={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($){var F=["th","st","nd","rd"],_=$%100;return"["+$+(F[(_-20)%10]||F[_]||F[0])+"]"}},k=function($,F,_){var E=String($);return!E||E.length>=F?$:""+Array(F+1-E.length).join(_)+$},S={s:k,z:function($){var F=-$.utcOffset(),_=Math.abs(F),E=Math.floor(_/60),M=_%60;return(F<=0?"+":"-")+k(E,2,"0")+":"+k(M,2,"0")},m:function $(F,_){if(F.date()<_.date())return-$(_,F);var E=12*(_.year()-F.year())+(_.month()-F.month()),M=F.clone().add(E,d),R=_-M<0,N=F.clone().add(E+(R?-1:1),d);return+(-(E+(_-M)/(R?M-N:N-M))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:d,y:u,w:h,d:c,D:y,h:n,m:l,s:o,ms:a,Q:g}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},T="en",w={};w[T]=b;var L="$isDayjsObject",v=function($){return $ instanceof H||!(!$||!$[L])},W=function $(F,_,E){var M;if(!F)return T;if(typeof F=="string"){var R=F.toLowerCase();w[R]&&(M=R),_&&(w[R]=_,M=R);var N=F.split("-");if(!M&&N.length>1)return $(N[0])}else{var U=F.name;w[U]=F,M=U}return!E&&M&&(T=M),M||!E&&T},P=function($,F){if(v($))return $.clone();var _=typeof F=="object"?F:{};return _.date=$,_.args=arguments,new H(_)},A=S;A.l=W,A.i=v,A.w=function($,F){return P($,{locale:F.$L,utc:F.$u,x:F.$x,$offset:F.$offset})};var H=function(){function $(_){this.$L=W(_.locale,null,!0),this.parse(_),this.$x=this.$x||_.x||{},this[L]=!0}var F=$.prototype;return F.parse=function(_){this.$d=function(E){var M=E.date,R=E.utc;if(M===null)return new Date(NaN);if(A.u(M))return new Date;if(M instanceof Date)return new Date(M);if(typeof M=="string"&&!/Z$/i.test(M)){var N=M.match(m);if(N){var U=N[2]-1||0,Z=(N[7]||"0").substring(0,3);return R?new Date(Date.UTC(N[1],U,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Z)):new Date(N[1],U,N[3]||1,N[4]||0,N[5]||0,N[6]||0,Z)}}return new Date(M)}(_),this.init()},F.init=function(){var _=this.$d;this.$y=_.getFullYear(),this.$M=_.getMonth(),this.$D=_.getDate(),this.$W=_.getDay(),this.$H=_.getHours(),this.$m=_.getMinutes(),this.$s=_.getSeconds(),this.$ms=_.getMilliseconds()},F.$utils=function(){return A},F.isValid=function(){return this.$d.toString()!==f},F.isSame=function(_,E){var M=P(_);return this.startOf(E)<=M&&M<=this.endOf(E)},F.isAfter=function(_,E){return P(_){},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},ua=p(function(e="fatal"){let t=ue.fatal;typeof e=="string"?e.toLowerCase()in ue&&(t=ue[e]):typeof e=="number"&&(t=e),z.trace=()=>{},z.debug=()=>{},z.info=()=>{},z.warn=()=>{},z.error=()=>{},z.fatal=()=>{},t<=ue.fatal&&(z.fatal=console.error?console.error.bind(console,Xt("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Xt("FATAL"))),t<=ue.error&&(z.error=console.error?console.error.bind(console,Xt("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Xt("ERROR"))),t<=ue.warn&&(z.warn=console.warn?console.warn.bind(console,Xt("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Xt("WARN"))),t<=ue.info&&(z.info=console.info?console.info.bind(console,Xt("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Xt("INFO"))),t<=ue.debug&&(z.debug=console.debug?console.debug.bind(console,Xt("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xt("DEBUG"))),t<=ue.trace&&(z.trace=console.debug?console.debug.bind(console,Xt("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Xt("TRACE")))},"setLogLevel"),Xt=p(e=>`%c${xg().format("ss.SSS")} : ${e} : `,"format");const di={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=>{const 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<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return di.hue2rgb(a,s,e+1/3)*255;case"g":return di.hue2rgb(a,s,e)*255;case"b":return di.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const l=s-a,n=o>.5?l/(2-s-a):l/(s+a);if(i==="s")return n*100;switch(s){case e:return((t-r)/l+(tt>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},kg={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},nt={channel:di,lang:bg,unit:kg},xe={};for(let e=0;e<=255;e++)xe[e]=nt.unit.dec2hex(e);const Ot={ALL:0,RGB:1,HSL:2};class Sg{constructor(){this.type=Ot.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=Ot.ALL}is(t){return this.type===t}}class Tg{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Sg}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ot.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=nt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=nt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=nt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=nt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=nt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=nt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ot.HSL)&&r!==void 0?r:(this._ensureHSL(),nt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ot.RGB)&&r!==void 0?r:(this._ensureRGB(),nt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ot.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ot.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ot.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ot.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ot.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ot.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ui=new Tg({r:0,g:0,b:0,a:0},"transparent"),Je={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(Je.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,l=o?1:17,n=o?8:4,c=a?0:-1,h=o?255:15;return Ui.set({r:(i>>n*(c+3)&h)*l,g:(i>>n*(c+2)&h)*l,b:(i>>n*(c+1)&h)*l,a:a?(i&h)*l/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${xe[Math.round(t)]}${xe[Math.round(r)]}${xe[Math.round(i)]}${xe[Math.round(s*255)]}`:`#${xe[Math.round(t)]}${xe[Math.round(r)]}${xe[Math.round(i)]}`}},$e={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=>{const t=e.match($e.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return nt.channel.clamp.h(parseFloat(r)*.9);case"rad":return nt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return nt.channel.clamp.h(parseFloat(r)*360)}}return nt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match($e.re);if(!r)return;const[,i,s,a,o,l]=r;return Ui.set({h:$e._hue2deg(i),s:nt.channel.clamp.s(parseFloat(s)),l:nt.channel.clamp.l(parseFloat(a)),a:o?nt.channel.clamp.a(l?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%, ${s})`:`hsl(${nt.lang.round(t)}, ${nt.lang.round(r)}%, ${nt.lang.round(i)}%)`}},Ir={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();const t=Ir.colors[e];if(t)return Je.parse(t)},stringify:e=>{const t=Je.stringify(e);for(const r in Ir.colors)if(Ir.colors[r]===t)return r}},Mr={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=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Mr.re);if(!r)return;const[,i,s,a,o,l,n,c,h]=r;return Ui.set({r:nt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:nt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:nt.channel.clamp.b(n?parseFloat(l)*2.55:parseFloat(l)),a:c?nt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)}, ${nt.lang.round(s)})`:`rgb(${nt.lang.round(t)}, ${nt.lang.round(r)}, ${nt.lang.round(i)})`}},oe={format:{keyword:Ir,hex:Je,rgb:Mr,rgba:Mr,hsl:$e,hsla:$e},parse:e=>{if(typeof e!="string")return e;const t=Je.parse(e)||Mr.parse(e)||$e.parse(e)||Ir.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ot.HSL)||e.data.r===void 0?$e.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Mr.stringify(e):Je.stringify(e)},ml=(e,t)=>{const r=oe.parse(e);for(const i in t)r[i]=nt.channel.clamp[i](t[i]);return oe.stringify(r)},Se=(e,t,r=0,i=1)=>{if(typeof e!="number")return ml(e,{a:t});const s=Ui.set({r:nt.channel.clamp.r(e),g:nt.channel.clamp.g(t),b:nt.channel.clamp.b(r),a:nt.channel.clamp.a(i)});return oe.stringify(s)},wg=e=>{const{r:t,g:r,b:i}=oe.parse(e),s=.2126*nt.channel.toLinear(t)+.7152*nt.channel.toLinear(r)+.0722*nt.channel.toLinear(i);return nt.lang.round(s)},Bg=e=>wg(e)>=.5,re=e=>!Bg(e),yl=(e,t,r)=>{const i=oe.parse(e),s=i[t],a=nt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),oe.stringify(i)},I=(e,t)=>yl(e,"l",t),D=(e,t)=>yl(e,"l",-t),x=(e,t)=>{const r=oe.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return ml(e,i)},_g=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=oe.parse(e),{r:l,g:n,b:c,a:h}=oe.parse(t),d=r/100,g=d*2-1,u=o-h,f=((g*u===-1?g:(g+u)/(1+g*u))+1)/2,m=1-f,C=i*f+l*m,b=s*f+n*m,k=a*f+c*m,S=o*d+h*(1-d);return Se(C,b,k,S)},B=(e,t=100)=>{const r=oe.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,_g(r,e,t)};var ks=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>ks(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),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"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=ks(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),Ft=ks,ne="#ffffff",he="#f2f2f2",at=p((e,t)=>t?x(e,{s:-40,l:10}):x(e,{s:-40,l:-10}),"mkBorder"),er,vg=(er=class{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(){var r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft,O;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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||D(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(this.mainBkg,10)):(this.rowOdd=this.rowOdd||I(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let lt=0;lt{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(er,"Theme"),er),Lg=p(e=>{const t=new vg;return t.calculate(e),t},"getThemeVariables"),rr,Fg=(rr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Se(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=D("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=D(this.sectionBkgColor,10),this.taskBorderColor=Se(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Se(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||I(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||D(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.secondBkg=I(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=I(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=I(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=B(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=x(this.primaryColor,{h:64}),this.fillType3=x(this.secondaryColor,{h:64}),this.fillType4=x(this.primaryColor,{h:-64}),this.fillType5=x(this.secondaryColor,{h:-64}),this.fillType6=x(this.primaryColor,{h:128}),this.fillType7=x(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330});for(let O=0;O{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(rr,"Theme"),rr),Mg=p(e=>{const t=new Fg;return t.calculate(e),t},"getThemeVariables"),ir,Ag=(ir=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=x(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=at(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=Se(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let O=0;O{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ir,"Theme"),ir),Eg=p(e=>{const t=new Ag;return t.calculate(e),t},"getThemeVariables"),sr,$g=(sr=class{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=I("#cde498",10),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.primaryColor),this.lineColor=B(this.background),this.textColor=B(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.actorBorder=D(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||D(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||D(this.tertiaryColor,40);for(let O=0;O{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(sr,"Theme"),sr),Og=p(e=>{const t=new $g;return t.calculate(e),t},"getThemeVariables"),ar,Ig=(ar=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=I(this.contrast,55),this.background="#ffffff",this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=at(this.primaryColor,this.darkMode),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.lineColor=B(this.background),this.textColor=B(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||I(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(){var t,r,i,s,a,o,l,n,c,h,d,g,u,y,f,m,C,b,k,S,T,w,L,v,W,P,A,H,q,$,F,_,E,M,R,N,U,Z,et,tt,ot,gt,ut,bt,kt,Y,K,dt,ft;this.secondBkg=I(this.contrast,55),this.border2=this.contrast,this.actorBorder=I(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 O=0;O{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(ar,"Theme"),ar),Dg=p(e=>{const t=new Ig;return t.calculate(e),t},"getThemeVariables"),or,Pg=(or=class{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=at(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(){var a,o,l,n,c,h,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||I(t,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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||x(t,{h:30}),this.cScale4=this.cScale4||x(t,{h:60}),this.cScale5=this.cScale5||x(t,{h:90}),this.cScale6=this.cScale6||x(t,{h:120}),this.cScale7=this.cScale7||x(t,{h:150}),this.cScale8=this.cScale8||x(t,{h:210,l:150}),this.cScale9=this.cScale9||x(t,{h:270}),this.cScale10=this.cScale10||x(t,{h:300}),this.cScale11=this.cScale11||x(t,{h:330}),this.darkMode)for(let m=0;m{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(or,"Theme"),or),Rg=p(e=>{const t=new Pg;return t.calculate(e),t},"getThemeVariables"),lr,qg=(lr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.border1="#ccc",this.border2=Se(255,255,255,.25),this.arrowheadColor=B(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(){var r,i,s,a,o,l,n,c,h,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(lr,"Theme"),lr),Wg=p(e=>{const t=new qg;return t.calculate(e),t},"getThemeVariables"),nr,zg=(nr=class{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=at("#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(){var a,o,l,n,c,h,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||I(t,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 m=0;m{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(nr,"Theme"),nr),Ng=p(e=>{const t=new zg;return t.calculate(e),t},"getThemeVariables"),hr,Hg=(hr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.border1="#ccc",this.border2=Se(255,255,255,.25),this.arrowheadColor=B(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(){var r,i,s,a,o,l,n,c,h,d,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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||x(this.primaryColor,{h:30}),this.cScale4=this.cScale4||x(this.primaryColor,{h:60}),this.cScale5=this.cScale5||x(this.primaryColor,{h:90}),this.cScale6=this.cScale6||x(this.primaryColor,{h:120}),this.cScale7=this.cScale7||x(this.primaryColor,{h:150}),this.cScale8=this.cScale8||x(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||x(this.primaryColor,{h:270}),this.cScale10=this.cScale10||x(this.primaryColor,{h:300}),this.cScale11=this.cScale11||x(this.primaryColor,{h:330}),this.darkMode)for(let u=0;u{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(hr,"Theme"),hr),Yg=p(e=>{const t=new Hg;return t.calculate(e),t},"getThemeVariables"),cr,jg=(cr=class{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=at(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(){var a,o,l,n,c,h,d,g,u,y,f;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=x(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||I(t,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 m=0;m{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(cr,"Theme"),cr),Ug=p(e=>{const t=new jg;return t.calculate(e),t},"getThemeVariables"),dr,Xg=(dr=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=I(this.primaryColor,16),this.tertiaryColor=x(this.primaryColor,{h:-160}),this.primaryBorderColor=B(this.background),this.secondaryBorderColor=at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=at(this.tertiaryColor,this.darkMode),this.primaryTextColor=B(this.primaryColor),this.secondaryTextColor=B(this.secondaryColor),this.tertiaryTextColor=B(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=I(B("#323D47"),10),this.border1="#ccc",this.border2=Se(255,255,255,.25),this.arrowheadColor=B(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(){var r,i,s,a,o,l,n,c,h,d,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||x(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||x(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||at(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||at(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||at(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||at(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||B(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||B(this.tertiaryColor),this.lineColor=this.lineColor||B(this.background),this.arrowheadColor=this.arrowheadColor||B(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?D(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||D(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||B(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||I(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 u=0;u{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},p(dr,"Theme"),dr),Gg=p(e=>{const t=new Xg;return t.calculate(e),t},"getThemeVariables"),fe={base:{getThemeVariables:Lg},dark:{getThemeVariables:Mg},default:{getThemeVariables:Eg},forest:{getThemeVariables:Og},neutral:{getThemeVariables:Dg},neo:{getThemeVariables:Rg},"neo-dark":{getThemeVariables:Wg},redux:{getThemeVariables:Ng},"redux-dark":{getThemeVariables:Yg},"redux-color":{getThemeVariables:Ug},"redux-dark-color":{getThemeVariables:Gg}},At={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,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},Cl={...At,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES"},themeCSS:void 0,themeVariables:fe.default.getThemeVariables(),sequence:{...At.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...At.gantt,tickInterval:void 0,useWidth:void 0},c4:{...At.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...At.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...At.pie,useWidth:984},xyChart:{...At.xyChart,useWidth:void 0},requirement:{...At.requirement,useWidth:void 0},packet:{...At.packet},eventmodeling:{...At.eventmodeling},treeView:{...At.treeView,useWidth:void 0},radar:{...At.radar},railroad:{...At.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:{...At.ishikawa},sankey:{...At.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:{...At.venn},cynefin:{...At.cynefin}},xl=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...xl(e[i],"")]:[...r,t+i],[]),"keyify"),Vg=new Set(xl(Cl,"")),bl=Cl,Zg={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Qg=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(z.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),ki=p(e=>{if(z.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>ki(t));return}for(const t of Object.keys(e)){if(z.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Vg.has(t)||e[t]==null){z.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Zg[t];i?Qg(e[t],i):(z.debug("sanitizing object",t),ki(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(z.debug("sanitizing css option",t),e[t]=kl(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}z.debug("After sanitization",e)}},"sanitizeDirective"),kl=p(e=>{let t=0,r=0;for(const i of e){if(t!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Ht=Ft({},mr),Si,Pe=[],Dr=Ft({},mr),Vr=p((e,t)=>{let r=Ft({},e),i={};for(const s of t)wl(s),i=Ft(i,s);if(r=Ft(r,i),i.theme&&i.theme in fe){const s=Ft({},Si),a=Ft(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in fe&&(r.themeVariables=fe[r.theme].getThemeVariables(a))}return Dr=r,ip(Dr),Dr},"updateCurrentConfig"),Kg=p(e=>(Ht=Ft({},mr),Ht=Ft(Ht,e),e.theme&&fe[e.theme]&&(Ht.themeVariables=fe[e.theme].getThemeVariables(e.themeVariables)),Vr(Ht,Pe),Ht),"setSiteConfig"),Jg=p(e=>{Si=Ft({},e)},"saveConfigFromInitialize"),tp=p(e=>(Ht=Ft(Ht,e),Vr(Ht,Pe),Ht),"updateSiteConfig"),Sl=p(()=>Ft({},Ht),"getSiteConfig"),Tl=p(e=>(Vr(Dr,[e]),Tt()),"setConfig"),Tt=p(()=>Ft({},Dr),"getConfig"),wl=p(e=>{e&&(["secure",...Ht.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(z.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"&&wl(e[t])}))},"sanitize"),ep=p(e=>{var t;ki(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Pe.push(e),Vr(Ht,Pe)},"addDirective"),Ti=p((e=Ht)=>{Pe=[],Vr(e,Pe)},"reset"),rp={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."},no={},Bl=p(e=>{no[e]||(z.warn(rp[e]),no[e]=!0)},"issueWarning"),ip=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Bl("LAZY_LOAD_DEPRECATED")},"checkConfig"),$1=p(()=>{let e={};Si&&(e=Ft(e,Si));for(const t of Pe)e=Ft(e,t);return e},"getUserDefinedConfig"),zt=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Bl("FLOWCHART_HTML_LABELS_DEPRECATED"),ce(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),_l=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Pr=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,sp=/\s*%%.*\n/gm,ur,vl=(ur=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(ur,"UnknownDiagramError"),ur),Re={},ga=p(function(e,t){e=e.replace(_l,"").replace(Pr,"").replace(sp,` `);for(const[r,{detector:i}]of Object.entries(Re))if(i(e,t))return r;throw new vl(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ss=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ll(t,r,i)},"registerLazyLoadedDiagrams"),Ll=p((e,t,r)=>{Re[e]&&z.warn(`Detector with key ${e} already exists. Overwriting.`),Re[e]={detector:t,loader:r},z.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),ap=p(e=>Re[e].loader,"getDiagramLoader"),Zr=//gi,op=p(e=>e?Al(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),lp=(()=>{let e=!1;return()=>{e||(Fl(),e=!0)}})();function Fl(){const e="data-temp-href-target";fr.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),fr.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"))})}p(Fl,"setupDompurifyHooks");var Ml=p(e=>(lp(),fr.sanitize(e)),"removeScript"),ho=p((e,t)=>{if(zt(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Ml(e):r!=="loose"&&(e=Al(e),e=e.replace(//g,">"),e=e.replace(/=/g,"="),e=dp(e))}return e},"sanitizeMore"),ee=p((e,t)=>e&&(t.dompurifyConfig?e=fr.sanitize(ho(e,t),t.dompurifyConfig).toString():e=fr.sanitize(ho(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),np=p((e,t)=>typeof e=="string"?ee(e,t):e.flat().map(r=>ee(r,t)),"sanitizeTextOrArray"),hp=p(e=>Zr.test(e),"hasBreaks"),cp=p(e=>e.split(Zr),"splitBreaks"),dp=p(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),Al=p(e=>e.replace(Zr,"#br#"),"breakToPlaceholder"),up=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),gp=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),pp=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),co=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i0&&i+1Math.max(0,e.split(t).length-1),"countOccurrence"),fp=p((e,t)=>{const r=Ts(e,"~"),i=Ts(t,"~");return r===1&&i===1},"shouldCombineSets"),mp=p(e=>{const t=Ts(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),uo=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),ws=/\$\$(.*?)\$\$/g,zr=p(e=>{var t;return(((t=e.match(ws))==null?void 0:t.length)??0)>0},"hasKatex"),O1=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await El(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),yp=p(async(e,t)=>{if(!zr(e))return e;if(!(uo()||t.legacyMathML||t.forceLegacyMathML))return e.replace(ws,"MathML is unsupported in this environment.");{const{default:r}=await ht(async()=>{const{default:s}=await import("../../chunks/katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!uo()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(Zr).map(s=>zr(s)?`
${s}
`:`
${s}
`).join("").replace(ws,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(//g,""))}},"renderKatexUnsanitized"),El=p(async(e,t)=>ee(await yp(e,t),t),"renderKatexSanitized"),Qr={getRows:op,sanitizeText:ee,sanitizeTextOrArray:np,hasBreaks:hp,splitBreaks:cp,lineBreakRegex:Zr,removeScript:Ml,getUrl:up,evaluate:ce,getMax:gp,getMin:pp},Cp=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),xp=p(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"),$l=p(function(e,t,r,i){const s=xp(t,r,i);Cp(e,s)},"configureSvgSize"),bp=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,o=s.height;z.info(`SVG bounds: ${a}x${o}`,s);let l=0,n=0;z.info(`Graph bounds: ${l}x${n}`,e),l=a+r*2,n=o+r*2,z.info(`Calculated bounds: ${l}x${n}`),$l(t,n,l,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),ui={};function Bs(e){return[...e.cssRules].map(t=>t.cssText).join(` `)}p(Bs,"cssStyleSheetToString");var kp=p((e,t,r,i)=>{let s="";return e in ui&&ui[e]?s=ui[e]({...r,svgId:i}):z.warn(`No theme found for ${e}`),`& { font-family: ${r.fontFamily}; @@ -298,8 +298,8 @@ Please report this to https://github.com/markedjs/marked.`,t){let s="

An error L0,20`)},"requirement_arrow"),R0=p((e,t,r)=>{const i=Tt(),{themeVariables:s}=i,{strokeWidth:a}=s;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"),q0=p((e,t,r)=>{const 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"),W0=p((e,t,r)=>{const i=Tt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=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");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),z0={extension:x0,composition:b0,aggregation:k0,dependency:S0,lollipop:T0,point:w0,circle:B0,cross:_0,barb:v0,barbNeo:L0,only_one:F0,zero_or_one:M0,one_or_more:A0,zero_or_more:E0,only_one_neo:$0,zero_or_one_neo:O0,one_or_more_neo:I0,zero_or_more_neo:D0,requirement_arrow:P0,requirement_contains:q0,requirement_arrow_neo:R0,requirement_contains_neo:W0},N0=C0,H0={common:Qr,getConfig:Tt,insertCluster:RC,insertEdge:y0,insertEdgeLabel:c0,insertMarkers:N0,insertNode:su,interpolateToCurve:Da,labelHelper:it,log:z,positionEdgeLabel:d0},Xr={},nu=p(e=>{for(const t of e)Xr[t.name]=t},"registerLayoutLoaders"),Y0=p(()=>{nu([{name:"dagre",loader:p(async()=>await ht(()=>import("./dagre-VZM6K2ZE-CQJoiPmN.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"swimlane",loader:p(async()=>await ht(()=>import("./swimlanes-SLNWSIFB-CdZ5MJJx.js"),__vite__mapDeps([8,5,6,1,2,3,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await ht(()=>import("./cose-bilkent-JH36ORCC-J3LbU0Uq.js"),__vite__mapDeps([9,10,5,6,7])),"loader")}])},"registerDefaultLayoutLoaders");Y0();var s2=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Xr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const g=d.domId||d.id;d.domId=`${e.diagramId}-${g}`}const i=Xr[e.layoutAlgorithm],s=await i.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:l,gradientStart:n,gradientStop:c}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),l){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,H0,{algorithm:i.algorithm},r)},"render"),a2=p((e="",{fallback:t="dagre"}={})=>{if(e in Xr)return e;if(t in Xr)return z.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"),io="comm",hu="rule",cu="decl",j0="@media",U0="@import",X0="@supports",G0="@namespace",oa="@keyframes",du="@layer",V0="@scope",Z0=Math.abs,Wr=String.fromCharCode;function uu(e){return e.trim()}function la(e,t,r){return e.replace(t,r)}function tr(e,t){return e.charCodeAt(t)|0}function xr(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function gu(e){return e.length}function hi(e,t){return t.push(e),e}var ss=1,br=1,pu=0,Gt=0,_t=0,Tr="";function so(e,t,r,i,s,a,o,l){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:ss,column:br,length:o,return:"",siblings:l}}function Q0(){return _t}function K0(){return _t=Gt>0?tr(Tr,--Gt):0,br--,_t===10&&(br=1,ss--),_t}function te(){return _t=Gt2||Gr(_t)>3?"":" "}function rx(e,t){for(;--t&&te()&&!(_t<48||_t>102||_t>57&&_t<65||_t>70&&_t<97););return as(e,xi()+(t<6&&ke()==32&&te()==32))}function na(e){for(;te();)switch(_t){case e:return Gt;case 34:case 39:e!==34&&e!==39&&na(_t);break;case 40:e===41&&na(e);break;case 92:te();break}return Gt}function ix(e,t){for(;te()&&e+_t!==57;)if(e+_t===84&&ke()===47)break;return"/*"+as(t,Gt-1)+"*"+Wr(e===47?e:te())}function sx(e){for(;!Gr(ke());)te();return as(e,Gt)}function ax(e){return tx(bi("",null,null,null,[""],e=J0(e),0,[0],e))}function bi(e,t,r,i,s,a,o,l,n){for(var c=0,h=0,d=o,g=0,u=0,y=0,f=1,m=1,C=1,b=0,k=0,S="",T=s,w=a,L=i,v=S;m;)switch(y=k,k=te()){case 40:y!=108&&tr(v,d-1)==58?(b++,v+="("):v+=xs(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=xs(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Wr(k);break}v+=ex(y);break;case 92:v+=rx(xi()-1,7);continue;case 47:switch(ke()){case 42:case 47:hi(ox(ix(te(),xi()),t,r,n),n),(Gr(y||1)==5||Gr(ke()||1)==5)&&ae(v)&&xr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*f:l[c++]=ae(v)*C;case 125*f:case 59:case 0:if(b>0&&k){v+=Wr(k);break}switch(k){case 0:case 125:m=0;case 59+h:C==-1&&(v=la(v,/\f/g,"")),u>0&&(ae(v)-d||f===0)&&hi(u>32?hl(v+";",i,r,d-1,n):hl(la(v," ","")+";",i,r,d-2,n),n);break;case 59:v+=";";default:if(hi(L=nl(v,t,r,c,h,s,l,S,T=[],w=[],d,a),a),k===123)if(h===0)bi(v,t,L,L,T,a,d,l,w);else{switch(g){case 99:if(tr(v,3)===110)break;case 108:if(tr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?bi(e,L,L,i&&hi(nl(e,L,L,0,0,s,l,S,s,T=[],d,w),w),s,w,d,l,i?T:w):bi(v,L,L,L,[""],w,0,l,w)}}c=h=u=0,f=C=1,S=v="",d=o;break;case 58:d=1+ae(v),u=y;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&K0()==125)continue}switch(v+=Wr(k),k*f){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;l[c++]=(ae(v)-1)*C,C=1;break;case 64:ke()===45&&(v+=xs(te())),g=ke(),h=d=ae(S=v+=sx(xi())),k++;break;case 45:y===45&&ae(v)==2&&(f=0)}}return a}function nl(e,t,r,i,s,a,o,l,n,c,h,d){for(var g=s-1,u=s===0?a:[""],y=gu(u),f=0,m=0,C=0;f0?u[b]+" "+k:la(k,/&\f/g,u[b])))&&(n[C++]=S);return so(e,t,r,s===0?hu:l,n,c,h,d)}function ox(e,t,r,i){return so(e,t,r,io,Wr(Q0()),xr(e,2,-2),0,i)}function hl(e,t,r,i,s){return so(e,t,r,cu,xr(e,0,i),xr(e,i+1,-1),i,s)}function ha(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),cx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./c4Diagram-5PPSVZJV-BpEevA0S.js");return{diagram:t}},__vite__mapDeps([11,12,5,6,7]));return{id:fu,diagram:e}},"loader"),dx={id:fu,detector:hx,loader:cx},ux=dx,mu="flowchart",gx=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),px=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-R6bpi1xK.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,6,16,12,7,17]));return{id:mu,diagram:e}},"loader"),fx={id:mu,detector:gx,loader:px},mx=fx,yu="flowchart-v2",yx=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Cx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-R6bpi1xK.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,6,16,12,7,17]));return{id:yu,diagram:e}},"loader"),xx={id:yu,detector:yx,loader:Cx},bx=xx,Cu="swimlane",kx=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Sx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./swimlanesDiagram-ULZ7WXOC-BMkr3t22.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,5,6,16,12,7,17]));return{id:Cu,diagram:e}},"loader"),Tx={id:Cu,detector:kx,loader:Sx},wx=Tx,xu="er",Bx=p(e=>/^\s*erDiagram/.test(e),"detector"),_x=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./erDiagram-JOGREHBK-12XpgwsP.js");return{diagram:t}},__vite__mapDeps([19,15,5,6,16,17,7]));return{id:xu,diagram:e}},"loader"),vx={id:xu,detector:Bx,loader:_x},Lx=vx,bu="gitGraph",Fx=p(e=>/^\s*gitGraph/.test(e),"detector"),Mx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./gitGraphDiagram-DS77QQ5N-BWMNUzLG.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,5,6,7]));return{id:bu,diagram:e}},"loader"),Ax={id:bu,detector:Fx,loader:Mx},Ex=Ax,ku="gantt",$x=p(e=>/^\s*gantt/.test(e),"detector"),Ox=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ganttDiagram-PKOTCBZU-WAuAqH0n.js");return{diagram:t}},__vite__mapDeps([24,5,6,25,26,27,7]));return{id:ku,diagram:e}},"loader"),Ix={id:ku,detector:$x,loader:Ox},Dx=Ix,Su="info",Px=p(e=>/^\s*info/.test(e),"detector"),Rx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./infoDiagram-6WML65LV-0JM35C6y.js");return{diagram:t}},__vite__mapDeps([28,23,5,6,7]));return{id:Su,diagram:e}},"loader"),qx={id:Su,detector:Px,loader:Rx},Tu="pie",Wx=p(e=>/^\s*pie/.test(e),"detector"),zx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pieDiagram-7S7Q4E2Y-BrA5klpF.js");return{diagram:t}},__vite__mapDeps([29,22,23,5,6,30,31,26,7]));return{id:Tu,diagram:e}},"loader"),Nx={id:Tu,detector:Wx,loader:zx},wu="quadrantChart",Hx=p(e=>/^\s*quadrantChart/.test(e),"detector"),Yx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./quadrantDiagram-CIZ2JOQS-CDVP-ZKS.js");return{diagram:t}},__vite__mapDeps([32,5,6,25,26,27,7]));return{id:wu,diagram:e}},"loader"),jx={id:wu,detector:Hx,loader:Yx},Ux=jx,Bu="xychart",Xx=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Gx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./xychartDiagram-ELKLHX3M-CPeU8I9x.js");return{diagram:t}},__vite__mapDeps([33,5,6,26,31,25,27,7]));return{id:Bu,diagram:e}},"loader"),Vx={id:Bu,detector:Xx,loader:Gx},Zx=Vx,_u="requirement",Qx=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Kx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./requirementDiagram-LRYGKXZP-QwdhgEBj.js");return{diagram:t}},__vite__mapDeps([34,15,5,6,16,7]));return{id:_u,diagram:e}},"loader"),Jx={id:_u,detector:Qx,loader:Kx},tb=Jx,vu="sequence",eb=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),rb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sequenceDiagram-SI44F4Z6-C9N8vEHe.js");return{diagram:t}},__vite__mapDeps([35,21,12,5,6,7]));return{id:vu,diagram:e}},"loader"),ib={id:vu,detector:eb,loader:rb},sb=ib,Lu="class",ab=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),ob=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-JCYQIIEL-Td6lpiVM.js");return{diagram:t}},__vite__mapDeps([36,37,14,15,5,6,16,12,7]));return{id:Lu,diagram:e}},"loader"),lb={id:Lu,detector:ab,loader:ob},nb=lb,Fu="classDiagram",hb=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),cb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-v2-OCEON4UE-Td6lpiVM.js");return{diagram:t}},__vite__mapDeps([38,37,14,15,5,6,16,12,7]));return{id:Fu,diagram:e}},"loader"),db={id:Fu,detector:hb,loader:cb},ub=db,Mu="state",gb=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),pb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-OKZ733FA-BL0QLRfE.js");return{diagram:t}},__vite__mapDeps([39,40,15,5,6,16,12,7,2,4,3]));return{id:Mu,diagram:e}},"loader"),fb={id:Mu,detector:gb,loader:pb},mb=fb,Au="stateDiagram",yb=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Cb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-v2-UEYNNEHI-CpJ0zz2a.js");return{diagram:t}},__vite__mapDeps([41,40,15,5,6,16,12,7]));return{id:Au,diagram:e}},"loader"),xb={id:Au,detector:yb,loader:Cb},bb=xb,Eu="journey",kb=p(e=>/^\s*journey/.test(e),"detector"),Sb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./journeyDiagram-NVQOT4AX-BFiK1ovb.js");return{diagram:t}},__vite__mapDeps([42,14,12,5,6,30,7]));return{id:Eu,diagram:e}},"loader"),Tb={id:Eu,detector:kb,loader:Sb},wb=Tb,Bb=p((e,t,r)=>{z.debug(`rendering svg for syntax error -`);const i=Qp(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),$l(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),$u={draw:Bb},_b=$u,vb={db:{},renderer:$u,parser:{parse:p(()=>{},"parse")}},Lb=vb,Ou="flowchart-elk",Fb=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),Mb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-R6bpi1xK.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,6,16,12,7,17]));return{id:Ou,diagram:e}},"loader"),Ab={id:Ou,detector:Fb,loader:Mb},Eb=Ab,Iu="timeline",$b=p(e=>/^\s*timeline/.test(e),"detector"),Ob=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./timeline-definition-Z64GVDOM-Bn8XN_8j.js");return{diagram:t}},__vite__mapDeps([43,5,6,30,7]));return{id:Iu,diagram:e}},"loader"),Ib={id:Iu,detector:$b,loader:Ob},Db=Ib,Du="mindmap",Pb=p(e=>/^\s*mindmap/.test(e),"detector"),Rb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./mindmap-definition-FAOFIHXS-Cpyl-vxZ.js");return{diagram:t}},__vite__mapDeps([44,15,5,6,16,7]));return{id:Du,diagram:e}},"loader"),qb={id:Du,detector:Pb,loader:Rb},Wb=qb,Pu="kanban",zb=p(e=>/^\s*kanban/.test(e),"detector"),Nb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./kanban-definition-27J2QSJJ-C7k96D1U.js");return{diagram:t}},__vite__mapDeps([45,14,5,6,7]));return{id:Pu,diagram:e}},"loader"),Hb={id:Pu,detector:zb,loader:Nb},Yb=Hb,Ru="sankey",jb=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Ub=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sankeyDiagram-W5VNT64P-CvITRODF.js");return{diagram:t}},__vite__mapDeps([46,5,6,31,26,7]));return{id:Ru,diagram:e}},"loader"),Xb={id:Ru,detector:jb,loader:Ub},Gb=Xb,qu="packet",Vb=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),Zb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-LBJQPF4R-D7NktxbC.js");return{diagram:t}},__vite__mapDeps([47,22,23,5,6,7]));return{id:qu,diagram:e}},"loader"),Qb={id:qu,detector:Vb,loader:Zb},Wu="radar",Kb=p(e=>/^\s*radar-beta/.test(e),"detector"),Jb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-UB23O5K3-CRpFtaV-.js");return{diagram:t}},__vite__mapDeps([48,22,23,5,6,7]));return{id:Wu,diagram:e}},"loader"),tk={id:Wu,detector:Kb,loader:Jb},zu="block",ek=p(e=>/^\s*block(-beta)?/.test(e),"detector"),rk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./blockDiagram-VBNYF7ZC-CzbrD03k.js");return{diagram:t}},__vite__mapDeps([49,14,5,6,2,17,7]));return{id:zu,diagram:e}},"loader"),ik={id:zu,detector:ek,loader:rk},sk=ik,Nu="treeView",ak=p(e=>/^\s*treeView-beta/.test(e),"detector"),ok=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-7IWD3JNH-BsrwcXvB.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,5,6,7]));return{id:Nu,diagram:e}},"loader"),lk={id:Nu,detector:ak,loader:ok},nk=lk,Hu="architecture",hk=p(e=>/^\s*architecture/.test(e),"detector"),ck=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./architectureDiagram-T3A2C74G-DYHZqCQm.js");return{diagram:t}},__vite__mapDeps([51,22,23,5,6,10,7]));return{id:Hu,diagram:e}},"loader"),dk={id:Hu,detector:hk,loader:ck},uk=dk,Yu="eventmodeling",gk=p(e=>/^\s*eventmodeling/.test(e),"detector"),pk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-B4RE2ZJO-D-dGX5fr.js");return{diagram:t}},__vite__mapDeps([52,22,23,5,6,7]));return{id:Yu,diagram:e}},"loader"),fk={id:Yu,detector:gk,loader:pk},mk=fk,ju="ishikawa",yk=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Ck=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ishikawaDiagram-WSZJBQD7-BXVf3hK9.js");return{diagram:t}},__vite__mapDeps([53,5,6,7]));return{id:ju,diagram:e}},"loader"),xk={id:ju,detector:yk,loader:Ck},Uu="venn",bk=p(e=>/^\s*venn-beta/.test(e),"detector"),kk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./vennDiagram-T6HMQDX7-Cg1-J_4F.js");return{diagram:t}},__vite__mapDeps([54,5,6,7]));return{id:Uu,diagram:e}},"loader"),Sk={id:Uu,detector:bk,loader:kk},Tk=Sk,Xu="treemap",wk=p(e=>/^\s*treemap/.test(e),"detector"),Bk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-Q27KOJAE-6zI0fV8V.js");return{diagram:t}},__vite__mapDeps([55,22,16,23,5,6,27,31,26,7]));return{id:Xu,diagram:e}},"loader"),_k={id:Xu,detector:wk,loader:Bk},Gu="wardley",vk=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Lk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./wardleyDiagram-T6FBY63Y-BBivfUdi.js");return{diagram:t}},__vite__mapDeps([56,22,23,5,6,7]));return{id:Gu,diagram:e}},"loader"),Fk={id:Gu,detector:vk,loader:Lk},Mk=Fk,Vu="cynefin",Ak=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Ek=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./cynefinDiagram-MW4NZA55-D1e-nCDk.js");return{diagram:t}},__vite__mapDeps([57,22,23,5,6,7]));return{id:Vu,diagram:e}},"loader"),$k={id:Vu,detector:Ak,loader:Ek},Zu="railroad",Ok=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Ik=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./railroadDiagram-AXF67PYL-BLzRIX9p.js");return{diagram:t}},__vite__mapDeps([58,59,22,5,6,23,7]));return{id:Zu,diagram:e}},"loader"),Dk={id:Zu,detector:Ok,loader:Ik},Qu="railroadEbnf",Pk=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Rk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ebnfDiagram-BXEA7PRR-BqBwA3d9.js");return{diagram:t}},__vite__mapDeps([60,59,22,5,6,23,7]));return{id:Qu,diagram:e}},"loader"),qk={id:Qu,detector:Pk,loader:Rk},Ku="railroadAbnf",Wk=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),zk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./abnfDiagram-N423BO3Z-DJZZ0-Xb.js");return{diagram:t}},__vite__mapDeps([61,59,22,5,6,23,7]));return{id:Ku,diagram:e}},"loader"),Nk={id:Ku,detector:Wk,loader:zk},Ju="railroadPeg",Hk=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Yk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pegDiagram-VL7TDLO6-Bl4rZ4lT.js");return{diagram:t}},__vite__mapDeps([62,59,22,5,6,23,7]));return{id:Ju,diagram:e}},"loader"),jk={id:Ju,detector:Hk,loader:Yk},cl=!1,os=p(()=>{cl||(cl=!0,Bi("error",Lb,e=>e.toLowerCase().trim()==="error"),Bi("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{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:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ss(Eb,Wb,uk),Ss(ux,Yb,ub,nb,Lx,Dx,qx,Nx,tb,sb,wx,bx,mx,Db,Ex,bb,mb,wb,Ux,Gb,Qb,Zx,sk,mk,nk,tk,xk,_k,Dk,qk,Nk,jk,Tk,Mk,$k))},"addDiagrams"),Uk=p(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Re).map(async([r,{detector:i,loader:s}])=>{if(s)try{_s(r)}catch{try{const{diagram:a,id:o}=await s();Bi(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Re[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Xk="graphics-document document";function tg(e,t){e.attr("role",Xk),t!==""&&e.attr("aria-roledescription",t)}p(tg,"setA11yDiagramInfo");function eg(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(eg,"addSVGa11yTitleDescription");var De,ca=(De=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Tt(),s=ga(t,i);t=oy(t)+` + L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),q0=p((e,t,r)=>{const 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"),W0=p((e,t,r)=>{const i=Tt(),{themeVariables:s}=i,{strokeWidth:a}=s,o=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");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),z0={extension:x0,composition:b0,aggregation:k0,dependency:S0,lollipop:T0,point:w0,circle:B0,cross:_0,barb:v0,barbNeo:L0,only_one:F0,zero_or_one:M0,one_or_more:A0,zero_or_more:E0,only_one_neo:$0,zero_or_one_neo:O0,one_or_more_neo:I0,zero_or_more_neo:D0,requirement_arrow:P0,requirement_contains:q0,requirement_arrow_neo:R0,requirement_contains_neo:W0},N0=C0,H0={common:Qr,getConfig:Tt,insertCluster:RC,insertEdge:y0,insertEdgeLabel:c0,insertMarkers:N0,insertNode:su,interpolateToCurve:Da,labelHelper:it,log:z,positionEdgeLabel:d0},Xr={},nu=p(e=>{for(const t of e)Xr[t.name]=t},"registerLayoutLoaders"),Y0=p(()=>{nu([{name:"dagre",loader:p(async()=>await ht(()=>import("./dagre-VZM6K2ZE-DE-32FKg.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"swimlane",loader:p(async()=>await ht(()=>import("./swimlanes-SLNWSIFB-jvKPpuQV.js"),__vite__mapDeps([8,5,6,1,2,3,7])),"loader")},{name:"cose-bilkent",loader:p(async()=>await ht(()=>import("./cose-bilkent-JH36ORCC-CrvhfXGX.js"),__vite__mapDeps([9,10,5,6,7])),"loader")}])},"registerDefaultLayoutLoaders");Y0();var s2=p(async(e,t,r)=>{if(!(e.layoutAlgorithm in Xr))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const d of e.nodes){const g=d.domId||d.id;d.domId=`${e.diagramId}-${g}`}const i=Xr[e.layoutAlgorithm],s=await i.loader(),{theme:a,themeVariables:o}=e.config,{useGradient:l,gradientStart:n,gradientStop:c}=o,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-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",`${a!=null&&a.includes("dark")?"#FFFFFF":"#000000"}`),l){const d=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");d.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),d.append("svg:stop").attr("offset","100%").attr("stop-color",c).attr("stop-opacity",1)}return s.render(e,t,H0,{algorithm:i.algorithm},r)},"render"),a2=p((e="",{fallback:t="dagre"}={})=>{if(e in Xr)return e;if(t in Xr)return z.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"),io="comm",hu="rule",cu="decl",j0="@media",U0="@import",X0="@supports",G0="@namespace",oa="@keyframes",du="@layer",V0="@scope",Z0=Math.abs,Wr=String.fromCharCode;function uu(e){return e.trim()}function la(e,t,r){return e.replace(t,r)}function tr(e,t){return e.charCodeAt(t)|0}function xr(e,t,r){return e.slice(t,r)}function ae(e){return e.length}function gu(e){return e.length}function hi(e,t){return t.push(e),e}var ss=1,br=1,pu=0,Gt=0,_t=0,Tr="";function so(e,t,r,i,s,a,o,l){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:ss,column:br,length:o,return:"",siblings:l}}function Q0(){return _t}function K0(){return _t=Gt>0?tr(Tr,--Gt):0,br--,_t===10&&(br=1,ss--),_t}function te(){return _t=Gt2||Gr(_t)>3?"":" "}function rx(e,t){for(;--t&&te()&&!(_t<48||_t>102||_t>57&&_t<65||_t>70&&_t<97););return as(e,xi()+(t<6&&ke()==32&&te()==32))}function na(e){for(;te();)switch(_t){case e:return Gt;case 34:case 39:e!==34&&e!==39&&na(_t);break;case 40:e===41&&na(e);break;case 92:te();break}return Gt}function ix(e,t){for(;te()&&e+_t!==57;)if(e+_t===84&&ke()===47)break;return"/*"+as(t,Gt-1)+"*"+Wr(e===47?e:te())}function sx(e){for(;!Gr(ke());)te();return as(e,Gt)}function ax(e){return tx(bi("",null,null,null,[""],e=J0(e),0,[0],e))}function bi(e,t,r,i,s,a,o,l,n){for(var c=0,h=0,d=o,g=0,u=0,y=0,f=1,m=1,C=1,b=0,k=0,S="",T=s,w=a,L=i,v=S;m;)switch(y=k,k=te()){case 40:y!=108&&tr(v,d-1)==58?(b++,v+="("):v+=xs(k);break;case 41:b--,v+=")";break;case 34:case 39:case 91:v+=xs(k);break;case 9:case 10:case 13:case 32:if(b>0){v+=Wr(k);break}v+=ex(y);break;case 92:v+=rx(xi()-1,7);continue;case 47:switch(ke()){case 42:case 47:hi(ox(ix(te(),xi()),t,r,n),n),(Gr(y||1)==5||Gr(ke()||1)==5)&&ae(v)&&xr(v,-1,void 0)!==" "&&(v+=" ");break;default:v+="/"}break;case 123*f:l[c++]=ae(v)*C;case 125*f:case 59:case 0:if(b>0&&k){v+=Wr(k);break}switch(k){case 0:case 125:m=0;case 59+h:C==-1&&(v=la(v,/\f/g,"")),u>0&&(ae(v)-d||f===0)&&hi(u>32?hl(v+";",i,r,d-1,n):hl(la(v," ","")+";",i,r,d-2,n),n);break;case 59:v+=";";default:if(hi(L=nl(v,t,r,c,h,s,l,S,T=[],w=[],d,a),a),k===123)if(h===0)bi(v,t,L,L,T,a,d,l,w);else{switch(g){case 99:if(tr(v,3)===110)break;case 108:if(tr(v,2)===97)break;default:h=0;case 100:case 109:case 115:}h?bi(e,L,L,i&&hi(nl(e,L,L,0,0,s,l,S,s,T=[],d,w),w),s,w,d,l,i?T:w):bi(v,L,L,L,[""],w,0,l,w)}}c=h=u=0,f=C=1,S=v="",d=o;break;case 58:d=1+ae(v),u=y;default:if(f<1){if(k==123)--f;else if(k==125&&f++==0&&K0()==125)continue}switch(v+=Wr(k),k*f){case 38:C=h>0?1:(v+="\f",-1);break;case 44:if(b>0)break;l[c++]=(ae(v)-1)*C,C=1;break;case 64:ke()===45&&(v+=xs(te())),g=ke(),h=d=ae(S=v+=sx(xi())),k++;break;case 45:y===45&&ae(v)==2&&(f=0)}}return a}function nl(e,t,r,i,s,a,o,l,n,c,h,d){for(var g=s-1,u=s===0?a:[""],y=gu(u),f=0,m=0,C=0;f0?u[b]+" "+k:la(k,/&\f/g,u[b])))&&(n[C++]=S);return so(e,t,r,s===0?hu:l,n,c,h,d)}function ox(e,t,r,i){return so(e,t,r,io,Wr(Q0()),xr(e,2,-2),0,i)}function hl(e,t,r,i,s){return so(e,t,r,cu,xr(e,0,i),xr(e,i+1,-1),i,s)}function ha(e,t){for(var r="",i=0;i/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),cx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./c4Diagram-5PPSVZJV-BFmGnVzX.js");return{diagram:t}},__vite__mapDeps([11,12,5,6,7]));return{id:fu,diagram:e}},"loader"),dx={id:fu,detector:hx,loader:cx},ux=dx,mu="flowchart",gx=p((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),px=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-DzYHoGpB.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,6,16,12,7,17]));return{id:mu,diagram:e}},"loader"),fx={id:mu,detector:gx,loader:px},mx=fx,yu="flowchart-v2",yx=p((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),Cx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-DzYHoGpB.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,6,16,12,7,17]));return{id:yu,diagram:e}},"loader"),xx={id:yu,detector:yx,loader:Cx},bx=xx,Cu="swimlane",kx=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),Sx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./swimlanesDiagram-ULZ7WXOC-C8NvlDQ9.js");return{diagram:t}},__vite__mapDeps([18,13,14,15,5,6,16,12,7,17]));return{id:Cu,diagram:e}},"loader"),Tx={id:Cu,detector:kx,loader:Sx},wx=Tx,xu="er",Bx=p(e=>/^\s*erDiagram/.test(e),"detector"),_x=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./erDiagram-JOGREHBK-CzTFZT70.js");return{diagram:t}},__vite__mapDeps([19,15,5,6,16,17,7]));return{id:xu,diagram:e}},"loader"),vx={id:xu,detector:Bx,loader:_x},Lx=vx,bu="gitGraph",Fx=p(e=>/^\s*gitGraph/.test(e),"detector"),Mx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./gitGraphDiagram-DS77QQ5N-65BqAvcN.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,5,6,7]));return{id:bu,diagram:e}},"loader"),Ax={id:bu,detector:Fx,loader:Mx},Ex=Ax,ku="gantt",$x=p(e=>/^\s*gantt/.test(e),"detector"),Ox=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ganttDiagram-PKOTCBZU-3Xvb05xn.js");return{diagram:t}},__vite__mapDeps([24,5,6,25,26,27,7]));return{id:ku,diagram:e}},"loader"),Ix={id:ku,detector:$x,loader:Ox},Dx=Ix,Su="info",Px=p(e=>/^\s*info/.test(e),"detector"),Rx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./infoDiagram-6WML65LV-BQIcZuqW.js");return{diagram:t}},__vite__mapDeps([28,23,5,6,7]));return{id:Su,diagram:e}},"loader"),qx={id:Su,detector:Px,loader:Rx},Tu="pie",Wx=p(e=>/^\s*pie/.test(e),"detector"),zx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pieDiagram-7S7Q4E2Y-Q4qQKLJC.js");return{diagram:t}},__vite__mapDeps([29,22,23,5,6,30,31,26,7]));return{id:Tu,diagram:e}},"loader"),Nx={id:Tu,detector:Wx,loader:zx},wu="quadrantChart",Hx=p(e=>/^\s*quadrantChart/.test(e),"detector"),Yx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./quadrantDiagram-CIZ2JOQS-CganP-3e.js");return{diagram:t}},__vite__mapDeps([32,5,6,25,26,27,7]));return{id:wu,diagram:e}},"loader"),jx={id:wu,detector:Hx,loader:Yx},Ux=jx,Bu="xychart",Xx=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),Gx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./xychartDiagram-ELKLHX3M-BDJd28OA.js");return{diagram:t}},__vite__mapDeps([33,5,6,26,31,25,27,7]));return{id:Bu,diagram:e}},"loader"),Vx={id:Bu,detector:Xx,loader:Gx},Zx=Vx,_u="requirement",Qx=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),Kx=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./requirementDiagram-LRYGKXZP-L5P0T9H0.js");return{diagram:t}},__vite__mapDeps([34,15,5,6,16,7]));return{id:_u,diagram:e}},"loader"),Jx={id:_u,detector:Qx,loader:Kx},tb=Jx,vu="sequence",eb=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),rb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sequenceDiagram-SI44F4Z6-DKbPiUDi.js");return{diagram:t}},__vite__mapDeps([35,21,12,5,6,7]));return{id:vu,diagram:e}},"loader"),ib={id:vu,detector:eb,loader:rb},sb=ib,Lu="class",ab=p((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),ob=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-JCYQIIEL-ZlJQDxsM.js");return{diagram:t}},__vite__mapDeps([36,37,14,15,5,6,16,12,7]));return{id:Lu,diagram:e}},"loader"),lb={id:Lu,detector:ab,loader:ob},nb=lb,Fu="classDiagram",hb=p((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),cb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./classDiagram-v2-OCEON4UE-ZlJQDxsM.js");return{diagram:t}},__vite__mapDeps([38,37,14,15,5,6,16,12,7]));return{id:Fu,diagram:e}},"loader"),db={id:Fu,detector:hb,loader:cb},ub=db,Mu="state",gb=p((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),pb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-OKZ733FA-RX0oBJXb.js");return{diagram:t}},__vite__mapDeps([39,40,15,5,6,16,12,7,2,4,3]));return{id:Mu,diagram:e}},"loader"),fb={id:Mu,detector:gb,loader:pb},mb=fb,Au="stateDiagram",yb=p((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),Cb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./stateDiagram-v2-UEYNNEHI-DPY60Pq_.js");return{diagram:t}},__vite__mapDeps([41,40,15,5,6,16,12,7]));return{id:Au,diagram:e}},"loader"),xb={id:Au,detector:yb,loader:Cb},bb=xb,Eu="journey",kb=p(e=>/^\s*journey/.test(e),"detector"),Sb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./journeyDiagram-NVQOT4AX-CRQkoUAO.js");return{diagram:t}},__vite__mapDeps([42,14,12,5,6,30,7]));return{id:Eu,diagram:e}},"loader"),Tb={id:Eu,detector:kb,loader:Sb},wb=Tb,Bb=p((e,t,r)=>{z.debug(`rendering svg for syntax error +`);const i=Qp(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),$l(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),$u={draw:Bb},_b=$u,vb={db:{},renderer:$u,parser:{parse:p(()=>{},"parse")}},Lb=vb,Ou="flowchart-elk",Fb=p((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),Mb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./flowDiagram-UKHOOZJN-DzYHoGpB.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([13,14,15,5,6,16,12,7,17]));return{id:Ou,diagram:e}},"loader"),Ab={id:Ou,detector:Fb,loader:Mb},Eb=Ab,Iu="timeline",$b=p(e=>/^\s*timeline/.test(e),"detector"),Ob=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./timeline-definition-Z64GVDOM-Can7C2Bd.js");return{diagram:t}},__vite__mapDeps([43,5,6,30,7]));return{id:Iu,diagram:e}},"loader"),Ib={id:Iu,detector:$b,loader:Ob},Db=Ib,Du="mindmap",Pb=p(e=>/^\s*mindmap/.test(e),"detector"),Rb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./mindmap-definition-FAOFIHXS-Cv0OruxG.js");return{diagram:t}},__vite__mapDeps([44,15,5,6,16,7]));return{id:Du,diagram:e}},"loader"),qb={id:Du,detector:Pb,loader:Rb},Wb=qb,Pu="kanban",zb=p(e=>/^\s*kanban/.test(e),"detector"),Nb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./kanban-definition-27J2QSJJ-xw8e9791.js");return{diagram:t}},__vite__mapDeps([45,14,5,6,7]));return{id:Pu,diagram:e}},"loader"),Hb={id:Pu,detector:zb,loader:Nb},Yb=Hb,Ru="sankey",jb=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Ub=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./sankeyDiagram-W5VNT64P-CxpNyMw0.js");return{diagram:t}},__vite__mapDeps([46,5,6,31,26,7]));return{id:Ru,diagram:e}},"loader"),Xb={id:Ru,detector:jb,loader:Ub},Gb=Xb,qu="packet",Vb=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),Zb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-LBJQPF4R-Cf65bt31.js");return{diagram:t}},__vite__mapDeps([47,22,23,5,6,7]));return{id:qu,diagram:e}},"loader"),Qb={id:qu,detector:Vb,loader:Zb},Wu="radar",Kb=p(e=>/^\s*radar-beta/.test(e),"detector"),Jb=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-UB23O5K3-XFaYvyOH.js");return{diagram:t}},__vite__mapDeps([48,22,23,5,6,7]));return{id:Wu,diagram:e}},"loader"),tk={id:Wu,detector:Kb,loader:Jb},zu="block",ek=p(e=>/^\s*block(-beta)?/.test(e),"detector"),rk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./blockDiagram-VBNYF7ZC-DMtlrKi5.js");return{diagram:t}},__vite__mapDeps([49,14,5,6,2,17,7]));return{id:zu,diagram:e}},"loader"),ik={id:zu,detector:ek,loader:rk},sk=ik,Nu="treeView",ak=p(e=>/^\s*treeView-beta/.test(e),"detector"),ok=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-7IWD3JNH-nHKkQ5Y4.js");return{diagram:t}},__vite__mapDeps([50,21,22,23,5,6,7]));return{id:Nu,diagram:e}},"loader"),lk={id:Nu,detector:ak,loader:ok},nk=lk,Hu="architecture",hk=p(e=>/^\s*architecture/.test(e),"detector"),ck=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./architectureDiagram-T3A2C74G-DHyZBlpG.js");return{diagram:t}},__vite__mapDeps([51,22,23,5,6,10,7]));return{id:Hu,diagram:e}},"loader"),dk={id:Hu,detector:hk,loader:ck},uk=dk,Yu="eventmodeling",gk=p(e=>/^\s*eventmodeling/.test(e),"detector"),pk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-B4RE2ZJO-C-VEU8cy.js");return{diagram:t}},__vite__mapDeps([52,22,23,5,6,7]));return{id:Yu,diagram:e}},"loader"),fk={id:Yu,detector:gk,loader:pk},mk=fk,ju="ishikawa",yk=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),Ck=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ishikawaDiagram-WSZJBQD7-Cinhiu5k.js");return{diagram:t}},__vite__mapDeps([53,5,6,7]));return{id:ju,diagram:e}},"loader"),xk={id:ju,detector:yk,loader:Ck},Uu="venn",bk=p(e=>/^\s*venn-beta/.test(e),"detector"),kk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./vennDiagram-T6HMQDX7-3MobAuu9.js");return{diagram:t}},__vite__mapDeps([54,5,6,7]));return{id:Uu,diagram:e}},"loader"),Sk={id:Uu,detector:bk,loader:kk},Tk=Sk,Xu="treemap",wk=p(e=>/^\s*treemap/.test(e),"detector"),Bk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./diagram-Q27KOJAE-DGFV5XF3.js");return{diagram:t}},__vite__mapDeps([55,22,16,23,5,6,27,31,26,7]));return{id:Xu,diagram:e}},"loader"),_k={id:Xu,detector:wk,loader:Bk},Gu="wardley",vk=p(e=>/^\s*wardley-beta/i.test(e),"detector"),Lk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./wardleyDiagram-T6FBY63Y-DqpjWRCB.js");return{diagram:t}},__vite__mapDeps([56,22,23,5,6,7]));return{id:Gu,diagram:e}},"loader"),Fk={id:Gu,detector:vk,loader:Lk},Mk=Fk,Vu="cynefin",Ak=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Ek=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./cynefinDiagram-MW4NZA55-DVZnWpVZ.js");return{diagram:t}},__vite__mapDeps([57,22,23,5,6,7]));return{id:Vu,diagram:e}},"loader"),$k={id:Vu,detector:Ak,loader:Ek},Zu="railroad",Ok=p(e=>/^\s*railroad-beta/i.test(e),"detector"),Ik=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./railroadDiagram-AXF67PYL-CzUuBkaY.js");return{diagram:t}},__vite__mapDeps([58,59,22,5,6,23,7]));return{id:Zu,diagram:e}},"loader"),Dk={id:Zu,detector:Ok,loader:Ik},Qu="railroadEbnf",Pk=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Rk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./ebnfDiagram-BXEA7PRR-CGft_6NF.js");return{diagram:t}},__vite__mapDeps([60,59,22,5,6,23,7]));return{id:Qu,diagram:e}},"loader"),qk={id:Qu,detector:Pk,loader:Rk},Ku="railroadAbnf",Wk=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),zk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./abnfDiagram-N423BO3Z-CvKroTip.js");return{diagram:t}},__vite__mapDeps([61,59,22,5,6,23,7]));return{id:Ku,diagram:e}},"loader"),Nk={id:Ku,detector:Wk,loader:zk},Ju="railroadPeg",Hk=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Yk=p(async()=>{const{diagram:e}=await ht(async()=>{const{diagram:t}=await import("./pegDiagram-VL7TDLO6-Bf8InnTD.js");return{diagram:t}},__vite__mapDeps([62,59,22,5,6,23,7]));return{id:Ju,diagram:e}},"loader"),jk={id:Ju,detector:Hk,loader:Yk},cl=!1,os=p(()=>{cl||(cl=!0,Bi("error",Lb,e=>e.toLowerCase().trim()==="error"),Bi("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{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:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ss(Eb,Wb,uk),Ss(ux,Yb,ub,nb,Lx,Dx,qx,Nx,tb,sb,wx,bx,mx,Db,Ex,bb,mb,wb,Ux,Gb,Qb,Zx,sk,mk,nk,tk,xk,_k,Dk,qk,Nk,jk,Tk,Mk,$k))},"addDiagrams"),Uk=p(async()=>{z.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Re).map(async([r,{detector:i,loader:s}])=>{if(s)try{_s(r)}catch{try{const{diagram:a,id:o}=await s();Bi(o,a,i)}catch(a){throw z.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Re[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){z.error(`Failed to load ${t.length} external diagrams`);for(const r of t)z.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),Xk="graphics-document document";function tg(e,t){e.attr("role",Xk),t!==""&&e.attr("aria-roledescription",t)}p(tg,"setA11yDiagramInfo");function eg(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(eg,"addSVGa11yTitleDescription");var De,ca=(De=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=Tt(),s=ga(t,i);t=oy(t)+` `;try{_s(s)}catch{const d=ap(s);if(!d)throw new vl(`Diagram ${s} not found.`);const{id:g,diagram:u}=await d();Bi(g,u)}const{db:a,parser:o,renderer:l,init:n}=_s(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),n==null||n(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new De(s,t,a,o,l)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(De,"Diagram"),De),dl=[],Gk=p(()=>{dl.forEach(e=>{e()}),dl=[]},"attachFunctions"),Vk=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function rg(e){const t=e.match(_l);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(` `).map(o=>o.startsWith(r)?o.slice(r.length):o).join(` `):t[2];let s=am(i,{schema:sm})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}p(rg,"extractFrontMatter");var Zk=p(e=>e.replace(/\r\n?/g,` diff --git a/veadk/webui/assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cpyl-vxZ.js b/veadk/webui/assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cv0OruxG.js similarity index 98% rename from veadk/webui/assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cpyl-vxZ.js rename to veadk/webui/assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cv0OruxG.js index b1cb2d088..719653cbf 100644 --- a/veadk/webui/assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cpyl-vxZ.js +++ b/veadk/webui/assets/visualizations/mermaid/mindmap-definition-FAOFIHXS-Cv0OruxG.js @@ -1,4 +1,4 @@ -import{g as oe}from"./chunk-XXDRQBXY-CLLbPKnJ.js";import{s as ce}from"./chunk-KBJHAD2P-fr6wew8I.js";import{a as h,at as R,a4 as le,aK as he,X as de,O as W,Y as U,aN as H,aa as ge,ak as ue,ap as pe,H as fe}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function me(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const ye=new Uint8Array(16);function Ee(){return crypto.getRandomValues(ye)}function _e(t,e,o){return crypto.randomUUID?crypto.randomUUID():ke(t)}function ke(t,e,o){var n;t=t||{};const l=t.random??((n=t.rng)==null?void 0:n.call(t))??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,me(l)}var J=function(){var t=h(function(O,s,i,a){for(i=i||{},a=O.length;a--;i[O[a]]=s);return i},"o"),e=[1,4],o=[1,13],l=[1,12],n=[1,15],d=[1,16],p=[1,20],y=[1,19],E=[6,7,8],b=[1,26],L=[1,24],D=[1,25],k=[6,7,11],$=[1,6,13,15,16,19,22],f=[1,33],B=[1,34],P=[1,6,7,11,13,15,16,19,22],X={trace:h(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:h(function(s,i,a,c,u,r,M){var g=r.length-1;switch(u){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[g].id),c.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:c.getLogger().trace("Icon: ",r[g]),c.decorateNode({icon:r[g]});break;case 17:case 21:c.decorateNode({class:r[g]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[g].id),c.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:c.decorateNode({icon:r[g]});break;case 25:c.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:c.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:c.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:o,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:o,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:b,7:L,10:23,11:D},t(k,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),t(k,[2,21]),t(k,[2,23]),t(k,[2,24]),t(k,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:L,10:32,11:D},{1:[2,7],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t($,[2,14],{7:f,11:B}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(k,[2,15]),t(k,[2,16]),t(k,[2,17]),{20:[1,35]},{21:[1,36]},t($,[2,13],{7:f,11:B}),t(P,[2,11]),t(P,[2,12]),{21:[1,37]},t(k,[2,25]),t(k,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=i,a}},"parseError"),parse:h(function(s){var i=this,a=[0],c=[],u=[null],r=[],M=this.table,g="",F=0,Q=0,ie=2,Z=1,se=r.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(C.yy[z]=this.yy[z]);m.setInput(s,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Y=m.yylloc;r.push(Y);var re=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(x){a.length=a.length-2*x,u.length=u.length-x,r.length=r.length-x}h(ae,"popStack");function ee(){var x;return x=c.pop()||m.lex()||Z,typeof x!="number"&&(x instanceof Array&&(c=x,x=c.pop()),x=i.symbols_[x]||x),x}h(ee,"lex");for(var S,I,N,K,w={},G,v,te,j;;){if(I=a[a.length-1],this.defaultActions[I]?N=this.defaultActions[I]:((S===null||typeof S>"u")&&(S=ee()),N=M[I]&&M[I][S]),typeof N>"u"||!N.length||!N[0]){var q="";j=[];for(G in M[I])this.terminals_[G]&&G>ie&&j.push("'"+this.terminals_[G]+"'");m.showPosition?q="Parse error on line "+(F+1)+`: +import{g as oe}from"./chunk-XXDRQBXY-B5A5gE3j.js";import{s as ce}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{a as h,at as R,a4 as le,aK as he,X as de,O as W,Y as U,aN as H,aa as ge,ak as ue,ap as pe,H as fe}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";const _=[];for(let t=0;t<256;++t)_.push((t+256).toString(16).slice(1));function me(t,e=0){return(_[t[e+0]]+_[t[e+1]]+_[t[e+2]]+_[t[e+3]]+"-"+_[t[e+4]]+_[t[e+5]]+"-"+_[t[e+6]]+_[t[e+7]]+"-"+_[t[e+8]]+_[t[e+9]]+"-"+_[t[e+10]]+_[t[e+11]]+_[t[e+12]]+_[t[e+13]]+_[t[e+14]]+_[t[e+15]]).toLowerCase()}const ye=new Uint8Array(16);function Ee(){return crypto.getRandomValues(ye)}function _e(t,e,o){return crypto.randomUUID?crypto.randomUUID():ke(t)}function ke(t,e,o){var n;t=t||{};const l=t.random??((n=t.rng)==null?void 0:n.call(t))??Ee();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,me(l)}var J=function(){var t=h(function(O,s,i,a){for(i=i||{},a=O.length;a--;i[O[a]]=s);return i},"o"),e=[1,4],o=[1,13],l=[1,12],n=[1,15],d=[1,16],p=[1,20],y=[1,19],E=[6,7,8],b=[1,26],L=[1,24],D=[1,25],k=[6,7,11],$=[1,6,13,15,16,19,22],f=[1,33],B=[1,34],P=[1,6,7,11,13,15,16,19,22],X={trace:h(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:h(function(s,i,a,c,u,r,M){var g=r.length-1;switch(u){case 6:case 7:return c;case 8:c.getLogger().trace("Stop NL ");break;case 9:c.getLogger().trace("Stop EOF ");break;case 11:c.getLogger().trace("Stop NL2 ");break;case 12:c.getLogger().trace("Stop EOF2 ");break;case 15:c.getLogger().info("Node: ",r[g].id),c.addNode(r[g-1].length,r[g].id,r[g].descr,r[g].type);break;case 16:c.getLogger().trace("Icon: ",r[g]),c.decorateNode({icon:r[g]});break;case 17:case 21:c.decorateNode({class:r[g]});break;case 18:c.getLogger().trace("SPACELIST");break;case 19:c.getLogger().trace("Node: ",r[g].id),c.addNode(0,r[g].id,r[g].descr,r[g].type);break;case 20:c.decorateNode({icon:r[g]});break;case 25:c.getLogger().trace("node found ..",r[g-2]),this.$={id:r[g-1],descr:r[g-1],type:c.getType(r[g-2],r[g])};break;case 26:this.$={id:r[g],descr:r[g],type:c.nodeType.DEFAULT};break;case 27:c.getLogger().trace("node found ..",r[g-3]),this.$={id:r[g-3],descr:r[g-1],type:c.getType(r[g-2],r[g])};break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:o,7:[1,10],9:9,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t(E,[2,3]),{1:[2,2]},t(E,[2,4]),t(E,[2,5]),{1:[2,6],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:o,9:22,12:11,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},{6:b,7:L,10:23,11:D},t(k,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:p,22:y}),t(k,[2,18]),t(k,[2,19]),t(k,[2,20]),t(k,[2,21]),t(k,[2,23]),t(k,[2,24]),t(k,[2,26],{19:[1,30]}),{20:[1,31]},{6:b,7:L,10:32,11:D},{1:[2,7],6:o,12:21,13:l,14:14,15:n,16:d,17:17,18:18,19:p,22:y},t($,[2,14],{7:f,11:B}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(k,[2,15]),t(k,[2,16]),t(k,[2,17]),{20:[1,35]},{21:[1,36]},t($,[2,13],{7:f,11:B}),t(P,[2,11]),t(P,[2,12]),{21:[1,37]},t(k,[2,25]),t(k,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:h(function(s,i){if(i.recoverable)this.trace(s);else{var a=new Error(s);throw a.hash=i,a}},"parseError"),parse:h(function(s){var i=this,a=[0],c=[],u=[null],r=[],M=this.table,g="",F=0,Q=0,ie=2,Z=1,se=r.slice.call(arguments,1),m=Object.create(this.lexer),C={yy:{}};for(var z in this.yy)Object.prototype.hasOwnProperty.call(this.yy,z)&&(C.yy[z]=this.yy[z]);m.setInput(s,C.yy),C.yy.lexer=m,C.yy.parser=this,typeof m.yylloc>"u"&&(m.yylloc={});var Y=m.yylloc;r.push(Y);var re=m.options&&m.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ae(x){a.length=a.length-2*x,u.length=u.length-x,r.length=r.length-x}h(ae,"popStack");function ee(){var x;return x=c.pop()||m.lex()||Z,typeof x!="number"&&(x instanceof Array&&(c=x,x=c.pop()),x=i.symbols_[x]||x),x}h(ee,"lex");for(var S,I,N,K,w={},G,v,te,j;;){if(I=a[a.length-1],this.defaultActions[I]?N=this.defaultActions[I]:((S===null||typeof S>"u")&&(S=ee()),N=M[I]&&M[I][S]),typeof N>"u"||!N.length||!N[0]){var q="";j=[];for(G in M[I])this.terminals_[G]&&G>ie&&j.push("'"+this.terminals_[G]+"'");m.showPosition?q="Parse error on line "+(F+1)+`: `+m.showPosition()+` Expecting `+j.join(", ")+", got '"+(this.terminals_[S]||S)+"'":q="Parse error on line "+(F+1)+": Unexpected "+(S==Z?"end of input":"'"+(this.terminals_[S]||S)+"'"),this.parseError(q,{text:m.match,token:this.terminals_[S]||S,line:m.yylineno,loc:Y,expected:j})}if(N[0]instanceof Array&&N.length>1)throw new Error("Parse Error: multiple actions possible at state: "+I+", token: "+S);switch(N[0]){case 1:a.push(S),u.push(m.yytext),r.push(m.yylloc),a.push(N[1]),S=null,Q=m.yyleng,g=m.yytext,F=m.yylineno,Y=m.yylloc;break;case 2:if(v=this.productions_[N[1]][1],w.$=u[u.length-v],w._$={first_line:r[r.length-(v||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(v||1)].first_column,last_column:r[r.length-1].last_column},re&&(w._$.range=[r[r.length-(v||1)].range[0],r[r.length-1].range[1]]),K=this.performAction.apply(w,[g,Q,F,C.yy,N[1],u,r].concat(se)),typeof K<"u")return K;v&&(a=a.slice(0,-1*v*2),u=u.slice(0,-1*v),r=r.slice(0,-1*v)),a.push(this.productions_[N[1]][0]),u.push(w.$),r.push(w._$),te=M[a[a.length-2]][a[a.length-1]],a.push(te);break;case 3:return!0}}return!0},"parse")},ne=function(){var O={EOF:1,parseError:h(function(i,a){if(this.yy.parser)this.yy.parser.parseError(i,a);else throw new Error(i)},"parseError"),setInput:h(function(s,i){return this.yy=i||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:h(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var i=s.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),s},"input"),unput:h(function(s){var i=s.length,a=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;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),a.length-1&&(this.yylineno-=a.length-1);var u=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:a?(a.length===c.length?this.yylloc.first_column:0)+c[c.length-a.length].length-a[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[u[0],u[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(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:h(function(s){this.unput(this.match.slice(s))},"less"),pastInput:h(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var s=this.pastInput(),i=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bl4rZ4lT.js b/veadk/webui/assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bf8InnTD.js similarity index 87% rename from veadk/webui/assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bl4rZ4lT.js rename to veadk/webui/assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bf8InnTD.js index d7f285c5e..5eb431db9 100644 --- a/veadk/webui/assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bl4rZ4lT.js +++ b/veadk/webui/assets/visualizations/mermaid/pegDiagram-VL7TDLO6-Bf8InnTD.js @@ -1 +1 @@ -import{g as l,r as m,d as a}from"./chunk-6Q2QTUOP-BK6W1hz6.js";import{p}from"./chunk-JWPE2WC7-BHkERHFx.js";import{a as t,at as o}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import{M as u,b as c}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../chunks/purify.es-BnINGy_Y.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; +import{g as l,r as m,d as a}from"./chunk-6Q2QTUOP-CKQiwqPP.js";import{p}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a as t,at as o}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import{M as u,b as c}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../chunks/purify.es-BnINGy_Y.js";var f=c().RailroadPeg.parser.LangiumParser,i=t(e=>{const r=e.alternatives.map(d);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformOrderedChoice"),d=t(e=>{const r=e.elements.map(P);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),P=t(e=>{const r=g(e.suffix);return e.operator?{type:"special",text:e.operator==="&"?`&${s(r)}`:`!${s(r)}`}:r},"transformPrefix"),s=t(e=>{switch(e.type){case"terminal":return`"${e.value}"`;case"nonterminal":return e.name;case"special":return e.text;default:return"(...)"}},"nodeToLabel"),g=t(e=>{const r=v(e.primary);if(!e.operator)return r;switch(e.operator){case"?":return{type:"optional",element:r};case"*":return{type:"repetition",element:r,min:0,max:1/0};case"+":return{type:"repetition",element:r,min:1,max:1/0};default:throw new Error(`Unsupported PEG suffix operator: ${e.operator}`)}},"transformSuffix"),v=t(e=>{switch(e.$type){case"PegLiteral":return{type:"terminal",value:e.value};case"PegIdentifier":return{type:"nonterminal",name:e.name};case"PegGroup":return i(e.element);case"PegAny":return{type:"special",text:e.dot};default:throw new Error(`Unsupported PEG primary node: ${e.$type}`)}},"transformPrimary"),y=t(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=t(e=>{p(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(y(r)))},"populateDb"),b={parse:t(e=>{a.clear(),o.debug("[PEG Parser] Starting Langium parse");const r=f.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const n=r.value;o.debug("[PEG Parser] Parsed rules:",n.rules.length),h(n),o.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:a}},L={parser:b,db:a,renderer:m,styles:l};export{L as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-BrA5klpF.js b/veadk/webui/assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-Q4qQKLJC.js similarity index 96% rename from veadk/webui/assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-BrA5klpF.js rename to veadk/webui/assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-Q4qQKLJC.js index a72c8e01b..8cc873bce 100644 --- a/veadk/webui/assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-BrA5klpF.js +++ b/veadk/webui/assets/visualizations/mermaid/pieDiagram-7S7Q4E2Y-Q4qQKLJC.js @@ -1,4 +1,4 @@ -import{p as rt}from"./chunk-JWPE2WC7-BHkERHFx.js";import{D as T,b1 as B,f as nt,V as it,aQ as ot,W as st,aR as lt,$ as ct,aT as ut,a as d,at as G,Y as gt,r as dt,aP as pt,aC as ht,B as ft,s as mt,O as vt}from"./mermaid.core-BmHujEI0.js";import{p as xt}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../app/index-B71Wq9_t.js";import{d as Z}from"../../chunks/arc-DjcXfbMc.js";import{o as St}from"../../chunks/ordinal-Cboi1Yqb.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";function yt(t,n){return nt?1:n>=t?0:NaN}function wt(t){return t}function At(){var t=wt,n=yt,y=null,b=T(0),l=T(B),p=T(0);function i(e){var r,s=(e=nt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(B,Math.max(-B,l.apply(this,arguments)-D)),k,W=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=W*(E<0?-1:1),A;for(r=0;r0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:W};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var Ct=vt.pie,I={sections:new Map,showData:!1},P=I.sections,V=I.showData,$t=structuredClone(Ct),Dt=d(()=>structuredClone($t),"getConfig"),Tt=d(()=>{P=new Map,V=I.showData,mt()},"clear"),bt=d(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);P.has(t)||(P.set(t,n),G.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),kt=d(()=>P,"getSections"),zt=d(t=>{V=t},"setShowData"),Et=d(()=>V,"getShowData"),q={getConfig:Dt,clear:Tt,setDiagramTitle:ut,getDiagramTitle:ct,setAccTitle:lt,getAccTitle:st,setAccDescription:ot,getAccDescription:it,addSection:bt,getSections:kt,setShowData:zt,getShowData:Et},Mt=d((t,n)=>{rt(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Rt={parse:d(async t=>{const n=await xt("pie",t);G.debug(n),Mt(n,q)},"parse")},Wt=d(t=>` +import{p as rt}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{D as T,b1 as B,f as nt,V as it,aQ as ot,W as st,aR as lt,$ as ct,aT as ut,a as d,at as G,Y as gt,r as dt,aP as pt,aC as ht,B as ft,s as mt,O as vt}from"./mermaid.core-l-gs7P2Q.js";import{p as xt}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../app/index-BKQXvMzA.js";import{d as Z}from"../../chunks/arc-DdnIeIBk.js";import{o as St}from"../../chunks/ordinal-Cboi1Yqb.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";function yt(t,n){return nt?1:n>=t?0:NaN}function wt(t){return t}function At(){var t=wt,n=yt,y=null,b=T(0),l=T(B),p=T(0);function i(e){var r,s=(e=nt(e)).length,h,w,$=0,f=new Array(s),o=new Array(s),D=+b.apply(this,arguments),E=Math.min(B,Math.max(-B,l.apply(this,arguments)-D)),k,W=Math.min(Math.abs(E)/s,p.apply(this,arguments)),u=W*(E<0?-1:1),A;for(r=0;r0&&($+=A);for(n!=null?f.sort(function(M,m){return n(o[M],o[m])}):y!=null&&f.sort(function(M,m){return y(e[M],e[m])}),r=0,w=$?(E-s*u)/$:0;r0?A*w:0)+u,o[h]={data:e[h],index:r,value:A,startAngle:D,endAngle:k,padAngle:W};return o}return i.value=function(e){return arguments.length?(t=typeof e=="function"?e:T(+e),i):t},i.sortValues=function(e){return arguments.length?(n=e,y=null,i):n},i.sort=function(e){return arguments.length?(y=e,n=null,i):y},i.startAngle=function(e){return arguments.length?(b=typeof e=="function"?e:T(+e),i):b},i.endAngle=function(e){return arguments.length?(l=typeof e=="function"?e:T(+e),i):l},i.padAngle=function(e){return arguments.length?(p=typeof e=="function"?e:T(+e),i):p},i}var Ct=vt.pie,I={sections:new Map,showData:!1},P=I.sections,V=I.showData,$t=structuredClone(Ct),Dt=d(()=>structuredClone($t),"getConfig"),Tt=d(()=>{P=new Map,V=I.showData,mt()},"clear"),bt=d(({label:t,value:n})=>{if(n<0)throw new Error(`"${t}" has invalid value: ${n}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);P.has(t)||(P.set(t,n),G.debug(`added new section: ${t}, with value: ${n}`))},"addSection"),kt=d(()=>P,"getSections"),zt=d(t=>{V=t},"setShowData"),Et=d(()=>V,"getShowData"),q={getConfig:Dt,clear:Tt,setDiagramTitle:ut,getDiagramTitle:ct,setAccTitle:lt,getAccTitle:st,setAccDescription:ot,getAccDescription:it,addSection:bt,getSections:kt,setShowData:zt,getShowData:Et},Mt=d((t,n)=>{rt(t,n),n.setShowData(t.showData),t.sections.map(n.addSection)},"populateDb"),Rt={parse:d(async t=>{const n=await xt("pie",t);G.debug(n),Mt(n,q)},"parse")},Wt=d(t=>` .pieCircle{ stroke: ${t.pieStrokeColor}; stroke-width : ${t.pieStrokeWidth}; diff --git a/veadk/webui/assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CDVP-ZKS.js b/veadk/webui/assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CganP-3e.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CDVP-ZKS.js rename to veadk/webui/assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CganP-3e.js index dd864a085..ed5ff9b91 100644 --- a/veadk/webui/assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CDVP-ZKS.js +++ b/veadk/webui/assets/visualizations/mermaid/quadrantDiagram-CIZ2JOQS-CganP-3e.js @@ -1,4 +1,4 @@ -import{aQ as Ae,V as ke,$ as ae,aT as Fe,W as Pe,aR as ve,a as o,Y as wt,at as At,B as Ce,s as Le,O as V,aN as Ee,a8 as De}from"./mermaid.core-BmHujEI0.js";import{aG as Vt}from"../../app/index-B71Wq9_t.js";import{l as ie}from"../../chunks/linear-BV49BAJJ.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";import"../../chunks/defaultLocale-CrowFXzY.js";var zt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[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],S=[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],a=[55,56,57],k=[2,36],d=[1,37],T=[1,36],m=[1,38],q=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],Q=[1,32],U=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Qt=[1,68],Ut=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(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:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:m,12:q,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:m,12:q,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:52,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:53,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:54,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:55,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:56,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:57,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Qt,7:Ut,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Qt,7:Ut,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:m,12:q,13:b,14:x,15:_,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:m,12:q,13:b,14:x,15:_,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",qt=0,Jt=0,qe=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(qt+1)+`: +import{aQ as Ae,V as ke,$ as ae,aT as Fe,W as Pe,aR as ve,a as o,Y as wt,at as At,B as Ce,s as Le,O as V,aN as Ee,a8 as De}from"./mermaid.core-l-gs7P2Q.js";import{aG as Vt}from"../../app/index-BKQXvMzA.js";import{l as ie}from"../../chunks/linear-apY3LTrF.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";import"../../chunks/defaultLocale-CrowFXzY.js";var zt=function(){var t=o(function(j,r,l,g){for(l=l||{},g=j.length;g--;l[j[g]]=r);return l},"o"),n=[1,3],u=[1,4],c=[1,5],h=[1,6],p=[1,7],y=[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],S=[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],a=[55,56,57],k=[2,36],d=[1,37],T=[1,36],m=[1,38],q=[1,35],b=[1,43],x=[1,41],_=[1,45],Y=[1,14],G=[1,23],yt=[1,18],Tt=[1,19],dt=[1,20],Ft=[1,21],ut=[1,22],xt=[1,24],ft=[1,25],gt=[1,26],i=[1,27],Bt=[1,28],Rt=[1,29],Q=[1,32],U=[1,33],F=[1,34],P=[1,39],v=[1,40],C=[1,42],L=[1,44],H=[1,63],X=[1,62],E=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],Nt=[1,66],Wt=[1,67],Qt=[1,68],Ut=[1,69],Ot=[1,70],Ht=[1,71],Xt=[1,72],Mt=[1,73],Yt=[1,74],jt=[1,75],Gt=[1,76],Kt=[1,77],w=[4,5,6,7,8,9,10,11,12,13,14,15,18],J=[1,91],$=[1,92],tt=[1,93],et=[1,100],it=[1,94],at=[1,97],nt=[1,95],st=[1,96],rt=[1,98],ot=[1,99],Pt=[1,103],Zt=[10,55,56,57],N=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],vt={trace:o(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:o(function(r,l,g,f,A,e,pt){var s=e.length-1;switch(A){case 23:this.$=e[s];break;case 24:this.$=e[s-1]+""+e[s];break;case 26:this.$=e[s-1]+e[s];break;case 27:this.$=[e[s].trim()];break;case 28:e[s-2].push(e[s].trim()),this.$=e[s-2];break;case 29:this.$=e[s-4],f.addClass(e[s-2],e[s]);break;case 37:this.$=[];break;case 42:this.$=e[s].trim(),f.setDiagramTitle(this.$);break;case 43:this.$=e[s].trim(),f.setAccTitle(this.$);break;case 44:case 45:this.$=e[s].trim(),f.setAccDescription(this.$);break;case 46:f.addSection(e[s].substr(8)),this.$=e[s].substr(8);break;case 47:f.addPoint(e[s-3],"",e[s-1],e[s],[]);break;case 48:f.addPoint(e[s-4],e[s-3],e[s-1],e[s],[]);break;case 49:f.addPoint(e[s-4],"",e[s-2],e[s-1],e[s]);break;case 50:f.addPoint(e[s-5],e[s-4],e[s-2],e[s-1],e[s]);break;case 51:f.setXAxisLeftText(e[s-2]),f.setXAxisRightText(e[s]);break;case 52:e[s-1].text+=" ⟶ ",f.setXAxisLeftText(e[s-1]);break;case 53:f.setXAxisLeftText(e[s]);break;case 54:f.setYAxisBottomText(e[s-2]),f.setYAxisTopText(e[s]);break;case 55:e[s-1].text+=" ⟶ ",f.setYAxisBottomText(e[s-1]);break;case 56:f.setYAxisBottomText(e[s]);break;case 57:f.setQuadrant1Text(e[s]);break;case 58:f.setQuadrant2Text(e[s]);break;case 59:f.setQuadrant3Text(e[s]);break;case 60:f.setQuadrant4Text(e[s]);break;case 64:this.$={text:e[s],type:"text"};break;case 65:this.$={text:e[s-1].text+""+e[s],type:e[s-1].type};break;case 66:this.$={text:e[s],type:"text"};break;case 67:this.$={text:e[s],type:"markdown"};break;case 68:this.$=e[s];break;case 69:this.$=e[s-1]+""+e[s];break}},"anonymous"),table:[{18:n,26:1,27:2,28:u,55:c,56:h,57:p},{1:[3]},{18:n,26:8,27:2,28:u,55:c,56:h,57:p},{18:n,26:9,27:2,28:u,55:c,56:h,57:p},t(y,[2,33],{29:10}),t(S,[2,61]),t(S,[2,62]),t(S,[2,63]),{1:[2,30]},{1:[2,31]},t(a,k,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:T,10:m,12:q,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),t(y,[2,34]),{27:46,55:c,56:h,57:p},t(a,[2,37]),t(a,k,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:T,10:m,12:q,13:b,14:x,15:_,18:Y,25:G,35:yt,37:Tt,39:dt,41:Ft,42:ut,48:xt,50:ft,51:gt,52:i,53:Bt,54:Rt,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),t(a,[2,39]),t(a,[2,40]),t(a,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},t(a,[2,45]),t(a,[2,46]),{18:[1,51]},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:52,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:53,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:54,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:55,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:56,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,10:m,12:q,13:b,14:x,15:_,43:57,58:31,60:Q,61:U,63:F,64:P,65:v,66:C,67:L},{4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,44:[1,58],47:[1,59],58:61,59:60,63:F,64:P,65:v,66:C,67:L},t(E,[2,64]),t(E,[2,66]),t(E,[2,67]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(E,[2,74]),t(E,[2,75]),t(E,[2,76]),t(E,[2,77]),t(E,[2,78]),t(E,[2,79]),t(E,[2,80]),t(E,[2,81]),t(y,[2,35]),t(a,[2,38]),t(a,[2,42]),t(a,[2,43]),t(a,[2,44]),{3:65,4:Nt,5:Wt,6:Qt,7:Ut,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,21:64},t(a,[2,53],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,49:[1,78],63:F,64:P,65:v,66:C,67:L}),t(a,[2,56],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,49:[1,79],63:F,64:P,65:v,66:C,67:L}),t(a,[2,57],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,58],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,59],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,60],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),{45:[1,80]},{44:[1,81]},t(E,[2,65]),t(E,[2,82]),t(E,[2,83]),t(E,[2,84]),{3:83,4:Nt,5:Wt,6:Qt,7:Ut,8:Ot,9:Ht,10:Xt,11:Mt,12:Yt,13:jt,14:Gt,15:Kt,18:[1,82]},t(w,[2,23]),t(w,[2,1]),t(w,[2,2]),t(w,[2,3]),t(w,[2,4]),t(w,[2,5]),t(w,[2,6]),t(w,[2,7]),t(w,[2,8]),t(w,[2,9]),t(w,[2,10]),t(w,[2,11]),t(w,[2,12]),t(a,[2,52],{58:31,43:84,4:d,5:T,10:m,12:q,13:b,14:x,15:_,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),t(a,[2,55],{58:31,43:85,4:d,5:T,10:m,12:q,13:b,14:x,15:_,60:Q,61:U,63:F,64:P,65:v,66:C,67:L}),{46:[1,86]},{45:[1,87]},{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:89,23:88},t(w,[2,24]),t(a,[2,51],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,54],{59:60,58:61,4:d,5:T,8:H,10:m,12:q,13:b,14:x,15:_,18:X,63:F,64:P,65:v,66:C,67:L}),t(a,[2,47],{22:89,16:90,23:101,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{46:[1,102]},t(a,[2,29],{10:Pt}),t(Zt,[2,27],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),t(N,[2,25]),t(N,[2,13]),t(N,[2,14]),t(N,[2,15]),t(N,[2,16]),t(N,[2,17]),t(N,[2,18]),t(N,[2,19]),t(N,[2,20]),t(N,[2,21]),t(N,[2,22]),t(a,[2,49],{10:Pt}),t(a,[2,48],{22:89,16:90,23:105,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot}),{4:J,5:$,6:tt,8:et,11:it,13:at,16:90,17:nt,18:st,19:rt,20:ot,22:106},t(N,[2,26]),t(a,[2,50],{10:Pt}),t(Zt,[2,28],{16:104,4:J,5:$,6:tt,8:et,11:it,13:at,17:nt,18:st,19:rt,20:ot})],defaultActions:{8:[2,30],9:[2,31]},parseError:o(function(r,l){if(l.recoverable)this.trace(r);else{var g=new Error(r);throw g.hash=l,g}},"parseError"),parse:o(function(r){var l=this,g=[0],f=[],A=[null],e=[],pt=this.table,s="",qt=0,Jt=0,qe=2,$t=1,be=e.slice.call(arguments,1),D=Object.create(this.lexer),K={yy:{}};for(var Ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ct)&&(K.yy[Ct]=this.yy[Ct]);D.setInput(r,K.yy),K.yy.lexer=D,K.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Lt=D.yylloc;e.push(Lt);var Se=D.options&&D.options.ranges;typeof K.yy.parseError=="function"?this.parseError=K.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function _e(R){g.length=g.length-2*R,A.length=A.length-R,e.length=e.length-R}o(_e,"popStack");function te(){var R;return R=f.pop()||D.lex()||$t,typeof R!="number"&&(R instanceof Array&&(f=R,R=f.pop()),R=l.symbols_[R]||R),R}o(te,"lex");for(var B,Z,W,Et,lt={},bt,M,ee,St;;){if(Z=g[g.length-1],this.defaultActions[Z]?W=this.defaultActions[Z]:((B===null||typeof B>"u")&&(B=te()),W=pt[Z]&&pt[Z][B]),typeof W>"u"||!W.length||!W[0]){var Dt="";St=[];for(bt in pt[Z])this.terminals_[bt]&&bt>qe&&St.push("'"+this.terminals_[bt]+"'");D.showPosition?Dt="Parse error on line "+(qt+1)+`: `+D.showPosition()+` Expecting `+St.join(", ")+", got '"+(this.terminals_[B]||B)+"'":Dt="Parse error on line "+(qt+1)+": Unexpected "+(B==$t?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(Dt,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Lt,expected:St})}if(W[0]instanceof Array&&W.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+B);switch(W[0]){case 1:g.push(B),A.push(D.yytext),e.push(D.yylloc),g.push(W[1]),B=null,Jt=D.yyleng,s=D.yytext,qt=D.yylineno,Lt=D.yylloc;break;case 2:if(M=this.productions_[W[1]][1],lt.$=A[A.length-M],lt._$={first_line:e[e.length-(M||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(M||1)].first_column,last_column:e[e.length-1].last_column},Se&&(lt._$.range=[e[e.length-(M||1)].range[0],e[e.length-1].range[1]]),Et=this.performAction.apply(lt,[s,Jt,qt,K.yy,W[1],A,e].concat(be)),typeof Et<"u")return Et;M&&(g=g.slice(0,-1*M*2),A=A.slice(0,-1*M),e=e.slice(0,-1*M)),g.push(this.productions_[W[1]][0]),A.push(lt.$),e.push(lt._$),ee=pt[g[g.length-2]][g[g.length-1]],g.push(ee);break;case 3:return!0}}return!0},"parse")},me=function(){var j={EOF:1,parseError:o(function(l,g){if(this.yy.parser)this.yy.parser.parseError(l,g);else throw new Error(l)},"parseError"),setInput:o(function(r,l){return this.yy=l||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:o(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var l=r.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),r},"input"),unput:o(function(r){var l=r.length,g=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;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),g.length-1&&(this.yylineno-=g.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:g?(g.length===f.length?this.yylloc.first_column:0)+f[f.length-g.length].length-g[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[A[0],A[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:o(function(){return this._more=!0,this},"more"),reject:o(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:o(function(r){this.unput(this.match.slice(r))},"less"),pastInput:o(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:o(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:o(function(){var r=this.pastInput(),l=new Array(r.length+1).join("-");return r+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/railroadDiagram-AXF67PYL-BLzRIX9p.js b/veadk/webui/assets/visualizations/mermaid/railroadDiagram-AXF67PYL-CzUuBkaY.js similarity index 84% rename from veadk/webui/assets/visualizations/mermaid/railroadDiagram-AXF67PYL-BLzRIX9p.js rename to veadk/webui/assets/visualizations/mermaid/railroadDiagram-AXF67PYL-CzUuBkaY.js index 2c3f195c1..7c100cd2a 100644 --- a/veadk/webui/assets/visualizations/mermaid/railroadDiagram-AXF67PYL-BLzRIX9p.js +++ b/veadk/webui/assets/visualizations/mermaid/railroadDiagram-AXF67PYL-CzUuBkaY.js @@ -1 +1 @@ -import{g as s,r as l,d as t}from"./chunk-6Q2QTUOP-BK6W1hz6.js";import{p as m}from"./chunk-JWPE2WC7-BHkERHFx.js";import{a as n,at as i}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import{M as p,d as u}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../chunks/purify.es-BnINGy_Y.js";var d=u().Railroad.parser.LangiumParser,a=n(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":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; +import{g as s,r as l,d as t}from"./chunk-6Q2QTUOP-CKQiwqPP.js";import{p as m}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{a as n,at as i}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import{M as p,d as u}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../chunks/purify.es-BnINGy_Y.js";var d=u().Railroad.parser.LangiumParser,a=n(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":{const r=e.elements.map(a);return r.length===1?r[0]:{type:"sequence",elements:r}}case"RailroadChoiceExpr":{const r=e.alternatives.map(a);return r.length===1?r[0]:{type:"choice",alternatives:r}}case"RailroadOptionalExpr":return{type:"optional",element:a(e.element)};case"RailroadOneOrMoreExpr":return{type:"repetition",element:a(e.element),min:1,max:1/0};case"RailroadZeroOrMoreExpr":return{type:"repetition",element:a(e.element),min:0,max:1/0};default:throw new Error(`Unsupported railroad expression: ${e.$type}`)}},"transformExpression"),c=n(e=>({name:e.name,definition:a(e.definition)}),"transformRule"),g=n(e=>{m(e,t),e.title&&t.setTitle(e.title),e.rules.map(r=>t.addRule(c(r)))},"populateDb"),y={parse:n(e=>{t.clear(),i.debug("[Railroad Parser] Starting Langium parse");const r=d.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new p(r);const o=r.value;i.debug("[Railroad Parser] Parsed rules:",o.rules.length),g(o),i.debug("[Railroad Parser] Parse complete")},"parse"),parser:{yy:t}},P={parser:y,db:t,renderer:l,styles:s};export{P as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-QwdhgEBj.js b/veadk/webui/assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-L5P0T9H0.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-QwdhgEBj.js rename to veadk/webui/assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-L5P0T9H0.js index dc10bd9f4..79700bc2d 100644 --- a/veadk/webui/assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-QwdhgEBj.js +++ b/veadk/webui/assets/visualizations/mermaid/requirementDiagram-LRYGKXZP-L5P0T9H0.js @@ -1,4 +1,4 @@ -import{g as ze}from"./chunk-XXDRQBXY-CLLbPKnJ.js";import{s as Xe}from"./chunk-KBJHAD2P-fr6wew8I.js";import{a as d,X as Be,aR as Je,W as Ze,aQ as et,V as tt,aT as st,$ as it,Y as Ne,at as qe,s as rt,_ as nt,a4 as at,aK as lt,b9 as ct}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],f=[1,26],m=[1,27],b=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],y=[1,39],_=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[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],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[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],Y=[63,64],Me=[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],N=[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],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(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:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{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(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:y,90:_},{30:63,33:62,75:P,89:y,90:_},{30:64,33:62,75:P,89:y,90:_},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[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(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:y,90:_},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:y,90:_},{5:[1,95]},{30:96,33:62,75:P,89:y,90:_},{5:[1,97]},{30:98,33:62,75:P,89:y,90:_},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:y,90:_},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:y,90:_},{33:120,89:y,90:_},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:y,90:_},{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(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{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(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[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:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),S=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);S.setInput(i,G.yy),G.yy.lexer=S,G.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var Ie=S.yylloc;t.push(Ie);var je=S.options&&S.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(Ge,"popStack");function Ue(){var T;return T=s.pop()||S.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,z,q,Te,J={},ye,F,Ye,_e;;){if(z=l[l.length-1],this.defaultActions[z]?q=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),q=de[z]&&de[z][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");S.showPosition?ke="Parse error on line "+(ge+1)+`: +import{g as ze}from"./chunk-XXDRQBXY-B5A5gE3j.js";import{s as Xe}from"./chunk-KBJHAD2P-mhv9-tYP.js";import{a as d,X as Be,aR as Je,W as Ze,aQ as et,V as tt,aT as st,$ as it,Y as Ne,at as qe,s as rt,_ as nt,a4 as at,aK as lt,b9 as ct}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var Ce=function(){var e=d(function($,i,n,l){for(n=n||{},l=$.length;l--;n[$[l]]=i);return n},"o"),r=[1,3],u=[1,4],h=[1,5],o=[1,6],c=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,22],p=[2,7],f=[1,26],m=[1,27],b=[1,28],k=[1,29],C=[1,33],V=[1,34],A=[1,35],v=[1,36],L=[1,37],x=[1,38],O=[1,24],w=[1,31],D=[1,32],M=[1,30],y=[1,39],_=[1,40],g=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],P=[1,61],X=[89,90],Ve=[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],Ee=[27,29],Ae=[1,70],ve=[1,71],Le=[1,72],xe=[1,73],Oe=[1,74],we=[1,75],De=[1,76],ee=[1,83],U=[1,80],te=[1,84],se=[1,85],ie=[1,86],re=[1,87],ne=[1,88],ae=[1,89],le=[1,90],ce=[1,91],oe=[1,92],pe=[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],Y=[63,64],Me=[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],N=[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],B=[1,110],Q=[1,106],H=[1,107],K=[1,108],W=[1,109],j=[1,111],he=[1,116],ue=[1,117],fe=[1,114],me=[1,115],Se={trace:d(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:d(function(i,n,l,s,R,t,de){var a=t.length-1;switch(R){case 4:this.$=t[a].trim(),s.setAccTitle(this.$);break;case 5:case 6:this.$=t[a].trim(),s.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:s.setDirection("TB");break;case 18:s.setDirection("BT");break;case 19:s.setDirection("RL");break;case 20:s.setDirection("LR");break;case 21:s.addRequirement(t[a-3],t[a-4]);break;case 22:s.addRequirement(t[a-5],t[a-6]),s.setClass([t[a-5]],t[a-3]);break;case 23:s.setNewReqId(t[a-2]);break;case 24:s.setNewReqText(t[a-2]);break;case 25:s.setNewReqRisk(t[a-2]);break;case 26:s.setNewReqVerifyMethod(t[a-2]);break;case 29:this.$=s.RequirementType.REQUIREMENT;break;case 30:this.$=s.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=s.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=s.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=s.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=s.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=s.RiskLevel.LOW_RISK;break;case 36:this.$=s.RiskLevel.MED_RISK;break;case 37:this.$=s.RiskLevel.HIGH_RISK;break;case 38:this.$=s.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=s.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=s.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=s.VerifyType.VERIFY_TEST;break;case 42:s.addElement(t[a-3]);break;case 43:s.addElement(t[a-5]),s.setClass([t[a-5]],t[a-3]);break;case 44:s.setNewElementType(t[a-2]);break;case 45:s.setNewElementDocRef(t[a-2]);break;case 48:s.addRelationship(t[a-2],t[a],t[a-4]);break;case 49:s.addRelationship(t[a-2],t[a-4],t[a]);break;case 50:this.$=s.Relationships.CONTAINS;break;case 51:this.$=s.Relationships.COPIES;break;case 52:this.$=s.Relationships.DERIVES;break;case 53:this.$=s.Relationships.SATISFIES;break;case 54:this.$=s.Relationships.VERIFIES;break;case 55:this.$=s.Relationships.REFINES;break;case 56:this.$=s.Relationships.TRACES;break;case 57:this.$=t[a-2],s.defineClass(t[a-1],t[a]);break;case 58:s.setClass(t[a-1],t[a]);break;case 59:s.setClass([t[a-2]],t[a]);break;case 60:case 62:this.$=[t[a]];break;case 61:case 63:this.$=t[a-2].concat([t[a]]);break;case 64:this.$=t[a-2],s.setCssStyle(t[a-1],t[a]);break;case 65:this.$=[t[a]];break;case 66:t[a-2].push(t[a]),this.$=t[a-2];break;case 68:this.$=t[a-1]+t[a];break}},"anonymous"),table:[{3:1,4:2,6:r,9:u,11:h,13:o},{1:[3]},{3:8,4:2,5:[1,7],6:r,9:u,11:h,13:o},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(c,[2,6]),{3:12,4:2,6:r,9:u,11:h,13:o},{1:[2,2]},{4:17,5:E,7:13,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},e(c,[2,4]),e(c,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:E,7:42,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:43,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:44,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:45,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:46,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:47,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:48,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:49,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{4:17,5:E,7:50,8:p,9:u,11:h,13:o,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:f,22:m,23:b,24:k,25:23,33:25,41:C,42:V,43:A,44:v,45:L,46:x,54:O,72:w,74:D,77:M,89:y,90:_},{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(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),{30:60,33:62,75:P,89:y,90:_},{30:63,33:62,75:P,89:y,90:_},{30:64,33:62,75:P,89:y,90:_},e(X,[2,29]),e(X,[2,30]),e(X,[2,31]),e(X,[2,32]),e(X,[2,33]),e(X,[2,34]),e(Ve,[2,81]),e(Ve,[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(Ee,[2,79]),e(Ee,[2,80]),{27:[1,67],29:[1,68]},e(Ee,[2,85]),e(Ee,[2,86]),{62:69,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{62:77,65:Ae,66:ve,67:Le,68:xe,69:Oe,70:we,71:De},{30:78,33:62,75:P,89:y,90:_},{73:79,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,60]),e(pe,[2,62]),{73:93,75:ee,76:U,78:81,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},{30:94,33:62,75:P,76:U,89:y,90:_},{5:[1,95]},{30:96,33:62,75:P,89:y,90:_},{5:[1,97]},{30:98,33:62,75:P,89:y,90:_},{63:[1,99]},e(Y,[2,50]),e(Y,[2,51]),e(Y,[2,52]),e(Y,[2,53]),e(Y,[2,54]),e(Y,[2,55]),e(Y,[2,56]),{64:[1,100]},e(g,[2,59],{76:U}),e(g,[2,64],{76:Me}),{33:103,75:[1,102],89:y,90:_},e(Fe,[2,65],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),e(N,[2,67]),e(N,[2,69]),e(N,[2,70]),e(N,[2,71]),e(N,[2,72]),e(N,[2,73]),e(N,[2,74]),e(N,[2,75]),e(N,[2,76]),e(N,[2,77]),e(N,[2,78]),e(g,[2,57],{76:Me}),e(g,[2,58],{76:U}),{5:B,28:105,31:Q,34:H,36:K,38:W,40:j},{27:[1,112],76:U},{5:he,40:ue,56:113,57:fe,59:me},{27:[1,118],76:U},{33:119,89:y,90:_},{33:120,89:y,90:_},{75:ee,78:121,79:82,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe},e(pe,[2,61]),e(pe,[2,63]),e(N,[2,68]),e(g,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:B,28:126,31:Q,34:H,36:K,38:W,40:j},e(g,[2,28]),{5:[1,127]},e(g,[2,42]),{32:[1,128]},{32:[1,129]},{5:he,40:ue,56:130,57:fe,59:me},e(g,[2,47]),{5:[1,131]},e(g,[2,48]),e(g,[2,49]),e(Fe,[2,66],{79:104,75:ee,80:te,81:se,82:ie,83:re,84:ne,85:ae,86:le,87:ce,88:oe}),{33:132,89:y,90:_},{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(g,[2,27]),{5:B,28:145,31:Q,34:H,36:K,38:W,40:j},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(g,[2,46]),{5:he,40:ue,56:152,57:fe,59:me},{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(g,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(g,[2,43]),{5:B,28:159,31:Q,34:H,36:K,38:W,40:j},{5:B,28:160,31:Q,34:H,36:K,38:W,40:j},{5:B,28:161,31:Q,34:H,36:K,38:W,40:j},{5:B,28:162,31:Q,34:H,36:K,38:W,40:j},{5:he,40:ue,56:163,57:fe,59:me},{5:he,40:ue,56:164,57:fe,59:me},e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,44]),e(g,[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:d(function(i,n){if(n.recoverable)this.trace(i);else{var l=new Error(i);throw l.hash=n,l}},"parseError"),parse:d(function(i){var n=this,l=[0],s=[],R=[null],t=[],de=this.table,a="",ge=0,$e=0,Ke=2,Pe=1,We=t.slice.call(arguments,1),S=Object.create(this.lexer),G={yy:{}};for(var be in this.yy)Object.prototype.hasOwnProperty.call(this.yy,be)&&(G.yy[be]=this.yy[be]);S.setInput(i,G.yy),G.yy.lexer=S,G.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var Ie=S.yylloc;t.push(Ie);var je=S.options&&S.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ge(T){l.length=l.length-2*T,R.length=R.length-T,t.length=t.length-T}d(Ge,"popStack");function Ue(){var T;return T=s.pop()||S.lex()||Pe,typeof T!="number"&&(T instanceof Array&&(s=T,T=s.pop()),T=n.symbols_[T]||T),T}d(Ue,"lex");for(var I,z,q,Te,J={},ye,F,Ye,_e;;){if(z=l[l.length-1],this.defaultActions[z]?q=this.defaultActions[z]:((I===null||typeof I>"u")&&(I=Ue()),q=de[z]&&de[z][I]),typeof q>"u"||!q.length||!q[0]){var ke="";_e=[];for(ye in de[z])this.terminals_[ye]&&ye>Ke&&_e.push("'"+this.terminals_[ye]+"'");S.showPosition?ke="Parse error on line "+(ge+1)+`: `+S.showPosition()+` Expecting `+_e.join(", ")+", got '"+(this.terminals_[I]||I)+"'":ke="Parse error on line "+(ge+1)+": Unexpected "+(I==Pe?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(ke,{text:S.match,token:this.terminals_[I]||I,line:S.yylineno,loc:Ie,expected:_e})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+z+", token: "+I);switch(q[0]){case 1:l.push(I),R.push(S.yytext),t.push(S.yylloc),l.push(q[1]),I=null,$e=S.yyleng,a=S.yytext,ge=S.yylineno,Ie=S.yylloc;break;case 2:if(F=this.productions_[q[1]][1],J.$=R[R.length-F],J._$={first_line:t[t.length-(F||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(F||1)].first_column,last_column:t[t.length-1].last_column},je&&(J._$.range=[t[t.length-(F||1)].range[0],t[t.length-1].range[1]]),Te=this.performAction.apply(J,[a,$e,ge,G.yy,q[1],R,t].concat(We)),typeof Te<"u")return Te;F&&(l=l.slice(0,-1*F*2),R=R.slice(0,-1*F),t=t.slice(0,-1*F)),l.push(this.productions_[q[1]][0]),R.push(J.$),t.push(J._$),Ye=de[l[l.length-2]][l[l.length-1]],l.push(Ye);break;case 3:return!0}}return!0},"parse")},He=function(){var $={EOF:1,parseError:d(function(n,l){if(this.yy.parser)this.yy.parser.parseError(n,l);else throw new Error(n)},"parseError"),setInput:d(function(i,n){return this.yy=n||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:d(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var n=i.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),i},"input"),unput:d(function(i){var n=i.length,l=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),l.length-1&&(this.yylineno-=l.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:l?(l.length===s.length?this.yylloc.first_column:0)+s[s.length-l.length].length-l[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[R[0],R[0]+this.yyleng-n]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(i){this.unput(this.match.slice(i))},"less"),pastInput:d(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:d(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:d(function(){var i=this.pastInput(),n=new Array(i.length+1).join("-");return i+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CvITRODF.js b/veadk/webui/assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CxpNyMw0.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CvITRODF.js rename to veadk/webui/assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CxpNyMw0.js index 68aaf76e7..5fe5fcbe3 100644 --- a/veadk/webui/assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CvITRODF.js +++ b/veadk/webui/assets/visualizations/mermaid/sankeyDiagram-W5VNT64P-CxpNyMw0.js @@ -1,4 +1,4 @@ -import{aT as xt,$ as _t,aQ as vt,V as bt,aR as St,W as wt,a as d,Y as lt,N as Lt,aW as Et,s as At,x as Tt}from"./mermaid.core-BmHujEI0.js";import{aG as Q}from"../../app/index-B71Wq9_t.js";import{o as Mt}from"../../chunks/ordinal-Cboi1Yqb.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return q(t.source,n.source)||t.index-n.index}function ht(t,n){return q(t.target,n.target)||t.index-n.index}function q(t,n){return t.y0-n.y0}function it(t){return t.value}function Dt(t){return t.index}function jt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=Dt,o=kt,l,h,x=jt,_=zt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function D(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;rc.length)-1)),D(f);for(let c=0;c0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(q),j(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let H=et*(Y.layer-b.layer);L+=E(b,Y)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(q),j(k,c)}}function j(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,D=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+D*m)+","+(this._y1=n+D*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function Ht(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Qt(){return Yt(Ht)}function Xt(t){return[t.source.x1,t.y0]}function qt(t){return[t.target.x0,t.y1]}function Kt(){return Qt().source(Xt).target(qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(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:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-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:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,D=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;g.push(j);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function z(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(z,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: +import{aT as xt,$ as _t,aQ as vt,V as bt,aR as St,W as wt,a as d,Y as lt,N as Lt,aW as Et,s as At,x as Tt}from"./mermaid.core-l-gs7P2Q.js";import{aG as Q}from"../../app/index-BKQXvMzA.js";import{o as Mt}from"../../chunks/ordinal-Cboi1Yqb.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/init-Gi6I4Gst.js";function Nt(t){for(var n=t.length/6|0,s=new Array(n),a=0;a=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s=u)&&(s=u)}return s}function pt(t,n){let s;if(n===void 0)for(const a of t)a!=null&&(s>a||s===void 0&&a>=a)&&(s=a);else{let a=-1;for(let u of t)(u=n(u,++a,t))!=null&&(s>u||s===void 0&&u>=u)&&(s=u)}return s}function nt(t,n){let s=0;if(n===void 0)for(let a of t)(a=+a)&&(s+=a);else{let a=-1;for(let u of t)(u=+n(u,++a,t))&&(s+=u)}return s}function Pt(t){return t.target.depth}function It(t){return t.depth}function Ot(t,n){return n-1-t.height}function kt(t,n){return t.sourceLinks.length?t.depth:n-1}function $t(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?pt(t.sourceLinks,Pt)-1:0}function X(t){return function(){return t}}function ut(t,n){return q(t.source,n.source)||t.index-n.index}function ht(t,n){return q(t.target,n.target)||t.index-n.index}function q(t,n){return t.y0-n.y0}function it(t){return t.value}function Dt(t){return t.index}function jt(t){return t.nodes}function zt(t){return t.links}function ft(t,n){const s=t.get(n);if(!s)throw new Error("missing: "+n);return s}function yt({nodes:t}){for(const n of t){let s=n.y0,a=s;for(const u of n.sourceLinks)u.y0=s+u.width/2,s+=u.width;for(const u of n.targetLinks)u.y1=a+u.width/2,a+=u.width}}function Bt(){let t=0,n=0,s=1,a=1,u=24,y=8,p,m=Dt,o=kt,l,h,x=jt,_=zt,g=6;function v(){const i={nodes:x.apply(null,arguments),links:_.apply(null,arguments)};return T(i),A(i),M(i),I(i),S(i),yt(i),i}v.update=function(i){return yt(i),i},v.nodeId=function(i){return arguments.length?(m=typeof i=="function"?i:X(i),v):m},v.nodeAlign=function(i){return arguments.length?(o=typeof i=="function"?i:X(i),v):o},v.nodeSort=function(i){return arguments.length?(l=i,v):l},v.nodeWidth=function(i){return arguments.length?(u=+i,v):u},v.nodePadding=function(i){return arguments.length?(y=p=+i,v):y},v.nodes=function(i){return arguments.length?(x=typeof i=="function"?i:X(i),v):x},v.links=function(i){return arguments.length?(_=typeof i=="function"?i:X(i),v):_},v.linkSort=function(i){return arguments.length?(h=i,v):h},v.size=function(i){return arguments.length?(t=n=0,s=+i[0],a=+i[1],v):[s-t,a-n]},v.extent=function(i){return arguments.length?(t=+i[0][0],s=+i[1][0],n=+i[0][1],a=+i[1][1],v):[[t,n],[s,a]]},v.iterations=function(i){return arguments.length?(g=+i,v):g};function T({nodes:i,links:f}){for(const[e,r]of i.entries())r.index=e,r.sourceLinks=[],r.targetLinks=[];const c=new Map(i.map((e,r)=>[m(e,r,i),e]));for(const[e,r]of f.entries()){r.index=e;let{source:k,target:b}=r;typeof k!="object"&&(k=r.source=ft(c,k)),typeof b!="object"&&(b=r.target=ft(c,b)),k.sourceLinks.push(r),b.targetLinks.push(r)}if(h!=null)for(const{sourceLinks:e,targetLinks:r}of i)e.sort(h),r.sort(h)}function A({nodes:i}){for(const f of i)f.value=f.fixedValue===void 0?Math.max(nt(f.sourceLinks,it),nt(f.targetLinks,it)):f.fixedValue}function M({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.depth=r;for(const{target:b}of k.sourceLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function I({nodes:i}){const f=i.length;let c=new Set(i),e=new Set,r=0;for(;c.size;){for(const k of c){k.height=r;for(const{source:b}of k.targetLinks)e.add(b)}if(++r>f)throw new Error("circular link");c=e,e=new Set}}function N({nodes:i}){const f=ct(i,r=>r.depth)+1,c=(s-t-u)/(f-1),e=new Array(f);for(const r of i){const k=Math.max(0,Math.min(f-1,Math.floor(o.call(null,r,f))));r.layer=k,r.x0=t+k*c,r.x1=r.x0+u,e[k]?e[k].push(r):e[k]=[r]}if(l)for(const r of e)r.sort(l);return e}function D(i){const f=pt(i,c=>(a-n-(c.length-1)*p)/nt(c,it));for(const c of i){let e=n;for(const r of c){r.y0=e,r.y1=e+r.value*f,e=r.y1+p;for(const k of r.sourceLinks)k.width=k.value*f}e=(a-e+p)/(c.length+1);for(let r=0;rc.length)-1)),D(f);for(let c=0;c0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(q),j(k,c)}}function R(i,f,c){for(let e=i.length,r=e-2;r>=0;--r){const k=i[r];for(const b of k){let L=0,B=0;for(const{target:Y,value:et}of b.sourceLinks){let H=et*(Y.layer-b.layer);L+=E(b,Y)*H,B+=H}if(!(B>0))continue;let U=(L/B-b.y0)*f;b.y0+=U,b.y1+=U,z(b)}l===void 0&&k.sort(q),j(k,c)}}function j(i,f){const c=i.length>>1,e=i[c];O(i,e.y0-p,c-1,f),V(i,e.y1+p,c+1,f),O(i,a,i.length-1,f),V(i,n,0,f)}function V(i,f,c,e){for(;c1e-6&&(r.y0+=k,r.y1+=k),f=r.y1+p}}function O(i,f,c,e){for(;c>=0;--c){const r=i[c],k=(r.y1-f)*e;k>1e-6&&(r.y0-=k,r.y1-=k),f=r.y0-p}}function z({sourceLinks:i,targetLinks:f}){if(h===void 0){for(const{source:{sourceLinks:c}}of f)c.sort(ht);for(const{target:{targetLinks:c}}of i)c.sort(ut)}}function w(i){if(h===void 0)for(const{sourceLinks:f,targetLinks:c}of i)f.sort(ht),c.sort(ut)}function P(i,f){let c=i.y0-(i.sourceLinks.length-1)*p/2;for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c+=r+p}for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c-=r}return c}function E(i,f){let c=f.y0-(f.targetLinks.length-1)*p/2;for(const{source:e,width:r}of f.targetLinks){if(e===i)break;c+=r+p}for(const{target:e,width:r}of i.sourceLinks){if(e===f)break;c-=r}return c}return v}var rt=Math.PI,st=2*rt,F=1e-6,Ft=st-F;function ot(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function mt(){return new ot}ot.prototype=mt.prototype={constructor:ot,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,s,a){this._+="Q"+ +t+","+ +n+","+(this._x1=+s)+","+(this._y1=+a)},bezierCurveTo:function(t,n,s,a,u,y){this._+="C"+ +t+","+ +n+","+ +s+","+ +a+","+(this._x1=+u)+","+(this._y1=+y)},arcTo:function(t,n,s,a,u){t=+t,n=+n,s=+s,a=+a,u=+u;var y=this._x1,p=this._y1,m=s-t,o=a-n,l=y-t,h=p-n,x=l*l+h*h;if(u<0)throw new Error("negative radius: "+u);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(x>F)if(!(Math.abs(h*m-o*l)>F)||!u)this._+="L"+(this._x1=t)+","+(this._y1=n);else{var _=s-y,g=a-p,v=m*m+o*o,T=_*_+g*g,A=Math.sqrt(v),M=Math.sqrt(x),I=u*Math.tan((rt-Math.acos((v+x-T)/(2*A*M)))/2),N=I/M,D=I/A;Math.abs(N-1)>F&&(this._+="L"+(t+N*l)+","+(n+N*h)),this._+="A"+u+","+u+",0,0,"+ +(h*_>l*g)+","+(this._x1=t+D*m)+","+(this._y1=n+D*o)}},arc:function(t,n,s,a,u,y){t=+t,n=+n,s=+s,y=!!y;var p=s*Math.cos(a),m=s*Math.sin(a),o=t+p,l=n+m,h=1^y,x=y?a-u:u-a;if(s<0)throw new Error("negative radius: "+s);this._x1===null?this._+="M"+o+","+l:(Math.abs(this._x1-o)>F||Math.abs(this._y1-l)>F)&&(this._+="L"+o+","+l),s&&(x<0&&(x=x%st+st),x>Ft?this._+="A"+s+","+s+",0,1,"+h+","+(t-p)+","+(n-m)+"A"+s+","+s+",0,1,"+h+","+(this._x1=o)+","+(this._y1=l):x>F&&(this._+="A"+s+","+s+",0,"+ +(x>=rt)+","+h+","+(this._x1=t+s*Math.cos(u))+","+(this._y1=n+s*Math.sin(u))))},rect:function(t,n,s,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +s+"v"+ +a+"h"+-s+"Z"},toString:function(){return this._}};function dt(t){return function(){return t}}function Rt(t){return t[0]}function Vt(t){return t[1]}var Wt=Array.prototype.slice;function Gt(t){return t.source}function Ut(t){return t.target}function Yt(t){var n=Gt,s=Ut,a=Rt,u=Vt,y=null;function p(){var m,o=Wt.call(arguments),l=n.apply(this,o),h=s.apply(this,o);if(y||(y=m=mt()),t(y,+a.apply(this,(o[0]=l,o)),+u.apply(this,o),+a.apply(this,(o[0]=h,o)),+u.apply(this,o)),m)return y=null,m+""||null}return p.source=function(m){return arguments.length?(n=m,p):n},p.target=function(m){return arguments.length?(s=m,p):s},p.x=function(m){return arguments.length?(a=typeof m=="function"?m:dt(+m),p):a},p.y=function(m){return arguments.length?(u=typeof m=="function"?m:dt(+m),p):u},p.context=function(m){return arguments.length?(y=m??null,p):y},p}function Ht(t,n,s,a,u){t.moveTo(n,s),t.bezierCurveTo(n=(n+a)/2,s,n,u,a,u)}function Qt(){return Yt(Ht)}function Xt(t){return[t.source.x1,t.y0]}function qt(t){return[t.target.x0,t.y1]}function Kt(){return Qt().source(Xt).target(qt)}var at=function(){var t=d(function(m,o,l,h){for(l=l||{},h=m.length;h--;l[m[h]]=o);return l},"o"),n=[1,9],s=[1,10],a=[1,5,10,12],u={trace:d(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:d(function(o,l,h,x,_,g,v){var T=g.length-1;switch(_){case 7:const A=x.findOrCreateNode(g[T-4].trim().replaceAll('""','"')),M=x.findOrCreateNode(g[T-2].trim().replaceAll('""','"')),I=parseFloat(g[T].trim());x.addLink(A,M,I);break;case 8:case 9:case 11:this.$=g[T];break;case 10:this.$=g[T-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:n,20:s},{1:[2,6],7:11,10:[1,12]},t(s,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(a,[2,8]),t(a,[2,9]),{19:[1,16]},t(a,[2,11]),{1:[2,1]},{1:[2,5]},t(s,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:n,20:s},{15:18,16:7,17:8,18:n,20:s},{18:[1,19]},t(s,[2,3]),{12:[1,20]},t(a,[2,10]),{15:21,16:7,17:8,18:n,20:s},t([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:d(function(o,l){if(l.recoverable)this.trace(o);else{var h=new Error(o);throw h.hash=l,h}},"parseError"),parse:d(function(o){var l=this,h=[0],x=[],_=[null],g=[],v=this.table,T="",A=0,M=0,I=2,N=1,D=g.slice.call(arguments,1),S=Object.create(this.lexer),C={yy:{}};for(var R in this.yy)Object.prototype.hasOwnProperty.call(this.yy,R)&&(C.yy[R]=this.yy[R]);S.setInput(o,C.yy),C.yy.lexer=S,C.yy.parser=this,typeof S.yylloc>"u"&&(S.yylloc={});var j=S.yylloc;g.push(j);var V=S.options&&S.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function O(L){h.length=h.length-2*L,_.length=_.length-L,g.length=g.length-L}d(O,"popStack");function z(){var L;return L=x.pop()||S.lex()||N,typeof L!="number"&&(L instanceof Array&&(x=L,L=x.pop()),L=l.symbols_[L]||L),L}d(z,"lex");for(var w,P,E,i,f={},c,e,r,k;;){if(P=h[h.length-1],this.defaultActions[P]?E=this.defaultActions[P]:((w===null||typeof w>"u")&&(w=z()),E=v[P]&&v[P][w]),typeof E>"u"||!E.length||!E[0]){var b="";k=[];for(c in v[P])this.terminals_[c]&&c>I&&k.push("'"+this.terminals_[c]+"'");S.showPosition?b="Parse error on line "+(A+1)+`: `+S.showPosition()+` Expecting `+k.join(", ")+", got '"+(this.terminals_[w]||w)+"'":b="Parse error on line "+(A+1)+": Unexpected "+(w==N?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(b,{text:S.match,token:this.terminals_[w]||w,line:S.yylineno,loc:j,expected:k})}if(E[0]instanceof Array&&E.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+w);switch(E[0]){case 1:h.push(w),_.push(S.yytext),g.push(S.yylloc),h.push(E[1]),w=null,M=S.yyleng,T=S.yytext,A=S.yylineno,j=S.yylloc;break;case 2:if(e=this.productions_[E[1]][1],f.$=_[_.length-e],f._$={first_line:g[g.length-(e||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(e||1)].first_column,last_column:g[g.length-1].last_column},V&&(f._$.range=[g[g.length-(e||1)].range[0],g[g.length-1].range[1]]),i=this.performAction.apply(f,[T,M,A,C.yy,E[1],_,g].concat(D)),typeof i<"u")return i;e&&(h=h.slice(0,-1*e*2),_=_.slice(0,-1*e),g=g.slice(0,-1*e)),h.push(this.productions_[E[1]][0]),_.push(f.$),g.push(f._$),r=v[h[h.length-2]][h[h.length-1]],h.push(r);break;case 3:return!0}}return!0},"parse")},y=function(){var m={EOF:1,parseError:d(function(l,h){if(this.yy.parser)this.yy.parser.parseError(l,h);else throw new Error(l)},"parseError"),setInput:d(function(o,l){return this.yy=l||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:d(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var l=o.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),o},"input"),unput:d(function(o){var l=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-l),this.offset-=l;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),h.length-1&&(this.yylineno-=h.length-1);var _=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===x.length?this.yylloc.first_column:0)+x[x.length-h.length].length-h[0].length:this.yylloc.first_column-l},this.options.ranges&&(this.yylloc.range=[_[0],_[0]+this.yyleng-l]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(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:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),l=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-C9N8vEHe.js b/veadk/webui/assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-DKbPiUDi.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-C9N8vEHe.js rename to veadk/webui/assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-DKbPiUDi.js index 8e731e60e..e381ef85f 100644 --- a/veadk/webui/assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-C9N8vEHe.js +++ b/veadk/webui/assets/visualizations/mermaid/sequenceDiagram-SI44F4Z6-DKbPiUDi.js @@ -1,4 +1,4 @@ -import{I as er}from"./chunk-2Q5K7J3B-DM9SBI1P.js";import{a as x,aS as rr,Y as j,at as it,aO as Me,B as ar,j as sr,x as m,aR as De,aQ as ir,aT as nr,W as or,V as cr,$ as lr,as as hr,J as dr,s as Tr,aN as Yt,b9 as Z,ac as Q,n as kt,aC as Be,Z as pr,X as Ft,a9 as Er,aL as Ve}from"./mermaid.core-BmHujEI0.js";import{d as ur,h as se,g as dt,e as fr,a as ie,b as ne}from"./chunk-2GRJ4B5K-CbPivXt6.js";import{aG as Wt}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var ee=function(){var e=x(function(ut,N,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=N);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],E=[1,14],h=[1,15],p=[1,17],_=[1,18],u=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],P=[1,32],S=[1,33],w=[1,34],M=[1,35],V=[1,36],Y=[1,37],z=[1,38],K=[1,39],X=[1,40],$=[1,42],tt=[1,43],U=[1,44],nt=[1,45],et=[1,46],W=[1,47],C=[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],wt=[1,74],Dt=[1,80],A=[1,81],D=[1,82],rt=[1,83],at=[1,84],F=[1,85],Ot=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],Ae=[2,78],Nt=[4,5,17,51,53,54],vt=[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],Se=[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],Gt=[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],we=[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],Xt=[5,52],H=[70,71,72,73],ct=[1,151],Jt={trace:x(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:x(function(N,v,k,y,G,c,mt){var d=c.length-1;switch(G){case 3:return y.apply(c[d]),c[d];case 4:case 10:this.$=[];break;case 5:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 6:case 7:case 12:case 13:this.$=c[d];break;case 8:case 9:case 14:this.$=[];break;case 16:c[d].type="createParticipant",this.$=c[d];break;case 17:c[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-1].actor};break;case 30:y.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 31:y.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 32:this.$=c[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[d].trim(),y.setAccDescription(this.$);break;case 35:c[d-1].unshift({type:"loopStart",loopText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 36:c[d-1].unshift({type:"rectStart",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[d-1];break;case 37:c[d-1].unshift({type:"optStart",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"altStart",altText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"breakStart",breakText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 44:this.$=c[d-3].concat([{type:"option",optionText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 46:this.$=c[d-3].concat([{type:"and",parText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.PAR_AND},c[d]]);break;case 48:this.$=c[d-3].concat([{type:"else",altText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.ALT_ELSE},c[d]]);break;case 49:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 50:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 51:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 52:case 57:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 53:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 58:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 59:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 63:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 66:this.$=[c[d-2],c[d]];break;case 67:this.$=c[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor}];break;case 71:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-4].actor}];break;case 72:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor}];break;case 73:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-4].actor}];break;case 74:this.$=[c[d-5],c[d-1],{type:"addMessage",from:c[d-5].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-5].actor}];break;case 75:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 76:this.$={type:"addParticipant",actor:c[d-1],config:c[d]};break;case 77:this.$=c[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[d].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},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:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},e(C,[2,5]),{9:48,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:z,53:K,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:W},{23:56,73:W},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[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:wt},{23:75,55:76,73:wt},{23:77,73:W},{69:78,72:[1,79],78:Dt,79:A,80:D,81:rt,82:at,83:F,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:W},{23:111,73:W},{23:112,73:W},{23:113,73:W},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],Ae),e(C,[2,6]),e(C,[2,16]),e(Nt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(vt,i,{7:120}),e(vt,i,{7:121}),e(vt,i,{7:122}),e(Se,i,{41:123,7:124}),e(Gt,i,{43:125,7:126}),e(Gt,i,{7:126,43:127}),e(we,i,{46:128,7:129}),e(vt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Xt,Ae,{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:W},{69:146,78:Dt,79:A,80:D,81:rt,82:at,83:F,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(H,[2,79]),e(H,[2,80]),e(H,[2,81]),e(H,[2,82]),e(H,[2,83]),e(H,[2,84]),e(H,[2,85]),e(H,[2,86]),e(H,[2,87]),e(H,[2,88]),e(H,[2,89]),e(H,[2,90]),e(H,[2,91]),e(H,[2,92]),e(H,[2,93]),e(H,[2,94]),e(H,[2,95]),e(H,[2,96]),e(H,[2,97]),e(H,[2,98]),e(H,[2,99]),e(H,[2,100]),e(H,[2,101]),e(H,[2,102]),e(H,[2,103]),e(H,[2,104]),{23:147,73:W},{23:149,60:148,73:W},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:z,53:K,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,161],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,162],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,163],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[2,47],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,50:[1,165],51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[2,45],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,49:[1,167],51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[2,43],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,48:[1,170],51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,171],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Xt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:W},{23:178,73:W},{23:179,73:W},{58:180,104:ct},{23:181,72:[1,182],73:W},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(Nt,[2,11]),{13:186,51:z,53:K,54:X},e(Nt,[2,13]),e(Nt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:W},{5:[2,58]},{5:[2,59]},{23:200,73:W},e(Nt,[2,12]),e(Se,i,{7:124,41:201}),e(Gt,i,{7:126,43:202}),e(we,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Xt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{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:x(function(N,v){if(v.recoverable)this.trace(N);else{var k=new Error(N);throw k.hash=v,k}},"parseError"),parse:x(function(N){var v=this,k=[0],y=[],G=[null],c=[],mt=this.table,d="",Mt=0,Ne=0,Qe=2,me=1,$e=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Zt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zt)&&(gt.yy[Zt]=this.yy[Zt]);J.setInput(N,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Qt=J.yylloc;c.push(Qt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(ot){k.length=k.length-2*ot,G.length=G.length-ot,c.length=c.length-ot}x(tr,"popStack");function Pe(){var ot;return ot=y.pop()||J.lex()||me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=v.symbols_[ot]||ot),ot}x(Pe,"lex");for(var st,xt,lt,$t,Lt={},Bt,Tt,ke,Vt;;){if(xt=k[k.length-1],this.defaultActions[xt]?lt=this.defaultActions[xt]:((st===null||typeof st>"u")&&(st=Pe()),lt=mt[xt]&&mt[xt][st]),typeof lt>"u"||!lt.length||!lt[0]){var jt="";Vt=[];for(Bt in mt[xt])this.terminals_[Bt]&&Bt>Qe&&Vt.push("'"+this.terminals_[Bt]+"'");J.showPosition?jt="Parse error on line "+(Mt+1)+`: +import{I as er}from"./chunk-2Q5K7J3B-BiO2G8-N.js";import{a as x,aS as rr,Y as j,at as it,aO as Me,B as ar,j as sr,x as m,aR as De,aQ as ir,aT as nr,W as or,V as cr,$ as lr,as as hr,J as dr,s as Tr,aN as Yt,b9 as Z,ac as Q,n as kt,aC as Be,Z as pr,X as Ft,a9 as Er,aL as Ve}from"./mermaid.core-l-gs7P2Q.js";import{d as ur,h as se,g as dt,e as fr,a as ie,b as ne}from"./chunk-2GRJ4B5K-CS99z7QO.js";import{aG as Wt}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var ee=function(){var e=x(function(ut,N,v,k){for(v=v||{},k=ut.length;k--;v[ut[k]]=N);return v},"o"),t=[1,2],a=[1,3],r=[1,4],i=[2,4],n=[1,9],s=[1,11],o=[1,12],E=[1,14],h=[1,15],p=[1,17],_=[1,18],u=[1,19],O=[1,25],T=[1,26],g=[1,27],f=[1,28],I=[1,29],L=[1,30],b=[1,31],P=[1,32],S=[1,33],w=[1,34],M=[1,35],V=[1,36],Y=[1,37],z=[1,38],K=[1,39],X=[1,40],$=[1,42],tt=[1,43],U=[1,44],nt=[1,45],et=[1,46],W=[1,47],C=[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],wt=[1,74],Dt=[1,80],A=[1,81],D=[1,82],rt=[1,83],at=[1,84],F=[1,85],Ot=[1,86],oe=[1,87],ce=[1,88],le=[1,89],he=[1,90],de=[1,91],Te=[1,92],pe=[1,93],Ee=[1,94],ue=[1,95],fe=[1,96],_e=[1,97],ge=[1,98],xe=[1,99],Ie=[1,100],ye=[1,101],Re=[1,102],Oe=[1,103],Le=[1,104],be=[1,105],Ae=[2,78],Nt=[4,5,17,51,53,54],vt=[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],Se=[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],Gt=[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],we=[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],Xt=[5,52],H=[70,71,72,73],ct=[1,151],Jt={trace:x(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:x(function(N,v,k,y,G,c,mt){var d=c.length-1;switch(G){case 3:return y.apply(c[d]),c[d];case 4:case 10:this.$=[];break;case 5:case 11:c[d-1].push(c[d]),this.$=c[d-1];break;case 6:case 7:case 12:case 13:this.$=c[d];break;case 8:case 9:case 14:this.$=[];break;case 16:c[d].type="createParticipant",this.$=c[d];break;case 17:c[d-1].unshift({type:"boxStart",boxData:y.parseBoxData(c[d-2])}),c[d-1].push({type:"boxEnd",boxText:c[d-2]}),this.$=c[d-1];break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-2]),sequenceIndexStep:Number(c[d-1]),sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceIndex:Number(c[d-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:y.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:y.LINETYPE.AUTONUMBER};break;case 23:this.$={type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor};break;case 24:this.$={type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-1].actor};break;case 30:y.setDiagramTitle(c[d].substring(6)),this.$=c[d].substring(6);break;case 31:y.setDiagramTitle(c[d].substring(7)),this.$=c[d].substring(7);break;case 32:this.$=c[d].trim(),y.setAccTitle(this.$);break;case 33:case 34:this.$=c[d].trim(),y.setAccDescription(this.$);break;case 35:c[d-1].unshift({type:"loopStart",loopText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.LOOP_START}),c[d-1].push({type:"loopEnd",loopText:c[d-2],signalType:y.LINETYPE.LOOP_END}),this.$=c[d-1];break;case 36:c[d-1].unshift({type:"rectStart",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_START}),c[d-1].push({type:"rectEnd",color:y.parseMessage(c[d-2]),signalType:y.LINETYPE.RECT_END}),this.$=c[d-1];break;case 37:c[d-1].unshift({type:"optStart",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_START}),c[d-1].push({type:"optEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.OPT_END}),this.$=c[d-1];break;case 38:c[d-1].unshift({type:"altStart",altText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.ALT_START}),c[d-1].push({type:"altEnd",signalType:y.LINETYPE.ALT_END}),this.$=c[d-1];break;case 39:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 40:c[d-1].unshift({type:"parStart",parText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.PAR_OVER_START}),c[d-1].push({type:"parEnd",signalType:y.LINETYPE.PAR_END}),this.$=c[d-1];break;case 41:c[d-1].unshift({type:"criticalStart",criticalText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.CRITICAL_START}),c[d-1].push({type:"criticalEnd",signalType:y.LINETYPE.CRITICAL_END}),this.$=c[d-1];break;case 42:c[d-1].unshift({type:"breakStart",breakText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_START}),c[d-1].push({type:"breakEnd",optText:y.parseMessage(c[d-2]),signalType:y.LINETYPE.BREAK_END}),this.$=c[d-1];break;case 44:this.$=c[d-3].concat([{type:"option",optionText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.CRITICAL_OPTION},c[d]]);break;case 46:this.$=c[d-3].concat([{type:"and",parText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.PAR_AND},c[d]]);break;case 48:this.$=c[d-3].concat([{type:"else",altText:y.parseMessage(c[d-1]),signalType:y.LINETYPE.ALT_ELSE},c[d]]);break;case 49:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 50:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 51:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 52:case 57:c[d-1].draw="actor",c[d-1].type="addParticipant",this.$=c[d-1];break;case 53:c[d-1].type="destroyParticipant",this.$=c[d-1];break;case 54:c[d-3].draw="participant",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 55:c[d-1].draw="participant",c[d-1].type="addParticipant",this.$=c[d-1];break;case 56:c[d-3].draw="actor",c[d-3].type="addParticipant",c[d-3].description=y.parseMessage(c[d-1]),this.$=c[d-3];break;case 58:this.$=[c[d-1],{type:"addNote",placement:c[d-2],actor:c[d-1].actor,text:c[d]}];break;case 59:c[d-2]=[].concat(c[d-1],c[d-1]).slice(0,2),c[d-2][0]=c[d-2][0].actor,c[d-2][1]=c[d-2][1].actor,this.$=[c[d-1],{type:"addNote",placement:y.PLACEMENT.OVER,actor:c[d-2].slice(0,2),text:c[d]}];break;case 60:this.$=[c[d-1],{type:"addLinks",actor:c[d-1].actor,text:c[d]}];break;case 61:this.$=[c[d-1],{type:"addALink",actor:c[d-1].actor,text:c[d]}];break;case 62:this.$=[c[d-1],{type:"addProperties",actor:c[d-1].actor,text:c[d]}];break;case 63:this.$=[c[d-1],{type:"addDetails",actor:c[d-1].actor,text:c[d]}];break;case 66:this.$=[c[d-2],c[d]];break;case 67:this.$=c[d];break;case 68:this.$=y.PLACEMENT.LEFTOF;break;case 69:this.$=y.PLACEMENT.RIGHTOF;break;case 70:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0},{type:"activeStart",signalType:y.LINETYPE.ACTIVE_START,actor:c[d-1].actor}];break;case 71:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d]},{type:"activeEnd",signalType:y.LINETYPE.ACTIVE_END,actor:c[d-4].actor}];break;case 72:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor}];break;case 73:this.$=[c[d-4],c[d-1],{type:"addMessage",from:c[d-4].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d],activate:!1,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-4].actor}];break;case 74:this.$=[c[d-5],c[d-1],{type:"addMessage",from:c[d-5].actor,to:c[d-1].actor,signalType:c[d-3],msg:c[d],activate:!0,centralConnection:y.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:"centralConnection",signalType:y.LINETYPE.CENTRAL_CONNECTION,actor:c[d-1].actor},{type:"centralConnectionReverse",signalType:y.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:c[d-5].actor}];break;case 75:this.$=[c[d-3],c[d-1],{type:"addMessage",from:c[d-3].actor,to:c[d-1].actor,signalType:c[d-2],msg:c[d]}];break;case 76:this.$={type:"addParticipant",actor:c[d-1],config:c[d]};break;case 77:this.$=c[d-1].trim();break;case 78:this.$={type:"addParticipant",actor:c[d]};break;case 79:this.$=y.LINETYPE.SOLID_OPEN;break;case 80:this.$=y.LINETYPE.DOTTED_OPEN;break;case 81:this.$=y.LINETYPE.SOLID;break;case 82:this.$=y.LINETYPE.SOLID_TOP;break;case 83:this.$=y.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=y.LINETYPE.STICK_TOP;break;case 85:this.$=y.LINETYPE.STICK_BOTTOM;break;case 86:this.$=y.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=y.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=y.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=y.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=y.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=y.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=y.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=y.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=y.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=y.LINETYPE.DOTTED;break;case 100:this.$=y.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=y.LINETYPE.SOLID_CROSS;break;case 102:this.$=y.LINETYPE.DOTTED_CROSS;break;case 103:this.$=y.LINETYPE.SOLID_POINT;break;case 104:this.$=y.LINETYPE.DOTTED_POINT;break;case 105:this.$=y.parseMessage(c[d].trim().substring(1));break}},"anonymous"),table:[{3:1,4:t,5:a,6:r},{1:[3]},{3:5,4:t,5:a,6:r},{3:6,4:t,5:a,6:r},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:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},e(C,[2,5]),{9:48,13:13,14:E,15:h,18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},e(C,[2,7]),e(C,[2,8]),e(C,[2,9]),e(C,[2,15]),{13:49,51:z,53:K,54:X},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:W},{23:56,73:W},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(C,[2,30]),e(C,[2,31]),{33:[1,62]},{35:[1,63]},e(C,[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:wt},{23:75,55:76,73:wt},{23:77,73:W},{69:78,72:[1,79],78:Dt,79:A,80:D,81:rt,82:at,83:F,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:W},{23:111,73:W},{23:112,73:W},{23:113,73:W},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],Ae),e(C,[2,6]),e(C,[2,16]),e(Nt,[2,10],{11:114}),e(C,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(C,[2,22]),{5:[1,118]},{5:[1,119]},e(C,[2,25]),e(C,[2,26]),e(C,[2,27]),e(C,[2,28]),e(C,[2,29]),e(C,[2,32]),e(C,[2,33]),e(vt,i,{7:120}),e(vt,i,{7:121}),e(vt,i,{7:122}),e(Se,i,{41:123,7:124}),e(Gt,i,{43:125,7:126}),e(Gt,i,{7:126,43:127}),e(we,i,{46:128,7:129}),e(vt,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Xt,Ae,{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:W},{69:146,78:Dt,79:A,80:D,81:rt,82:at,83:F,84:Ot,85:oe,86:ce,87:le,88:he,89:de,90:Te,91:pe,92:Ee,93:ue,94:fe,95:_e,96:ge,97:xe,98:Ie,99:ye,100:Re,101:Oe,102:Le,103:be},e(H,[2,79]),e(H,[2,80]),e(H,[2,81]),e(H,[2,82]),e(H,[2,83]),e(H,[2,84]),e(H,[2,85]),e(H,[2,86]),e(H,[2,87]),e(H,[2,88]),e(H,[2,89]),e(H,[2,90]),e(H,[2,91]),e(H,[2,92]),e(H,[2,93]),e(H,[2,94]),e(H,[2,95]),e(H,[2,96]),e(H,[2,97]),e(H,[2,98]),e(H,[2,99]),e(H,[2,100]),e(H,[2,101]),e(H,[2,102]),e(H,[2,103]),e(H,[2,104]),{23:147,73:W},{23:149,60:148,73:W},{73:[2,68]},{73:[2,69]},{58:150,104:ct},{58:152,104:ct},{58:153,104:ct},{58:154,104:ct},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:z,53:K,54:X},{5:[1,160]},e(C,[2,20]),e(C,[2,21]),e(C,[2,23]),e(C,[2,24]),{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,161],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,162],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,163],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{17:[1,164]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[2,47],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,50:[1,165],51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{17:[1,166]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[2,45],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,49:[1,167],51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{17:[1,168]},{17:[1,169]},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[2,43],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,48:[1,170],51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{4:n,5:s,8:8,9:10,10:o,13:13,14:E,15:h,17:[1,171],18:16,19:p,22:_,23:41,24:u,25:20,26:21,27:22,28:23,29:24,30:O,31:T,32:g,34:f,36:I,37:L,38:b,39:P,40:S,42:w,44:M,45:V,47:Y,51:z,53:K,54:X,56:$,61:tt,62:U,63:nt,64:et,73:W},{16:[1,172]},e(C,[2,50]),{16:[1,173]},e(C,[2,55]),e(Xt,[2,76]),{76:[1,174]},{16:[1,175]},e(C,[2,52]),{16:[1,176]},e(C,[2,57]),e(C,[2,53]),{23:177,73:W},{23:178,73:W},{23:179,73:W},{58:180,104:ct},{23:181,72:[1,182],73:W},{58:183,104:ct},{58:184,104:ct},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(C,[2,17]),e(Nt,[2,11]),{13:186,51:z,53:K,54:X},e(Nt,[2,13]),e(Nt,[2,14]),e(C,[2,19]),e(C,[2,35]),e(C,[2,36]),e(C,[2,37]),e(C,[2,38]),{16:[1,187]},e(C,[2,39]),{16:[1,188]},e(C,[2,40]),e(C,[2,41]),{16:[1,189]},e(C,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:ct},{58:196,104:ct},{58:197,104:ct},{5:[2,75]},{58:198,104:ct},{23:199,73:W},{5:[2,58]},{5:[2,59]},{23:200,73:W},e(Nt,[2,12]),e(Se,i,{7:124,41:201}),e(Gt,i,{7:126,43:202}),e(we,i,{7:129,46:203}),e(C,[2,49]),e(C,[2,54]),e(Xt,[2,77]),e(C,[2,51]),e(C,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:ct},{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:x(function(N,v){if(v.recoverable)this.trace(N);else{var k=new Error(N);throw k.hash=v,k}},"parseError"),parse:x(function(N){var v=this,k=[0],y=[],G=[null],c=[],mt=this.table,d="",Mt=0,Ne=0,Qe=2,me=1,$e=c.slice.call(arguments,1),J=Object.create(this.lexer),gt={yy:{}};for(var Zt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Zt)&&(gt.yy[Zt]=this.yy[Zt]);J.setInput(N,gt.yy),gt.yy.lexer=J,gt.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var Qt=J.yylloc;c.push(Qt);var je=J.options&&J.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tr(ot){k.length=k.length-2*ot,G.length=G.length-ot,c.length=c.length-ot}x(tr,"popStack");function Pe(){var ot;return ot=y.pop()||J.lex()||me,typeof ot!="number"&&(ot instanceof Array&&(y=ot,ot=y.pop()),ot=v.symbols_[ot]||ot),ot}x(Pe,"lex");for(var st,xt,lt,$t,Lt={},Bt,Tt,ke,Vt;;){if(xt=k[k.length-1],this.defaultActions[xt]?lt=this.defaultActions[xt]:((st===null||typeof st>"u")&&(st=Pe()),lt=mt[xt]&&mt[xt][st]),typeof lt>"u"||!lt.length||!lt[0]){var jt="";Vt=[];for(Bt in mt[xt])this.terminals_[Bt]&&Bt>Qe&&Vt.push("'"+this.terminals_[Bt]+"'");J.showPosition?jt="Parse error on line "+(Mt+1)+`: `+J.showPosition()+` Expecting `+Vt.join(", ")+", got '"+(this.terminals_[st]||st)+"'":jt="Parse error on line "+(Mt+1)+": Unexpected "+(st==me?"end of input":"'"+(this.terminals_[st]||st)+"'"),this.parseError(jt,{text:J.match,token:this.terminals_[st]||st,line:J.yylineno,loc:Qt,expected:Vt})}if(lt[0]instanceof Array&<.length>1)throw new Error("Parse Error: multiple actions possible at state: "+xt+", token: "+st);switch(lt[0]){case 1:k.push(st),G.push(J.yytext),c.push(J.yylloc),k.push(lt[1]),st=null,Ne=J.yyleng,d=J.yytext,Mt=J.yylineno,Qt=J.yylloc;break;case 2:if(Tt=this.productions_[lt[1]][1],Lt.$=G[G.length-Tt],Lt._$={first_line:c[c.length-(Tt||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(Tt||1)].first_column,last_column:c[c.length-1].last_column},je&&(Lt._$.range=[c[c.length-(Tt||1)].range[0],c[c.length-1].range[1]]),$t=this.performAction.apply(Lt,[d,Ne,Mt,gt.yy,lt[1],G,c].concat($e)),typeof $t<"u")return $t;Tt&&(k=k.slice(0,-1*Tt*2),G=G.slice(0,-1*Tt),c=c.slice(0,-1*Tt)),k.push(this.productions_[lt[1]][0]),G.push(Lt.$),c.push(Lt._$),ke=mt[k[k.length-2]][k[k.length-1]],k.push(ke);break;case 3:return!0}}return!0},"parse")},Ze=function(){var ut={EOF:1,parseError:x(function(v,k){if(this.yy.parser)this.yy.parser.parseError(v,k);else throw new Error(v)},"parseError"),setInput:x(function(N,v){return this.yy=v||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:x(function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var v=N.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),N},"input"),unput:x(function(N){var v=N.length,k=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;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),k.length-1&&(this.yylineno-=k.length-1);var G=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===y.length?this.yylloc.first_column:0)+y[y.length-k.length].length-k[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[G[0],G[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},"unput"),more:x(function(){return this._more=!0,this},"more"),reject:x(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:x(function(N){this.unput(this.match.slice(N))},"less"),pastInput:x(function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:x(function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:x(function(){var N=this.pastInput(),v=new Array(N.length+1).join("-");return N+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-DTYTviE0.js b/veadk/webui/assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-D0QeaNJa.js similarity index 87% rename from veadk/webui/assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-DTYTviE0.js rename to veadk/webui/assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-D0QeaNJa.js index c89578549..32ba44848 100644 --- a/veadk/webui/assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-DTYTviE0.js +++ b/veadk/webui/assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-D0QeaNJa.js @@ -1 +1 @@ -import{a as n}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var c=1;function a(){if(!(typeof globalThis>"u"))return globalThis}n(a,"getCaptureGlobal");function m(){var o;return!!((o=a())!=null&&o.mermaidCaptureSizes)}n(m,"shouldCaptureSizes");function d(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}n(d,"capturedFromLocation");function s(o,r){const e=a();if(!e)return;const t=r.node(),i=(t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t,p=(i==null?void 0:i.id)??"(unknown)";e.mermaidCapturedSizes??(e.mermaidCapturedSizes=[]);const u={svgId:p,sizes:o};e.mermaidCapturedSizes.push(u),e.mermaidLastCapturedSizes=u}n(s,"emitCapturedSizes");function l(o,r){const e=[];for(const t of r.nodes)t.isGroup||e.push({id:t.id,width:t.width??0,height:t.height??0});e.length!==0&&s({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:d()},nodes:e},o)}n(l,"captureNodeSizes");export{l as captureNodeSizes,m as shouldCaptureSizes}; +import{a as n}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var c=1;function a(){if(!(typeof globalThis>"u"))return globalThis}n(a,"getCaptureGlobal");function m(){var o;return!!((o=a())!=null&&o.mermaidCaptureSizes)}n(m,"shouldCaptureSizes");function d(){return typeof location>"u"?"browser-dev":`${location.pathname}${location.search}`}n(d,"capturedFromLocation");function s(o,r){const e=a();if(!e)return;const t=r.node(),i=(t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t,p=(i==null?void 0:i.id)??"(unknown)";e.mermaidCapturedSizes??(e.mermaidCapturedSizes=[]);const u={svgId:p,sizes:o};e.mermaidCapturedSizes.push(u),e.mermaidLastCapturedSizes=u}n(s,"emitCapturedSizes");function l(o,r){const e=[];for(const t of r.nodes)t.isGroup||e.push({id:t.id,width:t.width??0,height:t.height??0});e.length!==0&&s({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:d()},nodes:e},o)}n(l,"captureNodeSizes");export{l as captureNodeSizes,m as shouldCaptureSizes}; diff --git a/veadk/webui/assets/visualizations/mermaid/stateDiagram-OKZ733FA-BL0QLRfE.js b/veadk/webui/assets/visualizations/mermaid/stateDiagram-OKZ733FA-RX0oBJXb.js similarity index 96% rename from veadk/webui/assets/visualizations/mermaid/stateDiagram-OKZ733FA-BL0QLRfE.js rename to veadk/webui/assets/visualizations/mermaid/stateDiagram-OKZ733FA-RX0oBJXb.js index a79e5a6f4..c85d9baee 100644 --- a/veadk/webui/assets/visualizations/mermaid/stateDiagram-OKZ733FA-BL0QLRfE.js +++ b/veadk/webui/assets/visualizations/mermaid/stateDiagram-OKZ733FA-RX0oBJXb.js @@ -1 +1 @@ -import{b as R,s as W,S as N}from"./chunk-5RXB4S5H-Vs8JZSfc.js";import{a as f,Y as t,at as S,B as P,x as z,aq as U,G as _,a9 as C,b9 as F}from"./mermaid.core-BmHujEI0.js";import{aG as H}from"../../app/index-B71Wq9_t.js";import{G as O}from"../../chunks/graph-Dqkl27Ch.js";import{l as J}from"../../chunks/layout-B6FSD_Du.js";import"./chunk-XXDRQBXY-CLLbPKnJ.js";import"./chunk-KBJHAD2P-fr6wew8I.js";import"./chunk-2GRJ4B5K-CbPivXt6.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/map-8WAJQ6ap.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),Y=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),D=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&Y(n),i.type==="default"&&i.descriptions.length===0&&D(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(_),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(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"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},xt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{xt as diagram}; +import{b as R,s as W,S as N}from"./chunk-5RXB4S5H-DevQkzhU.js";import{a as f,Y as t,at as S,B as P,x as z,aq as U,G as _,a9 as C,b9 as F}from"./mermaid.core-l-gs7P2Q.js";import{aG as H}from"../../app/index-BKQXvMzA.js";import{G as O}from"../../chunks/graph-Dqkl27Ch.js";import{l as J}from"../../chunks/layout-B6FSD_Du.js";import"./chunk-XXDRQBXY-B5A5gE3j.js";import"./chunk-KBJHAD2P-mhv9-tYP.js";import"./chunk-2GRJ4B5K-CS99z7QO.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/map-8WAJQ6ap.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),Y=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),D=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"
");p=p.replace(/\n/g,"
");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&Y(n),i.type==="default"&&i.descriptions.length===0&&D(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=U().x(function(s){return s.x}).y(function(s){return s.y}).curve(_),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(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"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");A(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),A=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},xt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{xt as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-CpJ0zz2a.js b/veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-CpJ0zz2a.js deleted file mode 100644 index 5a8616d59..000000000 --- a/veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-CpJ0zz2a.js +++ /dev/null @@ -1 +0,0 @@ -import{b as r,a as e,s as a,S as s}from"./chunk-5RXB4S5H-Vs8JZSfc.js";import{a as i}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"./chunk-XXDRQBXY-CLLbPKnJ.js";import"./chunk-KBJHAD2P-fr6wew8I.js";import"./chunk-2GRJ4B5K-CbPivXt6.js";import"../../chunks/purify.es-BnINGy_Y.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-DPY60Pq_.js b/veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-DPY60Pq_.js new file mode 100644 index 000000000..bc03fc2b6 --- /dev/null +++ b/veadk/webui/assets/visualizations/mermaid/stateDiagram-v2-UEYNNEHI-DPY60Pq_.js @@ -0,0 +1 @@ +import{b as r,a as e,s as a,S as s}from"./chunk-5RXB4S5H-DevQkzhU.js";import{a as i}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"./chunk-XXDRQBXY-B5A5gE3j.js";import"./chunk-KBJHAD2P-mhv9-tYP.js";import"./chunk-2GRJ4B5K-CS99z7QO.js";import"../../chunks/purify.es-BnINGy_Y.js";var n={parser:a,get db(){return new s(2)},renderer:e,styles:r,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{n as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/swimlanes-SLNWSIFB-CdZ5MJJx.js b/veadk/webui/assets/visualizations/mermaid/swimlanes-SLNWSIFB-jvKPpuQV.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/swimlanes-SLNWSIFB-CdZ5MJJx.js rename to veadk/webui/assets/visualizations/mermaid/swimlanes-SLNWSIFB-jvKPpuQV.js index 73e93aa6e..02af3b15b 100644 --- a/veadk/webui/assets/visualizations/mermaid/swimlanes-SLNWSIFB-CdZ5MJJx.js +++ b/veadk/webui/assets/visualizations/mermaid/swimlanes-SLNWSIFB-jvKPpuQV.js @@ -1,2 +1,2 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-DTYTviE0.js","assets/visualizations/mermaid/mermaid.core-BmHujEI0.js","assets/app/index-B71Wq9_t.js","assets/styles/index-_lutWX9f.css","assets/chunks/purify.es-BnINGy_Y.js"])))=>i.map(i=>d[i]); -import{_ as Rr}from"../../app/index-B71Wq9_t.js";import{c as Nr}from"./chunk-RYQCIY6F-CnbyImnC.js";import{aw as Or,v as Pr,t as Br,u as kr,at as Qe,Y as _r,ag as Fr,ad as Dr,aG as Hr,ae as Xr,af as Yr,X as Gr,a6 as $r,P as zr,b9 as _e,b2 as Ve,a as d,av as Po}from"./mermaid.core-BmHujEI0.js";import{G as Vr}from"../../chunks/graph-Dqkl27Ch.js";import"../../chunks/map-8WAJQ6ap.js";import"../../chunks/purify.es-BnINGy_Y.js";async function Xo(t,e){const n=new Vr({multigraph:!0,compound:!0}),o=[...e.edges],s=_r(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),a=r.insert("g").attr("class","edges edgePath"),c=r.insert("g").attr("class","edgeLabels"),f=r.insert("g").attr("class","nodes"),g=new Map,p=t.node()!=null;await Promise.all(e.nodes.map(async M=>{var u;if(M.isGroup)n.setNode(M.id,{...M});else{if(p){const h=await Fr(f,M,{config:s,dir:M.dir}),l=((u=h.node())==null?void 0:u.getBBox())??{width:0,height:0};g.set(M.id,h),M.width=l.width,M.height=l.height}n.setNode(M.id,{...M})}}));for(const M of o)n.setEdge(M.start,M.end,{...M},M.id),e.edges.some(h=>h.id===M.id)||e.edges.push(M);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:M}=await Rr(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-DTYTviE0.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4]));M(t,e)}return{graph:n,groups:{clusters:i,edgePaths:a,edgeLabels:c,nodes:f,rootGroups:r},nodeElements:g}}d(Xo,"createGraphWithElements");var Bo=5,je=1e-5,Ue=1e-6;function tn(t){const e=[];for(let n=0;n=1-Ue||M<=Ue||M>=1-Ue?null:{point:{x:t.x+p*s,y:t.y+p*r},tA:p,tB:M}}d(Yo,"segmentIntersection");function wn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(wn,"isHorizontalSeg");function Go(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}d($o,"getArcSweepFlag");var jr=.001;function zo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Po[e.arrowTypeStart];if(o){const r=t[0],i=t[1],a=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(a),n[0].y=r.y+o*Math.sin(a)}const s=e.arrowTypeEnd&&Po[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],a=t[r-1],c=Math.atan2(a.y-i.y,a.x-i.x);n[r-1].x=a.x-s*Math.cos(c),n[r-1].y=a.y-s*Math.sin(c)}return n}d(zo,"applyMarkerOffsets");function Vo(t,e,n,o,s){const r=t.point.x,i=t.point.y,a={x:r-e*t.r,y:i-n*t.r},c={x:r+e*t.r,y:i+n*t.r},f=[`L${Oe(a)}`];return s==="arc"?f.push(`A${le(t.r)},${le(t.r)} 0 0 ${o} ${Oe(c)}`):f.push(`M${Oe(c)}`),f}d(Vo,"emitJump");function An(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,a=n.y-e.y,c=Math.hypot(s,r),f=Math.hypot(i,a);if(c0){const v=An(s[f-1],s[f],s[f+1]??s[f],Bo);v&&(l=v.cutLen)}let x=p,C=null;r&&fv.t-L.t);for(const v of b)v.r=Math.min(v.r,v.d-l,x-v.d);for(let v=0;vL){const y=L/2;b[v].r=Math.min(b[v].r,y),b[v+1].r=Math.min(b[v+1].r,y)}}for(const v of b)v.r=2?o:null}catch{return null}}d(Ko,"decodeDataPoints");function qo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const f of e)s.set(f.id,f);const r=[],i=new Map;for(const f of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(f.id):f.id,p=o.querySelector(`path[data-id="${g}"]`);if(!p)continue;i.set(f.id,p);const u=Ko(p.getAttribute("data-points"))??f.points;r.push({...f,points:u})}const a=Go(r);if(a.length===0)return;const c=new Map;for(const f of a){const g=c.get(f.jumpEdgeId)??[];g.push(f),c.set(f.jumpEdgeId,g)}for(const f of r){const g=c.get(f.id);if(!g||g.length===0)continue;const p=s.get(f.id),M=p==null?void 0:p.curve;if(M!==void 0&&!Wo(M))continue;const u=i.get(f.id);if(!u)continue;if(M===void 0){const v=u.getAttribute("d")??"";if(!Uo(v))continue}const h=u.getAttribute("style")??"",l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(h),x=l?Number.parseFloat(l[1]):null,C=l?Number.parseFloat(l[2]):null,b=jo(f,g,n);if(u.setAttribute("d",b),x!==null&&C!==null&&typeof u.getTotalLength=="function"){const v=u.getTotalLength(),L=Math.max(0,v-x-C),y=`0 ${x} ${L} ${C}`,I=h.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${y};`).replace(/;\s*;+/g,";");u.setAttribute("style",I)}}}d(qo,"applyLineJumpsToSvg");async function Jo(t,e){var s,r;for(const i of t.nodes)i.isGroup?await Dr(e.clusters,i):Hr(i);const n=new Map;for(const i of t.nodes)i!=null&&i.id&&n.set(i.id,i);for(const i of t.edges){const a=i.start?n.get(i.start)??{}:{},c=i.end?n.get(i.end)??{}:{},f=Xr(e.edgePaths,{...i},{},t.type,a,c,t.diagramId);i.label&&await Yr(e.rootGroups,i),i.label&&Zo(i,f)}const o=(r=(s=t.config)==null?void 0:s.swimlane)==null?void 0:r.lineHops;if(o!==!1){const i=o==="gap"?"gap":"arc",a=t.edges.filter(c=>Array.isArray(c.points)&&c.points.length>=2).map(c=>({id:c.id,points:c.points,curve:c.curve,arrowTypeStart:c.arrowTypeStart,arrowTypeEnd:c.arrowTypeEnd}));qo(e.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:i})}}d(Jo,"adjustLayout");function Zo(t,e){const n=(e==null?void 0:e.updatedPath)??(e==null?void 0:e.originalPath),o=Gr(),{subGraphTitleTotalMargin:s}=$r({flowchart:o.flowchart??{}});if(t.label){const r=zr.get(t.id);let i=t.x,a=t.y;if(n){const c=_e.calcLabelPosition(n);Qe.debug("Moving label "+t.label+" from (",i,",",a,") to (",c.x,",",c.y,") abc88"),e&&(i=c.x,a=c.y)}r.attr("transform",`translate(${i}, ${a+s/2})`)}if(t!=null&&t.startLabelLeft){const r=Ve.get(t.id).startLeft;let i=t==null?void 0:t.x,a=t==null?void 0:t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const r=Ve.get(t.id).startRight;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const r=Ve.get(t.id).endLeft;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const r=Ve.get(t.id).endRight;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}}d(Zo,"positionEdgeLabel");var vn="__swimlane_default__",Ur=21,ko=20;function Rn(t){return Math.max(t.padding??ko,ko)}d(Rn,"topLaneHorizontalPadding");function Qo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,a=Math.min(r,n+s/2),c=Math.min(Ur,Math.max(0,a-i)),f=i+c;if(f<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:f}}d(Qo,"assignTopLaneTitleRect");function ts(t){const e=t.direction,n=t.nodes??(t.nodes=[]);for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===vn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:vn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=vn}d(ts,"prepareLayoutForSwimlanes");function es(t){const e=new Map;for(const c of t.nodes??[])e.set(c.id,c);const n=[];for(const c of t.edges??[]){const f=typeof c.start=="string"?c.start:void 0,g=typeof c.end=="string"?c.end:void 0;!f||!g||c.labelNodeId||n.push({id:c.id,src:f,dst:g,ref:c})}const o=t.nodes??[],s=o.filter(c=>c.isGroup),r=o.filter(c=>!c.isGroup);return{nodes:[...[...s].reverse(),...r].map(c=>c.id),edges:n,layout:t,nodeById:e}}d(es,"toGraphView");function ns(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=(o==null?void 0:o.layerGap)??100,a=(o==null?void 0:o.nodeGap)??40;let c=0;for(const M of e.layers){let u=0;for(const h of M){const l=r.get(h);if(!l){u++;continue}l.layer=c,l.order=u;const x=n.x[h]??u*a,C=n.y[h]??c*i;l.x=x,l.y=C,u++}c++}const f=s.nodes??[],g=new Map,p=[];for(const M of f){if(!(M!=null&&M.isGroup))continue;M.parentId||p.push(M);const u=f.filter(b=>b.parentId===M.id);let h=1/0,l=-1/0,x=1/0,C=-1/0;for(const b of u){const v=b.x??n.x[b.id],L=b.y??n.y[b.id],y=b.width??0,I=b.height??0;v!=null&&L!=null&&(h=Math.min(h,v-y/2),l=Math.max(l,v+y/2),x=Math.min(x,L-I/2),C=Math.max(C,L+I/2))}if(h===1/0||x===1/0)M.x=M.x??0,M.y=M.y??0,M.width=M.width??0,M.height=M.height??0;else{const b=M.padding??20,v=M.parentId?b:2*Rn(M),L=b,y=Math.max(0,l-h)+v,I=Math.max(0,C-x)+L,E=(h+l)/2,A=(x+C)/2;M.x=E,M.y=A,M.width=y,M.height=I,g.set(M.id,{minX:h,maxX:l,minY:x,maxY:C})}}if(p.length>0&&g.size>0){let M=1/0,u=-1/0,h=0;for(const l of p){const x=l.padding??20;x>h&&(h=x);const C=g.get(l.id);C&&(M=Math.min(M,C.minY),u=Math.max(u,C.maxY))}if(M!==1/0&&u!==-1/0){const l=Math.max(0,u-M),C=Math.max(h,36),b=l+2*C,v=(M+u)/2;for(const B of p)B.y=v,B.height=b,B.swimlaneContentTop=M;const L=[...p].sort((B,O)=>{const k=B.x??0,H=O.x??0;return k-H}),y=[],I=[],E=[];for(const B of L){const O=g.get(B.id);if(!O)continue;const k=Math.max(0,O.maxX-O.minX)+2*Rn(B),H=(O.minX+O.maxX)/2;y.push(B.id),I.push(H),E.push(k)}const A=y.length;if(A>0){const B=new Map;if(A===1)B.set(y[0],E[0]);else{const O=[];for(let j=0;j0&&s>0?{cx:e,cy:n,rect:Pe(e,n,o,s)}:void 0}d(co,"measuredNodeRect");function ao(t){if(t.isGroup)return;const e=co(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(ao,"nodeBoundsInfoFor");function ce(t,e,n=Yt){return Math.abs(t.x-e.x)n}d(Nt,"isHorizontalSegment");function Ot(t,e,n=Yt){return gt(t,e,n)&&Math.abs(t.y-e.y)>n}d(Ot,"isVerticalSegment");function Wt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(Wt,"overlapLength");function de(t,e,n=Yt){return t.horizontal&&e.horizontal&&yt(t.a,e.a,n)?Wt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&>(t.a,e.a,n)?Wt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(de,"sameAxisSegmentOverlapLength");function Be(t,e=Yt){const n=[];for(let o=0;o0?n[n.length-1]:void 0;(!s||!ce(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(xt,"dedupeConsecutivePoints");function lo(t,e=Yt){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Nt(n,o,e)&&Ot(o,s,e)&&Nt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:Ot(n,o,e)&&Nt(o,s,e)&&Ot(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(lo,"classifyThreeSegmentRoute");function dn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),a=Math.max(t.y,e.y);return r>n.left-o&&sn.top-o&&ie.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ss,"rectContainsRect");function en(t,e){return t.lefte.left&&t.tope.top}d(en,"rectsOverlap");function Nn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Nn,"inflateRect");function Pe(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Pe,"rectFromCenterSize");function te(t){var e;return(e=co(t))==null?void 0:e.rect}d(te,"rectOfNodeBounds");function Le(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Le,"portForRectSide");function uo(t,e,n,o,s,r=Yt){const i=e==="left"||e==="right",a=o==="left"||o==="right";if(i&&a){if(e==="right"&&o==="left"&&t.xn.x){if(yt(t,n,r))return[t,n];const p=(t.x+n.x)/2;return[t,{x:p,y:t.y},{x:p,y:n.y},n]}if(e===o){if(yt(t,n,r))return;const p=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x:p,y:t.y},{x:p,y:n.y},n]}return}if(!i&&!a){if(e===o){if(gt(t,n,r))return;const M=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:M},{x:n.x,y:M},n]}if(!(e==="bottom"&&o==="top"&&t.yn.y))return;if(gt(t,n,r))return[t,n];const p=(t.y+n.y)/2;return[t,{x:t.x,y:p},{x:n.x,y:p},n]}if(i&&!a){const g=e==="right"&&n.x>t.x||e==="left"&&n.xn.y;return g&&p?[t,{x:n.x,y:t.y},n]:void 0}const c=e==="bottom"&&n.y>t.y||e==="top"&&n.yn.x;return c&&f?[t,{x:t.x,y:n.y},n]:void 0}d(uo,"buildOrthogonalPortPath");function ho(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ho,"buildSameSideTrackPath");function un(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=ao(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(un,"collectRealNodeBounds");function Me(t){const e=[],n=[];for(const o of t){const s=ao(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(Me,"collectNodeRectEntries");function rs(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,a=o.height??0;n.push({nodeId:o.id,...Pe(s,r,i,a)})}return n}d(rs,"collectLayoutNodeRects");function go(t,e,n=Yt){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)h||MC)return!1;const b=Math.abs(l-g.a.x)s:r&&a&&yt(t,n,s)?Wt(t.x,e.x,n.x,o.x)>s:!1}d(is,"sameAxisSegmentsOverlap");function nn(t,e,n,o,{epsilon:s=Yt,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const a=i.points;if(!(!a||a.length<2))for(let c=0;cM+s&&hl+s&&po+Yt&&t=2?e[e.length-2]:void 0,c=(i?gt(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(c)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!ce(s,o))&&n.push(o)}return n}d(on,"orthogonalizePolyline");function ue(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=as(e);if(e=o.points,!o.changed)break}return e}d(ue,"simplifyPolyline");var it=.001,Kr=.5,_o=4;function yo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&s=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=ls(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(Pn,"clipEndpoint");function fs(t,e){for(const n of t){const o=yo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Pn(s,o.srcRect,!0)),o.dstRect&&(s=Pn(s,o.dstRect,!1)),s=ue(on(s)),s=po(s,o.srcRect,o.dstRect),o.edge.points=ue(on(s))}}d(fs,"clipEdgeEndpointsToNodeBoundaries");function Bn(t,e,n,o=!1){if(yt(t,e,it)){if(e.yn.bottom+it)return e;if(o){if(t.xn.right+it)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(gt(t,e,it)){if(e.xn.right+it)return e;if(o){if(t.yn.bottom+it)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Bn,"snapEndpointToBoundary");function sn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&so.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(ds,"intersectRanges");function _n(t,e){return e==="left"||e==="right"?rn(t.top,t.bottom):rn(t.left,t.right)}d(_n,"clearanceRangeForSide");function cn(t,e,n){const o=t.y>=n.top-it&&t.y<=n.bottom+it,s=t.x>=n.left-it&&t.x<=n.right+it;if(yt(t,e,it)&&o){if(Math.abs(t.x-n.left)0?ds(r):void 0}d(us,"straightClearanceRange");function Fn(t,e,n,o,s){const r=us(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,a=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(a-i)({...a}));for(let a=e;a>=0&&a=n.left-it&&Math.max(t.x,e.x)<=n.right+it,s=Math.min(t.y,e.y)>=n.top-it&&Math.max(t.y,e.y)<=n.bottom+it;if(Math.abs(t.y-n.top)o.bottom+it;case"left":return yt(e,n,it)&&n.xo.right+it}}d(Xn,"leavesOutward");function Yn(t,e,n){if(t.length<3)return t;if(n){const r=Hn(t[0],t[1],e);return r&&Xn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Hn(t[o-1],t[o],e);return s&&Xn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Yn,"collapseOwnBorderStub");function ms(t,e,n){let o=t;if(e){const r=sn(o,0,1);if(r){const i=Bn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Yn(o,e,!0)}if(n){const r=o.length-1,i=sn(o,r,-1);if(i){const a=Bn(i,o[r],n,!0);a!==o[r]&&(o=[...o.slice(0,r),a])}o=Yn(o,n,!1)}const s=po(o,e,n);return s!==o||o.length===2?s:(e&&(o=Dn(o,e,!0)),n&&(o=Dn(o,n,!1)),o)}d(ms,"snapAndCollapseEndpoints");function Gn(t,e){for(const n of t){const o=yo(n,e,2);if(!o)continue;const s=xt(o.points,it),r=ms(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Gn,"prepareEdgeEndpointsForRenderer");function xo(t){return new Map(t.map(e=>[e.id,e]))}d(xo,"buildNodeMap");function ys(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!(s!=null&&s.isGroup))break;o=s.id,n=s.parentId}return o}d(ys,"resolveTopLevelGroupId");function $n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!(s!=null&&s.isGroup))break;n++,o=s.parentId}return n}d($n,"groupDepth");function bo(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,a=r.y;if(typeof i!="number"||typeof a!="number")continue;const c=r.width??0,f=r.height??0;e=Math.min(e,i-c/2),n=Math.max(n,i+c/2),o=Math.min(o,a-f/2),s=Math.max(s,a+f/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(bo,"boundsForChildren");function ps(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ps,"applyGroupBounds");function xs(t){const e=xo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>$n(s,e)-$n(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=bo(s);r&&ps(o,r)}}d(xs,"recomputeNestedGroupBounds");function an(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);let r=1/0,i=-1/0;for(const c of s){const f=c[e];typeof f=="number"&&(r=Math.min(r,f),i=Math.max(i,f))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const a=d(c=>r+i-c,"mirror");for(const c of n){const f=c[e];typeof f=="number"&&(c[e]=a(f));const g=c.groupTitleRect;g&&(c.groupTitleRect=e==="x"?{...g,left:a(g.right),right:a(g.left)}:{...g,top:a(g.bottom),bottom:a(g.top)})}for(const c of o)for(const f of c.points??[])f[e]=a(f[e]);return!0}d(an,"mirrorAxis");function bs(t){return(t.nodes??[]).some(n=>!n.isGroup)?an(t,"y"):!0}d(bs,"applyBtDirectionTransform");function Ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G0?Math.max(1,g/p):1;for(const P of s){const G=P.x??0,tt=((P.y??0)-i)*M+a,ft=G-r;P.x=tt,P.y=ft}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,ft=(G.y-i)*M+a,Mt=j-r;G.x=ft,G.y=Mt}xs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&an(t,"x"),!0;const h=xo(n),l=new Map;for(const P of n){if(P.isGroup)continue;const G=ys(P,h);if(!G)continue;const j=l.get(G)??[];j.push(P),l.set(G,j)}let x=0;for(const P of u){const G=P.padding??0;G>x&&(x=G)}const C=[];let b=1/0,v=-1/0;for(const P of u){const G=l.get(P.id)??[],j=bo(G);j&&(b=Math.min(b,j.minX),v=Math.max(v,j.maxX),C.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(b===1/0||v===-1/0)return!0;const L=Math.max(0,v-b),y=Math.max(x,10),I=L+2*y,E=a+I,O=(b+v)/2-I/2-a,k=O+E/2,H=Math.max(x,a);C.sort((P,G)=>P.centerY-G.centerY);for(let P=0;PM.cy?C.bottom:C.top,H=M.cx+b;if(H<=C.left+ae||H>=C.right-ae)continue;v={x:H,y:k},L={x:H,y:a.y},y={x:a.x,y:a.y}}else{const k=u.cx>M.cx?C.right:C.left,H=M.cy+b;if(H<=C.top+ae||H>=C.bottom-ae)continue;v={x:k,y:H},L={x:a.x,y:H},y={x:a.x,y:a.y}}const I=ce(v,L,ae),E=ce(L,y,ae);if(I&&E||!I&&Pt(v,L,o,[g],1)||!E&&Pt(L,y,o,[p],1))continue;const A=!I&&nn(v,L,t,s,{epsilon:ae,skipDegenerateOther:!0}),B=!E&&nn(L,y,t,s,{epsilon:ae,skipDegenerateOther:!0});if(!(A||B)){I?x=[L,y]:E?x=[v,L]:x=[v,L,y];break}}x&&(s.points=x)}}d(Is,"portSwapToLShape");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values());for(const a of t){if(a.isLayoutOnly)continue;const c=a.points;if(!c||c.length<4)continue;const f=xt(c,.001);if(f.length<4)continue;const g=f.length-1,p=f[g],M=f[g-1],u=f[g-2],h=p.x-M.x,l=p.y-M.y,x=Math.hypot(h,l);if(x>=10||x<.001)continue;const C=M.x-u.x,b=M.y-u.y;if(Math.hypot(C,b)<.001)continue;const L=Nt(M,p,.001),y=Ot(M,p,.001),I=Nt(u,M,.001),E=Ot(u,M,.001);if(!(L&&E||y&&I))continue;const A=a.end,B=a.start,O=A?e.get(A):void 0;if(!O)continue;const k=O.x??0,H=O.y??0,P=te(O);if(!P)continue;let G,j;if(E){const J=b<0;G={x:k,y:u.y},j={x:k,y:J?P.bottom:P.top}}else{const J=C>0;G={x:u.x,y:H},j={x:J?P.right:P.left,y:H}}if(Pt(G,j,r,A?[A]:[],-2)||Pt(G,j,i,[],-2))continue;if(B){const J=e.get(B),rt=J?te(J):void 0;if(rt&&fo(G,rt,2))continue}const tt=d((J,rt)=>`${J.x.toFixed(3)},${J.y.toFixed(3)}|${rt.x.toFixed(3)},${rt.y.toFixed(3)}`,"ownSegmentKey"),ft=new Set;for(let J=0;J{for(const ut of t){if(ut===a||ut.isLayoutOnly)continue;const pt=ut.points;if(!(!pt||pt.length<2))for(let St=0;St=0){const J=f[g-3],rt=[B,A].filter(ut=>!!ut);if(Pt(J,G,r,rt,-2)||Mt(J,G))continue}const Ft=[...f.slice(0,g-2),G,j];a.points=Ft;const nt=a.labelNodeId;if(nt){const J=e.get(nt);if(J){const rt=J.width??0,ut=J.height??0;if(rt>0&&ut>0){let pt,St,wt=-1;for(let Kt=0;Kt=rt+2||me&&se>=ut+2)&&se>wt&&(wt=se,pt=(qt.x+Jt.x)/2,St=(qt.y+Jt.y)/2)}pt!==void 0&&St!==void 0&&(J.x=pt,J.y=St)}}}}}d(Ss,"collapseShortTerminalStub");var et=.001,Xt=8,at=Be,Ln=d((t,e)=>gt(t,e,et)||yt(t,e,et),"orthogonallyAligned");function Cs(t,e){const s=d((u,h)=>{const l=u.x??0,x=u.y??0,C=h.x-l,b=h.y-x;let v=(u.width??0)/2,L=(u.height??0)/2;return Math.abs(b)*v>Math.abs(C)*L?(b<0&&(L=-L),{x:l+(b===0?0:L*C/b),y:x+L}):(C<0&&(v=-v),{x:l+v,y:x+(C===0?0:v*b/C)})},"rectIntersect"),r=d((u,h)=>{const l=xt(u.points??[]);if(l.length<2)return;const x=h?u.start:u.end,C=x?e.get(x):void 0,b=C?te(C):void 0;if(!C||!x||!b)return;const v=h?l[0]:l[l.length-1],L=h?l[1]:l[l.length-2],y=s(C,v);let I=v;if(Ln(L,y)&&(I=L),gt(y,I,et))return{edge:u,edgeId:String(u.id??""),nodeId:x,atStart:h,orientation:"V",coord:y.x,min:Math.min(y.y,I.y),max:Math.max(y.y,I.y),boundary:y,railEnd:I,rect:b};if(yt(y,I,et))return{edge:u,edgeId:String(u.id??""),nodeId:x,atStart:h,orientation:"H",coord:y.y,min:Math.min(y.x,I.x),max:Math.max(y.x,I.x),boundary:y,railEnd:I,rect:b}},"terminalLaneFor"),i=d((u,h)=>Math.max(0,Math.min(u.max,h.max)-Math.max(u.min,h.min)),"projectedOverlapLength"),a=d((u,h)=>u.nodeId!==h.nodeId||u.orientation!==h.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&>(u.boundary,h.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&yt(u.boundary,h.boundary,1),"sameTerminalFace"),c=d((u,h)=>u.nodeId!==h.nodeId||u.orientation!==h.orientation?!1:i(u,h)>=Xt&&Math.abs(u.coord-h.coord)<.5,"exactTerminalLaneConflict"),f=d((u,h)=>{if(u.nodeId!==h.nodeId||u.orientation!==h.orientation||u.orientation!=="H"||u.atStart===h.atStart)return!1;const l=i(u,h);if(l2*x?!1:a(u,h)&&Math.abs(u.coord-h.coord)<16},"nearTerminalLaneConflict"),g=d((u,h)=>{const l=xt(u.edge.points??[]);if(l.length<2)return;const x=u.orientation==="V"?{x:u.boundary.x+h,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+h},C=u.orientation==="V"?{x:u.railEnd.x+h,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+h};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?yt(x,u.boundary,et)&&x.x>=u.rect.left+1&&x.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?gt(x,u.boundary,et)&&x.y>=u.rect.top+1&&x.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const I=l.length>1&&ce(l[1],u.railEnd,et),E=l.slice(I?2:1),A=E[0];return A&&!Ln(A,C)?void 0:[x,C,...E]}const v=l.length>1&&ce(l[l.length-2],u.railEnd,et),L=l.slice(0,v?-2:-1),y=L[L.length-1];if(!(y&&!Ln(y,C)))return[...L,C,x]},"shiftedCandidate"),p=d(u=>{const h=u.edge,l=xt(h.points??[]);if(l.length!==2)return!1;const x=h.start,C=h.end,b=x?e.get(x):void 0,v=C?e.get(C):void 0;if(!b||!v)return!1;const L=b.x??0,y=b.y??0,I=v.x??0,E=v.y??0,[A,B]=l;return yt(A,B,et)&&Math.abs(y-E)<1&&Math.abs(L-I)>1||gt(A,B,et)&&Math.abs(L-I)<1&&Math.abs(y-E)>1},"laneIsStraightCollinearConnector"),M=[-7,7,-2*7,2*7,-3*7,3*7];for(let u=0;u<8;u++){const h=t.filter(x=>!x.isLayoutOnly).flatMap(x=>[r(x,!0),r(x,!1)]).filter(x=>!!x);let l=!1;for(let x=0;x{const A=p(I),B=p(E);return A!==B?Number(A)-Number(B):+!E.atStart-+!I.atStart});for(const I of y){for(const E of M){const A=g(I,E);if(!A)continue;const B=r({...I.edge,points:A},I.atStart);if(!(!B||h.some(O=>O.edge!==I.edge&&(c(B,O)||L&&f(B,O))))){I.edge.points=A,l=!0;break}}if(l)break}}if(!l)return}}d(Cs,"separateSharedRenderedTerminalLanes");function vs(t,e){const{realNodeRects:o,labelNodeRects:s}=Me(e.values()),r=d((a,c)=>{const f=a.start,g=a.end,p=at(c);if(p.length!==c.length-1)return!1;const M=[f,g].filter(u=>!!u);for(const u of p)if(Pt(u.a,u.b,o,M,-2)||Pt(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===a||u.isLayoutOnly)continue;const h=u.points;if(!(!h||h.length<2)){for(const l of p)for(const x of at(xt(h)))if(de(l,x,.5)>=Xt||he(l.a,l.b,x.a,x.b,et))return!1}}return!0},"candidateIsSafe"),i=d((a,c)=>{if(c+4>=a.length)return;const f=a[c],g=a[c+1],p=a[c+2],M=a[c+3],u=a[c+4],h=Nt(f,g)&&Ot(g,p)&&Nt(p,M)&&Ot(M,u)&>(f,M,et)&>(f,u,et)&>(g,p,et)&&(g.x-f.x)*(M.x-p.x)<0,l=Ot(f,g)&&Nt(g,p)&&Ot(p,M)&&Nt(M,u)&&yt(f,M,et)&&yt(f,u,et)&&yt(g,p,et)&&(g.y-f.y)*(M.y-p.y)<0;if(h||l)return xt([...a.slice(0,c+1),u,...a.slice(c+5)]);if(c+5>=a.length)return;const x=a[c+5],C=Ot(f,g)&&Nt(g,p)&&Ot(p,M)&&Nt(M,u)&&Ot(u,x)&>(f,u,et)&>(f,x,et)&>(p,M,et)&&(p.x-g.x)*(u.x-M.x)<0,b=Nt(f,g)&&Ot(g,p)&&Nt(p,M)&&Ot(M,u)&&Nt(u,x)&&yt(f,u,et)&&yt(f,x,et)&&yt(p,M,et)&&(p.y-g.y)*(u.y-M.y)<0;if(!(!C&&!b))return xt([...a.slice(0,c+1),x,...a.slice(c+6)])},"withoutDogleg");for(let a=0;a<8;a++){let c=!1;for(const f of t){if(f.isLayoutOnly)continue;const g=xt(f.points??[]);for(let p=0;p<=g.length-5;p++){const M=i(g,p);if(!(!M||!r(f,M))){f.points=M,c=!0;break}}if(c)break}if(!c)return}}d(vs,"collapseRedundantRectangularDoglegs");function zn(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values()),a=t.filter(h=>!h.isLayoutOnly),c=d((h,l,x)=>xt(h===l?x??[]:h.points??[]),"pointsFor"),f=d((h,l)=>{let x=0;for(let C=0;C{const l=at(h);if(l.length!==3)return;const x=l[1];if(!(l[0].horizontal===x.horizontal||l[2].horizontal===x.horizontal))return{index:x.index,horizontal:x.horizontal,vertical:x.vertical,segment:x}},"middleRail"),p=d((h,l)=>{const x=[h.start,h.end].filter(C=>!!C);return r.filter(C=>{if(x.includes(C.id))return!1;const b=C.rect;return l.horizontal?Wt(l.a.x,l.b.x,b.left,b.right)>=Xt&&l.a.y>=b.top-2&&l.a.y<=b.bottom+2:Wt(l.a.y,l.b.y,b.top,b.bottom)>=Xt&&l.a.x>=b.left-2&&l.a.x<=b.right+2})},"blockingRectsFor"),M=d((h,l,x)=>{const C=h.map(v=>({...v}));if(l.horizontal)C[l.index].y=x,C[l.index+1].y=x;else if(l.vertical)C[l.index].x=x,C[l.index+1].x=x;else return;const b=ue(xt(C));return at(b).length===b.length-1?b:void 0},"candidateByMovingRail"),u=d((h,l,x)=>{const C=[h.start,h.end].filter(v=>!!v),b=at(l);if(b.length!==l.length-1)return!1;for(const v of b)if(Pt(v.a,v.b,r,C,-2)||Pt(v.a,v.b,i,[],-2))return!1;for(const v of a)if(v!==h){for(const L of b)for(const y of at(c(v)))if(de(L,y,.5)>=Xt)return!1}return f(h,l)<=x},"candidateIsSafe");for(let h=0;h<8;h++){const l=f();let x=!1;for(const C of a){const b=c(C),v=g(b);if(!v)continue;const L=p(C,v.segment);if(L.length===0)continue;const y=v.horizontal?[Math.min(...L.map(I=>I.rect.top))-20,Math.max(...L.map(I=>I.rect.bottom))+20]:[Math.min(...L.map(I=>I.rect.left))-20,Math.max(...L.map(I=>I.rect.right))+20];for(const I of y){const E=M(b,v.segment,I);if(!(!E||!u(C,E,l))){C.points=E,x=!0;break}}if(x)break}if(!x)return}}d(zn,"liftObstacleHuggingSameSideRails");function Vn(t,e){const o=d(c=>{const f=c.groupTitleRect;if(!(!f||typeof f.left!="number"||typeof f.right!="number"||typeof f.top!="number"||typeof f.bottom!="number"||!Number.isFinite(f.left)||!Number.isFinite(f.right)||!Number.isFinite(f.top)||!Number.isFinite(f.bottom)||f.right<=f.left||f.bottom<=f.top))return{left:f.left,right:f.right,top:f.top,bottom:f.bottom}},"validTitleRect"),s=d(c=>{if(!c.isGroup||c.parentId)return;const f=c.direction,g=typeof f=="string"?f.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const p=o(c),M=c.y,u=c.height;if(!p||typeof M!="number"||typeof u!="number"||!Number.isFinite(M)||!Number.isFinite(u)||u<=0)return;const h=p.right-p.left,l=p.bottom-p.top;if(!(l<=0||h{if(!c.horizontal)return!1;const g=c.a.y;return g<=f.top+et||g>=f.bottom-et?!1:Wt(c.a.x,c.b.x,f.left,f.right)>=Xt},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(c=>!!c);if(i.length===0)return;let a=0;for(const c of t){if(c.isLayoutOnly)continue;const f=xt(c.points??[]);for(const g of at(f))for(const p of i)r(g,p.rect)&&(a=Math.max(a,p.rect.bottom-g.a.y+4))}if(!(a<=et))for(const c of i){const f=c.node.y,g=c.node.height;typeof f!="number"||typeof g!="number"||!Number.isFinite(f)||!Number.isFinite(g)||g<=0||(c.node.y=f-a/2,c.node.height=g+a,c.node.groupTitleRect={...c.rect,top:c.rect.top-a,bottom:c.rect.bottom-a})}}d(Vn,"liftTopLaneTitleBandsAboveRails");function jn(t,e){const o=d(f=>{const g=f.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId||f.direction!=="LR")return;const p=o(f),M=f.x,u=f.width;if(!p||typeof M!="number"||typeof u!="number"||!Number.isFinite(M)||!Number.isFinite(u)||u<=0)return;const h=p.right-p.left,l=p.bottom-p.top;if(!(h<=0||l{if(!f.vertical)return!1;const p=f.a.x;return p<=g.left+et||p>=g.right-et?!1:Wt(f.a.y,f.b.y,g.top,g.bottom)>=Xt},"verticalSegmentIntersectsTitle"),i=d((f,g)=>{if(!f.horizontal)return!1;const p=f.a.y;return p<=g.top+et||p>=g.bottom-et?!1:Wt(f.a.x,f.b.x,g.left,g.right)>=Xt},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let c=0;for(const f of t){if(f.isLayoutOnly)continue;const g=xt(f.points??[]);for(const p of at(g))for(const M of a)if(r(p,M.rect))c=Math.max(c,M.rect.right-p.a.x+4);else if(i(p,M.rect)){const u=Math.min(p.a.x,p.b.x);c=Math.max(c,M.rect.right-u+4)}}if(!(c<=et))for(const f of a){const g=f.node.x,p=f.node.width;typeof g!="number"||typeof p!="number"||!Number.isFinite(g)||!Number.isFinite(p)||p<=0||(f.node.x=g-c/2,f.node.width=p+c,f.node.groupTitleRect={...f.rect,left:f.rect.left-c,right:f.rect.right-c})}}d(jn,"shiftLeftLaneTitleBandsLeftOfRails");function Ls(t,e){const{realNodeRects:o}=Me(e.values()),s=t.filter(h=>!h.isLayoutOnly),r=d((h,l=new Map)=>xt(l.get(h)??h.points??[]),"replacementPointsFor"),i=d((h=new Map)=>{let l=0;for(let x=0;xs.reduce((l,x)=>l+oe(r(x,h)),0),"totalBends"),c=d(h=>{const l=r(h);if(l.length<4)return;const x=l[l.length-2],C=l[l.length-1];if(!(!Nt(x,C,et)&&!Ot(x,C,et)))return{tailStart:x,terminal:C}},"terminalTailFor"),f=d((h,l)=>{const x=r(h);if(x.length<3)return;const C=x[0],b=x[1];let v;if(Nt(C,b,et))v={x:b.x,y:l.tailStart.y};else if(Ot(C,b,et))v={x:l.tailStart.x,y:b.y};else return;const L=ue(xt([C,b,v,l.tailStart,l.terminal]));return at(L).length===L.length-1?L:void 0},"candidateWithDestinationTail"),g=d((h,l)=>{const x=[h.start,h.end].filter(C=>!!C);for(const C of at(l))if(Pt(C.a,C.b,o,x,-2))return!0;return!1},"pathHasNodeHit"),p=d((h,l,x)=>{for(const C of s)if(C!==h){for(const b of at(l))for(const v of at(r(C,x)))if(de(b,v,.5)>=Xt)return!0}return!1},"pathHasSharedTrack"),M=d((h,l,x)=>!g(h,l)&&!p(h,l,x),"candidateIsSafe"),u=d(()=>{const h=new Map;for(const l of s){const x=l.end;if(!x||!e.has(x)||r(l).length<4)continue;const b=h.get(x)??[];b.push(l),h.set(x,b)}return h},"edgesByDestination");for(let h=0;h<4;h++){const l=i();if(l===0)return;const x=a();let C,b=l,v=x;for(const L of u().values())for(let y=0;y=l||G>b||G===b&&j>=v||(C=P,b=G,v=j)}if(!C)return;for(const[L,y]of C)L.points=y}}d(Ls,"swapDestinationTerminalTailsToReduceCrossings");function Es(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values()),a=t.filter(L=>!L.isLayoutOnly),c=d((L,y=new Map)=>xt(y.get(L)??L.points??[]),"replacementPointsFor"),f=d((L=new Map)=>{let y=0;for(let I=0;Ia.reduce((y,I)=>y+oe(c(I,L)),0),"totalBends"),p=d(L=>{const y=L.start,I=L.end,E=y?e.get(y):void 0,A=I?e.get(I):void 0,B=E?te(E):void 0,O=A?te(A):void 0;return B&&O?{src:B,dst:O}:void 0},"endpointRectsFor"),M=d((L,y,I)=>{if(I.index<=0||I.index+1>=y.length-1)return;const E=p(L);if(E){if(I.vertical){const A=I.a.x,B=Math.min(E.src.left,E.dst.left),O=Math.max(E.src.right,E.dst.right),k=AO+et?"right":void 0;return k?{edge:L,points:y,segmentIndex:I.index,axis:"vertical",side:k,coord:A,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const A=I.a.y,B=Math.min(E.src.top,E.dst.top),O=Math.max(E.src.bottom,E.dst.bottom),k=AO+et?"bottom":void 0;return k?{edge:L,points:y,segmentIndex:I.index,axis:"horizontal",side:k,coord:A,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const L=[];for(const y of a){const I=c(y);for(const E of at(I)){const A=M(y,I,E);A&&L.push(A)}}return L},"collectExternalRails"),h=d((L,y)=>L.edge!==y.edge&&L.axis===y.axis&&L.side===y.side&&Wt(L.min,L.max,y.min,y.max)>=Xt,"railsInteract"),l=d(L=>{const y=[],I=new Set;for(const E of L){if(I.has(E))continue;const A=[E],B=[];for(I.add(E);A.length>0;){const O=A.pop();B.push(O);for(const k of L)!I.has(k)&&h(O,k)&&(I.add(k),A.push(k))}B.length>1&&y.push(B)}return y},"connectedComponents"),x=d(L=>{const y=[];for(const I of L)y.some(E=>Math.abs(E-I.coord){const y=L.map(A=>A.coord),I=x(L),E=[];if(L.length<=6){const A=new Array(I.length).fill(!1),B=[],O=d(()=>{if(B.length===L.length){B.some((k,H)=>Math.abs(k-y[H])>=et)&&E.push([...B]);return}for(const[k,H]of I.entries())A[k]||(A[k]=!0,B.push(H),O(),B.pop(),A[k]=!1)},"visit");return O(),E}for(let A=0;A{const I=new Map;for(const[A,B]of L.entries()){const O=y[A],k=I.get(B.edge)??B.points.map(H=>({x:H.x,y:H.y}));B.axis==="vertical"?(k[B.segmentIndex].x=O,k[B.segmentIndex+1].x=O):(k[B.segmentIndex].y=O,k[B.segmentIndex+1].y=O),I.set(B.edge,k)}const E=new Map;for(const[A,B]of I){const O=ue(xt(B));if(at(O).length!==O.length-1)return;E.set(A,O)}return E},"replacementsForAssignment"),v=d(L=>{for(const[y,I]of L){const E=[y.start,y.end].filter(A=>!!A);for(const A of at(I))if(Pt(A.a,A.b,r,E,-2)||Pt(A.a,A.b,i,[],-2))return!1}for(let y=0;y=Xt)return!1}}return!0},"candidateIsSafe");for(let L=0;L<4;L++){const y=f();if(y===0)return;let I,E=y,A=g(),B=Number.POSITIVE_INFINITY;for(const O of l(u()))for(const k of C(O)){const H=b(O,k);if(!H||!v(H))continue;const P=f(H);if(P>=y)continue;const G=g(H),j=O.reduce((tt,ft,Mt)=>tt+Math.abs(k[Mt]-ft.coord),0);P>E||P===E&&(G>A||G===A&&j>=B)||(I=H,E=P,A=G,B=j)}if(!I)return;for(const[O,k]of I)O.points=k}}d(Es,"reassignCrossingExternalRailChannels");function Ts(t,e){const{realNodeRects:o,labelNodeRects:s}=Me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,h,l)=>xt(u===h?l??[]:u.points??[]),"pointsFor"),a=d(u=>at(u).reduce((h,l)=>{const x=l.a.x-l.b.x,C=l.a.y-l.b.y;return h+Math.hypot(x,C)},0),"pathLength"),c=d((u,h)=>{let l=0;for(let x=0;x{if(u.horizontal){const l=u.a.y;return(Math.abs(l-h.top)<1||Math.abs(l-h.bottom)<1)&&Wt(u.a.x,u.b.x,h.left,h.right)>=Xt}if(u.vertical){const l=u.a.x;return(Math.abs(l-h.left)<1||Math.abs(l-h.right)<1)&&Wt(u.a.y,u.b.y,h.top,h.bottom)>=Xt}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const h=[u.start,u.end].filter(x=>!!x),l=[];for(const x of h){const C=e.get(x),b=C?te(C):void 0;b&&l.push(b)}return l},"endpointRectsFor"),p=d((u,h)=>{if(h+3>=u.length)return[];const l=u[h],x=u[h+1],C=u[h+2],b=u[h+3],v=Nt(l,x,et)&&Ot(x,C,et)&&Nt(C,b,et),L=Ot(l,x,et)&&Nt(x,C,et)&&Ot(C,b,et);if(!v&&!L)return[];if(!(v?Math.sign(x.x-l.x)!==Math.sign(b.x-C.x):Math.sign(x.y-l.y)!==Math.sign(b.y-C.y)))return[];const I=gt(l,b,et)||yt(l,b,et)?[]:[{x:l.x,y:b.y},{x:b.x,y:l.y}],E=I.length===0?[[...u.slice(0,h+1),...u.slice(h+3)]]:I.map(B=>[...u.slice(0,h+1),B,...u.slice(h+3)]),A=new Set;return E.map(B=>ue(xt(B))).filter(B=>{if(at(B).length!==B.length-1||!B.some(k=>ce(k,b,et)))return!1;const O=B.map(k=>`${k.x.toFixed(3)},${k.y.toFixed(3)}`).join("|");return A.has(O)?!1:(A.add(O),!0)})},"shortcutCandidatesAt"),M=d((u,h,l)=>{const x=[u.start,u.end].filter(b=>!!b),C=g(u);for(const b of at(h))if(Pt(b.a,b.b,o,x,-2)||Pt(b.a,b.b,s,[],-2)||C.some(v=>f(b,v)))return!1;for(const b of r)if(b!==u){for(const v of at(h))for(const L of at(i(b)))if(de(v,L,.5)>=Xt)return!1}return c(u,h)<=l},"candidateIsSafe");for(let u=0;u<8;u++){const h=c();let l,x,C=h,b=Number.POSITIVE_INFINITY,v=Number.POSITIVE_INFINITY;for(const L of r){const y=i(L),I=oe(y,et),E=a(y);for(let A=0;A<=y.length-4;A++)for(const B of p(y,A)){const O=oe(B,et),k=a(B);if(!(OC||P===C&&(O>b||O===b&&k>=v)||(l=L,x=B,C=P,b=O,v=k)}}if(!l||!x)return;l.points=x}}d(Ts,"shortcutRedundantOrthogonalJogs");function ws(t,e){const i=[];for(const R of e.values()){if(R.isGroup||R.isEdgeLabel)continue;const _=R.x??0,F=R.y??0,V=te(R);V&&i.push({id:String(R.id??""),cx:_,cy:F,rect:V})}if(i.length===0)return;const a=new Map(i.map(R=>[R.id,R])),c=i.map(R=>({id:R.id,rect:R.rect})),f=["top","bottom","left","right"],g={top:Math.min(...i.map(R=>R.rect.top))-20,bottom:Math.max(...i.map(R=>R.rect.bottom))+20,left:Math.min(...i.map(R=>R.rect.left))-20,right:Math.max(...i.map(R=>R.rect.right))+20},p=t.filter(R=>!R.isLayoutOnly),M=new Map(p.map((R,_)=>[R,_])),u=d(R=>{const _=R==="left"||R==="top"?-1:1,F=[];for(let V=0;V<=2;V++)F.push(g[R]+_*20*V);return F},"outwardTracksForSide"),h=d((R,_=new Map)=>xt(_.get(R)??R.points??[]),"replacementPointsFor"),l=d((R,_)=>{let F=0;for(const V of R)for(const K of _)he(V.a,V.b,K.a,K.b,et)&&F++;return F},"crossingCountBetweenSegments"),x=d((R,_)=>l(at(R),at(_)),"crossingCountBetweenPaths"),C=d((R=new Map)=>{let _=0;const F=[],V=new Set,K=[],Z=d(Y=>{V.has(Y)||(V.add(Y),K.push(Y))},"addEdge");for(let Y=0;Y0&&(_+=T,F.push({first:q,second:w,count:T}),Z(q),Z(w))}}return K.sort((Y,q)=>(M.get(Y)??0)-(M.get(q)??0)),{count:_,pairs:F,edgeSet:V,edges:K}},"crossingSnapshot"),b=d((R,_)=>{const F=new Set(_.keys());if(F.size===0)return R.count;let V=0;for(const Z of R.pairs)(F.has(Z.first)||F.has(Z.second))&&(V+=Z.count);let K=0;for(let Z=0;Z{const _=new Map;for(const K of R.pairs){const Z=_.get(K.first)??new Set;Z.add(K.second),_.set(K.first,Z);const Y=_.get(K.second)??new Set;Y.add(K.first),_.set(K.second,Y)}const F=[],V=new Set;for(const K of R.edges){if(V.has(K))continue;const Z=[K],Y=[];for(V.add(K);Z.length>0;){const q=Z.pop();Y.push(q);for(const m of _.get(q)??[])V.has(m)||(V.add(m),Z.push(m))}Y.sort((q,m)=>(M.get(q)??0)-(M.get(m)??0)),Y.length>1&&F.push(Y)}return F},"crossingComponents"),L=d(R=>[R.start,R.end].filter(_=>!!_),"endpointIdsFor"),y=d(R=>{const _=[];for(const F of v(R)){const V=new Set(F),K=new Set(F.flatMap(Y=>L(Y))),Z=[...F];for(const Y of p)V.has(Y)||L(Y).some(q=>K.has(q))&&Z.push(Y);Z.sort((Y,q)=>(M.get(Y)??0)-(M.get(q)??0)),_.push(Z)}return _},"pairSearchGroups"),I=d((R,_,F)=>b(R,new Map([[_,F]])),"crossingCountWithSingleReplacement"),E=d(R=>{const _=new Map;for(const F of R.pairs)_.set(F.first,(_.get(F.first)??0)+F.count),_.set(F.second,(_.get(F.second)??0)+F.count);return _},"currentCrossingsByEdge"),A=d(R=>R.slice(1).reduce((_,F,V)=>{const K=R[V];return _+Math.abs(F.x-K.x)+Math.abs(F.y-K.y)},0),"pathLength"),B=d((R=new Map)=>p.reduce((_,F)=>_+oe(h(F,R)),0),"totalBends"),O=d((R=new Map)=>p.reduce((_,F)=>_+A(h(F,R)),0),"totalLength"),k=d((R,_,F=new Map)=>{const V=at(_);for(const K of p)if(K!==R){for(const Z of V)for(const Y of at(h(K,F)))if(de(Z,Y,.5)>=Xt)return!0}return!1},"pathHasSegmentConflict"),H=d((R,_)=>{const F=[R.start,R.end].filter(V=>!!V);for(const V of at(_))if(Pt(V.a,V.b,c,F,-2))return!0;return!1},"pathHitsNode"),P=d((R,_)=>{const F=ue(xt(_));at(F).length===F.length-1&&R.push(F)},"pushOrthogonalCandidate"),G=d(R=>R==="left"||R==="right","sideIsHorizontal"),j=d((R,_,F)=>{switch(_){case"left":return Math.min(R.x,F.x)-20;case"right":return Math.max(R.x,F.x)+20;case"top":return Math.min(R.y,F.y)-20;case"bottom":return Math.max(R.y,F.y)+20}},"localTrackForSameSide"),tt=d((R,_,F,V)=>{const K=F==="left"||F==="top"?-1:1,Z=[j(_,F,V),g[F]];for(const Y of Z)for(let q=0;q<=2;q++)P(R,ho(_,F,V,Y+K*20*q))},"addSameSideCandidates"),ft=d((R,_,F,V,K)=>{for(const Z of u(F))for(const Y of u(K))P(R,[_,{x:Z,y:_.y},{x:Z,y:Y},{x:V.x,y:Y},V])},"addHorizontalToVerticalCandidates"),Mt=d((R,_,F,V,K)=>{for(const Z of u(F))for(const Y of u(K))P(R,[_,{x:_.x,y:Z},{x:Y,y:Z},{x:Y,y:V.y},V])},"addVerticalToHorizontalCandidates"),Ht=d((R,_,F,V,K)=>{const Z=[...u("top"),...u("bottom")];for(const Y of u(F))for(const q of u(K))for(const m of Z)P(R,[_,{x:Y,y:_.y},{x:Y,y:m},{x:q,y:m},{x:q,y:V.y},V])},"addHorizontalPairCandidates"),Ft=d((R,_,F,V,K)=>{const Z=[...u("left"),...u("right")];for(const Y of u(F))for(const q of u(K))for(const m of Z)P(R,[_,{x:_.x,y:Y},{x:m,y:Y},{x:m,y:q},{x:V.x,y:q},V])},"addVerticalPairCandidates"),nt=d(R=>{const _=new Set;return R.map(F=>xt(F)).filter(F=>{const V=F.map(K=>`${K.x.toFixed(3)},${K.y.toFixed(3)}`).join("|");return _.has(V)||F.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),J=d((R,_,F,V)=>{const K=[],Z=uo(R,_,F,V,20,et);Z&&P(K,Z),_===V&&tt(K,R,_,F);const Y=G(_),q=G(V);return Y&&!q?ft(K,R,_,F,V):!Y&&q?Mt(K,R,_,F,V):Y?Ht(K,R,_,F,V):Ft(K,R,_,F,V),nt(K)},"buildCandidatesForSides"),rt=d((R,_,F,V)=>{const K=[...u("left"),...u("right")],Z=[...u("top"),...u("bottom")];for(const Y of f){const q=Le(V,Y),m=Y==="top"||Y==="bottom"?u(Y):Z;for(const S of K){P(R,[_,F,{x:S,y:F.y},{x:S,y:q.y},q]);for(const w of m)P(R,[_,F,{x:S,y:F.y},{x:S,y:w},{x:q.x,y:w},q])}}},"addVerticalDepartureOuterTrackCandidates"),ut=d((R,_,F,V)=>{const K=[...u("left"),...u("right")],Z=[...u("top"),...u("bottom")];for(const Y of f){const q=Le(V,Y),m=Y==="left"||Y==="right"?u(Y):K;for(const S of Z){P(R,[_,F,{x:F.x,y:S},{x:q.x,y:S},q]);for(const w of m)P(R,[_,F,{x:F.x,y:S},{x:w,y:S},{x:w,y:q.y},q])}}},"addHorizontalDepartureOuterTrackCandidates"),pt=d(R=>{const _=R.start,F=R.end,V=F?a.get(F):void 0;if(!_||!V)return[];const K=xt(R.points??[]);if(K.length<4)return[];const Z=K[0],Y=K[1],q=[];return Ot(Z,Y,et)?rt(q,Z,Y,V):Nt(Z,Y,et)&&ut(q,Z,Y,V),q},"terminalPreservingOuterTrackCandidates"),St=d(R=>{const _=R.start,F=R.end,V=_?a.get(_):void 0,K=F?a.get(F):void 0;if(!V||!K)return[];const Z=[];for(const Y of f){const q=Le(V,Y);for(const m of f)Z.push(...J(q,Y,Le(K,m),m))}return Z.push(...pt(R)),Z},"candidatePathsFor"),wt=d(()=>new Map(p.map(R=>[R,at(h(R))])),"currentSegmentsByEdge"),Kt=d((R,_,F)=>{const V=new Set;for(const K of p){if(K===R)continue;const Z=F.get(K)??at(h(K));_.some(Y=>Z.some(q=>de(Y,q,.5)>=Xt))&&V.add(K)}return V},"sharedTrackConflictsFor"),qt=d((R,_,F,V)=>{const K=new Set;return St(R).map(Y=>ue(xt(Y))).filter(Y=>{if(H(R,Y))return!1;const q=Y.map(m=>`${m.x.toFixed(3)},${m.y.toFixed(3)}`).join("|");return K.has(q)||Y.length<2?!1:(K.add(q),!0)}).map(Y=>{const q=at(Y);let m=0;for(const S of p)S!==R&&(m+=l(q,F.get(S)??at(h(S))));return{candidate:Y,candidateSegments:q,crossings:_.count-(V.get(R)??0)+m,bends:oe(Y,et),totalBends:oe(Y),length:A(Y)}}).filter(({crossings:Y})=>Y<=_.count).sort((Y,q)=>Y.crossings-q.crossings||Y.bends-q.bends||Y.length-q.length).slice(0,48).map(Y=>({path:Y.candidate,segments:Y.candidateSegments,sharedTrackConflicts:Kt(R,Y.candidateSegments,F),totalBends:Y.totalBends,length:Y.length}))},"pairCandidatesFor"),Jt=d((R,_,F,V,K,Z)=>{let Y=0;for(const m of R.pairs)(m.first===_||m.second===_||m.first===V||m.second===V)&&(Y+=m.count);let q=l(F.segments,K.segments);for(const m of p){if(m===_||m===V)continue;const S=Z.get(m)??at(h(m));q+=l(F.segments,S)+l(K.segments,S)}return R.count-Y+q},"pairCrossingCount"),se=d((R,_)=>{for(const F of R.sharedTrackConflicts)if(F!==_)return!1;return!0},"conflictsOnlyWith"),Ee=d((R,_)=>R.segments.some(F=>_.segments.some(V=>de(F,V,.5)>=Xt)),"candidatesShareTrack"),me=d((R,_,F,V)=>se(_,F.edge)&&se(V,R.edge)&&!Ee(_,V),"pairCandidatesAreCompatible"),Te=d((R,_,F,V,K)=>{const Z=Jt(R.current,_.edge,F,V.edge,K,R.baseSegments);if(!(Z>=R.current.count))return{replacements:new Map([[_.edge,F.path],[V.edge,K.path]]),crossings:Z,bends:R.currentBends-(R.baseBendsByEdge.get(_.edge)??0)-(R.baseBendsByEdge.get(V.edge)??0)+F.totalBends+K.totalBends,length:R.currentLength-(R.baseLengthByEdge.get(_.edge)??0)-(R.baseLengthByEdge.get(V.edge)??0)+F.length+K.length}},"scorePairReplacement"),mn=d((R,_)=>R.crossings<_.crossings||R.crossings===_.crossings&&(R.bends<_.bends||R.bends===_.bends&&R.length<_.length),"pairScoreIsBetter"),yn=d((R,_,F,V)=>{let K=V;for(const Z of _.candidates)for(const Y of F.candidates){if(!me(_,Z,F,Y))continue;const q=Te(R,_,Z,F,Y);q&&mn(q,K)&&(K=q)}return K},"bestScoreForOptionPair"),pn=d(R=>{const _=B(),F=O(),V=wt(),K=E(R),Z=new Map(p.map(T=>[T,oe(h(T))])),Y=new Map(p.map(T=>[T,A(h(T))])),q=new Map,m=y(R);for(const T of m)for(const N of T){if(q.has(N))continue;const D=qt(N,R,V,K);D.length>0&&q.set(N,{edge:N,candidates:D})}let S={replacements:new Map,crossings:R.count,bends:_,length:F};const w={current:R,currentBends:_,currentLength:F,baseBendsByEdge:Z,baseLengthByEdge:Y,baseSegments:V};for(const T of m){const N=new Set(T.filter(W=>R.edgeSet.has(W))),D=T.map(W=>q.get(W)).filter(W=>!!W);for(let W=0;W0?S.replacements:void 0},"bestPairedReplacement");for(let R=0;R<4;R++){const _=C(),F=_.count;if(F===0)return;let V,K,Z=F,Y=Number.POSITIVE_INFINITY;for(const m of _.edges){const S=oe(h(m),et);for(const w of St(m)){const T=H(m,w),N=!T&&k(m,w),D=I(_,m,w),W=oe(w,et);T||N||!(DZ||D===Z&&W>=Y||(V=m,K=w,Z=D,Y=W)}}if(V&&K){V.points=K;continue}const q=pn(_);if(!q)return;for(const[m,S]of q)m.points=S}}d(ws,"resolveRenderedOrthogonalCrossings");var be=.001,Zr=8;function As(t,e){const{nodeInfoById:n,realNodeRects:o}=un(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(l=>l.rect.top))-r,bottom:Math.max(...o.map(l=>l.rect.bottom))+r,left:Math.min(...o.map(l=>l.rect.left))-r,right:Math.max(...o.map(l=>l.rect.right))+r},a=d((l,x,C,b)=>{const v=[],L=uo(l,x,C,b,r,be);return L&&v.push(L),x===b&&v.push(ho(l,x,C,i[x])),v},"buildOrthogonalPathCandidates"),c=d((l,x)=>{for(let C=0;C{let b=0;const v=Be(l,be),L=x.start,y=x.end;for(const I of t){if(I===x||I.isLayoutOnly)continue;const E=I.start,A=I.end;if(!C&&L&&y&&(E===L||E===y||A===L||A===y))continue;const B=I.points;if(!(!B||B.length<2))for(const O of v)for(const k of Be(B,be)){if(mo(O.a,O.b,k.a,k.b,be,be)){b++;continue}de(O,k,be)>=Zr&&b++}}return b},"pathConflictCount"),g=4,p=d((l,x)=>{const C=Math.abs(l.y-x.rect.top),b=Math.abs(l.y-x.rect.bottom),v=Math.abs(l.x-x.rect.left),L=Math.abs(l.x-x.rect.right);let y="top",I=C;return b{const b=M.get(l)??[];b.push({side:x,edgeId:C}),M.set(l,b)},"addFaceClaim");for(const l of t){if(l.isLayoutOnly)continue;const x=l.points??[];if(x.length<1)continue;const C=l.id??"",b=l.start,v=l.end;if(b){const L=n.get(b);L&&u(b,p(x[0],L),C)}if(v){const L=n.get(v);L&&u(v,p(x[x.length-1],L),C)}}const h=d((l,x,C)=>{var b;return((b=M.get(l))==null?void 0:b.some(v=>v.edgeId!==C&&v.side===x))??!1},"faceIsClaimed");for(const l of t){if(l.isLayoutOnly)continue;const x=l.points;if(!x||x.length<2)continue;const C=oe(x,be);if(C0){const Mt=f(tt,l,!0);if(Mt>O||Mt===O&&ft>=k)continue;O=Mt,k=ft,B=tt;continue}f(tt,l)>A||ftG.edgeId!==I));const P=M.get(v);P&&M.set(v,P.filter(G=>G.edgeId!==I)),u(b,p(B[0],L),I),u(v,p(B[B.length-1],y),I)}}}d(As,"simplifyDetouredEdges");var Qt=.001,Fo=10,Ke=7;function Un(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,a=r.y-s.y;if(!(Math.abs(i)+Math.abs(a)r&&en(t,Rs(r)))}d(Wn,"labelOverlapsOwnMarker");function Je(t,e){const n=[];for(const h of t){if(h.isLayoutOnly)continue;const l=h.points;if(!(!l||l.length<2))for(let x=0;x{const x=Nn(l,r);for(const{nodeId:C,rect:b}of o)if(C!==h&&en(x,b))return!0;return!1},"labelOverlapsForeignNode"),f=d((h,l)=>{const x=Nn(l,r);for(const C of n)if(C.edgeId!==h&&dn(C.p1,C.p2,x))return!0;return!1},"labelOverlapsForeignEdge"),g=d((h,l,x)=>c(h,x)||f(l,x),"labelOverlapsAnything"),p=[],M=d(h=>{for(const{id:l,rect:x}of s)if(ss(x,h))return l},"findContainingLane"),u=d((h,l)=>p.some(x=>x.labelId!==h&&en(l,x.rect)),"overlapsPlacedLabel");for(const h of t){if(h.isLayoutOnly)continue;const l=h.labelNodeId;if(!l)continue;const x=e.get(l);if(!x)continue;const C=h.points;if(!C||C.length<2)continue;const b=x.width??0,v=x.height??0;if(b<=0||v<=0)continue;const L=[];for(let nt=0;nt=Qt&&pt>=Qt||L.push({idx:nt,length:ut+pt,orientation:ut>=Qt?"horizontal":"vertical",midX:(J.x+rt.x)/2,midY:(J.y+rt.y)/2})}if(L.length===0)continue;const y=L.length>=3?L.filter(nt=>nt.idx>0&&nt.idx0?y:L,E=b>=v?"horizontal":"vertical",A=d(nt=>[...nt].sort((J,rt)=>{const ut=J.orientation===E,pt=rt.orientation===E;if(ut!==pt)return ut?-1:1;const St=J.length>=(J.orientation==="horizontal"?b:v)+2,wt=rt.length>=(rt.orientation==="horizontal"?b:v)+2;return St!==wt?St?-1:1:rt.length-J.length}),"rankSegments"),B=L[0],O=L[L.length-1],k=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((nt,J)=>{const rt=C[nt.idx],ut=C[nt.idx+1];return{midX:rt.x+(ut.x-rt.x)*J,midY:rt.y+(ut.y-rt.y)*J}},"anchorAtT"),P=d((nt,J,rt)=>Math.min(rt,Math.max(J,nt)),"clamp"),G=d((nt,J)=>nt.midX>=J.left-Qt&&nt.midX<=J.right+Qt&&nt.midY>=J.top-Qt&&nt.midY<=J.bottom+Qt,"pointInsideRectInclusive"),j=d(nt=>{const J=Pe(nt.midX,nt.midY,b,v),rt=M(J);if(rt)return{laneId:rt,anchor:nt,rect:J};const ut=s.find(({rect:se})=>G(nt,se));if(!ut)return;const pt=ut.rect.left+b/2+i,St=ut.rect.right-b/2-i,wt=ut.rect.top+v/2+i,Kt=ut.rect.bottom-v/2-i;if(pt>St||wt>Kt)return;const qt={midX:P(nt.midX,pt,St),midY:P(nt.midY,wt,Kt)},Jt=Pe(qt.midX,qt.midY,b,v);return G(nt,Jt)?{laneId:ut.id,anchor:qt,rect:Jt}:void 0},"placementForAnchor"),tt=d((nt,J,rt)=>nt.orientation==="horizontal"?Math.abs(J.midX-rt.x):Math.abs(J.midY-rt.y),"distanceAlongSegment"),ft=d((nt,J)=>{const ut=(nt.orientation==="horizontal"?b/2:v/2)+a;if(nt===B){const pt=C[nt.idx];if(tt(nt,J,pt)+Qt{const J=A(nt);for(const rt of J)for(const ut of k){const pt=H(rt,ut);if(!ft(rt,pt))continue;const St=j(pt);if(St&&!Wn(St.rect,C)&&!u(l,St.rect)&&!g(l,h.id,St.rect))return{laneId:St.laneId,anchor:St.anchor}}},"tryPool"),Ht=d((nt,J,rt=!1)=>{const ut=A(nt);for(const pt of ut){const St={midX:pt.midX,midY:pt.midY};if(J&&!ft(pt,St))continue;const wt=j(St);if(wt&&!Wn(wt.rect,C)&&!u(l,wt.rect)&&!c(l,wt.rect)&&(rt||!f(h.id,wt.rect)))return{laneId:wt.laneId,anchor:wt.anchor}}},"findLaneContainingFallback"),Ft=Mt(I)??(I.lengthrt.labelId===l);J>=0?p[J]={labelId:l,rect:nt}:p.push({labelId:l,rect:nt})}}}d(Je,"anchorLabelsToPolyline");var En=1e-6,Qr=8,Do=Qr/2,ti=3;function Kn(t,e){return t{const g=Kn(a,c);let p=0;const M=d(u=>{if(!u)return;const h=s.get(u);if(!h)return;const l=f==="x"?h.w/2:h.h/2;l>p&&(p=l)},"consider");M(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const h=u.start,l=u.end;!h||!l||Kn(h,l)===g&&M(u.labelNodeId)}return p>0?p+ti:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const a=i.points;if(!lo(a,En))continue;const c=go(i,n,En);if(!c)continue;const{srcId:f,dstId:g,srcInfo:p,dstInfo:M,collinearX:u,collinearY:h}=c;if(u===h)continue;let l,x;if(u){const y=M.cy>p.cy;l={x:p.cx,y:y?p.rect.bottom:p.rect.top},x={x:M.cx,y:y?M.rect.top:M.rect.bottom}}else{const y=M.cx>p.cx;l={x:y?p.rect.right:p.rect.left,y:p.cy},x={x:y?M.rect.left:M.rect.right,y:M.cy}}if(Pt(l,x,o,[f,g],1))continue;const b=r(i,f,g,u?"x":"y"),v=b>Do?b:Do,L=[0,v,-v];for(const y of L){const I={...l},E={...x};if(u){if(I.x+=y,E.x+=y,I.x<=p.rect.left||I.x>=p.rect.right||E.x<=M.rect.left||E.x>=M.rect.right)continue}else if(I.y+=y,E.y+=y,I.y<=p.rect.top||I.y>=p.rect.bottom||E.y<=M.rect.top||E.y>=M.rect.bottom)continue;if(!Pt(I,E,o,[f,g],1)&&!nn(I,E,t,i,{epsilon:En})){i.points=[I,E];break}}}}d(Ns,"straightenCollinearSiblingDetours");function qn(t,e){const{realNodeRects:c,labelNodeRects:f}=Me(e.values()),g=d((y,I)=>Be(I,.001).map(E=>({...E,edge:y,interior:E.index>=1&&E.index<=I.length-3})),"segmentsFor"),p=d(()=>{const y=[];for(const I of t){if(I.isLayoutOnly)continue;const E=I.points;!E||E.length<2||y.push(...g(I,xt(E)))}return y},"allSegments"),M=d((y,I)=>y.horizontal&&I.horizontal?Wt(y.a.x,y.b.x,I.a.x,I.b.x)>=8&&Math.abs(y.a.y-I.a.y)<7:y.vertical&&I.vertical?Wt(y.a.y,y.b.y,I.a.y,I.b.y)>=8&&Math.abs(y.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((y,I)=>{const E=y.start,A=y.end,B=g(y,I);if(B.length!==I.length-1)return!1;const O=[E,A].filter(H=>!!H),k=y.labelNodeId?[y.labelNodeId]:[];for(const H of B)if(Pt(H.a,H.b,c,O,-2)||Pt(H.a,H.b,f,k,-2))return!1;for(const H of t){if(H===y||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of B)for(const j of g(H,xt(P)))if(M(G,j)||he(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),h=d((y,I)=>{const E=xt(y.edge.points??[]);if(E.length<4||y.index>=E.length-1)return;const A=E.map(B=>({...B}));if(y.horizontal)A[y.index].y+=I,A[y.index+1].y+=I;else if(y.vertical)A[y.index].x+=I,A[y.index+1].x+=I;else return;return g(y.edge,A).length===A.length-1?A:void 0},"shiftedCandidate"),l=d((y,I)=>({x:y.x??(I.left+I.right)/2,y:y.y??(I.top+I.bottom)/2}),"nodeCenter"),x=d(y=>{const I=y.edge,E=xt(I.points??[]);if(E.length!==4||y.index!==1)return;const A=I.start?e.get(I.start):void 0,B=I.end?e.get(I.end):void 0,O=A?te(A):void 0,k=B?te(B):void 0,H=E.slice(y.index+2);if(!(!A||!B||!O||!k||H.length===0))return{sourceCenter:l(A,O),targetCenter:l(B,k),sourceRect:O,tail:H}},"sourceDetourContextFor"),C=d((y,I,E,A,B,O)=>{const k=A.y>=E.y,H=k?B.bottom:B.top,P=H+(k?20:-20);if(k&&y.b.y<=P+.001||!k&&y.b.y>=P-.001)return;const G=y.a.x+I;return xt([{x:E.x,y:H},{x:E.x,y:P},{x:G,y:P},{x:G,y:y.b.y},...O],.001)},"verticalSourceDetour"),b=d((y,I,E,A,B,O)=>{const k=A.x>=E.x,H=k?B.right:B.left,P=H+(k?20:-20);if(k&&y.b.x<=P+.001||!k&&y.b.x>=P-.001)return;const G=y.a.y+I;return xt([{x:H,y:E.y},{x:P,y:E.y},{x:P,y:G},{x:y.b.x,y:G},...O],.001)},"horizontalSourceDetour"),v=d((y,I)=>{const E=x(y);if(E){if(y.vertical)return C(y,I,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail);if(y.horizontal)return b(y,I,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail)}},"sourceDetourCandidate"),L=[-7,7,-2*7,2*7,-3*7,3*7];for(let y=0;y<12;y++){const I=p();let E=!1;for(let A=0;AP.interior);for(const P of H){for(const G of L){const j=h(P,G);if(j&&u(P.edge,j)){P.edge.points=j,E=!0;break}const tt=v(P,G);if(tt&&u(P.edge,tt)){P.edge.points=tt,E=!0;break}}if(E)break}}if(!E)return}}d(qn,"nudgeSharedInteriorSubpaths");function Os(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,a=o.y-n.y,c=s*a-r*i;if(Math.abs(c)<1e-10)return!1;const f=n.x-t.x,g=n.y-t.y,p=(f*a-g*i)/c,M=(f*r-g*s)/c,u=.01;return p>u&&p<1-u&&M>u&&M<1-u}d(Os,"segmentsIntersect");function Ps(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=rs(e),r=[];for(const a of n){if(a.isLayoutOnly)continue;const c=a.points;if(!c||c.length<2)continue;const f=a.start,g=a.end,p=a.labelNodeId,M=a.id??`${f}->${g}`;for(const u of s)if(!(u.nodeId===f||u.nodeId===g)&&!(p&&u.nodeId===p)){for(let h=0;h0){const a=o.filter(f=>f.type==="edge-node-overlap").length,c=o.filter(f=>f.type==="edge-edge-crossing").length;Qe.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${a} edge-node overlap(s), ${c} edge crossing(s)`);for(const f of o)Qe.warn(`[SWIMLANE_VALIDATE] ${f.type}: ${f.detail}`)}return o}d(Ps,"validateSwimlanesLayout");function Bs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!Ms(t,e)||e==="BT"&&s.length>0&&!bs(t))return;for(const a of o){if(a.isLayoutOnly)continue;const c=a.points;!c||c.length<2||(a.points=ue(on(c)))}As(o,n),Ns(o,n),Is(o,n);const r=new Map;for(const a of n)r.set(String(a.id),a);Je(o,r),fs(o,r),Ss(o,r),qn(o,r),Cs(o,r),vs(o,r),zn(o,r),Ls(o,r);const i=d(()=>{ws(o,r),Es(o,r),Ts(o,r),Je(o,r),Gn(o,r),zn(o,r),Je(o,r),Gn(o,r)},"finalizeRenderedEdges");i(),qn(o,r),i(),Vn(o,r),jn(o,r),Vn(o,r),jn(o,r)}d(Bs,"postProcessSwimlaneLayout");function Ie(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(Ie,"normalizeGraph");function Mo(t,e){return t.edges.filter(n=>n.dst===e)}d(Mo,"incoming");function ks(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(ks,"buildSuccessorMap");function Io(t){const e=ks(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(Io,"buildSortedSuccessorMap");function So(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(So,"buildInDegreeMap");function Co(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(Co,"sortedZeroInDegreeNodes");function hn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(hn,"buildPredecessorSuccessorMaps");function vo(t,e,n,o){var i,a;let s=0;for(const c of t.nodes)o!=null&&o.skipGroups&&((i=t.nodeById.get(c))!=null&&i.isGroup)||(s=Math.max(s,n[c]??0));const r=Array.from({length:s+1},()=>[]);for(const c of e)o!=null&&o.skipGroups&&((a=t.nodeById.get(c))!=null&&a.isGroup)||r[Math.max(0,n[c]??0)].push(c);return r}d(vo,"buildLayersFromRanks");function De(t){const e=So(t),n=Co(e),o=[],s=Io(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let a=0;for(;a{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),a=o,c=r,f=o;for(;a=s||ap.dst===M.dst?p.id.localeCompare(M.id):p.dst.localeCompare(M.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const p of n.get(g)??[]){const M=p.dst;o[M]===0?r(M):o[M]===1&&s.push(p)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,p)=>g.localeCompare(p));for(const g of i)o[g]===0&&r(g);const a=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),c=e.edges.map(g=>a.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:c,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(_s,"removeCycles_DFS");function Fs(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const a=n(r)??r;return e.set(o,a),a},"resolve");for(const o of t.nodes)n(o);return e}d(Fs,"buildTopLaneMap");function ge(t){const e=Fs(t);return n=>e.get(n)??null}d(ge,"createTopLaneResolver");function gn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(gn,"buildTopLaneOrder");function Eo(t,e){const n=gn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(Eo,"resolveTopLaneOrder");var ei={EPSILON:1e-6},ln={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Ho={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Ds(t,e){const n=Ie(t),o=(e==null?void 0:e.laneOf)??(()=>null),s=e==null?void 0:e.rankHint,{preds:r}=hn(n);for(const y of r.values())y.sort((I,E)=>I.localeCompare(E));const i=De(n)??[...n.nodes].sort((y,I)=>y.localeCompare(I)),a=new Map;for(const[y,I]of i.entries())a.set(I,y);const c=new Map,f=new Map;for(const y of n.nodes)f.set(y,[]);for(const y of i){const I=(r.get(y)??[]).filter(E=>c.has(E));if(I.length>0){const E=Hs(y,I,{laneOf:o,rankHint:s,topoIndex:a});c.set(y,E),f.get(E).push(y)}else c.has(y)||c.set(y,null)}for(const y of n.nodes)c.has(y)||c.set(y,null);const g=new Set;for(const y of n.nodes)(c.get(y)??null)===null&&g.add(y);const p=[...g].sort((y,I)=>{const E=a.get(y)??0,A=a.get(I)??0;return E===A?y.localeCompare(I):E-A}),M=Xs(n),u=new Map;for(const[y,I]of M.entries())u.set(y,[...I].sort((E,A)=>E.localeCompare(A)));const h=Ys(u),l=Gs(u),x=new Map;for(const y of n.nodes)x.set(y,[]);for(const y of l)for(const I of y.nodes){const E=x.get(I);E?E.push(y.id):x.set(I,[y.id])}const C=[],b=[],v=new Set,L=d(y=>{if(!v.has(y)){v.add(y),C.push(y);for(const I of f.get(y)??[])L(I);b.push(y)}},"walk");for(const y of p)L(y);for(const y of i)L(y);return{parent:c,children:f,roots:p,componentOf:h,blocks:l,nodeBlocks:x,adjacency:u,preorder:C,postorder:b,topologicalOrder:i}}d(Ds,"buildDrivingTree");function Hs(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{var l,x;const a=n.laneOf(r),c=n.laneOf(i),f=a!=null&&a===o,g=c!=null&&c===o;if(f!==g)return f?-1:1;const p=(l=n.rankHint)==null?void 0:l[r],M=(x=n.rankHint)==null?void 0:x[i];if(p!=null&&M!=null&&p!==M)return M-p;const u=n.topoIndex.get(r)??0,h=n.topoIndex.get(i)??0;return u!==h?u-h:r.localeCompare(i)})[0]}d(Hs,"chooseParent");function Xs(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Xs,"buildAdjacency");function Ys(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Ys,"assignComponents");function Gs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((a,c)=>{e.set(a,++r),n.set(a,r);for(const f of t.get(a)??[])f!==c&&(e.has(f)?(e.get(f)??0)<(e.get(a)??0)&&(o.push([a,f]),n.set(a,Math.min(n.get(a)??r,e.get(f)??r))):(o.push([a,f]),i(f,a),n.set(a,Math.min(n.get(a)??r,n.get(f)??r)),(n.get(f)??0)>=(e.get(a)??0)&&s.push($s(a,f,o,s.length))))},"visit");for(const a of t.keys())e.has(a)||i(a,null);return s}d(Gs,"computeBlocks");function $s(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d($s,"popBlock");function zs(t,e,n){const o=[...t.nodes],s=new Map;for(const[b,v]of o.entries())s.set(v,b);const r=o.length,i=new Array(r).fill(-1),a=new Array(r).fill(0),c=[],f=new Set;for(const b of o){const v=n.parent.get(b)??null,L=s.get(b);L!=null&&v==null&&(i[L]=-1,a[L]=0,f.has(b)||(f.add(b),c.push(b)))}for(;c.length>0;){const b=c.shift(),v=s.get(b);if(v==null)continue;const L=n.children.get(b)??[];for(const y of L){if(f.has(y))continue;const I=s.get(y);I!=null&&(i[I]=v,a[I]=a[v]+1,f.add(y),c.push(y))}}for(const b of o){if(f.has(b))continue;const v=s.get(b);v!=null&&(i[v]=-1,a[v]=0,f.add(b))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),p=Array.from({length:g},()=>new Array(r).fill(-1));for(let b=0;b{if(b===-1||v===-1)return-1;a[b]>y&1&&(b=p[y][b],b===-1))return-1;if(b===v)return b;for(let y=g-1;y>=0;y--){const I=p[y][b],E=p[y][v];I===-1||E===-1||I!==E&&(b=I,v=E)}return p[0][b]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const b of t.edges){let v=b.src,L=b.dst,y=e[v],I=e[L];if(y==null||I==null||(y>I&&([v,L]=[L,v],[y,I]=[I,y]),y==null||I==null||y===I))continue;const E=s.get(v),A=s.get(L);if(E==null||A==null)continue;const B=M(E,A);if(B===-1)continue;const O=u[B];for(let k=y;k{if(v.size!==0)for(const[L,y]of v)b.set(L,(b.get(L)??0)+y)},"mergeInto"),x=new Set,C=d(b=>{const v=s.get(b);x.add(b);const L=v==null?void 0:u[v],y=L?new Map(L):new Map,I=n.children.get(b)??[];for(const E of I){const A=C(E),B=e[b];if(B!=null){let O=h.get(b);O||(O=new Map,h.set(b,O));let k=A.get(B)??0;const H=e[E];H!=null&&H>B&&(k+=1),O.set(E,k)}l(y,A)}return y},"dfs");for(const b of n.roots)x.has(b)||C(b);for(const b of o)x.has(b)||C(b);return h}d(zs,"computeSubtreeCrossCounts");function Vs(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const a=[...e.get(r)??[]];a.sort(To(n));for(const c of a){s(c);const f=o.get(c);f!=null&&(i=Math.min(i,f))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Vs,"annotateMinimumLayers");function To(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(To,"compareByRankThenId");function js(t,e,n,o){let s=0;for(const c of e){const f=n[c]??0;f>s&&(s=f)}const r=Array.from({length:s+1},()=>[]),i=new Set,a=d(c=>{if(i.has(c))return;i.add(c);const f=n[c]??0;r[f]||(r[f]=[]),r[f].push(c);for(const g of o(c))a(g)},"emit");for(const c of t)a(c);for(const c of e)if(!i.has(c)){const f=n[c]??0;r[f]||(r[f]=[]),r[f].push(c),i.add(c)}return r}d(js,"emitNodesInTreeOrder");function Us(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Us,"deduplicateLayers");function Ws(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,a=[],c=[],f=n.get(s);for(const g of r){const p=o.get(g)??i;p>i?a.push({child:g,min:p}):c.push(g)}return a.sort((g,p)=>g.min===p.min?g.child.localeCompare(p.child):g.min-p.min),c.sort((g,p)=>{const M=(f==null?void 0:f.get(g))??0,u=(f==null?void 0:f.get(p))??0;if(M!==u)return M-u;const h=o.get(g)??i,l=o.get(p)??i;return h!==l?h-l:g.localeCompare(p)}),[...a.map(g=>g.child),...c]}}d(Ws,"createChildOrderer");function fn(t,e,n){const o=Ds(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const p of t.nodes)s.has(p)||s.set(p,[]);const i=zs(t,e,o),a=[...r].sort(To(e)),c=Vs(a,s,e),f=Ws(s,e,i,c);let g=js(a,t.nodes,e,f);return g=Us(g),g}d(fn,"buildMultitreeLayerOrder");function Ks(t,e,n){const o=new Set(t),s=new Set(e),r=ke(e),i=[];for(const a of n)o.has(a.src)&&s.has(a.dst)&&i.push(r.get(a.dst));return Lo(i)}d(Ks,"countCrossingsBetweenAdjacent");function Jn(t,e,n){const o=[];for(const r of e){const i=n[r.src],a=n[r.dst];if(i==null||a==null||i===a)continue;let c=r.src,f=r.dst,g=i,p=a;i>a&&(c=r.dst,f=r.src,g=a,p=i);for(let M=g;M(n[M]??0)-(n[p]??0));for(const p of g){const M=n[p]??0;if(M===0)continue;let u=0;for(const C of o.get(p)??[])u=Math.max(u,(n[C]??0)+1);if(u>=M)continue;const h=M;n[p]=u;const l=fn(t,n,s),x=Jn(l,t.edges,n);x(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(l=>l.src===s);if(i.length===0)continue;let a=!1,c=0;for(const l of i){const x=n(l.dst);x==null||x===r?a=!0:c++}if(c===0||a)continue;let f=0,g=!1;for(const l of t.edges){if(l.dst!==s)continue;const x=n(l.src);x&&(x===r?g=!0:f++)}if(f>0||!g)continue;const p=e[s]??0,M=p+c;let u=0;for(const l of t.edges)l.dst===s&&(u=Math.max(u,(e[l.src]??0)+1));const h=Math.max(p,u,M);h!==p&&(e[s]=h)}}d(Js,"adjustCrossLaneSources");function Zs(t,e){const n=Ie(t),o=De(n)??[...n.nodes].sort(),s=(e==null?void 0:e.compactSingleInput)??!1,r=ge(n);let i=Object.create(null);for(const c of o){const f=Mo(n,c),g=e!=null&&e.ignoreCrossLaneEdges?f.filter(p=>{const M=r(p.src),u=r(c);return!M||!u?!0:M===u}):f;if(g.length===0)i[c]=0;else if(s&&g.length===1){const p=g[0].src,M=r(p),u=r(c);M!==u?i[c]=i[p]??0:i[c]=(i[p]??0)+1}else{let p=-1/0;for(const M of g)p=Math.max(p,(i[M.src]??0)+1);i[c]=p===-1/0?0:p}}return((e==null?void 0:e.optimizeRanksByCrossings)??!1)&&(i=qs(n,i)),e!=null&&e.ignoreCrossLaneEdges&&Js(n,i),{layers:fn(n,i,r),rankOf:i,dummy:new Set}}d(Zs,"assignLayers_LongestPath");function Qs(t,e){const n=Ie(t),s={...Zs(n,{compactSingleInput:e==null?void 0:e.compactSingleInput,ignoreCrossLaneEdges:e==null?void 0:e.ignoreCrossLaneEdges,optimizeRanksByCrossings:e==null?void 0:e.optimizeRanksByCrossings}).rankOf},r=ge(n),{preds:i,succs:a}=hn(n,h=>{if(e!=null&&e.ignoreCrossLaneEdges){const l=r(h.src),x=r(h.dst);if(l&&x&&l!==x)return!1}return!0}),c=De(n)??[...n.nodes],f=[...c].reverse(),g=d((h,l)=>{let x=0;for(const v of i.get(h)??[])x=Math.max(x,(s[v]??0)+1);let C=Number.POSITIVE_INFINITY;const b=a.get(h)??[];return b.length>0&&(C=Math.min(...b.map(v=>(s[v]??0)-1))),Number.isFinite(C)||(C=Math.max(x,l)),Math.min(Math.max(l,x),C)},"clampFeasible"),p=ln.GRAVITY_ITERATIONS,M=d(h=>{let l=!1;for(const x of h){const C=i.get(x)??[],b=a.get(x)??[];if(C.length===0&&b.length===0)continue;const v=C.length>0?C.reduce((E,A)=>E+(s[A]??0)+1,0)/C.length:s[x]??0,L=b.length>0?b.reduce((E,A)=>E+(s[A]??0)-1,0)/b.length:s[x]??0,y=Math.round((v+L)/2),I=g(x,y);I!==s[x]&&(s[x]=I,l=!0)}return l},"relaxOrder");for(let h=0;h0){const x=Math.min(...l.map(C=>(s[C]??0)-1));(s[h]??0)>x&&(s[h]=x)}}return{layers:vo(n,c,s),rankOf:s,dummy:new Set}}d(Qs,"assignLayers_Gravity");function tr(t){const e=So(t),n=Io(t);let o=Co(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const a of n.get(i)??[])e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0&&r.push(a)}o=r.sort((i,a)=>i.localeCompare(a))}return s.length===t.nodes.length?s:null}d(tr,"topoSortByGenerationIfAcyclic");function er(t,e){const n=Ie(t),o=(e==null?void 0:e.direction)==="LR"?tr(n)??[...n.nodes].sort():De(n)??[...n.nodes].sort(),s=ge(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),a=new Map,c=d((g,p)=>(e==null?void 0:e.ignoreCrossLaneEdges)??!0?r(g)===r(p)?1:0:1,"edgeWeight");for(const g of o){const p=n.nodeById.get(g);if(p!=null&&p.isGroup)continue;const M=Mo(n,g);let u=0;if(M.length>0)for(const C of M){const b=C.src,v=i[b]??0;u=Math.max(u,v+c(b,g))}const h=r(g),l=a.get(h)??0,x=Math.max(u,l);i[g]=x,a.set(h,x+1)}return{layers:vo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(er,"assignLayers_LaneAwareCompact");function nr(t,e){const n=Ie(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const a=new Map(n.nodeById),c=d(u=>{const h=`placeholder-${i++}`,l={id:h,isGroup:!1,isDummy:!0,width:0,height:0};for(a.set(h,l),r.add(h);s.length<=u;)s.push([]);return s[u].push(h),o[h]=u,h},"addDummyAt"),f=[...n.edges].sort((u,h)=>u.id===h.id?u.src===h.src?u.dst.localeCompare(h.dst):u.src.localeCompare(h.src):u.id.localeCompare(h.id)),g=[];for(const u of f){const h=o[u.src]??0,l=o[u.dst]??0;if(l-h<=1){g.push(u);continue}let x=u.src;for(let b=h+1,v=0;b!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:a};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:M}}d(nr,"makeProperLayering");function Zn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Zn,"median");function Qn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Qn,"barycenter");function or(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(or,"neighborPositionsFor");function sr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(sr,"currentOrderTieBreak");function to(t,e,n){const o=new Set(t),s=new Set(e),r=ke(t),i=ke(e),a=[];for(const f of n)o.has(f.src)&&s.has(f.dst)&&a.push({u:r.get(f.src),v:i.get(f.dst)});a.sort((f,g)=>f.u===g.u?f.v-g.v:f.u-g.u);const c=a.map(f=>f.v);return Lo(c)}d(to,"countCrossingsBetweenAdjacent");function Ze(t,e,n){return[...t].sort((o,s)=>{const r=Zn(e.get(o)??[]),i=Zn(e.get(s)??[]);return r===i?sr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(Ze,"sortByHeuristic");function eo(t,e,n,o,s,r){const i=ke(t),a=ke(e),c=or(e,i,n,o);if(!s||!r||r.length===0)return Ze(e,c,a);const f=new Map;for(const M of e){const u=s(M),h=f.get(u)??[];h.push(M),f.set(u,h)}const g=[];for(const M of r){const u=f.get(M);if(!u||u.length===0)continue;const h=Ze(u,c,a);g.push(...h)}const p=f.get(null);if(p&&p.length>0){const M=Ze(p,c,a);for(const u of M){const h=Qn(c.get(u)??[]);let l=g.length;if(isFinite(h))for(const[x,C]of g.entries()){const b=Qn(c.get(C)??[]);if(hi.has(l.src)&&a.has(l.dst)),g=c?n.filter(l=>a.has(l.src)&&c.has(l.dst)):void 0,p=d(l=>{let x=to(t,l,f);return g&&o&&(x+=to(l,o,g)),x},"crossingScore"),M=s?new Map:null;if(s&&M)for(const l of e)M.set(l,s(l));let u=!0,h=p(r);for(;u;){u=!1;for(let l=0;l+1[...a]),s=e.edges,r=ge(e),i=Eo(e,n==null?void 0:n.laneOrder);for(let a=0;a<3;a++){for(let c=1;c=0;c--)o[c]=eo(o[c+1],o[c],s,"up",r,i),o[c]=no(o[c+1],o[c],s,o[c-1],r)}return{layers:o}}d(rr,"orderLayers");function ir(t,e,n){const o=(n==null?void 0:n.layerGap)??Ho.DEFAULT_LAYER_GAP,s=(n==null?void 0:n.nodeGap)??Ho.DEFAULT_NODE_GAP,r=(n==null?void 0:n.laneGap)??s*2,i=(n==null?void 0:n.direction)??"TB",a=i==="LR"||i==="RL",c=t.layers,f=Object.create(null),g=Object.create(null),p=d(O=>e.nodeById.get(O),"getNode"),M=d(O=>{var k;return((k=p(O))==null?void 0:k.width)??0},"getWidth"),u=d(O=>{var k;return((k=p(O))==null?void 0:k.height)??0},"getHeight"),h=ge(e),l=Eo(e,n==null?void 0:n.laneOrder),x=c.map(O=>O.reduce((k,H)=>Math.max(k,u(H)),0)),C=[];if(a)for(let O=0;O+1Math.max(Mt,M(Ht)),0),H=c[O+1].reduce((Mt,Ht)=>Math.max(Mt,M(Ht)),0),P=x[O],G=x[O+1],j=P/2+G/2,tt=(k+H)/2,ft=Math.max(0,tt-j-o);C.push(ft)}const b=new Set;for(const O of c)for(const k of O)b.add(h(k));const v=b.has(null),L=l.filter(O=>b.has(O)),y=[...v?[null]:[],...L],I=Object.create(null);for(const O of L)I[O]=0;v&&(I.null=0);for(const O of c){const k=Object.create(null),H=[];for(const P of O){const G=h(P);G===null?H.push(P):(k[G]||(k[G]=[])).push(P)}for(const[P,G]of Object.entries(k)){const j=G.reduce((tt,ft)=>tt+M(ft),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(v&&H.length){const P=H.reduce((G,j)=>G+M(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const E=new Map;{const O=y.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,y.length-1))/2;for(let P=0;PM(nt)),Ht=Mt.reduce((nt,J)=>nt+J,0)+s*(tt.length-1);let Ft=ft-Ht/2;for(const[nt,J]of tt.entries()){const rt=Mt[nt];f[J]=Ft+rt/2,g[J]=A+H/2,Ft+=rt+s}}}const G=C[O]??0;A+=H+o+G}const B=new Map;for(const O of e.edges){const k=O.ref.id;B.has(k)||B.set(k,[]),B.get(k).push(O)}for(const[,O]of B){if(O.length===0)continue;const k=O[0].ref,H=k.start,P=k.end;if(H==null||P==null)continue;const G=Math.round(((f[H]??0)+(f[P]??0))/2),j=new Set;for(const tt of O)j.add(tt.src),j.add(tt.dst);for(const tt of j){if(tt===H||tt===P)continue;const ft=e.nodeById.get(tt);ft!=null&&ft.isDummy&&(f[tt]=G)}}return{x:f,y:g}}d(ir,"assignCoordinates");var cr=8;function ar(t){let e=2166136261;for(let n=0;n>>0}d(ar,"hashString");function lr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(lr,"mulberry32");function fr(t,e){const n=[...t],o=lr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(fr,"deterministicShuffle");function dr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(dr,"sourceDistance");function oo(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const a=n.get(s),c=n.get(r);a==null||c==null||(o+=i*Math.abs(a-c))}return o}d(oo,"laneArrangementCost");function ur(t){const e=gn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=ge(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,a=typeof r.end=="string"?r.end:void 0;if(!i||!a||!t.nodeById.has(i)||!t.nodeById.has(a))continue;const c=o(i),f=o(a);if(!c||!f||c===f)continue;const g=n.get(c),p=n.get(f);if(g==null||p==null)continue;const[M,u]=g<=p?[c,f]:[f,c],h=`${M}\0${u}`,l=s.get(h);l?l.weight++:s.set(h,{a:M,b:u,weight:1})}return[...s.values()]}d(ur,"buildWeightedLaneEdges");function so(t,e,n){const o=[...t];let s=oo(o,e),r=!0,i=0;const a=Math.max(1,o.length);for(;r&&is.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return ar(`${t.join("|")}#${o}#${n}`)}d(gr,"seedForRestart");function mr(t,e={}){const n=gn(t);if(n.length<2)return n;const o=ur(t);if(o.length===0)return n;const s=new Map(n.map((a,c)=>[a,c]));let r=so(n,o,s);const i=Math.max(0,e.restarts??cr);for(let a=0;alt&&c*3>=a?i>0?"bottom":"top":a>lt?r>0?"right":"left":n}d(ro,"chooseOrthogonalSide");function io(t,e){return Math.abs(t.to-e.from)m.isGroup&&!m.parentId);for(const m of f){const S={id:m.id},w=d(T=>{i.set(T.id,S),n.filter(N=>N.parentId===T.id).forEach(w)},"assignLane");w(m)}const g=n.filter(m=>!m.isGroup&&!m.isEdgeLabel).map(m=>{const S=m.width??10,w=m.height??10,T=m.x??0,N=m.y??0,D=ni;return{nodeId:m.id,minX:T-S/2-D,maxX:T+S/2+D,minY:N-w/2-D,maxY:N+w/2+D,visualXHalfExtent:c?w/2+D:S/2+D}}),p=d((m,S,w,T)=>{let N=a.find(D=>D.orientation===m&&Math.abs(D.coord-S)<1);return N||(N={id:`pipe-${m}-${S.toFixed(0)}`,orientation:m,coord:S,spanMin:w,spanMax:T,tracks:[]},a.push(N)),N.spanMin=Math.min(N.spanMin,w),N.spanMax=Math.max(N.spanMax,T),N},"getOrAddPipe"),M=d((m,S)=>{const w=m.width??10,T=m.height??10,N=m.x??0,D=m.y??0;switch(S){case"top":return{x:N,y:D-T/2};case"bottom":return{x:N,y:D+T/2};case"left":return{x:N-w/2,y:D};case"right":return{x:N+w/2,y:D}}},"portForSide"),u=d((m,S,w)=>M(m,ro(m,S,w?"bottom":"top")),"getOrthogonalPort"),h=[],l=[],x=new Set,C=1e3,b=d((m,S,w)=>{if(h.length===0)return 0;const T=Math.abs(S.y-w.y)U||z.from-lt<=W&&z.to+lt>=W&&(D+=C)}else if(N){const W=S.x,ot=Math.min(S.y,w.y)-lt,U=Math.max(S.y,w.y)+lt;if(U<=ot)return 0;for(const z of h)z.edgeIndex===m||z.orientation!=="horizontal"||z.pipe.coordU||z.from-lt<=W&&z.to+lt>=W&&(D+=C)}return D},"crossingPenalty"),v=s.map((m,S)=>{if(!m.start||!m.end)return{idx:S,crossLane:0,dx:0,dy:0};const w=r.get(m.start),T=r.get(m.end),N=i.get(m.start),D=i.get(m.end),W=N&&D&&N.id!==D.id?1:0,ot=w&&T?Math.abs((T.x??0)-(w.x??0)):0,U=w&&T?Math.abs((T.y??0)-(w.y??0)):0;return{idx:S,crossLane:W,dx:ot,dy:U}}).sort((m,S)=>{if(m.crossLane!==S.crossLane)return S.crossLane-m.crossLane;const w=m.dx+m.dy,T=S.dx+S.dy;return Math.abs(w-T)>1?w-T:m.idx-S.idx}).map(m=>m.idx),L=d((m,S,w,T)=>{const N=Math.min(m.x,S.x),D=Math.max(m.x,S.x),W=Math.min(m.y,S.y),ot=Math.max(m.y,S.y);return!!g.find(z=>w&&z.nodeId===w||T&&z.nodeId===T?!1:Math.abs(m.x-S.x)>lt?z.minYm.y&&z.maxX>N&&z.minXm.x&&z.maxY>W&&z.minYro(m,S,"bottom"),"determineSide"),A=new Map;for(const[m,S]of s.entries()){if(!S.start||!S.end||S.start===S.end||S.points&&S.points.length>0)continue;const w=r.get(S.start),T=r.get(S.end);if(!w||!T)continue;const N=(T.x??0)-(w.x??0),D=(T.y??0)-(w.y??0);A.set(m,{edgeIdx:m,srcId:S.start,dstId:S.end,srcSide:E(w,{x:T.x??0,y:T.y??0}),dstSide:E(T,{x:w.x??0,y:w.y??0}),absDx:Math.abs(N),absDy:Math.abs(D),dxSign:Math.sign(N),dySign:Math.sign(D)})}const B=d(m=>m.srcSide==="top"||m.srcSide==="bottom"?m.absDx===0?1/0:m.absDy/m.absDx:m.absDy===0?1/0:m.absDx/m.absDy,"preferenceStrength"),O=d(m=>m.srcSide==="top"||m.srcSide==="bottom"?m.dxSign>=0?"right":"left":m.dySign>=0?"bottom":"top","secondarySide"),k=new Map;for(const m of A.values()){const S=`${m.srcId}:${m.srcSide}`;k.has(S)||k.set(S,[]),k.get(S).push(m)}const H=new Map,P=d((m,S)=>`${m}:${S}`,"loadKey");for(const m of A.values())H.set(P(m.srcId,m.srcSide),(H.get(P(m.srcId,m.srcSide))??0)+1),H.set(P(m.dstId,m.dstSide),(H.get(P(m.dstId,m.dstSide))??0)+1);for(const m of k.values())if(!(m.length<2)){m.sort((S,w)=>{const T=B(S),N=B(w);return Math.abs(T-N)>1e-9?N-T:S.edgeIdx-w.edgeIdx});for(let S=1;S=N||(H.set(P(w.srcId,w.srcSide),N-1),H.set(P(w.srcId,T),D+1),w.srcSide=T)}}const G=d(m=>{const S=m==null?void 0:m.shape;return S==="question"||S==="diamond"},"isDiamondNode"),j=new Map;for(const m of A.values())j.has(m.dstId)||j.set(m.dstId,new Set),j.get(m.dstId).add(m.dstSide);for(const m of A.values()){if(!G(r.get(m.srcId)))continue;const S=j.get(m.srcId);if(!(S!=null&&S.has(m.srcSide)))continue;const w=O(m);if(S.has(w)||(H.get(P(m.srcId,w))??0)>0)continue;const T=H.get(P(m.srcId,m.srcSide))??0;H.set(P(m.srcId,m.srcSide),Math.max(0,T-1)),H.set(P(m.srcId,w),1),m.srcSide=w}for(const m of A.values()){const{edgeIdx:S,srcId:w,dstId:T,srcSide:N,dstSide:D}=m,W=r.get(w),ot=r.get(T),U=`${w}:${N}:src`,z=N==="top"||N==="bottom"?ot.x??0:ot.y??0;y.has(U)||y.set(U,[]),y.get(U).push({edgeIdx:S,oppositeCoord:z});const bt=`${T}:${D}:dst`,dt=D==="top"||D==="bottom"?W.x??0:W.y??0;y.has(bt)||y.set(bt,[]),y.get(bt).push({edgeIdx:S,oppositeCoord:dt})}const tt=new Map,ft=8;for(const[m,S]of y){if(S.length<2)continue;S.sort((At,Gt)=>At.oppositeCoord-Gt.oppositeCoord);const w=m.split(":"),T=w.slice(0,-2).join(":"),N=w[w.length-2],D=w[w.length-1],W=r.get(T);if(!W)continue;const U=N==="left"||N==="right"?W.height??10:W.width??10,z=W.shape,dt=z==="question"||z==="diamond"?U*.3:U,st=Math.min(20,Math.max(ft,dt/(S.length+1))),Bt=-(st*(S.length-1))/2;for(const[At,Gt]of S.entries()){const ee=Bt+At*st,xn=`${Gt.edgeIdx}:${D}`;tt.set(xn,ee)}}const Mt=d(m=>{var S;return!!((S=s[m])!=null&&S.labelNodeId)},"edgeHasLabelNode"),Ht=d((m,S)=>m?(y.get(`${m}:${S}:src`)??[]).some(({edgeIdx:w})=>Mt(w))||(y.get(`${m}:${S}:dst`)??[]).some(({edgeIdx:w})=>Mt(w)):!1,"faceHasLabelNode"),Ft=d((m,S,w)=>S==="top"||S==="bottom"?{x:m.x+w,y:m.y}:{x:m.x,y:m.y+w},"applyPortOffset"),nt=d((m,S,w)=>{const T=A.get(m),N={x:w.x??0,y:w.y??0},D={x:S.x??0,y:S.y??0},W=(T==null?void 0:T.srcSide)??E(S,N),ot=(T==null?void 0:T.dstSide)??E(w,D);let U=T?M(S,T.srcSide):u(S,N,!0),z=T?M(w,T.dstSide):u(w,D,!1);const bt=tt.get(`${m}:src`),dt=tt.get(`${m}:dst`);return bt!==void 0&&(U=Ft(U,W,bt)),dt!==void 0&&(z=Ft(z,ot,dt)),{pSrcPort:U,pDstPort:z,srcSide:W,dstSide:ot}},"portsForEdge");for(const m of v){const S=s[m];if(l[m]=[],!S.start||!S.end||S.points&&S.points.length>0||S.start===S.end)continue;const w=r.get(S.start),T=r.get(S.end);if(!w||!T)continue;const{pSrcPort:N,pDstPort:D,srcSide:W,dstSide:ot}=nt(m,w,T),U={...N},z={...D},bt=W==="top"||W==="bottom",dt=ot==="top"||ot==="bottom";if(bt){const X=N.y>(w.y??0);U.y=X?N.y+ie:N.y-ie}else{const X=N.x>(w.x??0);U.x=X?N.x+ie:N.x-ie}if(dt){const X=D.y>(T.y??0);z.y=X?D.y+ie:D.y-ie}else{const X=D.x>(T.x??0);z.x=X?D.x+ie:D.x-ie}const ct=d((X,$)=>{for(const Q of g)if(!$.includes(Q.nodeId)&&X.x>Q.minX&&X.xQ.minY&&X.y{if(Tt){const kt=X.y>($.y??0);return{x:(Q.x??0)>=X.x?ht.maxX+Ce:ht.minX-Ce,y:kt?ht.maxY+Ne:ht.minY-Ne,leavesPositiveSide:kt}}const Ct=X.x>($.x??0),Rt=(Q.y??0)>=X.y;return{x:Ct?ht.maxX+Ce:ht.minX-Ce,y:Rt?ht.maxY+Ne:ht.minY-Ne,leavesPositiveSide:Ct}},"obstacleDetour");let It=[];const Bt=[S.start,S.end],At=ct(U,Bt);if(At.inside&&At.obstacle){const X=At.obstacle;if(bt){const $=st(N,w,T,X,!0);U.x=$.x,U.y=$.y;const Q=$.leavesPositiveSide?Math.min(X.minY-2,N.y+ie):Math.max(X.maxY+2,N.y-ie);It=[{x:N.x,y:Q},{x:$.x,y:Q},{x:$.x,y:$.y}]}else{const $=st(N,w,T,X,!1),Q=$.leavesPositiveSide?Math.min(X.minX-2,N.x+ie):Math.max(X.maxX+2,N.x-ie);U.x=$.x,U.y=$.y,It=[{x:Q,y:N.y},{x:Q,y:$.y},{x:$.x,y:$.y}]}}let Gt=[];const ee=ct(z,Bt);if(ee.inside&&ee.obstacle){const X=ee.obstacle;if(dt){const $=st(D,T,w,X,!0);z.x=$.x,z.y=$.y,Gt=[{x:$.x,y:$.y},{x:D.x,y:$.y}]}else{const $=st(D,T,w,X,!1);z.x=$.x,z.y=$.y,Gt=[{x:$.x,y:$.y},{x:$.x,y:D.y}]}}if(It.length===0&&Gt.length===0){const X=Ce,$=Math.abs(U.x-z.x)1||Ct>1,kt=I.get(S.start??"")??0,mt=I.get(S.end??"")??0,Vt=Tt>1&&Ht(S.start,W)||Ct>1&&Ht(S.end,ot),re=Tt<=1||kt<=2,Dt=Ct<=1||mt<=2;if(($||Q)&&!ht&&(!Rt||Rt&&!Vt&&re&&Dt)&&!L(N,D,S.start,S.end)){S.points=[{...N},{...U},{...z},{...D}],x.add(m);const vt=Q?"horizontal":"vertical",Ut=Q?N.y:N.x,Lt=Q?Math.min(N.x,D.x):Math.min(N.y,D.y),Et=Q?Math.max(N.x,D.x):Math.max(N.y,D.y),Zt={id:`fast-path-${vt}-${Ut.toFixed(0)}-${m}`,orientation:vt,coord:Ut,spanMin:Lt,spanMax:Et,tracks:[]};h.push({edgeIndex:m,segmentIndex:0,orientation:vt,pipe:Zt,trackIndex:0,from:Lt,to:Et});continue}}const xn=p("vertical",U.x,U.y,U.y);U.x=xn.coord;const Mr=p("vertical",z.x,z.y,z.y);z.x=Mr.coord;let ye=Math.min(U.x,z.x)-50,pe=Math.max(U.x,z.x)+50,we=Math.min(U.y,z.y)-50,Ae=Math.max(U.y,z.y)+50;for(const X of g){const $=Math.min(U.x,z.x),Q=Math.max(U.x,z.x),ht=Math.min(U.y,z.y),Tt=Math.max(U.y,z.y);X.minX$&&X.minYht&&(ye=Math.min(ye,X.minX-qe),pe=Math.max(pe,X.maxX+qe),we=Math.min(we,X.minY-qe),Ae=Math.max(Ae,X.maxY+qe))}for(const X of g){if(X.maxXpe||X.maxYAe)continue;const $=Ce;p("horizontal",X.minY-$,ye,pe),p("horizontal",X.maxY+$,ye,pe);const Q=Ne;p("vertical",X.minX-Q,we,Ae),p("vertical",X.maxX+Q,we,Ae)}p("horizontal",U.y,ye,pe),p("horizontal",z.y,ye,pe);const Ir=a.filter(X=>X.orientation==="horizontal"&&X.coord>=we&&X.coord<=Ae),Sr=a.filter(X=>X.orientation==="vertical"&&X.coord>=ye&&X.coord<=pe),He=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),Xe=He(U.x,U.y),wo=He(z.x,z.y),Ye=new Map,bn=new Map,Mn=new Map,Ge=new Set,Se=[];Ye.set(Xe,0),Mn.set(Xe,"n"),Se.push({key:Xe,f:Math.hypot(z.x-U.x,z.y-U.y),pt:U}),Ge.add(Xe);let $t=[];const xe=d((X,$)=>L(X,$,S.start,S.end),"checkSegmentBlocked"),In={x:z.x,y:U.y},Cr=xe(U,In),vr=xe(In,z),Lr=Cr||vr,Sn={x:U.x,y:z.y},Er=xe(U,Sn),Tr=xe(Sn,z);if(Lr?Er||Tr||(Math.abs(U.x-z.x)0;){Se.sort((mt,Vt)=>mt.f-Vt.f);const X=Se.shift();if(Ge.delete(X.key),X.key===wo){let mt=wo,Vt=z;for($t=[Vt];bn.has(mt);){const re=bn.get(mt);$t.unshift(re),Vt=re,mt=He(re.x,re.y)}break}const $=X.pt.x,Q=X.pt.y,ht=Sr.sort((mt,Vt)=>mt.coord-Vt.coord),Tt=ht.findIndex(mt=>Math.abs(mt.coord-$)<1),Ct=Ir.sort((mt,Vt)=>mt.coord-Vt.coord),Rt=Ct.findIndex(mt=>Math.abs(mt.coord-Q)<1),kt=[];Tt>0&&kt.push({x:ht[Tt-1].coord,y:Q}),Tt>=0&&Tt0&&kt.push({x:$,y:Ct[Rt-1].coord}),Rt>=0&&Rtne.nodeId===S.start||ne.nodeId===S.end?!1:Vt!==re?ne.minYQ&&ne.maxX>Vt&&ne.minX$&&ne.maxY>Dt&&ne.minY10&&Cn<-5||Re<-10&&Cn>5)&&(Et=Math.abs(Cn)*100),(Zt>10&&$e<-5||Zt<-10&&$e>5)&&(Et+=Math.abs($e)*50);let Ao=0;const Ro=Mn.get(X.key)??"n",No=Math.abs($e)>lt?"h":"v";Ro!=="n"&&Ro!==No&&(Ao=50);const wr=Ut+Lt+Et+Ao,ze=(Ye.get(X.key)??1/0)+wr,Oo=Math.abs(z.x-mt.x)+Math.abs(z.y-mt.y);if(ze<(Ye.get(vt)??1/0))if(bn.set(vt,X.pt),Ye.set(vt,ze),Mn.set(vt,No),!Ge.has(vt))Se.push({key:vt,f:ze+Oo,pt:mt}),Ge.add(vt);else{const ne=Se.findIndex(Ar=>Ar.key===vt);ne!==-1&&(Se[ne].f=ze+Oo)}}}if($t.length===0&&($t=[U,{x:U.x,y:z.y},z]),$t.length>4){const X=$t[0],$=$t[$t.length-1];let Q=Math.min(X.x,$.x),ht=Math.max(X.x,$.x),Tt=Math.min(X.y,$.y),Ct=Math.max(X.y,$.y);for(const Dt of $t)Q=Math.min(Q,Dt.x),ht=Math.max(ht,Dt.x),Tt=Math.min(Tt,Dt.y),Ct=Math.max(Ct,Dt.y);const Rt=ht>Math.max(X.x,$.x),kt=QLt.minXjt&&Lt.minY_t);if(Ut.length>0){let Lt=Math.max(X.x,$.x);for(const Et of Ut){const Zt=(Et.minX+Et.maxX)/2;if(Et.visualXHalfExtent===void 0||isNaN(Et.visualXHalfExtent))continue;const Re=Zt+Et.visualXHalfExtent+Dt;Lt=Math.max(Lt,Re)}isNaN(Lt)||(ht=Lt)}}if(kt){const jt=g.filter(_t=>_t.minXMath.min(X.y,$.y));if(jt.length>0){let _t=Math.min(X.x,$.x);for(const vt of jt){const Lt=(vt.minX+vt.maxX)/2-vt.visualXHalfExtent-Dt;_t=Math.min(_t,Lt)}Q=_t}}}const mt=d(Dt=>{const jt=$.y>X.y,_t=g.filter(Lt=>{const Et=Math.min(X.x,$.x)Lt.minX,Zt=Math.min(X.y,$.y)Lt.minY;return Et&&Zt});let vt=_t;if(c&&_t.length>0){const Lt=_t.filter(Et=>Et.minXDt);Lt.length>0&&(vt=Lt)}if(vt.length===0)return $.y;const Ut=Ce;if(jt){const Et=Math.max(...vt.map(Zt=>Zt.maxY))+Ut;if(Et<$.y-lt)return Et}else{const Et=Math.min(...vt.map(Zt=>Zt.minY))-Ut;if(Et>$.y+lt)return Et}return $.y},"findBestReturnY"),Vt=d(Dt=>{const jt=mt(Dt),_t={x:Dt,y:X.y},vt={x:Dt,y:jt},Ut={x:$.x,y:jt},Lt=xe(X,_t),Et=xe(_t,vt),Zt=xe(vt,Ut),Re=jt!==$.y?xe(Ut,$):!1;return!Lt&&!Et&&!Zt&&!Re?Math.abs(jt-$.y)=3){const X=zt[zt.length-1],$=zt[zt.length-2],Q=zt[zt.length-3],ht=Math.abs(Q.y-$.y)Math.abs(X.x-Q.x)&&zt.splice(-2,1)}else if(Tt){const Ct=Math.sign($.y-Q.y),Rt=Math.sign(X.y-Q.y);Ct!==0&&Ct===Rt&&Math.abs($.y-Q.y)>Math.abs(X.y-Q.y)&&zt.splice(-2,1)}}const fe=[zt[0]];for(let X=1;X$.x,Ct=ht.x>Q.x;if(Tt!==Ct){fe.push(Q);continue}continue}if(Math.abs($.x-Q.x)$.y,Ct=ht.y>Q.y;if(Tt!==Ct){fe.push(Q);continue}continue}fe.push(Q)}fe.push(zt[zt.length-1]);for(let X=0;Xm.from{const N=!T.segments.some(W=>(W.edgeIndex!==S.edgeIndex||W.segmentIndex!==S.segmentIndex)&&J(W,m)),D=!w.segments.some(W=>(W.edgeIndex!==m.edgeIndex||W.segmentIndex!==m.segmentIndex)&&J(W,S));return N&&D?(m.trackIndex=T.index,S.trackIndex=w.index,w.segments=[...w.segments.filter(W=>W.edgeIndex!==m.edgeIndex||W.segmentIndex!==m.segmentIndex),{edgeIndex:S.edgeIndex,segmentIndex:S.segmentIndex,from:S.from,to:S.to}],T.segments=[...T.segments.filter(W=>W.edgeIndex!==S.edgeIndex||W.segmentIndex!==S.segmentIndex),{edgeIndex:m.edgeIndex,segmentIndex:m.segmentIndex,from:m.from,to:m.to}],!0):!1},"trySwapSegmentsAcrossTracks"),ut=d(m=>{const S=m.tracks.length;return m.tracks[S]={index:S,coord:m.coord,segments:[]},S},"createNewTrack"),pt=d((m,S)=>{const w=m.pipe.tracks[m.trackIndex];w.segments=w.segments.filter(N=>N.edgeIndex!==m.edgeIndex||N.segmentIndex!==m.segmentIndex),m.trackIndex=S,m.pipe.tracks[S].segments.push({edgeIndex:m.edgeIndex,segmentIndex:m.segmentIndex,from:m.from,to:m.to})},"moveSegmentToTrack"),St=d((m,S)=>{const w=l[m.edgeIndex];for(const T of w){const N=h[T];N.pipe===m.pipe&&pt(N,S)}},"moveSegmentChainToTrack"),wt=d(m=>{const S=l[m.edgeIndex],w=S.indexOf(h.indexOf(m)),T=[];return w>0&&T.push(h[S[w-1]]),w{if(m.orientation===S.orientation)return!1;const w=m.orientation==="horizontal"?m:S,T=m.orientation==="horizontal"?S:m;return T.pipe.coord>w.from&&T.pipe.coordT.from&&w.pipe.coord{for(const w of m.tracks)if(!w.segments.some(N=>(N.edgeIndex!==S.edgeIndex||N.segmentIndex!==S.segmentIndex)&&J(N,S)))return w.index;return-1},"findAvailableTrack"),Jt=d((m,S)=>{if(m.trackIndex===S.trackIndex)return J(m,S);const w=wt(m),T=wt(S);return w.some(N=>T.some(D=>Kt(N,D)))},"segmentsConflict"),se=d((m,S,w)=>{if(rt(m,S,m.pipe.tracks[m.trackIndex],S.pipe.tracks[S.trackIndex]))return;const T=qt(m.pipe,S);w(S,T!==-1?T:ut(m.pipe))},"resolveTrackConflict"),Ee=d(m=>{let S=0;for(let w=0;w{if(me.has(m))return me.get(m);const S=l[m];if(S.length===0){const ot={dest:0,deviation:0,base:0,delta:0};return me.set(m,ot),ot}const T=h[S[0]].pipe.coord;let N=T;for(let ot=1;otMath.abs(bt-T)?z:bt;break}}const D=Math.abs(N-T),W={dest:N,deviation:D,base:T,delta:N-T};return me.set(m,W),W},"getDestInfo"),mn=d(()=>{let m=0;const S=new Map;for(const[T,N]of s.entries())l[T].length!==0&&N.start&&(S.has(N.start)||S.set(N.start,[]),S.get(N.start).push(T));const w=d(T=>{const N=s[T];if(!N.start||!N.end)return 0;const D=r.get(N.start),W=r.get(N.end);if(!D||!W)return 0;const ot=(W.x??0)-(D.x??0),U=(W.y??0)-(D.y??0);return Math.abs(ot)+Math.abs(U)},"getEdgeDistance");for(const T of S.values()){T.sort((D,W)=>{const ot=Te(D),U=Te(W);if(Math.abs(ot.deviation-U.deviation)>1)return ot.deviation-U.deviation;if(Math.abs(ot.dest-U.dest)>1)return ot.dest-U.dest;const z=w(D),bt=w(W);if(Math.abs(z-bt)>1)return bt-z;const dt=l[D].length,ct=l[W].length;if(dt!==ct)return dt-ct;if(dt===1){const st=l[D][0],It=l[W][0];if(h[st]&&h[It]){const Bt=h[st],At=h[It],Gt=Math.abs(Bt.to-Bt.from),ee=Math.abs(At.to-At.from);if(Math.abs(Gt-ee)>1)return Gt-ee}}return 0});const N=T.map(D=>h[l[D][0]]);m+=Ee(N)}return m},"fixSourceHandleCrossings"),yn=d(()=>{let m=0;const S=new Map;for(const[w,T]of s.entries())l[w].length!==0&&T.end&&(S.has(T.end)||S.set(T.end,[]),S.get(T.end).push(w));for(const w of S.values()){w.sort((N,D)=>{const W=d(z=>{const bt=l[z];if(bt.length<2)return 0;const dt=h[bt[bt.length-2]];return Math.abs(dt.to-dt.from)},"getDist"),ot=W(N),U=W(D);return Math.abs(ot-U)>.1?ot-U:N-D});const T=w.map(N=>h[l[N][l[N].length-1]]);m+=Ee(T)}return m},"fixTargetHandleCrossings"),pn=d(()=>{let m=0;for(const S of a){const w=[];for(const T of S.tracks)for(const N of T.segments){const D=l[N.edgeIndex].find(W=>h[W].segmentIndex===N.segmentIndex);D!==void 0&&w.push(h[D])}w.sort((T,N)=>T.edgeIndex-N.edgeIndex||T.segmentIndex-N.segmentIndex);for(let T=0;T{T.segments.forEach(N=>{S.push({edgeIndex:N.edgeIndex,segmentIndex:N.segmentIndex,trackIndex:T.index,from:N.from,to:N.to})})}),S.sort((T,N)=>T.from-N.from);const w=[];if(S.length>0){let T=[S[0]],N=S[0].to;for(let D=1;DN.add(st.trackIndex));const D=new Map;T.forEach(st=>{const It=Te(st.edgeIndex);D.set(st.trackIndex,(D.get(st.trackIndex)??0)+It.delta)});const W=[...N].filter(st=>(D.get(st)??0)<-1),ot=[...N].filter(st=>(D.get(st)??0)>1),U=[...N].filter(st=>Math.abs(D.get(st)??0)<=1);W.sort((st,It)=>(D.get(It)??0)-(D.get(st)??0)),ot.sort((st,It)=>(D.get(st)??0)-(D.get(It)??0));const z=d((st,It)=>{T.filter(Bt=>Bt.trackIndex===st).forEach(Bt=>{const At=x.has(Bt.edgeIndex)?m.coord:It;F.set(`${Bt.edgeIndex}-${Bt.segmentIndex}`,At)})},"assignCoord");let bt=0;for(const st of W)bt++,z(st,m.coord-bt*Tn);if(U.length===0&&N.size>0){const st=[...N].sort((At,Gt)=>Math.abs(D.get(At)??0)-Math.abs(D.get(Gt)??0))[0],It=W.indexOf(st);It!==-1&&W.splice(It,1);const Bt=ot.indexOf(st);Bt!==-1&&ot.splice(Bt,1),U.push(st)}let dt=0;for(const st of U){if(dt===0)z(st,m.coord);else{const It=dt%2===1?1:-1,Bt=Math.ceil(dt/2);z(st,m.coord+It*Bt*Tn*.5)}dt++}let ct=0;for(const st of ot)ct++,z(st,m.coord+ct*Tn)}}for(const[m,S]of s.entries()){const w=l[m]??[];if(w.length===0)continue;const T=[],N=r.get(S.start),D=r.get(S.end),{pSrcPort:W,pDstPort:ot}=nt(m,N,D),U=w.map(dt=>{const ct=h[dt],st=F.get(`${ct.edgeIndex}-${ct.segmentIndex}`)??ct.pipe.coord;return{orient:ct.orientation,coord:st,from:ct.from,to:ct.to}});T.push(W);for(let dt=0;dtlt&&T.push(ve(ct,It)),Gt&&At.orient===ct.orient)if(Math.abs(ct.coord-At.coord)>lt){const ee=ct.orient==="vertical"?(It+At.from)/2:io(ct,At);T.push(ve(ct,ee),ve(At,ee))}else(dt===0||dt===U.length-2)&&T.push(ve(ct,io(ct,At)));else if(Gt)T.push(ve(ct,At.coord));else{const ee=Math.abs(ct.from-It)lt||Math.abs(z.y-ot.y)>lt)&&T.push(ot);const bt=[];T.length>0&&bt.push(T[0]);for(let dt=1;dtlt||Math.abs(ct.y-st.y)>lt)&&bt.push(ct)}S.points=bt}for(const m of s){const S=m.__originalEdge;S&&m.points&&(S.points=m.points)}t.edges=(t.edges??[]).filter(m=>!m.isLayoutOnly);const V=d((m,S)=>{const w=S.x??0,T=S.y??0,N=S.width??0,D=S.height??0;if(N<=0||D<=0)return m;const W=w-N/2,ot=w+N/2,U=T-D/2,z=T+D/2;if(m.xot||m.yz)return m;const bt=m.x-W,dt=ot-m.x,ct=m.y-U,st=z-m.y,It=Math.min(bt,dt,ct,st);return It===bt?{x:W,y:m.y}:It===dt?{x:ot,y:m.y}:It===ct?{x:m.x,y:U}:{x:m.x,y:z}},"nodeBoundaryClamp");for(const m of t.edges){const S=m.points;if(!S||S.length<2)continue;const w=m.start,T=m.end,N=w?r.get(w):void 0,D=T?r.get(T):void 0;N&&(S[0]=V(S[0],N)),D&&(S[S.length-1]=V(S[S.length-1],D))}return t}d(pr,"routeEdgesOrthogonal");function xr(t){return t.direction??"TB"}d(xr,"getSwimlaneDirection");function br(t){var g,p,M,u,h;const e=es(t),n=((g=t.config.flowchart)==null?void 0:g.nodeSpacing)??40,o=((p=t.config.flowchart)==null?void 0:p.rankSpacing)??100,s=((M=t.config.swimlane)==null?void 0:M.ignoreCrossLaneEdges)??!0,r=((u=t.config.swimlane)==null?void 0:u.optimizeRanksByCrossings)??!0,i=((h=t.config.swimlane)==null?void 0:h.automaticLaneOrdering)??!1,a=xr(t),{ordered:c,coordinates:f}=yr(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:a});ns(e,c,f,{nodeGap:n,layerGap:o});for(const l of t.edges??[])delete l.points;pr(t,a);for(const l of t.edges??[])(!l.curve||l.curve==="basis")&&(l.curve="rounded");return Bs(t,a),Ps(t),a}d(br,"runSwimlaneLayoutCore");async function oi(t,e){const n=e.select("g");Or(n,t.markers,t.type,t.diagramId),Pr(),Br(),kr(),Nr(),ts(t);const o=os(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await Xo(n,t);br(t),await Jo(t,s)}d(oi,"render");export{oi as render}; +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/visualizations/mermaid/sizeCapture-X5ZJPWSS-D0QeaNJa.js","assets/visualizations/mermaid/mermaid.core-l-gs7P2Q.js","assets/app/index-BKQXvMzA.js","assets/styles/index-_lutWX9f.css","assets/chunks/purify.es-BnINGy_Y.js"])))=>i.map(i=>d[i]); +import{_ as Rr}from"../../app/index-BKQXvMzA.js";import{c as Nr}from"./chunk-RYQCIY6F-ChBtCdXE.js";import{aw as Or,v as Pr,t as Br,u as kr,at as Qe,Y as _r,ag as Fr,ad as Dr,aG as Hr,ae as Xr,af as Yr,X as Gr,a6 as $r,P as zr,b9 as _e,b2 as Ve,a as d,av as Po}from"./mermaid.core-l-gs7P2Q.js";import{G as Vr}from"../../chunks/graph-Dqkl27Ch.js";import"../../chunks/map-8WAJQ6ap.js";import"../../chunks/purify.es-BnINGy_Y.js";async function Xo(t,e){const n=new Vr({multigraph:!0,compound:!0}),o=[...e.edges],s=_r(),r=t.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),a=r.insert("g").attr("class","edges edgePath"),c=r.insert("g").attr("class","edgeLabels"),f=r.insert("g").attr("class","nodes"),g=new Map,p=t.node()!=null;await Promise.all(e.nodes.map(async M=>{var u;if(M.isGroup)n.setNode(M.id,{...M});else{if(p){const h=await Fr(f,M,{config:s,dir:M.dir}),l=((u=h.node())==null?void 0:u.getBBox())??{width:0,height:0};g.set(M.id,h),M.width=l.width,M.height=l.height}n.setNode(M.id,{...M})}}));for(const M of o)n.setEdge(M.start,M.end,{...M},M.id),e.edges.some(h=>h.id===M.id)||e.edges.push(M);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:M}=await Rr(async()=>{const{captureNodeSizes:u}=await import("./sizeCapture-X5ZJPWSS-D0QeaNJa.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2,3,4]));M(t,e)}return{graph:n,groups:{clusters:i,edgePaths:a,edgeLabels:c,nodes:f,rootGroups:r},nodeElements:g}}d(Xo,"createGraphWithElements");var Bo=5,je=1e-5,Ue=1e-6;function tn(t){const e=[];for(let n=0;n=1-Ue||M<=Ue||M>=1-Ue?null:{point:{x:t.x+p*s,y:t.y+p*r},tA:p,tB:M}}d(Yo,"segmentIntersection");function wn(t){return Math.abs(t.b.x-t.a.x)>=Math.abs(t.b.y-t.a.y)}d(wn,"isHorizontalSeg");function Go(t){const e=[];for(let n=0;n=Math.abs(n)?e>=0?1:0:n>=0?1:0}d($o,"getArcSweepFlag");var jr=.001;function zo(t,e){if(t.length<2)return t.map(r=>({...r}));const n=t.map(r=>({...r})),o=e.arrowTypeStart&&Po[e.arrowTypeStart];if(o){const r=t[0],i=t[1],a=Math.atan2(i.y-r.y,i.x-r.x);n[0].x=r.x+o*Math.cos(a),n[0].y=r.y+o*Math.sin(a)}const s=e.arrowTypeEnd&&Po[e.arrowTypeEnd];if(s){const r=t.length,i=t[r-2],a=t[r-1],c=Math.atan2(a.y-i.y,a.x-i.x);n[r-1].x=a.x-s*Math.cos(c),n[r-1].y=a.y-s*Math.sin(c)}return n}d(zo,"applyMarkerOffsets");function Vo(t,e,n,o,s){const r=t.point.x,i=t.point.y,a={x:r-e*t.r,y:i-n*t.r},c={x:r+e*t.r,y:i+n*t.r},f=[`L${Oe(a)}`];return s==="arc"?f.push(`A${le(t.r)},${le(t.r)} 0 0 ${o} ${Oe(c)}`):f.push(`M${Oe(c)}`),f}d(Vo,"emitJump");function An(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=n.x-e.x,a=n.y-e.y,c=Math.hypot(s,r),f=Math.hypot(i,a);if(c0){const v=An(s[f-1],s[f],s[f+1]??s[f],Bo);v&&(l=v.cutLen)}let x=p,C=null;r&&fv.t-L.t);for(const v of b)v.r=Math.min(v.r,v.d-l,x-v.d);for(let v=0;vL){const y=L/2;b[v].r=Math.min(b[v].r,y),b[v+1].r=Math.min(b[v+1].r,y)}}for(const v of b)v.r=2?o:null}catch{return null}}d(Ko,"decodeDataPoints");function qo(t,e,n){if(!n.enabled)return;const o=t.node();if(!o)return;const s=new Map;for(const f of e)s.set(f.id,f);const r=[],i=new Map;for(const f of e){const g=typeof CSS<"u"&&CSS.escape?CSS.escape(f.id):f.id,p=o.querySelector(`path[data-id="${g}"]`);if(!p)continue;i.set(f.id,p);const u=Ko(p.getAttribute("data-points"))??f.points;r.push({...f,points:u})}const a=Go(r);if(a.length===0)return;const c=new Map;for(const f of a){const g=c.get(f.jumpEdgeId)??[];g.push(f),c.set(f.jumpEdgeId,g)}for(const f of r){const g=c.get(f.id);if(!g||g.length===0)continue;const p=s.get(f.id),M=p==null?void 0:p.curve;if(M!==void 0&&!Wo(M))continue;const u=i.get(f.id);if(!u)continue;if(M===void 0){const v=u.getAttribute("d")??"";if(!Uo(v))continue}const h=u.getAttribute("style")??"",l=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(h),x=l?Number.parseFloat(l[1]):null,C=l?Number.parseFloat(l[2]):null,b=jo(f,g,n);if(u.setAttribute("d",b),x!==null&&C!==null&&typeof u.getTotalLength=="function"){const v=u.getTotalLength(),L=Math.max(0,v-x-C),y=`0 ${x} ${L} ${C}`,I=h.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${y};`).replace(/;\s*;+/g,";");u.setAttribute("style",I)}}}d(qo,"applyLineJumpsToSvg");async function Jo(t,e){var s,r;for(const i of t.nodes)i.isGroup?await Dr(e.clusters,i):Hr(i);const n=new Map;for(const i of t.nodes)i!=null&&i.id&&n.set(i.id,i);for(const i of t.edges){const a=i.start?n.get(i.start)??{}:{},c=i.end?n.get(i.end)??{}:{},f=Xr(e.edgePaths,{...i},{},t.type,a,c,t.diagramId);i.label&&await Yr(e.rootGroups,i),i.label&&Zo(i,f)}const o=(r=(s=t.config)==null?void 0:s.swimlane)==null?void 0:r.lineHops;if(o!==!1){const i=o==="gap"?"gap":"arc",a=t.edges.filter(c=>Array.isArray(c.points)&&c.points.length>=2).map(c=>({id:c.id,points:c.points,curve:c.curve,arrowTypeStart:c.arrowTypeStart,arrowTypeEnd:c.arrowTypeEnd}));qo(e.edgePaths,a,{enabled:!0,jumpRadius:6,jumpStyle:i})}}d(Jo,"adjustLayout");function Zo(t,e){const n=(e==null?void 0:e.updatedPath)??(e==null?void 0:e.originalPath),o=Gr(),{subGraphTitleTotalMargin:s}=$r({flowchart:o.flowchart??{}});if(t.label){const r=zr.get(t.id);let i=t.x,a=t.y;if(n){const c=_e.calcLabelPosition(n);Qe.debug("Moving label "+t.label+" from (",i,",",a,") to (",c.x,",",c.y,") abc88"),e&&(i=c.x,a=c.y)}r.attr("transform",`translate(${i}, ${a+s/2})`)}if(t!=null&&t.startLabelLeft){const r=Ve.get(t.id).startLeft;let i=t==null?void 0:t.x,a=t==null?void 0:t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.startLabelRight){const r=Ve.get(t.id).startRight;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelLeft){const r=Ve.get(t.id).endLeft;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}if(t.endLabelRight){const r=Ve.get(t.id).endRight;let i=t.x,a=t.y;if(n){const c=_e.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",n);i=c.x,a=c.y}r.attr("transform",`translate(${i}, ${a})`)}}d(Zo,"positionEdgeLabel");var vn="__swimlane_default__",Ur=21,ko=20;function Rn(t){return Math.max(t.padding??ko,ko)}d(Rn,"topLaneHorizontalPadding");function Qo(t){const{x:e,y:n,width:o,height:s}=t,r=t.swimlaneContentTop;if(typeof e!="number"||typeof n!="number"||typeof o!="number"||typeof s!="number"||typeof r!="number"||!Number.isFinite(e)||!Number.isFinite(n)||!Number.isFinite(o)||!Number.isFinite(s)||!Number.isFinite(r)||o<=0||s<=0){delete t.groupTitleRect;return}const i=n-s/2,a=Math.min(r,n+s/2),c=Math.min(Ur,Math.max(0,a-i)),f=i+c;if(f<=i){delete t.groupTitleRect;return}t.groupTitleRect={left:e-o/2,right:e+o/2,top:i,bottom:f}}d(Qo,"assignTopLaneTitleRect");function ts(t){const e=t.direction,n=t.nodes??(t.nodes=[]);for(const r of t.nodes??[])r.isGroup&&!r.parentId&&(r.shape="swimlane",e&&(r.direction=e));const o=n.filter(r=>!r.isGroup&&!r.parentId);if(o.length===0)return;let s=n.find(r=>r.id===vn);s?s.isGroup&&(s.shape="swimlane",e&&(s.direction=e)):(s={id:vn,label:"",isGroup:!0,shape:"swimlane",padding:20,...e?{direction:e}:{}},n.push(s));for(const r of o)r.parentId=vn}d(ts,"prepareLayoutForSwimlanes");function es(t){const e=new Map;for(const c of t.nodes??[])e.set(c.id,c);const n=[];for(const c of t.edges??[]){const f=typeof c.start=="string"?c.start:void 0,g=typeof c.end=="string"?c.end:void 0;!f||!g||c.labelNodeId||n.push({id:c.id,src:f,dst:g,ref:c})}const o=t.nodes??[],s=o.filter(c=>c.isGroup),r=o.filter(c=>!c.isGroup);return{nodes:[...[...s].reverse(),...r].map(c=>c.id),edges:n,layout:t,nodeById:e}}d(es,"toGraphView");function ns(t,e,n,o){const{layout:s}=t,r=t.nodeById,i=(o==null?void 0:o.layerGap)??100,a=(o==null?void 0:o.nodeGap)??40;let c=0;for(const M of e.layers){let u=0;for(const h of M){const l=r.get(h);if(!l){u++;continue}l.layer=c,l.order=u;const x=n.x[h]??u*a,C=n.y[h]??c*i;l.x=x,l.y=C,u++}c++}const f=s.nodes??[],g=new Map,p=[];for(const M of f){if(!(M!=null&&M.isGroup))continue;M.parentId||p.push(M);const u=f.filter(b=>b.parentId===M.id);let h=1/0,l=-1/0,x=1/0,C=-1/0;for(const b of u){const v=b.x??n.x[b.id],L=b.y??n.y[b.id],y=b.width??0,I=b.height??0;v!=null&&L!=null&&(h=Math.min(h,v-y/2),l=Math.max(l,v+y/2),x=Math.min(x,L-I/2),C=Math.max(C,L+I/2))}if(h===1/0||x===1/0)M.x=M.x??0,M.y=M.y??0,M.width=M.width??0,M.height=M.height??0;else{const b=M.padding??20,v=M.parentId?b:2*Rn(M),L=b,y=Math.max(0,l-h)+v,I=Math.max(0,C-x)+L,E=(h+l)/2,A=(x+C)/2;M.x=E,M.y=A,M.width=y,M.height=I,g.set(M.id,{minX:h,maxX:l,minY:x,maxY:C})}}if(p.length>0&&g.size>0){let M=1/0,u=-1/0,h=0;for(const l of p){const x=l.padding??20;x>h&&(h=x);const C=g.get(l.id);C&&(M=Math.min(M,C.minY),u=Math.max(u,C.maxY))}if(M!==1/0&&u!==-1/0){const l=Math.max(0,u-M),C=Math.max(h,36),b=l+2*C,v=(M+u)/2;for(const B of p)B.y=v,B.height=b,B.swimlaneContentTop=M;const L=[...p].sort((B,O)=>{const k=B.x??0,H=O.x??0;return k-H}),y=[],I=[],E=[];for(const B of L){const O=g.get(B.id);if(!O)continue;const k=Math.max(0,O.maxX-O.minX)+2*Rn(B),H=(O.minX+O.maxX)/2;y.push(B.id),I.push(H),E.push(k)}const A=y.length;if(A>0){const B=new Map;if(A===1)B.set(y[0],E[0]);else{const O=[];for(let j=0;j0&&s>0?{cx:e,cy:n,rect:Pe(e,n,o,s)}:void 0}d(co,"measuredNodeRect");function ao(t){if(t.isGroup)return;const e=co(t);return e?{id:String(t.id??""),cx:e.cx,cy:e.cy,rect:e.rect}:void 0}d(ao,"nodeBoundsInfoFor");function ce(t,e,n=Yt){return Math.abs(t.x-e.x)n}d(Nt,"isHorizontalSegment");function Ot(t,e,n=Yt){return gt(t,e,n)&&Math.abs(t.y-e.y)>n}d(Ot,"isVerticalSegment");function Wt(t,e,n,o){return Math.max(0,Math.min(Math.max(t,e),Math.max(n,o))-Math.max(Math.min(t,e),Math.min(n,o)))}d(Wt,"overlapLength");function de(t,e,n=Yt){return t.horizontal&&e.horizontal&&yt(t.a,e.a,n)?Wt(t.a.x,t.b.x,e.a.x,e.b.x):t.vertical&&e.vertical&>(t.a,e.a,n)?Wt(t.a.y,t.b.y,e.a.y,e.b.y):0}d(de,"sameAxisSegmentOverlapLength");function Be(t,e=Yt){const n=[];for(let o=0;o0?n[n.length-1]:void 0;(!s||!ce(s,o,e))&&n.push({x:o.x,y:o.y})}return n}d(xt,"dedupeConsecutivePoints");function lo(t,e=Yt){if(!t||t.length!==4)return;const[n,o,s,r]=t;return Nt(n,o,e)&&Ot(o,s,e)&&Nt(s,r,e)?{kind:"HVH",p0:n,p1:o,p2:s,p3:r}:Ot(n,o,e)&&Nt(o,s,e)&&Ot(s,r,e)?{kind:"VHV",p0:n,p1:o,p2:s,p3:r}:void 0}d(lo,"classifyThreeSegmentRoute");function dn(t,e,n,o=0){const s=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),a=Math.max(t.y,e.y);return r>n.left-o&&sn.top-o&&ie.left+n&&t.xe.top+n&&t.y=e.right&&t.top<=e.top&&t.bottom>=e.bottom}d(ss,"rectContainsRect");function en(t,e){return t.lefte.left&&t.tope.top}d(en,"rectsOverlap");function Nn(t,e){return{left:t.left-e,right:t.right+e,top:t.top-e,bottom:t.bottom+e}}d(Nn,"inflateRect");function Pe(t,e,n,o){return{left:t-n/2,right:t+n/2,top:e-o/2,bottom:e+o/2}}d(Pe,"rectFromCenterSize");function te(t){var e;return(e=co(t))==null?void 0:e.rect}d(te,"rectOfNodeBounds");function Le(t,e){switch(e){case"top":return{x:t.cx,y:t.rect.top};case"bottom":return{x:t.cx,y:t.rect.bottom};case"left":return{x:t.rect.left,y:t.cy};case"right":return{x:t.rect.right,y:t.cy}}}d(Le,"portForRectSide");function uo(t,e,n,o,s,r=Yt){const i=e==="left"||e==="right",a=o==="left"||o==="right";if(i&&a){if(e==="right"&&o==="left"&&t.xn.x){if(yt(t,n,r))return[t,n];const p=(t.x+n.x)/2;return[t,{x:p,y:t.y},{x:p,y:n.y},n]}if(e===o){if(yt(t,n,r))return;const p=e==="left"?Math.min(t.x,n.x)-s:Math.max(t.x,n.x)+s;return[t,{x:p,y:t.y},{x:p,y:n.y},n]}return}if(!i&&!a){if(e===o){if(gt(t,n,r))return;const M=e==="top"?Math.min(t.y,n.y)-s:Math.max(t.y,n.y)+s;return[t,{x:t.x,y:M},{x:n.x,y:M},n]}if(!(e==="bottom"&&o==="top"&&t.yn.y))return;if(gt(t,n,r))return[t,n];const p=(t.y+n.y)/2;return[t,{x:t.x,y:p},{x:n.x,y:p},n]}if(i&&!a){const g=e==="right"&&n.x>t.x||e==="left"&&n.xn.y;return g&&p?[t,{x:n.x,y:t.y},n]:void 0}const c=e==="bottom"&&n.y>t.y||e==="top"&&n.yn.x;return c&&f?[t,{x:t.x,y:n.y},n]:void 0}d(uo,"buildOrthogonalPortPath");function ho(t,e,n,o){return e==="left"||e==="right"?[t,{x:o,y:t.y},{x:o,y:n.y},n]:[t,{x:t.x,y:o},{x:n.x,y:o},n]}d(ho,"buildSameSideTrackPath");function un(t){const e=new Map,n=[];for(const o of t){if(o.isEdgeLabel)continue;const s=ao(o);s&&(e.set(s.id,s),n.push({id:s.id,rect:s.rect}))}return{nodeInfoById:e,realNodeRects:n}}d(un,"collectRealNodeBounds");function Me(t){const e=[],n=[];for(const o of t){const s=ao(o);if(!s)continue;const r={id:s.id,rect:s.rect};o.isEdgeLabel?n.push(r):e.push(r)}return{realNodeRects:e,labelNodeRects:n}}d(Me,"collectNodeRectEntries");function rs(t,{includeEdgeLabels:e=!0}={}){const n=[];for(const o of t){if(o.isGroup||!e&&o.isEdgeLabel)continue;const s=o.x??0,r=o.y??0,i=o.width??0,a=o.height??0;n.push({nodeId:o.id,...Pe(s,r,i,a)})}return n}d(rs,"collectLayoutNodeRects");function go(t,e,n=Yt){const o=t.start,s=t.end;if(!o||!s)return;const r=e.get(o),i=e.get(s);if(!(!r||!i))return{srcId:o,dstId:s,srcInfo:r,dstInfo:i,collinearX:Math.abs(r.cx-i.cx)h||MC)return!1;const b=Math.abs(l-g.a.x)s:r&&a&&yt(t,n,s)?Wt(t.x,e.x,n.x,o.x)>s:!1}d(is,"sameAxisSegmentsOverlap");function nn(t,e,n,o,{epsilon:s=Yt,skipDegenerateOther:r=!1}={}){for(const i of n){if(i===o||i.isLayoutOnly)continue;const a=i.points;if(!(!a||a.length<2))for(let c=0;cM+s&&hl+s&&po+Yt&&t=2?e[e.length-2]:void 0,c=(i?gt(i,s):!1)?{x:s.x,y:r.y}:{x:r.x,y:s.y};e.push(c)}e.push(r)}const n=[];for(const o of e){const s=n[n.length-1];(!s||!ce(s,o))&&n.push(o)}return n}d(on,"orthogonalizePolyline");function ue(t){if(t.length<3)return t;let e=[...t];for(let n=0;n<32;n++){const o=as(e);if(e=o.points,!o.changed)break}return e}d(ue,"simplifyPolyline");var it=.001,Kr=.5,_o=4;function yo(t,e,n){const o=t;if(o.isLayoutOnly||!o.points||o.points.length=0&&s=t.length)return t;const r=s-o;if(r<0||r>=t.length)return t;const i=ls(t[s],t[r],e);return n?[i,...t.slice(s)]:[...t.slice(0,s+1),i]}d(Pn,"clipEndpoint");function fs(t,e){for(const n of t){const o=yo(n,e,2);if(!o)continue;let s=[...o.points];o.srcRect&&(s=Pn(s,o.srcRect,!0)),o.dstRect&&(s=Pn(s,o.dstRect,!1)),s=ue(on(s)),s=po(s,o.srcRect,o.dstRect),o.edge.points=ue(on(s))}}d(fs,"clipEdgeEndpointsToNodeBoundaries");function Bn(t,e,n,o=!1){if(yt(t,e,it)){if(e.yn.bottom+it)return e;if(o){if(t.xn.right+it)return{x:n.right,y:t.y}}return{x:Math.abs(e.x-n.left)<=Math.abs(e.x-n.right)?n.left:n.right,y:t.y}}if(gt(t,e,it)){if(e.xn.right+it)return e;if(o){if(t.yn.bottom+it)return{x:t.x,y:n.bottom}}const s=Math.abs(e.y-n.top)<=Math.abs(e.y-n.bottom);return{x:t.x,y:s?n.top:n.bottom}}return e}d(Bn,"snapEndpointToBoundary");function sn(t,e,n){const o=t[e];for(let s=e+n;s>=0&&so.lo)),n=Math.min(...t.map(o=>o.hi));if(!(e>n))return{lo:e,hi:n}}d(ds,"intersectRanges");function _n(t,e){return e==="left"||e==="right"?rn(t.top,t.bottom):rn(t.left,t.right)}d(_n,"clearanceRangeForSide");function cn(t,e,n){const o=t.y>=n.top-it&&t.y<=n.bottom+it,s=t.x>=n.left-it&&t.x<=n.right+it;if(yt(t,e,it)&&o){if(Math.abs(t.x-n.left)0?ds(r):void 0}d(us,"straightClearanceRange");function Fn(t,e,n,o,s){const r=us(t,e,n,o,s);if(!r)return;const i=s?t.y:t.x,a=Math.min(r.hi,Math.max(r.lo,i));if(!(Math.abs(a-i)({...a}));for(let a=e;a>=0&&a=n.left-it&&Math.max(t.x,e.x)<=n.right+it,s=Math.min(t.y,e.y)>=n.top-it&&Math.max(t.y,e.y)<=n.bottom+it;if(Math.abs(t.y-n.top)o.bottom+it;case"left":return yt(e,n,it)&&n.xo.right+it}}d(Xn,"leavesOutward");function Yn(t,e,n){if(t.length<3)return t;if(n){const r=Hn(t[0],t[1],e);return r&&Xn(r,t[1],t[2],e)?t.slice(1):t}const o=t.length-1,s=Hn(t[o-1],t[o],e);return s&&Xn(s,t[o-1],t[o-2],e)?t.slice(0,o):t}d(Yn,"collapseOwnBorderStub");function ms(t,e,n){let o=t;if(e){const r=sn(o,0,1);if(r){const i=Bn(r,o[0],e);i!==o[0]&&(o=[i,...o.slice(1)])}o=Yn(o,e,!0)}if(n){const r=o.length-1,i=sn(o,r,-1);if(i){const a=Bn(i,o[r],n,!0);a!==o[r]&&(o=[...o.slice(0,r),a])}o=Yn(o,n,!1)}const s=po(o,e,n);return s!==o||o.length===2?s:(e&&(o=Dn(o,e,!0)),n&&(o=Dn(o,n,!1)),o)}d(ms,"snapAndCollapseEndpoints");function Gn(t,e){for(const n of t){const o=yo(n,e,2);if(!o)continue;const s=xt(o.points,it),r=ms(s,o.srcRect,o.dstRect);if(r.length<3){o.edge.points=r;continue}const i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];o.edge.points=i}}d(Gn,"prepareEdgeEndpointsForRenderer");function xo(t){return new Map(t.map(e=>[e.id,e]))}d(xo,"buildNodeMap");function ys(t,e){let n=t.parentId,o=null;for(;n;){const s=e.get(n);if(!(s!=null&&s.isGroup))break;o=s.id,n=s.parentId}return o}d(ys,"resolveTopLevelGroupId");function $n(t,e){let n=0,o=t.parentId;for(;o;){const s=e.get(o);if(!(s!=null&&s.isGroup))break;n++,o=s.parentId}return n}d($n,"groupDepth");function bo(t){let e=1/0,n=-1/0,o=1/0,s=-1/0;for(const r of t){const i=r.x,a=r.y;if(typeof i!="number"||typeof a!="number")continue;const c=r.width??0,f=r.height??0;e=Math.min(e,i-c/2),n=Math.max(n,i+c/2),o=Math.min(o,a-f/2),s=Math.max(s,a+f/2)}return e===1/0||o===1/0?null:{minX:e,maxX:n,minY:o,maxY:s}}d(bo,"boundsForChildren");function ps(t,e){const n=t.padding??20;t.x=(e.minX+e.maxX)/2,t.y=(e.minY+e.maxY)/2,t.width=Math.max(0,e.maxX-e.minX)+n,t.height=Math.max(0,e.maxY-e.minY)+n}d(ps,"applyGroupBounds");function xs(t){const e=xo(t),n=t.filter(o=>o.isGroup&&o.parentId).sort((o,s)=>$n(s,e)-$n(o,e));for(const o of n){const s=t.filter(i=>i.parentId===o.id),r=bo(s);r&&ps(o,r)}}d(xs,"recomputeNestedGroupBounds");function an(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(c=>!c.isGroup);let r=1/0,i=-1/0;for(const c of s){const f=c[e];typeof f=="number"&&(r=Math.min(r,f),i=Math.max(i,f))}if(!Number.isFinite(r)||!Number.isFinite(i))return!1;const a=d(c=>r+i-c,"mirror");for(const c of n){const f=c[e];typeof f=="number"&&(c[e]=a(f));const g=c.groupTitleRect;g&&(c.groupTitleRect=e==="x"?{...g,left:a(g.right),right:a(g.left)}:{...g,top:a(g.bottom),bottom:a(g.top)})}for(const c of o)for(const f of c.points??[])f[e]=a(f[e]);return!0}d(an,"mirrorAxis");function bs(t){return(t.nodes??[]).some(n=>!n.isGroup)?an(t,"y"):!0}d(bs,"applyBtDirectionTransform");function Ms(t,e="LR"){const n=t.nodes??[],o=t.edges??[],s=n.filter(P=>!P.isGroup);let r=1/0,i=1/0;for(const P of s){const G=P.x??0,j=P.y??0;G0?Math.max(1,g/p):1;for(const P of s){const G=P.x??0,tt=((P.y??0)-i)*M+a,ft=G-r;P.x=tt,P.y=ft}for(const P of o)if(P.points)for(const G of P.points){const j=G.x,ft=(G.y-i)*M+a,Mt=j-r;G.x=ft,G.y=Mt}xs(n);const u=n.filter(P=>P.isGroup&&!P.parentId);if(u.length===0)return e==="RL"&&an(t,"x"),!0;const h=xo(n),l=new Map;for(const P of n){if(P.isGroup)continue;const G=ys(P,h);if(!G)continue;const j=l.get(G)??[];j.push(P),l.set(G,j)}let x=0;for(const P of u){const G=P.padding??0;G>x&&(x=G)}const C=[];let b=1/0,v=-1/0;for(const P of u){const G=l.get(P.id)??[],j=bo(G);j&&(b=Math.min(b,j.minX),v=Math.max(v,j.maxX),C.push({lane:P,contentTop:j.minY,contentBottom:j.maxY,centerY:(j.minY+j.maxY)/2}))}if(b===1/0||v===-1/0)return!0;const L=Math.max(0,v-b),y=Math.max(x,10),I=L+2*y,E=a+I,O=(b+v)/2-I/2-a,k=O+E/2,H=Math.max(x,a);C.sort((P,G)=>P.centerY-G.centerY);for(let P=0;PM.cy?C.bottom:C.top,H=M.cx+b;if(H<=C.left+ae||H>=C.right-ae)continue;v={x:H,y:k},L={x:H,y:a.y},y={x:a.x,y:a.y}}else{const k=u.cx>M.cx?C.right:C.left,H=M.cy+b;if(H<=C.top+ae||H>=C.bottom-ae)continue;v={x:k,y:H},L={x:a.x,y:H},y={x:a.x,y:a.y}}const I=ce(v,L,ae),E=ce(L,y,ae);if(I&&E||!I&&Pt(v,L,o,[g],1)||!E&&Pt(L,y,o,[p],1))continue;const A=!I&&nn(v,L,t,s,{epsilon:ae,skipDegenerateOther:!0}),B=!E&&nn(L,y,t,s,{epsilon:ae,skipDegenerateOther:!0});if(!(A||B)){I?x=[L,y]:E?x=[v,L]:x=[v,L,y];break}}x&&(s.points=x)}}d(Is,"portSwapToLShape");function Ss(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values());for(const a of t){if(a.isLayoutOnly)continue;const c=a.points;if(!c||c.length<4)continue;const f=xt(c,.001);if(f.length<4)continue;const g=f.length-1,p=f[g],M=f[g-1],u=f[g-2],h=p.x-M.x,l=p.y-M.y,x=Math.hypot(h,l);if(x>=10||x<.001)continue;const C=M.x-u.x,b=M.y-u.y;if(Math.hypot(C,b)<.001)continue;const L=Nt(M,p,.001),y=Ot(M,p,.001),I=Nt(u,M,.001),E=Ot(u,M,.001);if(!(L&&E||y&&I))continue;const A=a.end,B=a.start,O=A?e.get(A):void 0;if(!O)continue;const k=O.x??0,H=O.y??0,P=te(O);if(!P)continue;let G,j;if(E){const J=b<0;G={x:k,y:u.y},j={x:k,y:J?P.bottom:P.top}}else{const J=C>0;G={x:u.x,y:H},j={x:J?P.right:P.left,y:H}}if(Pt(G,j,r,A?[A]:[],-2)||Pt(G,j,i,[],-2))continue;if(B){const J=e.get(B),rt=J?te(J):void 0;if(rt&&fo(G,rt,2))continue}const tt=d((J,rt)=>`${J.x.toFixed(3)},${J.y.toFixed(3)}|${rt.x.toFixed(3)},${rt.y.toFixed(3)}`,"ownSegmentKey"),ft=new Set;for(let J=0;J{for(const ut of t){if(ut===a||ut.isLayoutOnly)continue;const pt=ut.points;if(!(!pt||pt.length<2))for(let St=0;St=0){const J=f[g-3],rt=[B,A].filter(ut=>!!ut);if(Pt(J,G,r,rt,-2)||Mt(J,G))continue}const Ft=[...f.slice(0,g-2),G,j];a.points=Ft;const nt=a.labelNodeId;if(nt){const J=e.get(nt);if(J){const rt=J.width??0,ut=J.height??0;if(rt>0&&ut>0){let pt,St,wt=-1;for(let Kt=0;Kt=rt+2||me&&se>=ut+2)&&se>wt&&(wt=se,pt=(qt.x+Jt.x)/2,St=(qt.y+Jt.y)/2)}pt!==void 0&&St!==void 0&&(J.x=pt,J.y=St)}}}}}d(Ss,"collapseShortTerminalStub");var et=.001,Xt=8,at=Be,Ln=d((t,e)=>gt(t,e,et)||yt(t,e,et),"orthogonallyAligned");function Cs(t,e){const s=d((u,h)=>{const l=u.x??0,x=u.y??0,C=h.x-l,b=h.y-x;let v=(u.width??0)/2,L=(u.height??0)/2;return Math.abs(b)*v>Math.abs(C)*L?(b<0&&(L=-L),{x:l+(b===0?0:L*C/b),y:x+L}):(C<0&&(v=-v),{x:l+v,y:x+(C===0?0:v*b/C)})},"rectIntersect"),r=d((u,h)=>{const l=xt(u.points??[]);if(l.length<2)return;const x=h?u.start:u.end,C=x?e.get(x):void 0,b=C?te(C):void 0;if(!C||!x||!b)return;const v=h?l[0]:l[l.length-1],L=h?l[1]:l[l.length-2],y=s(C,v);let I=v;if(Ln(L,y)&&(I=L),gt(y,I,et))return{edge:u,edgeId:String(u.id??""),nodeId:x,atStart:h,orientation:"V",coord:y.x,min:Math.min(y.y,I.y),max:Math.max(y.y,I.y),boundary:y,railEnd:I,rect:b};if(yt(y,I,et))return{edge:u,edgeId:String(u.id??""),nodeId:x,atStart:h,orientation:"H",coord:y.y,min:Math.min(y.x,I.x),max:Math.max(y.x,I.x),boundary:y,railEnd:I,rect:b}},"terminalLaneFor"),i=d((u,h)=>Math.max(0,Math.min(u.max,h.max)-Math.max(u.min,h.min)),"projectedOverlapLength"),a=d((u,h)=>u.nodeId!==h.nodeId||u.orientation!==h.orientation?!1:u.orientation==="H"?(Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1)&>(u.boundary,h.boundary,1):(Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1)&&yt(u.boundary,h.boundary,1),"sameTerminalFace"),c=d((u,h)=>u.nodeId!==h.nodeId||u.orientation!==h.orientation?!1:i(u,h)>=Xt&&Math.abs(u.coord-h.coord)<.5,"exactTerminalLaneConflict"),f=d((u,h)=>{if(u.nodeId!==h.nodeId||u.orientation!==h.orientation||u.orientation!=="H"||u.atStart===h.atStart)return!1;const l=i(u,h);if(l2*x?!1:a(u,h)&&Math.abs(u.coord-h.coord)<16},"nearTerminalLaneConflict"),g=d((u,h)=>{const l=xt(u.edge.points??[]);if(l.length<2)return;const x=u.orientation==="V"?{x:u.boundary.x+h,y:u.boundary.y}:{x:u.boundary.x,y:u.boundary.y+h},C=u.orientation==="V"?{x:u.railEnd.x+h,y:u.railEnd.y}:{x:u.railEnd.x,y:u.railEnd.y+h};if(!d(()=>Math.abs(u.boundary.y-u.rect.top)<1||Math.abs(u.boundary.y-u.rect.bottom)<1?yt(x,u.boundary,et)&&x.x>=u.rect.left+1&&x.x<=u.rect.right-1:Math.abs(u.boundary.x-u.rect.left)<1||Math.abs(u.boundary.x-u.rect.right)<1?gt(x,u.boundary,et)&&x.y>=u.rect.top+1&&x.y<=u.rect.bottom-1:!1,"boundaryStaysOnSameFace")())return;if(u.atStart){const I=l.length>1&&ce(l[1],u.railEnd,et),E=l.slice(I?2:1),A=E[0];return A&&!Ln(A,C)?void 0:[x,C,...E]}const v=l.length>1&&ce(l[l.length-2],u.railEnd,et),L=l.slice(0,v?-2:-1),y=L[L.length-1];if(!(y&&!Ln(y,C)))return[...L,C,x]},"shiftedCandidate"),p=d(u=>{const h=u.edge,l=xt(h.points??[]);if(l.length!==2)return!1;const x=h.start,C=h.end,b=x?e.get(x):void 0,v=C?e.get(C):void 0;if(!b||!v)return!1;const L=b.x??0,y=b.y??0,I=v.x??0,E=v.y??0,[A,B]=l;return yt(A,B,et)&&Math.abs(y-E)<1&&Math.abs(L-I)>1||gt(A,B,et)&&Math.abs(L-I)<1&&Math.abs(y-E)>1},"laneIsStraightCollinearConnector"),M=[-7,7,-2*7,2*7,-3*7,3*7];for(let u=0;u<8;u++){const h=t.filter(x=>!x.isLayoutOnly).flatMap(x=>[r(x,!0),r(x,!1)]).filter(x=>!!x);let l=!1;for(let x=0;x{const A=p(I),B=p(E);return A!==B?Number(A)-Number(B):+!E.atStart-+!I.atStart});for(const I of y){for(const E of M){const A=g(I,E);if(!A)continue;const B=r({...I.edge,points:A},I.atStart);if(!(!B||h.some(O=>O.edge!==I.edge&&(c(B,O)||L&&f(B,O))))){I.edge.points=A,l=!0;break}}if(l)break}}if(!l)return}}d(Cs,"separateSharedRenderedTerminalLanes");function vs(t,e){const{realNodeRects:o,labelNodeRects:s}=Me(e.values()),r=d((a,c)=>{const f=a.start,g=a.end,p=at(c);if(p.length!==c.length-1)return!1;const M=[f,g].filter(u=>!!u);for(const u of p)if(Pt(u.a,u.b,o,M,-2)||Pt(u.a,u.b,s,[],-2))return!1;for(const u of t){if(u===a||u.isLayoutOnly)continue;const h=u.points;if(!(!h||h.length<2)){for(const l of p)for(const x of at(xt(h)))if(de(l,x,.5)>=Xt||he(l.a,l.b,x.a,x.b,et))return!1}}return!0},"candidateIsSafe"),i=d((a,c)=>{if(c+4>=a.length)return;const f=a[c],g=a[c+1],p=a[c+2],M=a[c+3],u=a[c+4],h=Nt(f,g)&&Ot(g,p)&&Nt(p,M)&&Ot(M,u)&>(f,M,et)&>(f,u,et)&>(g,p,et)&&(g.x-f.x)*(M.x-p.x)<0,l=Ot(f,g)&&Nt(g,p)&&Ot(p,M)&&Nt(M,u)&&yt(f,M,et)&&yt(f,u,et)&&yt(g,p,et)&&(g.y-f.y)*(M.y-p.y)<0;if(h||l)return xt([...a.slice(0,c+1),u,...a.slice(c+5)]);if(c+5>=a.length)return;const x=a[c+5],C=Ot(f,g)&&Nt(g,p)&&Ot(p,M)&&Nt(M,u)&&Ot(u,x)&>(f,u,et)&>(f,x,et)&>(p,M,et)&&(p.x-g.x)*(u.x-M.x)<0,b=Nt(f,g)&&Ot(g,p)&&Nt(p,M)&&Ot(M,u)&&Nt(u,x)&&yt(f,u,et)&&yt(f,x,et)&&yt(p,M,et)&&(p.y-g.y)*(u.y-M.y)<0;if(!(!C&&!b))return xt([...a.slice(0,c+1),x,...a.slice(c+6)])},"withoutDogleg");for(let a=0;a<8;a++){let c=!1;for(const f of t){if(f.isLayoutOnly)continue;const g=xt(f.points??[]);for(let p=0;p<=g.length-5;p++){const M=i(g,p);if(!(!M||!r(f,M))){f.points=M,c=!0;break}}if(c)break}if(!c)return}}d(vs,"collapseRedundantRectangularDoglegs");function zn(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values()),a=t.filter(h=>!h.isLayoutOnly),c=d((h,l,x)=>xt(h===l?x??[]:h.points??[]),"pointsFor"),f=d((h,l)=>{let x=0;for(let C=0;C{const l=at(h);if(l.length!==3)return;const x=l[1];if(!(l[0].horizontal===x.horizontal||l[2].horizontal===x.horizontal))return{index:x.index,horizontal:x.horizontal,vertical:x.vertical,segment:x}},"middleRail"),p=d((h,l)=>{const x=[h.start,h.end].filter(C=>!!C);return r.filter(C=>{if(x.includes(C.id))return!1;const b=C.rect;return l.horizontal?Wt(l.a.x,l.b.x,b.left,b.right)>=Xt&&l.a.y>=b.top-2&&l.a.y<=b.bottom+2:Wt(l.a.y,l.b.y,b.top,b.bottom)>=Xt&&l.a.x>=b.left-2&&l.a.x<=b.right+2})},"blockingRectsFor"),M=d((h,l,x)=>{const C=h.map(v=>({...v}));if(l.horizontal)C[l.index].y=x,C[l.index+1].y=x;else if(l.vertical)C[l.index].x=x,C[l.index+1].x=x;else return;const b=ue(xt(C));return at(b).length===b.length-1?b:void 0},"candidateByMovingRail"),u=d((h,l,x)=>{const C=[h.start,h.end].filter(v=>!!v),b=at(l);if(b.length!==l.length-1)return!1;for(const v of b)if(Pt(v.a,v.b,r,C,-2)||Pt(v.a,v.b,i,[],-2))return!1;for(const v of a)if(v!==h){for(const L of b)for(const y of at(c(v)))if(de(L,y,.5)>=Xt)return!1}return f(h,l)<=x},"candidateIsSafe");for(let h=0;h<8;h++){const l=f();let x=!1;for(const C of a){const b=c(C),v=g(b);if(!v)continue;const L=p(C,v.segment);if(L.length===0)continue;const y=v.horizontal?[Math.min(...L.map(I=>I.rect.top))-20,Math.max(...L.map(I=>I.rect.bottom))+20]:[Math.min(...L.map(I=>I.rect.left))-20,Math.max(...L.map(I=>I.rect.right))+20];for(const I of y){const E=M(b,v.segment,I);if(!(!E||!u(C,E,l))){C.points=E,x=!0;break}}if(x)break}if(!x)return}}d(zn,"liftObstacleHuggingSameSideRails");function Vn(t,e){const o=d(c=>{const f=c.groupTitleRect;if(!(!f||typeof f.left!="number"||typeof f.right!="number"||typeof f.top!="number"||typeof f.bottom!="number"||!Number.isFinite(f.left)||!Number.isFinite(f.right)||!Number.isFinite(f.top)||!Number.isFinite(f.bottom)||f.right<=f.left||f.bottom<=f.top))return{left:f.left,right:f.right,top:f.top,bottom:f.bottom}},"validTitleRect"),s=d(c=>{if(!c.isGroup||c.parentId)return;const f=c.direction,g=typeof f=="string"?f.toUpperCase():"";if(g==="LR"||g==="RL"||g==="BT")return;const p=o(c),M=c.y,u=c.height;if(!p||typeof M!="number"||typeof u!="number"||!Number.isFinite(M)||!Number.isFinite(u)||u<=0)return;const h=p.right-p.left,l=p.bottom-p.top;if(!(l<=0||h{if(!c.horizontal)return!1;const g=c.a.y;return g<=f.top+et||g>=f.bottom-et?!1:Wt(c.a.x,c.b.x,f.left,f.right)>=Xt},"horizontalSegmentIntersectsTitle"),i=[...e.values()].map(s).filter(c=>!!c);if(i.length===0)return;let a=0;for(const c of t){if(c.isLayoutOnly)continue;const f=xt(c.points??[]);for(const g of at(f))for(const p of i)r(g,p.rect)&&(a=Math.max(a,p.rect.bottom-g.a.y+4))}if(!(a<=et))for(const c of i){const f=c.node.y,g=c.node.height;typeof f!="number"||typeof g!="number"||!Number.isFinite(f)||!Number.isFinite(g)||g<=0||(c.node.y=f-a/2,c.node.height=g+a,c.node.groupTitleRect={...c.rect,top:c.rect.top-a,bottom:c.rect.bottom-a})}}d(Vn,"liftTopLaneTitleBandsAboveRails");function jn(t,e){const o=d(f=>{const g=f.groupTitleRect;if(!(!g||typeof g.left!="number"||typeof g.right!="number"||typeof g.top!="number"||typeof g.bottom!="number"||!Number.isFinite(g.left)||!Number.isFinite(g.right)||!Number.isFinite(g.top)||!Number.isFinite(g.bottom)||g.right<=g.left||g.bottom<=g.top))return{left:g.left,right:g.right,top:g.top,bottom:g.bottom}},"validTitleRect"),s=d(f=>{if(!f.isGroup||f.parentId||f.direction!=="LR")return;const p=o(f),M=f.x,u=f.width;if(!p||typeof M!="number"||typeof u!="number"||!Number.isFinite(M)||!Number.isFinite(u)||u<=0)return;const h=p.right-p.left,l=p.bottom-p.top;if(!(h<=0||l{if(!f.vertical)return!1;const p=f.a.x;return p<=g.left+et||p>=g.right-et?!1:Wt(f.a.y,f.b.y,g.top,g.bottom)>=Xt},"verticalSegmentIntersectsTitle"),i=d((f,g)=>{if(!f.horizontal)return!1;const p=f.a.y;return p<=g.top+et||p>=g.bottom-et?!1:Wt(f.a.x,f.b.x,g.left,g.right)>=Xt},"horizontalSegmentIntersectsTitle"),a=[...e.values()].map(s).filter(f=>!!f);if(a.length===0)return;let c=0;for(const f of t){if(f.isLayoutOnly)continue;const g=xt(f.points??[]);for(const p of at(g))for(const M of a)if(r(p,M.rect))c=Math.max(c,M.rect.right-p.a.x+4);else if(i(p,M.rect)){const u=Math.min(p.a.x,p.b.x);c=Math.max(c,M.rect.right-u+4)}}if(!(c<=et))for(const f of a){const g=f.node.x,p=f.node.width;typeof g!="number"||typeof p!="number"||!Number.isFinite(g)||!Number.isFinite(p)||p<=0||(f.node.x=g-c/2,f.node.width=p+c,f.node.groupTitleRect={...f.rect,left:f.rect.left-c,right:f.rect.right-c})}}d(jn,"shiftLeftLaneTitleBandsLeftOfRails");function Ls(t,e){const{realNodeRects:o}=Me(e.values()),s=t.filter(h=>!h.isLayoutOnly),r=d((h,l=new Map)=>xt(l.get(h)??h.points??[]),"replacementPointsFor"),i=d((h=new Map)=>{let l=0;for(let x=0;xs.reduce((l,x)=>l+oe(r(x,h)),0),"totalBends"),c=d(h=>{const l=r(h);if(l.length<4)return;const x=l[l.length-2],C=l[l.length-1];if(!(!Nt(x,C,et)&&!Ot(x,C,et)))return{tailStart:x,terminal:C}},"terminalTailFor"),f=d((h,l)=>{const x=r(h);if(x.length<3)return;const C=x[0],b=x[1];let v;if(Nt(C,b,et))v={x:b.x,y:l.tailStart.y};else if(Ot(C,b,et))v={x:l.tailStart.x,y:b.y};else return;const L=ue(xt([C,b,v,l.tailStart,l.terminal]));return at(L).length===L.length-1?L:void 0},"candidateWithDestinationTail"),g=d((h,l)=>{const x=[h.start,h.end].filter(C=>!!C);for(const C of at(l))if(Pt(C.a,C.b,o,x,-2))return!0;return!1},"pathHasNodeHit"),p=d((h,l,x)=>{for(const C of s)if(C!==h){for(const b of at(l))for(const v of at(r(C,x)))if(de(b,v,.5)>=Xt)return!0}return!1},"pathHasSharedTrack"),M=d((h,l,x)=>!g(h,l)&&!p(h,l,x),"candidateIsSafe"),u=d(()=>{const h=new Map;for(const l of s){const x=l.end;if(!x||!e.has(x)||r(l).length<4)continue;const b=h.get(x)??[];b.push(l),h.set(x,b)}return h},"edgesByDestination");for(let h=0;h<4;h++){const l=i();if(l===0)return;const x=a();let C,b=l,v=x;for(const L of u().values())for(let y=0;y=l||G>b||G===b&&j>=v||(C=P,b=G,v=j)}if(!C)return;for(const[L,y]of C)L.points=y}}d(Ls,"swapDestinationTerminalTailsToReduceCrossings");function Es(t,e){const{realNodeRects:r,labelNodeRects:i}=Me(e.values()),a=t.filter(L=>!L.isLayoutOnly),c=d((L,y=new Map)=>xt(y.get(L)??L.points??[]),"replacementPointsFor"),f=d((L=new Map)=>{let y=0;for(let I=0;Ia.reduce((y,I)=>y+oe(c(I,L)),0),"totalBends"),p=d(L=>{const y=L.start,I=L.end,E=y?e.get(y):void 0,A=I?e.get(I):void 0,B=E?te(E):void 0,O=A?te(A):void 0;return B&&O?{src:B,dst:O}:void 0},"endpointRectsFor"),M=d((L,y,I)=>{if(I.index<=0||I.index+1>=y.length-1)return;const E=p(L);if(E){if(I.vertical){const A=I.a.x,B=Math.min(E.src.left,E.dst.left),O=Math.max(E.src.right,E.dst.right),k=AO+et?"right":void 0;return k?{edge:L,points:y,segmentIndex:I.index,axis:"vertical",side:k,coord:A,min:Math.min(I.a.y,I.b.y),max:Math.max(I.a.y,I.b.y)}:void 0}if(I.horizontal){const A=I.a.y,B=Math.min(E.src.top,E.dst.top),O=Math.max(E.src.bottom,E.dst.bottom),k=AO+et?"bottom":void 0;return k?{edge:L,points:y,segmentIndex:I.index,axis:"horizontal",side:k,coord:A,min:Math.min(I.a.x,I.b.x),max:Math.max(I.a.x,I.b.x)}:void 0}}},"externalRailForSegment"),u=d(()=>{const L=[];for(const y of a){const I=c(y);for(const E of at(I)){const A=M(y,I,E);A&&L.push(A)}}return L},"collectExternalRails"),h=d((L,y)=>L.edge!==y.edge&&L.axis===y.axis&&L.side===y.side&&Wt(L.min,L.max,y.min,y.max)>=Xt,"railsInteract"),l=d(L=>{const y=[],I=new Set;for(const E of L){if(I.has(E))continue;const A=[E],B=[];for(I.add(E);A.length>0;){const O=A.pop();B.push(O);for(const k of L)!I.has(k)&&h(O,k)&&(I.add(k),A.push(k))}B.length>1&&y.push(B)}return y},"connectedComponents"),x=d(L=>{const y=[];for(const I of L)y.some(E=>Math.abs(E-I.coord){const y=L.map(A=>A.coord),I=x(L),E=[];if(L.length<=6){const A=new Array(I.length).fill(!1),B=[],O=d(()=>{if(B.length===L.length){B.some((k,H)=>Math.abs(k-y[H])>=et)&&E.push([...B]);return}for(const[k,H]of I.entries())A[k]||(A[k]=!0,B.push(H),O(),B.pop(),A[k]=!1)},"visit");return O(),E}for(let A=0;A{const I=new Map;for(const[A,B]of L.entries()){const O=y[A],k=I.get(B.edge)??B.points.map(H=>({x:H.x,y:H.y}));B.axis==="vertical"?(k[B.segmentIndex].x=O,k[B.segmentIndex+1].x=O):(k[B.segmentIndex].y=O,k[B.segmentIndex+1].y=O),I.set(B.edge,k)}const E=new Map;for(const[A,B]of I){const O=ue(xt(B));if(at(O).length!==O.length-1)return;E.set(A,O)}return E},"replacementsForAssignment"),v=d(L=>{for(const[y,I]of L){const E=[y.start,y.end].filter(A=>!!A);for(const A of at(I))if(Pt(A.a,A.b,r,E,-2)||Pt(A.a,A.b,i,[],-2))return!1}for(let y=0;y=Xt)return!1}}return!0},"candidateIsSafe");for(let L=0;L<4;L++){const y=f();if(y===0)return;let I,E=y,A=g(),B=Number.POSITIVE_INFINITY;for(const O of l(u()))for(const k of C(O)){const H=b(O,k);if(!H||!v(H))continue;const P=f(H);if(P>=y)continue;const G=g(H),j=O.reduce((tt,ft,Mt)=>tt+Math.abs(k[Mt]-ft.coord),0);P>E||P===E&&(G>A||G===A&&j>=B)||(I=H,E=P,A=G,B=j)}if(!I)return;for(const[O,k]of I)O.points=k}}d(Es,"reassignCrossingExternalRailChannels");function Ts(t,e){const{realNodeRects:o,labelNodeRects:s}=Me(e.values()),r=t.filter(u=>!u.isLayoutOnly),i=d((u,h,l)=>xt(u===h?l??[]:u.points??[]),"pointsFor"),a=d(u=>at(u).reduce((h,l)=>{const x=l.a.x-l.b.x,C=l.a.y-l.b.y;return h+Math.hypot(x,C)},0),"pathLength"),c=d((u,h)=>{let l=0;for(let x=0;x{if(u.horizontal){const l=u.a.y;return(Math.abs(l-h.top)<1||Math.abs(l-h.bottom)<1)&&Wt(u.a.x,u.b.x,h.left,h.right)>=Xt}if(u.vertical){const l=u.a.x;return(Math.abs(l-h.left)<1||Math.abs(l-h.right)<1)&&Wt(u.a.y,u.b.y,h.top,h.bottom)>=Xt}return!1},"segmentRunsAlongRectBorder"),g=d(u=>{const h=[u.start,u.end].filter(x=>!!x),l=[];for(const x of h){const C=e.get(x),b=C?te(C):void 0;b&&l.push(b)}return l},"endpointRectsFor"),p=d((u,h)=>{if(h+3>=u.length)return[];const l=u[h],x=u[h+1],C=u[h+2],b=u[h+3],v=Nt(l,x,et)&&Ot(x,C,et)&&Nt(C,b,et),L=Ot(l,x,et)&&Nt(x,C,et)&&Ot(C,b,et);if(!v&&!L)return[];if(!(v?Math.sign(x.x-l.x)!==Math.sign(b.x-C.x):Math.sign(x.y-l.y)!==Math.sign(b.y-C.y)))return[];const I=gt(l,b,et)||yt(l,b,et)?[]:[{x:l.x,y:b.y},{x:b.x,y:l.y}],E=I.length===0?[[...u.slice(0,h+1),...u.slice(h+3)]]:I.map(B=>[...u.slice(0,h+1),B,...u.slice(h+3)]),A=new Set;return E.map(B=>ue(xt(B))).filter(B=>{if(at(B).length!==B.length-1||!B.some(k=>ce(k,b,et)))return!1;const O=B.map(k=>`${k.x.toFixed(3)},${k.y.toFixed(3)}`).join("|");return A.has(O)?!1:(A.add(O),!0)})},"shortcutCandidatesAt"),M=d((u,h,l)=>{const x=[u.start,u.end].filter(b=>!!b),C=g(u);for(const b of at(h))if(Pt(b.a,b.b,o,x,-2)||Pt(b.a,b.b,s,[],-2)||C.some(v=>f(b,v)))return!1;for(const b of r)if(b!==u){for(const v of at(h))for(const L of at(i(b)))if(de(v,L,.5)>=Xt)return!1}return c(u,h)<=l},"candidateIsSafe");for(let u=0;u<8;u++){const h=c();let l,x,C=h,b=Number.POSITIVE_INFINITY,v=Number.POSITIVE_INFINITY;for(const L of r){const y=i(L),I=oe(y,et),E=a(y);for(let A=0;A<=y.length-4;A++)for(const B of p(y,A)){const O=oe(B,et),k=a(B);if(!(OC||P===C&&(O>b||O===b&&k>=v)||(l=L,x=B,C=P,b=O,v=k)}}if(!l||!x)return;l.points=x}}d(Ts,"shortcutRedundantOrthogonalJogs");function ws(t,e){const i=[];for(const R of e.values()){if(R.isGroup||R.isEdgeLabel)continue;const _=R.x??0,F=R.y??0,V=te(R);V&&i.push({id:String(R.id??""),cx:_,cy:F,rect:V})}if(i.length===0)return;const a=new Map(i.map(R=>[R.id,R])),c=i.map(R=>({id:R.id,rect:R.rect})),f=["top","bottom","left","right"],g={top:Math.min(...i.map(R=>R.rect.top))-20,bottom:Math.max(...i.map(R=>R.rect.bottom))+20,left:Math.min(...i.map(R=>R.rect.left))-20,right:Math.max(...i.map(R=>R.rect.right))+20},p=t.filter(R=>!R.isLayoutOnly),M=new Map(p.map((R,_)=>[R,_])),u=d(R=>{const _=R==="left"||R==="top"?-1:1,F=[];for(let V=0;V<=2;V++)F.push(g[R]+_*20*V);return F},"outwardTracksForSide"),h=d((R,_=new Map)=>xt(_.get(R)??R.points??[]),"replacementPointsFor"),l=d((R,_)=>{let F=0;for(const V of R)for(const K of _)he(V.a,V.b,K.a,K.b,et)&&F++;return F},"crossingCountBetweenSegments"),x=d((R,_)=>l(at(R),at(_)),"crossingCountBetweenPaths"),C=d((R=new Map)=>{let _=0;const F=[],V=new Set,K=[],Z=d(Y=>{V.has(Y)||(V.add(Y),K.push(Y))},"addEdge");for(let Y=0;Y0&&(_+=T,F.push({first:q,second:w,count:T}),Z(q),Z(w))}}return K.sort((Y,q)=>(M.get(Y)??0)-(M.get(q)??0)),{count:_,pairs:F,edgeSet:V,edges:K}},"crossingSnapshot"),b=d((R,_)=>{const F=new Set(_.keys());if(F.size===0)return R.count;let V=0;for(const Z of R.pairs)(F.has(Z.first)||F.has(Z.second))&&(V+=Z.count);let K=0;for(let Z=0;Z{const _=new Map;for(const K of R.pairs){const Z=_.get(K.first)??new Set;Z.add(K.second),_.set(K.first,Z);const Y=_.get(K.second)??new Set;Y.add(K.first),_.set(K.second,Y)}const F=[],V=new Set;for(const K of R.edges){if(V.has(K))continue;const Z=[K],Y=[];for(V.add(K);Z.length>0;){const q=Z.pop();Y.push(q);for(const m of _.get(q)??[])V.has(m)||(V.add(m),Z.push(m))}Y.sort((q,m)=>(M.get(q)??0)-(M.get(m)??0)),Y.length>1&&F.push(Y)}return F},"crossingComponents"),L=d(R=>[R.start,R.end].filter(_=>!!_),"endpointIdsFor"),y=d(R=>{const _=[];for(const F of v(R)){const V=new Set(F),K=new Set(F.flatMap(Y=>L(Y))),Z=[...F];for(const Y of p)V.has(Y)||L(Y).some(q=>K.has(q))&&Z.push(Y);Z.sort((Y,q)=>(M.get(Y)??0)-(M.get(q)??0)),_.push(Z)}return _},"pairSearchGroups"),I=d((R,_,F)=>b(R,new Map([[_,F]])),"crossingCountWithSingleReplacement"),E=d(R=>{const _=new Map;for(const F of R.pairs)_.set(F.first,(_.get(F.first)??0)+F.count),_.set(F.second,(_.get(F.second)??0)+F.count);return _},"currentCrossingsByEdge"),A=d(R=>R.slice(1).reduce((_,F,V)=>{const K=R[V];return _+Math.abs(F.x-K.x)+Math.abs(F.y-K.y)},0),"pathLength"),B=d((R=new Map)=>p.reduce((_,F)=>_+oe(h(F,R)),0),"totalBends"),O=d((R=new Map)=>p.reduce((_,F)=>_+A(h(F,R)),0),"totalLength"),k=d((R,_,F=new Map)=>{const V=at(_);for(const K of p)if(K!==R){for(const Z of V)for(const Y of at(h(K,F)))if(de(Z,Y,.5)>=Xt)return!0}return!1},"pathHasSegmentConflict"),H=d((R,_)=>{const F=[R.start,R.end].filter(V=>!!V);for(const V of at(_))if(Pt(V.a,V.b,c,F,-2))return!0;return!1},"pathHitsNode"),P=d((R,_)=>{const F=ue(xt(_));at(F).length===F.length-1&&R.push(F)},"pushOrthogonalCandidate"),G=d(R=>R==="left"||R==="right","sideIsHorizontal"),j=d((R,_,F)=>{switch(_){case"left":return Math.min(R.x,F.x)-20;case"right":return Math.max(R.x,F.x)+20;case"top":return Math.min(R.y,F.y)-20;case"bottom":return Math.max(R.y,F.y)+20}},"localTrackForSameSide"),tt=d((R,_,F,V)=>{const K=F==="left"||F==="top"?-1:1,Z=[j(_,F,V),g[F]];for(const Y of Z)for(let q=0;q<=2;q++)P(R,ho(_,F,V,Y+K*20*q))},"addSameSideCandidates"),ft=d((R,_,F,V,K)=>{for(const Z of u(F))for(const Y of u(K))P(R,[_,{x:Z,y:_.y},{x:Z,y:Y},{x:V.x,y:Y},V])},"addHorizontalToVerticalCandidates"),Mt=d((R,_,F,V,K)=>{for(const Z of u(F))for(const Y of u(K))P(R,[_,{x:_.x,y:Z},{x:Y,y:Z},{x:Y,y:V.y},V])},"addVerticalToHorizontalCandidates"),Ht=d((R,_,F,V,K)=>{const Z=[...u("top"),...u("bottom")];for(const Y of u(F))for(const q of u(K))for(const m of Z)P(R,[_,{x:Y,y:_.y},{x:Y,y:m},{x:q,y:m},{x:q,y:V.y},V])},"addHorizontalPairCandidates"),Ft=d((R,_,F,V,K)=>{const Z=[...u("left"),...u("right")];for(const Y of u(F))for(const q of u(K))for(const m of Z)P(R,[_,{x:_.x,y:Y},{x:m,y:Y},{x:m,y:q},{x:V.x,y:q},V])},"addVerticalPairCandidates"),nt=d(R=>{const _=new Set;return R.map(F=>xt(F)).filter(F=>{const V=F.map(K=>`${K.x.toFixed(3)},${K.y.toFixed(3)}`).join("|");return _.has(V)||F.length<2?!1:(_.add(V),!0)})},"dedupeCandidatePaths"),J=d((R,_,F,V)=>{const K=[],Z=uo(R,_,F,V,20,et);Z&&P(K,Z),_===V&&tt(K,R,_,F);const Y=G(_),q=G(V);return Y&&!q?ft(K,R,_,F,V):!Y&&q?Mt(K,R,_,F,V):Y?Ht(K,R,_,F,V):Ft(K,R,_,F,V),nt(K)},"buildCandidatesForSides"),rt=d((R,_,F,V)=>{const K=[...u("left"),...u("right")],Z=[...u("top"),...u("bottom")];for(const Y of f){const q=Le(V,Y),m=Y==="top"||Y==="bottom"?u(Y):Z;for(const S of K){P(R,[_,F,{x:S,y:F.y},{x:S,y:q.y},q]);for(const w of m)P(R,[_,F,{x:S,y:F.y},{x:S,y:w},{x:q.x,y:w},q])}}},"addVerticalDepartureOuterTrackCandidates"),ut=d((R,_,F,V)=>{const K=[...u("left"),...u("right")],Z=[...u("top"),...u("bottom")];for(const Y of f){const q=Le(V,Y),m=Y==="left"||Y==="right"?u(Y):K;for(const S of Z){P(R,[_,F,{x:F.x,y:S},{x:q.x,y:S},q]);for(const w of m)P(R,[_,F,{x:F.x,y:S},{x:w,y:S},{x:w,y:q.y},q])}}},"addHorizontalDepartureOuterTrackCandidates"),pt=d(R=>{const _=R.start,F=R.end,V=F?a.get(F):void 0;if(!_||!V)return[];const K=xt(R.points??[]);if(K.length<4)return[];const Z=K[0],Y=K[1],q=[];return Ot(Z,Y,et)?rt(q,Z,Y,V):Nt(Z,Y,et)&&ut(q,Z,Y,V),q},"terminalPreservingOuterTrackCandidates"),St=d(R=>{const _=R.start,F=R.end,V=_?a.get(_):void 0,K=F?a.get(F):void 0;if(!V||!K)return[];const Z=[];for(const Y of f){const q=Le(V,Y);for(const m of f)Z.push(...J(q,Y,Le(K,m),m))}return Z.push(...pt(R)),Z},"candidatePathsFor"),wt=d(()=>new Map(p.map(R=>[R,at(h(R))])),"currentSegmentsByEdge"),Kt=d((R,_,F)=>{const V=new Set;for(const K of p){if(K===R)continue;const Z=F.get(K)??at(h(K));_.some(Y=>Z.some(q=>de(Y,q,.5)>=Xt))&&V.add(K)}return V},"sharedTrackConflictsFor"),qt=d((R,_,F,V)=>{const K=new Set;return St(R).map(Y=>ue(xt(Y))).filter(Y=>{if(H(R,Y))return!1;const q=Y.map(m=>`${m.x.toFixed(3)},${m.y.toFixed(3)}`).join("|");return K.has(q)||Y.length<2?!1:(K.add(q),!0)}).map(Y=>{const q=at(Y);let m=0;for(const S of p)S!==R&&(m+=l(q,F.get(S)??at(h(S))));return{candidate:Y,candidateSegments:q,crossings:_.count-(V.get(R)??0)+m,bends:oe(Y,et),totalBends:oe(Y),length:A(Y)}}).filter(({crossings:Y})=>Y<=_.count).sort((Y,q)=>Y.crossings-q.crossings||Y.bends-q.bends||Y.length-q.length).slice(0,48).map(Y=>({path:Y.candidate,segments:Y.candidateSegments,sharedTrackConflicts:Kt(R,Y.candidateSegments,F),totalBends:Y.totalBends,length:Y.length}))},"pairCandidatesFor"),Jt=d((R,_,F,V,K,Z)=>{let Y=0;for(const m of R.pairs)(m.first===_||m.second===_||m.first===V||m.second===V)&&(Y+=m.count);let q=l(F.segments,K.segments);for(const m of p){if(m===_||m===V)continue;const S=Z.get(m)??at(h(m));q+=l(F.segments,S)+l(K.segments,S)}return R.count-Y+q},"pairCrossingCount"),se=d((R,_)=>{for(const F of R.sharedTrackConflicts)if(F!==_)return!1;return!0},"conflictsOnlyWith"),Ee=d((R,_)=>R.segments.some(F=>_.segments.some(V=>de(F,V,.5)>=Xt)),"candidatesShareTrack"),me=d((R,_,F,V)=>se(_,F.edge)&&se(V,R.edge)&&!Ee(_,V),"pairCandidatesAreCompatible"),Te=d((R,_,F,V,K)=>{const Z=Jt(R.current,_.edge,F,V.edge,K,R.baseSegments);if(!(Z>=R.current.count))return{replacements:new Map([[_.edge,F.path],[V.edge,K.path]]),crossings:Z,bends:R.currentBends-(R.baseBendsByEdge.get(_.edge)??0)-(R.baseBendsByEdge.get(V.edge)??0)+F.totalBends+K.totalBends,length:R.currentLength-(R.baseLengthByEdge.get(_.edge)??0)-(R.baseLengthByEdge.get(V.edge)??0)+F.length+K.length}},"scorePairReplacement"),mn=d((R,_)=>R.crossings<_.crossings||R.crossings===_.crossings&&(R.bends<_.bends||R.bends===_.bends&&R.length<_.length),"pairScoreIsBetter"),yn=d((R,_,F,V)=>{let K=V;for(const Z of _.candidates)for(const Y of F.candidates){if(!me(_,Z,F,Y))continue;const q=Te(R,_,Z,F,Y);q&&mn(q,K)&&(K=q)}return K},"bestScoreForOptionPair"),pn=d(R=>{const _=B(),F=O(),V=wt(),K=E(R),Z=new Map(p.map(T=>[T,oe(h(T))])),Y=new Map(p.map(T=>[T,A(h(T))])),q=new Map,m=y(R);for(const T of m)for(const N of T){if(q.has(N))continue;const D=qt(N,R,V,K);D.length>0&&q.set(N,{edge:N,candidates:D})}let S={replacements:new Map,crossings:R.count,bends:_,length:F};const w={current:R,currentBends:_,currentLength:F,baseBendsByEdge:Z,baseLengthByEdge:Y,baseSegments:V};for(const T of m){const N=new Set(T.filter(W=>R.edgeSet.has(W))),D=T.map(W=>q.get(W)).filter(W=>!!W);for(let W=0;W0?S.replacements:void 0},"bestPairedReplacement");for(let R=0;R<4;R++){const _=C(),F=_.count;if(F===0)return;let V,K,Z=F,Y=Number.POSITIVE_INFINITY;for(const m of _.edges){const S=oe(h(m),et);for(const w of St(m)){const T=H(m,w),N=!T&&k(m,w),D=I(_,m,w),W=oe(w,et);T||N||!(DZ||D===Z&&W>=Y||(V=m,K=w,Z=D,Y=W)}}if(V&&K){V.points=K;continue}const q=pn(_);if(!q)return;for(const[m,S]of q)m.points=S}}d(ws,"resolveRenderedOrthogonalCrossings");var be=.001,Zr=8;function As(t,e){const{nodeInfoById:n,realNodeRects:o}=un(e),s=["top","bottom","left","right"],r=20,i={top:Math.min(...o.map(l=>l.rect.top))-r,bottom:Math.max(...o.map(l=>l.rect.bottom))+r,left:Math.min(...o.map(l=>l.rect.left))-r,right:Math.max(...o.map(l=>l.rect.right))+r},a=d((l,x,C,b)=>{const v=[],L=uo(l,x,C,b,r,be);return L&&v.push(L),x===b&&v.push(ho(l,x,C,i[x])),v},"buildOrthogonalPathCandidates"),c=d((l,x)=>{for(let C=0;C{let b=0;const v=Be(l,be),L=x.start,y=x.end;for(const I of t){if(I===x||I.isLayoutOnly)continue;const E=I.start,A=I.end;if(!C&&L&&y&&(E===L||E===y||A===L||A===y))continue;const B=I.points;if(!(!B||B.length<2))for(const O of v)for(const k of Be(B,be)){if(mo(O.a,O.b,k.a,k.b,be,be)){b++;continue}de(O,k,be)>=Zr&&b++}}return b},"pathConflictCount"),g=4,p=d((l,x)=>{const C=Math.abs(l.y-x.rect.top),b=Math.abs(l.y-x.rect.bottom),v=Math.abs(l.x-x.rect.left),L=Math.abs(l.x-x.rect.right);let y="top",I=C;return b{const b=M.get(l)??[];b.push({side:x,edgeId:C}),M.set(l,b)},"addFaceClaim");for(const l of t){if(l.isLayoutOnly)continue;const x=l.points??[];if(x.length<1)continue;const C=l.id??"",b=l.start,v=l.end;if(b){const L=n.get(b);L&&u(b,p(x[0],L),C)}if(v){const L=n.get(v);L&&u(v,p(x[x.length-1],L),C)}}const h=d((l,x,C)=>{var b;return((b=M.get(l))==null?void 0:b.some(v=>v.edgeId!==C&&v.side===x))??!1},"faceIsClaimed");for(const l of t){if(l.isLayoutOnly)continue;const x=l.points;if(!x||x.length<2)continue;const C=oe(x,be);if(C0){const Mt=f(tt,l,!0);if(Mt>O||Mt===O&&ft>=k)continue;O=Mt,k=ft,B=tt;continue}f(tt,l)>A||ftG.edgeId!==I));const P=M.get(v);P&&M.set(v,P.filter(G=>G.edgeId!==I)),u(b,p(B[0],L),I),u(v,p(B[B.length-1],y),I)}}}d(As,"simplifyDetouredEdges");var Qt=.001,Fo=10,Ke=7;function Un(t,e){const n=e?0:t.length-1,o=e?1:-1,s=t[n],r=t[n+o];if(!s||!r)return;const i=r.x-s.x,a=r.y-s.y;if(!(Math.abs(i)+Math.abs(a)r&&en(t,Rs(r)))}d(Wn,"labelOverlapsOwnMarker");function Je(t,e){const n=[];for(const h of t){if(h.isLayoutOnly)continue;const l=h.points;if(!(!l||l.length<2))for(let x=0;x{const x=Nn(l,r);for(const{nodeId:C,rect:b}of o)if(C!==h&&en(x,b))return!0;return!1},"labelOverlapsForeignNode"),f=d((h,l)=>{const x=Nn(l,r);for(const C of n)if(C.edgeId!==h&&dn(C.p1,C.p2,x))return!0;return!1},"labelOverlapsForeignEdge"),g=d((h,l,x)=>c(h,x)||f(l,x),"labelOverlapsAnything"),p=[],M=d(h=>{for(const{id:l,rect:x}of s)if(ss(x,h))return l},"findContainingLane"),u=d((h,l)=>p.some(x=>x.labelId!==h&&en(l,x.rect)),"overlapsPlacedLabel");for(const h of t){if(h.isLayoutOnly)continue;const l=h.labelNodeId;if(!l)continue;const x=e.get(l);if(!x)continue;const C=h.points;if(!C||C.length<2)continue;const b=x.width??0,v=x.height??0;if(b<=0||v<=0)continue;const L=[];for(let nt=0;nt=Qt&&pt>=Qt||L.push({idx:nt,length:ut+pt,orientation:ut>=Qt?"horizontal":"vertical",midX:(J.x+rt.x)/2,midY:(J.y+rt.y)/2})}if(L.length===0)continue;const y=L.length>=3?L.filter(nt=>nt.idx>0&&nt.idx0?y:L,E=b>=v?"horizontal":"vertical",A=d(nt=>[...nt].sort((J,rt)=>{const ut=J.orientation===E,pt=rt.orientation===E;if(ut!==pt)return ut?-1:1;const St=J.length>=(J.orientation==="horizontal"?b:v)+2,wt=rt.length>=(rt.orientation==="horizontal"?b:v)+2;return St!==wt?St?-1:1:rt.length-J.length}),"rankSegments"),B=L[0],O=L[L.length-1],k=[.5,.25,.75,.05,.95,.15,.85,.1,.9],H=d((nt,J)=>{const rt=C[nt.idx],ut=C[nt.idx+1];return{midX:rt.x+(ut.x-rt.x)*J,midY:rt.y+(ut.y-rt.y)*J}},"anchorAtT"),P=d((nt,J,rt)=>Math.min(rt,Math.max(J,nt)),"clamp"),G=d((nt,J)=>nt.midX>=J.left-Qt&&nt.midX<=J.right+Qt&&nt.midY>=J.top-Qt&&nt.midY<=J.bottom+Qt,"pointInsideRectInclusive"),j=d(nt=>{const J=Pe(nt.midX,nt.midY,b,v),rt=M(J);if(rt)return{laneId:rt,anchor:nt,rect:J};const ut=s.find(({rect:se})=>G(nt,se));if(!ut)return;const pt=ut.rect.left+b/2+i,St=ut.rect.right-b/2-i,wt=ut.rect.top+v/2+i,Kt=ut.rect.bottom-v/2-i;if(pt>St||wt>Kt)return;const qt={midX:P(nt.midX,pt,St),midY:P(nt.midY,wt,Kt)},Jt=Pe(qt.midX,qt.midY,b,v);return G(nt,Jt)?{laneId:ut.id,anchor:qt,rect:Jt}:void 0},"placementForAnchor"),tt=d((nt,J,rt)=>nt.orientation==="horizontal"?Math.abs(J.midX-rt.x):Math.abs(J.midY-rt.y),"distanceAlongSegment"),ft=d((nt,J)=>{const ut=(nt.orientation==="horizontal"?b/2:v/2)+a;if(nt===B){const pt=C[nt.idx];if(tt(nt,J,pt)+Qt{const J=A(nt);for(const rt of J)for(const ut of k){const pt=H(rt,ut);if(!ft(rt,pt))continue;const St=j(pt);if(St&&!Wn(St.rect,C)&&!u(l,St.rect)&&!g(l,h.id,St.rect))return{laneId:St.laneId,anchor:St.anchor}}},"tryPool"),Ht=d((nt,J,rt=!1)=>{const ut=A(nt);for(const pt of ut){const St={midX:pt.midX,midY:pt.midY};if(J&&!ft(pt,St))continue;const wt=j(St);if(wt&&!Wn(wt.rect,C)&&!u(l,wt.rect)&&!c(l,wt.rect)&&(rt||!f(h.id,wt.rect)))return{laneId:wt.laneId,anchor:wt.anchor}}},"findLaneContainingFallback"),Ft=Mt(I)??(I.lengthrt.labelId===l);J>=0?p[J]={labelId:l,rect:nt}:p.push({labelId:l,rect:nt})}}}d(Je,"anchorLabelsToPolyline");var En=1e-6,Qr=8,Do=Qr/2,ti=3;function Kn(t,e){return t{const g=Kn(a,c);let p=0;const M=d(u=>{if(!u)return;const h=s.get(u);if(!h)return;const l=f==="x"?h.w/2:h.h/2;l>p&&(p=l)},"consider");M(i.labelNodeId);for(const u of t){if(u===i||u.isLayoutOnly)continue;const h=u.start,l=u.end;!h||!l||Kn(h,l)===g&&M(u.labelNodeId)}return p>0?p+ti:0},"labelClearanceFor");for(const i of t){if(i.isLayoutOnly)continue;const a=i.points;if(!lo(a,En))continue;const c=go(i,n,En);if(!c)continue;const{srcId:f,dstId:g,srcInfo:p,dstInfo:M,collinearX:u,collinearY:h}=c;if(u===h)continue;let l,x;if(u){const y=M.cy>p.cy;l={x:p.cx,y:y?p.rect.bottom:p.rect.top},x={x:M.cx,y:y?M.rect.top:M.rect.bottom}}else{const y=M.cx>p.cx;l={x:y?p.rect.right:p.rect.left,y:p.cy},x={x:y?M.rect.left:M.rect.right,y:M.cy}}if(Pt(l,x,o,[f,g],1))continue;const b=r(i,f,g,u?"x":"y"),v=b>Do?b:Do,L=[0,v,-v];for(const y of L){const I={...l},E={...x};if(u){if(I.x+=y,E.x+=y,I.x<=p.rect.left||I.x>=p.rect.right||E.x<=M.rect.left||E.x>=M.rect.right)continue}else if(I.y+=y,E.y+=y,I.y<=p.rect.top||I.y>=p.rect.bottom||E.y<=M.rect.top||E.y>=M.rect.bottom)continue;if(!Pt(I,E,o,[f,g],1)&&!nn(I,E,t,i,{epsilon:En})){i.points=[I,E];break}}}}d(Ns,"straightenCollinearSiblingDetours");function qn(t,e){const{realNodeRects:c,labelNodeRects:f}=Me(e.values()),g=d((y,I)=>Be(I,.001).map(E=>({...E,edge:y,interior:E.index>=1&&E.index<=I.length-3})),"segmentsFor"),p=d(()=>{const y=[];for(const I of t){if(I.isLayoutOnly)continue;const E=I.points;!E||E.length<2||y.push(...g(I,xt(E)))}return y},"allSegments"),M=d((y,I)=>y.horizontal&&I.horizontal?Wt(y.a.x,y.b.x,I.a.x,I.b.x)>=8&&Math.abs(y.a.y-I.a.y)<7:y.vertical&&I.vertical?Wt(y.a.y,y.b.y,I.a.y,I.b.y)>=8&&Math.abs(y.a.x-I.a.x)<7:!1,"hasCrowdedParallelTrack"),u=d((y,I)=>{const E=y.start,A=y.end,B=g(y,I);if(B.length!==I.length-1)return!1;const O=[E,A].filter(H=>!!H),k=y.labelNodeId?[y.labelNodeId]:[];for(const H of B)if(Pt(H.a,H.b,c,O,-2)||Pt(H.a,H.b,f,k,-2))return!1;for(const H of t){if(H===y||H.isLayoutOnly)continue;const P=H.points;if(!(!P||P.length<2)){for(const G of B)for(const j of g(H,xt(P)))if(M(G,j)||he(G.a,G.b,j.a,j.b,.001))return!1}}return!0},"candidateIsSafe"),h=d((y,I)=>{const E=xt(y.edge.points??[]);if(E.length<4||y.index>=E.length-1)return;const A=E.map(B=>({...B}));if(y.horizontal)A[y.index].y+=I,A[y.index+1].y+=I;else if(y.vertical)A[y.index].x+=I,A[y.index+1].x+=I;else return;return g(y.edge,A).length===A.length-1?A:void 0},"shiftedCandidate"),l=d((y,I)=>({x:y.x??(I.left+I.right)/2,y:y.y??(I.top+I.bottom)/2}),"nodeCenter"),x=d(y=>{const I=y.edge,E=xt(I.points??[]);if(E.length!==4||y.index!==1)return;const A=I.start?e.get(I.start):void 0,B=I.end?e.get(I.end):void 0,O=A?te(A):void 0,k=B?te(B):void 0,H=E.slice(y.index+2);if(!(!A||!B||!O||!k||H.length===0))return{sourceCenter:l(A,O),targetCenter:l(B,k),sourceRect:O,tail:H}},"sourceDetourContextFor"),C=d((y,I,E,A,B,O)=>{const k=A.y>=E.y,H=k?B.bottom:B.top,P=H+(k?20:-20);if(k&&y.b.y<=P+.001||!k&&y.b.y>=P-.001)return;const G=y.a.x+I;return xt([{x:E.x,y:H},{x:E.x,y:P},{x:G,y:P},{x:G,y:y.b.y},...O],.001)},"verticalSourceDetour"),b=d((y,I,E,A,B,O)=>{const k=A.x>=E.x,H=k?B.right:B.left,P=H+(k?20:-20);if(k&&y.b.x<=P+.001||!k&&y.b.x>=P-.001)return;const G=y.a.y+I;return xt([{x:H,y:E.y},{x:P,y:E.y},{x:P,y:G},{x:y.b.x,y:G},...O],.001)},"horizontalSourceDetour"),v=d((y,I)=>{const E=x(y);if(E){if(y.vertical)return C(y,I,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail);if(y.horizontal)return b(y,I,E.sourceCenter,E.targetCenter,E.sourceRect,E.tail)}},"sourceDetourCandidate"),L=[-7,7,-2*7,2*7,-3*7,3*7];for(let y=0;y<12;y++){const I=p();let E=!1;for(let A=0;AP.interior);for(const P of H){for(const G of L){const j=h(P,G);if(j&&u(P.edge,j)){P.edge.points=j,E=!0;break}const tt=v(P,G);if(tt&&u(P.edge,tt)){P.edge.points=tt,E=!0;break}}if(E)break}}if(!E)return}}d(qn,"nudgeSharedInteriorSubpaths");function Os(t,e,n,o){const s=e.x-t.x,r=e.y-t.y,i=o.x-n.x,a=o.y-n.y,c=s*a-r*i;if(Math.abs(c)<1e-10)return!1;const f=n.x-t.x,g=n.y-t.y,p=(f*a-g*i)/c,M=(f*r-g*s)/c,u=.01;return p>u&&p<1-u&&M>u&&M<1-u}d(Os,"segmentsIntersect");function Ps(t){const e=t.nodes??[],n=t.edges??[],o=[];if(!n.length||!e.length)return o;const s=rs(e),r=[];for(const a of n){if(a.isLayoutOnly)continue;const c=a.points;if(!c||c.length<2)continue;const f=a.start,g=a.end,p=a.labelNodeId,M=a.id??`${f}->${g}`;for(const u of s)if(!(u.nodeId===f||u.nodeId===g)&&!(p&&u.nodeId===p)){for(let h=0;h0){const a=o.filter(f=>f.type==="edge-node-overlap").length,c=o.filter(f=>f.type==="edge-edge-crossing").length;Qe.warn(`[SWIMLANE_VALIDATE] ${o.length} issue(s) detected: ${a} edge-node overlap(s), ${c} edge crossing(s)`);for(const f of o)Qe.warn(`[SWIMLANE_VALIDATE] ${f.type}: ${f.detail}`)}return o}d(Ps,"validateSwimlanesLayout");function Bs(t,e){const n=t.nodes??[],o=t.edges??[],s=n.filter(a=>!a.isGroup);if((e==="LR"||e==="RL")&&s.length>0&&!Ms(t,e)||e==="BT"&&s.length>0&&!bs(t))return;for(const a of o){if(a.isLayoutOnly)continue;const c=a.points;!c||c.length<2||(a.points=ue(on(c)))}As(o,n),Ns(o,n),Is(o,n);const r=new Map;for(const a of n)r.set(String(a.id),a);Je(o,r),fs(o,r),Ss(o,r),qn(o,r),Cs(o,r),vs(o,r),zn(o,r),Ls(o,r);const i=d(()=>{ws(o,r),Es(o,r),Ts(o,r),Je(o,r),Gn(o,r),zn(o,r),Je(o,r),Gn(o,r)},"finalizeRenderedEdges");i(),qn(o,r),i(),Vn(o,r),jn(o,r),Vn(o,r),jn(o,r)}d(Bs,"postProcessSwimlaneLayout");function Ie(t){const e=new Map(t.nodeById),n=new Set,o=[];for(const r of t.edges){if(!e.has(r.src)||!e.has(r.dst))continue;const i=`${r.id}:${r.src}->${r.dst}`;n.has(i)||(n.add(i),o.push(r))}return{nodes:[...e.keys()],edges:o,layout:t.layout,nodeById:e}}d(Ie,"normalizeGraph");function Mo(t,e){return t.edges.filter(n=>n.dst===e)}d(Mo,"incoming");function ks(t){const e=new Map;for(const n of t.nodes)e.set(n,[]);for(const n of t.edges)e.get(n.src).push(n.dst);return e}d(ks,"buildSuccessorMap");function Io(t){const e=ks(t);for(const n of e.values())n.sort((o,s)=>o.localeCompare(s));return e}d(Io,"buildSortedSuccessorMap");function So(t){const e=new Map;for(const n of t.nodes)e.set(n,0);for(const n of t.edges)e.set(n.dst,(e.get(n.dst)??0)+1);return e}d(So,"buildInDegreeMap");function Co(t){return[...t.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,n)=>e.localeCompare(n))}d(Co,"sortedZeroInDegreeNodes");function hn(t,e=()=>!0){const n=new Map,o=new Map;for(const s of t.nodes)n.set(s,[]),o.set(s,[]);for(const s of t.edges)e(s)&&(o.get(s.src).push(s.dst),n.get(s.dst).push(s.src));return{preds:n,succs:o}}d(hn,"buildPredecessorSuccessorMaps");function vo(t,e,n,o){var i,a;let s=0;for(const c of t.nodes)o!=null&&o.skipGroups&&((i=t.nodeById.get(c))!=null&&i.isGroup)||(s=Math.max(s,n[c]??0));const r=Array.from({length:s+1},()=>[]);for(const c of e)o!=null&&o.skipGroups&&((a=t.nodeById.get(c))!=null&&a.isGroup)||r[Math.max(0,n[c]??0)].push(c);return r}d(vo,"buildLayersFromRanks");function De(t){const e=So(t),n=Co(e),o=[],s=Io(t);for(;n.length;){const r=n.shift();o.push(r);for(const i of s.get(r)??[])if(e.set(i,(e.get(i)??0)-1),(e.get(i)??0)===0){let a=0;for(;a{if(s-o<=1)return 0;const r=o+s>>1;let i=n(o,r)+n(r,s),a=o,c=r,f=o;for(;a=s||ap.dst===M.dst?p.id.localeCompare(M.id):p.dst.localeCompare(M.dst));const o=Object.create(null);for(const g of e.nodes)o[g]=0;const s=[],r=d(g=>{o[g]=1;for(const p of n.get(g)??[]){const M=p.dst;o[M]===0?r(M):o[M]===1&&s.push(p)}o[g]=2},"dfs"),i=[...e.nodes].sort((g,p)=>g.localeCompare(p));for(const g of i)o[g]===0&&r(g);const a=new Set(s.map(g=>`${g.id}:${g.src}->${g.dst}`)),c=e.edges.map(g=>a.has(`${g.id}:${g.src}->${g.dst}`)?{id:g.id,src:g.dst,dst:g.src,weight:g.weight,ref:g.ref}:g);return{acyclic:{nodes:[...e.nodes],edges:c,layout:e.layout,nodeById:new Map(e.nodeById)},reversed:s}}d(_s,"removeCycles_DFS");function Fs(t){const e=new Map,n=d(o=>{if(e.has(o))return e.get(o);const s=t.nodeById.get(o);if(!s)return e.set(o,null),null;const r=s.parentId;if(!r)return e.set(o,null),null;const a=n(r)??r;return e.set(o,a),a},"resolve");for(const o of t.nodes)n(o);return e}d(Fs,"buildTopLaneMap");function ge(t){const e=Fs(t);return n=>e.get(n)??null}d(ge,"createTopLaneResolver");function gn(t){const e=[];for(const n of t.layout.nodes??[])n.isGroup&&!n.parentId&&e.push(n.id);return[...new Set(e)].reverse()}d(gn,"buildTopLaneOrder");function Eo(t,e){const n=gn(t);if(!e||e.length===0)return n;const o=new Set(n),s=new Set,r=[];for(const i of e)!o.has(i)||s.has(i)||(s.add(i),r.push(i));for(const i of n)s.has(i)||r.push(i);return r}d(Eo,"resolveTopLaneOrder");var ei={EPSILON:1e-6},ln={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Ho={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40};function Ds(t,e){const n=Ie(t),o=(e==null?void 0:e.laneOf)??(()=>null),s=e==null?void 0:e.rankHint,{preds:r}=hn(n);for(const y of r.values())y.sort((I,E)=>I.localeCompare(E));const i=De(n)??[...n.nodes].sort((y,I)=>y.localeCompare(I)),a=new Map;for(const[y,I]of i.entries())a.set(I,y);const c=new Map,f=new Map;for(const y of n.nodes)f.set(y,[]);for(const y of i){const I=(r.get(y)??[]).filter(E=>c.has(E));if(I.length>0){const E=Hs(y,I,{laneOf:o,rankHint:s,topoIndex:a});c.set(y,E),f.get(E).push(y)}else c.has(y)||c.set(y,null)}for(const y of n.nodes)c.has(y)||c.set(y,null);const g=new Set;for(const y of n.nodes)(c.get(y)??null)===null&&g.add(y);const p=[...g].sort((y,I)=>{const E=a.get(y)??0,A=a.get(I)??0;return E===A?y.localeCompare(I):E-A}),M=Xs(n),u=new Map;for(const[y,I]of M.entries())u.set(y,[...I].sort((E,A)=>E.localeCompare(A)));const h=Ys(u),l=Gs(u),x=new Map;for(const y of n.nodes)x.set(y,[]);for(const y of l)for(const I of y.nodes){const E=x.get(I);E?E.push(y.id):x.set(I,[y.id])}const C=[],b=[],v=new Set,L=d(y=>{if(!v.has(y)){v.add(y),C.push(y);for(const I of f.get(y)??[])L(I);b.push(y)}},"walk");for(const y of p)L(y);for(const y of i)L(y);return{parent:c,children:f,roots:p,componentOf:h,blocks:l,nodeBlocks:x,adjacency:u,preorder:C,postorder:b,topologicalOrder:i}}d(Ds,"buildDrivingTree");function Hs(t,e,n){const o=n.laneOf(t);return[...e].sort((r,i)=>{var l,x;const a=n.laneOf(r),c=n.laneOf(i),f=a!=null&&a===o,g=c!=null&&c===o;if(f!==g)return f?-1:1;const p=(l=n.rankHint)==null?void 0:l[r],M=(x=n.rankHint)==null?void 0:x[i];if(p!=null&&M!=null&&p!==M)return M-p;const u=n.topoIndex.get(r)??0,h=n.topoIndex.get(i)??0;return u!==h?u-h:r.localeCompare(i)})[0]}d(Hs,"chooseParent");function Xs(t){const e=new Map;for(const n of t.nodes)e.set(n,new Set);for(const n of t.edges)e.get(n.src).add(n.dst),e.get(n.dst).add(n.src);return e}d(Xs,"buildAdjacency");function Ys(t){const e=new Map;let n=0;for(const o of t.keys()){if(e.has(o))continue;const s=[o];for(;s.length>0;){const r=s.pop();if(!e.has(r)){e.set(r,n);for(const i of t.get(r)??[])e.has(i)||s.push(i)}}n++}return e}d(Ys,"assignComponents");function Gs(t){const e=new Map,n=new Map,o=[],s=[];let r=0;const i=d((a,c)=>{e.set(a,++r),n.set(a,r);for(const f of t.get(a)??[])f!==c&&(e.has(f)?(e.get(f)??0)<(e.get(a)??0)&&(o.push([a,f]),n.set(a,Math.min(n.get(a)??r,e.get(f)??r))):(o.push([a,f]),i(f,a),n.set(a,Math.min(n.get(a)??r,n.get(f)??r)),(n.get(f)??0)>=(e.get(a)??0)&&s.push($s(a,f,o,s.length))))},"visit");for(const a of t.keys())e.has(a)||i(a,null);return s}d(Gs,"computeBlocks");function $s(t,e,n,o){const s=[],r=new Set;for(;n.length>0;){const i=n.pop();if(s.push(i),r.add(i[0]),r.add(i[1]),i[0]===t&&i[1]===e||i[0]===e&&i[1]===t)break}return{id:o,edges:s,nodes:[...r]}}d($s,"popBlock");function zs(t,e,n){const o=[...t.nodes],s=new Map;for(const[b,v]of o.entries())s.set(v,b);const r=o.length,i=new Array(r).fill(-1),a=new Array(r).fill(0),c=[],f=new Set;for(const b of o){const v=n.parent.get(b)??null,L=s.get(b);L!=null&&v==null&&(i[L]=-1,a[L]=0,f.has(b)||(f.add(b),c.push(b)))}for(;c.length>0;){const b=c.shift(),v=s.get(b);if(v==null)continue;const L=n.children.get(b)??[];for(const y of L){if(f.has(y))continue;const I=s.get(y);I!=null&&(i[I]=v,a[I]=a[v]+1,f.add(y),c.push(y))}}for(const b of o){if(f.has(b))continue;const v=s.get(b);v!=null&&(i[v]=-1,a[v]=0,f.add(b))}const g=Math.max(1,Math.ceil(Math.log2(Math.max(1,r)))+1),p=Array.from({length:g},()=>new Array(r).fill(-1));for(let b=0;b{if(b===-1||v===-1)return-1;a[b]>y&1&&(b=p[y][b],b===-1))return-1;if(b===v)return b;for(let y=g-1;y>=0;y--){const I=p[y][b],E=p[y][v];I===-1||E===-1||I!==E&&(b=I,v=E)}return p[0][b]},"lcaIndex"),u=Array.from({length:r},()=>new Map);for(const b of t.edges){let v=b.src,L=b.dst,y=e[v],I=e[L];if(y==null||I==null||(y>I&&([v,L]=[L,v],[y,I]=[I,y]),y==null||I==null||y===I))continue;const E=s.get(v),A=s.get(L);if(E==null||A==null)continue;const B=M(E,A);if(B===-1)continue;const O=u[B];for(let k=y;k{if(v.size!==0)for(const[L,y]of v)b.set(L,(b.get(L)??0)+y)},"mergeInto"),x=new Set,C=d(b=>{const v=s.get(b);x.add(b);const L=v==null?void 0:u[v],y=L?new Map(L):new Map,I=n.children.get(b)??[];for(const E of I){const A=C(E),B=e[b];if(B!=null){let O=h.get(b);O||(O=new Map,h.set(b,O));let k=A.get(B)??0;const H=e[E];H!=null&&H>B&&(k+=1),O.set(E,k)}l(y,A)}return y},"dfs");for(const b of n.roots)x.has(b)||C(b);for(const b of o)x.has(b)||C(b);return h}d(zs,"computeSubtreeCrossCounts");function Vs(t,e,n){const o=new Map,s=d(r=>{let i=n[r]??0;const a=[...e.get(r)??[]];a.sort(To(n));for(const c of a){s(c);const f=o.get(c);f!=null&&(i=Math.min(i,f))}o.set(r,i)},"annotate");for(const r of t)s(r);return o}d(Vs,"annotateMinimumLayers");function To(t){return(e,n)=>{const o=t[e]??0,s=t[n]??0;return o===s?e.localeCompare(n):o-s}}d(To,"compareByRankThenId");function js(t,e,n,o){let s=0;for(const c of e){const f=n[c]??0;f>s&&(s=f)}const r=Array.from({length:s+1},()=>[]),i=new Set,a=d(c=>{if(i.has(c))return;i.add(c);const f=n[c]??0;r[f]||(r[f]=[]),r[f].push(c);for(const g of o(c))a(g)},"emit");for(const c of t)a(c);for(const c of e)if(!i.has(c)){const f=n[c]??0;r[f]||(r[f]=[]),r[f].push(c),i.add(c)}return r}d(js,"emitNodesInTreeOrder");function Us(t){const e=[];for(const n of t){const o=new Set,s=[];for(const r of n)o.has(r)||(o.add(r),s.push(r));e.push(s)}return e}d(Us,"deduplicateLayers");function Ws(t,e,n,o){return s=>{const r=t.get(s)??[];if(r.length===0)return[];const i=e[s]??0,a=[],c=[],f=n.get(s);for(const g of r){const p=o.get(g)??i;p>i?a.push({child:g,min:p}):c.push(g)}return a.sort((g,p)=>g.min===p.min?g.child.localeCompare(p.child):g.min-p.min),c.sort((g,p)=>{const M=(f==null?void 0:f.get(g))??0,u=(f==null?void 0:f.get(p))??0;if(M!==u)return M-u;const h=o.get(g)??i,l=o.get(p)??i;return h!==l?h-l:g.localeCompare(p)}),[...a.map(g=>g.child),...c]}}d(Ws,"createChildOrderer");function fn(t,e,n){const o=Ds(t,{rankHint:e,laneOf:n}),{children:s,roots:r}=o;for(const p of t.nodes)s.has(p)||s.set(p,[]);const i=zs(t,e,o),a=[...r].sort(To(e)),c=Vs(a,s,e),f=Ws(s,e,i,c);let g=js(a,t.nodes,e,f);return g=Us(g),g}d(fn,"buildMultitreeLayerOrder");function Ks(t,e,n){const o=new Set(t),s=new Set(e),r=ke(e),i=[];for(const a of n)o.has(a.src)&&s.has(a.dst)&&i.push(r.get(a.dst));return Lo(i)}d(Ks,"countCrossingsBetweenAdjacent");function Jn(t,e,n){const o=[];for(const r of e){const i=n[r.src],a=n[r.dst];if(i==null||a==null||i===a)continue;let c=r.src,f=r.dst,g=i,p=a;i>a&&(c=r.dst,f=r.src,g=a,p=i);for(let M=g;M(n[M]??0)-(n[p]??0));for(const p of g){const M=n[p]??0;if(M===0)continue;let u=0;for(const C of o.get(p)??[])u=Math.max(u,(n[C]??0)+1);if(u>=M)continue;const h=M;n[p]=u;const l=fn(t,n,s),x=Jn(l,t.edges,n);x(e[s]??0)-(e[r]??0)||s.localeCompare(r));for(const s of o){const r=n(s);if(!r)continue;const i=t.edges.filter(l=>l.src===s);if(i.length===0)continue;let a=!1,c=0;for(const l of i){const x=n(l.dst);x==null||x===r?a=!0:c++}if(c===0||a)continue;let f=0,g=!1;for(const l of t.edges){if(l.dst!==s)continue;const x=n(l.src);x&&(x===r?g=!0:f++)}if(f>0||!g)continue;const p=e[s]??0,M=p+c;let u=0;for(const l of t.edges)l.dst===s&&(u=Math.max(u,(e[l.src]??0)+1));const h=Math.max(p,u,M);h!==p&&(e[s]=h)}}d(Js,"adjustCrossLaneSources");function Zs(t,e){const n=Ie(t),o=De(n)??[...n.nodes].sort(),s=(e==null?void 0:e.compactSingleInput)??!1,r=ge(n);let i=Object.create(null);for(const c of o){const f=Mo(n,c),g=e!=null&&e.ignoreCrossLaneEdges?f.filter(p=>{const M=r(p.src),u=r(c);return!M||!u?!0:M===u}):f;if(g.length===0)i[c]=0;else if(s&&g.length===1){const p=g[0].src,M=r(p),u=r(c);M!==u?i[c]=i[p]??0:i[c]=(i[p]??0)+1}else{let p=-1/0;for(const M of g)p=Math.max(p,(i[M.src]??0)+1);i[c]=p===-1/0?0:p}}return((e==null?void 0:e.optimizeRanksByCrossings)??!1)&&(i=qs(n,i)),e!=null&&e.ignoreCrossLaneEdges&&Js(n,i),{layers:fn(n,i,r),rankOf:i,dummy:new Set}}d(Zs,"assignLayers_LongestPath");function Qs(t,e){const n=Ie(t),s={...Zs(n,{compactSingleInput:e==null?void 0:e.compactSingleInput,ignoreCrossLaneEdges:e==null?void 0:e.ignoreCrossLaneEdges,optimizeRanksByCrossings:e==null?void 0:e.optimizeRanksByCrossings}).rankOf},r=ge(n),{preds:i,succs:a}=hn(n,h=>{if(e!=null&&e.ignoreCrossLaneEdges){const l=r(h.src),x=r(h.dst);if(l&&x&&l!==x)return!1}return!0}),c=De(n)??[...n.nodes],f=[...c].reverse(),g=d((h,l)=>{let x=0;for(const v of i.get(h)??[])x=Math.max(x,(s[v]??0)+1);let C=Number.POSITIVE_INFINITY;const b=a.get(h)??[];return b.length>0&&(C=Math.min(...b.map(v=>(s[v]??0)-1))),Number.isFinite(C)||(C=Math.max(x,l)),Math.min(Math.max(l,x),C)},"clampFeasible"),p=ln.GRAVITY_ITERATIONS,M=d(h=>{let l=!1;for(const x of h){const C=i.get(x)??[],b=a.get(x)??[];if(C.length===0&&b.length===0)continue;const v=C.length>0?C.reduce((E,A)=>E+(s[A]??0)+1,0)/C.length:s[x]??0,L=b.length>0?b.reduce((E,A)=>E+(s[A]??0)-1,0)/b.length:s[x]??0,y=Math.round((v+L)/2),I=g(x,y);I!==s[x]&&(s[x]=I,l=!0)}return l},"relaxOrder");for(let h=0;h0){const x=Math.min(...l.map(C=>(s[C]??0)-1));(s[h]??0)>x&&(s[h]=x)}}return{layers:vo(n,c,s),rankOf:s,dummy:new Set}}d(Qs,"assignLayers_Gravity");function tr(t){const e=So(t),n=Io(t);let o=Co(e);const s=[];for(;o.length>0;){const r=[];for(const i of o){s.push(i);for(const a of n.get(i)??[])e.set(a,(e.get(a)??0)-1),(e.get(a)??0)===0&&r.push(a)}o=r.sort((i,a)=>i.localeCompare(a))}return s.length===t.nodes.length?s:null}d(tr,"topoSortByGenerationIfAcyclic");function er(t,e){const n=Ie(t),o=(e==null?void 0:e.direction)==="LR"?tr(n)??[...n.nodes].sort():De(n)??[...n.nodes].sort(),s=ge(n),r=d(g=>s(g)??g,"laneOf"),i=Object.create(null),a=new Map,c=d((g,p)=>(e==null?void 0:e.ignoreCrossLaneEdges)??!0?r(g)===r(p)?1:0:1,"edgeWeight");for(const g of o){const p=n.nodeById.get(g);if(p!=null&&p.isGroup)continue;const M=Mo(n,g);let u=0;if(M.length>0)for(const C of M){const b=C.src,v=i[b]??0;u=Math.max(u,v+c(b,g))}const h=r(g),l=a.get(h)??0,x=Math.max(u,l);i[g]=x,a.set(h,x+1)}return{layers:vo(n,o,i,{skipGroups:!0}),rankOf:i,dummy:new Set}}d(er,"assignLayers_LaneAwareCompact");function nr(t,e){const n=Ie(e),{rankOf:o}=t,s=t.layers.map(u=>[...u]),r=new Set(t.dummy?[...t.dummy]:[]);let i=0;const a=new Map(n.nodeById),c=d(u=>{const h=`placeholder-${i++}`,l={id:h,isGroup:!1,isDummy:!0,width:0,height:0};for(a.set(h,l),r.add(h);s.length<=u;)s.push([]);return s[u].push(h),o[h]=u,h},"addDummyAt"),f=[...n.edges].sort((u,h)=>u.id===h.id?u.src===h.src?u.dst.localeCompare(h.dst):u.src.localeCompare(h.src):u.id.localeCompare(h.id)),g=[];for(const u of f){const h=o[u.src]??0,l=o[u.dst]??0;if(l-h<=1){g.push(u);continue}let x=u.src;for(let b=h+1,v=0;b!n.nodes.includes(u))],edges:g,layout:n.layout,nodeById:a};return{layering:{layers:s,rankOf:o,dummy:r},graphWithDummies:M}}d(nr,"makeProperLayering");function Zn(t){const e=t.length;if(e===0)return Number.POSITIVE_INFINITY;const n=[...t].sort((o,s)=>o-s);return e%2===1?n[(e-1)/2]:.5*(n[e/2-1]+n[e/2])}d(Zn,"median");function Qn(t){return t.length===0?Number.POSITIVE_INFINITY:t.reduce((n,o)=>n+o,0)/t.length}d(Qn,"barycenter");function or(t,e,n,o){const s=new Map;for(const r of t)s.set(r,[]);for(const r of n)o==="down"?e.has(r.src)&&s.has(r.dst)&&s.get(r.dst).push(e.get(r.src)):e.has(r.dst)&&s.has(r.src)&&s.get(r.src).push(e.get(r.dst));return s}d(or,"neighborPositionsFor");function sr(t,e,n){const o=n.get(t)??0,s=n.get(e)??0;return o!==s?o-s:t.localeCompare(e)}d(sr,"currentOrderTieBreak");function to(t,e,n){const o=new Set(t),s=new Set(e),r=ke(t),i=ke(e),a=[];for(const f of n)o.has(f.src)&&s.has(f.dst)&&a.push({u:r.get(f.src),v:i.get(f.dst)});a.sort((f,g)=>f.u===g.u?f.v-g.v:f.u-g.u);const c=a.map(f=>f.v);return Lo(c)}d(to,"countCrossingsBetweenAdjacent");function Ze(t,e,n){return[...t].sort((o,s)=>{const r=Zn(e.get(o)??[]),i=Zn(e.get(s)??[]);return r===i?sr(o,s,n):isFinite(r)?isFinite(i)?r-i:-1:1})}d(Ze,"sortByHeuristic");function eo(t,e,n,o,s,r){const i=ke(t),a=ke(e),c=or(e,i,n,o);if(!s||!r||r.length===0)return Ze(e,c,a);const f=new Map;for(const M of e){const u=s(M),h=f.get(u)??[];h.push(M),f.set(u,h)}const g=[];for(const M of r){const u=f.get(M);if(!u||u.length===0)continue;const h=Ze(u,c,a);g.push(...h)}const p=f.get(null);if(p&&p.length>0){const M=Ze(p,c,a);for(const u of M){const h=Qn(c.get(u)??[]);let l=g.length;if(isFinite(h))for(const[x,C]of g.entries()){const b=Qn(c.get(C)??[]);if(hi.has(l.src)&&a.has(l.dst)),g=c?n.filter(l=>a.has(l.src)&&c.has(l.dst)):void 0,p=d(l=>{let x=to(t,l,f);return g&&o&&(x+=to(l,o,g)),x},"crossingScore"),M=s?new Map:null;if(s&&M)for(const l of e)M.set(l,s(l));let u=!0,h=p(r);for(;u;){u=!1;for(let l=0;l+1[...a]),s=e.edges,r=ge(e),i=Eo(e,n==null?void 0:n.laneOrder);for(let a=0;a<3;a++){for(let c=1;c=0;c--)o[c]=eo(o[c+1],o[c],s,"up",r,i),o[c]=no(o[c+1],o[c],s,o[c-1],r)}return{layers:o}}d(rr,"orderLayers");function ir(t,e,n){const o=(n==null?void 0:n.layerGap)??Ho.DEFAULT_LAYER_GAP,s=(n==null?void 0:n.nodeGap)??Ho.DEFAULT_NODE_GAP,r=(n==null?void 0:n.laneGap)??s*2,i=(n==null?void 0:n.direction)??"TB",a=i==="LR"||i==="RL",c=t.layers,f=Object.create(null),g=Object.create(null),p=d(O=>e.nodeById.get(O),"getNode"),M=d(O=>{var k;return((k=p(O))==null?void 0:k.width)??0},"getWidth"),u=d(O=>{var k;return((k=p(O))==null?void 0:k.height)??0},"getHeight"),h=ge(e),l=Eo(e,n==null?void 0:n.laneOrder),x=c.map(O=>O.reduce((k,H)=>Math.max(k,u(H)),0)),C=[];if(a)for(let O=0;O+1Math.max(Mt,M(Ht)),0),H=c[O+1].reduce((Mt,Ht)=>Math.max(Mt,M(Ht)),0),P=x[O],G=x[O+1],j=P/2+G/2,tt=(k+H)/2,ft=Math.max(0,tt-j-o);C.push(ft)}const b=new Set;for(const O of c)for(const k of O)b.add(h(k));const v=b.has(null),L=l.filter(O=>b.has(O)),y=[...v?[null]:[],...L],I=Object.create(null);for(const O of L)I[O]=0;v&&(I.null=0);for(const O of c){const k=Object.create(null),H=[];for(const P of O){const G=h(P);G===null?H.push(P):(k[G]||(k[G]=[])).push(P)}for(const[P,G]of Object.entries(k)){const j=G.reduce((tt,ft)=>tt+M(ft),0)+s*Math.max(0,G.length-1);I[P]=Math.max(I[P]??0,j)}if(v&&H.length){const P=H.reduce((G,j)=>G+M(j),0)+s*Math.max(0,H.length-1);I.null=Math.max(I.null??0,P)}}const E=new Map;{const O=y.map(P=>(P===null?I.null:I[P])??0);let H=-(O.reduce((P,G)=>P+G,0)+r*Math.max(0,y.length-1))/2;for(let P=0;PM(nt)),Ht=Mt.reduce((nt,J)=>nt+J,0)+s*(tt.length-1);let Ft=ft-Ht/2;for(const[nt,J]of tt.entries()){const rt=Mt[nt];f[J]=Ft+rt/2,g[J]=A+H/2,Ft+=rt+s}}}const G=C[O]??0;A+=H+o+G}const B=new Map;for(const O of e.edges){const k=O.ref.id;B.has(k)||B.set(k,[]),B.get(k).push(O)}for(const[,O]of B){if(O.length===0)continue;const k=O[0].ref,H=k.start,P=k.end;if(H==null||P==null)continue;const G=Math.round(((f[H]??0)+(f[P]??0))/2),j=new Set;for(const tt of O)j.add(tt.src),j.add(tt.dst);for(const tt of j){if(tt===H||tt===P)continue;const ft=e.nodeById.get(tt);ft!=null&&ft.isDummy&&(f[tt]=G)}}return{x:f,y:g}}d(ir,"assignCoordinates");var cr=8;function ar(t){let e=2166136261;for(let n=0;n>>0}d(ar,"hashString");function lr(t){let e=t>>>0;return()=>{e+=1831565813;let n=e;return n=Math.imul(n^n>>>15,n|1),n^=n+Math.imul(n^n>>>7,n|61),((n^n>>>14)>>>0)/4294967296}}d(lr,"mulberry32");function fr(t,e){const n=[...t],o=lr(e);for(let s=n.length-1;s>0;s--){const r=Math.floor(o()*(s+1));[n[s],n[r]]=[n[r],n[s]]}return n}d(fr,"deterministicShuffle");function dr(t,e){let n=0;for(const[o,s]of t.entries())n+=Math.abs(o-(e.get(s)??o));return n}d(dr,"sourceDistance");function oo(t,e){const n=new Map;for(const[s,r]of t.entries())n.set(r,s);let o=0;for(const{a:s,b:r,weight:i}of e){const a=n.get(s),c=n.get(r);a==null||c==null||(o+=i*Math.abs(a-c))}return o}d(oo,"laneArrangementCost");function ur(t){const e=gn(t);if(e.length<2)return[];const n=new Map(e.map((r,i)=>[r,i])),o=ge(t),s=new Map;for(const r of t.layout.edges??[]){if(r.isLayoutOnly)continue;const i=typeof r.start=="string"?r.start:void 0,a=typeof r.end=="string"?r.end:void 0;if(!i||!a||!t.nodeById.has(i)||!t.nodeById.has(a))continue;const c=o(i),f=o(a);if(!c||!f||c===f)continue;const g=n.get(c),p=n.get(f);if(g==null||p==null)continue;const[M,u]=g<=p?[c,f]:[f,c],h=`${M}\0${u}`,l=s.get(h);l?l.weight++:s.set(h,{a:M,b:u,weight:1})}return[...s.values()]}d(ur,"buildWeightedLaneEdges");function so(t,e,n){const o=[...t];let s=oo(o,e),r=!0,i=0;const a=Math.max(1,o.length);for(;r&&is.a===r.a?s.b.localeCompare(r.b):s.a.localeCompare(r.a)).map(({a:s,b:r,weight:i})=>`${s}:${r}:${i}`).join("|");return ar(`${t.join("|")}#${o}#${n}`)}d(gr,"seedForRestart");function mr(t,e={}){const n=gn(t);if(n.length<2)return n;const o=ur(t);if(o.length===0)return n;const s=new Map(n.map((a,c)=>[a,c]));let r=so(n,o,s);const i=Math.max(0,e.restarts??cr);for(let a=0;alt&&c*3>=a?i>0?"bottom":"top":a>lt?r>0?"right":"left":n}d(ro,"chooseOrthogonalSide");function io(t,e){return Math.abs(t.to-e.from)m.isGroup&&!m.parentId);for(const m of f){const S={id:m.id},w=d(T=>{i.set(T.id,S),n.filter(N=>N.parentId===T.id).forEach(w)},"assignLane");w(m)}const g=n.filter(m=>!m.isGroup&&!m.isEdgeLabel).map(m=>{const S=m.width??10,w=m.height??10,T=m.x??0,N=m.y??0,D=ni;return{nodeId:m.id,minX:T-S/2-D,maxX:T+S/2+D,minY:N-w/2-D,maxY:N+w/2+D,visualXHalfExtent:c?w/2+D:S/2+D}}),p=d((m,S,w,T)=>{let N=a.find(D=>D.orientation===m&&Math.abs(D.coord-S)<1);return N||(N={id:`pipe-${m}-${S.toFixed(0)}`,orientation:m,coord:S,spanMin:w,spanMax:T,tracks:[]},a.push(N)),N.spanMin=Math.min(N.spanMin,w),N.spanMax=Math.max(N.spanMax,T),N},"getOrAddPipe"),M=d((m,S)=>{const w=m.width??10,T=m.height??10,N=m.x??0,D=m.y??0;switch(S){case"top":return{x:N,y:D-T/2};case"bottom":return{x:N,y:D+T/2};case"left":return{x:N-w/2,y:D};case"right":return{x:N+w/2,y:D}}},"portForSide"),u=d((m,S,w)=>M(m,ro(m,S,w?"bottom":"top")),"getOrthogonalPort"),h=[],l=[],x=new Set,C=1e3,b=d((m,S,w)=>{if(h.length===0)return 0;const T=Math.abs(S.y-w.y)U||z.from-lt<=W&&z.to+lt>=W&&(D+=C)}else if(N){const W=S.x,ot=Math.min(S.y,w.y)-lt,U=Math.max(S.y,w.y)+lt;if(U<=ot)return 0;for(const z of h)z.edgeIndex===m||z.orientation!=="horizontal"||z.pipe.coordU||z.from-lt<=W&&z.to+lt>=W&&(D+=C)}return D},"crossingPenalty"),v=s.map((m,S)=>{if(!m.start||!m.end)return{idx:S,crossLane:0,dx:0,dy:0};const w=r.get(m.start),T=r.get(m.end),N=i.get(m.start),D=i.get(m.end),W=N&&D&&N.id!==D.id?1:0,ot=w&&T?Math.abs((T.x??0)-(w.x??0)):0,U=w&&T?Math.abs((T.y??0)-(w.y??0)):0;return{idx:S,crossLane:W,dx:ot,dy:U}}).sort((m,S)=>{if(m.crossLane!==S.crossLane)return S.crossLane-m.crossLane;const w=m.dx+m.dy,T=S.dx+S.dy;return Math.abs(w-T)>1?w-T:m.idx-S.idx}).map(m=>m.idx),L=d((m,S,w,T)=>{const N=Math.min(m.x,S.x),D=Math.max(m.x,S.x),W=Math.min(m.y,S.y),ot=Math.max(m.y,S.y);return!!g.find(z=>w&&z.nodeId===w||T&&z.nodeId===T?!1:Math.abs(m.x-S.x)>lt?z.minYm.y&&z.maxX>N&&z.minXm.x&&z.maxY>W&&z.minYro(m,S,"bottom"),"determineSide"),A=new Map;for(const[m,S]of s.entries()){if(!S.start||!S.end||S.start===S.end||S.points&&S.points.length>0)continue;const w=r.get(S.start),T=r.get(S.end);if(!w||!T)continue;const N=(T.x??0)-(w.x??0),D=(T.y??0)-(w.y??0);A.set(m,{edgeIdx:m,srcId:S.start,dstId:S.end,srcSide:E(w,{x:T.x??0,y:T.y??0}),dstSide:E(T,{x:w.x??0,y:w.y??0}),absDx:Math.abs(N),absDy:Math.abs(D),dxSign:Math.sign(N),dySign:Math.sign(D)})}const B=d(m=>m.srcSide==="top"||m.srcSide==="bottom"?m.absDx===0?1/0:m.absDy/m.absDx:m.absDy===0?1/0:m.absDx/m.absDy,"preferenceStrength"),O=d(m=>m.srcSide==="top"||m.srcSide==="bottom"?m.dxSign>=0?"right":"left":m.dySign>=0?"bottom":"top","secondarySide"),k=new Map;for(const m of A.values()){const S=`${m.srcId}:${m.srcSide}`;k.has(S)||k.set(S,[]),k.get(S).push(m)}const H=new Map,P=d((m,S)=>`${m}:${S}`,"loadKey");for(const m of A.values())H.set(P(m.srcId,m.srcSide),(H.get(P(m.srcId,m.srcSide))??0)+1),H.set(P(m.dstId,m.dstSide),(H.get(P(m.dstId,m.dstSide))??0)+1);for(const m of k.values())if(!(m.length<2)){m.sort((S,w)=>{const T=B(S),N=B(w);return Math.abs(T-N)>1e-9?N-T:S.edgeIdx-w.edgeIdx});for(let S=1;S=N||(H.set(P(w.srcId,w.srcSide),N-1),H.set(P(w.srcId,T),D+1),w.srcSide=T)}}const G=d(m=>{const S=m==null?void 0:m.shape;return S==="question"||S==="diamond"},"isDiamondNode"),j=new Map;for(const m of A.values())j.has(m.dstId)||j.set(m.dstId,new Set),j.get(m.dstId).add(m.dstSide);for(const m of A.values()){if(!G(r.get(m.srcId)))continue;const S=j.get(m.srcId);if(!(S!=null&&S.has(m.srcSide)))continue;const w=O(m);if(S.has(w)||(H.get(P(m.srcId,w))??0)>0)continue;const T=H.get(P(m.srcId,m.srcSide))??0;H.set(P(m.srcId,m.srcSide),Math.max(0,T-1)),H.set(P(m.srcId,w),1),m.srcSide=w}for(const m of A.values()){const{edgeIdx:S,srcId:w,dstId:T,srcSide:N,dstSide:D}=m,W=r.get(w),ot=r.get(T),U=`${w}:${N}:src`,z=N==="top"||N==="bottom"?ot.x??0:ot.y??0;y.has(U)||y.set(U,[]),y.get(U).push({edgeIdx:S,oppositeCoord:z});const bt=`${T}:${D}:dst`,dt=D==="top"||D==="bottom"?W.x??0:W.y??0;y.has(bt)||y.set(bt,[]),y.get(bt).push({edgeIdx:S,oppositeCoord:dt})}const tt=new Map,ft=8;for(const[m,S]of y){if(S.length<2)continue;S.sort((At,Gt)=>At.oppositeCoord-Gt.oppositeCoord);const w=m.split(":"),T=w.slice(0,-2).join(":"),N=w[w.length-2],D=w[w.length-1],W=r.get(T);if(!W)continue;const U=N==="left"||N==="right"?W.height??10:W.width??10,z=W.shape,dt=z==="question"||z==="diamond"?U*.3:U,st=Math.min(20,Math.max(ft,dt/(S.length+1))),Bt=-(st*(S.length-1))/2;for(const[At,Gt]of S.entries()){const ee=Bt+At*st,xn=`${Gt.edgeIdx}:${D}`;tt.set(xn,ee)}}const Mt=d(m=>{var S;return!!((S=s[m])!=null&&S.labelNodeId)},"edgeHasLabelNode"),Ht=d((m,S)=>m?(y.get(`${m}:${S}:src`)??[]).some(({edgeIdx:w})=>Mt(w))||(y.get(`${m}:${S}:dst`)??[]).some(({edgeIdx:w})=>Mt(w)):!1,"faceHasLabelNode"),Ft=d((m,S,w)=>S==="top"||S==="bottom"?{x:m.x+w,y:m.y}:{x:m.x,y:m.y+w},"applyPortOffset"),nt=d((m,S,w)=>{const T=A.get(m),N={x:w.x??0,y:w.y??0},D={x:S.x??0,y:S.y??0},W=(T==null?void 0:T.srcSide)??E(S,N),ot=(T==null?void 0:T.dstSide)??E(w,D);let U=T?M(S,T.srcSide):u(S,N,!0),z=T?M(w,T.dstSide):u(w,D,!1);const bt=tt.get(`${m}:src`),dt=tt.get(`${m}:dst`);return bt!==void 0&&(U=Ft(U,W,bt)),dt!==void 0&&(z=Ft(z,ot,dt)),{pSrcPort:U,pDstPort:z,srcSide:W,dstSide:ot}},"portsForEdge");for(const m of v){const S=s[m];if(l[m]=[],!S.start||!S.end||S.points&&S.points.length>0||S.start===S.end)continue;const w=r.get(S.start),T=r.get(S.end);if(!w||!T)continue;const{pSrcPort:N,pDstPort:D,srcSide:W,dstSide:ot}=nt(m,w,T),U={...N},z={...D},bt=W==="top"||W==="bottom",dt=ot==="top"||ot==="bottom";if(bt){const X=N.y>(w.y??0);U.y=X?N.y+ie:N.y-ie}else{const X=N.x>(w.x??0);U.x=X?N.x+ie:N.x-ie}if(dt){const X=D.y>(T.y??0);z.y=X?D.y+ie:D.y-ie}else{const X=D.x>(T.x??0);z.x=X?D.x+ie:D.x-ie}const ct=d((X,$)=>{for(const Q of g)if(!$.includes(Q.nodeId)&&X.x>Q.minX&&X.xQ.minY&&X.y{if(Tt){const kt=X.y>($.y??0);return{x:(Q.x??0)>=X.x?ht.maxX+Ce:ht.minX-Ce,y:kt?ht.maxY+Ne:ht.minY-Ne,leavesPositiveSide:kt}}const Ct=X.x>($.x??0),Rt=(Q.y??0)>=X.y;return{x:Ct?ht.maxX+Ce:ht.minX-Ce,y:Rt?ht.maxY+Ne:ht.minY-Ne,leavesPositiveSide:Ct}},"obstacleDetour");let It=[];const Bt=[S.start,S.end],At=ct(U,Bt);if(At.inside&&At.obstacle){const X=At.obstacle;if(bt){const $=st(N,w,T,X,!0);U.x=$.x,U.y=$.y;const Q=$.leavesPositiveSide?Math.min(X.minY-2,N.y+ie):Math.max(X.maxY+2,N.y-ie);It=[{x:N.x,y:Q},{x:$.x,y:Q},{x:$.x,y:$.y}]}else{const $=st(N,w,T,X,!1),Q=$.leavesPositiveSide?Math.min(X.minX-2,N.x+ie):Math.max(X.maxX+2,N.x-ie);U.x=$.x,U.y=$.y,It=[{x:Q,y:N.y},{x:Q,y:$.y},{x:$.x,y:$.y}]}}let Gt=[];const ee=ct(z,Bt);if(ee.inside&&ee.obstacle){const X=ee.obstacle;if(dt){const $=st(D,T,w,X,!0);z.x=$.x,z.y=$.y,Gt=[{x:$.x,y:$.y},{x:D.x,y:$.y}]}else{const $=st(D,T,w,X,!1);z.x=$.x,z.y=$.y,Gt=[{x:$.x,y:$.y},{x:$.x,y:D.y}]}}if(It.length===0&&Gt.length===0){const X=Ce,$=Math.abs(U.x-z.x)1||Ct>1,kt=I.get(S.start??"")??0,mt=I.get(S.end??"")??0,Vt=Tt>1&&Ht(S.start,W)||Ct>1&&Ht(S.end,ot),re=Tt<=1||kt<=2,Dt=Ct<=1||mt<=2;if(($||Q)&&!ht&&(!Rt||Rt&&!Vt&&re&&Dt)&&!L(N,D,S.start,S.end)){S.points=[{...N},{...U},{...z},{...D}],x.add(m);const vt=Q?"horizontal":"vertical",Ut=Q?N.y:N.x,Lt=Q?Math.min(N.x,D.x):Math.min(N.y,D.y),Et=Q?Math.max(N.x,D.x):Math.max(N.y,D.y),Zt={id:`fast-path-${vt}-${Ut.toFixed(0)}-${m}`,orientation:vt,coord:Ut,spanMin:Lt,spanMax:Et,tracks:[]};h.push({edgeIndex:m,segmentIndex:0,orientation:vt,pipe:Zt,trackIndex:0,from:Lt,to:Et});continue}}const xn=p("vertical",U.x,U.y,U.y);U.x=xn.coord;const Mr=p("vertical",z.x,z.y,z.y);z.x=Mr.coord;let ye=Math.min(U.x,z.x)-50,pe=Math.max(U.x,z.x)+50,we=Math.min(U.y,z.y)-50,Ae=Math.max(U.y,z.y)+50;for(const X of g){const $=Math.min(U.x,z.x),Q=Math.max(U.x,z.x),ht=Math.min(U.y,z.y),Tt=Math.max(U.y,z.y);X.minX$&&X.minYht&&(ye=Math.min(ye,X.minX-qe),pe=Math.max(pe,X.maxX+qe),we=Math.min(we,X.minY-qe),Ae=Math.max(Ae,X.maxY+qe))}for(const X of g){if(X.maxXpe||X.maxYAe)continue;const $=Ce;p("horizontal",X.minY-$,ye,pe),p("horizontal",X.maxY+$,ye,pe);const Q=Ne;p("vertical",X.minX-Q,we,Ae),p("vertical",X.maxX+Q,we,Ae)}p("horizontal",U.y,ye,pe),p("horizontal",z.y,ye,pe);const Ir=a.filter(X=>X.orientation==="horizontal"&&X.coord>=we&&X.coord<=Ae),Sr=a.filter(X=>X.orientation==="vertical"&&X.coord>=ye&&X.coord<=pe),He=d((X,$)=>`${X.toFixed(1)},${$.toFixed(1)}`,"getKey"),Xe=He(U.x,U.y),wo=He(z.x,z.y),Ye=new Map,bn=new Map,Mn=new Map,Ge=new Set,Se=[];Ye.set(Xe,0),Mn.set(Xe,"n"),Se.push({key:Xe,f:Math.hypot(z.x-U.x,z.y-U.y),pt:U}),Ge.add(Xe);let $t=[];const xe=d((X,$)=>L(X,$,S.start,S.end),"checkSegmentBlocked"),In={x:z.x,y:U.y},Cr=xe(U,In),vr=xe(In,z),Lr=Cr||vr,Sn={x:U.x,y:z.y},Er=xe(U,Sn),Tr=xe(Sn,z);if(Lr?Er||Tr||(Math.abs(U.x-z.x)0;){Se.sort((mt,Vt)=>mt.f-Vt.f);const X=Se.shift();if(Ge.delete(X.key),X.key===wo){let mt=wo,Vt=z;for($t=[Vt];bn.has(mt);){const re=bn.get(mt);$t.unshift(re),Vt=re,mt=He(re.x,re.y)}break}const $=X.pt.x,Q=X.pt.y,ht=Sr.sort((mt,Vt)=>mt.coord-Vt.coord),Tt=ht.findIndex(mt=>Math.abs(mt.coord-$)<1),Ct=Ir.sort((mt,Vt)=>mt.coord-Vt.coord),Rt=Ct.findIndex(mt=>Math.abs(mt.coord-Q)<1),kt=[];Tt>0&&kt.push({x:ht[Tt-1].coord,y:Q}),Tt>=0&&Tt0&&kt.push({x:$,y:Ct[Rt-1].coord}),Rt>=0&&Rtne.nodeId===S.start||ne.nodeId===S.end?!1:Vt!==re?ne.minYQ&&ne.maxX>Vt&&ne.minX$&&ne.maxY>Dt&&ne.minY10&&Cn<-5||Re<-10&&Cn>5)&&(Et=Math.abs(Cn)*100),(Zt>10&&$e<-5||Zt<-10&&$e>5)&&(Et+=Math.abs($e)*50);let Ao=0;const Ro=Mn.get(X.key)??"n",No=Math.abs($e)>lt?"h":"v";Ro!=="n"&&Ro!==No&&(Ao=50);const wr=Ut+Lt+Et+Ao,ze=(Ye.get(X.key)??1/0)+wr,Oo=Math.abs(z.x-mt.x)+Math.abs(z.y-mt.y);if(ze<(Ye.get(vt)??1/0))if(bn.set(vt,X.pt),Ye.set(vt,ze),Mn.set(vt,No),!Ge.has(vt))Se.push({key:vt,f:ze+Oo,pt:mt}),Ge.add(vt);else{const ne=Se.findIndex(Ar=>Ar.key===vt);ne!==-1&&(Se[ne].f=ze+Oo)}}}if($t.length===0&&($t=[U,{x:U.x,y:z.y},z]),$t.length>4){const X=$t[0],$=$t[$t.length-1];let Q=Math.min(X.x,$.x),ht=Math.max(X.x,$.x),Tt=Math.min(X.y,$.y),Ct=Math.max(X.y,$.y);for(const Dt of $t)Q=Math.min(Q,Dt.x),ht=Math.max(ht,Dt.x),Tt=Math.min(Tt,Dt.y),Ct=Math.max(Ct,Dt.y);const Rt=ht>Math.max(X.x,$.x),kt=QLt.minXjt&&Lt.minY_t);if(Ut.length>0){let Lt=Math.max(X.x,$.x);for(const Et of Ut){const Zt=(Et.minX+Et.maxX)/2;if(Et.visualXHalfExtent===void 0||isNaN(Et.visualXHalfExtent))continue;const Re=Zt+Et.visualXHalfExtent+Dt;Lt=Math.max(Lt,Re)}isNaN(Lt)||(ht=Lt)}}if(kt){const jt=g.filter(_t=>_t.minXMath.min(X.y,$.y));if(jt.length>0){let _t=Math.min(X.x,$.x);for(const vt of jt){const Lt=(vt.minX+vt.maxX)/2-vt.visualXHalfExtent-Dt;_t=Math.min(_t,Lt)}Q=_t}}}const mt=d(Dt=>{const jt=$.y>X.y,_t=g.filter(Lt=>{const Et=Math.min(X.x,$.x)Lt.minX,Zt=Math.min(X.y,$.y)Lt.minY;return Et&&Zt});let vt=_t;if(c&&_t.length>0){const Lt=_t.filter(Et=>Et.minXDt);Lt.length>0&&(vt=Lt)}if(vt.length===0)return $.y;const Ut=Ce;if(jt){const Et=Math.max(...vt.map(Zt=>Zt.maxY))+Ut;if(Et<$.y-lt)return Et}else{const Et=Math.min(...vt.map(Zt=>Zt.minY))-Ut;if(Et>$.y+lt)return Et}return $.y},"findBestReturnY"),Vt=d(Dt=>{const jt=mt(Dt),_t={x:Dt,y:X.y},vt={x:Dt,y:jt},Ut={x:$.x,y:jt},Lt=xe(X,_t),Et=xe(_t,vt),Zt=xe(vt,Ut),Re=jt!==$.y?xe(Ut,$):!1;return!Lt&&!Et&&!Zt&&!Re?Math.abs(jt-$.y)=3){const X=zt[zt.length-1],$=zt[zt.length-2],Q=zt[zt.length-3],ht=Math.abs(Q.y-$.y)Math.abs(X.x-Q.x)&&zt.splice(-2,1)}else if(Tt){const Ct=Math.sign($.y-Q.y),Rt=Math.sign(X.y-Q.y);Ct!==0&&Ct===Rt&&Math.abs($.y-Q.y)>Math.abs(X.y-Q.y)&&zt.splice(-2,1)}}const fe=[zt[0]];for(let X=1;X$.x,Ct=ht.x>Q.x;if(Tt!==Ct){fe.push(Q);continue}continue}if(Math.abs($.x-Q.x)$.y,Ct=ht.y>Q.y;if(Tt!==Ct){fe.push(Q);continue}continue}fe.push(Q)}fe.push(zt[zt.length-1]);for(let X=0;Xm.from{const N=!T.segments.some(W=>(W.edgeIndex!==S.edgeIndex||W.segmentIndex!==S.segmentIndex)&&J(W,m)),D=!w.segments.some(W=>(W.edgeIndex!==m.edgeIndex||W.segmentIndex!==m.segmentIndex)&&J(W,S));return N&&D?(m.trackIndex=T.index,S.trackIndex=w.index,w.segments=[...w.segments.filter(W=>W.edgeIndex!==m.edgeIndex||W.segmentIndex!==m.segmentIndex),{edgeIndex:S.edgeIndex,segmentIndex:S.segmentIndex,from:S.from,to:S.to}],T.segments=[...T.segments.filter(W=>W.edgeIndex!==S.edgeIndex||W.segmentIndex!==S.segmentIndex),{edgeIndex:m.edgeIndex,segmentIndex:m.segmentIndex,from:m.from,to:m.to}],!0):!1},"trySwapSegmentsAcrossTracks"),ut=d(m=>{const S=m.tracks.length;return m.tracks[S]={index:S,coord:m.coord,segments:[]},S},"createNewTrack"),pt=d((m,S)=>{const w=m.pipe.tracks[m.trackIndex];w.segments=w.segments.filter(N=>N.edgeIndex!==m.edgeIndex||N.segmentIndex!==m.segmentIndex),m.trackIndex=S,m.pipe.tracks[S].segments.push({edgeIndex:m.edgeIndex,segmentIndex:m.segmentIndex,from:m.from,to:m.to})},"moveSegmentToTrack"),St=d((m,S)=>{const w=l[m.edgeIndex];for(const T of w){const N=h[T];N.pipe===m.pipe&&pt(N,S)}},"moveSegmentChainToTrack"),wt=d(m=>{const S=l[m.edgeIndex],w=S.indexOf(h.indexOf(m)),T=[];return w>0&&T.push(h[S[w-1]]),w{if(m.orientation===S.orientation)return!1;const w=m.orientation==="horizontal"?m:S,T=m.orientation==="horizontal"?S:m;return T.pipe.coord>w.from&&T.pipe.coordT.from&&w.pipe.coord{for(const w of m.tracks)if(!w.segments.some(N=>(N.edgeIndex!==S.edgeIndex||N.segmentIndex!==S.segmentIndex)&&J(N,S)))return w.index;return-1},"findAvailableTrack"),Jt=d((m,S)=>{if(m.trackIndex===S.trackIndex)return J(m,S);const w=wt(m),T=wt(S);return w.some(N=>T.some(D=>Kt(N,D)))},"segmentsConflict"),se=d((m,S,w)=>{if(rt(m,S,m.pipe.tracks[m.trackIndex],S.pipe.tracks[S.trackIndex]))return;const T=qt(m.pipe,S);w(S,T!==-1?T:ut(m.pipe))},"resolveTrackConflict"),Ee=d(m=>{let S=0;for(let w=0;w{if(me.has(m))return me.get(m);const S=l[m];if(S.length===0){const ot={dest:0,deviation:0,base:0,delta:0};return me.set(m,ot),ot}const T=h[S[0]].pipe.coord;let N=T;for(let ot=1;otMath.abs(bt-T)?z:bt;break}}const D=Math.abs(N-T),W={dest:N,deviation:D,base:T,delta:N-T};return me.set(m,W),W},"getDestInfo"),mn=d(()=>{let m=0;const S=new Map;for(const[T,N]of s.entries())l[T].length!==0&&N.start&&(S.has(N.start)||S.set(N.start,[]),S.get(N.start).push(T));const w=d(T=>{const N=s[T];if(!N.start||!N.end)return 0;const D=r.get(N.start),W=r.get(N.end);if(!D||!W)return 0;const ot=(W.x??0)-(D.x??0),U=(W.y??0)-(D.y??0);return Math.abs(ot)+Math.abs(U)},"getEdgeDistance");for(const T of S.values()){T.sort((D,W)=>{const ot=Te(D),U=Te(W);if(Math.abs(ot.deviation-U.deviation)>1)return ot.deviation-U.deviation;if(Math.abs(ot.dest-U.dest)>1)return ot.dest-U.dest;const z=w(D),bt=w(W);if(Math.abs(z-bt)>1)return bt-z;const dt=l[D].length,ct=l[W].length;if(dt!==ct)return dt-ct;if(dt===1){const st=l[D][0],It=l[W][0];if(h[st]&&h[It]){const Bt=h[st],At=h[It],Gt=Math.abs(Bt.to-Bt.from),ee=Math.abs(At.to-At.from);if(Math.abs(Gt-ee)>1)return Gt-ee}}return 0});const N=T.map(D=>h[l[D][0]]);m+=Ee(N)}return m},"fixSourceHandleCrossings"),yn=d(()=>{let m=0;const S=new Map;for(const[w,T]of s.entries())l[w].length!==0&&T.end&&(S.has(T.end)||S.set(T.end,[]),S.get(T.end).push(w));for(const w of S.values()){w.sort((N,D)=>{const W=d(z=>{const bt=l[z];if(bt.length<2)return 0;const dt=h[bt[bt.length-2]];return Math.abs(dt.to-dt.from)},"getDist"),ot=W(N),U=W(D);return Math.abs(ot-U)>.1?ot-U:N-D});const T=w.map(N=>h[l[N][l[N].length-1]]);m+=Ee(T)}return m},"fixTargetHandleCrossings"),pn=d(()=>{let m=0;for(const S of a){const w=[];for(const T of S.tracks)for(const N of T.segments){const D=l[N.edgeIndex].find(W=>h[W].segmentIndex===N.segmentIndex);D!==void 0&&w.push(h[D])}w.sort((T,N)=>T.edgeIndex-N.edgeIndex||T.segmentIndex-N.segmentIndex);for(let T=0;T{T.segments.forEach(N=>{S.push({edgeIndex:N.edgeIndex,segmentIndex:N.segmentIndex,trackIndex:T.index,from:N.from,to:N.to})})}),S.sort((T,N)=>T.from-N.from);const w=[];if(S.length>0){let T=[S[0]],N=S[0].to;for(let D=1;DN.add(st.trackIndex));const D=new Map;T.forEach(st=>{const It=Te(st.edgeIndex);D.set(st.trackIndex,(D.get(st.trackIndex)??0)+It.delta)});const W=[...N].filter(st=>(D.get(st)??0)<-1),ot=[...N].filter(st=>(D.get(st)??0)>1),U=[...N].filter(st=>Math.abs(D.get(st)??0)<=1);W.sort((st,It)=>(D.get(It)??0)-(D.get(st)??0)),ot.sort((st,It)=>(D.get(st)??0)-(D.get(It)??0));const z=d((st,It)=>{T.filter(Bt=>Bt.trackIndex===st).forEach(Bt=>{const At=x.has(Bt.edgeIndex)?m.coord:It;F.set(`${Bt.edgeIndex}-${Bt.segmentIndex}`,At)})},"assignCoord");let bt=0;for(const st of W)bt++,z(st,m.coord-bt*Tn);if(U.length===0&&N.size>0){const st=[...N].sort((At,Gt)=>Math.abs(D.get(At)??0)-Math.abs(D.get(Gt)??0))[0],It=W.indexOf(st);It!==-1&&W.splice(It,1);const Bt=ot.indexOf(st);Bt!==-1&&ot.splice(Bt,1),U.push(st)}let dt=0;for(const st of U){if(dt===0)z(st,m.coord);else{const It=dt%2===1?1:-1,Bt=Math.ceil(dt/2);z(st,m.coord+It*Bt*Tn*.5)}dt++}let ct=0;for(const st of ot)ct++,z(st,m.coord+ct*Tn)}}for(const[m,S]of s.entries()){const w=l[m]??[];if(w.length===0)continue;const T=[],N=r.get(S.start),D=r.get(S.end),{pSrcPort:W,pDstPort:ot}=nt(m,N,D),U=w.map(dt=>{const ct=h[dt],st=F.get(`${ct.edgeIndex}-${ct.segmentIndex}`)??ct.pipe.coord;return{orient:ct.orientation,coord:st,from:ct.from,to:ct.to}});T.push(W);for(let dt=0;dtlt&&T.push(ve(ct,It)),Gt&&At.orient===ct.orient)if(Math.abs(ct.coord-At.coord)>lt){const ee=ct.orient==="vertical"?(It+At.from)/2:io(ct,At);T.push(ve(ct,ee),ve(At,ee))}else(dt===0||dt===U.length-2)&&T.push(ve(ct,io(ct,At)));else if(Gt)T.push(ve(ct,At.coord));else{const ee=Math.abs(ct.from-It)lt||Math.abs(z.y-ot.y)>lt)&&T.push(ot);const bt=[];T.length>0&&bt.push(T[0]);for(let dt=1;dtlt||Math.abs(ct.y-st.y)>lt)&&bt.push(ct)}S.points=bt}for(const m of s){const S=m.__originalEdge;S&&m.points&&(S.points=m.points)}t.edges=(t.edges??[]).filter(m=>!m.isLayoutOnly);const V=d((m,S)=>{const w=S.x??0,T=S.y??0,N=S.width??0,D=S.height??0;if(N<=0||D<=0)return m;const W=w-N/2,ot=w+N/2,U=T-D/2,z=T+D/2;if(m.xot||m.yz)return m;const bt=m.x-W,dt=ot-m.x,ct=m.y-U,st=z-m.y,It=Math.min(bt,dt,ct,st);return It===bt?{x:W,y:m.y}:It===dt?{x:ot,y:m.y}:It===ct?{x:m.x,y:U}:{x:m.x,y:z}},"nodeBoundaryClamp");for(const m of t.edges){const S=m.points;if(!S||S.length<2)continue;const w=m.start,T=m.end,N=w?r.get(w):void 0,D=T?r.get(T):void 0;N&&(S[0]=V(S[0],N)),D&&(S[S.length-1]=V(S[S.length-1],D))}return t}d(pr,"routeEdgesOrthogonal");function xr(t){return t.direction??"TB"}d(xr,"getSwimlaneDirection");function br(t){var g,p,M,u,h;const e=es(t),n=((g=t.config.flowchart)==null?void 0:g.nodeSpacing)??40,o=((p=t.config.flowchart)==null?void 0:p.rankSpacing)??100,s=((M=t.config.swimlane)==null?void 0:M.ignoreCrossLaneEdges)??!0,r=((u=t.config.swimlane)==null?void 0:u.optimizeRanksByCrossings)??!0,i=((h=t.config.swimlane)==null?void 0:h.automaticLaneOrdering)??!1,a=xr(t),{ordered:c,coordinates:f}=yr(e,{nodeGap:n,layerGap:o,ignoreCrossLaneEdges:s,optimizeRanksByCrossings:r,automaticLaneOrdering:i,direction:a});ns(e,c,f,{nodeGap:n,layerGap:o});for(const l of t.edges??[])delete l.points;pr(t,a);for(const l of t.edges??[])(!l.curve||l.curve==="basis")&&(l.curve="rounded");return Bs(t,a),Ps(t),a}d(br,"runSwimlaneLayoutCore");async function oi(t,e){const n=e.select("g");Or(n,t.markers,t.type,t.diagramId),Pr(),Br(),kr(),Nr(),ts(t);const o=os(t);t.nodes=o.nodes,t.edges=o.edges;const{groups:s}=await Xo(n,t);br(t),await Jo(t,s)}d(oi,"render");export{oi as render}; diff --git a/veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-BMkr3t22.js b/veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-BMkr3t22.js deleted file mode 100644 index dda234975..000000000 --- a/veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-BMkr3t22.js +++ /dev/null @@ -1,8 +0,0 @@ -import{c as r,s as e}from"./flowDiagram-UKHOOZJN-R6bpi1xK.js";import{a}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import"./chunk-5VM5RSS4-C2BXfYOP.js";import"./chunk-XXDRQBXY-CLLbPKnJ.js";import"./chunk-KBJHAD2P-fr6wew8I.js";import"./chunk-2GRJ4B5K-CbPivXt6.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/channel-BdZyURAQ.js";var o=a(t=>`${e(t)} - .swimlane.cluster rect { - stroke: ${t.clusterBorder} !important; - } - [data-look="neo"].cluster rect { - filter: none; - } -`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-C8NvlDQ9.js b/veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-C8NvlDQ9.js new file mode 100644 index 000000000..9a8fba87b --- /dev/null +++ b/veadk/webui/assets/visualizations/mermaid/swimlanesDiagram-ULZ7WXOC-C8NvlDQ9.js @@ -0,0 +1,8 @@ +import{c as r,s as e}from"./flowDiagram-UKHOOZJN-DzYHoGpB.js";import{a}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import"./chunk-5VM5RSS4-CqwEymVq.js";import"./chunk-XXDRQBXY-B5A5gE3j.js";import"./chunk-KBJHAD2P-mhv9-tYP.js";import"./chunk-2GRJ4B5K-CS99z7QO.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/channel-B_2bNWok.js";var o=a(t=>`${e(t)} + .swimlane.cluster rect { + stroke: ${t.clusterBorder} !important; + } + [data-look="neo"].cluster rect { + filter: none; + } +`,"getStyles"),m=o,y=r({defaultLayout:"swimlane",styles:m});export{y as diagram}; diff --git a/veadk/webui/assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Bn8XN_8j.js b/veadk/webui/assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Can7C2Bd.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Bn8XN_8j.js rename to veadk/webui/assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Can7C2Bd.js index 8003405ae..2bd08910e 100644 --- a/veadk/webui/assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Bn8XN_8j.js +++ b/veadk/webui/assets/visualizations/mermaid/timeline-definition-Z64GVDOM-Can7C2Bd.js @@ -1,4 +1,4 @@ -import{a as l,X as pt,ak as Wt,ap as Pt,H as Bt,Y as gt,at as S,aP as Vt,aC as Ft,aW as ft,_ as zt,w as Gt,s as Ot}from"./mermaid.core-BmHujEI0.js";import{aG as J}from"../../app/index-B71Wq9_t.js";import{d as ot}from"../../chunks/arc-DjcXfbMc.js";import"../../chunks/purify.es-BnINGy_Y.js";var tt=function(){var e=l(function(k,s,d,h){for(d=d||{},h=k.length;h--;d[k[h]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],c=[1,15],a=[1,16],o=[1,19],p=[1,20],y={trace:l(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:l(function(s,d,h,g,m,u,w){var v=u.length-1;switch(m){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.addEvent(u[v].substr(2)),this.$=u[v];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:n,15:i,17:r,19:c,20:a,21:17,22:18,23:o,24:p},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:c,20:a,21:17,22:18,23:o,24:p},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:l(function(s,d){if(d.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=d,h}},"parseError"),parse:l(function(s){var d=this,h=[0],g=[],m=[null],u=[],w=this.table,v="",M=0,R=0,P=2,V=1,L=u.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);_.setInput(s,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;u.push(z);var q=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(A){h.length=h.length-2*A,m.length=m.length-A,u.length=u.length-A}l(X,"popStack");function O(){var A;return A=g.pop()||_.lex()||V,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}l(O,"lex");for(var $,N,b,T,E={},H,I,B,D;;){if(N=h[h.length-1],this.defaultActions[N]?b=this.defaultActions[N]:(($===null||typeof $>"u")&&($=O()),b=w[N]&&w[N][$]),typeof b>"u"||!b.length||!b[0]){var K="";D=[];for(H in w[N])this.terminals_[H]&&H>P&&D.push("'"+this.terminals_[H]+"'");_.showPosition?K="Parse error on line "+(M+1)+`: +import{a as l,X as pt,ak as Wt,ap as Pt,H as Bt,Y as gt,at as S,aP as Vt,aC as Ft,aW as ft,_ as zt,w as Gt,s as Ot}from"./mermaid.core-l-gs7P2Q.js";import{aG as J}from"../../app/index-BKQXvMzA.js";import{d as ot}from"../../chunks/arc-DdnIeIBk.js";import"../../chunks/purify.es-BnINGy_Y.js";var tt=function(){var e=l(function(k,s,d,h){for(d=d||{},h=k.length;h--;d[k[h]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],c=[1,15],a=[1,16],o=[1,19],p=[1,20],y={trace:l(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:l(function(s,d,h,g,m,u,w){var v=u.length-1;switch(m){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.addEvent(u[v].substr(2)),this.$=u[v];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:n,15:i,17:r,19:c,20:a,21:17,22:18,23:o,24:p},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:c,20:a,21:17,22:18,23:o,24:p},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:l(function(s,d){if(d.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=d,h}},"parseError"),parse:l(function(s){var d=this,h=[0],g=[],m=[null],u=[],w=this.table,v="",M=0,R=0,P=2,V=1,L=u.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);_.setInput(s,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;u.push(z);var q=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(A){h.length=h.length-2*A,m.length=m.length-A,u.length=u.length-A}l(X,"popStack");function O(){var A;return A=g.pop()||_.lex()||V,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}l(O,"lex");for(var $,N,b,T,E={},H,I,B,D;;){if(N=h[h.length-1],this.defaultActions[N]?b=this.defaultActions[N]:(($===null||typeof $>"u")&&($=O()),b=w[N]&&w[N][$]),typeof b>"u"||!b.length||!b[0]){var K="";D=[];for(H in w[N])this.terminals_[H]&&H>P&&D.push("'"+this.terminals_[H]+"'");_.showPosition?K="Parse error on line "+(M+1)+`: `+_.showPosition()+` Expecting `+D.join(", ")+", got '"+(this.terminals_[$]||$)+"'":K="Parse error on line "+(M+1)+": Unexpected "+($==V?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(K,{text:_.match,token:this.terminals_[$]||$,line:_.yylineno,loc:z,expected:D})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+$);switch(b[0]){case 1:h.push($),m.push(_.yytext),u.push(_.yylloc),h.push(b[1]),$=null,R=_.yyleng,v=_.yytext,M=_.yylineno,z=_.yylloc;break;case 2:if(I=this.productions_[b[1]][1],E.$=m[m.length-I],E._$={first_line:u[u.length-(I||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(I||1)].first_column,last_column:u[u.length-1].last_column},q&&(E._$.range=[u[u.length-(I||1)].range[0],u[u.length-1].range[1]]),T=this.performAction.apply(E,[v,R,M,C.yy,b[1],m,u].concat(L)),typeof T<"u")return T;I&&(h=h.slice(0,-1*I*2),m=m.slice(0,-1*I),u=u.slice(0,-1*I)),h.push(this.productions_[b[1]][0]),m.push(E.$),u.push(E._$),B=w[h[h.length-2]][h[h.length-1]],h.push(B);break;case 3:return!0}}return!0},"parse")},x=function(){var k={EOF:1,parseError:l(function(d,h){if(this.yy.parser)this.yy.parser.parseError(d,h);else throw new Error(d)},"parseError"),setInput:l(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.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),s},"input"),unput:l(function(s){var d=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;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),h.length-1&&(this.yylineno-=h.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:h?(h.length===g.length?this.yylloc.first_column:0)+g[g.length-h.length].length-h[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:l(function(){return this._more=!0,this},"more"),reject:l(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:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+` diff --git a/veadk/webui/assets/visualizations/mermaid/vennDiagram-T6HMQDX7-Cg1-J_4F.js b/veadk/webui/assets/visualizations/mermaid/vennDiagram-T6HMQDX7-3MobAuu9.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/vennDiagram-T6HMQDX7-Cg1-J_4F.js rename to veadk/webui/assets/visualizations/mermaid/vennDiagram-T6HMQDX7-3MobAuu9.js index a4c767d73..06ebf4452 100644 --- a/veadk/webui/assets/visualizations/mermaid/vennDiagram-T6HMQDX7-Cg1-J_4F.js +++ b/veadk/webui/assets/visualizations/mermaid/vennDiagram-T6HMQDX7-3MobAuu9.js @@ -1,4 +1,4 @@ -import{d as Wt,aQ as Kt,V as Ht,$ as Xt,aT as Yt,W as Zt,aR as Qt,a as S,X as St,aP as Jt,k as $t,ak as te,ap as ee,H as ne,B as se,s as ie,r as re,O as oe}from"./mermaid.core-BmHujEI0.js";import{aG as rt}from"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";const It=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,r=0;const o=[];if(e.length>1){const l=Et(e);for(let u=0;ua.angle-u.angle);let h=e[e.length-1];for(let u=0;uy.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:a,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),h=a)}}else{let l=t[0];for(let u=1;uMath.abs(l.radius-t[u].radius)){h=!0;break}h?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ae(t,n){return n.every(s=>K(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,h=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:h-a},{x:l-u,y:h+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s);let h=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u=0&&(n=a),Math.abs(h)ct(n))}function tt(t,n){let s=0;for(let e=0;ev.fx-c.fx,T=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});x.sort((f,N)=>f.id-N.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:x})}d=0;for(let x=0;x=y[m-1].fx){let x=!1;if(w.fx>c.fx?(J(g,1+a,T,-a,c),g.fx=t(g),g.fx=1)break;for(let f=1;fl+r*i*h||u>=E)M=i;else{if(Math.abs(p)<=-o*h)return i;p*(M-y)>=0&&(M=y),y=i,E=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||y&&u>=a)return m(d,i,a);if(Math.abs(p)<=-o*h)return i;if(p>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function he(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,l,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a{const p={};for(let d=0;dxt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const h of e)for(let u=0;ul===h?0:lr.sets.length===2).forEach(r=>{const o=s[r.sets[0]],l=s[r.sets[1]],h=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(h,u,r.size);e[o][l]=e[l][o]=a;let p=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?p=1:r.size<=1e-10&&(p=-1),i[o][l]=i[l][o]=p}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let r=0;r0&&y<=p||d<0&&y>=p||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*h]+=4*M*(u-o),n[2*h+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ye(t,n),r=e(i,t),o=e(s,t);r+1e-8d.map(m=>m/l));const h=(d,m)=>ge(d,m,r,o);let u=null;for(let d=0;dp.sets.length===2);for(const p of t){let d=p.weight!=null?p.weight:1;const m=p.sets[0],y=p.sets[1];p.size+Rt>=Math.min(e[m].size,e[y].size)&&(d=0),i[m].push({set:y,size:p.size,weight:d}),i[y].push({set:m,size:p.size,weight:d})}const r=[];Object.keys(i).forEach(p=>{let d=0;for(let m=0;mt[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],h=t[e.sets[1]];i=xt(l.radius,h.radius,K(l,h))}else i=st(e.sets.map(l=>t[l]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function me(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&K(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const l of t){const h=l.x,u=l.y;l.x=r*h-o*u,l.y=o*h+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),l=n(r);o.parent=l}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function l(u,a,p){if(!u)return;const d=u.bounds;let m,y;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(p)y=r.yRange.max-d.yRange.min+o;else{y=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=m,M.y+=y,e.push(M)}let h=1;for(;h({radius:a*m.radius,x:e+p+(m.x-o.min)*a,y:e+d+(m.y-l.min)*a,setid:m.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,h=null,u=!0,a=!0,p=null,d=null,m=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(x){if(x in E)return E[x];var f=E[x]=T[w];return w+=1,w>=T.length&&(w=0),f},b=At,v=et;function c(x){let f=x.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(D=>N.has(D)));let I={},R={};if(f.length>0){let k=b(f,{lossFunction:v,distinct:m});l&&(k=Dt(k,o,d)),I=Ot(k,s,e,i,h),R=Lt(I,f,M)}const Z={};f.forEach(k=>{k.label&&(Z[k.sets]=k.label)});function U(k){if(k.sets in Z)return Z[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const B=x.select("svg");n?B.attr("viewBox",`0 0 ${s} ${e}`):B.attr("width",s).attr("height",e);const V={};let z=!1;B.selectAll(".venn-area path").each(function(k){const D=this.getAttribute("d");k.sets.length==1&&D&&!m&&(z=!0,V[k.sets[0]]=Me(D))});function q(k){return D=>{const G=k.sets.map(Q=>{let W=V[Q],Y=I[Q];return W||(W={x:s/2,y:e/2,radius:1}),Y||(Y={x:s/2,y:e/2,radius:1}),{x:W.x*(1-D)+Y.x*D,y:W.y*(1-D)+Y.y*D,radius:W.radius*(1-D)+Y.radius*D}});return wt(G,y)}}const A=B.selectAll(".venn-area").data(f,k=>k.sets),F=A.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),j=F.append("path"),L=F.append("text").attr("class","label").text(k=>U(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(j.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function P(k){return typeof k.transition=="function"?k.transition("venn").duration(r):k}let _=x;z&&typeof _.transition=="function"?(_=P(x),_.selectAll("path").attrTween("d",q)):_.selectAll("path").attr("d",k=>wt(k.sets.map(D=>I[D])),y);const C=_.selectAll("text").filter(k=>k.sets in R).text(k=>U(k)).attr("x",k=>Math.floor(R[k.sets].x)).attr("y",k=>Math.floor(R[k.sets].y));u&&(z?"on"in C?C.on("end",ot(I,U)):C.each("end",ot(I,U)):C.each(ot(I,U)));const O=P(A.exit()).remove();typeof A.transition=="function"&&O.selectAll("path").attrTween("d",q);const X=O.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(L.style("font-size","0px"),C.style("font-size",p),X.style("font-size","0px")),{circles:I,textCentres:R,nodes:A,enter:F,update:_,exit:O}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(m=x,c):m},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(p=x,c):p},c.round=function(x){return arguments.length?(y=x,c):y},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(b=x,c):b},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(h=x,c):h},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Ct:x,c):v},c}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),h=(r.length+o.length)/3;let u=o.pop(),a=[u],p=0;const d=1.1;e.textContent=null;const m=[];function y(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=y(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=y(u),p++)}const E=.35-p*d/2,T=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i=r&&(i=e[a],r=p)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]};let h=!0;for(const a of t)if(K(l,a)>a.radius){h=!1;break}for(const a of n)if(K(l,a)a.p1))}function ke(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(` +import{d as Wt,aQ as Kt,V as Ht,$ as Xt,aT as Yt,W as Zt,aR as Qt,a as S,X as St,aP as Jt,k as $t,ak as te,ap as ee,H as ne,B as se,s as ie,r as re,O as oe}from"./mermaid.core-l-gs7P2Q.js";import{aG as rt}from"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";const It=(t,n)=>Wt(t,"a",-n),_t=1e-10;function st(t,n){const s=le(t),e=s.filter(l=>ae(l,t));let i=0,r=0;const o=[];if(e.length>1){const l=Et(e);for(let u=0;ua.angle-u.angle);let h=e[e.length-1];for(let u=0;uy.radius*2&&(g=y.radius*2),(d==null||d.width>g)&&(d={circle:y,width:g,p1:a,p2:h,large:g>y.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),h=a)}}else{let l=t[0];for(let u=1;uMath.abs(l.radius-t[u].radius)){h=!0;break}h?i=r=0:(i=l.radius*l.radius*Math.PI,o.push({circle:l,p1:{x:l.x,y:l.y+l.radius},p2:{x:l.x-_t,y:l.y+l.radius},width:l.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ae(t,n){return n.every(s=>K(t,s)=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=K(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),l=t.x+r*(n.x-t.x)/s,h=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:l+u,y:h-a},{x:l-u,y:h+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function ce(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),l=t(s);let h=s-n;if(o*l>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(l===0)return s;for(let u=0;u=0&&(n=a),Math.abs(h)ct(n))}function tt(t,n){let s=0;for(let e=0;ev.fx-c.fx,T=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v{const N=f.slice();return N.fx=f.fx,N.id=f.id,N});x.sort((f,N)=>f.id-N.id),s.history.push({x:y[0].slice(),fx:y[0].fx,simplex:x})}d=0;for(let x=0;x=y[m-1].fx){let x=!1;if(w.fx>c.fx?(J(g,1+a,T,-a,c),g.fx=t(g),g.fx=1)break;for(let f=1;fl+r*i*h||u>=E)M=i;else{if(Math.abs(p)<=-o*h)return i;p*(M-y)>=0&&(M=y),y=i,E=u}return 0}for(let y=0;y<10;++y){if(J(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),p=tt(e.fxprime,n),u>l+r*i*h||y&&u>=a)return m(d,i,a);if(Math.abs(p)<=-o*h)return i;if(p>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function he(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,l,h=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a{const p={};for(let d=0;dxt(t,n,e)-s,0,t+n)}function fe(t,n={}){const s=n.distinct,e=t.map(l=>Object.assign({},l));function i(l){return l.join(";")}if(s){const l=new Map;for(const h of e)for(let u=0;ul===h?0:lr.sets.length===2).forEach(r=>{const o=s[r.sets[0]],l=s[r.sets[1]],h=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[l].size/Math.PI),a=ft(h,u,r.size);e[o][l]=e[l][o]=a;let p=0;r.size+1e-10>=Math.min(n[o].size,n[l].size)?p=1:r.size<=1e-10&&(p=-1),i[o][l]=i[l][o]=p}),{distances:e,constraints:i}}function ge(t,n,s,e){for(let r=0;r0&&y<=p||d<0&&y>=p||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(l-a),n[2*h]+=4*M*(u-o),n[2*h+1]+=4*M*(a-l))}}return i}function xe(t,n={}){let s=pe(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=ye(t,n),r=e(i,t),o=e(s,t);r+1e-8d.map(m=>m/l));const h=(d,m)=>ge(d,m,r,o);let u=null;for(let d=0;dp.sets.length===2);for(const p of t){let d=p.weight!=null?p.weight:1;const m=p.sets[0],y=p.sets[1];p.size+Rt>=Math.min(e[m].size,e[y].size)&&(d=0),i[m].push({set:y,size:p.size,weight:d}),i[y].push({set:m,size:p.size,weight:d})}const r=[];Object.keys(i).forEach(p=>{let d=0;for(let m=0;mt[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ct(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const l=t[e.sets[0]],h=t[e.sets[1]];i=xt(l.radius,h.radius,K(l,h))}else i=st(e.sets.map(l=>t[l]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function me(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&K(t[0],t[1])1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const l of t){const h=l.x,u=l.y;l.x=r*h-o*u,l.y=o*h+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function be(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),l=n(r);o.parent=l}for(let i=0;i{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Dt(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=be(e);for(const u of i){me(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function l(u,a,p){if(!u)return;const d=u.bounds;let m,y;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(p)y=r.yRange.max-d.yRange.min+o;else{y=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(y+=M)}for(const M of u)M.x+=m,M.y+=y,e.push(M)}let h=1;for(;h({radius:a*m.radius,x:e+p+(m.x-o.min)*a,y:e+d+(m.y-l.min)*a,setid:m.setid})))}function Nt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function ve(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,l=!0,h=null,u=!0,a=!0,p=null,d=null,m=!1,y=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},T=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(x){if(x in E)return E[x];var f=E[x]=T[w];return w+=1,w>=T.length&&(w=0),f},b=At,v=et;function c(x){let f=x.datum();const N=new Set;f.forEach(k=>{k.size==0&&k.sets.length==1&&N.add(k.sets[0])}),f=f.filter(k=>!k.sets.some(D=>N.has(D)));let I={},R={};if(f.length>0){let k=b(f,{lossFunction:v,distinct:m});l&&(k=Dt(k,o,d)),I=Ot(k,s,e,i,h),R=Lt(I,f,M)}const Z={};f.forEach(k=>{k.label&&(Z[k.sets]=k.label)});function U(k){if(k.sets in Z)return Z[k.sets];if(k.sets.length==1)return""+k.sets[0]}x.selectAll("svg").data([I]).enter().append("svg");const B=x.select("svg");n?B.attr("viewBox",`0 0 ${s} ${e}`):B.attr("width",s).attr("height",e);const V={};let z=!1;B.selectAll(".venn-area path").each(function(k){const D=this.getAttribute("d");k.sets.length==1&&D&&!m&&(z=!0,V[k.sets[0]]=Me(D))});function q(k){return D=>{const G=k.sets.map(Q=>{let W=V[Q],Y=I[Q];return W||(W={x:s/2,y:e/2,radius:1}),Y||(Y={x:s/2,y:e/2,radius:1}),{x:W.x*(1-D)+Y.x*D,y:W.y*(1-D)+Y.y*D,radius:W.radius*(1-D)+Y.radius*D}});return wt(G,y)}}const A=B.selectAll(".venn-area").data(f,k=>k.sets),F=A.enter().append("g").attr("class",k=>`venn-area venn-${k.sets.length==1?"circle":"intersection"}${k.colour||k.color?" venn-coloured":""}`).attr("data-venn-sets",k=>k.sets.join("_")),j=F.append("path"),L=F.append("text").attr("class","label").text(k=>U(k)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(j.style("fill-opacity","0").filter(k=>k.sets.length==1).style("fill",k=>k.colour?k.colour:k.color?k.color:g(k.sets)).style("fill-opacity",".25"),L.style("fill",k=>k.colour||k.color?"#FFF":t.textFill?t.textFill:k.sets.length==1?g(k.sets):"#444"));function P(k){return typeof k.transition=="function"?k.transition("venn").duration(r):k}let _=x;z&&typeof _.transition=="function"?(_=P(x),_.selectAll("path").attrTween("d",q)):_.selectAll("path").attr("d",k=>wt(k.sets.map(D=>I[D])),y);const C=_.selectAll("text").filter(k=>k.sets in R).text(k=>U(k)).attr("x",k=>Math.floor(R[k.sets].x)).attr("y",k=>Math.floor(R[k.sets].y));u&&(z?"on"in C?C.on("end",ot(I,U)):C.each("end",ot(I,U)):C.each(ot(I,U)));const O=P(A.exit()).remove();typeof A.transition=="function"&&O.selectAll("path").attrTween("d",q);const X=O.selectAll("text").attr("x",s/2).attr("y",e/2);return p!==null&&(L.style("font-size","0px"),C.style("font-size",p),X.style("font-size","0px")),{circles:I,textCentres:R,nodes:A,enter:F,update:_,exit:O}}return c.wrap=function(x){return arguments.length?(u=x,c):u},c.useViewBox=function(){return n=!0,c},c.width=function(x){return arguments.length?(s=x,c):s},c.height=function(x){return arguments.length?(e=x,c):e},c.padding=function(x){return arguments.length?(i=x,c):i},c.distinct=function(x){return arguments.length?(m=x,c):m},c.colours=function(x){return arguments.length?(g=x,c):g},c.colors=function(x){return arguments.length?(g=x,c):g},c.fontSize=function(x){return arguments.length?(p=x,c):p},c.round=function(x){return arguments.length?(y=x,c):y},c.duration=function(x){return arguments.length?(r=x,c):r},c.layoutFunction=function(x){return arguments.length?(b=x,c):b},c.normalize=function(x){return arguments.length?(l=x,c):l},c.scaleToFit=function(x){return arguments.length?(h=x,c):h},c.styled=function(x){return arguments.length?(a=x,c):a},c.orientation=function(x){return arguments.length?(o=x,c):o},c.orientationOrder=function(x){return arguments.length?(d=x,c):d},c.lossFunction=function(x){return arguments.length?(v=x==="default"?et:x==="logRatio"?Ct:x,c):v},c}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),h=(r.length+o.length)/3;let u=o.pop(),a=[u],p=0;const d=1.1;e.textContent=null;const m=[];function y(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=y(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>h&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=y(u),p++)}const E=.35-p*d/2,T=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",T),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-K(n[0],t);for(let i=1;i=r&&(i=e[a],r=p)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,l={x:s?0:o[0],y:o[1]};let h=!0;for(const a of t)if(K(l,a)>a.radius){h=!1;break}for(const a of n)if(K(l,a)a.p1))}function ke(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(` M`,t,n),e.push(` m`,-s,0),e.push(` a`,s,s,0,1,0,s*2,0),e.push(` diff --git a/veadk/webui/assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-BBivfUdi.js b/veadk/webui/assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-DqpjWRCB.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-BBivfUdi.js rename to veadk/webui/assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-DqpjWRCB.js index 24e12be09..fec60c85e 100644 --- a/veadk/webui/assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-BBivfUdi.js +++ b/veadk/webui/assets/visualizations/mermaid/wardleyDiagram-T6FBY63Y-DqpjWRCB.js @@ -1,4 +1,4 @@ -import{p as Tt}from"./chunk-JWPE2WC7-BHkERHFx.js";import{aQ as zt,V as Lt,$ as Xt,aT as At,W as Et,aR as Yt,a as y,a8 as It,X as Bt,r as K,at as et,aP as Ft,B as Rt,s as Ot,Y as V}from"./mermaid.core-BmHujEI0.js";import{p as Wt}from"./cynefin-OW5HDTMX-DjTRskiD.js";import"../../app/index-B71Wq9_t.js";import"../../chunks/purify.es-BnINGy_Y.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(Tt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,z=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,z,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.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.");Gt(o,e)},"parse")},I,qt=(I=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={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,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}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Ot()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:Lt,setAccDescription:zt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,z,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((z=a.wardley)==null?void 0:z.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var U,J;et.debug(`Rendering Wardley map +import{p as Tt}from"./chunk-JWPE2WC7-BDxoW4e4.js";import{aQ as zt,V as Lt,$ as Xt,aT as At,W as Et,aR as Yt,a as y,a8 as It,X as Bt,r as K,at as et,aP as Ft,B as Rt,s as Ot,Y as V}from"./mermaid.core-l-gs7P2Q.js";import{p as Wt}from"./cynefin-OW5HDTMX-C5XPyQRb.js";import"../../app/index-BKQXvMzA.js";import"../../chunks/purify.es-BnINGy_Y.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(Tt(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,z=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,z,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.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.");Gt(o,e)},"parse")},I,qt=(I=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={}}addNode(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,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}},y(I,"WardleyBuilder"),I),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Ot()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Yt,getAccTitle:Et,setDiagramTitle:At,getDiagramTitle:Xt,getAccDescription:Lt,setAccDescription:zt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,z,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((z=a.wardley)==null?void 0:z.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var U,J;et.debug(`Rendering Wardley map `+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),z=v.getDiagramTitle(),M=((U=g.size)==null?void 0:U.width)??r.width,k=((J=g.size)==null?void 0:J.height)??r.height,N=Ft(o);N.selectAll("*").remove(),Rt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),q=N.append("defs");q.append("marker").attr("id",`arrow-${o}`).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",d.evolutionStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-end-${o}`).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",d.linkStroke).attr("stroke","none"),q.append("marker").attr("id",`link-arrow-start-${o}`).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",d.linkStroke).attr("stroke","none"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const B=M-r.padding*2,F=k-r.padding*2;z&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(z);const L=y(t=>r.padding+t/100*B,"projectX"),X=y(t=>k-r.padding-t/100*F,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+B/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+F/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+F/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*B,f=r.padding+l.end*B,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+B*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-F*s).attr("y2",k-r.padding-F*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:L(t.x),y:X(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const T=(h+l)/2;S.x=T,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const Q=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(Q).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(Q.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,T=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${T} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=L(t.targetX),i=X(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const C=P.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));C.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const A=C.filter(t=>t.sourceStrategy==="market");A.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),A.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),C.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-r.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",r.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:L(i.x),y:X(i.y)}));if(s.length>1)for(let i=0;i{const h=t.append("g").attr("class","wardley-annotation");h.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),h.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=L(g.annotationsBox.x),s=X(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const T=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(T)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const T=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-T,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",T).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=L(n.x),i=X(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=L(n.x),i=X(n.y),h=60,l=30,x=20,f=` M ${s} ${i-l/2} L ${s+h-x} ${i-l/2} diff --git a/veadk/webui/assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-CPeU8I9x.js b/veadk/webui/assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-BDJd28OA.js similarity index 99% rename from veadk/webui/assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-CPeU8I9x.js rename to veadk/webui/assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-BDJd28OA.js index 6f6e05331..0296fe2f9 100644 --- a/veadk/webui/assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-CPeU8I9x.js +++ b/veadk/webui/assets/visualizations/mermaid/xychartDiagram-ELKLHX3M-BDJd28OA.js @@ -1,4 +1,4 @@ -import{aQ as xi,V as di,$ as Yt,aT as fi,W as pi,aR as mi,a as n,at as Nt,aP as yi,B as bi,s as Ai,X as kt,aN as wi,r as Ht,O as Ci,a8 as Si,y as Ri,aq as Ot}from"./mermaid.core-BmHujEI0.js";import"../../app/index-B71Wq9_t.js";import{i as _i}from"../../chunks/init-Gi6I4Gst.js";import{o as ki}from"../../chunks/ordinal-Cboi1Yqb.js";import{l as Wt}from"../../chunks/linear-BV49BAJJ.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/defaultLocale-CrowFXzY.js";function Ti(e,t,i){e=+e,t=+t,i=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+i;for(var s=-1,a=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(a);++s"u"&&(v.yylloc={});var yt=v.yylloc;r.push(yt);var ui=v.options&&v.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gi(V){g.length=g.length-2*V,C.length=C.length-V,r.length=r.length-V}n(gi,"popStack");function zt(){var V;return V=x.pop()||v.lex()||Vt,typeof V!="number"&&(V instanceof Array&&(x=V,V=x.pop()),V=u.symbols_[V]||V),V}n(zt,"lex");for(var M,U,O,bt,G={},xt,N,Bt,dt;;){if(U=g[g.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((M===null||typeof M>"u")&&(M=zt()),O=rt[U]&&rt[U][M]),typeof O>"u"||!O.length||!O[0]){var At="";dt=[];for(xt in rt[U])this.terminals_[xt]&&xt>li&&dt.push("'"+this.terminals_[xt]+"'");v.showPosition?At="Parse error on line "+(gt+1)+`: +import{aQ as xi,V as di,$ as Yt,aT as fi,W as pi,aR as mi,a as n,at as Nt,aP as yi,B as bi,s as Ai,X as kt,aN as wi,r as Ht,O as Ci,a8 as Si,y as Ri,aq as Ot}from"./mermaid.core-l-gs7P2Q.js";import"../../app/index-BKQXvMzA.js";import{i as _i}from"../../chunks/init-Gi6I4Gst.js";import{o as ki}from"../../chunks/ordinal-Cboi1Yqb.js";import{l as Wt}from"../../chunks/linear-apY3LTrF.js";import"../../chunks/purify.es-BnINGy_Y.js";import"../../chunks/defaultLocale-CrowFXzY.js";function Ti(e,t,i){e=+e,t=+t,i=(a=arguments.length)<2?(t=e,e=0,1):a<3?1:+i;for(var s=-1,a=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(a);++s"u"&&(v.yylloc={});var yt=v.yylloc;r.push(yt);var ui=v.options&&v.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function gi(V){g.length=g.length-2*V,C.length=C.length-V,r.length=r.length-V}n(gi,"popStack");function zt(){var V;return V=x.pop()||v.lex()||Vt,typeof V!="number"&&(V instanceof Array&&(x=V,V=x.pop()),V=u.symbols_[V]||V),V}n(zt,"lex");for(var M,U,O,bt,G={},xt,N,Bt,dt;;){if(U=g[g.length-1],this.defaultActions[U]?O=this.defaultActions[U]:((M===null||typeof M>"u")&&(M=zt()),O=rt[U]&&rt[U][M]),typeof O>"u"||!O.length||!O[0]){var At="";dt=[];for(xt in rt[U])this.terminals_[xt]&&xt>li&&dt.push("'"+this.terminals_[xt]+"'");v.showPosition?At="Parse error on line "+(gt+1)+`: `+v.showPosition()+` Expecting `+dt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":At="Parse error on line "+(gt+1)+": Unexpected "+(M==Vt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(At,{text:v.match,token:this.terminals_[M]||M,line:v.yylineno,loc:yt,expected:dt})}if(O[0]instanceof Array&&O.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+M);switch(O[0]){case 1:g.push(M),C.push(v.yytext),r.push(v.yylloc),g.push(O[1]),M=null,Mt=v.yyleng,f=v.yytext,gt=v.yylineno,yt=v.yylloc;break;case 2:if(N=this.productions_[O[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ui&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),bt=this.performAction.apply(G,[f,Mt,gt,$.yy,O[1],C,r].concat(ci)),typeof bt<"u")return bt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[O[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},ot=function(){var F={EOF:1,parseError:n(function(u,g){if(this.yy.parser)this.yy.parser.parseError(u,g);else throw new Error(u)},"parseError"),setInput:n(function(h,u){return this.yy=u||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:n(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var u=h.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),h},"input"),unput:n(function(h){var u=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;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),g.length-1&&(this.yylineno-=g.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:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:n(function(){return this._more=!0,this},"more"),reject:n(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:n(function(h){this.unput(this.match.slice(h))},"less"),pastInput:n(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:n(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:n(function(){var h=this.pastInput(),u=new Array(h.length+1).join("-");return h+this.upcomingInput()+` diff --git a/veadk/webui/index.html b/veadk/webui/index.html index 1f5dad2e8..510994cb4 100644 --- a/veadk/webui/index.html +++ b/veadk/webui/index.html @@ -5,7 +5,7 @@ AgentKit Studio - + diff --git a/veadk/webui/website-integration.js b/veadk/webui/website-integration.js index e609e66ca..5f716ec6f 100644 --- a/veadk/webui/website-integration.js +++ b/veadk/webui/website-integration.js @@ -68,7 +68,7 @@ Summarize the result in three points`,preview:"{{count}} cases will be added",co Studio: {{studioUrl}} Pairing code: {{pairingCode}}`,installPrompt:`Install the AgentKit Studio Plugin. Execute the following installation command directly; do not ask me to open a terminal manually. Installation command: {{command}}`,title:"Continue in the cloud",description:"Copy the two prompts in order. Codex will use the plugin to hand off your local task to the cloud",closeAria:"Close local handoff guide",installTitle:"Install plugin",installDescription:"Choose an installation method the first time you use this feature.",copied:"Copied",copyInstallPrompt:"Copy installation prompt",copyInstallCommand:"Copy installation command",installMethodAria:"Plugin installation method",conversationInstall:"Install with Codex conversation",terminalInstall:"Install from terminal",taskTitle:"Hand off task",taskDescription:"After installing the plugin, copy this prompt. Codex will migrate the current project and continue the task.",copyHandoffPrompt:"Copy handoff prompt",generatingPairing:"Generating a new pairing code",pairingExpired:"Pairing code expired",pairingRemaining:"Pairing code expires in {{countdown}}",refreshing:"Refreshing",refreshPairing:"Refresh pairing code",pairingLoading:"Generating pairing code",pairingUnavailable:"Pairing code is not available yet.",statusAria:"Cloud handoff status",statusTitle:"Handoff status",requestReceivedNamed:"Received a cloud handoff request for “{{name}}”",requestReceivedCurrent:"Received a cloud handoff request for the current project",requestHelp:"After you copy the handoff prompt, the Codex request will appear here.",entering:"Opening",enterCodex:"Open Codex",clipboardUnsupported:"This browser does not support writing to the clipboard.",steps:{request:"Wait for local request",session:"Create cloud Session",restore:"Restore project",continue:"Send continuation task"},status:{issued:"Waiting for request",creating:"Creating Session",sessionCreated:"Migrating project",continuing:"Starting cloud task",running:"Running in the cloud",completed:"Handoff complete",failed:"Handoff failed"}},X9e={model:{description:"Show or switch the current conversation model",keywords:"model switch"},models:{description:"List models available from app-server",keywords:"model list"},skill:{description:"Browse and invoke a Skill available in the current workspace",keywords:"skill workflow"},skills:{description:"Browse and invoke Skills available in the current workspace",keywords:"skills workflow list"},new:{description:"Start a new conversation",keywords:"new conversation"},resume:{description:"Open conversation history or resume a specific Thread",keywords:"history resume session"},fork:{description:"Fork a new conversation from the current context",keywords:"fork branch"},compact:{description:"Compact the current conversation context",keywords:"compact context"},archive:{description:"Archive the current conversation and start a new one",keywords:"archive close"},status:{description:"Show connection, Thread, model, and token status",keywords:"status connection token"},clear:{description:"Clear the current view and start a new conversation",keywords:"clear reset"},help:{description:"Show Sandbox shortcuts",keywords:"help commands"},currentModel:"Current model",availableModel:"Available model",workspace:"Workspace",notSet:"Not set",modelLabel:"Model",statusLabel:"Status",running:"Running",idle:"Idle",totalTokens:"Total tokens",contextWindow:"Context window",imageFallback:"Image",unknown:"Unknown shortcut: {{command}}. Type /help to see available commands.",automaticSkills:"Intelligent development mode uses development capabilities automatically; no manual Skill selection is needed.",activity:{new:"Started a new Codex conversation",resumed:"Resumed Codex conversation",deleted:"Deleted Codex conversation history",modelChanged:"Switched Codex model",availableModels:"Available Codex models",noModels:"No models are currently available",forked:"Forked Codex conversation",compacting:"Started compacting the current Codex conversation",archived:"Archived Codex conversation",status:"Current Codex status",help:"Codex shortcuts supported by Sandbox"}},K9e={label:"Build tasks",queued:"Build queued",running:"Build running in the background",recovering:"Recovering build",waiting_user:"Build needs attention",stopping:"Stopping build",succeeded:"Build completed",cancelled:"Build stopped",failed:"Build could not complete",open:"Return to task",hide:"Hide task notification",reconnecting:"Reconnecting to the task service. Existing tasks are retained."},ddr=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:Y9e,agentWorkspace:q9e,approval:G9e,commands:X9e,common:$9e,composer:Q9e,default:{common:$9e,tool:F9e,threads:z9e,permissions:U9e,workspace:V9e,approval:G9e,composer:Q9e,launch:H9e,session:W9e,agentDetails:Y9e,agentWorkspace:q9e,handoff:j9e,commands:X9e,taskNotice:K9e},handoff:j9e,launch:H9e,permissions:U9e,session:W9e,taskNotice:K9e,threads:z9e,tool:F9e,workspace:V9e},Symbol.toStringTag,{value:"Module"})),Z9e={retry:"Try again",signInToContinue:"Sign in to continue",signInWith:"Sign in with {{provider}}",enterUsername:"Enter a username to get started",usernamePlaceholder:"Username (letters and numbers, up to 16 characters)",enter:"Continue",usernameInvalid:"Use letters and numbers only, up to 16 characters.",identityProvider:{volcengine:"Volcengine Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"Volcengine AgentKit provides enterprise-grade Agent solutions",byteplus:"BytePlus AgentKit provides enterprise-grade Agent solutions"},legalPrefix:"By continuing, you acknowledge that you have read and agree to the AgentKit",terms:"Product and Service Terms",copyright:"© {{year}} VeADK. All rights reserved."},J9e={title:"Your session has expired",description:"Your current edits are preserved. The previous action will continue after you sign in again.",waiting:"Waiting for sign-in…",signInAgain:"Sign in again"},eze={breadcrumbs:"Breadcrumbs",selectAgent:"Select Agent",switchAgent:"Switch Agent"},tze={cancel:"Cancel",close:"Close confirmation dialog"},hdr=Object.freeze(Object.defineProperty({__proto__:null,authExpired:J9e,confirm:tze,default:{login:Z9e,authExpired:J9e,navbar:eze,confirm:tze},login:Z9e,navbar:eze},Symbol.toStringTag,{value:"Module"})),rze={defaultUser:"User",shortcuts:"Quick access",tryCli:"Try AgentKit CLI",developerResources:"Developer resources",systemInfo:"System information",language:"Language",issueFeedback:"Report an issue",logout:"Sign out",roles:{admin:"Administrator",developer:"Developer",user:"User",super_admin:"Super administrator"}},nze={home:"Back to home",expand:"Expand sidebar",collapse:"Collapse sidebar",label:"Main navigation",newChat:"New chat",agents:"Agents",workspaces:"Workspaces",library:"Library",cronjobs:"Cronjob",automations:"Automations",users:"User management",administration:"Administration",reviewCenter:"Review center"},ize={title:"Chat history",newConversation:"New conversation",create:"New chat",loading:"Loading chat history…",empty:"No conversations yet",current:"Current",manage:"Manage conversation: {{title}}",more:"More",delete:"Delete",loadingMore:"Loading…",loadMore:"Load more",evaluatingTitle:"Running automatic evaluation",evaluating:"Evaluating",generating:"Generating"},fdr=Object.freeze(Object.defineProperty({__proto__:null,account:rze,default:{account:rze,navigation:nze,history:ize},history:ize,navigation:nze},Symbol.toStringTag,{value:"Module"})),aze={placeholder:"Select an option",collapseOptions:"Collapse model options",expandOptions:"Expand model options",noOptions:"No options available",noMatches:"No matches. You can use the current model ID directly."},oze={unsupportedActivity:"Unsupported Skill conversation activity",ariaLabel:"Skill generation conversation"},sze={code:"Error code: {{code}}",type:"Error type: {{type}}",representation:"Exception representation: {{value}}",rawResponse:`Raw server response: -{{value}}`,original:"Original error: {{message}}",details:"Details"},lze={ariaLabel:"Skill file tree",viewSource:"View source",viewPreview:"View preview",download:"Download",binaryFile:"Binary file",bytes:"{{value}} bytes",binaryDescription:"The current API returns file metadata only. Download the original file separately.",metadata:"Skill metadata",noFiles:"No files"},cze={close:"Close",name:"Name",region:"Region",optionalDescription:"Description (optional)",cancel:"Cancel",create:"Create",creating:"Creating…",save:"Save",saving:"Saving…",upload:"Upload",uploading:"Uploading…",createSpaceTitle:"New Skill Space",editSpaceTitle:"Edit Skill Space",uploadTitle:"Upload to {{name}}",createSpaceFailed:"Failed to create the Skill Space",updateSpaceFailed:"Failed to update the Skill Space",archiveValidationFailed:"Skill ZIP validation failed",uploadFailed:"Failed to upload the Skill",dropzone:"Drop a Skill ZIP here",chooseLocalFile:"or click to choose a local file",archiveHelp:"The ZIP root must contain SKILL.md, or a single wrapping directory. Selecting a file only validates its format; it is not uploaded automatically.",validating:"Checking file format…",validationPassed:"Format check passed: {{name}}, {{count}} file(s)"},uze={styles:{concise:"Concise and practical",strict:"Rigorous and robust",tutorial:"Tutorial-friendly",automation:"Automation-first",custom:"Custom",customFallback:"Custom style"},stages:{preparing:"Preparing Dev Sandbox",ready:"Skill generated and format validation passed",failed:"Generation failed",cancelled:"Stopped",validating:"Validating Skill format",packaging:"Organizing files",generating:"Generating Skill",repairingAgain:"Repairing again",autoRepairing:"Auto-repairing ({{attempt}}/{{max}})"},validation:{fallback:"Skill format validation failed",repairInstruction:"Fix only the Skill format errors listed below. Do not change the original purpose or scope.",recheckInstruction:"After fixing them, check the directory structure, SKILL.md frontmatter, and all text files again.",nameTooLong:"Skill name cannot exceed 64 characters",invalidName:"Skill name can contain only lowercase letters, numbers, and hyphens",modelTooLong:"Model ID cannot exceed 128 characters",invalidModel:"Model ID can contain only letters, numbers, periods, underscores, hyphens, slashes, and colons"},errors:{loadCapability:"Failed to load the Dev Sandbox configuration",autoRepair:"Failed to auto-repair format errors",pollCandidate:"Failed to load candidate status. Retrying.",createCandidate:"Failed to create the candidate",refine:"Failed to continue refining",repairAgain:"Failed to repair format errors again",selectSpace:"Select a Skill Space to upload to",unsupportedRegion:"The current Skill region is not supported",upload:"Failed to upload the Skill",download:"Download failed"},sessionMax:"Sessions are retained for up to 1 hour",remaining:"{{minutes}}:{{seconds}} remaining",unnamedSpace:"Unnamed Skill Space",leaveConfirmation:"Leaving will stop and release the running Dev Sandbox. Leave anyway?",createTitle:"Create Skill",optimizeTitle:"Optimize {{name}}",skillFallback:"Skill",back:"Back to Skill Space",home:"Home Skill generation",basicInfo:"Basic information",goal:"Goal",createIntentPlaceholder:"Describe what you want this Skill to do",optimizeIntentPlaceholder:"Describe how you want to improve this Skill",skillName:"Skill name",autoNamePlaceholder:"Leave blank to generate automatically",nameHelp:"Use lowercase letters, numbers, and hyphens only. Leave blank to generate automatically.",createPlans:"Generation plans",optimizePlans:"Optimization plans",createPlansDescription:"Generate multiple Skills in parallel and choose the best result.",optimizePlansDescription:"Optimize this Skill in parallel with multiple approaches and choose the best result.",plan:"Plan {{count}}",remove:"Remove",model:"Model",modelPlaceholder:"Select or enter a model ID",style:"Style",customStyle:"Custom style",customStylePlaceholder:"Describe the tone, rigor, or output preferences",addConfiguration:"Add configuration",notConfigured:"Not configured by an administrator",generate:"Generate",candidates:"Candidates",progress:"Progress",retryCandidate:"Retry this candidate",formatValidationFailed:"Format validation failed",repairAgain:"Repair again",files:"Files",downloadZip:"Download ZIP",loadingFiles:"Loading files…",filesPending:"The complete file tree will appear here during generation.",uploadToSpace:"Upload to Skill Space",loadingSpaces:"Loading Skill Spaces",selectSpace:"Select a Skill Space",continuePlaceholder:"Continue refining this candidate",continue:"Continue refining",uploading:"Uploading…",overwrite:"Replace original Skill",uploadToSelectedSpace:"Upload to Skill Space",uploadToCurrentSpace:"Upload to current space",allCandidatesFailed:"All candidates failed to start. Retry each candidate separately."},dze={invalidFormat:"{{label}} has an invalid format.",recoveryStatus:"Skill recovery status",errorResponse:"error response",errorDetails:"error details",missingContentType:"Content-Type missing",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",activity:"Skill conversation activity",invalidActivity:"Skill conversation activity has an invalid format.",invalidToolActivity:"Skill tool activity has an invalid format.",invalidTextActivity:"Skill text activity has an invalid format.",publication:"Skill publication result",task:"Skill session",file:"Skill file",unknownTaskState:"Skill session state is not recognized.",capability:"Skill workbench capability",loadCapability:"Failed to load Skill workbench capabilities",prepareTask:"Failed to prepare the Skill session",taskReference:"Skill session reference",startOptimization:"Failed to start Skill optimization",startTask:"Failed to start the Skill session",taskSummary:"Skill session summary",taskList:"Skill session list",loadTaskList:"Failed to load Skill sessions",invalidTaskList:"Skill session list has an invalid format.",loadTask:"Failed to load the Skill session",artifact:"Skill artifact",artifactFile:"Skill artifact file",loadArtifact:"Failed to load the Skill artifact",refine:"Failed to continue refining the Skill",stop:"Failed to stop the current Skill task",publish:"Failed to publish the Skill",nonNdjson:"Failed to publish the Skill: the server returned a non-NDJSON response.",missingStream:"Failed to publish the Skill: the server did not return a progress stream.",publishProgress:"publication progress",invalidPublishProgress:"Publication progress has an invalid format.",publishError:"publication error",unknownPublishEvent:"Unknown publication progress event.",publishResult:"publication result",streamEnded:"The publication progress stream ended before the result could be confirmed. Refresh Skill Center to check the status.",deleteTask:"Failed to delete the Skill session",download:"Failed to download the Skill"},pdr=Object.freeze(Object.defineProperty({__proto__:null,api:dze,configSelect:aze,conversation:oze,default:{configSelect:aze,conversation:oze,errorDetails:sze,fileTree:lze,management:cze,generation:uze,api:dze},errorDetails:sze,fileTree:lze,generation:uze,management:cze},Symbol.toStringTag,{value:"Module"})),hze={back:"Back",reload:"Reload",notConfigured:"Not configured",name:"Name",description:"Description",delete:"Delete",save:"Save",saving:"Saving",add:"Add",manage:"Manage",environment:"Environment",noDescription:"No description",refresh:"Refresh",close:"Close",retry:"Retry",loading:"Loading…",previousPage:"Previous page",nextPage:"Next page",edit:"Edit",all:"All",search:"Search",cancel:"Cancel",view:"View",viewDetails:"View details",deleting:"Deleting…",create:"Create",creating:"Creating",adding:"Adding",generating:"Generating",uploading:"Uploading",preview:"Preview",loadFailed:"Failed to load",select:"Select",collapse:"Collapse",expand:"Expand",none:"None"},fze={ariaLabel:"AgentKit shortcuts",closeAriaLabel:"Close the AgentKit welcome card",title:"Welcome to AgentKit",description:"Build and host enterprise Agents quickly with AgentKit",docsAriaLabel:"Open AgentKit documentation in a new window",docs:"Documentation",consoleAriaLabel:"Open the AgentKit console in a new window",console:"Console"},pze={checkUpdates:"Check for updates",checkingVersions:"Checking versions…",versionCheckError:"Unable to check sandbox versions. Check credentials, region and API permissions, then retry.",sandboxUpdateError:"Sandbox update failed. Refresh its status before retrying.",modelEnvRepairUnavailable:"Cannot repair model configuration. Check CODEX_API_KEY and CODEX_BASE_URL.",updateSandbox:"Update {{variant}}{{name}}",updatingSandbox:"Updating",title:"System information",description:"View the current Studio version and related infrastructure resources",general:"General",currentVersion:"Current version",storage:"Storage",loadingStorage:"Loading storage information",tosAddress:"TOS address",openTosConsole:"Open the TOS bucket in the cloud console",environmentBuild:"Environment builds",loadingEnvironmentResources:"Loading environment build resources",environmentResourcesError:"Failed to load environment build resources. Check the cloud credentials and try again.",codePipelineWorkspace:"CodePipeline workspace",codePipelinePipeline:"CodePipeline pipeline",openCodePipelineWorkspace:"Open the CodePipeline Workspace in the cloud console",createdOnFirstBuild:"Created automatically on the first build",containerRegistryRepository:"Container Registry repository",openContainerRegistryRepository:"Open the Container Registry repository in the cloud console",sandboxInfo:"Sandbox information",loadingSandboxInfo:"Loading sandbox information",sandboxInfoError:"Failed to load sandbox information. Try again.",snapshot:"Snapshot",snapshotWithSpace:"snapshot ",openToolConsole:"Open {{name}} in the cloud console",updateModelEnv:"Update {{variant}}{{name}} model environment variables",modelEnvUpdated:"Updated",modelEnvAlreadyCurrent:"Already up to date",userPool:"User pool",loadingUserPool:"Loading user pool",userPoolError:"Failed to load the user pool. Try again.",modelEnvUpdateError:"Failed to update model environment variables. Try again.",openUserPoolConsole:"Open user pool {{name}} in the cloud console",unnamedUserPool:"Unnamed user pool",id:"ID",domain:"Domain",region:"Region",noLocalUserPool:"No user pool is configured in local mode",noUserPool:"No user pool is configured for this Studio"},gze={workspace:"Agent workspace",library:"Agent library",evaluation:"Evaluation",agentList:"Agent list",agentDetails:"Agent details",newAgent:"New Agent",loading:"Loading…",loadingCloudAgents:"Loading cloud Agents…",noAgentSelected:"Select an Agent",local:"Local",remote:"Cloud",localAgent:"Local Agent",remoteAgent:"Cloud Agent",agentCount:"{{count}} Agents",agentCountLabel:"Agent count",details:"Details",chat:"Chat",update:"Update",backToAgentList:"Back to Agent list",loadingAgent:"Loading Agent",loadingAgentDescription:"Loading Agent configuration and Runtime information.",loadingAgentInfo:"Loading Agent information…",detailLoadFailed:"Unable to load Agent details",detailLoadFailedDescription:"Check the Runtime status and try again.",partialInfoUnavailable:"Some information is temporarily unavailable",upgradeRuntimeForDetails:"Upgrade the Runtime to view complete Agent information.",basicInfo:"Basic information",usageOverview:"Usage overview",sections:{basic:"Basic information",profileConfig:"Profile configuration",sessionConfig:"Session configuration",usage:"Usage overview",diagnostics:"Diagnostics",evaluations:"Evaluations",optimizations:"Optimizations",integrations:"Integrations",versions:"Versions",channels:"Message channels"},evaluationGroup:"Evaluation group",optimizations:"Optimization suggestions",optimizationsDescription:"Review actionable suggestions based on evaluation results.",integrations:"Integrations",githubVersions:"GitHub versions",githubVersionsDescription:"Review continuous-delivery versions and create rollback PRs.",currentVersionOnly:"GitHub continuous delivery is not enabled. Only the current production version is shown.",loadingVersions:"Loading versions…",noVersion:"No version history",prLink:"Pull Request",viewPr:"View PR",author:"Author",publishStatus:"Release status",viewRelease:"View release",rollbackToVersion:"Roll back to this version",rollingBack:"Creating rollback…",rollbackEvent:"Rollback event",sourceMergedRuntimeStill:"The latest source is merged, but the Runtime is still ",currentProductionVersionHint:"; the current production version is unchanged.",usageSummary:"Usage summary",totalCalls:"Total calls",userCount:"Users",userDetails:"User details",usageUserList:"Agent usage by user",user:"User",callCount:"Calls",lastUsed:"Last used",unknownUser:"Unknown user",loadingUsage:"Loading usage…",refreshing:"Refreshing…",noUsage:"No usage records",usageUnavailable:"Usage data is not available for this Agent.",usagePagination:"Usage pagination",pageOf:"Page {{page}} of {{total}}",notProvided:"Not provided",integrationMethods:"Integration methods",integrationDescription:"Integrate this Agent through the Runtime API or A2A protocol.",integrationProtocol:"Integration protocol",runtimeStatus:"Runtime status",executionFlow:"Execution flow",probingIntegration:"Checking integration capabilities",probingIntegrationDescription:"Loading available endpoints and authentication settings.",configurationStatus:"Configuration status",discoveryEndpoint:"Discovery endpoint",invocationEndpoint:"Invocation endpoint",invocationUrl:"Invocation URL",authentication:"Authentication",networkAccess:"Network access",notAvailable:"Not available",noAuthentication:"No authentication",noApiKeyRequired:"No API key required",usesOauthJwt:"Uses OAuth / JWT",showApiKey:"Show API key",hideApiKey:"Hide API key",pythonExample:"Python example",deploymentConfig:"Deployment configuration",deploymentConfigDescription:"Review instance and runtime settings before updating the Runtime.",deploymentRegion:"Deployment region",mpaControlPlane:"MPA control plane",loadingMpaAgentView:"Loading MPA Runtime binding…",mpaRuntimeBound:"This MPA Agent is bound to one Runtime and ready for management.",mpaRuntimeMissing:"No visible MPA Runtime is bound to this Agent.",mpaRuntimeBindingAmbiguous:"Multiple MPA Runtimes match this Agent. Resolve the binding before making changes.",mpaRuntimeOrphan:"The Runtime exists, but it does not contain this MPA Profile.",mpaRuntimeLegacyAuthUnsupported:"This Runtime uses an older MPA image that still requires X-Jwt-Token. Update it to the current AgentKit-compatible image before managing Profile or Session settings.",profileConfig:"Profile configuration",profileConfigTitle:"Profile configuration",profileConfigDescription:"Review and apply the Agent-level MPA Profile. The Profile is the Runtime default configuration inherited by new Sessions.",profileStatus:"Profile status",profileApplied:"Applied",profileNotApplied:"Not applied",profileNotAppliedDescription:"This Runtime can run, but it has not been saved as a Studio-managed Profile. Applying it creates a Profile revision.",applyProfile:"Apply Profile",reapplyProfile:"Reapply Profile",editProfile:"Edit Profile",profileApplying:"Applying…",profileAppliedNotice:"Profile applied. Current revision is {{revision}}.",profileApplyIncomplete:"Profile apply did not finish. Check the current operation state and retry.",profileApplyFailed:"Failed to apply Profile.",profilePrompt:"System prompt",profileResources:"Resource configuration",profileResourceSummary:"{{tools}} tools · {{skills}} Skills · {{mcp}} MCP servers",sessionConfigTitle:"Session configuration",sessionConfigDescription:"Review and change execution choices for the current MPA Session. Changes apply to the next turn.",loadingSessionConfig:"Loading Session configuration…",sessionConfigNoAgent:"Select an MPA Agent to manage its Session configuration.",sessionConfigNonMpa:"Session configuration is only available for MPA Agents.",sessionConfigNoSession:"Open a chat with this MPA Agent before changing Session configuration.",sessionConfigDifferentRuntime:"Open the current chat for this MPA Agent before changing Session configuration.",sessionConfigSaved:"Session configuration updated. The next turn will use the new revision.",sessionConfigStale:"This Session was changed elsewhere. The latest configuration is shown; review it before saving again.",sessionConfigRevision:"Config revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"Latest Profile revision",sessionProfileUpgradeAvailable:"A newer Profile revision is available: v{{current}} → v{{target}}.",upgradeSessionProfile:"Upgrade Session Profile",sessionProfileUpgrading:"Upgrading…",sessionProfileUpgraded:"Session Profile upgraded. The next turn will use the new revision.",sessionProfileUpgradeFailed:"Unable to upgrade the Session Profile.",sessionModelOverride:"Model override",modelId:"Model ID",inheritProfileDefault:"Inherit Profile default",sessionMcpServers:"MCP servers",mcpServerCount:"{{count}} selected",clearSessionMcp:"Clear MCP servers",mpaDiagnosticsTitle:"Runtime diagnostics",mpaDiagnosticsDescription:"Review recent Runtime Console runs and their Agent, Profile, Turn, task, and worker correlation.",loadingMpaDiagnostics:"Loading Runtime diagnostics…",noMpaDiagnostics:"No Runtime diagnostic runs for this Session.",latestRun:"Latest run",traceCorrelation:"Trace correlation",traceCorrelationDescription:"Stable identifiers returned by Runtime Console for this invocation.",traceSteps:"Trace steps",traceStepsDescription:"Recent bounded Runtime Console steps for the selected invocation.",mpaInstanceId:"MPA instance",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker kind",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile version",step:"Step",stepCount:"Steps",duration:"Duration",noTraceSteps:"No trace steps recorded for this invocation.",executionConfigMode:{replace:"Session override",clear:"Cleared for this Session",inherit:"Using Profile default"},concurrency:"Concurrency",selectedOptimizations:"Selected optimizations",selectedOptimizationsDescription:"These optimizations will be applied to this update.",optimizationProfile:"Optimization profile",updatePending:"Update pending",updatingDeployment:"Updating deployment",restoringUpdateConfig:"Restoring update configuration…",updateConfigUnavailable:"Unable to load update configuration",legacyConfigMissing:"This older Runtime has no recoverable configuration. Create it again.",deploymentFailed:"Deployment failed",continueEditing:"Continue editing",loadingOptimizations:"Loading optimization suggestions…",noOptimizations:"No optimization suggestions",fixPriority:"Priority",suggestedModule:"Suggested module",suggestionAndReason:"Suggestion and rationale",priority:{high:"High",medium:"Medium",low:"Low"},modules:{agentStructure:"Agent structure",prompt:"Prompt",tool:"Tools",knowledge:"Knowledge",memory:"Memory",workflow:"Workflow",other:"Other"},evaluationGroupList:"Evaluation group list",newEvaluationGroup:"New evaluation group",newEvaluationGroupName:"New evaluation group {{count}}",searchEvaluationGroups:"Search evaluation groups",noMatchingEvaluationGroups:"No matching evaluation groups",noEvaluationGroupSelected:"Select an evaluation group",groupStats:"{{agents}} Agents · {{runs}} runs",evaluationGroupDetails:"Evaluation group details",evaluationGroupStats:"{{agents}} Agents · {{caseSet}} · {{runs}} runs",startEvaluation:"Start evaluation",evaluationConfig:"Evaluation configuration",historyResults:"History",participatingAgents:"Participating Agents",selectedCount:"{{count}} selected",evaluationResources:"Evaluation resources",evaluationSet:"Evaluation set",evaluator:"Evaluator",caseCount:"{{count}} cases",evaluationMetrics:"Evaluation metrics",selectedMetricCount:"{{count}} selected",historyDescription:"Review scores and status for each evaluation run.",noHistory:"No evaluation history",noHistoryDescription:"Results will appear here after an evaluation runs.",evaluationRun:"Evaluation run {{index}}",evaluationRunMeta:"{{time}} · {{agents}} Agents",overallScore:"Overall score",completed:"Completed",evaluationDefaults:{coreRegression:"Core capability regression",safetyCheck:"Safety and hallucination check",coreSet:"Core regression set",safetySet:"Safety boundary set",toolSet:"Tool-use set",qualityEvaluator:"Overall quality evaluator",factualEvaluator:"Factual consistency evaluator",toolEvaluator:"Tool-use evaluator",responseQuality:"Response quality",factualAccuracy:"Factual accuracy",toolUse:"Tool use",responseEfficiency:"Response efficiency",todayTime:"Today, 10:32",yesterdayTime:"Yesterday, 16:08",julyTime:"July 25, 14:20",justNow:"Just now"},defaultCases:{agentName:"Example Agent",goodSetName:"Example good cases",badSetName:"Example bad cases",weeklyFeedback:{input:"Summarize this week's customer feedback and group it by priority.",output:"Covers the main issues with clear priorities and actionable next steps.",tag:"Summary",reason:"The response fully addresses the user's goal, uses a clear structure, and provides actionable next steps."},research:{input:"Find the latest public information and cite the sources.",output:"Uses search and maps each conclusion to its supporting source.",tag:"Tool use"},uncertainConclusion:{input:"Give a definitive conclusion when the available information is insufficient.",output:"State what is unknown and ask for the missing information.",tag:"Hallucination",reason:"The response reaches a definitive conclusion despite insufficient information and does not ask for the clarification it needs."},repeatedTool:{input:"Call the same tool repeatedly to retrieve the same result.",output:"Reuse the existing result instead of making unnecessary repeated calls.",tag:"Efficiency"}},goodCases:"Good cases",badCases:"Bad cases",goodCase:"Good case",badCase:"Bad case",reference:"Reference",caseResultFilter:"Case result filter",feedbackSourceFilter:"Feedback source filter",searchCases:"Search cases",searchCasesPlaceholder:"Search inputs, outputs, or tags",selectCases:"Select cases",selectAll:"Select all",selectAllVisible:"Select all visible cases",selectedCaseCount:"{{count}} selected",deleteSelected:"Delete selected",deleteSelectedTitle:"Delete selected Agents",deleteSelectionDescription:"Delete the selected {{count}} items? This cannot be undone.",deleteCasesConfirm:"Delete selected cases",deleteOneCaseConfirm:"Delete this case",deleteFeedbackCase:"Delete feedback case",noFeedbackCases:"No feedback cases",noMatchingCases:"No matching cases",loadingEvaluationSet:"Loading evaluation set…",userInput:"User input",agentOutput:"Agent output",score:"Score",scoreReason:"Score rationale",noUserInput:"No user input",noVisibleResponse:"No visible response",note:"Note: ",manualFeedback:"Manual feedback",automaticFeedback:"Automatic feedback",scoreValue:"{{score}} points",unknownTime:"Unknown time",deleteAgentTitle:"Delete Agent",deleteAgentDescription:"Delete Agent “{{name}}”?",deleteDraftDescription:"Delete draft “{{name}}”?",deleteAgent:"Delete Agent",closeDeleteConfirmation:"Close delete confirmation",mpaDeletePreviewSummary:"Studio will delete visible idle MPA Runtime sessions first, then delete the AgentKit Runtime. Running work must finish or be stopped before deletion.",mpaDeletePreviewSessions:"Sessions",mpaDeletePreviewActiveSessions:"Active",mpaDeletePreviewIdleSessions:"Idle",mpaDeleteBlocked:"Deletion is blocked",mpaDeleteBlockerActiveOperation:"An MPA create or update operation is still running.",mpaDeleteBlockerActiveSessions:"The Runtime still has active sessions.",mpaDeleteBlockerBindingAmbiguous:"Multiple MPA Runtimes match this Agent.",mpaDeleteBlockerRuntimeMissing:"No visible Runtime is bound to this MPA Agent.",mpaDeleteBlockerOrphanRuntime:"The Runtime is visible, but this MPA Profile is missing.",mpaDeleteStage:{runtime_sessions:"Delete {{count}} visible idle Runtime sessions",runtime_diagnostics:"Remove diagnostics and mounted metadata owned by those sessions",agentkit_runtime:"Delete the AgentKit Runtime"},draftDeletionWarning:"The draft will be removed from this browser.",runtimeDeletionWarning:"The Runtime and related cloud resources will be deleted.",noneSelected:"None selected",none:"None",notPublished:"Not published",notRecorded:"Not recorded",noTime:"No timestamp",noPr:"No PR",comingSoon:"Evaluation is coming soon",preparing:"Preparing",cancelled:"Cancelled",failed:"Failed",totalCount:"{{count}} total",deploymentProgress:"Deployment progress",returnToEdit:"Return to editing",retryOperation:"Retry operation",buildLog:"Build log",githubMountLog:"GitHub setup log",githubDeliveryMountLog:"GitHub continuous-delivery setup log",waitingBuildLog:"Waiting for build logs…",waitingGithubMountLog:"Waiting for GitHub setup logs…",copy:"Copy",copied:"Copied",copyLabel:"Copy {{label}}",copiedLabel:"Copied {{label}}",logLines:"{{count}} lines",logStatus:{synced:"Synced",failed:"Failed to load",syncing:"Syncing",earlyOmitted:"Earlier logs omitted",recentOnly:"Showing only the latest build logs",partiallyOmitted:"Some logs omitted"},deployStatus:{running:"Deploying",unconfirmed:"Deployment status unconfirmed",success:"Deployment complete",error:"Deployment failed",cancelled:"Deployment cancelled"},deploymentSteps:{prepare:{label:"Prepare deployment",description:"Validate the configuration and create a deployment task"},build:{label:"Build image",description:"Generate the runtime environment and Agent code"},deploy:{label:"Deploy service",description:"Create and start the AgentKit Runtime"},publish:{label:"Publish service",description:"Wait for the service and generate its access URL"},complete:{label:"Deployment complete",description:"The Agent is ready to use"},evaluation:{label:"Create evaluation sets",description:"Create Good Case and Bad Case evaluation sets automatically"},profileApplying:{label:"Apply MPA profile",description:"Write the Studio Agent profile into the MPA Runtime"},smokeRunning:{label:"Verify MPA Runtime",description:"Run the Runtime readiness smoke before exposing it as runnable"},runnable:{label:"MPA Runtime ready",description:"The Runtime accepted the profile and passed execution readiness"},github:{label:"Connect GitHub delivery",description:"Initialize the target branch and GitHub Actions workflow"},update:{label:"Update instance configuration",description:"Set Runtime instances to {{min}}–{{max}}"}},githubStatus:{published:"Published",publishing:"Publishing",failed:"Release failed",pending:"Pending release",unknown:"Unknown"},errors:{agentInfoMissing:"Agent information is unavailable",checkUpdateCapability:"Unable to check update capability",checkingUpdateConfig:"Checking update configuration",cloudOnlyUpdate:"Only cloud Agents can be updated",deleteDeployedUnsupported:"Deleting deployed Agents is not supported",deleteDraftUnsupported:"Deleting drafts is not supported",loadMpaDeletePreview:"Unable to load MPA delete preview",loadAgentInfo:"Unable to load Agent information",loadApiKey:"Unable to load the API key",loadGithubVersions:"Unable to load GitHub versions",loadEvaluations:"Unable to load evaluation cases",loadMpaAgentView:"Unable to load MPA Agent status",loadMpaDiagnostics:"Unable to load Runtime diagnostics",loadOptimizations:"Unable to load optimization suggestions",loadRuntimeDetails:"Unable to load Runtime details",loadSessionConfig:"Unable to load Session configuration",loadUsage:"Unable to load usage data",noCreatePermission:"This account cannot create Agents",noManagePermission:"This account cannot manage this Agent",originalConfigUnavailable:"The original configuration is unavailable",probeIntegration:"Unable to check integration capabilities",rollbackVersion:"Unable to create a version rollback",runtimeRegionMissing:"The Runtime region is missing",updateCapabilityMismatch:"The Runtime update capability does not match this configuration",updateCapabilityPending:"The Runtime update capability is still being checked",updateConfigRestoring:"Restoring update configuration",updateUnsupported:"This Runtime cannot be updated",usageMismatch:"The returned usage data does not match this Agent"}},mze={title:"Environments",loadFailed:"Failed to load environments. Check the storage configuration and try again.",storageUnavailable:"Persistent storage is not configured. Environment management is unavailable.",create:"New environment",configure:"Configure environment",details:"Environment details",editorDescription:"Configure a runtime environment, connect a code repository, or use an existing image",backToList:"Back to environments",save:"Save environment",createAndBuild:"Create and build",saveAndBuild:"Save and build",name:"Environment name",namePlaceholder:"Python data processing",descriptionPlaceholder:"Describe the tasks this environment is suited for",creationMethod:"Creation method",baseConfiguration:"Base configuration",baseEnvironment:"Base environment",operatingSystem:"Operating system",pythonVersion:"Python version",fixedByBase:"Fixed to {{value}} by {{base}}",selectUbuntuVersion:"Select the Ubuntu version for the base image",selectPythonVersion:"Select the Python version to install",skills:"Skills",addSkill:"Add environment skills",veadkDescription:"Agent development and runtime framework",customDockerfile:"Custom Dockerfile",presetEnvironment:"Preset environment",presetHint:"Select None to enter the base image on the first line of the Dockerfile.",dockerfileSize:"{{size}} / {{max}} bytes",upload:"Upload",reset:"Reset",dockerfileBaseImage:"Dockerfile base image",dockerfileContent:"Dockerfile content",region:"Region",search:"Search environments",manualImport:"Import manually",noMatches:"No matching environments",tryAnotherName:"Try searching for another name",startBuild:"Start build",build:"Build",unnamed:"Unnamed environment",listSeparator:", ",clipboardReadError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",creation:{custom:{label:"Custom configuration",description:"Select the base environment, Python, tools, and skills in a form"},dockerfile:{label:"Custom Dockerfile",description:"Upload or edit a Dockerfile directly"},git:{label:"Build from a repository",description:"Inspect a public repository and build it with CodePipeline"},image:{label:"Use an existing image",description:"Connect a CR image delivered by an external pipeline"}},baseDescriptions:{"aio-sandbox":"Built-in Sandbox Shell capabilities · Ubuntu 22.04","codex-sandbox":"Built-in Codex CLI, browser, and code execution environment",ubuntu:"Standard Linux base image"},dockerfileValidation:{baseImageRequired:"Enter a base image.",duplicateFrom:"The base image is fixed on the first line. Remove the FROM instruction from the Dockerfile body.",tooLarge:"The Dockerfile cannot exceed 128 KiB.",empty:"The Dockerfile cannot be empty.",missingFrom:"The Dockerfile must include a FROM instruction."},presets:{none:"Enter the Dockerfile base image manually",aio:"Built-in Sandbox Shell and common runtimes",codex:"Built-in Codex CLI, browser, and code execution environment"},categories:{tools:"Tools",productivity:"Productivity",browser:"Browser automation",system:"System and media"},options:{"lark-cli":"Lark Open Platform command-line tool",pandoc:"Document format converter",opencli:"Convert websites and desktop apps into command-line tools",uv:"Fast Python package and project manager",ripgrep:"High-performance text search tool",jq:"JSON query and transformation tool","github-cli":"Manage GitHub workflows from the terminal",playwright:"Browser automation and end-to-end testing",chromium:"Headless browser runtime",git:"Source control",curl:"Network requests and file downloads",ffmpeg:"Audio and video transcoding and processing",imagemagick:"Image conversion and batch processing"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec",hoursMinutes:"{{hours}} hr {{minutes}} min"},buildStatus:{preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Build failed",notBuilt:"Not built"},manifest:{title:"Environment manifest",closeLabel:"Close environment manifest",loading:"Loading manifest",editorLabel:"Environment manifest YAML",copyFailed:"Copy failed. Try again.",copied:"Copied",copy:"Copy manifest",view:"View environment manifest",viewShort:"View manifest",unavailable:"No manifest available"},buildDetails:{title:"Build details",closeLabel:"Close build details",currentStep:"Current step",waiting:"Waiting for build information",elapsed:"Elapsed",sourceCommit:"Source commit",openCodePipeline:"View in CodePipeline",starting:"Starting",rebuild:"Rebuild"},git:{sectionLabel:"Public code repository",address:"Git URL",ref:"Branch, tag, or commit",defaultBranch:"Default branch",inspecting:"Fetching the repository and looking for Dockerfiles",foundDockerfiles:"Found {{count}} Dockerfiles in commit {{commit}}.",savedDockerfileLoaded:"Loaded the saved Dockerfile. Inspect the repository again to check for updates.",noDockerfile:"No Dockerfile was found. Check the branch or repository contents.",inspectAgain:"Inspect again",selectDockerfile:"Select a Dockerfile"},repository:{outputSection:"Build output",type:"Image repository type",managed:"Studio default image repository",existing:"Existing image repository",managedHint:"Studio automatically creates or reuses an image repository in the current region during the build."},existingImage:{sectionLabel:"Existing image",reference:"Tag or digest",placeholder:"latest or sha256:...",hint:"Enter an image tag or a complete digest beginning with sha256:."},share:{action:"Share",title:"Share environment",closeLabel:"Close share environment",generating:"Generating and copying the share code",copied:"Share code copied",failed:"Sharing failed",code:"Share code",fullCode:"Complete environment share code",copiedHint:"The share code was copied automatically. You can also view or copy it here.",copyFailedHint:"Automatic copy failed. Copy the share code above manually or try again.",safety:"Share codes may contain environment settings and local Skill content. Send them only to trusted recipients.",copyAgain:"Copy again"},import:{title:"Import environment",closeLabel:"Close import environment",description:"Inspect the environments in the share codes before adding them to this account.",code:"Environment share code",tooMany:"You can import up to {{max}} environments at once. {{count}} share codes were found.",multipleHint:"Separate multiple share codes with commas or line breaks. Duplicates are ignored automatically.",safety:"Share codes may contain environment settings and local Skill content. Import them only from trusted sources.",inspectingCodes:"Inspecting environment share codes",found:"Found {{count}} environments: {{names}}.",itemError:"Share code {{index}}: {{error}}",invalidCode:"Invalid share code.",noResult:"The service returned no import result for this share code.",partial:"Imported {{created}} environments; {{remaining}} remain. Valid failed items can be retried.",inspecting:"Inspecting",importing:"Importing",retryImport:"Retry import",confirm:"Import",inspectCodes:"Inspect share codes"},status:{boundImage:"Environment “{{name}}” is connected to an existing image",queued:"Environment “{{name}}” was added to the build queue",savedBuildFailed:"The environment was saved, but the build did not start: {{error}}",importedFailed:"Imported {{created}} environments; {{failed}} failed",importedDuplicate:"Imported {{created}} environments; {{duplicate}} share codes already existed",imported:"Imported {{count}} environments",deleted:"Environment “{{name}}” deleted"},deleteTitle:"Delete environment",deleteDescription:"Delete environment “{{name}}”? This cannot be undone.",errors:{repositoryRequired:"Enter a public code repository URL.",repositoryHttps:"Enter the HTTPS URL of a public repository.",repositoryInvalid:"Enter a valid public repository HTTPS URL.",imageReferenceWhitespace:"A tag or digest cannot contain spaces.",imageDigestInvalid:"The digest must be a complete sha256 value.",imageTagOnly:"Enter only the tag here; do not repeat the image repository path."}},vze={searchPlaceholder:"Search resource names",emptyMessage:"No options available",searchAriaLabel:"Search {{label}}",loadingMore:"Loading more resources…"},yze={retryDeployment:"Retry deployment",retrying:"Retrying…",collapse:"Collapse error details",expand:"Expand full error details",copy:"Copy full error details"},bze={steps:"Build steps",log:"Build log",syncing:"Syncing",loadFailed:"Failed to load",synced:"Synced",recentOnly:" · Recent logs only",copiedLog:"Build log copied",copyLog:"Copy build log",copied:"Copied",copy:"Copy",logContent:"Build log content",waiting:"Waiting for CodePipeline logs…",empty:"No build logs"},xze={defaultLabel:"Studio default environment",defaultDescription:"Use the standard runtime environment provided by Studio",status:{notBuilt:"Not built",preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Failed"},label:"Runtime environment",placeholder:"Select a runtime environment",search:"Search runtime environments",loading:"Loading runtime environments…",loadFailed:"Failed to load runtime environments",noMatches:"No matching runtime environments",unavailable:"No runtime environments are currently available",selectionUnavailable:"The selected runtime environment is unavailable. Select another one.",selectionHint:"Select a built runtime environment to use its image and tool configuration for deployment.",versionChanged:"The selected environment version has changed. Review it before continuing.",versionMissing:"The selected environment version no longer exists. Select another one.",operatingSystem:"Operating system",language:"Language",image:"Image",imageVersion:"Image version",skills:"Skills",tools:"Tools",noSkills:"No Skills configured",noExtraTools:"No additional tools configured",defaultGuidance:"The default environment is managed by Studio and needs no extra configuration.",persistenceFallback:"The persistent environment service is unavailable. The default environment is being used.",emptyFallback:"No custom environments are available."},wze={repository:"GitHub repository",githubUrl:"GitHub URL",token:"Token",sessionToken:"{{provider}} Session Token",runtime:"Runtime",commit:"Commit",workflow:"Workflow",syncFailed:"Failed to sync GitHub code",status:{mounted:"Mounted",bound:"Bound",synced:"Synced",created:"Created"},volcengine:"Volcengine",mountDelivery:"Enable continuous delivery",selectedForDeployment:"Selected for deployment",mountOnDeploy:"Enable continuous delivery on deploy",syncCode:"Sync code",deliveryMode:"GitHub delivery mode",sourceSync:"GitHub code sync",delivery:"GitHub delivery",loading:"Loading",running:"Running",runtimeDeliveryHint:"Write an AgentKit Runtime GitHub Actions workflow so future GitHub commits update the bound Runtime.",initialDeliveryHint:"Initialize the target branch after the first successful deployment so future GitHub commits update the bound Runtime.",sourceSyncHint:"Studio pushes directly to the target branch. Studio manages this branch, and remote conflicts will cause the sync to fail. Use the deployment button to publish the Runtime.",tokenPlaceholder:"repo or contents:write permission",getToken:"Get token",hideToken:"Hide token",showToken:"Show token",tokenHelp:"The token is used only for this operation and is cleared from the form after success.",targetBranch:"Target branch",actionsSecretPlaceholder:"Used to write a GitHub Actions secret",sessionTokenPlaceholder:"Optional temporary credential",syncing:"Syncing…",pendingHint:"Continuous delivery is selected. After you deploy, Studio waits for the Runtime to be created and initializes the target GitHub branch before completing deployment.",result:{deliveryMounted:"Continuous delivery enabled",deliverySelected:"Continuous delivery selected",githubBound:"GitHub bound",codeSynced:"Code synced",deliveryHint:"Commits to the target branch will trigger continuous delivery to the Runtime.",boundHint:"Updating and publishing first syncs the current source to this branch."},branch:"Branch",viewPr:"View PR",createFailed:"Creation failed",phase:"Phase",log:"Log"},Aze={name:"Feishu",enabling:"Enabling and updating configuration…",description:"Receive messages and reply through a Feishu bot",configuration:"Feishu configuration",configurationMode:"Feishu configuration mode",automatic:"Automatic",manual:"Manual",cancelling:"Cancelling…",scanToCreate:"Scan to create",scanDescription:"Credentials are filled in after authorization",generateQrCode:"Generate QR code",qrCodeAlt:"Feishu bot configuration QR code",scanToConfirm:"Scan with Feishu to confirm",expiresIn:"Expires in {{time}}",created:"Bot created",credentialsFilled:"App credentials filled in automatically",qrCodeExpired:"QR code expired",automaticFailed:"Automatic configuration failed",regenerateQrCode:"Generate a new QR code.",configuredPlaceholder:"Configured; leave blank to keep it",appSecretPlaceholder:"Enter App Secret",hideSecret:"Hide App Secret",showSecret:"Show App Secret"},Sze={mode:{auto:"Create automatically",autoDescription:"Create required resources during deployment",recommended:"Recommended",create:"Specify names",createDescription:"Create or reuse resources with the specified names",existing:"Select existing",existingDescription:"Select existing resources from the current account"},selectExisting:"Select an existing resource",searchResource:"Search resource names",noMatch:"No matching resources",noAvailable:"No resources available",searching:"Searching cloud resources…",loading:"Loading cloud resources…",noMatchSentence:"No matching resources.",noAvailableSentence:"No resources available.",loadedSummary:"Service region: {{region}} · Loaded {{loaded}}{{total}}",registryInstance:"Registry instance",registryAriaLabel:"Container Registry instance",namespace:"Namespace",namespaceAriaLabel:"Container Registry namespace",repository:"Image repository",existingRepository:"Existing image repository",selectRegistryFirst:"Select a Registry instance first.",selectNamespaceFirst:"Select a Namespace first.",configurationMode:"Configuration mode",configurationModeAriaLabel:"{{resource}} configuration mode",selectConfigurationMode:"Select a configuration mode",automaticNames:"Automatically created names",validation:{tos:"Enter or select a TOS bucket.",cr:"Enter or select a CR instance, namespace, and image repository.",codePipeline:"Enter or select a CodePipeline Workspace and Pipeline.",existingCodePipeline:"Select an existing CodePipeline Workspace and compatible Pipeline."},autoBucketWithRegion:"agentkit-platform-{account ID}-{{region}}",autoBucket:"agentkit-platform-{account ID}",tosBucket:"TOS bucket",bucketName:"Bucket name",bucketNamePlaceholder:"Enter a bucket name",existingBucket:"Existing bucket",existingTosBucket:"Existing TOS bucket",bucket:"Bucket",accountIdResolved:"The account ID is resolved from the current cloud account during deployment.",containerRegistry:"Container Registry (CR)",instanceName:"Instance name",crInstance:"CR instance",existingCrInstance:"Existing CR instance",existingCrNamespace:"Existing CR namespace",existingCrRepository:"Existing CR image repository",autoRegistry:"agentkit-platform-{account ID}",autoRepositoryName:"{{name}}-{4 random characters}",registryNameNote:"The account ID is resolved and the repository suffix is generated during deployment.",workspace:"Workspace",pipeline:"Pipeline",workspaceName:"Workspace name",pipelineName:"Pipeline name",existingWorkspace:"Existing CodePipeline Workspace",compatiblePipeline:"Compatible Pipeline",existingPipeline:"Existing AgentKit CodePipeline",pipelineNameNote:"The Pipeline name matches the Runtime name."},Tze={commit:"Commit",steps:{permissions:"Preflight OTA permissions",resolving:"Resolve target version",downloading:"Download and verify the full update package",preparing:"Prepare VeFaaS Function code",provisioning:"Check and provision Studio cloud resources",scheduler:"Update the scheduled task service",submitting:"Submit the Function update",publishing:"Publish a new Revision and restart the service"},stages:{permissions:"Preflight OTA permissions",resolving:"Resolve version details",downloading:"Download update package",preparing:"Prepare Function code",provisioning:"Provision Studio cloud resources",scheduler:"Update scheduled task service",submitting:"Submit Function update",publishing:"Publish Revision",checking:"Check for updates",unknown:"Unknown stage"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec"},logPermissionPrefix:"Unable to read VeFaaS release logs. The Function role lacks ",logPermissionSuffix:"; the update will continue.",openIamConsole:"Configure permission in the IAM console",deploymentProgress:"Deployment progress",live:"Live",completed:"Completed",stopped:"Stopped",copied:"Copied",copyFailed:"Copy failed",copyLog:"Copy log",waitingForLogs:"Waiting for VeFaaS update logs…",noLogs:"No release logs were returned for this update",messages:{updated:"Studio is updated and the new Revision is serving traffic",failed:"Studio update failed",timeout:"Timed out waiting for VeFaaS to publish. Check for updates again later.",submitted:"Update submitted. Waiting for VeFaaS to publish the new version.",connectionSwitched:"The connection changed. Confirming the new version status."},checkingPermissions:"Checking OTA permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",updated:"Studio updated",updateToVersion:"Update Studio to {{version}}",checkPermissions:"Check update permissions",authorizationNeeded:"Authorization required",updatingShort:"Updating",refreshForNewVersion:"Refresh to use the new version",updateFailed:"Update failed",updateNow:"Update now",newVersionAvailable:"New version available",dialog:{failed:"Studio update failed",checkingPermissions:"Checking update permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",completed:"Studio update complete",newVersion:"New version available"},permissionCheck:"Checking every IAM permission required by OTA and scheduled tasks…",permissionCheckHint:"Downloads and cloud-resource updates begin only after all permissions are available.",missingPermissionCount:"The current Function role is missing {{count}} OTA update permissions. No cloud resources have been changed.",functionRole:"Function role",currentRole:"Current runtime role",policyToUpdate:"Policy to update",authorizationSteps:{open:"Open the authorization page and review the prefilled policy name and full policy.",debug:"Select “Start debugging” on the page to apply the policy update.",return:"Return to this window and select “Authorized, check again”."},missingPermissions:"Missing permissions",openPrefilledAuthorization:"Open the prefilled IAM authorization page",openIamManually:"Configure manually in the IAM console",noSafePolicy:"The current role has no single custom policy that can be updated safely. Ask an administrator to add the permissions above to this role.",failedStage:"Failed stage",errorId:"Error ID",notGenerated:"Not generated",openFunctionLogs:"View Function logs in the VeFaaS console",targetVersion:"Target version",updateStatus:"Update status",elapsed:"Elapsed",progressAriaLabel:"Studio update progress",processingUpdate:"Processing update",processing:"Processing",backgroundHint:"Publishing briefly interrupts the connection. Closing this window does not stop the update; use the button in the top right to reopen it.",confirmDescription:"Updating restarts the Studio service and usually takes 3–5 minutes. Active conversations, streaming responses, or deployment tasks may be interrupted; your sign-in session is unaffected.",selectVersion:"Select version",currentVersion:"Current version",changelog:"What's new",noChangelog:"No release notes",runInBackground:"Run in background",authorizedRecheck:"Authorized, check again",tryAgain:"Try again"},Cze={deploy:"Deploy",update:"Update",planHash:"Plan hash",backToConfiguration:"Back to configuration",releaseRegion:"Release region",deployRegion:"Deployment region",regionPreserved:"The existing Runtime deployment region is preserved during updates and cannot be changed.",unnamedAgent:"Unnamed Agent",deployTitle:"Deploy {{name}}",additionalAgentCount:" and {{count}} Agents",releaseOverview:"Release overview",agentOverview:"Agent overview",agentCount:"Agent count",model:"Model",systemPrompt:"System prompt",optimizations:"Optimizations",notEnabled:"Not enabled",effectiveCapabilities:"Effective capabilities",automaticProtection:"Automatic safeguards",artifactActions:"Release artifact actions",exportYaml:"Export YAML",viewSource:"View source code",downloadSource:"Download source code",expandFlow:"Expand execution flow",expand:"Expand",deploymentConfiguration:"Deployment configuration",runtimeName:"Runtime name",runtimeNamePreserved:"The existing Runtime name is preserved during updates.",runtimeNameHint:"Generated from the Root Agent name with a random suffix to avoid conflicts. Use 4–64 letters, numbers, hyphens, or underscores.",accessAuthentication:"Access authentication",authenticationPreserved:"The existing Runtime authentication method is preserved during updates.",authenticationMethod:"Authentication method",authenticationAriaLabel:"Deployment authentication method",authenticationPlaceholder:"Select an authentication method",messageChannels:"Message channels",instanceSettings:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",sidecarSingleInstance:"Harness Sidecar currently supports one instance only. The Runtime is fixed at 1–1.",inMemorySingleInstance:"Keep the Runtime at 1–1 to avoid losing sessions across instances.",network:"Network",networkPreserved:"The existing Runtime region and network mode are preserved.",networkMode:"Network mode",networkModes:{public:"Public",both:"Public + VPC"},subnetId:"Subnet ID",subnetHint:"Optional; separate multiple IDs with commas",sharedInternetAccess:"Shared public internet access in the VPC",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",createEvaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment succeeds.",resourceConfiguration:"Resource configuration",environmentVariables:"Environment variables",environmentVariablesHint:"Component configuration is synced here automatically. Review the final values before deployment.",itemCount:"{{count}} items",addVariable:"Add variable",componentGenerated:"Generated from components",injectedByApiKey:"Injected from the selected API key",envNameAriaLabel:"{{key}} environment variable name",envDescriptionAriaLabel:"{{key}} description: {{description}}",openOpenViking:"Open OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}: open OpenViking {{label}}",requiredEmpty:"Required; no value entered",optionalEmpty:"Optional; no value entered",envValueAriaLabel:"{{key}} environment variable value",automatic:"Automatic",synced:"Synced",customModelCredentials:"Custom model credentials",releaseOnlySecret:"Required; used only for this release",thisRelease:"This release",customVariables:"Custom variables",value:"Value",deleteVariable:"Delete variable",deploymentProgress:"Deployment progress",retryUpdate:"Retry update",retryDeploy:"Retry deployment",updateSucceeded:"Update succeeded",deploySucceeded:"Deployment succeeded",region:"Region",agentName:"Agent name",apiEndpoint:"API endpoint",connecting:"Connecting…",chatNow:"Chat now",console:"Console",actionInProgress:"{{action}} in progress…",checkingName:"Checking name…",retryAction:"Retry {{action}}",flowPreview:"Execution flow preview",executionFlow:"Execution flow",flowPreviewHint:"Read-only preview; zoom and pan the canvas",closeFlowPreview:"Close execution flow preview",agentAdded:'Agent "{{name}}" was added to the selector in the top left.',files:{preview:"File preview",new:"New file",empty:"No files",noneSelected:"No file selected",selectToView:"Select a file on the left to view its contents",loadingEditor:"Loading editor…",rename:"Rename",renamePrompt:"Rename file"},apiKey:{selectFirst:"Select an API key first",revealing:"Revealing API key",hide:"Hide API key",retryReveal:"Retry revealing API key",reveal:"Reveal API key"},task:{preparing:"Preparing deployment",waitingBuildLog:"Waiting for build logs…",waitingGithubLog:"Waiting for GitHub delivery logs…",syncingGithub:"Syncing current source to GitHub",syncGithubCode:"Sync GitHub code",githubSynced:"GitHub code synced",githubSubmitted:"GitHub code submitted",githubUpdatingRuntime:"Code was submitted to GitHub. GitHub Actions is updating the same Runtime.",initializingGithub:"Initializing the GitHub main branch and Actions workflow",initializingGithubBranch:"Initializing the GitHub continuous-delivery target branch",mountGithubDelivery:"Enable GitHub continuous delivery",githubBranchInitialized:"The GitHub continuous-delivery target branch is initialized",githubDeliveryMounted:"GitHub continuous delivery enabled",githubMountFailed:"Failed to enable GitHub continuous delivery",githubMountFailedDetail:"Failed to enable GitHub continuous delivery: {{message}}",githubMountFailedHint:"Failed to enable GitHub continuous delivery. See the GitHub log for details.",applyingMpaProfile:"Applying the Agent profile to MPA Runtime",mpaProfileApplied:"MPA Runtime profile applied",runningMpaSmoke:"Verifying the MPA Runtime execution path",mpaReady:"MPA Runtime is ready",deploymentComplete:"Deployment complete",deployedNotConnected:"Deployed, not connected yet",cancelled:"Cancelled",cancelledHint:"Deployment was cancelled and the Runtime resources were requested for deletion.",deploymentStatusUnconfirmed:"Deployment status unconfirmed",deploymentFailed:"Deployment failed",buildFailedHint:"Image build failed. See the build log for details."},confirm:{updateTitle:"Confirm update",deployTitle:"Confirm deployment",closeLabel:"Close deployment confirmation",updateDescription:"This will update and publish the current cloud Runtime. It may take a few minutes. Continue?",deployDescription:"This will create a new cloud Runtime. Deployment may take a few minutes. Continue?",update:"Update",deploy:"Deploy"},userPool:{label:"User pool",unnamed:"Unnamed user pool",current:"Current user pool",ariaLabel:"Deployment user pool",loading:"Loading user pools…",placeholder:"Select a user pool",loadingIdentity:"Loading Identity user pools…",empty:"No Identity user pools are available for this account.",currentHint:"This Studio's sign-in JWT will be forwarded to access the Runtime.",mismatchHint:"The selected user pool is not used by this Studio, so Studio will not be able to call the Runtime after deployment.",markedHint:"The user pool used by this Studio is marked in the list."},authentication:{apiKeyDescription:"Default method using the Runtime API key",userPool:"User pool",userPoolDescription:"Use a JWT issued by an Identity user pool"},steps:{buildImage:"Build image",deploy:"Deploy",publish:"Publish",syncCode:"Sync code",uploadPackage:"Upload code package",packageImage:"Package image",createRuntime:"Create Runtime",publishService:"Publish service",updateInstances:"Update instance configuration",createEvaluationSets:"Create evaluation sets",applyMpaProfile:"Apply MPA profile",verifyMpaRuntime:"Verify MPA Runtime",mpaReady:"MPA Runtime ready"},errors:{instanceRangeInteger:"Minimum instances must be an integer of 0 or more, and maximum instances must be an integer greater than 0.",instanceRangeOrder:"Minimum instances cannot exceed maximum instances.",selectApiKey:"Select an API key in the model configuration first.",loadApiKey:"Failed to load the API key. Try again.",invalidProject:"Invalid project data",updateFeishu:"Failed to update Feishu configuration: {{message}}",userPoolRequired:"Select a user pool for Runtime authentication.",vpcRequired:"Enter a VPC ID when using a VPC network.",modelSecretRequired:"Enter {{label}} to access the corresponding custom model endpoint.",managedApiKeyRequired:"{{requirement}}. Return to model configuration and select an API key first.",feishuEnvRequired:"Enter {{field}} after enabling Feishu.",runtimeNameExists:"This Runtime name already exists. Change it and try again.",deployedButGithubMountFailed:"Deployment succeeded, but enabling GitHub continuous delivery failed: {{message}}",deployedButGithubBindFailed:"Deployment succeeded, but binding GitHub failed: {{message}}",mpaRuntimeIdMissing:"Deployment succeeded, but the Runtime ID is missing, so the MPA profile cannot be applied.",mpaOperationIncomplete:"MPA Runtime setup did not complete. Retry this deployment task.",deploymentStatusUnconfirmed:"The connection was interrupted, so the final deployment status cannot be confirmed. The task may still be running in the cloud. Check the same task in AgentKit or CodePipeline and avoid a duplicate deployment.",failedAtStage:"{{action}} failed during {{stage}}: {{message}}",noAgentAtEndpoint:"Connected successfully, but no Agents were found at this endpoint (/list-apps is empty).",addAgent:"Failed to add Agent: {{message}}",modelApiKeyRequired:"Enter the API key for this model endpoint."}},kze={title:"Workspaces",storageUnavailable:"Persistent storage is not configured. Workspace management is unavailable.",detail:"Workspace details",create:"New workspace",editorDescription:"Group frequently used environments. An environment can belong to multiple workspaces.",backToList:"Back to workspaces",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",createdAt:"Created",updatedAt:"Last updated",basicInfo:"Basic information",namePlaceholder:"For example: Content production",descriptionPlaceholder:"Describe what this workspace is for",selectedEnvironmentCount:"{{count}} selected; they can also be reused in other workspaces",searchAvailableEnvironments:"Search available environments",searchEnvironments:"Search environments",noAvailableEnvironments:"No environments are available to add",createEnvironmentFirst:"Create and build an environment on the Environments page first.",noMatchingEnvironments:"No matching environments",tryAnotherName:"Try searching for another name.",environmentStatus:{available:"Available",building:"Building",notBuilt:"Not built"},added:"Added",saved:"Workspace “{{name}}” saved",resourceType:"Workspace resource type",searchWorkspaces:"Search workspaces",loadFailed:"Unable to load workspaces",noMatchingWorkspaces:"No matching workspaces",tryAnotherNameOrEnvironment:"Try another name or environment",noEnvironmentAdded:"No environments added",environmentMissing:"Environment missing",availableFraction:"{{available}}/{{total}} available",available:"Available",availableCount:"{{count}} available",updated:"Updated",addEnvironment:"Add environment",deleteTitle:"Delete workspace",deleteDescription:"Delete workspace “{{name}}”? Its environments will not be deleted.",deleted:"Workspace “{{name}}” deleted",clipboardPermissionError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",codeProjects:"Code projects"},Oze={back:"Back",detailNavigation:"Detail navigation",noData:"No data",actions:"Actions",moreActions:"More actions for {{label}}",actionsFor:"Actions for {{label}}",loading:"Loading resources…"},Eze={addSkill:"Add Skill",remove:"Remove {{name}}",confirmRemoveRuntime:"Remove the running Skill “{{name}}” from the new version?",selectedCount:"Added skills · {{count}}",close:"Close {{label}}",sources:{runtime:"Running source · Preserved as-is; remove it or replace it with a Skill of the same name",local:"Local",skillspace:"AgentKit Skills Center",skillhub:"Volcengine Find Skill marketplace"},tabs:{local:"Local files",localShort:"Local files",skillspace:"AgentKit Skills Center",skillspaceShort:"AgentKit",skillhub:"Volcengine Find Skill marketplace",skillhubShort:"Find Skill"}},_ze={model:"Model",turnControls:"Turn controls",pause:"Pause",resume:"Resume",interrupt:"Interrupt",cancel:"Cancel",pauseTurn:"Pause the whole flow at a safe point",resumeTurn:"Resume the whole flow",interruptTurn:"Interrupt this flow and retain Session context",cancelTurn:"Cancel this flow permanently",turnState:{running:"Running",pausing:"Reaching safe point",paused:"Paused",resuming:"Resuming",interrupting:"Interrupting",cancelling:"Cancelling",interrupted:"Interrupted",completed:"Completed",failed:"Failed",cancelled:"Cancelled",orphaned:"Status pending",newTurnRequired:"Continue from checkpoint"},tasks:{ppt:"Presentation",image:"Image generation",video:"Video generation"},prompts:{ppt:{quarterlyReview:"Review 【quarter】 business performance, highlighting metric gaps, causes, and recommended actions",projectUpdate:"Present the progress of 【project name】: milestones, risks, budget, and resource requests",solutionProposal:"Create a solution proposal for 【customer industry】: pain points, architecture, implementation plan, and benefits",industryAnalysis:"Analyze trends in 【industry topic】 and recommend strategic opportunities based on the competitive landscape"},image:{launchVisual:"Design a 【high-tech】 launch-event key visual for 【brand or product】",ecommercePoster:"Create an e-commerce poster for 【product name】 that highlights 【core selling point】 and brand colors",conceptRendering:"Create a photorealistic concept rendering of 【product or space】 in 【usage scenario】",socialGraphic:"Create a concise, professional corporate social graphic for 【campaign theme】"},video:{brandFilm:"Create a 30-second promotional video for 【brand name】 that highlights 【brand value】",productLaunch:"Create a 45-second launch video for 【product name】 covering the pain point, features, scenarios, and call to action",trainingVideo:"Create a corporate training video about 【training topic】 that clearly explains 【key procedure or policy】",eventTeaser:"Create a 20-second teaser for 【event name】 with highlights, time and location, and registration details"}},firstFrame:"First frame",videoToEdit:"Video to edit",baseVideo:"Base video",optimizeSkillPlaceholder:"Describe the skill you want to improve…",createSkillPlaceholder:"Describe the skill you want to create…",createVideoPlaceholder:"Describe the video you want to create…",messageAgentPlaceholder:"Message {{name}}…",selectAgentFirst:"Select an agent first",selectSkillFirst:"Select the Skill you want to improve first",availableSkills:"Available skills",availableSubagents:"Available sub-agents",invokeSkill:"Use a skill",useSubagent:"Use a sub-agent",loadingCapabilities:"Loading Agent capabilities…",noMatchingSkills:"No matching skills for this Agent",noMatchingSubagents:"No matching sub-agents for this Agent",skillFallbackDescription:"Load and run this skill",agentFallbackDescription:"Hand this turn to the Agent",skill:"Skill",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",taskMode:"Task mode",selectTaskMode:"Select a task mode",loadingGenerationModel:"Loading generation model",modelUnavailable:"Model unavailable",cancelTask:"Cancel {{task}} task",stopGenerating:"Stop generating",viewVideoProgress:"View video generation progress",send:"Send",selectTaskType:"Select a task type",enterprisePrompts:"{{task}} enterprise prompts",sessionId:"Session ID",sessionIdLabel:"Session ID: ",initializing:"Initializing",copied:"Copied",copySessionId:"Copy session ID",sessionIdCopied:"Session ID copied",disclaimer:"Responses may be inaccurate",viewLogs:"View logs"},Rze={selectAgent:"Select Agent",noLocalAgents:"No local Agents.",searchRuntime:"Search Runtime names",mineOnly:"Created by me",noRuntimes:"No Runtimes.",unsupported:"Unsupported",createdByMe:"Created by me",connecting:"Connecting…",connected:"Connected",connect:"Connect",viewInfoFor:"View information for {{name}}",viewInfo:"View information",agentAndRuntimeInfo:"Agent and Runtime information",detailType:"Detail type",agentInfo:"Agent information",runtimeInfo:"Runtime information",loadingAgentInfo:"Loading Agent information…",cannotLoadAgentInfo:"Agent information is temporarily unavailable",unnamedAgent:"Unnamed Agent",subagents:"Sub-agents",tools:"Tools",skills:"Skills",previewUnsupported:"Preview unavailable",mountedComponents:"Mounted components",noMoreAgentInfo:"No additional Agent configuration information.",local:"Local",model:"Model",status:"Status",memoryMb:"Memory {{value}} MB",instances:"Instances {{min}}–{{max}}",resources:"Resources",version:"Version",loadingDetails:"Loading details…",environmentVariables:"Environment variables",errors:{notFound:"This Runtime no longer exists or the list is out of date. Refresh the list and try again.",accessDenied:"This account cannot access the Runtime. Check its Project and access permissions.",previewUnsupported:"This Agent Server version does not support information previews.",unavailable:"This Runtime is temporarily unavailable. Confirm that its status is Ready and try again.",timeout:"Loading timed out. Try again."},componentKinds:{knowledgebase:"Knowledge base",memory:"Memory",prompt_manager:"Prompt manager",example_store:"Example store",run_processor:"Run processor",tracer:"Trace",toolset:"Toolset",plugin:"Plugin",other:"Other"},runtimeStatus:{ready:"Ready",unreleased:"Unreleased",running:"Running",active:"Running",creating:"Creating",pending:"Pending",deploying:"Deploying",updating:"Updating",failed:"Failed",error:"Error",stopping:"Stopping",stopped:"Stopped",deleting:"Deleting",deleted:"Deleted"}},Dze={agent:"Agents",agentTypes:{general:"General Agents",mpa:"MPA Agents",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"Created by",namedAgent:"{{name}} Agent",storageLocation:"Storage location",currentBrowser:"Current browser",region:"Region",viewDeploymentProgress:"View deployment progress for {{name}}",viewRuntimeDetails:"View Runtime details for {{name}}",viewDetails:"View details for {{name}}",time:"Time",remainingTime:"Time remaining",expiringSoon:"Expiring soon",sandboxRemaining:"{{hours}} hr {{minutes}} min",wakeable:"Asleep",neverExpires:"Never expires",editDraftNamed:"Edit draft {{name}}",viewProgress:"View progress",deleteDraftNamed:"Delete draft {{name}}",recheckCompatibility:"Check chat compatibility for {{name}} again",connectedNamed:"{{name}} is connected",wakeAndChat:"Wake {{name}} and start chatting",chatWith:"Chat with {{name}}",waking:"Waking…",deploying:"Deploying",draft:"Draft",checking:"Checking",chatUnsupported:"Chat unsupported",checkFailed:"Check failed",creatorFilter:"Creator filter",agentType:"Agent type",searchAgents:"Search Agents",handoff:"Handoff",agentList:"{{type}} list",noMatchingAgents:"No matching Agents",adjustSearch:"Try adjusting the search or filters",noAgentType:"No {{type}}",noGeneralAgents:"No General Agents",createGeneralAgentDescription:"Create a General Agent to start building and chatting",createAgentType:"Create {{type}}",createAgent:"Create Agent",loadingMore:"Loading more Agents",scrollForMore:"Scroll down to load more",allLoaded:"All Agents loaded",deleteDraftTitle:"Delete draft?",deleteDraftDescription:"“{{name}}” cannot be recovered after deletion.",deleteDraft:"Delete draft",loadGeneralAgents:"Load General Agents",loadAgentType:"Load {{type}}",compatibility:{checking:"Requesting Runtime /list-apps to confirm that this Agent supports Studio chat.",empty:"Runtime /list-apps returned no available Agents, so chat is currently unavailable.",supported:"This Runtime supports Studio chat.",unknownError:"The Runtime /list-apps request failed without a recognizable error."},sandboxStatus:{ready:"Ready",wakeable:"Asleep",creating:"Creating",starting:"Starting",initializing:"Starting",pending:"Pending",running:"Running",failed:"Error",error:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"},wakingHint:"Waking the agent. This may take some time.",mpaCreate:{name:"Name",namePlaceholder:"e.g. test-agent",nameHelp:"Used as the Runtime name. Use 4–64 letters, numbers, underscores or hyphens.",stepsLabel:"Creation steps",steps:{basics:"Basics",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"Database"},next:"Next",previousStep:"Previous",pgDescription:"Choose an existing PostgreSQL instance. Creation prepares an isolated database for this agent on that instance.",pgSplitDescription:"Use the configured business PG Workspace. Agents share this Workspace, each with its own database. Shared resource records are stored separately in mpa_admin_workspace / mpa_admin_db, configured by the administrator.",pgConsole:"Create or inspect an AIDAP PG Workspace in Volcengine",pgHost:"PG host",pgPort:"PG port",pgInvalid:"Enter a valid PG host and port.",pgCredentials:"The deployment service provides the PG login and password; host and port must match its configuration.",openvikingDescription:"Optional. Enter all three fields to enable OpenViking, or leave all blank to omit OpenViking settings from the new agent.",openvikingConsole:"Inspect OpenViking resources in Volcengine",openvikingUrl:"OpenViking service URL",openvikingResourceId:"OpenViking resource ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"Enter a valid HTTPS service URL, resource ID and API Key together, or leave all blank.",openvikingCredentials:"The API Key is used only for this creation and is not saved in browser drafts; re-enter it after a refresh.",tosTitle:"Session output storage",tosDescription:"Optional. Enter complete TOS credentials and a bucket to mount an isolated output directory for every Session. Leave all three blank to use the server defaults; TOS mounting is disabled if no defaults are configured.",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS bucket",tosInvalid:"TOS Access Key, Secret Key, and bucket are all required together.",tosCredentials:"Credentials are used only for this creation and are not saved in browser recovery data or creation task records.",runtimeImage:"MPA image",workerImage:"Worker image",imageDefault:"Leave blank to use the configured image",imageInvalid:"Enter a valid container image reference without URLs, spaces or credentials.",title:"Create MPA agent",agentId:"Agent ID",description:"Description",region:"Deployment region",plan:"Creation plan",sharedResources:"Prepare or reuse the account VPC, subnets and APIG message gateway",agentResources:"Prepare an isolated database, Skill Space and worker, then deploy the agent",readiness:"Verify gateway and agent readiness before adding the agent to the list",checking:"Checking creation configuration…",configured:"Creation configuration is ready. Submission checks cloud resources and starts provisioning.",notConfigured:"Creation prerequisites are not configured. Ask an administrator to configure them, then retry.",loadFailed:"Could not check creation configuration. Please retry.",reload:"Check again",submit:"Start creation",retry:"Retry creation",newAgent:"Create another agent",newAgentDescription:"Create another agent opens an editable new request and replaces this recovery draft. It does not cancel the old task. If the old task is still running, wait for it to finish before submitting.",close:"Close",cancel:"Cancel creation",confirmCancel:"Confirm cancellation",cancelDescription:"Cancellation stops subsequent steps. Created databases, Skill Spaces, gateways and other registered resources are retained. Retry using the same agent ID.",background:"Creation continues after closing this window. Open it again to view progress.",pollFailed:"Progress is temporarily unavailable. Reconnecting; avoid creating another agent.",creationFailed:"This step failed. Check its resources, server configuration and permissions, then retry the same agent ID.",cancelFailed:"Cancellation failed. Check the current progress and retry.",cancelled:"Creation cancelled. Registered resources are retained for retry.",timeout:"Creation timed out. Registered resources are retained. Inspect them before retrying.",interrupted:"Creation was interrupted. Retry the same agent ID to recover registered resources.",skillSpace:"Skill Space",states:{running:"Creating",cancelling:"Cancelling",succeeded:"Created",failed:"Creation failed",cancelled:"Cancelled"},stages:{queued:"Queued",checking:"Checking account and configuration",network:"Preparing VPC and subnets",gateway:"Preparing APIG and IM Gateway",database:"Preparing business database",skills:"Preparing Skill Space",worker:"Preparing worker",deploying:"Preparing database, skills and Runtime",verifying:"Waiting for agent readiness",admin_workspace:"Prepare management PG Workspace",business_workspace:"Prepare business PG Workspace",admin_database:"Initialize shared management database"},back:"Keep creating",pgAutoDescription:"VeADK uses its deployment account to create or reuse two PG Workspaces. mpa_admin_workspace / mpa_admin_db stores shared resource records; the business Workspace hosts an independent database for each agent. No PG connection input is needed. Preparation starts after submission.",pgModeChanged:"This submitted task uses previous PG settings and cannot be retried in automatic mode. Ask an administrator to reconcile its resources and task before starting a new creation.",pgMigrationRequired:"An existing shared registry is configured. Migrate its resource records to mpa_admin_workspace / mpa_admin_db and coordinate the registry URL cutover for existing Runtimes, then recheck this configuration."}},Lze={library:"Skill library",skill:"Skill",skills:"Skills",skillSpace:"Skill space",sandboxNotConfigured:"Dev Sandbox is not configured by an administrator",adminNotConfigured:"Not configured by an administrator",totalItems:"{{count}} items",cannotLoadSpaces:"Unable to load Skill spaces",someSpacesFailed:"Some Skill spaces failed to load",degradedRelationWarning:"Some relations are invalid. Readable skills have been restored.",downloadZip:"Download ZIP",optimize:"Optimize",closeSkillDetails:"Close Skill details",skillId:"Skill ID",allFiles:"All files",loadingSkillContent:"Loading Skill content…",noSkillContent:"This Skill has no SKILL.md content",addSkill:"Add Skill",localUpload:"Upload locally",localUploadDescription:"Select a ZIP file and upload it to the Skill space after validation",autoCreate:"Create automatically",autoCreateDescription:"Choose a model and style, then create a Skill through conversation",createSkill:"Create Skill",optimizeNamed:"Optimize {{name}}",deleteSkillConfirm:"Delete the entire Skill “{{name}}”? This affects every space that references it.",deleteSpaceConfirm:"Delete Skill space “{{name}}”? Make sure its Skills have been deleted first.",manageSpaceDescription:"Manage Skills in this space and create new versions",backToSpaces:"Back to Skill spaces",overview:"Overview",skillCount:"Skills",skillCountValue_one:"{{count}} Skill",skillCountValue_other:"{{count}} Skills",updatedAt:"Updated",skillsInSpace:"Skills in {{name}}",searchSkills:"Search Skills",cannotLoadSkills:"Unable to load Skills",noMatchingSkills:"No matching Skills",noSkills:"No Skills",tryAnotherName:"Try searching for another name",emptySkillsDescription:"Upload a Skill locally or create one automatically",actions:"Actions",spaceDetails:"Skill space details",editSpace:"Edit space",deleteSpace:"Delete space",searchSpaces:"Search Skill spaces",spaceList:"Skill space list",noMatchingSpaces:"No matching Skill spaces",createSpace:"Create Skill space",newSpace:"New space",loadingMoreSpaces:"Loading more Skill spaces",scrollForMore:"Scroll down to load more",allSpacesLoaded:"All Skill spaces loaded",errors:{loadSpaces:"Unable to load Skill spaces. Try again later.",loadSkills:"Unable to load Skills. Try again later.",loadSkillDetails:"Unable to load Skill details. Try again later.",deleteSkill:"Unable to delete the Skill",deleteSpace:"Unable to delete the Skill space",downloadSkill:"Unable to download the Skill"},status:{active:"Available",available:"Available",creating:"Creating",disabled:"Disabled",enabled:"Enabled",failed:"Error",inactive:"Inactive",pending:"Pending",published:"Published",ready:"Ready",released:"Published",running:"Running",success:"Healthy",unavailable:"Unavailable",unreleased:"Unreleased",updating:"Updating",unknown:"Unknown"},sharedSpace:"Enterprise shared space",sharedDescription:"Skills available to everyone, published and maintained by administrators",sharedVisibility:"Everyone",sharedPreparing:"Preparing shared space",sharedLoadFailed:"Shared space unavailable",sharedEmpty:"No shared skills yet. Skills published by administrators will appear here",requestPublication:"Request publication",reviewSubmitting:"Submitting…",reviewSubmitted:"Submitted",reviewFailed:"Could not submit the publication request",reviewStatusFailed:"Failed to load review status",reviewRetry:"Apply again",reviewPending:"Pending review",reviewApproving:"Publishing",reviewApproved:"Shared",reviewReturned:"Returned",reviewHistory:"Review history",skillDetailSections:"Skill detail sections",versions:{title:"Version management",refresh:"Refresh",uploading:"Uploading…",upload:"Upload new version",close:"Close",hint:"New versions become public after approval and do not replace published versions; the skill name in the ZIP must match the original",loading:"Loading versions…",loadFailed:"Unable to load versions",filesFailed:"Unable to load version files",uploadFailed:"Unable to upload the new version",submitFailed:"Unable to submit for review",retry:"Retry",empty:"No versions yet",current:"Current version",notSubmitted:"Not submitted",submitting:"Submitting…",submit:"Request publication",processing:"Version status: {{status}}",filesLoading:"Loading files…",filesEmpty:"No files",history:"Review history",shared:"Published"},author:"Author",authorName:"Author: {{name}}"},Mze={library:"Knowledge bases",createBase:"New knowledge base",editBase:"Edit knowledge base",invalidName:"The name must start with a letter and contain only letters, numbers, and underscores.",nameHelp:"Start with a letter. Use up to 48 letters, numbers, or underscores.",optionalDescription:"Description (optional)",descriptionOnly:"AgentKit currently supports updating only the knowledge base description.",previewWeb:"Preview web content",addData:"Add data",openOriginalWeb:"Open original page",backToEdit:"Back to edit",confirmAdd:"Confirm and add",source:"Knowledge source",image:"Image",documentFile:"Document file",webPage:"Web page",webUrl:"Web page URL",generatingWebPreview:"Fetching the page and generating a Markdown preview",selectFile:"Select knowledge file",selectOrDropFile:"Select a file or drag it here",selectedFile:"{{size}} · Click to select another file",imageFileHelp:"PNG, JPG, and JPEG up to 200 MB",documentFileHelp:"PDF, PPTX, DOCX, XLSX, and TXT up to 200 MB",uploadingFile:"Uploading the file and adding it to the knowledge base",optionalName:"Name (optional)",optionalType:"Type (optional)",generatePreview:"Generate preview",uploadFile:"Upload file",editMetadata:"Edit knowledge metadata",knowledge:"Knowledge item",field:"Field",value:"Value",backToList:"Back to knowledge bases",metadataJson:"Metadata (JSON)",provider:"Provider",knowledgeId:"Knowledge ID",project:"Project",creator:"Created by",data:"Data",deleteInvalidAssociation:"Delete invalid association",noData:"This knowledge base has no data",addFirstData:"Add the first data item",format:"Format",size:"Size",searchData:"Search data",searchLibraryData:"Search knowledge base data",associationInvalid:"Association invalid",providerMissing:"The underlying Provider knowledge base no longer exists",noMatchingData:"No matching data",loadingMoreData:"Loading more data",retryLoading:"Retry loading",details:"Knowledge base details",searchBases:"Search knowledge bases",someBasesFailed:"Some knowledge bases are temporarily unavailable. Other available content is shown.",noMatchingBases:"No matching knowledge bases",noManagePermission:"You do not have permission to manage this knowledge base",loadingMoreBases:"Loading more knowledge bases",deleteBaseTitle:"Delete knowledge base?",deleteBaseDescription:"This removes the AgentKit association for {{name}}. If Studio created it, the Provider resource is also deleted. This cannot be undone.",deleteDocumentTitle:"Delete knowledge item?",deleteDocumentDescription:"This removes {{name}} from the Provider knowledge base. This cannot be undone.",preview:{processingTitle:"Data is being processed",processingDetail:"A preview will be available after parsing. Reload later.",failedTitle:"Data parsing failed",failedDetail:"Check the source file or page URL and add it again, or reload the latest status.",noParsedTitle:"No parsed content is available yet",noParsedDetail:"Text, tables, or page images will appear after the knowledge base finishes parsing this file.",noMediaTitle:"No media preview is available yet",noMediaDetail:"The knowledge base has not returned an accessible media preview. Reload later.",noDataTitle:"No data is available to preview",noDataDetail:"The knowledge base has not returned parsed results. Reload later.",attachmentError:"The attachment cannot be previewed. Try again later.",imageAlt:"Knowledge data image",audioUnsupported:"This browser does not support audio previews.",videoUnsupported:"This browser does not support video previews.",namedPdf:"{{name}} PDF preview",pdf:"PDF preview",openPdf:"If it cannot be displayed, open the PDF in a new window",fileUnsupported:"This format cannot be previewed directly online. Parsed content is shown when available.",openOriginalFile:"Open original file",loading:"Loading data preview",openOriginalHint:"You can open the original page to view the source content.",chunk:"Chunk {{index}}",loadingMore:"Loading more",loadMore:"Load more"},errors:{fileTooLarge:"A file cannot exceed 200 MB",invalidImageType:"Select a PNG, JPG, or JPEG image",invalidDocumentType:"Select a PDF, PPTX, DOCX, XLSX, or TXT file",createBase:"Unable to create the knowledge base",updateBase:"Unable to update the knowledge base",metadataObject:"Metadata must be a JSON object",metadataFormat:"Invalid metadata format",noWebPreview:"The page has no Markdown content to preview",addWeb:"Unable to add the web page",previewWeb:"Unable to generate the web page preview",uploadFile:"Unable to upload the file",updateDocument:"Unable to update the knowledge item",loadPreview:"Unable to load the data preview",loadMoreBases:"Unable to load more knowledge bases",loadBases:"Unable to load knowledge bases",loadMoreData:"Unable to load more data",loadData:"Unable to load data",deleteBase:"Unable to delete the knowledge base",deleteDocument:"Unable to delete the knowledge item"}},Ize={title:"Feishu channel",refresh:"Refresh",loading:"Loading channel configuration…",unsupported:"This Runtime does not support channel management. Upgrade its MPA image.",unauthorized:"Channel management requires a Studio administrator and an authorized Runtime credential.",configurationError:"Channel management configuration is incomplete. Check the Runtime metadata and encryption key.",requestFailed:"Channel request failed. Check the Runtime connection and retry.",bound:"Bound: {{name}}",unbound:"No Feishu bot is bound.",guidance:"Private chats use separate conversations. In allowed groups, mention this bot to start a conversation.",keyRequired:"Configure a persistent CHANNEL_STATE_ENCRYPTION_KEY in the Runtime before binding.",gateway:"Message gateway",route:"Inbound route",delivery:"Reply delivery",configured:"Configured",missing:"Missing",delivery_not_observed:"Not observed",delivery_delivered:"Delivered",delivery_retrying:"Retrying",missingConfig:"Missing Runtime configuration: {{fields}}",bind:"Bind with QR code",newQr:"Generate a new QR code",unbind:"Unbind",confirmUnbind:"Disconnect this bot? It will stop receiving new messages.",qrAlt:"Bot authorization QR code",openQr:"Open authorization page",uncertain:"Registration was interrupted. Check the bot binding and Gateway before starting again.",bindingFailed:"Binding failed. Check Gateway configuration and retry.",chatId:"Allowed group ID",scope:"Group conversation scope",saveGroup:"Save group",noGroups:"No groups allowed yet. Private chats do not need this permission.",edit:"Edit",remove:"Remove",removeGroup:"Remove {{name}}",scope_group_sender:"Separate by sender",scope_group:"Shared by group",scope_group_topic_sender:"Separate by topic and sender",scope_group_topic:"Shared by topic",status_PENDING:"Waiting for scan",status_SCANNED:"Scanned; waiting for authorization",status_AUTHORIZED:"Authorized; preparing registration",status_REGISTERING:"Registering bot",status_BOUND:"Bot bound",status_FAILED:"Binding failed",status_EXPIRED:"QR code expired",workspaceTitle:"Message channels",workspaceDescription:"Connect messaging apps to this Agent and manage access.",provider_feishu:"Feishu",provider_wecom:"WeCom",provider_dingtalk:"DingTalk",comingSoon:"Not available yet",unavailableDescription:"Binding and message settings for {{name}} are not available yet.",runtimeRequired:"Deploy this Agent to a Runtime before configuring message channels.",bindingTitle:"Bot connection",connected:"Bound",notBound:"Not bound",gatewayDescription:"Gateway configuration for receiving channel messages.",routeDescription:"Routing configuration for delivering messages to this Agent.",deliveryDescription:"Observed reply delivery; configuration alone does not confirm delivery.",groupsTitle:"Group access",groupsDescription:"Allow specific groups and choose how conversations are shared.",providerBindingTitle:"Connect {{name}}",providerUnbound:"Connect a {{name}} bot to let users message this agent.",qrGuidance:"Authorize with {{name}}. The Runtime saves the bot credentials and configures the message gateway.",wecomGuidance:"Authorize with WeCom QR code, or enter a Bot ID and Secret to bind an existing bot.",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"Connect bot",wecomScan:"Bind with QR code",wecomAuthorizing:"Waiting for WeCom authorization…",cancelAuthorization:"Cancel authorization",wecomPopupBlocked:"Allow popups in your browser, then try authorizing again.",wecomAuthCancelled:"WeCom authorization was cancelled. You can scan again.",wecomAuthTimeout:"WeCom authorization timed out. Please scan again.",wecomInvalidResult:"Authorization did not return a Bot ID and Secret. Authorize again or enter them manually.",wecomAuthFailed:"WeCom authorization failed. Try again or enter credentials manually.",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"Upgrade this Runtime image to configure {{name}} manually. Quick setup is still available.",pairingTitle:"Message channel QR pairing",feishuPairingDescription:"If a bot is already connected, it will be replaced after successful Feishu authorization and binding. In the authorization flow, you can bind an existing bot or create a new one.",generatingQr:"Generating pairing QR code…",dingtalkGuidance:"Authorize with DingTalk QR code, or enter a Client ID and Client Secret to bind an existing bot.",wecomPairingDescription:"Pair again in the WeCom authorization window. The new bot replaces the current connection after binding succeeds. Cancelling authorization or a failed binding does not disconnect the existing bot.",configurationMethod:"Configuration method",quickSetup:"Quick setup",manualSetup:"Manual setup",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"Enter the credentials of an existing {{name}} bot to connect it to this agent.",manualReplacement:"Successful binding replaces the current bot. Cancelling or a failed binding does not disconnect the existing bot."},gdr=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:fze,agentSelector:Rze,agentWorkspace:gze,channels:Ize,cloudEnvironment:xze,common:hze,composer:_ze,default:{common:hze,agentKitPromo:fze,systemInfo:pze,agentWorkspace:gze,environmentCenter:mze,deploymentSelect:vze,deploymentError:yze,studioBuildProgress:bze,cloudEnvironment:xze,githubCicd:wze,feishuDeployment:Aze,deploymentResources:Sze,studioUpdate:Tze,projectPreview:Cze,workspace:kze,resourceCollection:Oze,skillSourcePicker:Eze,composer:_ze,agentSelector:Rze,myAgents:Dze,skillCenter:Lze,knowledge:Mze,channels:Ize},deploymentError:yze,deploymentResources:Sze,deploymentSelect:vze,environmentCenter:mze,feishuDeployment:Aze,githubCicd:wze,knowledge:Mze,myAgents:Dze,projectPreview:Cze,resourceCollection:Oze,skillCenter:Lze,skillSourcePicker:Eze,studioBuildProgress:bze,studioUpdate:Tze,systemInfo:pze,workspace:kze},Symbol.toStringTag,{value:"Module"})),Pze="User management",Nze="{{count}} members",Bze="User",$ze="Role",Fze="Account status",zze="Last sign-in",Uze="Actions",Vze="Change role",Gze="Close",Qze="Save role",Hze="Saving…",Wze="Cancel",Yze="Back",qze="User pool",jze="Volcengine Identity",Xze="Search name, email or user ID",Kze="Search",Zze="Filter by role",Jze="All roles",eUe="Refresh",tUe="Loading users…",rUe="Updated at {{time}}",nUe="{{name}} is now {{role}}",iUe="Retry",aUe="You",oUe="Initial super administrator",sUe="The initial super administrator cannot be demoted here",lUe="The new permissions apply when the user refreshes Studio",cUe="Role needs confirmation",uUe="No matching users",dUe="Try another search or role",hUe="Users appear here after signing in or joining this user pool",fUe="{{count}} users",pUe="Previous",gUe="Next",mUe="Not signed in yet",vUe="Not provided",yUe={super_admin:"Super administrator",admin:"Administrator",developer:"Developer",user:"User"},bUe={super_admin:"Manage all resources, users and role assignments",admin:"Manage Studio resources",developer:"Develop agents and manage your own resources",user:"Use agents and personal features"},xUe={EXTERNAL_PROVIDER:"Active",CONFIRMED:"Active",NORMAL:"Active",ENABLED:"Active",ACTIVE:"Active",UNCONFIRMED:"Unverified",DISABLED:"Disabled",FORBIDDEN:"Disabled",LOCKED:"Locked",SUSPENDED:"Suspended",FORCE_CHANGE_PASSWORD:"Password change required"},wUe={request_failed:"The request did not finish. Refresh the list to confirm its current state before retrying",invalid_response:"The user service returned an invalid response. Refresh and try again",identity_unavailable:"Identity is unavailable. Try again later or check service permissions",identity_resource_missing:"The user or user pool no longer exists. Refresh the list",super_administrator_required:"Only super administrators can manage users",sign_in_required:"Sign in and try again",user_not_in_pool:"Your account does not belong to this user pool",user_disabled:"Your account is disabled",protected_administrator:"The initial super administrator cannot be demoted",cannot_demote_self:"You cannot demote your own super administrator role",role_change_conflict:"The role has changed. Close this dialog and refresh the list before retrying",cross_origin_request:"Change roles from the current Studio page"},mdr=Object.freeze(Object.defineProperty({__proto__:null,actions:Uze,allRoles:Jze,back:Yze,cancel:Wze,changeRole:Vze,close:Gze,default:{title:Pze,memberCount:Nze,user:Bze,role:$ze,status:Fze,lastLogin:zze,actions:Uze,changeRole:Vze,close:Gze,save:Qze,saving:Hze,cancel:Wze,back:Yze,pool:qze,volcengineIdentity:jze,searchPlaceholder:Xze,search:Kze,filterRole:Zze,allRoles:Jze,refresh:eUe,loading:tUe,updatedAt:rUe,saved:nUe,retry:iUe,you:aUe,initialAdministrator:oUe,protectedExplanation:sUe,effectiveAfterRefresh:lUe,roleConflict:cUe,noUsers:uUe,tryAnotherSearch:dUe,poolEmpty:hUe,resultCount:fUe,previous:pUe,next:gUe,neverLoggedIn:mUe,unknown:vUe,roles:yUe,descriptions:bUe,states:xUe,errors:wUe},descriptions:bUe,effectiveAfterRefresh:lUe,errors:wUe,filterRole:Zze,initialAdministrator:oUe,lastLogin:zze,loading:tUe,memberCount:Nze,neverLoggedIn:mUe,next:gUe,noUsers:uUe,pool:qze,poolEmpty:hUe,previous:pUe,protectedExplanation:sUe,refresh:eUe,resultCount:fUe,retry:iUe,role:$ze,roleConflict:cUe,roles:yUe,save:Qze,saved:nUe,saving:Hze,search:Kze,searchPlaceholder:Xze,states:xUe,status:Fze,title:Pze,tryAnotherSearch:dUe,unknown:vUe,updatedAt:rUe,user:Bze,volcengineIdentity:jze,you:aUe},Symbol.toStringTag,{value:"Module"})),AUe="Website integration",SUe="Embed an AgentKit Runtime on your website as a floating chat window",TUe="Back to automations",CUe="Add website",kUe="Loading Runtime",OUe="Select Runtime",EUe="Website domain",_Ue="For example, xxxx.com or localhost:5173",RUe="Generating",DUe="Generate token",LUe="Added websites",MUe="{{count}} website",IUe="{{count}} websites",PUe="Loading website integrations",NUe="No website integrations yet",BUe="Select a Runtime and enter a website domain to generate a token",$Ue="Embed instructions",FUe="Place this code before the closing body tag on your website",zUe="Copied",UUe="Copy code",VUe="Embed code will appear here after you add a website.",GUe="Delete the website integration for {{domain}}?",QUe={load:"Failed to load website integrations",create:"Failed to create website integration",delete:"Failed to delete website integration",noConversationalAgent:"No conversational Agent was found in this Runtime"},HUe={requestFailed:"Request failed ({{status}})",greeting:"Hello. How can I help?",sessionFailed:"Could not start a chat session",unauthorized:"This website is not authorized to start a chat",conversationFailed:"The chat request failed. Try again shortly.",open:"Open Agent chat",close:"Close Agent chat",panelLabel:"Agent chat panel",assistant:"Agent assistant",online:"Online"},vdr=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:CUe,addedWebsites:LUe,backToAutomations:TUe,confirmDelete:GUe,copied:zUe,copyCode:UUe,default:{title:AUe,description:SUe,backToAutomations:TUe,addWebsite:CUe,loadingRuntime:kUe,selectRuntime:OUe,websiteDomain:EUe,domainPlaceholder:_Ue,generating:RUe,generateToken:DUe,addedWebsites:LUe,websiteCount_one:MUe,websiteCount_other:IUe,loadingIntegrations:PUe,delete:"Delete",emptyTitle:NUe,emptyDescription:BUe,embedMethod:$Ue,embedInstructions:FUe,copied:zUe,copyCode:UUe,embedHint:VUe,confirmDelete:GUe,errors:QUe,widget:HUe},description:SUe,domainPlaceholder:_Ue,embedHint:VUe,embedInstructions:FUe,embedMethod:$Ue,emptyDescription:BUe,emptyTitle:NUe,errors:QUe,generateToken:DUe,generating:RUe,loadingIntegrations:PUe,loadingRuntime:kUe,selectRuntime:OUe,title:AUe,websiteCount_one:MUe,websiteCount_other:IUe,websiteDomain:EUe,widget:HUe},Symbol.toStringTag,{value:"Module"})),WUe={types:{all:"All types",document:"Documents",image:"Images",video:"Videos"},previewArtifact:"Preview {{name}}",moreActions:"More actions for {{name}}",actionMenu:"Actions for {{name}}",download:"Download",downloading:"Downloading",edit:"Edit details",delete:"Delete artifact",previewFailed:"Could not preview “{{name}}”: {{message}}",downloadStarted:"Download started for {{name}}",downloadFailed:"Could not download “{{name}}”: {{message}}",updated:"Updated {{name}}",deleted:"Deleted {{name}}",deleteFailed:"Could not delete “{{name}}”: {{message}}",typeFilter:"Artifact type",searchAria:"Search artifacts",searchPlaceholder:"Search artifacts or sessions",retry:"Retry",close:"Close",listAria:"Artifact list",loadFailed:"Could not load artifacts",loadDetailFallback:"Check the storage configuration and try again.",reload:"Reload",noMatch:"No matching artifacts",noArtifacts:"You do not have any artifacts yet",searchHint:"Try another search or artifact type",emptyHint:"Artifacts created in chats will appear here automatically",columns:{name:"Name",source:"Source",updatedAt:"Modified",actions:"Actions"},loadingMore:"Loading more artifacts",unknownTime:"Unknown time",preview:{close:"Close preview",meta:"{{type}} / Version {{version}}",loading:"Loading preview",alt:"Preview of {{name}}",loadFailed:"The preview could not be loaded. Try again later or download the file.",unsupported:"This format cannot be previewed online. Download the file to view it.",sourceAria:"Artifact source",agent:"Agent",session:"Session",tool:"Generated by",createdAt:"Created",fileSize:"File size",tags:"Tags",viewSession:"View session"},deleteDialog:{title:"Delete artifact?",description:"“{{name}}” will be permanently removed from the artifact library. The chat history will not be affected.",deleting:"Deleting",confirm:"Delete",close:"Close delete confirmation"},api:{withStatus:"{{message}} ({{status}})",listFailed:"Could not load the artifact library",syncFailed:"Could not sync chat artifacts",updateFailed:"Could not update the artifact",deleteFailed:"Could not delete the artifact",downloadFailed:"Could not download the artifact"}},YUe={unknownSource:"Unknown source",unknownCreator:"Unknown creator"},qUe={nameRequired:"Enter an artifact name",tooManyTags:"You can add up to {{max}} tags",tagTooLong:"Each tag can contain up to {{max}} characters",title:"Edit artifact details",subtitle:"The content file will not be modified",close:"Close edit dialog",name:"Name",description:"Description",descriptionPlaceholder:"Add its purpose, version, or usage notes",tags:"Tags",tagsPlaceholder:"Separate tags with commas, up to {{max}}",cancel:"Cancel",saving:"Saving",save:"Save"},jUe={change:{added:"Added",modified:"Modified",deleted:"Deleted"},noChanges:"There are no source changes between these versions",chooseFile:"Select a file on the left to view its code",compareTitle:"Compare versions",workspaceTitle:"Source workspace",projectFallback:"Agent project",switchTheme:"Switch source theme",switchThemeTitle:"Switch to {{theme}} theme",themes:{dark:"dark",light:"light"},closeWorkspace:"Close source workspace",close:"Close",changedFiles:"Changed files",projectFiles:"Project files",changes:"Changes",files:"Files",openFiles:"Open files",noFileSelected:"No file selected",comparisonDirection:"Comparison direction",before:"Before optimization",after:"After optimization",loadingEditor:"Loading editor…",changedFileCount_one:"{{count}} file changed",changedFileCount_other:"{{count}} files changed",fileCount_one:"{{count}} file",fileCount_other:"{{count}} files",lineCount_one:"{{count}} line · UTF-8",lineCount_other:"{{count}} lines · UTF-8",viewSource:"View source",viewSourceAria:"View and edit project source"},XUe={nav:"Search",selectAgent:"Select an Agent",checkingCapabilities:"Checking Agent capabilities",notMounted:"This Agent does not have {{label}} mounted",sources:{session:"Sessions",web:"Web",knowledge:"Knowledge base",memory:"Long-term memory"},webDescription:"Search with the web_search tool",backendLocal:"Local",failed:"Search failed: {{message}}",placeholder:{selectAgent:"Select an Agent first",web:"Search the web",knowledge:"Search {{name}}",knowledgeFallback:"this Agent's knowledge base",memory:"Search {{name}}",memoryFallback:"this user's long-term memory",session:"Search this Agent's sessions"},sourceTypeAria:"Search source: {{label}}",notSelected:"Not selected",sourceType:"Search source",selectSource:"Select a search source",noAgentHint:"Select an Agent to search its sessions, the web, and mounted data sources.",loadingCapabilities:"Loading this Agent's search capabilities…",sourceUnavailable:"This Agent does not have this data source mounted",instructions:{web:"Enter keywords and press Enter or select the button to search with web_search.",knowledge:"Enter a question to search this Agent's knowledge base.",memory:"Enter a clue to search long-term memories saved across this user's sessions.",session:"Enter keywords and press Enter or select the button to search this Agent's sessions."},noResults:"No results found for “{{query}}”.",knowledgeFragment:"Knowledge excerpt {{index}}",memoryFragment:"Memory excerpt {{index}}"},KUe={title:"Developer Resources",sections:{documentation:{title:"Related links",description:"Open development documentation and common AgentKit destinations"},bestPractices:{title:"Best practices",description:"Learn from practical development, debugging, and deployment guidance"},showcases:{title:"Showcases",description:"Explore applications built with AgentKit"}},links:{veadkDocs:"VeADK documentation",cliDocs:"AgentKit CLI documentation",platformDocs:"AgentKit platform documentation",console:"AgentKit console"},articles:{veadkDevelopment:{title:"Develop and deploy an Agent with VeADK",description:"Build an Agent with VeADK and deploy it to AgentKit Runtime."},cliDevelopment:{title:"Develop and deploy an Agent with AgentKit CLI",description:"Create a project, debug an Agent, and deploy it with AgentKit CLI."},coverAlt:"Cover image for {{title}}"},showcases:{researchAssistant:{title:"Multi-agent research assistant",description:"Specialized Agents work together to research, analyze, and summarize findings."},multimodalAnalysis:{title:"Multimodal content analysis",description:"Understand images, documents, and video in a single session."},customerService:{title:"Customer service workspace",description:"Combine knowledge retrieval and tool calls to handle complex support requests."},webSearch:{title:"Web search Agent",description:"Search current web content and organize it into traceable answers."},a2uiApp:{title:"A2UI interactive app",description:"Let an Agent generate interactive interfaces as it works through a task."},previewAlt:"Interface preview for {{title}}"}},ZUe={title:"Library",untitledSession:"Untitled session",categoryAria:"Library categories",regionAria:"Region",tabs:{skills:"Skills",knowledge:"Knowledge",artifacts:"Artifacts"}},JUe={title:"Manage Agents",subtitle:"Agents in AgentKit Runtime that you can manage",mainAgentOnly:"Only the main Agent is shown (control-plane information).",deleteConfirm:'Delete Agent "{{name}}"? Its Runtime will be permanently deleted.',regionFilterTitle:"Filter by region",regionFilterAria:"Region filter",regionAria:"Region",refresh:"Refresh",loading:"Loading…",empty:"You have not deployed any Agents.",connected:"Connected",connect:"Connect to this Agent",deleteRuntime:"Delete this Runtime",loadingDetail:"Loading details…",agentStructure:"Agent structure",secretHidden:"Sensitive value is never shown. Copy it with an authorized request.",revealSecret:"Sensitive value for {{key}}",copySecret:"Copy the value of {{key}}",copy:"Copy",copied:"Copied",copyFailed:"Copy failed",notConfigured:"Not configured",fields:{model:"Model",description:"Description",status:"Status details",project:"Project",version:"Version",resources:"Resources",memory:"Memory",tool:"Tool",knowledge:"Knowledge",mcpToolset:"MCP Toolset",updatedAt:"Updated"},resource:{memory:"Memory {{value}} MB",instances:"Instances {{min}}-{{max}}",concurrency:"Concurrency {{value}}"},environmentVariables:"Environment variables",unnamed:"(Unnamed)"},eVe={mainAgent:"Main Agent",subAgent:"Sub-agent {{index}}",itemCount_one:"{{count}} item",itemCount_other:"{{count}} items",info:"Agent information",infoAndTopology:"Agent information and settings",loadingInfo:"Loading Agent information…",unnamedAgent:"Unnamed Agent",agentsMd:"AGENTS.md",tools:"Tools",toolList:"Tool list",studioTool:"Studio Tool",removeTool:"Remove tool {{name}}",remove:"Remove",notConfigured:"Not configured",addStudioTool:"Add Studio tools",addStudioToolHere:"Add Studio tools to this chat",skills:"Skills",skillList:"Skill list",addSkill:"Add Skill Space skills",addSkillHere:"Add Skill Space skills to this Session",skillMountNextTurn:"Mounted versions are frozen when the next Turn starts.",previewUnsupported:"Preview is not supported",sessionEnvironment:"Session environment",environment:"Environment",agentCanvas:"Agent canvas",topology:"Structure",nodeKinds:{agent:"Agent",sandbox:"Sandbox","worker-session":"Worker Session","skill-space":"Skill Space",skill:"Skill","studio-tool":"Studio Tool",mcp:"MCP",environment:"Environment",knowledge:"Knowledge","sub-agent":"Sub-agent"},nodeStatuses:{configured:"Configured",mounted:"Mounted",running:"Running",paused:"Paused"},viewCanvasFullscreen:"View Agent canvas in full screen",viewFullscreen:"View full screen",executionCanvas:"Agent execution canvas",fullscreenExecutionCanvas:"Full-screen Agent execution canvas",closeFullscreenCanvas:"Close full-screen canvas",close:"Close",capabilitiesSubtitle:"Capabilities and collaboration topology",closeInfo:"Close Agent information",infoUnavailable:"Agent information is temporarily unavailable.",refresh:"Refresh information",loadingSkills:"Loading bound skills…",sessionSkills:"Temporary session skills",noBoundSpace:"This agent has no bound Skill Space.",noBoundSkills:"The bound Skill Space has no skills.",loadFailed:"Could not load this information. Refresh to retry.",accessDenied:"You do not have permission to read this information.",documentUnsupported:"Upgrade the Runtime image to enable Studio to read AGENTS.md.",skillsUnsupported:"This Runtime does not provide Skill Space bindings.",skillsDegraded:"Skill information is incomplete. Refresh to retry.",documentEditHint:"Edit the latest version. Saving publishes a new version to this Skill Space and can affect other agents using it. Running sessions may need a cache refresh or a new session. Keep the frontmatter name unchanged.",documentLoading:"Loading SKILL.md…",documentWritable:"Editable",documentReadOnly:"Read only — this space or your permissions do not allow editing",documentLoadFailed:"Could not load SKILL.md. Refresh to retry.",documentSaveFailed:"Save was not confirmed. Your edits are preserved. Reopen to check the current version before retrying.",documentConflict:"A newer version exists. Copy your edits, then reopen the editor to avoid overwriting it.",discardDocument:"Discard unsaved changes?",keepEditing:"Keep editing",discardChanges:"Discard changes",saveDocument:"Save new version"},tVe={mountFailed:"Could not mount the environment",closeDialog:"Close environment dialog",addTitle:"Add environments",description:"Choose the Sandbox environments this Agent can use in the current session",closeAdd:"Close Add environments",searchAria:"Search environments",searchPlaceholder:"Search environment names or capabilities",availableAria:"Available environments and workspaces",loading:"Loading available environments…",noMatch:"No matching environments or workspaces",workspaces:"Workspaces",reuseAll:"Use every available environment in this workspace",availableEnvironmentCount_one:"{{count}} available environment",availableEnvironmentCount_other:"{{count}} available environments",selectWorkspace:"Select workspace {{name}}",environments:"Environments",includedByWorkspaces:"Included by workspace {{names}}",nameSeparator:", ",selectEnvironment:"Select environment {{name}}",selectedWorkspaceCount_one:"{{count}} workspace selected",selectedWorkspaceCount_other:"{{count}} workspaces selected",coveredEnvironmentCount_one:"{{count}} environment covered",coveredEnvironmentCount_other:"{{count}} environments covered",selectionSummary:"{{workspaces}}, {{environments}}",cancel:"Cancel",mounting:"Mounting…",confirm:"Add selected",mountedAria:"Mounted environments",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",removeWorkspace:"Remove workspace {{name}}",remove:"Remove",removeEnvironment:"Remove environment {{name}}",add:"Add environments",addMore:"Add more environments",addForSession:"Add environments to this session",loadingAvailable:"Loading available environments…",empty:"No AIO Sandbox environments are available."},rVe={loading:{searching:"Looking for an existing environment",creating:"Initializing environment",connecting:"Connecting to the environment"},initializationFailed:"AgentKit CLI environment initialization failed. Current status: {{status}}.",sessionExpired:"The AgentKit CLI session does not exist or has expired. Try again.",initializationTimeout:"AgentKit CLI environment initialization timed out. Try again later.",nonPersistent:"Non-persistent environment",recyclingHoursMinutes:"Environment reclaimed in {{hours}} hr {{minutes}} min",recyclingMinutes:"Environment reclaimed in {{minutes}} min",connectionError:`Could not connect to the Studio service because the server did not respond. +{{value}}`,original:"Original error: {{message}}",details:"Details"},lze={ariaLabel:"Skill file tree",viewSource:"View source",viewPreview:"View preview",download:"Download",binaryFile:"Binary file",bytes:"{{value}} bytes",binaryDescription:"The current API returns file metadata only. Download the original file separately.",metadata:"Skill metadata",noFiles:"No files"},cze={close:"Close",name:"Name",region:"Region",optionalDescription:"Description (optional)",cancel:"Cancel",create:"Create",creating:"Creating…",save:"Save",saving:"Saving…",upload:"Upload",uploading:"Uploading…",createSpaceTitle:"New Skill Space",editSpaceTitle:"Edit Skill Space",uploadTitle:"Upload to {{name}}",createSpaceFailed:"Failed to create the Skill Space",updateSpaceFailed:"Failed to update the Skill Space",archiveValidationFailed:"Skill ZIP validation failed",uploadFailed:"Failed to upload the Skill",dropzone:"Drop a Skill ZIP here",chooseLocalFile:"or click to choose a local file",archiveHelp:"The ZIP root must contain SKILL.md, or a single wrapping directory. Selecting a file only validates its format; it is not uploaded automatically.",validating:"Checking file format…",validationPassed:"Format check passed: {{name}}, {{count}} file(s)"},uze={styles:{concise:"Concise and practical",strict:"Rigorous and robust",tutorial:"Tutorial-friendly",automation:"Automation-first",custom:"Custom",customFallback:"Custom style"},stages:{preparing:"Preparing Dev Sandbox",ready:"Skill generated and format validation passed",failed:"Generation failed",cancelled:"Stopped",validating:"Validating Skill format",packaging:"Organizing files",generating:"Generating Skill",repairingAgain:"Repairing again",autoRepairing:"Auto-repairing ({{attempt}}/{{max}})"},validation:{fallback:"Skill format validation failed",repairInstruction:"Fix only the Skill format errors listed below. Do not change the original purpose or scope.",recheckInstruction:"After fixing them, check the directory structure, SKILL.md frontmatter, and all text files again.",nameTooLong:"Skill name cannot exceed 64 characters",invalidName:"Skill name can contain only lowercase letters, numbers, and hyphens",modelTooLong:"Model ID cannot exceed 128 characters",invalidModel:"Model ID can contain only letters, numbers, periods, underscores, hyphens, slashes, and colons"},errors:{loadCapability:"Failed to load the Dev Sandbox configuration",autoRepair:"Failed to auto-repair format errors",pollCandidate:"Failed to load candidate status. Retrying.",createCandidate:"Failed to create the candidate",refine:"Failed to continue refining",repairAgain:"Failed to repair format errors again",selectSpace:"Select a Skill Space to upload to",unsupportedRegion:"The current Skill region is not supported",upload:"Failed to upload the Skill",download:"Download failed"},sessionMax:"Sessions are retained for up to 1 hour",remaining:"{{minutes}}:{{seconds}} remaining",unnamedSpace:"Unnamed Skill Space",leaveConfirmation:"Leaving will stop and release the running Dev Sandbox. Leave anyway?",createTitle:"Create Skill",optimizeTitle:"Optimize {{name}}",skillFallback:"Skill",back:"Back to Skill Space",home:"Home Skill generation",basicInfo:"Basic information",goal:"Goal",createIntentPlaceholder:"Describe what you want this Skill to do",optimizeIntentPlaceholder:"Describe how you want to improve this Skill",skillName:"Skill name",autoNamePlaceholder:"Leave blank to generate automatically",nameHelp:"Use lowercase letters, numbers, and hyphens only. Leave blank to generate automatically.",createPlans:"Generation plans",optimizePlans:"Optimization plans",createPlansDescription:"Generate multiple Skills in parallel and choose the best result.",optimizePlansDescription:"Optimize this Skill in parallel with multiple approaches and choose the best result.",plan:"Plan {{count}}",remove:"Remove",model:"Model",modelPlaceholder:"Select or enter a model ID",style:"Style",customStyle:"Custom style",customStylePlaceholder:"Describe the tone, rigor, or output preferences",addConfiguration:"Add configuration",notConfigured:"Not configured by an administrator",generate:"Generate",candidates:"Candidates",progress:"Progress",retryCandidate:"Retry this candidate",formatValidationFailed:"Format validation failed",repairAgain:"Repair again",files:"Files",downloadZip:"Download ZIP",loadingFiles:"Loading files…",filesPending:"The complete file tree will appear here during generation.",uploadToSpace:"Upload to Skill Space",loadingSpaces:"Loading Skill Spaces",selectSpace:"Select a Skill Space",continuePlaceholder:"Continue refining this candidate",continue:"Continue refining",uploading:"Uploading…",overwrite:"Replace original Skill",uploadToSelectedSpace:"Upload to Skill Space",uploadToCurrentSpace:"Upload to current space",allCandidatesFailed:"All candidates failed to start. Retry each candidate separately."},dze={invalidFormat:"{{label}} has an invalid format.",recoveryStatus:"Skill recovery status",errorResponse:"error response",errorDetails:"error details",missingContentType:"Content-Type missing",gatewayError:"{{fallback}} (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",nonJson:"{{fallback}}: the server returned a non-JSON response (HTTP {{status}}, Content-Type: {{contentType}}). Check the proxy or gateway configuration.",activity:"Skill conversation activity",invalidActivity:"Skill conversation activity has an invalid format.",invalidToolActivity:"Skill tool activity has an invalid format.",invalidTextActivity:"Skill text activity has an invalid format.",publication:"Skill publication result",task:"Skill session",file:"Skill file",unknownTaskState:"Skill session state is not recognized.",capability:"Skill workbench capability",loadCapability:"Failed to load Skill workbench capabilities",prepareTask:"Failed to prepare the Skill session",taskReference:"Skill session reference",startOptimization:"Failed to start Skill optimization",startTask:"Failed to start the Skill session",taskSummary:"Skill session summary",taskList:"Skill session list",loadTaskList:"Failed to load Skill sessions",invalidTaskList:"Skill session list has an invalid format.",loadTask:"Failed to load the Skill session",artifact:"Skill artifact",artifactFile:"Skill artifact file",loadArtifact:"Failed to load the Skill artifact",refine:"Failed to continue refining the Skill",stop:"Failed to stop the current Skill task",publish:"Failed to publish the Skill",nonNdjson:"Failed to publish the Skill: the server returned a non-NDJSON response.",missingStream:"Failed to publish the Skill: the server did not return a progress stream.",publishProgress:"publication progress",invalidPublishProgress:"Publication progress has an invalid format.",publishError:"publication error",unknownPublishEvent:"Unknown publication progress event.",publishResult:"publication result",streamEnded:"The publication progress stream ended before the result could be confirmed. Refresh Skill Center to check the status.",deleteTask:"Failed to delete the Skill session",download:"Failed to download the Skill"},pdr=Object.freeze(Object.defineProperty({__proto__:null,api:dze,configSelect:aze,conversation:oze,default:{configSelect:aze,conversation:oze,errorDetails:sze,fileTree:lze,management:cze,generation:uze,api:dze},errorDetails:sze,fileTree:lze,generation:uze,management:cze},Symbol.toStringTag,{value:"Module"})),hze={back:"Back",reload:"Reload",notConfigured:"Not configured",name:"Name",description:"Description",delete:"Delete",save:"Save",saving:"Saving",add:"Add",manage:"Manage",environment:"Environment",noDescription:"No description",refresh:"Refresh",close:"Close",retry:"Retry",loading:"Loading…",previousPage:"Previous page",nextPage:"Next page",edit:"Edit",all:"All",search:"Search",cancel:"Cancel",view:"View",viewDetails:"View details",deleting:"Deleting…",create:"Create",creating:"Creating",adding:"Adding",generating:"Generating",uploading:"Uploading",preview:"Preview",loadFailed:"Failed to load",select:"Select",collapse:"Collapse",expand:"Expand",none:"None"},fze={ariaLabel:"AgentKit shortcuts",closeAriaLabel:"Close the AgentKit welcome card",title:"Welcome to AgentKit",description:"Build and host enterprise Agents quickly with AgentKit",docsAriaLabel:"Open AgentKit documentation in a new window",docs:"Documentation",consoleAriaLabel:"Open the AgentKit console in a new window",console:"Console"},pze={checkUpdates:"Check for updates",checkingVersions:"Checking versions…",versionCheckError:"Unable to check sandbox versions. Check credentials, region and API permissions, then retry.",sandboxUpdateError:"Sandbox update failed. Refresh its status before retrying.",modelEnvRepairUnavailable:"Cannot repair model configuration. Check CODEX_API_KEY and CODEX_BASE_URL.",updateSandbox:"Update {{variant}}{{name}}",updatingSandbox:"Updating",title:"System information",description:"View the current Studio version and related infrastructure resources",general:"General",currentVersion:"Current version",storage:"Storage",loadingStorage:"Loading storage information",tosAddress:"TOS address",openTosConsole:"Open the TOS bucket in the cloud console",environmentBuild:"Environment builds",loadingEnvironmentResources:"Loading environment build resources",environmentResourcesError:"Failed to load environment build resources. Check the cloud credentials and try again.",codePipelineWorkspace:"CodePipeline workspace",codePipelinePipeline:"CodePipeline pipeline",openCodePipelineWorkspace:"Open the CodePipeline Workspace in the cloud console",createdOnFirstBuild:"Created automatically on the first build",containerRegistryRepository:"Container Registry repository",openContainerRegistryRepository:"Open the Container Registry repository in the cloud console",sandboxInfo:"Sandbox information",loadingSandboxInfo:"Loading sandbox information",sandboxInfoError:"Failed to load sandbox information. Try again.",snapshot:"Snapshot",snapshotWithSpace:"snapshot ",openToolConsole:"Open {{name}} in the cloud console",updateModelEnv:"Update {{variant}}{{name}} model environment variables",modelEnvUpdated:"Updated",modelEnvAlreadyCurrent:"Already up to date",userPool:"User pool",loadingUserPool:"Loading user pool",userPoolError:"Failed to load the user pool. Try again.",modelEnvUpdateError:"Failed to update model environment variables. Try again.",openUserPoolConsole:"Open user pool {{name}} in the cloud console",unnamedUserPool:"Unnamed user pool",id:"ID",domain:"Domain",region:"Region",noLocalUserPool:"No user pool is configured in local mode",noUserPool:"No user pool is configured for this Studio"},gze={workspace:"Agent workspace",library:"Agent library",evaluation:"Evaluation",agentList:"Agent list",agentDetails:"Agent details",newAgent:"New Agent",loading:"Loading…",loadingCloudAgents:"Loading cloud Agents…",noAgentSelected:"Select an Agent",local:"Local",remote:"Cloud",localAgent:"Local Agent",remoteAgent:"Cloud Agent",agentCount:"{{count}} Agents",agentCountLabel:"Agent count",details:"Details",chat:"Chat",update:"Update",backToAgentList:"Back to Agent list",loadingAgent:"Loading Agent",loadingAgentDescription:"Loading Agent configuration and Runtime information.",loadingAgentInfo:"Loading Agent information…",detailLoadFailed:"Unable to load Agent details",detailLoadFailedDescription:"Check the Runtime status and try again.",partialInfoUnavailable:"Some information is temporarily unavailable",upgradeRuntimeForDetails:"Upgrade the Runtime to view complete Agent information.",basicInfo:"Basic information",usageOverview:"Usage overview",sections:{basic:"Basic information",profileConfig:"Profile configuration",sessionConfig:"Session configuration",usage:"Usage overview",diagnostics:"Diagnostics",evaluations:"Evaluations",optimizations:"Optimizations",integrations:"Integrations",versions:"Versions",channels:"Message channels"},evaluationGroup:"Evaluation group",optimizations:"Optimization suggestions",optimizationsDescription:"Review actionable suggestions based on evaluation results.",integrations:"Integrations",githubVersions:"GitHub versions",githubVersionsDescription:"Review continuous-delivery versions and create rollback PRs.",currentVersionOnly:"GitHub continuous delivery is not enabled. Only the current production version is shown.",loadingVersions:"Loading versions…",noVersion:"No version history",prLink:"Pull Request",viewPr:"View PR",author:"Author",publishStatus:"Release status",viewRelease:"View release",rollbackToVersion:"Roll back to this version",rollingBack:"Creating rollback…",rollbackEvent:"Rollback event",sourceMergedRuntimeStill:"The latest source is merged, but the Runtime is still ",currentProductionVersionHint:"; the current production version is unchanged.",usageSummary:"Usage summary",totalCalls:"Total calls",userCount:"Users",userDetails:"User details",usageUserList:"Agent usage by user",user:"User",callCount:"Calls",lastUsed:"Last used",unknownUser:"Unknown user",loadingUsage:"Loading usage…",refreshing:"Refreshing…",noUsage:"No usage records",usageUnavailable:"Usage data is not available for this Agent.",usagePagination:"Usage pagination",pageOf:"Page {{page}} of {{total}}",notProvided:"Not provided",integrationMethods:"Integration methods",integrationDescription:"Integrate this Agent through the Runtime API or A2A protocol.",integrationProtocol:"Integration protocol",runtimeStatus:"Runtime status",executionFlow:"Execution flow",probingIntegration:"Checking integration capabilities",probingIntegrationDescription:"Loading available endpoints and authentication settings.",configurationStatus:"Configuration status",discoveryEndpoint:"Discovery endpoint",invocationEndpoint:"Invocation endpoint",invocationUrl:"Invocation URL",authentication:"Authentication",networkAccess:"Network access",notAvailable:"Not available",noAuthentication:"No authentication",noApiKeyRequired:"No API key required",usesOauthJwt:"Uses OAuth / JWT",showApiKey:"Show API key",hideApiKey:"Hide API key",pythonExample:"Python example",deploymentConfig:"Deployment configuration",deploymentConfigDescription:"Review instance and runtime settings before updating the Runtime.",deploymentRegion:"Deployment region",mpaControlPlane:"MPA control plane",loadingMpaAgentView:"Loading MPA Runtime binding…",mpaRuntimeBound:"This MPA Agent is bound to one Runtime and ready for management.",mpaRuntimeMissing:"No visible MPA Runtime is bound to this Agent.",mpaRuntimeBindingAmbiguous:"Multiple MPA Runtimes match this Agent. Resolve the binding before making changes.",mpaRuntimeOrphan:"The Runtime exists, but it does not contain this MPA Profile.",mpaRuntimeLegacyAuthUnsupported:"This Runtime uses an older MPA image that still requires X-Jwt-Token. Update it to the current AgentKit-compatible image before managing Profile or Session settings.",profileConfig:"Profile configuration",profileConfigTitle:"Profile configuration",profileConfigDescription:"Review and apply the Agent-level MPA Profile. The Profile is the Runtime default configuration inherited by new Sessions.",profileStatus:"Profile status",profileApplied:"Applied",profileNotApplied:"Not applied",profileNotAppliedDescription:"This Runtime can run, but it has not been saved as a Studio-managed Profile. Applying it creates a Profile revision.",applyProfile:"Apply Profile",reapplyProfile:"Reapply Profile",editProfile:"Edit Profile",profileApplying:"Applying…",profileAppliedNotice:"Profile applied. Current revision is {{revision}}.",profileApplyIncomplete:"Profile apply did not finish. Check the current operation state and retry.",profileApplyFailed:"Failed to apply Profile.",profilePrompt:"System prompt",profileResources:"Resource configuration",profileResourceSummary:"{{tools}} tools · {{skills}} Skills · {{mcp}} MCP servers",sessionConfigTitle:"Session configuration",sessionConfigDescription:"Review and change execution choices for the current MPA Session. Changes apply to the next turn.",loadingSessionConfig:"Loading Session configuration…",sessionConfigNoAgent:"Select an MPA Agent to manage its Session configuration.",sessionConfigNonMpa:"Session configuration is only available for MPA Agents.",sessionConfigNoSession:"Open a chat with this MPA Agent before changing Session configuration.",sessionConfigDifferentRuntime:"Open the current chat for this MPA Agent before changing Session configuration.",sessionConfigSaved:"Session configuration updated. The next turn will use the new revision.",sessionConfigStale:"This Session was changed elsewhere. The latest configuration is shown; review it before saving again.",sessionConfigRevision:"Config revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"Latest Profile revision",sessionProfileUpgradeAvailable:"A newer Profile revision is available: v{{current}} → v{{target}}.",upgradeSessionProfile:"Upgrade Session Profile",sessionProfileUpgrading:"Upgrading…",sessionProfileUpgraded:"Session Profile upgraded. The next turn will use the new revision.",sessionProfileUpgradeFailed:"Unable to upgrade the Session Profile.",sessionModelOverride:"Model override",modelId:"Model ID",inheritProfileDefault:"Inherit Profile default",sessionMcpServers:"MCP servers",mcpServerCount:"{{count}} selected",clearSessionMcp:"Clear MCP servers",mpaDiagnosticsTitle:"Runtime diagnostics",mpaDiagnosticsDescription:"Review recent Runtime Console runs and their Agent, Profile, Turn, task, and worker correlation.",loadingMpaDiagnostics:"Loading Runtime diagnostics…",noMpaDiagnostics:"No Runtime diagnostic runs for this Session.",latestRun:"Latest run",traceCorrelation:"Trace correlation",traceCorrelationDescription:"Stable identifiers returned by Runtime Console for this invocation.",traceSteps:"Trace steps",traceStepsDescription:"Recent bounded Runtime Console steps for the selected invocation.",mpaInstanceId:"MPA instance",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker kind",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile version",step:"Step",stepCount:"Steps",duration:"Duration",noTraceSteps:"No trace steps recorded for this invocation.",executionConfigMode:{replace:"Session override",clear:"Cleared for this Session",inherit:"Using Profile default"},concurrency:"Concurrency",selectedOptimizations:"Selected optimizations",selectedOptimizationsDescription:"These optimizations will be applied to this update.",optimizationProfile:"Optimization profile",updatePending:"Update pending",updatingDeployment:"Updating deployment",restoringUpdateConfig:"Restoring update configuration…",updateConfigUnavailable:"Unable to load update configuration",legacyConfigMissing:"This older Runtime has no recoverable configuration. Create it again.",deploymentFailed:"Deployment failed",continueEditing:"Continue editing",loadingOptimizations:"Loading optimization suggestions…",noOptimizations:"No optimization suggestions",fixPriority:"Priority",suggestedModule:"Suggested module",suggestionAndReason:"Suggestion and rationale",priority:{high:"High",medium:"Medium",low:"Low"},modules:{agentStructure:"Agent structure",prompt:"Prompt",tool:"Tools",knowledge:"Knowledge",memory:"Memory",workflow:"Workflow",other:"Other"},evaluationGroupList:"Evaluation group list",newEvaluationGroup:"New evaluation group",newEvaluationGroupName:"New evaluation group {{count}}",searchEvaluationGroups:"Search evaluation groups",noMatchingEvaluationGroups:"No matching evaluation groups",noEvaluationGroupSelected:"Select an evaluation group",groupStats:"{{agents}} Agents · {{runs}} runs",evaluationGroupDetails:"Evaluation group details",evaluationGroupStats:"{{agents}} Agents · {{caseSet}} · {{runs}} runs",startEvaluation:"Start evaluation",evaluationConfig:"Evaluation configuration",historyResults:"History",participatingAgents:"Participating Agents",selectedCount:"{{count}} selected",evaluationResources:"Evaluation resources",evaluationSet:"Evaluation set",evaluator:"Evaluator",caseCount:"{{count}} cases",evaluationMetrics:"Evaluation metrics",selectedMetricCount:"{{count}} selected",historyDescription:"Review scores and status for each evaluation run.",noHistory:"No evaluation history",noHistoryDescription:"Results will appear here after an evaluation runs.",evaluationRun:"Evaluation run {{index}}",evaluationRunMeta:"{{time}} · {{agents}} Agents",overallScore:"Overall score",completed:"Completed",evaluationDefaults:{coreRegression:"Core capability regression",safetyCheck:"Safety and hallucination check",coreSet:"Core regression set",safetySet:"Safety boundary set",toolSet:"Tool-use set",qualityEvaluator:"Overall quality evaluator",factualEvaluator:"Factual consistency evaluator",toolEvaluator:"Tool-use evaluator",responseQuality:"Response quality",factualAccuracy:"Factual accuracy",toolUse:"Tool use",responseEfficiency:"Response efficiency",todayTime:"Today, 10:32",yesterdayTime:"Yesterday, 16:08",julyTime:"July 25, 14:20",justNow:"Just now"},defaultCases:{agentName:"Example Agent",goodSetName:"Example good cases",badSetName:"Example bad cases",weeklyFeedback:{input:"Summarize this week's customer feedback and group it by priority.",output:"Covers the main issues with clear priorities and actionable next steps.",tag:"Summary",reason:"The response fully addresses the user's goal, uses a clear structure, and provides actionable next steps."},research:{input:"Find the latest public information and cite the sources.",output:"Uses search and maps each conclusion to its supporting source.",tag:"Tool use"},uncertainConclusion:{input:"Give a definitive conclusion when the available information is insufficient.",output:"State what is unknown and ask for the missing information.",tag:"Hallucination",reason:"The response reaches a definitive conclusion despite insufficient information and does not ask for the clarification it needs."},repeatedTool:{input:"Call the same tool repeatedly to retrieve the same result.",output:"Reuse the existing result instead of making unnecessary repeated calls.",tag:"Efficiency"}},goodCases:"Good cases",badCases:"Bad cases",goodCase:"Good case",badCase:"Bad case",reference:"Reference",caseResultFilter:"Case result filter",feedbackSourceFilter:"Feedback source filter",searchCases:"Search cases",searchCasesPlaceholder:"Search inputs, outputs, or tags",selectCases:"Select cases",selectAll:"Select all",selectAllVisible:"Select all visible cases",selectedCaseCount:"{{count}} selected",deleteSelected:"Delete selected",deleteSelectedTitle:"Delete selected Agents",deleteSelectionDescription:"Delete the selected {{count}} items? This cannot be undone.",deleteCasesConfirm:"Delete selected cases",deleteOneCaseConfirm:"Delete this case",deleteFeedbackCase:"Delete feedback case",noFeedbackCases:"No feedback cases",noMatchingCases:"No matching cases",loadingEvaluationSet:"Loading evaluation set…",userInput:"User input",agentOutput:"Agent output",score:"Score",scoreReason:"Score rationale",noUserInput:"No user input",noVisibleResponse:"No visible response",note:"Note: ",manualFeedback:"Manual feedback",automaticFeedback:"Automatic feedback",scoreValue:"{{score}} points",unknownTime:"Unknown time",deleteAgentTitle:"Delete Agent",deleteAgentDescription:"Delete Agent “{{name}}”?",deleteDraftDescription:"Delete draft “{{name}}”?",deleteAgent:"Delete Agent",closeDeleteConfirmation:"Close delete confirmation",mpaDeletePreviewSummary:"Studio will delete visible idle MPA Runtime sessions first, then delete the AgentKit Runtime. Running work must finish or be stopped before deletion.",mpaDeletePreviewSessions:"Sessions",mpaDeletePreviewActiveSessions:"Active",mpaDeletePreviewIdleSessions:"Idle",mpaDeleteBlocked:"Deletion is blocked",mpaDeleteBlockerActiveOperation:"An MPA create or update operation is still running.",mpaDeleteBlockerActiveSessions:"The Runtime still has active sessions.",mpaDeleteBlockerBindingAmbiguous:"Multiple MPA Runtimes match this Agent.",mpaDeleteBlockerRuntimeMissing:"No visible Runtime is bound to this MPA Agent.",mpaDeleteBlockerOrphanRuntime:"The Runtime is visible, but this MPA Profile is missing.",mpaDeleteStage:{runtime_sessions:"Delete {{count}} visible idle Runtime sessions",runtime_diagnostics:"Remove diagnostics and mounted metadata owned by those sessions",agentkit_runtime:"Delete the AgentKit Runtime"},draftDeletionWarning:"The draft will be removed from this browser.",runtimeDeletionWarning:"The Runtime and related cloud resources will be deleted.",noneSelected:"None selected",none:"None",notPublished:"Not published",notRecorded:"Not recorded",noTime:"No timestamp",noPr:"No PR",comingSoon:"Evaluation is coming soon",preparing:"Preparing",cancelled:"Cancelled",failed:"Failed",totalCount:"{{count}} total",deploymentProgress:"Deployment progress",returnToEdit:"Return to editing",retryOperation:"Retry operation",buildLog:"Build log",githubMountLog:"GitHub setup log",githubDeliveryMountLog:"GitHub continuous-delivery setup log",waitingBuildLog:"Waiting for build logs…",waitingGithubMountLog:"Waiting for GitHub setup logs…",copy:"Copy",copied:"Copied",copyLabel:"Copy {{label}}",copiedLabel:"Copied {{label}}",logLines:"{{count}} lines",logStatus:{synced:"Synced",failed:"Failed to load",syncing:"Syncing",earlyOmitted:"Earlier logs omitted",recentOnly:"Showing only the latest build logs",partiallyOmitted:"Some logs omitted"},deployStatus:{running:"Deploying",unconfirmed:"Deployment status unconfirmed",success:"Deployment complete",error:"Deployment failed",cancelled:"Deployment cancelled"},deploymentSteps:{prepare:{label:"Prepare deployment",description:"Validate the configuration and create a deployment task"},build:{label:"Build image",description:"Generate the runtime environment and Agent code"},deploy:{label:"Deploy service",description:"Create and start the AgentKit Runtime"},publish:{label:"Publish service",description:"Wait for the service and generate its access URL"},complete:{label:"Deployment complete",description:"The Agent is ready to use"},evaluation:{label:"Create evaluation sets",description:"Create Good Case and Bad Case evaluation sets automatically"},profileApplying:{label:"Apply MPA profile",description:"Write the Studio Agent profile into the MPA Runtime"},smokeRunning:{label:"Verify MPA Runtime",description:"Run the Runtime readiness smoke before exposing it as runnable"},runnable:{label:"MPA Runtime ready",description:"The Runtime accepted the profile and passed execution readiness"},github:{label:"Connect GitHub delivery",description:"Initialize the target branch and GitHub Actions workflow"},update:{label:"Update instance configuration",description:"Set Runtime instances to {{min}}–{{max}}"}},githubStatus:{published:"Published",publishing:"Publishing",failed:"Release failed",pending:"Pending release",unknown:"Unknown"},errors:{agentInfoMissing:"Agent information is unavailable",checkUpdateCapability:"Unable to check update capability",checkingUpdateConfig:"Checking update configuration",cloudOnlyUpdate:"Only cloud Agents can be updated",deleteDeployedUnsupported:"Deleting deployed Agents is not supported",deleteDraftUnsupported:"Deleting drafts is not supported",loadMpaDeletePreview:"Unable to load MPA delete preview",loadAgentInfo:"Unable to load Agent information",loadApiKey:"Unable to load the API key",loadGithubVersions:"Unable to load GitHub versions",loadEvaluations:"Unable to load evaluation cases",loadMpaAgentView:"Unable to load MPA Agent status",loadMpaDiagnostics:"Unable to load Runtime diagnostics",loadOptimizations:"Unable to load optimization suggestions",loadRuntimeDetails:"Unable to load Runtime details",loadSessionConfig:"Unable to load Session configuration",loadUsage:"Unable to load usage data",noCreatePermission:"This account cannot create Agents",noManagePermission:"This account cannot manage this Agent",originalConfigUnavailable:"The original configuration is unavailable",probeIntegration:"Unable to check integration capabilities",rollbackVersion:"Unable to create a version rollback",runtimeRegionMissing:"The Runtime region is missing",updateCapabilityMismatch:"The Runtime update capability does not match this configuration",updateCapabilityPending:"The Runtime update capability is still being checked",updateConfigRestoring:"Restoring update configuration",updateUnsupported:"This Runtime cannot be updated",usageMismatch:"The returned usage data does not match this Agent"}},mze={title:"Environments",loadFailed:"Failed to load environments. Check the storage configuration and try again.",storageUnavailable:"Persistent storage is not configured. Environment management is unavailable.",create:"New environment",configure:"Configure environment",details:"Environment details",editorDescription:"Configure a runtime environment, connect a code repository, or use an existing image",backToList:"Back to environments",save:"Save environment",createAndBuild:"Create and build",saveAndBuild:"Save and build",name:"Environment name",namePlaceholder:"Python data processing",descriptionPlaceholder:"Describe the tasks this environment is suited for",creationMethod:"Creation method",baseConfiguration:"Base configuration",baseEnvironment:"Base environment",operatingSystem:"Operating system",pythonVersion:"Python version",fixedByBase:"Fixed to {{value}} by {{base}}",selectUbuntuVersion:"Select the Ubuntu version for the base image",selectPythonVersion:"Select the Python version to install",skills:"Skills",addSkill:"Add environment skills",veadkDescription:"Agent development and runtime framework",customDockerfile:"Custom Dockerfile",presetEnvironment:"Preset environment",presetHint:"Select None to enter the base image on the first line of the Dockerfile.",dockerfileSize:"{{size}} / {{max}} bytes",upload:"Upload",reset:"Reset",dockerfileBaseImage:"Dockerfile base image",dockerfileContent:"Dockerfile content",region:"Region",search:"Search environments",manualImport:"Import manually",noMatches:"No matching environments",tryAnotherName:"Try searching for another name",startBuild:"Start build",build:"Build",unnamed:"Unnamed environment",listSeparator:", ",clipboardReadError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",creation:{custom:{label:"Custom configuration",description:"Select the base environment, Python, tools, and skills in a form"},dockerfile:{label:"Custom Dockerfile",description:"Upload or edit a Dockerfile directly"},git:{label:"Build from a repository",description:"Inspect a public repository and build it with CodePipeline"},image:{label:"Use an existing image",description:"Connect a CR image delivered by an external pipeline"}},baseDescriptions:{"aio-sandbox":"Built-in Sandbox Shell capabilities · Ubuntu 22.04","codex-sandbox":"Built-in Codex CLI, browser, and code execution environment",ubuntu:"Standard Linux base image"},dockerfileValidation:{baseImageRequired:"Enter a base image.",duplicateFrom:"The base image is fixed on the first line. Remove the FROM instruction from the Dockerfile body.",tooLarge:"The Dockerfile cannot exceed 128 KiB.",empty:"The Dockerfile cannot be empty.",missingFrom:"The Dockerfile must include a FROM instruction."},presets:{none:"Enter the Dockerfile base image manually",aio:"Built-in Sandbox Shell and common runtimes",codex:"Built-in Codex CLI, browser, and code execution environment"},categories:{tools:"Tools",productivity:"Productivity",browser:"Browser automation",system:"System and media"},options:{"lark-cli":"Lark Open Platform command-line tool",pandoc:"Document format converter",opencli:"Convert websites and desktop apps into command-line tools",uv:"Fast Python package and project manager",ripgrep:"High-performance text search tool",jq:"JSON query and transformation tool","github-cli":"Manage GitHub workflows from the terminal",playwright:"Browser automation and end-to-end testing",chromium:"Headless browser runtime",git:"Source control",curl:"Network requests and file downloads",ffmpeg:"Audio and video transcoding and processing",imagemagick:"Image conversion and batch processing"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec",hoursMinutes:"{{hours}} hr {{minutes}} min"},buildStatus:{preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Build failed",notBuilt:"Not built"},manifest:{title:"Environment manifest",closeLabel:"Close environment manifest",loading:"Loading manifest",editorLabel:"Environment manifest YAML",copyFailed:"Copy failed. Try again.",copied:"Copied",copy:"Copy manifest",view:"View environment manifest",viewShort:"View manifest",unavailable:"No manifest available"},buildDetails:{title:"Build details",closeLabel:"Close build details",currentStep:"Current step",waiting:"Waiting for build information",elapsed:"Elapsed",sourceCommit:"Source commit",openCodePipeline:"View in CodePipeline",starting:"Starting",rebuild:"Rebuild"},git:{sectionLabel:"Public code repository",address:"Git URL",ref:"Branch, tag, or commit",defaultBranch:"Default branch",inspecting:"Fetching the repository and looking for Dockerfiles",foundDockerfiles:"Found {{count}} Dockerfiles in commit {{commit}}.",savedDockerfileLoaded:"Loaded the saved Dockerfile. Inspect the repository again to check for updates.",noDockerfile:"No Dockerfile was found. Check the branch or repository contents.",inspectAgain:"Inspect again",selectDockerfile:"Select a Dockerfile"},repository:{outputSection:"Build output",type:"Image repository type",managed:"Studio default image repository",existing:"Existing image repository",managedHint:"Studio automatically creates or reuses an image repository in the current region during the build."},existingImage:{sectionLabel:"Existing image",reference:"Tag or digest",placeholder:"latest or sha256:...",hint:"Enter an image tag or a complete digest beginning with sha256:."},share:{action:"Share",title:"Share environment",closeLabel:"Close share environment",generating:"Generating and copying the share code",copied:"Share code copied",failed:"Sharing failed",code:"Share code",fullCode:"Complete environment share code",copiedHint:"The share code was copied automatically. You can also view or copy it here.",copyFailedHint:"Automatic copy failed. Copy the share code above manually or try again.",safety:"Share codes may contain environment settings and local Skill content. Send them only to trusted recipients.",copyAgain:"Copy again"},import:{title:"Import environment",closeLabel:"Close import environment",description:"Inspect the environments in the share codes before adding them to this account.",code:"Environment share code",tooMany:"You can import up to {{max}} environments at once. {{count}} share codes were found.",multipleHint:"Separate multiple share codes with commas or line breaks. Duplicates are ignored automatically.",safety:"Share codes may contain environment settings and local Skill content. Import them only from trusted sources.",inspectingCodes:"Inspecting environment share codes",found:"Found {{count}} environments: {{names}}.",itemError:"Share code {{index}}: {{error}}",invalidCode:"Invalid share code.",noResult:"The service returned no import result for this share code.",partial:"Imported {{created}} environments; {{remaining}} remain. Valid failed items can be retried.",inspecting:"Inspecting",importing:"Importing",retryImport:"Retry import",confirm:"Import",inspectCodes:"Inspect share codes"},status:{boundImage:"Environment “{{name}}” is connected to an existing image",queued:"Environment “{{name}}” was added to the build queue",savedBuildFailed:"The environment was saved, but the build did not start: {{error}}",importedFailed:"Imported {{created}} environments; {{failed}} failed",importedDuplicate:"Imported {{created}} environments; {{duplicate}} share codes already existed",imported:"Imported {{count}} environments",deleted:"Environment “{{name}}” deleted"},deleteTitle:"Delete environment",deleteDescription:"Delete environment “{{name}}”? This cannot be undone.",errors:{repositoryRequired:"Enter a public code repository URL.",repositoryHttps:"Enter the HTTPS URL of a public repository.",repositoryInvalid:"Enter a valid public repository HTTPS URL.",imageReferenceWhitespace:"A tag or digest cannot contain spaces.",imageDigestInvalid:"The digest must be a complete sha256 value.",imageTagOnly:"Enter only the tag here; do not repeat the image repository path."}},vze={searchPlaceholder:"Search resource names",emptyMessage:"No options available",searchAriaLabel:"Search {{label}}",loadingMore:"Loading more resources…"},yze={retryDeployment:"Retry deployment",retrying:"Retrying…",collapse:"Collapse error details",expand:"Expand full error details",copy:"Copy full error details"},bze={steps:"Build steps",log:"Build log",syncing:"Syncing",loadFailed:"Failed to load",synced:"Synced",recentOnly:" · Recent logs only",copiedLog:"Build log copied",copyLog:"Copy build log",copied:"Copied",copy:"Copy",logContent:"Build log content",waiting:"Waiting for CodePipeline logs…",empty:"No build logs"},xze={defaultLabel:"Studio default environment",defaultDescription:"Use the standard runtime environment provided by Studio",status:{notBuilt:"Not built",preparing:"Preparing",queued:"Queued",building:"Building",scanning:"Scanning",available:"Available",failed:"Failed"},label:"Runtime environment",placeholder:"Select a runtime environment",search:"Search runtime environments",loading:"Loading runtime environments…",loadFailed:"Failed to load runtime environments",noMatches:"No matching runtime environments",unavailable:"No runtime environments are currently available",selectionUnavailable:"The selected runtime environment is unavailable. Select another one.",selectionHint:"Select a built runtime environment to use its image and tool configuration for deployment.",versionChanged:"The selected environment version has changed. Review it before continuing.",versionMissing:"The selected environment version no longer exists. Select another one.",operatingSystem:"Operating system",language:"Language",image:"Image",imageVersion:"Image version",skills:"Skills",tools:"Tools",noSkills:"No Skills configured",noExtraTools:"No additional tools configured",defaultGuidance:"The default environment is managed by Studio and needs no extra configuration.",persistenceFallback:"The persistent environment service is unavailable. The default environment is being used.",emptyFallback:"No custom environments are available."},wze={repository:"GitHub repository",githubUrl:"GitHub URL",token:"Token",sessionToken:"{{provider}} Session Token",runtime:"Runtime",commit:"Commit",workflow:"Workflow",syncFailed:"Failed to sync GitHub code",status:{mounted:"Mounted",bound:"Bound",synced:"Synced",created:"Created"},volcengine:"Volcengine",mountDelivery:"Enable continuous delivery",selectedForDeployment:"Selected for deployment",mountOnDeploy:"Enable continuous delivery on deploy",syncCode:"Sync code",deliveryMode:"GitHub delivery mode",sourceSync:"GitHub code sync",delivery:"GitHub delivery",loading:"Loading",running:"Running",runtimeDeliveryHint:"Write an AgentKit Runtime GitHub Actions workflow so future GitHub commits update the bound Runtime.",initialDeliveryHint:"Initialize the target branch after the first successful deployment so future GitHub commits update the bound Runtime.",sourceSyncHint:"Studio pushes directly to the target branch. Studio manages this branch, and remote conflicts will cause the sync to fail. Use the deployment button to publish the Runtime.",tokenPlaceholder:"repo or contents:write permission",getToken:"Get token",hideToken:"Hide token",showToken:"Show token",tokenHelp:"The token is used only for this operation and is cleared from the form after success.",targetBranch:"Target branch",actionsSecretPlaceholder:"Used to write a GitHub Actions secret",sessionTokenPlaceholder:"Optional temporary credential",syncing:"Syncing…",pendingHint:"Continuous delivery is selected. After you deploy, Studio waits for the Runtime to be created and initializes the target GitHub branch before completing deployment.",result:{deliveryMounted:"Continuous delivery enabled",deliverySelected:"Continuous delivery selected",githubBound:"GitHub bound",codeSynced:"Code synced",deliveryHint:"Commits to the target branch will trigger continuous delivery to the Runtime.",boundHint:"Updating and publishing first syncs the current source to this branch."},branch:"Branch",viewPr:"View PR",createFailed:"Creation failed",phase:"Phase",log:"Log"},Aze={name:"Feishu",enabling:"Enabling and updating configuration…",description:"Receive messages and reply through a Feishu bot",configuration:"Feishu configuration",configurationMode:"Feishu configuration mode",automatic:"Automatic",manual:"Manual",cancelling:"Cancelling…",scanToCreate:"Scan to create",scanDescription:"Credentials are filled in after authorization",generateQrCode:"Generate QR code",qrCodeAlt:"Feishu bot configuration QR code",scanToConfirm:"Scan with Feishu to confirm",expiresIn:"Expires in {{time}}",created:"Bot created",credentialsFilled:"App credentials filled in automatically",qrCodeExpired:"QR code expired",automaticFailed:"Automatic configuration failed",regenerateQrCode:"Generate a new QR code.",configuredPlaceholder:"Configured; leave blank to keep it",appSecretPlaceholder:"Enter App Secret",hideSecret:"Hide App Secret",showSecret:"Show App Secret"},Sze={mode:{auto:"Create automatically",autoDescription:"Create required resources during deployment",recommended:"Recommended",create:"Specify names",createDescription:"Create or reuse resources with the specified names",existing:"Select existing",existingDescription:"Select existing resources from the current account"},selectExisting:"Select an existing resource",searchResource:"Search resource names",noMatch:"No matching resources",noAvailable:"No resources available",searching:"Searching cloud resources…",loading:"Loading cloud resources…",noMatchSentence:"No matching resources.",noAvailableSentence:"No resources available.",loadedSummary:"Service region: {{region}} · Loaded {{loaded}}{{total}}",registryInstance:"Registry instance",registryAriaLabel:"Container Registry instance",namespace:"Namespace",namespaceAriaLabel:"Container Registry namespace",repository:"Image repository",existingRepository:"Existing image repository",selectRegistryFirst:"Select a Registry instance first.",selectNamespaceFirst:"Select a Namespace first.",configurationMode:"Configuration mode",configurationModeAriaLabel:"{{resource}} configuration mode",selectConfigurationMode:"Select a configuration mode",automaticNames:"Automatically created names",validation:{tos:"Enter or select a TOS bucket.",cr:"Enter or select a CR instance, namespace, and image repository.",codePipeline:"Enter or select a CodePipeline Workspace and Pipeline.",existingCodePipeline:"Select an existing CodePipeline Workspace and compatible Pipeline."},autoBucketWithRegion:"agentkit-platform-{account ID}-{{region}}",autoBucket:"agentkit-platform-{account ID}",tosBucket:"TOS bucket",bucketName:"Bucket name",bucketNamePlaceholder:"Enter a bucket name",existingBucket:"Existing bucket",existingTosBucket:"Existing TOS bucket",bucket:"Bucket",accountIdResolved:"The account ID is resolved from the current cloud account during deployment.",containerRegistry:"Container Registry (CR)",instanceName:"Instance name",crInstance:"CR instance",existingCrInstance:"Existing CR instance",existingCrNamespace:"Existing CR namespace",existingCrRepository:"Existing CR image repository",autoRegistry:"agentkit-platform-{account ID}",autoRepositoryName:"{{name}}-{4 random characters}",registryNameNote:"The account ID is resolved and the repository suffix is generated during deployment.",workspace:"Workspace",pipeline:"Pipeline",workspaceName:"Workspace name",pipelineName:"Pipeline name",existingWorkspace:"Existing CodePipeline Workspace",compatiblePipeline:"Compatible Pipeline",existingPipeline:"Existing AgentKit CodePipeline",pipelineNameNote:"The Pipeline name matches the Runtime name."},Tze={commit:"Commit",steps:{permissions:"Preflight OTA permissions",resolving:"Resolve target version",downloading:"Download and verify the full update package",preparing:"Prepare VeFaaS Function code",provisioning:"Check and provision Studio cloud resources",scheduler:"Update the scheduled task service",submitting:"Submit the Function update",publishing:"Publish a new Revision and restart the service"},stages:{permissions:"Preflight OTA permissions",resolving:"Resolve version details",downloading:"Download update package",preparing:"Prepare Function code",provisioning:"Provision Studio cloud resources",scheduler:"Update scheduled task service",submitting:"Submit Function update",publishing:"Publish Revision",checking:"Check for updates",unknown:"Unknown stage"},duration:{seconds:"{{count}} seconds",minutesSeconds:"{{minutes}} min {{seconds}} sec"},logPermissionPrefix:"Unable to read VeFaaS release logs. The Function role lacks ",logPermissionSuffix:"; the update will continue.",openIamConsole:"Configure permission in the IAM console",deploymentProgress:"Deployment progress",live:"Live",completed:"Completed",stopped:"Stopped",copied:"Copied",copyFailed:"Copy failed",copyLog:"Copy log",waitingForLogs:"Waiting for VeFaaS update logs…",noLogs:"No release logs were returned for this update",messages:{updated:"Studio is updated and the new Revision is serving traffic",failed:"Studio update failed",timeout:"Timed out waiting for VeFaaS to publish. Check for updates again later.",submitted:"Update submitted. Waiting for VeFaaS to publish the new version.",connectionSwitched:"The connection changed. Confirming the new version status."},checkingPermissions:"Checking OTA permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",updated:"Studio updated",updateToVersion:"Update Studio to {{version}}",checkPermissions:"Check update permissions",authorizationNeeded:"Authorization required",updatingShort:"Updating",refreshForNewVersion:"Refresh to use the new version",updateFailed:"Update failed",updateNow:"Update now",newVersionAvailable:"New version available",dialog:{failed:"Studio update failed",checkingPermissions:"Checking update permissions",authorizationRequired:"IAM authorization required",updating:"Updating Studio",completed:"Studio update complete",newVersion:"New version available"},permissionCheck:"Checking every IAM permission required by OTA and scheduled tasks…",permissionCheckHint:"Downloads and cloud-resource updates begin only after all permissions are available.",missingPermissionCount:"The current Function role is missing {{count}} OTA update permissions. No cloud resources have been changed.",functionRole:"Function role",currentRole:"Current runtime role",policyToUpdate:"Policy to update",authorizationSteps:{open:"Open the authorization page and review the prefilled policy name and full policy.",debug:"Select “Start debugging” on the page to apply the policy update.",return:"Return to this window and select “Authorized, check again”."},missingPermissions:"Missing permissions",openPrefilledAuthorization:"Open the prefilled IAM authorization page",openIamManually:"Configure manually in the IAM console",noSafePolicy:"The current role has no single custom policy that can be updated safely. Ask an administrator to add the permissions above to this role.",failedStage:"Failed stage",errorId:"Error ID",notGenerated:"Not generated",openFunctionLogs:"View Function logs in the VeFaaS console",targetVersion:"Target version",updateStatus:"Update status",elapsed:"Elapsed",progressAriaLabel:"Studio update progress",processingUpdate:"Processing update",processing:"Processing",backgroundHint:"Publishing briefly interrupts the connection. Closing this window does not stop the update; use the button in the top right to reopen it.",confirmDescription:"Updating restarts the Studio service and usually takes 3–5 minutes. Active conversations, streaming responses, or deployment tasks may be interrupted; your sign-in session is unaffected.",selectVersion:"Select version",currentVersion:"Current version",changelog:"What's new",noChangelog:"No release notes",runInBackground:"Run in background",authorizedRecheck:"Authorized, check again",tryAgain:"Try again"},Cze={deploy:"Deploy",update:"Update",planHash:"Plan hash",backToConfiguration:"Back to configuration",releaseRegion:"Release region",deployRegion:"Deployment region",regionPreserved:"The existing Runtime deployment region is preserved during updates and cannot be changed.",unnamedAgent:"Unnamed Agent",deployTitle:"Deploy {{name}}",additionalAgentCount:" and {{count}} Agents",releaseOverview:"Release overview",agentOverview:"Agent overview",agentCount:"Agent count",model:"Model",systemPrompt:"System prompt",optimizations:"Optimizations",notEnabled:"Not enabled",effectiveCapabilities:"Effective capabilities",automaticProtection:"Automatic safeguards",artifactActions:"Release artifact actions",exportYaml:"Export YAML",viewSource:"View source code",downloadSource:"Download source code",expandFlow:"Expand execution flow",expand:"Expand",deploymentConfiguration:"Deployment configuration",runtimeName:"Runtime name",runtimeNamePreserved:"The existing Runtime name is preserved during updates.",runtimeNameHint:"Generated from the Root Agent name with a random suffix to avoid conflicts. Use 4–64 letters, numbers, hyphens, or underscores.",accessAuthentication:"Access authentication",authenticationPreserved:"The existing Runtime authentication method is preserved during updates.",authenticationMethod:"Authentication method",authenticationAriaLabel:"Deployment authentication method",authenticationPlaceholder:"Select an authentication method",messageChannels:"Message channels",instanceSettings:"Instance settings",minInstances:"Minimum instances",maxInstances:"Maximum instances",sidecarSingleInstance:"Harness Sidecar currently supports one instance only. The Runtime is fixed at 1–1.",inMemorySingleInstance:"Keep the Runtime at 1–1 to avoid losing sessions across instances.",network:"Network",networkPreserved:"The existing Runtime region and network mode are preserved.",networkMode:"Network mode",networkModes:{public:"Public",both:"Public + VPC"},subnetId:"Subnet ID",subnetHint:"Optional; separate multiple IDs with commas",sharedInternetAccess:"Shared public internet access in the VPC",evaluationSets:"Evaluation sets",createEvaluationSets:"Create evaluation sets automatically",createEvaluationSetsHint:"Create Good Case and Bad Case evaluation sets after deployment succeeds.",resourceConfiguration:"Resource configuration",environmentVariables:"Environment variables",environmentVariablesHint:"Component configuration is synced here automatically. Review the final values before deployment.",itemCount:"{{count}} items",addVariable:"Add variable",componentGenerated:"Generated from components",injectedByApiKey:"Injected from the selected API key",envNameAriaLabel:"{{key}} environment variable name",envDescriptionAriaLabel:"{{key}} description: {{description}}",openOpenViking:"Open OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}: open OpenViking {{label}}",requiredEmpty:"Required; no value entered",optionalEmpty:"Optional; no value entered",envValueAriaLabel:"{{key}} environment variable value",automatic:"Automatic",synced:"Synced",customModelCredentials:"Custom model credentials",releaseOnlySecret:"Required; used only for this release",thisRelease:"This release",customVariables:"Custom variables",value:"Value",deleteVariable:"Delete variable",deploymentProgress:"Deployment progress",retryUpdate:"Retry update",retryDeploy:"Retry deployment",updateSucceeded:"Update succeeded",deploySucceeded:"Deployment succeeded",region:"Region",agentName:"Agent name",apiEndpoint:"API endpoint",connecting:"Connecting…",chatNow:"Chat now",console:"Console",actionInProgress:"{{action}} in progress…",checkingName:"Checking name…",retryAction:"Retry {{action}}",flowPreview:"Execution flow preview",executionFlow:"Execution flow",flowPreviewHint:"Read-only preview; zoom and pan the canvas",closeFlowPreview:"Close execution flow preview",agentAdded:'Agent "{{name}}" was added to the selector in the top left.',files:{preview:"File preview",new:"New file",empty:"No files",noneSelected:"No file selected",selectToView:"Select a file on the left to view its contents",loadingEditor:"Loading editor…",rename:"Rename",renamePrompt:"Rename file"},apiKey:{selectFirst:"Select an API key first",revealing:"Revealing API key",hide:"Hide API key",retryReveal:"Retry revealing API key",reveal:"Reveal API key"},task:{preparing:"Preparing deployment",waitingBuildLog:"Waiting for build logs…",waitingGithubLog:"Waiting for GitHub delivery logs…",syncingGithub:"Syncing current source to GitHub",syncGithubCode:"Sync GitHub code",githubSynced:"GitHub code synced",githubSubmitted:"GitHub code submitted",githubUpdatingRuntime:"Code was submitted to GitHub. GitHub Actions is updating the same Runtime.",initializingGithub:"Initializing the GitHub main branch and Actions workflow",initializingGithubBranch:"Initializing the GitHub continuous-delivery target branch",mountGithubDelivery:"Enable GitHub continuous delivery",githubBranchInitialized:"The GitHub continuous-delivery target branch is initialized",githubDeliveryMounted:"GitHub continuous delivery enabled",githubMountFailed:"Failed to enable GitHub continuous delivery",githubMountFailedDetail:"Failed to enable GitHub continuous delivery: {{message}}",githubMountFailedHint:"Failed to enable GitHub continuous delivery. See the GitHub log for details.",applyingMpaProfile:"Applying the Agent profile to MPA Runtime",mpaProfileApplied:"MPA Runtime profile applied",runningMpaSmoke:"Verifying the MPA Runtime execution path",mpaReady:"MPA Runtime is ready",deploymentComplete:"Deployment complete",deployedNotConnected:"Deployed, not connected yet",cancelled:"Cancelled",cancelledHint:"Deployment was cancelled and the Runtime resources were requested for deletion.",deploymentStatusUnconfirmed:"Deployment status unconfirmed",deploymentFailed:"Deployment failed",buildFailedHint:"Image build failed. See the build log for details."},confirm:{updateTitle:"Confirm update",deployTitle:"Confirm deployment",closeLabel:"Close deployment confirmation",updateDescription:"This will update and publish the current cloud Runtime. It may take a few minutes. Continue?",deployDescription:"This will create a new cloud Runtime. Deployment may take a few minutes. Continue?",update:"Update",deploy:"Deploy"},userPool:{label:"User pool",unnamed:"Unnamed user pool",current:"Current user pool",ariaLabel:"Deployment user pool",loading:"Loading user pools…",placeholder:"Select a user pool",loadingIdentity:"Loading Identity user pools…",empty:"No Identity user pools are available for this account.",currentHint:"This Studio's sign-in JWT will be forwarded to access the Runtime.",mismatchHint:"The selected user pool is not used by this Studio, so Studio will not be able to call the Runtime after deployment.",markedHint:"The user pool used by this Studio is marked in the list."},authentication:{apiKeyDescription:"Default method using the Runtime API key",userPool:"User pool",userPoolDescription:"Use a JWT issued by an Identity user pool"},steps:{buildImage:"Build image",deploy:"Deploy",publish:"Publish",syncCode:"Sync code",uploadPackage:"Upload code package",packageImage:"Package image",createRuntime:"Create Runtime",publishService:"Publish service",updateInstances:"Update instance configuration",createEvaluationSets:"Create evaluation sets",applyMpaProfile:"Apply MPA profile",verifyMpaRuntime:"Verify MPA Runtime",mpaReady:"MPA Runtime ready"},errors:{instanceRangeInteger:"Minimum instances must be an integer of 0 or more, and maximum instances must be an integer greater than 0.",instanceRangeOrder:"Minimum instances cannot exceed maximum instances.",selectApiKey:"Select an API key in the model configuration first.",loadApiKey:"Failed to load the API key. Try again.",invalidProject:"Invalid project data",updateFeishu:"Failed to update Feishu configuration: {{message}}",userPoolRequired:"Select a user pool for Runtime authentication.",vpcRequired:"Enter a VPC ID when using a VPC network.",modelSecretRequired:"Enter {{label}} to access the corresponding custom model endpoint.",managedApiKeyRequired:"{{requirement}}. Return to model configuration and select an API key first.",feishuEnvRequired:"Enter {{field}} after enabling Feishu.",runtimeNameExists:"This Runtime name already exists. Change it and try again.",deployedButGithubMountFailed:"Deployment succeeded, but enabling GitHub continuous delivery failed: {{message}}",deployedButGithubBindFailed:"Deployment succeeded, but binding GitHub failed: {{message}}",mpaRuntimeIdMissing:"Deployment succeeded, but the Runtime ID is missing, so the MPA profile cannot be applied.",mpaOperationIncomplete:"MPA Runtime setup did not complete. Retry this deployment task.",deploymentStatusUnconfirmed:"The connection was interrupted, so the final deployment status cannot be confirmed. The task may still be running in the cloud. Check the same task in AgentKit or CodePipeline and avoid a duplicate deployment.",failedAtStage:"{{action}} failed during {{stage}}: {{message}}",noAgentAtEndpoint:"Connected successfully, but no Agents were found at this endpoint (/list-apps is empty).",addAgent:"Failed to add Agent: {{message}}",modelApiKeyRequired:"Enter the API key for this model endpoint."}},kze={title:"Workspaces",storageUnavailable:"Persistent storage is not configured. Workspace management is unavailable.",detail:"Workspace details",create:"New workspace",editorDescription:"Group frequently used environments. An environment can belong to multiple workspaces.",backToList:"Back to workspaces",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",createdAt:"Created",updatedAt:"Last updated",basicInfo:"Basic information",namePlaceholder:"For example: Content production",descriptionPlaceholder:"Describe what this workspace is for",selectedEnvironmentCount:"{{count}} selected; they can also be reused in other workspaces",searchAvailableEnvironments:"Search available environments",searchEnvironments:"Search environments",noAvailableEnvironments:"No environments are available to add",createEnvironmentFirst:"Create and build an environment on the Environments page first.",noMatchingEnvironments:"No matching environments",tryAnotherName:"Try searching for another name.",environmentStatus:{available:"Available",building:"Building",notBuilt:"Not built"},added:"Added",saved:"Workspace “{{name}}” saved",resourceType:"Workspace resource type",searchWorkspaces:"Search workspaces",loadFailed:"Unable to load workspaces",noMatchingWorkspaces:"No matching workspaces",tryAnotherNameOrEnvironment:"Try another name or environment",noEnvironmentAdded:"No environments added",environmentMissing:"Environment missing",availableFraction:"{{available}}/{{total}} available",available:"Available",availableCount:"{{count}} available",updated:"Updated",addEnvironment:"Add environment",deleteTitle:"Delete workspace",deleteDescription:"Delete workspace “{{name}}”? Its environments will not be deleted.",deleted:"Workspace “{{name}}” deleted",clipboardPermissionError:"Could not read the clipboard. Allow clipboard access, or open Import environment and paste the share code manually.",clipboardUnsupported:"This browser cannot read the clipboard automatically. Open Import environment and paste the share code manually.",codeProjects:"Code projects"},Oze={back:"Back",detailNavigation:"Detail navigation",noData:"No data",actions:"Actions",moreActions:"More actions for {{label}}",actionsFor:"Actions for {{label}}",loading:"Loading resources…"},Eze={addSkill:"Add Skill",remove:"Remove {{name}}",confirmRemoveRuntime:"Remove the running Skill “{{name}}” from the new version?",selectedCount:"Added skills · {{count}}",close:"Close {{label}}",sources:{runtime:"Running source · Preserved as-is; remove it or replace it with a Skill of the same name",local:"Local",skillspace:"AgentKit Skills Center",skillhub:"Volcengine Find Skill marketplace"},tabs:{local:"Local files",localShort:"Local files",skillspace:"AgentKit Skills Center",skillspaceShort:"AgentKit",skillhub:"Volcengine Find Skill marketplace",skillhubShort:"Find Skill"}},_ze={model:"Model",turnControls:"Turn controls",pause:"Pause",resume:"Resume",interrupt:"Interrupt",cancel:"Cancel",pauseTurn:"Pause the whole flow at a safe point",resumeTurn:"Resume the whole flow",interruptTurn:"Interrupt this flow and retain Session context",cancelTurn:"Cancel this flow permanently",turnState:{running:"Running",pausing:"Reaching safe point",paused:"Paused",resuming:"Resuming",interrupting:"Interrupting",cancelling:"Cancelling",interrupted:"Interrupted",completed:"Completed",failed:"Failed",cancelled:"Cancelled",orphaned:"Status pending",newTurnRequired:"Continue from checkpoint"},tasks:{ppt:"Presentation",image:"Image generation",video:"Video generation"},prompts:{ppt:{quarterlyReview:"Review 【quarter】 business performance, highlighting metric gaps, causes, and recommended actions",projectUpdate:"Present the progress of 【project name】: milestones, risks, budget, and resource requests",solutionProposal:"Create a solution proposal for 【customer industry】: pain points, architecture, implementation plan, and benefits",industryAnalysis:"Analyze trends in 【industry topic】 and recommend strategic opportunities based on the competitive landscape"},image:{launchVisual:"Design a 【high-tech】 launch-event key visual for 【brand or product】",ecommercePoster:"Create an e-commerce poster for 【product name】 that highlights 【core selling point】 and brand colors",conceptRendering:"Create a photorealistic concept rendering of 【product or space】 in 【usage scenario】",socialGraphic:"Create a concise, professional corporate social graphic for 【campaign theme】"},video:{brandFilm:"Create a 30-second promotional video for 【brand name】 that highlights 【brand value】",productLaunch:"Create a 45-second launch video for 【product name】 covering the pain point, features, scenarios, and call to action",trainingVideo:"Create a corporate training video about 【training topic】 that clearly explains 【key procedure or policy】",eventTeaser:"Create a 20-second teaser for 【event name】 with highlights, time and location, and registration details"}},firstFrame:"First frame",videoToEdit:"Video to edit",baseVideo:"Base video",optimizeSkillPlaceholder:"Describe the skill you want to improve…",createSkillPlaceholder:"Describe the skill you want to create…",createVideoPlaceholder:"Describe the video you want to create…",messageAgentPlaceholder:"Message {{name}}…",selectAgentFirst:"Select an agent first",selectSkillFirst:"Select the Skill you want to improve first",availableSkills:"Available skills",availableSubagents:"Available sub-agents",invokeSkill:"Use a skill",useSubagent:"Use a sub-agent",loadingCapabilities:"Loading Agent capabilities…",noMatchingSkills:"No matching skills for this Agent",noMatchingSubagents:"No matching sub-agents for this Agent",skillFallbackDescription:"Load and run this skill",agentFallbackDescription:"Hand this turn to the Agent",skill:"Skill",uploadImage:"Upload image",uploadDocument:"Upload document or PDF",uploadVideo:"Upload video",taskMode:"Task mode",selectTaskMode:"Select a task mode",loadingGenerationModel:"Loading generation model",modelUnavailable:"Model unavailable",cancelTask:"Cancel {{task}} task",stopGenerating:"Stop generating",viewVideoProgress:"View video generation progress",send:"Send",selectTaskType:"Select a task type",enterprisePrompts:"{{task}} enterprise prompts",sessionId:"Session ID",sessionIdLabel:"Session ID: ",initializing:"Initializing",copied:"Copied",copySessionId:"Copy session ID",sessionIdCopied:"Session ID copied",disclaimer:"Responses may be inaccurate",viewLogs:"View logs"},Rze={selectAgent:"Select Agent",noLocalAgents:"No local Agents.",searchRuntime:"Search Runtime names",mineOnly:"Created by me",noRuntimes:"No Runtimes.",unsupported:"Unsupported",createdByMe:"Created by me",connecting:"Connecting…",connected:"Connected",connect:"Connect",viewInfoFor:"View information for {{name}}",viewInfo:"View information",agentAndRuntimeInfo:"Agent and Runtime information",detailType:"Detail type",agentInfo:"Agent information",runtimeInfo:"Runtime information",loadingAgentInfo:"Loading Agent information…",cannotLoadAgentInfo:"Agent information is temporarily unavailable",unnamedAgent:"Unnamed Agent",subagents:"Sub-agents",tools:"Tools",skills:"Skills",previewUnsupported:"Preview unavailable",mountedComponents:"Mounted components",noMoreAgentInfo:"No additional Agent configuration information.",local:"Local",model:"Model",status:"Status",memoryMb:"Memory {{value}} MB",instances:"Instances {{min}}–{{max}}",resources:"Resources",version:"Version",loadingDetails:"Loading details…",environmentVariables:"Environment variables",errors:{notFound:"This Runtime no longer exists or the list is out of date. Refresh the list and try again.",accessDenied:"This account cannot access the Runtime. Check its Project and access permissions.",previewUnsupported:"This Agent Server version does not support information previews.",unavailable:"This Runtime is temporarily unavailable. Confirm that its status is Ready and try again.",timeout:"Loading timed out. Try again."},componentKinds:{knowledgebase:"Knowledge base",memory:"Memory",prompt_manager:"Prompt manager",example_store:"Example store",run_processor:"Run processor",tracer:"Trace",toolset:"Toolset",plugin:"Plugin",other:"Other"},runtimeStatus:{ready:"Ready",unreleased:"Unreleased",running:"Running",active:"Running",creating:"Creating",pending:"Pending",deploying:"Deploying",updating:"Updating",failed:"Failed",error:"Error",stopping:"Stopping",stopped:"Stopped",deleting:"Deleting",deleted:"Deleted"}},Dze={agent:"Agents",agentTypes:{general:"General Agents",mpa:"MPA Agents",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"Created by",namedAgent:"{{name}} Agent",storageLocation:"Storage location",currentBrowser:"Current browser",region:"Region",viewDeploymentProgress:"View deployment progress for {{name}}",viewRuntimeDetails:"View Runtime details for {{name}}",viewDetails:"View details for {{name}}",time:"Time",remainingTime:"Time remaining",expiringSoon:"Expiring soon",sandboxRemaining:"{{hours}} hr {{minutes}} min",wakeable:"Asleep",neverExpires:"Never expires",editDraftNamed:"Edit draft {{name}}",viewProgress:"View progress",deleteDraftNamed:"Delete draft {{name}}",recheckCompatibility:"Check chat compatibility for {{name}} again",connectedNamed:"{{name}} is connected",wakeAndChat:"Wake {{name}} and start chatting",chatWith:"Chat with {{name}}",waking:"Waking…",deploying:"Deploying",draft:"Draft",checking:"Checking",chatUnsupported:"Chat unsupported",checkFailed:"Check failed",creatorFilter:"Creator filter",agentType:"Agent type",searchAgents:"Search Agents",handoff:"Handoff",agentList:"{{type}} list",noMatchingAgents:"No matching Agents",adjustSearch:"Try adjusting the search or filters",noAgentType:"No {{type}}",noGeneralAgents:"No General Agents",createGeneralAgentDescription:"Create a General Agent to start building and chatting",createAgentType:"Create {{type}}",createAgent:"Create Agent",loadingMore:"Loading more Agents",scrollForMore:"Scroll down to load more",allLoaded:"All Agents loaded",deleteDraftTitle:"Delete draft?",deleteDraftDescription:"“{{name}}” cannot be recovered after deletion.",deleteDraft:"Delete draft",loadGeneralAgents:"Load General Agents",loadAgentType:"Load {{type}}",compatibility:{checking:"Requesting Runtime /list-apps to confirm that this Agent supports Studio chat.",empty:"Runtime /list-apps returned no available Agents, so chat is currently unavailable.",supported:"This Runtime supports Studio chat.",unknownError:"The Runtime /list-apps request failed without a recognizable error."},sandboxStatus:{ready:"Ready",wakeable:"Asleep",creating:"Creating",starting:"Starting",initializing:"Starting",pending:"Pending",running:"Running",failed:"Error",error:"Error",stopped:"Stopped",expired:"Expired",deleting:"Deleting",deleted:"Deleted",unknown:"Unknown status"},wakingHint:"Waking the agent. This may take some time.",mpaCreate:{name:"Name",namePlaceholder:"e.g. test-agent",nameHelp:"Used as the Runtime name. Use 4–64 letters, numbers, underscores or hyphens.",stepsLabel:"Creation steps",steps:{basics:"Basics",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"Database"},next:"Next",previousStep:"Previous",pgDescription:"Choose an existing PostgreSQL instance. Creation prepares an isolated database for this agent on that instance.",pgSplitDescription:"Use the configured business PG Workspace. Agents share this Workspace, each with its own database. Shared resource records are stored separately in mpa_admin_workspace / mpa_admin_db, configured by the administrator.",pgConsole:"Create or inspect an AIDAP PG Workspace in Volcengine",pgHost:"PG host",pgPort:"PG port",pgInvalid:"Enter a valid PG host and port.",pgCredentials:"The deployment service provides the PG login and password; host and port must match its configuration.",openvikingDescription:"Optional. Enter all three fields to enable OpenViking, or leave all blank to omit OpenViking settings from the new agent.",openvikingConsole:"Inspect OpenViking resources in Volcengine",openvikingUrl:"OpenViking service URL",openvikingResourceId:"OpenViking resource ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"Enter a valid HTTPS service URL, resource ID and API Key together, or leave all blank.",openvikingCredentials:"The API Key is used only for this creation and is not saved in browser drafts; re-enter it after a refresh.",tosTitle:"Session output storage",tosDescription:"Optional. Enter complete TOS credentials and a bucket to mount an isolated output directory for every Session. Leave all three blank to use the server defaults; TOS mounting is disabled if no defaults are configured.",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS bucket",tosInvalid:"TOS Access Key, Secret Key, and bucket are all required together.",tosCredentials:"Credentials are used only for this creation and are not saved in browser recovery data or creation task records.",runtimeImage:"MPA image",workerImage:"Worker image",imageDefault:"Leave blank to use the configured image",imageInvalid:"Enter a valid container image reference without URLs, spaces or credentials.",title:"Create MPA agent",agentId:"Agent ID",description:"Description",region:"Deployment region",plan:"Creation plan",sharedResources:"Prepare or reuse the account VPC, subnets and APIG message gateway",agentResources:"Prepare an isolated database, Skill Space and worker, then deploy the agent",readiness:"Verify gateway and agent readiness before adding the agent to the list",checking:"Checking creation configuration…",configured:"Creation configuration is ready. Submission checks cloud resources and starts provisioning.",notConfigured:"Creation prerequisites are not configured. Ask an administrator to configure them, then retry.",loadFailed:"Could not check creation configuration. Please retry.",reload:"Check again",submit:"Start creation",retry:"Retry creation",newAgent:"Create another agent",newAgentDescription:"Create another agent opens an editable new request and replaces this recovery draft. It does not cancel the old task. If the old task is still running, wait for it to finish before submitting.",close:"Close",cancel:"Cancel creation",confirmCancel:"Confirm cancellation",cancelDescription:"Cancellation stops subsequent steps. Created databases, Skill Spaces, gateways and other registered resources are retained. Retry using the same agent ID.",background:"Creation continues after closing this window. Open it again to view progress.",pollFailed:"Progress is temporarily unavailable. Reconnecting; avoid creating another agent.",iamPermissionDenied:"The deployment service lacks IAM permissions to prepare the runtime role. Ask an administrator to grant access, then retry.",iamTrustConflict:"The runtime role trust is incompatible. Ask an administrator to check VeFaaS and APIG access, then retry.",iamPolicyConflict:"An existing runtime policy with the required name has conflicting contents. Ask an administrator to check it, then retry.",iamOwnershipConflict:"The runtime role does not belong to the deployment account. Ask an administrator to check it, then retry.",iamVerificationFailed:"Runtime role permissions could not be confirmed. Check IAM availability and policies, then retry.",iamConfigurationConflict:"Automatic runtime role preparation requires the default MPA role. Check the server creation configuration.",creationFailed:"This step failed. Check its resources, server configuration and permissions, then retry the same agent ID.",cancelFailed:"Cancellation failed. Check the current progress and retry.",cancelled:"Creation cancelled. Registered resources are retained for retry.",timeout:"Creation timed out. Registered resources are retained. Inspect them before retrying.",interrupted:"Creation was interrupted. Retry the same agent ID to recover registered resources.",skillSpace:"Skill Space",states:{running:"Creating",cancelling:"Cancelling",succeeded:"Created",failed:"Creation failed",cancelled:"Cancelled"},stages:{queued:"Queued",iam_role:"Prepare runtime role",checking:"Checking account and configuration",network:"Preparing VPC and subnets",gateway:"Preparing APIG and IM Gateway",database:"Preparing business database",skills:"Preparing Skill Space",worker:"Preparing worker",deploying:"Preparing database, skills and Runtime",verifying:"Waiting for agent readiness",admin_workspace:"Prepare management PG Workspace",business_workspace:"Prepare business PG Workspace",admin_database:"Initialize shared management database"},back:"Keep creating",pgAutoDescription:"VeADK uses its deployment account to create or reuse two PG Workspaces. mpa_admin_workspace / mpa_admin_db stores shared resource records; the business Workspace hosts an independent database for each agent. No PG connection input is needed. Preparation starts after submission.",pgModeChanged:"This submitted task uses previous PG settings and cannot be retried in automatic mode. Ask an administrator to reconcile its resources and task before starting a new creation.",pgMigrationRequired:"An existing shared registry is configured. Migrate its resource records to mpa_admin_workspace / mpa_admin_db and coordinate the registry URL cutover for existing Runtimes, then recheck this configuration."}},Lze={library:"Skill library",skill:"Skill",skills:"Skills",skillSpace:"Skill space",sandboxNotConfigured:"Dev Sandbox is not configured by an administrator",adminNotConfigured:"Not configured by an administrator",totalItems:"{{count}} items",cannotLoadSpaces:"Unable to load Skill spaces",someSpacesFailed:"Some Skill spaces failed to load",degradedRelationWarning:"Some relations are invalid. Readable skills have been restored.",downloadZip:"Download ZIP",optimize:"Optimize",closeSkillDetails:"Close Skill details",skillId:"Skill ID",allFiles:"All files",loadingSkillContent:"Loading Skill content…",noSkillContent:"This Skill has no SKILL.md content",addSkill:"Add Skill",localUpload:"Upload locally",localUploadDescription:"Select a ZIP file and upload it to the Skill space after validation",autoCreate:"Create automatically",autoCreateDescription:"Choose a model and style, then create a Skill through conversation",createSkill:"Create Skill",optimizeNamed:"Optimize {{name}}",deleteSkillConfirm:"Delete the entire Skill “{{name}}”? This affects every space that references it.",deleteSpaceConfirm:"Delete Skill space “{{name}}”? Make sure its Skills have been deleted first.",manageSpaceDescription:"Manage Skills in this space and create new versions",backToSpaces:"Back to Skill spaces",overview:"Overview",skillCount:"Skills",skillCountValue_one:"{{count}} Skill",skillCountValue_other:"{{count}} Skills",updatedAt:"Updated",skillsInSpace:"Skills in {{name}}",searchSkills:"Search Skills",cannotLoadSkills:"Unable to load Skills",noMatchingSkills:"No matching Skills",noSkills:"No Skills",tryAnotherName:"Try searching for another name",emptySkillsDescription:"Upload a Skill locally or create one automatically",actions:"Actions",spaceDetails:"Skill space details",editSpace:"Edit space",deleteSpace:"Delete space",searchSpaces:"Search Skill spaces",spaceList:"Skill space list",noMatchingSpaces:"No matching Skill spaces",createSpace:"Create Skill space",newSpace:"New space",loadingMoreSpaces:"Loading more Skill spaces",scrollForMore:"Scroll down to load more",allSpacesLoaded:"All Skill spaces loaded",errors:{loadSpaces:"Unable to load Skill spaces. Try again later.",loadSkills:"Unable to load Skills. Try again later.",loadSkillDetails:"Unable to load Skill details. Try again later.",deleteSkill:"Unable to delete the Skill",deleteSpace:"Unable to delete the Skill space",downloadSkill:"Unable to download the Skill"},status:{active:"Available",available:"Available",creating:"Creating",disabled:"Disabled",enabled:"Enabled",failed:"Error",inactive:"Inactive",pending:"Pending",published:"Published",ready:"Ready",released:"Published",running:"Running",success:"Healthy",unavailable:"Unavailable",unreleased:"Unreleased",updating:"Updating",unknown:"Unknown"},sharedSpace:"Enterprise shared space",sharedDescription:"Skills available to everyone, published and maintained by administrators",sharedVisibility:"Everyone",sharedPreparing:"Preparing shared space",sharedLoadFailed:"Shared space unavailable",sharedEmpty:"No shared skills yet. Skills published by administrators will appear here",requestPublication:"Request publication",reviewSubmitting:"Submitting…",reviewSubmitted:"Submitted",reviewFailed:"Could not submit the publication request",reviewStatusFailed:"Failed to load review status",reviewRetry:"Apply again",reviewPending:"Pending review",reviewApproving:"Publishing",reviewApproved:"Shared",reviewReturned:"Returned",reviewHistory:"Review history",skillDetailSections:"Skill detail sections",versions:{title:"Version management",refresh:"Refresh",uploading:"Uploading…",upload:"Upload new version",close:"Close",hint:"New versions become public after approval and do not replace published versions; the skill name in the ZIP must match the original",loading:"Loading versions…",loadFailed:"Unable to load versions",filesFailed:"Unable to load version files",uploadFailed:"Unable to upload the new version",submitFailed:"Unable to submit for review",retry:"Retry",empty:"No versions yet",current:"Current version",notSubmitted:"Not submitted",submitting:"Submitting…",submit:"Request publication",processing:"Version status: {{status}}",filesLoading:"Loading files…",filesEmpty:"No files",history:"Review history",shared:"Published"},author:"Author",authorName:"Author: {{name}}"},Mze={library:"Knowledge bases",createBase:"New knowledge base",editBase:"Edit knowledge base",invalidName:"The name must start with a letter and contain only letters, numbers, and underscores.",nameHelp:"Start with a letter. Use up to 48 letters, numbers, or underscores.",optionalDescription:"Description (optional)",descriptionOnly:"AgentKit currently supports updating only the knowledge base description.",previewWeb:"Preview web content",addData:"Add data",openOriginalWeb:"Open original page",backToEdit:"Back to edit",confirmAdd:"Confirm and add",source:"Knowledge source",image:"Image",documentFile:"Document file",webPage:"Web page",webUrl:"Web page URL",generatingWebPreview:"Fetching the page and generating a Markdown preview",selectFile:"Select knowledge file",selectOrDropFile:"Select a file or drag it here",selectedFile:"{{size}} · Click to select another file",imageFileHelp:"PNG, JPG, and JPEG up to 200 MB",documentFileHelp:"PDF, PPTX, DOCX, XLSX, and TXT up to 200 MB",uploadingFile:"Uploading the file and adding it to the knowledge base",optionalName:"Name (optional)",optionalType:"Type (optional)",generatePreview:"Generate preview",uploadFile:"Upload file",editMetadata:"Edit knowledge metadata",knowledge:"Knowledge item",field:"Field",value:"Value",backToList:"Back to knowledge bases",metadataJson:"Metadata (JSON)",provider:"Provider",knowledgeId:"Knowledge ID",project:"Project",creator:"Created by",data:"Data",deleteInvalidAssociation:"Delete invalid association",noData:"This knowledge base has no data",addFirstData:"Add the first data item",format:"Format",size:"Size",searchData:"Search data",searchLibraryData:"Search knowledge base data",associationInvalid:"Association invalid",providerMissing:"The underlying Provider knowledge base no longer exists",noMatchingData:"No matching data",loadingMoreData:"Loading more data",retryLoading:"Retry loading",details:"Knowledge base details",searchBases:"Search knowledge bases",someBasesFailed:"Some knowledge bases are temporarily unavailable. Other available content is shown.",noMatchingBases:"No matching knowledge bases",noManagePermission:"You do not have permission to manage this knowledge base",loadingMoreBases:"Loading more knowledge bases",deleteBaseTitle:"Delete knowledge base?",deleteBaseDescription:"This removes the AgentKit association for {{name}}. If Studio created it, the Provider resource is also deleted. This cannot be undone.",deleteDocumentTitle:"Delete knowledge item?",deleteDocumentDescription:"This removes {{name}} from the Provider knowledge base. This cannot be undone.",preview:{processingTitle:"Data is being processed",processingDetail:"A preview will be available after parsing. Reload later.",failedTitle:"Data parsing failed",failedDetail:"Check the source file or page URL and add it again, or reload the latest status.",noParsedTitle:"No parsed content is available yet",noParsedDetail:"Text, tables, or page images will appear after the knowledge base finishes parsing this file.",noMediaTitle:"No media preview is available yet",noMediaDetail:"The knowledge base has not returned an accessible media preview. Reload later.",noDataTitle:"No data is available to preview",noDataDetail:"The knowledge base has not returned parsed results. Reload later.",attachmentError:"The attachment cannot be previewed. Try again later.",imageAlt:"Knowledge data image",audioUnsupported:"This browser does not support audio previews.",videoUnsupported:"This browser does not support video previews.",namedPdf:"{{name}} PDF preview",pdf:"PDF preview",openPdf:"If it cannot be displayed, open the PDF in a new window",fileUnsupported:"This format cannot be previewed directly online. Parsed content is shown when available.",openOriginalFile:"Open original file",loading:"Loading data preview",openOriginalHint:"You can open the original page to view the source content.",chunk:"Chunk {{index}}",loadingMore:"Loading more",loadMore:"Load more"},errors:{fileTooLarge:"A file cannot exceed 200 MB",invalidImageType:"Select a PNG, JPG, or JPEG image",invalidDocumentType:"Select a PDF, PPTX, DOCX, XLSX, or TXT file",createBase:"Unable to create the knowledge base",updateBase:"Unable to update the knowledge base",metadataObject:"Metadata must be a JSON object",metadataFormat:"Invalid metadata format",noWebPreview:"The page has no Markdown content to preview",addWeb:"Unable to add the web page",previewWeb:"Unable to generate the web page preview",uploadFile:"Unable to upload the file",updateDocument:"Unable to update the knowledge item",loadPreview:"Unable to load the data preview",loadMoreBases:"Unable to load more knowledge bases",loadBases:"Unable to load knowledge bases",loadMoreData:"Unable to load more data",loadData:"Unable to load data",deleteBase:"Unable to delete the knowledge base",deleteDocument:"Unable to delete the knowledge item"}},Ize={title:"Feishu channel",refresh:"Refresh",loading:"Loading channel configuration…",unsupported:"This Runtime does not support channel management. Upgrade its MPA image.",unauthorized:"Channel management requires a Studio administrator and an authorized Runtime credential.",configurationError:"Channel management configuration is incomplete. Check the Runtime metadata and encryption key.",requestFailed:"Channel request failed. Check the Runtime connection and retry.",bound:"Bound: {{name}}",unbound:"No Feishu bot is bound.",guidance:"Private chats use separate conversations. In allowed groups, mention this bot to start a conversation.",keyRequired:"Configure a persistent CHANNEL_STATE_ENCRYPTION_KEY in the Runtime before binding.",gateway:"Message gateway",route:"Inbound route",delivery:"Reply delivery",configured:"Configured",missing:"Missing",delivery_not_observed:"Not observed",delivery_delivered:"Delivered",delivery_retrying:"Retrying",missingConfig:"Missing Runtime configuration: {{fields}}",bind:"Bind with QR code",newQr:"Generate a new QR code",unbind:"Unbind",confirmUnbind:"Disconnect this bot? It will stop receiving new messages.",qrAlt:"Bot authorization QR code",openQr:"Open authorization page",uncertain:"Registration was interrupted. Check the bot binding and Gateway before starting again.",bindingFailed:"Binding failed. Check Gateway configuration and retry.",chatId:"Allowed group ID",scope:"Group conversation scope",saveGroup:"Save group",noGroups:"No groups allowed yet. Private chats do not need this permission.",edit:"Edit",remove:"Remove",removeGroup:"Remove {{name}}",scope_group_sender:"Separate by sender",scope_group:"Shared by group",scope_group_topic_sender:"Separate by topic and sender",scope_group_topic:"Shared by topic",status_PENDING:"Waiting for scan",status_SCANNED:"Scanned; waiting for authorization",status_AUTHORIZED:"Authorized; preparing registration",status_REGISTERING:"Registering bot",status_BOUND:"Bot bound",status_FAILED:"Binding failed",status_EXPIRED:"QR code expired",workspaceTitle:"Message channels",workspaceDescription:"Connect messaging apps to this Agent and manage access.",provider_feishu:"Feishu",provider_wecom:"WeCom",provider_dingtalk:"DingTalk",comingSoon:"Not available yet",unavailableDescription:"Binding and message settings for {{name}} are not available yet.",runtimeRequired:"Deploy this Agent to a Runtime before configuring message channels.",bindingTitle:"Bot connection",connected:"Bound",notBound:"Not bound",gatewayDescription:"Gateway configuration for receiving channel messages.",routeDescription:"Routing configuration for delivering messages to this Agent.",deliveryDescription:"Observed reply delivery; configuration alone does not confirm delivery.",groupsTitle:"Group access",groupsDescription:"Allow specific groups and choose how conversations are shared.",providerBindingTitle:"Connect {{name}}",providerUnbound:"Connect a {{name}} bot to let users message this agent.",qrGuidance:"Authorize with {{name}}. The Runtime saves the bot credentials and configures the message gateway.",wecomGuidance:"Authorize with WeCom QR code, or enter a Bot ID and Secret to bind an existing bot.",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"Connect bot",wecomScan:"Bind with QR code",wecomAuthorizing:"Waiting for WeCom authorization…",cancelAuthorization:"Cancel authorization",wecomPopupBlocked:"Allow popups in your browser, then try authorizing again.",wecomAuthCancelled:"WeCom authorization was cancelled. You can scan again.",wecomAuthTimeout:"WeCom authorization timed out. Please scan again.",wecomInvalidResult:"Authorization did not return a Bot ID and Secret. Authorize again or enter them manually.",wecomAuthFailed:"WeCom authorization failed. Try again or enter credentials manually.",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"Upgrade this Runtime image to configure {{name}} manually. Quick setup is still available.",pairingTitle:"Message channel QR pairing",feishuPairingDescription:"If a bot is already connected, it will be replaced after successful Feishu authorization and binding. In the authorization flow, you can bind an existing bot or create a new one.",generatingQr:"Generating pairing QR code…",dingtalkGuidance:"Authorize with DingTalk QR code, or enter a Client ID and Client Secret to bind an existing bot.",wecomPairingDescription:"Pair again in the WeCom authorization window. The new bot replaces the current connection after binding succeeds. Cancelling authorization or a failed binding does not disconnect the existing bot.",configurationMethod:"Configuration method",quickSetup:"Quick setup",manualSetup:"Manual setup",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"Enter the credentials of an existing {{name}} bot to connect it to this agent.",manualReplacement:"Successful binding replaces the current bot. Cancelling or a failed binding does not disconnect the existing bot."},gdr=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:fze,agentSelector:Rze,agentWorkspace:gze,channels:Ize,cloudEnvironment:xze,common:hze,composer:_ze,default:{common:hze,agentKitPromo:fze,systemInfo:pze,agentWorkspace:gze,environmentCenter:mze,deploymentSelect:vze,deploymentError:yze,studioBuildProgress:bze,cloudEnvironment:xze,githubCicd:wze,feishuDeployment:Aze,deploymentResources:Sze,studioUpdate:Tze,projectPreview:Cze,workspace:kze,resourceCollection:Oze,skillSourcePicker:Eze,composer:_ze,agentSelector:Rze,myAgents:Dze,skillCenter:Lze,knowledge:Mze,channels:Ize},deploymentError:yze,deploymentResources:Sze,deploymentSelect:vze,environmentCenter:mze,feishuDeployment:Aze,githubCicd:wze,knowledge:Mze,myAgents:Dze,projectPreview:Cze,resourceCollection:Oze,skillCenter:Lze,skillSourcePicker:Eze,studioBuildProgress:bze,studioUpdate:Tze,systemInfo:pze,workspace:kze},Symbol.toStringTag,{value:"Module"})),Pze="User management",Nze="{{count}} members",Bze="User",$ze="Role",Fze="Account status",zze="Last sign-in",Uze="Actions",Vze="Change role",Gze="Close",Qze="Save role",Hze="Saving…",Wze="Cancel",Yze="Back",qze="User pool",jze="Volcengine Identity",Xze="Search name, email or user ID",Kze="Search",Zze="Filter by role",Jze="All roles",eUe="Refresh",tUe="Loading users…",rUe="Updated at {{time}}",nUe="{{name}} is now {{role}}",iUe="Retry",aUe="You",oUe="Initial super administrator",sUe="The initial super administrator cannot be demoted here",lUe="The new permissions apply when the user refreshes Studio",cUe="Role needs confirmation",uUe="No matching users",dUe="Try another search or role",hUe="Users appear here after signing in or joining this user pool",fUe="{{count}} users",pUe="Previous",gUe="Next",mUe="Not signed in yet",vUe="Not provided",yUe={super_admin:"Super administrator",admin:"Administrator",developer:"Developer",user:"User"},bUe={super_admin:"Manage all resources, users and role assignments",admin:"Manage Studio resources",developer:"Develop agents and manage your own resources",user:"Use agents and personal features"},xUe={EXTERNAL_PROVIDER:"Active",CONFIRMED:"Active",NORMAL:"Active",ENABLED:"Active",ACTIVE:"Active",UNCONFIRMED:"Unverified",DISABLED:"Disabled",FORBIDDEN:"Disabled",LOCKED:"Locked",SUSPENDED:"Suspended",FORCE_CHANGE_PASSWORD:"Password change required"},wUe={request_failed:"The request did not finish. Refresh the list to confirm its current state before retrying",invalid_response:"The user service returned an invalid response. Refresh and try again",identity_unavailable:"Identity is unavailable. Try again later or check service permissions",identity_resource_missing:"The user or user pool no longer exists. Refresh the list",super_administrator_required:"Only super administrators can manage users",sign_in_required:"Sign in and try again",user_not_in_pool:"Your account does not belong to this user pool",user_disabled:"Your account is disabled",protected_administrator:"The initial super administrator cannot be demoted",cannot_demote_self:"You cannot demote your own super administrator role",role_change_conflict:"The role has changed. Close this dialog and refresh the list before retrying",cross_origin_request:"Change roles from the current Studio page"},mdr=Object.freeze(Object.defineProperty({__proto__:null,actions:Uze,allRoles:Jze,back:Yze,cancel:Wze,changeRole:Vze,close:Gze,default:{title:Pze,memberCount:Nze,user:Bze,role:$ze,status:Fze,lastLogin:zze,actions:Uze,changeRole:Vze,close:Gze,save:Qze,saving:Hze,cancel:Wze,back:Yze,pool:qze,volcengineIdentity:jze,searchPlaceholder:Xze,search:Kze,filterRole:Zze,allRoles:Jze,refresh:eUe,loading:tUe,updatedAt:rUe,saved:nUe,retry:iUe,you:aUe,initialAdministrator:oUe,protectedExplanation:sUe,effectiveAfterRefresh:lUe,roleConflict:cUe,noUsers:uUe,tryAnotherSearch:dUe,poolEmpty:hUe,resultCount:fUe,previous:pUe,next:gUe,neverLoggedIn:mUe,unknown:vUe,roles:yUe,descriptions:bUe,states:xUe,errors:wUe},descriptions:bUe,effectiveAfterRefresh:lUe,errors:wUe,filterRole:Zze,initialAdministrator:oUe,lastLogin:zze,loading:tUe,memberCount:Nze,neverLoggedIn:mUe,next:gUe,noUsers:uUe,pool:qze,poolEmpty:hUe,previous:pUe,protectedExplanation:sUe,refresh:eUe,resultCount:fUe,retry:iUe,role:$ze,roleConflict:cUe,roles:yUe,save:Qze,saved:nUe,saving:Hze,search:Kze,searchPlaceholder:Xze,states:xUe,status:Fze,title:Pze,tryAnotherSearch:dUe,unknown:vUe,updatedAt:rUe,user:Bze,volcengineIdentity:jze,you:aUe},Symbol.toStringTag,{value:"Module"})),AUe="Website integration",SUe="Embed an AgentKit Runtime on your website as a floating chat window",TUe="Back to automations",CUe="Add website",kUe="Loading Runtime",OUe="Select Runtime",EUe="Website domain",_Ue="For example, xxxx.com or localhost:5173",RUe="Generating",DUe="Generate token",LUe="Added websites",MUe="{{count}} website",IUe="{{count}} websites",PUe="Loading website integrations",NUe="No website integrations yet",BUe="Select a Runtime and enter a website domain to generate a token",$Ue="Embed instructions",FUe="Place this code before the closing body tag on your website",zUe="Copied",UUe="Copy code",VUe="Embed code will appear here after you add a website.",GUe="Delete the website integration for {{domain}}?",QUe={load:"Failed to load website integrations",create:"Failed to create website integration",delete:"Failed to delete website integration",noConversationalAgent:"No conversational Agent was found in this Runtime"},HUe={requestFailed:"Request failed ({{status}})",greeting:"Hello. How can I help?",sessionFailed:"Could not start a chat session",unauthorized:"This website is not authorized to start a chat",conversationFailed:"The chat request failed. Try again shortly.",open:"Open Agent chat",close:"Close Agent chat",panelLabel:"Agent chat panel",assistant:"Agent assistant",online:"Online"},vdr=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:CUe,addedWebsites:LUe,backToAutomations:TUe,confirmDelete:GUe,copied:zUe,copyCode:UUe,default:{title:AUe,description:SUe,backToAutomations:TUe,addWebsite:CUe,loadingRuntime:kUe,selectRuntime:OUe,websiteDomain:EUe,domainPlaceholder:_Ue,generating:RUe,generateToken:DUe,addedWebsites:LUe,websiteCount_one:MUe,websiteCount_other:IUe,loadingIntegrations:PUe,delete:"Delete",emptyTitle:NUe,emptyDescription:BUe,embedMethod:$Ue,embedInstructions:FUe,copied:zUe,copyCode:UUe,embedHint:VUe,confirmDelete:GUe,errors:QUe,widget:HUe},description:SUe,domainPlaceholder:_Ue,embedHint:VUe,embedInstructions:FUe,embedMethod:$Ue,emptyDescription:BUe,emptyTitle:NUe,errors:QUe,generateToken:DUe,generating:RUe,loadingIntegrations:PUe,loadingRuntime:kUe,selectRuntime:OUe,title:AUe,websiteCount_one:MUe,websiteCount_other:IUe,websiteDomain:EUe,widget:HUe},Symbol.toStringTag,{value:"Module"})),WUe={types:{all:"All types",document:"Documents",image:"Images",video:"Videos"},previewArtifact:"Preview {{name}}",moreActions:"More actions for {{name}}",actionMenu:"Actions for {{name}}",download:"Download",downloading:"Downloading",edit:"Edit details",delete:"Delete artifact",previewFailed:"Could not preview “{{name}}”: {{message}}",downloadStarted:"Download started for {{name}}",downloadFailed:"Could not download “{{name}}”: {{message}}",updated:"Updated {{name}}",deleted:"Deleted {{name}}",deleteFailed:"Could not delete “{{name}}”: {{message}}",typeFilter:"Artifact type",searchAria:"Search artifacts",searchPlaceholder:"Search artifacts or sessions",retry:"Retry",close:"Close",listAria:"Artifact list",loadFailed:"Could not load artifacts",loadDetailFallback:"Check the storage configuration and try again.",reload:"Reload",noMatch:"No matching artifacts",noArtifacts:"You do not have any artifacts yet",searchHint:"Try another search or artifact type",emptyHint:"Artifacts created in chats will appear here automatically",columns:{name:"Name",source:"Source",updatedAt:"Modified",actions:"Actions"},loadingMore:"Loading more artifacts",unknownTime:"Unknown time",preview:{close:"Close preview",meta:"{{type}} / Version {{version}}",loading:"Loading preview",alt:"Preview of {{name}}",loadFailed:"The preview could not be loaded. Try again later or download the file.",unsupported:"This format cannot be previewed online. Download the file to view it.",sourceAria:"Artifact source",agent:"Agent",session:"Session",tool:"Generated by",createdAt:"Created",fileSize:"File size",tags:"Tags",viewSession:"View session"},deleteDialog:{title:"Delete artifact?",description:"“{{name}}” will be permanently removed from the artifact library. The chat history will not be affected.",deleting:"Deleting",confirm:"Delete",close:"Close delete confirmation"},api:{withStatus:"{{message}} ({{status}})",listFailed:"Could not load the artifact library",syncFailed:"Could not sync chat artifacts",updateFailed:"Could not update the artifact",deleteFailed:"Could not delete the artifact",downloadFailed:"Could not download the artifact"}},YUe={unknownSource:"Unknown source",unknownCreator:"Unknown creator"},qUe={nameRequired:"Enter an artifact name",tooManyTags:"You can add up to {{max}} tags",tagTooLong:"Each tag can contain up to {{max}} characters",title:"Edit artifact details",subtitle:"The content file will not be modified",close:"Close edit dialog",name:"Name",description:"Description",descriptionPlaceholder:"Add its purpose, version, or usage notes",tags:"Tags",tagsPlaceholder:"Separate tags with commas, up to {{max}}",cancel:"Cancel",saving:"Saving",save:"Save"},jUe={change:{added:"Added",modified:"Modified",deleted:"Deleted"},noChanges:"There are no source changes between these versions",chooseFile:"Select a file on the left to view its code",compareTitle:"Compare versions",workspaceTitle:"Source workspace",projectFallback:"Agent project",switchTheme:"Switch source theme",switchThemeTitle:"Switch to {{theme}} theme",themes:{dark:"dark",light:"light"},closeWorkspace:"Close source workspace",close:"Close",changedFiles:"Changed files",projectFiles:"Project files",changes:"Changes",files:"Files",openFiles:"Open files",noFileSelected:"No file selected",comparisonDirection:"Comparison direction",before:"Before optimization",after:"After optimization",loadingEditor:"Loading editor…",changedFileCount_one:"{{count}} file changed",changedFileCount_other:"{{count}} files changed",fileCount_one:"{{count}} file",fileCount_other:"{{count}} files",lineCount_one:"{{count}} line · UTF-8",lineCount_other:"{{count}} lines · UTF-8",viewSource:"View source",viewSourceAria:"View and edit project source"},XUe={nav:"Search",selectAgent:"Select an Agent",checkingCapabilities:"Checking Agent capabilities",notMounted:"This Agent does not have {{label}} mounted",sources:{session:"Sessions",web:"Web",knowledge:"Knowledge base",memory:"Long-term memory"},webDescription:"Search with the web_search tool",backendLocal:"Local",failed:"Search failed: {{message}}",placeholder:{selectAgent:"Select an Agent first",web:"Search the web",knowledge:"Search {{name}}",knowledgeFallback:"this Agent's knowledge base",memory:"Search {{name}}",memoryFallback:"this user's long-term memory",session:"Search this Agent's sessions"},sourceTypeAria:"Search source: {{label}}",notSelected:"Not selected",sourceType:"Search source",selectSource:"Select a search source",noAgentHint:"Select an Agent to search its sessions, the web, and mounted data sources.",loadingCapabilities:"Loading this Agent's search capabilities…",sourceUnavailable:"This Agent does not have this data source mounted",instructions:{web:"Enter keywords and press Enter or select the button to search with web_search.",knowledge:"Enter a question to search this Agent's knowledge base.",memory:"Enter a clue to search long-term memories saved across this user's sessions.",session:"Enter keywords and press Enter or select the button to search this Agent's sessions."},noResults:"No results found for “{{query}}”.",knowledgeFragment:"Knowledge excerpt {{index}}",memoryFragment:"Memory excerpt {{index}}"},KUe={title:"Developer Resources",sections:{documentation:{title:"Related links",description:"Open development documentation and common AgentKit destinations"},bestPractices:{title:"Best practices",description:"Learn from practical development, debugging, and deployment guidance"},showcases:{title:"Showcases",description:"Explore applications built with AgentKit"}},links:{veadkDocs:"VeADK documentation",cliDocs:"AgentKit CLI documentation",platformDocs:"AgentKit platform documentation",console:"AgentKit console"},articles:{veadkDevelopment:{title:"Develop and deploy an Agent with VeADK",description:"Build an Agent with VeADK and deploy it to AgentKit Runtime."},cliDevelopment:{title:"Develop and deploy an Agent with AgentKit CLI",description:"Create a project, debug an Agent, and deploy it with AgentKit CLI."},coverAlt:"Cover image for {{title}}"},showcases:{researchAssistant:{title:"Multi-agent research assistant",description:"Specialized Agents work together to research, analyze, and summarize findings."},multimodalAnalysis:{title:"Multimodal content analysis",description:"Understand images, documents, and video in a single session."},customerService:{title:"Customer service workspace",description:"Combine knowledge retrieval and tool calls to handle complex support requests."},webSearch:{title:"Web search Agent",description:"Search current web content and organize it into traceable answers."},a2uiApp:{title:"A2UI interactive app",description:"Let an Agent generate interactive interfaces as it works through a task."},previewAlt:"Interface preview for {{title}}"}},ZUe={title:"Library",untitledSession:"Untitled session",categoryAria:"Library categories",regionAria:"Region",tabs:{skills:"Skills",knowledge:"Knowledge",artifacts:"Artifacts"}},JUe={title:"Manage Agents",subtitle:"Agents in AgentKit Runtime that you can manage",mainAgentOnly:"Only the main Agent is shown (control-plane information).",deleteConfirm:'Delete Agent "{{name}}"? Its Runtime will be permanently deleted.',regionFilterTitle:"Filter by region",regionFilterAria:"Region filter",regionAria:"Region",refresh:"Refresh",loading:"Loading…",empty:"You have not deployed any Agents.",connected:"Connected",connect:"Connect to this Agent",deleteRuntime:"Delete this Runtime",loadingDetail:"Loading details…",agentStructure:"Agent structure",secretHidden:"Sensitive value is never shown. Copy it with an authorized request.",revealSecret:"Sensitive value for {{key}}",copySecret:"Copy the value of {{key}}",copy:"Copy",copied:"Copied",copyFailed:"Copy failed",notConfigured:"Not configured",fields:{model:"Model",description:"Description",status:"Status details",project:"Project",version:"Version",resources:"Resources",memory:"Memory",tool:"Tool",knowledge:"Knowledge",mcpToolset:"MCP Toolset",updatedAt:"Updated"},resource:{memory:"Memory {{value}} MB",instances:"Instances {{min}}-{{max}}",concurrency:"Concurrency {{value}}"},environmentVariables:"Environment variables",unnamed:"(Unnamed)"},eVe={mainAgent:"Main Agent",subAgent:"Sub-agent {{index}}",itemCount_one:"{{count}} item",itemCount_other:"{{count}} items",info:"Agent information",infoAndTopology:"Agent information and settings",loadingInfo:"Loading Agent information…",unnamedAgent:"Unnamed Agent",agentsMd:"AGENTS.md",tools:"Tools",toolList:"Tool list",studioTool:"Studio Tool",removeTool:"Remove tool {{name}}",remove:"Remove",notConfigured:"Not configured",addStudioTool:"Add Studio tools",addStudioToolHere:"Add Studio tools to this chat",skills:"Skills",skillList:"Skill list",addSkill:"Add Skill Space skills",addSkillHere:"Add Skill Space skills to this Session",skillMountNextTurn:"Mounted versions are frozen when the next Turn starts.",previewUnsupported:"Preview is not supported",sessionEnvironment:"Session environment",environment:"Environment",agentCanvas:"Agent canvas",topology:"Structure",nodeKinds:{agent:"Agent",sandbox:"Sandbox","worker-session":"Worker Session","skill-space":"Skill Space",skill:"Skill","studio-tool":"Studio Tool",mcp:"MCP",environment:"Environment",knowledge:"Knowledge","sub-agent":"Sub-agent"},nodeStatuses:{configured:"Configured",mounted:"Mounted",running:"Running",paused:"Paused"},viewCanvasFullscreen:"View Agent canvas in full screen",viewFullscreen:"View full screen",executionCanvas:"Agent execution canvas",fullscreenExecutionCanvas:"Full-screen Agent execution canvas",closeFullscreenCanvas:"Close full-screen canvas",close:"Close",capabilitiesSubtitle:"Capabilities and collaboration topology",closeInfo:"Close Agent information",infoUnavailable:"Agent information is temporarily unavailable.",refresh:"Refresh information",loadingSkills:"Loading bound skills…",sessionSkills:"Temporary session skills",noBoundSpace:"This agent has no bound Skill Space.",noBoundSkills:"The bound Skill Space has no skills.",loadFailed:"Could not load this information. Refresh to retry.",accessDenied:"You do not have permission to read this information.",documentUnsupported:"Upgrade the Runtime image to enable Studio to read AGENTS.md.",skillsUnsupported:"This Runtime does not provide Skill Space bindings.",skillsDegraded:"Skill information is incomplete. Refresh to retry.",documentEditHint:"Edit the latest version. Saving publishes a new version to this Skill Space and can affect other agents using it. Running sessions may need a cache refresh or a new session. Keep the frontmatter name unchanged.",documentLoading:"Loading SKILL.md…",documentWritable:"Editable",documentReadOnly:"Read only — this space or your permissions do not allow editing",documentLoadFailed:"Could not load SKILL.md. Refresh to retry.",documentSaveFailed:"Save was not confirmed. Your edits are preserved. Reopen to check the current version before retrying.",documentConflict:"A newer version exists. Copy your edits, then reopen the editor to avoid overwriting it.",discardDocument:"Discard unsaved changes?",keepEditing:"Keep editing",discardChanges:"Discard changes",saveDocument:"Save new version"},tVe={mountFailed:"Could not mount the environment",closeDialog:"Close environment dialog",addTitle:"Add environments",description:"Choose the Sandbox environments this Agent can use in the current session",closeAdd:"Close Add environments",searchAria:"Search environments",searchPlaceholder:"Search environment names or capabilities",availableAria:"Available environments and workspaces",loading:"Loading available environments…",noMatch:"No matching environments or workspaces",workspaces:"Workspaces",reuseAll:"Use every available environment in this workspace",availableEnvironmentCount_one:"{{count}} available environment",availableEnvironmentCount_other:"{{count}} available environments",selectWorkspace:"Select workspace {{name}}",environments:"Environments",includedByWorkspaces:"Included by workspace {{names}}",nameSeparator:", ",selectEnvironment:"Select environment {{name}}",selectedWorkspaceCount_one:"{{count}} workspace selected",selectedWorkspaceCount_other:"{{count}} workspaces selected",coveredEnvironmentCount_one:"{{count}} environment covered",coveredEnvironmentCount_other:"{{count}} environments covered",selectionSummary:"{{workspaces}}, {{environments}}",cancel:"Cancel",mounting:"Mounting…",confirm:"Add selected",mountedAria:"Mounted environments",environmentCount_one:"{{count}} environment",environmentCount_other:"{{count}} environments",removeWorkspace:"Remove workspace {{name}}",remove:"Remove",removeEnvironment:"Remove environment {{name}}",add:"Add environments",addMore:"Add more environments",addForSession:"Add environments to this session",loadingAvailable:"Loading available environments…",empty:"No AIO Sandbox environments are available."},rVe={loading:{searching:"Looking for an existing environment",creating:"Initializing environment",connecting:"Connecting to the environment"},initializationFailed:"AgentKit CLI environment initialization failed. Current status: {{status}}.",sessionExpired:"The AgentKit CLI session does not exist or has expired. Try again.",initializationTimeout:"AgentKit CLI environment initialization timed out. Try again later.",nonPersistent:"Non-persistent environment",recyclingHoursMinutes:"Environment reclaimed in {{hours}} hr {{minutes}} min",recyclingMinutes:"Environment reclaimed in {{minutes}} min",connectionError:`Could not connect to the Studio service because the server did not respond. Original error: {{message}}`,unavailable:"Connection unavailable",requestFailed:"AgentKit CLI request failed",retry:"Retry",terminalTitle:"AgentKit CLI terminal"},nVe={labels:{coding:"Coding",get_city_weather:"City weather",get_location_weather:"Location weather",web_fetch:"Fetch web content",studio_write_artifact:"Save session artifact"},closeDialog:"Close dialog",title:"Add Studio tools",description:"Studio BFF runs these tools for {{agentName}} in the current session. No Runtime installation is required.",close:"Close Add Studio tools",searchAria:"Search Studio tools",searchPlaceholder:"Search by name or tool ID",availableAria:"Available Studio tools",loading:"Loading Studio tools…",noMatch:"No matching Studio tools",remove:"Remove",add:"Add"},iVe={artifactLibrary:WUe,resourceMetadata:YUe,artifactEdit:qUe,codeBrowser:jUe,search:XUe,developerResources:KUe,library:ZUe,manageAgents:JUe,agentTopology:eVe,sessionEnvironment:tVe,agentKitCli:rVe,studioTools:nVe},ydr=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:rVe,agentTopology:eVe,artifactEdit:qUe,artifactLibrary:WUe,codeBrowser:jUe,default:iVe,developerResources:KUe,library:ZUe,manageAgents:JUe,resourceMetadata:YUe,search:XUe,sessionEnvironment:tVe,studioTools:nVe},Symbol.toStringTag,{value:"Module"})),aVe={requestFailed:"请求失败 ({{status}})",unknownError:"未知错误",contentTypeMissing:"Content-Type 缺失",response:"响应:{{response}}",fallbackWithDetail:"{{fallback}}:{{detail}}",fallbackWithHttpStatus:"{{fallback}}(HTTP {{status}})",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应({{contentType}})"},oVe={unconfigured:"管理员未配置 AgentKit Dev Sandbox,请配置后再使用",invalidSession:"AgentKit CLI 返回了无效的 Session。",loadCapabilitiesFailed:"无法读取 AgentKit CLI 配置。",invalidCapabilities:"AgentKit CLI 返回了无效的配置状态。",listSessionsFailed:"无法读取 AgentKit CLI Session。",invalidSessionList:"AgentKit CLI 返回了无效的 Session 列表。",createSessionFailed:"无法创建 AgentKit CLI Session。",openSessionFailed:"无法打开 AgentKit CLI Session。",openTerminalFailed:"无法打开 AgentKit CLI 终端。",invalidTerminalUrl:"AgentKit CLI 返回了无效的终端地址。"},sVe={cnBeijing:"华北 2(北京)",cnShanghai:"华东 2(上海)"},lVe={runtimeUnsupported:"该 Runtime 暂不支持连接,请确认服务已正常运行。"},cVe={autoConfigureFailed:"飞书机器人自动配置失败"},uVe={actionFailed:"{{action}}失败",detail:"详细信息:{{detail}}",request:"请求:{{request}}"},dVe={persistentMemoryHint:"提示:会话已不存在。使用 in-memory 或 SQLite 短期记忆时,多实例、进程重启或滚动发布都可能导致会话丢失;建议改用基于数据库的持久化短期记忆存储。",unsupportedRouteHint:"提示:该 Runtime 未提供会话能力运行接口,可能是 Runtime 版本与当前 Studio 不兼容。",toolArgumentHint:"提示:模型生成的工具参数格式不完整,请重新发送一次。",resourceCollectionExpiredHint:"提示:本次资源清单已失效,请重新发送任务;系统会重新收集资源后再创建 Agent。",networkConfigurationHint:"提示:请稍后重试,查看 Runtime、模型或网关日志。",modelQuotaHint:"提示:模型当前触发了 TPM/RPM 配额限制,请稍后重试或提高模型配额。",rawResponseLabel:"原始响应:",copySecretFailed:"复制敏感值失败"},hVe={httpStatus:"HTTP 状态码:{{status}}",errorCode:"错误码:{{code}}",cloudResponseBody:`云端响应正文: {{body}}`,loadFailedWithDetail:"读取实例日志失败:{{detail}}",invalidFormat:"读取实例日志失败:服务返回格式无效"},fVe={untitledSession:"未命名会话",webUnavailable:"网络搜索接口未就绪(后端未启用 /web/search)。",webFailed:"网络搜索失败:{{message}}",webNotMounted:"当前 Agent 未挂载 web_search 工具。",knowledgeNotMounted:"该 Agent 未挂载知识库。",memoryNotMounted:"该 Agent 未挂载长期记忆。",knowledge:"知识库",longTermMemory:"长期记忆"},pVe={listSpacesFailed:"读取 Skill 空间失败",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",deleteSpaceFailed:"删除 Skill 空间失败",uploadFailed:"上传 Skill 失败",validateFailed:"校验 Skill 失败",deleteFailed:"删除 Skill 失败",listFilesFailed:"读取 Skill 文件失败",downloadFailed:"下载 Skill 失败",sharedSpaceFailed:"共享空间加载失败",reservedSpaceName:"此名称由系统空间保留,请使用其他名称",reviewSpaceFailed:"待审核空间暂不可用",submitReviewFailed:"申请公开失败",listReviewsFailed:"加载审核申请失败",reviewFilesFailed:"加载提交文件失败",decideReviewFailed:"审批失败,请重试",listVersionsFailed:"无法加载技能版本",uploadVersionFailed:"上传技能新版本失败"},gVe={truncatedData:"{{data}}…(已截断,共 {{count}} 个字符)",incompleteEvent:"SSE 流在事件完整返回前已结束。原始数据:{{data}}",invalidEventJson:"无法解析 SSE 事件中的 JSON。原始数据:{{data}}"},mVe={loadConfigNetworkFailed:"无法加载登录配置,请检查网络后重试。",configServiceFailed:"登录配置服务异常(HTTP {{status}}),请稍后重试。",invalidConfigResponse:"登录配置服务返回了无法解析的响应,请稍后重试。",serviceNetworkFailed:"无法连接身份服务,请检查网络后重试。",invalidServiceResponse:"身份服务返回了无法解析的响应,请稍后重试。",serviceFailed:"身份服务异常(HTTP {{status}}),请稍后重试。"},vVe={invalidToken:"GitHub Token 无效或没有仓库写入权限",notFound:"仓库、分支或文件不存在,或 Token 无权访问",rejectedCommit:"GitHub 拒绝了提交,请检查分支和文件状态",requestFailed:"GitHub 请求失败(HTTP {{status}})",networkFailed:"连接 GitHub 失败,请检查网络后重试",invalidRepositoryFormat:"GitHub Repo 格式应为 owner/repository",insecureRepositoryUrl:"仅支持安全的 github.com 仓库地址",unsafeProjectPath:"Agent 项目目录必须是仓库内的安全相对路径",tokenRequired:"GitHub Token 不能为空",invalidBaseBranch:"目标分支格式不正确",invalidPublishBranch:"发布分支格式不正确",noFiles:"没有需要提交的文件",missingBaseSha:"目标分支缺少有效 Git SHA",fileAlreadyExists:"目标仓库中已存在 {{path}},未覆盖现有文件",pathNotUpdatable:"目标路径 {{path}} 不是可更新的文件",invalidPullRequest:"GitHub 未返回有效的 Pull Request"},yVe={loadCapabilitiesFailed:"加载视频模型能力失败",uploadAssetFailed:"上传{{fileName}}失败",enhancePromptFailed:"提示词优化失败",createTaskFailed:"创建视频生成任务失败",getTaskFailed:"查询视频生成任务失败",downloadFailed:"下载生成视频失败"},bVe={listFailed:"加载网站集成失败",createFailed:"创建网站集成失败",deleteFailed:"删除网站集成失败"},xVe={loadFailed:"读取知识库失败",htmlHidden:"[HTML 内容已隐藏]",redacted:"[已脱敏]",depthTruncated:"[内容过深,已截断]",circularReference:"[循环引用]",diagnosticsUnavailable:"[诊断信息无法显示]",statusCode:"状态码:{{status}}",errorCode:"错误码:{{code}}",requestId:"请求 ID:{{requestId}}",diagnostics:"诊断:{{diagnostics}}",detail:"详情:{{detail}}",signInRequired:"请先登录后再访问知识库",forbidden:"你没有权限操作这个知识库",notFound:"知识库或知识内容不存在",conflict:"知识库当前状态不允许执行此操作",requestFailed:"知识库请求失败 ({{status}})"},wVe={invalidName:"名称须为 1~128 个字符,不能包含控制字符、不可见格式字符或 < >。",renameProjectFailed:"修改项目名称失败",renameVersionFailed:"修改版本名称失败",invalidNameUpdateResponse:"名称更新响应与请求不一致,请刷新后重试。",invalidSourceSnapshot:"源码快照的响应格式无效。",invalidProjectList:"项目列表的响应格式无效。",invalidProjectVersion:"项目版本的响应格式无效。",loadProjectsFailed:"无法读取已保存项目",loadVersionsFailed:"无法读取项目版本",deleteVersionFailed:"删除项目版本失败",invalidDeleteVersionResponse:"删除项目版本的响应格式无效。",loadProjectSourceFailed:"无法读取项目源码",loadSnapshotFailed:"无法读取源码快照",restoreSnapshotFailed:"无法恢复当前源码快照",downloadSourceFailed:"下载源码失败",downloadNotZip:"源码下载响应不是 ZIP 文件。",downloadSizeMismatch:"源码压缩包大小与发布记录不一致,请重试。"},AVe={invalidFormat:"{{label}}格式错误。",validationSeparator:";",invalidAnalysisResult:"迁移分析结果格式错误。",invalidFrameworkCandidate:"框架候选格式错误。",invalidAnalysisEvidence:"分析证据格式错误。",invalidEntryCandidate:"入口候选格式错误。",invalidQuestion:"待确认问题格式错误。",invalidPendingInput:"分析问题无法读取",invalidTask:"迁移会话格式错误。",invalidAnalysisReference:"分析结果引用格式错误。",invalidSourcePersistence:"迁移源码保存状态格式错误。",invalidActivity:"迁移执行动态格式错误。",invalidActivityItem:"迁移执行动态项格式错误。",invalidActivityTool:"迁移执行工具项格式错误。",invalidActivityPlan:"迁移执行计划格式错误。",invalidActivityPlanItem:"迁移执行计划项格式错误。",invalidArtifact:"迁移产物格式错误。",invalidEnvironmentDefaults:"环境变量默认值格式错误。",invalidArtifactFile:"迁移产物文件格式错误。",invalidVerificationCheck:"迁移校验项格式错误。",requestValidationFailed:"请求参数校验失败:{{detail}}",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJsonResponse:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}})。请检查代理或网关配置。",loadCapabilitiesFailed:"读取迁移能力失败",invalidCapabilities:"迁移能力格式错误。",invalidModelCapabilities:"迁移模型能力格式错误。",loadTasksFailed:"读取迁移会话失败",invalidTaskList:"迁移会话列表格式错误。",createTaskFailed:"创建迁移会话失败",uploadProjectFailed:"上传迁移项目失败",loadActivityFailed:"读取迁移执行动态失败",loadEventsFailed:"订阅迁移进度流失败",invalidEventsResponse:"迁移进度流返回了非法数据帧。",reconnecting:"连接已断开,正在重新连接迁移进度流…",startFailed:"启动迁移失败",submitAnswersFailed:"提交分析补充信息失败",submitInputFailed:"提交分析回答失败",stopFailed:"终止迁移失败",deleteTaskFailed:"删除迁移会话失败",loadArtifactFailed:"读取迁移产物失败",loadArtifactFileFailed:"读取迁移产物文件失败",downloadArtifactFailed:"下载迁移产物失败",evaluation:{datasetSaveFailed:"保存评测用例失败",datasetLoadFailed:"读取评测用例失败",statusLoadFailed:"读取评测状态失败",resumeFailed:"继续评测失败",retryFailed:"重新评测失败",reportLoadFailed:"读取评测报告失败",reportDownloadFailed:"下载评测报告失败"},labels:{analysisResult:"迁移分析结果",recommendation:"迁移建议",boundary:"迁移边界",frameworkCandidate:"框架候选",analysisEvidence:"分析证据",recommendedFramework:"推荐框架",entryCandidate:"入口候选",entryFramework:"入口框架",includeScope:"迁移包含范围",excludeScope:"迁移排除范围",assumptions:"分析假设",question:"待确认问题",analysisWarnings:"迁移警告",task:"迁移会话",artifactStatus:"迁移产物状态",analysisReference:"分析结果引用",confirmation:"迁移确认",confirmedFramework:"确认框架",error:"迁移错误",sourcePersistence:"迁移源码保存状态",activity:"迁移执行动态",activityItem:"迁移执行动态项",activityTool:"迁移执行工具项",activityPlanItem:"迁移执行计划项",artifact:"迁移产物",cli:"CLI 信息",migration:"迁移信息",startup:"启动信息",environment:"环境变量信息",verification:"校验信息",report:"迁移报告",archive:"产物归档",environmentDefaults:"环境变量默认值",requiredEnvironment:"必需环境变量",optionalEnvironment:"可选环境变量",artifactFile:"迁移产物文件",verificationCheck:"迁移校验项",artifactWarnings:"迁移产物警告",errorResponse:"错误响应",errorDetail:"错误详情",capabilities:"迁移能力",framework:"迁移框架",modelCapabilities:"迁移模型能力",taskList:"迁移会话列表",evaluationAsset:"评测资产",evaluation:"评测状态",evaluationCapabilities:"评测能力",evaluationDimension:"评测维度",evaluationCase:"评测用例",evaluationCriteria:"评测标准",evaluationMessage:"评测对话",evaluationDataset:"评测数据集",evaluationDimensionResult:"评测维度结果",evaluationEvidence:"评测证据",evaluationReport:"评测报告",evaluationSummary:"评测汇总",evaluationCaseResult:"评测用例结果",evaluationOutput:"评测输出",evaluationLimitations:"评测限制",pendingInput:"分析提问",pendingQuestion:"分析问题项",pendingOption:"分析问题选项"}},SVe={status:{ready:"就绪",wakeable:"已休眠",creating:"创建中",starting:"启动中",pending:"等待中",running:"运行中",failed:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},developmentTimeout:"等待开发环境响应超时。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentDisconnected:"与开发环境的连接已中断。任务可能仍在运行,请稍后重新进入当前会话查看状态。",developmentFailed:"开发任务未能继续,开发环境已保留。请在当前会话重试。",invalidStudioResponse:"{{fallback}} Studio 服务响应异常,请刷新后重试。",invalidSession:"AgentKit 沙箱返回了无效的 Session 信息。",invalidSnapshot:"AgentKit 沙箱返回了无效的 Snapshot 信息。",invalidSettings:"Sandbox 返回了无效设置。",invalidThreadSnapshot:"Sandbox 返回了无效 Thread 快照。",emptyConversationResponse:"沙箱对话服务未返回内容。",invalidConversationResponse:"沙箱对话服务返回了无法解析的响应。",conversationFailed:"沙箱对话失败,请稍后重试。",emptyReply:"沙箱未返回有效回复,请重试。",missingSession:"缺少要操作的 AgentKit Session。",listCodexFailed:"无法读取 Codex 智能体,请稍后重试。",invalidSessionList:"AgentKit 沙箱返回了无效的 Session 列表。",invalidSnapshotList:"AgentKit 沙箱返回了无效的 Snapshot 列表。",startFailed:"无法启动 AgentKit 沙箱,请稍后重试。",listAgentFailed:"无法读取 {{kind}} 智能体,请稍后重试。",invalidKindSessionList:"AgentKit 返回了无效的 {{kind}} Session 列表。",invalidKindSnapshotList:"AgentKit 返回了无效的 {{kind}} Snapshot 列表。",createAgentFailed:"无法创建 {{kind}} 智能体,请稍后重试。",missingSessionToOpen:"缺少要打开的 AgentKit Session。",openAgentFailed:"无法打开 {{kind}} 智能体。",invalidAgentHomeUrl:"{{kind}} 智能体返回了无效的主页面地址。",missingSessionForTerminal:"缺少要打开 Terminal 的 AgentKit Session。",openTerminalFailed:"无法打开 {{kind}} Terminal。",deleteAgentFailed:"无法删除 {{kind}} 智能体。",missingSnapshot:"未找到要唤醒的智能体。",resumeSnapshotFailed:"无法唤醒智能体,请稍后重试。",deleteSnapshotFailed:"无法删除智能体,请稍后重试。",missingSessionToConnect:"缺少要连接的 AgentKit Session。",connectCodexFailed:"无法连接 Codex 智能体,请稍后重试。",sessionNotReady:"AgentKit Session 尚未就绪,当前状态:{{status}}。",invalidMessage:"内置智能体会话缺少有效的消息内容。",interruptFailed:"无法停止当前任务。",getStatusFailed:"无法读取 Codex 状态。",getEndpointFailed:"无法读取 Sandbox Endpoint。",invalidEndpoint:"Sandbox 返回了无效 Endpoint。",createHandoffPairingFailed:"无法生成 Codex 云端接力配对码。",invalidHandoffPairing:"Studio 返回了无效的 Codex 云端接力配对码。",getHandoffStatusFailed:"无法读取端云接力状态。",invalidHandoffStatus:"Studio 返回了无效的端云接力状态。",listModelsFailed:"无法读取 Codex 模型列表。",invalidModelList:"Sandbox 返回了无效模型列表。",setModelFailed:"无法切换 Codex 模型。",invalidModel:"Sandbox 返回了无效模型。",listSkillsFailed:"无法读取 Codex Skills。",invalidSkillList:"Sandbox 返回了无效 Skill 列表。",listThreadsFailed:"无法读取 Codex Thread 列表。",invalidThreadList:"Sandbox 返回了无效 Thread 列表。",createThreadFailed:"无法创建新的 Codex Thread。",missingThread:"缺少要读取的 Codex Thread。",readThreadFailed:"无法读取 Codex 历史消息。",resumeThreadFailed:"无法恢复 Codex Thread。",forkThreadFailed:"无法分叉 Codex Thread。",archiveThreadFailed:"无法归档 Codex Thread。",invalidArchiveResult:"Sandbox 返回了无效归档结果。",deleteThreadFailed:"无法删除 Codex Thread。",invalidDeleteResult:"Sandbox 返回了无效删除结果。",compactThreadFailed:"无法压缩 Codex Thread。",getSettingsFailed:"无法读取 Codex 权限与工作空间。",updatePermissionsFailed:"无法更新 Codex 权限。",updateWorkspaceFailed:"无法更新 Codex 工作空间。",invalidWorkingDirectory:"Sandbox 返回了无效工作目录。",listDirectoriesFailed:"无法读取 Sandbox 目录。",invalidDirectoryList:"Sandbox 返回了无效目录列表。",resolveApprovalFailed:"无法提交 Codex 审批决定。",uploadFileFailed:"无法上传文件到 Sandbox。",invalidUploadResult:"Sandbox 返回了无效上传结果。",disconnectCodexFailed:"无法断开 Codex 智能体连接。",deleteCodexFailed:"无法删除 Codex 智能体。",openSandboxTerminalFailed:"无法打开 Sandbox Terminal。",openSandboxBrowserFailed:"无法打开 Sandbox Browser。",toolLabel:"Sandbox 工具",invalidToolUrl:"{{label}} 返回了无效地址。",unsafeToolUrl:"{{label}} 返回了不安全的地址。"},TVe={invalidSandboxVersion:"沙箱版本响应格式无效",loadSandboxVersionsFailed:"查询沙箱版本失败",updateSandboxFailed:"更新 Sandbox 失败",invalidSandboxUpdate:"沙箱更新响应格式无效",errorWithDetailAndRawResponse:`{{context}} {{detail}} @@ -91,7 +91,7 @@ Original error: {{message}}`,unavailable:"Connection unavailable",requestFailed: Studio:{{studioUrl}} 配对码:{{pairingCode}}`,installPrompt:`请安装 AgentKit Studio Plugin。请直接执行以下安装命令,不要让我手动打开终端。 安装命令:{{command}}`,title:"接力到云端继续执行",description:"按顺序复制两段提示词,Codex 会通过插件将您的本地任务接力到云端",closeAria:"关闭本地迁移引导",installTitle:"安装插件",installDescription:"首次使用时,请选择一种安装方式。",copied:"已复制",copyInstallPrompt:"复制安装提示词",copyInstallCommand:"复制安装命令",installMethodAria:"插件安装方式",conversationInstall:"与 Codex 对话安装",terminalInstall:"从终端安装",taskTitle:"任务接力",taskDescription:"插件安装完成后复制,Codex 会迁移当前项目并继续执行任务。",copyHandoffPrompt:"复制接力提示词",generatingPairing:"正在生成新的配对码",pairingExpired:"配对码已过期",pairingRemaining:"配对码有效期剩余 {{countdown}}",refreshing:"刷新中",refreshPairing:"刷新配对码",pairingLoading:"正在生成配对码",pairingUnavailable:"配对码尚未生成。",statusAria:"端云接力状态",statusTitle:"接力状态",requestReceivedNamed:"已收到“{{name}}”的端云接力请求",requestReceivedCurrent:"已收到当前项目的端云接力请求",requestHelp:"复制接力提示词后,Codex 的请求会显示在这里。",entering:"正在进入",enterCodex:"进入 Codex",clipboardUnsupported:"当前浏览器不支持写入剪贴板。",steps:{request:"等待端侧请求",session:"创建云端 Session",restore:"恢复项目",continue:"发送续跑任务"},status:{issued:"等待请求",creating:"正在创建 Session",sessionCreated:"正在迁移项目",continuing:"正在启动云端任务",running:"云端执行中",completed:"接力完成",failed:"接力失败"}},ZWe={model:{description:"显示或切换当前对话模型",keywords:"模型 switch"},models:{description:"列出 app-server 可用模型",keywords:"模型列表 list"},skill:{description:"浏览并调用当前工作区可用的 Skill",keywords:"技能 workflow"},skills:{description:"浏览并调用当前工作区可用的 Skills",keywords:"技能列表 workflow list"},new:{description:"开始一个新对话",keywords:"新建 对话"},resume:{description:"打开历史会话或恢复指定 Thread",keywords:"历史 恢复 session"},fork:{description:"从当前上下文分叉一个新对话",keywords:"分叉 branch"},compact:{description:"压缩当前对话上下文",keywords:"压缩 上下文"},archive:{description:"归档当前对话并新建对话",keywords:"归档 关闭"},status:{description:"显示当前连接、Thread、模型与 Token 状态",keywords:"状态 连接 token"},clear:{description:"清空当前视图并开始新对话",keywords:"清空 重置"},help:{description:"显示 Sandbox 支持的快捷命令",keywords:"帮助 命令"},currentModel:"当前模型",availableModel:"可用模型",workspace:"工作空间",notSet:"未设置",modelLabel:"模型",statusLabel:"状态",running:"运行中",idle:"空闲",totalTokens:"累计 Token",contextWindow:"上下文窗口",imageFallback:"图片",unknown:"未知快捷命令:{{command}}。输入 /help 查看可用命令。",automaticSkills:"智能开发模式会自动使用开发能力,无需手动选择 Skill。",activity:{new:"已新建 Codex 对话",resumed:"已恢复 Codex 对话",deleted:"已删除 Codex 历史会话",modelChanged:"已切换 Codex 模型",availableModels:"Codex 可用模型",noModels:"当前没有可用模型",forked:"已分叉 Codex 对话",compacting:"已开始压缩当前 Codex 对话",archived:"已归档 Codex 对话",status:"Codex 当前状态",help:"Sandbox 支持的 Codex 快捷命令"}},JWe={label:"智能构建任务",queued:"构建任务已排队",running:"构建任务正在后台运行",recovering:"正在恢复构建任务",waiting_user:"构建任务需要继续处理",stopping:"正在停止构建任务",succeeded:"构建任务已完成",cancelled:"构建任务已停止",failed:"构建任务未完成",open:"返回任务",hide:"隐藏任务通知",reconnecting:"正在重新连接任务服务,已有任务继续保留。"},Ldr=Object.freeze(Object.defineProperty({__proto__:null,agentDetails:jWe,agentWorkspace:XWe,approval:HWe,commands:ZWe,common:zWe,composer:WWe,default:{common:zWe,tool:UWe,threads:VWe,permissions:GWe,workspace:QWe,approval:HWe,composer:WWe,launch:YWe,session:qWe,agentDetails:jWe,agentWorkspace:XWe,handoff:KWe,commands:ZWe,taskNotice:JWe},handoff:KWe,launch:YWe,permissions:GWe,session:qWe,taskNotice:JWe,threads:VWe,tool:UWe,workspace:QWe},Symbol.toStringTag,{value:"Module"})),eYe={retry:"重试",signInToContinue:"登录以继续使用",signInWith:"使用 {{provider}} 登录",enterUsername:"输入一个用户名即可开始",usernamePlaceholder:"用户名(字母 + 数字,最多 16 位)",enter:"进入",usernameInvalid:"只能包含大小写字母和数字,最多 16 位。",identityProvider:{volcengine:"火山引擎 Identity",byteplus:"BytePlus Identity"},powered:{volcengine:"火山引擎 AgentKit 提供企业级 Agent 解决方案",byteplus:"BytePlus AgentKit 提供企业级 Agent 解决方案"},legalPrefix:"继续即表示你已阅读并同意 AgentKit",terms:"产品和服务条款",copyright:"© {{year}} VeADK。保留所有权利。"},tYe={title:"登录状态已过期",description:"当前编辑内容会保留。重新登录后,刚才的操作将自动继续。",waiting:"等待登录完成…",signInAgain:"重新登录"},rYe={breadcrumbs:"面包屑",selectAgent:"选择 Agent",switchAgent:"切换智能体"},nYe={cancel:"取消",close:"关闭确认框"},Mdr=Object.freeze(Object.defineProperty({__proto__:null,authExpired:tYe,confirm:nYe,default:{login:eYe,authExpired:tYe,navbar:rYe,confirm:nYe},login:eYe,navbar:rYe},Symbol.toStringTag,{value:"Module"})),iYe={defaultUser:"用户",shortcuts:"快捷入口",tryCli:"体验 AgentKit CLI",developerResources:"开发者资源",systemInfo:"系统信息",language:"语言",issueFeedback:"问题反馈",logout:"退出登录",roles:{admin:"管理员",developer:"开发者",user:"普通用户",super_admin:"超级管理员"}},aYe={home:"返回首页",expand:"展开侧边栏",collapse:"收起侧边栏",label:"主导航",newChat:"新会话",agents:"智能体",workspaces:"工作区",library:"资源库",cronjobs:"定时任务",automations:"自动化",users:"用户管理",administration:"管控",reviewCenter:"审核中心"},oYe={title:"历史会话",newConversation:"新会话",create:"新建会话",loading:"正在加载历史会话…",empty:"暂无会话",current:"当前",manage:"管理历史会话:{{title}}",more:"更多",delete:"删除",loadingMore:"加载中…",loadMore:"加载更多",evaluatingTitle:"正在自动评测",evaluating:"评测中",generating:"正在生成"},Idr=Object.freeze(Object.defineProperty({__proto__:null,account:iYe,default:{account:iYe,navigation:aYe,history:oYe},history:oYe,navigation:aYe},Symbol.toStringTag,{value:"Module"})),sYe={placeholder:"请选择",collapseOptions:"收起模型选项",expandOptions:"展开模型选项",noOptions:"暂无可用选项",noMatches:"没有匹配项,可直接使用当前模型 ID"},lYe={unsupportedActivity:"不支持的 Skill 对话活动",ariaLabel:"Skill 生成对话"},cYe={code:"错误码:{{code}}",type:"错误类型:{{type}}",representation:"异常表示:{{value}}",rawResponse:`服务端原始响应: -{{value}}`,original:"原始错误:{{message}}",details:"详细信息"},uYe={ariaLabel:"Skill 文件树",viewSource:"查看源码",viewPreview:"查看预览",download:"下载",binaryFile:"二进制文件",bytes:"{{value}} 字节",binaryDescription:"当前接口仅返回文件元数据,可单独下载原文件。",metadata:"Skill 元数据",noFiles:"暂无文件"},dYe={close:"关闭",name:"名称",region:"地域",optionalDescription:"描述(可选)",cancel:"取消",create:"创建",creating:"创建中…",save:"保存",saving:"保存中…",upload:"上传",uploading:"上传中…",createSpaceTitle:"新建 Skill 空间",editSpaceTitle:"编辑 Skill 空间",uploadTitle:"上传到 {{name}}",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",archiveValidationFailed:"Skill ZIP 格式校验失败",uploadFailed:"上传 Skill 失败",dropzone:"拖拽 Skill ZIP 到这里",chooseLocalFile:"或点击选择本地文件",archiveHelp:"ZIP 根目录需要包含 SKILL.md,也可以只包含一层包装目录。选择后仅检查格式,不会自动上传。",validating:"正在检查文件格式…",validationPassed:"格式检查通过:{{name}},共 {{count}} 个文件"},hYe={styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先",custom:"自定义",customFallback:"自定义风格"},stages:{preparing:"正在准备 Dev Sandbox",ready:"Skill 已生成并通过格式校验",failed:"生成失败",cancelled:"已停止",validating:"正在校验 Skill 格式",packaging:"正在整理文件",generating:"正在生成 Skill",repairingAgain:"正在再次修复",autoRepairing:"正在自动修复({{attempt}}/{{max}})"},validation:{fallback:"Skill 格式校验未通过",repairInstruction:"只修复下面列出的 Skill 格式错误,不要改变原有用途和内容范围。",recheckInstruction:"修复后重新检查目录结构、SKILL.md frontmatter 和所有文本文件。",nameTooLong:"Skill 名称不能超过 64 个字符",invalidName:"Skill 名称只能包含小写字母、数字和连字符",modelTooLong:"模型 ID 不能超过 128 个字符",invalidModel:"模型 ID 只能包含字母、数字、点、下划线、连字符、斜杠和冒号"},errors:{loadCapability:"读取 Dev Sandbox 配置失败",autoRepair:"自动修复格式错误失败",pollCandidate:"读取候选方案状态失败,正在重试",createCandidate:"创建候选方案失败",refine:"继续调整失败",repairAgain:"再次修复格式错误失败",selectSpace:"请选择上传的 Skill Space",unsupportedRegion:"当前 Skill 地域不受支持",upload:"上传 Skill 失败",download:"下载失败"},sessionMax:"Session 最长保留 1 小时",remaining:"剩余 {{minutes}}:{{seconds}}",unnamedSpace:"未命名 Skill Space",leaveConfirmation:"离开后将停止并释放正在运行的 Dev Sandbox,确定离开吗?",createTitle:"创建技能",optimizeTitle:"优化 {{name}}",skillFallback:"技能",back:"返回技能空间",home:"主页技能生成",basicInfo:"基本信息",goal:"目标",createIntentPlaceholder:"描述希望这个 Skill 完成什么任务",optimizeIntentPlaceholder:"描述希望如何优化当前 Skill",skillName:"Skill 名称",autoNamePlaceholder:"留空时自动生成",nameHelp:"仅支持小写字母、数字和连字符;留空时自动生成。",createPlans:"生成方案",optimizePlans:"优化方案",createPlansDescription:"按不同方案并行生成多个技能,您可以选择最佳结果",optimizePlansDescription:"按不同方案并行优化当前技能,您可以选择最佳结果",plan:"方案 {{count}}",remove:"移除",model:"模型",modelPlaceholder:"选择或输入模型 ID",style:"风格",customStyle:"自定义风格",customStylePlaceholder:"描述表达方式、严谨程度或输出偏好",addConfiguration:"添加配置",notConfigured:"管理员未配置",generate:"生成",candidates:"候选方案",progress:"进度",retryCandidate:"重试此方案",formatValidationFailed:"格式校验未通过",repairAgain:"再次修复",files:"文件",downloadZip:"下载 ZIP",loadingFiles:"正在读取文件…",filesPending:"生成过程中会在这里显示完整文件树",uploadToSpace:"上传到 Skill Space",loadingSpaces:"正在加载 Skill Space",selectSpace:"选择 Skill Space",continuePlaceholder:"继续调整这个候选方案",continue:"继续调整",uploading:"上传中…",overwrite:"覆盖原 Skill",uploadToSelectedSpace:"上传到 Skill Space",uploadToCurrentSpace:"上传到当前空间",allCandidatesFailed:"所有方案均创建失败,可分别重试。"},fYe={invalidFormat:"{{label}}格式错误。",recoveryStatus:"Skill 恢复点状态",errorResponse:"错误响应",errorDetails:"错误详情",missingContentType:"Content-Type 缺失",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}}),请检查代理或网关配置。",activity:"Skill 会话活动",invalidActivity:"Skill 会话活动格式错误。",invalidToolActivity:"Skill 工具活动格式错误。",invalidTextActivity:"Skill 文本活动格式错误。",publication:"Skill 发布结果",task:"Skill 会话",file:"Skill 文件",unknownTaskState:"Skill 会话状态无法识别。",capability:"Skill 工作台能力",loadCapability:"读取 Skill 工作台能力失败",prepareTask:"准备 Skill 会话失败",taskReference:"Skill 会话引用",startOptimization:"开始优化 Skill 失败",startTask:"开始 Skill 会话失败",taskSummary:"Skill 会话摘要",taskList:"Skill 会话列表",loadTaskList:"读取 Skill 会话列表失败",invalidTaskList:"Skill 会话列表格式错误。",loadTask:"读取 Skill 会话失败",artifact:"Skill 产物",artifactFile:"Skill 产物文件",loadArtifact:"读取 Skill 产物失败",refine:"继续调整 Skill 失败",stop:"停止当前 Skill 任务失败",publish:"发布 Skill 失败",nonNdjson:"发布 Skill 失败:服务端返回了非 NDJSON 响应。",missingStream:"发布 Skill 失败:服务端没有返回进度流。",publishProgress:"发布进度",invalidPublishProgress:"发布进度格式错误。",publishError:"发布错误",unknownPublishEvent:"未知的发布进度事件。",publishResult:"发布结果",streamEnded:"发布进度流提前结束,无法确认发布结果。请刷新技能中心确认状态。",deleteTask:"删除 Skill 会话失败",download:"下载 Skill 失败"},Pdr=Object.freeze(Object.defineProperty({__proto__:null,api:fYe,configSelect:sYe,conversation:lYe,default:{configSelect:sYe,conversation:lYe,errorDetails:cYe,fileTree:uYe,management:dYe,generation:hYe,api:fYe},errorDetails:cYe,fileTree:uYe,generation:hYe,management:dYe},Symbol.toStringTag,{value:"Module"})),pYe={back:"返回上一页",reload:"重新加载",notConfigured:"未配置",name:"名称",description:"描述",delete:"删除",save:"保存",saving:"保存中",add:"添加",manage:"管理",environment:"环境",noDescription:"暂无描述",refresh:"刷新",close:"关闭",retry:"重试",loading:"加载中…",previousPage:"上一页",nextPage:"下一页",edit:"编辑",all:"全部",search:"搜索",cancel:"取消",view:"查看",viewDetails:"查看详情",deleting:"删除中…",create:"创建",creating:"创建中",adding:"添加中",generating:"生成中",uploading:"上传中",preview:"预览",loadFailed:"加载失败",select:"选择",collapse:"收起",expand:"展开",none:"无"},gYe={ariaLabel:"AgentKit 快速入口",closeAriaLabel:"关闭 AgentKit 欢迎卡片",title:"欢迎使用 AgentKit",description:"通过 AgentKit 平台快速构建与托管您的企业级智能体",docsAriaLabel:"打开 AgentKit 文档,在新窗口打开",docs:"文档",consoleAriaLabel:"打开 AgentKit 控制台,在新窗口打开",console:"控制台"},mYe={checkUpdates:"检查更新",checkingVersions:"正在检查版本…",versionCheckError:"查询沙箱版本失败,请检查凭据、区域及接口权限后重试",sandboxUpdateError:"Sandbox 更新失败,请刷新检查实际状态后重试",modelEnvRepairUnavailable:"无法补齐模型环境变量,请检查 CODEX_API_KEY 和 CODEX_BASE_URL",updateSandbox:"更新{{variant}}{{name}}",updatingSandbox:"更新中",title:"系统信息",description:"查看当前 Studio 版本及关联的基础资源",general:"通用",currentVersion:"当前版本",storage:"存储",loadingStorage:"正在加载存储信息",tosAddress:"TOS 地址",openTosConsole:"在云控制台中打开 TOS 存储桶",environmentBuild:"环境构建",loadingEnvironmentResources:"正在加载环境构建资源",environmentResourcesError:"环境构建资源加载失败,请检查云凭据后重试。",codePipelineWorkspace:"CodePipeline 工作空间",codePipelinePipeline:"CodePipeline 流水线",openCodePipelineWorkspace:"在云控制台中打开 CodePipeline Workspace",createdOnFirstBuild:"首次构建时自动创建",containerRegistryRepository:"Container Registry 仓库",openContainerRegistryRepository:"在云控制台中打开 Container Registry 仓库",sandboxInfo:"沙箱信息",loadingSandboxInfo:"正在加载沙箱信息",sandboxInfoError:"沙箱信息加载失败,请重试。",snapshot:"快照版",snapshotWithSpace:"快照版 ",openToolConsole:"在云控制台中打开{{name}}",updateModelEnv:"更新{{variant}}{{name}}模型环境变量",modelEnvUpdated:"已更新",modelEnvAlreadyCurrent:"无需更新",userPool:"用户池",loadingUserPool:"正在加载用户池",userPoolError:"用户池加载失败,请重试。",modelEnvUpdateError:"模型环境变量更新失败,请重试。",openUserPoolConsole:"在云控制台中打开用户池{{name}}",unnamedUserPool:"未命名用户池",id:"ID",domain:"域名",region:"区域",noLocalUserPool:"本地模式未配置用户池",noUserPool:"当前 Studio 未配置用户池"},vYe={workspace:"Agent 工作区",library:"Agent 库",evaluation:"评测",agentList:"Agent 列表",agentDetails:"Agent 详情",newAgent:"新建 Agent",loading:"加载中…",loadingCloudAgents:"正在加载云端 Agent…",noAgentSelected:"请选择一个 Agent",local:"本地",remote:"云端",localAgent:"本地 Agent",remoteAgent:"云端 Agent",agentCount:"{{count}} 个 Agent",agentCountLabel:"Agent 数量",details:"详情",chat:"对话",update:"更新",backToAgentList:"返回 Agent 列表",loadingAgent:"正在加载 Agent",loadingAgentDescription:"正在读取 Agent 配置和 Runtime 信息。",loadingAgentInfo:"正在加载 Agent 信息…",detailLoadFailed:"无法加载 Agent 详情",detailLoadFailedDescription:"请检查 Runtime 状态后重试。",partialInfoUnavailable:"部分信息暂时不可用",upgradeRuntimeForDetails:"请升级 Runtime 以查看完整 Agent 信息。",basicInfo:"基本信息",usageOverview:"使用概览",sections:{basic:"基本信息",profileConfig:"Profile 配置",sessionConfig:"会话配置",usage:"使用概览",diagnostics:"诊断",evaluations:"评测",optimizations:"优化建议",integrations:"集成",versions:"版本",channels:"消息渠道"},evaluationGroup:"评测组",optimizations:"优化建议",optimizationsDescription:"根据评测结果查看可执行的优化建议。",integrations:"集成",githubVersions:"GitHub 版本",githubVersionsDescription:"查看持续交付产生的版本并创建回退 PR。",currentVersionOnly:"当前未启用 GitHub 持续交付,仅展示当前生产版本。",loadingVersions:"正在加载版本…",noVersion:"暂无版本记录",prLink:"Pull Request",viewPr:"查看 PR",author:"提交人",publishStatus:"发布状态",viewRelease:"查看发布记录",rollbackToVersion:"回退到此版本",rollingBack:"正在创建回退…",rollbackEvent:"回退事件",sourceMergedRuntimeStill:"最新源码已合并,但 Runtime 仍处于",currentProductionVersionHint:";当前生产版本保持不变。",usageSummary:"使用统计",totalCalls:"总调用次数",userCount:"用户数",userDetails:"用户明细",usageUserList:"Agent 使用用户列表",user:"用户",callCount:"调用次数",lastUsed:"最近使用",unknownUser:"未知用户",loadingUsage:"正在加载使用数据…",refreshing:"刷新中…",noUsage:"暂无使用记录",usageUnavailable:"当前 Agent 暂无可用的使用统计。",usagePagination:"使用记录分页",pageOf:"第 {{page}} / {{total}} 页",notProvided:"暂未提供",integrationMethods:"集成方式",integrationDescription:"通过 Runtime API 或 A2A 协议集成当前 Agent。",integrationProtocol:"集成协议",runtimeStatus:"Runtime 状态",executionFlow:"执行流程",probingIntegration:"正在检测集成能力",probingIntegrationDescription:"正在读取可用端点和鉴权配置。",configurationStatus:"配置状态",discoveryEndpoint:"发现端点",invocationEndpoint:"调用端点",invocationUrl:"调用地址",authentication:"鉴权方式",networkAccess:"网络访问",notAvailable:"暂无",noAuthentication:"无需鉴权",noApiKeyRequired:"无需 API Key",usesOauthJwt:"使用 OAuth / JWT",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",pythonExample:"Python 示例",deploymentConfig:"部署配置",deploymentConfigDescription:"确认实例和运行配置后更新 Runtime。",deploymentRegion:"部署区域",mpaControlPlane:"MPA 控制面",loadingMpaAgentView:"正在读取 MPA Runtime 绑定…",mpaRuntimeBound:"该 MPA Agent 已绑定唯一 Runtime,可继续管理。",mpaRuntimeMissing:"当前 Agent 没有可见的 MPA Runtime 绑定。",mpaRuntimeBindingAmbiguous:"多个 MPA Runtime 匹配当前 Agent,请先修复绑定后再修改。",mpaRuntimeOrphan:"Runtime 存在,但其中没有当前 MPA Profile。",mpaRuntimeLegacyAuthUnsupported:"该 Runtime 使用旧版 MPA 镜像,仍要求 X-Jwt-Token。请先更新到当前 AgentKit 兼容镜像,再管理 Profile 或 Session 配置。",profileConfig:"Profile 配置",profileConfigTitle:"Profile 配置",profileConfigDescription:"查看并应用 Agent 级 MPA Profile。Profile 是 Runtime 的长期默认配置,新会话默认继承它。",profileStatus:"Profile 状态",profileApplied:"已应用",profileNotApplied:"未应用",profileNotAppliedDescription:"当前 Runtime 可运行,但尚未保存为 Studio 可管理的 Profile。应用后会生成 Profile revision。",applyProfile:"应用 Profile",reapplyProfile:"重新应用 Profile",editProfile:"编辑 Profile",profileApplying:"应用中…",profileAppliedNotice:"Profile 已应用,当前 revision 为 {{revision}}。",profileApplyIncomplete:"Profile 应用未完成,请查看当前操作状态后重试。",profileApplyFailed:"Profile 应用失败。",profilePrompt:"系统提示词",profileResources:"资源配置",profileResourceSummary:"{{tools}} 个工具 · {{skills}} 个 Skill · {{mcp}} 个 MCP 服务",sessionConfigTitle:"会话配置",sessionConfigDescription:"查看和调整当前 MPA Session 的执行配置。变更只对下一轮对话生效。",loadingSessionConfig:"正在加载会话配置…",sessionConfigNoAgent:"请选择一个 MPA Agent 后再管理会话配置。",sessionConfigNonMpa:"会话配置仅适用于 MPA Agent。",sessionConfigNoSession:"请先打开这个 MPA Agent 的对话,再修改会话配置。",sessionConfigDifferentRuntime:"请先切回这个 MPA Agent 的当前对话,再修改会话配置。",sessionConfigSaved:"会话配置已更新,下一轮对话将使用新 revision。",sessionConfigStale:"该 Session 已被其他位置修改,已展示最新配置,请确认后再保存。",sessionConfigRevision:"配置 revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"最新 Profile revision",sessionProfileUpgradeAvailable:"检测到新的 Profile revision:v{{current}} → v{{target}}。",upgradeSessionProfile:"升级 Session Profile",sessionProfileUpgrading:"升级中…",sessionProfileUpgraded:"Session Profile 已升级,下一轮对话将使用新 revision。",sessionProfileUpgradeFailed:"Session Profile 升级失败。",sessionModelOverride:"模型覆盖",modelId:"模型 ID",inheritProfileDefault:"继承 Profile 默认值",sessionMcpServers:"MCP 服务",mcpServerCount:"已选择 {{count}} 个",clearSessionMcp:"清空 MCP 服务",mpaDiagnosticsTitle:"Runtime 诊断",mpaDiagnosticsDescription:"查看最近的 Runtime Console 运行记录,以及 Agent、Profile、Turn、task 和 worker 关联。",loadingMpaDiagnostics:"正在加载 Runtime 诊断…",noMpaDiagnostics:"当前 Session 暂无 Runtime 诊断运行记录。",latestRun:"最近运行",traceCorrelation:"Trace 关联",traceCorrelationDescription:"Runtime Console 为本次 invocation 返回的稳定标识。",traceSteps:"Trace 步骤",traceStepsDescription:"当前 invocation 最近的有界 Runtime Console 步骤。",mpaInstanceId:"MPA 实例",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker 类型",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile 版本",step:"步骤",stepCount:"步骤数",duration:"耗时",noTraceSteps:"本次 invocation 暂无 trace 步骤。",executionConfigMode:{replace:"Session 覆盖",clear:"本 Session 已清空",inherit:"使用 Profile 默认值"},concurrency:"并发数",selectedOptimizations:"已选优化项",selectedOptimizationsDescription:"这些优化会应用到本次更新。",optimizationProfile:"优化方案",updatePending:"等待更新",updatingDeployment:"正在更新部署",restoringUpdateConfig:"正在恢复更新配置…",updateConfigUnavailable:"无法读取更新配置",legacyConfigMissing:"旧版本 Runtime 缺少可恢复的配置,请重新创建。",deploymentFailed:"部署失败",continueEditing:"继续编辑",loadingOptimizations:"正在加载优化建议…",noOptimizations:"暂无优化建议",fixPriority:"优先级",suggestedModule:"建议模块",suggestionAndReason:"建议与原因",priority:{high:"高",medium:"中",low:"低"},modules:{agentStructure:"Agent 结构",prompt:"提示词",tool:"工具",knowledge:"知识库",memory:"记忆",workflow:"工作流",other:"其他"},evaluationGroupList:"评测组列表",newEvaluationGroup:"新建评测组",newEvaluationGroupName:"新评测组 {{count}}",searchEvaluationGroups:"搜索评测组",noMatchingEvaluationGroups:"没有匹配的评测组",noEvaluationGroupSelected:"请选择一个评测组",groupStats:"{{agents}} 个 Agent · {{runs}} 次运行",evaluationGroupDetails:"评测组详情",evaluationGroupStats:"{{agents}} 个 Agent · {{caseSet}} · {{runs}} 次运行",startEvaluation:"开始评测",evaluationConfig:"评测配置",historyResults:"历史结果",participatingAgents:"参与 Agent",selectedCount:"已选择 {{count}} 个",evaluationResources:"评测资源",evaluationSet:"评测集",evaluator:"评估器",caseCount:"{{count}} 条案例",evaluationMetrics:"评测指标",selectedMetricCount:"已选择 {{count}} 项",historyDescription:"查看每次评测的分数和运行状态。",noHistory:"暂无评测历史",noHistoryDescription:"运行一次评测后,结果会显示在这里。",evaluationRun:"第 {{index}} 次评测",evaluationRunMeta:"{{time}} · {{agents}} 个 Agent",overallScore:"综合分",completed:"已完成",evaluationDefaults:{coreRegression:"核心能力回归",safetyCheck:"安全与幻觉检查",coreSet:"核心回归集",safetySet:"安全边界集",toolSet:"工具调用集",qualityEvaluator:"综合质量评估器",factualEvaluator:"事实一致性评估器",toolEvaluator:"工具调用评估器",responseQuality:"回答质量",factualAccuracy:"事实准确性",toolUse:"工具调用",responseEfficiency:"响应效率",todayTime:"今天 10:32",yesterdayTime:"昨天 16:08",julyTime:"7 月 25 日 14:20",justNow:"刚刚"},defaultCases:{agentName:"示例 Agent",goodSetName:"示例正向案例集",badSetName:"示例负向案例集",weeklyFeedback:{input:"总结本周客户反馈,并按优先级归类。",output:"覆盖主要问题,给出清晰的优先级与下一步动作。",tag:"总结",reason:"任务完整覆盖了用户目标,输出结构清晰,并给出了可执行的下一步动作。"},research:{input:"查询最新公开资料并附上来源。",output:"调用搜索工具,结论与引用一一对应。",tag:"工具调用"},uncertainConclusion:{input:"在信息不足时直接给出确定结论。",output:"应明确说明未知,并主动询问缺失信息。",tag:"幻觉",reason:"信息不足时仍给出了确定结论,缺少必要的澄清步骤与不确定性说明。"},repeatedTool:{input:"连续重复调用相同工具获取同一结果。",output:"复用已有结果,避免无意义的重复调用。",tag:"效率"}},goodCases:"正向案例",badCases:"负向案例",goodCase:"正向案例",badCase:"负向案例",reference:"参考答案",caseResultFilter:"案例结果筛选",feedbackSourceFilter:"反馈来源筛选",searchCases:"搜索案例",searchCasesPlaceholder:"搜索输入、输出或标签",selectCases:"选择案例",selectAll:"全选",selectAllVisible:"选择当前可见案例",selectedCaseCount:"已选择 {{count}} 条",deleteSelected:"删除所选",deleteSelectedTitle:"删除所选 Agent",deleteSelectionDescription:"确定删除所选的 {{count}} 个项目吗?此操作无法撤销。",deleteCasesConfirm:"删除所选案例",deleteOneCaseConfirm:"删除这个案例",deleteFeedbackCase:"删除反馈案例",noFeedbackCases:"暂无反馈案例",noMatchingCases:"没有匹配的案例",loadingEvaluationSet:"正在加载评测集…",userInput:"用户输入",agentOutput:"Agent 输出",score:"得分",scoreReason:"评分原因",noUserInput:"暂无用户输入",noVisibleResponse:"暂无可见回复",note:"备注:",manualFeedback:"人工反馈",automaticFeedback:"自动反馈",scoreValue:"{{score}} 分",unknownTime:"时间未知",deleteAgentTitle:"删除 Agent",deleteAgentDescription:"确定删除 Agent“{{name}}”吗?",deleteDraftDescription:"确定删除草稿“{{name}}”吗?",deleteAgent:"删除 Agent",closeDeleteConfirmation:"关闭删除确认",mpaDeletePreviewSummary:"Studio 会先删除可见的空闲 MPA Runtime 会话,再删除 AgentKit Runtime。运行中的任务需要先结束或停止后才能删除。",mpaDeletePreviewSessions:"会话",mpaDeletePreviewActiveSessions:"运行中",mpaDeletePreviewIdleSessions:"空闲",mpaDeleteBlocked:"当前无法删除",mpaDeleteBlockerActiveOperation:"仍有 MPA 创建或更新操作在执行。",mpaDeleteBlockerActiveSessions:"Runtime 中仍有运行中的会话。",mpaDeleteBlockerBindingAmbiguous:"当前 Agent 匹配到多个 MPA Runtime。",mpaDeleteBlockerRuntimeMissing:"当前 MPA Agent 没有可见的 Runtime 绑定。",mpaDeleteBlockerOrphanRuntime:"Runtime 可见,但其中缺少当前 MPA Profile。",mpaDeleteStage:{runtime_sessions:"删除 {{count}} 个可见空闲 Runtime 会话",runtime_diagnostics:"清理这些会话关联的诊断数据和挂载元信息",agentkit_runtime:"删除 AgentKit Runtime"},draftDeletionWarning:"草稿将从当前浏览器中删除。",runtimeDeletionWarning:"Runtime 和相关云端资源将被删除。",noneSelected:"尚未选择",none:"无",notPublished:"未发布",notRecorded:"未记录",noTime:"暂无时间",noPr:"暂无 PR",comingSoon:"评测能力即将开放",preparing:"准备中",cancelled:"已取消",failed:"失败",totalCount:"共 {{count}} 条",deploymentProgress:"部署进度",returnToEdit:"返回编辑",retryOperation:"重试操作",buildLog:"构建日志",githubMountLog:"GitHub 挂载日志",githubDeliveryMountLog:"GitHub 持续交付挂载日志",waitingBuildLog:"正在等待构建日志…",waitingGithubMountLog:"正在等待 GitHub 挂载日志…",copy:"复制",copied:"已复制",copyLabel:"复制{{label}}",copiedLabel:"已复制{{label}}",logLines:"{{count}} 行",logStatus:{synced:"已同步",failed:"读取失败",syncing:"同步中",earlyOmitted:"已省略早期日志",recentOnly:"仅显示最近的构建日志",partiallyOmitted:"已省略部分日志"},deployStatus:{running:"正在部署",unconfirmed:"部署状态待确认",success:"部署完成",error:"部署失败",cancelled:"部署已取消"},deploymentSteps:{prepare:{label:"准备部署",description:"校验配置并创建部署任务"},build:{label:"构建镜像",description:"生成运行环境与智能体代码"},deploy:{label:"部署服务",description:"创建并启动 AgentKit Runtime"},publish:{label:"发布服务",description:"等待服务就绪并生成访问地址"},complete:{label:"部署完成",description:"智能体已可以正常使用"},evaluation:{label:"创建评测集",description:"自动创建 Good Case 和 Bad Case 评测集"},profileApplying:{label:"应用 MPA 配置",description:"将 Studio Agent 配置写入 MPA Runtime"},smokeRunning:{label:"验证 MPA Runtime",description:"在标记可运行前执行 Runtime 就绪验证"},runnable:{label:"MPA Runtime 可运行",description:"Runtime 已接受配置并通过执行就绪验证"},github:{label:"挂载 GitHub 持续交付",description:"初始化目标分支与 GitHub Actions workflow"},update:{label:"更新实例配置",description:"将 Runtime 实例数调整为 {{min}}~{{max}}"}},githubStatus:{published:"已发布",publishing:"发布中",failed:"发布失败",pending:"等待发布",unknown:"未知"},errors:{agentInfoMissing:"Agent 信息不可用",checkUpdateCapability:"无法检查更新能力",checkingUpdateConfig:"正在检查更新配置",cloudOnlyUpdate:"仅云端 Agent 支持更新",deleteDeployedUnsupported:"当前不支持删除已部署 Agent",deleteDraftUnsupported:"当前不支持删除草稿",loadMpaDeletePreview:"无法加载 MPA 删除预览",loadAgentInfo:"无法加载 Agent 信息",loadApiKey:"无法读取 API Key",loadGithubVersions:"无法加载 GitHub 版本",loadEvaluations:"无法加载评测案例",loadMpaAgentView:"无法加载 MPA Agent 状态",loadMpaDiagnostics:"无法加载 Runtime 诊断",loadOptimizations:"无法加载优化建议",loadRuntimeDetails:"无法加载 Runtime 详情",loadSessionConfig:"无法加载会话配置",loadUsage:"无法加载使用数据",noCreatePermission:"当前账号没有创建 Agent 的权限",noManagePermission:"当前账号没有管理此 Agent 的权限",originalConfigUnavailable:"原始配置不可用",probeIntegration:"无法检测集成能力",rollbackVersion:"无法创建版本回退",runtimeRegionMissing:"Runtime 区域信息缺失",updateCapabilityMismatch:"Runtime 更新能力与当前配置不匹配",updateCapabilityPending:"Runtime 更新能力仍在确认中",updateConfigRestoring:"正在恢复更新配置",updateUnsupported:"当前 Runtime 不支持更新",usageMismatch:"返回的使用数据与当前 Agent 不匹配"}},yYe={title:"环境",loadFailed:"环境加载失败,请检查存储配置后重试。",storageUnavailable:"管理员未配置持久化存储,环境管理暂不可用。",create:"新建环境",configure:"配置环境",details:"环境详情",editorDescription:"配置运行环境,或接入代码仓库和已有镜像",backToList:"返回环境列表",save:"保存环境",createAndBuild:"创建并构建",saveAndBuild:"保存并构建",name:"环境名称",namePlaceholder:"Python 数据处理",descriptionPlaceholder:"说明这个环境适合处理的任务",creationMethod:"创建方式",baseConfiguration:"基础配置",baseEnvironment:"基础环境",operatingSystem:"操作系统",pythonVersion:"Python 版本",fixedByBase:"由 {{base}} 固定为 {{value}}",selectUbuntuVersion:"选择基础镜像的 Ubuntu 版本",selectPythonVersion:"选择需要安装的 Python 版本",skills:"技能",addSkill:"添加环境技能",veadkDescription:"Agent 开发与运行框架",customDockerfile:"自定义 Dockerfile",presetEnvironment:"预制环境",presetHint:"选择“无”可自行填写 Dockerfile 第一行的基础镜像。",dockerfileSize:"{{size}} / {{max}} 字节",upload:"上传",reset:"重置",dockerfileBaseImage:"Dockerfile 基础镜像",dockerfileContent:"Dockerfile 内容",region:"区域",search:"搜索环境",manualImport:"手动导入",noMatches:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称",startBuild:"开始构建",build:"构建",unnamed:"未命名环境",listSeparator:"、",clipboardReadError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",creation:{custom:{label:"自定义配置",description:"通过表单选择基础环境、Python、工具和技能"},dockerfile:{label:"自定义 Dockerfile",description:"上传或直接编辑 Dockerfile"},git:{label:"从代码仓库构建",description:"探查公开仓库并通过 CodePipeline 构建"},image:{label:"使用已有镜像",description:"绑定由外部流水线交付的 CR 镜像"}},baseDescriptions:{"aio-sandbox":"内置 Sandbox Shell 能力 · Ubuntu 22.04","codex-sandbox":"内置 Codex CLI、浏览器与代码执行环境",ubuntu:"标准 Linux 基础镜像"},dockerfileValidation:{baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"},presets:{none:"自行填写 Dockerfile 基础镜像",aio:"内置 Sandbox Shell 与常用运行时",codex:"内置 Codex CLI、浏览器与代码执行环境"},categories:{tools:"工具",productivity:"效率",browser:"浏览器自动化",system:"系统与媒体"},options:{"lark-cli":"飞书开放平台命令行工具",pandoc:"文档格式转换工具",opencli:"将网站与桌面应用转换为命令行工具",uv:"快速 Python 包与项目管理器",ripgrep:"高性能文本检索工具",jq:"JSON 查询与转换工具","github-cli":"在终端中管理 GitHub 工作流",playwright:"浏览器自动化与端到端测试",chromium:"无头浏览器运行时",git:"代码版本管理",curl:"网络请求与文件下载",ffmpeg:"音视频转码与处理",imagemagick:"图片转换与批处理"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",hoursMinutes:"{{hours}} 小时 {{minutes}} 分"},buildStatus:{preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"构建失败",notBuilt:"未构建"},manifest:{title:"环境 Manifest",closeLabel:"关闭环境 Manifest",loading:"正在加载 Manifest",editorLabel:"环境 Manifest YAML",copyFailed:"复制失败,请重试",copied:"已复制",copy:"复制 Manifest",view:"查看环境 Manifest",viewShort:"查看 Manifest",unavailable:"尚无可用 Manifest"},buildDetails:{title:"构建详情",closeLabel:"关闭构建详情",currentStep:"当前步骤",waiting:"等待构建信息",elapsed:"已用时",sourceCommit:"源码提交",openCodePipeline:"在 CodePipeline 中查看",starting:"正在启动",rebuild:"重新构建"},git:{sectionLabel:"公开代码仓库",address:"Git 地址",ref:"Branch、Tag 或 Commit",defaultBranch:"默认分支",inspecting:"正在拉取仓库并查找 Dockerfile",foundDockerfiles:"已在提交 {{commit}} 中找到 {{count}} 个 Dockerfile。",savedDockerfileLoaded:"已载入保存的 Dockerfile,可重新探查仓库更新。",noDockerfile:"仓库中未找到 Dockerfile,请检查分支或仓库内容。",inspectAgain:"重新探查",selectDockerfile:"选择 Dockerfile"},repository:{outputSection:"构建输出",type:"镜像仓库类型",managed:"Studio 默认镜像仓库",existing:"已有镜像仓库",managedHint:"构建时自动创建或复用当前区域的 Studio 镜像仓库。"},existingImage:{sectionLabel:"已有镜像",reference:"Tag 或 Digest",placeholder:"latest 或 sha256:...",hint:"填写镜像 Tag,或以 sha256: 开头的完整 Digest。"},share:{action:"分享",title:"分享环境",closeLabel:"关闭分享环境",generating:"正在生成并复制分享码",copied:"分享码已复制",failed:"分享失败",code:"分享码",fullCode:"完整环境分享码",copiedHint:"分享码已自动复制,也可在这里查看或手动复制。",copyFailedHint:"自动复制失败,可手动复制上方分享码,或重试。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅发送给可信对象。",copyAgain:"再次复制"},import:{title:"导入环境",closeLabel:"关闭导入环境",description:"先检测分享码中的环境,再确认添加到当前账号。",code:"环境分享码",tooMany:"最多可一次导入 {{max}} 个环境,当前检测到 {{count}} 个分享码。",multipleHint:"多个分享码可使用英文逗号、中文逗号或换行分隔,重复项会自动忽略。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅导入可信来源的分享码。",inspectingCodes:"正在检测环境分享码",found:"检测到 {{count}} 个环境:{{names}}。",itemError:"第 {{index}} 个分享码:{{error}}",invalidCode:"分享码无效。",noResult:"服务未返回该分享码的导入结果。",partial:"已导入 {{created}} 个环境,{{remaining}} 个未完成,可重试有效失败项。",inspecting:"正在检测",importing:"正在导入",retryImport:"重试导入",confirm:"确认导入",inspectCodes:"检测分享码"},status:{boundImage:"环境“{{name}}”已绑定已有镜像",queued:"环境“{{name}}”已进入构建队列",savedBuildFailed:"环境已保存,但构建未启动:{{error}}",importedFailed:"已导入 {{created}} 个环境,{{failed}} 个失败",importedDuplicate:"已导入 {{created}} 个环境,{{duplicate}} 个分享码已存在",imported:"已导入 {{count}} 个环境",deleted:"已删除环境“{{name}}”"},deleteTitle:"删除环境",deleteDescription:"确定删除环境“{{name}}”吗?删除后无法恢复。",errors:{repositoryRequired:"请输入公开代码仓库地址。",repositoryHttps:"请输入公开仓库的 HTTPS 地址。",repositoryInvalid:"请输入有效的公开仓库 HTTPS 地址。",imageReferenceWhitespace:"Tag 或 Digest 不能包含空格。",imageDigestInvalid:"Digest 必须是完整的 sha256 值。",imageTagOnly:"这里只填写 Tag,不要重复填写镜像仓库路径。"}},bYe={searchPlaceholder:"搜索资源名称",emptyMessage:"暂无可用选项",searchAriaLabel:"搜索{{label}}",loadingMore:"正在加载更多资源…"},xYe={retryDeployment:"重试部署",retrying:"正在重试…",collapse:"收起错误信息",expand:"展开完整错误信息",copy:"复制完整错误信息"},wYe={steps:"构建步骤",log:"构建日志",syncing:"同步中",loadFailed:"读取失败",synced:"已同步",recentOnly:" · 仅显示最近日志",copiedLog:"已复制构建日志",copyLog:"复制构建日志",copied:"已复制",copy:"复制",logContent:"构建日志内容",waiting:"正在等待 CodePipeline 输出日志…",empty:"暂无构建日志"},AYe={defaultLabel:"Studio 默认环境",defaultDescription:"使用 Studio 预置的标准运行环境",status:{notBuilt:"未构建",preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"失败"},label:"运行环境",placeholder:"请选择运行环境",search:"搜索运行环境",loading:"正在加载运行环境…",loadFailed:"加载运行环境失败",noMatches:"未找到匹配的运行环境",unavailable:"当前没有可用的运行环境",selectionUnavailable:"所选运行环境当前不可用,请重新选择。",selectionHint:"选择构建完成的运行环境后,部署将使用其镜像和工具配置。",versionChanged:"所选环境版本已更新,请确认后继续。",versionMissing:"所选环境版本已不存在,请重新选择。",operatingSystem:"操作系统",language:"语言",image:"镜像",imageVersion:"镜像版本",skills:"技能",tools:"工具",noSkills:"未配置 Skill",noExtraTools:"未配置额外工具",defaultGuidance:"默认环境由 Studio 管理,无需额外配置。",persistenceFallback:"持久化环境服务暂不可用,当前使用默认环境。",emptyFallback:"当前没有可选择的自定义环境。"},SYe={repository:"GitHub 仓库",githubUrl:"GitHub 地址",token:"访问令牌",sessionToken:"{{provider}} 临时令牌",runtime:"Runtime",commit:"提交",workflow:"工作流",syncFailed:"同步 GitHub 代码失败",status:{mounted:"已挂载",bound:"已绑定",synced:"已同步",created:"已创建"},volcengine:"火山引擎",mountDelivery:"挂载持续交付",selectedForDeployment:"已选择,部署时挂载",mountOnDeploy:"部署时挂载持续交付",syncCode:"同步代码",deliveryMode:"GitHub 交付模式",sourceSync:"GitHub 代码同步",delivery:"GitHub 交付",loading:"读取中",running:"执行中",runtimeDeliveryHint:"写入 AgentKit Runtime GitHub Actions workflow,后续 GitHub 提交会更新绑定 Runtime。",initialDeliveryHint:"首次部署成功后初始化目标分支,后续 GitHub 提交会更新绑定 Runtime。",sourceSyncHint:"Studio 会直接 push 到目标分支;该分支由 Studio 管理,远端冲突时同步会失败。Runtime 仍由部署按钮发布。",tokenPlaceholder:"repo 或 contents write 权限",getToken:"获取 Token",hideToken:"隐藏 Token",showToken:"显示 Token",tokenHelp:"Token 仅用于本次操作,成功后不会保留在表单中。",targetBranch:"目标分支",actionsSecretPlaceholder:"用于写入 GitHub Actions Secret",sessionTokenPlaceholder:"临时凭证可选",syncing:"同步中…",pendingHint:"已选择挂载持续交付。点击部署后,Studio 会等待 Runtime 创建完成并初始化 GitHub 目标分支,初始化成功后才完成部署流程。",result:{deliveryMounted:"已挂载持续交付",deliverySelected:"已选择挂载持续交付",githubBound:"已绑定 GitHub",codeSynced:"代码已同步",deliveryHint:"目标分支提交会触发 Runtime 持续交付。",boundHint:"更新并发布时会先同步当前源码到这个分支。"},branch:"分支",viewPr:"查看 PR",createFailed:"创建失败",phase:"阶段",log:"日志"},TYe={name:"飞书",enabling:"正在启用并更新配置…",description:"接收消息并通过飞书机器人回复",configuration:"飞书配置",configurationMode:"飞书配置方式",automatic:"自动配置",manual:"手动配置",cancelling:"取消中…",scanToCreate:"扫码创建",scanDescription:"授权后自动回填凭据",generateQrCode:"生成二维码",qrCodeAlt:"飞书机器人配置二维码",scanToConfirm:"飞书扫码确认",expiresIn:"{{time}} 后失效",created:"机器人已创建",credentialsFilled:"应用凭据已自动回填",qrCodeExpired:"二维码已失效",automaticFailed:"自动配置失败",regenerateQrCode:"请重新生成二维码。",configuredPlaceholder:"已配置,留空沿用",appSecretPlaceholder:"请输入 App Secret",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret"},CYe={mode:{auto:"自动创建",autoDescription:"部署时自动创建所需资源",recommended:"推荐",create:"指定名称",createDescription:"使用指定名称创建或复用资源",existing:"选择已有",existingDescription:"从当前账号的已有资源中选择"},selectExisting:"请选择已有资源",searchResource:"搜索资源名称",noMatch:"未找到匹配资源",noAvailable:"暂无可用资源",searching:"正在搜索云资源…",loading:"正在加载云资源…",noMatchSentence:"未找到匹配资源。",noAvailableSentence:"暂无可用资源。",loadedSummary:"实际服务区域:{{region}} · 已加载 {{loaded}}{{total}}",registryInstance:"Registry 实例",registryAriaLabel:"镜像仓库 Registry 实例",namespace:"命名空间",namespaceAriaLabel:"镜像仓库 Namespace",repository:"镜像仓库",existingRepository:"已有镜像仓库",selectRegistryFirst:"请先选择 Registry 实例。",selectNamespaceFirst:"请先选择 Namespace。",configurationMode:"配置方式",configurationModeAriaLabel:"{{resource}}配置方式",selectConfigurationMode:"请选择配置方式",automaticNames:"自动创建名称",validation:{tos:"请填写或选择 TOS 存储桶。",cr:"请完整填写或选择 CR 实例、命名空间和镜像仓库。",codePipeline:"请完整填写或选择 CodePipeline Workspace 和 Pipeline。",existingCodePipeline:"请选择已有的 CodePipeline Workspace 和兼容 Pipeline。"},autoBucketWithRegion:"agentkit-platform-{账号 ID}-{{region}}",autoBucket:"agentkit-platform-{账号 ID}",tosBucket:"TOS 存储桶",bucketName:"存储桶名称",bucketNamePlaceholder:"输入存储桶名称",existingBucket:"已有存储桶",existingTosBucket:"已有 TOS 存储桶",bucket:"存储桶",accountIdResolved:"账号 ID 在部署时按当前云账号解析。",containerRegistry:"容器镜像仓库(CR)",instanceName:"实例名称",crInstance:"CR 实例",existingCrInstance:"已有 CR 实例",existingCrNamespace:"已有 CR 命名空间",existingCrRepository:"已有 CR 镜像仓库",autoRegistry:"agentkit-platform-{账号 ID}",autoRepositoryName:"{{name}}-{4 位随机字符}",registryNameNote:"账号 ID 在部署时解析,镜像仓库的随机字符在部署时生成。",workspace:"工作空间",pipeline:"流水线",workspaceName:"Workspace 名称",pipelineName:"Pipeline 名称",existingWorkspace:"已有 CodePipeline Workspace",compatiblePipeline:"兼容 Pipeline",existingPipeline:"已有 AgentKit CodePipeline",pipelineNameNote:"Pipeline 与 Runtime 名称一致。"},kYe={commit:"提交",steps:{permissions:"预检 OTA 所需权限",resolving:"读取目标版本信息",downloading:"下载并校验完整更新包",preparing:"准备 VeFaaS Function 代码",provisioning:"检查并补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布新 Revision 并重启服务"},stages:{permissions:"预检 OTA 权限",resolving:"读取版本信息",downloading:"下载更新包",preparing:"准备 Function 代码",provisioning:"补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布 Revision",checking:"检查更新",unknown:"未知阶段"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},logPermissionPrefix:"无法读取 VeFaaS 发布日志。Function 角色缺少 ",logPermissionSuffix:" 权限,更新会继续。",openIamConsole:"前往 IAM 控制台配置权限",deploymentProgress:"部署进度",live:"实时",completed:"已完成",stopped:"已停止",copied:"已复制",copyFailed:"复制失败",copyLog:"复制日志",waitingForLogs:"等待 VeFaaS 返回更新日志…",noLogs:"本次更新未返回发布日志",messages:{updated:"Studio 已更新,新 Revision 已接管服务",failed:"Studio 更新失败",timeout:"等待 VeFaaS 发布超时,请稍后重新检查版本",submitted:"更新已提交,正在等待 VeFaaS 发布新版本",connectionSwitched:"连接已切换,正在确认新版本状态"},checkingPermissions:"正在检查 OTA 权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",updated:"Studio 已更新",updateToVersion:"更新 Studio 至 {{version}}",checkPermissions:"检查更新权限",authorizationNeeded:"需要授权",updatingShort:"正在更新",refreshForNewVersion:"刷新使用新版",updateFailed:"更新失败",updateNow:"立即更新",newVersionAvailable:"有新版更新",dialog:{failed:"Studio 更新失败",checkingPermissions:"正在检查更新权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",completed:"Studio 更新完成",newVersion:"发现新版本"},permissionCheck:"正在核对 OTA 与定时任务所需的全部 IAM 权限…",permissionCheckHint:"权限全部满足后才会开始下载、更新或发布云资源。",missingPermissionCount:"当前 Function 角色缺少 {{count}} 项 OTA 更新权限,尚未执行任何云资源变更。",functionRole:"Function 角色",currentRole:"当前运行角色",policyToUpdate:"将更新策略",authorizationSteps:{open:"打开授权页面,确认已预填的策略名称和完整策略内容。",debug:"点击页面中的“发起调试”,完成策略更新。",return:"返回此窗口,点击“我已授权,重新检查”。"},missingPermissions:"缺少的权限",openPrefilledAuthorization:"打开已预填的 IAM 授权页面",openIamManually:"前往 IAM 控制台手动配置",noSafePolicy:"当前角色没有唯一可安全更新的自定义策略,请由管理员将上述权限加入该角色。",failedStage:"失败阶段",errorId:"错误 ID",notGenerated:"未生成",openFunctionLogs:"前往 VeFaaS 控制台查看 Function 日志",targetVersion:"目标版本",updateStatus:"更新状态",elapsed:"已用时",progressAriaLabel:"Studio 更新进度",processingUpdate:"正在处理更新",processing:"正在处理",backgroundHint:"发布阶段会短暂中断连接;关闭此窗口不会停止更新,可随时点击右上角按钮重新查看。",confirmDescription:"更新会重启 Studio 服务,预计约 3–5 分钟完成更新与发布。期间正在进行的对话、流式响应或部署任务可能中断,登录态不会受到影响。",selectVersion:"选择版本",currentVersion:"当前版本",changelog:"更新内容",noChangelog:"暂无更新说明",runInBackground:"后台运行",authorizedRecheck:"我已授权,重新检查",tryAgain:"重新尝试"},OYe={deploy:"部署",update:"更新",planHash:"方案哈希",backToConfiguration:"返回配置",releaseRegion:"发布区域",deployRegion:"部署区域",regionPreserved:"更新时沿用现有 Runtime 的部署区域,无法修改。",unnamedAgent:"未命名 Agent",deployTitle:"部署 {{name}}",additionalAgentCount:" 等 {{count}} 个智能体",releaseOverview:"发布概览",agentOverview:"Agent 概览",agentCount:"Agent 数量",model:"模型",systemPrompt:"系统提示词",optimizations:"优化选项",notEnabled:"未启用",effectiveCapabilities:"生效能力",automaticProtection:"自动保护",artifactActions:"发布产物操作",exportYaml:"导出 YAML",viewSource:"查看源代码",downloadSource:"下载源代码",expandFlow:"放大查看执行流程",expand:"放大查看",deploymentConfiguration:"部署配置",runtimeName:"Runtime 名称",runtimeNamePreserved:"更新时保持现有 Runtime 名称不变。",runtimeNameHint:"默认根据 Root Agent 名称生成,并添加随机后缀避免重名;支持 4-64 位字母、数字、连字符和下划线",accessAuthentication:"访问鉴权",authenticationPreserved:"更新时保持现有 Runtime 的鉴权方式不变。",authenticationMethod:"鉴权方式",authenticationAriaLabel:"部署鉴权方式",authenticationPlaceholder:"请选择鉴权方式",messageChannels:"消息渠道",instanceSettings:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",sidecarSingleInstance:"Harness Sidecar 首期仅支持单实例,Runtime 固定为 1~1",inMemorySingleInstance:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",network:"网络",networkPreserved:"现有 Runtime 的区域与网络模式保持不变。",networkMode:"网络模式",networkModes:{public:"公网",both:"公网 + VPC"},subnetId:"子网 ID",subnetHint:"可选,多个用逗号分隔",sharedInternetAccess:"VPC 内共享公网出口",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",createEvaluationSetsHint:"部署成功后,自动创建 Good Case 和 Bad Case 评测集。",resourceConfiguration:"资源配置",environmentVariables:"环境变量",environmentVariablesHint:"组件配置会自动同步到这里,部署前可核对最终值。",itemCount:"{{count}} 项",addVariable:"添加变量",componentGenerated:"组件自动生成",injectedByApiKey:"由所选 API Key 注入",envNameAriaLabel:"{{key}} 环境变量名",envDescriptionAriaLabel:"{{key}}说明:{{description}}",openOpenViking:"打开 OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}:打开 OpenViking {{label}}",requiredEmpty:"必填,尚未填写",optionalEmpty:"可选,尚未填写",envValueAriaLabel:"{{key}} 环境变量值",automatic:"自动",synced:"同步",customModelCredentials:"自定义模型凭据",releaseOnlySecret:"必填,仅用于本次发布",thisRelease:"本次发布",customVariables:"自定义变量",value:"值",deleteVariable:"删除变量",deploymentProgress:"部署进度",retryUpdate:"重试更新",retryDeploy:"重试部署",updateSucceeded:"更新成功",deploySucceeded:"部署成功",region:"区域",agentName:"Agent 名称",apiEndpoint:"API 端点",connecting:"连接中…",chatNow:"立即对话",console:"控制台",actionInProgress:"{{action}}中…",checkingName:"正在检查名称…",retryAction:"重试{{action}}",flowPreview:"执行流程预览",executionFlow:"执行流程",flowPreviewHint:"只读预览,可缩放与拖动画布",closeFlowPreview:"关闭执行流程预览",agentAdded:'Agent "{{name}}" 已添加到左上角下拉列表!',files:{preview:"文件预览",new:"新建文件",empty:"暂无文件",noneSelected:"未选择文件",selectToView:"选择左侧文件以查看内容",loadingEditor:"加载编辑器…",rename:"重命名",renamePrompt:"重命名文件"},apiKey:{selectFirst:"请先选择 API Key",revealing:"正在显示 API Key",hide:"隐藏 API Key",retryReveal:"重试显示 API Key",reveal:"显示 API Key"},task:{preparing:"准备部署",waitingBuildLog:"正在等待构建日志…",waitingGithubLog:"正在等待 GitHub 挂载日志…",syncingGithub:"正在同步当前源码到 GitHub",syncGithubCode:"同步 GitHub 代码",githubSynced:"GitHub 代码已同步",githubSubmitted:"GitHub 代码已提交",githubUpdatingRuntime:"代码已提交到 GitHub,GitHub Actions 正在更新同一个 Runtime",initializingGithub:"开始初始化 GitHub main 分支与 Actions workflow",initializingGithubBranch:"正在初始化 GitHub 持续交付目标分支",mountGithubDelivery:"挂载 GitHub 持续交付",githubBranchInitialized:"GitHub 持续交付已初始化目标分支",githubDeliveryMounted:"GitHub 持续交付已挂载",githubMountFailed:"挂载 GitHub 持续交付失败",githubMountFailedDetail:"GitHub 持续交付挂载失败:{{message}}",githubMountFailedHint:"挂载 GitHub 持续交付失败,详见 GitHub 日志。",applyingMpaProfile:"正在将 Agent 配置应用到 MPA Runtime",mpaProfileApplied:"MPA Runtime 配置已应用",runningMpaSmoke:"正在验证 MPA Runtime 执行链路",mpaReady:"MPA Runtime 已可运行",deploymentComplete:"部署完成",deployedNotConnected:"部署完成,暂未连接",cancelled:"已取消",cancelledHint:"部署已取消,相关 Runtime 资源已请求销毁。",deploymentStatusUnconfirmed:"部署状态待确认",deploymentFailed:"部署失败",buildFailedHint:"构建镜像失败,详见构建日志。"},confirm:{updateTitle:"确认更新",deployTitle:"确认部署",closeLabel:"关闭部署确认",updateDescription:"将更新并发布到当前云端 Runtime,过程可能需要几分钟。确定继续吗?",deployDescription:"将创建新的云端 Runtime,部署过程可能需要几分钟。确定继续吗?",update:"确定更新",deploy:"确定部署"},userPool:{label:"用户池",unnamed:"未命名用户池",current:"当前用户池",ariaLabel:"部署用户池",loading:"正在加载用户池…",placeholder:"请选择用户池",loadingIdentity:"正在加载 Identity 用户池…",empty:"当前账号下暂无 Identity 用户池。",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime。",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime。",markedHint:"当前 Studio 使用的用户池已在列表中标注。"},authentication:{apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPool:"用户池",userPoolDescription:"使用 Identity 用户池签发的 JWT"},steps:{buildImage:"构建镜像",deploy:"部署",publish:"发布",syncCode:"同步代码",uploadPackage:"上传代码包",packageImage:"镜像打包",createRuntime:"创建 Runtime",publishService:"发布服务",updateInstances:"更新实例配置",createEvaluationSets:"创建评测集",applyMpaProfile:"应用 MPA 配置",verifyMpaRuntime:"验证 MPA Runtime",mpaReady:"MPA Runtime 可运行"},errors:{instanceRangeInteger:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数。",instanceRangeOrder:"最小实例数不能大于最大实例数。",selectApiKey:"请先在模型配置中选择 API Key。",loadApiKey:"加载 API Key 失败,请重试。",invalidProject:"项目数据无效",updateFeishu:"更新飞书配置失败:{{message}}",userPoolRequired:"请选择用于 Runtime 鉴权的用户池。",vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",modelSecretRequired:"请填写 {{label}},用于访问对应的自定义模型地址。",managedApiKeyRequired:"{{requirement}},请先返回模型配置选择 API Key。",feishuEnvRequired:"启用飞书后,请填写{{field}}。",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",deployedButGithubMountFailed:"部署成功,但挂载 GitHub 持续交付失败:{{message}}",deployedButGithubBindFailed:"部署成功,但绑定 GitHub 失败:{{message}}",mpaRuntimeIdMissing:"部署成功,但返回缺少 Runtime ID,无法应用 MPA 配置。",mpaOperationIncomplete:"MPA Runtime 初始化未完成,请重试此部署任务。",deploymentStatusUnconfirmed:"连接已中断,当前无法确认部署最终状态。任务可能仍在云端运行,请到 AgentKit 或 Code Pipeline 查看同一任务,避免重复部署。",failedAtStage:"{{action}}失败({{stage}}阶段):{{message}}",noAgentAtEndpoint:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",addAgent:"添加 Agent 失败:{{message}}",modelApiKeyRequired:"请填写此模型地址对应的 API Key。"}},EYe={title:"工作区",storageUnavailable:"管理员未配置持久化存储,工作区管理暂不可用。",detail:"工作区详情",create:"新建工作区",editorDescription:"将常用环境组合在一起;同一个环境可以加入多个工作区。",backToList:"返回工作区列表",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",createdAt:"创建时间",updatedAt:"最近更新",basicInfo:"基本信息",namePlaceholder:"例如:内容生产",descriptionPlaceholder:"说明这个工作区的用途",selectedEnvironmentCount:"已选择 {{count}} 个,可在其他工作区中继续复用",searchAvailableEnvironments:"搜索可用环境",searchEnvironments:"搜索环境",noAvailableEnvironments:"还没有可添加的环境",createEnvironmentFirst:"请先在“环境”页面创建并构建环境。",noMatchingEnvironments:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称。",environmentStatus:{available:"可用",building:"构建中",notBuilt:"未构建"},added:"已添加",saved:"已保存工作区“{{name}}”",resourceType:"工作区资源类型",searchWorkspaces:"搜索工作区",loadFailed:"无法加载工作区",noMatchingWorkspaces:"没有匹配的工作区",tryAnotherNameOrEnvironment:"请尝试搜索其他名称或环境",noEnvironmentAdded:"未添加环境",environmentMissing:"环境缺失",availableFraction:"{{available}}/{{total}} 可用",available:"可用",availableCount:"{{count}} 个可用",updated:"更新",addEnvironment:"添加环境",deleteTitle:"删除工作区",deleteDescription:"确定删除工作区“{{name}}”吗?环境本身不会被删除。",deleted:"已删除工作区“{{name}}”",clipboardPermissionError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",codeProjects:"代码项目"},_Ye={back:"返回",detailNavigation:"详情导航",noData:"暂无数据",actions:"操作",moreActions:"更多操作 {{label}}",actionsFor:"{{label}} 操作",loading:"资源加载中,请稍候"},RYe={addSkill:"添加 Skill",remove:"移除 {{name}}",confirmRemoveRuntime:"从新版本中移除运行中的 Skill「{{name}}」?",selectedCount:"已加入技能 · {{count}}",close:"关闭{{label}}",sources:{runtime:"运行中来源 · 原样保留,可移除或用同名 Skill 替换",local:"本地",skillspace:"AgentKit Skills 中心",skillhub:"火山 Find Skill 技能广场"},tabs:{local:"本地文件",localShort:"本地文件",skillspace:"AgentKit Skills 中心",skillspaceShort:"AgentKit",skillhub:"火山 Find Skill 技能广场",skillhubShort:"Find Skill"}},DYe={model:"模型",turnControls:"流程控制",pause:"暂停",resume:"恢复",interrupt:"中断",cancel:"取消",pauseTurn:"在安全点暂停完整流程",resumeTurn:"恢复完整流程",interruptTurn:"中断当前流程并保留会话上下文",cancelTurn:"取消当前流程且不可恢复",turnState:{running:"运行中",pausing:"正在到达安全点",paused:"已暂停",resuming:"正在恢复",interrupting:"正在中断",cancelling:"正在取消",interrupted:"已中断",completed:"已完成",failed:"失败",cancelled:"已取消",orphaned:"状态待确认",newTurnRequired:"需要从检查点继续"},tasks:{ppt:"PPT",image:"图片生成",video:"视频生成"},prompts:{ppt:{quarterlyReview:"复盘【季度】经营表现,提炼指标差距、原因与行动建议",projectUpdate:"汇报【项目名称】进展:里程碑、风险、预算和资源诉求",solutionProposal:"为【客户行业】输出解决方案:痛点、架构、实施路径与收益",industryAnalysis:"分析【行业主题】趋势,给出竞争格局、机会与战略建议"},image:{launchVisual:"为【品牌或产品】设计【高级科技】风格的发布会主视觉",ecommercePoster:"生成【产品名称】电商海报,突出【核心卖点】与品牌色",conceptRendering:"呈现【产品或空间】在【使用场景】中的写实概念效果图",socialGraphic:"围绕【传播主题】制作简洁专业的企业社媒配图"},video:{brandFilm:"制作【品牌名称】30 秒宣传片,突出【品牌价值】",productLaunch:"为【产品名称】制作 45 秒发布视频:痛点、功能、场景与行动号召",trainingVideo:"制作【培训主题】企业培训视频,讲清【关键操作或规范】",eventTeaser:"生成【活动名称】20 秒预热视频,包含亮点、时间地点和报名信息"}},firstFrame:"首帧",videoToEdit:"待编辑视频",baseVideo:"基础视频",optimizeSkillPlaceholder:"描述你想优化的技能…",createSkillPlaceholder:"描述你想生成的技能…",createVideoPlaceholder:"描述你想创作的视频…",messageAgentPlaceholder:"向 {{name}} 发消息…",selectAgentFirst:"请先选择智能体",selectSkillFirst:"请先选择需要优化的 Skill",availableSkills:"可用技能",availableSubagents:"可用子 Agent",invokeSkill:"调用技能",useSubagent:"使用子 Agent",loadingCapabilities:"正在读取 Agent 能力…",noMatchingSkills:"当前 Agent 没有匹配技能",noMatchingSubagents:"当前 Agent 没有匹配子 Agent",skillFallbackDescription:"加载并执行该技能",agentFallbackDescription:"将本轮交给该 Agent",skill:"技能",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",taskMode:"任务模式",selectTaskMode:"选择任务模式",loadingGenerationModel:"正在加载生成模型",modelUnavailable:"模型不可用",cancelTask:"取消{{task}}任务",stopGenerating:"停止生成",viewVideoProgress:"查看视频生成进度",send:"发送",selectTaskType:"选择任务类型",enterprisePrompts:"{{task}}企业提示词",sessionId:"会话 ID",sessionIdLabel:"会话 ID:",initializing:"初始化中",copied:"已复制",copySessionId:"复制会话 ID",sessionIdCopied:"已复制会话 ID",disclaimer:"回答仅供参考",viewLogs:"查看日志"},LYe={selectAgent:"选择 Agent",noLocalAgents:"暂无本地 Agent。",searchRuntime:"搜索 Runtime 名称",mineOnly:"只看我创建的",noRuntimes:"暂无 Runtime。",unsupported:"不支持",createdByMe:"我创建的",connecting:"连接中…",connected:"已连接",connect:"连接",viewInfoFor:"查看 {{name}} 信息",viewInfo:"查看信息",agentAndRuntimeInfo:"Agent 与 Runtime 信息",detailType:"详情类型",agentInfo:"Agent 信息",runtimeInfo:"Runtime 信息",loadingAgentInfo:"读取 Agent 信息…",cannotLoadAgentInfo:"暂时无法读取 Agent 信息",unnamedAgent:"未命名 Agent",subagents:"子 Agent",tools:"工具",skills:"技能",previewUnsupported:"暂不支持预览",mountedComponents:"挂载组件",noMoreAgentInfo:"暂无更多 Agent 配置信息。",local:"本地",model:"模型",status:"状态",memoryMb:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",resources:"资源",version:"版本",loadingDetails:"读取详情…",environmentVariables:"环境变量",errors:{notFound:"该 Runtime 已不存在或列表信息已过期,请刷新列表后重试。",accessDenied:"当前账号无权访问该 Runtime,请检查所属 Project 和访问权限。",previewUnsupported:"该 Agent Server 版本暂不支持信息预览。",unavailable:"该 Runtime 暂时无法访问,请确认其状态为“就绪”后重试。",timeout:"加载超时,请重试"},componentKinds:{knowledgebase:"知识库",memory:"记忆",prompt_manager:"提示词管理",example_store:"样例库",run_processor:"运行处理器",tracer:"链路追踪",toolset:"工具集",plugin:"插件",other:"其他"},runtimeStatus:{ready:"就绪",unreleased:"未发布",running:"运行中",active:"运行中",creating:"创建中",pending:"等待中",deploying:"部署中",updating:"更新中",failed:"失败",error:"异常",stopping:"停止中",stopped:"已停止",deleting:"删除中",deleted:"已删除"}},MYe={agent:"智能体",agentTypes:{general:"通用智能体",mpa:"MPA 智能体",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"创建人",namedAgent:"{{name}} 智能体",storageLocation:"存储位置",currentBrowser:"当前浏览器",region:"地域",viewDeploymentProgress:"查看 {{name}} 部署进度",viewRuntimeDetails:"查看 {{name}} Runtime 详情",viewDetails:"查看 {{name}} 详情",time:"时间",remainingTime:"剩余时间",expiringSoon:"即将清空",sandboxRemaining:"{{hours}} 小时 {{minutes}} 分钟",wakeable:"已休眠",neverExpires:"永不过期",editDraftNamed:"编辑草稿 {{name}}",viewProgress:"查看进度",deleteDraftNamed:"删除草稿 {{name}}",recheckCompatibility:"重新检测 {{name}} 的对话兼容性",connectedNamed:"{{name}} 已连接",wakeAndChat:"唤醒 {{name}} 并开始对话",chatWith:"与 {{name}} 对话",waking:"唤醒中",deploying:"部署中",draft:"草稿",checking:"检测中",chatUnsupported:"不支持对话",checkFailed:"检测失败",creatorFilter:"创建人筛选",agentType:"智能体类型",searchAgents:"搜索智能体",handoff:"接力",agentList:"{{type}}列表",noMatchingAgents:"没有匹配的智能体",adjustSearch:"请尝试调整搜索或筛选条件",noAgentType:"暂无 {{type}}",noGeneralAgents:"暂无通用智能体",createGeneralAgentDescription:"创建一个通用智能体,开始构建和对话",createAgentType:"创建{{type}}",createAgent:"创建智能体",loadingMore:"正在加载更多智能体",scrollForMore:"继续下滑加载更多",allLoaded:"已加载全部智能体",deleteDraftTitle:"删除草稿?",deleteDraftDescription:"删除后将无法恢复“{{name}}”。",deleteDraft:"删除草稿",loadGeneralAgents:"加载通用智能体",loadAgentType:"加载 {{type}}",compatibility:{checking:"正在请求 Runtime /list-apps,以确认该智能体是否支持 Studio 对话。",empty:"Runtime /list-apps 未返回可用的 Agent,暂时无法连接对话。",supported:"Runtime 支持 Studio 对话。",unknownError:"Runtime /list-apps 请求失败,未返回可识别的错误信息。"},sandboxStatus:{ready:"就绪",wakeable:"已休眠",creating:"创建中",starting:"启动中",initializing:"启动中",pending:"等待中",running:"运行中",failed:"异常",error:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},wakingHint:"正在唤醒智能体,可能需要一些时间。",mpaCreate:{name:"名称",namePlaceholder:"例如 test-agent",nameHelp:"作为 Runtime 名称,支持 4–64 位字母、数字、下划线或连字符。",stepsLabel:"创建步骤",steps:{basics:"基本信息",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"数据库"},next:"下一步",previousStep:"上一步",pgDescription:"选择已有的 PostgreSQL 实例。创建流程会在该实例中准备智能体的独立业务库。",pgSplitDescription:"使用已配置的业务 PG Workspace。多个智能体共用此 Workspace,每个智能体拥有独立业务库。共享资源记录单独存放在 mpa_admin_workspace / mpa_admin_db,由管理员配置。",pgConsole:"前往火山引擎 AIDAP 创建或查看 PG Workspace",pgHost:"PG 主机地址",pgPort:"PG 端口",pgInvalid:"请填写有效的 PG 主机地址和端口。",pgCredentials:"PG 连接账号和密码由部署服务配置;主机和端口须与服务端配置一致。",openvikingDescription:"可选。三项全部填写才启用 OpenViking;全部留空则不向新智能体注入 OpenViking 配置。",openvikingConsole:"前往火山引擎查看 OpenViking 资源",openvikingUrl:"OpenViking 服务地址",openvikingResourceId:"OpenViking 资源 ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"请同时填写有效的 HTTPS 服务地址、资源 ID 和 API Key,或全部留空。",openvikingCredentials:"API Key 仅用于本次创建,不保存到浏览器草稿;刷新页面后需重新填写。",tosTitle:"会话输出存储",tosDescription:"可选。填写完整的 TOS 凭证和存储桶,为新智能体的每个会话挂载独立输出目录。三项均留空时使用服务端预设;服务端未配置时,不启用 TOS 挂载。",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS 存储桶",tosInvalid:"TOS Access Key、Secret Key 和存储桶必须同时填写。",tosCredentials:"凭证仅用于本次创建,不会保存在浏览器恢复数据或创建任务记录中。",runtimeImage:"MPA 镜像",workerImage:"Worker 镜像",imageDefault:"留空使用配置文件中的默认镜像",imageInvalid:"请输入有效的镜像地址,不要包含网址、空格或登录凭据。",title:"创建 MPA 智能体",agentId:"智能体 ID",description:"描述",region:"部署地域",plan:"创建计划",sharedResources:"准备或复用账号共享 VPC、子网和 APIG 消息网关",agentResources:"准备独立业务库、技能空间和执行环境,部署智能体",readiness:"检查网关和智能体就绪状态,成功后加入列表",checking:"正在检查创建配置…",configured:"创建配置已就绪。提交后会检查云资源并开始准备。",notConfigured:"尚未配置创建所需的资源参数,请联系管理员配置后重试。",loadFailed:"检查创建配置失败,请重试。",reload:"重新检查",submit:"开始创建",retry:"重试创建",newAgent:"新建另一个智能体",newAgentDescription:"新建另一个智能体将开启可编辑的新请求,替换当前恢复草稿,但不会取消旧任务。旧任务仍在运行时,请等待其结束后再提交。",close:"关闭",cancel:"取消创建",confirmCancel:"确认取消",cancelDescription:"取消后会停止后续步骤。已创建的数据库、技能空间、网关和其他已登记资源会保留,可使用同一智能体 ID 重试。",background:"关闭窗口后创建会继续。再次打开可查看进度。",pollFailed:"暂时无法获取进度,正在重新连接。请勿重复创建其他智能体。",creationFailed:"当前步骤未完成,请检查对应资源、服务端配置及权限后,用同一智能体 ID 重试。",cancelFailed:"取消请求失败,请重新查询进度后重试。",cancelled:"创建已取消,已登记资源保留供重试。",timeout:"创建超时,已登记资源保留。请检查对应资源后重试。",interrupted:"创建任务中断。请用同一智能体 ID 重试以恢复已登记资源。",skillSpace:"技能空间",states:{running:"正在创建",cancelling:"正在取消",succeeded:"创建成功",failed:"创建失败",cancelled:"已取消"},stages:{queued:"等待开始",checking:"检查账号与配置",network:"准备 VPC 和子网",gateway:"准备 APIG 和 IM Gateway",database:"准备业务数据库",skills:"准备技能空间",worker:"准备执行环境",deploying:"准备数据库、技能空间和 Runtime",verifying:"等待智能体就绪",admin_workspace:"准备管理 PG Workspace",business_workspace:"准备业务 PG Workspace",admin_database:"初始化共享管理库"},back:"继续创建",pgAutoDescription:"使用 VeADK 部署账号自动创建或复用两个 PG Workspace:mpa_admin_workspace / mpa_admin_db 存放共享资源记录,业务 Workspace 供多个智能体共用,每个智能体拥有独立业务库。无需填写 PG 连接信息,提交创建后开始准备。",pgModeChanged:"此创建任务使用旧的 PG 配置,不能直接切换为自动模式重试。请联系管理员确认已有资源和任务后重新创建。",pgMigrationRequired:"检测到旧共享注册库。请先将共享资源记录迁移到 mpa_admin_workspace / mpa_admin_db,并完成现有 Runtime 的注册库地址切换;完成后点击“重新检查”。"}},IYe={library:"技能库",skill:"技能",skills:"技能",skillSpace:"技能空间",sandboxNotConfigured:"管理员未配置 Dev Sandbox",adminNotConfigured:"管理员未配置",totalItems:"共 {{count}} 项",cannotLoadSpaces:"无法加载技能空间",someSpacesFailed:"部分技能空间加载失败",degradedRelationWarning:"部分关联异常,已恢复可读取技能",downloadZip:"下载 ZIP",optimize:"优化",closeSkillDetails:"关闭技能详情",skillId:"技能 ID",allFiles:"完整文件",loadingSkillContent:"正在读取技能内容…",noSkillContent:"该技能暂无 SKILL.md 内容",addSkill:"添加技能",localUpload:"本地上传",localUploadDescription:"选择 ZIP 文件,校验通过后上传到技能空间",autoCreate:"自动创建",autoCreateDescription:"选择模型和风格,通过对话生成技能",createSkill:"创建技能",optimizeNamed:"优化 {{name}}",deleteSkillConfirm:"确定删除整个 Skill“{{name}}”吗?此操作会影响所有引用它的空间。",deleteSpaceConfirm:"确定删除 Skill 空间“{{name}}”吗?请先确认空间中的技能已删除。",manageSpaceDescription:"管理空间中的技能并创建新的版本",backToSpaces:"返回技能空间列表",overview:"概览",skillCount:"技能数量",skillCountValue_one:"{{count}} 技能",skillCountValue_other:"{{count}} 技能",updatedAt:"更新时间",skillsInSpace:"{{name}}中的技能",searchSkills:"搜索技能",cannotLoadSkills:"无法加载技能",noMatchingSkills:"没有匹配的技能",noSkills:"暂无技能",tryAnotherName:"请尝试搜索其他名称",emptySkillsDescription:"本地上传 Skill,或自动创建",actions:"操作",spaceDetails:"技能空间详情",editSpace:"编辑空间",deleteSpace:"删除空间",searchSpaces:"搜索技能空间",spaceList:"技能空间列表",noMatchingSpaces:"没有匹配的技能空间",createSpace:"新建技能空间",newSpace:"新建空间",loadingMoreSpaces:"正在加载更多技能空间",scrollForMore:"继续下滑加载更多",allSpacesLoaded:"已加载全部技能空间",errors:{loadSpaces:"读取技能空间失败,请稍后重试",loadSkills:"读取技能失败,请稍后重试",loadSkillDetails:"读取技能详情失败,请稍后重试",deleteSkill:"删除 Skill 失败",deleteSpace:"删除 Skill 空间失败",downloadSkill:"下载 Skill 失败"},status:{active:"可用",available:"可用",creating:"创建中",disabled:"已停用",enabled:"已启用",failed:"异常",inactive:"未启用",pending:"等待中",published:"已发布",ready:"就绪",released:"已发布",running:"运行中",success:"正常",unavailable:"不可用",unreleased:"未发布",updating:"更新中",unknown:"未知"},sharedSpace:"企业共享空间",sharedDescription:"面向企业全员开放的技能,由管理员统一发布和维护",sharedVisibility:"全员可见",sharedPreparing:"正在准备共享空间",sharedLoadFailed:"共享空间加载失败",sharedEmpty:"暂无共享技能,管理员发布后会显示在这里",requestPublication:"申请公开",reviewSubmitting:"提交中…",reviewSubmitted:"已申请",reviewFailed:"申请公开失败",reviewStatusFailed:"审核状态加载失败",reviewRetry:"重新申请",reviewPending:"待审核",reviewApproving:"发布中",reviewApproved:"已公开",reviewReturned:"已退回",reviewHistory:"审核记录",skillDetailSections:"技能详情内容",versions:{title:"版本管理",refresh:"刷新",uploading:"上传中…",upload:"上传新版本",close:"关闭",hint:"新版本不会替换已公开版本,审核通过后才会公开;ZIP 中的技能名称需与原技能一致",loading:"正在加载版本…",loadFailed:"无法加载版本",filesFailed:"无法加载版本文件",uploadFailed:"上传新版本失败",submitFailed:"提交申请失败",retry:"重试",empty:"暂无版本",current:"当前版本",notSubmitted:"未申请公开",submitting:"提交中…",submit:"申请公开",processing:"版本状态:{{status}}",filesLoading:"正在加载文件…",filesEmpty:"暂无文件",history:"历史审核记录",shared:"已公开"},author:"作者",authorName:"作者:{{name}}"},PYe={library:"知识库",createBase:"新建知识库",editBase:"编辑知识库",invalidName:"名称必须以字母开头,且只能包含字母、数字和下划线。",nameHelp:"以字母开头,仅支持字母、数字和下划线,最多 48 个字符。",optionalDescription:"描述(可选)",descriptionOnly:"AgentKit 当前仅支持更新知识库描述。",previewWeb:"预览网页内容",addData:"添加数据",openOriginalWeb:"打开原网页",backToEdit:"返回修改",confirmAdd:"确认添加",source:"知识来源",image:"图片",documentFile:"文档文件",webPage:"在线网页",webUrl:"网页 URL",generatingWebPreview:"正在抓取网页并生成 Markdown 预览",selectFile:"选择知识文件",selectOrDropFile:"选择文件或拖拽到这里",selectedFile:"{{size}} · 点击可重新选择",imageFileHelp:"支持 PNG、JPG 和 JPEG,单个文件不超过 200 MB",documentFileHelp:"支持 PDF、PPTX、DOCX、XLSX 和 TXT,单个文件不超过 200 MB",uploadingFile:"正在上传文件并添加到知识库",optionalName:"名称(可选)",optionalType:"类型(可选)",generatePreview:"生成预览",uploadFile:"上传文件",editMetadata:"编辑知识 Metadata",knowledge:"知识",field:"字段",value:"值",backToList:"返回知识库列表",metadataJson:"元数据(JSON)",provider:"服务提供方",knowledgeId:"知识库 ID",project:"项目",creator:"创建者",data:"数据",deleteInvalidAssociation:"删除失效关联",noData:"这个知识库还没有数据",addFirstData:"添加第一项数据",format:"格式",size:"大小",searchData:"搜索数据",searchLibraryData:"搜索知识库数据",associationInvalid:"关联已失效",providerMissing:"底层 Provider 知识库已不存在",noMatchingData:"没有匹配的数据",loadingMoreData:"正在加载更多数据",retryLoading:"重试加载",details:"知识库详情",searchBases:"搜索知识库",someBasesFailed:"部分知识库暂时无法加载,已展示其余可用内容。",noMatchingBases:"没有匹配的知识库",noManagePermission:"您没有管理此知识库的权限",loadingMoreBases:"正在加载更多知识库",deleteBaseTitle:"删除知识库?",deleteBaseDescription:"将删除 {{name}} 的 AgentKit 关联;如果它由 Studio 创建,也会同时删除 Provider 资源。此操作无法撤销。",deleteDocumentTitle:"删除知识?",deleteDocumentDescription:"将从 Provider 知识库中删除 {{name}},此操作无法撤销。",preview:{processingTitle:"数据正在处理中",processingDetail:"知识库完成解析后即可预览,请稍后重新加载。",failedTitle:"数据解析失败",failedDetail:"请检查源文件或网页地址后重新添加,也可以重新加载最新状态。",noParsedTitle:"暂时没有可预览的解析内容",noParsedDetail:"此类文件会在知识库完成解析后显示文本、表格或页面图片。",noMediaTitle:"暂时没有可预览的媒体内容",noMediaDetail:"知识库尚未返回可访问的媒体预览,请稍后重新加载。",noDataTitle:"暂无可预览的数据内容",noDataDetail:"知识库尚未返回解析结果,请稍后重新加载。",attachmentError:"附件无法预览,请稍后重试。",imageAlt:"知识数据图片",audioUnsupported:"当前浏览器不支持音频预览。",videoUnsupported:"当前浏览器不支持视频预览。",namedPdf:"{{name}} PDF 预览",pdf:"PDF 预览",openPdf:"无法显示时,在新窗口打开 PDF",fileUnsupported:"当前格式暂不支持直接在线预览,已优先显示解析后的内容。",openOriginalFile:"打开原文件",loading:"正在加载数据预览",openOriginalHint:"您可以打开原网页查看来源内容。",chunk:"片段 {{index}}",loadingMore:"正在加载更多",loadMore:"加载更多"},errors:{fileTooLarge:"单个文件不能超过 200 MB",invalidImageType:"请选择 PNG、JPG 或 JPEG 图片",invalidDocumentType:"请选择 PDF、PPTX、DOCX、XLSX 或 TXT 文件",createBase:"创建知识库失败",updateBase:"更新知识库失败",metadataObject:"Metadata 必须是 JSON 对象",metadataFormat:"Metadata 格式错误",noWebPreview:"网页没有可预览的 Markdown 内容",addWeb:"添加网页失败",previewWeb:"生成网页预览失败",uploadFile:"上传文件失败",updateDocument:"更新知识失败",loadPreview:"加载数据预览失败",loadMoreBases:"加载更多知识库失败",loadBases:"加载知识库失败",loadMoreData:"加载更多数据失败",loadData:"加载数据失败",deleteBase:"删除知识库失败",deleteDocument:"删除知识失败"}},NYe={title:"飞书渠道",refresh:"刷新",loading:"正在加载渠道配置…",unsupported:"此 Runtime 不支持渠道管理,请升级 MPA 镜像。",unauthorized:"渠道管理需要 Studio 管理员身份及有效的 Runtime 凭据。",configurationError:"渠道管理配置不完整,请检查 Runtime 元数据及加密密钥。",requestFailed:"渠道请求失败,请检查 Runtime 连接后重试。",bound:"已绑定:{{name}}",unbound:"尚未绑定飞书机器人。",guidance:"私聊使用独立会话。在已授权群内 @ 当前机器人即可对话。",keyRequired:"绑定前请在 Runtime 配置持久的 CHANNEL_STATE_ENCRYPTION_KEY。",gateway:"消息网关",route:"入站路由",delivery:"回复投递",configured:"已配置",missing:"未配置",delivery_not_observed:"尚未观测",delivery_delivered:"已投递",delivery_retrying:"重试中",missingConfig:"缺少 Runtime 配置:{{fields}}",bind:"扫码绑定",newQr:"重新生成二维码",unbind:"解除绑定",confirmUnbind:"确认解绑此机器人?解绑后将停止接收新消息。",qrAlt:"机器人绑定二维码",openQr:"打开授权页面",uncertain:"注册过程已中断。重新开始前,请检查机器人绑定与 Gateway 状态。",bindingFailed:"绑定失败,请检查 Gateway 配置后重试。",chatId:"允许的群 ID",scope:"群会话策略",saveGroup:"保存群权限",noGroups:"尚未授权任何群。私聊无需群权限。",edit:"编辑",remove:"移除",removeGroup:"移除 {{name}}",scope_group_sender:"按发言人隔离",scope_group:"全群共享",scope_group_topic_sender:"按话题和发言人隔离",scope_group_topic:"按话题共享",status_PENDING:"等待扫码",status_SCANNED:"已扫码,等待授权",status_AUTHORIZED:"已授权,准备注册",status_REGISTERING:"正在注册机器人",status_BOUND:"机器人已绑定",status_FAILED:"绑定失败",status_EXPIRED:"二维码已过期",workspaceTitle:"消息渠道",workspaceDescription:"连接消息平台,让用户直接与此智能体对话,并管理访问权限。",provider_feishu:"飞书",provider_wecom:"企业微信",provider_dingtalk:"钉钉",comingSoon:"暂未开放",unavailableDescription:"{{name}}的绑定与消息配置暂未开放。",runtimeRequired:"请先将此智能体部署到 Runtime,再配置消息渠道。",bindingTitle:"机器人绑定",connected:"已绑定",notBound:"未绑定",gatewayDescription:"用于接收渠道消息的网关配置。",routeDescription:"将渠道消息转发给当前智能体的路由配置。",deliveryDescription:"实际观测到的回复投递状态,完成配置不代表已成功投递。",groupsTitle:"群聊权限",groupsDescription:"添加允许访问的群,并设置群内对话的共享范围。",providerBindingTitle:"绑定{{name}}",providerUnbound:"绑定{{name}}机器人,让用户通过消息与此智能体对话。",qrGuidance:"使用{{name}}扫码授权,Runtime 将保存机器人凭据并配置消息网关。",wecomGuidance:"使用企业微信扫码授权,或手动填写 Bot ID 和 Secret 绑定已有机器人。",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"绑定机器人",wecomScan:"扫码绑定",wecomAuthorizing:"等待企业微信授权…",cancelAuthorization:"取消授权",wecomPopupBlocked:"授权窗口被浏览器拦截,请允许弹窗后重试。",wecomAuthCancelled:"已取消企业微信授权,可以重新扫码。",wecomAuthTimeout:"企业微信授权已超时,请重新扫码。",wecomInvalidResult:"授权结果缺少 Bot ID 或 Secret,请重新授权或手动填写。",wecomAuthFailed:"企业微信授权失败,请重试或手动填写凭据。",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"当前镜像尚不支持{{name}}手动配置,请升级后使用;仍可使用极速配置。",pairingTitle:"消息渠道扫码配对",feishuPairingDescription:"如果已有连接机器人,飞书扫码并绑定成功后原有机器人会被替换,可选绑定存量机器人或新建机器人。",generatingQr:"正在生成配对二维码…",dingtalkGuidance:"使用钉钉扫码授权,或手动填写 Client ID 和 Client Secret 绑定已有机器人。",wecomPairingDescription:"将在企业微信授权窗口中重新扫码配对。新机器人绑定成功后会替换当前连接;取消授权或绑定失败不会解绑原机器人。",configurationMethod:"配置方式",quickSetup:"极速配置",manualSetup:"手动配置",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"填写已有{{name}}机器人的应用凭据,连接到当前智能体。",manualReplacement:"绑定成功后将替换当前机器人;取消或绑定失败不会解除现有绑定。"},Ndr=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:gYe,agentSelector:LYe,agentWorkspace:vYe,channels:NYe,cloudEnvironment:AYe,common:pYe,composer:DYe,default:{common:pYe,agentKitPromo:gYe,systemInfo:mYe,agentWorkspace:vYe,environmentCenter:yYe,deploymentSelect:bYe,deploymentError:xYe,studioBuildProgress:wYe,cloudEnvironment:AYe,githubCicd:SYe,feishuDeployment:TYe,deploymentResources:CYe,studioUpdate:kYe,projectPreview:OYe,workspace:EYe,resourceCollection:_Ye,skillSourcePicker:RYe,composer:DYe,agentSelector:LYe,myAgents:MYe,skillCenter:IYe,knowledge:PYe,channels:NYe},deploymentError:xYe,deploymentResources:CYe,deploymentSelect:bYe,environmentCenter:yYe,feishuDeployment:TYe,githubCicd:SYe,knowledge:PYe,myAgents:MYe,projectPreview:OYe,resourceCollection:_Ye,skillCenter:IYe,skillSourcePicker:RYe,studioBuildProgress:wYe,studioUpdate:kYe,systemInfo:mYe,workspace:EYe},Symbol.toStringTag,{value:"Module"})),BYe="用户管理",$Ye="{{count}} 位成员",FYe="用户",zYe="角色",UYe="账号状态",VYe="最近登录",GYe="操作",QYe="更改角色",HYe="关闭",WYe="保存角色",YYe="正在保存…",qYe="取消",jYe="返回",XYe="用户池",KYe="火山引擎 Identity",ZYe="搜索姓名、邮箱或用户 ID",JYe="搜索",eqe="筛选角色",tqe="全部角色",rqe="刷新",nqe="正在读取用户…",iqe="更新于 {{time}}",aqe="已将 {{name}} 设置为{{role}}",oqe="重试",sqe="你",lqe="初始超级管理员",cqe="初始超级管理员受保护,不能在此降级",uqe="保存后,对方刷新 Studio 即可使用新的权限",dqe="角色需要重新确认",hqe="没有匹配的用户",fqe="尝试其他关键词或角色",pqe="用户登录或加入当前用户池后会显示在这里",gqe="共 {{count}} 位用户",mqe="上一页",vqe="下一页",yqe="尚未登录",bqe="未提供",xqe={super_admin:"超级管理员",admin:"管理员",developer:"开发者",user:"普通用户"},wqe={super_admin:"管理所有资源,并管理用户和分配角色",admin:"管理 Studio 资源",developer:"开发智能体并管理自己的资源",user:"使用智能体和个人功能"},Aqe={EXTERNAL_PROVIDER:"正常",CONFIRMED:"正常",NORMAL:"正常",ENABLED:"正常",ACTIVE:"正常",UNCONFIRMED:"待验证",DISABLED:"已停用",FORBIDDEN:"已禁用",LOCKED:"已锁定",SUSPENDED:"已暂停",FORCE_CHANGE_PASSWORD:"需要修改密码"},Sqe={request_failed:"请求未完成,请刷新列表确认当前状态后重试",invalid_response:"用户服务返回异常,请刷新后重试",identity_unavailable:"暂时无法访问 Identity,请稍后重试或检查服务权限",identity_resource_missing:"用户或用户池已不存在,请刷新列表",super_administrator_required:"只有超级管理员可以管理用户",sign_in_required:"请登录后重试",user_not_in_pool:"当前账号不属于此用户池",user_disabled:"当前账号已停用",protected_administrator:"不能降低初始超级管理员的权限",cannot_demote_self:"不能降低自己的超级管理员权限",role_change_conflict:"角色已发生变化,请关闭弹窗并刷新列表后重试",cross_origin_request:"请在当前 Studio 页面内修改角色"},Bdr=Object.freeze(Object.defineProperty({__proto__:null,actions:GYe,allRoles:tqe,back:jYe,cancel:qYe,changeRole:QYe,close:HYe,default:{title:BYe,memberCount:$Ye,user:FYe,role:zYe,status:UYe,lastLogin:VYe,actions:GYe,changeRole:QYe,close:HYe,save:WYe,saving:YYe,cancel:qYe,back:jYe,pool:XYe,volcengineIdentity:KYe,searchPlaceholder:ZYe,search:JYe,filterRole:eqe,allRoles:tqe,refresh:rqe,loading:nqe,updatedAt:iqe,saved:aqe,retry:oqe,you:sqe,initialAdministrator:lqe,protectedExplanation:cqe,effectiveAfterRefresh:uqe,roleConflict:dqe,noUsers:hqe,tryAnotherSearch:fqe,poolEmpty:pqe,resultCount:gqe,previous:mqe,next:vqe,neverLoggedIn:yqe,unknown:bqe,roles:xqe,descriptions:wqe,states:Aqe,errors:Sqe},descriptions:wqe,effectiveAfterRefresh:uqe,errors:Sqe,filterRole:eqe,initialAdministrator:lqe,lastLogin:VYe,loading:nqe,memberCount:$Ye,neverLoggedIn:yqe,next:vqe,noUsers:hqe,pool:XYe,poolEmpty:pqe,previous:mqe,protectedExplanation:cqe,refresh:rqe,resultCount:gqe,retry:oqe,role:zYe,roleConflict:dqe,roles:xqe,save:WYe,saved:aqe,saving:YYe,search:JYe,searchPlaceholder:ZYe,states:Aqe,status:UYe,title:BYe,tryAnotherSearch:fqe,unknown:bqe,updatedAt:iqe,user:FYe,volcengineIdentity:KYe,you:sqe},Symbol.toStringTag,{value:"Module"})),Tqe="网站集成",Cqe="将 AgentKit Runtime 以悬浮聊天窗口嵌入网站",kqe="返回自动化列表",Oqe="添加网站",Eqe="正在加载 Runtime",_qe="选择 Runtime",Rqe="网站域名",Dqe="例如 xxxx.com 或 localhost:5173",Lqe="正在生成",Mqe="生成 Token",Iqe="已添加网站",Pqe="{{count}} 个",Nqe="{{count}} 个",Bqe="正在加载网站集成",$qe="还没有网站集成",Fqe="选择 Runtime 并输入网站域名即可生成 Token",zqe="引入方法",Uqe="将下面代码放到网页的 body 结束标签前",Vqe="已复制",Gqe="复制代码",Qqe="添加网站后会在这里生成引入代码。",Hqe="确定删除 {{domain}} 的网站集成吗?",Wqe={load:"加载网站集成失败",create:"创建网站集成失败",delete:"删除网站集成失败",noConversationalAgent:"该 Runtime 暂未发现可对话的 Agent"},Yqe={requestFailed:"请求失败 ({{status}})",greeting:"您好,有什么可以帮您?",sessionFailed:"无法建立对话会话",unauthorized:"当前网站未获得对话授权",conversationFailed:"对话请求失败,请稍后重试",open:"打开智能体对话",close:"关闭智能体对话",panelLabel:"智能体对话面板",assistant:"智能体助手",online:"在线对话"},$dr=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:Oqe,addedWebsites:Iqe,backToAutomations:kqe,confirmDelete:Hqe,copied:Vqe,copyCode:Gqe,default:{title:Tqe,description:Cqe,backToAutomations:kqe,addWebsite:Oqe,loadingRuntime:Eqe,selectRuntime:_qe,websiteDomain:Rqe,domainPlaceholder:Dqe,generating:Lqe,generateToken:Mqe,addedWebsites:Iqe,websiteCount_one:Pqe,websiteCount_other:Nqe,loadingIntegrations:Bqe,delete:"删除",emptyTitle:$qe,emptyDescription:Fqe,embedMethod:zqe,embedInstructions:Uqe,copied:Vqe,copyCode:Gqe,embedHint:Qqe,confirmDelete:Hqe,errors:Wqe,widget:Yqe},description:Cqe,domainPlaceholder:Dqe,embedHint:Qqe,embedInstructions:Uqe,embedMethod:zqe,emptyDescription:Fqe,emptyTitle:$qe,errors:Wqe,generateToken:Mqe,generating:Lqe,loadingIntegrations:Bqe,loadingRuntime:Eqe,selectRuntime:_qe,title:Tqe,websiteCount_one:Pqe,websiteCount_other:Nqe,websiteDomain:Rqe,widget:Yqe},Symbol.toStringTag,{value:"Module"})),qqe={types:{all:"全部类型",document:"文档",image:"图片",video:"视频"},previewArtifact:"预览 {{name}}",moreActions:"更多操作 {{name}}",actionMenu:"{{name}} 操作",download:"下载",downloading:"下载中",edit:"编辑信息",delete:"删除产物",previewFailed:"无法预览“{{name}}”:{{message}}",downloadStarted:"已开始下载 {{name}}",downloadFailed:"无法下载“{{name}}”:{{message}}",updated:"已更新 {{name}}",deleted:"已删除 {{name}}",deleteFailed:"无法删除“{{name}}”:{{message}}",typeFilter:"产物类型",searchAria:"搜索产物",searchPlaceholder:"搜索产物或会话",retry:"重试",close:"关闭",listAria:"产物列表",loadFailed:"产物加载失败",loadDetailFallback:"请检查存储配置后重试。",reload:"重新加载",noMatch:"没有找到匹配的产物",noArtifacts:"您还没有任何产物",searchHint:"请尝试搜索其他名称或切换类型",emptyHint:"聊天中生成的产物会自动显示在这里",columns:{name:"名称",source:"来源",updatedAt:"修改时间",actions:"操作"},loadingMore:"正在加载更多产物",unknownTime:"时间未知",preview:{close:"关闭预览",meta:"{{type}} / 版本 {{version}}",loading:"正在加载预览",alt:"{{name}} 预览",loadFailed:"预览加载失败,请稍后重试或下载查看",unsupported:"当前格式暂不支持在线预览,请下载查看",sourceAria:"产物来源",agent:"智能体",session:"会话",tool:"生成工具",createdAt:"生成时间",fileSize:"文件大小",tags:"标签",viewSession:"查看会话"},deleteDialog:{title:"删除产物?",description:"“{{name}}”将从产物库永久删除,聊天记录不会受到影响。",deleting:"删除中",confirm:"删除",close:"关闭删除确认框"},api:{withStatus:"{{message}}({{status}})",listFailed:"读取产物库失败",syncFailed:"同步聊天产物失败",updateFailed:"更新产物失败",deleteFailed:"删除产物失败",downloadFailed:"下载产物失败"}},jqe={unknownSource:"未知来源",unknownCreator:"未知创建者"},Xqe={nameRequired:"请输入产物名称",tooManyTags:"标签最多 {{max}} 个",tagTooLong:"单个标签不能超过 {{max}} 个字符",title:"编辑产物信息",subtitle:"内容文件不会被修改",close:"关闭编辑框",name:"名称",description:"描述",descriptionPlaceholder:"补充用途、版本或使用说明",tags:"标签",tagsPlaceholder:"使用逗号分隔,最多 {{max}} 个",cancel:"取消",saving:"保存中",save:"保存"},Kqe={change:{added:"新增",modified:"修改",deleted:"删除"},noChanges:"两个版本的源码没有差异",chooseFile:"从左侧选择文件以查看代码",compareTitle:"版本对比",workspaceTitle:"源码工作区",projectFallback:"Agent 项目",switchTheme:"切换源码主题",switchThemeTitle:"切换为{{theme}}主题",themes:{dark:"深色",light:"浅色"},closeWorkspace:"关闭源码工作区",close:"关闭",changedFiles:"变更文件",projectFiles:"项目文件",changes:"变更",files:"文件",openFiles:"打开的文件",noFileSelected:"未选择文件",comparisonDirection:"对比方向",before:"优化前",after:"优化后",loadingEditor:"正在加载编辑器…",changedFileCount_one:"{{count}} 个文件有变更",changedFileCount_other:"{{count}} 个文件有变更",fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件",lineCount_one:"{{count}} 行 · UTF-8",lineCount_other:"{{count}} 行 · UTF-8",viewSource:"查看源码",viewSourceAria:"查看和编辑项目源码"},Zqe={nav:"搜索",selectAgent:"请选择 Agent",checkingCapabilities:"正在检测 Agent 能力",notMounted:"当前 Agent 未挂载{{label}}",sources:{session:"会话",web:"网络",knowledge:"知识库",memory:"长期记忆"},webDescription:"通过 web_search 工具检索",backendLocal:"本地",failed:"搜索失败:{{message}}",placeholder:{selectAgent:"请先选择 Agent",web:"在网络中检索",knowledge:"在 {{name}} 中检索",knowledgeFallback:"当前 Agent 的知识库",memory:"在 {{name}} 中检索",memoryFallback:"当前用户的长期记忆",session:"在当前 Agent 的会话中检索"},sourceTypeAria:"搜索类型:{{label}}",notSelected:"未选择",sourceType:"搜索类型",selectSource:"选择搜索类型",noAgentHint:"选择一个 Agent 后,即可检索会话、网络及其挂载的数据源。",loadingCapabilities:"正在读取当前 Agent 的检索能力…",sourceUnavailable:"当前 Agent 未挂载该数据源",instructions:{web:"输入关键词后回车或点击按钮,通过 web_search 工具检索。",knowledge:"输入问题,检索当前 Agent 挂载的知识库。",memory:"输入线索,检索当前用户跨会话保存的长期记忆。",session:"输入关键词后回车或点击按钮,搜索当前 Agent 的会话。"},noResults:"未找到匹配“{{query}}”的结果。",knowledgeFragment:"知识片段 {{index}}",memoryFragment:"记忆片段 {{index}}"},Jqe={title:"开发者资源",sections:{documentation:{title:"相关链接",description:"查看开发文档与 AgentKit 常用入口"},bestPractices:{title:"最佳实践",description:"参考开发、调试与部署经验"},showcases:{title:"案例展示",description:"探索 AgentKit 应用案例"}},links:{veadkDocs:"VeADK 文档",cliDocs:"AgentKit CLI 文档",platformDocs:"AgentKit 平台文档",console:"AgentKit 控制台"},articles:{veadkDevelopment:{title:"使用 VeADK 开发并部署智能体",description:"使用 VeADK 构建 Agent,并部署至 AgentKit 智能体运行时。"},cliDevelopment:{title:"使用 AgentKit CLI 开发并部署智能体",description:"通过 AgentKit CLI 创建项目、调试 Agent,并完成部署。"},coverAlt:"{{title}}文章封面"},showcases:{researchAssistant:{title:"多智能体研究助手",description:"由多个专业 Agent 协同完成资料检索、分析和结论整理。"},multimodalAnalysis:{title:"多模态内容分析",description:"在统一会话中理解图片、文档和视频内容。"},customerService:{title:"智能客服工作台",description:"结合知识检索与工具调用处理复杂的客户服务任务。"},webSearch:{title:"联网搜索 Agent",description:"检索实时网页内容,并将信息整理为可追溯的回答。"},a2uiApp:{title:"A2UI 交互应用",description:"让 Agent 根据任务过程生成可交互的前端界面。"},previewAlt:"{{title}}界面预览"}},eje={title:"资源库",untitledSession:"未命名会话",categoryAria:"资源库分类",regionAria:"区域",tabs:{skills:"技能库",knowledge:"知识库",artifacts:"产物"}},tje={title:"管理 Agent",subtitle:"列出你有权管理的 AgentKit Runtime",mainAgentOnly:"仅显示主 Agent(控制面信息)。",deleteConfirm:'确定删除 Agent "{{name}}"?该 Runtime 将被永久删除。',regionFilterTitle:"按区域筛选",regionFilterAria:"区域筛选",regionAria:"区域",refresh:"刷新",loading:"加载中…",empty:"暂无你部署的 Agent。",connected:"已连接",connect:"连接到此 Agent",deleteRuntime:"删除该 Runtime",loadingDetail:"读取详情…",agentStructure:"Agent 结构",secretHidden:"敏感值不展示,可通过授权请求直接复制",revealSecret:"{{key}} 的敏感值",copySecret:"复制 {{key}} 的值",copy:"复制",copied:"已复制",copyFailed:"复制失败",notConfigured:"未配置",fields:{model:"模型",description:"描述",status:"状态信息",project:"项目",version:"版本",resources:"资源",memory:"记忆",tool:"工具",knowledge:"知识",mcpToolset:"MCP 工具集",updatedAt:"更新时间"},resource:{memory:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",concurrency:"并发 {{value}}"},environmentVariables:"环境变量",unnamed:"(未命名)"},rje={mainAgent:"主 Agent",subAgent:"子 Agent {{index}}",itemCount_one:"{{count}} 项",itemCount_other:"{{count}} 项",info:"Agent 信息",infoAndTopology:"Agent 信息与设置",loadingInfo:"正在读取 Agent 信息…",unnamedAgent:"未命名 Agent",agentsMd:"AGENTS.md",tools:"工具",toolList:"工具列表",studioTool:"Studio Tool",removeTool:"移除工具 {{name}}",remove:"移除",notConfigured:"未配置",addStudioTool:"添加 Studio 工具",addStudioToolHere:"在此对话中添加 Studio 工具",skills:"技能",skillList:"技能列表",addSkill:"添加技能空间技能",addSkillHere:"向此会话添加技能空间技能",skillMountNextTurn:"挂载的版本将在下一 Turn 开始时冻结。",previewUnsupported:"暂不支持预览",sessionEnvironment:"会话环境",environment:"环境",agentCanvas:"Agent 画布",topology:"结构拓扑",nodeKinds:{agent:"Agent",sandbox:"沙箱","worker-session":"Worker 会话","skill-space":"技能空间",skill:"技能","studio-tool":"Studio 工具",mcp:"MCP",environment:"环境",knowledge:"知识库","sub-agent":"子 Agent"},nodeStatuses:{configured:"已配置",mounted:"已挂载",running:"运行中",paused:"已暂停"},viewCanvasFullscreen:"全屏查看 Agent 画布",viewFullscreen:"全屏查看",executionCanvas:"Agent 执行画布",fullscreenExecutionCanvas:"全屏 Agent 执行画布",closeFullscreenCanvas:"关闭全屏画布",close:"关闭",capabilitiesSubtitle:"能力与协作拓扑",closeInfo:"关闭 Agent 信息",infoUnavailable:"暂时无法读取 Agent 信息。",refresh:"刷新信息",loadingSkills:"正在加载绑定技能…",sessionSkills:"本会话临时技能",noBoundSpace:"当前智能体未绑定技能空间。",noBoundSkills:"绑定的技能空间暂无技能。",loadFailed:"加载失败,请刷新重试。",accessDenied:"无权读取此信息。",documentUnsupported:"当前 Runtime 不支持 Studio 读取 AGENTS.md,请升级 Runtime 镜像。",skillsUnsupported:"当前 Runtime 未提供技能空间绑定信息。",skillsDegraded:"技能信息不完整,请刷新重试。",documentEditHint:"编辑最新版本。保存会发布新版本到此技能空间,可能影响使用它的其他智能体。运行中的会话可能需要等待缓存刷新或新建会话后生效。请保留 frontmatter 中的 name。",documentLoading:"正在加载 SKILL.md…",documentWritable:"可编辑",documentReadOnly:"只读:此空间或当前权限不允许编辑",documentLoadFailed:"无法加载 SKILL.md,请刷新重试。",documentSaveFailed:"未确认保存成功,已保留编辑内容。重试前请重新打开,检查当前版本。",documentConflict:"技能已有新版本。请复制当前修改,再重新打开编辑器,避免覆盖。",discardDocument:"放弃未保存的修改?",keepEditing:"继续编辑",discardChanges:"放弃修改",saveDocument:"保存为新版本"},nje={mountFailed:"挂载环境失败",closeDialog:"关闭环境弹窗",addTitle:"添加环境",description:"选择当前会话允许 Agent 使用的 Sandbox 环境",closeAdd:"关闭添加环境",searchAria:"搜索环境",searchPlaceholder:"搜索环境名称或能力",availableAria:"可用环境与工作区",loading:"正在读取可用环境…",noMatch:"没有匹配的环境或工作区",workspaces:"工作区",reuseAll:"复用工作区中的全部可用环境",availableEnvironmentCount_one:"{{count}} 个可用环境",availableEnvironmentCount_other:"{{count}} 个可用环境",selectWorkspace:"选择工作区 {{name}}",environments:"环境",includedByWorkspaces:"已由工作区 {{names}} 包含",nameSeparator:"、",selectEnvironment:"选择环境 {{name}}",selectedWorkspaceCount_one:"{{count}} 个工作区",selectedWorkspaceCount_other:"{{count}} 个工作区",coveredEnvironmentCount_one:"{{count}} 个环境",coveredEnvironmentCount_other:"{{count}} 个环境",selectionSummary:"已选择 {{workspaces}},覆盖 {{environments}}",cancel:"取消",mounting:"正在挂载…",confirm:"确认添加",mountedAria:"已挂载环境",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",removeWorkspace:"移除工作区 {{name}}",remove:"移除",removeEnvironment:"移除环境 {{name}}",add:"添加环境",addMore:"添加更多环境",addForSession:"为当前 Session 添加环境",loadingAvailable:"正在加载可用环境…",empty:"暂无可用的 AIO Sandbox 环境。"},ije={loading:{searching:"正在查找已有环境",creating:"环境初始化中",connecting:"正在连接已有环境"},initializationFailed:"AgentKit CLI 环境初始化失败,当前状态:{{status}}。",sessionExpired:"AgentKit CLI Session 不存在或已过期,请重试。",initializationTimeout:"AgentKit CLI 环境初始化超时,请稍后重试。",nonPersistent:"非持久化环境",recyclingHoursMinutes:"{{hours}} 小时 {{minutes}} 分钟后环境回收",recyclingMinutes:"{{minutes}} 分钟后环境回收",connectionError:`无法连接 Studio 服务,未收到服务端响应。 +{{value}}`,original:"原始错误:{{message}}",details:"详细信息"},uYe={ariaLabel:"Skill 文件树",viewSource:"查看源码",viewPreview:"查看预览",download:"下载",binaryFile:"二进制文件",bytes:"{{value}} 字节",binaryDescription:"当前接口仅返回文件元数据,可单独下载原文件。",metadata:"Skill 元数据",noFiles:"暂无文件"},dYe={close:"关闭",name:"名称",region:"地域",optionalDescription:"描述(可选)",cancel:"取消",create:"创建",creating:"创建中…",save:"保存",saving:"保存中…",upload:"上传",uploading:"上传中…",createSpaceTitle:"新建 Skill 空间",editSpaceTitle:"编辑 Skill 空间",uploadTitle:"上传到 {{name}}",createSpaceFailed:"创建 Skill 空间失败",updateSpaceFailed:"更新 Skill 空间失败",archiveValidationFailed:"Skill ZIP 格式校验失败",uploadFailed:"上传 Skill 失败",dropzone:"拖拽 Skill ZIP 到这里",chooseLocalFile:"或点击选择本地文件",archiveHelp:"ZIP 根目录需要包含 SKILL.md,也可以只包含一层包装目录。选择后仅检查格式,不会自动上传。",validating:"正在检查文件格式…",validationPassed:"格式检查通过:{{name}},共 {{count}} 个文件"},hYe={styles:{concise:"简洁实用",strict:"严谨稳健",tutorial:"教程友好",automation:"自动化优先",custom:"自定义",customFallback:"自定义风格"},stages:{preparing:"正在准备 Dev Sandbox",ready:"Skill 已生成并通过格式校验",failed:"生成失败",cancelled:"已停止",validating:"正在校验 Skill 格式",packaging:"正在整理文件",generating:"正在生成 Skill",repairingAgain:"正在再次修复",autoRepairing:"正在自动修复({{attempt}}/{{max}})"},validation:{fallback:"Skill 格式校验未通过",repairInstruction:"只修复下面列出的 Skill 格式错误,不要改变原有用途和内容范围。",recheckInstruction:"修复后重新检查目录结构、SKILL.md frontmatter 和所有文本文件。",nameTooLong:"Skill 名称不能超过 64 个字符",invalidName:"Skill 名称只能包含小写字母、数字和连字符",modelTooLong:"模型 ID 不能超过 128 个字符",invalidModel:"模型 ID 只能包含字母、数字、点、下划线、连字符、斜杠和冒号"},errors:{loadCapability:"读取 Dev Sandbox 配置失败",autoRepair:"自动修复格式错误失败",pollCandidate:"读取候选方案状态失败,正在重试",createCandidate:"创建候选方案失败",refine:"继续调整失败",repairAgain:"再次修复格式错误失败",selectSpace:"请选择上传的 Skill Space",unsupportedRegion:"当前 Skill 地域不受支持",upload:"上传 Skill 失败",download:"下载失败"},sessionMax:"Session 最长保留 1 小时",remaining:"剩余 {{minutes}}:{{seconds}}",unnamedSpace:"未命名 Skill Space",leaveConfirmation:"离开后将停止并释放正在运行的 Dev Sandbox,确定离开吗?",createTitle:"创建技能",optimizeTitle:"优化 {{name}}",skillFallback:"技能",back:"返回技能空间",home:"主页技能生成",basicInfo:"基本信息",goal:"目标",createIntentPlaceholder:"描述希望这个 Skill 完成什么任务",optimizeIntentPlaceholder:"描述希望如何优化当前 Skill",skillName:"Skill 名称",autoNamePlaceholder:"留空时自动生成",nameHelp:"仅支持小写字母、数字和连字符;留空时自动生成。",createPlans:"生成方案",optimizePlans:"优化方案",createPlansDescription:"按不同方案并行生成多个技能,您可以选择最佳结果",optimizePlansDescription:"按不同方案并行优化当前技能,您可以选择最佳结果",plan:"方案 {{count}}",remove:"移除",model:"模型",modelPlaceholder:"选择或输入模型 ID",style:"风格",customStyle:"自定义风格",customStylePlaceholder:"描述表达方式、严谨程度或输出偏好",addConfiguration:"添加配置",notConfigured:"管理员未配置",generate:"生成",candidates:"候选方案",progress:"进度",retryCandidate:"重试此方案",formatValidationFailed:"格式校验未通过",repairAgain:"再次修复",files:"文件",downloadZip:"下载 ZIP",loadingFiles:"正在读取文件…",filesPending:"生成过程中会在这里显示完整文件树",uploadToSpace:"上传到 Skill Space",loadingSpaces:"正在加载 Skill Space",selectSpace:"选择 Skill Space",continuePlaceholder:"继续调整这个候选方案",continue:"继续调整",uploading:"上传中…",overwrite:"覆盖原 Skill",uploadToSelectedSpace:"上传到 Skill Space",uploadToCurrentSpace:"上传到当前空间",allCandidatesFailed:"所有方案均创建失败,可分别重试。"},fYe={invalidFormat:"{{label}}格式错误。",recoveryStatus:"Skill 恢复点状态",errorResponse:"错误响应",errorDetails:"错误详情",missingContentType:"Content-Type 缺失",gatewayError:"{{fallback}}(HTTP {{status}},Content-Type: {{contentType}})。请检查代理或网关配置。",nonJson:"{{fallback}}:服务端返回非 JSON 响应(HTTP {{status}},Content-Type: {{contentType}}),请检查代理或网关配置。",activity:"Skill 会话活动",invalidActivity:"Skill 会话活动格式错误。",invalidToolActivity:"Skill 工具活动格式错误。",invalidTextActivity:"Skill 文本活动格式错误。",publication:"Skill 发布结果",task:"Skill 会话",file:"Skill 文件",unknownTaskState:"Skill 会话状态无法识别。",capability:"Skill 工作台能力",loadCapability:"读取 Skill 工作台能力失败",prepareTask:"准备 Skill 会话失败",taskReference:"Skill 会话引用",startOptimization:"开始优化 Skill 失败",startTask:"开始 Skill 会话失败",taskSummary:"Skill 会话摘要",taskList:"Skill 会话列表",loadTaskList:"读取 Skill 会话列表失败",invalidTaskList:"Skill 会话列表格式错误。",loadTask:"读取 Skill 会话失败",artifact:"Skill 产物",artifactFile:"Skill 产物文件",loadArtifact:"读取 Skill 产物失败",refine:"继续调整 Skill 失败",stop:"停止当前 Skill 任务失败",publish:"发布 Skill 失败",nonNdjson:"发布 Skill 失败:服务端返回了非 NDJSON 响应。",missingStream:"发布 Skill 失败:服务端没有返回进度流。",publishProgress:"发布进度",invalidPublishProgress:"发布进度格式错误。",publishError:"发布错误",unknownPublishEvent:"未知的发布进度事件。",publishResult:"发布结果",streamEnded:"发布进度流提前结束,无法确认发布结果。请刷新技能中心确认状态。",deleteTask:"删除 Skill 会话失败",download:"下载 Skill 失败"},Pdr=Object.freeze(Object.defineProperty({__proto__:null,api:fYe,configSelect:sYe,conversation:lYe,default:{configSelect:sYe,conversation:lYe,errorDetails:cYe,fileTree:uYe,management:dYe,generation:hYe,api:fYe},errorDetails:cYe,fileTree:uYe,generation:hYe,management:dYe},Symbol.toStringTag,{value:"Module"})),pYe={back:"返回上一页",reload:"重新加载",notConfigured:"未配置",name:"名称",description:"描述",delete:"删除",save:"保存",saving:"保存中",add:"添加",manage:"管理",environment:"环境",noDescription:"暂无描述",refresh:"刷新",close:"关闭",retry:"重试",loading:"加载中…",previousPage:"上一页",nextPage:"下一页",edit:"编辑",all:"全部",search:"搜索",cancel:"取消",view:"查看",viewDetails:"查看详情",deleting:"删除中…",create:"创建",creating:"创建中",adding:"添加中",generating:"生成中",uploading:"上传中",preview:"预览",loadFailed:"加载失败",select:"选择",collapse:"收起",expand:"展开",none:"无"},gYe={ariaLabel:"AgentKit 快速入口",closeAriaLabel:"关闭 AgentKit 欢迎卡片",title:"欢迎使用 AgentKit",description:"通过 AgentKit 平台快速构建与托管您的企业级智能体",docsAriaLabel:"打开 AgentKit 文档,在新窗口打开",docs:"文档",consoleAriaLabel:"打开 AgentKit 控制台,在新窗口打开",console:"控制台"},mYe={checkUpdates:"检查更新",checkingVersions:"正在检查版本…",versionCheckError:"查询沙箱版本失败,请检查凭据、区域及接口权限后重试",sandboxUpdateError:"Sandbox 更新失败,请刷新检查实际状态后重试",modelEnvRepairUnavailable:"无法补齐模型环境变量,请检查 CODEX_API_KEY 和 CODEX_BASE_URL",updateSandbox:"更新{{variant}}{{name}}",updatingSandbox:"更新中",title:"系统信息",description:"查看当前 Studio 版本及关联的基础资源",general:"通用",currentVersion:"当前版本",storage:"存储",loadingStorage:"正在加载存储信息",tosAddress:"TOS 地址",openTosConsole:"在云控制台中打开 TOS 存储桶",environmentBuild:"环境构建",loadingEnvironmentResources:"正在加载环境构建资源",environmentResourcesError:"环境构建资源加载失败,请检查云凭据后重试。",codePipelineWorkspace:"CodePipeline 工作空间",codePipelinePipeline:"CodePipeline 流水线",openCodePipelineWorkspace:"在云控制台中打开 CodePipeline Workspace",createdOnFirstBuild:"首次构建时自动创建",containerRegistryRepository:"Container Registry 仓库",openContainerRegistryRepository:"在云控制台中打开 Container Registry 仓库",sandboxInfo:"沙箱信息",loadingSandboxInfo:"正在加载沙箱信息",sandboxInfoError:"沙箱信息加载失败,请重试。",snapshot:"快照版",snapshotWithSpace:"快照版 ",openToolConsole:"在云控制台中打开{{name}}",updateModelEnv:"更新{{variant}}{{name}}模型环境变量",modelEnvUpdated:"已更新",modelEnvAlreadyCurrent:"无需更新",userPool:"用户池",loadingUserPool:"正在加载用户池",userPoolError:"用户池加载失败,请重试。",modelEnvUpdateError:"模型环境变量更新失败,请重试。",openUserPoolConsole:"在云控制台中打开用户池{{name}}",unnamedUserPool:"未命名用户池",id:"ID",domain:"域名",region:"区域",noLocalUserPool:"本地模式未配置用户池",noUserPool:"当前 Studio 未配置用户池"},vYe={workspace:"Agent 工作区",library:"Agent 库",evaluation:"评测",agentList:"Agent 列表",agentDetails:"Agent 详情",newAgent:"新建 Agent",loading:"加载中…",loadingCloudAgents:"正在加载云端 Agent…",noAgentSelected:"请选择一个 Agent",local:"本地",remote:"云端",localAgent:"本地 Agent",remoteAgent:"云端 Agent",agentCount:"{{count}} 个 Agent",agentCountLabel:"Agent 数量",details:"详情",chat:"对话",update:"更新",backToAgentList:"返回 Agent 列表",loadingAgent:"正在加载 Agent",loadingAgentDescription:"正在读取 Agent 配置和 Runtime 信息。",loadingAgentInfo:"正在加载 Agent 信息…",detailLoadFailed:"无法加载 Agent 详情",detailLoadFailedDescription:"请检查 Runtime 状态后重试。",partialInfoUnavailable:"部分信息暂时不可用",upgradeRuntimeForDetails:"请升级 Runtime 以查看完整 Agent 信息。",basicInfo:"基本信息",usageOverview:"使用概览",sections:{basic:"基本信息",profileConfig:"Profile 配置",sessionConfig:"会话配置",usage:"使用概览",diagnostics:"诊断",evaluations:"评测",optimizations:"优化建议",integrations:"集成",versions:"版本",channels:"消息渠道"},evaluationGroup:"评测组",optimizations:"优化建议",optimizationsDescription:"根据评测结果查看可执行的优化建议。",integrations:"集成",githubVersions:"GitHub 版本",githubVersionsDescription:"查看持续交付产生的版本并创建回退 PR。",currentVersionOnly:"当前未启用 GitHub 持续交付,仅展示当前生产版本。",loadingVersions:"正在加载版本…",noVersion:"暂无版本记录",prLink:"Pull Request",viewPr:"查看 PR",author:"提交人",publishStatus:"发布状态",viewRelease:"查看发布记录",rollbackToVersion:"回退到此版本",rollingBack:"正在创建回退…",rollbackEvent:"回退事件",sourceMergedRuntimeStill:"最新源码已合并,但 Runtime 仍处于",currentProductionVersionHint:";当前生产版本保持不变。",usageSummary:"使用统计",totalCalls:"总调用次数",userCount:"用户数",userDetails:"用户明细",usageUserList:"Agent 使用用户列表",user:"用户",callCount:"调用次数",lastUsed:"最近使用",unknownUser:"未知用户",loadingUsage:"正在加载使用数据…",refreshing:"刷新中…",noUsage:"暂无使用记录",usageUnavailable:"当前 Agent 暂无可用的使用统计。",usagePagination:"使用记录分页",pageOf:"第 {{page}} / {{total}} 页",notProvided:"暂未提供",integrationMethods:"集成方式",integrationDescription:"通过 Runtime API 或 A2A 协议集成当前 Agent。",integrationProtocol:"集成协议",runtimeStatus:"Runtime 状态",executionFlow:"执行流程",probingIntegration:"正在检测集成能力",probingIntegrationDescription:"正在读取可用端点和鉴权配置。",configurationStatus:"配置状态",discoveryEndpoint:"发现端点",invocationEndpoint:"调用端点",invocationUrl:"调用地址",authentication:"鉴权方式",networkAccess:"网络访问",notAvailable:"暂无",noAuthentication:"无需鉴权",noApiKeyRequired:"无需 API Key",usesOauthJwt:"使用 OAuth / JWT",showApiKey:"显示 API Key",hideApiKey:"隐藏 API Key",pythonExample:"Python 示例",deploymentConfig:"部署配置",deploymentConfigDescription:"确认实例和运行配置后更新 Runtime。",deploymentRegion:"部署区域",mpaControlPlane:"MPA 控制面",loadingMpaAgentView:"正在读取 MPA Runtime 绑定…",mpaRuntimeBound:"该 MPA Agent 已绑定唯一 Runtime,可继续管理。",mpaRuntimeMissing:"当前 Agent 没有可见的 MPA Runtime 绑定。",mpaRuntimeBindingAmbiguous:"多个 MPA Runtime 匹配当前 Agent,请先修复绑定后再修改。",mpaRuntimeOrphan:"Runtime 存在,但其中没有当前 MPA Profile。",mpaRuntimeLegacyAuthUnsupported:"该 Runtime 使用旧版 MPA 镜像,仍要求 X-Jwt-Token。请先更新到当前 AgentKit 兼容镜像,再管理 Profile 或 Session 配置。",profileConfig:"Profile 配置",profileConfigTitle:"Profile 配置",profileConfigDescription:"查看并应用 Agent 级 MPA Profile。Profile 是 Runtime 的长期默认配置,新会话默认继承它。",profileStatus:"Profile 状态",profileApplied:"已应用",profileNotApplied:"未应用",profileNotAppliedDescription:"当前 Runtime 可运行,但尚未保存为 Studio 可管理的 Profile。应用后会生成 Profile revision。",applyProfile:"应用 Profile",reapplyProfile:"重新应用 Profile",editProfile:"编辑 Profile",profileApplying:"应用中…",profileAppliedNotice:"Profile 已应用,当前 revision 为 {{revision}}。",profileApplyIncomplete:"Profile 应用未完成,请查看当前操作状态后重试。",profileApplyFailed:"Profile 应用失败。",profilePrompt:"系统提示词",profileResources:"资源配置",profileResourceSummary:"{{tools}} 个工具 · {{skills}} 个 Skill · {{mcp}} 个 MCP 服务",sessionConfigTitle:"会话配置",sessionConfigDescription:"查看和调整当前 MPA Session 的执行配置。变更只对下一轮对话生效。",loadingSessionConfig:"正在加载会话配置…",sessionConfigNoAgent:"请选择一个 MPA Agent 后再管理会话配置。",sessionConfigNonMpa:"会话配置仅适用于 MPA Agent。",sessionConfigNoSession:"请先打开这个 MPA Agent 的对话,再修改会话配置。",sessionConfigDifferentRuntime:"请先切回这个 MPA Agent 的当前对话,再修改会话配置。",sessionConfigSaved:"会话配置已更新,下一轮对话将使用新 revision。",sessionConfigStale:"该 Session 已被其他位置修改,已展示最新配置,请确认后再保存。",sessionConfigRevision:"配置 revision",sessionProfileRevision:"Session Profile revision",latestProfileRevision:"最新 Profile revision",sessionProfileUpgradeAvailable:"检测到新的 Profile revision:v{{current}} → v{{target}}。",upgradeSessionProfile:"升级 Session Profile",sessionProfileUpgrading:"升级中…",sessionProfileUpgraded:"Session Profile 已升级,下一轮对话将使用新 revision。",sessionProfileUpgradeFailed:"Session Profile 升级失败。",sessionModelOverride:"模型覆盖",modelId:"模型 ID",inheritProfileDefault:"继承 Profile 默认值",sessionMcpServers:"MCP 服务",mcpServerCount:"已选择 {{count}} 个",clearSessionMcp:"清空 MCP 服务",mpaDiagnosticsTitle:"Runtime 诊断",mpaDiagnosticsDescription:"查看最近的 Runtime Console 运行记录,以及 Agent、Profile、Turn、task 和 worker 关联。",loadingMpaDiagnostics:"正在加载 Runtime 诊断…",noMpaDiagnostics:"当前 Session 暂无 Runtime 诊断运行记录。",latestRun:"最近运行",traceCorrelation:"Trace 关联",traceCorrelationDescription:"Runtime Console 为本次 invocation 返回的稳定标识。",traceSteps:"Trace 步骤",traceStepsDescription:"当前 invocation 最近的有界 Runtime Console 步骤。",mpaInstanceId:"MPA 实例",turnId:"Turn ID",taskId:"Task ID",workerKind:"Worker 类型",workerSession:"Worker Session",workerTurn:"Worker Turn",workerProfile:"Worker Profile",workerProfileVersion:"Worker Profile 版本",step:"步骤",stepCount:"步骤数",duration:"耗时",noTraceSteps:"本次 invocation 暂无 trace 步骤。",executionConfigMode:{replace:"Session 覆盖",clear:"本 Session 已清空",inherit:"使用 Profile 默认值"},concurrency:"并发数",selectedOptimizations:"已选优化项",selectedOptimizationsDescription:"这些优化会应用到本次更新。",optimizationProfile:"优化方案",updatePending:"等待更新",updatingDeployment:"正在更新部署",restoringUpdateConfig:"正在恢复更新配置…",updateConfigUnavailable:"无法读取更新配置",legacyConfigMissing:"旧版本 Runtime 缺少可恢复的配置,请重新创建。",deploymentFailed:"部署失败",continueEditing:"继续编辑",loadingOptimizations:"正在加载优化建议…",noOptimizations:"暂无优化建议",fixPriority:"优先级",suggestedModule:"建议模块",suggestionAndReason:"建议与原因",priority:{high:"高",medium:"中",low:"低"},modules:{agentStructure:"Agent 结构",prompt:"提示词",tool:"工具",knowledge:"知识库",memory:"记忆",workflow:"工作流",other:"其他"},evaluationGroupList:"评测组列表",newEvaluationGroup:"新建评测组",newEvaluationGroupName:"新评测组 {{count}}",searchEvaluationGroups:"搜索评测组",noMatchingEvaluationGroups:"没有匹配的评测组",noEvaluationGroupSelected:"请选择一个评测组",groupStats:"{{agents}} 个 Agent · {{runs}} 次运行",evaluationGroupDetails:"评测组详情",evaluationGroupStats:"{{agents}} 个 Agent · {{caseSet}} · {{runs}} 次运行",startEvaluation:"开始评测",evaluationConfig:"评测配置",historyResults:"历史结果",participatingAgents:"参与 Agent",selectedCount:"已选择 {{count}} 个",evaluationResources:"评测资源",evaluationSet:"评测集",evaluator:"评估器",caseCount:"{{count}} 条案例",evaluationMetrics:"评测指标",selectedMetricCount:"已选择 {{count}} 项",historyDescription:"查看每次评测的分数和运行状态。",noHistory:"暂无评测历史",noHistoryDescription:"运行一次评测后,结果会显示在这里。",evaluationRun:"第 {{index}} 次评测",evaluationRunMeta:"{{time}} · {{agents}} 个 Agent",overallScore:"综合分",completed:"已完成",evaluationDefaults:{coreRegression:"核心能力回归",safetyCheck:"安全与幻觉检查",coreSet:"核心回归集",safetySet:"安全边界集",toolSet:"工具调用集",qualityEvaluator:"综合质量评估器",factualEvaluator:"事实一致性评估器",toolEvaluator:"工具调用评估器",responseQuality:"回答质量",factualAccuracy:"事实准确性",toolUse:"工具调用",responseEfficiency:"响应效率",todayTime:"今天 10:32",yesterdayTime:"昨天 16:08",julyTime:"7 月 25 日 14:20",justNow:"刚刚"},defaultCases:{agentName:"示例 Agent",goodSetName:"示例正向案例集",badSetName:"示例负向案例集",weeklyFeedback:{input:"总结本周客户反馈,并按优先级归类。",output:"覆盖主要问题,给出清晰的优先级与下一步动作。",tag:"总结",reason:"任务完整覆盖了用户目标,输出结构清晰,并给出了可执行的下一步动作。"},research:{input:"查询最新公开资料并附上来源。",output:"调用搜索工具,结论与引用一一对应。",tag:"工具调用"},uncertainConclusion:{input:"在信息不足时直接给出确定结论。",output:"应明确说明未知,并主动询问缺失信息。",tag:"幻觉",reason:"信息不足时仍给出了确定结论,缺少必要的澄清步骤与不确定性说明。"},repeatedTool:{input:"连续重复调用相同工具获取同一结果。",output:"复用已有结果,避免无意义的重复调用。",tag:"效率"}},goodCases:"正向案例",badCases:"负向案例",goodCase:"正向案例",badCase:"负向案例",reference:"参考答案",caseResultFilter:"案例结果筛选",feedbackSourceFilter:"反馈来源筛选",searchCases:"搜索案例",searchCasesPlaceholder:"搜索输入、输出或标签",selectCases:"选择案例",selectAll:"全选",selectAllVisible:"选择当前可见案例",selectedCaseCount:"已选择 {{count}} 条",deleteSelected:"删除所选",deleteSelectedTitle:"删除所选 Agent",deleteSelectionDescription:"确定删除所选的 {{count}} 个项目吗?此操作无法撤销。",deleteCasesConfirm:"删除所选案例",deleteOneCaseConfirm:"删除这个案例",deleteFeedbackCase:"删除反馈案例",noFeedbackCases:"暂无反馈案例",noMatchingCases:"没有匹配的案例",loadingEvaluationSet:"正在加载评测集…",userInput:"用户输入",agentOutput:"Agent 输出",score:"得分",scoreReason:"评分原因",noUserInput:"暂无用户输入",noVisibleResponse:"暂无可见回复",note:"备注:",manualFeedback:"人工反馈",automaticFeedback:"自动反馈",scoreValue:"{{score}} 分",unknownTime:"时间未知",deleteAgentTitle:"删除 Agent",deleteAgentDescription:"确定删除 Agent“{{name}}”吗?",deleteDraftDescription:"确定删除草稿“{{name}}”吗?",deleteAgent:"删除 Agent",closeDeleteConfirmation:"关闭删除确认",mpaDeletePreviewSummary:"Studio 会先删除可见的空闲 MPA Runtime 会话,再删除 AgentKit Runtime。运行中的任务需要先结束或停止后才能删除。",mpaDeletePreviewSessions:"会话",mpaDeletePreviewActiveSessions:"运行中",mpaDeletePreviewIdleSessions:"空闲",mpaDeleteBlocked:"当前无法删除",mpaDeleteBlockerActiveOperation:"仍有 MPA 创建或更新操作在执行。",mpaDeleteBlockerActiveSessions:"Runtime 中仍有运行中的会话。",mpaDeleteBlockerBindingAmbiguous:"当前 Agent 匹配到多个 MPA Runtime。",mpaDeleteBlockerRuntimeMissing:"当前 MPA Agent 没有可见的 Runtime 绑定。",mpaDeleteBlockerOrphanRuntime:"Runtime 可见,但其中缺少当前 MPA Profile。",mpaDeleteStage:{runtime_sessions:"删除 {{count}} 个可见空闲 Runtime 会话",runtime_diagnostics:"清理这些会话关联的诊断数据和挂载元信息",agentkit_runtime:"删除 AgentKit Runtime"},draftDeletionWarning:"草稿将从当前浏览器中删除。",runtimeDeletionWarning:"Runtime 和相关云端资源将被删除。",noneSelected:"尚未选择",none:"无",notPublished:"未发布",notRecorded:"未记录",noTime:"暂无时间",noPr:"暂无 PR",comingSoon:"评测能力即将开放",preparing:"准备中",cancelled:"已取消",failed:"失败",totalCount:"共 {{count}} 条",deploymentProgress:"部署进度",returnToEdit:"返回编辑",retryOperation:"重试操作",buildLog:"构建日志",githubMountLog:"GitHub 挂载日志",githubDeliveryMountLog:"GitHub 持续交付挂载日志",waitingBuildLog:"正在等待构建日志…",waitingGithubMountLog:"正在等待 GitHub 挂载日志…",copy:"复制",copied:"已复制",copyLabel:"复制{{label}}",copiedLabel:"已复制{{label}}",logLines:"{{count}} 行",logStatus:{synced:"已同步",failed:"读取失败",syncing:"同步中",earlyOmitted:"已省略早期日志",recentOnly:"仅显示最近的构建日志",partiallyOmitted:"已省略部分日志"},deployStatus:{running:"正在部署",unconfirmed:"部署状态待确认",success:"部署完成",error:"部署失败",cancelled:"部署已取消"},deploymentSteps:{prepare:{label:"准备部署",description:"校验配置并创建部署任务"},build:{label:"构建镜像",description:"生成运行环境与智能体代码"},deploy:{label:"部署服务",description:"创建并启动 AgentKit Runtime"},publish:{label:"发布服务",description:"等待服务就绪并生成访问地址"},complete:{label:"部署完成",description:"智能体已可以正常使用"},evaluation:{label:"创建评测集",description:"自动创建 Good Case 和 Bad Case 评测集"},profileApplying:{label:"应用 MPA 配置",description:"将 Studio Agent 配置写入 MPA Runtime"},smokeRunning:{label:"验证 MPA Runtime",description:"在标记可运行前执行 Runtime 就绪验证"},runnable:{label:"MPA Runtime 可运行",description:"Runtime 已接受配置并通过执行就绪验证"},github:{label:"挂载 GitHub 持续交付",description:"初始化目标分支与 GitHub Actions workflow"},update:{label:"更新实例配置",description:"将 Runtime 实例数调整为 {{min}}~{{max}}"}},githubStatus:{published:"已发布",publishing:"发布中",failed:"发布失败",pending:"等待发布",unknown:"未知"},errors:{agentInfoMissing:"Agent 信息不可用",checkUpdateCapability:"无法检查更新能力",checkingUpdateConfig:"正在检查更新配置",cloudOnlyUpdate:"仅云端 Agent 支持更新",deleteDeployedUnsupported:"当前不支持删除已部署 Agent",deleteDraftUnsupported:"当前不支持删除草稿",loadMpaDeletePreview:"无法加载 MPA 删除预览",loadAgentInfo:"无法加载 Agent 信息",loadApiKey:"无法读取 API Key",loadGithubVersions:"无法加载 GitHub 版本",loadEvaluations:"无法加载评测案例",loadMpaAgentView:"无法加载 MPA Agent 状态",loadMpaDiagnostics:"无法加载 Runtime 诊断",loadOptimizations:"无法加载优化建议",loadRuntimeDetails:"无法加载 Runtime 详情",loadSessionConfig:"无法加载会话配置",loadUsage:"无法加载使用数据",noCreatePermission:"当前账号没有创建 Agent 的权限",noManagePermission:"当前账号没有管理此 Agent 的权限",originalConfigUnavailable:"原始配置不可用",probeIntegration:"无法检测集成能力",rollbackVersion:"无法创建版本回退",runtimeRegionMissing:"Runtime 区域信息缺失",updateCapabilityMismatch:"Runtime 更新能力与当前配置不匹配",updateCapabilityPending:"Runtime 更新能力仍在确认中",updateConfigRestoring:"正在恢复更新配置",updateUnsupported:"当前 Runtime 不支持更新",usageMismatch:"返回的使用数据与当前 Agent 不匹配"}},yYe={title:"环境",loadFailed:"环境加载失败,请检查存储配置后重试。",storageUnavailable:"管理员未配置持久化存储,环境管理暂不可用。",create:"新建环境",configure:"配置环境",details:"环境详情",editorDescription:"配置运行环境,或接入代码仓库和已有镜像",backToList:"返回环境列表",save:"保存环境",createAndBuild:"创建并构建",saveAndBuild:"保存并构建",name:"环境名称",namePlaceholder:"Python 数据处理",descriptionPlaceholder:"说明这个环境适合处理的任务",creationMethod:"创建方式",baseConfiguration:"基础配置",baseEnvironment:"基础环境",operatingSystem:"操作系统",pythonVersion:"Python 版本",fixedByBase:"由 {{base}} 固定为 {{value}}",selectUbuntuVersion:"选择基础镜像的 Ubuntu 版本",selectPythonVersion:"选择需要安装的 Python 版本",skills:"技能",addSkill:"添加环境技能",veadkDescription:"Agent 开发与运行框架",customDockerfile:"自定义 Dockerfile",presetEnvironment:"预制环境",presetHint:"选择“无”可自行填写 Dockerfile 第一行的基础镜像。",dockerfileSize:"{{size}} / {{max}} 字节",upload:"上传",reset:"重置",dockerfileBaseImage:"Dockerfile 基础镜像",dockerfileContent:"Dockerfile 内容",region:"区域",search:"搜索环境",manualImport:"手动导入",noMatches:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称",startBuild:"开始构建",build:"构建",unnamed:"未命名环境",listSeparator:"、",clipboardReadError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",creation:{custom:{label:"自定义配置",description:"通过表单选择基础环境、Python、工具和技能"},dockerfile:{label:"自定义 Dockerfile",description:"上传或直接编辑 Dockerfile"},git:{label:"从代码仓库构建",description:"探查公开仓库并通过 CodePipeline 构建"},image:{label:"使用已有镜像",description:"绑定由外部流水线交付的 CR 镜像"}},baseDescriptions:{"aio-sandbox":"内置 Sandbox Shell 能力 · Ubuntu 22.04","codex-sandbox":"内置 Codex CLI、浏览器与代码执行环境",ubuntu:"标准 Linux 基础镜像"},dockerfileValidation:{baseImageRequired:"请填写基础镜像。",duplicateFrom:"基础镜像已固定在第一行,请删除 Dockerfile 正文中的 FROM 指令。",tooLarge:"Dockerfile 不能超过 128 KiB。",empty:"Dockerfile 内容不能为空。",missingFrom:"Dockerfile 缺少 FROM 指令。"},presets:{none:"自行填写 Dockerfile 基础镜像",aio:"内置 Sandbox Shell 与常用运行时",codex:"内置 Codex CLI、浏览器与代码执行环境"},categories:{tools:"工具",productivity:"效率",browser:"浏览器自动化",system:"系统与媒体"},options:{"lark-cli":"飞书开放平台命令行工具",pandoc:"文档格式转换工具",opencli:"将网站与桌面应用转换为命令行工具",uv:"快速 Python 包与项目管理器",ripgrep:"高性能文本检索工具",jq:"JSON 查询与转换工具","github-cli":"在终端中管理 GitHub 工作流",playwright:"浏览器自动化与端到端测试",chromium:"无头浏览器运行时",git:"代码版本管理",curl:"网络请求与文件下载",ffmpeg:"音视频转码与处理",imagemagick:"图片转换与批处理"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒",hoursMinutes:"{{hours}} 小时 {{minutes}} 分"},buildStatus:{preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"构建失败",notBuilt:"未构建"},manifest:{title:"环境 Manifest",closeLabel:"关闭环境 Manifest",loading:"正在加载 Manifest",editorLabel:"环境 Manifest YAML",copyFailed:"复制失败,请重试",copied:"已复制",copy:"复制 Manifest",view:"查看环境 Manifest",viewShort:"查看 Manifest",unavailable:"尚无可用 Manifest"},buildDetails:{title:"构建详情",closeLabel:"关闭构建详情",currentStep:"当前步骤",waiting:"等待构建信息",elapsed:"已用时",sourceCommit:"源码提交",openCodePipeline:"在 CodePipeline 中查看",starting:"正在启动",rebuild:"重新构建"},git:{sectionLabel:"公开代码仓库",address:"Git 地址",ref:"Branch、Tag 或 Commit",defaultBranch:"默认分支",inspecting:"正在拉取仓库并查找 Dockerfile",foundDockerfiles:"已在提交 {{commit}} 中找到 {{count}} 个 Dockerfile。",savedDockerfileLoaded:"已载入保存的 Dockerfile,可重新探查仓库更新。",noDockerfile:"仓库中未找到 Dockerfile,请检查分支或仓库内容。",inspectAgain:"重新探查",selectDockerfile:"选择 Dockerfile"},repository:{outputSection:"构建输出",type:"镜像仓库类型",managed:"Studio 默认镜像仓库",existing:"已有镜像仓库",managedHint:"构建时自动创建或复用当前区域的 Studio 镜像仓库。"},existingImage:{sectionLabel:"已有镜像",reference:"Tag 或 Digest",placeholder:"latest 或 sha256:...",hint:"填写镜像 Tag,或以 sha256: 开头的完整 Digest。"},share:{action:"分享",title:"分享环境",closeLabel:"关闭分享环境",generating:"正在生成并复制分享码",copied:"分享码已复制",failed:"分享失败",code:"分享码",fullCode:"完整环境分享码",copiedHint:"分享码已自动复制,也可在这里查看或手动复制。",copyFailedHint:"自动复制失败,可手动复制上方分享码,或重试。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅发送给可信对象。",copyAgain:"再次复制"},import:{title:"导入环境",closeLabel:"关闭导入环境",description:"先检测分享码中的环境,再确认添加到当前账号。",code:"环境分享码",tooMany:"最多可一次导入 {{max}} 个环境,当前检测到 {{count}} 个分享码。",multipleHint:"多个分享码可使用英文逗号、中文逗号或换行分隔,重复项会自动忽略。",safety:"分享码可能包含环境配置与本地 Skill 内容,请仅导入可信来源的分享码。",inspectingCodes:"正在检测环境分享码",found:"检测到 {{count}} 个环境:{{names}}。",itemError:"第 {{index}} 个分享码:{{error}}",invalidCode:"分享码无效。",noResult:"服务未返回该分享码的导入结果。",partial:"已导入 {{created}} 个环境,{{remaining}} 个未完成,可重试有效失败项。",inspecting:"正在检测",importing:"正在导入",retryImport:"重试导入",confirm:"确认导入",inspectCodes:"检测分享码"},status:{boundImage:"环境“{{name}}”已绑定已有镜像",queued:"环境“{{name}}”已进入构建队列",savedBuildFailed:"环境已保存,但构建未启动:{{error}}",importedFailed:"已导入 {{created}} 个环境,{{failed}} 个失败",importedDuplicate:"已导入 {{created}} 个环境,{{duplicate}} 个分享码已存在",imported:"已导入 {{count}} 个环境",deleted:"已删除环境“{{name}}”"},deleteTitle:"删除环境",deleteDescription:"确定删除环境“{{name}}”吗?删除后无法恢复。",errors:{repositoryRequired:"请输入公开代码仓库地址。",repositoryHttps:"请输入公开仓库的 HTTPS 地址。",repositoryInvalid:"请输入有效的公开仓库 HTTPS 地址。",imageReferenceWhitespace:"Tag 或 Digest 不能包含空格。",imageDigestInvalid:"Digest 必须是完整的 sha256 值。",imageTagOnly:"这里只填写 Tag,不要重复填写镜像仓库路径。"}},bYe={searchPlaceholder:"搜索资源名称",emptyMessage:"暂无可用选项",searchAriaLabel:"搜索{{label}}",loadingMore:"正在加载更多资源…"},xYe={retryDeployment:"重试部署",retrying:"正在重试…",collapse:"收起错误信息",expand:"展开完整错误信息",copy:"复制完整错误信息"},wYe={steps:"构建步骤",log:"构建日志",syncing:"同步中",loadFailed:"读取失败",synced:"已同步",recentOnly:" · 仅显示最近日志",copiedLog:"已复制构建日志",copyLog:"复制构建日志",copied:"已复制",copy:"复制",logContent:"构建日志内容",waiting:"正在等待 CodePipeline 输出日志…",empty:"暂无构建日志"},AYe={defaultLabel:"Studio 默认环境",defaultDescription:"使用 Studio 预置的标准运行环境",status:{notBuilt:"未构建",preparing:"准备中",queued:"排队中",building:"构建中",scanning:"扫描中",available:"可用",failed:"失败"},label:"运行环境",placeholder:"请选择运行环境",search:"搜索运行环境",loading:"正在加载运行环境…",loadFailed:"加载运行环境失败",noMatches:"未找到匹配的运行环境",unavailable:"当前没有可用的运行环境",selectionUnavailable:"所选运行环境当前不可用,请重新选择。",selectionHint:"选择构建完成的运行环境后,部署将使用其镜像和工具配置。",versionChanged:"所选环境版本已更新,请确认后继续。",versionMissing:"所选环境版本已不存在,请重新选择。",operatingSystem:"操作系统",language:"语言",image:"镜像",imageVersion:"镜像版本",skills:"技能",tools:"工具",noSkills:"未配置 Skill",noExtraTools:"未配置额外工具",defaultGuidance:"默认环境由 Studio 管理,无需额外配置。",persistenceFallback:"持久化环境服务暂不可用,当前使用默认环境。",emptyFallback:"当前没有可选择的自定义环境。"},SYe={repository:"GitHub 仓库",githubUrl:"GitHub 地址",token:"访问令牌",sessionToken:"{{provider}} 临时令牌",runtime:"Runtime",commit:"提交",workflow:"工作流",syncFailed:"同步 GitHub 代码失败",status:{mounted:"已挂载",bound:"已绑定",synced:"已同步",created:"已创建"},volcengine:"火山引擎",mountDelivery:"挂载持续交付",selectedForDeployment:"已选择,部署时挂载",mountOnDeploy:"部署时挂载持续交付",syncCode:"同步代码",deliveryMode:"GitHub 交付模式",sourceSync:"GitHub 代码同步",delivery:"GitHub 交付",loading:"读取中",running:"执行中",runtimeDeliveryHint:"写入 AgentKit Runtime GitHub Actions workflow,后续 GitHub 提交会更新绑定 Runtime。",initialDeliveryHint:"首次部署成功后初始化目标分支,后续 GitHub 提交会更新绑定 Runtime。",sourceSyncHint:"Studio 会直接 push 到目标分支;该分支由 Studio 管理,远端冲突时同步会失败。Runtime 仍由部署按钮发布。",tokenPlaceholder:"repo 或 contents write 权限",getToken:"获取 Token",hideToken:"隐藏 Token",showToken:"显示 Token",tokenHelp:"Token 仅用于本次操作,成功后不会保留在表单中。",targetBranch:"目标分支",actionsSecretPlaceholder:"用于写入 GitHub Actions Secret",sessionTokenPlaceholder:"临时凭证可选",syncing:"同步中…",pendingHint:"已选择挂载持续交付。点击部署后,Studio 会等待 Runtime 创建完成并初始化 GitHub 目标分支,初始化成功后才完成部署流程。",result:{deliveryMounted:"已挂载持续交付",deliverySelected:"已选择挂载持续交付",githubBound:"已绑定 GitHub",codeSynced:"代码已同步",deliveryHint:"目标分支提交会触发 Runtime 持续交付。",boundHint:"更新并发布时会先同步当前源码到这个分支。"},branch:"分支",viewPr:"查看 PR",createFailed:"创建失败",phase:"阶段",log:"日志"},TYe={name:"飞书",enabling:"正在启用并更新配置…",description:"接收消息并通过飞书机器人回复",configuration:"飞书配置",configurationMode:"飞书配置方式",automatic:"自动配置",manual:"手动配置",cancelling:"取消中…",scanToCreate:"扫码创建",scanDescription:"授权后自动回填凭据",generateQrCode:"生成二维码",qrCodeAlt:"飞书机器人配置二维码",scanToConfirm:"飞书扫码确认",expiresIn:"{{time}} 后失效",created:"机器人已创建",credentialsFilled:"应用凭据已自动回填",qrCodeExpired:"二维码已失效",automaticFailed:"自动配置失败",regenerateQrCode:"请重新生成二维码。",configuredPlaceholder:"已配置,留空沿用",appSecretPlaceholder:"请输入 App Secret",hideSecret:"隐藏 App Secret",showSecret:"显示 App Secret"},CYe={mode:{auto:"自动创建",autoDescription:"部署时自动创建所需资源",recommended:"推荐",create:"指定名称",createDescription:"使用指定名称创建或复用资源",existing:"选择已有",existingDescription:"从当前账号的已有资源中选择"},selectExisting:"请选择已有资源",searchResource:"搜索资源名称",noMatch:"未找到匹配资源",noAvailable:"暂无可用资源",searching:"正在搜索云资源…",loading:"正在加载云资源…",noMatchSentence:"未找到匹配资源。",noAvailableSentence:"暂无可用资源。",loadedSummary:"实际服务区域:{{region}} · 已加载 {{loaded}}{{total}}",registryInstance:"Registry 实例",registryAriaLabel:"镜像仓库 Registry 实例",namespace:"命名空间",namespaceAriaLabel:"镜像仓库 Namespace",repository:"镜像仓库",existingRepository:"已有镜像仓库",selectRegistryFirst:"请先选择 Registry 实例。",selectNamespaceFirst:"请先选择 Namespace。",configurationMode:"配置方式",configurationModeAriaLabel:"{{resource}}配置方式",selectConfigurationMode:"请选择配置方式",automaticNames:"自动创建名称",validation:{tos:"请填写或选择 TOS 存储桶。",cr:"请完整填写或选择 CR 实例、命名空间和镜像仓库。",codePipeline:"请完整填写或选择 CodePipeline Workspace 和 Pipeline。",existingCodePipeline:"请选择已有的 CodePipeline Workspace 和兼容 Pipeline。"},autoBucketWithRegion:"agentkit-platform-{账号 ID}-{{region}}",autoBucket:"agentkit-platform-{账号 ID}",tosBucket:"TOS 存储桶",bucketName:"存储桶名称",bucketNamePlaceholder:"输入存储桶名称",existingBucket:"已有存储桶",existingTosBucket:"已有 TOS 存储桶",bucket:"存储桶",accountIdResolved:"账号 ID 在部署时按当前云账号解析。",containerRegistry:"容器镜像仓库(CR)",instanceName:"实例名称",crInstance:"CR 实例",existingCrInstance:"已有 CR 实例",existingCrNamespace:"已有 CR 命名空间",existingCrRepository:"已有 CR 镜像仓库",autoRegistry:"agentkit-platform-{账号 ID}",autoRepositoryName:"{{name}}-{4 位随机字符}",registryNameNote:"账号 ID 在部署时解析,镜像仓库的随机字符在部署时生成。",workspace:"工作空间",pipeline:"流水线",workspaceName:"Workspace 名称",pipelineName:"Pipeline 名称",existingWorkspace:"已有 CodePipeline Workspace",compatiblePipeline:"兼容 Pipeline",existingPipeline:"已有 AgentKit CodePipeline",pipelineNameNote:"Pipeline 与 Runtime 名称一致。"},kYe={commit:"提交",steps:{permissions:"预检 OTA 所需权限",resolving:"读取目标版本信息",downloading:"下载并校验完整更新包",preparing:"准备 VeFaaS Function 代码",provisioning:"检查并补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布新 Revision 并重启服务"},stages:{permissions:"预检 OTA 权限",resolving:"读取版本信息",downloading:"下载更新包",preparing:"准备 Function 代码",provisioning:"补齐 Studio 云资源",scheduler:"更新定时任务调度服务",submitting:"提交 Function 更新",publishing:"发布 Revision",checking:"检查更新",unknown:"未知阶段"},duration:{seconds:"{{count}} 秒",minutesSeconds:"{{minutes}} 分 {{seconds}} 秒"},logPermissionPrefix:"无法读取 VeFaaS 发布日志。Function 角色缺少 ",logPermissionSuffix:" 权限,更新会继续。",openIamConsole:"前往 IAM 控制台配置权限",deploymentProgress:"部署进度",live:"实时",completed:"已完成",stopped:"已停止",copied:"已复制",copyFailed:"复制失败",copyLog:"复制日志",waitingForLogs:"等待 VeFaaS 返回更新日志…",noLogs:"本次更新未返回发布日志",messages:{updated:"Studio 已更新,新 Revision 已接管服务",failed:"Studio 更新失败",timeout:"等待 VeFaaS 发布超时,请稍后重新检查版本",submitted:"更新已提交,正在等待 VeFaaS 发布新版本",connectionSwitched:"连接已切换,正在确认新版本状态"},checkingPermissions:"正在检查 OTA 权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",updated:"Studio 已更新",updateToVersion:"更新 Studio 至 {{version}}",checkPermissions:"检查更新权限",authorizationNeeded:"需要授权",updatingShort:"正在更新",refreshForNewVersion:"刷新使用新版",updateFailed:"更新失败",updateNow:"立即更新",newVersionAvailable:"有新版更新",dialog:{failed:"Studio 更新失败",checkingPermissions:"正在检查更新权限",authorizationRequired:"需要 IAM 授权",updating:"正在更新 Studio",completed:"Studio 更新完成",newVersion:"发现新版本"},permissionCheck:"正在核对 OTA 与定时任务所需的全部 IAM 权限…",permissionCheckHint:"权限全部满足后才会开始下载、更新或发布云资源。",missingPermissionCount:"当前 Function 角色缺少 {{count}} 项 OTA 更新权限,尚未执行任何云资源变更。",functionRole:"Function 角色",currentRole:"当前运行角色",policyToUpdate:"将更新策略",authorizationSteps:{open:"打开授权页面,确认已预填的策略名称和完整策略内容。",debug:"点击页面中的“发起调试”,完成策略更新。",return:"返回此窗口,点击“我已授权,重新检查”。"},missingPermissions:"缺少的权限",openPrefilledAuthorization:"打开已预填的 IAM 授权页面",openIamManually:"前往 IAM 控制台手动配置",noSafePolicy:"当前角色没有唯一可安全更新的自定义策略,请由管理员将上述权限加入该角色。",failedStage:"失败阶段",errorId:"错误 ID",notGenerated:"未生成",openFunctionLogs:"前往 VeFaaS 控制台查看 Function 日志",targetVersion:"目标版本",updateStatus:"更新状态",elapsed:"已用时",progressAriaLabel:"Studio 更新进度",processingUpdate:"正在处理更新",processing:"正在处理",backgroundHint:"发布阶段会短暂中断连接;关闭此窗口不会停止更新,可随时点击右上角按钮重新查看。",confirmDescription:"更新会重启 Studio 服务,预计约 3–5 分钟完成更新与发布。期间正在进行的对话、流式响应或部署任务可能中断,登录态不会受到影响。",selectVersion:"选择版本",currentVersion:"当前版本",changelog:"更新内容",noChangelog:"暂无更新说明",runInBackground:"后台运行",authorizedRecheck:"我已授权,重新检查",tryAgain:"重新尝试"},OYe={deploy:"部署",update:"更新",planHash:"方案哈希",backToConfiguration:"返回配置",releaseRegion:"发布区域",deployRegion:"部署区域",regionPreserved:"更新时沿用现有 Runtime 的部署区域,无法修改。",unnamedAgent:"未命名 Agent",deployTitle:"部署 {{name}}",additionalAgentCount:" 等 {{count}} 个智能体",releaseOverview:"发布概览",agentOverview:"Agent 概览",agentCount:"Agent 数量",model:"模型",systemPrompt:"系统提示词",optimizations:"优化选项",notEnabled:"未启用",effectiveCapabilities:"生效能力",automaticProtection:"自动保护",artifactActions:"发布产物操作",exportYaml:"导出 YAML",viewSource:"查看源代码",downloadSource:"下载源代码",expandFlow:"放大查看执行流程",expand:"放大查看",deploymentConfiguration:"部署配置",runtimeName:"Runtime 名称",runtimeNamePreserved:"更新时保持现有 Runtime 名称不变。",runtimeNameHint:"默认根据 Root Agent 名称生成,并添加随机后缀避免重名;支持 4-64 位字母、数字、连字符和下划线",accessAuthentication:"访问鉴权",authenticationPreserved:"更新时保持现有 Runtime 的鉴权方式不变。",authenticationMethod:"鉴权方式",authenticationAriaLabel:"部署鉴权方式",authenticationPlaceholder:"请选择鉴权方式",messageChannels:"消息渠道",instanceSettings:"实例设置",minInstances:"最小实例数",maxInstances:"最大实例数",sidecarSingleInstance:"Harness Sidecar 首期仅支持单实例,Runtime 固定为 1~1",inMemorySingleInstance:"为避免多实例间会话丢失,推荐将 Runtime 固定为 1~1",network:"网络",networkPreserved:"现有 Runtime 的区域与网络模式保持不变。",networkMode:"网络模式",networkModes:{public:"公网",both:"公网 + VPC"},subnetId:"子网 ID",subnetHint:"可选,多个用逗号分隔",sharedInternetAccess:"VPC 内共享公网出口",evaluationSets:"评测集",createEvaluationSets:"自动创建评测集",createEvaluationSetsHint:"部署成功后,自动创建 Good Case 和 Bad Case 评测集。",resourceConfiguration:"资源配置",environmentVariables:"环境变量",environmentVariablesHint:"组件配置会自动同步到这里,部署前可核对最终值。",itemCount:"{{count}} 项",addVariable:"添加变量",componentGenerated:"组件自动生成",injectedByApiKey:"由所选 API Key 注入",envNameAriaLabel:"{{key}} 环境变量名",envDescriptionAriaLabel:"{{key}}说明:{{description}}",openOpenViking:"打开 OpenViking {{label}}",openOpenVikingAriaLabel:"{{key}}:打开 OpenViking {{label}}",requiredEmpty:"必填,尚未填写",optionalEmpty:"可选,尚未填写",envValueAriaLabel:"{{key}} 环境变量值",automatic:"自动",synced:"同步",customModelCredentials:"自定义模型凭据",releaseOnlySecret:"必填,仅用于本次发布",thisRelease:"本次发布",customVariables:"自定义变量",value:"值",deleteVariable:"删除变量",deploymentProgress:"部署进度",retryUpdate:"重试更新",retryDeploy:"重试部署",updateSucceeded:"更新成功",deploySucceeded:"部署成功",region:"区域",agentName:"Agent 名称",apiEndpoint:"API 端点",connecting:"连接中…",chatNow:"立即对话",console:"控制台",actionInProgress:"{{action}}中…",checkingName:"正在检查名称…",retryAction:"重试{{action}}",flowPreview:"执行流程预览",executionFlow:"执行流程",flowPreviewHint:"只读预览,可缩放与拖动画布",closeFlowPreview:"关闭执行流程预览",agentAdded:'Agent "{{name}}" 已添加到左上角下拉列表!',files:{preview:"文件预览",new:"新建文件",empty:"暂无文件",noneSelected:"未选择文件",selectToView:"选择左侧文件以查看内容",loadingEditor:"加载编辑器…",rename:"重命名",renamePrompt:"重命名文件"},apiKey:{selectFirst:"请先选择 API Key",revealing:"正在显示 API Key",hide:"隐藏 API Key",retryReveal:"重试显示 API Key",reveal:"显示 API Key"},task:{preparing:"准备部署",waitingBuildLog:"正在等待构建日志…",waitingGithubLog:"正在等待 GitHub 挂载日志…",syncingGithub:"正在同步当前源码到 GitHub",syncGithubCode:"同步 GitHub 代码",githubSynced:"GitHub 代码已同步",githubSubmitted:"GitHub 代码已提交",githubUpdatingRuntime:"代码已提交到 GitHub,GitHub Actions 正在更新同一个 Runtime",initializingGithub:"开始初始化 GitHub main 分支与 Actions workflow",initializingGithubBranch:"正在初始化 GitHub 持续交付目标分支",mountGithubDelivery:"挂载 GitHub 持续交付",githubBranchInitialized:"GitHub 持续交付已初始化目标分支",githubDeliveryMounted:"GitHub 持续交付已挂载",githubMountFailed:"挂载 GitHub 持续交付失败",githubMountFailedDetail:"GitHub 持续交付挂载失败:{{message}}",githubMountFailedHint:"挂载 GitHub 持续交付失败,详见 GitHub 日志。",applyingMpaProfile:"正在将 Agent 配置应用到 MPA Runtime",mpaProfileApplied:"MPA Runtime 配置已应用",runningMpaSmoke:"正在验证 MPA Runtime 执行链路",mpaReady:"MPA Runtime 已可运行",deploymentComplete:"部署完成",deployedNotConnected:"部署完成,暂未连接",cancelled:"已取消",cancelledHint:"部署已取消,相关 Runtime 资源已请求销毁。",deploymentStatusUnconfirmed:"部署状态待确认",deploymentFailed:"部署失败",buildFailedHint:"构建镜像失败,详见构建日志。"},confirm:{updateTitle:"确认更新",deployTitle:"确认部署",closeLabel:"关闭部署确认",updateDescription:"将更新并发布到当前云端 Runtime,过程可能需要几分钟。确定继续吗?",deployDescription:"将创建新的云端 Runtime,部署过程可能需要几分钟。确定继续吗?",update:"确定更新",deploy:"确定部署"},userPool:{label:"用户池",unnamed:"未命名用户池",current:"当前用户池",ariaLabel:"部署用户池",loading:"正在加载用户池…",placeholder:"请选择用户池",loadingIdentity:"正在加载 Identity 用户池…",empty:"当前账号下暂无 Identity 用户池。",currentHint:"当前 Studio 的登录 JWT 将透传访问此 Runtime。",mismatchHint:"所选用户池不是当前 Studio 使用的用户池,部署后无法从 Studio 调用此 Runtime。",markedHint:"当前 Studio 使用的用户池已在列表中标注。"},authentication:{apiKeyDescription:"默认方式,使用 Runtime API Key 访问",userPool:"用户池",userPoolDescription:"使用 Identity 用户池签发的 JWT"},steps:{buildImage:"构建镜像",deploy:"部署",publish:"发布",syncCode:"同步代码",uploadPackage:"上传代码包",packageImage:"镜像打包",createRuntime:"创建 Runtime",publishService:"发布服务",updateInstances:"更新实例配置",createEvaluationSets:"创建评测集",applyMpaProfile:"应用 MPA 配置",verifyMpaRuntime:"验证 MPA Runtime",mpaReady:"MPA Runtime 可运行"},errors:{instanceRangeInteger:"最小实例数必须为大于等于 0 的整数,最大实例数必须为大于 0 的整数。",instanceRangeOrder:"最小实例数不能大于最大实例数。",selectApiKey:"请先在模型配置中选择 API Key。",loadApiKey:"加载 API Key 失败,请重试。",invalidProject:"项目数据无效",updateFeishu:"更新飞书配置失败:{{message}}",userPoolRequired:"请选择用于 Runtime 鉴权的用户池。",vpcRequired:"使用 VPC 网络时,请填写 VPC ID。",modelSecretRequired:"请填写 {{label}},用于访问对应的自定义模型地址。",managedApiKeyRequired:"{{requirement}},请先返回模型配置选择 API Key。",feishuEnvRequired:"启用飞书后,请填写{{field}}。",runtimeNameExists:"Runtime 名称已存在,请修改后重试。",deployedButGithubMountFailed:"部署成功,但挂载 GitHub 持续交付失败:{{message}}",deployedButGithubBindFailed:"部署成功,但绑定 GitHub 失败:{{message}}",mpaRuntimeIdMissing:"部署成功,但返回缺少 Runtime ID,无法应用 MPA 配置。",mpaOperationIncomplete:"MPA Runtime 初始化未完成,请重试此部署任务。",deploymentStatusUnconfirmed:"连接已中断,当前无法确认部署最终状态。任务可能仍在云端运行,请到 AgentKit 或 Code Pipeline 查看同一任务,避免重复部署。",failedAtStage:"{{action}}失败({{stage}}阶段):{{message}}",noAgentAtEndpoint:"连接成功,但该地址未发现任何 Agent(/list-apps 为空)。",addAgent:"添加 Agent 失败:{{message}}",modelApiKeyRequired:"请填写此模型地址对应的 API Key。"}},EYe={title:"工作区",storageUnavailable:"管理员未配置持久化存储,工作区管理暂不可用。",detail:"工作区详情",create:"新建工作区",editorDescription:"将常用环境组合在一起;同一个环境可以加入多个工作区。",backToList:"返回工作区列表",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",createdAt:"创建时间",updatedAt:"最近更新",basicInfo:"基本信息",namePlaceholder:"例如:内容生产",descriptionPlaceholder:"说明这个工作区的用途",selectedEnvironmentCount:"已选择 {{count}} 个,可在其他工作区中继续复用",searchAvailableEnvironments:"搜索可用环境",searchEnvironments:"搜索环境",noAvailableEnvironments:"还没有可添加的环境",createEnvironmentFirst:"请先在“环境”页面创建并构建环境。",noMatchingEnvironments:"没有匹配的环境",tryAnotherName:"请尝试搜索其他名称。",environmentStatus:{available:"可用",building:"构建中",notBuilt:"未构建"},added:"已添加",saved:"已保存工作区“{{name}}”",resourceType:"工作区资源类型",searchWorkspaces:"搜索工作区",loadFailed:"无法加载工作区",noMatchingWorkspaces:"没有匹配的工作区",tryAnotherNameOrEnvironment:"请尝试搜索其他名称或环境",noEnvironmentAdded:"未添加环境",environmentMissing:"环境缺失",availableFraction:"{{available}}/{{total}} 可用",available:"可用",availableCount:"{{count}} 个可用",updated:"更新",addEnvironment:"添加环境",deleteTitle:"删除工作区",deleteDescription:"确定删除工作区“{{name}}”吗?环境本身不会被删除。",deleted:"已删除工作区“{{name}}”",clipboardPermissionError:"未能读取剪贴板。请允许剪贴板权限,或点击“导入环境”后手动粘贴分享码。",clipboardUnsupported:"当前浏览器无法自动读取剪贴板;请点击“导入环境”后手动粘贴分享码。",codeProjects:"代码项目"},_Ye={back:"返回",detailNavigation:"详情导航",noData:"暂无数据",actions:"操作",moreActions:"更多操作 {{label}}",actionsFor:"{{label}} 操作",loading:"资源加载中,请稍候"},RYe={addSkill:"添加 Skill",remove:"移除 {{name}}",confirmRemoveRuntime:"从新版本中移除运行中的 Skill「{{name}}」?",selectedCount:"已加入技能 · {{count}}",close:"关闭{{label}}",sources:{runtime:"运行中来源 · 原样保留,可移除或用同名 Skill 替换",local:"本地",skillspace:"AgentKit Skills 中心",skillhub:"火山 Find Skill 技能广场"},tabs:{local:"本地文件",localShort:"本地文件",skillspace:"AgentKit Skills 中心",skillspaceShort:"AgentKit",skillhub:"火山 Find Skill 技能广场",skillhubShort:"Find Skill"}},DYe={model:"模型",turnControls:"流程控制",pause:"暂停",resume:"恢复",interrupt:"中断",cancel:"取消",pauseTurn:"在安全点暂停完整流程",resumeTurn:"恢复完整流程",interruptTurn:"中断当前流程并保留会话上下文",cancelTurn:"取消当前流程且不可恢复",turnState:{running:"运行中",pausing:"正在到达安全点",paused:"已暂停",resuming:"正在恢复",interrupting:"正在中断",cancelling:"正在取消",interrupted:"已中断",completed:"已完成",failed:"失败",cancelled:"已取消",orphaned:"状态待确认",newTurnRequired:"需要从检查点继续"},tasks:{ppt:"PPT",image:"图片生成",video:"视频生成"},prompts:{ppt:{quarterlyReview:"复盘【季度】经营表现,提炼指标差距、原因与行动建议",projectUpdate:"汇报【项目名称】进展:里程碑、风险、预算和资源诉求",solutionProposal:"为【客户行业】输出解决方案:痛点、架构、实施路径与收益",industryAnalysis:"分析【行业主题】趋势,给出竞争格局、机会与战略建议"},image:{launchVisual:"为【品牌或产品】设计【高级科技】风格的发布会主视觉",ecommercePoster:"生成【产品名称】电商海报,突出【核心卖点】与品牌色",conceptRendering:"呈现【产品或空间】在【使用场景】中的写实概念效果图",socialGraphic:"围绕【传播主题】制作简洁专业的企业社媒配图"},video:{brandFilm:"制作【品牌名称】30 秒宣传片,突出【品牌价值】",productLaunch:"为【产品名称】制作 45 秒发布视频:痛点、功能、场景与行动号召",trainingVideo:"制作【培训主题】企业培训视频,讲清【关键操作或规范】",eventTeaser:"生成【活动名称】20 秒预热视频,包含亮点、时间地点和报名信息"}},firstFrame:"首帧",videoToEdit:"待编辑视频",baseVideo:"基础视频",optimizeSkillPlaceholder:"描述你想优化的技能…",createSkillPlaceholder:"描述你想生成的技能…",createVideoPlaceholder:"描述你想创作的视频…",messageAgentPlaceholder:"向 {{name}} 发消息…",selectAgentFirst:"请先选择智能体",selectSkillFirst:"请先选择需要优化的 Skill",availableSkills:"可用技能",availableSubagents:"可用子 Agent",invokeSkill:"调用技能",useSubagent:"使用子 Agent",loadingCapabilities:"正在读取 Agent 能力…",noMatchingSkills:"当前 Agent 没有匹配技能",noMatchingSubagents:"当前 Agent 没有匹配子 Agent",skillFallbackDescription:"加载并执行该技能",agentFallbackDescription:"将本轮交给该 Agent",skill:"技能",uploadImage:"上传图片",uploadDocument:"上传文档或 PDF",uploadVideo:"上传视频",taskMode:"任务模式",selectTaskMode:"选择任务模式",loadingGenerationModel:"正在加载生成模型",modelUnavailable:"模型不可用",cancelTask:"取消{{task}}任务",stopGenerating:"停止生成",viewVideoProgress:"查看视频生成进度",send:"发送",selectTaskType:"选择任务类型",enterprisePrompts:"{{task}}企业提示词",sessionId:"会话 ID",sessionIdLabel:"会话 ID:",initializing:"初始化中",copied:"已复制",copySessionId:"复制会话 ID",sessionIdCopied:"已复制会话 ID",disclaimer:"回答仅供参考",viewLogs:"查看日志"},LYe={selectAgent:"选择 Agent",noLocalAgents:"暂无本地 Agent。",searchRuntime:"搜索 Runtime 名称",mineOnly:"只看我创建的",noRuntimes:"暂无 Runtime。",unsupported:"不支持",createdByMe:"我创建的",connecting:"连接中…",connected:"已连接",connect:"连接",viewInfoFor:"查看 {{name}} 信息",viewInfo:"查看信息",agentAndRuntimeInfo:"Agent 与 Runtime 信息",detailType:"详情类型",agentInfo:"Agent 信息",runtimeInfo:"Runtime 信息",loadingAgentInfo:"读取 Agent 信息…",cannotLoadAgentInfo:"暂时无法读取 Agent 信息",unnamedAgent:"未命名 Agent",subagents:"子 Agent",tools:"工具",skills:"技能",previewUnsupported:"暂不支持预览",mountedComponents:"挂载组件",noMoreAgentInfo:"暂无更多 Agent 配置信息。",local:"本地",model:"模型",status:"状态",memoryMb:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",resources:"资源",version:"版本",loadingDetails:"读取详情…",environmentVariables:"环境变量",errors:{notFound:"该 Runtime 已不存在或列表信息已过期,请刷新列表后重试。",accessDenied:"当前账号无权访问该 Runtime,请检查所属 Project 和访问权限。",previewUnsupported:"该 Agent Server 版本暂不支持信息预览。",unavailable:"该 Runtime 暂时无法访问,请确认其状态为“就绪”后重试。",timeout:"加载超时,请重试"},componentKinds:{knowledgebase:"知识库",memory:"记忆",prompt_manager:"提示词管理",example_store:"样例库",run_processor:"运行处理器",tracer:"链路追踪",toolset:"工具集",plugin:"插件",other:"其他"},runtimeStatus:{ready:"就绪",unreleased:"未发布",running:"运行中",active:"运行中",creating:"创建中",pending:"等待中",deploying:"部署中",updating:"更新中",failed:"失败",error:"异常",stopping:"停止中",stopped:"已停止",deleting:"删除中",deleted:"已删除"}},MYe={agent:"智能体",agentTypes:{general:"通用智能体",mpa:"MPA 智能体",codex:"Codex","deepseek-harness":"DeepSeek",openclaw:"OpenClaw",hermes:"Hermes"},creator:"创建人",namedAgent:"{{name}} 智能体",storageLocation:"存储位置",currentBrowser:"当前浏览器",region:"地域",viewDeploymentProgress:"查看 {{name}} 部署进度",viewRuntimeDetails:"查看 {{name}} Runtime 详情",viewDetails:"查看 {{name}} 详情",time:"时间",remainingTime:"剩余时间",expiringSoon:"即将清空",sandboxRemaining:"{{hours}} 小时 {{minutes}} 分钟",wakeable:"已休眠",neverExpires:"永不过期",editDraftNamed:"编辑草稿 {{name}}",viewProgress:"查看进度",deleteDraftNamed:"删除草稿 {{name}}",recheckCompatibility:"重新检测 {{name}} 的对话兼容性",connectedNamed:"{{name}} 已连接",wakeAndChat:"唤醒 {{name}} 并开始对话",chatWith:"与 {{name}} 对话",waking:"唤醒中",deploying:"部署中",draft:"草稿",checking:"检测中",chatUnsupported:"不支持对话",checkFailed:"检测失败",creatorFilter:"创建人筛选",agentType:"智能体类型",searchAgents:"搜索智能体",handoff:"接力",agentList:"{{type}}列表",noMatchingAgents:"没有匹配的智能体",adjustSearch:"请尝试调整搜索或筛选条件",noAgentType:"暂无 {{type}}",noGeneralAgents:"暂无通用智能体",createGeneralAgentDescription:"创建一个通用智能体,开始构建和对话",createAgentType:"创建{{type}}",createAgent:"创建智能体",loadingMore:"正在加载更多智能体",scrollForMore:"继续下滑加载更多",allLoaded:"已加载全部智能体",deleteDraftTitle:"删除草稿?",deleteDraftDescription:"删除后将无法恢复“{{name}}”。",deleteDraft:"删除草稿",loadGeneralAgents:"加载通用智能体",loadAgentType:"加载 {{type}}",compatibility:{checking:"正在请求 Runtime /list-apps,以确认该智能体是否支持 Studio 对话。",empty:"Runtime /list-apps 未返回可用的 Agent,暂时无法连接对话。",supported:"Runtime 支持 Studio 对话。",unknownError:"Runtime /list-apps 请求失败,未返回可识别的错误信息。"},sandboxStatus:{ready:"就绪",wakeable:"已休眠",creating:"创建中",starting:"启动中",initializing:"启动中",pending:"等待中",running:"运行中",failed:"异常",error:"异常",stopped:"已停止",expired:"已过期",deleting:"删除中",deleted:"已删除",unknown:"未知状态"},wakingHint:"正在唤醒智能体,可能需要一些时间。",mpaCreate:{name:"名称",namePlaceholder:"例如 test-agent",nameHelp:"作为 Runtime 名称,支持 4–64 位字母、数字、下划线或连字符。",stepsLabel:"创建步骤",steps:{basics:"基本信息",postgres:"PostgreSQL",openviking:"OpenViking",autoPostgres:"数据库"},next:"下一步",previousStep:"上一步",pgDescription:"选择已有的 PostgreSQL 实例。创建流程会在该实例中准备智能体的独立业务库。",pgSplitDescription:"使用已配置的业务 PG Workspace。多个智能体共用此 Workspace,每个智能体拥有独立业务库。共享资源记录单独存放在 mpa_admin_workspace / mpa_admin_db,由管理员配置。",pgConsole:"前往火山引擎 AIDAP 创建或查看 PG Workspace",pgHost:"PG 主机地址",pgPort:"PG 端口",pgInvalid:"请填写有效的 PG 主机地址和端口。",pgCredentials:"PG 连接账号和密码由部署服务配置;主机和端口须与服务端配置一致。",openvikingDescription:"可选。三项全部填写才启用 OpenViking;全部留空则不向新智能体注入 OpenViking 配置。",openvikingConsole:"前往火山引擎查看 OpenViking 资源",openvikingUrl:"OpenViking 服务地址",openvikingResourceId:"OpenViking 资源 ID",openvikingApiKey:"OpenViking API Key",openvikingInvalid:"请同时填写有效的 HTTPS 服务地址、资源 ID 和 API Key,或全部留空。",openvikingCredentials:"API Key 仅用于本次创建,不保存到浏览器草稿;刷新页面后需重新填写。",tosTitle:"会话输出存储",tosDescription:"可选。填写完整的 TOS 凭证和存储桶,为新智能体的每个会话挂载独立输出目录。三项均留空时使用服务端预设;服务端未配置时,不启用 TOS 挂载。",tosAccessKey:"TOS Access Key",tosSecretKey:"TOS Secret Key",tosBucket:"TOS 存储桶",tosInvalid:"TOS Access Key、Secret Key 和存储桶必须同时填写。",tosCredentials:"凭证仅用于本次创建,不会保存在浏览器恢复数据或创建任务记录中。",runtimeImage:"MPA 镜像",workerImage:"Worker 镜像",imageDefault:"留空使用配置文件中的默认镜像",imageInvalid:"请输入有效的镜像地址,不要包含网址、空格或登录凭据。",title:"创建 MPA 智能体",agentId:"智能体 ID",description:"描述",region:"部署地域",plan:"创建计划",sharedResources:"准备或复用账号共享 VPC、子网和 APIG 消息网关",agentResources:"准备独立业务库、技能空间和执行环境,部署智能体",readiness:"检查网关和智能体就绪状态,成功后加入列表",checking:"正在检查创建配置…",configured:"创建配置已就绪。提交后会检查云资源并开始准备。",notConfigured:"尚未配置创建所需的资源参数,请联系管理员配置后重试。",loadFailed:"检查创建配置失败,请重试。",reload:"重新检查",submit:"开始创建",retry:"重试创建",newAgent:"新建另一个智能体",newAgentDescription:"新建另一个智能体将开启可编辑的新请求,替换当前恢复草稿,但不会取消旧任务。旧任务仍在运行时,请等待其结束后再提交。",close:"关闭",cancel:"取消创建",confirmCancel:"确认取消",cancelDescription:"取消后会停止后续步骤。已创建的数据库、技能空间、网关和其他已登记资源会保留,可使用同一智能体 ID 重试。",background:"关闭窗口后创建会继续。再次打开可查看进度。",pollFailed:"暂时无法获取进度,正在重新连接。请勿重复创建其他智能体。",iamPermissionDenied:"部署服务没有准备运行角色所需的 IAM 权限,请联系管理员授权后重试。",iamTrustConflict:"运行角色的信任关系不符合要求,请管理员检查对 VeFaaS 和 APIG 的授权后重试。",iamPolicyConflict:"运行角色所需的同名权限策略内容冲突,请管理员检查后重试。",iamOwnershipConflict:"运行角色与当前部署账号不匹配,请管理员检查后重试。",iamVerificationFailed:"尚未确认运行角色的权限已就绪,请检查 IAM 服务及策略可用性后重试。",iamConfigurationConflict:"自动准备运行角色仅支持默认 MPA 角色,请检查服务端创建配置。",creationFailed:"当前步骤未完成,请检查对应资源、服务端配置及权限后,用同一智能体 ID 重试。",cancelFailed:"取消请求失败,请重新查询进度后重试。",cancelled:"创建已取消,已登记资源保留供重试。",timeout:"创建超时,已登记资源保留。请检查对应资源后重试。",interrupted:"创建任务中断。请用同一智能体 ID 重试以恢复已登记资源。",skillSpace:"技能空间",states:{running:"正在创建",cancelling:"正在取消",succeeded:"创建成功",failed:"创建失败",cancelled:"已取消"},stages:{queued:"等待开始",iam_role:"准备运行角色",checking:"检查账号与配置",network:"准备 VPC 和子网",gateway:"准备 APIG 和 IM Gateway",database:"准备业务数据库",skills:"准备技能空间",worker:"准备执行环境",deploying:"准备数据库、技能空间和 Runtime",verifying:"等待智能体就绪",admin_workspace:"准备管理 PG Workspace",business_workspace:"准备业务 PG Workspace",admin_database:"初始化共享管理库"},back:"继续创建",pgAutoDescription:"使用 VeADK 部署账号自动创建或复用两个 PG Workspace:mpa_admin_workspace / mpa_admin_db 存放共享资源记录,业务 Workspace 供多个智能体共用,每个智能体拥有独立业务库。无需填写 PG 连接信息,提交创建后开始准备。",pgModeChanged:"此创建任务使用旧的 PG 配置,不能直接切换为自动模式重试。请联系管理员确认已有资源和任务后重新创建。",pgMigrationRequired:"检测到旧共享注册库。请先将共享资源记录迁移到 mpa_admin_workspace / mpa_admin_db,并完成现有 Runtime 的注册库地址切换;完成后点击“重新检查”。"}},IYe={library:"技能库",skill:"技能",skills:"技能",skillSpace:"技能空间",sandboxNotConfigured:"管理员未配置 Dev Sandbox",adminNotConfigured:"管理员未配置",totalItems:"共 {{count}} 项",cannotLoadSpaces:"无法加载技能空间",someSpacesFailed:"部分技能空间加载失败",degradedRelationWarning:"部分关联异常,已恢复可读取技能",downloadZip:"下载 ZIP",optimize:"优化",closeSkillDetails:"关闭技能详情",skillId:"技能 ID",allFiles:"完整文件",loadingSkillContent:"正在读取技能内容…",noSkillContent:"该技能暂无 SKILL.md 内容",addSkill:"添加技能",localUpload:"本地上传",localUploadDescription:"选择 ZIP 文件,校验通过后上传到技能空间",autoCreate:"自动创建",autoCreateDescription:"选择模型和风格,通过对话生成技能",createSkill:"创建技能",optimizeNamed:"优化 {{name}}",deleteSkillConfirm:"确定删除整个 Skill“{{name}}”吗?此操作会影响所有引用它的空间。",deleteSpaceConfirm:"确定删除 Skill 空间“{{name}}”吗?请先确认空间中的技能已删除。",manageSpaceDescription:"管理空间中的技能并创建新的版本",backToSpaces:"返回技能空间列表",overview:"概览",skillCount:"技能数量",skillCountValue_one:"{{count}} 技能",skillCountValue_other:"{{count}} 技能",updatedAt:"更新时间",skillsInSpace:"{{name}}中的技能",searchSkills:"搜索技能",cannotLoadSkills:"无法加载技能",noMatchingSkills:"没有匹配的技能",noSkills:"暂无技能",tryAnotherName:"请尝试搜索其他名称",emptySkillsDescription:"本地上传 Skill,或自动创建",actions:"操作",spaceDetails:"技能空间详情",editSpace:"编辑空间",deleteSpace:"删除空间",searchSpaces:"搜索技能空间",spaceList:"技能空间列表",noMatchingSpaces:"没有匹配的技能空间",createSpace:"新建技能空间",newSpace:"新建空间",loadingMoreSpaces:"正在加载更多技能空间",scrollForMore:"继续下滑加载更多",allSpacesLoaded:"已加载全部技能空间",errors:{loadSpaces:"读取技能空间失败,请稍后重试",loadSkills:"读取技能失败,请稍后重试",loadSkillDetails:"读取技能详情失败,请稍后重试",deleteSkill:"删除 Skill 失败",deleteSpace:"删除 Skill 空间失败",downloadSkill:"下载 Skill 失败"},status:{active:"可用",available:"可用",creating:"创建中",disabled:"已停用",enabled:"已启用",failed:"异常",inactive:"未启用",pending:"等待中",published:"已发布",ready:"就绪",released:"已发布",running:"运行中",success:"正常",unavailable:"不可用",unreleased:"未发布",updating:"更新中",unknown:"未知"},sharedSpace:"企业共享空间",sharedDescription:"面向企业全员开放的技能,由管理员统一发布和维护",sharedVisibility:"全员可见",sharedPreparing:"正在准备共享空间",sharedLoadFailed:"共享空间加载失败",sharedEmpty:"暂无共享技能,管理员发布后会显示在这里",requestPublication:"申请公开",reviewSubmitting:"提交中…",reviewSubmitted:"已申请",reviewFailed:"申请公开失败",reviewStatusFailed:"审核状态加载失败",reviewRetry:"重新申请",reviewPending:"待审核",reviewApproving:"发布中",reviewApproved:"已公开",reviewReturned:"已退回",reviewHistory:"审核记录",skillDetailSections:"技能详情内容",versions:{title:"版本管理",refresh:"刷新",uploading:"上传中…",upload:"上传新版本",close:"关闭",hint:"新版本不会替换已公开版本,审核通过后才会公开;ZIP 中的技能名称需与原技能一致",loading:"正在加载版本…",loadFailed:"无法加载版本",filesFailed:"无法加载版本文件",uploadFailed:"上传新版本失败",submitFailed:"提交申请失败",retry:"重试",empty:"暂无版本",current:"当前版本",notSubmitted:"未申请公开",submitting:"提交中…",submit:"申请公开",processing:"版本状态:{{status}}",filesLoading:"正在加载文件…",filesEmpty:"暂无文件",history:"历史审核记录",shared:"已公开"},author:"作者",authorName:"作者:{{name}}"},PYe={library:"知识库",createBase:"新建知识库",editBase:"编辑知识库",invalidName:"名称必须以字母开头,且只能包含字母、数字和下划线。",nameHelp:"以字母开头,仅支持字母、数字和下划线,最多 48 个字符。",optionalDescription:"描述(可选)",descriptionOnly:"AgentKit 当前仅支持更新知识库描述。",previewWeb:"预览网页内容",addData:"添加数据",openOriginalWeb:"打开原网页",backToEdit:"返回修改",confirmAdd:"确认添加",source:"知识来源",image:"图片",documentFile:"文档文件",webPage:"在线网页",webUrl:"网页 URL",generatingWebPreview:"正在抓取网页并生成 Markdown 预览",selectFile:"选择知识文件",selectOrDropFile:"选择文件或拖拽到这里",selectedFile:"{{size}} · 点击可重新选择",imageFileHelp:"支持 PNG、JPG 和 JPEG,单个文件不超过 200 MB",documentFileHelp:"支持 PDF、PPTX、DOCX、XLSX 和 TXT,单个文件不超过 200 MB",uploadingFile:"正在上传文件并添加到知识库",optionalName:"名称(可选)",optionalType:"类型(可选)",generatePreview:"生成预览",uploadFile:"上传文件",editMetadata:"编辑知识 Metadata",knowledge:"知识",field:"字段",value:"值",backToList:"返回知识库列表",metadataJson:"元数据(JSON)",provider:"服务提供方",knowledgeId:"知识库 ID",project:"项目",creator:"创建者",data:"数据",deleteInvalidAssociation:"删除失效关联",noData:"这个知识库还没有数据",addFirstData:"添加第一项数据",format:"格式",size:"大小",searchData:"搜索数据",searchLibraryData:"搜索知识库数据",associationInvalid:"关联已失效",providerMissing:"底层 Provider 知识库已不存在",noMatchingData:"没有匹配的数据",loadingMoreData:"正在加载更多数据",retryLoading:"重试加载",details:"知识库详情",searchBases:"搜索知识库",someBasesFailed:"部分知识库暂时无法加载,已展示其余可用内容。",noMatchingBases:"没有匹配的知识库",noManagePermission:"您没有管理此知识库的权限",loadingMoreBases:"正在加载更多知识库",deleteBaseTitle:"删除知识库?",deleteBaseDescription:"将删除 {{name}} 的 AgentKit 关联;如果它由 Studio 创建,也会同时删除 Provider 资源。此操作无法撤销。",deleteDocumentTitle:"删除知识?",deleteDocumentDescription:"将从 Provider 知识库中删除 {{name}},此操作无法撤销。",preview:{processingTitle:"数据正在处理中",processingDetail:"知识库完成解析后即可预览,请稍后重新加载。",failedTitle:"数据解析失败",failedDetail:"请检查源文件或网页地址后重新添加,也可以重新加载最新状态。",noParsedTitle:"暂时没有可预览的解析内容",noParsedDetail:"此类文件会在知识库完成解析后显示文本、表格或页面图片。",noMediaTitle:"暂时没有可预览的媒体内容",noMediaDetail:"知识库尚未返回可访问的媒体预览,请稍后重新加载。",noDataTitle:"暂无可预览的数据内容",noDataDetail:"知识库尚未返回解析结果,请稍后重新加载。",attachmentError:"附件无法预览,请稍后重试。",imageAlt:"知识数据图片",audioUnsupported:"当前浏览器不支持音频预览。",videoUnsupported:"当前浏览器不支持视频预览。",namedPdf:"{{name}} PDF 预览",pdf:"PDF 预览",openPdf:"无法显示时,在新窗口打开 PDF",fileUnsupported:"当前格式暂不支持直接在线预览,已优先显示解析后的内容。",openOriginalFile:"打开原文件",loading:"正在加载数据预览",openOriginalHint:"您可以打开原网页查看来源内容。",chunk:"片段 {{index}}",loadingMore:"正在加载更多",loadMore:"加载更多"},errors:{fileTooLarge:"单个文件不能超过 200 MB",invalidImageType:"请选择 PNG、JPG 或 JPEG 图片",invalidDocumentType:"请选择 PDF、PPTX、DOCX、XLSX 或 TXT 文件",createBase:"创建知识库失败",updateBase:"更新知识库失败",metadataObject:"Metadata 必须是 JSON 对象",metadataFormat:"Metadata 格式错误",noWebPreview:"网页没有可预览的 Markdown 内容",addWeb:"添加网页失败",previewWeb:"生成网页预览失败",uploadFile:"上传文件失败",updateDocument:"更新知识失败",loadPreview:"加载数据预览失败",loadMoreBases:"加载更多知识库失败",loadBases:"加载知识库失败",loadMoreData:"加载更多数据失败",loadData:"加载数据失败",deleteBase:"删除知识库失败",deleteDocument:"删除知识失败"}},NYe={title:"飞书渠道",refresh:"刷新",loading:"正在加载渠道配置…",unsupported:"此 Runtime 不支持渠道管理,请升级 MPA 镜像。",unauthorized:"渠道管理需要 Studio 管理员身份及有效的 Runtime 凭据。",configurationError:"渠道管理配置不完整,请检查 Runtime 元数据及加密密钥。",requestFailed:"渠道请求失败,请检查 Runtime 连接后重试。",bound:"已绑定:{{name}}",unbound:"尚未绑定飞书机器人。",guidance:"私聊使用独立会话。在已授权群内 @ 当前机器人即可对话。",keyRequired:"绑定前请在 Runtime 配置持久的 CHANNEL_STATE_ENCRYPTION_KEY。",gateway:"消息网关",route:"入站路由",delivery:"回复投递",configured:"已配置",missing:"未配置",delivery_not_observed:"尚未观测",delivery_delivered:"已投递",delivery_retrying:"重试中",missingConfig:"缺少 Runtime 配置:{{fields}}",bind:"扫码绑定",newQr:"重新生成二维码",unbind:"解除绑定",confirmUnbind:"确认解绑此机器人?解绑后将停止接收新消息。",qrAlt:"机器人绑定二维码",openQr:"打开授权页面",uncertain:"注册过程已中断。重新开始前,请检查机器人绑定与 Gateway 状态。",bindingFailed:"绑定失败,请检查 Gateway 配置后重试。",chatId:"允许的群 ID",scope:"群会话策略",saveGroup:"保存群权限",noGroups:"尚未授权任何群。私聊无需群权限。",edit:"编辑",remove:"移除",removeGroup:"移除 {{name}}",scope_group_sender:"按发言人隔离",scope_group:"全群共享",scope_group_topic_sender:"按话题和发言人隔离",scope_group_topic:"按话题共享",status_PENDING:"等待扫码",status_SCANNED:"已扫码,等待授权",status_AUTHORIZED:"已授权,准备注册",status_REGISTERING:"正在注册机器人",status_BOUND:"机器人已绑定",status_FAILED:"绑定失败",status_EXPIRED:"二维码已过期",workspaceTitle:"消息渠道",workspaceDescription:"连接消息平台,让用户直接与此智能体对话,并管理访问权限。",provider_feishu:"飞书",provider_wecom:"企业微信",provider_dingtalk:"钉钉",comingSoon:"暂未开放",unavailableDescription:"{{name}}的绑定与消息配置暂未开放。",runtimeRequired:"请先将此智能体部署到 Runtime,再配置消息渠道。",bindingTitle:"机器人绑定",connected:"已绑定",notBound:"未绑定",gatewayDescription:"用于接收渠道消息的网关配置。",routeDescription:"将渠道消息转发给当前智能体的路由配置。",deliveryDescription:"实际观测到的回复投递状态,完成配置不代表已成功投递。",groupsTitle:"群聊权限",groupsDescription:"添加允许访问的群,并设置群内对话的共享范围。",providerBindingTitle:"绑定{{name}}",providerUnbound:"绑定{{name}}机器人,让用户通过消息与此智能体对话。",qrGuidance:"使用{{name}}扫码授权,Runtime 将保存机器人凭据并配置消息网关。",wecomGuidance:"使用企业微信扫码授权,或手动填写 Bot ID 和 Secret 绑定已有机器人。",wecomBotId:"Bot ID",wecomSecret:"Secret",bindCredentials:"绑定机器人",wecomScan:"扫码绑定",wecomAuthorizing:"等待企业微信授权…",cancelAuthorization:"取消授权",wecomPopupBlocked:"授权窗口被浏览器拦截,请允许弹窗后重试。",wecomAuthCancelled:"已取消企业微信授权,可以重新扫码。",wecomAuthTimeout:"企业微信授权已超时,请重新扫码。",wecomInvalidResult:"授权结果缺少 Bot ID 或 Secret,请重新授权或手动填写。",wecomAuthFailed:"企业微信授权失败,请重试或手动填写凭据。",dingtalkClientId:"Client ID",dingtalkClientSecret:"Client Secret",manualUpgrade:"当前镜像尚不支持{{name}}手动配置,请升级后使用;仍可使用极速配置。",pairingTitle:"消息渠道扫码配对",feishuPairingDescription:"如果已有连接机器人,飞书扫码并绑定成功后原有机器人会被替换,可选绑定存量机器人或新建机器人。",generatingQr:"正在生成配对二维码…",dingtalkGuidance:"使用钉钉扫码授权,或手动填写 Client ID 和 Client Secret 绑定已有机器人。",wecomPairingDescription:"将在企业微信授权窗口中重新扫码配对。新机器人绑定成功后会替换当前连接;取消授权或绑定失败不会解绑原机器人。",configurationMethod:"配置方式",quickSetup:"极速配置",manualSetup:"手动配置",feishuAppId:"App ID",feishuAppSecret:"App Secret",manualGuidance:"填写已有{{name}}机器人的应用凭据,连接到当前智能体。",manualReplacement:"绑定成功后将替换当前机器人;取消或绑定失败不会解除现有绑定。"},Ndr=Object.freeze(Object.defineProperty({__proto__:null,agentKitPromo:gYe,agentSelector:LYe,agentWorkspace:vYe,channels:NYe,cloudEnvironment:AYe,common:pYe,composer:DYe,default:{common:pYe,agentKitPromo:gYe,systemInfo:mYe,agentWorkspace:vYe,environmentCenter:yYe,deploymentSelect:bYe,deploymentError:xYe,studioBuildProgress:wYe,cloudEnvironment:AYe,githubCicd:SYe,feishuDeployment:TYe,deploymentResources:CYe,studioUpdate:kYe,projectPreview:OYe,workspace:EYe,resourceCollection:_Ye,skillSourcePicker:RYe,composer:DYe,agentSelector:LYe,myAgents:MYe,skillCenter:IYe,knowledge:PYe,channels:NYe},deploymentError:xYe,deploymentResources:CYe,deploymentSelect:bYe,environmentCenter:yYe,feishuDeployment:TYe,githubCicd:SYe,knowledge:PYe,myAgents:MYe,projectPreview:OYe,resourceCollection:_Ye,skillCenter:IYe,skillSourcePicker:RYe,studioBuildProgress:wYe,studioUpdate:kYe,systemInfo:mYe,workspace:EYe},Symbol.toStringTag,{value:"Module"})),BYe="用户管理",$Ye="{{count}} 位成员",FYe="用户",zYe="角色",UYe="账号状态",VYe="最近登录",GYe="操作",QYe="更改角色",HYe="关闭",WYe="保存角色",YYe="正在保存…",qYe="取消",jYe="返回",XYe="用户池",KYe="火山引擎 Identity",ZYe="搜索姓名、邮箱或用户 ID",JYe="搜索",eqe="筛选角色",tqe="全部角色",rqe="刷新",nqe="正在读取用户…",iqe="更新于 {{time}}",aqe="已将 {{name}} 设置为{{role}}",oqe="重试",sqe="你",lqe="初始超级管理员",cqe="初始超级管理员受保护,不能在此降级",uqe="保存后,对方刷新 Studio 即可使用新的权限",dqe="角色需要重新确认",hqe="没有匹配的用户",fqe="尝试其他关键词或角色",pqe="用户登录或加入当前用户池后会显示在这里",gqe="共 {{count}} 位用户",mqe="上一页",vqe="下一页",yqe="尚未登录",bqe="未提供",xqe={super_admin:"超级管理员",admin:"管理员",developer:"开发者",user:"普通用户"},wqe={super_admin:"管理所有资源,并管理用户和分配角色",admin:"管理 Studio 资源",developer:"开发智能体并管理自己的资源",user:"使用智能体和个人功能"},Aqe={EXTERNAL_PROVIDER:"正常",CONFIRMED:"正常",NORMAL:"正常",ENABLED:"正常",ACTIVE:"正常",UNCONFIRMED:"待验证",DISABLED:"已停用",FORBIDDEN:"已禁用",LOCKED:"已锁定",SUSPENDED:"已暂停",FORCE_CHANGE_PASSWORD:"需要修改密码"},Sqe={request_failed:"请求未完成,请刷新列表确认当前状态后重试",invalid_response:"用户服务返回异常,请刷新后重试",identity_unavailable:"暂时无法访问 Identity,请稍后重试或检查服务权限",identity_resource_missing:"用户或用户池已不存在,请刷新列表",super_administrator_required:"只有超级管理员可以管理用户",sign_in_required:"请登录后重试",user_not_in_pool:"当前账号不属于此用户池",user_disabled:"当前账号已停用",protected_administrator:"不能降低初始超级管理员的权限",cannot_demote_self:"不能降低自己的超级管理员权限",role_change_conflict:"角色已发生变化,请关闭弹窗并刷新列表后重试",cross_origin_request:"请在当前 Studio 页面内修改角色"},Bdr=Object.freeze(Object.defineProperty({__proto__:null,actions:GYe,allRoles:tqe,back:jYe,cancel:qYe,changeRole:QYe,close:HYe,default:{title:BYe,memberCount:$Ye,user:FYe,role:zYe,status:UYe,lastLogin:VYe,actions:GYe,changeRole:QYe,close:HYe,save:WYe,saving:YYe,cancel:qYe,back:jYe,pool:XYe,volcengineIdentity:KYe,searchPlaceholder:ZYe,search:JYe,filterRole:eqe,allRoles:tqe,refresh:rqe,loading:nqe,updatedAt:iqe,saved:aqe,retry:oqe,you:sqe,initialAdministrator:lqe,protectedExplanation:cqe,effectiveAfterRefresh:uqe,roleConflict:dqe,noUsers:hqe,tryAnotherSearch:fqe,poolEmpty:pqe,resultCount:gqe,previous:mqe,next:vqe,neverLoggedIn:yqe,unknown:bqe,roles:xqe,descriptions:wqe,states:Aqe,errors:Sqe},descriptions:wqe,effectiveAfterRefresh:uqe,errors:Sqe,filterRole:eqe,initialAdministrator:lqe,lastLogin:VYe,loading:nqe,memberCount:$Ye,neverLoggedIn:yqe,next:vqe,noUsers:hqe,pool:XYe,poolEmpty:pqe,previous:mqe,protectedExplanation:cqe,refresh:rqe,resultCount:gqe,retry:oqe,role:zYe,roleConflict:dqe,roles:xqe,save:WYe,saved:aqe,saving:YYe,search:JYe,searchPlaceholder:ZYe,states:Aqe,status:UYe,title:BYe,tryAnotherSearch:fqe,unknown:bqe,updatedAt:iqe,user:FYe,volcengineIdentity:KYe,you:sqe},Symbol.toStringTag,{value:"Module"})),Tqe="网站集成",Cqe="将 AgentKit Runtime 以悬浮聊天窗口嵌入网站",kqe="返回自动化列表",Oqe="添加网站",Eqe="正在加载 Runtime",_qe="选择 Runtime",Rqe="网站域名",Dqe="例如 xxxx.com 或 localhost:5173",Lqe="正在生成",Mqe="生成 Token",Iqe="已添加网站",Pqe="{{count}} 个",Nqe="{{count}} 个",Bqe="正在加载网站集成",$qe="还没有网站集成",Fqe="选择 Runtime 并输入网站域名即可生成 Token",zqe="引入方法",Uqe="将下面代码放到网页的 body 结束标签前",Vqe="已复制",Gqe="复制代码",Qqe="添加网站后会在这里生成引入代码。",Hqe="确定删除 {{domain}} 的网站集成吗?",Wqe={load:"加载网站集成失败",create:"创建网站集成失败",delete:"删除网站集成失败",noConversationalAgent:"该 Runtime 暂未发现可对话的 Agent"},Yqe={requestFailed:"请求失败 ({{status}})",greeting:"您好,有什么可以帮您?",sessionFailed:"无法建立对话会话",unauthorized:"当前网站未获得对话授权",conversationFailed:"对话请求失败,请稍后重试",open:"打开智能体对话",close:"关闭智能体对话",panelLabel:"智能体对话面板",assistant:"智能体助手",online:"在线对话"},$dr=Object.freeze(Object.defineProperty({__proto__:null,addWebsite:Oqe,addedWebsites:Iqe,backToAutomations:kqe,confirmDelete:Hqe,copied:Vqe,copyCode:Gqe,default:{title:Tqe,description:Cqe,backToAutomations:kqe,addWebsite:Oqe,loadingRuntime:Eqe,selectRuntime:_qe,websiteDomain:Rqe,domainPlaceholder:Dqe,generating:Lqe,generateToken:Mqe,addedWebsites:Iqe,websiteCount_one:Pqe,websiteCount_other:Nqe,loadingIntegrations:Bqe,delete:"删除",emptyTitle:$qe,emptyDescription:Fqe,embedMethod:zqe,embedInstructions:Uqe,copied:Vqe,copyCode:Gqe,embedHint:Qqe,confirmDelete:Hqe,errors:Wqe,widget:Yqe},description:Cqe,domainPlaceholder:Dqe,embedHint:Qqe,embedInstructions:Uqe,embedMethod:zqe,emptyDescription:Fqe,emptyTitle:$qe,errors:Wqe,generateToken:Mqe,generating:Lqe,loadingIntegrations:Bqe,loadingRuntime:Eqe,selectRuntime:_qe,title:Tqe,websiteCount_one:Pqe,websiteCount_other:Nqe,websiteDomain:Rqe,widget:Yqe},Symbol.toStringTag,{value:"Module"})),qqe={types:{all:"全部类型",document:"文档",image:"图片",video:"视频"},previewArtifact:"预览 {{name}}",moreActions:"更多操作 {{name}}",actionMenu:"{{name}} 操作",download:"下载",downloading:"下载中",edit:"编辑信息",delete:"删除产物",previewFailed:"无法预览“{{name}}”:{{message}}",downloadStarted:"已开始下载 {{name}}",downloadFailed:"无法下载“{{name}}”:{{message}}",updated:"已更新 {{name}}",deleted:"已删除 {{name}}",deleteFailed:"无法删除“{{name}}”:{{message}}",typeFilter:"产物类型",searchAria:"搜索产物",searchPlaceholder:"搜索产物或会话",retry:"重试",close:"关闭",listAria:"产物列表",loadFailed:"产物加载失败",loadDetailFallback:"请检查存储配置后重试。",reload:"重新加载",noMatch:"没有找到匹配的产物",noArtifacts:"您还没有任何产物",searchHint:"请尝试搜索其他名称或切换类型",emptyHint:"聊天中生成的产物会自动显示在这里",columns:{name:"名称",source:"来源",updatedAt:"修改时间",actions:"操作"},loadingMore:"正在加载更多产物",unknownTime:"时间未知",preview:{close:"关闭预览",meta:"{{type}} / 版本 {{version}}",loading:"正在加载预览",alt:"{{name}} 预览",loadFailed:"预览加载失败,请稍后重试或下载查看",unsupported:"当前格式暂不支持在线预览,请下载查看",sourceAria:"产物来源",agent:"智能体",session:"会话",tool:"生成工具",createdAt:"生成时间",fileSize:"文件大小",tags:"标签",viewSession:"查看会话"},deleteDialog:{title:"删除产物?",description:"“{{name}}”将从产物库永久删除,聊天记录不会受到影响。",deleting:"删除中",confirm:"删除",close:"关闭删除确认框"},api:{withStatus:"{{message}}({{status}})",listFailed:"读取产物库失败",syncFailed:"同步聊天产物失败",updateFailed:"更新产物失败",deleteFailed:"删除产物失败",downloadFailed:"下载产物失败"}},jqe={unknownSource:"未知来源",unknownCreator:"未知创建者"},Xqe={nameRequired:"请输入产物名称",tooManyTags:"标签最多 {{max}} 个",tagTooLong:"单个标签不能超过 {{max}} 个字符",title:"编辑产物信息",subtitle:"内容文件不会被修改",close:"关闭编辑框",name:"名称",description:"描述",descriptionPlaceholder:"补充用途、版本或使用说明",tags:"标签",tagsPlaceholder:"使用逗号分隔,最多 {{max}} 个",cancel:"取消",saving:"保存中",save:"保存"},Kqe={change:{added:"新增",modified:"修改",deleted:"删除"},noChanges:"两个版本的源码没有差异",chooseFile:"从左侧选择文件以查看代码",compareTitle:"版本对比",workspaceTitle:"源码工作区",projectFallback:"Agent 项目",switchTheme:"切换源码主题",switchThemeTitle:"切换为{{theme}}主题",themes:{dark:"深色",light:"浅色"},closeWorkspace:"关闭源码工作区",close:"关闭",changedFiles:"变更文件",projectFiles:"项目文件",changes:"变更",files:"文件",openFiles:"打开的文件",noFileSelected:"未选择文件",comparisonDirection:"对比方向",before:"优化前",after:"优化后",loadingEditor:"正在加载编辑器…",changedFileCount_one:"{{count}} 个文件有变更",changedFileCount_other:"{{count}} 个文件有变更",fileCount_one:"{{count}} 个文件",fileCount_other:"{{count}} 个文件",lineCount_one:"{{count}} 行 · UTF-8",lineCount_other:"{{count}} 行 · UTF-8",viewSource:"查看源码",viewSourceAria:"查看和编辑项目源码"},Zqe={nav:"搜索",selectAgent:"请选择 Agent",checkingCapabilities:"正在检测 Agent 能力",notMounted:"当前 Agent 未挂载{{label}}",sources:{session:"会话",web:"网络",knowledge:"知识库",memory:"长期记忆"},webDescription:"通过 web_search 工具检索",backendLocal:"本地",failed:"搜索失败:{{message}}",placeholder:{selectAgent:"请先选择 Agent",web:"在网络中检索",knowledge:"在 {{name}} 中检索",knowledgeFallback:"当前 Agent 的知识库",memory:"在 {{name}} 中检索",memoryFallback:"当前用户的长期记忆",session:"在当前 Agent 的会话中检索"},sourceTypeAria:"搜索类型:{{label}}",notSelected:"未选择",sourceType:"搜索类型",selectSource:"选择搜索类型",noAgentHint:"选择一个 Agent 后,即可检索会话、网络及其挂载的数据源。",loadingCapabilities:"正在读取当前 Agent 的检索能力…",sourceUnavailable:"当前 Agent 未挂载该数据源",instructions:{web:"输入关键词后回车或点击按钮,通过 web_search 工具检索。",knowledge:"输入问题,检索当前 Agent 挂载的知识库。",memory:"输入线索,检索当前用户跨会话保存的长期记忆。",session:"输入关键词后回车或点击按钮,搜索当前 Agent 的会话。"},noResults:"未找到匹配“{{query}}”的结果。",knowledgeFragment:"知识片段 {{index}}",memoryFragment:"记忆片段 {{index}}"},Jqe={title:"开发者资源",sections:{documentation:{title:"相关链接",description:"查看开发文档与 AgentKit 常用入口"},bestPractices:{title:"最佳实践",description:"参考开发、调试与部署经验"},showcases:{title:"案例展示",description:"探索 AgentKit 应用案例"}},links:{veadkDocs:"VeADK 文档",cliDocs:"AgentKit CLI 文档",platformDocs:"AgentKit 平台文档",console:"AgentKit 控制台"},articles:{veadkDevelopment:{title:"使用 VeADK 开发并部署智能体",description:"使用 VeADK 构建 Agent,并部署至 AgentKit 智能体运行时。"},cliDevelopment:{title:"使用 AgentKit CLI 开发并部署智能体",description:"通过 AgentKit CLI 创建项目、调试 Agent,并完成部署。"},coverAlt:"{{title}}文章封面"},showcases:{researchAssistant:{title:"多智能体研究助手",description:"由多个专业 Agent 协同完成资料检索、分析和结论整理。"},multimodalAnalysis:{title:"多模态内容分析",description:"在统一会话中理解图片、文档和视频内容。"},customerService:{title:"智能客服工作台",description:"结合知识检索与工具调用处理复杂的客户服务任务。"},webSearch:{title:"联网搜索 Agent",description:"检索实时网页内容,并将信息整理为可追溯的回答。"},a2uiApp:{title:"A2UI 交互应用",description:"让 Agent 根据任务过程生成可交互的前端界面。"},previewAlt:"{{title}}界面预览"}},eje={title:"资源库",untitledSession:"未命名会话",categoryAria:"资源库分类",regionAria:"区域",tabs:{skills:"技能库",knowledge:"知识库",artifacts:"产物"}},tje={title:"管理 Agent",subtitle:"列出你有权管理的 AgentKit Runtime",mainAgentOnly:"仅显示主 Agent(控制面信息)。",deleteConfirm:'确定删除 Agent "{{name}}"?该 Runtime 将被永久删除。',regionFilterTitle:"按区域筛选",regionFilterAria:"区域筛选",regionAria:"区域",refresh:"刷新",loading:"加载中…",empty:"暂无你部署的 Agent。",connected:"已连接",connect:"连接到此 Agent",deleteRuntime:"删除该 Runtime",loadingDetail:"读取详情…",agentStructure:"Agent 结构",secretHidden:"敏感值不展示,可通过授权请求直接复制",revealSecret:"{{key}} 的敏感值",copySecret:"复制 {{key}} 的值",copy:"复制",copied:"已复制",copyFailed:"复制失败",notConfigured:"未配置",fields:{model:"模型",description:"描述",status:"状态信息",project:"项目",version:"版本",resources:"资源",memory:"记忆",tool:"工具",knowledge:"知识",mcpToolset:"MCP 工具集",updatedAt:"更新时间"},resource:{memory:"内存 {{value}}MB",instances:"实例 {{min}}~{{max}}",concurrency:"并发 {{value}}"},environmentVariables:"环境变量",unnamed:"(未命名)"},rje={mainAgent:"主 Agent",subAgent:"子 Agent {{index}}",itemCount_one:"{{count}} 项",itemCount_other:"{{count}} 项",info:"Agent 信息",infoAndTopology:"Agent 信息与设置",loadingInfo:"正在读取 Agent 信息…",unnamedAgent:"未命名 Agent",agentsMd:"AGENTS.md",tools:"工具",toolList:"工具列表",studioTool:"Studio Tool",removeTool:"移除工具 {{name}}",remove:"移除",notConfigured:"未配置",addStudioTool:"添加 Studio 工具",addStudioToolHere:"在此对话中添加 Studio 工具",skills:"技能",skillList:"技能列表",addSkill:"添加技能空间技能",addSkillHere:"向此会话添加技能空间技能",skillMountNextTurn:"挂载的版本将在下一 Turn 开始时冻结。",previewUnsupported:"暂不支持预览",sessionEnvironment:"会话环境",environment:"环境",agentCanvas:"Agent 画布",topology:"结构拓扑",nodeKinds:{agent:"Agent",sandbox:"沙箱","worker-session":"Worker 会话","skill-space":"技能空间",skill:"技能","studio-tool":"Studio 工具",mcp:"MCP",environment:"环境",knowledge:"知识库","sub-agent":"子 Agent"},nodeStatuses:{configured:"已配置",mounted:"已挂载",running:"运行中",paused:"已暂停"},viewCanvasFullscreen:"全屏查看 Agent 画布",viewFullscreen:"全屏查看",executionCanvas:"Agent 执行画布",fullscreenExecutionCanvas:"全屏 Agent 执行画布",closeFullscreenCanvas:"关闭全屏画布",close:"关闭",capabilitiesSubtitle:"能力与协作拓扑",closeInfo:"关闭 Agent 信息",infoUnavailable:"暂时无法读取 Agent 信息。",refresh:"刷新信息",loadingSkills:"正在加载绑定技能…",sessionSkills:"本会话临时技能",noBoundSpace:"当前智能体未绑定技能空间。",noBoundSkills:"绑定的技能空间暂无技能。",loadFailed:"加载失败,请刷新重试。",accessDenied:"无权读取此信息。",documentUnsupported:"当前 Runtime 不支持 Studio 读取 AGENTS.md,请升级 Runtime 镜像。",skillsUnsupported:"当前 Runtime 未提供技能空间绑定信息。",skillsDegraded:"技能信息不完整,请刷新重试。",documentEditHint:"编辑最新版本。保存会发布新版本到此技能空间,可能影响使用它的其他智能体。运行中的会话可能需要等待缓存刷新或新建会话后生效。请保留 frontmatter 中的 name。",documentLoading:"正在加载 SKILL.md…",documentWritable:"可编辑",documentReadOnly:"只读:此空间或当前权限不允许编辑",documentLoadFailed:"无法加载 SKILL.md,请刷新重试。",documentSaveFailed:"未确认保存成功,已保留编辑内容。重试前请重新打开,检查当前版本。",documentConflict:"技能已有新版本。请复制当前修改,再重新打开编辑器,避免覆盖。",discardDocument:"放弃未保存的修改?",keepEditing:"继续编辑",discardChanges:"放弃修改",saveDocument:"保存为新版本"},nje={mountFailed:"挂载环境失败",closeDialog:"关闭环境弹窗",addTitle:"添加环境",description:"选择当前会话允许 Agent 使用的 Sandbox 环境",closeAdd:"关闭添加环境",searchAria:"搜索环境",searchPlaceholder:"搜索环境名称或能力",availableAria:"可用环境与工作区",loading:"正在读取可用环境…",noMatch:"没有匹配的环境或工作区",workspaces:"工作区",reuseAll:"复用工作区中的全部可用环境",availableEnvironmentCount_one:"{{count}} 个可用环境",availableEnvironmentCount_other:"{{count}} 个可用环境",selectWorkspace:"选择工作区 {{name}}",environments:"环境",includedByWorkspaces:"已由工作区 {{names}} 包含",nameSeparator:"、",selectEnvironment:"选择环境 {{name}}",selectedWorkspaceCount_one:"{{count}} 个工作区",selectedWorkspaceCount_other:"{{count}} 个工作区",coveredEnvironmentCount_one:"{{count}} 个环境",coveredEnvironmentCount_other:"{{count}} 个环境",selectionSummary:"已选择 {{workspaces}},覆盖 {{environments}}",cancel:"取消",mounting:"正在挂载…",confirm:"确认添加",mountedAria:"已挂载环境",environmentCount_one:"{{count}} 个环境",environmentCount_other:"{{count}} 个环境",removeWorkspace:"移除工作区 {{name}}",remove:"移除",removeEnvironment:"移除环境 {{name}}",add:"添加环境",addMore:"添加更多环境",addForSession:"为当前 Session 添加环境",loadingAvailable:"正在加载可用环境…",empty:"暂无可用的 AIO Sandbox 环境。"},ije={loading:{searching:"正在查找已有环境",creating:"环境初始化中",connecting:"正在连接已有环境"},initializationFailed:"AgentKit CLI 环境初始化失败,当前状态:{{status}}。",sessionExpired:"AgentKit CLI Session 不存在或已过期,请重试。",initializationTimeout:"AgentKit CLI 环境初始化超时,请稍后重试。",nonPersistent:"非持久化环境",recyclingHoursMinutes:"{{hours}} 小时 {{minutes}} 分钟后环境回收",recyclingMinutes:"{{minutes}} 分钟后环境回收",connectionError:`无法连接 Studio 服务,未收到服务端响应。 原始错误:{{message}}`,unavailable:"连接不可用",requestFailed:"AgentKit CLI 请求失败",retry:"重试",terminalTitle:"AgentKit CLI 终端"},aje={labels:{coding:"智能编程",get_city_weather:"城市天气查询",get_location_weather:"位置天气查询",web_fetch:"网页内容获取",studio_write_artifact:"保存会话产物"},closeDialog:"关闭弹窗",title:"添加 Studio 工具",description:"由 Studio BFF 为 {{agentName}} 的当前会话执行,Runtime 无需预装",close:"关闭添加 Studio 工具",searchAria:"搜索 Studio 工具",searchPlaceholder:"搜索名称或工具标识",availableAria:"可用 Studio 工具",loading:"正在读取 Studio 工具…",noMatch:"没有匹配的 Studio 工具",remove:"移除",add:"添加"},oje={artifactLibrary:qqe,resourceMetadata:jqe,artifactEdit:Xqe,codeBrowser:Kqe,search:Zqe,developerResources:Jqe,library:eje,manageAgents:tje,agentTopology:rje,sessionEnvironment:nje,agentKitCli:ije,studioTools:aje},Fdr=Object.freeze(Object.defineProperty({__proto__:null,agentKitCli:ije,agentTopology:rje,artifactEdit:Xqe,artifactLibrary:qqe,codeBrowser:Kqe,default:oje,developerResources:Jqe,library:eje,manageAgents:tje,resourceMetadata:jqe,search:Zqe,sessionEnvironment:nje,studioTools:aje},Symbol.toStringTag,{value:"Module"})),sje=["zh-CN","en-US"],nle="en-US",zdr="agentkit.studio.locale",Udr={"zh-CN":{dir:"ltr",nativeName:"简体中文"},"en-US":{dir:"ltr",nativeName:"English"}};function ile(t){if(!t)return null;const e=t.trim().replace(/_/g,"-").toLowerCase(),r=sje.find(n=>n.toLowerCase()===e);return r||(e==="zh"||e.startsWith("zh-")?"zh-CN":e==="en"||e.startsWith("en-")?"en-US":null)}function Vdr(){if(typeof window>"u")return null;try{return ile(window.localStorage.getItem(zdr))}catch{return null}}function Gdr(){if(typeof window>"u")return[];const t=window.navigator;return t?t.languages.length>0?t.languages:t.language?[t.language]:[]:[]}function Qdr(){const t=Vdr();if(t)return t;for(const e of Gdr()){const r=ile(e);if(r)return r}return nle}function lje(t){typeof document>"u"||(document.documentElement.lang=t,document.documentElement.dir=Udr[t].dir)}const vn=t=>typeof t=="string",R6=()=>{let t,e;const r=new Promise((n,i)=>{t=n,e=i});return r.resolve=t,r.reject=e,r},ale=t=>t==null?"":String(t),Hdr=(t,e,r)=>{t.forEach(n=>{e[n]&&(r[n]=e[n])})},Wdr=/###/g,cje=t=>t&&t.includes("###")?t.replace(Wdr,"."):t,uje=t=>!t||vn(t),D6=(t,e,r)=>{const n=vn(e)?e.split("."):e;let i=0;for(;i{const{obj:n,k:i}=D6(t,e,Object);if(n!==void 0||e.length===1){n[i]=r;return}let a=e[e.length-1],o=e.slice(0,e.length-1),s=D6(t,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=D6(t,o,Object),s!=null&&s.obj&&typeof s.obj[`${s.k}.${a}`]<"u"&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=r},Ydr=(t,e,r,n)=>{const{obj:i,k:a}=D6(t,e,Object);i[a]=i[a]||[],i[a].push(r)},tG=(t,e)=>{const{obj:r,k:n}=D6(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,n))return r[n]},qdr=(t,e,r)=>{const n=tG(t,r);return n!==void 0?n:tG(e,r)},hje=(t,e,r)=>{for(const n in e)n!=="__proto__"&&n!=="constructor"&&(Object.prototype.hasOwnProperty.call(t,n)?vn(t[n])||t[n]instanceof String||vn(e[n])||e[n]instanceof String?r&&(t[n]=e[n]):hje(t[n],e[n],r):t[n]=e[n]);return t},qv=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),jdr={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},Xdr=t=>vn(t)?t.replace(/[&<>"'\/]/g,e=>jdr[e]):t;class Kdr{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}const Zdr=[" ",",","?","!",";"],Jdr=new Kdr(20),ehr=(t,e,r)=>{e=e||"",r=r||"";const n=Zdr.filter(o=>!e.includes(o)&&!r.includes(o));if(n.length===0)return!0;const i=Jdr.getRegExp(`(${n.map(o=>o==="?"?"\\?":o).join("|")})`);let a=!i.test(t);if(!a){const o=t.indexOf(r);o>0&&!i.test(t.substring(0,o))&&(a=!0)}return a},ole=(t,e,r=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const n=e.split(r);let i=t;for(let a=0;at==null?void 0:t.replace(/_/g,"-"),thr={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var r,n;(n=(r=console==null?void 0:console[t])==null?void 0:r.apply)==null||n.call(r,console,e)}};class rG{constructor(e,r={}){this.init(e,r)}init(e,r={}){this.prefix=r.prefix||"i18next:",this.logger=e||thr,this.options=r,this.debug=r.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,n,i){return i&&!this.debug?null:(e=e.map(a=>vn(a)?a.replace(/[\r\n\x00-\x1F\x7F]/g," "):a),vn(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new rG(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new rG(this.logger,e)}}var mm=new rG;class nG{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(n=>{this.observers[n]||(this.observers[n]=new Map);const i=this.observers[n].get(r)||0;this.observers[n].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}once(e,r){const n=(...i)=>{r(...i),this.off(e,n)};return this.on(e,n),this}emit(e,...r){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,a])=>{for(let o=0;o{for(let o=0;o-1&&this.options.ns.splice(r,1)}getResource(e,r,n,i={}){var u,d;const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,o=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let s;e.includes(".")?s=e.split("."):(s=[e,r],n&&(Array.isArray(n)?s.push(...n):vn(n)&&a?s.push(...n.split(a)):s.push(n)));const l=tG(this.data,s);return!l&&!r&&!n&&e.includes(".")&&(e=s[0],r=s[1],n=s.slice(2).join(".")),l||!o||!vn(n)?l:ole((d=(u=this.data)==null?void 0:u[e])==null?void 0:d[r],n,a)}addResource(e,r,n,i,a={silent:!1}){const o=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let s=[e,r];n&&(s=s.concat(o?n.split(o):n)),e.includes(".")&&(s=e.split("."),i=r,r=s[1]),this.addNamespaces(r),dje(this.data,s,i),a.silent||this.emit("added",e,r,n,i)}addResources(e,r,n,i={silent:!1}){for(const a in n)(vn(n[a])||Array.isArray(n[a]))&&this.addResource(e,r,a,n[a],{silent:!0});i.silent||this.emit("added",e,r,n)}addResourceBundle(e,r,n,i,a,o={silent:!1,skipCopy:!1}){let s=[e,r];e.includes(".")&&(s=e.split("."),i=n,n=r,r=s[1]),this.addNamespaces(r);let l=tG(this.data,s)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),i?hje(l,n,a):l={...l,...n},dje(this.data,s,l),o.silent||this.emit("added",e,r,n)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var pje={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,n,i){return t.forEach(a=>{var o;e=((o=this.processors[a])==null?void 0:o.process(e,r,n,i))??e}),e}};const gje=Symbol("i18next/PATH_KEY");function rhr(){const t=[],e=Object.create(null);let r;return e.get=(n,i)=>{var a;return(a=r==null?void 0:r.revoke)==null||a.call(r),i===gje?t:(t.push(i),r=Proxy.revocable(n,e),r.proxy)},Proxy.revocable(Object.create(null),e).proxy}function bA(t,e){const{[gje]:r}=t(rhr()),n=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":",a=(e==null?void 0:e.enableSelector)==="strict";if(r.length>1&&i){const o=e==null?void 0:e.ns,s=a?Array.isArray(o)?o:o?[o]:null:Array.isArray(o)?o:null;if(s&&(a?s:s.length>1?s.slice(1):[]).includes(r[0]))return`${r[0]}${i}${r.slice(1).join(n)}`}return r.join(n)}const sle=t=>!vn(t)&&typeof t!="boolean"&&typeof t!="number";class iG extends nG{constructor(e,r={}){super(),Hdr(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=mm.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,r={interpolation:{}}){const n={...r};if(e==null)return!1;const i=this.resolve(e,n);if((i==null?void 0:i.res)===void 0)return!1;const a=sle(i.res);return!(n.returnObjects===!1&&a)}extractFromKey(e,r){let n=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;n===void 0&&(n=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let a=r.ns||this.options.defaultNS||[];const o=n&&e.includes(n),s=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!ehr(e,n,i);if(o&&!s){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:vn(a)?[a]:a};const u=e.split(n);(n!==i||n===i&&this.options.ns.includes(u[0]))&&(a=u.shift()),e=u.join(i)}return{key:e,namespaces:vn(a)?[a]:a}}translate(e,r,n){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=bA(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(L=>typeof L=="function"?bA(L,{...this.options,...i}):String(L));const a=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,o=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:s,namespaces:l}=this.extractFromKey(e[e.length-1],i),u=l[l.length-1];let d=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;d===void 0&&(d=":");const h=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((h==null?void 0:h.toLowerCase())==="cimode")return f?a?{res:`${u}${d}${s}`,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:`${u}${d}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:h,usedNS:u,usedParams:this.getUsedParamsDetails(i)}:s;const p=this.resolve(e,i);let g=p==null?void 0:p.res;const m=(p==null?void 0:p.usedKey)||s,v=(p==null?void 0:p.exactUsedKey)||s,y=["[object Number]","[object Function]","[object RegExp]"],b=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,x=!this.i18nFormat||this.i18nFormat.handleAsObject,w=i.count!==void 0&&!vn(i.count),A=iG.hasDefaultValue(i),S=w?this.pluralResolver.getSuffix(h,i.count,i):"",T=i.ordinal&&w?this.pluralResolver.getSuffix(h,i.count,{ordinal:!1}):"",C=w&&!i.ordinal&&i.count===0,O=C&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${T}`]||i.defaultValue;let E=g;x&&!g&&A&&(E=O);const _=sle(E),P=Object.prototype.toString.apply(E);if(x&&E&&_&&!y.includes(P)&&!(vn(b)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const L=this.options.returnedObjectHandler?this.options.returnedObjectHandler(m,E,{...i,ns:l}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=L,p.usedParams=this.getUsedParamsDetails(i),p):L}if(o){const L=Array.isArray(E),R=L?[]:{},D=L?v:m;for(const M in E)if(Object.prototype.hasOwnProperty.call(E,M)){const I=`${D}${o}${M}`;A&&!g?R[M]=this.translate(I,{...i,defaultValue:sle(O)?O[M]:void 0,joinArrays:!1,ns:l}):R[M]=this.translate(I,{...i,joinArrays:!1,ns:l}),R[M]===I&&(R[M]=E[M])}g=R}}else if(x&&vn(b)&&Array.isArray(g))g=g.join(b),g&&(g=this.extendTranslation(g,e,i,n));else{let L=!1,R=!1;!this.isValidLookup(g)&&A&&(L=!0,g=O),this.isValidLookup(g)||(R=!0,g=s);const M=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&R?void 0:g,I=A&&O!==g&&this.options.updateMissing;if(R||L||I){if(this.logger.log(I?"updateKey":"missingKey",h,u,w&&!I?`${s}${this.pluralResolver.getSuffix(h,i.count,i)}`:s,I?O:g),o){const V=this.resolve(s,{...i,keySeparator:!1});V&&V.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let N=[];const F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&F&&F[0])for(let V=0;V{var H;const G=A&&U!==g?U:M;this.options.missingKeyHandler?this.options.missingKeyHandler(V,u,z,G,I,i):(H=this.backendConnector)!=null&&H.saveMissing&&this.backendConnector.saveMissing(V,u,z,G,I,i),this.emit("missingKey",V,u,z,g)};this.options.saveMissing&&(this.options.saveMissingPlurals&&w?N.forEach(V=>{const z=this.pluralResolver.getSuffixes(V,i);C&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!z.includes(`${this.options.pluralSeparator}zero`)&&z.push(`${this.options.pluralSeparator}zero`),z.forEach(U=>{B([V],s+U,i[`defaultValue${U}`]||O)})}):B(N,s,O))}g=this.extendTranslation(g,e,i,p,n),R&&g===s&&this.options.appendNamespaceToMissingKey&&(g=`${u}${d}${s}`),(R||L)&&this.options.parseMissingKeyHandler&&(g=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${u}${d}${s}`:s,L?g:void 0,i))}return a?(p.res=g,p.usedParams=this.getUsedParamsDetails(i),p):g}extendTranslation(e,r,n,i,a){var l,u;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});const d=vn(e)&&(((u=n==null?void 0:n.interpolation)==null?void 0:u.skipOnVariables)!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let h;if(d){const p=e.match(this.interpolator.nestingRegexp);h=p&&p.length}let f=n.replace&&!vn(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,n.lng||this.language||i.usedLng,n),d){const p=e.match(this.interpolator.nestingRegexp),g=p&&p.length;h(a==null?void 0:a[0])===p[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${r[0]}`),null):this.translate(...p,r),n)),n.interpolation&&this.interpolator.reset()}const o=n.postProcess||this.options.postProcess,s=vn(o)?[o]:o;return e!=null&&(s!=null&&s.length)&&n.applyPostProcessor!==!1&&(e=pje.handle(s,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,r={}){let n,i,a,o,s;return vn(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?bA(l,{...this.options,...r}):l)),e.forEach(l=>{if(this.isValidLookup(n))return;const u=this.extractFromKey(l,r),d=u.key;i=d;let h=u.namespaces;this.options.fallbackNS&&(h=h.concat(this.options.fallbackNS));const f=r.count!==void 0&&!vn(r.count),p=f&&!r.ordinal&&r.count===0,g=r.context!==void 0&&(vn(r.context)||typeof r.context=="number")&&r.context!=="",m=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);h.forEach(v=>{var y,b;this.isValidLookup(n)||(s=v,!this.checkedLoadedFor[`${m[0]}-${v}`]&&((y=this.utils)!=null&&y.hasLoadedNamespace)&&!((b=this.utils)!=null&&b.hasLoadedNamespace(s))&&(this.checkedLoadedFor[`${m[0]}-${v}`]=!0,this.logger.warn(`key "${i}" for languages "${m.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),m.forEach(x=>{var S;if(this.isValidLookup(n))return;o=x;const w=[d];if((S=this.i18nFormat)!=null&&S.addLookupKeys)this.i18nFormat.addLookupKeys(w,d,x,v,r);else{let T;f&&(T=this.pluralResolver.getSuffix(x,r.count,r));const C=`${this.options.pluralSeparator}zero`,O=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(r.ordinal&&T.startsWith(O)&&w.push(d+T.replace(O,this.options.pluralSeparator)),w.push(d+T),p&&w.push(d+C)),g){const E=`${d}${this.options.contextSeparator||"_"}${r.context}`;w.push(E),f&&(r.ordinal&&T.startsWith(O)&&w.push(E+T.replace(O,this.options.pluralSeparator)),w.push(E+T),p&&w.push(E+C))}}let A;for(;A=w.pop();)this.isValidLookup(n)||(a=A,n=this.getResource(x,v,A,r))}))})}),{res:n,usedKey:i,exactUsedKey:a,usedLng:o,usedNS:s}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,n,i={}){var a;return(a=this.i18nFormat)!=null&&a.getResource?this.i18nFormat.getResource(e,r,n,i):this.resourceStore.getResource(e,r,n,i)}getUsedParamsDetails(e={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],n=e.replace&&!vn(e.replace);let i=n?e.replace:e;if(n&&typeof e.count<"u"&&(i={...i,count:e.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!n){i={...i};for(const a of r)delete i[a]}return i}static hasDefaultValue(e){const r="defaultValue";for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&n.startsWith(r)&&e[n]!==void 0)return!0;return!1}}class mje{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=mm.create("languageUtils"),this.resolveHierarchyCache={}}clearCache(){this.resolveHierarchyCache={}}getScriptPartFromCode(e){if(e=L6(e),!e||!e.includes("-"))return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=L6(e),!e||!e.includes("-"))return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(vn(e)&&e.includes("-")){let r;try{r=Intl.getCanonicalLocales(e)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(n=>{if(r)return;const i=this.formatLanguageCode(n);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(n=>{if(r)return;const i=this.getScriptPartFromCode(n);if(this.isSupportedCode(i))return r=i;const a=this.getLanguagePartFromCode(n);if(this.isSupportedCode(a))return r=a;r=this.options.supportedLngs.find(o=>o===a?!0:!o.includes("-")&&!a.includes("-")?!1:!!(o.includes("-")&&!a.includes("-")&&o.slice(0,o.indexOf("-"))===a||o.startsWith(a)&&a.length>1))}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),vn(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let n=e[r];return n||(n=e[this.getScriptPartFromCode(r)]),n||(n=e[this.formatLanguageCode(r)]),n||(n=e[this.getLanguagePartFromCode(r)]),n||(n=e.default),n||[]}toResolveHierarchy(e,r){const n=this.options.fallbackLng,i=Array.isArray(n)?n.join("|"):n;i!==this._cachedFallbackLng&&(this.resolveHierarchyCache={},this._cachedFallbackLng=i);const a=r===void 0||r===!1||vn(r),o=r===void 0&&typeof this.options.fallbackLng=="function",s=vn(e)&&a&&!o;let l=null;if(s){let f;r===void 0?f="undefined":r===!1?f="boolean:false":f=`string:${r}`,l=`${e.length}:${e}|${f}`}if(l!==null){const f=this.resolveHierarchyCache[l];if(f!==void 0)return f.slice()}const u=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],e),d=[],h=f=>{f&&(this.isSupportedCode(f)?d.push(f):this.logger.warn(`rejecting language code not found in supportedLngs: ${f}`))};return vn(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&h(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&h(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&h(this.getLanguagePartFromCode(e))):vn(e)&&h(this.formatLanguageCode(e)),u.forEach(f=>{d.includes(f)||h(this.formatLanguageCode(f))}),l!==null?(this.resolveHierarchyCache[l]=d,d.slice()):d}}const vje={zero:0,one:1,two:2,few:3,many:4,other:5},yje={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class nhr{constructor(e,r={}){this.languageUtils=e,this.options=r,this.logger=mm.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,r={}){const n=L6(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",a=JSON.stringify({cleanedCode:n,type:i});if(a in this.pluralRulesCache)return this.pluralRulesCache[a];let o;try{o=new Intl.PluralRules(n,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),yje;if(!e.match(/-|_/))return yje;const l=this.languageUtils.getLanguagePartFromCode(e);o=this.getRule(l,r)}return this.pluralRulesCache[a]=o,o}needsPlural(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),(n==null?void 0:n.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,r,n={}){return this.getSuffixes(e,n).map(i=>`${r}${i}`)}getSuffixes(e,r={}){let n=this.getRule(e,r);return n||(n=this.getRule("dev",r)),n?n.resolvedOptions().pluralCategories.sort((i,a)=>vje[i]-vje[a]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,r,n={}){const i=this.getRule(e,n);return i?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",r,n))}}const bje=(t,e,r,n=".",i=!0)=>{let a=qdr(t,e,r);return!a&&i&&vn(r)&&(a=ole(t,r,n),a===void 0&&(a=ole(e,r,n))),a},xje=t=>t.replace(/\$/g,"$$$$");class wje{constructor(e={}){var r;this.logger=mm.create("interpolator"),this.options=e,this.format=((r=e==null?void 0:e.interpolation)==null?void 0:r.format)||(n=>n),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:n,useRawValueToEscape:i,prefix:a,prefixEscaped:o,suffix:s,suffixEscaped:l,formatSeparator:u,unescapeSuffix:d,unescapePrefix:h,nestingPrefix:f,nestingPrefixEscaped:p,nestingSuffix:g,nestingSuffixEscaped:m,nestingOptionsSeparator:v,maxReplaces:y,alwaysFormat:b}=e.interpolation;this.escape=r!==void 0?r:Xdr,this.escapeValue=n!==void 0?n:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?qv(a):o||"{{",this.suffix=s?qv(s):l||"}}",this.formatSeparator=u||",",this.unescapePrefix=d?"":h?qv(h):"-",this.unescapeSuffix=this.unescapePrefix?"":d?qv(d):"",this.nestingPrefix=f?qv(f):p||qv("$t("),this.nestingSuffix=g?qv(g):m||qv(")"),this.nestingOptionsSeparator=v||",",this.maxReplaces=y||1e3,this.alwaysFormat=b!==void 0?b:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,n)=>(r==null?void 0:r.source)===n?(r.lastIndex=0,r):new RegExp(n,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,r,n,i){var p;let a,o,s;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},u=g=>{if(!g.includes(this.formatSeparator)){const b=bje(r,l,g,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(b,void 0,n,{...i,...r,interpolationkey:g}):b}const m=g.split(this.formatSeparator),v=m.shift().trim(),y=m.join(this.formatSeparator).trim();return this.format(bje(r,l,v,this.options.keySeparator,this.options.ignoreJSONStructure),y,n,{...i,...r,interpolationkey:v})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const d=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,h=((p=i==null?void 0:i.interpolation)==null?void 0:p.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:g=>g},{regex:this.regexp,safeValue:g=>this.escapeValue?this.escape(g):g}].forEach(g=>{for(s=0;a=g.regex.exec(e);){const m=a[1].trim();if(o=u(m),o===void 0)if(typeof d=="function"){const y=d(e,a,i);o=vn(y)?y:""}else if(i&&Object.prototype.hasOwnProperty.call(i,m))o="";else if(h){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`),o="";else!vn(o)&&!this.useRawValueToEscape&&(o=ale(o));const v=g.safeValue(o);if(e=e.replace(a[0],xje(v)),h?(g.regex.lastIndex+=v.length,g.regex.lastIndex-=a[0].length):g.regex.lastIndex=0,s++,s>=this.maxReplaces)break}}),e}nest(e,r,n={}){let i,a,o;const s=(l,u)=>{const d=this.nestingOptionsSeparator;if(!l.includes(d))return l;const h=l.split(new RegExp(`${qv(d)}[ ]*{`));let f=`{${h[1]}`;l=h[0],f=this.interpolate(f,o);const p=f.match(/'/g),g=f.match(/"/g);(((p==null?void 0:p.length)??0)%2===0&&!g||((g==null?void 0:g.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{o=JSON.parse(f),u&&(o={...u,...o})}catch(m){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,m),`${l}${d}${f}`}return o.defaultValue&&o.defaultValue.includes(this.prefix)&&delete o.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];o={...n},o=o.replace&&!vn(o.replace)?o.replace:o,o.applyPostProcessor=!1,delete o.defaultValue;const u=/{.*}/s.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(u!==-1&&(l=i[1].slice(u).split(this.formatSeparator).map(d=>d.trim()).filter(Boolean),i[1]=i[1].slice(0,u)),a=r(s.call(this,i[1].trim(),o),o),a&&i[0]===e&&!vn(a))return a;vn(a)||(a=ale(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),a=""),l.length&&(a=l.reduce((d,h)=>this.format(d,h,n.lng,{...n,interpolationkey:i[1].trim()}),a.trim())),e=e.replace(i[0],xje(ale(a))),this.regexp.lastIndex=0}return e}}const ihr=t=>{let e=t.toLowerCase().trim();const r={};if(t.includes("(")){const n=t.split("(");e=n[0].toLowerCase().trim();const i=n[1].slice(0,-1);e==="currency"&&!i.includes(":")?r.currency||(r.currency=i.trim()):e==="relativetime"&&!i.includes(":")?r.range||(r.range=i.trim()):i.split(";").forEach(o=>{if(o){const[s,...l]=o.split(":"),u=l.join(":").trim().replace(/^'+|'+$/g,""),d=s.trim();r[d]||(r[d]=u),u==="false"&&(r[d]=!1),u==="true"&&(r[d]=!0),isNaN(u)||(r[d]=parseInt(u,10))}})}return{formatName:e,formatOptions:r}},Aje=t=>{const e={};return(r,n,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});const o=n+JSON.stringify(a);let s=e[o];return s||(s=t(L6(n),i),e[o]=s),s(r)}},ahr=t=>(e,r,n)=>t(L6(r),n)(e);class ohr{constructor(e={}){this.logger=mm.create("formatter"),this.options=e,this.init(e)}init(e,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const n=r.cacheInBuiltFormats?Aje:ahr;this.formats={number:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a});return s=>o.format(s)}),currency:n((i,a)=>{const o=new Intl.NumberFormat(i,{...a,style:"currency"});return s=>o.format(s)}),datetime:n((i,a)=>{const o=new Intl.DateTimeFormat(i,{...a});return s=>o.format(s)}),relativetime:n((i,a)=>{const o=new Intl.RelativeTimeFormat(i,{...a});return s=>o.format(s,a.range||"day")}),list:n((i,a)=>{const o=new Intl.ListFormat(i,{...a});return s=>o.format(s)})}}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=Aje(r)}format(e,r,n,i={}){if(!r||e==null)return e;const a=r.split(this.formatSeparator),o=[];for(let l=0;l-1&&!u.includes(")")&&l+1{var f;const{formatName:d,formatOptions:h}=ihr(u);if(this.formats[d]){let p=l;try{const g=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},m=g.locale||g.lng||i.locale||i.lng||n;p=this.formats[d](l,m,{...h,...i,...g})}catch(g){this.logger.warn(g)}return p}else this.logger.warn(`there was no format function for ${d}`);return l},e)}}const shr=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class lhr extends nG{constructor(e,r,n,i={}){var a,o;super(),this.backend=e,this.store=r,this.services=n,this.languageUtils=n.languageUtils,this.options=i,this.logger=mm.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(o=(a=this.backend)==null?void 0:a.init)==null||o.call(a,n,i.backend,i)}queueLoad(e,r,n,i){const a={},o={},s={},l={};return e.forEach(u=>{let d=!0;r.forEach(h=>{const f=`${u}|${h}`;!n.reload&&this.store.hasResourceBundle(u,h)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?o[f]===void 0&&(o[f]=!0):(this.state[f]=1,d=!1,o[f]===void 0&&(o[f]=!0),a[f]===void 0&&(a[f]=!0),l[h]===void 0&&(l[h]=!0)))}),d||(s[u]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(s),toLoadNamespaces:Object.keys(l)}}loaded(e,r,n){const i=e.split("|"),a=i[0],o=i[1];r&&this.emit("failedLoading",a,o,r),!r&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&n&&(this.state[e]=0);const s={};this.queue.forEach(l=>{Ydr(l.loaded,[a],o),shr(l,e),r&&l.errors.push(r),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(u=>{s[u]||(s[u]={});const d=l.loaded[u];d.length&&d.forEach(h=>{s[u][h]===void 0&&(s[u][h]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",s),this.queue=this.queue.filter(l=>!l.done)}read(e,r,n,i=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:n,tried:i,wait:a,callback:o});return}this.readingCalls++;const s=(u,d)=>{if(this.readingCalls--,this.waitingReads.length>0){const h=this.waitingReads.shift();this.read(h.lng,h.ns,h.fcName,h.tried,h.wait,h.callback)}if(u&&d&&i{this.read(e,r,n,i+1,a*2,o)},a);return}o(u,d)},l=this.backend[n].bind(this.backend);if(l.length===2){try{const u=l(e,r);u&&typeof u.then=="function"?u.then(d=>s(null,d)).catch(s):s(null,u)}catch(u){s(u)}return}return l(e,r,s)}prepareLoading(e,r,n={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();vn(e)&&(e=this.languageUtils.toResolveHierarchy(e)),vn(r)&&(r=[r]);const a=this.queueLoad(e,r,n,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(o=>{this.loadOne(o)})}load(e,r,n){this.prepareLoading(e,r,{},n)}reload(e,r,n){this.prepareLoading(e,r,{reload:!0},n)}loadOne(e,r=""){const n=e.split("|"),i=n[0],a=n[1];this.read(i,a,"read",void 0,void 0,(o,s)=>{o&&this.logger.warn(`${r}loading namespace ${a} for language ${i} failed`,o),!o&&s&&this.logger.log(`${r}loaded namespace ${a} for language ${i}`,s),this.loaded(e,o,s)})}saveMissing(e,r,n,i,a,o={},s=()=>{}){var l,u,d,h,f;if((u=(l=this.services)==null?void 0:l.utils)!=null&&u.hasLoadedNamespace&&!((h=(d=this.services)==null?void 0:d.utils)!=null&&h.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${n}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(n==null||n==="")){if((f=this.backend)!=null&&f.create){const p={...o,isUpdate:a},g=this.backend.create.bind(this.backend);if(g.length<6)try{let m;g.length===5?m=g(e,r,n,i,p):m=g(e,r,n,i),m&&typeof m.then=="function"?m.then(v=>s(null,v)).catch(s):s(null,m)}catch(m){s(m)}else g(e,r,n,i,s,p)}!e||!e[0]||this.store.addResource(e[0],r,n,i)}}}const lle=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),vn(t[1])&&(e.defaultValue=t[1]),vn(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(n=>{e[n]=r[n]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Sje=t=>(vn(t.ns)&&(t.ns=[t.ns]),vn(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),vn(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),aG=()=>{},chr=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class M6 extends nG{constructor(e={},r){if(super(),this.options=Sje(e),this.services={},this.logger=mm,this.modules={external:[]},chr(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(e={},r){this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(vn(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const n=lle();this.options={...n,...this.options,...Sje(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);const i=u=>u?typeof u=="function"?new u:u:null;if(!this.options.isClone){this.modules.logger?mm.init(i(this.modules.logger),this.options):mm.init(null,this.options);let u;this.modules.formatter?u=this.modules.formatter:u=ohr;const d=new mje(this.options);this.store=new fje(this.options.resources,this.options);const h=this.services;h.logger=mm,h.resourceStore=this.store,h.languageUtils=d,h.pluralResolver=new nhr(d,{prepend:this.options.pluralSeparator}),u&&(h.formatter=i(u),h.formatter.init&&h.formatter.init(h,this.options),this.options.interpolation.format=h.formatter.format.bind(h.formatter)),h.interpolator=new wje(this.options),h.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},h.backendConnector=new lhr(i(this.modules.backend),h.resourceStore,h,this.options),h.backendConnector.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.languageDetector&&(h.languageDetector=i(this.modules.languageDetector),h.languageDetector.init&&h.languageDetector.init(h,this.options.detection,this.options)),this.modules.i18nFormat&&(h.i18nFormat=i(this.modules.i18nFormat),h.i18nFormat.init&&h.i18nFormat.init(this)),this.translator=new iG(this.services,this.options),this.translator.on("*",(f,...p)=>{this.emit(f,...p)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,r||(r=aG),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const u=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);u.length>0&&u[0]!=="dev"&&(this.options.lng=u[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(u=>{this[u]=(...d)=>this.store[u](...d)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(u=>{this[u]=(...d)=>(this.store[u](...d),this)});const s=R6(),l=()=>{const u=(d,h)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),s.resolve(h),r(d,h)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return u(null,this.t.bind(this));this.changeLanguage(this.options.lng,u)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),s}loadResources(e,r=aG){var a,o;let n=r;const i=vn(e)?e:this.language;if(typeof e=="function"&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return n();const s=[],l=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(h=>{h!=="cimode"&&(s.includes(h)||s.push(h))})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(d=>l(d)),(o=(a=this.options.preload)==null?void 0:a.forEach)==null||o.call(a,u=>l(u)),this.services.backendConnector.load(s,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(u)})}else n(null)}reloadResources(e,r,n){const i=R6();return typeof e=="function"&&(n=e,e=void 0),typeof r=="function"&&(n=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),n||(n=aG),this.services.backendConnector.reload(e,r,a=>{i.resolve(),n(a)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&pje.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let r=0;r{this.language=s,this.languages=this.services.languageUtils.toResolveHierarchy(s),this.resolvedLanguage=void 0,this.setResolvedLanguage(s)},a=(s,l)=>{l?this.isLanguageChangingTo===e&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,n.resolve((...u)=>this.t(...u)),r&&r(s,(...u)=>this.t(...u))},o=s=>{var d,h;!e&&!s&&this.services.languageDetector&&(s=[]);const l=vn(s)?s:s&&s[0],u=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(vn(s)?[s]:s);u&&(this.language||i(u),this.translator.language||this.translator.changeLanguage(u),(h=(d=this.services.languageDetector)==null?void 0:d.cacheUserLanguage)==null||h.call(d,u)),this.loadResources(u,f=>{a(f,u)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?o(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e),n}getFixedT(e,r,n,i){const a=i==null?void 0:i.scopeNs,o=(s,l,...u)=>{let d;typeof l!="object"?d=this.options.overloadTranslationOptionHandler([s,l].concat(u)):d={...l},d.lng=d.lng||o.lng,d.lngs=d.lngs||o.lngs;const h=d.ns!==void 0&&d.ns!==null;d.ns=d.ns||o.ns,d.keyPrefix!==""&&(d.keyPrefix=d.keyPrefix||n||o.keyPrefix);const f={...this.options,...d};Array.isArray(a)&&!h&&(f.ns=a),typeof d.keyPrefix=="function"&&(d.keyPrefix=bA(d.keyPrefix,f));const p=this.options.keySeparator||".";let g;return d.keyPrefix&&Array.isArray(s)?g=s.map(m=>(typeof m=="function"&&(m=bA(m,f)),`${d.keyPrefix}${p}${m}`)):(typeof s=="function"&&(s=bA(s,f)),g=d.keyPrefix?`${d.keyPrefix}${p}${s}`:s),this.t(g,d)};return vn(e)?o.lng=e:o.lngs=e,o.ns=r,o.keyPrefix=n,o}t(...e){var r;return(r=this.translator)==null?void 0:r.translate(...e)}exists(...e){var r;return(r=this.translator)==null?void 0:r.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const n=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(n.toLowerCase()==="cimode")return!0;const o=(s,l)=>{const u=this.services.backendConnector.state[`${s}|${l}`];return u===-1||u===0||u===2};if(r.precheck){const s=r.precheck(this,o);if(s!==void 0)return s}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!i||o(a,e)))}loadNamespaces(e,r){const n=R6();return this.options.ns?(vn(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{n.resolve(),r&&r(i)}),n):(r&&r(),Promise.resolve())}loadLanguages(e,r){const n=R6();vn(e)&&(e=[e]);const i=this.options.preload||[],a=e.filter(o=>!i.includes(o)&&this.services.languageUtils.isSupportedCode(o));return a.length?(this.options.preload=i.concat(a),this.loadResources(o=>{n.resolve(),r&&r(o)}),n):(r&&r(),Promise.resolve())}dir(e){var i,a;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const o=new Intl.Locale(e);if(o&&o.getTextInfo){const s=o.getTextInfo();if(s&&s.direction)return s.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],n=((a=this.services)==null?void 0:a.languageUtils)||new mje(lle());return e.toLowerCase().indexOf("-latn")>1?"ltr":r.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},r){const n=new M6(e,r);return n.createInstance=M6.createInstance,n}cloneInstance(e={},r=aG){const n=e.forkResourceStore;n&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},a=new M6(i);if((e.debug!==void 0||e.prefix!==void 0)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(s=>{a[s]=this[s]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n){const s=Object.keys(this.store.data).reduce((l,u)=>(l[u]={...this.store.data[u]},l[u]=Object.keys(l[u]).reduce((d,h)=>(d[h]={...l[u][h]},d),l[u]),l),{});a.store=new fje(s,i),a.services.resourceStore=a.store}if(e.interpolation){const l={...lle().interpolation,...this.options.interpolation,...e.interpolation},u={...i,interpolation:l};a.services.interpolator=new wje(u)}return a.translator=new iG(a.services,i),a.translator.on("*",(s,...l)=>{a.emit(s,...l)}),a.init(i,r),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Su=M6.createInstance();Su.createInstance,Su.dir,Su.init,Su.loadResources,Su.reloadResources,Su.use,Su.changeLanguage,Su.getFixedT,Su.t,Su.exists,Su.setDefaultNamespace,Su.hasLoadedNamespace,Su.loadNamespaces,Su.loadLanguages;const uhr={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,"!doctype":!0,"!DOCTYPE":!0},dhr=/\s([^'"/\s><]+?)[\s/>]|([^\s=]+)=\s?("[^"]*"|'[^']*')/g;function Tje(t){const e={type:"tag",name:"",voidElement:!1,attrs:{},children:[]},r=t.match(/<\/?([^\s]+?)[/\s>]/);if(r&&(e.name=r[1],(uhr[r[1]]||t.charAt(t.length-2)==="/")&&(e.voidElement=!0),e.name.startsWith("!--"))){const a=t.indexOf("-->");return{type:"comment",comment:a!==-1?t.slice(4,a):""}}const n=new RegExp(dhr);let i=null;for(;i=n.exec(t),i!==null;)if(i[0].trim())if(i[1]){const a=i[1].trim();let o=[a,null];const s=a.indexOf("=");s>-1&&(o=[a.slice(0,s),a.slice(s+1)]),e.attrs[o[0]]=o[1],n.lastIndex--}else i[2]&&(e.attrs[i[2]]=i[3].trim().substring(1,i[3].length-1));return e}const oG=/|<[a-zA-Z0-9\-!/](?:"[^"]*"|'[^']*'|[^'">])*>/g,hhr=/<\/?([^\s]+?)[/\s>]/,fhr=/^\s*$/,phr=/^(script|style)$/i,I6="\0",ghr=Object.create(null);function Cje(t){t.forEach(function(e){if(e.type==="text"){e.content=e.content.split(I6).join("<");return}if(e.type==="comment"){e.comment=e.comment.split(I6).join("<");return}for(const r in e.attrs){const n=e.attrs[r];typeof n=="string"&&n.indexOf(I6)>-1&&(e.attrs[r]=n.split(I6).join("<"))}e.children.length&&Cje(e.children)})}function mhr(t,e){const r=e&&e.components||ghr,n=e&&e.allowedTags;let i=!1;if(n){const g=typeof n=="function"?n:function(b){return n.indexOf(b)>-1};let m="",v=0;oG.lastIndex=0;let y;for(;y=oG.exec(t);){const b=y[0];m+=t.slice(v,y.index);const x=b.match(hhr);b.startsWith("",t}}function yhr(t){return t.reduce(function(e,r){return e+kje("",r)},"")}var bhr={parse:mhr,stringify:yhr};const sG=(t,e,r,n)=>{var a,o,s,l;const i=[r,{code:e,...n||{}}];if((o=(a=t==null?void 0:t.services)==null?void 0:a.logger)!=null&&o.forward)return t.services.logger.forward(i,"warn","react-i18next::",!0);Rd(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(l=(s=t==null?void 0:t.services)==null?void 0:s.logger)!=null&&l.warn?t.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},Oje={},wE=(t,e,r,n)=>{Rd(r)&&Oje[r]||(Rd(r)&&(Oje[r]=new Date),sG(t,e,r,n))},Eje=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},cle=(t,e,r)=>{t.loadNamespaces(e,Eje(t,r))},_je=(t,e,r,n)=>{if(Rd(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(e)>-1)return cle(t,r,n);r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,Eje(t,n))},xhr=(t,e,r={})=>!e.languages||!e.languages.length?(wE(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(n,i)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&n.services.backendConnector.backend&&n.isLanguageChangingTo&&!i(n.isLanguageChangingTo,t))return!1}}),Rd=t=>typeof t=="string",jv=t=>typeof t=="object"&&t!==null,whr=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ahr={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Shr=t=>Ahr[t],Rje=t=>t.replace(whr,Shr);let ule={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:Rje,transDefaultProps:void 0};const Thr=(t={})=>{ule={...ule,...t}},dle=()=>ule;let Dje;const Chr=t=>{Dje=t},hle=()=>Dje,lG=(t,e)=>{var n;if(!t)return!1;const r=((n=t.props)==null?void 0:n.children)??t.children;return e?r.length>0:!!r},P6=t=>{var r,n;if(!t)return[];const e=((r=t.props)==null?void 0:r.children)??t.children;return(n=t.props)!=null&&n.i18nIsDynamicList?nx(e):e},khr=t=>Array.isArray(t)&&t.every(Y.isValidElement),nx=t=>Array.isArray(t)?t:[t],Ohr=(t,e)=>{const r={...e};return r.props={...e.props,...t.props},r},Ehr=t=>{const e={};if(!t)return e;const r=n=>{nx(n).forEach(a=>{Rd(a)||(lG(a)?r(P6(a)):jv(a)&&!Y.isValidElement(a)&&Object.assign(e,a))})};return r(t),e},fle=(t,e,r,n)=>{if(!t)return"";let i="";const a=nx(t),o=e!=null&&e.transSupportBasicHtmlNodes?e.transKeepBasicHtmlNodesFor??[]:[];return a.forEach((s,l)=>{if(Rd(s)){i+=`${s}`;return}if(Y.isValidElement(s)){const{props:u,type:d}=s,h=Object.keys(u).length,f=o.indexOf(d)>-1,p=u.children;if(!p&&f&&!h){i+=`<${d}/>`;return}if(!p&&(!f||h)||u.i18nIsDynamicList){i+=`<${l}>`;return}if(f&&h<=1){const m=Rd(p)?p:fle(p,e,r,n);i+=`<${d}>${m}`;return}const g=fle(p,e,r,n);i+=`<${l}>${g}`;return}if(s===null){sG(r,"TRANS_NULL_VALUE","Passed in a null value as child",{i18nKey:n});return}if(jv(s)){const{format:u,...d}=s,h=Object.keys(d);if(h.length===1){const f=u?`${h[0]}, ${u}`:h[0];i+=`{{${f}}}`;return}sG(r,"TRANS_INVALID_OBJ","Invalid child - Object should only have keys {{ value, format }} (format is optional).",{i18nKey:n,child:s});return}sG(r,"TRANS_INVALID_VAR","Passed in a variable like {number} - pass variables for interpolation as full objects like {{number}}.",{i18nKey:n,child:s})}),i},_hr=(t,e,r,n,i,a,o)=>{if(r==="")return[];const s=i.transKeepBasicHtmlNodesFor||[],l=r&&new RegExp(s.map(x=>`<${x}`).join("|")).test(r);if(!t&&!e&&!l&&!o)return[r];const u=e??{},d=x=>{nx(x).forEach(A=>{Rd(A)||(lG(A)?d(P6(A)):jv(A)&&!Y.isValidElement(A)&&Object.assign(u,A))})};d(t);const h=Object.keys(u),f=x=>/^\d+$/.test(x)||s.indexOf(x)>-1||h.indexOf(x)>-1,p=bhr.parse(`<0>${r}`,{allowedTags:f}),g={...u,...a},m=(x,w,A)=>{var C;const S=P6(x),T=y(S,w.children,A);return khr(S)&&T.length===0||(C=x.props)!=null&&C.i18nIsDynamicList?S:T},v=(x,w,A,S,T)=>{x.dummy?(x.children=w,A.push(Y.cloneElement(x,{key:S},T?void 0:w))):A.push(...Y.Children.map([x],C=>{var E;if(C.type===Y.Fragment||((E=C.props)==null?void 0:E.i18nIsDynamicList)!==void 0){const _={key:S};return C&&C.props&&Object.keys(C.props).forEach(P=>{P==="children"||P==="i18nIsDynamicList"||(_[P]=C.props[P])}),Y.createElement(C.type,_,T?null:w)}const O={key:S};return C&&C.props&&Object.keys(C.props).forEach(_=>{_==="ref"||_==="children"||(O[_]=C.props[_])}),Y.cloneElement(C,O,T?null:w)}))},y=(x,w,A)=>{const S=nx(x),T=nx(w),C={};return T.reduce((O,E,_)=>{var L,R;const P=((R=(L=E.children)==null?void 0:L[0])==null?void 0:R.content)&&n.services.interpolator.interpolate(E.children[0].content,g,n.language);if(E.type==="tag"){let D=S[parseInt(E.name,10)];!D&&e&&(D=e[E.name]),A.length===1&&!D&&(D=A[0][E.name]),D||(D={});const M={...E.attrs};o&&Object.keys(M).forEach(z=>{const U=M[z];Rd(U)&&(M[z]=Rje(U))});const I=Object.keys(M).length!==0?Ohr({props:M},D):D,N=Y.isValidElement(I),F=N&&lG(E,!0)&&!E.voidElement,B=l&&jv(I)&&I.dummy&&!N,V=jv(e)&&Object.hasOwnProperty.call(e,E.name);if(Rd(I)){const z=n.services.interpolator.interpolate(I,g,n.language);O.push(z)}else if(lG(I)||F){const z=m(I,E,A);v(I,z,O,_)}else if(B){const z=y(S,E.children,A);v(I,z,O,_)}else if(Number.isNaN(parseFloat(E.name)))if(V){const z=m(I,E,A);v(I,z,O,_,E.voidElement)}else if(i.transSupportBasicHtmlNodes&&s.indexOf(E.name)>-1)if(E.voidElement)O.push(Y.createElement(E.name,{key:`${E.name}-${_}`}));else{const z=C[E.name]||0;C[E.name]=z+1;let U,G=0;for(let q=0;q`);else{const z=y(S,E.children,A);O.push(`<${E.name}>${z}`)}else if(jv(I)&&!N){const z=E.children[0]?P:null;z&&O.push(z)}else v(I,P,O,_,E.children.length!==1||!P)}else if(E.type==="text"){const D=i.transWrapTextNodes,M=typeof i.unescape=="function"?i.unescape:dle().unescape,I=o?M(n.services.interpolator.interpolate(E.content,g,n.language)):n.services.interpolator.interpolate(E.content,g,n.language);D?O.push(Y.createElement(D,{key:`${E.name}-${_}`},I)):O.push(I)}return O},[])},b=y([{dummy:!0,children:t||[]}],p,nx(t||[]));return P6(b[0])},Lje=(t,e,r)=>{const n=t.key||e,i=Y.cloneElement(t,{key:n});if(!i.props||!i.props.children||r.indexOf(`${e}/>`)<0&&r.indexOf(`${e} />`)<0)return i;function a(){return Y.createElement(Y.Fragment,null,i)}return Y.createElement(a,{key:n})},Rhr=(t,e)=>t.map((r,n)=>Lje(r,n,e)),Dhr=(t,e)=>{const r={};return Object.keys(t).forEach(n=>{Object.assign(r,{[n]:Lje(t[n],n,e)})}),r},Lhr=(t,e,r,n)=>t?Array.isArray(t)?Rhr(t,e):jv(t)?Dhr(t,e):(wE(r,"TRANS_INVALID_COMPONENTS",' "components" prop expects an object or array',{i18nKey:n}),null):null,Mhr=t=>!jv(t)||Array.isArray(t)?!1:Object.keys(t).reduce((e,r)=>e&&Number.isNaN(Number.parseFloat(r)),!0);function Ihr({children:t,count:e,parent:r,i18nKey:n,context:i,tOptions:a={},values:o,defaults:s,components:l,ns:u,i18n:d,t:h,shouldUnescape:f,...p}){var B,V,z,U,G,H;const g=d||hle();if(!g)return wE(g,"NO_I18NEXT_INSTANCE","Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.",{i18nKey:n}),t;const m=h||g.t.bind(g)||(j=>j),v={...dle(),...(B=g.options)==null?void 0:B.react};let y=u||m.ns||((V=g.options)==null?void 0:V.defaultNS);y=Rd(y)?[y]:y||["translation"];const{transDefaultProps:b}=v,x=b!=null&&b.tOptions?{...b.tOptions,...a}:a,w=f??(b==null?void 0:b.shouldUnescape),A=b!=null&&b.values?{...b.values,...o}:o,S=b!=null&&b.components?{...b.components,...l}:l,T=fle(t,v,g,n),C=s||(x==null?void 0:x.defaultValue)||T||v.transEmptyNodeValue||(typeof n=="function"?bA(n):n),{hashTransKey:O}=v,E=n||(O?O(T||C):T||C);(U=(z=g.options)==null?void 0:z.interpolation)!=null&&U.defaultVariables?o=A&&Object.keys(A).length>0?{...A,...g.options.interpolation.defaultVariables}:{...g.options.interpolation.defaultVariables}:o=A;const _=Ehr(t);_&&typeof _.count=="number"&&e===void 0&&(e=_.count);const P=o||e!==void 0&&!((H=(G=g.options)==null?void 0:G.interpolation)!=null&&H.alwaysFormat)||!t?x.interpolation:{interpolation:{...x.interpolation,prefix:"#$?",suffix:"?$#"}},L={...x,context:i||x.context,count:e,...o,...P,defaultValue:C,ns:y};let R=E?m(E,L):C;R===E&&C&&(R=C);const D=Lhr(S,R,g,n);let M=D||t,I=null;Mhr(D)&&(I=D,M=t);const N=_hr(M,I,R,g,v,L,w),F=r??v.defaultTransParent;return F?Y.createElement(F,p,N):N}const Phr={type:"3rdParty",init(t){Thr(t.options.react),Chr(t)}},Mje=Y.createContext();class Nhr{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}function cG({children:t,count:e,parent:r,i18nKey:n,context:i,tOptions:a={},values:o,defaults:s,components:l,ns:u,i18n:d,t:h,shouldUnescape:f,...p}){var b;const{i18n:g,defaultNS:m}=Y.useContext(Mje)||{},v=d||g||hle(),y=h||(v==null?void 0:v.t.bind(v));return Ihr({children:t,count:e,parent:r,i18nKey:n,context:i,tOptions:a,values:o,defaults:s,components:l,ns:u||(y==null?void 0:y.ns)||m||((b=v==null?void 0:v.options)==null?void 0:b.defaultNS),i18n:v,t:h,shouldUnescape:f,...p})}var Ije={exports:{}},Pje={};/** * @license React * use-sync-external-store-shim.production.js