diff --git a/.agents/skills/agent-core-dev/SKILL.md b/.agents/skills/agent-core-dev/SKILL.md index 9b5c753d6..4239c6232 100644 --- a/.agents/skills/agent-core-dev/SKILL.md +++ b/.agents/skills/agent-core-dev/SKILL.md @@ -29,7 +29,7 @@ End-to-end procedures that span the stages. Reach for these before reading the s - [Align (port `agent-core` → `agent-core-v2`)](align.md): split a v1 class into semantic units, fix each unit's domain / scope / Service / dependencies, then migrate the logic and tests. Use when the task is "move feature X from v1 to v2" or "port `IXxxService` to v2". - [Commit align (triage a `main` commit against v2)](commit-align.md): given one `main` commit hash + a short note, find the v1 logic it changed, check whether v2 already has the corresponding implementation, bucket it (aligned / partial / missing / not-applicable), and recommend a minimal fix. Use in the `pythinker-code-v2`-catching-up-to-`main` phase, for one commit at a time; escalate to [align.md](align.md) if the gap is a whole domain. -- [Server align (expose `agent-core-v2` over `server-v2`)](server-align.md): wire a v2 domain into `packages/kap-server` over `/api/v2` (native) and `/api/v1` (v1-compatible mirror), keep the wire schema byte-compatible with the established v1 contract by sharing the `@pymodel/protocol` schema, and isolate v1-only behavior in a `Legacy` edge adapter instead of distorting the native v2 Service. Use when the task is "expose the new v2 Service on the server", "add a route to the `/api/v1` surface", or "keep server-v2 wire-compatible with released v1 clients". +- [Server align (expose `agent-core-v2` over `server-v2`)](server-align.md): wire a v2 domain into `packages/agent-gateway` over `/api/v2` (native) and `/api/v1` (v1-compatible mirror), keep the wire schema byte-compatible with the established v1 contract by sharing the `@pymodel/protocol` schema, and isolate v1-only behavior in a `Legacy` edge adapter instead of distorting the native v2 Service. Use when the task is "expose the new v2 Service on the server", "add a route to the `/api/v1` surface", or "keep server-v2 wire-compatible with released v1 clients". ## Stages diff --git a/.agents/skills/agent-core-dev/config.md b/.agents/skills/agent-core-dev/config.md index f9cb8af66..f2ad64c95 100644 --- a/.agents/skills/agent-core-dev/config.md +++ b/.agents/skills/agent-core-dev/config.md @@ -270,7 +270,7 @@ registerSection(MY_SECTION, MySectionSchema, { }); ``` -- A deprecated TOML key is **ignored** (its value no longer applies — the schema only knows the new key) and reports a warning `ConfigDiagnostic` while present; the file is never rewritten, so the warning is the migration guide. Diagnostics are recomputed on every load/reload and surface to clients via `IConfigService.diagnostics()` and `onDidChangeDiagnostics` (kap-server republishes them as the global `event.config.warning` WS event). +- A deprecated TOML key is **ignored** (its value no longer applies — the schema only knows the new key) and reports a warning `ConfigDiagnostic` while present; the file is never rewritten, so the warning is the migration guide. Diagnostics are recomputed on every load/reload and surface to clients via `IConfigService.diagnostics()` and `onDidChangeDiagnostics` (agent-gateway republishes them as the global `event.config.warning` WS event). - A deprecated env var still **resolves** as a fallback (new var first), with the same warning treatment, and `stripEnvBoundFields` treats it as env-owned for writes. - See `src/agent/loop/configSection.ts` for a worked example (`max_retries_per_step` → `max_attempts_per_step`). diff --git a/.agents/skills/agent-core-dev/edge-exposure.md b/.agents/skills/agent-core-dev/edge-exposure.md index f336e888d..73ac5202d 100644 --- a/.agents/skills/agent-core-dev/edge-exposure.md +++ b/.agents/skills/agent-core-dev/edge-exposure.md @@ -2,6 +2,13 @@ How a domain's Services become the wire surface (`/api/v2`) and WebSocket events. This is a **design-time** decision: which Services are exposed, under what public `resource:action` name, and which events stream. +> **Implementation note (2026-08):** the current `/api/v2` surface is hand-written route files +> under `packages/agent-gateway/src/routes/v2/`, mounted by `src/routes/registerApiV2Routes.ts` +> (see `packages/agent-gateway/AGENTS.md`). There is no generic `actionMap` dispatcher in +> agent-gateway today; the `resource:action` model and tables below are the original v2 edge +> design. The facade rules (§2, §4), the scope-resolution rule, and the WS-event rules (§5) +> still apply to route-file exposure. + The transport (`/api/v2` over HTTP + WS) lives in the **edge** layer (`gateway`/`rpc`/`transport`). It borrows business Services by interface; business code never imports it. ## 1. The edge model @@ -45,7 +52,7 @@ A Service method is directly exposable iff **all** hold: 3. Errors are `PythinkerError` (coded). 4. It is a command/query, not a factory, stream, byte-store, or sink. -If any fail → add a wire-safe orchestration method to the owning domain Service (e.g. `IAgentPromptService.submit` settles `{turn_id}` instead of returning the live `PromptHandle`) or compose several domain Services at the edge — kap-server's `routes/prompts.ts` is the reference for edge-side composition. +If any fail → add a wire-safe orchestration method to the owning domain Service (e.g. `IAgentPromptService.submit` settles `{turn_id}` instead of returning the live `PromptHandle`) or compose several domain Services at the edge — agent-gateway's `routes/prompts.ts` is the reference for edge-side composition. ## 3. Per-scope `resource:action` map @@ -160,7 +167,7 @@ The `eventMap` binds a public event name to the scope's `Event` source (analogou Session-level `onDidChange` sources (metadata / interactions) carry no payload today, so they are not exposed until there is a concrete consumer. -Safety / reliability (carried over from `packages/server/src/ws/connection.ts` and VSCode's `ChannelServer`): +Safety / reliability (carried over from VSCode's `ChannelServer`, and the legacy v1 server those ideas were ported from): - request ids + active-request table — `cancel` / `unlisten` disposes them; - heartbeat — `ping` every 30s, `pong` timeout 10s → `terminate`; diff --git a/.agents/skills/agent-core-dev/server-align.md b/.agents/skills/agent-core-dev/server-align.md index ba61a49ae..5041216fb 100644 --- a/.agents/skills/agent-core-dev/server-align.md +++ b/.agents/skills/agent-core-dev/server-align.md @@ -1,6 +1,6 @@ # Subskill — Server align (expose `agent-core-v2` over `server-v2`) -Wire a v2 domain into `packages/kap-server`, and — when the endpoint is part of the established `/api/v1` wire contract — keep the wire shape **byte-for-byte compatible** with what released v1 clients expect. This is the server-side counterpart of [align.md](align.md): `align.md` ports v1 *business logic* into v2; this file exposes the v2 result over HTTP / WS, reusing the v1 wire contract where it already exists. +Wire a v2 domain into `packages/agent-gateway`, and — when the endpoint is part of the established `/api/v1` wire contract — keep the wire shape **byte-for-byte compatible** with what released v1 clients expect. This is the server-side counterpart of [align.md](align.md): `align.md` ports v1 *business logic* into v2; this file exposes the v2 result over HTTP / WS, reusing the v1 wire contract where it already exists. Use this when the task is "expose the new v2 Service on the server", "add a `/sessions/:sid/...` route to the `/api/v1` surface", or "keep server-v2 speaking the same `/api/v1` contract released clients rely on". @@ -8,8 +8,8 @@ Use this when the task is "expose the new v2 Service on the server", "add a `/se `server-v2` serves **two HTTP surfaces** off the same `agent-core-v2` scope tree: -- **`/api/v2/:sa`** — the native v2 RPC surface, driven by the `actionMap` allowlist (`packages/kap-server/src/transport/actionMap.ts`). One `resource:action` segment maps to one `Service.method`. New v2-native capabilities land here. See [edge-exposure.md](edge-exposure.md). -- **`/api/v1/...`** — the v1-compatible surface, hand-written routes in `packages/kap-server/src/routes/*.ts` that **implement the established v1 wire contract path-for-path and schema-for-schema**, mounted by `registerApiV1Routes.ts`. This surface IS the v1 contract now (the legacy v1 server is gone); it exists so existing v1 clients keep working against server-v2 unchanged. +- **`/api/v2/:sa`** — the native v2 RPC surface — hand-written route files under `packages/agent-gateway/src/routes/v2/`, mounted by `src/routes/registerApiV2Routes.ts` under the `/api/v2` prefix (see `packages/agent-gateway/AGENTS.md`). New v2-native capabilities land here. See [edge-exposure.md](edge-exposure.md). +- **`/api/v1/...`** — the v1-compatible surface, hand-written routes in `packages/agent-gateway/src/routes/*.ts` that **implement the established v1 wire contract path-for-path and schema-for-schema**, mounted by `registerApiV1Routes.ts`. This surface IS the v1 contract now (the legacy v1 server is gone); it exists so existing v1 clients keep working against server-v2 unchanged. The two surfaces can point at **different Services** for the same feature. v2's native `IAgentPromptService` serves `/api/v2`; a v1-shaped `IAgentPromptService` serves `/api/v1`. Keeping them separate is what lets v2's domain design stay clean while the wire stays compatible. @@ -21,16 +21,16 @@ Is the endpoint part of the established /api/v1 wire contract (protocol schema ├─ YES → /api/v1 mirror route (this file, §schema-fidelity + §legacy-service). │ Reuse the protocol schema; add a LegacyService if v2 semantics diverge. └─ NO → /api/v2 native action (edge-exposure.md). - Add to actionMap, wrapping in a facade if the method fails §2 there. + Add a v2 route file, wrapping in a facade if the method fails §2 there. ``` -A feature often needs **both**: the v1 mirror so old clients keep working, and the v2 action so new clients get the cleaner shape. Do them as two routes / two action-map entries over the same scope tree. +A feature often needs **both**: the v1 mirror so old clients keep working, and the v2 route file so new clients get the cleaner shape. Do them as two routes / two v2 route files over the same scope tree. ## The server-align workflow ```text Pick surface → Read the v1 route (if any) → Reuse / add the protocol schema -→ Choose native Service vs LegacyService → Wire the route / actionMap entry +→ Choose native Service vs LegacyService → Wire the route / v2 route file → Map errors → Test against the v1 wire shape → Verify ``` @@ -38,20 +38,20 @@ Pick surface → Read the v1 route (if any) → Reuse / add the protocol schema Apply the decision above. For a v1-matched endpoint, the **spec** is the protocol schema plus the existing mirror routes: -- `packages/kap-server/src/protocol/rest-.ts` — the wire schema you must match. -- `packages/kap-server/src/routes/.ts` — the file you are writing (create it if missing); sibling route files show the conventions. +- `packages/agent-gateway/src/protocol/rest-.ts` — the wire schema you must match. +- `packages/agent-gateway/src/routes/.ts` — the file you are writing (create it if missing); sibling route files show the conventions. The protocol schema is the source of truth. Do not re-derive the wire shape from memory or from the v2 domain model. ### 2. Reuse (or add) the protocol schema -The wire schema lives in **`packages/kap-server/src/protocol`** under `rest-.ts` (e.g. `promptSubmissionSchema`, `promptListResponseSchema`, `configResponseSchema`) — or in the owning `agent-core-v2` domain contract when the engine's service speaks the shape. Every `/api/v1` route in `packages/kap-server` imports from it — that single import is what guarantees the server speaks the same shape released clients expect. +The wire schema lives in **`packages/agent-gateway/src/protocol`** under `rest-.ts` (e.g. `promptSubmissionSchema`, `promptListResponseSchema`, `configResponseSchema`) — or in the owning `agent-core-v2` domain contract when the engine's service speaks the shape. Every `/api/v1` route in `packages/agent-gateway` imports from it — that single import is what guarantees the server speaks the same shape released clients expect. Actions: - **Schema already in protocol** → import it in the server-v2 route and use it in `defineRoute` (`body`, `success.data`, error `dataSchema` / `detailsSchema`). Do **not** re-declare the schema inline in server-v2. -- **Schema missing** → add it to `packages/kap-server/src/protocol/rest-.ts` first (or to the owning v2 domain contract if its service speaks the shape), then consume it from the route. The shared schema is the source of truth; server-v2 never re-declares a v1 wire schema inline. -- **Schema exists but only v1 uses it** → keep it in `packages/kap-server/src/protocol` and import it into server-v2; do not fork a copy. +- **Schema missing** → add it to `packages/agent-gateway/src/protocol/rest-.ts` first (or to the owning v2 domain contract if its service speaks the shape), then consume it from the route. The shared schema is the source of truth; server-v2 never re-declares a v1 wire schema inline. +- **Schema exists but only v1 uses it** → keep it in `packages/agent-gateway/src/protocol` and import it into server-v2; do not fork a copy. #### Schema-fidelity rule (the hard rule) @@ -59,9 +59,9 @@ For a `/api/v1` endpoint, the request and response schemas **must be the establi - ✅ **Adding** an optional field is allowed (`field: z.string().optional()`). Old clients ignore it; new clients may send it. - ❌ **Renaming** a field, **changing** its type, **tightening** its validation, or **changing its meaning** is a wire break — do not do it in a mirror route. If the v2 domain genuinely needs a different shape, that shape belongs on `/api/v2`, not on the `/api/v1` mirror. -- ❌ Re-declaring the schema inline in server-v2 (even if it "looks identical") is forbidden — it drifts. One schema, one home: the owning `agent-core-v2` domain contract or `packages/kap-server/src/protocol`. +- ❌ Re-declaring the schema inline in server-v2 (even if it "looks identical") is forbidden — it drifts. One schema, one home: the owning `agent-core-v2` domain contract or `packages/agent-gateway/src/protocol`. -Self-check: "would a released v1 client get a byte-identical envelope from `packages/kap-server` for this request?" If you cannot answer yes from the shared schema, the route is wrong. +Self-check: "would a released v1 client get a byte-identical envelope from `packages/agent-gateway` for this request?" If you cannot answer yes from the shared schema, the route is wrong. ### 3. Choose native Service vs LegacyService @@ -94,8 +94,8 @@ packages/agent-core-v2/src/Legacy/ Skeleton (matches `prompt/`): ```ts -// prompt.ts — contract shaped by the v1 wire schema (kap-server/src/protocol) -import type { PromptSubmitResult, PromptSubmission } from '../../protocol/rest-prompt'; +// prompt.ts — contract shaped by the v1 wire schema (@pymodel/protocol) +import type { PromptSubmitResult, PromptSubmission } from '@pymodel/protocol'; import { createDecorator, type ServiceIdentifier } from '#/_base/di/instantiation'; export interface IAgentPromptService { @@ -131,20 +131,20 @@ Conventions: - **Role is carried by the name** — `Legacy` marks it as an `edge adapter`; the v1 contract it implements and the native v2 Service it leaves untouched stay evident from its delegation targets (see `prompt.ts`). - **Scope** = the lifetime of the *legacy* state it holds (the `prompt` queue is per-agent → `LifecycleScope.Agent`). Apply [orient.md](orient.md) / [design.md](design.md) normally — a LegacyService is not exempt from scope rules. - **Delegate, do not duplicate** business logic. The LegacyService translates the v1 contract into native-Service calls and translates results back; the real work stays in the native Service. -- **Contract types come from the v1 wire schema homes** (the owning v2 domain contract or `kap-server/src/protocol`), so the interface cannot drift from the wire shape. +- **Contract types come from the v1 wire schema homes** (the owning v2 domain contract or `agent-gateway/src/protocol`), so the interface cannot drift from the wire shape. -### 4. Wire the route / actionMap entry +### 4. Wire the route / v2 route file -**For `/api/v1` (mirror):** add a route file under `packages/kap-server/src/routes/.ts` using `defineRoute`, then register it in `registerApiV1Routes.ts`. Resolve the scope from the URL (`session_id` → Session scope, agent → Agent scope via `IAgentLifecycleService.getHandle`), then `accessor.get(IX)` the native or Legacy Service. Match the established verbs, paths (`:sid` / `{session_id}`), and `parseActionSuffix` actions (`:steer`, `:abort`) exactly — sibling routes under `packages/kap-server/src/routes/` are the reference. +**For `/api/v1` (mirror):** add a route file under `packages/agent-gateway/src/routes/.ts` using `defineRoute`, then register it in `registerApiV1Routes.ts`. Resolve the scope from the URL (`session_id` → Session scope, agent → Agent scope via `IAgentLifecycleService.getHandle`), then `accessor.get(IX)` the native or Legacy Service. Match the established verbs, paths (`:sid` / `{session_id}`), and `parseActionSuffix` actions (`:steer`, `:abort`) exactly — sibling routes under `packages/agent-gateway/src/routes/` are the reference. ```ts const route = defineRoute( { method: 'POST', path: '/sessions/{session_id}/prompts', - body: promptSubmissionSchema, // ← from kap-server/src/protocol + body: promptSubmissionSchema, // ← from agent-gateway/src/protocol params: sessionIdParamSchema, - success: { data: promptSubmitResultSchema }, // ← from kap-server/src/protocol + success: { data: promptSubmitResultSchema }, // ← from agent-gateway/src/protocol errors: { [ErrorCode.SESSION_NOT_FOUND]: {}, [ErrorCode.SESSION_BUSY]: {}, @@ -165,14 +165,14 @@ const route = defineRoute( app.post(route.path, route.options, route.handler); ``` -**For `/api/v2` (native):** add a `resource:action` entry to `actionMap` ([edge-exposure.md](edge-exposure.md) §3). If the method fails the direct-exposure rules (returns a handle / stream / bytes, takes a live object), add a wire-safe orchestration method to the owning domain Service first — as `prompts:submit` maps to `IAgentPromptService.submit`, which settles `{turn_id}` engine-side instead of returning the live `PromptHandle`. +**For `/api/v2` (native):** add a route file under `packages/agent-gateway/src/routes/v2/` and mount it in `registerApiV2Routes.ts`. If the method fails the direct-exposure rules (returns a handle / stream / bytes, takes a live object), add a wire-safe orchestration method to the owning domain Service first — as `prompts:submit` maps to `IAgentPromptService.submit`, which settles `{turn_id}` engine-side instead of returning the live `PromptHandle`. ### 5. Map errors The route translates domain `PythinkerError` codes into protocol `ErrorCode` numbers. Two registries must stay in sync: - **Domain code** — register in `agent-core-v2/src/errors.ts` (`ErrorCodes`) and throw from the Service (errors.md). Co-located domain errors go in `Legacy/errors.ts` (e.g. `prompt.not_found`, `session.busy`). -- **Wire code** — register the matching number in `packages/kap-server/src/protocol/error-codes.ts` and reference it in the route's `errors` map and `sendMappedError`. +- **Wire code** — register the matching number in `packages/agent-gateway/src/protocol/error-codes.ts` and reference it in the route's `errors` map and `sendMappedError`. ```ts function sendMappedError(reply, requestId, err) { @@ -194,7 +194,7 @@ Match the v1 route's status codes and idempotent-conflict envelopes (e.g. `promp ### 6. Test against the v1 wire shape -Add a `packages/kap-server/test/.test.ts` that boots the server and hits the route. Assert on the **envelope + protocol shape**, not on the v2 domain internals: +Add a `packages/agent-gateway/test/.test.ts` that boots the server and hits the route. Assert on the **envelope + protocol shape**, not on the v2 domain internals: - success envelope `{ code: 0, data: , request_id }`; - each declared error envelope `{ code: , msg, data, request_id }`; @@ -204,8 +204,7 @@ Where the route mirrors v1, the test is the regression guard for the schema-fide ### 7. Verify -- `pnpm -C packages/kap-server test` — server routes green. -- `pnpm -C packages/kap-server test` — server routes green (incl. any wire-schema guards). +- `pnpm -C packages/agent-gateway test` — server routes green (incl. any wire-schema guards). - `pnpm -C packages/agent-core-v2 test` — native + Legacy Service tests green. - `pnpm -C packages/agent-core-v2 run lint:imports` — the import boundaries (v1 ban, kosong subtree) still hold for a LegacyService. - `pnpm -C packages/klient test` (optionally with `PYTHINKER_SERVER_URL` for the live legacy suites) when a v1 parity scenario exists. @@ -218,12 +217,12 @@ This is the reference alignment (commits `feat(server-v2): port v1 /sessions/:si **The split.** -- `/api/v2` keeps the native shape — `prompts:submit` / `steer` / `undo` / `clear` / `cancel` map to the domain Services (`IAgentPromptService.submit` / `submitSteer`, `IAgentConversationUndoService.undo`, `IAgentLoopService.cancelFromUser`) in `actionMap`. +- `/api/v2` keeps the native shape — `prompts:submit` / `steer` / `undo` / `clear` / `cancel` map to the domain Services (`IAgentPromptService.submit` / `submitSteer`, `IAgentConversationUndoService.undo`, `IAgentLoopService.cancelFromUser`) over the v2 route files. - `/api/v1` gets an `AgentPromptLegacyService` (`prompt/`, `LifecycleScope.Agent`) that re-implements the v1 scheduler — queue, `prompt_id`, steer/abort, auto-start-next — **on top of** the native `IAgentPromptService`. The `/api/v1` routes consume the LegacyService. -**The schema.** Both surfaces import `promptSubmissionSchema` / `promptSubmitResultSchema` / `promptListResponseSchema` / `promptSteerRequestSchema` / `promptSteerResultSchema` / `promptAbortResponseSchema` from the shared v1 wire schemas (see `packages/kap-server/src/protocol`). The `/api/v1` and `/api/v2` routes are therefore compatible with released clients by construction; the LegacyService projects v2 turn results back into those protocol shapes. +**The schema.** Both surfaces import `promptSubmissionSchema` / `promptSubmitResultSchema` / `promptListResponseSchema` / `promptSteerRequestSchema` / `promptSteerResultSchema` / `promptAbortResponseSchema` from the shared v1 wire schemas (see `packages/agent-gateway/src/protocol`). The `/api/v1` and `/api/v2` routes are therefore compatible with released clients by construction; the LegacyService projects v2 turn results back into those protocol shapes. -**The errors.** v1 codes (`prompt.not_found`, `session.busy`, `prompt.already_completed`) are registered in `agent-core-v2` (`prompt/errors.ts`) and in `packages/kap-server/src/protocol` (`error-codes.ts`), then mapped in the route's `sendMappedError` — including the idempotent `prompt.already_completed` → `40903 { data: { aborted: false } }`. +**The errors.** v1 codes (`prompt.not_found`, `session.busy`, `prompt.already_completed`) are registered in `agent-core-v2` (`prompt/errors.ts`) and in `packages/agent-gateway/src/protocol` (`error-codes.ts`), then mapped in the route's `sendMappedError` — including the idempotent `prompt.already_completed` → `40903 { data: { aborted: false } }`. **The lesson.** When the v1 contract and the v2 domain disagree, add an adapter (LegacyService) at the edge; do not let the wire contract leak into the native domain. The two surfaces share the protocol schema but not the Service. @@ -233,21 +232,21 @@ Before submitting a server-align change: - [ ] Surface chosen deliberately: `/api/v1` mirror for a v1-matched endpoint, `/api/v2` for a new native capability (both if needed). - [ ] For a `/api/v1` mirror, the route matches the established v1 contract (protocol schema + sibling routes) path-for-path, verb-for-verb, action-for-action. -- [ ] Request and response schemas come from their owning home (the `agent-core-v2` domain contract or `packages/kap-server/src/protocol`); no inline re-declaration in server-v2. +- [ ] Request and response schemas come from their owning home (the `agent-core-v2` domain contract or `packages/agent-gateway/src/protocol`); no inline re-declaration in server-v2. - [ ] Existing schema fields are unchanged in name, type, and semantics; only optional fields added (if any). - [ ] Native v2 Service left clean; v1-only behavior isolated in a `Legacy` / `ILegacyService` edge adapter when the semantics diverge. - [ ] LegacyService registered with the correct `LifecycleScope` and named as the `Legacy` edge adapter preserving the native Service. -- [ ] Domain error codes registered in `agent-core-v2`; wire codes registered in `packages/kap-server/src/protocol`; route maps them in `sendMappedError`, matching v1's status codes and idempotent envelopes. +- [ ] Domain error codes registered in `agent-core-v2`; wire codes registered in `packages/agent-gateway/src/protocol`; route maps them in `sendMappedError`, matching v1's status codes and idempotent envelopes. - [ ] Route resolves the scope from the URL by `accessor.get(IX)`; no cached scope; finishes before disposal. - [ ] Tests assert the wire envelope + protocol shape; wire-shape guards added/updated where the route mirrors v1. - [ ] `lint:imports` passes; the LegacyService did not invert scope direction. ## Red lines (this subskill) -- One wire schema, one home: the owning `agent-core-v2` domain contract or `packages/kap-server/src/protocol`. Never re-declare a v1 wire schema inline in server-v2. +- One wire schema, one home: the owning `agent-core-v2` domain contract or `packages/agent-gateway/src/protocol`. Never re-declare a v1 wire schema inline in server-v2. - A `/api/v1` mirror route must keep every existing schema field's name, type, and semantics; only optional additions are allowed. A different shape belongs on `/api/v2`, not on the mirror. - Do not distort the native v2 Service to satisfy a v1 quirk — add a `Legacy` edge adapter instead. The native Service serves the v2 architecture; the LegacyService serves the wire contract. - A LegacyService is still a v2 Service: it follows scope, domain-direction, and DI rules. "Edge adapter" describes its role, not an exemption. -- The established wire schema (in its owning home — the `agent-core-v2` domain contract or `packages/kap-server/src/protocol`) plus the existing mirror routes are the spec for a `/api/v1` route — match them; do not re-derive the wire shape from the v2 domain model or from memory. -- Register every new error code in **both** `agent-core-v2` and `packages/kap-server/src/protocol/error-codes.ts`; an unmapped code is a wire break. +- The established wire schema (in its owning home — the `agent-core-v2` domain contract or `packages/agent-gateway/src/protocol`) plus the existing mirror routes are the spec for a `/api/v1` route — match them; do not re-derive the wire shape from the v2 domain model or from memory. +- Register every new error code in **both** `agent-core-v2` and `packages/agent-gateway/src/protocol/error-codes.ts`; an unmapped code is a wire break. - Events stream over WS (`listen`), never over the REST mirror; do not invent REST polling for something v1 pushed as an event. diff --git a/.agents/skills/agent-core-dev/telemetry.md b/.agents/skills/agent-core-dev/telemetry.md index b97398252..411f2eccf 100644 --- a/.agents/skills/agent-core-dev/telemetry.md +++ b/.agents/skills/agent-core-dev/telemetry.md @@ -27,7 +27,7 @@ constructor(@ITelemetryService private readonly telemetry: ITelemetryService) {} this.telemetry.track2('cron_fired', { task_id: taskId, coalesced_count: 0, stale: false, buffered: false, recurring: true }); ``` -`track2` is checked against the registry in `events.ts` at compile time: the event name must be a key of `telemetryEventDefinitions`, and the properties must match the registered interface exactly (extra or missing keys are compile errors). **New events must be registered first** — add a properties interface, then register it with `defineAgentTelemetryEvent

({ owner, comment, properties })` when every emission path goes through an Agent-scoped `ITelemetryService` view, or `defineTelemetryEvent

` otherwise (including events with any non-Agent emission path, e.g. `image_compress` from the kap-server prompt routes), documenting every property. For agent-scope events the registered interface is the business payload only: ambient `agent_id` is declared once in `AgentTelemetryEventContext` and composed into the wire schema, so it must not appear in the payload or at call sites. Naming: snake_case for events and properties, unit suffixes (`_ms` / `_count` / `_bytes`), no user content or file paths; `test/app/telemetry/events.test.ts` enforces the conventions. The low-level `track` remains for appender plumbing and tests only. +`track2` is checked against the registry in `events.ts` at compile time: the event name must be a key of `telemetryEventDefinitions`, and the properties must match the registered interface exactly (extra or missing keys are compile errors). **New events must be registered first** — add a properties interface, then register it with `defineAgentTelemetryEvent

({ owner, comment, properties })` when every emission path goes through an Agent-scoped `ITelemetryService` view, or `defineTelemetryEvent

` otherwise (including events with any non-Agent emission path, e.g. `image_compress` from the agent-gateway prompt routes), documenting every property. For agent-scope events the registered interface is the business payload only: ambient `agent_id` is declared once in `AgentTelemetryEventContext` and composed into the wire schema, so it must not appear in the payload or at call sites. Naming: snake_case for events and properties, unit suffixes (`_ms` / `_count` / `_bytes`), no user content or file paths; `test/app/telemetry/events.test.ts` enforces the conventions. The low-level `track` remains for appender plumbing and tests only. `TelemetryService.track` merges the bound context into the properties and fans the event out to every registered appender. A single throwing appender is isolated via `onUnexpectedError` and never blocks the rest. diff --git a/.agents/skills/gen-docs/SKILL.md b/.agents/skills/gen-docs/SKILL.md index 5cde626f0..f4368f4eb 100644 --- a/.agents/skills/gen-docs/SKILL.md +++ b/.agents/skills/gen-docs/SKILL.md @@ -7,7 +7,7 @@ description: Update Pythinker Code CLI user documentation after meaningful code ## Overview -This repository maintains bilingual user documentation under `docs/`. `docs/en/` and `docs/zh/` are mirrored pairs for most pages; update both in the same change. **Changelog is the exception** — English is the source, and Chinese is translated from English. +This repository maintains English-only user documentation under `docs/`. Use this skill to update the corresponding documentation whenever the codebase has changes that affect product behavior or user experience. @@ -17,10 +17,9 @@ For a **full pre-release audit** of all pages (detecting hallucinations and cove This skill depends on the following being in place. If any are missing, stop and report to the user before continuing: -- `docs/` directory with `docs/zh/`, `docs/en/`, and `docs/.vitepress/config.ts` set up (VitePress site). +- `docs/` directory with `docs/.vitepress/config.ts` set up (VitePress site). - `docs/AGENTS.md` style guide — defines source-of-truth rules, terminology table, typography, and writing style. -- `docs/scripts/sync-changelog.mjs` — auto-syncs root `CHANGELOG.md` to `docs/en/release-notes/changelog.md`. -- `translate-docs` skill in `.agents/skills/` — handles bilingual synchronization. +- The `sync-changelog` skill — syncs `apps/pythinker-code/CHANGELOG.md` into `docs/release-notes/changelog.md`. ## Workflow @@ -41,19 +40,14 @@ This skill depends on the following being in place. If any are missing, stop and If after the scan you conclude there is no user-facing impact, say so and stop. -3. **Sync English changelog** +3. **Sync the changelog** - Run: - - ```bash - node docs/scripts/sync-changelog.mjs - ``` - - This updates `docs/en/release-notes/changelog.md` from the root `CHANGELOG.md`. Never edit the docs changelog by hand. + Run the `sync-changelog` skill. It curates `apps/pythinker-code/CHANGELOG.md` + into `docs/release-notes/changelog.md`. Never edit the docs changelog by hand. 4. **Update user docs** - Following the rules in `docs/AGENTS.md`, edit the affected pages in whichever locale you are working in, then sync the mirror. Match terminology with the term table in `docs/AGENTS.md` and the existing wording in surrounding pages. + Following the rules in `docs/AGENTS.md`, edit the affected pages under `docs/`. Match terminology with the term table in `docs/AGENTS.md` and the existing wording in surrounding pages. Cover all relevant sections: @@ -61,29 +55,19 @@ This skill depends on the following being in place. If any are missing, stop and - Customization (skills, agents, MCP, hooks, plugins, etc.) - Configuration (config files, env vars, providers, data locations) - Reference (CLI subcommands, slash commands, keyboard shortcuts) - - Release notes (`docs/zh/release-notes/breaking-changes.md` if a breaking change is involved) - -5. **Sync bilingual content** - - Invoke the `translate-docs` skill. It will: - - - Sync updated non-changelog pages between `docs/en/` and `docs/zh/` - - Translate the English changelog → Chinese under `docs/zh/release-notes/changelog.md` + - Release notes (`docs/release-notes/changelog.md`, via the `sync-changelog` skill) ## Rules and conventions -- **Locale sync**: Non-changelog pages stay mirrored between `docs/en/` and `docs/zh/`. Changelog flows English → Chinese. -- **Terminology**: Use the term table in `docs/AGENTS.md` exactly. Do not invent new translations or use synonyms. +- **Terminology**: Use the term table in `docs/AGENTS.md` exactly. Do not invent synonyms. - **Scope discipline**: Only update sections affected by the recent changes. Do not opportunistically rewrite unrelated docs. - **Public examples**: Never write real internal endpoints, key names, account names, or service names into docs. Use neutral placeholders such as `https://api.example.com/v1`, `https://registry.example.com/v1/models/api.json`, `example.test`, and `YOUR_API_KEY`. -- **Breaking changes**: If any change is breaking, also update `docs/en/release-notes/breaking-changes.md` (under `## Unreleased`) with `**Affected**` + `**Migration**` subsections, and mirror it in `docs/zh/release-notes/breaking-changes.md`. -- **Do not edit auto-synced files**: `docs/en/release-notes/changelog.md` is regenerated by the sync script; any manual edit will be overwritten. +- **Breaking changes**: If any change is breaking, say so in the changeset and describe the migration there; the changelog carries it into `docs/release-notes/changelog.md`. +- **Do not edit auto-synced files**: `docs/release-notes/changelog.md` is regenerated by the sync script; any manual edit will be overwritten. ## Common mistakes - Describing what code changed instead of what the user can now do (or can no longer do). - Adding a new section heading per feature instead of weaving the change into existing prose. -- Updating only one locale and leaving its mirror stale. -- Editing only the mirror to fix wording that should be corrected in the locale you changed first. - Inventing new terminology that drifts from the `docs/AGENTS.md` term table. - Using real internal values in examples instead of neutral `example` placeholders. diff --git a/.agents/skills/pre-changelog/SKILL.md b/.agents/skills/pre-changelog/SKILL.md deleted file mode 100644 index ccea54dac..000000000 --- a/.agents/skills/pre-changelog/SKILL.md +++ /dev/null @@ -1,72 +0,0 @@ ---- -name: pre-changelog -description: Use before merging a pythinker-code release PR to preview the user-facing CLI changelog in Chinese. Reads the changelog that changesets pre-generated in the release PR, then reuses sync-changelog's strip / classify / translate logic to render a Chinese preview. Writes no files. ---- - -# Pre-Changelog - -Preview the user-facing **Chinese** changelog of an open `pythinker-code` release PR **before** it is merged. Read-only: this skill writes no files and commits nothing. - -This skill reuses `sync-changelog`'s strip / classify / translate rules. Read `sync-changelog` first; only the data source (release PR diff instead of a published `CHANGELOG.md`) and the output (preview instead of docs files) differ. - -## Workflow - -### 1. Locate the release PR - -```bash -gh pr list --state open --search "ci: release packages in:title" \ - --json number,title,url,headRefName,baseRefName -``` - -Pick the one with `headRefName: changeset-release/main`; record `number`, `url` as ``. If none is open, nothing to preview — stop. - -### 2. Read the pre-generated CLI changelog block - -changesets already pre-generates `apps/pythinker-code/CHANGELOG.md` inside the release PR. Extract the new version block from the diff: - -```bash -gh api repos/PyModel/pythinker-code/pulls//files \ - --jq '.[] | select(.filename=="apps/pythinker-code/CHANGELOG.md") | .patch' -``` - -Take the added lines (`+`) from the top `## ` down to (but not including) the next `## `. That is the version block to preview. - -If the CLI changelog is not in the diff (for example an SDK-only release), stop and tell the user — there is no user-facing CLI changelog to preview. - -### 3. Render the Chinese preview (reuse `sync-changelog`) - -Process the version block exactly as `sync-changelog` does for the docs site, but only in memory: - -- **Strip** (`sync-changelog` step 3): drop the H1, the `### Patch Changes` / `### Minor Changes` / `### Major Changes` subheadings, PR links, and commit-hash links; keep only each entry's body text. The `Thanks [@user](...)!` credit (including the multi-author form) must be removed every time. Within each entry, drop SDK-only and provider-internal sentences (SDK capability mapping / API exposure, provider wire-format mechanics, internal XML markers, hook/event payload mechanics such as what an event reports or carries) and keep only the user-facing effect and required constraints. -- **Merge and deduplicate** (`sync-changelog` step 4): merge micro-tweaks to the same surface into one higher-level entry; when three or more fixes target the same UI area or the same class of problem, merge them into one higher-level fix entry (do not merge broad or genuinely distinct fixes); and drop a server/API entry that only backs a web feature already listed. -- **Collapse low-signal entries** (`sync-changelog` step 4): keep standalone only entries that pass both gates — the reader-action test (the reader must do or re-evaluate something) and the channel test (the product cannot push it into the user's path: hidden controls, habit invalidations, capabilities users would not know to seek — a control merely sitting in the UI is not surfacing, users do not explore). Polish keeps only must-react items; experiences the product shows at the moment of need (recovery cards, post-install guidance) fold. Fixes keep only behavior-change entries (readers must update a habit, config, or workaround); loud failures fold (the fix itself notifies the victim), and silent past damage folds too — the changelog does not repair the past, and a notice that names no locatable instance and no realistic action is noise, not diligence. Section sizes follow density defaults (about 2 polish, 3 fixes) that yield to genuinely qualifying entries — flag the overflow for the reviewer instead of folding to hit the number. Fold everything else into one catch-all line placed last under 修复 — `修复了一些已知问题。` (or `修复了一些已知问题,并做了若干细节优化。` when non-fix entries were also collapsed; when nothing folded is a fix, place it under 优化 instead as `做了若干细节优化和内部改进。`), followed by a separate pointer sentence: `更详细的变更记录见 [GitHub](https://github.com/PyModel/pythinker-code/blob/main/apps/pythinker-code/CHANGELOG.md)。` (file link, no version anchor; before the release PR merges, the target does not yet contain this version's block — expected for a preview). -- **Classify** (`sync-changelog` step 4): bucket into Features / Bug Fixes / Polish / Refactors / Other; order within each section by reader value (in Polish, user-visible improvements before protocol/internal adjustments). -- **Translate** (`sync-changelog` step 6): translate entry bodies to Chinese; keep one sentence per entry with a parallel rhythm within a section; section headings become 新功能 / 修复 / 优化 / 重构 / 其他. - -If an upstream entry is not in English, flag it and stop (changeset entries must be English). - -### 4. Output - -Print the preview directly. Use `(预览)` as the heading because the version is not released yet. Write `无` for empty sections. Do not write any file. - -After the preview block, append a reviewer-only section titled `### 审稿参考(不进入文档)`: list every entry folded into the catch-all (short English title, one line each), note any section that exceeds the density defaults, and flag borderline calls for the reviewer to confirm. This breakdown is how reviewers see what was folded — before merge, the catch-all pointer's target does not yet contain the version's block. Never write this section into the docs pages. - -The preview is pasted into chat tools (for example Lark), where relative docs links do not resolve. Rewrite every docs link to its absolute published URL: map `../.md[#anchor]` to `https://code.pythinker.com/pythinker-code/zh/.html[#anchor]` — for example `../configuration/config-files.md#loop-control` → `https://code.pythinker.com/pythinker-code/zh/configuration/config-files.html#loop-control`. Never emit raw relative paths, and never wrap a link in backticks; code-style the link text inside the brackets instead ([`loop_control`](...)). - -``` -发版 PR: - -## (预览) - -### 新功能 -- ... - -### 修复 -- ... -``` - -## Rules - -- Read-only. Never write `CHANGELOG.md`, docs files, or commit anything. -- Classification, ordering, and translation follow `sync-changelog` exactly — do not reword or reclassify beyond what it specifies. -- If the release PR has no CLI changelog diff, report it and stop. diff --git a/.agents/skills/sync-changelog/SKILL.md b/.agents/skills/sync-changelog/SKILL.md index fab49f8f1..0ad798cdc 100644 --- a/.agents/skills/sync-changelog/SKILL.md +++ b/.agents/skills/sync-changelog/SKILL.md @@ -1,6 +1,6 @@ --- name: sync-changelog -description: Use after a release succeeds, when maintainers need to sync apps/pythinker-code/CHANGELOG.md into docs/en/release-notes/changelog.md and docs/zh/release-notes/changelog.md, then open a PR on a dedicated branch. +description: Use after a release succeeds, when maintainers need to sync apps/pythinker-code/CHANGELOG.md into docs/release-notes/changelog.md, then open a PR on a dedicated branch. --- # Sync Changelog @@ -15,12 +15,12 @@ apps/pythinker-code/CHANGELOG.md This file is the **only upstream source** for the documentation-site changelog. Internal package changelogs such as `packages/*/CHANGELOG.md` do not go into the documentation site. -After the release flow finishes (Release PR merged → `Version Packages` completed → npm publish succeeded), maintainers manually run this skill to copy the new CLI changelog entries into the docs site, translate the English increment into Chinese, wait for an optional human review, then commit on a dedicated branch and open a PR. +After the release flow finishes (Release PR merged → `Version Packages` completed → npm publish succeeded), maintainers manually run this skill to copy the new CLI changelog entries into the docs site, wait for an optional human review, then commit on a dedicated branch and open a PR. ## When To Use - A new version has been published to npm. -- The top of `apps/pythinker-code/CHANGELOG.md` contains version blocks that are not yet in `docs/en/release-notes/changelog.md`. +- The top of `apps/pythinker-code/CHANGELOG.md` contains version blocks that are not yet in `docs/release-notes/changelog.md`. - The `gen-docs` flow does not run this automatically; maintainers must explicitly do it after release. Do **not** run this before the Release PR is merged. At that point, changesets has not yet written the new version into `apps/pythinker-code/CHANGELOG.md`. @@ -30,10 +30,9 @@ Do **not** run this before the Release PR is merged. At that point, changesets h | File | Role | Edited by | |---|---|---| | `apps/pythinker-code/CHANGELOG.md` | **Only upstream source**, generated by changesets | Never edit manually | -| `docs/en/release-notes/changelog.md` | English docs changelog; source of truth for docs | This skill | -| `docs/zh/release-notes/changelog.md` | Chinese docs changelog, translated from English | This skill, following `translate-docs` | +| `docs/release-notes/changelog.md` | English docs changelog; source of truth for docs | This skill | -Core rule: the English docs changelog is the source of truth, and Chinese is translated from English. This matches `translate-docs`. +Core rule: `apps/pythinker-code/CHANGELOG.md` is the only upstream source; the English docs changelog is what this skill writes. ## Preconditions @@ -62,7 +61,7 @@ Before creating the branch, peek at the version range so the branch name matches ```bash rg '^## ' apps/pythinker-code/CHANGELOG.md | head -5 -rg '^## ' docs/en/release-notes/changelog.md | head -5 +rg '^## ' docs/release-notes/changelog.md | head -5 ``` Name the branch after the newest upstream version that is not yet in the English docs page: @@ -111,7 +110,7 @@ Remove: After stripping, each entry is `- `. -Drop SDK-only and provider-internal detail. This changelog serves `@pymodel/pythinker-code` CLI and web users. Within an entry, keep only what CLI/web users can perceive, and remove sentences that document internals instead of user-visible behavior. Apply this on both the English and Chinese pages: +Drop SDK-only and provider-internal detail. This changelog serves `@pymodel/pythinker-code` CLI and web users. Within an entry, keep only what CLI/web users can perceive, and remove sentences that document internals instead of user-visible behavior. Apply this on the English page: - Drop sentences about how the SDK maps a capability, builds model aliases, or exposes a flag through an API such as `getExperimentalFeatures()` — that belongs in the SDK changelog, not here. - Drop provider / wire-format implementation mechanics (XML markers like ``, protocol field explanations, "the wire protocol is unchanged", cache-hit mechanics) unless they are the behavior a user perceives. @@ -134,8 +133,8 @@ Before classifying, merge related entries and drop redundant ones from the user- - `Bug Fixes`: keep only **behavior-change** fixes — the fix changes how something works going forward, so readers must update a habit, a config, or a widely-adopted workaround. Everything else folds, for one of two opposite reasons. Loud failures (crashes, refusals, interrupted runs): the fix itself notifies whoever was hit — announcement value falls as bug visibility rises. Silent past damage (dropped data, wrong results the user never noticed): the changelog cannot repair the past, and in this product the notice names no locatable instance and no realistic action — users cannot enumerate which old sessions were affected, and they do not audit finished sessions; a "some past outputs may be wrong" line is anxiety without an outlet, not diligence. The rare exception is a retrospective notice with a concrete, locatable action (for example rotating a token after a credential-handling flaw); keep those. Never keep a fix merely because it was severe, and never keep one because the bug class feels important. - Do not grade entries by engineering importance. Severity and effort are already represented upstream; the curated changelog is not a credit ledger — its only job is to change what the reader does or knows. - **Density, not quota.** Standalone sections stay short so the changelog actually gets read — as a default, expect about 2 Polish and 3 Bug Fixes entries per version, while `Features` is gated by the test alone and has no count. The defaults yield whenever more entries genuinely pass the reader-action test: keep them and flag the overflow for the human reviewer; never fold a qualifying entry just to hit the number, and never pad a section to reach it. The reviewer owns the final cutoff — the curator's job is to surface the borderline calls, not to resolve them silently. - - Everything else collapses into a single catch-all bullet placed last under `Bug Fixes`: `Fix several known issues.` When entries beyond fixes were also collapsed, use `Fix several known issues and make various refinements.` instead (Chinese: `修复了一些已知问题。` / `修复了一些已知问题,并做了若干细节优化。`). End the catch-all line with a pointer to the upstream file so folded entries stay reachable, phrased as a separate short sentence — `See the [changelog on GitHub](https://github.com/PyModel/pythinker-code/blob/main/apps/pythinker-code/CHANGELOG.md) for more technical entries.` (Chinese: `更详细的变更记录见 [GitHub](https://github.com/PyModel/pythinker-code/blob/main/apps/pythinker-code/CHANGELOG.md)。`). Link the file itself, never a per-version anchor — GitHub's generated heading anchors are fragile. Keep the pointer wording restrained ("more technical entries"): upstream only contains changes that received a changeset, so never claim the list is complete. - - If no fix survives, the `Bug Fixes` section is the catch-all line alone; if the whole version has no user-facing change, the version block is a single section with that line. Match the catch-all to what was folded — never claim fixes that did not happen: when the folded entries include fixes, use the forms above under `Bug Fixes`; when everything folded is polish or internal work, place the catch-all under `Polish` as `Make several refinements and internal improvements.` (Chinese: `做了若干细节优化和内部改进。`). + - Everything else collapses into a single catch-all bullet placed last under `Bug Fixes`: `Fix several known issues.` When entries beyond fixes were also collapsed, use `Fix several known issues and make various refinements.` instead. End the catch-all line with a pointer to the upstream file so folded entries stay reachable, phrased as a separate short sentence — `See the [changelog on GitHub](https://github.com/PyModel/pythinker-code/blob/main/apps/pythinker-code/CHANGELOG.md) for more technical entries.`. Link the file itself, never a per-version anchor — GitHub's generated heading anchors are fragile. Keep the pointer wording restrained ("more technical entries"): upstream only contains changes that received a changeset, so never claim the list is complete. + - If no fix survives, the `Bug Fixes` section is the catch-all line alone; if the whole version has no user-facing change, the version block is a single section with that line. Match the catch-all to what was folded — never claim fixes that did not happen: when the folded entries include fixes, use the forms above under `Bug Fixes`; when everything folded is polish or internal work, place the catch-all under `Polish` as `Make several refinements and internal improvements.`. - **Merge micro-tweaks to the same surface.** Collapse several small tweaks to the same UI area or feature into one concise entry at the higher level. For example, "change the composer's default height" and "change the composer's default font" merge into "Polish the composer's default styling." Use the most specific common ancestor (composer, settings page, tool card, and so on). Classify the merged entry by its combined effect - **Merge same-surface or same-kind fixes when you have three or more.** The `Bug Fixes` section tends to accumulate many narrow UI/polish fixes that read as noise when listed one by one. When three or more fixes target the same area (for example several tool cards in the TUI, or the web session/conversation surface) or the same class of problem (for example several "jumping/flickering/collapsing during streaming" fixes), merge them into one higher-level entry. Examples: - "Fix the Bash tool card collapsing...", "Fix the Edit tool card jumping in height...", "Fix the Edit tool card flickering while its result streams in" → "Fix several TUI tool cards jumping, flickering, or collapsing in height when results stream in or end with short output." @@ -146,13 +145,13 @@ Before classifying, merge related entries and drop redundant ones from the user- The docs changelog uses five section types: -| English section | Chinese section | Meaning | -|---|---|---| -| `### Features` | `### 新功能` | New user-facing functionality, such as a new command, flag, mode, or capability that did not exist before | -| `### Polish` | `### 优化` | User-visible improvements to existing functionality, including UX adjustments, behavior tweaks, and performance improvements that are not fixes or new capabilities | -| `### Bug Fixes` | `### 修复` | Fixes for behavior that was broken | -| `### Refactors` | `### 重构` | Internal changes with no user-visible behavior change, including build, CI, tests, dependency cleanup, and internal renames | -| `### Other` | `### 其他` | Anything that does not fit above, such as CDN/endpoint swaps and docs-related artifacts | +| Section | Meaning | +|---|---| +| `### Features` | New user-facing functionality, such as a new command, flag, mode, or capability that did not exist before | +| `### Polish` | User-visible improvements to existing functionality, including UX adjustments, behavior tweaks, and performance improvements that are not fixes or new capabilities | +| `### Bug Fixes` | Fixes for behavior that was broken | +| `### Refactors` | Internal changes with no user-visible behavior change, including build, CI, tests, dependency cleanup, and internal renames | +| `### Other` | Anything that does not fit above, such as CDN/endpoint swaps and docs-related artifacts | With the catch-all rule above, `Refactors` and `Other` rarely appear in newly synced versions: entries with no user-perceivable effect fold into the catch-all, and an entry that does change user-perceivable default behavior (for example an engine default flip with an opt-out flag) is classified by that effect, usually `Polish`. Reserve `Other` for genuinely unclassifiable but user-facing entries. Older versions keep whatever sections they already have — do not rewrite history. @@ -232,97 +231,20 @@ Example: - Update the native release workflow to use current GitHub artifact actions. ``` -Doc links: an entry that changes a documented config surface may end with a pointer to the docs page — `see [X](...) for details` (Chinese: `详见 [X](...)。`). Keep it a real Markdown link into the docs tree with a relative path (for example `../configuration/config-files.md#loop-control`). When the link text is a config key or another identifier, code-style the text inside the brackets: [`loop_control`](../configuration/config-files.md#loop-control). Never wrap the whole link in backticks — `` `[loop_control](...)` `` renders as raw inline code that exposes the relative path instead of a clickable link. - -### 6. Translate The Increment Into Chinese - -After updating the English page, translate only the newly added English content into `docs/zh/release-notes/changelog.md`. - -Follow `translate-docs`, direction `en → zh`. Changelog direction is English-to-Chinese even though many other docs flows use Chinese-to-English. - -Chinese page requirements: - -- Header: - - ```markdown - # 变更记录 - - 本页记录 Pythinker Code CLI 每个版本的变更内容。 - ``` - -- Preserve version headings including the release date, but use full-width parentheses on the Chinese page, such as `## 0.2.0(2026-05-26)`. The date must match the English page; only the parenthesis style differs (half-width `()` in English, full-width `()` in Chinese). -- Translate section headings exactly: - - `### Features` → `### 新功能` - - `### Bug Fixes` → `### 修复` - - `### Polish` → `### 优化` - - `### Refactors` → `### 重构` - - `### Other` → `### 其他` -- The Chinese page must mirror the English page 1:1 for versions, sections, section order, entry order, and entry counts. -- Keep the classification and entry order from the English page. Do not reclassify or reorder while translating. -- Translate only entry body text. Do not add entries that are not present in English. -- Follow `docs/AGENTS.md` for Chinese typography: full-width punctuation, spaces between Chinese and English, and the glossary. - -#### Chinese wording style - -Structural fidelity does not mean literal translation. The Chinese entries should read like a concise, idiomatic Chinese changelog. Keep the same facts as the English entry, but rephrase for natural Chinese prose. - -Guidelines: - -- **One entry, one sentence.** Avoid chaining multiple effects with commas or semicolons. If the English entry is long, split it into shorter sentences or keep only the most important effect. -- **Drop SDK-only and provider-internal detail.** Apply the trim from step 3 while translating: keep the user-facing effect and required constraints, drop SDK-mapping sentences, provider / wire-format mechanics, and internal XML markers. A long internal entry should collapse to one short Chinese sentence about what the user gets. -- **Prefer common changelog verbs**: 新增、支持、修复、优化、改进、调整. -- **Avoid indirect "through... make..." structures**. Do not write "通过 X,使 Y"; prefer direct cause-effect or just state the result. - - Bad: `通过缓存已渲染消息行,使终端在长篇对话中保持响应。` - - Better: `缓存已渲染消息行,提升长对话下终端的响应速度。` -- **Be specific, not vague**. Prefer concrete actions over abstract quality words. - - Bad: `加固默认系统提示词和内置工具描述。` - - Better: `优化默认系统提示词与内置工具描述,避免 Agent 阻塞后台任务。` -- **Name concrete files or config keys when it helps clarity**. - - Bad: `插件现在可以在其清单中声明 hooks。` - - Better: `插件现支持在 pythinker.plugin.json 中声明生命周期 hooks。` -- **Include required argument placeholders in CLI options**. - - Bad: `--allowed-host` - - Better: `--allowed-host ` -- **Keep usage hints to one short clause**. - - Bad: `传入 --allowed-host 以允许额外的 host。例如 ... (多句展开)` - - Better: `例如 pythinker web --allowed-host example.com。` -- **Do not translate technical identifiers**: keep command names, flag names, file names, env vars, config keys as-is. -- **Keep parallel rhythm within a section.** When several entries fix similar web surfaces (layout, animation, sizing), phrase them with a consistent structure (for example 修复 <问题>,现 <行为>) so the section reads as a tidy list rather than a mix of shapes. - -Example — translating a feature entry: - -English source: - -```markdown -- Add a --allowed-host flag to pythinker web that lets extra Host header values pass the DNS-rebinding check, and include allow guidance in the 403 error message. Pass --allowed-host to allow an extra host. -``` - -Before (literal, wordy): - -```markdown -- 为 `pythinker web` 新增 `--allowed-host` 标志,允许额外的 Host 请求头值通过 DNS 重绑定检查,并在 403 错误消息中包含允许指引。传入 `--allowed-host ` 以允许额外的 host。例如 `pythinker web --allowed-host example.com`。 -``` - -After (concise, idiomatic): - -```markdown -- `pythinker web` 新增 `--allowed-host ` 选项,可将指定 Host 加入 DNS 重绑定白名单;403 错误会提示如何通过 `--allowed-host` 或 `PYTHINKER_CODE_ALLOWED_HOSTS` 放行,例如 `pythinker web --allowed-host example.com`。 -``` +Doc links: an entry that changes a documented config surface may end with a pointer to the docs page — `see [X](...) for details`. Keep it a real Markdown link into the docs tree with a relative path (for example `../configuration/config-files.md#loop-control`). When the link text is a config key or another identifier, code-style the text inside the brackets: [`loop_control`](../configuration/config-files.md#loop-control). Never wrap the whole link in backticks — `` `[loop_control](...)` `` renders as raw inline code that exposes the relative path instead of a clickable link. -### 7. Verify +### 6. Verify Review: ```bash -git diff docs/en/release-notes/changelog.md docs/zh/release-notes/changelog.md +git diff docs/release-notes/changelog.md ``` Check: -- Versions and version counts match between English and Chinese. -- Every version heading carries its release date from the published tag, with half-width parentheses in English and full-width in Chinese. -- Each version has the same section set and order on both pages. -- Each section has the same number of entries on both pages. +- Every version heading carries its release date from the published tag, in half-width parentheses. +- Section order within each version follows the canonical order. - Within each section, the most valuable, obvious, and larger entries appear before smaller or narrower entries. - Low-signal entries were collapsed into the single catch-all line, placed last under `Bug Fixes` — or under `Polish` when nothing folded is a fix (both the reader-action test and the channel test applied); the catch-all wording matches what was folded and never claims fixes that did not happen; section sizes stay within the density defaults (about 2 Polish, 3 Bug Fixes) unless extra qualifying entries were deliberately kept and flagged for review. The catch-all line ends with the upstream changelog pointer (file link, no version anchor). - PR links and commit hashes were stripped. @@ -350,14 +272,14 @@ If the user chooses review: 1. Show the uncommitted diff: ```bash - git diff docs/en/release-notes/changelog.md docs/zh/release-notes/changelog.md + git diff docs/release-notes/changelog.md ``` 2. Summarize synced versions, section counts, and anything that needed manual classification. List every entry folded into a catch-all line (short titles, one line each), any section that exceeds the density defaults, and every borderline call flagged during curation — the reviewer cannot own a cutoff they cannot see. 3. Tell the user to reply when they are done reviewing, or to ask for edits. 4. Do **not** commit, push, or open a PR until the user explicitly says review is complete, or asks to proceed. -If the user requests edits during review, make the changes, re-run verification from step 7, and return to this checkpoint. +If the user requests edits during review, make the changes, re-run verification from step 6, and return to this checkpoint. ### 9. Commit @@ -366,7 +288,7 @@ Only run this step when the user skipped review or confirmed review is complete. Stage only the changelog docs files: ```bash -git add docs/en/release-notes/changelog.md docs/zh/release-notes/changelog.md +git add docs/release-notes/changelog.md ``` Use a neutral docs-sync commit message: @@ -397,7 +319,7 @@ Fill in `.github/pull_request_template.md`. For changelog sync PRs: - **Related Issue**: write `N/A — post-release docs maintenance` (no issue required). - **Problem**: the docs-site changelog is behind the published CLI release(s). -- **What changed**: list synced version(s), note English source + Chinese translation, and mention verification (`pnpm --filter docs run build`). +- **What changed**: list synced version(s) and mention verification (`pnpm --filter docs run build`). - **Checklist**: check CONTRIBUTING; explain no issue, no tests, no changeset, and that `gen-docs` is not needed because this is the dedicated changelog sync flow. Example body: @@ -413,8 +335,7 @@ The docs-site changelog has not yet been synced for `` after the ## What changed -- Synced `` from `apps/pythinker-code/CHANGELOG.md` into `docs/en/release-notes/changelog.md` -- Translated the new English increment into `docs/zh/release-notes/changelog.md` +- Synced `` from `apps/pythinker-code/CHANGELOG.md` into `docs/release-notes/changelog.md` - Verified with `pnpm --filter docs run build` ## Checklist @@ -456,7 +377,6 @@ Return the PR URL to the user when done. | Writing `Fix several known issues.` when nothing folded is a fix | Never claim fixes that did not happen; all-polish/internal folds go under Polish as `Make several refinements and internal improvements.` | | Listing a server/API entry that only backs a web feature already listed | Drop the API entry and keep the web UI entry, unless the API has independent user value | | Rewording upstream English entries | Upstream is frozen; copy the body text unless the user explicitly asks otherwise | -| Leaving English text untranslated in the Chinese page | The Chinese page must be fully Chinese except preserved technical terms | | Editing upstream changelog text | Do not edit upstream | | Losing two-space indentation in multi-line list items | Restore indentation so Markdown lists stay valid | | Copying `### Patch Changes` into docs | Remove changesets headings and classify under Features / Bug Fixes / Polish / Refactors / Other | @@ -464,25 +384,20 @@ Return the PR URL to the user when done. | Treating any `Add ...` line as Features | If the entry only adds a small element to an existing UI/surface, use Polish | | Filing UX or performance tweaks under Other | Use Polish for user-visible improvements to existing functionality | | Preserving upstream order when a small entry hides a larger change | Reorder within the section so the highest-value, most obvious items appear first | -| Reclassifying entries while translating | Chinese classification must mirror English | | Leaving empty sections | Delete sections with no entries | | Putting everything under Other for convenience | Classify what can be classified first | -| Translating tool names, command names, or config keys | Keep them as written | | Wrapping a whole doc link in backticks | Code-style the link text inside the brackets instead, so the link stays clickable: [`loop_control`](...) | | Keeping hook/event payload-mechanics clauses | Drop what an event reports or carries; keep the new capability and how to configure it | | Creating a changeset for docs sync | Do not create one | | Committing or pushing directly on `main` | Create `docs/changelog-sync-`, commit there, then open a PR | | Committing or opening a PR before the user skips review or confirms review is done | Wait at the human review checkpoint | -| Using curly quotes or half-width Chinese punctuation | Follow `docs/AGENTS.md` | -| Omitting the release date from a version heading, or guessing it | Add ` (YYYY-MM-DD)` (full-width `()` in Chinese) taken from the published tag | +| Omitting the release date from a version heading, or guessing it | Add ` (YYYY-MM-DD)` taken from the published tag | ## Stop Signals - The top version in `apps/pythinker-code/CHANGELOG.md` is not published on npm or GitHub Releases. - You are about to edit `apps/pythinker-code/CHANGELOG.md`. - You are about to add docs sync to a changeset. -- English and Chinese versions, entry counts, or section sets do not match. - A section is empty. -- A Chinese term is uncertain and `docs/AGENTS.md` does not answer it. - A `docs/changelog-sync-*` branch already exists for the same version and you cannot confirm whether it is stale. - The user asked to review but has not yet confirmed review is complete. diff --git a/.agents/skills/translate-docs/SKILL.md b/.agents/skills/translate-docs/SKILL.md deleted file mode 100644 index e081f1a09..000000000 --- a/.agents/skills/translate-docs/SKILL.md +++ /dev/null @@ -1,67 +0,0 @@ ---- -name: translate-docs -description: Translate and sync bilingual user documentation between docs/zh/ and docs/en/ following the source-of-truth rules in docs/AGENTS.md. ---- - -# Translate Docs - -## Overview - -This repository keeps bilingual user documentation under `docs/zh/` and `docs/en/`. This skill synchronizes the two locales, page by page, after either side has been updated. - -This skill is invoked by both `gen-docs` (incremental updates) and `audit-docs` (full pre-release audit) to keep locale mirrors in sync. - -## Prerequisites - -If any of the following are missing, stop and report to the user before continuing: - -- `docs/zh/` and `docs/en/` mirrored directory structure. -- `docs/AGENTS.md` — terminology table, typography rules, and source-of-truth rules. - -## Locale sync rules - -- **Changelog** (`release-notes/changelog.md`): English is the source. Translate to Chinese. -- **Breaking changes** (`release-notes/breaking-changes.md`): English is the source. Translate to Chinese. -- **All other pages**: `docs/en/` and `docs/zh/` are mirrored pairs. After either side changes, update the other locale in the same change. - -When non-changelog pages change in either locale, sync the mirror before release. When the English changelog changes, sync the Chinese changelog. - -## Workflow - -1. **Detect what needs syncing** - - - `git diff main..HEAD --stat docs/` — see which files changed - - For each changed file under `docs/en/` or `docs/zh/`, locate its mirror in the other locale (same relative path). - -2. **Translate page by page, section by section** - - - Keep heading hierarchy, list structure, code blocks, callout blocks, and link targets identical between the two versions. - - When in doubt about a technical term, **read the actual code** to confirm behavior rather than guessing. - -3. **Apply terminology and typography rules from `docs/AGENTS.md`** - - - Use the term table exactly. Do not invent translations or use synonyms. - - English H2+ uses sentence case (proper nouns excepted, per the term table). - - Chinese typography: full-width punctuation (`,。;:?!()`), space between Chinese and ASCII (letters / numbers / inline code / links). - - Callout titles (`::: tip` / `::: warning` / `::: info` / `::: danger`) use the short Chinese labels from `docs/AGENTS.md`. - -4. **Verify** - - - `git diff docs/` — scan for terminology drift or punctuation regressions. - - Run the docs build if available (`pnpm --filter docs run build` or equivalent) to catch broken links and Markdown errors. - -## Rules and conventions - -- **Do not one-sided fixes**: if the changed locale has an unclear or incorrect statement, fix it there first; do not patch only the mirror. -- **Match style, not just words**: Chinese docs use a narrative tone (see `docs/AGENTS.md` writing-style examples); preserve that tone in Chinese; preserve sentence-case headings and concise English style in English. -- **Code blocks and identifiers stay as-is**: do not translate code, command names, flag names, or file paths. -- **Public examples**: Do not introduce real internal endpoints, key names, account names, or service names while translating. Keep or replace them with neutral placeholders such as `example.com`, `example.test`, and `YOUR_API_KEY` in both locales. - -## Common mistakes - -- Rewriting only the mirror because a phrase feels awkward in the target language — fix the changed locale first, then sync. -- Letting English headings slip into Title Case (only sentence case is allowed for H2+). -- Forgetting to add spaces between Chinese characters and inline code or English words. -- Translating proper nouns listed in the term table (`Wire`, `MCP`, `ACP`, `JSON`, `OAuth`, `macOS`, `uv`, etc.). -- Updating only one direction and leaving the other locale stale — always finish all pages flagged by the diff. -- Copying real internal values into the mirror instead of using neutral `example` placeholders. diff --git a/.agents/skills/write-tui/SKILL.md b/.agents/skills/write-tui/SKILL.md index 45088ab89..c779ec4e2 100644 --- a/.agents/skills/write-tui/SKILL.md +++ b/.agents/skills/write-tui/SKILL.md @@ -68,7 +68,7 @@ Themes are managed centrally under `src/tui/theme/`: - `bundle.ts` — packs `colors`, `styles`, `markdownTheme` into a `PythinkerTUIThemeBundle`. - `index.ts` / `detect.ts` — theme type and auto/dark/light resolution. -> **Keep the color-token set in sync.** `ColorPalette` in `colors.ts` is the source of truth for color tokens. When you add, rename, or remove one, update its mirrors in the same change: the custom-theme JSON schema (`apps/pythinker-code/src/tui/theme/theme-schema.json`), the token tables in the custom-theme docs (`docs/en/customization/themes.md` and `docs/zh/customization/themes.md`), and the token table in the `custom-theme` built-in skill (`packages/agent-core/src/skill/builtin/custom-theme.md`). +> **Keep the color-token set in sync.** `ColorPalette` in `colors.ts` is the source of truth for color tokens. When you add, rename, or remove one, update its mirrors in the same change: the custom-theme JSON schema (`apps/pythinker-code/src/tui/theme/theme-schema.json`), the token table in the custom-theme docs (`docs/customization/themes.md`), and the token table in the `custom-theme` built-in skill (`packages/agent-core/src/skill/builtin/custom-theme.md`). Apply / switch flow: diff --git a/.changeset/archive-missing-workspace.md b/.changeset/archive-missing-workspace.md new file mode 100644 index 000000000..9b6573bab --- /dev/null +++ b/.changeset/archive-missing-workspace.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix sessions failing to archive when their workspace folder no longer exists. diff --git a/.changeset/cloudbase-marketplace.md b/.changeset/cloudbase-marketplace.md new file mode 100644 index 000000000..f850de218 --- /dev/null +++ b/.changeset/cloudbase-marketplace.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Add the Tencent CloudBase plugin to the curated marketplace. diff --git a/.changeset/codex-max-output-tokens.md b/.changeset/codex-max-output-tokens.md new file mode 100644 index 000000000..39a3da72e --- /dev/null +++ b/.changeset/codex-max-output-tokens.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix every turn failing with a bare 400 error on models signed in through Codex. diff --git a/.changeset/codex-ultra-effort.md b/.changeset/codex-ultra-effort.md new file mode 100644 index 000000000..47e9c7851 --- /dev/null +++ b/.changeset/codex-ultra-effort.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Stop offering the ultra reasoning effort on Codex models, which rejected it. diff --git a/.changeset/composer-toolbar-crush-fix.md b/.changeset/composer-toolbar-crush-fix.md new file mode 100644 index 000000000..0643f2efe --- /dev/null +++ b/.changeset/composer-toolbar-crush-fix.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Fix composer toolbar buttons squeezing and overlapping each other in very narrow windows. diff --git a/.changeset/continue-fixed-prompt.md b/.changeset/continue-fixed-prompt.md new file mode 100644 index 000000000..946ecb1f3 --- /dev/null +++ b/.changeset/continue-fixed-prompt.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Make the chat "Continue" button resume a failed turn with a fixed continue prompt instead of resending your last message. diff --git a/.changeset/cron-fold-swallows-answer.md b/.changeset/cron-fold-swallows-answer.md new file mode 100644 index 000000000..7a1d4b067 --- /dev/null +++ b/.changeset/cron-fold-swallows-answer.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Keep the previous turn's final answer visible in the terminal when a scheduled turn finishes. diff --git a/.changeset/desktop-log-token-redaction.md b/.changeset/desktop-log-token-redaction.md new file mode 100644 index 000000000..d6346d4fa --- /dev/null +++ b/.changeset/desktop-log-token-redaction.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Stop the desktop app writing its server access token to the log. diff --git a/.changeset/english-only-docs.md b/.changeset/english-only-docs.md new file mode 100644 index 000000000..872fe72ea --- /dev/null +++ b/.changeset/english-only-docs.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Documentation is now English-only; the separate Chinese docs tree and its link have been removed. diff --git a/.changeset/fix-question-card-title-clamp.md b/.changeset/fix-question-card-title-clamp.md new file mode 100644 index 000000000..fa792af81 --- /dev/null +++ b/.changeset/fix-question-card-title-clamp.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Fix long question text in question cards being truncated with an ellipsis instead of wrapping. diff --git a/.changeset/fix-stale-subagent-status.md b/.changeset/fix-stale-subagent-status.md new file mode 100644 index 000000000..1dd3a4ad7 --- /dev/null +++ b/.changeset/fix-stale-subagent-status.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix completed subagents remaining marked as running in the web interface. diff --git a/.changeset/fix-tui-parity.md b/.changeset/fix-tui-parity.md new file mode 100644 index 000000000..90d116181 --- /dev/null +++ b/.changeset/fix-tui-parity.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix session warning severity, collapsed thinking hints, narrow welcome model details, and custom theme token guidance. diff --git a/.changeset/fs-write-body-limit.md b/.changeset/fs-write-body-limit.md new file mode 100644 index 000000000..10025774d --- /dev/null +++ b/.changeset/fs-write-body-limit.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix saving a file larger than 1 MB failing in the web UI. diff --git a/.changeset/fs-write-endpoint.md b/.changeset/fs-write-endpoint.md new file mode 100644 index 000000000..fc261c431 --- /dev/null +++ b/.changeset/fs-write-endpoint.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Add `POST /api/v1/sessions/{id}/fs:write` so API clients can save workspace files; passing `base_etag` fails with `40928` instead of overwriting a concurrent change. diff --git a/.changeset/mobile-shell-ui.md b/.changeset/mobile-shell-ui.md new file mode 100644 index 000000000..2f313003d --- /dev/null +++ b/.changeset/mobile-shell-ui.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Improve mobile UI styling. diff --git a/.changeset/model-pill-icon-collapse.md b/.changeset/model-pill-icon-collapse.md new file mode 100644 index 000000000..84afebde1 --- /dev/null +++ b/.changeset/model-pill-icon-collapse.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Collapse the composer model picker to an icon when space is tight; hovering still shows the model and reasoning effort. diff --git a/.changeset/modelsdev-catalog-refresh.md b/.changeset/modelsdev-catalog-refresh.md new file mode 100644 index 000000000..ca2f5fb8e --- /dev/null +++ b/.changeset/modelsdev-catalog-refresh.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Refresh model lists for providers imported from the models.dev catalog so newly released models appear automatically. diff --git a/.changeset/perm-label-flex-shrink.md b/.changeset/perm-label-flex-shrink.md new file mode 100644 index 000000000..2f55a8a70 --- /dev/null +++ b/.changeset/perm-label-flex-shrink.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Fix the composer permission mode label being hidden even when there is enough space. diff --git a/.changeset/pyaos-executor-rename.md b/.changeset/pyaos-executor-rename.md new file mode 100644 index 000000000..b086e7e25 --- /dev/null +++ b/.changeset/pyaos-executor-rename.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Rename the mcp.json stdio `executor` value `kaos` to `pyaos`. Existing configs using `"executor": "kaos"` keep working as a deprecated alias. diff --git a/.changeset/refresh-bundled-web-ui.md b/.changeset/refresh-bundled-web-ui.md new file mode 100644 index 000000000..be2ad5dc2 --- /dev/null +++ b/.changeset/refresh-bundled-web-ui.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Refresh the web UI bundled with the CLI, including the neutral grey dark theme. diff --git a/.changeset/refresh-cli-tui.md b/.changeset/refresh-cli-tui.md new file mode 100644 index 000000000..5dc2b0aa9 --- /dev/null +++ b/.changeset/refresh-cli-tui.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Refresh the CLI terminal interface with a branded welcome panel, animated robot mark, Braille activity indicators, shimmered thinking states, clearer session-mode styling, and reliable headless output flushing. diff --git a/.changeset/remote-session-archive-sync.md b/.changeset/remote-session-archive-sync.md new file mode 100644 index 000000000..ff53ea072 --- /dev/null +++ b/.changeset/remote-session-archive-sync.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Remove a session from the sidebar when it is archived from another client or the CLI, instead of leaving it in the open list until reload. diff --git a/.changeset/remove-managed-kimi-endpoints.md b/.changeset/remove-managed-kimi-endpoints.md new file mode 100644 index 000000000..ccda57f97 --- /dev/null +++ b/.changeset/remove-managed-kimi-endpoints.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Remove the hosted self-update checks, default plugin marketplace catalog, official plugin badges, tips banner, and sign-up links; Kimi now serves only as a model provider through OAuth or an API key. Set PYTHINKER_CODE_PLUGIN_MARKETPLACE_URL to keep using a plugin catalog. diff --git a/.changeset/settings-backend-label.md b/.changeset/settings-backend-label.md new file mode 100644 index 000000000..0902c9319 --- /dev/null +++ b/.changeset/settings-backend-label.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Show the backend name in Settings without a version prefix. diff --git a/.changeset/subagent-cards-stuck-running.md b/.changeset/subagent-cards-stuck-running.md new file mode 100644 index 000000000..d00f5d4f7 --- /dev/null +++ b/.changeset/subagent-cards-stuck-running.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix subagent cards in the web session view staying Running after they finish. diff --git a/.changeset/subagent-execution-inspector.md b/.changeset/subagent-execution-inspector.md new file mode 100644 index 000000000..6aef96eb5 --- /dev/null +++ b/.changeset/subagent-execution-inspector.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Allow sub agent activity cards to open their live execution transcript. diff --git a/.changeset/subagent-fork-context.md b/.changeset/subagent-fork-context.md new file mode 100644 index 000000000..fc7025ef2 --- /dev/null +++ b/.changeset/subagent-fork-context.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Add optional forked conversation context to subagent and Dynamic Workflow tool runs. diff --git a/.changeset/subagent-model-labels.md b/.changeset/subagent-model-labels.md new file mode 100644 index 000000000..930704229 --- /dev/null +++ b/.changeset/subagent-model-labels.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Show friendly model names and thinking-effort labels on subagent task cards instead of raw model ids. diff --git a/.changeset/task-notification-cron-style.md b/.changeset/task-notification-cron-style.md new file mode 100644 index 000000000..6cc6fd132 --- /dev/null +++ b/.changeset/task-notification-cron-style.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Restyle background task notifications as a lighter notice that shows the task summary, output files, and output preview directly. diff --git a/.changeset/vscode-api-key-no-signin-wall.md b/.changeset/vscode-api-key-no-signin-wall.md new file mode 100644 index 000000000..c4cd583a1 --- /dev/null +++ b/.changeset/vscode-api-key-no-signin-wall.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix the VS Code extension opening on the sign-in screen for providers authenticated with a plain API key: a configured model now opens straight into the chat. diff --git a/.changeset/vscode-host-sdk-repairs.md b/.changeset/vscode-host-sdk-repairs.md new file mode 100644 index 000000000..5eeb2ba83 --- /dev/null +++ b/.changeset/vscode-host-sdk-repairs.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix VS Code extension regressions: fork from a turn now forks at that turn instead of copying the whole session, resumed sessions replay subagent and dynamic-workflow transcripts again, shell and plugin command inputs show up in resumed history, project-level MCP servers appear in the management view, OAuth-only sign-ins are recognized as logged in, and selecting a model's highest thinking effort stays session-only instead of becoming the global default. diff --git a/.changeset/vscode-provider-refresh-race.md b/.changeset/vscode-provider-refresh-race.md new file mode 100644 index 000000000..1fcb099fb --- /dev/null +++ b/.changeset/vscode-provider-refresh-race.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix the VS Code model list briefly reverting after adding or removing a provider. diff --git a/.changeset/web-activity-thinking-glyph.md b/.changeset/web-activity-thinking-glyph.md new file mode 100644 index 000000000..1eccfcf4e --- /dev/null +++ b/.changeset/web-activity-thinking-glyph.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Stop a finished thinking step animating in the activity header for the rest of the run. diff --git a/.changeset/web-editor-reload.md b/.changeset/web-editor-reload.md new file mode 100644 index 000000000..8d7ac9901 --- /dev/null +++ b/.changeset/web-editor-reload.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix reloading a file in the workspace editor showing the old contents. diff --git a/.changeset/web-editor-save-state.md b/.changeset/web-editor-save-state.md new file mode 100644 index 000000000..815bec2ab --- /dev/null +++ b/.changeset/web-editor-save-state.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix the workspace editor's Save button staying disabled after a reload, and saving to the wrong session after switching sessions. diff --git a/.changeset/web-editor-theme-colors.md b/.changeset/web-editor-theme-colors.md new file mode 100644 index 000000000..bc90d84af --- /dev/null +++ b/.changeset/web-editor-theme-colors.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix the workspace file editor failing to open. diff --git a/.changeset/web-parity-sessions.md b/.changeset/web-parity-sessions.md new file mode 100644 index 000000000..c99ce73a6 --- /dev/null +++ b/.changeset/web-parity-sessions.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Add web UI session management: pin sessions with drag reorder, set a session emoji, mark sessions done and reopen them with undo, switch the sidebar between flat and grouped views, see recent sessions on the workspace home, and manage all sessions in bulk from a filterable Session Management table. diff --git a/.changeset/web-parity-settings.md b/.changeset/web-parity-settings.md new file mode 100644 index 000000000..0cc72cccc --- /dev/null +++ b/.changeset/web-parity-settings.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Move web UI provider management into a Settings tab with an add-provider flow and per-provider model list, add a version and diagnostics section, and support multiple terminal tabs per session. diff --git a/.changeset/web-parity-transcript.md b/.changeset/web-parity-transcript.md new file mode 100644 index 000000000..30b8f556c --- /dev/null +++ b/.changeset/web-parity-transcript.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Redesign the web UI transcript: the app-wide font changes, user messages render @-mentioned files as clickable pills, each tool call gets its own card (run, read, search, find, fetch, todo, plan, goal), a settled turn folds its working steps behind a "Worked …" summary with a per-turn file-change panel, long user messages collapse, and Ctrl/Cmd+F searches the conversation with highlighted matches. Transcript images and videos open in a fullscreen viewer. diff --git a/.changeset/web-reference-composer-port.md b/.changeset/web-reference-composer-port.md new file mode 100644 index 000000000..bc2266664 --- /dev/null +++ b/.changeset/web-reference-composer-port.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +Redesign the web UI chat dock and composer: running work now collapses into pill buttons above the composer (goal, plan, bash, sub-agents, progress) that expand into pop-over panels, and the composer gains an add menu, a permission selector, a context-usage ring, and a model picker with starred models and thinking effort. diff --git a/.changeset/web-slash-and-session-time.md b/.changeset/web-slash-and-session-time.md new file mode 100644 index 000000000..d93f58ee0 --- /dev/null +++ b/.changeset/web-slash-and-session-time.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +web: Remove `/auto`, `/yolo` and `/thinking` from the slash menu, and label the session menu timestamp as "Last updated". diff --git a/.changeset/web-workspace-file-editor.md b/.changeset/web-workspace-file-editor.md new file mode 100644 index 000000000..a101fb54d --- /dev/null +++ b/.changeset/web-workspace-file-editor.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": minor +--- + +web: Open and edit workspace files in the browser, with a save that refuses to overwrite a change made elsewhere since you opened the file. diff --git a/.changeset/windows-git-bash-path-bridge.md b/.changeset/windows-git-bash-path-bridge.md new file mode 100644 index 000000000..c2d446eaf --- /dev/null +++ b/.changeset/windows-git-bash-path-bridge.md @@ -0,0 +1,5 @@ +--- +"@pymodel/pythinker-code": patch +--- + +Fix file tools and shell working directories failing to resolve Git Bash paths such as /c/Users or /tmp on Windows. diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index cee12b664..4875d5cea 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -1,7 +1,6 @@ diff --git a/.gitignore b/.gitignore index 5f15be6b7..9c89b2ea8 100644 --- a/.gitignore +++ b/.gitignore @@ -54,3 +54,5 @@ HANDOVER*.md HANDOFF*.md handoff.md handover.md +.tmp-dev.log +result diff --git a/AGENTS.md b/AGENTS.md index a42b69c31..d8b0522f3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -50,22 +50,26 @@ Adding an OpenAI-compatible provider requires **zero code changes** — just add | ------- | ----------- | ----- | | `apps/pythinker-code` | CLI / TUI app | Consumes `@pymodel/pythinker-code-sdk`; no `agent-core` dep. Use `write-tui` skill. | | `apps/pythinker-web` | Browser UI (Vue 3 + Vite + vue-i18n) | REST + WS `/api/v1`; no `agent-core` dep. See its `AGENTS.md`. | -| `apps/pythinker-inspect` | Web inspector for the kap-server `/api/v1/debug` RPC surface | Workspace/session browser, per-session transcript chat, per-scope Service panels, DI unit inspection. See its `AGENTS.md`. | +| `apps/pythinker-inspect` | Web inspector for the agent-gateway `/api/v1/debug` RPC surface | Workspace/session browser, per-session transcript chat, per-scope Service panels, DI unit inspection. See its `AGENTS.md`. | | `apps/vis` | Session replay & debugging visualizer | `server/` + `web/` subdirs. | | `packages/agent-core` | Agent engine | Agent, Session, profile, skills, tools, plan, permission, DI. | -| `packages/agent-core-v2` | DI × Scope agent engine (the v2 port behind kap-server) | Four `LifecycleScope` tiers — `App` / `Workspace` / `Session` / `Agent` (`app/scopes.ts`) — plus the L3 unit layer (`Service`/`Fiber` units, collection contribution points, the Feature seam in `src/features/`). See its `AGENTS.md` and use the `agent-core-dev` skill. | +| `packages/agent-core-v2` | DI × Scope agent engine (the v2 port behind agent-gateway) | Four `LifecycleScope` tiers — `App` / `Workspace` / `Session` / `Agent` (`app/scopes.ts`) — plus the L3 unit layer (`Service`/`Fiber` units, collection contribution points, the Feature seam in `src/features/`). See its `AGENTS.md` and use the `agent-core-dev` skill. | | `packages/node-sdk` | Public TS SDK & harness | | | `packages/kosong` | LLM provider abstraction | Wire types, catalog, capability registry. | | `packages/pyaos` | Execution environment | File/process abstractions. | -| `packages/kap-server` | Pythinker Code server | Backed by `@pymodel/agent-core-v2`; sessions over REST + WebSocket (`/api/v1` + `/api/v1/ws`), plus `/api/v1/debug/*` reflection RPC (`--debug-endpoints`, loopback bind + bearer auth). See its `AGENTS.md`. | +| `packages/agent-gateway` | Pythinker Code server | Fastify server backed by `@pymodel/agent-core-v2`; sessions over REST + WebSocket (`/api/v1` + `/api/v1/ws`), plus `/api/v1/debug/*` reflection RPC (`--debug-endpoints`, loopback bind + bearer auth). See its `AGENTS.md`. | | `packages/klient` | Client SDK | Contract-driven facade over agent-core-v2 (`global.*` / `session(id).*` / `agent(id).*`, zod-validated); transport via subpath entry (`@pymodel/klient/ipc|memory`); hosts the e2e suites. See its `AGENTS.md`. | | `packages/transcript` | Isomorphic transcript rendering data layer | L1 agent-granular store, L2 idempotent operations, L3 `off/turn/block/delta` subscription granularity, L4 framework-free view registry, turn-cursor pagination. Pure TypeScript (browser-safe, no engine imports); sole owner of the transcript contract types (`src/contract/`). See its `AGENTS.md`. | | `packages/oauth` | Auth utilities | | | `packages/telemetry` | Client-side telemetry | | | `packages/tree-sitter-bash` | Pure-TypeScript bash parser | No runtime deps, no wasm; `parse(source, { timeoutMs, maxNodes })` under a deterministic budget returns a discriminated `ParseResult` — treat aborted/hasError trees as "cannot analyze" and degrade. Parser only, no safety judgments. | -| `packages/minidb` | Embedded JSON document store | `MiniDb` behind kap-server's search index — snapshot + WAL persistence with an exclusive write lock, larger-than-RAM full-text layer, persistent index generations. See its `AGENTS.md`. | +| `packages/minidb` | Embedded JSON document store | `MiniDb` behind agent-gateway's search index — snapshot + WAL persistence with an exclusive write lock, larger-than-RAM full-text layer, persistent index generations. See its `AGENTS.md`. | +| `packages/acp-adapter` | Agent Client Protocol adapter over engine v1 | Pin `@agentclientprotocol/sdk` `^0.23.0`. | +| `packages/acp-server` | Agent Client Protocol host over engine v2 | Drives the engine through a `klient` memory-transport facade. | +| `packages/pi-tui` | Vendored TUI library | Upstream fork with local divergences; tests run with `node --test`, not vitest. See its `AGENTS.md`. | +| `packages/protocol` | Shared REST + WS protocol schemas | Envelope, error codes, pagination, WS-control types. | -The web bundle: `apps/pythinker-code/dist-web` is the committed, prebuilt bundle of `apps/pythinker-web` (built with `pnpm --filter @pymodel/pythinker-web run build` and copied via `scripts/copy-web-assets.mjs`). `apps/pythinker-code/scripts/check-web-assets.mjs` guards packaging against a missing bundle — sync and commit the bundle in the same change whenever the web UI should ship differently. +The web bundle: `apps/pythinker-code/dist-web` is the committed, prebuilt bundle of `apps/pythinker-web` (built with `pnpm --filter @pymodel/pythinker-web run build` and copied via `scripts/copy-web-assets.mjs`). `apps/pythinker-code/scripts/check-web-assets.mjs` fails when the bundle is missing **or stale** (it compares a fingerprint of every `apps/pythinker-web` build input against the one recorded at copy time); it runs in pre-push, in the CLI `build`, and on `prepack`. Whenever you touch the web UI, run `pnpm run build:web` and commit the restaged bundle in the same change. `packages/server` and `packages/server-e2e` are empty leftover directories excluded from the workspace — not packages. ## Environment @@ -80,7 +84,7 @@ The web bundle: `apps/pythinker-code/dist-web` is the committed, prebuilt bundle ## Coding Rules - English-only codebase. Use ASCII/Latin fixtures (e.g. `café`) for unicode tests. -- `packages/agent-core-v2`, `packages/kap-server`, and `packages/transcript` are comment-free zones: no line/block comments; exceptions are JSDoc attached to exported symbols and load-bearing lint-suppression directives (`oxlint-disable` / `eslint-disable`), while other tooling directives (`@ts-expect-error`, …) stay banned. Enforced by `scripts/check-no-comments.mjs`, which runs as part of `pnpm lint`. +- `packages/agent-core-v2`, `packages/agent-gateway`, and `packages/transcript` are comment-free zones: no line/block comments; exceptions are JSDoc attached to exported symbols and load-bearing lint-suppression directives (`oxlint-disable` / `eslint-disable`), while other tooling directives (`@ts-expect-error`, …) stay banned. Enforced by `scripts/check-no-comments.mjs`, which runs as part of `pnpm lint`. - `packages/acp-adapter`: pin `@agentclientprotocol/sdk` `^0.23.0` (0.24+ broke session-model API). - `tsgo` (`@typescript/native-preview`) available via `npx tsgo -p --noEmit`; committed scripts use `tsc` — run both for type fixes. - Pass `undefined` directly for optional props — no conditional spread. @@ -97,7 +101,7 @@ The web bundle: `apps/pythinker-code/dist-web` is the committed, prebuilt bundle Gate behind flags. Env: `PYTHINKER_CODE_EXPERIMENTAL_` toggles one; `PYTHINKER_CODE_EXPERIMENTAL_FLAG` enables all. Release: flip the entry's `default` to `true`. - `packages/agent-core` (v1): add the flag to the central registry at `packages/agent-core/src/flags/registry.ts`, then check it with `flags.enabled('my-feature')`. -- `packages/agent-core-v2` and kap-server modules: no central catalog — declare the flag in the owning domain via `registerFlagDefinition` at import time (see `packages/agent-core-v2/docs/flag.md`), then check it with `IFlagService.enabled(id)`. +- `packages/agent-core-v2` and agent-gateway modules: no central catalog — declare the flag in the owning domain via `registerFlagDefinition` at import time (see `packages/agent-core-v2/docs/flag.md`), then check it with `IFlagService.enabled(id)`. ## Workflow diff --git a/CLAUDE.md b/CLAUDE.md index 0764266a7..b11bfac79 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,26 +15,30 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo ## Project Map - `apps/pythinker-code`: the CLI / TUI application. It consumes core capabilities through `@pymodel/pythinker-code-sdk` and must not depend directly on `@pymodel/agent-core`. When writing or modifying its terminal UI, use the `write-tui` skill (`.agents/skills/write-tui/SKILL.md`). -- the browser web UI: **its source no longer lives in this repo.** It is developed in the code-app repo (`apps/web`) and shipped as the committed, prebuilt bundle `apps/pythinker-code/dist-web` (gitignored, force-added), synced from code-app with `PYTHINKER_CODE_REPO= pnpm run sync:web` — sync and commit the bundle in the same change whenever the web UI should ship differently. `apps/pythinker-code/scripts/check-web-assets.mjs` guards packaging against a missing bundle. To hack on the web UI against this repo's server, run `pnpm dev:server` here and point code-app's `pnpm dev:web` at it via `PYTHINKER_SERVER_URL`. +- the browser web UI: `apps/pythinker-web` (Vue 3 + Vite), the in-repo web client — REST + WS `/api/v1`, no `agent-core` dependency, see `apps/pythinker-web/AGENTS.md`. Its build output ships as the committed, prebuilt bundle `apps/pythinker-code/dist-web` (built with `pnpm --filter @pymodel/pythinker-web run build` and copied via `scripts/copy-web-assets.mjs`) — sync and commit the bundle in the same change whenever the web UI should ship differently. `apps/pythinker-code/scripts/check-web-assets.mjs` guards packaging against a missing bundle. To hack on the web UI against this repo's server, run `pnpm dev:server` here and point `pnpm dev:web` at it via `PYTHINKER_SERVER_URL`. - `apps/vis`, `apps/vis/server`, `apps/vis/web`: visual debugging tools for sessions and replays. -- `apps/pythinker-inspect`: web inspector for the kap-server `/api/v1/debug` RPC surface — workspace/session browser, per-session transcript chat, per-scope Service panels, and the DI unit inspection view. See `apps/pythinker-inspect/AGENTS.md`. +- `apps/pythinker-inspect`: web inspector for the agent-gateway `/api/v1/debug` RPC surface — workspace/session browser, per-session transcript chat, per-scope Service panels, and the DI unit inspection view. See `apps/pythinker-inspect/AGENTS.md`. - `packages/agent-core`: the unified agent engine, including Agent, Session, profile, skills, tools, plan, permission, background, records, the in-process DI service layer (`src/services/`), and other core capabilities. See `packages/agent-core/AGENTS.md`. -- `packages/agent-core-v2`: the DI × Scope agent engine (the v2 port behind kap-server). Four `LifecycleScope` tiers — `App` / `Workspace` / `Session` / `Agent` (`app/scopes.ts`) — plus the L3 unit layer (`Service`/`Fiber` units, collection contribution points, the Feature seam in `src/features/`); there is no App-level session lifecycle facade — callers compose `ISessionIndex` → `IWorkspaceLifecycleService.handlerFor` → the handler. See `packages/agent-core-v2/AGENTS.md` and use the `agent-core-dev` skill (`.agents/skills/agent-core-dev/SKILL.md`) when developing here. +- `packages/agent-core-v2`: the DI × Scope agent engine (the v2 port behind agent-gateway). Four `LifecycleScope` tiers — `App` / `Workspace` / `Session` / `Agent` (`app/scopes.ts`) — plus the L3 unit layer (`Service`/`Fiber` units, collection contribution points, the Feature seam in `src/features/`); there is no App-level session lifecycle facade — callers compose `ISessionIndex` → `IWorkspaceLifecycleService.handlerFor` → the handler. See `packages/agent-core-v2/AGENTS.md` and use the `agent-core-dev` skill (`.agents/skills/agent-core-dev/SKILL.md`) when developing here. - `packages/node-sdk`: the public TypeScript SDK and harness. - `packages/kosong`: the LLM / provider abstraction layer. - `packages/pyaos`: the execution environment and file/process abstractions. - `packages/oauth`: Pythinker OAuth and managed auth utilities. - `packages/telemetry`: shared client-side telemetry infrastructure. - `packages/transcript`: the isomorphic transcript rendering data layer — L1 agent-granular store, L2 idempotent operations, L3 `off/turn/block/delta` subscription granularity, L4 framework-free view registry, plus turn-cursor pagination. Pure TypeScript (browser-safe, no engine imports); the sole owner of the transcript contract types (`src/contract/`) and the op-batch sequencing contract. See `packages/transcript/AGENTS.md`. -- `packages/kap-server`: the Pythinker Code server, backed by `@pymodel/agent-core-v2`; exposes sessions over REST + WebSocket (`/api/v1` + `/api/v1/ws`), plus the `/api/v1/debug/*` reflection RPC surface (`--debug-endpoints`, loopback bind + bearer auth). See `packages/kap-server/AGENTS.md`. +- `packages/agent-gateway`: the Pythinker Code server, backed by `@pymodel/agent-core-v2`; exposes sessions over REST + WebSocket (`/api/v1` + `/api/v1/ws`), plus the `/api/v1/debug/*` reflection RPC surface (`--debug-endpoints`, loopback bind + bearer auth). See `packages/agent-gateway/AGENTS.md`. - `packages/klient`: the client SDK — a contract-driven facade over agent-core-v2 (`global.*` / `session(id).*` / `agent(id).*`, zod-validated); transport via subpath entry (`@pymodel/klient/ipc|memory`, both return the same `Klient`); also hosts the e2e suites. See `packages/klient/AGENTS.md`. - `packages/tree-sitter-bash`: a pure-TypeScript bash parser (no runtime deps, no wasm); `parse(source, { timeoutMs, maxNodes })` runs under a deterministic budget and returns a discriminated `ParseResult` — callers must treat aborted/hasError trees as "cannot analyze" and degrade. Parser only, no safety judgments; see the package README's "Known differences" section. -- `packages/minidb`: the embedded JSON document store (`MiniDb`) behind kap-server's search index — snapshot + WAL persistence with an exclusive write lock, a larger-than-RAM full-text layer, and persistent index generations. See `packages/minidb/AGENTS.md`. +- `packages/minidb`: the embedded JSON document store (`MiniDb`) behind agent-gateway's search index — snapshot + WAL persistence with an exclusive write lock, a larger-than-RAM full-text layer, and persistent index generations. See `packages/minidb/AGENTS.md`. +- `packages/protocol`: shared REST + WS protocol schemas (envelope, error codes, pagination, ws-control types). +- `packages/pi-tui`: vendored TUI library (upstream fork with local divergences; tests run with `node --test`, not vitest). See `packages/pi-tui/AGENTS.md`. +- `packages/acp-adapter` / `packages/acp-server`: Agent Client Protocol bridges — v1 engine (`@agentclientprotocol/sdk` pinned `^0.23.0`) and v2 engine via a `klient` memory-transport facade. +- `packages/server` and `packages/server-e2e` are empty leftover directories, excluded from the workspace — not packages. ## Environment Requirements - **Node.js**: `>=24.15.0` (from the root `package.json` `engines`; `.nvmrc` is `24.15.0`, used by nvm / fnm / mise to pick the minimum recommended version). -- **pnpm**: `10.33.0` (from the root `package.json` `packageManager`). +- **pnpm**: `10.34.3` (from the root `package.json` `packageManager`). - `pnpm install` will fail when the Node version is not satisfied, because `.npmrc` sets `engine-strict=true`. ## Monorepo Workspace Maintenance @@ -48,7 +52,7 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo ## General Coding Rules -- `packages/agent-core-v2`, `packages/kap-server`, and `packages/transcript` are comment-free zones: no line/block comments; the exceptions are JSDoc attached to exported symbols and load-bearing lint-suppression directives (`oxlint-disable` / `eslint-disable`), while other tooling directives (`@ts-expect-error`, …) stay banned. Enforced by `scripts/check-no-comments.mjs`, which runs as part of `pnpm lint`. +- `packages/agent-core-v2`, `packages/agent-gateway`, and `packages/transcript` are comment-free zones: no line/block comments; the exceptions are JSDoc attached to exported symbols and load-bearing lint-suppression directives (`oxlint-disable` / `eslint-disable`), while other tooling directives (`@ts-expect-error`, …) stay banned. Enforced by `scripts/check-no-comments.mjs`, which runs as part of `pnpm lint`. - For optional object properties, pass `undefined` directly instead of using conditional spread. - YES: `{ user }` - NO: `{ ...(user ? { user } : undefined) }` @@ -65,7 +69,7 @@ This is a TypeScript monorepo built for agent-assisted development. Keep the roo - Gate a not-yet-public feature behind an experimental flag. Flags are env-driven and default off: `PYTHINKER_CODE_EXPERIMENTAL_` toggles one, `PYTHINKER_CODE_EXPERIMENTAL_FLAG` enables all. Release by flipping the entry's `default` to `true`. - `packages/agent-core` (v1): add the flag to the central registry at `packages/agent-core/src/flags/registry.ts`, then check it with `flags.enabled('my-feature')`. - - `packages/agent-core-v2` and kap-server modules: there is no central catalog — declare the flag in the owning domain via `registerFlagDefinition` at import time (see `packages/agent-core-v2/docs/flag.md`), then check it with `IFlagService.enabled(id)`. Current search-index-separation flags: `persistence_minidb_readmodel` (session read model, default on) and `search_worker` (global search worker host, default on). + - `packages/agent-core-v2` and agent-gateway modules: there is no central catalog — declare the flag in the owning domain via `registerFlagDefinition` at import time (see `packages/agent-core-v2/docs/flag.md`), then check it with `IFlagService.enabled(id)`. Current search-index-separation flags: `persistence_minidb_readmodel` (session read model, default on) and `search_worker` (global search worker host, default on). ## Where to Update Instructions diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7baf79e1..79105f138 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,5 @@ # Contributing to pythinker-code -[中文版](CONTRIBUTING.zh-CN.md) - Thanks for taking the time to contribute! This project moves quickly, and thoughtful contributions from the community are what keep it sharp. The guide below walks you through how we work so your PR has the best chance of landing smoothly. ## Before You Start @@ -30,14 +28,14 @@ This is a pnpm monorepo. The most relevant entry points are: - `apps/vis` — session debug visualizer - `packages/node-sdk` — public TypeScript SDK (`@pymodel/pythinker-code-sdk`) - `packages/agent-core-v2` — the agent engine (v2, DI Scope architecture); `packages/agent-core` is v1 and being phased out -- `packages/klient`, `kap-server`, `protocol`, `transcript`, `kosong`, `pyaos`, `oauth`, `telemetry` — internal engine packages +- `packages/klient`, `agent-gateway`, `protocol`, `transcript`, `kosong`, `pyaos`, `oauth`, `telemetry` — internal engine packages - `docs/` — VitePress bilingual docs site For the full project map, see [AGENTS.md](AGENTS.md). ## Development Setup -Prerequisites: Node.js >= 24.15.0, pnpm 10.33.0, Git. +Prerequisites: Node.js >= 24.15.0, pnpm 10.34.3, Git. ```sh git clone https://github.com/PyModel/pythinker-code.git diff --git a/_typos.toml b/_typos.toml index 7f5dbd648..0c91e4fee 100644 --- a/_typos.toml +++ b/_typos.toml @@ -11,6 +11,14 @@ extend-exclude = [ "**/*.test.ts", "**/__snapshots__/**", "**/CHANGELOG.md", + # Committed minified web bundle: vendor code and hashed asset names + # false-positive at high volume (shiki/mermaid/katex language tables). + "apps/pythinker-code/dist-web/", + # Generated tables: Material Icon Theme extension maps contain real file + # extensions (ags/caf/cpy/edn/mak/rcall/stap/styl/tese); inlineMath carries + # ISO 4217 currency codes (JOD). All false positives on short tokens. + "apps/pythinker-web/src/lib/fileIconsData.ts", + "apps/pythinker-web/src/lib/inlineMath.ts", "pnpm-lock.yaml", ] diff --git a/apps/desktop/scripts/stage-runtime.ts b/apps/desktop/scripts/stage-runtime.ts index 0324afeea..262a75ff9 100644 --- a/apps/desktop/scripts/stage-runtime.ts +++ b/apps/desktop/scripts/stage-runtime.ts @@ -10,7 +10,7 @@ const desktopRoot = resolve(import.meta.dirname, '..') const repositoryRoot = resolve(desktopRoot, '../..') const staging = join(desktopRoot, 'runtime-host') const deployPackage = '@pymodel/pythinker-code' -const entry = join(staging, 'node_modules/@pymodel/pythinker-code/dist/launcher.mjs') +const entry = join(staging, 'node_modules/@pymodel/pythinker-code/dist/main.mjs') const frontend = join(staging, 'node_modules/@pymodel/pythinker-code/dist-web/index.html') const workspaceState = join(repositoryRoot, 'node_modules/.pnpm-workspace-state-v1.json') const stagingParent = join(repositoryRoot, 'node_modules', '.pythinker-desktop-staging') diff --git a/apps/desktop/scripts/verify-packaged-runtime.ts b/apps/desktop/scripts/verify-packaged-runtime.ts index a51bd402a..1fe6b6948 100644 --- a/apps/desktop/scripts/verify-packaged-runtime.ts +++ b/apps/desktop/scripts/verify-packaged-runtime.ts @@ -5,7 +5,7 @@ import { join } from 'node:path' import type { AfterPackContext } from 'electron-builder' const REQUIRED_HOST_FILES = [ - ['@pymodel', 'pythinker-code', 'dist', 'launcher.mjs'], + ['@pymodel', 'pythinker-code', 'dist', 'main.mjs'], ['@pymodel', 'pythinker-code', 'dist-web', 'index.html'], ] as const diff --git a/apps/desktop/src/host-supervisor.ts b/apps/desktop/src/host-supervisor.ts index 26987d0cd..66e3aa4af 100644 --- a/apps/desktop/src/host-supervisor.ts +++ b/apps/desktop/src/host-supervisor.ts @@ -58,40 +58,54 @@ export interface ReadinessParser { /** * Consume one stdout chunk. * @param chunk - Text emitted by the Host. - * @returns The loopback URL once a complete readiness line is observed. + * @returns The loopback origin once a complete readiness line is observed. */ - push(chunk: string): string | undefined + push(chunk: string): HostReady | undefined /** * Finish the stream and require a readiness line. - * @returns The parsed loopback URL. + * @returns The parsed loopback origin. */ - finalize(): string + finalize(): HostReady +} + +/** Origin plus optional bearer token carried in the readiness URL's #token= fragment. */ +export interface HostReady { + readonly origin: string + readonly token?: string +} + +/** Replace the bearer token in any readiness URL fragment with a placeholder. */ +export function redactHostToken(text: string): string { + return text.replaceAll(/#token=[^\s]+/gu, '#token=[redacted]') } /** Assert and normalize one readiness line. */ -function parseReadinessLine(line: string): string | undefined { +function parseReadinessLine(line: string): HostReady | undefined { if (!line.startsWith(READINESS_PREFIX)) return undefined - const token = line.slice(READINESS_PREFIX.length).split(/\s/u, 1)[0] - if (token === undefined) throw new Error(`desktop Host readiness line has no URL: ${line}`) + const raw = line.slice(READINESS_PREFIX.length).split(/\s/u, 1)[0] + if (raw === undefined) throw new Error(`desktop Host readiness line has no URL: ${line}`) let url: URL try { - url = new URL(token) + url = new URL(raw) } catch { - throw new Error(`desktop Host readiness URL is invalid: ${token}`) + throw new Error(`desktop Host readiness URL is invalid: ${raw}`) } const port = Number(url.port) + const hashToken = /^#token=(.+)$/u.exec(url.hash) if (url.protocol !== 'http:' || (url.hostname !== '127.0.0.1' && url.hostname !== 'localhost') || url.pathname !== '/' || url.search !== '' - || url.hash !== '' + || (url.hash !== '' && hashToken === null) || !Number.isInteger(port) || port < 1 || port > 65_535) { - throw new Error(`desktop Host readiness URL must be loopback HTTP with an explicit port: ${token}`) + throw new Error(`desktop Host readiness URL must be loopback HTTP with an explicit port: ${raw}`) } - return url.origin + return hashToken === null + ? { origin: url.origin } + : { origin: url.origin, token: hashToken[1] } } /** @@ -100,16 +114,16 @@ function parseReadinessLine(line: string): string | undefined { */ export function createReadinessParser(): ReadinessParser { let pending = '' - let readyUrl: string | undefined + let readyInfo: HostReady | undefined - const accept = (line: string): string | undefined => { + const accept = (line: string): HostReady | undefined => { const parsed = parseReadinessLine(line.replace(/\r$/u, '')) if (parsed === undefined) return undefined - if (readyUrl !== undefined && parsed !== readyUrl) { - throw new Error(`desktop Host emitted conflicting readiness URLs: ${readyUrl} and ${parsed}`) + if (readyInfo !== undefined && parsed.origin !== readyInfo.origin) { + throw new Error(`desktop Host emitted conflicting readiness URLs: ${readyInfo.origin} and ${parsed.origin}`) } - readyUrl = parsed - return readyUrl + readyInfo = parsed + return parsed } return { @@ -117,7 +131,7 @@ export function createReadinessParser(): ReadinessParser { pending += chunk for (;;) { const newline = pending.indexOf('\n') - if (newline === -1) return readyUrl + if (newline === -1) return undefined const line = pending.slice(0, newline) pending = pending.slice(newline + 1) const parsed = accept(line) @@ -126,8 +140,8 @@ export function createReadinessParser(): ReadinessParser { }, finalize() { if (pending !== '') accept(pending) - if (readyUrl === undefined) throw new Error('desktop Host exited before emitting its readiness URL') - return readyUrl + if (readyInfo === undefined) throw new Error('desktop Host exited before emitting its readiness URL') + return readyInfo }, } } @@ -159,7 +173,7 @@ export interface HostSupervisorOptions { /** Handle for the desktop-owned Host process. */ export interface HostSupervisor { /** Start once, or join the in-flight start. */ - start(): Promise + start(): Promise /** Gracefully stop once, escalating after the configured timeout. */ shutdown(): Promise } @@ -189,7 +203,7 @@ export function createHostSupervisor(options: HostSupervisorOptions): HostSuperv const readinessTimeoutMs = options.readinessTimeoutMs ?? DEFAULT_READINESS_TIMEOUT_MS const shutdownTimeoutMs = options.shutdownTimeoutMs ?? DEFAULT_SHUTDOWN_TIMEOUT_MS let child: HostChild | undefined - let startPromise: Promise | undefined + let startPromise: Promise | undefined let shutdownPromise: Promise | undefined let exited: Promise | undefined let exitResult: Deferred | undefined @@ -198,15 +212,21 @@ export function createHostSupervisor(options: HostSupervisorOptions): HostSuperv let output = '' const appendOutput = (chunk: string): void => { - output = `${output}${chunk}`.slice(-MAX_STARTUP_OUTPUT_CHARS) - options.log?.(chunk) + // The readiness URL carries the Host's bearer token in its `#token=` + // fragment. Both the retained startup buffer (interpolated into the + // failure Error) and options.log (stderr in the desktop app) outlive this + // process, so the token is stripped here — the parser still sees the raw + // chunk, which is where the token is actually needed. + const safe = redactHostToken(chunk) + output = `${output}${safe}`.slice(-MAX_STARTUP_OUTPUT_CHARS) + options.log?.(safe) } - const start = (): Promise => { + const start = (): Promise => { if (startPromise !== undefined) return startPromise if (shutdownPromise !== undefined) return Promise.reject(new Error('desktop Host cannot start after shutdown')) - startPromise = new Promise((resolve, reject) => { + startPromise = new Promise((resolve, reject) => { const parser = createReadinessParser() const spawned = options.spawnHost() child = spawned @@ -224,7 +244,8 @@ export function createHostSupervisor(options: HostSupervisorOptions): HostSuperv settled = true cleanupStartup() const diagnostic = output === '' ? '' : `\nHost output:\n${output}` - reject(new Error(`${error instanceof Error ? error.message : String(error)}${diagnostic}`)) + const message = redactHostToken(error instanceof Error ? error.message : String(error)) + reject(new Error(`${message}${diagnostic}`)) } const acceptChunk = (chunk: string): void => { appendOutput(chunk) @@ -328,9 +349,8 @@ export function spawnPythinkerServer(options: SpawnPythinkerServerOptions): Host : options.env const process = spawn(options.nodeExecutable, [ options.cliEntry, - 'server', - 'run', - '--foreground', + 'web', + '--no-open', '--port', String(options.port), '--log-level', diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts index 422681b2c..581f4ed1c 100644 --- a/apps/desktop/src/main.ts +++ b/apps/desktop/src/main.ts @@ -61,6 +61,7 @@ let tray: Tray | undefined let host: HostSupervisor | undefined let lifecycle: DesktopLifecycle | undefined let hostOrigin: string | undefined +let hostToken: string | undefined let bootQuitPromise: Promise | undefined let stopTrayAnimation: (() => void) | undefined let quitReleased = false @@ -105,14 +106,14 @@ function hostPaths(): { nodeExecutable: string; cliEntry: string; cwd: string; e if (!app.isPackaged) { return { nodeExecutable: process.env['PYTHINKER_DESKTOP_NODE_EXECUTABLE'] ?? 'node', - cliEntry: join(REPOSITORY_ROOT, 'apps/pythinker-code/dist/launcher.mjs'), + cliEntry: join(REPOSITORY_ROOT, 'apps/pythinker-code/dist/main.mjs'), cwd: process.cwd(), electronRunAsNode: false, } } return { nodeExecutable: process.execPath, - cliEntry: join(process.resourcesPath, 'host/node_modules/@pymodel/pythinker-code/dist/launcher.mjs'), + cliEntry: join(process.resourcesPath, 'host/node_modules/@pymodel/pythinker-code/dist/main.mjs'), cwd: app.getPath('home'), electronRunAsNode: true, } @@ -224,6 +225,9 @@ async function createMainWindow(): Promise { const rendererUrl = new URL(origin) rendererUrl.searchParams.set('pythinker_desktop', '1') rendererUrl.searchParams.set('platform', process.platform) + if (hostToken !== undefined) { + rendererUrl.hash = `token=${hostToken}` + } await window.loadURL(rendererUrl.href) if (!lifecycle?.isQuitting) window.show() return window @@ -342,7 +346,9 @@ async function boot(): Promise { }, }) try { - hostOrigin = await host.start() + const ready = await host.start() + hostOrigin = ready.origin + hostToken = ready.token track('desktop_server_ready') break } catch (error) { diff --git a/apps/desktop/tests/host-supervisor.spec.ts b/apps/desktop/tests/host-supervisor.spec.ts index a9678d3df..96f26f32a 100644 --- a/apps/desktop/tests/host-supervisor.spec.ts +++ b/apps/desktop/tests/host-supervisor.spec.ts @@ -75,15 +75,15 @@ describe('desktop Host readiness', () => { expect(parser.push('Pythinker se')).toBeUndefined() expect(parser.push('rver: http://127.0.')).toBeUndefined() expect(parser.push('0.1:4173 (LAN: http://192.0.2.10:4173)')).toBeUndefined() - expect(parser.push('\nstartup complete\n')).toBe('http://127.0.0.1:4173') - expect(parser.finalize()).toBe('http://127.0.0.1:4173') + expect(parser.push('\nstartup complete\n')).toEqual({ origin: 'http://127.0.0.1:4173' }) + expect(parser.finalize()).toEqual({ origin: 'http://127.0.0.1:4173' }) }) it('accepts a complete unterminated readiness line when the stream ends', () => { const parser = createReadinessParser() expect(parser.push('diagnostic\nPythinker server: http://localhost:51234')).toBeUndefined() - expect(parser.finalize()).toBe('http://localhost:51234') + expect(parser.finalize()).toEqual({ origin: 'http://localhost:51234' }) }) it.each([ @@ -108,9 +108,17 @@ describe('desktop Host readiness', () => { it('rejects conflicting readiness URLs', () => { const parser = createReadinessParser() - expect(parser.push('Pythinker server: http://127.0.0.1:4173\n')).toBe('http://127.0.0.1:4173') + expect(parser.push('Pythinker server: http://127.0.0.1:4173\n')).toEqual({ origin: 'http://127.0.0.1:4173' }) expect(() => parser.push('Pythinker server: http://127.0.0.1:4174\n')).toThrow(/conflicting readiness URLs/iu) }) + + it('captures the bearer token from the #token= readiness fragment', () => { + const parser = createReadinessParser() + + expect(parser.push('Pythinker server: http://127.0.0.1:4173/#token=s3cret\n')) + .toEqual({ origin: 'http://127.0.0.1:4173', token: 's3cret' }) + expect(parser.finalize()).toEqual({ origin: 'http://127.0.0.1:4173', token: 's3cret' }) + }) }) describe('desktop Host port', () => { @@ -175,7 +183,7 @@ describe('desktop Host supervisor', () => { expect(spawnHost).toHaveBeenCalledOnce() child.stdout.emit('Pythinker server: http://127.0.0.1:4567\n') - await expect(first).resolves.toBe('http://127.0.0.1:4567') + await expect(first).resolves.toEqual({ origin: 'http://127.0.0.1:4567' }) expect(child.signals).toEqual([]) }) @@ -191,7 +199,7 @@ describe('desktop Host supervisor', () => { expect(settled).not.toHaveBeenCalled() child.stdout.emit('Pythinker server: http://127.0.0.1:4567\n') - await expect(starting).resolves.toBe('http://127.0.0.1:4567') + await expect(starting).resolves.toEqual({ origin: 'http://127.0.0.1:4567' }) }) it('reports output when the Host exits before readiness', async () => { @@ -205,6 +213,42 @@ describe('desktop Host supervisor', () => { await expect(starting).rejects.toThrow(/exited before readiness \(code 7, signal null\).*configuration rejected/su) }) + it('keeps the bearer token out of the log and the failure diagnostic', async () => { + const child = new FakeHostChild() + const logged: string[] = [] + const supervisor = createHostSupervisor({ spawnHost: () => child, log: chunk => { logged.push(chunk) } }) + const starting = supervisor.start() + + child.stdout.emit('Pythinker server: http://127.0.0.1:4567/#token=s3cret\n') + await expect(starting).resolves.toEqual({ origin: 'http://127.0.0.1:4567', token: 's3cret' }) + + expect(logged.join('')).not.toContain('s3cret') + expect(logged.join('')).toContain('#token=[redacted]') + }) + + it('keeps the bearer token out of a rejected malformed readiness URL', async () => { + const child = new FakeHostChild() + const supervisor = createHostSupervisor({ spawnHost: () => child }) + const starting = supervisor.start() + + child.stdout.emit('Pythinker server: https://127.0.0.1:4567/#token=s3cret\n') + + await expect(starting).rejects.toThrow(/must be loopback HTTP/su) + await expect(starting).rejects.not.toThrow(/s3cret/su) + }) + + it('keeps the bearer token out of the pre-readiness exit diagnostic', async () => { + const child = new FakeHostChild() + const supervisor = createHostSupervisor({ spawnHost: () => child }) + const starting = supervisor.start() + + child.stderr.emit('Pythinker server: http://127.0.0.1:4567/#token=s3cret\n') + child.emitExit(7) + + await expect(starting).rejects.toThrow(/#token=\[redacted\]/su) + await expect(starting).rejects.not.toThrow(/s3cret/su) + }) + it('contains a synchronous spawn failure as a rejected start', async () => { const failure = new Error('spawn unavailable') const supervisor = createHostSupervisor({ @@ -344,7 +388,7 @@ describe('desktop Host process', () => { const { spawnPythinkerServer } = await import('../src/host-supervisor') spawnPythinkerServer({ nodeExecutable: '/Applications/Pythinker.app/Contents/MacOS/Pythinker', - cliEntry: '/Applications/Pythinker.app/Contents/Resources/host/node_modules/@pymodel/pythinker-code/dist/launcher.mjs', + cliEntry: '/Applications/Pythinker.app/Contents/Resources/host/node_modules/@pymodel/pythinker-code/dist/main.mjs', cwd: '/Users/tester', env: { PYTHINKER_DESKTOP: '1' }, port: 24_827, @@ -354,10 +398,9 @@ describe('desktop Host process', () => { expect(spawn).toHaveBeenCalledWith( '/Applications/Pythinker.app/Contents/MacOS/Pythinker', [ - '/Applications/Pythinker.app/Contents/Resources/host/node_modules/@pymodel/pythinker-code/dist/launcher.mjs', - 'server', - 'run', - '--foreground', + '/Applications/Pythinker.app/Contents/Resources/host/node_modules/@pymodel/pythinker-code/dist/main.mjs', + 'web', + '--no-open', '--port', '24827', '--log-level', diff --git a/apps/desktop/tests/verify-packaged-runtime.spec.ts b/apps/desktop/tests/verify-packaged-runtime.spec.ts index 515762163..17b3a8b5d 100644 --- a/apps/desktop/tests/verify-packaged-runtime.spec.ts +++ b/apps/desktop/tests/verify-packaged-runtime.spec.ts @@ -17,7 +17,7 @@ describe('packaged desktop runtime verification', () => { const appOutDir = await mkdtemp(join(tmpdir(), 'pythinker-packaged-runtime-')) try { const resources = join(appOutDir, 'Pythinker.app', 'Contents', 'Resources', 'host', 'node_modules') - const cli = join(resources, '@pymodel', 'pythinker-code', 'dist', 'launcher.mjs') + const cli = join(resources, '@pymodel', 'pythinker-code', 'dist', 'main.mjs') const web = join(resources, '@pymodel', 'pythinker-code', 'dist-web', 'index.html') await mkdir(join(cli, '..'), { recursive: true }) await mkdir(join(web, '..'), { recursive: true }) @@ -43,7 +43,7 @@ describe('packaged desktop runtime verification', () => { const appOutDir = await mkdtemp(join(tmpdir(), 'pythinker-packaged-runtime-')) try { const resources = join(appOutDir, 'resources', 'host', 'node_modules') - const cli = join(resources, '@pymodel', 'pythinker-code', 'dist', 'launcher.mjs') + const cli = join(resources, '@pymodel', 'pythinker-code', 'dist', 'main.mjs') const web = join(resources, '@pymodel', 'pythinker-code', 'dist-web', 'index.html') await mkdir(join(cli, '..'), { recursive: true }) await mkdir(join(web, '..'), { recursive: true }) @@ -60,7 +60,7 @@ describe('packaged desktop runtime verification', () => { const appOutDir = await mkdtemp(join(tmpdir(), 'pythinker-packaged-runtime-')) try { const resources = join(appOutDir, 'Pythinker.app', 'Contents', 'Resources', 'host', 'node_modules') - const cli = join(resources, '@pymodel', 'pythinker-code', 'dist', 'launcher.mjs') + const cli = join(resources, '@pymodel', 'pythinker-code', 'dist', 'main.mjs') const web = join(resources, '@pymodel', 'pythinker-code', 'dist-web', 'index.html') await mkdir(join(cli, '..'), { recursive: true }) await mkdir(join(web, '..'), { recursive: true }) diff --git a/apps/pythinker-code/README.md b/apps/pythinker-code/README.md index 778796990..824f80b53 100644 --- a/apps/pythinker-code/README.md +++ b/apps/pythinker-code/README.md @@ -54,7 +54,6 @@ Take a look at this project and explain the main directories. ## Documentation - Full docs: https://code.pythinker.com/pythinker-code/en/ -- 中文文档: https://code.pythinker.com/pythinker-code/zh/ - Getting Started: https://code.pythinker.com/pythinker-code/en/guides/getting-started ## Repository & Issues diff --git a/apps/pythinker-code/dist-web/.web-bundle-manifest.json b/apps/pythinker-code/dist-web/.web-bundle-manifest.json new file mode 100644 index 000000000..64c981108 --- /dev/null +++ b/apps/pythinker-code/dist-web/.web-bundle-manifest.json @@ -0,0 +1,4 @@ +{ + "sourceHash": "dcb2227d96cf476915942656bc127bb1d7801258b01daa6995ee76e915ff199b", + "sourceFileCount": 389 +} diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-CWWX6v_C.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-CWWX6v_C.js deleted file mode 100644 index eb05f7792..000000000 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-CWWX6v_C.js +++ /dev/null @@ -1,29 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-h7JVUjRK.js","assets/index-DIKFd2HX.js","assets/index-Dtbq6GMe.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-DIKFd2HX.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-h7JVUjRK.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" - - - - - - - - ${E} - -`}),be=k(()=>{return E=M.htmlPreviewSandbox,z=M.htmlPreviewAllowScripts,typeof E=="string"?((function(ie){if(!w||typeof console>"u"||te===ie)return;const N=(function(ht){return new Set(ht.trim().toLowerCase().split(/\s+/).filter(Boolean))})(ie);N.has("allow-scripts")&&N.has("allow-same-origin")&&(te=ie,console.warn("[markstream-vue] htmlPreviewSandbox contains both allow-scripts and allow-same-origin. Use this only for fully trusted content served from an isolated origin."))})(E),E):E!==void 0?"":z===!0?"allow-scripts":"";var E,z});function r(E){var z;E.key!=="Escape"&&E.key!=="Esc"||(z=M.onClose)==null||z.call(M)}return Ho(()=>{typeof window<"u"&&window.addEventListener("keydown",r)}),No(()=>{typeof window<"u"&&window.removeEventListener("keydown",r)}),(E,z)=>(G(),bn(ji,{to:"body"},[b("div",{class:mt(["markstream-vue",{dark:M.isDark}])},[b("div",{class:"html-preview-frame__backdrop",onClick:z[2]||(z[2]=ie=>{var N;return(N=M.onClose)==null?void 0:N.call(M)})},[b("div",{class:"html-preview-frame",onClick:z[1]||(z[1]=Ro(()=>{},["stop"]))},[b("div",hr,[b("div",gr,[z[3]||(z[3]=b("span",{class:"html-preview-frame__dot"},null,-1)),b("span",yr,Me(M.title||V(ne)("common.preview")||"Preview"),1)]),b("button",{type:"button",class:"html-preview-frame__close",onClick:z[0]||(z[0]=ie=>{var N;return(N=M.onClose)==null?void 0:N.call(M)})}," × ")]),b("iframe",{class:"html-preview-frame__iframe",sandbox:be.value,referrerpolicy:"no-referrer",srcdoc:we.value},null,8,wr)])])],2)]))}}),[["__scopeId","data-v-24e66176"]]),kr=["data-markstream-enhanced","data-markstream-enhancement-state","data-markstream-code-block-state","data-markstream-pending","data-markstream-viewport-pending"],xr={class:"code-header-main"},Sr=["innerHTML"],Cr={class:"code-header-copy"},Mr={class:"code-header-title"},Br={key:0,class:"code-header-caption"},Er=["data-markstream-host-hidden"],$o="__markstreamMonacoPassiveTouchState__",Lr=zo(vl({__name:"CodeBlockNode",props:{node:{},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!0},stream:{type:Boolean,default:!0},theme:{},darkTheme:{default:"vitesse-dark"},lightTheme:{default:"vitesse-light"},isShowPreview:{type:Boolean,default:!0},monacoOptions:{},enableFontSizeControl:{type:Boolean,default:!0},minWidth:{default:void 0},maxWidth:{default:void 0},themes:{},showPreviewButton:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},showTooltips:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},customId:{},showHeader:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},estimatedHeightPx:{},estimatedContentHeightPx:{},estimatedDiffInline:{type:Boolean}},emits:["previewCode","copy"],setup(x,{emit:M}){var w,te,ne,we,be;const r=x,E=M,z=Ci(),ie=dl(Mi,null),N=dl("markstreamHostScrollManaged",null),ht=dl(Bi,void 0),Ge=k(()=>Ii(r,z)),Be=new Set;function gt(e){return q(this,null,function*(){var t;if(typeof window>"u")return yield e();const n=(t=window.Element)==null?void 0:t.prototype,l=n?.addEventListener;if(!n||!l)return yield e();const o=(function(){const d=window,u=d[$o];if(u)return u;const a={depth:0,original:null};return d[$o]=a,a})();let i=null;try{o.depth===0&&(o.original=l,n.addEventListener=function(u,a,c){var s;const v=(s=o.original)!=null?s:l;return u==="touchstart"&&(function(p,y){if(!p)return!1;const h=p;return!(typeof h.closest!="function"||!h.closest(".monaco-editor, .monaco-diff-editor")||y&&typeof y=="object"&&"passive"in y)})(this,c)?v.call(this,u,a,(function(p){return p==null?{passive:!0}:typeof p=="boolean"?{capture:p,passive:!0}:typeof p=="object"?"passive"in p?p:Ce(I({},p),{passive:!0}):{passive:!0}})(c)):v.call(this,u,a,c)}),o.depth++;let d=!1;i=()=>{d||(d=!0,Be.delete(i),o.depth=Math.max(0,o.depth-1),o.depth===0&&o.original&&n.addEventListener!==o.original&&(n.addEventListener=o.original,o.original=null))},Be.add(i)}catch{return yield e()}try{return yield e()}finally{i?.()}})}function pl(e,t){}const Vt=Co(),Gt=k(()=>{const e=Vt?.vnode.props;return!(!e||!e.onPreviewCode&&!e["onPreview-code"])}),{t:Y}=ml(),f=O(null),$=O(null),yt=O(!1),ke=O(oo(r.node.language,r.node.code,Ue())),kn=k(()=>Bo(ke.value)),Ee=k(()=>kn.value==="plaintext"?"text":kn.value),xn=k(()=>kn.value==="plaintext"),Fe=O(!1),xe=O(!1),Q=O(!1),Se=O(!1),W=O(!1),wt=O(!1);let B=!1,bt=null,Bt=null,Je=null,Ye=0,Qe=!1,qe="";const We=O(null),ve=O(null);let Sn=null,Cn=0,Mn=!1;const Do=Ei(),Jt=Fi(),Bn=Pi(),_e=$i(null),Z=O(typeof window>"u"||!Bn.value),Ao=(ne=(te=(w=Co())==null?void 0:w.vnode.el)==null?void 0:te.textContent)!=null?ne:"",jo=typeof window<"u"&&String((we=r.node.code)!=null?we:"").length>0&&Ao.includes(String(r.node.code)),hl=O(!jo);Ho(()=>{hl.value=!0}),typeof window<"u"&&ae([()=>$.value,Bn],([e,t],n,l)=>{var o,i,d;if((o=_e.value)==null||o.destroy(),_e.value=null,!t||Z.value)return void(Z.value=!0);if(!e)return void(Z.value=!1);let u=!0;const a=(d=(i=Jt?.value.heavyBlockMargin)!=null?i:Jt?.value.rootMargin)!=null?d:"0px",c=Do(e,{rootMargin:a,allowIdle:!1});_e.value=c,Z.value=Z.value||c.isVisible.value,c.whenVisible.then(()=>{u&&_e.value===c&&(Z.value=!0)}).catch(()=>{}),l(()=>{u=!1,c.destroy(),_e.value===c&&(_e.value=null)})},{immediate:!0}),Li(()=>{var e;B=!0;for(const t of Array.from(Be))t();(function(){const t=qe;ie&&t&&(qe="",ie.markSettled(t))})(),(e=_e.value)==null||e.destroy(),_e.value=null});let ue=null,Yt=null,En=()=>{},Qt=()=>{},kt=()=>null,se=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),U=()=>({getModel:()=>({getLineCount:()=>1}),getOption:()=>14,updateOptions:()=>{}}),Fn=()=>{},Xe=()=>{},Pn=()=>{},Ke=null,$e=null,Et=null,Ft=null,gl=()=>{var e;return String((e=r.node.language)!=null?e:"plaintext")},Ln=()=>q(null,null,function*(){}),On=!1,Xt=null;const ze=[],$n=[];let He=null;const m=k(()=>zi(r.node)),Ze=O({removed:0,added:0}),qo=k(()=>`-${Ze.value.removed} +${Ze.value.added}`),yl=Object.freeze(Ce(I({},jt),{enabled:!1,revealLineCount:0}));function wl(e){var t,n,l;const o=((n=(t=$.value)==null?void 0:t.getBoundingClientRect)==null?void 0:n.call(t).width)||((l=$.value)==null?void 0:l.clientWidth)||(typeof window>"u"?0:window.innerWidth);return Di(e,o)}function Pt(e,t){return{original:Kt(e),updated:Kt(t)}}function Kt(e){return String(e??"").replace(/\r\n$|\n$|\r$/,"")}function Lt(e){var t;return String((t=e?.message)!=null?t:e).includes("no diff result available")}function xt(){if(!Oe())try{const e=Pn();e&&typeof e.catch=="function"&&e.catch(t=>{Lt(t)})}catch(e){Lt(e)}}const re=k(()=>{var e,t,n,l;const o=r.monacoOptions?I({},r.monacoOptions):{};if(!m.value)return I({lineDecorationsWidth:0,lineNumbersMinChars:2,glyphMargin:!1},o);const i=o.diffHideUnchangedRegions===void 0?I({},jt):gn(o.diffHideUnchangedRegions),d=o.hideUnchangedRegions===void 0?void 0:gn(o.hideUnchangedRegions),u=r.stream!==!1&&r.loading!==!1,a=u?I({},yl):i,c=u?I({},yl):d,s=(function(g){return g.diffWordWrap!==void 0?g.diffWordWrap:"off"})(o),v=I({},(e=o.experimental)!=null?e:{}),p=(t=o.diffUnchangedRegionStyle)!=null?t:"line-info",y=(function(g){const X=g.scrollbar&&typeof g.scrollbar=="object"?g.scrollbar:{};return I(Ce(I({},X),{verticalScrollbarSize:0,horizontalScrollbarSize:0}),wl(g)?{horizontal:"hidden"}:{})})(o),h={maxComputationTime:0,diffAlgorithm:"legacy",ignoreTrimWhitespace:!1,renderIndicators:!0,diffUpdateThrottleMs:120,renderLineHighlight:"none",renderLineHighlightOnlyWhenFocus:!0,selectionHighlight:!1,occurrencesHighlight:"off",matchBrackets:"never",lineDecorationsWidth:4,lineNumbersMinChars:2,glyphMargin:!1,padding:{top:0,bottom:0},minimap:{enabled:!1},renderOverviewRuler:!1,overviewRulerBorder:!1,hideCursorInOverviewRuler:!0,scrollBeyondLastLine:!1,diffWordWrap:s,renderSideBySide:(n=o.renderSideBySide)==null||n,diffHideUnchangedRegions:a,useInlineViewWhenSpaceIsLimited:(l=o.useInlineViewWhenSpaceIsLimited)!=null&&l,diffLineStyle:"background",diffAppearance:"auto",diffUnchangedRegionStyle:p,diffHunkActionsOnHover:!1,experimental:v};return Ce(I(Ce(I(I({},h),o),{experimental:v}),c===void 0?{}:{hideUnchangedRegions:c}),{diffHideUnchangedRegions:a,diffWordWrap:s,scrollbar:y})}),zn=k(()=>(r.theme!==void 0?!fo(r.theme):vo(r.darkTheme,r.lightTheme))?(function(e){var t,n;if(e&&typeof e=="object"&&((t=e.colors)!=null&&t["editor.background"])){const o=Kn(e.colors["editor.background"]);if(o!=null)return o<128}const l=((n=rt(e))!=null?n:"").toLowerCase();return l?["dark","night","moon","black","dracula","mocha","frappe","macchiato","palenight","ocean","poimandres","monokai","laserwave","tokyo","slack-dark","rose-pine","github-dark","material-theme","one-dark","catppuccin-mocha","catppuccin-frappe","catppuccin-macchiato"].some(o=>l.includes(o))&&!["light","latte","dawn","lotus"].some(o=>l.includes(o)):!!r.isDark})(Tt()):!!r.isDark),Hn=k(()=>{var e;if(!m.value)return zn.value?"dark":"light";const t=(e=re.value)==null?void 0:e.diffAppearance;return t==="light"||t==="dark"?t:zn.value?"dark":"light"}),bl=k(()=>m.value?Hn.value==="dark":zn.value),Ot=k(()=>m.value?"diff":"single"),kl=O(Ot.value),ge=O(!1),D=O(!1),$t=O(!1),me=O(!1),et=O(null),Nn=O(0),xl=O(0),Zt=O(!1);let zt=null,tt=!1,Tn=null,Rn=!1;const Dn=k(()=>{var e,t,n;if(m.value){const o=(e=re.value)==null?void 0:e.diffWordWrap;if(o==="inherit"){const i=(t=r.monacoOptions)==null?void 0:t.wordWrap;return i==null||String(i)!=="off"}return o==="on"}const l=(n=r.monacoOptions)==null?void 0:n.wordWrap;return l==null||String(l)!=="off"}),Ie=k(()=>{var e;return!!m.value&&wl((e=re.value)!=null?e:{})}),An=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.diffHideUnchangedRegions;return t===void 0?I({},jt):gn(t)});function Sl(e){return N?.value===!0||!!e&&(!!e.closest('[data-markstream-virtual-timeline="1"], .markstream-virtual-timeline')||!!e.closest(".vue-recycle-scroller, [data-virtualizer], [data-virtual-scroll-root]"))}const Wo=k(()=>Sl($.value)),Ne=k(()=>!(ge.value||!me.value&&D.value)),Cl=k(()=>Ne.value),_o=k(()=>Ne.value&&!$t.value),Io=k(()=>!ge.value&&!me.value&&Ne.value),Uo=k(()=>D.value&&!ge.value?"ready":me.value?"fallback":"pending"),en=O(!1),Te=k(()=>Kt(r.node.code)),Ml=k(()=>m.value?r.node.diff===!0?r.node:Ce(I({},r.node),{diff:!0}):Te.value===r.node.code?r.node:Ce(I({},r.node),{code:Te.value})),pe=O(typeof((be=r.monacoOptions)==null?void 0:be.fontSize)=="number"?r.monacoOptions.fontSize:Number.NaN),_=O(pe.value),jn=O(null),tn=O(null),nn=O(null),Vo=k(()=>{const e=pe.value,t=_.value;return typeof e=="number"&&Number.isFinite(e)&&e>0&&typeof t=="number"&&Number.isFinite(t)&&t>0}),ln=k(()=>{var e;const t=jn.value;if(typeof t=="number"&&Number.isFinite(t)&&t>0)return t;const n=(e=r.monacoOptions)==null?void 0:e.fontSize;if(typeof n=="number"&&Number.isFinite(n)&&n>0)return n;const l=_.value;return typeof l=="number"&&Number.isFinite(l)&&l>0?l:12}),Go=k(()=>{var e;const t=tn.value;if(typeof t=="number"&&Number.isFinite(t)&&t>0)return t;const n=(e=r.monacoOptions)==null?void 0:e.lineHeight;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:ln.value===12?18:Math.max(12,Math.round(1.5*ln.value))}),on=k(()=>Go.value),Jo=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.tabSize;return typeof t=="number"&&Number.isFinite(t)&&t>0?t:4}),qn=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.padding,n=m.value?0:8;return{top:typeof t?.top=="number"&&Number.isFinite(t.top)&&t.top>=0?t.top:n,bottom:typeof t?.bottom=="number"&&Number.isFinite(t.bottom)&&t.bottom>=0?t.bottom:n}}),rn=k(()=>{const e=r.estimatedContentHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null});function an(e){if(e==null)return null;const t=Math.ceil(e);return!Number.isFinite(t)||t<=0?null:Math.min(t,Math.ceil(Ct()))}function Wn(){return!m.value&&r.stream!==!1&&r.loading!==!1}const Bl=k(()=>m.value?null:rn.value==null||Wn()?Math.ceil((e=>{const t=String(e??"");return t?Math.max(1,t.split(/\r\n|\n|\r/).length):1})(Te.value)*on.value+1):null),El=k(()=>{if(m.value)return null;const e=rn.value;return e==null||Wn()?an(Bl.value):an(e)}),Yo=k(()=>{const e=r.estimatedHeightPx;return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}),_n=O(null);function nt(){const e=_n.value;return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.round(e):null}const In=k(()=>{const e=nt();return e??(!m.value&&Zt.value?null:Ne.value||!D.value?El.value:null)});function Fl(e){const t=e?"hsl(152 42% 60%)":"var(--diff-added-fg)",n=e?"hsl(0 58% 58%)":"var(--diff-removed-fg)",l=e?"hsl(152 42% 60% / 0.18)":"var(--diff-added-bg)",o=e?"hsl(0 58% 58% / 0.18)":"var(--diff-removed-bg)",i=e?"hsl(152 42% 60% / 0.28)":"var(--diff-added-inline-bg)",d=e?"hsl(0 58% 58% / 0.28)":"var(--diff-removed-inline-bg)",u=`linear-gradient(90deg, ${t} 0 4px, transparent 4px 100%)`,a=`linear-gradient(90deg, ${n} 0 4px, transparent 4px 100%)`,c=e?"hsl(0 0% 7% / 0.98)":"hsl(var(--ms-muted) / 0.45)",s="var(--markstream-code-layout-character-width, 1ch)",v=`calc(${s} + ${s})`,p=`calc(${s} + ${s} + ${s} + ${s} + ${s} + 2px)`,y=`calc(${p} + ${s})`;return{"--markstream-diff-line-number-bg":c,"--markstream-diff-added-fg":t,"--markstream-diff-removed-fg":n,"--markstream-diff-added-line":l,"--markstream-diff-removed-line":o,"--markstream-diff-added-line-fill":l,"--markstream-diff-removed-line-fill":o,"--markstream-diff-added-gutter":u,"--markstream-diff-removed-gutter":a,"--markstream-diff-added-inline":i,"--markstream-diff-removed-inline":d,"--stream-monaco-added-fg":t,"--stream-monaco-removed-fg":n,"--stream-monaco-added-line":l,"--stream-monaco-removed-line":o,"--stream-monaco-added-line-fill":l,"--stream-monaco-removed-line-fill":o,"--stream-monaco-added-gutter":u,"--stream-monaco-removed-gutter":a,"--stream-monaco-added-inline":i,"--stream-monaco-removed-inline":d,"--stream-monaco-gutter-marker-width":"4px","--stream-monaco-gutter-gap":"1ch","--stream-monaco-line-number-left":"0px","--stream-monaco-line-number-width":v,"--stream-monaco-line-number-padding-left":v,"--stream-monaco-line-number-padding-right":s,"--stream-monaco-line-number-separator-width":"2px","--stream-monaco-layout-character-width":s,"--stream-monaco-line-number-box-width":p,"--stream-monaco-line-number-gap-to-code":s,"--stream-monaco-line-number-bg":c,"--stream-monaco-diff-code-gap":s,"--stream-monaco-diff-code-padding":"0px","--stream-monaco-original-margin-width":y,"--stream-monaco-original-scrollable-left":y,"--stream-monaco-original-scrollable-width":`calc(100% - ${y})`,"--stream-monaco-modified-margin-width":y,"--stream-monaco-modified-scrollable-left":y,"--stream-monaco-modified-scrollable-width":`calc(100% - ${y})`}}const Pl=k(()=>{var e;const t=(e=r.monacoOptions)==null?void 0:e.fontFamily,n=an(rn.value),l=an(Bl.value),o=Wn(),i=I(I({fontSize:`${ln.value}px`,lineHeight:`${on.value}px`,tabSize:Jo.value,boxSizing:"border-box",maxHeight:`${Ct()}px`,overflow:"auto",paddingTop:`${qn.value.top}px`,paddingBottom:`${qn.value.bottom}px`},m.value||n==null||o?m.value||l==null?{}:{minHeight:`${l}px`}:{height:`${n}px`,minHeight:`${n}px`}),typeof t=="string"&&t.trim()?{"--markstream-code-font-family":t.trim()}:{});return i["--markstream-pre-line-number-top"]=`${qn.value.top}px`,i["--markstream-code-padding-left"]="calc(2ch + 2ch + 1ch + 2px + 1ch)",i["--markstream-pre-line-number-left"]="0px",i["--markstream-pre-line-number-width"]="2ch",i["--markstream-pre-line-number-padding-left"]="2ch",i["--markstream-pre-line-number-padding-right"]="1ch",i["--markstream-pre-line-number-separator-width"]="2px",m.value&&(i["--markstream-pre-diff-line-height"]=`${on.value}px`,i["--markstream-pre-diff-pane-bottom-padding"]=(Ie.value,"0px"),Object.assign(i,Fl(bl.value))),i}),Ll=k(()=>In.value!=null&&(!D.value||nt()!=null)),Qo=k(()=>{const e=In.value;if(e==null)return null;if(m.value)return Math.ceil(e);const t=Yo.value,n=rn.value;if(t==null||n==null)return Math.ceil(e);const l=Math.max(0,Math.ceil(t)-Math.ceil(n));return Math.ceil(e+l)}),Xo=k(()=>{if(m.value&&Ne.value)return{};const e=In.value;return Ll.value&&e!=null?{minHeight:`${e}px`}:{}});function Ol(){var e,t,n,l,o,i,d,u;const a=(e=$.value)==null?void 0:e.querySelector("pre.code-pre-fallback"),c=U(),s=(t=a?.scrollTop)!=null?t:0;(o=(l=(n=c?.getOriginalEditor)==null?void 0:n.call(c))==null?void 0:l.setScrollTop)==null||o.call(l,s),(u=(d=(i=c?.getModifiedEditor)==null?void 0:i.call(c))==null?void 0:d.setScrollTop)==null||u.call(d,s)}function $l(){return q(this,null,function*(){return m.value?(Zn()!=null||un(),ee(!0),Ol(),he(),$t.value=!0,yield j(),ee(!0),yield Pe(),ee(!0),!(Ke&&!(yield Ke())||(Nt(),un(),ee(!0),D.value=!0,yield j(),un(),ee(!0),Nt(),he(),de(),0))):!(Ke&&!(yield Ke())||(D.value=!0,yield j(),le(!1),ee(),0))})}function un(){const e=f.value;return e&&cn(e)?(he(),le({preferModelDiffHeight:!0}),it(),Number.parseFloat(e.style.height||"")||null):Zn()}function zl(){if(!m.value||!W.value||!D.value||Ne.value)return!1;const e=f.value;return!!e&&Ht(e)}function Hl(e,t=!1,n={}){const l=Math.ceil(e),o=nt();if(o==null)return l;const i=n.allowBelowEstimatedFloor===!0||zl();return l>=o||i?((t||i)&&W.value&&(_n.value=null),l):o}function Pe(){return new Promise(e=>{let t=!1,n=null,l=null;const o=()=>{t||(t=!0,l!=null&&globalThis.clearTimeout(l),n!=null&&yn(n),e())};l=globalThis.setTimeout(o,50),n=fe(o)})}function Nl(){try{const e=f.value;if(!e)return null;const t=e.querySelector(".view-lines .view-line");if(t){const n=Math.ceil(t.getBoundingClientRect().height);if(n>0)return n}}catch{}return null}function Un(){var e,t,n,l,o;try{const i=m.value?(n=(t=(e=U())==null?void 0:e.getModifiedEditor)==null?void 0:t.call(e))!=null?n:U():se(),d=kt(),u=(l=d?.EditorOption)==null?void 0:l.fontInfo;if(i&&u!=null){const a=(o=i.getOption)==null?void 0:o.call(i,u),c=a?.fontSize;if(typeof c=="number"&&Number.isFinite(c)&&c>0)return c}}catch{}try{const i=f.value;if(i){const d=i.querySelector(".view-lines .view-line");if(d)try{if(typeof window<"u"&&typeof window.getComputedStyle=="function"){const u=window.getComputedStyle(d).fontSize,a=u&&u.match(/^(\d+(?:\.\d+)?)/);if(a)return Number.parseFloat(a[1])}}catch{}}}catch{}return null}function St(e){var t,n;try{const i=kt(),d=(t=i?.EditorOption)==null?void 0:t.lineHeight;if(d!=null){const u=(n=e?.getOption)==null?void 0:n.call(e,d);if(typeof u=="number"&&u>0)return u}}catch{}const l=Nl();if(l&&l>0)return l;const o=Number.isFinite(_.value)&&_.value>0?_.value:14;return Math.max(12,Math.round(1.35*o))}function sn(e){var t,n,l;try{const i=kt(),d=(t=i?.EditorOption)==null?void 0:t.padding;if(d!=null){const u=(n=e?.getOption)==null?void 0:n.call(e,d);if(typeof u?.top=="number"||typeof u?.bottom=="number")return(typeof u?.top=="number"&&Number.isFinite(u.top)?Math.max(0,u.top):0)+(typeof u?.bottom=="number"&&Number.isFinite(u.bottom)?Math.max(0,u.bottom):0)}}catch{}const o=(l=re.value)==null?void 0:l.padding;return typeof o?.top=="number"||typeof o?.bottom=="number"?(typeof o?.top=="number"&&Number.isFinite(o.top)?Math.max(0,o.top):0)+(typeof o?.bottom=="number"&&Number.isFinite(o.bottom)?Math.max(0,o.bottom):0):m.value?24:0}function Tl(e,t){return typeof e!="number"||typeof t!="number"||e<1||t=o&&d>=o&&n[i]===l[d];)i--,d--;const u=Math.max(0,i-o+1),a=Math.max(0,d-o+1);if(u===0||a===0)return{removed:u,added:a};if((u+1)*(a+1)<=15e5){const c=a+1;let s=new Uint32Array(c),v=new Uint32Array(c);for(let y=u-1;y>=0;y--){v[a]=0;for(let g=a-1;g>=0;g--)v[g]=n[o+y]===l[o+g]?s[g+1]+1:Math.max(s[g],v[g+1]);const h=s;s=v,v=h}const p=s[0];return{removed:u-p,added:a-p}}return{removed:u,added:a}}function Dl(e){var t;if(!(function(){var d,u,a;return!(!m.value||!Ie.value)&&(r.node.originalCode!=null||r.node.updatedCode!=null?dn(String((d=r.node.originalCode)!=null?d:""),String((u=r.node.updatedCode)!=null?u:"")).removed>0:String((a=r.node.code)!=null?a:"").split(/\r\n|\n|\r/).some(c=>(function(s){return s.startsWith("-")&&!s.startsWith("---")})(c)))})())return!0;const n=e?.querySelector(".stream-monaco-fallback-inline-delete-line");if((t=n?.textContent)!=null&&t.trim()&&(n.hasAttribute("data-stream-monaco-colorize-signature")||n.querySelector('[class*="mtk"]')))return!0;const l=e?.querySelector([".editor.modified .view-zones .view-lines.line-delete",".editor.modified .view-lines .view-line.line-delete",".editor.original .view-zones .view-lines.line-delete",".editor.original .view-lines .view-line.line-delete"].join(","));if(!l||!l.matches(".view-line")&&!l.querySelector(".view-line"))return!1;const o=l.getBoundingClientRect(),i=e?.getBoundingClientRect();return i?.width===0&&i.height===0||o.width>0&&o.height>0}function Al(e,t){if(!e)return!1;const n=t.added<=0||!!e.querySelector([".line-insert",".gutter-insert",".stream-monaco-fallback-line-insert",".stream-monaco-fallback-gutter-insert",".stream-monaco-fallback-line-number-insert"].join(",")),l=t.removed<=0||!!e.querySelector([".line-delete",".gutter-delete",".inline-deleted-margin-view-zone",".stream-monaco-fallback-line-delete",".stream-monaco-fallback-gutter-delete",".stream-monaco-fallback-line-number-delete",".stream-monaco-fallback-inline-delete-line",".stream-monaco-fallback-inline-delete-margin"].join(","));return n&&l}function Vn(e,t){const n=e?.querySelector(t);return n instanceof HTMLElement?typeof window>"u"||typeof window.getComputedStyle!="function"?n:window.getComputedStyle(n).display==="none"?null:n:null}function jl(e,t){return Vn(e,t)!==null}function ql(e,t){if(!e)return!1;const n=t.added<=0||[".gutter-insert",".stream-monaco-fallback-gutter-insert"].some(o=>jl(e,o)),l=t.removed<=0||[".gutter-delete",".inline-deleted-margin-view-zone",".stream-monaco-fallback-gutter-delete",".stream-monaco-fallback-inline-delete-margin"].some(o=>jl(e,o));return n&&l}function Wl(e){var t;const n=Array.from((t=e?.querySelectorAll(".monaco-diff-editor .margin-view-overlays .line-numbers"))!=null?t:[]);return!!n.length&&n.some(l=>{var o;if(!((o=l.textContent)!=null&&o.trim()))return!1;if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const i=window.getComputedStyle(l);if(i.display==="none")return!1;const d=l.getBoundingClientRect();if(d.width<=0&&d.height<=0)return!0;const u=Number.parseFloat(i.width||""),a=Number.parseFloat(i.paddingLeft||""),c=Number.parseFloat(i.paddingRight||""),s=Math.max(d.width,Number.isFinite(u)?u:0)>=8,v=Number.isFinite(a)&&a>=1&&Number.isFinite(c)&&c>=1;return s&&v})}function _l(e){const t=Vn(e,".monaco-diff-editor .view-lines .view-line");if(!t)return!1;if(!Jn())return!0;const n=Vn(e,".monaco-diff-editor .margin-view-overlays .line-numbers");if(!n)return!1;if(typeof window>"u"||typeof window.getComputedStyle!="function")return!0;const l=t.getBoundingClientRect(),o=n.getBoundingClientRect();if(l.width<=0&&l.height<=0||o.width<=0&&o.height<=0)return!0;const i=l.left-o.right;return i>=0&&i<=32}function Ko(e,t){return!Ie.value||!(t||e?.querySelector([".line-insert",".line-delete",".gutter-insert",".gutter-delete",".stream-monaco-line-number-insert",".stream-monaco-line-number-delete",".stream-monaco-line-insert-fill",".stream-monaco-line-delete-fill",".stream-monaco-fallback-line-insert",".stream-monaco-fallback-line-delete",".stream-monaco-fallback-inline-delete-line"].join(",")))||!!(e?.classList.contains("stream-monaco-diff-inline-native-ready")&&!e.classList.contains("stream-monaco-diff-native-stale"))}function Il(e,t,n,l){const o=e?.querySelector(`.monaco-diff-editor .editor.${t}`);if(!o)return!1;const i=Array.from(o.querySelectorAll(`.margin-view-overlays .line-numbers.${n}`));if(!i.length)return!0;const d=Array.from(o.querySelectorAll(".lines-content > .view-lines:not(.line-delete) > .view-line"));return!!d.length&&i.every(u=>{const a=u.getBoundingClientRect();let c=null;for(const s of d){const v=s.getBoundingClientRect(),p=Math.abs(v.top-a.top);(!c||p1.25||c.node.classList.contains(l)})}function Zo(e,t){if(!e)return!1;const n=t.added<=0||Il(e,"modified","stream-monaco-line-number-insert","stream-monaco-line-insert-fill"),l=t.removed<=0||(Ie.value?!!e.classList.contains("stream-monaco-diff-inline-native-ready"):Il(e,"original","stream-monaco-line-number-delete","stream-monaco-line-delete-fill"));return n&&l}function Gn(e){if(xn.value)return!0;if(!e)return!1;const t=Array.from(e.querySelectorAll(".monaco-diff-editor .view-lines .view-line, .monaco-editor .view-lines .view-line")).filter(l=>{var o;if(!((o=l.textContent)!=null&&o.trim()))return!1;const i=l.getBoundingClientRect();return i.width>0||i.height>0});if(!t.length)return!1;const n=t.filter(l=>{var o,i;return i=(o=l.textContent)!=null?o:"",/['"`{}()[\]:;=<>.,]|\/\/|\/\*|\b(?:async|await|class|const|enum|export|for|function|if|import|interface|let|return|switch|type|var|while)\b/.test(i.replace(/\u00A0/g," ").trim())});return!n.length||n.filter(l=>Array.from(l.querySelectorAll("span")).filter(o=>{var i;return(i=o.textContent)==null?void 0:i.trim()}).some(o=>String(o.className||"").split(/\s+/).some(i=>/^mtk\d+$/.test(i)&&i!=="mtk1"))).length>0}function Jn(){const e=re.value;return e?.lineNumbers!=="off"}function Yn(){var e,t;m.value?Ze.value=dn(String((e=r.node.originalCode)!=null?e:""),String((t=r.node.updatedCode)!=null?t:"")):Ze.value={removed:0,added:0}}function lt(){var e;if(m.value)try{const t=U(),n=(e=t?.getLineChanges)==null?void 0:e.call(t);if(!Array.isArray(n))return void Yn();let l=0,o=0;for(const i of n)l+=Tl(i.originalStartLineNumber,i.originalEndLineNumber),o+=Tl(i.modifiedStartLineNumber,i.modifiedEndLineNumber);Ze.value={removed:l,added:o}}catch{Yn()}else Ze.value={removed:0,added:0}}function Qn(){var e;if(Number.isFinite(_.value)&&_.value>0&&Number.isFinite(pe.value))return _.value;const t=Un();return typeof((e=r.monacoOptions)==null?void 0:e.fontSize)=="number"?(pe.value=r.monacoOptions.fontSize,_.value=r.monacoOptions.fontSize,_.value):t&&t>0?(pe.value=t,_.value=t,t):(pe.value=12,_.value=12,12)}function ei(){const e=Qn(),t=Math.min(36,e+1);_.value=t}function ti(){const e=Qn(),t=Math.max(10,e-1);_.value=t}function ni(){Qn(),Number.isFinite(pe.value)&&(_.value=pe.value)}function Ul(){var e,t,n,l,o,i,d,u,a,c,s,v,p,y;try{const h=m.value?U():null,g=m.value?h:se();if(!g)return null;if(h?.getOriginalEditor&&h?.getModifiedEditor){const C=(e=h.getOriginalEditor)==null?void 0:e.call(h),S=(t=h.getModifiedEditor)==null?void 0:t.call(h);(n=C?.layout)==null||n.call(C),(l=S?.layout)==null||l.call(S);const F=((o=C?.getContentHeight)==null?void 0:o.call(C))||0,P=((i=S?.getContentHeight)==null?void 0:i.call(S))||0,T=Math.max(F,P);if(T>0)return Math.ceil(T);const R=((a=(u=(d=C?.getModel)==null?void 0:d.call(C))==null?void 0:u.getLineCount)==null?void 0:a.call(u))||1,A=((v=(s=(c=S?.getModel)==null?void 0:c.call(S))==null?void 0:s.getLineCount)==null?void 0:v.call(s))||1,H=Math.max(R,A),J=Math.max(St(C),St(S)),K=Math.max(sn(C),sn(S));return Math.ceil(H*J+K+0)}if(g?.getContentHeight){(p=g?.layout)==null||p.call(g);const C=g.getContentHeight();if(C>0)return m.value||(Zt.value=!0),Math.ceil(C)}const X=(y=g?.getModel)==null?void 0:y.call(g);let ce=1;X&&typeof X.getLineCount=="function"&&(ce=X.getLineCount());const L=St(g);return Math.ceil(ce*(L+1.5)+0)}catch{return null}}function Vl(){var e,t;if(m.value)return!1;try{const n=(t=(e=se())==null?void 0:e.getContentHeight)==null?void 0:t.call(e),l=typeof n=="number"&&Number.isFinite(n)&&n>0;return l&&(Zt.value=!0),l}catch{return!1}}function Xn(e){var t,n,l;if(typeof window>"u")return null;try{const o=e.getBoundingClientRect(),i=window.getComputedStyle(e);if(i.display==="none"||i.visibility==="hidden")return null;const d=e.querySelector("diffs-container");if(d instanceof HTMLElement){const c=d.getBoundingClientRect();if(c.height>0&&c.bottom>o.top)return Math.ceil(c.bottom-o.top)}const u=[".editor.original .view-lines .view-line",".editor.modified .view-lines .view-line",".editor.original .view-zones > div",".editor.modified .view-zones > div",".editor.original .margin-view-zones > div",".editor.modified .margin-view-zones > div",".editor.original .diff-hidden-lines",".editor.modified .diff-hidden-lines",".stream-monaco-diff-unchanged-bridge"];let a=0;for(const c of Array.from(e.querySelectorAll(u.join(",")))){if(!(c instanceof HTMLElement)||((t=c.parentElement)!=null&&t.classList.contains("view-zones")||(n=c.parentElement)!=null&&n.classList.contains("margin-view-zones"))&&!((l=c.textContent)!=null&&l.trim()||c.matches(".line-delete, .line-insert, .cdr")||c.querySelector(".diff-hidden-lines, .stream-monaco-diff-unchanged-bridge, .line-delete, .line-insert, .cdr")))continue;const s=window.getComputedStyle(c);if(s.display==="none"||s.visibility==="hidden"||Number.parseFloat(s.opacity||"1")<=.01)continue;const v=c.getBoundingClientRect();v.height<=0||v.bottom<=o.top||(a=Math.max(a,v.bottom-o.top))}return a>0?Math.ceil(a):null}catch{return null}}function Ht(e){if(typeof window>"u")return!1;const t=e.getBoundingClientRect();if(t.width<=0||t.height<=0)return!1;const n=e.querySelectorAll(".editor.modified .diff-hidden-lines, .editor.original .diff-hidden-lines, .stream-monaco-diff-unchanged-bridge");for(const l of Array.from(n)){if(!(l instanceof HTMLElement))continue;const o=window.getComputedStyle(l);if(o.display==="none"||o.visibility==="hidden"||Number.parseFloat(o.opacity||"1")<=.01)continue;const i=l.getBoundingClientRect();if(!(i.width<=0||i.height<=0||i.bottom<=t.top||i.top>=t.bottom))return!0}return!1}function Kn(e){var t;const n=String(e??"").trim(),l=(t=n.match(/^#([0-9a-f]{3}|[0-9a-f]{6})$/i))==null?void 0:t[1];if(l){const a=l.length===3?l.split("").map(c=>`${c}${c}`).join(""):l;return .2126*Number.parseInt(a.slice(0,2),16)+.7152*Number.parseInt(a.slice(2,4),16)+.0722*Number.parseInt(a.slice(4,6),16)}const o=n.match(/\d+(?:\.\d+)?/g);if(!o||o.length<3)return null;const[i,d,u]=o.slice(0,3).map(Number);return .2126*i+.7152*d+.0722*u}function Nt(){var e,t,n;if(Gl())return;const l=Un();l&&l>0&&(jn.value=l,_.value=l,pe.value=l);try{const o=St(m.value?(n=(t=(e=U())==null?void 0:e.getModifiedEditor)==null?void 0:t.call(e))!=null?n:U():se());o&&o>0&&(tn.value=o)}catch{}try{const o=Nl();o&&o>0&&(tn.value=o)}catch{}}function Gl(){return m.value&&Cl.value}function Zn(){var e;if(!m.value||!Ne.value)return null;const t=f.value,n=(e=$.value)==null?void 0:e.querySelector("pre.code-pre-fallback");if(!t||!n)return null;const l=Math.ceil(n.getBoundingClientRect().height);return!Number.isFinite(l)||l<=0?null:(t.style.height=`${l}px`,t.style.minHeight=`${l}px`,t.style.maxHeight=`${Math.ceil(Ct())}px`,t.style.overflow="hidden",l)}function el(){var e,t,n,l,o,i,d,u;const a=f.value,c=$.value;if(!a||!c)return;const s=a,v=a.querySelector(".monaco-editor")||a,p=v.querySelector(".monaco-editor-background")||v,y=v.querySelector(".view-lines")||v;let h=null,g=null,X=null;try{typeof window<"u"&&typeof window.getComputedStyle=="function"&&(h=window.getComputedStyle(v),g=p===v?h:window.getComputedStyle(p),X=y===v?h:window.getComputedStyle(y))}catch{h=null,g=null,X=null}const ce=String((e=h?.getPropertyValue("--vscode-editor-foreground"))!=null?e:"").trim(),L=String((t=h?.getPropertyValue("--vscode-editor-background"))!=null?t:"").trim(),C=String((l=(n=h?.getPropertyValue("--vscode-editor-selectionBackground"))!=null?n:h?.getPropertyValue("--vscode-editor-hoverHighlightBackground"))!=null?l:"").trim(),S=ce||String((i=(o=X?.color)!=null?o:h?.color)!=null?i:"").trim(),F=L||String((u=(d=g?.backgroundColor)!=null?d:h?.backgroundColor)!=null?u:"").trim(),P=(function(){var T,R,A,H,J;try{const K=m.value?(A=(R=(T=U())==null?void 0:T.getModifiedEditor)==null?void 0:R.call(T))!=null?A:U():se(),st=kt(),Dt=(H=st?.EditorOption)==null?void 0:H.fontInfo;if(K&&Dt!=null){const At=(J=K.getOption)==null?void 0:J.call(K,Dt),Ve=At?.typicalHalfwidthCharacterWidth;if(typeof Ve=="number"&&Number.isFinite(Ve)&&Ve>0)return Ve}}catch{}return null})();if(P!=null&&(nn.value=P),m.value){const T=(R,A)=>{A?(c.style.setProperty(R,A),s.style.setProperty(R,A)):(c.style.removeProperty(R),s.style.removeProperty(R))};for(const[R,A]of Object.entries(Fl(c.classList.contains("is-dark"))))T(R,A);return S?(c.style.setProperty("--markstream-diff-editor-fg",S),s.style.setProperty("--vscode-editor-foreground",S),s.style.setProperty("--stream-monaco-editor-fg",S)):(c.style.removeProperty("--markstream-diff-editor-fg"),s.style.removeProperty("--vscode-editor-foreground"),s.style.removeProperty("--stream-monaco-editor-fg")),F?(c.style.setProperty("--markstream-diff-editor-bg",F),c.style.setProperty("--markstream-diff-panel-bg",F),c.style.setProperty("--markstream-diff-panel-bg-soft",F),c.style.setProperty("--markstream-diff-panel-bg-strong",F),s.style.setProperty("--vscode-editor-background",F),s.style.setProperty("--stream-monaco-editor-bg",F),s.style.setProperty("--stream-monaco-fixed-editor-bg",F),s.style.setProperty("--stream-monaco-panel-bg",F),s.style.setProperty("--stream-monaco-panel-bg-soft",F),s.style.setProperty("--stream-monaco-panel-bg-strong",F),s.style.backgroundColor=F):(c.style.removeProperty("--markstream-diff-editor-bg"),c.style.removeProperty("--markstream-diff-panel-bg"),c.style.removeProperty("--markstream-diff-panel-bg-soft"),c.style.removeProperty("--markstream-diff-panel-bg-strong"),s.style.removeProperty("--vscode-editor-background"),s.style.removeProperty("--stream-monaco-editor-bg"),s.style.removeProperty("--stream-monaco-fixed-editor-bg"),s.style.removeProperty("--stream-monaco-panel-bg"),s.style.removeProperty("--stream-monaco-panel-bg-soft"),s.style.removeProperty("--stream-monaco-panel-bg-strong"),s.style.backgroundColor=""),void(C?s.style.setProperty("--vscode-editor-selectionBackground",C):s.style.removeProperty("--vscode-editor-selectionBackground"))}if((function(T,R,A){if(!xn.value)return!1;const H=Kn(T),J=Kn(R);return A?H!=null&&H>170||J!=null&&J<110:H!=null&&H<85||J!=null&&J>190})(F,S,c.classList.contains("is-dark")))return s.style.removeProperty("--vscode-editor-foreground"),s.style.removeProperty("--vscode-editor-background"),void s.style.removeProperty("--vscode-editor-selectionBackground");S&&s.style.setProperty("--vscode-editor-foreground",S),F&&s.style.setProperty("--vscode-editor-background",F),C&&s.style.setProperty("--vscode-editor-selectionBackground",C)}let tl=0,nl=0;const Jl=/auto|scroll|overlay/i;function Le(e,t,n){var l;if(typeof window>"u"||m.value||(function(s){return Wo.value||Sl(s)})(e))return;const o=Math.ceil(t),i=Math.ceil(n)-o;if(Math.abs(i)<=1)return;const d=(function(s){var v,p;if(typeof window>"u")return null;const y=(v=s?.ownerDocument)!=null?v:document,h=y.scrollingElement||y.documentElement||y.body;let g=(p=s?.parentElement)!=null?p:null;for(;g&&g!==y.body&&g!==h;){const X=window.getComputedStyle(g),ce=(X.overflowY||"").toLowerCase(),L=(X.overflow||"").toLowerCase();if(Jl.test(ce)||Jl.test(L))return g;g=g.parentElement}return h})(e);if(!d)return;const u=(l=e.ownerDocument)!=null?l:document,a=d===u.body||d===u.documentElement||d===u.scrollingElement,c=a?0:d.getBoundingClientRect().top;e.getBoundingClientRect().top-c>=0||(a&&typeof window.scrollBy=="function"?window.scrollBy(0,i):d.scrollTop+=i)}function ll(){try{const e=f.value;if(!e)return;const t=e.getBoundingClientRect().height,n=Ul();if(n!=null&&n>0){const o=Hl(n,!0,{allowBelowEstimatedFloor:!m.value&&W.value&&Vl()}),i=nt();return e.style.minHeight=i!=null?`${i}px`:"0px",e.style.height=`${o}px`,e.style.maxHeight="none",e.style.overflow="visible",void Le(e,t,o)}const l=nt();l!=null&&(e.style.minHeight=`${l}px`,e.style.height=`${l}px`,e.style.maxHeight="none",e.style.overflow="visible",Le(e,t,l))}catch{}}function ot(){for(var e,t;ze.length>0;)try{(t=(e=ze.pop())==null?void 0:e.dispose)==null||t.call(e)}catch{}bt!=null&&(yn(bt),bt=null),Bt!=null&&(yn(Bt),Bt=null),Je!=null&&(yn(Je),Je=null),Ye=0,Qe=!1}function Re(){for(var e;$n.length>0;)try{(e=$n.pop())==null||e()}catch{}}function le(e=!1){xe.value||(Fe.value?ll():(function(t={}){var n,l,o;try{const i=f.value;if(!i)return;const d=i.getBoundingClientRect().height,u=Ct(),a=Math.ceil(((n=i.getBoundingClientRect)==null?void 0:n.call(i).height)||0),c=Number.parseFloat(i.style.height||""),s=a>0?a:Number.isFinite(c)&&c>0?Math.ceil(c):0,v=m.value?(function(){var H,J,K,st,Dt,At,Ve,wo,bo,ko,xo,So;if(Oe())return null;try{const dt=U(),ct=(H=dt?.getOriginalEditor)==null?void 0:H.call(dt),ft=(J=dt?.getModifiedEditor)==null?void 0:J.call(dt);if(!ct||!ft)return null;const hi=((Dt=(st=(K=ct.getModel)==null?void 0:K.call(ct))==null?void 0:st.getLineCount)==null?void 0:Dt.call(st))||1,gi=((wo=(Ve=(At=ft.getModel)==null?void 0:At.call(ft))==null?void 0:Ve.getLineCount)==null?void 0:wo.call(Ve))||1,yi=Math.max(hi,gi),wi=Math.max(St(ct),St(ft)),bi=Math.max(sn(ct),sn(ft)),ki=Math.max((ko=(bo=ct.getContentHeight)==null?void 0:bo.call(ct))!=null?ko:0,(So=(xo=ft.getContentHeight)==null?void 0:xo.call(ft))!=null?So:0);return Math.ceil(Math.max(ki,yi*wi+bi+0))}catch{return null}})():null,p=m.value&&Ht(i),y=m.value&&cn(i),h=m.value&&i.classList.contains("stream-monaco-diff-native-stale"),g=p&&W.value&&D.value&&!Ne.value;if(p||(ve.value=null),Cn>0&&(Cn--,We.value!=null))return void Le(i,d,De(i,We.value,u,{allowBelowEstimatedFloor:g,preserveScrollableOverflow:ol(i)}));if(m.value&&!y&&!p&&Ne.value){const H=Zn();if(H!=null){const J=De(i,H,u,{allowBelowEstimatedFloor:!0});return ee(!0),void Le(i,d,J)}}const X=m.value&&t.preferModelDiffHeight===!0,ce=m.value?Xn(i):null,L=ce,C=!m.value&&W.value&&Vl(),S=m.value&&r.loading!==!1&&(L!=null||v!=null&&a>0&&v0&&v0&&v0?s:null:v;else P=Ul();if(m.value&&r.loading===!1&&h&&!g&&P!=null&&v!=null&&(P=Math.min(P,v)),m.value&&P!=null&&s>0&&(r.loading!==!1||r.loading===!1&&h&&!g||t.holdCurrentDiffHeight===!0&&!g)&&(P=Math.max(P,s)),P!=null&&P>0){const H=p&&ve.value!=null,J=p&&a>0&&a=u-1,K=De(i,H?Math.max(ve.value,P):J?a:P,u,{clearEstimatedFloor:!0,allowBelowEstimatedFloor:g||C||S,preserveScrollableOverflow:ol(i)});return p&&K0?v:0);if(T>0){const H=p&&ve.value!=null,J=p&&a>0&&a=u-1,K=De(i,H?Math.max(ve.value,T):J?a:T,u,{allowBelowEstimatedFloor:g});return p&&K0?Le(i,d,De(i,A,u,{allowBelowEstimatedFloor:g})):m.value||Le(i,d,De(i,u,u))}catch{}})(typeof e=="object"?e:{}))}function Yl(){tl=0,nl=0}function ee(e=!1){var t,n,l;if(xe.value)return;const o=f.value;if(!o)return;const i=m.value?U():se();if(i&&typeof i.layout=="function")try{const d=(t=o.getBoundingClientRect)==null?void 0:t.call(o),u=Math.ceil(((n=d?.width)!=null?n:0)||o.clientWidth||0),a=Math.ceil(((l=d?.height)!=null?l:0)||o.clientHeight||Number.parseFloat(o.style.height||"")||0);if(u>0&&a>0){if(!e&&u===tl&&a===nl)return;tl=u,nl=a,i.layout({width:u,height:a})}else Yl(),i.layout()}catch{}}function he(){if(!m.value)return void Re();const e=f.value;if(!e)return void Re();const t=e.querySelector(".monaco-diff-editor");if(!t||t.classList.contains("side-by-side"))return void Re();const n=Array.from(t.querySelectorAll(".editor.original .diff-hidden-lines")),l=Array.from(t.querySelectorAll(".editor.modified .diff-hidden-lines")),o=Math.min(n.length,l.length);for(let i=0;i div:first-child"),c=d.querySelector(".center");if(!u||!a||!c||c.querySelector(".markstream-inline-fold-proxy"))continue;const s=document.createElement("button");s.type="button",s.className="markstream-inline-fold-proxy",s.dataset.markstreamInlineFoldProxy="true";const v=u.getAttribute("title")||"Show Unchanged Region";s.title=v,s.setAttribute("aria-label",v);const p=g=>{g.preventDefault(),g.stopPropagation()},y=g=>{g.preventDefault(),g.stopPropagation(),u.click(),fe(()=>de())},h=g=>{g.key!=="Enter"&&g.key!==" "||(g.preventDefault(),g.stopPropagation(),u.click(),fe(()=>de()))};s.addEventListener("mousedown",p),s.addEventListener("click",y),s.addEventListener("keydown",h),c.appendChild(s),$n.push(()=>{s.removeEventListener("mousedown",p),s.removeEventListener("click",y),s.removeEventListener("keydown",h),s.parentElement===c&&c.removeChild(s)})}}function de(e=!1){if(B||bt!=null)return;const t=()=>{B||(he(),le(e),ee())};bt=fe(()=>{bt=null,t(),Bt=fe(()=>{Bt=null,t()})}),it()}function it(e=!1){if(!m.value||B||!e&&r.loading===!1||(Qe=Qe||e,Ye=Math.max(Ye,e?18:6),Je!=null))return;const t=()=>{if(Je=null,!m.value||B||Ye<=0||!Qe&&r.loading===!1)return Ye=0,void(Qe=!1);Ye--,he(),le({preferModelDiffHeight:!0,holdCurrentDiffHeight:Qe}),ee(),Ye>0?Je=fe(t):Qe=!1};Je=fe(t)}function De(e,t,n,l={}){const o=m.value&&r.loading!==!1?Xn(e):null,i=o!=null&&o>t+1?o:t,d=Math.min(i,n),u=l.allowBelowEstimatedFloor===!0||zl(),a=Hl(d,l.clearEstimatedFloor===!0,{allowBelowEstimatedFloor:u}),c=nt();if(e.style.minHeight=c==null||u?"0px":`${Math.min(c,Math.ceil(n))}px`,e.style.height=`${a}px`,e.style.maxHeight=`${Math.ceil(n)}px`,m.value)e.style.overflow="hidden";else{const s=l.preserveScrollableOverflow===!0||t>n+1;e.style.overflow=s?"auto":"hidden"}return a}function Ql(e,t=0){var n;const l=Math.ceil(((n=e.getBoundingClientRect)==null?void 0:n.call(e).height)||0),o=Math.max(t,e.clientHeight||0,l);return o>0&&e.scrollHeight>o+1}function ol(e){var t;return!m.value&&(Mn||Ql(e,(t=We.value)!=null?t:0))}function il(e){var t,n,l,o,i,d,u,a;if(!m.value)return;const c=Fe.value||!Ht(e)||e.getBoundingClientRect().height>=Ct()-1;if(Sn===c)return;Sn=c;const s=Ce(I({},(n=(t=r.monacoOptions)==null?void 0:t.scrollbar)!=null?n:{}),{handleMouseWheel:c}),v=U();try{(i=(o=(l=v?.getOriginalEditor)==null?void 0:l.call(v))==null?void 0:o.updateOptions)==null||i.call(o,{scrollbar:s}),(a=(u=(d=v?.getModifiedEditor)==null?void 0:d.call(v))==null?void 0:u.updateOptions)==null||a.call(u,{scrollbar:s})}catch{}}function cn(e=f.value){return!!Oe(e)||!!e?.querySelector(".monaco-diff-editor .view-lines .view-line")}function Xl(e=f.value){return!!Oe(e)||!!e?.querySelector(".monaco-editor .view-lines .view-line")}function Kl(){var e,t;if(Oe())return!0;const n=(t=(e=se())==null?void 0:e.getModel)==null?void 0:t.call(e);return typeof n?.getValue=="function"&&n.getValue()===Te.value}function Zl(e=f.value){return!!Oe(e)||!!e?.classList.contains("stream-monaco-diff-root")&&!(Ie.value&&!e.classList.contains("stream-monaco-diff-inline"))}function Oe(e=f.value){return!!e?.querySelector("diffs-container")}function eo(e){return r.loading!==!1||D.value||e.classList.contains("stream-monaco-diff-native-stale")||Ht(e)}function li(){const e=U();return typeof e?.getOriginalEditor=="function"||typeof e?.getModifiedEditor=="function"||typeof e?.getLineChanges=="function"}function to(){return q(this,arguments,function*(e={}){var t,n,l;if(!m.value)return!0;if(Oe())return yield j(),yield Pe(),Oe();const o=e.requireHighlight!==!1;let i=0,d=Pt(String((t=r.node.originalCode)!=null?t:""),String((n=r.node.updatedCode)!=null?n:"")),u=dn(d.original,d.updated),a=u.added>0||u.removed>0;const c=()=>{var s,v;const p=Pt(String((s=r.node.originalCode)!=null?s:""),String((v=r.node.updatedCode)!=null?v:""));p.original===d.original&&p.updated===d.updated||(d=p,u=dn(d.original,d.updated),a=u.added>0||u.removed>0)};for(let s=0;s<30;s++){if(B)return!1;c();const v=f.value,p=U(),y=Jn();let h=!1;try{const S=(l=p?.getLineChanges)==null?void 0:l.call(p);h=Array.isArray(S)&&(!a||S.length>0)}catch{h=!1}const g=!!v?.querySelector(".monaco-diff-editor"),X=cn(v),ce=!a||Al(v,u),L=!a||ql(v,u),C=!y||Wl(v);if(g&&X&&h&&ce&&L&&C&&Dl(v)){try{xt(),he(),lt(),de()}catch{}if(yield j(),yield Pe(),B)return!1;const S=f.value,F=!Jn()||Wl(S),P=!a||Al(S,u),T=!a||ql(S,u),R=Ko(S,a),A=Zo(S,u),H=!o||Gn(S),J=Zl(S)&&F&&_l(S)&&P&&T&&R&&A&&H,K=Zl(S)&&F&&_l(S)&&P&&T&&Dl(S)&&H;if(J||K){if(i++,i>=2)return!0}else i=0}yield j(),yield Pe()}return B||(xt(),he(),lt(),de(),c()),!1})}function no(e,t,n){return q(this,null,function*(){try{return void(yield Qt(e,t,n))}catch(l){if(!Lt(l))throw l}if(yield j(),yield Pe(),!B&&m.value)try{yield Qt(e,t,n)}catch(l){if(!Lt(l))throw l}})}function Ct(){var e,t;const n=(t=(e=r.monacoOptions)==null?void 0:e.MAX_HEIGHT)!=null?t:500;if(typeof n=="number")return n;const l=String(n).match(/^(\d+(?:\.\d+)?)/);return l?Number.parseFloat(l[1]):500}const rl=k(()=>r.isShowPreview&&(ke.value==="html"||ke.value==="svg"));function Ue(){return typeof r.node.loading=="boolean"?r.node.loading:r.loading===!0}function lo(){var e,t,n;if(!Ue())return!0;const l=String((e=r.node.raw)!=null?e:""),o=(n=(t=l.split(/\r\n|\n|\r/,1)[0])==null?void 0:t.trimStart())!=null?n:"";return!/^(?:`{3,}|~{3,})/.test(o)||/\r\n|\n|\r/.test(l)}function oo(e,t,n){return!n||lo()&&String(t??"")?hn(String(e??"")):"plain"}function fn(){return Ue()}let Mt=null,al=!1,vn=0;function io(){Mt=null,vn++}function ro(){return q(this,arguments,function*(e=vn){if(!al){al=!0;try{for(;Mt&&!B&&!m.value&&e===vn;){const t=Mt;Mt=null;try{yield Promise.resolve(En(t.code,t.language)),yield j(),B||m.value||(le(!1),ee())}catch{}}}finally{al=!1,!Mt||B||m.value||ro()}}})}function ao(e,t){Mt={code:e,language:t},ro(vn)}ae(()=>[r.node.language,r.node.code,r.node.raw,r.node.loading,r.loading],([e,t,n,l,o])=>{ke.value=oo(e,t,typeof l=="boolean"?l:o===!0)}),ae(()=>[r.node.originalCode,r.node.updatedCode,m.value],()=>{ve.value=null,Yn(),fe(()=>lt())},{immediate:!0});let mn=0;ae(()=>[r.node.originalCode,r.node.updatedCode,Ee.value,m.value,r.stream],e=>q(null,[e],function*([,,,t,n]){var l,o;const i=++mn;if(!t||Ue()||n===!1&&!Q.value)return;if(n!==!1&&ue&&!Q.value&&f.value)try{yield Ae(f.value)}catch{}const d=Et;if(d&&!Se.value){try{yield d}catch{}if(B||!m.value||i!==mn)return}if(i!==mn)return;const u=Pt(String((l=r.node.originalCode)!=null?l:""),String((o=r.node.updatedCode)!=null?o:"")),a=r.loading===!1;a&&at();try{if(yield no(u.original,u.updated,Ee.value),B||!m.value||i!==mn)return;yield j(),ee(!0),he(),le(r.loading===!1||{preferModelDiffHeight:!0}),ee(!0),de(!0)}catch{return}if(a){if(B||!m.value)return;xt(),he(),lt(),de(),it(!0)}Fe.value&&fe(()=>ll())})),ae(()=>r.node.code,e=>q(null,null,function*(){if(Ue()||r.stream===!1||(ke.value||(ke.value=hn(gl(e))),m.value))return;const t=Et;if(t&&!Se.value){try{yield t}catch{}if(B||m.value)return}if(ue&&!Q.value&&f.value)try{yield Ae(f.value)}catch{}ao(Kt(r.node.code),Ee.value),Fe.value&&fe(()=>ll())}));const oi=k(()=>{const e=ke.value;return e?Eo[e]||e.charAt(0).toUpperCase()+e.slice(1):Eo[""]}),uo=k(()=>{var e;return Ai(String((e=r.node.raw)!=null?e:""),oi.value,m.value)}),ii=k(()=>uo.value.title),so=k(()=>uo.value.caption),ri=k(()=>(Hi.value,(function(e,t){if(t===void 0)return Ni(e);if(t){const l=t(e);if(l!=null&&l!=="")return l}const n=hn(e);return Ti(n)||Ri()})(ke.value||"",ht))),ai=k(()=>{const e={};e["--markstream-code-layout-character-width"]=nn.value==null?"1ch":`${nn.value}px`;const t=o=>{if(o!=null)return typeof o=="number"?`${o}px`:String(o)},n=t(r.minWidth),l=t(r.maxWidth);if(n&&(e.minWidth=n),l&&(e.maxWidth=l),Ll.value&&!m.value&&!xe.value){const o=Qo.value;o!=null&&(e.minHeight=`${o}px`)}return m.value||(e.color="var(--vscode-editor-foreground, var(--markstream-code-fallback-fg))",e.backgroundColor="var(--vscode-editor-background, var(--markstream-code-fallback-bg))",e.borderColor="var(--markstream-code-border-color)"),e}),ui=k(()=>r.showTooltips!==!1);function si(){return q(this,null,function*(){try{typeof navigator<"u"&&navigator.clipboard&&typeof navigator.clipboard.writeText=="function"&&(yield navigator.clipboard.writeText(r.node.code)),yt.value=!0,E("copy",r.node.code),setTimeout(()=>{yt.value=!1},1e3)}catch(e){console.error("复制失败:",e)}})}function di(){Fe.value=!Fe.value;const e=m.value?U():se(),t=f.value;e&&t&&(Fe.value?(pn(!0),t.style.maxHeight="none",t.style.overflow="visible",le(!0)):(pn(!1),t.style.overflow=m.value?"hidden":"auto",le(!0)),il(t))}function ci(){var e,t;if(xe.value=!xe.value,xe.value){if(Mn=!1,f.value){const n=Math.ceil(((t=(e=f.value).getBoundingClientRect)==null?void 0:t.call(e).height)||0);Mn=!m.value&&(Ql(f.value,n)||f.value.style.overflow==="auto"||f.value.style.overflowY==="auto"),n>0&&(We.value=n)}pn(!1)}else Fe.value&&pn(!0),f.value&&We.value!=null&&(f.value.style.height=`${We.value}px`),Cn=2,j(()=>{xe.value||B||(le(!0),ee(!0))})}function fi(){if(!rl.value)return;const e=ke.value;if(Gt.value){const t=e==="html"?"text/html":"image/svg+xml",n=e==="html"?Y("artifacts.htmlPreviewTitle")||"HTML Preview":Y("artifacts.svgPreviewTitle")||"SVG Preview";return void E("previewCode",{node:r.node,artifactType:t,artifactTitle:n,id:`temp-${e}-${Date.now()}`})}e==="html"&&(en.value=!en.value)}function pn(e){var t,n;try{if(m.value){const l=U();(t=l?.updateOptions)==null||t.call(l,{automaticLayout:e})}else{const l=se();(n=l?.updateOptions)==null||n.call(l,{automaticLayout:e})}}catch{}}function vi(e){return q(this,null,function*(){var t;if(!ue||B)return;const n=Ot.value;if(Rn=!1,me.value=!1,et.value=null,Se.value=!1,D.value=!1,$t.value=!1,Sn=null,jn.value=null,tn.value=null,nn.value=null,(function(){const a=(function(){var c;const s=(c=f.value)==null?void 0:c.parentElement;return s instanceof HTMLElement?s:null})();a&&(a.style.removeProperty("--stream-monaco-line-number-left"),a.style.removeProperty("--stream-monaco-line-number-width"),a.style.removeProperty("--stream-monaco-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-original-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-modified-line-number-gap-to-code"),a.style.removeProperty("--stream-monaco-original-scrollable-left"),a.style.removeProperty("--stream-monaco-modified-scrollable-left"))})(),Yl(),(function(){Zt.value=!1;const a=El.value;_n.value=W.value||a==null?null:a})(),ot(),Re(),(function(a){a.replaceChildren()})(e),at(),B)return;const l=q(null,null,function*(){var a,c;if(n==="diff"){(function(){if(On||typeof window>"u")return;On=!0;const v=p=>{var y;Lt("reason"in p?p.reason:(y=p.error)!=null?y:p.message)&&(p.preventDefault(),p.stopImmediatePropagation())};window.addEventListener("error",v,!0),window.addEventListener("unhandledrejection",v,!0),Xt=()=>{window.removeEventListener("error",v,!0),window.removeEventListener("unhandledrejection",v,!0),On=!1,Xt=null}})(),Xe();const s=Pt(String((a=r.node.originalCode)!=null?a:""),String((c=r.node.updatedCode)!=null?c:""));Yt?yield gt(()=>Yt(e,s.original,s.updated,Ee.value)):yield gt(()=>ue(e,r.node.code,Ee.value))}else yield gt(()=>ue(e,Te.value,Ee.value));Se.value=!0}),o=l.finally(()=>{Et===o&&(Et=null)});if(Et=o,yield(function(a){return q(this,null,function*(){if(!m.value)return void(yield a);let c,s=!1;for(a.then(()=>{s=!0},v=>{s=!0,c=v});;){if(B)return;if(s){if(c)throw c;return}if(cn()&&li())return;yield j(),yield Pe()}})})(o),B||Ot.value!==n)return;Se.value=!0;const i=n==="diff"?U():se();if(typeof((t=r.monacoOptions)==null?void 0:t.fontSize)=="number")i?.updateOptions({fontSize:r.monacoOptions.fontSize,automaticLayout:!1}),pe.value=r.monacoOptions.fontSize,_.value=r.monacoOptions.fontSize;else if(!Gl()){const a=Un();a&&a>0?(pe.value=a,_.value=a):(pe.value=12,_.value=12)}Nt(),yield mo(),Fe.value||xe.value||le(!1),W.value=!0,kl.value=n,(function(){var a,c,s,v,p;if(ot(),m.value){const h=U(),g=(a=h?.getOriginalEditor)==null?void 0:a.call(h),X=(c=h?.getModifiedEditor)==null?void 0:c.call(h),ce=(C,S)=>{try{const F=C?.[S];if(typeof F!="function")return;const P=F.call(C,()=>de());P&&ze.push(P)}catch{}};try{const C=(s=h?.onDidUpdateDiff)==null?void 0:s.call(h,()=>{de(),fe(()=>lt())});C&&ze.push(C)}catch{}ce(g,"onDidContentSizeChange"),ce(X,"onDidContentSizeChange");const L=f.value;if(L&&typeof MutationObserver<"u"){const C=[".view-line",".view-lines",".view-zones",".margin-view-zones",".diff-hidden-lines",".stream-monaco-diff-unchanged-bridge",".stream-monaco-fallback-inline-delete-zone",".stream-monaco-fallback-inline-delete-margin"].join(","),S=T=>{var R;const A=T instanceof HTMLElement?T:T.parentElement;return!!((R=A?.closest)!=null&&R.call(A,C))},F=T=>{var R,A;const H=T instanceof HTMLElement?T:T.parentElement;return!!((R=H?.closest)!=null&&R.call(H,C)||(A=H?.querySelector)!=null&&A.call(H,C))},P=new MutationObserver(T=>{m.value&&eo(L)&&T.some(R=>S(R.target)||Array.from(R.addedNodes).some(F)||Array.from(R.removedNodes).some(S))&&(he(),le({preferModelDiffHeight:!0}),ee(),it())});P.observe(L,{attributeFilter:["class"],attributes:!0,childList:!0,characterData:!0,subtree:!0}),ze.push({dispose:()=>P.disconnect()})}if(L){const C=S=>{const F=S.target instanceof Element?S.target:null;if(!F?.closest([".stream-monaco-unchanged-summary",".stream-monaco-unchanged-reveal",".stream-monaco-unchanged-expand",".markstream-inline-fold-proxy",".diff-hidden-lines .center"].join(",")))return;const P=Math.ceil(L.getBoundingClientRect().height||0);P>0&&(ve.value=P)};L.addEventListener("click",C,!0),ze.push({dispose:()=>L.removeEventListener("click",C,!0)})}if(L&&typeof ResizeObserver<"u"){const C=new ResizeObserver(()=>{if(!m.value||(ee(),!eo(L)))return;const S=Xn(L);if(S==null)return;const F=Math.ceil(L.getBoundingClientRect().height||0),P=ve.value;if(Ht(L)&&P!=null){if(F>P+1)ve.value=F;else if(FC.disconnect()})}return}const y=se();try{const h=(v=y?.onDidContentSizeChange)==null?void 0:v.call(y,()=>de());h&&ze.push(h)}catch{}try{const h=(p=y?.onDidLayoutChange)==null?void 0:p.call(y,()=>de());h&&ze.push(h)}catch{}})(),el(),Nt(),he(),lt(),de(),yield j();let d=null;Ke&&(d=yield Ke(),d&&(yield j(),yield Pe()));const u=d??(n==="diff"?yield to({requireHighlight:!0}):yield(function(){return q(this,null,function*(){if(Oe())return yield j(),yield Pe(),Oe();for(let a=0;a<30;a++){if(B||m.value)return!1;const c=f.value,s=Kl(),v=Xl(c),p=!Te.value.trim()||Gn(c);if(s&&v&&p&&(yield j(),yield Pe(),!B&&!m.value&&Kl()&&Xl(f.value)&&(!Te.value.trim()||Gn(f.value))))return!0;yield j(),yield Pe()}return!1})})());B||(u?(Nt(),un(),(yield $l())||je()):je())})}function Ae(e,t={}){if(!ue||B||r.stream===!1&&r.loading!==!1||(sl(),yo())||ge.value||f.value!==e||fn())return null;if($e)return $e;if(Q.value&&W.value)return Promise.resolve();const n=ul(),l=Nn.value;let o=!1;Q.value=!0,(function(){const d=Ge.value;ie&&d&&qe!==d&&(qe&&ie.markSettled(qe),qe=d,ie.markPending(d))})();const i=q(null,null,function*(){try{yield vi(e),zt=null}catch(d){const u=ul(),a=l!==Nn.value,c=t.allowStaleContentRetry!==!1&&a&&zt!==u;if(n!==u||c)return c&&(zt=u),o=!0,Q.value=!1,W.value=!1,Se.value=!1,void(D.value=!1);throw je(n),d}}).finally(()=>{$e===i&&($e=null),(function(){const d=qe;ie&&d&&(qe="",j(()=>{var u,a;if(!B){const c=(a=(u=$.value)==null?void 0:u.offsetHeight)!=null?a:0;c>0&&ie.reportHeight(d,c)}ie.markSettled(d)}))})(),o&&!B&&queueMicrotask(()=>{var d;const u=f.value;u&&!B&&((d=Ae(u))==null||d.catch(a=>{W.value=!1,D.value=!1,je()}))})});return $e=i,i}ae(ui,e=>{e||vt()}),ae(()=>_.value,(e,t)=>{const n=m.value?U():se();n&&typeof e=="number"&&Number.isFinite(e)&&e>0&&(n.updateOptions({fontSize:e}),xe.value||le(!0))},{flush:"post",immediate:!1});let co=0;const mi=ae(()=>[f.value,m.value,r.stream,r.loading,wt.value,Z.value,r.node.language,r.node.raw,r.node.code,r.node.loading],e=>q(null,[e],function*([t,n,l,o,i,d]){const u=++co;if(!t||!d||Ue()||tt||l===!1&&o!==!1||!ue&&(yield(function(){return q(this,null,function*(){if(typeof window>"u"||B||wt.value||ge.value)return;if(Ft)return Ft;const c=q(null,null,function*(){try{const s=yield Ui();if(B)return;if(!s)return void(ge.value=!0);const v=s.useMonaco,p=s.detectLanguage;if(typeof p=="function"&&(gl=p),typeof v!="function")return;He=po();const y=v(He);ue=y.createEditor||ue,Yt=y.createDiffEditor||Yt,En=y.updateCode||En,Qt=y.updateDiff||Qt,kt=y.getEditor||kt,se=y.getEditorView||se,U=y.getDiffEditorView||U,Fn=y.cleanupEditor||Fn,Xe=y.safeClean||y.cleanupEditor||Xe,Pn=y.refreshDiffPresentation||Pn,Ln=y.setTheme||Ln,Ke=y.whenVisualReady||null,wt.value=!0}catch{if(B)return;ge.value=!0}}).finally(()=>{Ft===c&&(Ft=null)});return Ft=c,c})})(),u!==co||r.stream===!1&&r.loading!==!1||fn()||!Z.value||!ue||ge.value||Q.value||yo()||B||f.value!==t)||fn())return;const a=Ae(t);if(a){try{yield a}catch{W.value=!1,D.value=!1,je()}W.value&&D.value&&mi()}}));function fo(e){return!!e&&typeof e=="object"&&"light"in e&&"dark"in e}function rt(e){return typeof e=="string"?e:e&&typeof e=="object"&&"name"in e?String(e.name):null}function vo(e,t){if(e===t)return!0;const n=rt(e),l=rt(t);return!!n&&n===l}function Tt(){var e;const t=(function(){if(r.theme!==void 0){const a=r.theme;return fo(a)?r.isDark?a.dark:a.light:a}return r.isDark?r.darkTheme:r.lightTheme})(),n=(e=re.value)==null?void 0:e.theme,l=t??n;if(l!=null&&typeof l=="object")return l;const o=Array.isArray(r.themes)?r.themes:[];if(!o.length||l==null)return l;const i=rt(l),d=o.map(a=>rt(a)).filter(a=>!!a);if(!i||d.includes(i))return l;const u=rt(n);return n!=null&&u&&d.includes(u)?n:o[0]}function mo(){return q(this,arguments,function*(e={}){at();const t=()=>{m.value&&xt(),fe(()=>{el(),de()})};if(e.appearanceOnly)return void t();const n=Tt();if(n)try{yield Ln(n),t()}catch{}else t()})}function Rt(e,t){if(typeof t!="string")return;const n=hn(t),l=Bo(n),o=["plain","objectivec","objectivecpp"].includes(n)?l:n;for(const i of[o,l])i&&!e.includes(i)&&e.push(i)}ae(Ot,(e,t)=>q(null,null,function*(){if(e===t||me.value||tt||(io(),!ue||!f.value)||!Q.value||r.stream===!1&&r.loading!==!1||!Z.value)return;const n=$e;if(n){try{yield n}catch{}if(B||!f.value)return}if(kl.value!==e||!Q.value||!W.value)try{W.value=!1,D.value=!1,Q.value=!1,Se.value=!1,ot(),Re(),Xe(),yield j(),yield Ae(f.value)}catch{W.value=!1,D.value=!1,je()}}));const pi=k(()=>{var e;const t=[],n=(e=re.value)==null?void 0:e.languages;if(Array.isArray(n))for(const l of n)Rt(t,l);return lo()&&Rt(t,r.node.language),Rt(t,ke.value),Rt(t,Ee.value),Rt(t,"plaintext"),t});function po(){const e=Ce(I(Ce(I({wordWrap:"on",wrappingIndent:"same",themes:r.themes},re.value||{}),{languages:pi.value,stream:!1,fontSize:ln.value,lineHeight:on.value,theme:Tt(),disableFileHeader:!0}),m.value?{diffAppearance:Hn.value}:{}),{onThemeChange(){el()}}),t=(function(){var n;const l=(n=re.value)==null?void 0:n.fontFamily;return typeof l=="string"&&l.trim()?l.trim():m.value?(function(){var o;if(typeof window>"u")return;const i=(o=$.value)==null?void 0:o.querySelector("pre.code-pre-fallback");if(i)return window.getComputedStyle(i).fontFamily.trim()||void 0})():void 0})();if(t&&(e.fontFamily!=null||(e.fontFamily=t)),m.value){e.wordWrap=Dn.value?"on":"off";const n=typeof e.unsafeCSS=="string"?`${e.unsafeCSS} -`:"",l=(function(){var o,i;const d=An.value;if(d===!1||typeof d=="object"&&d.enabled===!1)return null;const u=typeof d=="object"?d:jt,a=Math.max(0,Math.floor((o=u.contextLineCount)!=null?o:2));return{contextLineCount:a,collapsedContextThreshold:a+Math.max(1,Math.floor((i=u.minimumLineCount)!=null?i:4))-1}})();e.unsafeCSS=`${n} -pre { column-gap: 0; } -pre > code { column-gap: 0; padding-block: 0; } -[data-separator="line-info"] { margin-top: 0; } -`,l?(e.parseDiffOptions=Ce(I({},e.parseDiffOptions),{context:l.contextLineCount}),e.collapsedContextThreshold=l.collapsedContextThreshold,e.expandUnchanged=!1,e.hunkSeparators="line-info",e.unsafeCSS+=`[data-separator="line-info"][data-separator-last] { height: 28px; } -`):(e.expandUnchanged=!0,e.hunkSeparators="simple")}return e}function at(){const e=po();if(!He)return He=e,He;for(const t of Object.keys(He))t in e||delete He[t];return Object.assign(He,e),He}const ho=k(()=>{var e,t,n,l,o,i,d,u,a,c,s,v,p,y,h;return JSON.stringify({diffLineStyle:(t=(e=re.value)==null?void 0:e.diffLineStyle)!=null?t:"background",diffUnchangedRegionStyle:(l=(n=re.value)==null?void 0:n.diffUnchangedRegionStyle)!=null?l:"line-info",diffHideUnchangedRegions:((o=r.monacoOptions)==null?void 0:o.diffHideUnchangedRegions)===void 0?I({},jt):gn(r.monacoOptions.diffHideUnchangedRegions),renderSideBySide:(d=(i=re.value)==null?void 0:i.renderSideBySide)==null||d,useInlineViewWhenSpaceIsLimited:(a=(u=re.value)==null?void 0:u.useInlineViewWhenSpaceIsLimited)!=null&&a,enableSplitViewResizing:(s=(c=re.value)==null?void 0:c.enableSplitViewResizing)==null||s,ignoreTrimWhitespace:(p=(v=re.value)==null?void 0:v.ignoreTrimWhitespace)==null||p,originalEditable:(h=(y=re.value)==null?void 0:y.originalEditable)!=null&&h})}),go=O(0);function ul(){var e;const t=Tt();return JSON.stringify({kind:Ot.value,language:Ee.value,structural:ho.value,optionsRevision:go.value,settledContentGeneration:xl.value,theme:(e=rt(t))!=null?e:t==null?null:"custom",isDark:r.isDark})}ae(()=>[r.monacoOptions,r.theme,r.themes,r.lightTheme,r.darkTheme],()=>{go.value+=1},{deep:!0}),ae(()=>[Te.value,r.node.originalCode,r.node.updatedCode],()=>{Nn.value+=1,Ue()||(xl.value+=1)});const ut=k(()=>ul());function sl(){me.value&&et.value!==ut.value&&(me.value=!1,et.value=null,zt=null,Tn=null,Q.value=!1,W.value=!1,Se.value=!1,D.value=!1,$t.value=!1)}function yo(){return sl(),me.value&&et.value===ut.value}function je(e=ut.value){et.value=e,me.value=!0,$t.value=!1}return ae(ut,()=>q(null,null,function*(){if(tt||!me.value||et.value===ut.value||!ue||!f.value||ge.value||B||!Z.value||r.stream===!1&&r.loading!==!1||fn())return;const e=ut.value;tt=!0;try{if(sl(),me.value)return;yield Ae(f.value)}catch{W.value=!1,D.value=!1,je()}finally{Tn=e,yield j(),tt=!1}})),ae(()=>[r.monacoOptions,Z.value],()=>{var e,t;if(at(),!ue||!Z.value)return;const n=m.value?U():se(),l=typeof((e=r.monacoOptions)==null?void 0:e.fontSize)=="number"?r.monacoOptions.fontSize:Number.isFinite(_.value)?_.value:void 0;typeof l=="number"&&Number.isFinite(l)&&l>0&&((t=n?.updateOptions)==null||t.call(n,{fontSize:l})),le(!1)},{deep:!0}),ae(()=>[Tt(),Hn.value,wt.value,Q.value,Z.value],([e],t)=>{wt.value&&W.value&&Z.value&&mo({appearanceOnly:t!=null&&vo(e,t[0])})},{flush:"post"}),ae(()=>[ho.value,wt.value,Z.value],(e,t)=>q(null,[e,t],function*([n,l,o],[i]){if(at(),!l||!o||!ue||!f.value||!Q.value||n===i||r.stream===!1&&r.loading!==!1)return;const d=$e;if(d){try{yield d}catch{}if(B||!f.value)return}try{W.value=!1,D.value=!1,Q.value=!1,Se.value=!1,ot(),Re(),Xe(),yield j(),yield Ae(f.value,{allowStaleContentRetry:!1})}catch{W.value=!1,D.value=!1,je()}}),{flush:"post"}),ae(()=>[r.loading,Z.value],(e,t)=>q(null,[e,t],function*([n,l],o){if(!l)return;const i=o?.[0];if(i===!1&&n!==!1&&m.value&&Q.value&&(yield j(),fe(()=>{q(null,null,function*(){const u=$e;if(u)try{yield u}catch{}!B&&m.value&&r.loading!==!1&&(at(),xt(),de())})})),n)return;const d=i!==void 0&&i!==!1;yield j(),fe(()=>{q(null,null,function*(){var u,a;try{if(d&&(yield(function(){return q(this,null,function*(){if(!me.value||!ue||!f.value||ge.value||B||!Z.value)return!1;if(Tn===ut.value)return!0;tt=!0;try{me.value=!1,et.value=null,zt=null,Q.value=!1,W.value=!1,Se.value=!1,D.value=!1,ot(),Re(),Xe(),yield j();try{yield Ae(f.value)}catch{W.value=!1,D.value=!1,je()}}finally{yield j(),tt=!1}return!0})})()))return void le(!1);if(d&&m.value&&Q.value&&Rn&&f.value)return Rn=!1,W.value=!1,D.value=!1,Q.value=!1,Se.value=!1,ot(),Re(),Xe(),yield j(),yield Ae(f.value,{allowStaleContentRetry:!1}),void it(!0);if(d&&Q.value)if(m.value&&f.value){const c=$e;if(c)try{yield c}catch{}at();const s=Pt(String((u=r.node.originalCode)!=null?u:""),String((a=r.node.updatedCode)!=null?a:""));if(yield no(s.original,s.updated,Ee.value),B||!m.value)return;xt(),ee(!0),Ol(),he(),lt();const v=yield to({requireHighlight:!0});B||!v||D.value||(yield $l()),de(),it(!0)}else io(),ao(Te.value,Ee.value);d&&m.value?(le({preferModelDiffHeight:!0,holdCurrentDiffHeight:!0}),it(!0)):le(!1)}catch{}})})}),{immediate:!0,flush:"post"}),No(()=>{ot(),Re(),Fn(),Xt?.()}),(e,t)=>ge.value?(G(),bn(V(Mo),{key:0,class:mt(["code-pre-fallback",{"is-wrap":Dn.value}]),style:It(Pl.value),node:Ml.value,loading:r.loading,"show-line-numbers":!0,"diff-inline":Ie.value,"diff-hide-unchanged-regions":An.value},null,8,["class","style","node","loading","diff-inline","diff-hide-unchanged-regions"])):(G(),oe("div",{key:1,ref_key:"container",ref:$,style:It(ai.value),class:mt(["code-block-container rounded-lg border",[{dark:r.isDark,"is-rendering":r.loading,"is-dark":bl.value,"is-diff":m.value,"is-plain-text":xn.value}]]),"data-markstream-code-block":"1","data-markstream-enhanced":D.value&&!ge.value?"true":"false","data-markstream-enhancement-state":Uo.value,"data-markstream-code-block-state":Ue()?"streaming":"settled","data-markstream-pending":Io.value?"true":void 0,"data-markstream-viewport-pending":hl.value&&V(Bn)&&!Z.value?"true":void 0},[To(pr,{"show-header":r.showHeader,"show-collapse-button":r.showCollapseButton,"show-font-size-buttons":r.showFontSizeButtons,"enable-font-size-control":r.enableFontSizeControl,"show-copy-button":r.showCopyButton,"show-expand-button":r.showExpandButton,"show-preview-button":r.showPreviewButton,"show-tooltips":r.showTooltips,"is-dark":r.isDark,loading:r.loading,stream:x.stream,"is-collapsed":xe.value,"is-expanded":Fe.value,"copy-text":yt.value,"is-previewable":rl.value,"code-font-size":_.value,"code-font-min":10,"code-font-max":36,"default-code-font-size":pe.value,"font-baseline-ready":Vo.value,"diff-stats":m.value?Ze.value:null,"diff-stats-aria-label":qo.value,onToggleCollapse:ci,onDecreaseFont:ti,onResetFont:ni,onIncreaseFont:ei,onCopy:si,onToggleExpand:di,onPreview:fi},Oi({"header-left":Ut(()=>[pt(e.$slots,"header-left",{},()=>[b("div",xr,[b("span",{class:"icon-slot h-4 w-4 flex-shrink-0",innerHTML:ri.value},null,8,Sr),b("div",Cr,[b("div",Mr,Me(ii.value),1),so.value?(G(),oe("div",Br,Me(so.value),1)):ye("",!0)])])],!0)]),loading:Ut(()=>[pt(e.$slots,"loading",{loading:x.loading,stream:x.stream},()=>[t[0]||(t[0]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))],!0)]),default:Ut(()=>[cl(b("div",{class:mt(["code-editor-layer",{"code-editor-layer--collapsed":xe.value}])},[b("div",{ref_key:"codeEditor",ref:f,class:mt(["code-editor-container",x.stream?"":"code-height-placeholder"]),"data-markstream-host-hidden":_o.value?"true":void 0,style:It(Xo.value)},null,14,Er),Cl.value?(G(),bn(V(Mo),{key:0,class:mt(["code-pre-fallback",{"is-wrap":Dn.value}]),style:It(Pl.value),node:Ml.value,"show-line-numbers":!0,"diff-inline":Ie.value,"diff-hide-unchanged-regions":An.value},null,8,["class","style","node","diff-inline","diff-hide-unchanged-regions"])):ye("",!0)],2),[[fl,!!x.stream||!x.loading]]),en.value&&!Gt.value&&rl.value&&ke.value==="html"?(G(),bn(br,{key:0,code:r.node.code,"html-preview-allow-scripts":r.htmlPreviewAllowScripts,"html-preview-sandbox":r.htmlPreviewSandbox,"is-dark":r.isDark,"on-close":()=>en.value=!1},null,8,["code","html-preview-allow-scripts","html-preview-sandbox","is-dark","on-close"])):ye("",!0)]),_:2},[e.$slots["header-right"]?{name:"header-right",fn:Ut(()=>[pt(e.$slots,"header-right",{},void 0,!0)]),key:"0"}:void 0]),1032,["show-header","show-collapse-button","show-font-size-buttons","enable-font-size-control","show-copy-button","show-expand-button","show-preview-button","show-tooltips","is-dark","loading","stream","is-collapsed","is-expanded","copy-text","is-previewable","code-font-size","default-code-font-size","font-baseline-ready","diff-stats","diff-stats-aria-label"])],14,kr))}}),[["__scopeId","data-v-72200115"]]);export{Lr as default}; diff --git a/apps/pythinker-code/dist-web/assets/CodeBlockNode-BH6HsjxV.js b/apps/pythinker-code/dist-web/assets/CodeBlockNode-Nw5XZ1fO.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/CodeBlockNode-BH6HsjxV.js rename to apps/pythinker-code/dist-web/assets/CodeBlockNode-Nw5XZ1fO.js index 5750d92ae..204b29e1f 100644 --- a/apps/pythinker-code/dist-web/assets/CodeBlockNode-BH6HsjxV.js +++ b/apps/pythinker-code/dist-web/assets/CodeBlockNode-Nw5XZ1fO.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-BhziHZyv.js","assets/index-DIfcwXP7.js","assets/index-DpzVSFci.css"])))=>i.map(i=>d[i]); -import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-DIfcwXP7.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-BhziHZyv.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Dnn6ChPT.js","assets/index-CP4VUG5A.js","assets/index-CcuXuHm6.css"])))=>i.map(i=>d[i]); +import{bR as xi,cb as Si,bQ as zo,M as vl,bl as Ci,af as dl,bY as Mi,cc as Bi,b$ as ml,aU as O,c0 as Ei,c1 as Fi,c2 as Pi,a0 as Co,aD as Ho,bE as ae,az as Li,cd as hn,c8 as vt,aI as No,aL as G,s as bn,aw as It,au as mt,bk as V,ce as Mo,u as oe,I as To,A as Oi,bJ as Ut,aY as pt,bL as cl,v as b,t as ye,bB as fl,bb as Me,q as k,b7 as $i,cf as zi,cg as gn,ch as Hi,ci as Ni,cj as Ti,ck as Ri,as as j,cl as Bo,cm as Di,cn as Ai,co as jt,cp as Eo,bO as Ro,T as ji,G as qi,F as Fo,g as Wi,c7 as _i,b_ as Ii}from"./index-CP4VUG5A.js";import{i as fe,t as yn}from"./safeRaf-DGuzXxDK.js";var wn=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});let Po=!1,qt=null,Wt=null,_t=null;function Ui(){return wn(this,null,function*(){if(_t)return _t;_t=wn(null,null,function*(){if(!Wt)try{if(Wt=(function(x){const M=x;if(typeof M?.useMonaco=="function")return M;const w=x?.default;return typeof w?.useMonaco=="function"?w:null})(yield xi(()=>import("./index-Dnn6ChPT.js"),__vite__mapDeps([0,1,2]))),!Wt)return null}catch{return null}try{return yield(function(x){return wn(this,null,function*(){return Po?void 0:qt||(qt=wn(null,null,function*(){const w=globalThis?.MonacoEnvironment;w&&(typeof w.getWorker=="function"||typeof w.getWorkerUrl=="function")||typeof x?.preloadMonacoWorkers!="function"||(yield x.preloadMonacoWorkers()),Po=!0}).finally(()=>{qt=null}),qt)})})(Wt),Si(),Wt}catch{return null}});try{return yield _t}finally{_t=null}})}var Vi=Object.defineProperty,Gi=Object.defineProperties,Ji=Object.getOwnPropertyDescriptors,Lo=Object.getOwnPropertySymbols,Yi=Object.prototype.hasOwnProperty,Qi=Object.prototype.propertyIsEnumerable,Oo=(x,M,w)=>M in x?Vi(x,M,{enumerable:!0,configurable:!0,writable:!0,value:w}):x[M]=w,I=(x,M)=>{for(var w in M||(M={}))Yi.call(M,w)&&Oo(x,w,M[w]);if(Lo)for(var w of Lo(M))Qi.call(M,w)&&Oo(x,w,M[w]);return x},Ce=(x,M)=>Gi(x,Ji(M)),q=(x,M,w)=>new Promise((te,ne)=>{var we=E=>{try{r(w.next(E))}catch(z){ne(z)}},be=E=>{try{r(w.throw(E))}catch(z){ne(z)}},r=E=>E.done?te(E.value):Promise.resolve(E.value).then(we,be);r((w=w.apply(x,M)).next())});const Xi={key:0,class:"code-block-header flex justify-between items-center border-b px-[var(--ms-inset-panel-x)] py-[var(--ms-inset-panel-y)] border-[var(--code-border)] bg-[var(--code-header-bg)] text-[var(--code-fg)]"},Ki={class:"flex items-center gap-0.5"},Zi=["aria-label"],er={class:"code-diff-stat removed"},tr={class:"code-diff-stat added"},nr=["aria-label"],lr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},or={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},ir=["aria-pressed"],rr={key:3,class:"relative"},ar=["aria-expanded"],ur=["disabled"],sr=["disabled"],dr=["disabled"],cr={key:0,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},fr={key:1,xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},vr={class:"code-loading-placeholder"},mr={class:"sr-only","aria-live":"polite",role:"status"},pr=vl({__name:"CodeBlockShell",props:{showHeader:{type:Boolean,default:!0},showCollapseButton:{type:Boolean,default:!0},showFontSizeButtons:{type:Boolean,default:!0},enableFontSizeControl:{type:Boolean,default:!0},showCopyButton:{type:Boolean,default:!0},showExpandButton:{type:Boolean,default:!0},showPreviewButton:{type:Boolean,default:!0},showTooltips:{type:Boolean,default:!0},isDark:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},stream:{type:Boolean,default:!1},isCollapsed:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1},copyText:{type:Boolean,default:!1},isPreviewable:{type:Boolean,default:!1},codeFontSize:{},codeFontMin:{},codeFontMax:{},defaultCodeFontSize:{},fontBaselineReady:{type:Boolean,default:!1},diffStats:{},diffStatsAriaLabel:{}},emits:["toggleCollapse","decreaseFont","resetFont","increaseFont","copy","toggleExpand","preview"],setup(x,{emit:M}){const w=x,te=M,ne=O(!1),we=O(null),be=O(null);function r(){vt(!0),ne.value=!ne.value,ne.value&&document.addEventListener("click",z,{once:!0,capture:!0})}function E(){vt(!0),ne.value=!1}function z(Y){var f,$;const yt=Y.target;(f=we.value)!=null&&f.contains(yt)||($=be.value)!=null&&$.contains(yt)?document.addEventListener("click",z,{once:!0,capture:!0}):E()}const ie=k(()=>w.showFontSizeButtons&&w.enableFontSizeControl||w.showExpandButton||w.isPreviewable&&w.showPreviewButton),{t:N}=ml(),ht=k(()=>w.showTooltips!==!1);function Ge(Y,f){ht.value&&_i(Y.currentTarget,f,"top",!1,void 0,w.isDark)}function Be(){ht.value&&vt()}function gt(Y){Ge(Y,w.copyText?N("common.copied")||"Copied":N("common.copy")||"Copy")}const pl=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)<=((f=w.codeFontMin)!=null?f:0)}),Vt=k(()=>!w.fontBaselineReady||w.codeFontSize===w.defaultCodeFontSize),Gt=k(()=>{var Y,f;return!!Number.isFinite(w.codeFontSize)&&((Y=w.codeFontSize)!=null?Y:0)>=((f=w.codeFontMax)!=null?f:100)});return(Y,f)=>(G(),oe(Fo,null,[w.showHeader?(G(),oe("div",Xi,[pt(Y.$slots,"header-left"),pt(Y.$slots,"header-right",{},()=>[b("div",Ki,[x.diffStats?(G(),oe("div",{key:0,class:"code-diff-stats","aria-label":x.diffStatsAriaLabel},[b("span",er,"-"+Me(x.diffStats.removed),1),b("span",tr,"+"+Me(x.diffStats.added),1)],8,Zi)):ye("",!0),w.showCopyButton?(G(),oe("button",{key:1,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-label":x.copyText?V(N)("common.copied")||"Copied":V(N)("common.copy")||"Copy",onClick:f[0]||(f[0]=$=>te("copy")),onMouseenter:f[1]||(f[1]=$=>gt($)),onFocus:f[2]||(f[2]=$=>gt($)),onMouseleave:Be,onBlur:Be},[x.copyText?(G(),oe("svg",or,[...f[14]||(f[14]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M20 6L9 17l-5-5"},null,-1)])])):(G(),oe("svg",lr,[...f[13]||(f[13]=[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2"}),b("path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"})],-1)])]))],40,nr)):ye("",!0),w.showCollapseButton?(G(),oe("button",{key:2,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] disabled:opacity-40 disabled:cursor-not-allowed transition-colors","aria-pressed":x.isCollapsed,onClick:f[3]||(f[3]=$=>te("toggleCollapse")),onMouseenter:f[4]||(f[4]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onFocus:f[5]||(f[5]=$=>Ge($,x.isCollapsed?V(N)("common.expand")||"Expand":V(N)("common.collapse")||"Collapse")),onMouseleave:Be,onBlur:Be},[(G(),oe("svg",{style:It({rotate:x.isCollapsed?"0deg":"90deg"}),xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[...f[15]||(f[15]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m9 18l6-6l-6-6"},null,-1)])],4))],40,ir)):ye("",!0),ie.value?(G(),oe("div",rr,[b("button",{ref_key:"moreBtnRef",ref:be,type:"button",class:"code-action-btn inline-flex items-center justify-center p-[var(--ms-action-btn-padding)] rounded leading-none shrink-0 cursor-pointer text-[var(--code-action-fg)] hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] active:scale-[0.96] transition-colors","aria-expanded":ne.value,"aria-haspopup":"true",onClick:Ro(r,["stop"]),onMouseenter:f[6]||(f[6]=$=>Ge($,V(N)("common.more")||"More")),onFocus:f[7]||(f[7]=$=>Ge($,V(N)("common.more")||"More")),onMouseleave:Be,onBlur:Be},[...f[16]||(f[16]=[qi('',1)])],40,ar),To(Wi,{name:"code-menu"},{default:Ut(()=>[ne.value?(G(),oe("div",{key:0,ref_key:"moreMenuRef",ref:we,class:"code-more-menu min-w-[10rem] p-1 bg-[hsl(var(--ms-popover))] text-[hsl(var(--ms-popover-foreground))] border border-[var(--code-border)] shadow-[var(--ms-shadow-popover)]",role:"menu"},[w.showFontSizeButtons&&w.enableFontSizeControl?(G(),oe(Fo,{key:0},[b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:pl.value,onClick:f[8]||(f[8]=$=>{V(vt)(!0),te("decreaseFont")})},[f[17]||(f[17]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14"})],-1)),b("span",null,Me(V(N)("common.fontSmaller")||"Font size −"),1)],8,ur),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Vt.value,onClick:f[9]||(f[9]=$=>{V(vt)(!0),te("resetFont")})},[f[18]||(f[18]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8"}),b("path",{d:"M3 3v5h5"})])],-1)),b("span",null,Me(V(N)("common.fontReset")||"Font size reset"),1)],8,sr),b("button",{type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] disabled:opacity-40 disabled:cursor-not-allowed transition-colors",disabled:Gt.value,onClick:f[10]||(f[10]=$=>{V(vt)(!0),te("increaseFont")})},[f[19]||(f[19]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12h14m-7-7v14"})],-1)),b("span",null,Me(V(N)("common.fontLarger")||"Font size +"),1)],8,dr)],64)):ye("",!0),w.showExpandButton?(G(),oe("button",{key:1,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[11]||(f[11]=$=>{E(),te("toggleExpand")})},[x.isExpanded?(G(),oe("svg",cr,[...f[20]||(f[20]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6"},null,-1)])])):(G(),oe("svg",fr,[...f[21]||(f[21]=[b("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6"},null,-1)])])),b("span",null,Me(x.isExpanded?V(N)("common.collapse")||"Collapse":V(N)("common.expand")||"Expand"),1)])):ye("",!0),x.isPreviewable&&w.showPreviewButton?(G(),oe("button",{key:2,type:"button",role:"menuitem",class:"flex items-center gap-2 w-full py-1.5 px-2 rounded text-xs text-[var(--code-action-fg)] cursor-pointer whitespace-nowrap hover:bg-[var(--code-action-hover-bg)] hover:text-[var(--code-action-hover-fg)] transition-colors",onClick:f[12]||(f[12]=$=>{E(),te("preview")})},[f[22]||(f[22]=b("svg",{xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",width:"1em",height:"1em",viewBox:"0 0 24 24",class:"action-icon"},[b("g",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2"},[b("path",{d:"M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0"}),b("circle",{cx:"12",cy:"12",r:"3"})])],-1)),b("span",null,Me(V(N)("common.preview")||"Preview"),1)])):ye("",!0)],512)):ye("",!0)]),_:1})])):ye("",!0)])])])):ye("",!0),cl(b("div",{class:mt(["code-block-shell-content",{"code-block-shell-content--collapsed":x.isCollapsed}])},[pt(Y.$slots,"default")],2),[[fl,!!x.stream||!x.loading]]),cl(b("div",vr,[pt(Y.$slots,"loading",{},()=>[f[23]||(f[23]=b("div",{class:"loading-skeleton"},[b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line"}),b("div",{class:"skeleton-line short"})],-1))])],512),[[fl,!x.stream&&x.loading]]),b("span",mr,Me(x.copyText?V(N)("common.copied")||"Copied":""),1)],64))}}),hr={class:"html-preview-frame__header"},gr={class:"html-preview-frame__title"},yr={class:"html-preview-frame__label"},wr=["sandbox","srcdoc"],br=zo(vl({__name:"HtmlPreviewFrame",props:{code:{},isDark:{type:Boolean},htmlPreviewAllowScripts:{type:Boolean},htmlPreviewSandbox:{},onClose:{type:Function},title:{}},setup(x){const M=x,w=import.meta!==void 0&&!1;let te=null;const{t:ne}=ml(),we=k(()=>{const E=M.code||"",z=E.trim().toLowerCase();return z.startsWith(" diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-B5fq8RL_.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-B5fq8RL_.js deleted file mode 100644 index 76bd79fb6..000000000 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-B5fq8RL_.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as x,aD as k,aI as C,aL as e,u as d,v as t,G as s,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as B,cz as b,cA as S}from"./index-DIfcwXP7.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},ea={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},da={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},sa={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},va={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ca={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(ya,{emit:y}){const w=y;function p(){w("close")}let c=null;function h(v){v.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;c=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>c.observe(i)),v.length&&v[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),c&&(c.disconnect(),c=null)}),(v,a)=>(e(),d("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=s('

',1)),t("main",A,[t("div",M,[a[44]||(a[44]=s('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",H,[a[7]||(a[7]=s(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#fbfaf9#181817Sidebar surface — one step off --color-bg so the session column reads as its own plane
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
-      "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
-      -apple-system, BlinkMacSystemFont, "Segoe UI",
-      Roboto, Ubuntu, sans-serif,
-      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  • Inter first: self-hosted Latin UI and body text, loaded through the optical-size normal and italic variable faces.
  • Western fallbacks next: Helvetica Neue / Arial for environments where Inter cannot load.
  • CJK and system UI fallbacks late: PingFang SC / Microsoft YaHei / Noto Sans SC, then platform UI fonts and emoji fonts.

--font-mono · Code & monospace

Code, tool names, line numbers, diffs, etc. use JetBrains Mono (a self-hosted variable font), falling back to the system monospace:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
-      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Inter@fontsource-variable/inter/opsz.css + opsz-italic.css✓ self-hostedUI / body / display (--font-ui, --font-display), wght 100-900, opsz 14-32, normal + italic
System UI / CJK fontsoperating systemlate fallback for UI / body, not bundled
Self-hosted Inter / JetBrains Mono: no external network requests, no FOUT, works offline; system fonts are not bundled, consistent with the local-first approach.

Usage rules

  • Components always use var(--font-ui) / var(--font-mono); do not hard-code font names like 'Inter' / 'JetBrains Mono'.
  • Body / UI use --font-ui (Inter first); code / monospace use --font-mono (JetBrains Mono).
  • Inter is loaded from the complete optical-size variable faces, including normal and italic styles; font-optical-sizing: auto is enabled globally.
  • CJK and platform system UI fonts stay late in the --font-ui fallback chain, after Inter and Western fallbacks.

Type scale & weight

The user font-size preference sets data-font-scale on the root element, which the CSS uses to pick --base-font (12 / 14 / 16 / 18px). Compact UI chrome and the sidebar follow it through --ui-font-size, while chat reading surfaces derive one readable step above it through --content-font-size.

The fixed product type tokens still define component defaults: UI controls / buttons / forms use --text-base (14px); reading body — including chat Markdown, message bubbles, etc. stays one step larger than compact chrome for readability; the sidebar session list follows that same readable step while keeping list density. Drop stray font-weight: 650 / 750; converge on two weights, 400 / 500 (regular / emphasis).

Page Title
--text-2xl · 22 / 500
Section Title
--text-xl · 18 / 500
Chat body / card title
--text-lg · 16 / 400
UI control / button / form
--text-base · 14 / 500
Helper text / table
--text-sm · 13 / 400
Badge / timestamp / line number
--text-xs · 12 / 500
TokenValueUsage
--font-ui"Inter Variable", "Inter", "Helvetica Neue", Arial…UI & body (Inter first)
--font-monoJetBrains Mono…code, tool names, line numbers, diffs
--base-font14px (data-font-scale: 12/14/16/18)root setting that drives UI, reading body, and sidebar font sizes
--content-font-sizecalc(base + 1px)chat Markdown, message bubbles, composer
--leading-tight/normal/relaxed1.25 / 1.5 / 1.7headings / UI / long text
--weight-regular/medium400 / 500body / emphasis

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Icons come from Remix Icon (Apache-2.0), uniformly in a fill style (fill="currentColor", 24×24 source grid), with color following the text; size uses the three tokens below. The registry is bundled on demand by unplugin-icons at build time from @iconify-json/ri — only icons imported in lib/icons.ts end up in the production bundle, fully offline and tree-shaken. The whole site uses only this one icon family; do not mix in other icon libraries, and never hand-write SVG paths. When an icon is missing, add it to the registry — two static ~icons/ri/* imports (component + ?raw string) plus one entry in ICONS in lib/icons.ts; the import names (e.g. RiFolderOpenLine / RawFolderOpenLine) show the ri: icon id. Do not draw it in a component.

Size scale

`,43)),t("div",L,[t("div",V,[(e(),d("svg",D,[...a[1]||(a[1]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=o("sm · 14",-1))]),t("div",P,[(e(),d("svg",U,[...a[3]||(a[3]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=o("md · 16",-1))]),t("div",W,[(e(),d("svg",R,[...a[5]||(a[5]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=o("lg · 20",-1))])]),a[8]||(a[8]=t("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=t("p",null,[o("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),t("code",null,"ICON_GROUPS"),o(" in "),t("code",null,"lib/icons.ts"),o(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),t("div",N,[(e(!0),d(f,null,g(T(B),([l,n])=>(e(),d(f,{key:l},[t("div",O,m(l),1),(e(!0),d(f,null,g(n,i=>(e(),d("div",{key:i,class:"icon-cell"},[r(z,{name:i},null,8,["name"]),t("span",E,m(i),1)]))),128))],64))),128))]),a[10]||(a[10]=s('

Do not use emoji as functional icons. The Pythinker robot mascot is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxdropdown panel10/12px →
--radius-xl16pxdialog, bottom Sheet, Composer14/16px →
--radius-2xl20pxaccent container / large panel20px
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu / tooltip
--z-overlay300overlay / bottom Sheet
--z-modal400dialog
--z-toast600toast
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the Braille thinking indicator stops pulsing. Components should not check this individually; it is handled uniformly in the global styles.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',23))]),t("section",j,[a[26]||(a[26]=s(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–4 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
-    // variant: primary | secondary | ghost | danger | danger-soft
-    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with a light-grey hover background and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg).

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedPYTHINKER
With icon / small size
planpassedread-only
Pill · toolbar pill (composer)
kimi-k2· thinkingyolo12k / 200k

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): sunken surface, 1px border with a 2px bottom edge, 11px UI font, muted text. Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row).

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one shell: flat, 1px border, --radius-md radius, no shadow. The structure is split into three parts — head / body / foot. Cards differ only in the head — in two tiers by visual weight, while the shell stays consistent:

  • Operation card —— "process" content such as tool calls, Agent, Todo. The head is compact mono with no fill, low weight by default, not competing with the conversation.
  • Attention card —— content that needs a user decision, such as Question / Approval. The head carries a semantic color band (accent / warning) to stand out from the message stream.
Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the tool group and Agent group.
Attention card · semantic color-band head (accent / warning)
A decision needs your confirmationquestion
The head uses a semantic light background (accent-soft / warning-soft) to stand out from the message stream, signaling that the user must step in. The shell is exactly the same as the operation card.
Group · the container owns the border, rows are separated by hairlines
3 tool calls· completed
read_filesession.ts
grep"jwt" · 4 hits
  • Unified shell: all cards are flat + 1px border + radius-md, casting no shadow.
  • Differences are intentional: only the head distinguishes the type (compact mono vs semantic color band); the shell stays consistent.
  • Grouping: the outer container owns the border and radius; inner rows are separated by border-top hairlines, rather than each row being its own card.
  • Status dots: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-raised background, and a unified blue focus ring (0 0 0 3px accent-soft).

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Inline code, code blocks, and diffs all use the monospace font (--p-font-mono). Code blocks have a filename title bar and a copy button. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
-
-    export function auth(token: string) {
-      return verify(token, process.env.JWT_SECRET!);
-    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise.

Toast
Connected to server
The local daemon is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.

Spinner

Loaders fall into two categories by scenario — do not mix them:

  • Spinner (plain · SVG ring) —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".
  • ThinkingIndicator (Braille mark · brand signature) —— used only for the chat waiting state of "message sent, waiting for the Agent's first response" (the sending placeholder in ChatPane and SideChatPanel).

Spinner · plain loader (default)

`,48)),t("div",F,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",K,[t("div",_,[a[13]||(a[13]=s('Loading…',2)),t("button",G,[(e(),d("svg",J,[...a[11]||(a[11]=[t("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),t("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[12]||(a[12]=o("Submitting",-1))])])])]),a[27]||(a[27]=t("h4",{class:"mini"},'ThinkingIndicator · Braille mark (only "waiting for the Agent")',-1)),t("div",Q,[a[19]||(a[19]=t("div",{class:"stage-bar"},[t("span",{class:"st"},[o("ThinkingIndicator · chat waiting state only "),t("span",{class:"tag spec"},"signature")])],-1)),t("div",Y,[a[17]||(a[17]=t("span",{class:"stage-label"},"Shared mark",-1)),t("div",X,[r(b,{size:"lg"})]),a[18]||(a[18]=t("span",{class:"stage-label"},"Usage · only while the chat waits for a response",-1)),t("div",Z,[t("span",$,[r(b,{size:"sm"}),a[15]||(a[15]=o("Thinking…",-1))]),t("span",aa,[r(b,{size:"sm"}),a[16]||(a[16]=o("Waiting for response…",-1))])])])]),a[28]||(a[28]=s('
i
The Braille cycle is limited to the "waiting for the Agent's first response" scenario. It is rendered by ThinkingIndicator.vue, sized via tokens, and stops animating under prefers-reduced-motion. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Dropdown menu panel: raised surface + border + light shadow (--shadow-sm, flat-leaning). Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. On touch / mobile, use lg (≥44px row height) for menu items.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–4 option switches such as "light / dark / follow system". The current item is highlighted with a raised surface + subtle shadow.

SegmentedControl
LightDarkFollow system

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. 36×20 track with full radius, 16px knob; when on, the track turns accent and the knob slides right, with the transition driven by tokens.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Pythinker

Divider

A 1px horizontal divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.pythinker.com/pythinker-code/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars, and is the sole exception to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',48)),t("div",ta,[a[25]||(a[25]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",ea,[a[24]||(a[24]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",da,[(e(),d("svg",sa,[...a[20]||(a[20]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[21]||(a[21]=o(" pythinker-code-web ",-1))]),t("div",oa,[(e(),d("svg",ia,[...a[22]||(a[22]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[23]||(a[23]=o(" playground ",-1))])])])]),t("section",la,[a[42]||(a[42]=s('
04

Chat Interface Overhaul

The message stream is the core of Pythinker Web. The goal of the overhaul: have the 6 card types (Agent / Tool / Question / Approval / DynamicWorkflow / Todo) share one card skeleton, distinguished only by the head icon and semantic color; and collapse the Composer into a single rounded container.

Unified message stream

',3)),t("div",na,[a[41]||(a[41]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Conversation · 760px reading column")],-1)),t("div",va,[t("div",ca,[a[38]||(a[38]=t("div",{class:"p-bubble-user"},"Please change the login endpoint to JWT and add the corresponding unit tests.",-1)),t("span",ra,[r(b,{size:"sm"}),a[29]||(a[29]=o("Analyzing the auth module…",-1))]),a[39]||(a[39]=s('
3 tool calls· completed · 0.8s
read_filesrc/auth/session.ts0.2s
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
read_filesrc/auth/middleware.ts0.2s
grep"jwt.verify" · 4 matches0.1s

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

',2)),t("div",ba,[t("div",fa,[(e(),d("svg",pa,[...a[30]||(a[30]=[t("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-1-5h2v2h-2zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1a1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.501 3.501 0 1 1 13 13.355"},null,-1)])])),a[31]||(a[31]=t("span",{class:"p-action-title"},"A decision needs your confirmation",-1))]),a[32]||(a[32]=t("div",{class:"p-action-body"},"How long should the JWT expiry be? Default 7 days, refresh token 30 days.",-1)),a[33]||(a[33]=t("div",{class:"p-action-foot"},[t("button",{class:"p-btn secondary sm"},"Customize"),t("button",{class:"p-btn primary sm"},"Use default")],-1))]),t("div",ha,[t("div",ua,[(e(),d("svg",ga,[...a[34]||(a[34]=[t("path",{fill:"currentColor",d:"m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z"},null,-1)])])),a[35]||(a[35]=t("span",{class:"p-action-title"},"Write permission required",-1)),a[36]||(a[36]=t("span",{class:"p-badge warning sm",style:{"margin-left":"auto"}},"write_file",-1))]),a[37]||(a[37]=s('
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
',2))]),a[40]||(a[40]=s('
Replace session with JWT signing
Refactor the auth middleware
Add unit tests
',1))])])]),a[43]||(a[43]=s('

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max). On desktop a wide table may grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane; beyond that the excess scrolls horizontally inside the table's own wrapper — the page and the chat area never scroll sideways. A single column is capped at 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: compact by default, grouped, expand on demand

High-frequency calls like read_file / bash / grep are "operational noise" — if each one took a full card, parallel triggers would quickly drown out the conversation. The new strategy splits tool calls into three tiers by visual weight, pushing them as light as possible:

Three visual-weight tiers
① Tool row · lightest (default)
read_filesrc/auth/session.ts0.2s
② Tool group · medium (consecutive / parallel auto-merged; collapsed to one line)
3 tool calls· completed · 0.8s
③ Decision card · heavy (only question / approval, needs user input)
Write permission requiredwrite_file
About to modify src/auth/middleware.ts, 42 lines changed.
  • Tool calls render as compact rows by default (30px single-line mono + status dot + key argument); no head / body / shadow.
  • Consecutive or parallel calls auto-merge into one tool group; when collapsed, the whole group takes one line (N tool calls · status).
  • Clicking a row expands it in place to show details (code / output); click again to collapse — details don't grab attention by default.
  • Status is expressed with a colored dot: running (pulsing blue) / done (green) / failed (red), taking no extra space.
  • Only two types keep a full card: Question (needs an answer) and Approval (needs authorization) — they genuinely need the user's attention.
Tool Call · compact row (expand on demand)
3 tool calls· completed
read_filesession.ts
12 export function verify(…
read_filemiddleware.ts
grep"jwt" · 4 hits

Composer

Unified into a single rounded container: --radius-xl, with the whole border turning blue + a soft focus ring on focus. Toolbar controls all use the Pill / IconButton primitives, and the send button is a 32px circle.

Composer
Message Pythinker, / to run a command, @ to reference a file…
yoloplan
kimi-k2· thinking
i
Site-wide consistency: the composer has only one radius (--radius-xl · 16px) and one height; toolbar controls all use the Pill / IconButton primitives, and the send button is a 32px circle — it no longer drifts with the theme.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',13))]),a[45]||(a[45]=s(`
05

Theming

Pythinker Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — "reskinning" only changes colors. Colors are collapsed into 4 seed tokens — two theme colors + one light surface + one dark surface; the neutrals and accent are derived from them, and the semantic status colors (success / warning / danger) ship as independent palettes paired with the seeds, one set each for light / dark.

Color seeds

Day-to-day customization only needs these 4 seeds; the whole site's neutrals and accent change with them:

Theme color · primary
--accent-primary
Theme color · secondary
--accent-secondary
Light surface
--surface-light
Dark surface
--surface-dark

Accent families

Within one theme, the theme color (accent) can switch among several color families. Two parallel families are provided today: blue (default, brand blue, carrying semantic emphasis) and black (neutral black, carrying the most restrained strong action). Both share the same components, fonts, radii, and surfaces — switching families only swaps the accent token set, with zero structural change; more families (green / purple, etc.) can be added later. The two cards below show the same primary button under the two families.

Family switch · same primary, different theme color
Blue family · default
accent
--accent #1783ff · soft #e8f3ff
Black family · neutral
accent
--accent #14171c · soft #f1f2f4

Theme console · change 4 colors, light & dark change together

Theme Console
Primary #1783ffSecondary #6b7280Light surface #ffffffDark surface #121212
Light surface previewWhite background + accent button + neutral text
Dark surface previewDark background + same accent + derived text

Light / dark mode

Driven by the two surfaces --surface-light / --surface-dark: whichever surface is current derives the corresponding foreground, border, shadow, and status colors. Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; reskinning only changes 4 color seeds; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient backgroundForbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar is the sole exception)TopBar exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional iconForbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Braille thinking indicator

The Braille mark is a brand signature of Pythinker Web, used only in the chat state of "message sent, waiting for the Agent's first response", and rendered uniformly by the ThinkingIndicator component. All other loading states use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with the sole exception of the .frost variant of TopBar — and only in the one place of the "sticky navigation bar", used to stay readable over scrolling content. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On desktop it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles.

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;
-    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head, so the hairline runs as one line
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel
  • The right panel track exists permanently, with its width transitioning between 0 ↔ var(--preview-w) (when open it squeezes the conversation column, rather than switching templates).
  • The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control differs by platform: on macOS desktop the toggle is a single resident floating IconButton pinned beside the traffic lights (rendered in both states, only the glyph swaps — the sidebar slides underneath it, never moves or flashes); on Windows / web the collapse button lives inside the sidebar header (right-aligned), and a floating expand button appears at the top-left only while collapsed. The conversation header pads left in step with the transition while collapsed.
  • All grid children must have min-height:0; min-width:0, so only the inner scroll containers scroll and the page itself does not scroll.

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat button) share 4 custom properties, so the "session title" aligns precisely under the "workspace name".

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap6pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → New chat → search → grouped list (workspace head + session rows) → settings footer. Controls reuse the §03 primitives as much as possible. The sidebar sits on --color-sidebar-bg (one step off --color-bg: warm off-white in light, near-black in dark — the session column reads as its own plane; the hairline still separates it from the conversation pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the actions group (New chat + search) stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses --color-selected — neutral, never the accent.

BlockUseNote
Brand headerrobot mascot + name + collapse IconButton (right-aligned)on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header. On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)
New chatfull-width left-aligned button (custom)same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)no border, hover/focus shows a sunken background; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). Last fixed row above the list — its wrapper carries the scroll-linked seam
Section label.p-section-labeluppercase muted small titles like "Workspaces"
Workspace head / session rowsee next two sectionsshare --sb-* alignment
Settings footerfull-width left-aligned button (custom)pinned row under the session list, separated by a 1px --line top border; icon + label, same list-style family as New chat
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → kebab.

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover kebab is absolutely positioned so it never forces the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --color-selected — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation; double-click enters inline rename (compact input, not Input)
Timemono xs, fg-faint; yields to the kebab on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
kebabIconButton sm, shown on hover; dropdown uses Menu/MenuItem
Archive confirmationreplaces the title area, Button sm (danger confirm / secondary cancel)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

  • The folder icon leads the row (switching icons between open and closed states) with the plain --sb-gap before the name — it does not pad out the --sb-gutter slot.
  • The name is quiet by design — regular weight, muted color (--color-text-muted, one step lighter than session titles), so group heads read as grouping labels. No path subtitle; hovering the name shows the full root path in a Tooltip.
  • The kebab (menu) and "+" (new chat in this workspace) both use IconButton sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an ::after shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via opacity:0, staying in the tab order).
  • The group is collapsible; when collapsed its session list is hidden.

Show more & collapse

The "load more / show less" control at the bottom of each workspace group is a session-row-shaped compact list control (same family as search, New chat, inline rename — not a Button). It doubles as the pagination trigger and the in-group expand / collapse toggle.

PartRule
Containersession-row pill: display:flex; gap:--sb-gap; padding:8px …, no fixed/min height (font-driven, ≈32px like a session row), same padding as a session row, radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Lead slotempty, --sb-gutter wide, so the label's start x aligns with the session titles (--sb-pad-x + --sb-gutter + --sb-gap)
Labelfont-ui, text-xs, --color-text; flex:1, truncated
Behavior"Load more" fetches the next page and auto-expands; once more than the first page is loaded, "Show less" appears and collapses back to the first page (view-layer trim — data is kept, no refetch); "Show all" re-expands

ResizeHandle

A 4px vertical drag bar, layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable), turning accent on hover / drag.

RuleValue
Width / cursor4px / col-resize
Normal / activetransparent / accent fill
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / thinking / sub-agent / side chat) share one track and one head primitive.

  • The panel head uses the PanelHeader primitive (48px = --panel-head-h), the same height as the conversation column head, so the hairline runs as one line.
  • Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.
  • When opened, the panel width goes from 0 → var(--preview-w), smoothly squeezing the conversation column.
  • At ≤640px the panel becomes a full-screen overlay (position:fixed; inset:0).
i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Pythinker Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

  • Body text vs. background contrast ≥ 4.5:1; control borders, icons, and key graphics ≥ 3:1. When changing theme colors / dark mode, verify against §05 together.
  • Button text vs. button background, and form controls (input, placeholder, helper / error text) vs. their section background must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.
  • State is not conveyed by color alone. Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

  • Every interactive element must have a visible focus indicator on keyboard focus, uniformly via :focus-visible + --p-focus-ring (primary actions may use --p-focus-ring-strong).
  • Bare outline: none is forbidden. To remove the default outline, you must provide an equivalent replacement style.

4. Labels & semantics

  • Semantic HTML first (button / a / input / dialog…); ARIA is added only when native semantics fall short.
  • Icon-only buttons must have an aria-labelIconButton already enforces this with a required label prop.
  • Dialog: role="dialog" + aria-modal="true", with the title as the dialog's accessible name.
  • Purely decorative SVG / icons get aria-hidden="true" to avoid being read out by screen readers.

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The Braille thinking indicator stops pulsing.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
`,4))])])])]))}}),xa=S(ma,[["__scopeId","data-v-b034e5af"]]);export{xa as default}; diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-Bux62PsO.css b/apps/pythinker-code/dist-web/assets/DesignSystemView-Bux62PsO.css deleted file mode 100644 index 10cd8cb8b..000000000 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-Bux62PsO.css +++ /dev/null @@ -1 +0,0 @@ -.ds-page[data-v-b034e5af]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-b034e5af] *,.ds-page[data-v-b034e5af] *:before,.ds-page[data-v-b034e5af] *:after{box-sizing:border-box}.ds-page[data-v-b034e5af]{scroll-behavior:smooth}.ds-page[data-v-b034e5af]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-b034e5af],h2[data-v-b034e5af],h3[data-v-b034e5af],h4[data-v-b034e5af]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-b034e5af]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-b034e5af]{color:var(--d-accent-2);text-decoration:none}a[data-v-b034e5af]:hover{text-decoration:underline}code[data-v-b034e5af],pre[data-v-b034e5af],.mono[data-v-b034e5af]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-b034e5af]{background:var(--d-code-bg);border:1px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-b034e5af]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-b034e5af]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:1px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-b034e5af]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-b034e5af]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-b034e5af]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-b034e5af]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-b034e5af]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-b034e5af]{font-size:12px;font-weight:400;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-b034e5af]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-b034e5af]:hover{background:var(--d-surface-2);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-b034e5af]{background:var(--d-accent-soft);color:var(--d-accent-2)}.nav a.active .num[data-v-b034e5af]{color:var(--d-accent-2)}.content[data-v-b034e5af]{min-width:0}.content-inner[data-v-b034e5af]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-b034e5af]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-b034e5af]{margin-top:72px}.hero[data-v-b034e5af]{padding:8px 0 40px;border-bottom:1px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-b034e5af]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-b034e5af]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-b034e5af]{color:var(--d-accent)}.hero p.lead[data-v-b034e5af]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-b034e5af]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-b034e5af]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:1px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-b034e5af]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-b034e5af]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-b034e5af]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-b034e5af]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-b034e5af]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-b034e5af]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-b034e5af]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-b034e5af]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-b034e5af]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-b034e5af]{background:var(--d-surface);border:1px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-b034e5af]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-b034e5af]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-b034e5af]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-b034e5af]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-b034e5af]{color:var(--d-amber)}.stat.bad[data-v-b034e5af]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-b034e5af]{color:var(--d-red)}.stat.good[data-v-b034e5af]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-b034e5af]{color:var(--d-green)}.panel[data-v-b034e5af]{background:var(--d-bg);border:1px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-b034e5af]{padding:22px}.panel-soft[data-v-b034e5af]{background:var(--d-surface);border:1px solid var(--d-line);border-radius:14px}.callout[data-v-b034e5af]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:1px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-b034e5af]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-b034e5af]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-b034e5af]{background:var(--d-accent);color:#fff}.callout.warn[data-v-b034e5af]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-b034e5af]{background:var(--d-amber);color:#fff}.callout.good[data-v-b034e5af]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-b034e5af]{background:var(--d-green);color:#fff}table.dt[data-v-b034e5af]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-b034e5af]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:1px solid var(--d-line)}table.dt td[data-v-b034e5af]{padding:11px 12px;border-bottom:1px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-b034e5af]{border-bottom:none}table.dt td.tk[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-b034e5af]{display:inline-block;width:16px;height:16px;border-radius:4px;border:1px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-b034e5af]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-b034e5af]{border:1px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-b034e5af]{height:56px;border-bottom:1px solid var(--d-line)}.color-meta[data-v-b034e5af]{padding:10px 12px 12px}.color-meta .cn[data-v-b034e5af]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-b034e5af]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:1px solid var(--d-line-2)}.type-row[data-v-b034e5af]:last-child{border-bottom:none}.type-sample[data-v-b034e5af]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-b034e5af]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-b034e5af]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:1px solid var(--d-line-2)}.space-row[data-v-b034e5af]:last-child{border-bottom:none}.space-bar[data-v-b034e5af]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-b034e5af]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-b034e5af]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-b034e5af]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-b034e5af]{width:64px;height:64px;border:2px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-b034e5af]{border:1px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-b034e5af]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-b034e5af]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-b034e5af]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-b034e5af]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-b034e5af]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-b034e5af]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-b034e5af]{display:flex;gap:6px}.tab[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-b034e5af]{background:var(--d-bg);color:var(--d-fg);border:1px solid var(--d-line)}.stage[data-v-b034e5af]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-b034e5af]{flex-direction:column;align-items:stretch}.stage.dark[data-v-b034e5af]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#121212}.stage-label[data-v-b034e5af]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-b034e5af]{color:#6b7280}.ba[data-v-b034e5af]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:1px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-b034e5af]{min-width:0}.ba-col+.ba-col[data-v-b034e5af]{border-left:1px solid var(--d-line)}.ba-head[data-v-b034e5af]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:1px solid var(--d-line)}.ba-head.before[data-v-b034e5af]{background:var(--d-red-soft)}.ba-head.after[data-v-b034e5af]{background:var(--d-green-soft)}.ba-head .bh[data-v-b034e5af]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-b034e5af]{color:var(--d-red)}.ba-head.after .bh[data-v-b034e5af]{color:var(--d-green)}.ba-head .bh small[data-v-b034e5af]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-b034e5af]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-b034e5af]{background:#fff}.code[data-v-b034e5af]{background:#121212;border-radius:12px;overflow:hidden;margin:16px 0;border:1px solid #121212}.code-bar[data-v-b034e5af]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#1f1f1f;border-bottom:1px solid #1f1f1f}.code-bar .d[data-v-b034e5af]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-b034e5af]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-b034e5af]{color:#8b949e}.code .k[data-v-b034e5af]{color:#ff7b72}.code .s[data-v-b034e5af]{color:#a5d6ff}.code .p[data-v-b034e5af]{color:#79c0ff}.code .n[data-v-b034e5af]{color:#d2a8ff}.code .v[data-v-b034e5af]{color:#ffa657}.pill[data-v-b034e5af]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:1px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-b034e5af]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-b034e5af]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-b034e5af]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-b034e5af]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-b034e5af]{font-family:JetBrains Mono,monospace}ul.clean[data-v-b034e5af]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-b034e5af]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:1px solid var(--d-line-2)}ul.clean li[data-v-b034e5af]:last-child{border-bottom:none}ul.clean li[data-v-b034e5af]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-b034e5af]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-b034e5af]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-b034e5af]{color:var(--d-fg)}ul.clean li .path[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-b034e5af]{position:relative;margin:24px 0}.phase[data-v-b034e5af]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-b034e5af]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-b034e5af]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-b034e5af]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:1px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-b034e5af]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-b034e5af]{background:var(--d-bg);border:1px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-b034e5af]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-b034e5af]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-b034e5af]{margin:0}.matrix[data-v-b034e5af]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-b034e5af]{border:1px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-b034e5af]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-b034e5af]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-b034e5af]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-b034e5af]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-b034e5af]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-b034e5af]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-b034e5af]{margin-top:80px;padding-top:28px;border-top:1px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-b034e5af]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:1px solid var(--d-line);border-bottom-width:2px;border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-b034e5af]{grid-template-columns:1fr}.sidebar[data-v-b034e5af]{position:static;height:auto}.nav[data-v-b034e5af]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-b034e5af]{padding:40px 22px 80px}.stat-grid[data-v-b034e5af]{grid-template-columns:repeat(2,1fr)}.ba[data-v-b034e5af]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-b034e5af]{border-left:none;border-top:1px solid var(--d-line)}.palette[data-v-b034e5af]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-b034e5af]{grid-template-columns:1fr}}.ds-page .p[data-v-b034e5af],.ds-page .stage.p-skin[data-v-b034e5af],.ds-page [data-p][data-v-b034e5af]{--p-font-sans: var(--font-ui);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-sunken: var(--color-surface-sunken);--p-text: var(--color-text);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-2xl: var(--radius-2xl);--p-r-full: var(--radius-full);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-md: var(--shadow-md);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}.ds-page [data-p=dark][data-v-b034e5af]{--p-bg: #121212;--p-surface: #1f1f1f;--p-surface-raised: #292929;--p-surface-sunken: #121212;--p-text: #c9cdd4;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-text-on-accent: #ffffff;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-b034e5af]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-b034e5af]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:1px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-b034e5af]:active{transform:scale(.98)}.p-btn[data-v-b034e5af]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-b034e5af]{width:16px;height:16px}.p-btn.sm[data-v-b034e5af]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-b034e5af]{width:14px;height:14px}.p-btn.lg[data-v-b034e5af]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-b034e5af]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-b034e5af]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-b034e5af]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-b034e5af]:hover{background:var(--p-surface-sunken);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-b034e5af]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-b034e5af]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-btn.danger[data-v-b034e5af]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-b034e5af]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-b034e5af]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-b034e5af]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-b034e5af],.p-btn.disabled[data-v-b034e5af]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-b034e5af]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:1px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-b034e5af]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-icon-btn[data-v-b034e5af]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-b034e5af]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-b034e5af]{--_s: 44px}.p-icon-btn .p-ic[data-v-b034e5af]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-b034e5af]{width:20px;height:20px}.p-badge[data-v-b034e5af]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:1px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-b034e5af]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-b034e5af]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-b034e5af]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-b034e5af]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-b034e5af]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-b034e5af]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-b034e5af]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-b034e5af]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-b034e5af]{width:12px;height:12px}.p-kbd[data-v-b034e5af]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-b034e5af]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--p-line);border-bottom-width:2px;border-radius:var(--p-r-xs);background:var(--p-surface-sunken);color:var(--p-text-muted);font-family:var(--p-font-sans);font-size:11px;line-height:1}.p-pill[data-v-b034e5af]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:var(--p-r-md);border:1px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-b034e5af]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-pill .pp-strong[data-v-b034e5af]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-b034e5af]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-b034e5af]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-b034e5af]{background:var(--p-surface);border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-b034e5af]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-b034e5af]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-b034e5af]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:1px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-b034e5af]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-b034e5af]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-b034e5af]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-b034e5af]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-b034e5af]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-b034e5af],.p-select[data-v-b034e5af],.p-textarea[data-v-b034e5af]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:1px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-b034e5af]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-input[data-v-b034e5af]:hover,.p-select[data-v-b034e5af]:hover,.p-textarea[data-v-b034e5af]:hover{border-color:var(--p-line-strong)}.p-input[data-v-b034e5af]:focus,.p-select[data-v-b034e5af]:focus,.p-textarea[data-v-b034e5af]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-b034e5af]::placeholder,.p-textarea[data-v-b034e5af]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-b034e5af]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-b034e5af]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-b034e5af]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-b034e5af]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-b034e5af]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-b034e5af]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-b034e5af]{padding:4px 22px 18px}.p-dialog-foot[data-v-b034e5af]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-b034e5af]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-b034e5af]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-b034e5af]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-b034e5af]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-b034e5af]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-b034e5af]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-spinner[data-v-b034e5af]{width:18px;height:18px;animation:p-spin-b034e5af .85s linear infinite}.p-spinner.sm[data-v-b034e5af]{width:14px;height:14px}.p-spinner circle[data-v-b034e5af]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-b034e5af]{stroke:var(--p-line)}.p-spinner .arc[data-v-b034e5af]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-b034e5af{to{transform:rotate(360deg)}}.p-thinking[data-v-b034e5af]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-b034e5af]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--p-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-b034e5af]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-b034e5af]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-b034e5af]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:1px solid var(--p-line);color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-agent[data-v-b034e5af]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden}.p-agent-head[data-v-b034e5af]{display:flex;align-items:center;gap:10px;padding:11px 14px}.p-agent-av[data-v-b034e5af]{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:var(--p-surface-sunken);border:1px solid var(--p-line);color:var(--p-text-muted);flex:none}.p-agent-name[data-v-b034e5af]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-agent-phase[data-v-b034e5af]{font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-agent-body[data-v-b034e5af]{padding:0 14px 13px}.p-tool[data-v-b034e5af]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden}.p-tool-head[data-v-b034e5af]{display:flex;align-items:center;gap:9px;padding:9px 13px;background:var(--p-surface);border-bottom:1px solid var(--p-line)}.p-tool-ic[data-v-b034e5af]{width:18px;height:18px;border-radius:5px;display:grid;place-items:center;background:var(--p-accent-soft);color:var(--p-accent);flex:none}.p-tool-name[data-v-b034e5af]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-tool-body[data-v-b034e5af]{padding:12px 13px}.p-code[data-v-b034e5af]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:1px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-b034e5af]{border-radius:var(--p-r-md);overflow:hidden;border:1px solid var(--p-accent-bd);background:var(--p-surface)}.p-action.warn[data-v-b034e5af]{border-color:var(--p-warning-bd)}.p-action-head[data-v-b034e5af]{display:flex;align-items:center;gap:9px;padding:10px 14px;background:var(--p-accent-soft);border-bottom:1px solid var(--p-accent-bd)}.p-action.warn .p-action-head[data-v-b034e5af]{background:var(--p-warning-soft);border-bottom-color:var(--p-warning-bd)}.p-action-title[data-v-b034e5af]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-accent-hover)}.p-action.warn .p-action-title[data-v-b034e5af]{color:var(--p-warning)}.p-action-body[data-v-b034e5af]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-b034e5af]{display:flex;justify-content:flex-end;gap:8px;padding:11px 14px;border-top:1px solid var(--p-line);background:var(--p-surface)}.p-todo[data-v-b034e5af]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-b034e5af]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-b034e5af]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-b034e5af]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-b034e5af]{width:16px;flex:none;font-size:var(--p-font-size-base);line-height:1;text-align:center;user-select:none;color:var(--p-text-faint)}.p-todo-row.done .p-todo-check[data-v-b034e5af]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-b034e5af]{color:var(--p-accent);font-weight:500}.p-dot[data-v-b034e5af]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-b034e5af]{background:var(--p-success)}.p-dot.error[data-v-b034e5af]{background:var(--p-danger)}.p-dot.running[data-v-b034e5af]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-b034e5af 1.4s ease-out infinite}@keyframes p-pulse-b034e5af{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-b034e5af]{border:1px solid var(--p-line);border-radius:var(--p-r-md);background:var(--p-surface);overflow:hidden}.p-tool-group-head[data-v-b034e5af]{display:flex;align-items:center;gap:8px;height:32px;padding:0 11px;cursor:pointer;font-size:var(--p-font-size-sm);color:var(--p-text-muted);user-select:none}.p-tool-group-head[data-v-b034e5af]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-tool-group-head .tg-title[data-v-b034e5af]{font-weight:600;color:var(--p-text)}.p-tool-group-head .tg-meta[data-v-b034e5af]{color:var(--p-text-faint)}.p-tool-group-head .tg-car[data-v-b034e5af]{margin-left:auto;width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-b034e5af]{transform:rotate(90deg)}.p-tool-row[data-v-b034e5af]{display:flex;align-items:center;gap:8px;height:30px;padding:0 11px;border-top:1px solid var(--p-line-2, var(--p-line));cursor:pointer;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-tool-row[data-v-b034e5af]:hover{background:var(--p-surface-sunken)}.p-tool-row .tr-ic[data-v-b034e5af]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-b034e5af]{font-weight:600;color:var(--p-text);flex:none}.p-tool-row .tr-arg[data-v-b034e5af]{color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-time[data-v-b034e5af]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-b034e5af]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-tool-row.expanded[data-v-b034e5af]{background:var(--p-surface-sunken)}.p-tool-row.expanded .tr-car[data-v-b034e5af]{transform:rotate(90deg)}.p-tool-detail[data-v-b034e5af]{padding:0 11px 11px;background:var(--p-surface-sunken);border-top:1px solid var(--p-line)}.p-tool-detail .p-code[data-v-b034e5af]{margin-top:10px}.p-composer[data-v-b034e5af]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-md);overflow:hidden}.p-composer[data-v-b034e5af]:focus-within{border-color:var(--p-accent);box-shadow:var(--p-sh-md),0 0 0 3px var(--p-accent-soft)}.p-composer-ta[data-v-b034e5af]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal)}.p-composer-ta.ph[data-v-b034e5af]{color:var(--p-text-faint)}.p-composer-bar[data-v-b034e5af]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px 8px}.p-composer-left[data-v-b034e5af],.p-composer-right[data-v-b034e5af]{display:flex;align-items:center;gap:2px}.p-send[data-v-b034e5af]{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--p-accent);color:var(--p-text-on-accent);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease),background var(--p-dur) var(--p-ease)}.p-send[data-v-b034e5af]:hover{background:var(--p-accent-hover)}.p-send[data-v-b034e5af]:active{transform:scale(.92)}.p-send .p-ic[data-v-b034e5af]{width:16px;height:16px}.p[data-v-b034e5af] ::selection,[data-p][data-v-b034e5af] ::selection{background:var(--p-selection)}.p-link[data-v-b034e5af]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-b034e5af]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-b034e5af]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-b034e5af]{color:var(--p-text-muted)}.p-link.muted[data-v-b034e5af]:hover{color:var(--p-text)}.p-link .p-ic[data-v-b034e5af]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-b034e5af]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:var(--p-sp-1);min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-b034e5af]{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-b034e5af]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-menu-item.active[data-v-b034e5af],.p-menu-item.active[data-v-b034e5af]:hover{background:var(--p-accent-soft);color:var(--p-accent-hover)}.p-menu-item.danger[data-v-b034e5af]{color:var(--p-danger)}.p-menu-item.danger[data-v-b034e5af]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-b034e5af]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-b034e5af]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-b034e5af]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-menu-item.lg[data-v-b034e5af]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-base)}.p-menu-sep[data-v-b034e5af]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-b034e5af]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:1px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-b034e5af]{padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-b034e5af]:hover{color:var(--p-text)}.p-seg-item.on[data-v-b034e5af]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-xs)}.p-tabs[data-v-b034e5af]{display:flex;align-items:center;gap:0;border-bottom:1px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-b034e5af]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-b034e5af]:hover{color:var(--p-text)}.p-tab.on[data-v-b034e5af]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-b034e5af]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-b034e5af]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--surface-light);box-shadow:var(--p-sh-xs);transition:transform var(--p-dur) var(--p-ease)}.p-switch.on[data-v-b034e5af]{background:var(--p-accent)}.p-switch.on[data-v-b034e5af]:after{background:var(--p-text-on-accent);transform:translate(16px)}.p-switch[data-v-b034e5af]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-b034e5af]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:1.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-b034e5af]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-b034e5af]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-b034e5af]{width:12px;height:12px}.p-avatar[data-v-b034e5af]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:1px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-b034e5af]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-b034e5af]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-b034e5af]{width:13px;height:13px}.p-empty[data-v-b034e5af]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-b034e5af]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-b034e5af]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-b034e5af]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-b034e5af]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-b034e5af]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-tip[data-v-b034e5af]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-b034e5af]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-b034e5af]{opacity:1}.p-banner[data-v-b034e5af]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:1px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-b034e5af]{width:18px;height:18px;flex:none}.p-banner.info[data-v-b034e5af]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-b034e5af]{color:var(--p-accent)}.p-banner.warning[data-v-b034e5af]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-b034e5af]{color:var(--p-warning)}.p-banner.danger[data-v-b034e5af]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-b034e5af]{color:var(--p-danger)}.p-sheet[data-v-b034e5af]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-b034e5af]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-b034e5af]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-b034e5af 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-b034e5af{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-b034e5af]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-b034e5af]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:1px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-b034e5af]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-b034e5af]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-b034e5af]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-b034e5af]{width:15px;height:15px}.p-topbar[data-v-b034e5af]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-b034e5af]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-b034e5af]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-b034e5af]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-b034e5af]{background:#161b22b8;border-color:#ffffff14}.demo-family-black[data-v-b034e5af]{--p-accent: #14171c;--p-accent-hover: #2f3540;--p-accent-soft: #f1f2f4;--p-accent-bd: #d8dbe0;--p-text-on-accent: #ffffff}.demo-row[data-v-b034e5af]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-b034e5af]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-b034e5af]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-b034e5af]{flex:1;min-width:0}.demo-chat[data-v-b034e5af]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-b034e5af]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-b034e5af]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-b034e5af]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .ui-icon[data-v-b034e5af]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-b034e5af]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-b034e5af]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-b034e5af]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-b034e5af]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-b034e5af]{border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-b034e5af]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:1px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-b034e5af]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-b034e5af]{border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-b034e5af]{padding:8px 12px;background:var(--p-surface);border-bottom:1px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-b034e5af]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-b034e5af]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-b034e5af]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-b034e5af]{color:var(--p-success)}.p-diff-row.del[data-v-b034e5af]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-b034e5af]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-b034e5af]{color:var(--p-text)}.p-field-error[data-v-b034e5af]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-b034e5af]{vertical-align:middle}.p-btn .p-spinner .track[data-v-b034e5af]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-b034e5af]{stroke:currentColor}.ds-page[data-v-b034e5af]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-b034e5af]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:1px solid var(--color-line)}.ds-back[data-v-b034e5af]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-b034e5af]:hover{background:var(--color-surface-sunken)}.ds-topbar-title[data-v-b034e5af]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-CjvpPwwK.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-CjvpPwwK.js new file mode 100644 index 000000000..df204bc4f --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-CjvpPwwK.js @@ -0,0 +1,13 @@ +import{M as x,aD as k,aI as C,aL as t,u as f,v as d,G as s,H as e,F as b,aX as g,bb as m,I as v,cx as z,bk as T,cy as S,cz as r,cA as B}from"./index-CP4VUG5A.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},da={class:"stage-wrap"},ta={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},fa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},sa={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ea={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},oa={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},ia={id:"chat"},la={class:"stage-wrap"},na={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ca={class:"demo-chat"},va={class:"p-thinking"},ra={class:"p-action"},ba={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(ya,{emit:y}){const w=y;function p(){w("close")}let c=null;function h(n){n.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const n=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;n.forEach(l=>{const o=l.getAttribute("href");if(!o)return;const u=document.getElementById(o.slice(1));u&&a.set(u,l)});let i=null;c=new IntersectionObserver(l=>{l.forEach(o=>{o.isIntersecting&&(i&&i.classList.remove("active"),i=a.get(o.target)??null,i&&i.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((l,o)=>c.observe(o)),n.length&&n[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),c&&(c.disconnect(),c=null)}),(n,a)=>(t(),f("div",q,[d("div",{class:"ds-topbar"},[d("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=d("span",{class:"ds-topbar-title"},"Design system",-1))]),d("div",I,[a[46]||(a[46]=s('',1)),d("main",A,[d("div",M,[a[44]||(a[44]=s('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),d("section",H,[a[7]||(a[7]=s(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#e9eaf2#2c343aSidebar solid composite (row masks / overlays). The visible sidebar surface is the frost pair --color-sidebar-glass + --sidebar-wash blurred by --p-sidebar-backdrop
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
+      "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
+      -apple-system, BlinkMacSystemFont, "Segoe UI",
+      Roboto, Ubuntu, sans-serif,
+      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  • Inter first: self-hosted Latin UI and body text, loaded through the optical-size normal and italic variable faces.
  • Western fallbacks next: Helvetica Neue / Arial for environments where Inter cannot load.
  • CJK and system UI fallbacks late: PingFang SC / Microsoft YaHei / Noto Sans SC, then platform UI fonts and emoji fonts.

--font-mono · Code & monospace

Code, tool names, line numbers, diffs, etc. use JetBrains Mono (a self-hosted variable font), falling back to the system monospace:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
+      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Inter@fontsource-variable/inter/opsz.css + opsz-italic.css✓ self-hostedUI / body / display (--font-ui, --font-display), wght 100-900, opsz 14-32, normal + italic
System UI / CJK fontsoperating systemlate fallback for UI / body, not bundled
Self-hosted Inter / JetBrains Mono: no external network requests, no FOUT, works offline; system fonts are not bundled, consistent with the local-first approach.

Usage rules

  • Components always use var(--font-ui) / var(--font-mono); do not hard-code font names like 'Inter' / 'JetBrains Mono'.
  • Body / UI use --font-ui (Inter first); code / monospace use --font-mono (JetBrains Mono).
  • Inter is loaded from the complete optical-size variable faces, including normal and italic styles; font-optical-sizing: auto is enabled globally.
  • CJK and platform system UI fonts stay late in the --font-ui fallback chain, after Inter and Western fallbacks.

Type scale & weight

The user font-size preference sets data-font-scale on the root element, which the CSS uses to pick --base-font (12 / 14 / 16 / 18px). Compact UI chrome and the sidebar follow it through --ui-font-size, while chat reading surfaces derive one readable step above it through --content-font-size.

The fixed product type tokens still define component defaults: UI controls / buttons / forms use --text-base (14px); reading body — including chat Markdown, message bubbles, etc. stays one step larger than compact chrome for readability; the sidebar session list follows that same readable step while keeping list density. Drop stray font-weight: 650 / 750; converge on two weights, 400 / 500 (regular / emphasis).

Page Title
--text-2xl · 22 / 500
Section Title
--text-xl · 18 / 500
Chat body / card title
--text-lg · 16 / 400
UI control / button / form
--text-base · 14 / 500
Helper text / table
--text-sm · 13 / 400
Badge / timestamp / line number
--text-xs · 12 / 500
TokenValueUsage
--font-ui"Inter Variable", "Inter", "Helvetica Neue", Arial…UI & body (Inter first)
--font-monoJetBrains Mono…code, tool names, line numbers, diffs
--base-font14px (data-font-scale: 12/14/16/18)root setting that drives UI, reading body, and sidebar font sizes
--content-font-sizecalc(base + 1px)chat Markdown, message bubbles, composer
--leading-tight/normal/relaxed1.25 / 1.5 / 1.7headings / UI / long text
--weight-regular/medium400 / 500body / emphasis

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Icons come from Remix Icon (Apache-2.0), uniformly in a fill style (fill="currentColor", 24×24 source grid), with color following the text; size uses the three tokens below. The registry is bundled on demand by unplugin-icons at build time from @iconify-json/ri — only icons imported in lib/icons.ts end up in the production bundle, fully offline and tree-shaken. The whole site uses only this one icon family; do not mix in other icon libraries, and never hand-write SVG paths. When an icon is missing, add it to the registry — two static ~icons/ri/* imports (component + ?raw string) plus one entry in ICONS in lib/icons.ts; the import names (e.g. RiFolderOpenLine / RawFolderOpenLine) show the ri: icon id. Do not draw it in a component.

Size scale

`,43)),d("div",L,[d("div",V,[(t(),f("svg",D,[...a[1]||(a[1]=[d("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=e("sm · 14",-1))]),d("div",P,[(t(),f("svg",U,[...a[3]||(a[3]=[d("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=e("md · 16",-1))]),d("div",W,[(t(),f("svg",R,[...a[5]||(a[5]=[d("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=e("lg · 20",-1))])]),a[8]||(a[8]=d("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=d("p",null,[e("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),d("code",null,"ICON_GROUPS"),e(" in "),d("code",null,"lib/icons.ts"),e(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),d("div",N,[(t(!0),f(b,null,g(T(S),([i,l])=>(t(),f(b,{key:i},[d("div",O,m(i),1),(t(!0),f(b,null,g(l,o=>(t(),f("div",{key:o,class:"icon-cell"},[v(z,{name:o},null,8,["name"]),d("span",E,m(o),1)]))),128))],64))),128))]),a[10]||(a[10]=s('

Do not use emoji as functional icons. The Pythinker robot mascot is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxdropdown panel10/12px →
--radius-xl16pxdialog, bottom Sheet, Composer14/16px →
--radius-2xl20pxaccent container / large panel20px
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu / tooltip
--z-overlay300overlay / bottom Sheet
--z-modal400dialog
--z-toast600toast
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the Braille thinking indicator stops pulsing. Components should not check this individually; it is handled uniformly in the global styles.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',23))]),d("section",j,[a[26]||(a[26]=s(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–4 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
+    // variant: primary | secondary | ghost | danger | danger-soft
+    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with a light-grey hover background and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg).

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedPYTHINKER
With icon / small size
planpassedread-only
Pill · toolbar pill (composer)
kimi-k2· thinkingyolo12k / 200k

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): sunken surface, 1px border with a 2px bottom edge, 11px UI font, muted text. Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row).

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one shell: flat, 1px border, --radius-md radius, no shadow. The structure is split into three parts — head / body / foot. Cards differ only in the head — in two tiers by visual weight, while the shell stays consistent:

  • Operation card —— "process" content such as tool calls, Agent, Todo. The head is compact mono with no fill, low weight by default, not competing with the conversation.
  • Attention card —— content that needs a user decision, such as Question / Approval. The head carries a semantic color band (accent / warning) to stand out from the message stream.
Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the tool group and Agent group.
Attention card · semantic color-band head (accent / warning)
A decision needs your confirmationquestion
The head uses a semantic light background (accent-soft / warning-soft) to stand out from the message stream, signaling that the user must step in. The shell is exactly the same as the operation card.
Group · the container owns the border, rows are separated by hairlines
3 tool calls· completed
read_filesession.ts
grep"jwt" · 4 hits
  • Unified shell: all cards are flat + 1px border + radius-md, casting no shadow.
  • Differences are intentional: only the head distinguishes the type (compact mono vs semantic color band); the shell stays consistent.
  • Grouping: the outer container owns the border and radius; inner rows are separated by border-top hairlines, rather than each row being its own card.
  • Status dots: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-raised background, and a unified blue focus ring (0 0 0 3px accent-soft).

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Inline code, code blocks, and diffs all use the monospace font (--p-font-mono). Code blocks have a filename title bar and a copy button. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
+
+    export function auth(token: string) {
+      return verify(token, process.env.JWT_SECRET!);
+    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise.

Toast
Connected to server
The local daemon is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.

Spinner

Loaders fall into two categories by scenario — do not mix them:

  • Spinner (plain · SVG ring) —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".
  • ThinkingIndicator (Braille mark · brand signature) —— used only for the chat waiting state of "message sent, waiting for the Agent's first response" (the sending placeholder in ChatPane and SideChatPanel).

Spinner · plain loader (default)

`,48)),d("div",F,[a[14]||(a[14]=d("div",{class:"stage-bar"},[d("span",{class:"st"},"Spinner · common scenarios")],-1)),d("div",K,[d("div",_,[a[13]||(a[13]=s('Loading…',2)),d("button",G,[(t(),f("svg",J,[...a[11]||(a[11]=[d("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),d("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[12]||(a[12]=e("Submitting",-1))])])])]),a[27]||(a[27]=d("h4",{class:"mini"},'ThinkingIndicator · Braille mark (only "waiting for the Agent")',-1)),d("div",Q,[a[19]||(a[19]=d("div",{class:"stage-bar"},[d("span",{class:"st"},[e("ThinkingIndicator · chat waiting state only "),d("span",{class:"tag spec"},"signature")])],-1)),d("div",Y,[a[17]||(a[17]=d("span",{class:"stage-label"},"Shared mark",-1)),d("div",X,[v(r,{size:"lg"})]),a[18]||(a[18]=d("span",{class:"stage-label"},"Usage · only while the chat waits for a response",-1)),d("div",Z,[d("span",$,[v(r,{size:"sm"}),a[15]||(a[15]=e("Thinking…",-1))]),d("span",aa,[v(r,{size:"sm"}),a[16]||(a[16]=e("Waiting for response…",-1))])])])]),a[28]||(a[28]=s('
i
The Braille cycle is limited to the "waiting for the Agent's first response" scenario. It is rendered by ThinkingIndicator.vue, sized via tokens, and stops animating under prefers-reduced-motion. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Dropdown menu panel: raised surface + border + light shadow (--shadow-sm, flat-leaning). Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. On touch / mobile, use lg (≥44px row height) for menu items.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–4 option switches such as "light / dark / follow system". The current item is highlighted with a raised surface + subtle shadow.

SegmentedControl
LightDarkFollow system

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. 36×20 track with full radius, 16px knob; when on, the track turns accent and the knob slides right, with the transition driven by tokens.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Pythinker

Divider

A 1px horizontal divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.pythinker.com/pythinker-code/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars, and — together with the Sidebar frost layer (see §05/§06) — is a sanctioned exception to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',48)),d("div",da,[a[25]||(a[25]=d("div",{class:"stage-bar"},[d("span",{class:"st"},"Sidebar · group title")],-1)),d("div",ta,[a[24]||(a[24]=d("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),d("div",fa,[(t(),f("svg",sa,[...a[20]||(a[20]=[d("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[21]||(a[21]=e(" pythinker-code-web ",-1))]),d("div",ea,[(t(),f("svg",oa,[...a[22]||(a[22]=[d("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[23]||(a[23]=e(" playground ",-1))])])])]),d("section",ia,[a[42]||(a[42]=s('
04

Chat Interface Overhaul

The message stream is the core of Pythinker Web. The goal of the overhaul: have the 6 card types (Agent / Tool / Question / Approval / DynamicWorkflow / Todo) share one card skeleton, distinguished only by the head icon and semantic color; and collapse the Composer into a single rounded container.

Unified message stream

',3)),d("div",la,[a[41]||(a[41]=d("div",{class:"stage-bar"},[d("span",{class:"st"},"Conversation · 760px reading column")],-1)),d("div",na,[d("div",ca,[a[38]||(a[38]=d("div",{class:"p-bubble-user"},"Please change the login endpoint to JWT and add the corresponding unit tests.",-1)),d("span",va,[v(r,{size:"sm"}),a[29]||(a[29]=e("Analyzing the auth module…",-1))]),a[39]||(a[39]=s('
3 tool calls· completed · 0.8s
read_filesrc/auth/session.ts0.2s
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
read_filesrc/auth/middleware.ts0.2s
grep"jwt.verify" · 4 matches0.1s

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

',2)),d("div",ra,[d("div",ba,[(t(),f("svg",pa,[...a[30]||(a[30]=[d("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-1-5h2v2h-2zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1a1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.501 3.501 0 1 1 13 13.355"},null,-1)])])),a[31]||(a[31]=d("span",{class:"p-action-title"},"A decision needs your confirmation",-1))]),a[32]||(a[32]=d("div",{class:"p-action-body"},"How long should the JWT expiry be? Default 7 days, refresh token 30 days.",-1)),a[33]||(a[33]=d("div",{class:"p-action-foot"},[d("button",{class:"p-btn secondary sm"},"Customize"),d("button",{class:"p-btn primary sm"},"Use default")],-1))]),d("div",ha,[d("div",ua,[(t(),f("svg",ga,[...a[34]||(a[34]=[d("path",{fill:"currentColor",d:"m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z"},null,-1)])])),a[35]||(a[35]=d("span",{class:"p-action-title"},"Write permission required",-1)),a[36]||(a[36]=d("span",{class:"p-badge warning sm",style:{"margin-left":"auto"}},"write_file",-1))]),a[37]||(a[37]=s('
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
',2))]),a[40]||(a[40]=s('
Replace session with JWT signing
Refactor the auth middleware
Add unit tests
',1))])])]),a[43]||(a[43]=s('

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max). On desktop a wide table may grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane; beyond that the excess scrolls horizontally inside the table's own wrapper — the page and the chat area never scroll sideways. A single column is capped at 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: compact by default, grouped, expand on demand

High-frequency calls like read_file / bash / grep are "operational noise" — if each one took a full card, parallel triggers would quickly drown out the conversation. The new strategy splits tool calls into three tiers by visual weight, pushing them as light as possible:

Three visual-weight tiers
① Tool row · lightest (default)
read_filesrc/auth/session.ts0.2s
② Tool group · medium (consecutive / parallel auto-merged; collapsed to one line)
3 tool calls· completed · 0.8s
③ Decision card · heavy (only question / approval, needs user input)
Write permission requiredwrite_file
About to modify src/auth/middleware.ts, 42 lines changed.
  • Tool calls render as compact rows by default (30px single-line mono + status dot + key argument); no head / body / shadow.
  • Consecutive or parallel calls auto-merge into one tool group; when collapsed, the whole group takes one line (N tool calls · status).
  • Clicking a row expands it in place to show details (code / output); click again to collapse — details don't grab attention by default.
  • Status is expressed with a colored dot: running (pulsing blue) / done (green) / failed (red), taking no extra space.
  • Only two types keep a full card: Question (needs an answer) and Approval (needs authorization) — they genuinely need the user's attention.
Tool Call · compact row (expand on demand)
3 tool calls· completed
read_filesession.ts
12 export function verify(…
read_filemiddleware.ts
grep"jwt" · 4 hits

Composer

Unified into a single rounded container: --radius-xl, with the whole border turning blue + a soft focus ring on focus. Toolbar controls all use the Pill / IconButton primitives, and the send button is a 32px circle.

Composer
Message Pythinker, / to run a command, @ to reference a file…
yoloplan
kimi-k2· thinking
i
Site-wide consistency: the composer has only one radius (--radius-xl · 16px) and one height; toolbar controls all use the Pill / IconButton primitives, and the send button is a 32px circle — it no longer drifts with the theme.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',13))]),a[45]||(a[45]=s(`
05

Theming

Pythinker Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — "reskinning" only changes colors. Colors are collapsed into 4 seed tokens — two theme colors + one light surface + one dark surface; the neutrals and accent are derived from them, and the semantic status colors (success / warning / danger) ship as independent palettes paired with the seeds, one set each for light / dark.

Color seeds

Day-to-day customization only needs these 4 seeds; the whole site's neutrals and accent change with them:

Theme color · primary
--accent-primary
Theme color · secondary
--accent-secondary
Light surface
--surface-light
Dark surface
--surface-dark

Accent families

Within one theme, the theme color (accent) can switch among several color families. Two parallel families are provided today: blue (default, brand blue, carrying semantic emphasis) and black (neutral black, carrying the most restrained strong action). Both share the same components, fonts, radii, and surfaces — switching families only swaps the accent token set, with zero structural change; more families (green / purple, etc.) can be added later. The two cards below show the same primary button under the two families.

Family switch · same primary, different theme color
Blue family · default
accent
--accent #1783ff · soft #e8f3ff
Black family · neutral
accent
--accent #14171c · soft #f1f2f4

Theme console · change 4 colors, light & dark change together

Theme Console
Primary #1783ffSecondary #6b7280Light surface #ffffffDark surface #121212
Light surface previewWhite background + accent button + neutral text
Dark surface previewDark background + same accent + derived text

Light / dark mode

Driven by the two surfaces --surface-light / --surface-dark: whichever surface is current derives the corresponding foreground, border, shadow, and status colors. Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; reskinning only changes 4 color seeds; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient background (Sidebar frost wash excepted: --color-sidebar-wash paints the vibrancy tint on .side::before)Forbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar and the Sidebar frost layer are the sanctioned exceptions)TopBar / Sidebar exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional iconForbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Braille thinking indicator

The Braille mark is a brand signature of Pythinker Web, used only in the chat state of "message sent, waiting for the Agent's first response", and rendered uniformly by the ThinkingIndicator component. All other loading states use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with two sanctioned exceptions: the .frost variant of TopBar (sticky navigation bars, readable over scrolling content) and the Sidebar frost layer (.side::before — translucent glass + wash + backdrop blur, applied on the pseudo-layer so the sidebar's non-teleported fixed menus keep their viewport anchoring; same recipe extends to the Onboarding hero). No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On desktop it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles.

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;
+    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head, so the hairline runs as one line
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel
  • The right panel track exists permanently, with its width transitioning between 0 ↔ var(--preview-w) (when open it squeezes the conversation column, rather than switching templates).
  • The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control is platform-agnostic: the collapse button lives inside the sidebar header (right-aligned, next to the brand), and a floating expand button appears at the top-left only while collapsed — on macOS desktop it floats beside the traffic lights. The conversation header pads left in step with the transition while collapsed.
  • All grid children must have min-height:0; min-width:0, so only the inner scroll containers scroll and the page itself does not scroll.

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat button) share 4 custom properties, so the "session title" aligns precisely under the "workspace name".

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap6pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → New chat → search → grouped list (workspace head + session rows) → settings footer. Controls reuse the §03 primitives as much as possible. The sidebar renders as a frost layer: .side::before composes the translucent --color-sidebar-glass base, the --color-sidebar-wash gradient (cool blue→lavender in light, dark blue-gray vibrancy in dark), and --p-sidebar-backdrop blur — sanctioned extensions to §06. --color-sidebar-bg remains the solid composite (row masks / overlays). The hairline still separates it from the conversation pane. Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the actions group (New chat + search) stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses --color-selected — neutral, never the accent.

BlockUseNote
Brand headerrobot mascot + name + collapse IconButton (right-aligned)the brand sits left and the collapse IconButton sm is right-aligned inside the header on every platform. On macOS desktop the header pads left to clear the floating traffic lights and doubles as the window-drag strip (the button opts out of dragging).
New chatfull-width left-aligned button (custom)same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)no border, hover/focus shows a sunken background; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). Last fixed row above the list — its wrapper carries the scroll-linked seam
Section label.p-section-labeluppercase muted small titles like "Workspaces"
Workspace head / session rowsee next two sectionsshare --sb-* alignment
Settings footerfull-width left-aligned button (custom)pinned row under the session list, separated by a 1px --line top border; icon + label, same list-style family as New chat
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → kebab.

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover kebab is absolutely positioned so it never forces the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --color-selected — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation; double-click enters inline rename (compact input, not Input)
Timemono xs, fg-faint; yields to the kebab on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
kebabIconButton sm, shown on hover; dropdown uses Menu/MenuItem
Archive confirmationreplaces the title area, Button sm (danger confirm / secondary cancel)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

  • The folder icon leads the row (switching icons between open and closed states) with the plain --sb-gap before the name — it does not pad out the --sb-gutter slot.
  • The name is quiet by design — regular weight, muted color (--color-text-muted, one step lighter than session titles), so group heads read as grouping labels. No path subtitle; hovering the name shows the full root path in a Tooltip.
  • The kebab (menu) and "+" (new chat in this workspace) both use IconButton sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an ::after shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via opacity:0, staying in the tab order).
  • The group is collapsible; when collapsed its session list is hidden.

Show more & collapse

The "load more / show less" control at the bottom of each workspace group is a session-row-shaped compact list control (same family as search, New chat, inline rename — not a Button). It doubles as the pagination trigger and the in-group expand / collapse toggle.

PartRule
Containersession-row pill: display:flex; gap:--sb-gap; padding:8px …, no fixed/min height (font-driven, ≈32px like a session row), same padding as a session row, radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Lead slotempty, --sb-gutter wide, so the label's start x aligns with the session titles (--sb-pad-x + --sb-gutter + --sb-gap)
Labelfont-ui, text-xs, --color-text; flex:1, truncated
Behavior"Load more" fetches the next page and auto-expands; once more than the first page is loaded, "Show less" appears and collapses back to the first page (view-layer trim — data is kept, no refetch); "Show all" re-expands

ResizeHandle

A 4px vertical drag bar, layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable), turning accent on hover / drag.

RuleValue
Width / cursor4px / col-resize
Normal / activetransparent / accent fill
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / thinking / sub-agent / side chat) share one track and one head primitive.

  • The panel head uses the PanelHeader primitive (48px = --panel-head-h), the same height as the conversation column head, so the hairline runs as one line.
  • Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.
  • When opened, the panel width goes from 0 → var(--preview-w), smoothly squeezing the conversation column.
  • At ≤640px the panel becomes a full-screen overlay (position:fixed; inset:0).
i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Pythinker Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

  • Body text vs. background contrast ≥ 4.5:1; control borders, icons, and key graphics ≥ 3:1. When changing theme colors / dark mode, verify against §05 together.
  • Button text vs. button background, and form controls (input, placeholder, helper / error text) vs. their section background must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.
  • State is not conveyed by color alone. Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

  • Every interactive element must have a visible focus indicator on keyboard focus, uniformly via :focus-visible + --p-focus-ring (primary actions may use --p-focus-ring-strong).
  • Bare outline: none is forbidden. To remove the default outline, you must provide an equivalent replacement style.

4. Labels & semantics

  • Semantic HTML first (button / a / input / dialog…); ARIA is added only when native semantics fall short.
  • Icon-only buttons must have an aria-labelIconButton already enforces this with a required label prop.
  • Dialog: role="dialog" + aria-modal="true", with the title as the dialog's accessible name.
  • Purely decorative SVG / icons get aria-hidden="true" to avoid being read out by screen readers.

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The Braille thinking indicator stops pulsing.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
`,4))])])])]))}}),xa=B(ma,[["__scopeId","data-v-fdff2b22"]]);export{xa as default}; diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-D-vmFZBh.js b/apps/pythinker-code/dist-web/assets/DesignSystemView-D-vmFZBh.js deleted file mode 100644 index 5f3411177..000000000 --- a/apps/pythinker-code/dist-web/assets/DesignSystemView-D-vmFZBh.js +++ /dev/null @@ -1,13 +0,0 @@ -import{M as x,aD as k,aI as C,aL as e,u as d,v as t,G as s,H as o,F as f,aX as g,bb as m,I as r,cx as z,bk as T,cy as B,cz as b,cA as S}from"./index-DIKFd2HX.js";const q={class:"ds-page"},I={class:"layout"},A={class:"content"},M={class:"content-inner"},H={id:"tokens"},L={class:"icon-sizes"},V={class:"sz"},D={class:"p-ic",style:{width:"14px",height:"14px"},viewBox:"0 0 24 24",fill:"currentColor"},P={class:"sz"},U={class:"p-ic",style:{width:"16px",height:"16px"},viewBox:"0 0 24 24",fill:"currentColor"},W={class:"sz"},R={class:"p-ic",style:{width:"20px",height:"20px"},viewBox:"0 0 24 24",fill:"currentColor"},N={class:"icon-grid"},O={class:"icon-group-label"},E={class:"ic-name"},j={id:"primitives"},F={class:"stage-wrap"},K={class:"stage p col"},_={class:"demo-row"},G={class:"p-btn primary disabled"},J={class:"p-spinner sm",viewBox:"0 0 24 24",style:{"--p-accent":"#fff","--p-line":"rgba(255,255,255,.35)"}},Q={class:"stage-wrap"},Y={class:"stage p col"},X={class:"demo-row",style:{"font-size":"22px","line-height":"1"}},Z={class:"demo-row"},$={class:"p-thinking"},aa={class:"p-thinking"},ta={class:"stage-wrap"},ea={class:"stage p col",style:{gap:"0",background:"var(--p-surface)",padding:"0","max-width":"300px","align-items":"stretch"}},da={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},sa={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},oa={style:{display:"flex","align-items":"center",gap:"8px",padding:"7px 10px",margin:"1px 6px","border-radius":"8px",color:"var(--p-text)","font-size":"13px"}},ia={style:{color:"var(--d-fg-faint)",flex:"none"},width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor"},la={id:"chat"},na={class:"stage-wrap"},va={class:"stage p col",style:{"align-items":"center",background:"#fff"}},ca={class:"demo-chat"},ra={class:"p-thinking"},ba={class:"p-action"},fa={class:"p-action-head"},pa={class:"p-ic",style:{color:"var(--p-accent)"},viewBox:"0 0 24 24",fill:"currentColor"},ha={class:"p-action warn"},ua={class:"p-action-head"},ga={class:"p-ic",style:{color:"var(--p-warning)"},viewBox:"0 0 24 24",fill:"currentColor"},ma=x({__name:"DesignSystemView",emits:["close"],setup(ya,{emit:y}){const w=y;function p(){w("close")}let c=null;function h(v){v.key==="Escape"&&p()}return k(()=>{document.addEventListener("keydown",h);const v=Array.prototype.slice.call(document.querySelectorAll('#nav a[href^="#"]')),a=new Map;v.forEach(n=>{const i=n.getAttribute("href");if(!i)return;const u=document.getElementById(i.slice(1));u&&a.set(u,n)});let l=null;c=new IntersectionObserver(n=>{n.forEach(i=>{i.isIntersecting&&(l&&l.classList.remove("active"),l=a.get(i.target)??null,l&&l.classList.add("active"))})},{rootMargin:"-20% 0px -70% 0px",threshold:0}),a.forEach((n,i)=>c.observe(i)),v.length&&v[0].classList.add("active")}),C(()=>{document.removeEventListener("keydown",h),c&&(c.disconnect(),c=null)}),(v,a)=>(e(),d("div",q,[t("div",{class:"ds-topbar"},[t("button",{class:"ds-back",type:"button",onClick:p},"← Back"),a[0]||(a[0]=t("span",{class:"ds-topbar-title"},"Design system",-1))]),t("div",I,[a[46]||(a[46]=s('',1)),t("main",A,[t("div",M,[a[44]||(a[44]=s('
● Design System · v1.0

Pythinker Web Design System

This document defines the visual language and component specification for Pythinker Web — design tokens, component primitives, the chat interface, theming, and style rules. All UI work is grounded in it: unified, restrained, token-driven, and themeable.

Scope apps/pythinker-webComponent primitivesTheme 1 set · 4 customizable colorsLight / dark mode
i
This spec is the single reference when changing the web UI. Before adding or modifying a component, style, layout, or theme, read this document first; color, font, radius, spacing, shadow, z-index, and motion always use the §02 tokens, components reuse the §03 primitives, and the §06 style rules are followed.
01

Design Principles

Every UI decision traces back to the following principles. Pythinker Web is a local Agent tool for developers: quick scanning, long stretches of staring, often in the dark — the design serves the task, and is restrained, clinical, and density-first.

  • Consistency —— The same semantics use the same component. The primary button, dialog, input, and badge should each have exactly "one" correct way to be written across the entire site.
  • Hierarchy —— Build a clear hierarchy through size, weight, color, and whitespace; emphasize through "restraint" rather than "bolder and bigger".
  • Proximity —— Group related elements, leave whitespace between unrelated ones. A card's padding, line spacing, and group spacing all come from the same spacing scale.
  • Feedback —— hover / active / focus / loading / success / error all have visible states, and the state language is unified.
  • Breathing room —— Control density with the spacing scale rather than arbitrary pixels; prefer restrained whitespace over cramming controls together.
  • Accessibility (A11y) —— Text contrast ≥ 4.5:1, visible focus rings, touch targets ≥ 32px, and states that don't rely on color alone.
  • Reduction —— The number of colors, radii, shadow levels, and type sizes all converge to a finite set of tokens; delete stray values.
Brand tone (the do-not list): calm, clinical, never exaggerated. Reject purple gradients, glassmorphism, glowing shadows, AI purple / blue glows, endlessly looping fussy micro-animations, "Boost your productivity"-style marketing copy, and using emoji as icons. These are all common tells of AI-generated interfaces (an "AI tell"), deliberately avoided.
i
Declare design intent first (Design Read): before adding a component / page, write one sentence describing its scenario, audience, and tone (for example, "a lightweight tool card embedded in a conversation, for developers, calm and restrained"), then build. If the intent isn't clear, ask one question first rather than defaulting to the nearest existing style.
',2)),t("section",H,[a[7]||(a[7]=s(`
02

Design Tokens

Collapse every visual decision into tokens. Color tokens keep the existing short names and fill out the semantics (lowering migration cost), while spacing, z-index, motion, and font-weight fill in the scales that are currently missing. Every token has: name, light value, dark value, and usage.

i
Naming convention: --<category>-<role>-<state>. For example --color-text-muted, --radius-md, --space-4. To reduce churn, the existing short names (--bg / --ink / --line / --blue …) are kept as compatibility aliases for one release cycle.

Color

Semantic-first, in three layers: background / text / border + accent + status colors. All colors are defined in light / dark pairs, with contrast ≥ 4.5:1.

i
The table below shows the derived semantic tokens. The neutrals and the accent are derived from the 4 color seeds in §05 — for example --color-accent comes from --accent-primary, and --color-bg comes from the current light / dark surface. The semantic status colors (success / warning / danger / info) are independent palettes paired with the seeds, one set each for light / dark; they are not auto-derived from the seeds. Day-to-day reskinning usually only needs the 4 seeds, with the status colors fine-tuned as needed.
bg
#ffffff / #121212
surface
#fafbfc / #1f1f1f
surface-sunken
#f3f5f8 / #121212
selected
#eceff3 / #2d333b
fg
#14171c / #e8eaed
fg-muted
#6b7280 / #9aa0a8
line
#e7eaee / #2d333b
accent (KMBlue)
#1783ff / #58a6ff
accent-soft
#e8f3ff / rgba(88,166,255,.14)
TokenLightDarkUsage
--color-bg#ffffff#121212Page background
--color-surface#fafbfc#1f1f1fPanel / sidebar / card head
--color-surface-raised#ffffff#292929Raised card / dialog / input
--color-text#14171c#e8eaedBody text / headings
--color-text-muted#6b7280#9aa0a8Secondary text / placeholder
--color-line#e7eaee#2d333bDivider / card border
--color-selected#00000014#ffffff14Neutral selected fill (sidebar rows, list pickers) — translucent, never accent-tinted
--color-hover#0000000d#ffffff0dRow hover wash — lighter than the selected fill (hover < selected); translucent, sits on any surface
--color-media-alpha-bg-1≈#858585≈#676b72Checkerboard square A of the <img> alpha canvas — color-mix of --color-bg/--color-text (52/48); applied via --media-alpha-canvas (16px period)
--color-media-alpha-bg-2≈#6b6b6b≈#7a7e85Checkerboard square B (42/58) — both squares stay ≥3:1 against white and black; opaque images cover the canvas
--color-sidebar-bg#fbfaf9#181817Sidebar surface — one step off --color-bg so the session column reads as its own plane
--color-accent#1783ff#58a6ffPrimary action / link / focus
--color-success#0e7a38#3fb950Success / pass
--color-warning#a9610a#d29922Warning / pending
--color-danger#c0392b#f85149Danger / error / abort

Surface usage

The four surface layers each have a role — choose by "raised layer / default flat layer / sunken layer / page background", and avoid treating --p-surface-raised as a universal background.

TokenLightDarkUsage
--p-surface-raised#ffffff#292929Raised card / dialog / input (raised layer)
--p-surface#fafbfc#1f1f1fPanel / sidebar / card head (default flat layer)
--p-surface-sunken#f3f5f8#121212Code block / inline input / recessed area (sunken layer)
--p-bg#ffffff#121212Page background

Focus ring

All focusable controls (button, input, link, menu item, switch, checkbox) use the focus-ring token uniformly; do not hand-write a box-shadow focus ring.

TokenValueUsage
--p-focus-ring0 0 0 3px var(--p-accent-soft)Default focus ring (link, menu item, switch, checkbox)
--p-focus-ring-strong0 0 0 3px var(--p-accent-soft), 0 0 0 1px var(--p-accent)Strong focus ring (button, primary action)

Text selection

The text-selection color uses --p-selection uniformly (light rgba(23,131,255,.18) / dark rgba(88,166,255,.32)), applied by the global ::selection rule; do not set a separate highlight background.

Disabled state

All disabled controls use opacity:.5 + cursor:not-allowed uniformly; do not separately grey out or recolor.

Font families

Pythinker Web uses two font families: --font-ui (UI and body, Inter first) and --font-mono (code and monospace). Components always reference the variables; do not hard-code font names.

--font-ui · UI & body (Inter first)

Body and UI use self-hosted Inter as the primary face. CJK and platform system UI fonts sit late in the fallback chain so Latin glyphs resolve to Inter while Chinese text can fall through to native CJK fonts:

--font-ui
--font-ui: "Inter Variable", "Inter", "Helvetica Neue", Arial,
-      "PingFang SC", "Microsoft YaHei", "Noto Sans SC",
-      -apple-system, BlinkMacSystemFont, "Segoe UI",
-      Roboto, Ubuntu, sans-serif,
-      "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji";
  • Inter first: self-hosted Latin UI and body text, loaded through the optical-size normal and italic variable faces.
  • Western fallbacks next: Helvetica Neue / Arial for environments where Inter cannot load.
  • CJK and system UI fallbacks late: PingFang SC / Microsoft YaHei / Noto Sans SC, then platform UI fonts and emoji fonts.

--font-mono · Code & monospace

Code, tool names, line numbers, diffs, etc. use JetBrains Mono (a self-hosted variable font), falling back to the system monospace:

--font-mono
--font-mono: "JetBrains Mono Variable", "JetBrains Mono",
-      ui-monospace, "SF Mono", Menlo, Consolas, monospace;

Loading strategy

FontSourceBundledUsage
JetBrains Mono@fontsource-variable/jetbrains-mono✓ self-hostedmonospace / code (--font-mono)
Inter@fontsource-variable/inter/opsz.css + opsz-italic.css✓ self-hostedUI / body / display (--font-ui, --font-display), wght 100-900, opsz 14-32, normal + italic
System UI / CJK fontsoperating systemlate fallback for UI / body, not bundled
Self-hosted Inter / JetBrains Mono: no external network requests, no FOUT, works offline; system fonts are not bundled, consistent with the local-first approach.

Usage rules

  • Components always use var(--font-ui) / var(--font-mono); do not hard-code font names like 'Inter' / 'JetBrains Mono'.
  • Body / UI use --font-ui (Inter first); code / monospace use --font-mono (JetBrains Mono).
  • Inter is loaded from the complete optical-size variable faces, including normal and italic styles; font-optical-sizing: auto is enabled globally.
  • CJK and platform system UI fonts stay late in the --font-ui fallback chain, after Inter and Western fallbacks.

Type scale & weight

The user font-size preference sets data-font-scale on the root element, which the CSS uses to pick --base-font (12 / 14 / 16 / 18px). Compact UI chrome and the sidebar follow it through --ui-font-size, while chat reading surfaces derive one readable step above it through --content-font-size.

The fixed product type tokens still define component defaults: UI controls / buttons / forms use --text-base (14px); reading body — including chat Markdown, message bubbles, etc. stays one step larger than compact chrome for readability; the sidebar session list follows that same readable step while keeping list density. Drop stray font-weight: 650 / 750; converge on two weights, 400 / 500 (regular / emphasis).

Page Title
--text-2xl · 22 / 500
Section Title
--text-xl · 18 / 500
Chat body / card title
--text-lg · 16 / 400
UI control / button / form
--text-base · 14 / 500
Helper text / table
--text-sm · 13 / 400
Badge / timestamp / line number
--text-xs · 12 / 500
TokenValueUsage
--font-ui"Inter Variable", "Inter", "Helvetica Neue", Arial…UI & body (Inter first)
--font-monoJetBrains Mono…code, tool names, line numbers, diffs
--base-font14px (data-font-scale: 12/14/16/18)root setting that drives UI, reading body, and sidebar font sizes
--content-font-sizecalc(base + 1px)chat Markdown, message bubbles, composer
--leading-tight/normal/relaxed1.25 / 1.5 / 1.7headings / UI / long text
--weight-regular/medium400 / 500body / emphasis

Icon size

Icons use three size tokens uniformly. The global .p-ic default is 16px (--p-ic-md); components pick as needed, and random pixel sizes are forbidden.

TokenValueUsage
--p-ic-sm14pxsmall button, badge, menu item, inline link icon
--p-ic-md16pxdefault (button, icon button, toolbar)
--p-ic-lg20pxToast status icon, empty-state illustration

Icon

Icons always come from the centralized registry lib/icons.ts: in templates use the <Icon name size /> component (components/ui/Icon.vue); for v-html contexts (such as a tool glyph) use iconSvg(name, size). Do not hand-write <svg> — the scripts/check-style.mjs icon-from-registry rule flags stray SVGs. Icons come from Remix Icon (Apache-2.0), uniformly in a fill style (fill="currentColor", 24×24 source grid), with color following the text; size uses the three tokens below. The registry is bundled on demand by unplugin-icons at build time from @iconify-json/ri — only icons imported in lib/icons.ts end up in the production bundle, fully offline and tree-shaken. The whole site uses only this one icon family; do not mix in other icon libraries, and never hand-write SVG paths. When an icon is missing, add it to the registry — two static ~icons/ri/* imports (component + ?raw string) plus one entry in ICONS in lib/icons.ts; the import names (e.g. RiFolderOpenLine / RawFolderOpenLine) show the ri: icon id. Do not draw it in a component.

Size scale

`,43)),t("div",L,[t("div",V,[(e(),d("svg",D,[...a[1]||(a[1]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[2]||(a[2]=o("sm · 14",-1))]),t("div",P,[(e(),d("svg",U,[...a[3]||(a[3]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[4]||(a[4]=o("md · 16",-1))]),t("div",W,[(e(),d("svg",R,[...a[5]||(a[5]=[t("path",{fill:"currentColor",d:"M11 11V5h2v6h6v2h-6v6h-2v-6H5v-2z"},null,-1)])])),a[6]||(a[6]=o("lg · 20",-1))])]),a[8]||(a[8]=t("h4",{class:"mini"},"Icon library",-1)),a[9]||(a[9]=t("p",null,[o("Currently registered icons, grouped by purpose. The display order and grouping are defined by "),t("code",null,"ICON_GROUPS"),o(" in "),t("code",null,"lib/icons.ts"),o(" (a hand-maintained array covering the same icon names), and this catalog is rendered directly from that array so the registry and the document never drift.")],-1)),t("div",N,[(e(!0),d(f,null,g(T(B),([l,n])=>(e(),d(f,{key:l},[t("div",O,m(l),1),(e(!0),d(f,null,g(n,i=>(e(),d("div",{key:i,class:"icon-cell"},[r(z,{name:i},null,8,["name"]),t("span",E,m(i),1)]))),128))],64))),128))]),a[10]||(a[10]=s('

Do not use emoji as functional icons. The Pythinker robot mascot is a brand asset and is not part of this icon system.

A few special graphics are not in the registry; each has a dedicated component maintained in one place, and must not be copied by hand: <ContextRing :pct /> (the Composer context progress ring, data-driven), <AuthStateIcon kind /> (the success / expired / error colored illustrations in the login flow), <Spinner /> (loading state). Status dots (such as in the Provider list) always use CSS dots (border-radius:50%), not SVG. The scripts/check-style.mjs icon-from-registry rule exempts the above and the brand mark; all other hand-written <svg> is flagged.

Spacing

A 4px base grid. All spacing, gaps, and padding inside and outside components come from this scale — no arbitrary pixels.

--space-1 · 4
icon gap, badge padding
--space-2 · 8
control gap, small padding
--space-3 · 12
button padding, form-item gap
--space-4 · 16
card padding, grid gap
--space-5 · 20
dialog padding
--space-6 · 24
section gap
--space-8 · 32
large section gap

Dense list (sidebar / file tree)

High-density navigation lists like the sidebar share one rhythm, all on the 4px grid: in-row vertical padding --space-1 (4px), no margin between rows (the hover pill provides the separation); section gap (between logo / search / action buttons / group title / list) uniformly --space-2 (8px); between groups --space-2; the brand header is slightly looser at the top (--space-3). When building similar lists, reuse this scale — do not hand-write 1/6/7/10px.

Radius

Merge the existing 14 values into the nearest of 7 scale steps. Rule: the component type determines the radius, not the author's feel.

xs · 4
sm · 6
md · 8
lg · 12
xl · 16
2xl · 20
full · 999
TokenValueUsageMerged from
--radius-xs4pxsmall badge, inline tag2/3/4px →
--radius-sm6pxsmall button, icon button, menu item5/6px →
--radius-md8pxbutton, input, badge, card7/8/9px →
--radius-lg12pxdropdown panel10/12px →
--radius-xl16pxdialog, bottom Sheet, Composer14/16px →
--radius-2xl20pxaccent container / large panel20px
--radius-full999pxpill badge, avatar, send button999px / 50%

Elevation & z-index

Shadows express only "elevation", never decoration (no colored glow). z-index is unified into a scale, eradicating 9999-style one-upping.

sm · dropdown menu / sticky
md · Toast
lg · overlay (reserved)
xl · dialog
Z-index TokenValueUsage
--z-base0normal flow
--z-sticky100sticky header / sidebar
--z-dropdown200dropdown menu / tooltip
--z-overlay300overlay / bottom Sheet
--z-modal400dialog
--z-toast600toast
--z-max9999reserved: only this tier for extreme fallback

Motion

TokenValueUsage
--ease-outcubic-bezier(0.16, 1, 0.3, 1)enter, hover, expand
--ease-in-outcubic-bezier(0.4, 0, 0.2, 1)panel width, layout changes
--duration-fast120mspress, focus
--duration-base160mshover, show/hide
--duration-slow260msdialog, Sheet, layout

Reduced motion

i
Under @media (prefers-reduced-motion: reduce), all animation and transition durations drop to about 0.001ms (effectively off), and the Braille thinking indicator stops pulsing. Components should not check this individually; it is handled uniformly in the global styles.

Layout & breakpoints

Layout sizes and responsive breakpoints are tokenized too: sidebar width, content reading-column width, and two global breakpoints. Components should not hard-code pixels.

TokenValueUsage
--p-sidebar-w264pxleft session sidebar width
--p-content-max760pxchat reading-column max width (regular chat prose)
--p-content-wide920pxwide content (settings / panel)
--p-table-max1040pxdesktop wide-table max width (see §04)
--p-table-cell-max700pxmax width of a single table column; longer cell content wraps (see §04)
--p-bp-sm640pxmobile / desktop boundary
--p-bp-md980pxnarrow / wide screen boundary
i
At ≤640px: dialogs become bottom Sheets, the sidebar collapses into an expandable drawer, and Composer toolbar controls are allowed to wrap.
',23))]),t("section",j,[a[26]||(a[26]=s(`
03

Primitives

Component primitives are the "smallest correct units" of the site UI. Each primitive exposes variants along only two dimensions — variant / size — with appearance driven by tokens, so it naturally supports light / dark mode and customizable theme colors.

i
For every interactive primitive, the keyboard behavior, focus, and ARIA contract are in §08 Accessibility. New primitives must ship with a keyboard model — mouse-only interaction is not enough.

Component selection guide

ScenarioUse
Primary action (submit / confirm)Button variant=primary
Secondary action / cancelButton secondary / ghost
Destructive action (delete / abort)Button danger / danger-soft
Status markerBadge
Toolbar filter / model switchPill
2–4 mutually exclusive optionsSegmentedControl
Top tabsTabs
Switch / multi-selectSwitch / Checkbox
Floating content card / list action menuCard / Menu
Inline notice / global toastBanner / Toast
Dialog / confirmation · bottom panel (mobile)Dialog / Sheet

Button

4 semantic variants × 3 sizes. The primary action primary takes its color from the current theme color (§05 can switch between the blue and black families). Radius uses --radius-md uniformly (small size --radius-sm), weight 600, with a visible focus ring.

Variant matrix lightpreview
medium · default
small
With icon / state
Dark skin dark

API

Button.vue · usage
<Button variant="primary" size="md" :loading="submitting">Save</Button>
-    // variant: primary | secondary | ghost | danger | danger-soft
-    // size:    sm | md | lg
States

IconButton

Unified into three sizes — 26 / 32 / 44px — with a light-grey hover background and a visible focus ring. Replaces the ad-hoc icon + click areas scattered across components today.

IconButton
i
The desktop IconButton comes in sm 26 / md 32; on touch devices the tap target should be ≥ 44px, so use lg 44px, satisfying the §01 accessibility principle (the mobile three-piece set uses lg).

Badge · Chip · Pill

Collapsed into two kinds: Badge (status badge, with an optional status dot) and Pill (the clickable pill in the composer toolbar). Radius, font size, and padding are all unified.

Badge · status badge
Semantic variants
pendingrunningcompletedneeds confirmationfailedPYTHINKER
With icon / small size
planpassedread-only
Pill · toolbar pill (composer)
kimi-k2· thinkingyolo12k / 200k

Kbd · keyboard shortcut

Kbd renders a shortcut as keycaps — one block per key, never inline text like (⌘K). Caps are 18px tall (Badge sm rhythm): sunken surface, 1px border with a 2px bottom edge, 11px UI font, muted text. Typical placement: pushed to the row's trailing edge, opposite the label (e.g. the sidebar search row).

Kbd · keycaps
KCtrlKP

Card / Surface

All cards across the site share one shell: flat, 1px border, --radius-md radius, no shadow. The structure is split into three parts — head / body / foot. Cards differ only in the head — in two tiers by visual weight, while the shell stays consistent:

  • Operation card —— "process" content such as tool calls, Agent, Todo. The head is compact mono with no fill, low weight by default, not competing with the conversation.
  • Attention card —— content that needs a user decision, such as Question / Approval. The head carries a semantic color band (accent / warning) to stand out from the message stream.
Operation card · compact mono head (no fill)
read_filesession.ts
The head uses mono + a neutral background to emphasize its "code / process" nature; the body uses sans for readability. Flat, radius-md, same shape as the tool group and Agent group.
Attention card · semantic color-band head (accent / warning)
A decision needs your confirmationquestion
The head uses a semantic light background (accent-soft / warning-soft) to stand out from the message stream, signaling that the user must step in. The shell is exactly the same as the operation card.
Group · the container owns the border, rows are separated by hairlines
3 tool calls· completed
read_filesession.ts
grep"jwt" · 4 hits
  • Unified shell: all cards are flat + 1px border + radius-md, casting no shadow.
  • Differences are intentional: only the head distinguishes the type (compact mono vs semantic color band); the shell stays consistent.
  • Grouping: the outer container owns the border and radius; inner rows are separated by border-top hairlines, rather than each row being its own card.
  • Status dots: running (pulsing blue) / done (green) / failed (red), sharing one color vocabulary (see §04 tool calls).

Input / Select / Textarea

Unified 38px height (32px small), --radius-md radius, --color-surface-raised background, and a unified blue focus ring (0 0 0 3px accent-soft).

Form primitives
Only letters, numbers, and hyphens are allowed.
States
Please enter a valid workspace name
Normal state · validation passed

Code / Diff

Inline code, code blocks, and diffs all use the monospace font (--p-font-mono). Code blocks have a filename title bar and a copy button. Diffs use + / - row colors to express additions and deletions — additions use a success light background, deletions use a danger light background, with no gradients.

Code / Diff
inline code
The server uses jwt.verify(token) to verify the signature, returning 401 on failure.
code block
session.ts
import { verify } from './jwt';
-
-    export function auth(token: string) {
-      return verify(token, process.env.JWT_SECRET!);
-    }
diff
session.ts · +3 -1
import { verify } from './jwt';
-const secret = 'dev-secret';
+const secret = process.env.JWT_SECRET!;
return verify(token, secret);

Dialog

One dialog primitive replaces 6 hand-written implementations: unified --radius-xl radius, --shadow-xl shadow, 20px head padding, right-aligned footer actions, and an IconButton close button.

Dialog primitive
New chat
Create an independent Agent chat in the current workspace.
i
Size & height: Dialog offers three widths — md 440 / lg 640 / xl 760 (--p-content-max) — chosen by content weight. Height comes in two kinds: auto (default, grows with content up to max-height) and fixed (constant height min(680px, 100vh - 64px), with overflow scrolled inside the body). Content / multi-tab dialogs (settings, model picker, provider manager, folder browser) always use fixed so the frame size stays constant and doesn't jump when switching tabs or content length; short confirmation dialogs keep auto.

Toast

Unified information architecture: status icon + title + description. The status color appears only on the icon, avoiding large colored areas that create visual noise.

Toast
Connected to server
The local daemon is responding normally; you can start a new chat.
Context usage 82%
Consider running /compact to free up space.

Spinner

Loaders fall into two categories by scenario — do not mix them:

  • Spinner (plain · SVG ring) —— the default loader. Used for button loading, app startup (GlobalLoading), and general inline waits — "everything else".
  • ThinkingIndicator (Braille mark · brand signature) —— used only for the chat waiting state of "message sent, waiting for the Agent's first response" (the sending placeholder in ChatPane and SideChatPanel).

Spinner · plain loader (default)

`,48)),t("div",F,[a[14]||(a[14]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Spinner · common scenarios")],-1)),t("div",K,[t("div",_,[a[13]||(a[13]=s('Loading…',2)),t("button",G,[(e(),d("svg",J,[...a[11]||(a[11]=[t("circle",{class:"track",cx:"12",cy:"12",r:"9"},null,-1),t("circle",{class:"arc",cx:"12",cy:"12",r:"9"},null,-1)])])),a[12]||(a[12]=o("Submitting",-1))])])])]),a[27]||(a[27]=t("h4",{class:"mini"},'ThinkingIndicator · Braille mark (only "waiting for the Agent")',-1)),t("div",Q,[a[19]||(a[19]=t("div",{class:"stage-bar"},[t("span",{class:"st"},[o("ThinkingIndicator · chat waiting state only "),t("span",{class:"tag spec"},"signature")])],-1)),t("div",Y,[a[17]||(a[17]=t("span",{class:"stage-label"},"Shared mark",-1)),t("div",X,[r(b,{size:"lg"})]),a[18]||(a[18]=t("span",{class:"stage-label"},"Usage · only while the chat waits for a response",-1)),t("div",Z,[t("span",$,[r(b,{size:"sm"}),a[15]||(a[15]=o("Thinking…",-1))]),t("span",aa,[r(b,{size:"sm"}),a[16]||(a[16]=o("Waiting for response…",-1))])])])]),a[28]||(a[28]=s('
i
The Braille cycle is limited to the "waiting for the Agent's first response" scenario. It is rendered by ThinkingIndicator.vue, sized via tokens, and stops animating under prefers-reduced-motion. All other loading states use the plain Spinner.

Link

Inline text link: the default is the accent color with no underline; on hover it shows an underline and darkens. The .muted variant uses the secondary text color. Used for in-text jumps, external links, "view all", and other lightweight actions.

Link · inline link
Read the full design token docs before building.View on GitHubView history

Menu / Dropdown

Dropdown menu panel: raised surface + border + light shadow (--shadow-sm, flat-leaning). Menu items support icons, the current (active) state, the danger state, and the disabled state, with separators grouping items. On touch / mobile, use lg (≥44px row height) for menu items.

Menu · dropdown menu
Open file
Selected item
Disabled item
Delete chat

SegmentedControl

Mutually exclusive short option groups, commonly used for 2–4 option switches such as "light / dark / follow system". The current item is highlighted with a raised surface + subtle shadow.

SegmentedControl
LightDarkFollow system

Tabs

Tabs with a bottom hairline, used for grouping and switching sibling content. The current tab is marked with accent text + an accent underline.

Tabs
GeneralAgentAdvanced

Switch

A two-state switch for settings that take effect immediately. 36×20 track with full radius, 16px knob; when on, the track turns accent and the knob slides right, with the transition driven by tokens.

Switch

Checkbox

A 17×17 checkbox. When checked it fills with the accent color and shows a white tick (inline SVG). Often paired with a text label.

Checkbox

Avatar

A 32px default avatar with md radius; .sm is 24px. Can hold an initial or an icon; falls back to this placeholder when there is no image.

Avatar
KK

EmptyState

A centered placeholder for empty lists / panels: a 48px faint icon + title + hint, avoiding blank pages.

EmptyState
No chats yet
Click "New chat" to start a conversation with Pythinker

Divider

A 1px horizontal divider (--p-line); .p-divider-v is the vertical divider, used between inline elements.

Divider
Content above

Content below
kimi-k2thinking

Tooltip

A CSS-only hover hint, wrapped in .p-tip. Inverted background (--p-text / --p-bg), single line, no wrapping — carries only short notes.

Tooltip (hover the button)
New chat

Banner

An inline notice bar placed at the top of a content area. Three states — .info / .warning / .danger — each with a matching 18px icon.

Banner
Connected to server
Currently in yolo mode; tool calls will run automatically

Sheet / BottomSheet

A mobile bottom slide-up panel: xl top radius + drag handle, xl shadow. At ≤640px, dialogs become bottom-anchored Sheets.

BottomSheet
Choose a model
kimi-k2 · thinking
kimi-k2 · instant

Skeleton

A placeholder for loading content, using a breathing opacity animation (no gradients), following the no-gradient-text rule. Composed into titles / text lines / avatars.

Skeleton

Command Bar

An inline combination of "primary action + command text + copy", sitting between a button and a code block — used for install / onboarding / one-click execution. The primary action reuses Button primary; the command area uses a mono light-grey background.

Command Bar
curl -fsSL https://code.pythinker.com/pythinker-code/install.sh | bash

TopBar

The application top bar. Solid by default; the .frost variant is translucent + background blur, used only for sticky navigation bars, and is the sole exception to the no-glassmorphism rule (see §06).

TopBar · solid / frosted glass
Solid TopBar
Frosted-glass TopBar · .frost

SectionLabel

A small group title for sidebar lists, used to section the content below (such as Workspaces in the sidebar). Spec: 13px / 700 / uppercase / letter-spacing .08em, color --color-fg-faint; left-aligned to the row's starting padding (--sb-pad-x), keeping the same indent as the group rows below. For scripts without case (such as Chinese), text-transform:uppercase simply has no effect — no special handling needed.

',48)),t("div",ta,[a[25]||(a[25]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Sidebar · group title")],-1)),t("div",ea,[a[24]||(a[24]=t("div",{class:"p-section-label",style:{padding:"12px 16px 4px"}},"Workspaces",-1)),t("div",da,[(e(),d("svg",sa,[...a[20]||(a[20]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[21]||(a[21]=o(" pythinker-code-web ",-1))]),t("div",oa,[(e(),d("svg",ia,[...a[22]||(a[22]=[t("path",{fill:"currentColor",d:"M4 5v14h16V7h-8.414l-2-2zm8.414 0H21a1 1 0 0 1 1 1v14a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h7.414z"},null,-1)])])),a[23]||(a[23]=o(" playground ",-1))])])])]),t("section",la,[a[42]||(a[42]=s('
04

Chat Interface Overhaul

The message stream is the core of Pythinker Web. The goal of the overhaul: have the 6 card types (Agent / Tool / Question / Approval / DynamicWorkflow / Todo) share one card skeleton, distinguished only by the head icon and semantic color; and collapse the Composer into a single rounded container.

Unified message stream

',3)),t("div",na,[a[41]||(a[41]=t("div",{class:"stage-bar"},[t("span",{class:"st"},"Conversation · 760px reading column")],-1)),t("div",va,[t("div",ca,[a[38]||(a[38]=t("div",{class:"p-bubble-user"},"Please change the login endpoint to JWT and add the corresponding unit tests.",-1)),t("span",ra,[r(b,{size:"sm"}),a[29]||(a[29]=o("Analyzing the auth module…",-1))]),a[39]||(a[39]=s('
3 tool calls· completed · 0.8s
read_filesrc/auth/session.ts0.2s
12 export function verify(token: string) {
13 return jwt.verify(token, getSecret());
14 }
read_filesrc/auth/middleware.ts0.2s
grep"jwt.verify" · 4 matches0.1s

I looked at the structure of src/auth; it is currently based on a session cookie. The scope of the change is below — once you confirm, I'll start.

',2)),t("div",ba,[t("div",fa,[(e(),d("svg",pa,[...a[30]||(a[30]=[t("path",{fill:"currentColor",d:"M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10s-4.477 10-10 10m0-2a8 8 0 1 0 0-16a8 8 0 0 0 0 16m-1-5h2v2h-2zm2-1.645V14h-2v-1.5a1 1 0 0 1 1-1a1.5 1.5 0 1 0-1.471-1.794l-1.962-.393A3.501 3.501 0 1 1 13 13.355"},null,-1)])])),a[31]||(a[31]=t("span",{class:"p-action-title"},"A decision needs your confirmation",-1))]),a[32]||(a[32]=t("div",{class:"p-action-body"},"How long should the JWT expiry be? Default 7 days, refresh token 30 days.",-1)),a[33]||(a[33]=t("div",{class:"p-action-foot"},[t("button",{class:"p-btn secondary sm"},"Customize"),t("button",{class:"p-btn primary sm"},"Use default")],-1))]),t("div",ha,[t("div",ua,[(e(),d("svg",ga,[...a[34]||(a[34]=[t("path",{fill:"currentColor",d:"m12.866 3l9.526 16.5a1 1 0 0 1-.866 1.5H2.474a1 1 0 0 1-.866-1.5L11.134 3a1 1 0 0 1 1.732 0m-8.66 16h15.588L12 5.5zM11 16h2v2h-2zm0-7h2v5h-2z"},null,-1)])])),a[35]||(a[35]=t("span",{class:"p-action-title"},"Write permission required",-1)),a[36]||(a[36]=t("span",{class:"p-badge warning sm",style:{"margin-left":"auto"}},"write_file",-1))]),a[37]||(a[37]=s('
About to modify src/auth/middleware.ts, 42 lines changed. Allow?
',2))]),a[40]||(a[40]=s('
Replace session with JWT signing
Refactor the auth middleware
Add unit tests
',1))])])]),a[43]||(a[43]=s('

Wide markdown tables (desktop): regular chat prose stays within the 760px reading column (--p-content-max). On desktop a wide table may grow naturally with its content up to 1040px (--p-table-max), centred within the conversation pane; beyond that the excess scrolls horizontally inside the table's own wrapper — the page and the chat area never scroll sideways. A single column is capped at 700px (--p-table-cell-max), so long cell content wraps inside the cell instead of stretching the table. The conversation outline (TOC) keeps its usual position just outside the reading column; when a table grows past it and scrolls under the rail, the TOC is hidden temporarily and returns as soon as the table leaves, without touching the user's TOC setting. On mobile a table never breaks out of the reading column.

Tool calls: compact by default, grouped, expand on demand

High-frequency calls like read_file / bash / grep are "operational noise" — if each one took a full card, parallel triggers would quickly drown out the conversation. The new strategy splits tool calls into three tiers by visual weight, pushing them as light as possible:

Three visual-weight tiers
① Tool row · lightest (default)
read_filesrc/auth/session.ts0.2s
② Tool group · medium (consecutive / parallel auto-merged; collapsed to one line)
3 tool calls· completed · 0.8s
③ Decision card · heavy (only question / approval, needs user input)
Write permission requiredwrite_file
About to modify src/auth/middleware.ts, 42 lines changed.
  • Tool calls render as compact rows by default (30px single-line mono + status dot + key argument); no head / body / shadow.
  • Consecutive or parallel calls auto-merge into one tool group; when collapsed, the whole group takes one line (N tool calls · status).
  • Clicking a row expands it in place to show details (code / output); click again to collapse — details don't grab attention by default.
  • Status is expressed with a colored dot: running (pulsing blue) / done (green) / failed (red), taking no extra space.
  • Only two types keep a full card: Question (needs an answer) and Approval (needs authorization) — they genuinely need the user's attention.
Tool Call · compact row (expand on demand)
3 tool calls· completed
read_filesession.ts
12 export function verify(…
read_filemiddleware.ts
grep"jwt" · 4 hits

Composer

Unified into a single rounded container: --radius-xl, with the whole border turning blue + a soft focus ring on focus. Toolbar controls all use the Pill / IconButton primitives, and the send button is a 32px circle.

Composer
Message Pythinker, / to run a command, @ to reference a file…
yoloplan
kimi-k2· thinking
i
Site-wide consistency: the composer has only one radius (--radius-xl · 16px) and one height; toolbar controls all use the Pill / IconButton primitives, and the send button is a 32px circle — it no longer drifts with the theme.

Responsive

See §02 --p-bp-sm for the breakpoint. This section only gives mobile-adaptation pointers for the chat interface; a full mobile mockup is out of scope for this spec.

i
At ≤640px: dialogs anchor to the bottom as Sheets (xl top radius, top drag handle), the sidebar collapses into an expandable drawer, the Composer toolbar is allowed to wrap, and the chat reading column drops its max-width to fill the screen.
',13))]),a[45]||(a[45]=s(`
05

Theming

Pythinker Web uses one unified theme: the same components, fonts, radii, shadows, and surfaces — "reskinning" only changes colors. Colors are collapsed into 4 seed tokens — two theme colors + one light surface + one dark surface; the neutrals and accent are derived from them, and the semantic status colors (success / warning / danger) ship as independent palettes paired with the seeds, one set each for light / dark.

Color seeds

Day-to-day customization only needs these 4 seeds; the whole site's neutrals and accent change with them:

Theme color · primary
--accent-primary
Theme color · secondary
--accent-secondary
Light surface
--surface-light
Dark surface
--surface-dark

Accent families

Within one theme, the theme color (accent) can switch among several color families. Two parallel families are provided today: blue (default, brand blue, carrying semantic emphasis) and black (neutral black, carrying the most restrained strong action). Both share the same components, fonts, radii, and surfaces — switching families only swaps the accent token set, with zero structural change; more families (green / purple, etc.) can be added later. The two cards below show the same primary button under the two families.

Family switch · same primary, different theme color
Blue family · default
accent
--accent #1783ff · soft #e8f3ff
Black family · neutral
accent
--accent #14171c · soft #f1f2f4

Theme console · change 4 colors, light & dark change together

Theme Console
Primary #1783ffSecondary #6b7280Light surface #ffffffDark surface #121212
Light surface previewWhite background + accent button + neutral text
Dark surface previewDark background + same accent + derived text

Light / dark mode

Driven by the two surfaces --surface-light / --surface-dark: whichever surface is current derives the corresponding foreground, border, shadow, and status colors. Switching light / dark simply swaps between these two sets of derived tokens, with zero structural change.

Benefits of one theme: components, fonts, radii, and surfaces are consistent site-wide; reskinning only changes 4 color seeds; light / dark mode works out of the box; semantic status colors are independently tunable.
06

Style Rules

Anti-pattern rules that all UI code must follow. These rules are also the basis of the check-style detection script, one-to-one with a warning.

Rule IDWhat it detectsAction
no-gradient-textgradient text / gradient backgroundForbidden
no-glassmorphismbackdrop-filter: blur (TopBar sticky nav bar is the sole exception)TopBar exempt
no-color-glowcolored / large-radius box-shadow glowForbidden
no-emoji-iconusing emoji as a functional iconForbidden
no-hardcoded-hexunregistered hex color inside a component <style>Warning
no-hardcoded-fonthard-coded font-family in a component (e.g. 'Inter') instead of var(--font-ui)Warning
radius-from-scaleradius value not in {4,6,8,12,16,20,999}Warning
z-from-scalez-index using an unregistered large numberWarning
weight-from-scalefont-weight not in {400,500}Warning

State matrix

Every interactive primitive should define the following states where applicable; missing ones are flagged by the style rules. focus-visible always uses --p-focus-ring (appears only on keyboard focus, see §08); disabled is uniformly opacity:.5.

StateButtonInputCardMenu itemSwitch
default
hover
active / pressed
focus-visible
disabled
loading
selected / active
error
readonly

Braille thinking indicator

The Braille mark is a brand signature of Pythinker Web, used only in the chat state of "message sent, waiting for the Agent's first response", and rendered uniformly by the ThinkingIndicator component. All other loading states use the plain Spinner.

Glassmorphism exemption

backdrop-filter: blur is banned site-wide, with the sole exception of the .frost variant of TopBar — and only in the one place of the "sticky navigation bar", used to stay readable over scrolling content. No other component (card, dialog, Toast, panel) may use glassmorphism; violations are flagged under no-glassmorphism.
07

App Shell & Sidebar

The structural spec for the app shell (three-column grid + right preview panel) and the left session sidebar. These are business-agnostic "skeletons" — components, fonts, radii, and surfaces are reused from §02 / §03, but layout and alignment have their own conventions.

Layout grid

On desktop it is a single-row 5-track grid: the sidebar and the right panel each occupy a permanent auto track, with the conversation column in the middle; two 0-width tracks are for the ResizeHandles.

App.vue · .app
grid-template-columns: auto 0 minmax(0, 1fr) 0 auto;
-    /*         sidebar ↑    ↑handle  ↑conversation  ↑handle ↑right panel (auto) */
TokenValueUsage
sidebar width270px default (adjustable)expanded sidebar width, changed by dragging the ResizeHandle; should approach §02's --p-sidebar-w (264px)
--preview-w460pxwidth of the right preview panel when open
--panel-head-h48pxunified height for all right panel heads + the conversation column head, so the hairline runs as one line
--p-bp-sm640px≤640 switches to a mobile single column (top bar + conversation), no sidebar / handle / right panel
  • The right panel track exists permanently, with its width transitioning between 0 ↔ var(--preview-w) (when open it squeezes the conversation column, rather than switching templates).
  • The sidebar collapses SYMMETRICALLY to the right panel: its container width animates to 0 while the content keeps its fixed width anchored to the right edge (clipped, sliding out left — no reflow, hairline stays on the clipped content). No rail remains. The collapse control differs by platform: on macOS desktop the toggle is a single resident floating IconButton pinned beside the traffic lights (rendered in both states, only the glyph swaps — the sidebar slides underneath it, never moves or flashes); on Windows / web the collapse button lives inside the sidebar header (right-aligned), and a floating expand button appears at the top-left only while collapsed. The conversation header pads left in step with the transition while collapsed.
  • All grid children must have min-height:0; min-width:0, so only the inner scroll containers scroll and the page itself does not scroll.

Sidebar alignment system (--sb-*)

All sidebar rows (group head, session row, New chat button) share 4 custom properties, so the "session title" aligns precisely under the "workspace name".

TokenValueUsage
--sb-inset12pxrow box (hover/selected pill) inset from the sidebar edges — matches the brand header's 12px padding
--sb-pad-x20pxcontent start x (= --sb-inset + 8px row padding)
--sb-gutter16pxleading icon slot width — matches the workspace folder icon so the session title aligns under the workspace name
--sb-gap6pxgap between the icon slot and the text
i
The session title's starting x = --sb-pad-x + --sb-gutter + --sb-gap. The group head has a folder icon and the session row has a status slot; both icons are the same width and position, so the titles align naturally.

Sidebar structure

The sidebar from top to bottom: brand header → New chat → search → grouped list (workspace head + session rows) → settings footer. Controls reuse the §03 primitives as much as possible. The sidebar sits on --color-sidebar-bg (one step off --color-bg: warm off-white in light, near-black in dark — the session column reads as its own plane; the hairline still separates it from the conversation pane). Vertical rhythm: the brand header keeps 12px padding (on macOS desktop the left padding grows to 80px to clear the traffic lights); rows inside the actions group (New chat + search) stack flush (0 gap, same rhythm as the list rows); adjacent groups are separated by 12px. Row hover uses --sb-hover (= the global --color-hover wash); the selected row uses --color-selected — neutral, never the accent.

BlockUseNote
Brand headerrobot mascot + name + collapse IconButton (right-aligned)on Windows / web the brand is left and the collapse IconButton sm is right-aligned inside the header. On macOS desktop the header is a bare drag strip (brand hidden, traffic lights + resident floating toggle over it)
New chatfull-width left-aligned button (custom)same rhythm as the session rows in the list (left-aligned, hover = --sb-hover). Do not use Button (centered, breaks the rhythm)
Searchbare search row (custom)no border, hover/focus shows a sunken background; icon + label, with the Kbd keycaps (⌘K / Ctrl K) pushed to the trailing edge — label and shortcut are justified apart. Do not use Input (the 38px bordered version is too heavy). Last fixed row above the list — its wrapper carries the scroll-linked seam
Section label.p-section-labeluppercase muted small titles like "Workspaces"
Workspace head / session rowsee next two sectionsshare --sb-* alignment
Settings footerfull-width left-aligned button (custom)pinned row under the session list, separated by a 1px --line top border; icon + label, same list-style family as New chat
!
Why New chat / search / inline rename don't use Button / Input: they are "list-style" controls (full-width, left-aligned, compact, borderless), while Button is centered and Input is a 38px bordered control — forcing them in would break the sidebar's visual density and alignment. This is an intentional custom exception, not an oversight.

Session row

A session row is an inset rounded pill, structured as: status slot → title → time → attention Badge → kebab.

PartRule
Containerpadding: 8px 8px inside the list's --sb-inset gutter, radius-sm; no fixed/min height — row height is font-driven (title line-height: --leading-tight, ≈16px) → ≈32px total, the sidebar-wide row rhythm. The hover kebab is absolutely positioned so it never forces the row taller (no hover jitter). hover = --sb-hover (the global --color-hover wash); active = --color-selected — neutral, no accent tint, no border, no weight change
Status slot (lead)fixed --sb-gutter width; running = Spinner sm, otherwise unread = 7px accent dot
Titleflex:1 with truncation; double-click enters inline rename (compact input, not Input)
Timemono xs, fg-faint; yields to the kebab on hover
Attention BadgeBadge sm: info (needs answer) / warning (needs approval) / danger (aborted)
kebabIconButton sm, shown on hover; dropdown uses Menu/MenuItem
Archive confirmationreplaces the title area, Button sm (danger confirm / secondary cancel)

Workspace group

The group head and session rows share --sb-*: folder icon (open/closed) → name, with the kebab and "+" revealed on hover.

  • The folder icon leads the row (switching icons between open and closed states) with the plain --sb-gap before the name — it does not pad out the --sb-gutter slot.
  • The name is quiet by design — regular weight, muted color (--color-text-muted, one step lighter than session titles), so group heads read as grouping labels. No path subtitle; hovering the name shows the full root path in a Tooltip.
  • The kebab (menu) and "+" (new chat in this workspace) both use IconButton sm inside a floating actions layer anchored to the row's right edge — no reserved layout space, so the name uses the full row width when idle. Shown on hover, keyboard focus, or while the menu is open; the layer backs itself with the sidebar surface (container background) plus the row hover wash (an ::after shown only while the row is hovered), so its color exactly equals the row's current background and the overlapped name tail doesn't bleed through (hidden via opacity:0, staying in the tab order).
  • The group is collapsible; when collapsed its session list is hidden.

Show more & collapse

The "load more / show less" control at the bottom of each workspace group is a session-row-shaped compact list control (same family as search, New chat, inline rename — not a Button). It doubles as the pagination trigger and the in-group expand / collapse toggle.

PartRule
Containersession-row pill: display:flex; gap:--sb-gap; padding:8px …, no fixed/min height (font-driven, ≈32px like a session row), same padding as a session row, radius-sm; hover = --sb-hover (no text recolor); :focus-visible uses --p-focus-ring
Lead slotempty, --sb-gutter wide, so the label's start x aligns with the session titles (--sb-pad-x + --sb-gutter + --sb-gap)
Labelfont-ui, text-xs, --color-text; flex:1, truncated
Behavior"Load more" fetches the next page and auto-expands; once more than the first page is loaded, "Show less" appears and collapses back to the first page (view-layer trim — data is kept, no refetch); "Show all" re-expands

ResizeHandle

A 4px vertical drag bar, layered over the 1px column border (margin: 0 -2px makes the whole 4px grabbable), turning accent on hover / drag.

RuleValue
Width / cursor4px / col-resize
Normal / activetransparent / accent fill
Layer--z-dropdown, above pane-level sticky chrome (chat dock at --z-sticky) so the overhang stays visible and grabbable
Behaviorpanel width follows the pointer 1:1 while dragging (the parent disables transitions to avoid lag); on release it is persisted to localStorage

Right panel

The right panels (file preview / Diff / thinking / sub-agent / side chat) share one track and one head primitive.

  • The panel head uses the PanelHeader primitive (48px = --panel-head-h), the same height as the conversation column head, so the hairline runs as one line.
  • Panel head: bold mono title + optional muted subtitle + middle slot (Badge / control / path) + close IconButton on the right.
  • When opened, the panel width goes from 0 → var(--preview-w), smoothly squeezing the conversation column.
  • At ≤640px the panel becomes a full-screen overlay (position:fixed; inset:0).
i
One-sentence principle: the sidebar / shell is a "list + grid" skeleton that reuses the §02 tokens and §03 primitives (Button / IconButton / Badge / Kbd / Menu / Spinner / PanelHeader); compact list controls that don't fit a primitive (search, New chat, inline rename, show-more) keep their custom form, governed by this section.
08

Accessibility (pragmatic edition)

Pythinker Web is a local developer tool; it does not target a specific WCAG conformance level, nor maintain a full screen-reader QA matrix. This section collects only the rules that are "low-cost, don't hurt the look, and directly benefit keyboard-heavy users", as the baseline contract for each primitive; the more expensive, lower-ROI parts (such as real-time announcement orchestration for streaming output) are not mandatory for now.

i
On the "ugly" focus ring: the focus visibility required below always uses :focus-visible (not :focus). It appears only on keyboard focus; mouse clicks don't trigger it, so it doesn't pollute the mouse-driven visual; the ring's strength is tuned uniformly with --p-focus-ring, not overridden per place.

1. Contrast & color

  • Body text vs. background contrast ≥ 4.5:1; control borders, icons, and key graphics ≥ 3:1. When changing theme colors / dark mode, verify against §05 together.
  • Button text vs. button background, and form controls (input, placeholder, helper / error text) vs. their section background must all have contrast ≥ 4.5:1 (large text ≥ 3:1). White-on-white text, a transparent borderless button floating over the page background, and a light placeholder on a near-white background are all flagged by the style rules.
  • State is not conveyed by color alone. Error, selected, and disabled states also carry text, an icon, or a shape change (for example an error state is not just red, but also carries text or an icon).

2. Keyboard operable

Anything doable with a mouse must also be doable with a keyboard; Tab order follows the DOM, with no invented skipping. Composite controls define their keyboard model per the table below; a missing model is treated as incomplete:

ControlKeyboard behavior
DialogTab cycles within the dialog (focus trap); Esc closes; focus returns to the trigger element after closing.
Menu / move the highlight, Enter selects, Esc closes.
Tabs / switch tabs (roving tabindex); only the current tab is in the Tab sequence.
Switch / Segmented / or Space / Enter to toggle.

3. Focus visibility

  • Every interactive element must have a visible focus indicator on keyboard focus, uniformly via :focus-visible + --p-focus-ring (primary actions may use --p-focus-ring-strong).
  • Bare outline: none is forbidden. To remove the default outline, you must provide an equivalent replacement style.

4. Labels & semantics

  • Semantic HTML first (button / a / input / dialog…); ARIA is added only when native semantics fall short.
  • Icon-only buttons must have an aria-labelIconButton already enforces this with a required label prop.
  • Dialog: role="dialog" + aria-modal="true", with the title as the dialog's accessible name.
  • Purely decorative SVG / icons get aria-hidden="true" to avoid being read out by screen readers.

5. Target size

Desktop click targets ≥ 32px; touch devices ≥ 44px (consistent with the §01 principle and the IconButton lg tier).

6. Reduced motion

Handled uniformly in the global styles per §02's @media (prefers-reduced-motion: reduce); components do not check this individually. The Braille thinking indicator stops pulsing.

7. Live announcements (non-mandatory)

Screen-reader announcements are not a mandatory contract in this product. Short hints like Toast can use role="status" / aria-live; chat streaming output is currently not announced word-by-word, which is an acceptable trade-off, to be added later if a real need arises.

Explicitly not mandatory for now: a WCAG conformance-level claim, a complete ARIA pattern table, a per-screen-reader QA matrix, and real-time announcement orchestration for streaming output — these are not written into the primitive contract, to avoid becoming slogans no one maintains.
`,4))])])])]))}}),xa=S(ma,[["__scopeId","data-v-b034e5af"]]);export{xa as default}; diff --git a/apps/pythinker-code/dist-web/assets/DesignSystemView-DzHBvWAf.css b/apps/pythinker-code/dist-web/assets/DesignSystemView-DzHBvWAf.css new file mode 100644 index 000000000..82ba47460 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/DesignSystemView-DzHBvWAf.css @@ -0,0 +1 @@ +.ds-page[data-v-fdff2b22]{--d-bg: var(--color-bg);--d-surface: var(--color-surface);--d-surface-2: var(--color-surface-sunken);--d-surface-3: var(--color-line);--d-fg: var(--color-text);--d-fg-soft: var(--color-text-muted);--d-fg-muted: var(--color-text-muted);--d-fg-faint: var(--color-text-faint);--d-line: var(--color-line);--d-line-2: var(--color-line);--d-accent: var(--color-accent);--d-accent-2: var(--color-accent-hover);--d-accent-soft: var(--color-accent-soft);--d-accent-bd: var(--color-accent-bd);--d-green: var(--color-success);--d-green-soft: var(--color-success-soft);--d-amber: var(--color-warning);--d-amber-soft: var(--color-warning-soft);--d-red: var(--color-danger);--d-red-soft: var(--color-danger-soft);--d-violet: var(--color-done);--d-code-bg: var(--color-surface-sunken);--d-sidebar: var(--color-surface);--d-shadow-sm: var(--shadow-sm);--d-shadow-md: var(--shadow-md);--d-shadow-lg: var(--shadow-lg);--sidebar-w: var(--p-sidebar-w);--content-max: var(--p-content-wide)}.ds-page[data-v-fdff2b22] *,.ds-page[data-v-fdff2b22] *:before,.ds-page[data-v-fdff2b22] *:after{box-sizing:border-box}.ds-page[data-v-fdff2b22]{scroll-behavior:smooth}.ds-page[data-v-fdff2b22]{margin:0;background:var(--d-bg);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-base);line-height:1.65;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}h1[data-v-fdff2b22],h2[data-v-fdff2b22],h3[data-v-fdff2b22],h4[data-v-fdff2b22]{color:var(--d-fg);letter-spacing:-.01em;line-height:1.25;margin:0}p[data-v-fdff2b22]{margin:0 0 14px;color:var(--d-fg-soft)}a[data-v-fdff2b22]{color:var(--d-accent-2);text-decoration:none}a[data-v-fdff2b22]:hover{text-decoration:underline}code[data-v-fdff2b22],pre[data-v-fdff2b22],.mono[data-v-fdff2b22]{font-family:JetBrains Mono,ui-monospace,SF Mono,Menlo,Consolas,monospace}code[data-v-fdff2b22]{background:var(--d-code-bg);border:1px solid var(--d-line-2);border-radius:5px;padding:1px 6px;font-size:.88em;color:#1f2937;white-space:nowrap}.layout[data-v-fdff2b22]{display:grid;grid-template-columns:var(--sidebar-w) minmax(0,1fr);min-height:100vh}.sidebar[data-v-fdff2b22]{position:sticky;top:0;align-self:start;height:100vh;background:var(--d-sidebar);border-right:1px solid var(--d-line);padding:26px 22px;overflow-y:auto}.brand[data-v-fdff2b22]{display:flex;align-items:center;gap:10px;margin-bottom:6px}.brand-mark[data-v-fdff2b22]{width:26px;height:26px;border-radius:7px;flex:none;background:var(--d-fg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;letter-spacing:-.04em}.brand-name[data-v-fdff2b22]{font-weight:700;font-size:15px;letter-spacing:-.01em}.brand-sub[data-v-fdff2b22]{font-size:12px;color:var(--d-fg-faint);margin-bottom:26px;padding-left:36px}.nav-group[data-v-fdff2b22]{margin:22px 0 8px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--d-fg-faint)}.p-section-label[data-v-fdff2b22]{font-size:12px;font-weight:400;text-transform:uppercase;color:var(--d-fg-faint)}.nav a[data-v-fdff2b22]{display:flex;align-items:center;gap:9px;padding:7px 10px;border-radius:7px;font-size:13.5px;font-weight:500;color:var(--d-fg-soft);margin:1px 0;transition:background .15s,color .15s}.nav a .num[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:11px;color:var(--d-fg-faint);width:18px}.nav a[data-v-fdff2b22]:hover{background:var(--d-surface-2);color:var(--d-fg);text-decoration:none}.nav a.active[data-v-fdff2b22]{background:var(--d-accent-soft);color:var(--d-accent-2)}.nav a.active .num[data-v-fdff2b22]{color:var(--d-accent-2)}.content[data-v-fdff2b22]{min-width:0}.content-inner[data-v-fdff2b22]{max-width:var(--content-max);margin:0 auto;padding:64px 56px 120px}section[data-v-fdff2b22]{scroll-margin-top:32px;padding-top:8px}section+section[data-v-fdff2b22]{margin-top:72px}.hero[data-v-fdff2b22]{padding:8px 0 40px;border-bottom:1px solid var(--d-line);margin-bottom:56px}.eyebrow[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:8px;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--d-fg);background:#1783ff1a;border:none;padding:6px 12px;border-radius:8px;margin-bottom:22px}.hero h1[data-v-fdff2b22]{font-size:48px;font-weight:600;line-height:1.08;letter-spacing:-.025em;margin-bottom:18px}.hero h1 .grad[data-v-fdff2b22]{color:var(--d-accent)}.hero p.lead[data-v-fdff2b22]{font-size:18px;line-height:1.6;color:var(--d-fg-soft);max-width:680px}.hero-meta[data-v-fdff2b22]{display:flex;flex-wrap:wrap;gap:10px;margin-top:28px}.meta-chip[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:8px;font-size:12.5px;color:var(--d-fg-muted);background:var(--d-surface);border:1px solid var(--d-line);border-radius:8px;padding:7px 12px}.meta-chip b[data-v-fdff2b22]{color:var(--d-fg);font-weight:600}.meta-chip .dot[data-v-fdff2b22]{width:7px;height:7px;border-radius:50%;background:var(--d-green)}.sec-head[data-v-fdff2b22]{display:flex;align-items:baseline;gap:14px;margin-bottom:8px}.sec-num[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:13px;font-weight:600;color:var(--d-accent-2)}.sec-title[data-v-fdff2b22]{font-size:26px;letter-spacing:-.02em}.sec-desc[data-v-fdff2b22]{font-size:15.5px;color:var(--d-fg-muted);max-width:720px;margin-bottom:28px}h3.sub[data-v-fdff2b22]{font-size:17px;margin:40px 0 14px;display:flex;align-items:center;gap:10px}h3.sub[data-v-fdff2b22]:before{content:"";width:4px;height:16px;border-radius:2px;background:var(--d-accent)}h4.mini[data-v-fdff2b22]{font-size:13px;text-transform:uppercase;letter-spacing:.06em;color:var(--d-fg-muted);margin:24px 0 12px}.stat-grid[data-v-fdff2b22]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:24px 0}.stat[data-v-fdff2b22]{background:var(--d-surface);border:1px solid var(--d-line);border-radius:14px;padding:18px 18px 16px}.stat .v[data-v-fdff2b22]{font-size:34px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--d-fg)}.stat .v small[data-v-fdff2b22]{font-size:16px;color:var(--d-fg-muted);font-weight:600}.stat .l[data-v-fdff2b22]{font-size:12.5px;color:var(--d-fg-muted);margin-top:8px;line-height:1.4}.stat.warn[data-v-fdff2b22]{background:var(--d-amber-soft);border-color:#f0d9b8}.stat.warn .v[data-v-fdff2b22]{color:var(--d-amber)}.stat.bad[data-v-fdff2b22]{background:var(--d-red-soft);border-color:#f0cccc}.stat.bad .v[data-v-fdff2b22]{color:var(--d-red)}.stat.good[data-v-fdff2b22]{background:var(--d-green-soft);border-color:#bfe3cc}.stat.good .v[data-v-fdff2b22]{color:var(--d-green)}.panel[data-v-fdff2b22]{background:var(--d-bg);border:1px solid var(--d-line);border-radius:16px;box-shadow:var(--d-shadow-sm)}.panel-pad[data-v-fdff2b22]{padding:22px}.panel-soft[data-v-fdff2b22]{background:var(--d-surface);border:1px solid var(--d-line);border-radius:14px}.callout[data-v-fdff2b22]{display:flex;gap:12px;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.55;background:var(--d-surface);border:1px solid var(--d-line);color:var(--d-fg-soft);margin:18px 0}.callout .ico[data-v-fdff2b22]{flex:none;width:20px;height:20px;border-radius:6px;display:grid;place-items:center;font-size:12px;font-weight:800}.callout.info[data-v-fdff2b22]{background:var(--d-accent-soft);border-color:var(--d-accent-bd)}.callout.info .ico[data-v-fdff2b22]{background:var(--d-accent);color:#fff}.callout.warn[data-v-fdff2b22]{background:var(--d-amber-soft);border-color:#f0d9b8}.callout.warn .ico[data-v-fdff2b22]{background:var(--d-amber);color:#fff}.callout.good[data-v-fdff2b22]{background:var(--d-green-soft);border-color:#bfe3cc}.callout.good .ico[data-v-fdff2b22]{background:var(--d-green);color:#fff}table.dt[data-v-fdff2b22]{width:100%;border-collapse:collapse;font-size:13.5px;margin:16px 0}table.dt th[data-v-fdff2b22]{text-align:left;font-size:11.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--d-fg-faint);font-weight:700;padding:10px 12px;border-bottom:1px solid var(--d-line)}table.dt td[data-v-fdff2b22]{padding:11px 12px;border-bottom:1px solid var(--d-line-2);color:var(--d-fg-soft);vertical-align:middle}table.dt tr:last-child td[data-v-fdff2b22]{border-bottom:none}table.dt td.tk[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg);white-space:nowrap}table.dt td.val[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.swatch[data-v-fdff2b22]{display:inline-block;width:16px;height:16px;border-radius:4px;border:1px solid rgba(0,0,0,.08);vertical-align:-3px;margin-right:8px}.palette[data-v-fdff2b22]{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:16px 0}.color-card[data-v-fdff2b22]{border:1px solid var(--d-line);border-radius:12px;overflow:hidden;background:var(--d-bg)}.color-chip[data-v-fdff2b22]{height:56px;border-bottom:1px solid var(--d-line)}.color-meta[data-v-fdff2b22]{padding:10px 12px 12px}.color-meta .cn[data-v-fdff2b22]{font-size:13px;font-weight:600;color:var(--d-fg)}.color-meta .cv[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--d-fg-muted);margin-top:2px}.type-row[data-v-fdff2b22]{display:flex;align-items:baseline;gap:18px;padding:13px 0;border-bottom:1px solid var(--d-line-2)}.type-row[data-v-fdff2b22]:last-child{border-bottom:none}.type-sample[data-v-fdff2b22]{flex:1;color:var(--d-fg);line-height:1.2}.type-meta[data-v-fdff2b22]{width:190px;flex:none;text-align:right;font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.space-row[data-v-fdff2b22]{display:flex;align-items:center;gap:16px;padding:10px 0;border-bottom:1px solid var(--d-line-2)}.space-row[data-v-fdff2b22]:last-child{border-bottom:none}.space-bar[data-v-fdff2b22]{height:18px;border-radius:4px;background:linear-gradient(90deg,var(--d-accent),var(--d-accent-2));flex:none}.space-meta[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:12.5px;color:var(--d-fg-soft);width:150px}.space-use[data-v-fdff2b22]{font-size:12.5px;color:var(--d-fg-muted)}.radius-grid[data-v-fdff2b22]{display:flex;flex-wrap:wrap;gap:22px;align-items:flex-end;margin:16px 0}.radius-item[data-v-fdff2b22]{display:flex;flex-direction:column;align-items:center;gap:10px}.radius-box[data-v-fdff2b22]{width:64px;height:64px;border:2px solid var(--d-accent);background:var(--d-accent-soft)}.radius-item .rl[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-soft)}.stage-wrap[data-v-fdff2b22]{border:1px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;background:var(--d-bg);box-shadow:var(--d-shadow-sm)}.stage-bar[data-v-fdff2b22]{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--d-line);background:var(--d-surface)}.stage-bar .st[data-v-fdff2b22]{font-size:13px;font-weight:600;color:var(--d-fg);display:flex;align-items:center;gap:8px}.stage-bar .st .tag[data-v-fdff2b22]{font-size:10.5px;font-weight:700;letter-spacing:.04em;padding:2px 7px;border-radius:999px}.tag.after[data-v-fdff2b22]{background:var(--d-green-soft);color:var(--d-green)}.tag.before[data-v-fdff2b22]{background:var(--d-red-soft);color:var(--d-red)}.tag.spec[data-v-fdff2b22]{background:var(--d-accent-soft);color:var(--d-accent-2)}.stage-bar .sactions[data-v-fdff2b22]{display:flex;gap:6px}.tab[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 10px;border-radius:6px;color:var(--d-fg-muted);cursor:default}.tab.on[data-v-fdff2b22]{background:var(--d-bg);color:var(--d-fg);border:1px solid var(--d-line)}.stage[data-v-fdff2b22]{padding:32px;display:flex;flex-wrap:wrap;align-items:center;gap:16px;background:radial-gradient(circle at 1px 1px,rgba(0,0,0,.045) 1px,transparent 0) 0 0 / 18px 18px,var(--d-surface)}.stage.col[data-v-fdff2b22]{flex-direction:column;align-items:stretch}.stage.dark[data-v-fdff2b22]{background:radial-gradient(circle at 1px 1px,rgba(255,255,255,.06) 1px,transparent 0) 0 0 / 18px 18px,#121212}.stage-label[data-v-fdff2b22]{width:100%;font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--d-fg-faint);margin-bottom:-6px}.stage.dark .stage-label[data-v-fdff2b22]{color:#6b7280}.ba[data-v-fdff2b22]{display:grid;grid-template-columns:1fr 1fr;gap:0;border:1px solid var(--d-line);border-radius:16px;overflow:hidden;margin:18px 0;box-shadow:var(--d-shadow-sm)}.ba-col[data-v-fdff2b22]{min-width:0}.ba-col+.ba-col[data-v-fdff2b22]{border-left:1px solid var(--d-line)}.ba-head[data-v-fdff2b22]{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;border-bottom:1px solid var(--d-line)}.ba-head.before[data-v-fdff2b22]{background:var(--d-red-soft)}.ba-head.after[data-v-fdff2b22]{background:var(--d-green-soft)}.ba-head .bh[data-v-fdff2b22]{font-size:13px;font-weight:700}.ba-head.before .bh[data-v-fdff2b22]{color:var(--d-red)}.ba-head.after .bh[data-v-fdff2b22]{color:var(--d-green)}.ba-head .bh small[data-v-fdff2b22]{font-weight:500;opacity:.7;margin-left:6px}.ba-body[data-v-fdff2b22]{padding:24px;background:var(--d-surface);min-height:120px}.ba-col.after .ba-body[data-v-fdff2b22]{background:#fff}.code[data-v-fdff2b22]{background:#121212;border-radius:12px;overflow:hidden;margin:16px 0;border:1px solid #121212}.code-bar[data-v-fdff2b22]{display:flex;align-items:center;gap:8px;padding:9px 14px;background:#1f1f1f;border-bottom:1px solid #1f1f1f}.code-bar .d[data-v-fdff2b22]{width:10px;height:10px;border-radius:50%;background:#30363d}.code-bar .fn[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:11.5px;color:#8b949e;margin-left:4px}.code pre[data-v-fdff2b22]{margin:0;padding:18px;overflow-x:auto;font-size:12.5px;line-height:1.7;color:#c9d1d9}.code .c[data-v-fdff2b22]{color:#8b949e}.code .k[data-v-fdff2b22]{color:#ff7b72}.code .s[data-v-fdff2b22]{color:#a5d6ff}.code .p[data-v-fdff2b22]{color:#79c0ff}.code .n[data-v-fdff2b22]{color:#d2a8ff}.code .v[data-v-fdff2b22]{color:#ffa657}.pill[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;padding:3px 9px;border-radius:999px;border:1px solid var(--d-line);background:var(--d-surface);color:var(--d-fg-soft)}.pill.blue[data-v-fdff2b22]{background:var(--d-accent-soft);border-color:var(--d-accent-bd);color:var(--d-accent-2)}.pill.green[data-v-fdff2b22]{background:var(--d-green-soft);border-color:#bfe3cc;color:var(--d-green)}.pill.amber[data-v-fdff2b22]{background:var(--d-amber-soft);border-color:#f0d9b8;color:var(--d-amber)}.pill.red[data-v-fdff2b22]{background:var(--d-red-soft);border-color:#f0cccc;color:var(--d-red)}.pill.mono[data-v-fdff2b22]{font-family:JetBrains Mono,monospace}ul.clean[data-v-fdff2b22]{list-style:none;padding:0;margin:14px 0}ul.clean li[data-v-fdff2b22]{position:relative;padding:8px 0 8px 26px;color:var(--d-fg-soft);border-bottom:1px solid var(--d-line-2)}ul.clean li[data-v-fdff2b22]:last-child{border-bottom:none}ul.clean li[data-v-fdff2b22]:before{content:"";position:absolute;left:4px;top:17px;width:7px;height:7px;border-radius:50%;background:var(--d-accent)}ul.clean.check li[data-v-fdff2b22]:before{content:"✓";background:none;color:var(--d-green);font-weight:800;top:7px;left:0;font-size:14px}ul.clean.cross li[data-v-fdff2b22]:before{content:"✕";background:none;color:var(--d-red);font-weight:800;top:7px;left:0;font-size:13px}ul.clean li b[data-v-fdff2b22]{color:var(--d-fg)}ul.clean li .path[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:12px;color:var(--d-fg-muted)}.roadmap[data-v-fdff2b22]{position:relative;margin:24px 0}.phase[data-v-fdff2b22]{position:relative;display:grid;grid-template-columns:120px 1fr;gap:24px;padding:0 0 32px}.phase[data-v-fdff2b22]:not(:last-child):after{content:"";position:absolute;left:59px;top:36px;bottom:0;width:2px;background:var(--d-line)}.phase-tag[data-v-fdff2b22]{text-align:right;padding-top:4px}.phase-tag .pt[data-v-fdff2b22]{display:inline-block;font-family:JetBrains Mono,monospace;font-size:12px;font-weight:700;color:var(--d-accent-2);background:var(--d-accent-soft);border:1px solid var(--d-accent-bd);padding:5px 10px;border-radius:8px}.phase-tag .pe[data-v-fdff2b22]{font-size:11.5px;color:var(--d-fg-faint);margin-top:8px}.phase-body[data-v-fdff2b22]{background:var(--d-bg);border:1px solid var(--d-line);border-radius:14px;padding:18px 20px;box-shadow:var(--d-shadow-sm)}.phase-body h4[data-v-fdff2b22]{font-size:16px;margin-bottom:8px}.phase-body p[data-v-fdff2b22]{font-size:14px;margin-bottom:12px}.phase-body ul[data-v-fdff2b22]{margin:0}.matrix[data-v-fdff2b22]{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:16px 0}.anti[data-v-fdff2b22]{border:1px solid var(--d-line);border-radius:12px;padding:16px;background:var(--d-bg)}.anti .ah[data-v-fdff2b22]{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:700;margin-bottom:8px}.anti .ah .verdict[data-v-fdff2b22]{margin-left:auto;font-size:11px;font-weight:800;padding:2px 8px;border-radius:999px}.verdict.pass[data-v-fdff2b22]{background:var(--d-green-soft);color:var(--d-green)}.verdict.fail[data-v-fdff2b22]{background:var(--d-red-soft);color:var(--d-red)}.verdict.warn[data-v-fdff2b22]{background:var(--d-amber-soft);color:var(--d-amber)}.anti p[data-v-fdff2b22]{font-size:13px;margin:0;color:var(--d-fg-muted)}.footer[data-v-fdff2b22]{margin-top:80px;padding-top:28px;border-top:1px solid var(--d-line);font-size:13px;color:var(--d-fg-faint);display:flex;justify-content:space-between;flex-wrap:wrap;gap:12px}.kbd[data-v-fdff2b22]{font-family:JetBrains Mono,monospace;font-size:11px;background:var(--d-surface-2);border:1px solid var(--d-line);border-bottom-width:2px;border-radius:5px;padding:1px 6px}@media(max-width:980px){.layout[data-v-fdff2b22]{grid-template-columns:1fr}.sidebar[data-v-fdff2b22]{position:static;height:auto}.nav[data-v-fdff2b22]{display:flex;flex-wrap:wrap;gap:4px}.content-inner[data-v-fdff2b22]{padding:40px 22px 80px}.stat-grid[data-v-fdff2b22]{grid-template-columns:repeat(2,1fr)}.ba[data-v-fdff2b22]{grid-template-columns:1fr}.ba-col+.ba-col[data-v-fdff2b22]{border-left:none;border-top:1px solid var(--d-line)}.palette[data-v-fdff2b22]{grid-template-columns:repeat(2,1fr)}.matrix[data-v-fdff2b22]{grid-template-columns:1fr}}.ds-page .p[data-v-fdff2b22],.ds-page .stage.p-skin[data-v-fdff2b22],.ds-page [data-p][data-v-fdff2b22]{--p-font-sans: var(--font-ui);--p-font-mono: var(--font-mono);--p-bg: var(--color-bg);--p-surface: var(--color-surface);--p-surface-raised: var(--color-surface-raised);--p-surface-sunken: var(--color-surface-sunken);--p-text: var(--color-text);--p-text-muted: var(--color-text-muted);--p-text-faint: var(--color-text-faint);--p-text-on-accent: var(--color-text-on-accent);--p-line: var(--color-line);--p-line-strong: var(--color-line-strong);--p-accent: var(--color-accent);--p-accent-hover: var(--color-accent-hover);--p-accent-soft: var(--color-accent-soft);--p-accent-bd: var(--color-accent-bd);--p-success: var(--color-success);--p-success-soft: var(--color-success-soft);--p-success-bd: var(--color-success-bd);--p-warning: var(--color-warning);--p-warning-soft: var(--color-warning-soft);--p-warning-bd: var(--color-warning-bd);--p-danger: var(--color-danger);--p-danger-soft: var(--color-danger-soft);--p-danger-bd: var(--color-danger-bd);--p-info: var(--color-info);--p-sp-1: var(--space-1);--p-sp-2: var(--space-2);--p-sp-3: var(--space-3);--p-sp-4: var(--space-4);--p-sp-5: var(--space-5);--p-sp-6: var(--space-6);--p-sp-8: var(--space-8);--p-r-xs: var(--radius-xs);--p-r-sm: var(--radius-sm);--p-r-md: var(--radius-md);--p-r-lg: var(--radius-lg);--p-r-xl: var(--radius-xl);--p-r-2xl: var(--radius-2xl);--p-r-full: var(--radius-full);--p-sh-xs: var(--shadow-xs);--p-sh-sm: var(--shadow-sm);--p-sh-md: var(--shadow-md);--p-sh-lg: var(--shadow-lg);--p-sh-xl: var(--shadow-xl);--p-font-size-xs: var(--text-xs);--p-font-size-sm: var(--text-sm);--p-font-size-base: var(--text-base);--p-font-size-md: var(--text-base);--p-font-size-lg: var(--text-lg);--p-font-size-xl: var(--text-xl);--p-font-size-2xl: var(--text-2xl);--p-leading-tight: var(--leading-tight);--p-leading-normal: var(--leading-normal);--p-leading-relaxed: var(--leading-relaxed);--p-ease: var(--ease-out);--p-ease-inout: var(--ease-in-out);--p-dur-fast: var(--duration-fast);--p-dur: var(--duration-base);--p-dur-slow: var(--duration-slow);font-family:var(--font-ui);color:var(--color-text);font-size:var(--text-base)}.ds-page [data-p=dark][data-v-fdff2b22]{--p-bg: #121212;--p-surface: #1f1f1f;--p-surface-raised: #292929;--p-surface-sunken: #121212;--p-text: #c9cdd4;--p-text-muted: #9aa0a8;--p-text-faint: #6b7280;--p-text-on-accent: #ffffff;--p-line: #2d333b;--p-line-strong: #3d444d;--p-accent: #58a6ff;--p-accent-hover: #79b8ff;--p-accent-soft: rgba(88,166,255,.14);--p-accent-bd: rgba(88,166,255,.28);--p-success: #3fb950;--p-success-soft: rgba(63,185,80,.14);--p-success-bd: rgba(63,185,80,.28);--p-warning: #d29922;--p-warning-soft: rgba(210,153,34,.14);--p-warning-bd: rgba(210,153,34,.28);--p-danger: #f85149;--p-danger-soft: rgba(248,81,73,.14);--p-danger-bd: rgba(248,81,73,.28);--p-sh-sm: 0 1px 2px rgba(0,0,0,.4);--p-sh-md: 0 4px 12px rgba(0,0,0,.45);--p-sh-lg: 0 12px 32px rgba(0,0,0,.55);--p-selection: rgba(88,166,255,.32)}.p-ic[data-v-fdff2b22]{width:16px;height:16px;flex:none;display:inline-block;vertical-align:middle}.p-btn[data-v-fdff2b22]{--_h: 36px;--_px: 16px;--_fs: var(--p-font-size-base);--_r: var(--p-r-md);display:inline-flex;align-items:center;justify-content:center;gap:8px;height:var(--_h);padding:0 var(--_px);border-radius:var(--_r);font-family:var(--p-font-sans);font-size:var(--_fs);font-weight:600;line-height:1;border:1px solid transparent;cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease),transform var(--p-dur-fast) var(--p-ease)}.p-btn[data-v-fdff2b22]:active{transform:scale(.98)}.p-btn[data-v-fdff2b22]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft),0 0 0 1px var(--p-accent)}.p-btn .p-ic[data-v-fdff2b22]{width:16px;height:16px}.p-btn.sm[data-v-fdff2b22]{--_h: 30px;--_px: 12px;--_fs: var(--p-font-size-sm);--_r: var(--p-r-sm)}.p-btn.sm .p-ic[data-v-fdff2b22]{width:14px;height:14px}.p-btn.lg[data-v-fdff2b22]{--_h: 42px;--_px: 20px;--_fs: var(--p-font-size-md);--_r: var(--p-r-lg)}.p-btn.primary[data-v-fdff2b22]{background:var(--p-accent);color:var(--p-text-on-accent);border-color:var(--p-accent);box-shadow:var(--p-sh-xs)}.p-btn.primary[data-v-fdff2b22]:hover{background:var(--p-accent-hover);border-color:var(--p-accent-hover)}.p-btn.secondary[data-v-fdff2b22]{background:var(--p-surface-raised);color:var(--p-text);border-color:var(--p-line-strong);box-shadow:var(--p-sh-xs)}.p-btn.secondary[data-v-fdff2b22]:hover{background:var(--p-surface-sunken);border-color:var(--p-line-strong)}.p-btn.ghost[data-v-fdff2b22]{background:transparent;color:var(--p-text);border-color:transparent}.p-btn.ghost[data-v-fdff2b22]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-btn.danger[data-v-fdff2b22]{background:var(--p-danger);color:#fff;border-color:var(--p-danger);box-shadow:var(--p-sh-xs)}.p-btn.danger[data-v-fdff2b22]:hover{filter:brightness(.96)}.p-btn.danger-soft[data-v-fdff2b22]{background:var(--p-danger-soft);color:var(--p-danger);border-color:var(--p-danger-bd)}.p-btn.danger-soft[data-v-fdff2b22]:hover{background:var(--p-danger);color:#fff;border-color:var(--p-danger)}.p-btn[disabled][data-v-fdff2b22],.p-btn.disabled[data-v-fdff2b22]{opacity:.5;cursor:not-allowed;box-shadow:none;transform:none}.p-icon-btn[data-v-fdff2b22]{--_s: 32px;display:inline-grid;place-items:center;width:var(--_s);height:var(--_s);flex:none;border-radius:var(--p-r-md);border:1px solid transparent;background:transparent;color:var(--p-text-muted);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-icon-btn[data-v-fdff2b22]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-icon-btn[data-v-fdff2b22]:focus-visible{outline:none;box-shadow:0 0 0 3px var(--p-accent-soft)}.p-icon-btn.sm[data-v-fdff2b22]{--_s: 26px;border-radius:var(--p-r-sm)}.p-icon-btn.lg[data-v-fdff2b22]{--_s: 44px}.p-icon-btn .p-ic[data-v-fdff2b22]{width:16px;height:16px}.p-icon-btn.lg .p-ic[data-v-fdff2b22]{width:20px;height:20px}.p-badge[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:6px;height:22px;padding:0 9px;border-radius:var(--p-r-full);font-family:var(--p-font-sans);font-size:var(--p-font-size-xs);font-weight:600;line-height:1;border:1px solid var(--p-line);background:var(--p-surface);color:var(--p-text);white-space:nowrap}.p-badge.sm[data-v-fdff2b22]{height:18px;padding:0 7px;font-size:11px}.p-badge .bd[data-v-fdff2b22]{width:7px;height:7px;border-radius:50%;background:currentColor}.p-badge.neutral[data-v-fdff2b22]{background:var(--p-surface-sunken);border-color:var(--p-line);color:var(--p-text-muted)}.p-badge.info[data-v-fdff2b22]{background:var(--p-accent-soft);border-color:var(--p-accent-bd);color:var(--p-accent-hover)}.p-badge.success[data-v-fdff2b22]{background:var(--p-success-soft);border-color:var(--p-success-bd);color:var(--p-success)}.p-badge.warning[data-v-fdff2b22]{background:var(--p-warning-soft);border-color:var(--p-warning-bd);color:var(--p-warning)}.p-badge.danger[data-v-fdff2b22]{background:var(--p-danger-soft);border-color:var(--p-danger-bd);color:var(--p-danger)}.p-badge.solid[data-v-fdff2b22]{background:var(--p-text);color:var(--p-bg);border-color:var(--p-text)}.p-badge .p-ic[data-v-fdff2b22]{width:12px;height:12px}.p-kbd[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:3px}.p-kbd kbd[data-v-fdff2b22]{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;padding:0 5px;border:1px solid var(--p-line);border-bottom-width:2px;border-radius:var(--p-r-xs);background:var(--p-surface-sunken);color:var(--p-text-muted);font-family:var(--p-font-sans);font-size:11px;line-height:1}.p-pill[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px;border-radius:var(--p-r-md);border:1px solid transparent;background:transparent;font-family:var(--p-font-sans);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-pill[data-v-fdff2b22]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-pill .pp-strong[data-v-fdff2b22]{font-weight:700;color:var(--p-text)}.p-pill .pp-sub[data-v-fdff2b22]{color:var(--p-accent);font-weight:600}.p-pill .p-ic[data-v-fdff2b22]{width:14px;height:14px;color:var(--p-text-faint)}.p-card[data-v-fdff2b22]{background:var(--p-surface);border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;color:var(--p-text)}.p-card.interactive[data-v-fdff2b22]{transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease);cursor:pointer}.p-card.interactive[data-v-fdff2b22]:hover{background:var(--p-surface);border-color:var(--p-line-strong)}.p-card-head[data-v-fdff2b22]{display:flex;align-items:center;gap:9px;padding:10px 14px;border-bottom:1px solid var(--p-line);background:var(--p-surface)}.p-card-title[data-v-fdff2b22]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text);font-family:var(--p-font-mono)}.p-card-body[data-v-fdff2b22]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-card-foot[data-v-fdff2b22]{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:10px 14px;border-top:1px solid var(--p-line);background:var(--p-surface)}.p-field[data-v-fdff2b22]{display:flex;flex-direction:column;gap:6px}.p-label[data-v-fdff2b22]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-input[data-v-fdff2b22],.p-select[data-v-fdff2b22],.p-textarea[data-v-fdff2b22]{width:100%;height:38px;padding:0 12px;border-radius:var(--p-r-md);border:1px solid var(--p-line-strong);background:var(--p-surface-raised);font-family:var(--p-font-sans);font-size:var(--p-font-size-base);color:var(--p-text);box-shadow:var(--p-sh-xs);transition:border-color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-textarea[data-v-fdff2b22]{height:auto;min-height:84px;padding:10px 12px;resize:vertical;line-height:var(--p-leading-normal)}.p-input[data-v-fdff2b22]:hover,.p-select[data-v-fdff2b22]:hover,.p-textarea[data-v-fdff2b22]:hover{border-color:var(--p-line-strong)}.p-input[data-v-fdff2b22]:focus,.p-select[data-v-fdff2b22]:focus,.p-textarea[data-v-fdff2b22]:focus{outline:none;border-color:var(--p-accent);box-shadow:0 0 0 3px var(--p-accent-soft)}.p-input[data-v-fdff2b22]::placeholder,.p-textarea[data-v-fdff2b22]::placeholder{color:var(--p-text-faint)}.p-input.sm[data-v-fdff2b22]{height:32px;font-size:var(--p-font-size-sm);border-radius:var(--p-r-sm)}.p-hint[data-v-fdff2b22]{font-size:var(--p-font-size-xs);color:var(--p-text-faint)}.p-dialog[data-v-fdff2b22]{width:480px;max-width:calc(100vw - 48px);background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-xl);overflow:hidden;color:var(--p-text)}.p-dialog-head[data-v-fdff2b22]{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px 22px 14px}.p-dialog-title[data-v-fdff2b22]{font-size:var(--p-font-size-lg);font-weight:700;letter-spacing:-.01em}.p-dialog-desc[data-v-fdff2b22]{font-size:var(--p-font-size-base);color:var(--p-text-muted);margin-top:4px;line-height:var(--p-leading-normal)}.p-dialog-body[data-v-fdff2b22]{padding:4px 22px 18px}.p-dialog-foot[data-v-fdff2b22]{display:flex;justify-content:flex-end;gap:10px;padding:14px 22px 20px}.p-toast[data-v-fdff2b22]{display:flex;align-items:flex-start;gap:11px;width:360px;padding:13px 14px;background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-md)}.p-toast .ti[data-v-fdff2b22]{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;flex:none;margin-top:1px}.p-toast.success .ti[data-v-fdff2b22]{background:var(--p-success-soft);color:var(--p-success)}.p-toast.warning .ti[data-v-fdff2b22]{background:var(--p-warning-soft);color:var(--p-warning)}.p-toast .tt[data-v-fdff2b22]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-toast .td[data-v-fdff2b22]{font-size:var(--p-font-size-sm);color:var(--p-text-muted);margin-top:2px;line-height:1.45}.p-spinner[data-v-fdff2b22]{width:18px;height:18px;animation:p-spin-fdff2b22 .85s linear infinite}.p-spinner.sm[data-v-fdff2b22]{width:14px;height:14px}.p-spinner circle[data-v-fdff2b22]{fill:none;stroke-width:2.2;stroke-linecap:round}.p-spinner .track[data-v-fdff2b22]{stroke:var(--p-line)}.p-spinner .arc[data-v-fdff2b22]{stroke:var(--p-accent);stroke-dasharray:56 56;stroke-dashoffset:38}@keyframes p-spin-fdff2b22{to{transform:rotate(360deg)}}.p-thinking[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:9px;font-size:var(--p-font-size-sm);color:var(--p-text-muted);font-family:var(--p-font-sans)}.p-bubble-user[data-v-fdff2b22]{align-self:flex-end;max-width:78%;background:var(--color-user-bubble-bg);color:var(--p-text);border-radius:var(--radius-lg);padding:10px 12px;font-size:var(--p-font-size-md);line-height:var(--p-leading-normal)}.p-msg[data-v-fdff2b22]{max-width:760px;font-size:var(--p-font-size-md);line-height:var(--p-leading-relaxed);color:var(--p-text)}.p-msg p[data-v-fdff2b22]{margin:0 0 10px;color:var(--p-text)}.p-msg code[data-v-fdff2b22]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);border:1px solid var(--p-line);color:var(--p-accent-hover);padding:1px 6px;border-radius:5px;font-size:.9em}.p-agent[data-v-fdff2b22]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden}.p-agent-head[data-v-fdff2b22]{display:flex;align-items:center;gap:10px;padding:11px 14px}.p-agent-av[data-v-fdff2b22]{width:22px;height:22px;border-radius:7px;display:grid;place-items:center;background:var(--p-surface-sunken);border:1px solid var(--p-line);color:var(--p-text-muted);flex:none}.p-agent-name[data-v-fdff2b22]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-agent-phase[data-v-fdff2b22]{font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-agent-body[data-v-fdff2b22]{padding:0 14px 13px}.p-tool[data-v-fdff2b22]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden}.p-tool-head[data-v-fdff2b22]{display:flex;align-items:center;gap:9px;padding:9px 13px;background:var(--p-surface);border-bottom:1px solid var(--p-line)}.p-tool-ic[data-v-fdff2b22]{width:18px;height:18px;border-radius:5px;display:grid;place-items:center;background:var(--p-accent-soft);color:var(--p-accent);flex:none}.p-tool-name[data-v-fdff2b22]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-tool-body[data-v-fdff2b22]{padding:12px 13px}.p-code[data-v-fdff2b22]{font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;background:var(--p-surface-sunken);border:1px solid var(--p-line);border-radius:var(--p-r-md);padding:11px 13px;color:var(--p-text);overflow-x:auto}.p-action[data-v-fdff2b22]{border-radius:var(--p-r-md);overflow:hidden;border:1px solid var(--p-accent-bd);background:var(--p-surface)}.p-action.warn[data-v-fdff2b22]{border-color:var(--p-warning-bd)}.p-action-head[data-v-fdff2b22]{display:flex;align-items:center;gap:9px;padding:10px 14px;background:var(--p-accent-soft);border-bottom:1px solid var(--p-accent-bd)}.p-action.warn .p-action-head[data-v-fdff2b22]{background:var(--p-warning-soft);border-bottom-color:var(--p-warning-bd)}.p-action-title[data-v-fdff2b22]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-accent-hover)}.p-action.warn .p-action-title[data-v-fdff2b22]{color:var(--p-warning)}.p-action-body[data-v-fdff2b22]{padding:14px;font-size:var(--p-font-size-base);color:var(--p-text);line-height:var(--p-leading-normal)}.p-action-foot[data-v-fdff2b22]{display:flex;justify-content:flex-end;gap:8px;padding:11px 14px;border-top:1px solid var(--p-line);background:var(--p-surface)}.p-todo[data-v-fdff2b22]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-md);padding:6px}.p-todo-row[data-v-fdff2b22]{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--p-r-md);font-size:var(--p-font-size-base);color:var(--p-text)}.p-todo-row.done[data-v-fdff2b22]{color:var(--p-text-faint);text-decoration:line-through}.p-todo-row.active[data-v-fdff2b22]{background:var(--p-accent-soft);color:var(--p-text)}.p-todo-check[data-v-fdff2b22]{width:16px;flex:none;font-size:var(--p-font-size-base);line-height:1;text-align:center;user-select:none;color:var(--p-text-faint)}.p-todo-row.done .p-todo-check[data-v-fdff2b22]{color:var(--p-success)}.p-todo-row.active .p-todo-check[data-v-fdff2b22]{color:var(--p-accent);font-weight:500}.p-dot[data-v-fdff2b22]{width:7px;height:7px;border-radius:50%;flex:none;background:var(--p-text-faint)}.p-dot.done[data-v-fdff2b22]{background:var(--p-success)}.p-dot.error[data-v-fdff2b22]{background:var(--p-danger)}.p-dot.running[data-v-fdff2b22]{background:var(--p-accent);box-shadow:0 0 0 0 var(--p-accent-soft);animation:p-pulse-fdff2b22 1.4s ease-out infinite}@keyframes p-pulse-fdff2b22{0%{box-shadow:0 0 #1783ff66}to{box-shadow:0 0 0 6px #1783ff00}}.p-tool-group[data-v-fdff2b22]{border:1px solid var(--p-line);border-radius:var(--p-r-md);background:var(--p-surface);overflow:hidden}.p-tool-group-head[data-v-fdff2b22]{display:flex;align-items:center;gap:8px;height:32px;padding:0 11px;cursor:pointer;font-size:var(--p-font-size-sm);color:var(--p-text-muted);user-select:none}.p-tool-group-head[data-v-fdff2b22]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-tool-group-head .tg-title[data-v-fdff2b22]{font-weight:600;color:var(--p-text)}.p-tool-group-head .tg-meta[data-v-fdff2b22]{color:var(--p-text-faint)}.p-tool-group-head .tg-car[data-v-fdff2b22]{margin-left:auto;width:14px;height:14px;color:var(--p-text-faint);transition:transform var(--p-dur) var(--p-ease)}.p-tool-group.open .p-tool-group-head .tg-car[data-v-fdff2b22]{transform:rotate(90deg)}.p-tool-row[data-v-fdff2b22]{display:flex;align-items:center;gap:8px;height:30px;padding:0 11px;border-top:1px solid var(--p-line-2, var(--p-line));cursor:pointer;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-tool-row[data-v-fdff2b22]:hover{background:var(--p-surface-sunken)}.p-tool-row .tr-ic[data-v-fdff2b22]{width:14px;height:14px;color:var(--p-text-faint);flex:none}.p-tool-row .tr-name[data-v-fdff2b22]{font-weight:600;color:var(--p-text);flex:none}.p-tool-row .tr-arg[data-v-fdff2b22]{color:var(--p-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.p-tool-row .tr-time[data-v-fdff2b22]{margin-left:auto;color:var(--p-text-faint);font-size:var(--p-font-size-xs);flex:none}.p-tool-row .tr-car[data-v-fdff2b22]{width:13px;height:13px;color:var(--p-text-faint);flex:none;transition:transform var(--p-dur) var(--p-ease)}.p-tool-row.expanded[data-v-fdff2b22]{background:var(--p-surface-sunken)}.p-tool-row.expanded .tr-car[data-v-fdff2b22]{transform:rotate(90deg)}.p-tool-detail[data-v-fdff2b22]{padding:0 11px 11px;background:var(--p-surface-sunken);border-top:1px solid var(--p-line)}.p-tool-detail .p-code[data-v-fdff2b22]{margin-top:10px}.p-composer[data-v-fdff2b22]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-xl);box-shadow:var(--p-sh-md);overflow:hidden}.p-composer[data-v-fdff2b22]:focus-within{border-color:var(--p-accent);box-shadow:var(--p-sh-md),0 0 0 3px var(--p-accent-soft)}.p-composer-ta[data-v-fdff2b22]{padding:14px 16px 8px;font-family:var(--p-font-sans);font-size:var(--p-font-size-md);color:var(--p-text);line-height:var(--p-leading-normal)}.p-composer-ta.ph[data-v-fdff2b22]{color:var(--p-text-faint)}.p-composer-bar[data-v-fdff2b22]{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px 8px}.p-composer-left[data-v-fdff2b22],.p-composer-right[data-v-fdff2b22]{display:flex;align-items:center;gap:2px}.p-send[data-v-fdff2b22]{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--p-accent);color:var(--p-text-on-accent);border:none;cursor:pointer;box-shadow:var(--p-sh-xs);transition:transform var(--p-dur-fast) var(--p-ease),background var(--p-dur) var(--p-ease)}.p-send[data-v-fdff2b22]:hover{background:var(--p-accent-hover)}.p-send[data-v-fdff2b22]:active{transform:scale(.92)}.p-send .p-ic[data-v-fdff2b22]{width:16px;height:16px}.p[data-v-fdff2b22] ::selection,[data-p][data-v-fdff2b22] ::selection{background:var(--p-selection)}.p-link[data-v-fdff2b22]{color:var(--p-accent);text-decoration:none;font-family:var(--p-font-sans);transition:color var(--p-dur) var(--p-ease)}.p-link[data-v-fdff2b22]:hover{color:var(--p-accent-hover);text-decoration:underline}.p-link[data-v-fdff2b22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring);border-radius:var(--p-r-xs)}.p-link.muted[data-v-fdff2b22]{color:var(--p-text-muted)}.p-link.muted[data-v-fdff2b22]:hover{color:var(--p-text)}.p-link .p-ic[data-v-fdff2b22]{width:var(--p-ic-sm);height:var(--p-ic-sm);vertical-align:-2px}.p-menu[data-v-fdff2b22]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-lg);box-shadow:var(--p-sh-sm);padding:var(--p-sp-1);min-width:180px;font-family:var(--p-font-sans);color:var(--p-text)}.p-menu-item[data-v-fdff2b22]{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);color:var(--p-text);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-menu-item[data-v-fdff2b22]:hover{background:var(--p-surface-sunken);color:var(--p-text)}.p-menu-item.active[data-v-fdff2b22],.p-menu-item.active[data-v-fdff2b22]:hover{background:var(--p-accent-soft);color:var(--p-accent-hover)}.p-menu-item.danger[data-v-fdff2b22]{color:var(--p-danger)}.p-menu-item.danger[data-v-fdff2b22]:hover{background:var(--p-danger-soft);color:var(--p-danger)}.p-menu-item.disabled[data-v-fdff2b22]{opacity:.5;cursor:not-allowed}.p-menu-item.disabled[data-v-fdff2b22]:hover{background:transparent;color:var(--p-text)}.p-menu-item .p-ic[data-v-fdff2b22]{width:var(--p-ic-sm);height:var(--p-ic-sm)}.p-menu-item.lg[data-v-fdff2b22]{min-height:44px;padding:12px 14px;font-size:var(--p-font-size-base)}.p-menu-sep[data-v-fdff2b22]{height:1px;background:var(--p-line);margin:4px 0}.p-seg[data-v-fdff2b22]{display:inline-flex;gap:2px;padding:2px;background:var(--p-surface-sunken);border:1px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-sans)}.p-seg-item[data-v-fdff2b22]{padding:5px 12px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text);cursor:pointer;white-space:nowrap;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease),box-shadow var(--p-dur) var(--p-ease)}.p-seg-item[data-v-fdff2b22]:hover{color:var(--p-text)}.p-seg-item.on[data-v-fdff2b22]{background:var(--p-surface-raised);color:var(--p-text);box-shadow:var(--p-sh-xs)}.p-tabs[data-v-fdff2b22]{display:flex;align-items:center;gap:0;border-bottom:1px solid var(--p-line);font-family:var(--p-font-sans)}.p-tab[data-v-fdff2b22]{padding:8px 14px;font-size:var(--p-font-size-sm);font-weight:500;color:var(--p-text-muted);cursor:pointer;white-space:nowrap;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-tab[data-v-fdff2b22]:hover{color:var(--p-text)}.p-tab.on[data-v-fdff2b22]{color:var(--p-accent);border-bottom-color:var(--p-accent)}.p-switch[data-v-fdff2b22]{position:relative;display:inline-block;width:36px;height:20px;flex:none;border-radius:var(--p-r-full);background:var(--p-line-strong);cursor:pointer;transition:background var(--p-dur) var(--p-ease)}.p-switch[data-v-fdff2b22]:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:var(--p-r-full);background:var(--surface-light);box-shadow:var(--p-sh-xs);transition:transform var(--p-dur) var(--p-ease)}.p-switch.on[data-v-fdff2b22]{background:var(--p-accent)}.p-switch.on[data-v-fdff2b22]:after{background:var(--p-text-on-accent);transform:translate(16px)}.p-switch[data-v-fdff2b22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check[data-v-fdff2b22]{width:17px;height:17px;flex:none;display:inline-grid;place-items:center;border:1.5px solid var(--p-line-strong);border-radius:var(--p-r-sm);background:var(--p-surface-raised);color:var(--p-text-on-accent);cursor:pointer;transition:background var(--p-dur) var(--p-ease),border-color var(--p-dur) var(--p-ease)}.p-check.on[data-v-fdff2b22]{background:var(--p-accent);border-color:var(--p-accent)}.p-check[data-v-fdff2b22]:focus-visible{outline:none;box-shadow:var(--p-focus-ring)}.p-check .p-ic[data-v-fdff2b22]{width:12px;height:12px}.p-avatar[data-v-fdff2b22]{width:32px;height:32px;flex:none;display:grid;place-items:center;border-radius:var(--p-r-md);background:var(--p-surface-sunken);border:1px solid var(--p-line);color:var(--p-text-muted);font-size:var(--p-font-size-sm);font-weight:600}.p-avatar.sm[data-v-fdff2b22]{width:24px;height:24px;border-radius:var(--p-r-sm);font-size:var(--p-font-size-xs)}.p-avatar .p-ic[data-v-fdff2b22]{width:16px;height:16px}.p-avatar.sm .p-ic[data-v-fdff2b22]{width:13px;height:13px}.p-empty[data-v-fdff2b22]{display:flex;flex-direction:column;align-items:center;gap:8px;padding:32px 16px;color:var(--p-text-muted);text-align:center}.p-empty .em-ic[data-v-fdff2b22]{width:48px;height:48px;color:var(--p-text-faint)}.p-empty .em-title[data-v-fdff2b22]{font-size:var(--p-font-size-base);font-weight:600;color:var(--p-text)}.p-empty .em-hint[data-v-fdff2b22]{font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-divider[data-v-fdff2b22]{width:100%;height:1px;background:var(--p-line);border:none}.p-divider-v[data-v-fdff2b22]{width:1px;align-self:stretch;background:var(--p-line);border:none}.p-tip[data-v-fdff2b22]{position:relative;display:inline-flex}.p-tip .p-tooltip[data-v-fdff2b22]{position:absolute;bottom:calc(100% + 6px);left:50%;transform:translate(-50%);background:var(--p-text);color:var(--p-bg);font-size:var(--p-font-size-xs);padding:4px 8px;border-radius:var(--p-r-sm);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--p-dur-fast) var(--p-ease)}.p-tip:hover .p-tooltip[data-v-fdff2b22]{opacity:1}.p-banner[data-v-fdff2b22]{display:flex;align-items:center;gap:10px;padding:10px 14px;border-radius:var(--p-r-md);border:1px solid var(--p-line);background:var(--p-surface);font-size:var(--p-font-size-sm);color:var(--p-text)}.p-banner .bn-ic[data-v-fdff2b22]{width:18px;height:18px;flex:none}.p-banner.info[data-v-fdff2b22]{background:var(--p-accent-soft);border-color:var(--p-accent-bd)}.p-banner.info .bn-ic[data-v-fdff2b22]{color:var(--p-accent)}.p-banner.warning[data-v-fdff2b22]{background:var(--p-warning-soft);border-color:var(--p-warning-bd)}.p-banner.warning .bn-ic[data-v-fdff2b22]{color:var(--p-warning)}.p-banner.danger[data-v-fdff2b22]{background:var(--p-danger-soft);border-color:var(--p-danger-bd)}.p-banner.danger .bn-ic[data-v-fdff2b22]{color:var(--p-danger)}.p-sheet[data-v-fdff2b22]{background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-xl) var(--p-r-xl) 0 0;box-shadow:var(--p-sh-xl);padding:8px 16px 20px}.p-sheet-handle[data-v-fdff2b22]{width:36px;height:4px;border-radius:var(--p-r-full);background:var(--p-line-strong);margin:0 auto 8px}.p-skeleton[data-v-fdff2b22]{background:var(--p-surface-sunken);border-radius:var(--p-r-sm);animation:p-skel-fdff2b22 1.2s var(--p-ease-inout) infinite alternate}@keyframes p-skel-fdff2b22{0%{opacity:.5}to{opacity:1}}.p-cmdbar[data-v-fdff2b22]{display:flex;align-items:center;gap:8px;width:100%}.p-cmd[data-v-fdff2b22]{flex:1;min-width:0;height:38px;display:flex;align-items:center;gap:10px;padding:0 10px 0 14px;background:var(--p-surface-sunken);border:1px solid var(--p-line);border-radius:var(--p-r-md);font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);color:var(--p-text-muted)}.p-cmd .cmd-text[data-v-fdff2b22]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.p-cmd .cmd-copy[data-v-fdff2b22]{margin-left:auto;flex:none;display:grid;place-items:center;width:26px;height:26px;border:none;background:transparent;border-radius:var(--p-r-sm);color:var(--p-text-faint);cursor:pointer;transition:background var(--p-dur) var(--p-ease),color var(--p-dur) var(--p-ease)}.p-cmd .cmd-copy[data-v-fdff2b22]:hover{background:var(--p-surface-raised);color:var(--p-text)}.p-cmd .cmd-copy .p-ic[data-v-fdff2b22]{width:15px;height:15px}.p-topbar[data-v-fdff2b22]{display:flex;align-items:center;justify-content:space-between;gap:12px;height:48px;padding:0 16px;background:var(--p-surface-raised);border:1px solid var(--p-line);border-radius:var(--p-r-lg)}.p-topbar .tb-title[data-v-fdff2b22]{font-size:var(--p-font-size-sm);font-weight:600;color:var(--p-text)}.p-topbar .tb-actions[data-v-fdff2b22]{display:flex;align-items:center;gap:4px}.p-topbar.frost[data-v-fdff2b22]{background:#ffffffb8;backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border-color:#fff9}[data-p=dark] .p-topbar.frost[data-v-fdff2b22]{background:#161b22b8;border-color:#ffffff14}.demo-family-black[data-v-fdff2b22]{--p-accent: #14171c;--p-accent-hover: #2f3540;--p-accent-soft: #f1f2f4;--p-accent-bd: #d8dbe0;--p-text-on-accent: #ffffff}.demo-row[data-v-fdff2b22]{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.demo-stack[data-v-fdff2b22]{display:flex;flex-direction:column;gap:12px;width:100%}.demo-col[data-v-fdff2b22]{display:flex;flex-direction:column;gap:10px}.demo-grow[data-v-fdff2b22]{flex:1;min-width:0}.demo-chat[data-v-fdff2b22]{display:flex;flex-direction:column;gap:14px;width:100%;max-width:560px}.icon-grid[data-v-fdff2b22]{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px;margin:14px 0}.icon-group-label[data-v-fdff2b22]{grid-column:1 / -1;margin-top:10px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--d-fg-muted)}.icon-cell[data-v-fdff2b22]{display:flex;align-items:center;gap:10px;padding:8px 10px;border:1px solid var(--d-line);border-radius:8px;background:var(--d-surface)}.icon-cell .ui-icon[data-v-fdff2b22]{width:20px;height:20px;color:var(--d-fg-soft)}.icon-cell .ic-name[data-v-fdff2b22]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;color:var(--d-fg)}.icon-sizes[data-v-fdff2b22]{display:flex;align-items:end;gap:22px;flex-wrap:wrap}.icon-sizes .sz[data-v-fdff2b22]{display:flex;flex-direction:column;align-items:center;gap:8px;font-size:11px;color:var(--d-fg-muted);font-family:JetBrains Mono,ui-monospace,monospace}.p-code-inline[data-v-fdff2b22]{font-family:var(--p-font-mono);background:var(--p-surface-sunken);color:var(--p-text);padding:0 5px;border-radius:var(--p-r-sm);font-size:.9em}.p-code-block[data-v-fdff2b22]{border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;background:var(--p-surface-sunken)}.p-code-block-head[data-v-fdff2b22]{display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:var(--p-surface);border-bottom:1px solid var(--p-line);font-family:var(--p-font-mono);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-code-block pre[data-v-fdff2b22]{margin:0;padding:12px 14px;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm);line-height:1.65;color:var(--p-text);overflow-x:auto}.p-diff[data-v-fdff2b22]{border:1px solid var(--p-line);border-radius:var(--p-r-md);overflow:hidden;font-family:var(--p-font-mono);font-size:var(--p-font-size-sm)}.p-diff-head[data-v-fdff2b22]{padding:8px 12px;background:var(--p-surface);border-bottom:1px solid var(--p-line);font-size:var(--p-font-size-xs);color:var(--p-text-muted)}.p-diff-row[data-v-fdff2b22]{display:flex;gap:10px;padding:2px 12px;line-height:1.6}.p-diff-row .pm[data-v-fdff2b22]{width:14px;flex:none;color:var(--p-text-faint)}.p-diff-row.add[data-v-fdff2b22]{background:var(--p-success-soft)}.p-diff-row.add .pm[data-v-fdff2b22]{color:var(--p-success)}.p-diff-row.del[data-v-fdff2b22]{background:var(--p-danger-soft)}.p-diff-row.del .pm[data-v-fdff2b22]{color:var(--p-danger)}.p-diff-row .p-diff-code[data-v-fdff2b22]{color:var(--p-text)}.p-field-error[data-v-fdff2b22]{color:var(--p-danger);font-size:var(--p-font-size-xs)}.p-btn .p-spinner[data-v-fdff2b22]{vertical-align:middle}.p-btn .p-spinner .track[data-v-fdff2b22]{stroke:currentColor;opacity:.35}.p-btn .p-spinner .arc[data-v-fdff2b22]{stroke:currentColor}.ds-page[data-v-fdff2b22]{position:fixed;inset:0;z-index:var(--z-max);overflow-y:auto}.ds-topbar[data-v-fdff2b22]{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:var(--space-3);padding:var(--space-2) var(--space-4);background:var(--color-surface);border-bottom:1px solid var(--color-line)}.ds-back[data-v-fdff2b22]{display:inline-flex;align-items:center;gap:var(--space-1);padding:var(--space-1) var(--space-3);border:1px solid var(--color-line);border-radius:var(--radius-md);background:var(--color-surface-raised);color:var(--color-text);font-family:var(--font-ui);font-size:var(--text-sm);cursor:pointer}.ds-back[data-v-fdff2b22]:hover{background:var(--color-surface-sunken)}.ds-topbar-title[data-v-fdff2b22]{font-size:var(--text-sm);font-weight:var(--weight-medium);color:var(--color-text-muted)} diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-CaPKESQ9.js b/apps/pythinker-code/dist-web/assets/Tooltip-G7Fvxpah.js similarity index 98% rename from apps/pythinker-code/dist-web/assets/Tooltip-CaPKESQ9.js rename to apps/pythinker-code/dist-web/assets/Tooltip-G7Fvxpah.js index e48bdc6b3..c30615dbc 100644 --- a/apps/pythinker-code/dist-web/assets/Tooltip-CaPKESQ9.js +++ b/apps/pythinker-code/dist-web/assets/Tooltip-G7Fvxpah.js @@ -1 +1 @@ -import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-DIKFd2HX.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; +import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-CP4VUG5A.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; diff --git a/apps/pythinker-code/dist-web/assets/Tooltip-ms-XbEOq.js b/apps/pythinker-code/dist-web/assets/Tooltip-ms-XbEOq.js deleted file mode 100644 index fec3b9fb5..000000000 --- a/apps/pythinker-code/dist-web/assets/Tooltip-ms-XbEOq.js +++ /dev/null @@ -1 +0,0 @@ -import{bQ as A,M as H,aU as b,bE as V,az as J,aL as O,s as Q,v as R,I as F,bJ as G,bL as K,aw as L,H as W,bb as Z,bB as ee,g as te,au as le,T as ae,as as B,bR as ne}from"./index-DIfcwXP7.js";var k=(h,E,e)=>new Promise((o,p)=>{var i=a=>{try{d(e.next(a))}catch(c){p(c)}},y=a=>{try{d(e.throw(a))}catch(c){p(c)}},d=a=>a.done?o(a.value):Promise.resolve(a.value).then(i,y);d((e=e.apply(h,E)).next())});const oe=["id"],ie=["data-placement"],ue=A(H({__name:"Tooltip",props:{visible:{type:Boolean},anchorEl:{},content:{},placement:{},offset:{},originX:{},originY:{},id:{},isDark:{type:[Boolean,null]}},setup(h){var E;const e=h,o=b(null),p=b(null),i=b({transform:"translate3d(0px, 0px, 0px)",left:"0px",top:"0px"}),y=b({}),d=b((E=e.placement)!=null?E:"top"),a=b(!1);let c=null,$=null,T=null,C=null,w=null,s=0;function X(){return C?Promise.resolve(C):(w||(w=ne(()=>import("./floating-ui.dom-xGUaHE3m.js"),[]).then(l=>(C=l,l)).catch(l=>{throw w=null,l})),w)}function D(){c&&(c(),c=null),$=null,T=null}function P(l){return k(this,null,function*(){const t=e.anchorEl,n=o.value;if(!e.visible||!t||!n||$===t&&T===n)return;const{autoUpdate:r}=yield X();l()&&e.visible&&e.anchorEl===t&&o.value===n&&(D(),$=t,T=n,c=r(t,n,()=>{N().catch(()=>{_()})}))})}function N(){return k(this,null,function*(){var l,t;const n=e.anchorEl,r=o.value;if(!e.visible||!n||!r)return!1;const{arrow:u,computePosition:m,flip:v,offset:f,shift:x}=yield X();if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;const g=[f((l=e.offset)!=null?l:6),v(),x({padding:6}),...p.value?[u({element:p.value,padding:4})]:[]],{x:S,y:j,placement:Y,middlewareData:z}=yield m(n,r,{placement:(t=e.placement)!=null?t:"top",middleware:g,strategy:"fixed"});if(!e.visible||e.anchorEl!==n||o.value!==r)return!1;if(i.value.transform=`translate3d(${Math.round(S)}px, ${Math.round(j)}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=Y,z.arrow&&p.value){const{x:I,y:U}=z.arrow,q={top:"bottom",bottom:"top",left:"right",right:"left"}[Y.split("-")[0]];y.value={left:I!=null?`${I}px`:"",top:U!=null?`${U}px`:"",[q]:"-3px"}}return!0})}function _(){var l,t;const n=e.anchorEl,r=o.value;if(!n||!r)return!1;const u=n.getBoundingClientRect(),m=r.getBoundingClientRect(),v=(l=e.offset)!=null?l:6,f=(t=e.placement)!=null?t:"top";let x=u.left,g=u.top;return f==="bottom"?g=u.bottom+v:f==="left"?x=u.left-m.width-v:f==="right"?x=u.right+v:g=u.top-m.height-v,i.value.transform=`translate3d(${Math.round(Math.max(0,x))}px, ${Math.round(Math.max(0,g))}px, 0)`,i.value.left="0px",i.value.top="0px",d.value=f,y.value={},!0}V(()=>e.visible,l=>k(null,null,function*(){const t=++s;if(l){if(a.value=!1,yield B(),t!==s||!e.visible)return;if(e.anchorEl&&o.value)try{const n=e.anchorEl,r=o.value,u=n.getBoundingClientRect();if(!(yield N())||t!==s||!e.visible||e.anchorEl!==n||o.value!==r)return;const m=i.value.transform;if(e.originX!=null&&e.originY!=null){const v=Math.abs(Number(e.originX)-u.left),f=Math.abs(Number(e.originY)-u.top);if(Math.hypot(v,f)>120){if(i.value.transform=`translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`,yield B(),t!==s||!e.visible||(a.value=!0,yield B(),t!==s||!e.visible))return;i.value.transform=m}else a.value=!0}else a.value=!0;yield P(()=>t===s)}catch{if(t!==s||!e.visible)return;if(a.value=_(),e.anchorEl&&o.value)try{yield P(()=>t===s)}catch{}}else a.value=!0}else a.value=!1,D()}));let M=0;return V([()=>e.anchorEl,()=>e.placement,()=>e.content],()=>k(null,null,function*(){const l=++M;if(e.visible&&e.anchorEl&&o.value){if(yield B(),l!==M||!e.visible||!e.anchorEl||!o.value)return;try{const t=yield N();if(l!==M||!e.visible||!e.anchorEl||!o.value)return;t||_()}catch{_()}yield P(()=>l===M)}})),J(()=>{s+=1,D()}),(l,t)=>(O(),Q(ae,{to:"body"},[R("div",{class:le(["markstream-vue",{dark:h.isDark}])},[F(te,{name:"tooltip",appear:""},{default:G(()=>[K(R("div",{id:e.id,ref_key:"tooltip",ref:o,style:L({position:"fixed",left:i.value.left,top:i.value.top,transform:i.value.transform,visibility:a.value?"visible":"hidden",pointerEvents:a.value?void 0:"none"}),class:"tooltip-element",role:"tooltip"},[W(Z(h.content)+" ",1),R("div",{ref_key:"arrowEl",ref:p,class:"tooltip-arrow","data-placement":d.value,style:L(y.value)},null,12,ie)],12,oe),[[ee,h.visible]])]),_:1})],2)]))}}),[["__scopeId","data-v-c606ee4c"]]);export{ue as default}; diff --git a/apps/pythinker-code/dist-web/assets/abap-DLDM7-KI.js b/apps/pythinker-code/dist-web/assets/abap-DLDM7-KI.js new file mode 100644 index 000000000..32c249f00 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/abap-DLDM7-KI.js @@ -0,0 +1 @@ +const e={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},t={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}};export{e as conf,t as language}; diff --git a/apps/pythinker-code/dist-web/assets/apex-DNDY2TF8.js b/apps/pythinker-code/dist-web/assets/apex-DNDY2TF8.js new file mode 100644 index 000000000..cce2c717b --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/apex-DNDY2TF8.js @@ -0,0 +1 @@ +const n={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:))")}}},s=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],o=e=>e.charAt(0).toUpperCase()+e.substr(1);let t=[];s.forEach(e=>{t.push(e),t.push(e.toUpperCase()),t.push(o(e))});const i={defaultToken:"",tokenPostfix:".apex",keywords:t,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}};export{n as conf,i as language}; diff --git a/apps/pythinker-code/dist-web/assets/arc-D9l9PU7k.js b/apps/pythinker-code/dist-web/assets/arc-D9l9PU7k.js deleted file mode 100644 index 817c9542e..000000000 --- a/apps/pythinker-code/dist-web/assets/arc-D9l9PU7k.js +++ /dev/null @@ -1 +0,0 @@ -import{M as ln,N as an,O as Y,P as O,Q,R as un,S as y,T as tn,V as j,W as _,X as rn,Y as o,Z as on,$ as sn,a0 as fn}from"./mermaid.core-bNlBBSwN.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,D,S,v,R,V,a){var E=D-l,i=S-h,n=V-v,d=a-R,u=d*E-n*i;if(!(u*ur*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),sy))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(Wy?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),sy))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(Wy?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),pr*r+X*X&&(M=w,N=p),{cx:M,cy:N,x01:-n,y01:-d,x11:M*(v/T-1),y11:N*(v/T-1)}}function hn(){var l=cn,h=yn,D=Q(0),S=null,v=gn,R=dn,V=mn,a=null,E=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=R.apply(this,arguments)-un,W=rn(c-f),t=c>f;if(a||(a=n=E()),sy))a.moveTo(0,0);else if(W>tn-y)a.moveTo(s*Y(f),s*O(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*Y(c),u*O(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,A=f,T=c,P=W,I=W,M=V.apply(this,arguments)/2,N=M>y&&(S?+S.apply(this,arguments):j(u*u+s*s)),w=_(rn(s-u)/2,+D.apply(this,arguments)),p=w,x=w,e,r;if(N>y){var X=sn(N/u*O(M)),z=sn(N/s*O(M));(P-=X*2)>y?(X*=t?1:-1,A+=X,T-=X):(P=0,A=T=(f+c)/2),(I-=z*2)>y?(z*=t?1:-1,m+=z,g-=z):(I=0,m=g=(f+c)/2)}var Z=s*Y(m),$=s*O(m),B=u*Y(T),C=u*O(T);if(w>y){var F=s*Y(g),G=s*O(g),J=u*Y(A),K=u*O(A),q;if(Wy?x>y?(e=H(J,K,Z,$,s,x,t),r=H(F,G,B,C,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),xy)||!(P>y)?a.lineTo(B,C):p>y?(e=H(B,C,F,G,u,-p,t),r=H(Z,$,J,K,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),ps?(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))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[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,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(S,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),b=N.length,A=0;AT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,b,A,S,V,X=this.nodes,Z=X.length,D=0;DN&&(l=N),TA&&(g=A),dN&&(l=N),TA&&(g=A),d=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},w.exports=s}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),s=v.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,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,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}},a.prototype.remove=function(e){if(e instanceof u){var i=e;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 r,v=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],s=i[1]/v;i[0]t)return i[0]=f,i[1]=o,i[2]=v,i[3]=X,!1;if(rv)return i[0]=s,i[1]=r,i[2]=S,i[3]=t,!1;if(fv?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>v?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=V,i[3]=X,m=!0):(i[2]=S,i[3]=A,m=!0):E===y&&(v>f?(i[2]=b,i[3]=A,m=!0):(i[2]=Z,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:Q=A,x=v+-_/y,i[2]=x,i[3]=Q;break;case 2:x=Z,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=v+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,b=void 0,A=void 0,S=void 0,V=void 0,X=void 0,Z=void 0;return N=s-v,A=r-t,V=t*v-r*s,b=T-c,S=o-l,X=l*c-o*T,Z=N*S-b*A,Z===0?null:(g=(A*X-S*V)/Z,d=(b*V-N*X)/Z,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var s=0;s"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(N.push(A[0]);N.length>0&&c;){var S=N[0];N.splice(0,1),d.add(S);for(var V=S.getEdges(),g=0;g-1&&A.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(X,1);var Z=b.getNeighborsList();Z.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&S.push(n),T.set(n,p)}})}l=l.concat(S),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},w.exports=s}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.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,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||N>=g[0].length)){for(var b=0;br}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,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===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var U={45:((a,e,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),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,b=i(551).Layout,A=i(551).Integer,S=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,Z=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.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=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});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},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.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)),B=O[tt],O[tt]=O[H],O[H]=B;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=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.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=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.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 Y=function(H,B){var tt=[],ht=[],J=new Z,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(M.y)),I=Math.floor(M.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(E-p)/Y,J=O;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;EQ&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return IR&&(R=$.getWidth())});var W=I/y,x=M/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return R>rt&&(rt=R),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function($,O){var H=W;return M.idealRowWidth?(H=I,H($.id,O.id)):H($,O)});for(var x=0,Q=0,z=0;z0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;RM&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)Y[0]+=this.grid[rt][M-1].length+this.grid[rt][M].length-1;if(I0)for(var rt=M;rt<=R;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=A.MAX_VALUE,O,H,B=0;B{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(s,o,c,l){f.call(this,s,o,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.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*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?N[g.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+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?N[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(P){var k=0,K=0,q=0,at=0;if(P.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?k++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?q++:at++}),k>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,P){E[P]=[F.position.x,F.position.y],y[P]=[d[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var P=l.alignmentConstraint.vertical,k=function(et){var j=new Set;P[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).x,P[et].forEach(function(pt){E[F]=[wt,N[g.get(pt)]],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},K=0;K0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).y,q[et].forEach(function(pt){E[F]=[d[g.get(pt)],wt],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,Y=rt);if(z0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,P){var k={x:d[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,q=X(K,k);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(F,P){d[P]+=Et.x}),N.forEach(function(F,P){N[P]+=Et.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(P){var k=new Set;Dt[P].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=Z(k).x,k.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=N[g.get(K.values().next().value)]:q=Z(k).y,k.forEach(function(at){R.has(at)||(N[g.get(at)]=q)})},Ft=0;Ft{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,G){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(b){T=!0,g=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}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")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var M=0;M1){N=g[0],b=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),X},v.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,b=void 0;try{for(var A=s.nodeIndexes[Symbol.iterator](),S;!(d=(S=A.next()).done);d=!0){var V=S.value,X=f(V,2),Z=X[0],D=X[1],_=o.cy.getElementById(Z);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;ml&&(l=p),Eg&&(g=y)}}}catch(x){N=!0,b=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw b}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+M})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=Y),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,b=void 0,A=void 0,S=void 0,V=t.descendants().not(":parent"),X=V.length,Z=0;ZN&&(l=N),TA&&(g=A),d{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var b=d.cy,A=d.eles,S=A.nodes(),V=A.edges(),X=void 0,Z=void 0,D=void 0,_={};d.randomize&&(X=N.nodeIndexes,Z=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(b,A),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(S),M,d),y(M,R,V),I(M,d),M.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,b){for(var A=0;A0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(S,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(o(A))}),A.quality=="default"||A.quality=="proof"){var M=S.collection();if(A.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var rt=M.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(M),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){A.eles=vt,Z.push(l(A,X[it])),t.relocateComponent(_[it],Z[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else Z[it][Ot.id()]&&mt.nodes.push({x:Z[it][Ot.id()].getLeft(),y:Z[it][Ot.id()].getTop(),width:Z[it][Ot.id()].getWidth(),height:Z[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else Z[it][Et.id()]&&Z[it][Dt.id()]&&mt.edges.push({startX:Z[it][Et.id()].getCenterX(),startY:Z[it][Et.id()].getCenterY(),endX:Z[it][Dt.id()].getCenterX(),endY:Z[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var tt=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(Z[vt]).forEach(function(it){var gt=Z[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=o(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(Z.push(l(A,X[0])),t.relocateComponent(_[0],Z[0],A)):t.relocateComponent(_[0],X[0],A)}var J=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return Z.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(S,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});A.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,A,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})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,b=new Map,A=[],S=[],V=[],X=[],Z=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,M=o.nodeSeparation,R=void 0,W=function(){for(var P=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=A[nt],lt=0;ltut&&(ut=Z[Lt],wt=Lt)}return wt},Q=function(P){var k=void 0;if(P){k=Math.floor(Math.random()*m);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(k.isParent()?A[P].push(b.get(k.id())):A[P].push(k.id()))})});var Nt=function(P){var k=N.get(P),K=void 0;d.get(P).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,A[k].push(K),A[N.get(K)].push(P)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=Be(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,G)=>C-G+2,"L"),R:dt((C,G)=>C-2,"R"),T:dt((C,G)=>C-G+2,"T"),B:dt((C,G)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const G=C;return G==="L"||G==="R"||G==="T"||G==="B"},"isArchitectureDirection"),Wt=dt(function(C){const G=C;return G==="L"||G==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const G=C;return G==="T"||G==="B"},"isArchitectureDirectionY"),me=dt(function(C,G){const w=Wt(C)&&qt(G),U=qt(C)&&Wt(G);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const G=C[0],w=C[1],U=Wt(G)&&qt(w),L=qt(G)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,G){const w=`${C}${G}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,G],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),G+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),G]:Wt(L)?[C+(L==="L"?1:-1),G+(U==="T"?1:-1)]:[C,G+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,G){return me(C,G)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=ir.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=qe,this.getAccTitle=Qe,this.setDiagramTitle=Je,this.getDiagramTitle=Ke,this.getAccDescription=je,this.setAccDescription=_e,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tr()}addService({id:C,icon:G,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:G,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:G}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(G!==void 0){if(C===G)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[G]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:G}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:G,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:G,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:G,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[G]===void 0&&this.groups[G]===void 0)throw new Error(`The right-hand id [${G}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[G].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${G}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:G,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[G]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[G].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},G=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const s=Ar(r.lhsDir,r.rhsDir);s!=="bend"&&(C[v]??={},C[v][t]=s,C[t]??={},C[t][v]=s)}if(r.lhsId===e){const s=pe(r.lhsDir,r.rhsDir);s&&(f[s]=r.rhsId)}else{const s=pe(r.rhsDir,r.lhsDir);s&&(f[s]=r.lhsId)}return f},{}),a),{}),w=Object.keys(G)[0],U={[w]:1},L=Object.keys(G).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=G[f],[v,t]=e[f];Object.entries(r).forEach(([s,o])=>{U[o]||(e[o]=Lr([v,t],s),i.push(o))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:G,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,G){this.elements[C]=G}getElementById(C){return this.elements[C]}getConfig(){return er({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,G)=>{lr(C,G),C.groups.map(w=>G.addGroup(w)),C.services.map(w=>G.addService({...w,type:"service"})),C.junctions.map(w=>G.addJunction({...w,type:"junction"})),C.edges.map(w=>G.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const G=await fr("architecture",C);Re.debug(G);const w=Pe.parser?.yy;if(!(w instanceof be))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(G,w)},"parse")},xr=dt(C=>` - .edge { - stroke-width: ${C.archEdgeWidth}; - stroke: ${C.archEdgeColor}; - fill: none; - } - - .arrow { - fill: ${C.archEdgeArrowColor}; - } - - .node-bkg { - fill: none; - stroke: ${C.archGroupBorderColor}; - stroke-width: ${C.archGroupBorderWidth}; - stroke-dasharray: 8; - } - .node-icon-text { - display: flex; - align-items: center; - } - - .node-icon-text > div { - color: #fff; - margin: 1px; - height: fit-content; - text-align: center; - overflow: hidden; - display: -webkit-box; - -webkit-box-orient: vertical; - } -`,"getStyles"),Ir=xr,re=dt(C=>`${C}`,"wrapIcon"),ae={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:re('')},server:{body:re('')},disk:{body:re('')},internet:{body:re('')},cloud:{body:re('')},unknown:hr,blank:{body:re("")}}},Rr=dt(async function(C,G,w,U){const L=w.getConfigField("padding"),u=w.getConfigField("iconSize"),h=u/2,a=u/6,e=a/2;await Promise.all(G.edges().map(async i=>{const{source:f,sourceDir:r,sourceArrow:v,sourceGroup:t,target:s,targetDir:o,targetArrow:c,targetGroup:l,label:T}=Fe(i);let{x:g,y:d}=i[0].sourceEndpoint();const{x:N,y:b}=i[0].midpoint();let{x:A,y:S}=i[0].targetEndpoint();const V=L+4;if(t&&(Wt(r)?g+=r==="L"?-V:V:d+=r==="T"?-V:V+18),l&&(Wt(o)?A+=o==="L"?-V:V:S+=o==="T"?-V:V+18),!t&&w.getNode(f)?.type==="junction"&&(Wt(r)?g+=r==="L"?h:-h:d+=r==="T"?h:-h),!l&&w.getNode(s)?.type==="junction"&&(Wt(o)?A+=o==="L"?h:-h:S+=o==="T"?h:-h),i[0]._private.rscratch){const X=C.insert("g");if(X.insert("path").attr("d",`M ${g},${d} L ${N},${b} L${A},${S} `).attr("class","edge").attr("id",`${U}-${or(f,s,{prefix:"L"})}`),v){const Z=Wt(r)?oe[r](g,a):g-e,D=qt(r)?oe[r](d,a):d-e;X.insert("polygon").attr("points",xe[r](a)).attr("transform",`translate(${Z},${D})`).attr("class","arrow")}if(c){const Z=Wt(o)?oe[o](A,a):A-e,D=qt(o)?oe[o](S,a):S-e;X.insert("polygon").attr("points",xe[o](a)).attr("transform",`translate(${Z},${D})`).attr("class","arrow")}if(T){const Z=me(r,o)?"XY":Wt(r)?"X":"Y";let D=0;Z==="X"?D=Math.abs(g-A):Z==="Y"?D=Math.abs(d-S)/1.5:D=Math.abs(g-A)/2;const _=X.append("g");if(await Ee(_,T,{useHtmlLabels:!1,width:D,classes:"architecture-service-label"},ye()),_.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),Z==="X")_.attr("transform","translate("+N+", "+b+")");else if(Z==="Y")_.attr("transform","translate("+N+", "+b+") rotate(-90)");else if(Z==="XY"){const n=pe(r,o);if(n&&Tr(n)){const m=_.node().getBoundingClientRect(),[p,E]=Cr(n);_.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*p*E*45})`);const y=_.node().getBoundingClientRect();_.attr("transform",` - translate(${N}, ${b-m.height/2}) - translate(${p*y.width/2}, ${E*y.height/2}) - rotate(${-1*p*E*45}, 0, ${m.height/2}) - `)}}}}}))},"drawEdges"),Sr=dt(async function(C,G,w,U){const u=w.getConfigField("padding")*.75,h=w.getConfigField("fontSize"),e=w.getConfigField("iconSize")/2;await Promise.all(G.nodes().map(async i=>{const f=ie(i);if(f.type==="group"){const{h:r,w:v,x1:t,y1:s}=i.boundingBox(),o=C.append("rect");o.attr("id",`${U}-group-${f.id}`).attr("x",t+e).attr("y",s+e).attr("width",v).attr("height",r).attr("class","node-bkg");const c=C.append("g");let l=t,T=s;if(f.icon){const g=c.append("g");g.html(`${await ve(f.icon,{height:u,width:u,fallbackPrefix:ae.prefix})}`),g.attr("transform","translate("+(l+e+1)+", "+(T+e+1)+")"),l+=u,T+=h/2-1-2}if(f.label){const g=c.append("g");await Ee(g,f.label,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},ye()),g.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),g.attr("transform","translate("+(l+e+4)+", "+(T+e+2)+")")}w.setElementForId(f.id,o)}}))},"drawGroups"),Fr=dt(async function(C,G,w,U){const L=ye();for(const u of w){const h=G.append("g"),a=C.getConfigField("iconSize");if(u.title){const r=h.append("g");await Ee(r,u.title,{useHtmlLabels:!1,width:a*1.5,classes:"architecture-service-label"},L),r.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),r.attr("transform","translate("+a/2+", "+a+")")}const e=h.append("g");if(u.icon)e.html(`${await ve(u.icon,{height:a,width:a,fallbackPrefix:ae.prefix})}`);else if(u.iconText){e.html(`${await ve("blank",{height:a,width:a,fallbackPrefix:ae.prefix})}`);const t=e.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(ar(u.iconText,L)),s=parseInt(window.getComputedStyle(t.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;t.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/s)};`)}else e.append("path").attr("class","node-bkg").attr("id",`${U}-node-${u.id}`).attr("d",`M0,${a} V5 Q0,0 5,0 H${a-5} Q${a},0 ${a},5 V${a} Z`);h.attr("id",`${U}-service-${u.id}`).attr("class","architecture-service");const{width:i,height:f}=h.node().getBBox();u.width=i,u.height=f,C.setElementForId(u.id,h)}return 0},"drawServices"),br=dt(function(C,G,w,U){w.forEach(L=>{const u=G.append("g"),h=C.getConfigField("iconSize");u.append("g").append("rect").attr("id",`${U}-node-${L.id}`).attr("fill-opacity","0").attr("width",h).attr("height",h),u.attr("class","architecture-junction");const{width:e,height:i}=u._groups[0][0].getBBox();u.width=e,u.height=i,C.setElementForId(L.id,u)})},"drawJunctions");sr([{name:ae.prefix,icons:ae}]);Se.use(Er);function Ge(C,G,w){C.forEach(U=>{G.add({group:"nodes",data:{type:"service",id:U.id,icon:U.icon,label:U.title,parent:U.in,width:w.getConfigField("iconSize"),height:w.getConfigField("iconSize")},classes:"node-service"})})}dt(Ge,"addServices");function Ue(C,G,w){C.forEach(U=>{G.add({group:"nodes",data:{type:"junction",id:U.id,parent:U.in,width:w.getConfigField("iconSize"),height:w.getConfigField("iconSize")},classes:"node-junction"})})}dt(Ue,"addJunctions");function Ye(C,G){G.nodes().map(w=>{const U=ie(w);if(U.type==="group")return;U.x=w.position().x,U.y=w.position().y,C.getElementById(U.id).attr("transform","translate("+(U.x||0)+","+(U.y||0)+")")})}dt(Ye,"positionNodes");function Xe(C,G){C.forEach(w=>{G.add({group:"nodes",data:{type:"group",id:w.id,icon:w.icon,label:w.title,parent:w.in},classes:"node-group"})})}dt(Xe,"addGroups");function He(C,G){C.forEach(w=>{const{lhsId:U,rhsId:L,lhsInto:u,lhsGroup:h,rhsInto:a,lhsDir:e,rhsDir:i,rhsGroup:f,title:r}=w,v=me(w.lhsDir,w.rhsDir)?"segments":"straight",t={id:`${U}-${L}`,label:r,source:U,sourceDir:e,sourceArrow:u,sourceGroup:h,sourceEndpoint:e==="L"?"0 50%":e==="R"?"100% 50%":e==="T"?"50% 0":"50% 100%",target:L,targetDir:i,targetArrow:a,targetGroup:f,targetEndpoint:i==="L"?"0 50%":i==="R"?"100% 50%":i==="T"?"50% 0":"50% 100%"};G.add({group:"edges",data:t,classes:v})})}dt(He,"addEdges");function We(C,G,w){const U=dt((a,e)=>Object.entries(a).reduce((i,[f,r])=>{let v=0;const t=Object.entries(r);if(t.length===1)return i[f]=t[0][1],i;for(let s=0;s{const e={},i={};return Object.entries(a).forEach(([f,[r,v]])=>{const t=C.getNode(f)?.in??"default";e[v]??={},e[v][t]??=[],e[v][t].push(f),i[r]??={},i[r][t]??=[],i[r][t].push(f)}),{horiz:Object.values(U(e,"horizontal")).filter(f=>f.length>1),vert:Object.values(U(i,"vertical")).filter(f=>f.length>1)}}),[u,h]=L.reduce(([a,e],{horiz:i,vert:f})=>[[...a,...i],[...e,...f]],[[],[]]);return{horizontal:u,vertical:h}}dt(We,"getAlignments");function Ve(C,G){const w=[],U=dt(u=>`${u[0]},${u[1]}`,"posToStr"),L=dt(u=>u.split(",").map(h=>parseInt(h)),"strToPos");return C.forEach(u=>{const h=Object.fromEntries(Object.entries(u).map(([f,r])=>[U(r),f])),a=[U([0,0])],e={},i={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;a.length>0;){const f=a.shift();if(f){e[f]=1;const r=h[f];if(r){const v=L(f);Object.entries(i).forEach(([t,s])=>{const o=U([v[0]+s[0],v[1]+s[1]]),c=h[o];c&&!e[o]&&(a.push(o),w.push({[De[t]]:c,[De[mr(t)]]:r,gap:1.5*G.getConfigField("iconSize")}))})}}}}),w}dt(Ve,"getRelativeConstraints");function ze(C,G,w,U,L,{spatialMaps:u,groupAlignments:h}){return new Promise(a=>{const e=nr("body").append("div").attr("id","cy").attr("style","display:none"),i=Se({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${L.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${L.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});e.remove(),Xe(w,i),Ge(C,i,L),Ue(G,i,L),He(U,i);const f=We(L,u,h),r=Ve(u,L),v=L.getConfigField("iconSize"),t=L.getConfigField("idealEdgeLengthMultiplier")*v,s=.5*v,o=L.getConfigField("edgeElasticity"),c=i.layout({name:"fcose",quality:"proof",randomize:L.getConfigField("randomize"),nodeSeparation:L.getConfigField("nodeSeparation"),numIter:L.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(l){const[T,g]=l.connectedNodes(),{parent:d}=ie(T),{parent:N}=ie(g);return d===N?t:s},edgeElasticity(l){const[T,g]=l.connectedNodes(),{parent:d}=ie(T),{parent:N}=ie(g);return d===N?o:.001},alignmentConstraint:f,relativePlacementConstraint:r});c.one("layoutstop",()=>{function l(T,g,d,N){let b,A;const{x:S,y:V}=T,{x:X,y:Z}=g;A=(N-V+(S-d)*(V-Z)/(S-X))/Math.sqrt(1+Math.pow((V-Z)/(S-X),2)),b=Math.sqrt(Math.pow(N-V,2)+Math.pow(d-S,2)-Math.pow(A,2));const D=Math.sqrt(Math.pow(X-S,2)+Math.pow(Z-V,2));b=b/D;let _=(X-S)*(N-V)-(Z-V)*(d-S);switch(!0){case _>=0:_=1;break;case _<0:_=-1;break}let n=(X-S)*(d-S)+(Z-V)*(N-V);switch(!0){case n>=0:n=1;break;case n<0:n=-1;break}return A=Math.abs(A)*_,b=b*n,{distances:A,weights:b}}dt(l,"getSegmentWeights"),i.startBatch();for(const T of Object.values(i.edges()))if(T.data?.()){const{x:g,y:d}=T.source().position(),{x:N,y:b}=T.target().position();if(g!==N&&d!==b){const A=T.sourceEndpoint(),S=T.targetEndpoint(),{sourceDir:V}=Fe(T),[X,Z]=qt(V)?[A.x,S.y]:[S.x,A.y],{weights:D,distances:_}=l(A,S,X,Z);T.style("segment-distances",_),T.style("segment-weights",D)}}i.endBatch(),c.run()}),c.run(),i.ready(l=>{Re.info("Ready",l),a(i)})})}dt(ze,"layoutArchitecture");var Pr=dt(async(C,G,w,U)=>{const L=U.db;L.setDiagramId(G);const u=L.getServices(),h=L.getJunctions(),a=L.getGroups(),e=L.getEdges(),i=L.getDataStructures(),f=ke(G),r=f.append("g");r.attr("class","architecture-edges");const v=f.append("g");v.attr("class","architecture-services");const t=f.append("g");t.attr("class","architecture-groups"),await Fr(L,v,u,G),br(L,v,h,G);const s=await ze(u,h,a,e,L,i);await Rr(r,s,L,G),await Sr(t,s,L,G),Ye(L,s),Ze(void 0,f,L.getConfigField("padding"),L.getConfigField("useMaxWidth"))},"draw"),Gr={draw:Pr},Vr={parser:Pe,get db(){return new be},renderer:Gr,styles:Ir};export{Vr as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-BN8zAxC8.js b/apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-Cove-SWN.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-BN8zAxC8.js rename to apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-Cove-SWN.js index 1ed687648..f3c89f910 100644 --- a/apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-BN8zAxC8.js +++ b/apps/pythinker-code/dist-web/assets/architectureDiagram-3BPJPVTR-Cove-SWN.js @@ -1,4 +1,4 @@ -import{b4 as Be,_ as dt,L as ke,af as Ze,l as Re,b as qe,a as Qe,q as Je,t as Ke,g as je,s as _e,A as tr,H as er,F as rr,I as ir,c as ye,aO as Ee,b5 as ve,i as ar,d as nr,y as or,b6 as sr,b7 as hr}from"./mermaid.core-bNlBBSwN.js";import{p as lr}from"./chunk-4BX2VUAB-DQH-TItP.js";import{p as fr}from"./wardley-L42UT6IY-BnkTWAjx.js";import{c as Se}from"./cytoscape.esm-nFXppDBa.js";import"./index-DIfcwXP7.js";var se={exports:{}},he={exports:{}},le={exports:{}},cr=le.exports,we;function gr(){return we||(we=1,(function(C,G){(function(U,L){C.exports=L()})(cr,function(){return(function(w){var U={};function L(u){if(U[u])return U[u].exports;var h=U[u]={i:u,l:!1,exports:{}};return w[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=w,L.c=U,L.i=function(u){return u},L.d=function(u,h,a){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(w,U,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,w.exports=u}),(function(w,U,L){var u=L(2),h=L(8),a=L(9);function e(f,r,v){u.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.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"},e.prototype.getOtherEndInGraph=function(f,r){for(var v=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(v.getOwner()==r)return v;if(v.getOwner()==t)break;v=v.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=e}),(function(w,U,L){function u(h){this.vGraphObject=h}w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(13),e=L(0),i=L(16),f=L(5);function r(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(u.prototype);for(var v in u)r[v]=u[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.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},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.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},r.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},r.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},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(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))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[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,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(S,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),b=N.length,A=0;AT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,b,A,S,V,X=this.nodes,Z=X.length,D=0;DN&&(l=N),TA&&(g=A),dN&&(l=N),TA&&(g=A),d=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},w.exports=s}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),s=v.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,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,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}},a.prototype.remove=function(e){if(e instanceof u){var i=e;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 r,v=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],s=i[1]/v;i[0]t)return i[0]=f,i[1]=o,i[2]=v,i[3]=X,!1;if(rv)return i[0]=s,i[1]=r,i[2]=S,i[3]=t,!1;if(fv?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>v?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=V,i[3]=X,m=!0):(i[2]=S,i[3]=A,m=!0):E===y&&(v>f?(i[2]=b,i[3]=A,m=!0):(i[2]=Z,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:Q=A,x=v+-_/y,i[2]=x,i[3]=Q;break;case 2:x=Z,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=v+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,b=void 0,A=void 0,S=void 0,V=void 0,X=void 0,Z=void 0;return N=s-v,A=r-t,V=t*v-r*s,b=T-c,S=o-l,X=l*c-o*T,Z=N*S-b*A,Z===0?null:(g=(A*X-S*V)/Z,d=(b*V-N*X)/Z,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var s=0;s"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(N.push(A[0]);N.length>0&&c;){var S=N[0];N.splice(0,1),d.add(S);for(var V=S.getEdges(),g=0;g-1&&A.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(X,1);var Z=b.getNeighborsList();Z.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&S.push(n),T.set(n,p)}})}l=l.concat(S),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},w.exports=s}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.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,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||N>=g[0].length)){for(var b=0;br}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,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===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var U={45:((a,e,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),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,b=i(551).Layout,A=i(551).Integer,S=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,Z=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.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=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});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},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.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)),B=O[tt],O[tt]=O[H],O[H]=B;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=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.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=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.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 Y=function(H,B){var tt=[],ht=[],J=new Z,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(M.y)),I=Math.floor(M.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(E-p)/Y,J=O;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;EQ&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return IR&&(R=$.getWidth())});var W=I/y,x=M/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return R>rt&&(rt=R),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function($,O){var H=W;return M.idealRowWidth?(H=I,H($.id,O.id)):H($,O)});for(var x=0,Q=0,z=0;z0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;RM&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)Y[0]+=this.grid[rt][M-1].length+this.grid[rt][M].length-1;if(I0)for(var rt=M;rt<=R;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=A.MAX_VALUE,O,H,B=0;B{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(s,o,c,l){f.call(this,s,o,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.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*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?N[g.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+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?N[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(P){var k=0,K=0,q=0,at=0;if(P.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?k++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?q++:at++}),k>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,P){E[P]=[F.position.x,F.position.y],y[P]=[d[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var P=l.alignmentConstraint.vertical,k=function(et){var j=new Set;P[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).x,P[et].forEach(function(pt){E[F]=[wt,N[g.get(pt)]],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},K=0;K0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).y,q[et].forEach(function(pt){E[F]=[d[g.get(pt)],wt],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,Y=rt);if(z0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,P){var k={x:d[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,q=X(K,k);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(F,P){d[P]+=Et.x}),N.forEach(function(F,P){N[P]+=Et.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(P){var k=new Set;Dt[P].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=Z(k).x,k.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=N[g.get(K.values().next().value)]:q=Z(k).y,k.forEach(function(at){R.has(at)||(N[g.get(at)]=q)})},Ft=0;Ft{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,G){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(b){T=!0,g=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}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")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var M=0;M1){N=g[0],b=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),X},v.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,b=void 0;try{for(var A=s.nodeIndexes[Symbol.iterator](),S;!(d=(S=A.next()).done);d=!0){var V=S.value,X=f(V,2),Z=X[0],D=X[1],_=o.cy.getElementById(Z);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;ml&&(l=p),Eg&&(g=y)}}}catch(x){N=!0,b=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw b}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+M})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=Y),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,b=void 0,A=void 0,S=void 0,V=t.descendants().not(":parent"),X=V.length,Z=0;ZN&&(l=N),TA&&(g=A),d{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var b=d.cy,A=d.eles,S=A.nodes(),V=A.edges(),X=void 0,Z=void 0,D=void 0,_={};d.randomize&&(X=N.nodeIndexes,Z=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(b,A),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(S),M,d),y(M,R,V),I(M,d),M.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,b){for(var A=0;A0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(S,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(o(A))}),A.quality=="default"||A.quality=="proof"){var M=S.collection();if(A.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var rt=M.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(M),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){A.eles=vt,Z.push(l(A,X[it])),t.relocateComponent(_[it],Z[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else Z[it][Ot.id()]&&mt.nodes.push({x:Z[it][Ot.id()].getLeft(),y:Z[it][Ot.id()].getTop(),width:Z[it][Ot.id()].getWidth(),height:Z[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else Z[it][Et.id()]&&Z[it][Dt.id()]&&mt.edges.push({startX:Z[it][Et.id()].getCenterX(),startY:Z[it][Et.id()].getCenterY(),endX:Z[it][Dt.id()].getCenterX(),endY:Z[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var tt=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(Z[vt]).forEach(function(it){var gt=Z[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=o(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(Z.push(l(A,X[0])),t.relocateComponent(_[0],Z[0],A)):t.relocateComponent(_[0],X[0],A)}var J=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return Z.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(S,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});A.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,A,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})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,b=new Map,A=[],S=[],V=[],X=[],Z=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,M=o.nodeSeparation,R=void 0,W=function(){for(var P=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=A[nt],lt=0;ltut&&(ut=Z[Lt],wt=Lt)}return wt},Q=function(P){var k=void 0;if(P){k=Math.floor(Math.random()*m);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(k.isParent()?A[P].push(b.get(k.id())):A[P].push(k.id()))})});var Nt=function(P){var k=N.get(P),K=void 0;d.get(P).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,A[k].push(K),A[N.get(K)].push(P)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=Be(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,G)=>C-G+2,"L"),R:dt((C,G)=>C-2,"R"),T:dt((C,G)=>C-G+2,"T"),B:dt((C,G)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const G=C;return G==="L"||G==="R"||G==="T"||G==="B"},"isArchitectureDirection"),Wt=dt(function(C){const G=C;return G==="L"||G==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const G=C;return G==="T"||G==="B"},"isArchitectureDirectionY"),me=dt(function(C,G){const w=Wt(C)&&qt(G),U=qt(C)&&Wt(G);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const G=C[0],w=C[1],U=Wt(G)&&qt(w),L=qt(G)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,G){const w=`${C}${G}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,G],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),G+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),G]:Wt(L)?[C+(L==="L"?1:-1),G+(U==="T"?1:-1)]:[C,G+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,G){return me(C,G)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=ir.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=qe,this.getAccTitle=Qe,this.setDiagramTitle=Je,this.getDiagramTitle=Ke,this.getAccDescription=je,this.setAccDescription=_e,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tr()}addService({id:C,icon:G,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:G,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:G}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(G!==void 0){if(C===G)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[G]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:G}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:G,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:G,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:G,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[G]===void 0&&this.groups[G]===void 0)throw new Error(`The right-hand id [${G}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[G].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${G}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:G,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[G]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[G].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},G=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const s=Ar(r.lhsDir,r.rhsDir);s!=="bend"&&(C[v]??={},C[v][t]=s,C[t]??={},C[t][v]=s)}if(r.lhsId===e){const s=pe(r.lhsDir,r.rhsDir);s&&(f[s]=r.rhsId)}else{const s=pe(r.rhsDir,r.lhsDir);s&&(f[s]=r.lhsId)}return f},{}),a),{}),w=Object.keys(G)[0],U={[w]:1},L=Object.keys(G).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=G[f],[v,t]=e[f];Object.entries(r).forEach(([s,o])=>{U[o]||(e[o]=Lr([v,t],s),i.push(o))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:G,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,G){this.elements[C]=G}getElementById(C){return this.elements[C]}getConfig(){return er({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,G)=>{lr(C,G),C.groups.map(w=>G.addGroup(w)),C.services.map(w=>G.addService({...w,type:"service"})),C.junctions.map(w=>G.addJunction({...w,type:"junction"})),C.edges.map(w=>G.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const G=await fr("architecture",C);Re.debug(G);const w=Pe.parser?.yy;if(!(w instanceof be))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(G,w)},"parse")},xr=dt(C=>` +import{b4 as Be,_ as dt,L as ke,af as Ze,l as Re,b as qe,a as Qe,q as Je,t as Ke,g as je,s as _e,A as tr,H as er,F as rr,I as ir,c as ye,aO as Ee,b5 as ve,i as ar,d as nr,y as or,b6 as sr,b7 as hr}from"./mermaid.core-D9FOqe1y.js";import{p as lr}from"./chunk-4BX2VUAB-BIobHdxn.js";import{p as fr}from"./wardley-L42UT6IY-BM6-R37D.js";import{c as Se}from"./cytoscape.esm-nFXppDBa.js";import"./index-CP4VUG5A.js";var se={exports:{}},he={exports:{}},le={exports:{}},cr=le.exports,we;function gr(){return we||(we=1,(function(C,G){(function(U,L){C.exports=L()})(cr,function(){return(function(w){var U={};function L(u){if(U[u])return U[u].exports;var h=U[u]={i:u,l:!1,exports:{}};return w[u].call(h.exports,h,h.exports,L),h.l=!0,h.exports}return L.m=w,L.c=U,L.i=function(u){return u},L.d=function(u,h,a){L.o(u,h)||Object.defineProperty(u,h,{configurable:!1,enumerable:!0,get:a})},L.n=function(u){var h=u&&u.__esModule?function(){return u.default}:function(){return u};return L.d(h,"a",h),h},L.o=function(u,h){return Object.prototype.hasOwnProperty.call(u,h)},L.p="",L(L.s=28)})([(function(w,U,L){function u(){}u.QUALITY=1,u.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,u.DEFAULT_INCREMENTAL=!1,u.DEFAULT_ANIMATION_ON_LAYOUT=!0,u.DEFAULT_ANIMATION_DURING_LAYOUT=!1,u.DEFAULT_ANIMATION_PERIOD=50,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,u.DEFAULT_GRAPH_MARGIN=15,u.NODE_DIMENSIONS_INCLUDE_LABELS=!1,u.SIMPLE_NODE_SIZE=40,u.SIMPLE_NODE_HALF_SIZE=u.SIMPLE_NODE_SIZE/2,u.EMPTY_COMPOUND_NODE_SIZE=40,u.MIN_EDGE_LENGTH=1,u.WORLD_BOUNDARY=1e6,u.INITIAL_WORLD_BOUNDARY=u.WORLD_BOUNDARY/1e3,u.WORLD_CENTER_X=1200,u.WORLD_CENTER_Y=900,w.exports=u}),(function(w,U,L){var u=L(2),h=L(8),a=L(9);function e(f,r,v){u.call(this,v),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=v,this.bendpoints=[],this.source=f,this.target=r}e.prototype=Object.create(u.prototype);for(var i in u)e[i]=u[i];e.prototype.getSource=function(){return this.source},e.prototype.getTarget=function(){return this.target},e.prototype.isInterGraph=function(){return this.isInterGraph},e.prototype.getLength=function(){return this.length},e.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},e.prototype.getBendpoints=function(){return this.bendpoints},e.prototype.getLca=function(){return this.lca},e.prototype.getSourceInLca=function(){return this.sourceInLca},e.prototype.getTargetInLca=function(){return this.targetInLca},e.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"},e.prototype.getOtherEndInGraph=function(f,r){for(var v=this.getOtherEnd(f),t=r.getGraphManager().getRoot();;){if(v.getOwner()==r)return v;if(v.getOwner()==t)break;v=v.getOwner().getParent()}return null},e.prototype.updateLength=function(){var f=new Array(4);this.isOverlapingSourceAndTarget=h.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=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY))},e.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},w.exports=e}),(function(w,U,L){function u(h){this.vGraphObject=h}w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(13),e=L(0),i=L(16),f=L(5);function r(t,s,o,c){o==null&&c==null&&(c=s),u.call(this,c),t.graphManager!=null&&(t=t.graphManager),this.estimatedSize=h.MIN_VALUE,this.inclusionTreeDepth=h.MAX_VALUE,this.vGraphObject=c,this.edges=[],this.graphManager=t,o!=null&&s!=null?this.rect=new a(s.x,s.y,o.width,o.height):this.rect=new a}r.prototype=Object.create(u.prototype);for(var v in u)r[v]=u[v];r.prototype.getEdges=function(){return this.edges},r.prototype.getChild=function(){return this.child},r.prototype.getOwner=function(){return this.owner},r.prototype.getWidth=function(){return this.rect.width},r.prototype.setWidth=function(t){this.rect.width=t},r.prototype.getHeight=function(){return this.rect.height},r.prototype.setHeight=function(t){this.rect.height=t},r.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},r.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},r.prototype.getCenter=function(){return new f(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},r.prototype.getLocation=function(){return new f(this.rect.x,this.rect.y)},r.prototype.getRect=function(){return this.rect},r.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},r.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},r.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},r.prototype.setCenter=function(t,s){this.rect.x=t-this.rect.width/2,this.rect.y=s-this.rect.height/2},r.prototype.setLocation=function(t,s){this.rect.x=t,this.rect.y=s},r.prototype.moveBy=function(t,s){this.rect.x+=t,this.rect.y+=s},r.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},r.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},r.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},r.prototype.withChildren=function(){var t=new Set,s,o;if(t.add(this),this.child!=null)for(var c=this.child.getNodes(),l=0;ls?(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))}}},r.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==h.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},r.prototype.transform=function(t){var s=this.rect.x;s>e.WORLD_BOUNDARY?s=e.WORLD_BOUNDARY:s<-e.WORLD_BOUNDARY&&(s=-e.WORLD_BOUNDARY);var o=this.rect.y;o>e.WORLD_BOUNDARY?o=e.WORLD_BOUNDARY:o<-e.WORLD_BOUNDARY&&(o=-e.WORLD_BOUNDARY);var c=new f(s,o),l=t.inverseTransformPoint(c);this.setLocation(l.x,l.y)},r.prototype.getLeft=function(){return this.rect.x},r.prototype.getRight=function(){return this.rect.x+this.rect.width},r.prototype.getTop=function(){return this.rect.y},r.prototype.getBottom=function(){return this.rect.y+this.rect.height},r.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},w.exports=r}),(function(w,U,L){var u=L(0);function h(){}for(var a in u)h[a]=u[a];h.MAX_ITERATIONS=2500,h.DEFAULT_EDGE_LENGTH=50,h.DEFAULT_SPRING_STRENGTH=.45,h.DEFAULT_REPULSION_STRENGTH=4500,h.DEFAULT_GRAVITY_STRENGTH=.4,h.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,h.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,h.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,h.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,h.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,h.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,h.COOLING_ADAPTATION_FACTOR=.33,h.ADAPTATION_LOWER_NODE_LIMIT=1e3,h.ADAPTATION_UPPER_NODE_LIMIT=5e3,h.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,h.MAX_NODE_DISPLACEMENT=h.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,h.MIN_REPULSION_DIST=h.DEFAULT_EDGE_LENGTH/10,h.CONVERGENCE_CHECK_PERIOD=100,h.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,h.MIN_EDGE_LENGTH=1,h.GRID_CALCULATION_CHECK_PERIOD=10,w.exports=h}),(function(w,U,L){function u(h,a){h==null&&a==null?(this.x=0,this.y=0):(this.x=h,this.y=a)}u.prototype.getX=function(){return this.x},u.prototype.getY=function(){return this.y},u.prototype.setX=function(h){this.x=h},u.prototype.setY=function(h){this.y=h},u.prototype.getDifference=function(h){return new DimensionD(this.x-h.x,this.y-h.y)},u.prototype.getCopy=function(){return new u(this.x,this.y)},u.prototype.translate=function(h){return this.x+=h.width,this.y+=h.height,this},w.exports=u}),(function(w,U,L){var u=L(2),h=L(10),a=L(0),e=L(7),i=L(3),f=L(1),r=L(13),v=L(12),t=L(11);function s(c,l,T){u.call(this,T),this.estimatedSize=h.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=c,l!=null&&l instanceof e?this.graphManager=l:l!=null&&l instanceof Layout&&(this.graphManager=l.graphManager)}s.prototype=Object.create(u.prototype);for(var o in u)s[o]=u[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,l,T){if(l==null&&T==null){var g=c;if(this.graphManager==null)throw"Graph has no graph mgr!";if(this.getNodes().indexOf(g)>-1)throw"Node already in graph!";return g.owner=this,this.getNodes().push(g),g}else{var d=c;if(!(this.getNodes().indexOf(l)>-1&&this.getNodes().indexOf(T)>-1))throw"Source or target not in graph!";if(!(l.owner==T.owner&&l.owner==this))throw"Both owners must be this graph!";return l.owner!=T.owner?null:(d.source=l,d.target=T,d.isInterGraph=!1,this.getEdges().push(d),l.edges.push(d),T!=l&&T.edges.push(d),d)}},s.prototype.remove=function(c){var l=c;if(c instanceof i){if(l==null)throw"Node is null!";if(!(l.owner!=null&&l.owner==this))throw"Owner graph is invalid!";if(this.graphManager==null)throw"Owner graph manager is invalid!";for(var T=l.edges.slice(),g,d=T.length,N=0;N-1&&S>-1))throw"Source and/or target doesn't know this edge!";g.source.edges.splice(A,1),g.target!=g.source&&g.target.edges.splice(S,1);var b=g.source.owner.getEdges().indexOf(g);if(b==-1)throw"Not in owner's edge list!";g.source.owner.getEdges().splice(b,1)}},s.prototype.updateLeftTop=function(){for(var c=h.MAX_VALUE,l=h.MAX_VALUE,T,g,d,N=this.getNodes(),b=N.length,A=0;AT&&(c=T),l>g&&(l=g)}return c==h.MAX_VALUE?null:(N[0].getParent().paddingLeft!=null?d=N[0].getParent().paddingLeft:d=this.margin,this.left=l-d,this.top=c-d,new v(this.left,this.top))},s.prototype.updateBounds=function(c){for(var l=h.MAX_VALUE,T=-h.MAX_VALUE,g=h.MAX_VALUE,d=-h.MAX_VALUE,N,b,A,S,V,X=this.nodes,Z=X.length,D=0;DN&&(l=N),TA&&(g=A),dN&&(l=N),TA&&(g=A),d=this.nodes.length){var Z=0;T.forEach(function(D){D.owner==c&&Z++}),Z==this.nodes.length&&(this.isConnected=!0)}},w.exports=s}),(function(w,U,L){var u,h=L(1);function a(e){u=L(6),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),i=this.layout.newNode(null),f=this.add(e,i);return this.setRootGraph(f),this.rootGraph},a.prototype.add=function(e,i,f,r,v){if(f==null&&r==null&&v==null){if(e==null)throw"Graph is null!";if(i==null)throw"Parent node is null!";if(this.graphs.indexOf(e)>-1)throw"Graph already in this graph mgr!";if(this.graphs.push(e),e.parent!=null)throw"Already has a parent!";if(i.child!=null)throw"Already has a child!";return e.parent=i,i.child=e,e}else{v=f,r=i,f=e;var t=r.getOwner(),s=v.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,r,v);if(f.isInterGraph=!0,f.source=r,f.target=v,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}},a.prototype.remove=function(e){if(e instanceof u){var i=e;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 r,v=f.length,t=0;t=e.getRight()?i[0]+=Math.min(e.getX()-a.getX(),a.getRight()-e.getRight()):e.getX()<=a.getX()&&e.getRight()>=a.getRight()&&(i[0]+=Math.min(a.getX()-e.getX(),e.getRight()-a.getRight())),a.getY()<=e.getY()&&a.getBottom()>=e.getBottom()?i[1]+=Math.min(e.getY()-a.getY(),a.getBottom()-e.getBottom()):e.getY()<=a.getY()&&e.getBottom()>=a.getBottom()&&(i[1]+=Math.min(a.getY()-e.getY(),e.getBottom()-a.getBottom()));var v=Math.abs((e.getCenterY()-a.getCenterY())/(e.getCenterX()-a.getCenterX()));e.getCenterY()===a.getCenterY()&&e.getCenterX()===a.getCenterX()&&(v=1);var t=v*i[0],s=i[1]/v;i[0]t)return i[0]=f,i[1]=o,i[2]=v,i[3]=X,!1;if(rv)return i[0]=s,i[1]=r,i[2]=S,i[3]=t,!1;if(fv?(i[0]=l,i[1]=T,n=!0):(i[0]=c,i[1]=o,n=!0):p===y&&(f>v?(i[0]=s,i[1]=o,n=!0):(i[0]=g,i[1]=T,n=!0)),-E===y?v>f?(i[2]=V,i[3]=X,m=!0):(i[2]=S,i[3]=A,m=!0):E===y&&(v>f?(i[2]=b,i[3]=A,m=!0):(i[2]=Z,i[3]=X,m=!0)),n&&m)return!1;if(f>v?r>t?(I=this.getCardinalDirection(p,y,4),M=this.getCardinalDirection(E,y,2)):(I=this.getCardinalDirection(-p,y,3),M=this.getCardinalDirection(-E,y,1)):r>t?(I=this.getCardinalDirection(-p,y,1),M=this.getCardinalDirection(-E,y,3)):(I=this.getCardinalDirection(p,y,2),M=this.getCardinalDirection(E,y,4)),!n)switch(I){case 1:W=o,R=f+-N/y,i[0]=R,i[1]=W;break;case 2:R=g,W=r+d*y,i[0]=R,i[1]=W;break;case 3:W=T,R=f+N/y,i[0]=R,i[1]=W;break;case 4:R=l,W=r+-d*y,i[0]=R,i[1]=W;break}if(!m)switch(M){case 1:Q=A,x=v+-_/y,i[2]=x,i[3]=Q;break;case 2:x=Z,Q=t+D*y,i[2]=x,i[3]=Q;break;case 3:Q=X,x=v+_/y,i[2]=x,i[3]=Q;break;case 4:x=V,Q=t+-D*y,i[2]=x,i[3]=Q;break}}return!1},h.getCardinalDirection=function(a,e,i){return a>e?i:1+i%4},h.getIntersection=function(a,e,i,f){if(f==null)return this.getIntersection2(a,e,i);var r=a.x,v=a.y,t=e.x,s=e.y,o=i.x,c=i.y,l=f.x,T=f.y,g=void 0,d=void 0,N=void 0,b=void 0,A=void 0,S=void 0,V=void 0,X=void 0,Z=void 0;return N=s-v,A=r-t,V=t*v-r*s,b=T-c,S=o-l,X=l*c-o*T,Z=N*S-b*A,Z===0?null:(g=(A*X-S*V)/Z,d=(b*V-N*X)/Z,new u(g,d))},h.angleOfVector=function(a,e,i,f){var r=void 0;return a!==i?(r=Math.atan((f-e)/(i-a)),i=0){var T=(-o+Math.sqrt(o*o-4*s*c))/(2*s),g=(-o-Math.sqrt(o*o-4*s*c))/(2*s),d=null;return T>=0&&T<=1?[T]:g>=0&&g<=1?[g]:d}else return null},h.HALF_PI=.5*Math.PI,h.ONE_AND_HALF_PI=1.5*Math.PI,h.TWO_PI=2*Math.PI,h.THREE_PI=3*Math.PI,w.exports=h}),(function(w,U,L){function u(){}u.sign=function(h){return h>0?1:h<0?-1:0},u.floor=function(h){return h<0?Math.ceil(h):Math.floor(h)},u.ceil=function(h){return h<0?Math.floor(h):Math.ceil(h)},w.exports=u}),(function(w,U,L){function u(){}u.MAX_VALUE=2147483647,u.MIN_VALUE=-2147483648,w.exports=u}),(function(w,U,L){var u=(function(){function r(v,t){for(var s=0;s"u"?"undefined":u(a);return a==null||e!="object"&&e!="function"},w.exports=h}),(function(w,U,L){function u(o){if(Array.isArray(o)){for(var c=0,l=Array(o.length);c0&&c;){for(N.push(A[0]);N.length>0&&c;){var S=N[0];N.splice(0,1),d.add(S);for(var V=S.getEdges(),g=0;g-1&&A.splice(_,1)}d=new Set,b=new Map}}return o},s.prototype.createDummyNodesForBendpoints=function(o){for(var c=[],l=o.source,T=this.graphManager.calcLowestCommonAncestor(o.source,o.target),g=0;g0){for(var T=this.edgeToDummyNodes.get(l),g=0;g=0&&c.splice(X,1);var Z=b.getNeighborsList();Z.forEach(function(n){if(l.indexOf(n)<0){var m=T.get(n),p=m-1;p==1&&S.push(n),T.set(n,p)}})}l=l.concat(S),(c.length==1||c.length==2)&&(g=!0,d=c[0])}return d},s.prototype.setGraphManager=function(o){this.graphManager=o},w.exports=s}),(function(w,U,L){function u(){}u.seed=1,u.x=0,u.nextDouble=function(){return u.x=Math.sin(u.seed++)*1e4,u.x-Math.floor(u.x)},w.exports=u}),(function(w,U,L){var u=L(5);function h(a,e){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}h.prototype.getWorldOrgX=function(){return this.lworldOrgX},h.prototype.setWorldOrgX=function(a){this.lworldOrgX=a},h.prototype.getWorldOrgY=function(){return this.lworldOrgY},h.prototype.setWorldOrgY=function(a){this.lworldOrgY=a},h.prototype.getWorldExtX=function(){return this.lworldExtX},h.prototype.setWorldExtX=function(a){this.lworldExtX=a},h.prototype.getWorldExtY=function(){return this.lworldExtY},h.prototype.setWorldExtY=function(a){this.lworldExtY=a},h.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},h.prototype.setDeviceOrgX=function(a){this.ldeviceOrgX=a},h.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},h.prototype.setDeviceOrgY=function(a){this.ldeviceOrgY=a},h.prototype.getDeviceExtX=function(){return this.ldeviceExtX},h.prototype.setDeviceExtX=function(a){this.ldeviceExtX=a},h.prototype.getDeviceExtY=function(){return this.ldeviceExtY},h.prototype.setDeviceExtY=function(a){this.ldeviceExtY=a},h.prototype.transformX=function(a){var e=0,i=this.lworldExtX;return i!=0&&(e=this.ldeviceOrgX+(a-this.lworldOrgX)*this.ldeviceExtX/i),e},h.prototype.transformY=function(a){var e=0,i=this.lworldExtY;return i!=0&&(e=this.ldeviceOrgY+(a-this.lworldOrgY)*this.ldeviceExtY/i),e},h.prototype.inverseTransformX=function(a){var e=0,i=this.ldeviceExtX;return i!=0&&(e=this.lworldOrgX+(a-this.ldeviceOrgX)*this.lworldExtX/i),e},h.prototype.inverseTransformY=function(a){var e=0,i=this.ldeviceExtY;return i!=0&&(e=this.lworldOrgY+(a-this.ldeviceOrgY)*this.lworldExtY/i),e},h.prototype.inverseTransformPoint=function(a){var e=new u(this.inverseTransformX(a.x),this.inverseTransformY(a.y));return e},w.exports=h}),(function(w,U,L){function u(t){if(Array.isArray(t)){for(var s=0,o=Array(t.length);sa.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*this.coolingFactor*(1-a.COOLING_ADAPTATION_FACTOR))),this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT_INCREMENTAL):(t>a.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(a.COOLING_ADAPTATION_FACTOR,1-(t-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):this.coolingFactor=1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},r.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,l,T,g=this.getAllNodes(),d;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&t&&this.updateGrid(),d=new Set,o=0;oN||d>N)&&(t.gravitationForceX=-this.gravityConstant*l,t.gravitationForceY=-this.gravityConstant*T)):(N=s.getEstimatedSize()*this.compoundGravityRangeFactor,(g>N||d>N)&&(t.gravitationForceX=-this.gravityConstant*l*this.compoundGravityConstant,t.gravitationForceY=-this.gravityConstant*T*this.compoundGravityConstant))},r.prototype.isConverged=function(){var t,s=!1;return this.totalIterations>this.maxIterations/3&&(s=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=g.length||N>=g[0].length)){for(var b=0;br}}]),i})();w.exports=e}),(function(w,U,L){function u(){}u.svd=function(h){this.U=null,this.V=null,this.s=null,this.m=0,this.n=0,this.m=h.length,this.n=h[0].length;var a=Math.min(this.m,this.n);this.s=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(Math.min(this.m+1,this.n)),this.U=(function(Tt){var Ct=function $t(bt){if(bt.length==0)return 0;for(var zt=[],St=0;St0;)Ct.push(0);return Ct})(this.n),i=(function(Tt){for(var Ct=[];Tt-- >0;)Ct.push(0);return Ct})(this.m),f=!0,r=Math.min(this.m-1,this.n),v=Math.max(0,Math.min(this.n-2,this.m)),t=0;t=0;E--)if(this.s[E]!==0){for(var y=E+1;y=0;z--){if((function(Tt,Ct){return Tt&&Ct})(z0;){var J=void 0,It=void 0;for(J=n-2;J>=-1&&J!==-1;J--)if(Math.abs(e[J])<=ht+tt*(Math.abs(this.s[J])+Math.abs(this.s[J+1]))){e[J]=0;break}if(J===n-2)It=4;else{var Nt=void 0;for(Nt=n-1;Nt>=J&&Nt!==J;Nt--){var vt=(Nt!==n?Math.abs(e[Nt]):0)+(Nt!==J+1?Math.abs(e[Nt-1]):0);if(Math.abs(this.s[Nt])<=ht+tt*vt){this.s[Nt]=0;break}}Nt===J?It=3:Nt===n-1?It=1:(It=2,J=Nt)}switch(J++,It){case 1:{var it=e[n-2];e[n-2]=0;for(var gt=n-2;gt>=J;gt--){var mt=u.hypot(this.s[gt],it),At=this.s[gt]/mt,Ot=it/mt;this.s[gt]=mt,gt!==J&&(it=-Ot*e[gt-1],e[gt-1]=At*e[gt-1]);for(var Et=0;Et=this.s[J+1]);){var Lt=this.s[J];if(this.s[J]=this.s[J+1],this.s[J+1]=Lt,JMath.abs(a)?(e=a/h,e=Math.abs(h)*Math.sqrt(1+e*e)):a!=0?(e=h/a,e=Math.abs(a)*Math.sqrt(1+e*e)):e=0,e},w.exports=u}),(function(w,U,L){var u=(function(){function e(i,f){for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:1,v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,t=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;h(this,e),this.sequence1=i,this.sequence2=f,this.match_score=r,this.mismatch_penalty=v,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===a&&f.callback===e&&this.listeners.splice(i,1)}},h.emit=function(a,e){for(var i=0;i{var U={45:((a,e,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),a.exports=f}),806:((a,e,i)=>{var f=i(551).FDLayoutConstants;function r(){}for(var v in f)r[v]=f[v];r.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,r.DEFAULT_RADIAL_SEPARATION=f.DEFAULT_EDGE_LENGTH,r.DEFAULT_COMPONENT_SEPERATION=60,r.TILE=!0,r.TILING_PADDING_VERTICAL=10,r.TILING_PADDING_HORIZONTAL=10,r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0,r.RELAX_MOVEMENT_ON_CONSTRAINTS=!0,r.TREE_REDUCTION_ON_INCREMENTAL=!0,r.PURE_INCREMENTAL=r.DEFAULT_INCREMENTAL,a.exports=r}),767:((a,e,i)=>{var f=i(551).FDLayoutEdge;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),880:((a,e,i)=>{var f=i(551).LGraph;function r(t,s,o){f.call(this,t,s,o)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),578:((a,e,i)=>{var f=i(551).LGraphManager;function r(t){f.call(this,t)}r.prototype=Object.create(f.prototype);for(var v in f)r[v]=f[v];a.exports=r}),765:((a,e,i)=>{var f=i(551).FDLayout,r=i(578),v=i(880),t=i(991),s=i(767),o=i(806),c=i(902),l=i(551).FDLayoutConstants,T=i(551).LayoutConstants,g=i(551).Point,d=i(551).PointD,N=i(551).DimensionD,b=i(551).Layout,A=i(551).Integer,S=i(551).IGeometry,V=i(551).LGraph,X=i(551).Transform,Z=i(551).LinkedList;function D(){f.call(this),this.toBeTiled={},this.constraints={}}D.prototype=Object.create(f.prototype);for(var _ in f)D[_]=f[_];D.prototype.newGraphManager=function(){var n=new r(this);return this.graphManager=n,n},D.prototype.newGraph=function(n){return new v(null,this.graphManager,n)},D.prototype.newNode=function(n){return new t(this.graphManager,n)},D.prototype.newEdge=function(n){return new s(null,null,n)},D.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=l.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=l.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=l.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1)},D.prototype.initSpringEmbedder=function(){f.prototype.initSpringEmbedder.call(this),this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/l.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=.04,this.coolingAdjuster=1},D.prototype.layout=function(){var n=T.DEFAULT_CREATE_BENDS_AS_NEEDED;return n&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},D.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 m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(I){return m.has(I)});this.graphManager.setAllNodesToApplyGravitation(p)}}else{var n=this.getFlatForest();if(n.length>0)this.positionNodesRadially(n);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var m=new Set(this.getAllNodes()),p=this.nodesWithGravity.filter(function(E){return m.has(E)});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},D.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%l.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 n=new Set(this.getAllNodes()),m=this.nodesWithGravity.filter(function(y){return n.has(y)});this.graphManager.setAllNodesToApplyGravitation(m),this.graphManager.updateBounds(),this.updateGrid(),o.PURE_INCREMENTAL?this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2:this.coolingFactor=l.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=l.DEFAULT_COOLING_FACTOR_INCREMENTAL/2*((100-this.afterGrowthIterations)/100):this.coolingFactor=l.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var p=!this.isTreeGrowing&&!this.isGrowthFinished,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(p,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},D.prototype.getPositionsData=function(){for(var n=this.graphManager.getAllNodes(),m={},p=0;p0&&this.updateDisplacements();for(var p=0;p0&&(E.fixedNodeWeight=I)}}if(this.constraints.relativePlacementConstraint){var M=new Map,R=new Map;if(this.dummyToNodeForVerticalAlignment=new Map,this.dummyToNodeForHorizontalAlignment=new Map,this.fixedNodesOnHorizontal=new Set,this.fixedNodesOnVertical=new Set,this.fixedNodeSet.forEach(function(O){n.fixedNodesOnHorizontal.add(O),n.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)),B=O[tt],O[tt]=O[H],O[H]=B;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=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;n.nodesInRelativeHorizontal.includes(H)||(n.nodesInRelativeHorizontal.push(H),n.nodeToRelativeConstraintMapHorizontal.set(H,[]),n.dummyToNodeForVerticalAlignment.has(H)?n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(H)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(H,n.idToNodeMap.get(H).getCenterX())),n.nodesInRelativeHorizontal.includes(B)||(n.nodesInRelativeHorizontal.push(B),n.nodeToRelativeConstraintMapHorizontal.set(B,[]),n.dummyToNodeForVerticalAlignment.has(B)?n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(n.dummyToNodeForVerticalAlignment.get(B)[0]).getCenterX()):n.nodeToTempPositionMapHorizontal.set(B,n.idToNodeMap.get(B).getCenterX())),n.nodeToRelativeConstraintMapHorizontal.get(H).push({right:B,gap:O.gap}),n.nodeToRelativeConstraintMapHorizontal.get(B).push({left:H,gap:O.gap})}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.get(O.bottom):O.bottom;n.nodesInRelativeVertical.includes(tt)||(n.nodesInRelativeVertical.push(tt),n.nodeToRelativeConstraintMapVertical.set(tt,[]),n.dummyToNodeForHorizontalAlignment.has(tt)?n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(tt)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(tt,n.idToNodeMap.get(tt).getCenterY())),n.nodesInRelativeVertical.includes(ht)||(n.nodesInRelativeVertical.push(ht),n.nodeToRelativeConstraintMapVertical.set(ht,[]),n.dummyToNodeForHorizontalAlignment.has(ht)?n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(n.dummyToNodeForHorizontalAlignment.get(ht)[0]).getCenterY()):n.nodeToTempPositionMapVertical.set(ht,n.idToNodeMap.get(ht).getCenterY())),n.nodeToRelativeConstraintMapVertical.get(tt).push({bottom:ht,gap:O.gap}),n.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=M.has(O.left)?M.get(O.left):O.left,B=M.has(O.right)?M.get(O.right):O.right;Q.has(H)?Q.get(H).push(B):Q.set(H,[B]),Q.has(B)?Q.get(B).push(H):Q.set(B,[H])}else{var tt=R.has(O.top)?R.get(O.top):O.top,ht=R.has(O.bottom)?R.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 Y=function(H,B){var tt=[],ht=[],J=new Z,It=new Set,Nt=0;return H.forEach(function(vt,it){if(!It.has(it)){tt[Nt]=[],ht[Nt]=!1;var gt=it;for(J.push(gt),It.add(gt),tt[Nt].push(gt);J.length!=0;){gt=J.shift(),B.has(gt)&&(ht[Nt]=!0);var mt=H.get(gt);mt.forEach(function(At){It.has(At)||(J.push(At),It.add(At),tt[Nt].push(At))})}Nt++}}),{components:tt,isFixed:ht}},rt=Y(Q,n.fixedNodesOnHorizontal);this.componentsOnHorizontal=rt.components,this.fixedComponentsOnHorizontal=rt.isFixed;var $=Y(z,n.fixedNodesOnVertical);this.componentsOnVertical=$.components,this.fixedComponentsOnVertical=$.isFixed}}},D.prototype.updateDisplacements=function(){var n=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function($){var O=n.idToNodeMap.get($.nodeId);O.displacementX=0,O.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var m=this.constraints.alignmentConstraint.vertical,p=0;p1){var R;for(R=0;RE&&(E=Math.floor(M.y)),I=Math.floor(M.x+o.DEFAULT_COMPONENT_SEPERATION)}this.transform(new d(T.WORLD_CENTER_X-M.x/2,T.WORLD_CENTER_Y-M.y/2))},D.radialLayout=function(n,m,p){var E=Math.max(this.maxDiagonalInTree(n),o.DEFAULT_RADIAL_SEPARATION);D.branchRadialLayout(m,null,0,359,0,E);var y=V.calculateBounds(n),I=new X;I.setDeviceOrgX(y.getMinX()),I.setDeviceOrgY(y.getMinY()),I.setWorldOrgX(p.x),I.setWorldOrgY(p.y);for(var M=0;M1;){var B=H[0];H.splice(0,1);var tt=z.indexOf(B);tt>=0&&z.splice(tt,1),$--,Y--}m!=null?O=(z.indexOf(H[0])+1)%$:O=0;for(var ht=Math.abs(E-p)/Y,J=O;rt!=Y;J=++J%$){var It=z[J].getOtherEnd(n);if(It!=m){var Nt=(p+rt*ht)%360,vt=(Nt+ht)%360;D.branchRadialLayout(It,n,Nt,vt,y+I,I),rt++}}},D.maxDiagonalInTree=function(n){for(var m=A.MIN_VALUE,p=0;pm&&(m=y)}return m},D.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},D.prototype.groupZeroDegreeMembers=function(){var n=this,m={};this.memberGroups={},this.idToDummyNode={};for(var p=[],E=this.graphManager.getAllNodes(),y=0;y"u"&&(m[R]=[]),m[R]=m[R].concat(I)}Object.keys(m).forEach(function(W){if(m[W].length>1){var x="DummyCompound_"+W;n.memberGroups[x]=m[W];var Q=m[W][0].getParent(),z=new t(n.graphManager);z.id=x,z.paddingLeft=Q.paddingLeft||0,z.paddingRight=Q.paddingRight||0,z.paddingBottom=Q.paddingBottom||0,z.paddingTop=Q.paddingTop||0,n.idToDummyNode[x]=z;var Y=n.getGraphManager().add(n.newGraph(),z),rt=Q.getChild();rt.add(z);for(var $=0;$y?(E.rect.x-=(E.labelWidth-y)/2,E.setWidth(E.labelWidth),E.labelMarginLeft=(E.labelWidth-y)/2):E.labelPosHorizontal=="right"&&E.setWidth(y+E.labelWidth)),E.labelHeight&&(E.labelPosVertical=="top"?(E.rect.y-=E.labelHeight,E.setHeight(I+E.labelHeight),E.labelMarginTop=E.labelHeight):E.labelPosVertical=="center"&&E.labelHeight>I?(E.rect.y-=(E.labelHeight-I)/2,E.setHeight(E.labelHeight),E.labelMarginTop=(E.labelHeight-I)/2):E.labelPosVertical=="bottom"&&E.setHeight(I+E.labelHeight))}})},D.prototype.repopulateCompounds=function(){for(var n=this.compoundOrder.length-1;n>=0;n--){var m=this.compoundOrder[n],p=m.id,E=m.paddingLeft,y=m.paddingTop,I=m.labelMarginLeft,M=m.labelMarginTop;this.adjustLocations(this.tiledMemberPack[p],m.rect.x,m.rect.y,E,y,I,M)}},D.prototype.repopulateZeroDegreeMembers=function(){var n=this,m=this.tiledZeroDegreePack;Object.keys(m).forEach(function(p){var E=n.idToDummyNode[p],y=E.paddingLeft,I=E.paddingTop,M=E.labelMarginLeft,R=E.labelMarginTop;n.adjustLocations(m[p],E.rect.x,E.rect.y,y,I,M,R)})},D.prototype.getToBeTiled=function(n){var m=n.id;if(this.toBeTiled[m]!=null)return this.toBeTiled[m];var p=n.getChild();if(p==null)return this.toBeTiled[m]=!1,!1;for(var E=p.getNodes(),y=0;y0)return this.toBeTiled[m]=!1,!1;if(I.getChild()==null){this.toBeTiled[I.id]=!1;continue}if(!this.getToBeTiled(I))return this.toBeTiled[m]=!1,!1}return this.toBeTiled[m]=!0,!0},D.prototype.getNodeDegree=function(n){n.id;for(var m=n.getEdges(),p=0,E=0;EQ&&(Q=Y.rect.height)}p+=Q+n.verticalPadding}},D.prototype.tileCompoundMembers=function(n,m){var p=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(E){var y=m[E];if(p.tiledMemberPack[E]=p.tileNodes(n[E],y.paddingLeft+y.paddingRight),y.rect.width=p.tiledMemberPack[E].width,y.rect.height=p.tiledMemberPack[E].height,y.setCenter(p.tiledMemberPack[E].centerX,p.tiledMemberPack[E].centerY),y.labelMarginLeft=0,y.labelMarginTop=0,o.NODE_DIMENSIONS_INCLUDE_LABELS){var I=y.rect.width,M=y.rect.height;y.labelWidth&&(y.labelPosHorizontal=="left"?(y.rect.x-=y.labelWidth,y.setWidth(I+y.labelWidth),y.labelMarginLeft=y.labelWidth):y.labelPosHorizontal=="center"&&y.labelWidth>I?(y.rect.x-=(y.labelWidth-I)/2,y.setWidth(y.labelWidth),y.labelMarginLeft=(y.labelWidth-I)/2):y.labelPosHorizontal=="right"&&y.setWidth(I+y.labelWidth)),y.labelHeight&&(y.labelPosVertical=="top"?(y.rect.y-=y.labelHeight,y.setHeight(M+y.labelHeight),y.labelMarginTop=y.labelHeight):y.labelPosVertical=="center"&&y.labelHeight>M?(y.rect.y-=(y.labelHeight-M)/2,y.setHeight(y.labelHeight),y.labelMarginTop=(y.labelHeight-M)/2):y.labelPosVertical=="bottom"&&y.setHeight(M+y.labelHeight))}})},D.prototype.tileNodes=function(n,m){var p=this.tileNodesByFavoringDim(n,m,!0),E=this.tileNodesByFavoringDim(n,m,!1),y=this.getOrgRatio(p),I=this.getOrgRatio(E),M;return IR&&(R=$.getWidth())});var W=I/y,x=M/y,Q=Math.pow(p-E,2)+4*(W+E)*(x+p)*y,z=(E-p+Math.sqrt(Q))/(2*(W+E)),Y;m?(Y=Math.ceil(z),Y==z&&Y++):Y=Math.floor(z);var rt=Y*(W+E)-E;return R>rt&&(rt=R),rt+=E*2,rt},D.prototype.tileNodesByFavoringDim=function(n,m,p){var E=o.TILING_PADDING_VERTICAL,y=o.TILING_PADDING_HORIZONTAL,I=o.TILING_COMPARE_BY,M={rows:[],rowWidth:[],rowHeight:[],width:0,height:m,verticalPadding:E,horizontalPadding:y,centerX:0,centerY:0};I&&(M.idealRowWidth=this.calcIdealRowWidth(n,p));var R=function(O){return O.rect.width*O.rect.height},W=function(O,H){return R(H)-R(O)};n.sort(function($,O){var H=W;return M.idealRowWidth?(H=I,H($.id,O.id)):H($,O)});for(var x=0,Q=0,z=0;z0&&(M+=n.horizontalPadding),n.rowWidth[p]=M,n.width0&&(R+=n.verticalPadding);var W=0;R>n.rowHeight[p]&&(W=n.rowHeight[p],n.rowHeight[p]=R,W=n.rowHeight[p]-W),n.height+=W,n.rows[p].push(m)},D.prototype.getShortestRowIndex=function(n){for(var m=-1,p=Number.MAX_VALUE,E=0;Ep&&(m=E,p=n.rowWidth[E]);return m},D.prototype.canAddHorizontal=function(n,m,p){if(n.idealRowWidth){var E=n.rows.length-1,y=n.rowWidth[E];return y+m+n.horizontalPadding<=n.idealRowWidth}var I=this.getShortestRowIndex(n);if(I<0)return!0;var M=n.rowWidth[I];if(M+n.horizontalPadding+m<=n.width)return!0;var R=0;n.rowHeight[I]0&&(R=p+n.verticalPadding-n.rowHeight[I]);var W;n.width-M>=m+n.horizontalPadding?W=(n.height+R)/(M+m+n.horizontalPadding):W=(n.height+R)/n.width,R=p+n.verticalPadding;var x;return n.widthI&&m!=p){E.splice(-1,1),n.rows[p].push(y),n.rowWidth[m]=n.rowWidth[m]-I,n.rowWidth[p]=n.rowWidth[p]+I,n.width=n.rowWidth[instance.getLongestRowIndex(n)];for(var M=Number.MIN_VALUE,R=0;RM&&(M=E[R].height);m>0&&(M+=n.verticalPadding);var W=n.rowHeight[m]+n.rowHeight[p];n.rowHeight[m]=M,n.rowHeight[p]0)for(var rt=y;rt<=I;rt++)Y[0]+=this.grid[rt][M-1].length+this.grid[rt][M].length-1;if(I0)for(var rt=M;rt<=R;rt++)Y[3]+=this.grid[y-1][rt].length+this.grid[y][rt].length-1;for(var $=A.MAX_VALUE,O,H,B=0;B{var f=i(551).FDLayoutNode,r=i(551).IMath;function v(s,o,c,l){f.call(this,s,o,c,l)}v.prototype=Object.create(f.prototype);for(var t in f)v[t]=f[t];v.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*r.sign(this.displacementX)),Math.abs(this.displacementY)>s.coolingFactor*s.maxNodeDisplacement&&(this.displacementY=s.coolingFactor*s.maxNodeDisplacement*r.sign(this.displacementY)),this.child&&this.child.getNodes().length>0&&this.propogateDisplacementToChildren(this.displacementX,this.displacementY)},v.prototype.propogateDisplacementToChildren=function(s,o){for(var c=this.getChild().getNodes(),l,T=0;T{function f(c){if(Array.isArray(c)){for(var l=0,T=Array(c.length);l0){var Lt=0;ot.forEach(function(st){k=="horizontal"?(et.set(st,g.has(st)?d[g.get(st)]:q.get(st)),Lt+=et.get(st)):(et.set(st,g.has(st)?N[g.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+=g.has(st)?d[g.get(st)]:q.get(st):ft+=g.has(st)?N[g.get(st)]:q.get(st)}),ft=ft/lt.length,lt.forEach(function(st){et.set(st,ft)})}});for(var wt=function(){var ot=ut.shift(),Lt=P.get(ot);Lt.forEach(function(ft){if(et.get(ft.id)st&&(st=kt),KtXt&&(Xt=Kt)}}catch(ee){Ct=!0,$t=ee}finally{try{!Tt&&bt.return&&bt.return()}finally{if(Ct)throw $t}}var fe=(Lt+st)/2-(ft+Xt)/2,Qt=!0,jt=!1,_t=void 0;try{for(var Jt=lt[Symbol.iterator](),ne;!(Qt=(ne=Jt.next()).done);Qt=!0){var te=ne.value;et.set(te,et.get(te)+fe)}}catch(ee){jt=!0,_t=ee}finally{try{!Qt&&Jt.return&&Jt.return()}finally{if(jt)throw _t}}})}return et},_=function(P){var k=0,K=0,q=0,at=0;if(P.forEach(function(j){j.left?d[g.get(j.left)]-d[g.get(j.right)]>=0?k++:K++:N[g.get(j.top)]-N[g.get(j.bottom)]>=0?q++:at++}),k>K&&q>at)for(var ct=0;ctK)for(var nt=0;ntat)for(var et=0;et1)l.fixedNodeConstraint.forEach(function(F,P){E[P]=[F.position.x,F.position.y],y[P]=[d[g.get(F.nodeId)],N[g.get(F.nodeId)]]}),I=!0;else if(l.alignmentConstraint)(function(){var F=0;if(l.alignmentConstraint.vertical){for(var P=l.alignmentConstraint.vertical,k=function(et){var j=new Set;P[et].forEach(function(pt){j.add(pt)});var ut=new Set([].concat(f(j)).filter(function(pt){return R.has(pt)})),wt=void 0;ut.size>0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).x,P[et].forEach(function(pt){E[F]=[wt,N[g.get(pt)]],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},K=0;K0?wt=d[g.get(ut.values().next().value)]:wt=Z(j).y,q[et].forEach(function(pt){E[F]=[d[g.get(pt)],wt],y[F]=[d[g.get(pt)],N[g.get(pt)]],F++})},ct=0;ctz&&(z=Q[rt].length,Y=rt);if(z0){var Et={x:0,y:0};l.fixedNodeConstraint.forEach(function(F,P){var k={x:d[g.get(F.nodeId)],y:N[g.get(F.nodeId)]},K=F.position,q=X(K,k);Et.x+=q.x,Et.y+=q.y}),Et.x/=l.fixedNodeConstraint.length,Et.y/=l.fixedNodeConstraint.length,d.forEach(function(F,P){d[P]+=Et.x}),N.forEach(function(F,P){N[P]+=Et.y}),l.fixedNodeConstraint.forEach(function(F){d[g.get(F.nodeId)]=F.position.x,N[g.get(F.nodeId)]=F.position.y})}if(l.alignmentConstraint){if(l.alignmentConstraint.vertical)for(var Dt=l.alignmentConstraint.vertical,Rt=function(P){var k=new Set;Dt[P].forEach(function(at){k.add(at)});var K=new Set([].concat(f(k)).filter(function(at){return R.has(at)})),q=void 0;K.size>0?q=d[g.get(K.values().next().value)]:q=Z(k).x,k.forEach(function(at){R.has(at)||(d[g.get(at)]=q)})},Ht=0;Ht0?q=N[g.get(K.values().next().value)]:q=Z(k).y,k.forEach(function(at){R.has(at)||(N[g.get(at)]=q)})},Ft=0;Ft{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(45);return h})()})})(he)),he.exports}var vr=se.exports,Oe;function pr(){return Oe||(Oe=1,(function(C,G){(function(U,L){C.exports=L(dr())})(vr,function(w){return(()=>{var U={658:(a=>{a.exports=Object.assign!=null?Object.assign.bind(Object):function(e){for(var i=arguments.length,f=Array(i>1?i-1:0),r=1;r{var f=(function(){function t(s,o){var c=[],l=!0,T=!1,g=void 0;try{for(var d=s[Symbol.iterator](),N;!(l=(N=d.next()).done)&&(c.push(N.value),!(o&&c.length===o));l=!0);}catch(b){T=!0,g=b}finally{try{!l&&d.return&&d.return()}finally{if(T)throw g}}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")}})(),r=i(140).layoutBase.LinkedList,v={};v.getTopMostNodes=function(t){for(var s={},o=0;o0&&I.merge(x)});for(var M=0;M1){N=g[0],b=N.connectedEdges().length,g.forEach(function(y){y.connectedEdges().length0&&c.set("dummy"+(c.size+1),V),X},v.relocateComponent=function(t,s,o){if(!o.fixedNodeConstraint){var c=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY,T=Number.POSITIVE_INFINITY,g=Number.NEGATIVE_INFINITY;if(o.quality=="draft"){var d=!0,N=!1,b=void 0;try{for(var A=s.nodeIndexes[Symbol.iterator](),S;!(d=(S=A.next()).done);d=!0){var V=S.value,X=f(V,2),Z=X[0],D=X[1],_=o.cy.getElementById(Z);if(_){var n=_.boundingBox(),m=s.xCoords[D]-n.w/2,p=s.xCoords[D]+n.w/2,E=s.yCoords[D]-n.h/2,y=s.yCoords[D]+n.h/2;ml&&(l=p),Eg&&(g=y)}}}catch(x){N=!0,b=x}finally{try{!d&&A.return&&A.return()}finally{if(N)throw b}}var I=t.x-(l+c)/2,M=t.y-(g+T)/2;s.xCoords=s.xCoords.map(function(x){return x+I}),s.yCoords=s.yCoords.map(function(x){return x+M})}else{Object.keys(s).forEach(function(x){var Q=s[x],z=Q.getRect().x,Y=Q.getRect().x+Q.getRect().width,rt=Q.getRect().y,$=Q.getRect().y+Q.getRect().height;zl&&(l=Y),rtg&&(g=$)});var R=t.x-(l+c)/2,W=t.y-(g+T)/2;Object.keys(s).forEach(function(x){var Q=s[x];Q.setCenter(Q.getCenterX()+R,Q.getCenterY()+W)})}}},v.calcBoundingBox=function(t,s,o,c){for(var l=Number.MAX_SAFE_INTEGER,T=Number.MIN_SAFE_INTEGER,g=Number.MAX_SAFE_INTEGER,d=Number.MIN_SAFE_INTEGER,N=void 0,b=void 0,A=void 0,S=void 0,V=t.descendants().not(":parent"),X=V.length,Z=0;ZN&&(l=N),TA&&(g=A),d{var f=i(548),r=i(140).CoSELayout,v=i(140).CoSENode,t=i(140).layoutBase.PointD,s=i(140).layoutBase.DimensionD,o=i(140).layoutBase.LayoutConstants,c=i(140).layoutBase.FDLayoutConstants,l=i(140).CoSEConstants,T=function(d,N){var b=d.cy,A=d.eles,S=A.nodes(),V=A.edges(),X=void 0,Z=void 0,D=void 0,_={};d.randomize&&(X=N.nodeIndexes,Z=N.xCoords,D=N.yCoords);var n=function(x){return typeof x=="function"},m=function(x,Q){return n(x)?x(Q):x},p=f.calcParentsWithoutChildren(b,A),E=function W(x,Q,z,Y){for(var rt=Q.length,$=0;$0){var J=void 0;J=z.getGraphManager().add(z.newGraph(),B),W(J,H,z,Y)}}},y=function(x,Q,z){for(var Y=0,rt=0,$=0;$0?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=Y/rt:n(d.idealEdgeLength)?l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=50:l.DEFAULT_EDGE_LENGTH=c.DEFAULT_EDGE_LENGTH=d.idealEdgeLength,l.MIN_REPULSION_DIST=c.MIN_REPULSION_DIST=c.DEFAULT_EDGE_LENGTH/10,l.DEFAULT_RADIAL_SEPARATION=c.DEFAULT_EDGE_LENGTH)},I=function(x,Q){Q.fixedNodeConstraint&&(x.constraints.fixedNodeConstraint=Q.fixedNodeConstraint),Q.alignmentConstraint&&(x.constraints.alignmentConstraint=Q.alignmentConstraint),Q.relativePlacementConstraint&&(x.constraints.relativePlacementConstraint=Q.relativePlacementConstraint)};d.nestingFactor!=null&&(l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=c.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.nestingFactor),d.gravity!=null&&(l.DEFAULT_GRAVITY_STRENGTH=c.DEFAULT_GRAVITY_STRENGTH=d.gravity),d.numIter!=null&&(l.MAX_ITERATIONS=c.MAX_ITERATIONS=d.numIter),d.gravityRange!=null&&(l.DEFAULT_GRAVITY_RANGE_FACTOR=c.DEFAULT_GRAVITY_RANGE_FACTOR=d.gravityRange),d.gravityCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=c.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.gravityCompound),d.gravityRangeCompound!=null&&(l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=c.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.gravityRangeCompound),d.initialEnergyOnIncremental!=null&&(l.DEFAULT_COOLING_FACTOR_INCREMENTAL=c.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.initialEnergyOnIncremental),d.tilingCompareBy!=null&&(l.TILING_COMPARE_BY=d.tilingCompareBy),d.quality=="proof"?o.QUALITY=2:o.QUALITY=0,l.NODE_DIMENSIONS_INCLUDE_LABELS=c.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=d.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!d.randomize,l.ANIMATE=c.ANIMATE=o.ANIMATE=d.animate,l.TILE=d.tile,l.TILING_PADDING_VERTICAL=typeof d.tilingPaddingVertical=="function"?d.tilingPaddingVertical.call():d.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof d.tilingPaddingHorizontal=="function"?d.tilingPaddingHorizontal.call():d.tilingPaddingHorizontal,l.DEFAULT_INCREMENTAL=c.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!0,l.PURE_INCREMENTAL=!d.randomize,o.DEFAULT_UNIFORM_LEAF_NODE_SIZES=d.uniformNodeDimensions,d.step=="transformed"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!1),d.step=="enforced"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!1),d.step=="cose"&&(l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!1,l.APPLY_LAYOUT=!0),d.step=="all"&&(d.randomize?l.TRANSFORM_ON_CONSTRAINT_HANDLING=!0:l.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,l.ENFORCE_CONSTRAINTS=!0,l.APPLY_LAYOUT=!0),d.fixedNodeConstraint||d.alignmentConstraint||d.relativePlacementConstraint?l.TREE_REDUCTION_ON_INCREMENTAL=!1:l.TREE_REDUCTION_ON_INCREMENTAL=!0;var M=new r,R=M.newGraphManager();return E(R.addRoot(),f.getTopMostNodes(S),M,d),y(M,R,V),I(M,d),M.runLayout(),_};a.exports={coseLayout:T}}),212:((a,e,i)=>{var f=(function(){function d(N,b){for(var A=0;A0)if(p){var I=t.getTopMostNodes(A.eles.nodes());if(D=t.connectComponents(S,A.eles,I),D.forEach(function(vt){var it=vt.boundingBox();_.push({x:it.x1+it.w/2,y:it.y1+it.h/2})}),A.randomize&&D.forEach(function(vt){A.eles=vt,X.push(o(A))}),A.quality=="default"||A.quality=="proof"){var M=S.collection();if(A.tile){var R=new Map,W=[],x=[],Q=0,z={nodeIndexes:R,xCoords:W,yCoords:x},Y=[];if(D.forEach(function(vt,it){vt.edges().length==0&&(vt.nodes().forEach(function(gt,mt){M.merge(vt.nodes()[mt]),gt.isParent()||(z.nodeIndexes.set(vt.nodes()[mt].id(),Q++),z.xCoords.push(vt.nodes()[0].position().x),z.yCoords.push(vt.nodes()[0].position().y))}),Y.push(it))}),M.length>1){var rt=M.boundingBox();_.push({x:rt.x1+rt.w/2,y:rt.y1+rt.h/2}),D.push(M),X.push(z);for(var $=Y.length-1;$>=0;$--)D.splice(Y[$],1),X.splice(Y[$],1),_.splice(Y[$],1)}}D.forEach(function(vt,it){A.eles=vt,Z.push(l(A,X[it])),t.relocateComponent(_[it],Z[it],A)})}else D.forEach(function(vt,it){t.relocateComponent(_[it],X[it],A)});var O=new Set;if(D.length>1){var H=[],B=V.filter(function(vt){return vt.css("display")=="none"});D.forEach(function(vt,it){var gt=void 0;if(A.quality=="draft"&&(gt=X[it].nodeIndexes),vt.nodes().not(B).length>0){var mt={};mt.edges=[],mt.nodes=[];var At=void 0;vt.nodes().not(B).forEach(function(Ot){if(A.quality=="draft")if(!Ot.isParent())At=gt.get(Ot.id()),mt.nodes.push({x:X[it].xCoords[At]-Ot.boundingbox().w/2,y:X[it].yCoords[At]-Ot.boundingbox().h/2,width:Ot.boundingbox().w,height:Ot.boundingbox().h});else{var Et=t.calcBoundingBox(Ot,X[it].xCoords,X[it].yCoords,gt);mt.nodes.push({x:Et.topLeftX,y:Et.topLeftY,width:Et.width,height:Et.height})}else Z[it][Ot.id()]&&mt.nodes.push({x:Z[it][Ot.id()].getLeft(),y:Z[it][Ot.id()].getTop(),width:Z[it][Ot.id()].getWidth(),height:Z[it][Ot.id()].getHeight()})}),vt.edges().forEach(function(Ot){var Et=Ot.source(),Dt=Ot.target();if(Et.css("display")!="none"&&Dt.css("display")!="none")if(A.quality=="draft"){var Rt=gt.get(Et.id()),Ht=gt.get(Dt.id()),Ut=[],Pt=[];if(Et.isParent()){var Ft=t.calcBoundingBox(Et,X[it].xCoords,X[it].yCoords,gt);Ut.push(Ft.topLeftX+Ft.width/2),Ut.push(Ft.topLeftY+Ft.height/2)}else Ut.push(X[it].xCoords[Rt]),Ut.push(X[it].yCoords[Rt]);if(Dt.isParent()){var Yt=t.calcBoundingBox(Dt,X[it].xCoords,X[it].yCoords,gt);Pt.push(Yt.topLeftX+Yt.width/2),Pt.push(Yt.topLeftY+Yt.height/2)}else Pt.push(X[it].xCoords[Ht]),Pt.push(X[it].yCoords[Ht]);mt.edges.push({startX:Ut[0],startY:Ut[1],endX:Pt[0],endY:Pt[1]})}else Z[it][Et.id()]&&Z[it][Dt.id()]&&mt.edges.push({startX:Z[it][Et.id()].getCenterX(),startY:Z[it][Et.id()].getCenterY(),endX:Z[it][Dt.id()].getCenterX(),endY:Z[it][Dt.id()].getCenterY()})}),mt.nodes.length>0&&(H.push(mt),O.add(it))}});var tt=m.packComponents(H,A.randomize).shifts;if(A.quality=="draft")X.forEach(function(vt,it){var gt=vt.xCoords.map(function(At){return At+tt[it].dx}),mt=vt.yCoords.map(function(At){return At+tt[it].dy});vt.xCoords=gt,vt.yCoords=mt});else{var ht=0;O.forEach(function(vt){Object.keys(Z[vt]).forEach(function(it){var gt=Z[vt][it];gt.setCenter(gt.getCenterX()+tt[ht].dx,gt.getCenterY()+tt[ht].dy)}),ht++})}}}else{var E=A.eles.boundingBox();if(_.push({x:E.x1+E.w/2,y:E.y1+E.h/2}),A.randomize){var y=o(A);X.push(y)}A.quality=="default"||A.quality=="proof"?(Z.push(l(A,X[0])),t.relocateComponent(_[0],Z[0],A)):t.relocateComponent(_[0],X[0],A)}var J=function(it,gt){if(A.quality=="default"||A.quality=="proof"){typeof it=="number"&&(it=gt);var mt=void 0,At=void 0,Ot=it.data("id");return Z.forEach(function(Dt){Ot in Dt&&(mt={x:Dt[Ot].getRect().getCenterX(),y:Dt[Ot].getRect().getCenterY()},At=Dt[Ot])}),A.nodeDimensionsIncludeLabels&&(At.labelWidth&&(At.labelPosHorizontal=="left"?mt.x+=At.labelWidth/2:At.labelPosHorizontal=="right"&&(mt.x-=At.labelWidth/2)),At.labelHeight&&(At.labelPosVertical=="top"?mt.y+=At.labelHeight/2:At.labelPosVertical=="bottom"&&(mt.y-=At.labelHeight/2))),mt==null&&(mt={x:it.position("x"),y:it.position("y")}),{x:mt.x,y:mt.y}}else{var Et=void 0;return X.forEach(function(Dt){var Rt=Dt.nodeIndexes.get(it.id());Rt!=null&&(Et={x:Dt.xCoords[Rt],y:Dt.yCoords[Rt]})}),Et==null&&(Et={x:it.position("x"),y:it.position("y")}),{x:Et.x,y:Et.y}}};if(A.quality=="default"||A.quality=="proof"||A.randomize){var It=t.calcParentsWithoutChildren(S,V),Nt=V.filter(function(vt){return vt.css("display")=="none"});A.eles=V.not(Nt),V.nodes().not(":parent").not(Nt).layoutPositions(b,A,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})();a.exports=g}),657:((a,e,i)=>{var f=i(548),r=i(140).layoutBase.Matrix,v=i(140).layoutBase.SVD,t=function(o){var c=o.cy,l=o.eles,T=l.nodes(),g=l.nodes(":parent"),d=new Map,N=new Map,b=new Map,A=[],S=[],V=[],X=[],Z=[],D=[],_=[],n=[],m=void 0,p=1e8,E=1e-9,y=o.piTol,I=o.samplingType,M=o.nodeSeparation,R=void 0,W=function(){for(var P=0,k=0,K=!1;k=at;){nt=q[at++];for(var xt=A[nt],lt=0;ltut&&(ut=Z[Lt],wt=Lt)}return wt},Q=function(P){var k=void 0;if(P){k=Math.floor(Math.random()*m);for(var q=0;q=1)break;j=et}for(var pt=0;pt=1)break;j=et}for(var lt=0;lt0&&(k.isParent()?A[P].push(b.get(k.id())):A[P].push(k.id()))})});var Nt=function(P){var k=N.get(P),K=void 0;d.get(P).forEach(function(q){c.getElementById(q).isParent()?K=b.get(q):K=q,A[k].push(K),A[N.get(K)].push(P)})},vt=!0,it=!1,gt=void 0;try{for(var mt=d.keys()[Symbol.iterator](),At;!(vt=(At=mt.next()).done);vt=!0){var Ot=At.value;Nt(Ot)}}catch(F){it=!0,gt=F}finally{try{!vt&&mt.return&&mt.return()}finally{if(it)throw gt}}m=N.size;var Et=void 0;if(m>2){R=m{var f=i(212),r=function(t){t&&t("layout","fcose",f)};typeof cytoscape<"u"&&r(cytoscape),a.exports=r}),140:(a=>{a.exports=w})},L={};function u(a){var e=L[a];if(e!==void 0)return e.exports;var i=L[a]={exports:{}};return U[a](i,i.exports,u),i.exports}var h=u(579);return h})()})})(se)),se.exports}var yr=pr();const Er=Be(yr);var De={L:"left",R:"right",T:"top",B:"bottom"},xe={L:dt(C=>`${C},${C/2} 0,${C} 0,0`,"L"),R:dt(C=>`0,${C/2} ${C},0 ${C},${C}`,"R"),T:dt(C=>`0,0 ${C},0 ${C/2},${C}`,"T"),B:dt(C=>`${C/2},0 ${C},${C} 0,${C}`,"B")},oe={L:dt((C,G)=>C-G+2,"L"),R:dt((C,G)=>C-2,"R"),T:dt((C,G)=>C-G+2,"T"),B:dt((C,G)=>C-2,"B")},mr=dt(function(C){return Wt(C)?C==="L"?"R":"L":C==="T"?"B":"T"},"getOppositeArchitectureDirection"),Ie=dt(function(C){const G=C;return G==="L"||G==="R"||G==="T"||G==="B"},"isArchitectureDirection"),Wt=dt(function(C){const G=C;return G==="L"||G==="R"},"isArchitectureDirectionX"),qt=dt(function(C){const G=C;return G==="T"||G==="B"},"isArchitectureDirectionY"),me=dt(function(C,G){const w=Wt(C)&&qt(G),U=qt(C)&&Wt(G);return w||U},"isArchitectureDirectionXY"),Tr=dt(function(C){const G=C[0],w=C[1],U=Wt(G)&&qt(w),L=qt(G)&&Wt(w);return U||L},"isArchitecturePairXY"),Nr=dt(function(C){return C!=="LL"&&C!=="RR"&&C!=="TT"&&C!=="BB"},"isValidArchitectureDirectionPair"),pe=dt(function(C,G){const w=`${C}${G}`;return Nr(w)?w:void 0},"getArchitectureDirectionPair"),Lr=dt(function([C,G],w){const U=w[0],L=w[1];return Wt(U)?qt(L)?[C+(U==="L"?-1:1),G+(L==="T"?1:-1)]:[C+(U==="L"?-1:1),G]:Wt(L)?[C+(L==="L"?1:-1),G+(U==="T"?1:-1)]:[C,G+(U==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Cr=dt(function(C){return C==="LT"||C==="TL"?[1,1]:C==="BL"||C==="LB"?[1,-1]:C==="BR"||C==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Ar=dt(function(C,G){return me(C,G)?"bend":Wt(C)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),wr=dt(function(C){return C.type==="service"},"isArchitectureService"),Mr=dt(function(C){return C.type==="junction"},"isArchitectureJunction"),Fe=dt(C=>C.data(),"edgeData"),ie=dt(C=>C.data(),"nodeData"),Or=ir.architecture,be=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=qe,this.getAccTitle=Qe,this.setDiagramTitle=Je,this.getDiagramTitle=Ke,this.getAccDescription=je,this.setAccDescription=_e,this.clear()}static{dt(this,"ArchitectureDB")}setDiagramId(C){this.diagramId=C}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",tr()}addService({id:C,icon:G,in:w,title:U,iconText:L}){if(this.registeredIds[C]!==void 0)throw new Error(`The service id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The service [${C}] cannot be placed within itself`);if(this.registeredIds[w]===void 0)throw new Error(`The service [${C}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[w]==="node")throw new Error(`The service [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"service",icon:G,iconText:L,title:U,edges:[],in:w}}getServices(){return Object.values(this.nodes).filter(wr)}addJunction({id:C,in:G}){if(this.registeredIds[C]!==void 0)throw new Error(`The junction id [${C}] is already in use by another ${this.registeredIds[C]}`);if(G!==void 0){if(C===G)throw new Error(`The junction [${C}] cannot be placed within itself`);if(this.registeredIds[G]===void 0)throw new Error(`The junction [${C}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[G]==="node")throw new Error(`The junction [${C}]'s parent is not a group`)}this.registeredIds[C]="node",this.nodes[C]={id:C,type:"junction",edges:[],in:G}}getJunctions(){return Object.values(this.nodes).filter(Mr)}getNodes(){return Object.values(this.nodes)}getNode(C){return this.nodes[C]??null}addGroup({id:C,icon:G,in:w,title:U}){if(this.registeredIds?.[C]!==void 0)throw new Error(`The group id [${C}] is already in use by another ${this.registeredIds[C]}`);if(w!==void 0){if(C===w)throw new Error(`The group [${C}] cannot be placed within itself`);if(this.registeredIds?.[w]===void 0)throw new Error(`The group [${C}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds?.[w]==="node")throw new Error(`The group [${C}]'s parent is not a group`)}this.registeredIds[C]="group",this.groups[C]={id:C,icon:G,title:U,in:w}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:C,rhsId:G,lhsDir:w,rhsDir:U,lhsInto:L,rhsInto:u,lhsGroup:h,rhsGroup:a,title:e}){if(!Ie(w))throw new Error(`Invalid direction given for left hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(w)}`);if(!Ie(U))throw new Error(`Invalid direction given for right hand side of edge ${C}--${G}. Expected (L,R,T,B) got ${String(U)}`);if(this.nodes[C]===void 0&&this.groups[C]===void 0)throw new Error(`The left-hand id [${C}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[G]===void 0&&this.groups[G]===void 0)throw new Error(`The right-hand id [${G}] does not yet exist. Please create the service/group before declaring an edge to it.`);const i=this.nodes[C].in,f=this.nodes[G].in;if(h&&i&&f&&i==f)throw new Error(`The left-hand id [${C}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(a&&i&&f&&i==f)throw new Error(`The right-hand id [${G}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const r={lhsId:C,lhsDir:w,lhsInto:L,lhsGroup:h,rhsId:G,rhsDir:U,rhsInto:u,rhsGroup:a,title:e};this.edges.push(r),this.nodes[C]&&this.nodes[G]&&(this.nodes[C].edges.push(this.edges[this.edges.length-1]),this.nodes[G].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const C={},G=Object.entries(this.nodes).reduce((a,[e,i])=>(a[e]=i.edges.reduce((f,r)=>{const v=this.getNode(r.lhsId)?.in,t=this.getNode(r.rhsId)?.in;if(v&&t&&v!==t){const s=Ar(r.lhsDir,r.rhsDir);s!=="bend"&&(C[v]??={},C[v][t]=s,C[t]??={},C[t][v]=s)}if(r.lhsId===e){const s=pe(r.lhsDir,r.rhsDir);s&&(f[s]=r.rhsId)}else{const s=pe(r.rhsDir,r.lhsDir);s&&(f[s]=r.lhsId)}return f},{}),a),{}),w=Object.keys(G)[0],U={[w]:1},L=Object.keys(G).reduce((a,e)=>e===w?a:{...a,[e]:1},{}),u=dt(a=>{const e={[a]:[0,0]},i=[a];for(;i.length>0;){const f=i.shift();if(f){U[f]=1,delete L[f];const r=G[f],[v,t]=e[f];Object.entries(r).forEach(([s,o])=>{U[o]||(e[o]=Lr([v,t],s),i.push(o))})}}return e},"BFS"),h=[u(w)];for(;Object.keys(L).length>0;)h.push(u(Object.keys(L)[0]));this.dataStructures={adjList:G,spatialMaps:h,groupAlignments:C}}return this.dataStructures}setElementForId(C,G){this.elements[C]=G}getElementById(C){return this.elements[C]}getConfig(){return er({...Or,...rr().architecture})}getConfigField(C){return this.getConfig()[C]}},Dr=dt((C,G)=>{lr(C,G),C.groups.map(w=>G.addGroup(w)),C.services.map(w=>G.addService({...w,type:"service"})),C.junctions.map(w=>G.addJunction({...w,type:"junction"})),C.edges.map(w=>G.addEdge(w))},"populateDb"),Pe={parser:{yy:void 0},parse:dt(async C=>{const G=await fr("architecture",C);Re.debug(G);const w=Pe.parser?.yy;if(!(w instanceof be))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(G,w)},"parse")},xr=dt(C=>` .edge { stroke-width: ${C.archEdgeWidth}; stroke: ${C.archEdgeColor}; diff --git a/apps/pythinker-code/dist-web/assets/azcli-Y6nb8tq_.js b/apps/pythinker-code/dist-web/assets/azcli-Y6nb8tq_.js new file mode 100644 index 000000000..0b778d00d --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/azcli-Y6nb8tq_.js @@ -0,0 +1 @@ +const e={comments:{lineComment:"#"}},t={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}};export{e as conf,t as language}; diff --git a/apps/pythinker-code/dist-web/assets/bat-BwHxbl9M.js b/apps/pythinker-code/dist-web/assets/bat-BwHxbl9M.js new file mode 100644 index 000000000..1b0b979c3 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/bat-BwHxbl9M.js @@ -0,0 +1 @@ +const e={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},s={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=>`\\b${e}\\b`,t="[_a-zA-Z]",o="[_a-zA-Z0-9]",i=n(`${t}${o}*`),r=["targetScope","resource","module","param","var","output","for","in","if","existing"],s=["true","false","null"],c="[ \\t\\r\\n]",a="[0-9]+",g={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])' + `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},l={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(xe(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]"?rr(i,e):yt(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 yt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ar(a,e),yt(a,e),er(a,e),a}function tr(e){switch(Ut(e)){case Pe:case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:return!0;default:return!1}}function yt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function er(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function ar(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=d(function(T,m,u,y){for(u=u||{},y=T.length;y--;u[T[y]]=m);return u},"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],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],b=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:d(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:d(function(m,u,y,L,E,h,W){var f=h.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",h[f-1]),L.setHierarchy(h[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:L.getLogger().debug("Rule: link: ",h[f],m),this.$={edgeTypeStr:h[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:const O=parseInt(h[f]),q=L.generateId();this.$={id:q,type:"space",label:"",width:O,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);const j=L.edgeStrToEdgeData(h[f-1].edgeTypeStr),st=L.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),dt=L.edgeStrToThickness(h[f-1].edgeTypeStr),R=L.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:dt,pattern:R,directions:h[f].directions,arrowTypeEnd:j,arrowTypeStart:st},{id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:L.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]),L.generateId(),this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);const G=L.generateId();this.$={id:G,type:"composite",label:"",children:h[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[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(o,[2,16],{14:22,15:p,16:b}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[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(w,[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:b,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(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(m,u){if(u.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=u,y}},"parseError"),parse:d(function(m){var u=this,y=[0],L=[],E=[null],h=[],W=this.table,f="",O=0,q=0,j=2,st=1,dt=h.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(G.yy[ut]=this.yy[ut]);R.setInput(m,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var pt=R.yylloc;h.push(pt);var de=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(Y){y.length=y.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}d(ue,"popStack");function It(){var Y;return Y=L.pop()||R.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(L=Y,Y=L.pop()),Y=u.symbols_[Y]||Y),Y}d(It,"lex");for(var F,J,K,ft,Q={},it,Z,Ct,nt;;){if(J=y[y.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=It()),K=W[J]&&W[J][F]),typeof K>"u"||!K.length||!K[0]){var xt="";nt=[];for(it in W[J])this.terminals_[it]&&it>j&&nt.push("'"+this.terminals_[it]+"'");R.showPosition?xt="Parse error on line "+(O+1)+`: -`+R.showPosition()+` -Expecting `+nt.join(", ")+", got '"+(this.terminals_[F]||F)+"'":xt="Parse error on line "+(O+1)+": Unexpected "+(F==st?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(xt,{text:R.match,token:this.terminals_[F]||F,line:R.yylineno,loc:pt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(K[0]){case 1:y.push(F),E.push(R.yytext),h.push(R.yylloc),y.push(K[1]),F=null,q=R.yyleng,f=R.yytext,O=R.yylineno,pt=R.yylloc;break;case 2:if(Z=this.productions_[K[1]][1],Q.$=E[E.length-Z],Q._$={first_line:h[h.length-(Z||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Z||1)].first_column,last_column:h[h.length-1].last_column},de&&(Q._$.range=[h[h.length-(Z||1)].range[0],h[h.length-1].range[1]]),ft=this.performAction.apply(Q,[f,q,O,G.yy,K[1],E,h].concat(dt)),typeof ft<"u")return ft;Z&&(y=y.slice(0,-1*Z*2),E=E.slice(0,-1*Z),h=h.slice(0,-1*Z)),y.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),Ct=W[y[y.length-2]][y[y.length-1]],y.push(Ct);break;case 3:return!0}}return!0},"parse")},_=(function(){var T={EOF:1,parseError:d(function(u,y){if(this.yy.parser)this.yy.parser.parseError(u,y);else throw new Error(u)},"parseError"),setInput:d(function(m,u){return this.yy=u||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var u=m.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),m},"input"),unput:d(function(m){var u=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;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),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===L.length?this.yylloc.first_column:0)+L[L.length-y.length].length-y[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),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(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),u=new Array(m.length+1).join("-");return m+this.upcomingInput()+` -`+u+"^"},"showPosition"),test_match:d(function(m,u){var y,L,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),L=m[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+m[0].length},this.yytext+=m[0],this.match+=m[0],this.matches=m,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(m[0].length),this.matched+=m[0],y=this.performAction.call(this,this.yy,this,u,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),y)return y;if(this._backtrack){for(var h in E)this[h]=E[h];return!1}return!1},"test_match"),next:d(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var m,u,y,L;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),h=0;hu[0].length)){if(u=y,L=h,this.options.backtrack_lexer){if(m=this.test_match(y,E[h]),m!==!1)return m;if(this._backtrack){u=!1;continue}else return!1}else if(!this.options.flex)break}return u?(m=this.test_match(u,E[L]),m!==!1?m:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:d(function(){var u=this.next();return u||this.lex()},"lex"),begin:d(function(u){this.conditionStack.push(u)},"begin"),popState:d(function(){var u=this.conditionStack.length-1;return u>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:d(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:d(function(u){return u=this.conditionStack.length-1-Math.abs(u||0),u>=0?this.conditionStack[u]:"INITIAL"},"topState"),pushState:d(function(u){this.begin(u)},"pushState"),stateStackSize:d(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:d(function(u,y,L,E){switch(L){case 0:return u.getLogger().debug("Found block-beta"),10;case 1:return u.getLogger().debug("Found id-block"),29;case 2:return u.getLogger().debug("Found block"),10;case 3:u.getLogger().debug(".",y.yytext);break;case 4:u.getLogger().debug("_",y.yytext);break;case 5:return 5;case 6:return y.yytext=-1,28;case 7:return y.yytext=y.yytext.replace(/columns\s+/,""),u.getLogger().debug("COLUMNS (LEX)",y.yytext),28;case 8:this.pushState("md_string");break;case 9:return"MD_STR";case 10:this.popState();break;case 11:this.pushState("string");break;case 12:u.getLogger().debug("LEX: POPPING STR:",y.yytext),this.popState();break;case 13:return u.getLogger().debug("LEX: STR end:",y.yytext),"STR";case 14:return y.yytext=y.yytext.replace(/space\:/,""),u.getLogger().debug("SPACE NUM (LEX)",y.yytext),21;case 15:return y.yytext="1",u.getLogger().debug("COLUMNS (LEX)",y.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 34:this.popState();break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 38:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),u.getLogger().debug("Lex: ))"),"NODE_DEND";case 40:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 41:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 42:return this.popState(),u.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),u.getLogger().debug("Lex: -)"),"NODE_DEND";case 44:return this.popState(),u.getLogger().debug("Lex: (("),"NODE_DEND";case 45:return this.popState(),u.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),u.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),u.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";case 49:return this.popState(),u.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),u.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),u.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),u.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),u.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return u.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return u.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return u.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return u.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 59:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 60:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 61:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 62:return u.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return u.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 64:return u.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 65:return this.pushState("NODE"),35;case 66:return this.pushState("NODE"),35;case 67:return this.pushState("NODE"),35;case 68:return this.pushState("NODE"),35;case 69:return this.pushState("NODE"),35;case 70:return this.pushState("NODE"),35;case 71:return this.pushState("NODE"),35;case 72:return u.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),u.getLogger().debug("LEX ARR START"),37;case 74:return u.getLogger().debug("Lex: NODE_ID",y.yytext),31;case 75:return u.getLogger().debug("Lex: EOF",y.yytext),8;case 76:this.pushState("md_string");break;case 77:this.pushState("md_string");break;case 78:return"NODE_DESCR";case 79:this.popState();break;case 80:u.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:u.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return u.getLogger().debug("LEX: NODE_DESCR:",y.yytext),"NODE_DESCR";case 83:u.getLogger().debug("LEX POPPING"),this.popState();break;case 84:u.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return y.yytext=y.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (right): dir:",y.yytext),"DIR";case 86:return y.yytext=y.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (left):",y.yytext),"DIR";case 87:return y.yytext=y.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (x):",y.yytext),"DIR";case 88:return y.yytext=y.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (y):",y.yytext),"DIR";case 89:return y.yytext=y.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (up):",y.yytext),"DIR";case 90:return y.yytext=y.yytext.replace(/^,\s*/,""),u.getLogger().debug("Lex (down):",y.yytext),"DIR";case 91:return y.yytext="]>",u.getLogger().debug("Lex (ARROW_DIR end):",y.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return u.getLogger().debug("Lex: LINK","#"+y.yytext+"#"),15;case 93:return u.getLogger().debug("Lex: LINK",y.yytext),15;case 94:return u.getLogger().debug("Lex: LINK",y.yytext),15;case 95:return u.getLogger().debug("Lex: LINK",y.yytext),15;case 96:return u.getLogger().debug("Lex: START_LINK",y.yytext),this.pushState("LLABEL"),16;case 97:return u.getLogger().debug("Lex: START_LINK",y.yytext),this.pushState("LLABEL"),16;case 98:return u.getLogger().debug("Lex: START_LINK",y.yytext),this.pushState("LLABEL"),16;case 99:this.pushState("md_string");break;case 100:return u.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),u.getLogger().debug("Lex: LINK","#"+y.yytext+"#"),15;case 102:return this.popState(),u.getLogger().debug("Lex: LINK",y.yytext),15;case 103:return this.popState(),u.getLogger().debug("Lex: LINK",y.yytext),15;case 104:return u.getLogger().debug("Lex: COLON",y.yytext),y.yytext=y.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};return T})();S.lexer=_;function I(){this.yy={}}return d(I,"Parser"),I.prototype=S,S.Parser=I,new I})();wt.parser=wt;var sr=wt,X=new Map,Et=[],mt=new Map,At="color",zt="fill",ir="bgFill",Xt=",",nr=A(),lt=new Map,_t="",cr=d(e=>je.sanitizeText(e,nr),"sanitizeText"),lr=d(function(e,t=""){let a=lt.get(e);a||(a={id:e,styles:[],textStyles:[]},lt.set(e,a)),t?.split(Xt).forEach(s=>{const i=s.replace(/([^;]*);/,"$1").trim();if(RegExp(At).exec(s)){const r=i.replace(zt,ir).replace(At,zt);a.textStyles.push(r)}a.styles.push(i)})},"addStyleClass"),or=d(function(e,t=""){const a=X.get(e);t!=null&&(a.styles=t.split(Xt))},"addStyle2Node"),hr=d(function(e,t){e.split(",").forEach(function(a){let s=X.get(a);if(s===void 0){const i=a.trim();s={id:i,type:"na",children:[]},X.set(i,s)}s.classes||(s.classes=[]),s.classes.push(t)})},"setCssClass"),Vt=d((e,t)=>{const a=e.flat(),s=[],c=a.find(r=>r?.type==="column-setting")?.columns??-1;for(const r of a){if(typeof c=="number"&&c>0&&r.type!=="column-setting"&&typeof r.widthInColumns=="number"&&r.widthInColumns>c&&k.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width ${c}`),r.label&&(r.label=cr(r.label)),r.type==="classDef"){lr(r.id,r.css);continue}if(r.type==="applyClass"){hr(r.id,r?.styleClass??"");continue}if(r.type==="applyStyles"){r?.stylesStr&&or(r.id,r?.stylesStr);continue}if(r.type==="column-setting")t.columns=r.columns??-1;else if(r.type==="edge"){const n=(mt.get(r.id)??0)+1;mt.set(r.id,n),r.id=n+"-"+r.id,Et.push(r)}else{r.label||(r.type==="composite"?r.label="":r.label=r.id);const n=X.get(r.id);if(n===void 0?X.set(r.id,r):(r.type!=="na"&&(n.type=r.type),r.label!==r.id&&(n.label=r.label)),r.children&&Vt(r.children,r),r.type==="space"){const l=r.width??1;for(let g=0;g{k.debug("Clear called"),We(),rt={id:"root",type:"composite",children:[],columns:-1},X=new Map([["root",rt]]),Tt=[],lt=new Map,Et=[],mt=new Map,_t=""},"clear");function jt(e){switch(k.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return k.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}d(jt,"typeStr2Type");function Gt(e){switch(k.debug("typeStr2Type",e),e){case"==":return"thick";default:return"normal"}}d(Gt,"edgeTypeStr2Type");function Zt(e){switch(e.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}d(Zt,"edgeStrToEdgeData");function qt(e){switch(e.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}d(qt,"edgeStrToEdgeStartData");function Jt(e){return e.includes("==")?"thick":"normal"}d(Jt,"edgeStrToThickness");function Qt(e){return e.includes(".-")?"dotted":"solid"}d(Qt,"edgeStrToPattern");var Mt=0,dr=d(()=>(Mt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Mt),"generateId"),ur=d(e=>{rt.children=e,Vt(e,rt),Tt=rt.children},"setHierarchy"),pr=d(e=>{const t=X.get(e);return t?t.columns?t.columns:t.children?t.children.length:-1:-1},"getColumns"),fr=d(()=>[...X.values()],"getBlocksFlat"),xr=d(()=>Tt||[],"getBlocks"),yr=d(()=>Et,"getEdges"),br=d(e=>X.get(e),"getBlock"),wr=d(e=>{X.set(e.id,e)},"setBlock"),mr=d(e=>{_t=e},"setDiagramId"),Sr=d(()=>_t,"getDiagramId"),Lr=d(()=>k,"getLogger"),kr=d(function(){return lt},"getClasses"),vr={getConfig:d(()=>at().block,"getConfig"),typeStr2Type:jt,edgeTypeStr2Type:Gt,edgeStrToEdgeData:Zt,edgeStrToEdgeStartData:qt,edgeStrToThickness:Jt,edgeStrToPattern:Qt,getLogger:Lr,getBlocksFlat:fr,getBlocks:xr,getEdges:yr,setHierarchy:ur,getBlock:br,setBlock:wr,getColumns:pr,getClasses:kr,clear:gr,generateId:dr,setDiagramId:mr,getDiagramId:Sr},Er=vr,bt=d((e,t)=>{const a=Je,s=a(e,"r"),i=a(e,"g"),c=a(e,"b");return Ye(s,i,c,t)},"fade"),_r=d(e=>`.label { - font-family: ${e.fontFamily}; - color: ${e.nodeTextColor||e.textColor}; - } - .cluster-label text { - fill: ${e.titleColor}; - } - .cluster-label span,p { - color: ${e.titleColor}; - } - - - - .label text,span,p { - fill: ${e.nodeTextColor||e.textColor}; - color: ${e.nodeTextColor||e.textColor}; - } - - .node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${e.mainBkg}; - stroke: ${e.nodeBorder}; - stroke-width: 1px; - } - .flowchart-label text { - text-anchor: middle; - } - // .flowchart-label .text-outer-tspan { - // text-anchor: middle; - // } - // .flowchart-label .text-inner-tspan { - // text-anchor: start; - // } - - .node .label { - text-align: center; - } - .node.clickable { - cursor: pointer; - } - - .arrowheadPath { - fill: ${e.arrowheadColor}; - } - - .edgePath .path { - stroke: ${e.lineColor}; - stroke-width: 2.0px; - } - - .flowchart-link { - stroke: ${e.lineColor}; - fill: none; - } - - .edgeLabel { - background-color: ${e.edgeLabelBackground}; - /* - * This is for backward compatibility with existing code that didn't - * add a \`

\` around edge labels. - * - * TODO: We should probably remove this in a future release. - */ - p { - margin: 0; - padding: 0; - display: inline; - } - rect { - opacity: 0.5; - background-color: ${e.edgeLabelBackground}; - fill: ${e.edgeLabelBackground}; - } - text-align: center; - } - - /* For html labels only */ - .labelBkg { - background-color: ${e.edgeLabelBackground}; - } - - .node .cluster { - // fill: ${bt(e.mainBkg,.5)}; - fill: ${bt(e.clusterBkg,.5)}; - stroke: ${bt(e.clusterBorder,.2)}; - box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px; - stroke-width: 1px; - } - - .cluster text { - fill: ${e.titleColor}; - } - - .cluster span,p { - color: ${e.titleColor}; - } - /* .cluster div { - color: ${e.titleColor}; - } */ - - div.mermaidTooltip { - position: absolute; - text-align: center; - max-width: 200px; - padding: 2px; - font-family: ${e.fontFamily}; - font-size: 12px; - background: ${e.tertiaryColor}; - border: 1px solid ${e.border2}; - border-radius: 2px; - pointer-events: none; - z-index: 100; - } - - .flowchartTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${e.textColor}; - } - ${pe()} -`,"getStyles"),Tr=_r,Dr=d((e,t,a,s)=>{t.forEach(i=>{Pr[i](e,a,s)})},"insertMarkers"),Br=d((e,t,a)=>{k.trace("Making markers for ",a),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Nr=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ir=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Cr=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",a+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Or=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",a+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Rr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Ar=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),zr=d((e,t,a)=>{e.append("marker").attr("id",a+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Mr=d((e,t,a)=>{e.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Pr={extension:Br,composition:Nr,aggregation:Ir,dependency:Cr,lollipop:Or,point:Rr,circle:Ar,cross:zr,barb:Mr},Fr=Dr,C=A()?.block?.padding??8;function St(e,t){if(e===0||!Number.isInteger(e))throw new Error("Columns must be an integer !== 0.");if(t<0||!Number.isInteger(t))throw new Error("Position must be a non-negative integer."+t);if(e<0)return{px:t,py:0};if(e===1)return{px:0,py:t};const a=t%e,s=Math.floor(t/e);return{px:a,py:s}}d(St,"calculateBlockPosition");var Wr=d(e=>{let t=0,a=0;for(const s of e.children){const{width:i,height:c,x:r,y:n}=s.size??{width:0,height:0,x:0,y:0};if(k.debug("getMaxChildSize abc95 child:",s.id,"width:",i,"height:",c,"x:",r,"y:",n,s.type),s.type==="space")continue;const l=i/(s.widthInColumns??1);l>t&&(t=l),c>a&&(a=c)}return{width:t,height:a}},"getMaxChildSize");function ot(e,t,a=0,s=0){k.debug("setBlockSizes abc95 (start)",e.id,e?.size?.x,"block width =",e?.size,"siblingWidth",a),e?.size?.width||(e.size={width:a,height:s,x:0,y:0});let i=0,c=0;if(e.children?.length>0){for(const x of e.children)ot(x,t);const r=Wr(e);i=r.width,c=r.height,k.debug("setBlockSizes abc95 maxWidth of",e.id,":s children is ",i,c);for(const x of e.children)x.size&&(k.debug(`abc95 Setting size of children of ${e.id} id=${x.id} ${i} ${c} ${JSON.stringify(x.size)}`),x.size.width=i*(x.widthInColumns??1)+C*((x.widthInColumns??1)-1),x.size.height=c,x.size.x=0,x.size.y=0,k.debug(`abc95 updating size of ${e.id} children child:${x.id} maxWidth:${i} maxHeight:${c}`));for(const x of e.children)ot(x,t,i,c);const n=e.columns??-1;let l=0;for(const x of e.children)l+=x.widthInColumns??1;let g=e.children.length;n>0&&n0?Math.min(e.children.length,n):e.children.length;if(x>0){const w=(p-x*C-C)/x;k.debug("abc95 (growing to fit) width",e.id,p,e.size?.width,w);for(const v of e.children)v.size&&(v.size.width=w)}}e.size={width:p,height:b,x:0,y:0}}k.debug("setBlockSizes abc94 (done)",e.id,e?.size?.x,e?.size?.width,e?.size?.y,e?.size?.height)}d(ot,"setBlockSizes");function Dt(e,t){k.debug(`abc85 layout blocks (=>layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`);const a=e.columns??-1;if(k.debug("layoutBlocks columns abc95",e.id,"=>",a,e),e.children&&e.children.length>0){const s=e?.children[0]?.size?.width??0,i=e.children.length*s+(e.children.length-1)*C;k.debug("widthOfChildren 88",i,"posX");const c=new Map;{let o=0;for(const p of e.children){if(!p.size)continue;const{py:b}=St(a,o),x=c.get(b)??0;p.size.height>x&&c.set(b,p.size.height);let w=p?.widthInColumns??1;a>0&&(w=Math.min(w,a-o%a)),o+=w}}const r=new Map;{let o=0;const p=[...c.keys()].sort((b,x)=>b-x);for(const b of p)r.set(b,o),o+=(c.get(b)??0)+C}let n=0;k.debug("abc91 block?.size?.x",e.id,e?.size?.x);let l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,g=0;for(const o of e.children){const p=e;if(!o.size)continue;const{width:b,height:x}=o.size,{px:w,py:v}=St(a,n);if(v!=g&&(g=v,l=e?.size?.x?e?.size?.x+(-e?.size?.width/2||0):-C,k.debug("New row in layout for block",e.id," and child ",o.id,g)),k.debug(`abc89 layout blocks (child) id: ${o.id} Pos: ${n} (px, py) ${w},${v} (${p?.size?.x},${p?.size?.y}) parent: ${p.id} width: ${b}${C}`),p.size){const _=b/2;o.size.x=l+C+_,k.debug(`abc91 layout blocks (calc) px, pyid:${o.id} startingPos=X${l} new startingPosX${o.size.x} ${_} padding=${C} width=${b} halfWidth=${_} => x:${o.size.x} y:${o.size.y} ${o.widthInColumns} (width * (child?.w || 1)) / 2 ${b*(o?.widthInColumns??1)/2}`),l=o.size.x+_;const I=r.get(v)??0,T=c.get(v)??x;o.size.y=p.size.y-p.size.height/2+I+T/2+C,k.debug(`abc88 layout blocks (calc) px, pyid:${o.id}startingPosX${l}${C}${_}=>x:${o.size.x}y:${o.size.y}${o.widthInColumns}(width * (child?.w || 1)) / 2${b*(o?.widthInColumns??1)/2}`)}o.children&&Dt(o);let S=o?.widthInColumns??1;a>0&&(S=Math.min(S,a-n%a)),n+=S,k.debug("abc88 columnsPos",o,n)}}k.debug(`layout blocks (<==layoutBlocks) ${e.id} x: ${e?.size?.x} y: ${e?.size?.y} width: ${e?.size?.width}`)}d(Dt,"layoutBlocks");function Bt(e,{minX:t,minY:a,maxX:s,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){if(e.size&&e.id!=="root"){const{x:c,y:r,width:n,height:l}=e.size;c-n/2s&&(s=c+n/2),r+l/2>i&&(i=r+l/2)}if(e.children)for(const c of e.children)({minX:t,minY:a,maxX:s,maxY:i}=Bt(c,{minX:t,minY:a,maxX:s,maxY:i}));return{minX:t,minY:a,maxX:s,maxY:i}}d(Bt,"findBounds");function $t(e){const t=e.getBlock("root");if(!t)return;ot(t,e,0,0),Dt(t),k.debug("getBlocks",JSON.stringify(t,null,2));const{minX:a,minY:s,maxX:i,maxY:c}=Bt(t),r=c-s,n=i-a;return{x:a,y:s,width:n,height:r}}d($t,"layout");var Yr=d(async(e,t,a,s=!1,i=!1)=>{let c=t||"";typeof c=="object"&&(c=c[0]);const r=A(),n=P(r);return await vt(e,c,{style:a,isTitle:s,useHtmlLabels:n,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},r)},"createLabel"),U=Yr,Hr=d((e,t,a,s,i)=>{t.arrowTypeStart&&Pt(e,"start",t.arrowTypeStart,a,s,i),t.arrowTypeEnd&&Pt(e,"end",t.arrowTypeEnd,a,s,i)},"addEdgeMarkers"),Kr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Pt=d((e,t,a,s,i,c)=>{const r=Kr[a];if(!r){k.warn(`Unknown arrow type: ${a}`);return}const n=t==="start"?"Start":"End";e.attr(`marker-${t}`,`url(${s}#${i}_${c}-${r}${n})`)},"addEdgeMarker"),Lt={},M={},Ur=d(async(e,t)=>{const a=A(),s=P(a),i=e.insert("g").attr("class","edgeLabel"),c=i.insert("g").attr("class","label"),r=t.labelType==="markdown",n=await vt(e,t.label,{style:t.labelStyle,useHtmlLabels:s,addSvgBackground:r,isNode:!1,markdown:r,width:r?void 0:Number.POSITIVE_INFINITY},a);c.node().appendChild(n);let l=n.getBBox(),g=l;if(s){const p=n.children[0],b=D(n);l=p.getBoundingClientRect(),g=l,b.attr("width",l.width),b.attr("height",l.height)}else{const p=D(n).select("text").node();p&&typeof p.getBBox=="function"&&(g=p.getBBox())}c.attr("transform",$(g,s)),Lt[t.id]=i,t.width=l.width,t.height=l.height;let o;if(t.startLabelLeft){const p=e.insert("g").attr("class","edgeTerminals"),b=p.insert("g").attr("class","inner"),x=await U(b,t.startLabelLeft,t.labelStyle);o=x;let w=x.getBBox();if(s){const v=x.children[0],S=D(x);w=v.getBoundingClientRect(),S.attr("width",w.width),S.attr("height",w.height)}b.attr("transform",$(w,s)),M[t.id]||(M[t.id]={}),M[t.id].startLeft=p,et(o,t.startLabelLeft)}if(t.startLabelRight){const p=e.insert("g").attr("class","edgeTerminals"),b=p.insert("g").attr("class","inner"),x=await U(b,t.startLabelRight,t.labelStyle);o=x;let w=x.getBBox();if(s){const v=x.children[0],S=D(x);w=v.getBoundingClientRect(),S.attr("width",w.width),S.attr("height",w.height)}b.attr("transform",$(w,s)),M[t.id]||(M[t.id]={}),M[t.id].startRight=p,et(o,t.startLabelRight)}if(t.endLabelLeft){const p=e.insert("g").attr("class","edgeTerminals"),b=p.insert("g").attr("class","inner"),x=await U(p,t.endLabelLeft,t.labelStyle);o=x;let w=x.getBBox();if(s){const v=x.children[0],S=D(x);w=v.getBoundingClientRect(),S.attr("width",w.width),S.attr("height",w.height)}b.attr("transform",$(w,s)),M[t.id]||(M[t.id]={}),M[t.id].endLeft=p,et(o,t.endLabelLeft)}if(t.endLabelRight){const p=e.insert("g").attr("class","edgeTerminals"),b=p.insert("g").attr("class","inner"),x=await U(p,t.endLabelRight,t.labelStyle);o=x;let w=x.getBBox();if(s){const v=x.children[0],S=D(x);w=v.getBoundingClientRect(),S.attr("width",w.width),S.attr("height",w.height)}b.attr("transform",$(w,s)),M[t.id]||(M[t.id]={}),M[t.id].endRight=p,et(o,t.endLabelRight)}return n},"insertEdgeLabel");function et(e,t){P(A())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}d(et,"setTerminalWidth");var Xr=d((e,t)=>{k.debug("Moving label abc88 ",e.id,e.label,Lt[e.id],t);let a=t.updatedPath?t.updatedPath:t.originalPath;const s=A(),{subGraphTitleTotalMargin:i}=Ve(s);if(e.label){const c=Lt[e.id];let r=e.x,n=e.y;if(a){const l=tt.calcLabelPosition(a);k.debug("Moving label "+e.label+" from (",r,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(r=l.x,n=l.y)}c.attr("transform",`translate(${r}, ${n+i/2})`)}if(e.startLabelLeft){const c=M[e.id].startLeft;let r=e.x,n=e.y;if(a){const l=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.startLabelRight){const c=M[e.id].startRight;let r=e.x,n=e.y;if(a){const l=tt.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelLeft){const c=M[e.id].endLeft;let r=e.x,n=e.y;if(a){const l=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}if(e.endLabelRight){const c=M[e.id].endRight;let r=e.x,n=e.y;if(a){const l=tt.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",a);r=l.x,n=l.y}c.attr("transform",`translate(${r}, ${n})`)}},"positionEdgeLabel"),Vr=d((e,t)=>{const a=e.x,s=e.y,i=Math.abs(t.x-a),c=Math.abs(t.y-s),r=e.width/2,n=e.height/2;return i>=r||c>=n},"outsideNode"),jr=d((e,t,a)=>{k.debug(`intersection calc abc89: - outsidePoint: ${JSON.stringify(t)} - insidePoint : ${JSON.stringify(a)} - node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const s=e.x,i=e.y,c=Math.abs(s-a.x),r=e.width/2;let n=a.xMath.abs(s-t.x)*l){let p=a.y{k.debug("abc88 cutPathAtIntersect",e,t);let a=[],s=e[0],i=!1;return e.forEach(c=>{if(!Vr(t,c)&&!i){const r=jr(t,s,c);let n=!1;a.forEach(l=>{n=n||l.x===r.x&&l.y===r.y}),a.some(l=>l.x===r.x&&l.y===r.y)||a.push(r),i=!0}else s=c,i||a.push(c)}),a},"cutPathAtIntersect"),Gr=d(function(e,t,a,s,i,c,r){let n=a.points;k.debug("abc88 InsertEdge: edge=",a,"e=",t);let l=!1;const g=c.node(t.v);var o=c.node(t.w);o?.intersect&&g?.intersect&&(n=n.slice(1,a.points.length-1),n.unshift(g.intersect(n[0])),n.push(o.intersect(n[n.length-1]))),a.toCluster&&(k.debug("to cluster abc88",s[a.toCluster]),n=Ft(a.points,s[a.toCluster].node),l=!0),a.fromCluster&&(k.debug("from cluster abc88",s[a.fromCluster]),n=Ft(n.reverse(),s[a.fromCluster].node).reverse(),l=!0);const p=n.filter(m=>!Number.isNaN(m.y));let b=Ue;a.curve&&(i==="graph"||i==="flowchart")&&(b=a.curve);const{x,y:w}=He(a),v=Ke().x(x).y(w).curve(b);let S;switch(a.thickness){case"normal":S="edge-thickness-normal";break;case"thick":S="edge-thickness-thick";break;case"invisible":S="edge-thickness-thick";break;default:S=""}switch(a.pattern){case"solid":S+=" edge-pattern-solid";break;case"dotted":S+=" edge-pattern-dotted";break;case"dashed":S+=" edge-pattern-dashed";break}const _=e.append("path").attr("d",v(p)).attr("id",a.id).attr("class"," "+S+(a.classes?" "+a.classes:"")).attr("style",a.style);let I="";(A().flowchart.arrowMarkerAbsolute||A().state.arrowMarkerAbsolute)&&(I=Xe(!0)),Hr(_,a,I,r,i);let T={};return l&&(T.updatedPath=n),T.originalPath=a.points,T},"insertEdge"),Zr=d(e=>{const t=new Set;for(const a of e)switch(a){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(a);break}return t},"expandAndDeduplicateDirections"),qr=d((e,t,a,s)=>{const i=Zr(e),c=2,r=t.height+2*a.padding,n=r/c,l=s??t.width+2*n+a.padding,g=a.padding/2;return i.has("right")&&i.has("left")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:n,y:0},{x:l/2,y:2*g},{x:l-n,y:0},{x:l,y:0},{x:l,y:-r/3},{x:l+2*g,y:-r/2},{x:l,y:-2*r/3},{x:l,y:-r},{x:l-n,y:-r},{x:l/2,y:-r-2*g},{x:n,y:-r},{x:0,y:-r},{x:0,y:-2*r/3},{x:-2*g,y:-r/2},{x:0,y:-r/3}]:i.has("right")&&i.has("left")&&i.has("up")?[{x:n,y:0},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:n,y:-r},{x:0,y:-r/2}]:i.has("right")&&i.has("left")&&i.has("down")?[{x:0,y:0},{x:n,y:-r},{x:l-n,y:-r},{x:l,y:0}]:i.has("right")&&i.has("up")&&i.has("down")?[{x:0,y:0},{x:l,y:-n},{x:l,y:-r+n},{x:0,y:-r}]:i.has("left")&&i.has("up")&&i.has("down")?[{x:l,y:0},{x:0,y:-n},{x:0,y:-r+n},{x:l,y:-r}]:i.has("right")&&i.has("left")?[{x:n,y:0},{x:n,y:-g},{x:l-n,y:-g},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:l-n,y:-r+g},{x:n,y:-r+g},{x:n,y:-r},{x:0,y:-r/2}]:i.has("up")&&i.has("down")?[{x:l/2,y:0},{x:0,y:-g},{x:n,y:-g},{x:n,y:-r+g},{x:0,y:-r+g},{x:l/2,y:-r},{x:l,y:-r+g},{x:l-n,y:-r+g},{x:l-n,y:-g},{x:l,y:-g}]:i.has("right")&&i.has("up")?[{x:0,y:0},{x:l,y:-n},{x:0,y:-r}]:i.has("right")&&i.has("down")?[{x:0,y:0},{x:l,y:0},{x:0,y:-r}]:i.has("left")&&i.has("up")?[{x:l,y:0},{x:0,y:-n},{x:l,y:-r}]:i.has("left")&&i.has("down")?[{x:l,y:0},{x:0,y:0},{x:l,y:-r}]:i.has("right")?[{x:n,y:-g},{x:n,y:-g},{x:l-n,y:-g},{x:l-n,y:0},{x:l,y:-r/2},{x:l-n,y:-r},{x:l-n,y:-r+g},{x:n,y:-r+g},{x:n,y:-r+g}]:i.has("left")?[{x:n,y:0},{x:n,y:-g},{x:l-n,y:-g},{x:l-n,y:-r+g},{x:n,y:-r+g},{x:n,y:-r},{x:0,y:-r/2}]:i.has("up")?[{x:n,y:-g},{x:n,y:-r+g},{x:0,y:-r+g},{x:l/2,y:-r},{x:l,y:-r+g},{x:l-n,y:-r+g},{x:l-n,y:-g}]:i.has("down")?[{x:l/2,y:0},{x:0,y:-g},{x:n,y:-g},{x:n,y:-r+g},{x:l-n,y:-r+g},{x:l-n,y:-g},{x:l,y:-g}]:[{x:0,y:0}]},"getArrowPoints");function te(e,t){return e.intersect(t)}d(te,"intersectNode");var Jr=te;function ee(e,t,a,s){var i=e.x,c=e.y,r=i-s.x,n=c-s.y,l=Math.sqrt(t*t*n*n+a*a*r*r),g=Math.abs(t*a*r/l);s.x0}d(kt,"sameSign");var $r=se,ta=ie;function ie(e,t,a){var s=e.x,i=e.y,c=[],r=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(w){r=Math.min(r,w.x),n=Math.min(n,w.y)}):(r=Math.min(r,t.x),n=Math.min(n,t.y));for(var l=s-e.width/2-r,g=i-e.height/2-n,o=0;o1&&c.sort(function(w,v){var S=w.x-a.x,_=w.y-a.y,I=Math.sqrt(S*S+_*_),T=v.x-a.x,m=v.y-a.y,u=Math.sqrt(T*T+m*m);return I{var a=e.x,s=e.y,i=t.x-a,c=t.y-s,r=e.width/2,n=e.height/2,l,g;return Math.abs(c)*r>Math.abs(i)*n?(c<0&&(n=-n),l=c===0?0:n*i/c,g=n):(i<0&&(r=-r),l=r,g=i===0?0:r*c/i),{x:a+l,y:s+g}},"intersectRect"),ra=ea,B={node:Jr,circle:Qr,ellipse:re,polygon:ta,rect:ra},z=d(async(e,t,a,s)=>{const i=A();let c;const r=t.useHtmlLabels||P(i);a?c=a:c="node default";const n=e.insert("g").attr("class",c).attr("id",t.domId||t.id),l=n.insert("g").attr("class","label").attr("style",t.labelStyle);let g;t.labelText===void 0?g="":g=typeof t.labelText=="string"?t.labelText:t.labelText[0];let o;t.labelType==="markdown"?o=vt(l,Ot(Rt(g),i),{useHtmlLabels:r,width:t.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):o=await U(l,Ot(Rt(g),i),t.labelStyle,!1,s);let p=o.getBBox();const b=t.padding/2;if(P(i)){const x=o.children[0],w=D(o);await Ze(x,g),p=x.getBoundingClientRect(),w.attr("width",p.width),w.attr("height",p.height)}return r?l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):l.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:n,bbox:p,halfPadding:b,label:l}},"labelHelper"),N=d((e,t)=>{const a=t.node().getBBox();e.width=a.width,e.height=a.height},"updateNodeBounds");function V(e,t,a,s){return e.insert("polygon",":first-child").attr("points",s.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+a/2+")")}d(V,"insertPolygonShape");var aa=d(async(e,t)=>{t.useHtmlLabels||P(A())||(t.centerLabel=!0);const{shapeSvg:s,bbox:i,halfPadding:c}=await z(e,t,"node "+t.classes,!0);k.info("Classes = ",t.classes);const r=s.insert("rect",":first-child");return r.attr("rx",t.rx).attr("ry",t.ry).attr("x",-i.width/2-c).attr("y",-i.height/2-c).attr("width",i.width+t.padding).attr("height",i.height+t.padding),N(t,r),t.intersect=function(n){return B.rect(t,n)},s},"note"),sa=aa,Wt=d(e=>e?" "+e:"","formatClass"),H=d((e,t)=>`${t||"node default"}${Wt(e.classes)} ${Wt(e.class)}`,"getClassesFromNode"),Yt=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=i+c,n=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];k.info("Question main (Circle)");const l=V(a,r,r,n);return l.attr("style",t.style),N(t,l),t.intersect=function(g){return k.warn("Intersect called"),B.polygon(t,n,g)},a},"question"),ia=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=28,i=[{x:0,y:s/2},{x:s/2,y:0},{x:0,y:-s/2},{x:-s/2,y:0}];return a.insert("polygon",":first-child").attr("points",i.map(function(r){return r.x+","+r.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),t.width=28,t.height=28,t.intersect=function(r){return B.circle(t,14,r)},a},"choice"),na=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=4,c=t.positioned?t.height:s.height+t.padding,r=c/i,n=t.positioned?t.width:s.width+2*r+t.padding,l=[{x:r,y:0},{x:n-r,y:0},{x:n,y:-c/2},{x:n-r,y:-c},{x:r,y:-c},{x:0,y:-c/2}],g=V(a,n,c,l);return g.attr("style",t.style),N(t,g),t.intersect=function(o){return B.polygon(t,l,o)},a},"hexagon"),ca=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,void 0,!0),i=2,c=s.height+2*t.padding,r=c/i,n=s.width+2*r+t.padding,g=t.positioned&&(t.widthInColumns??1)>1&&t.width>n?t.width:n,o=qr(t.directions,s,t,g),p=V(a,g,c,o);return p.attr("style",t.style),N(t,p),t.intersect=function(b){return B.polygon(t,o,b)},a},"block_arrow"),la=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-c/2,y:0},{x:i,y:0},{x:i,y:-c},{x:-c/2,y:-c},{x:0,y:-c/2}];return V(a,i,c,r).attr("style",t.style),t.width=i+c,t.height=c,t.intersect=function(l){return B.polygon(t,r,l)},a},"rect_left_inv_arrow"),oa=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-2*c/6,y:0},{x:i-c/6,y:0},{x:i+2*c/6,y:-c},{x:c/6,y:-c}],n=V(a,i,c,r);return n.attr("style",t.style),N(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"lean_right"),ha=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:2*c/6,y:0},{x:i+c/6,y:0},{x:i-2*c/6,y:-c},{x:-c/6,y:-c}],n=V(a,i,c,r);return n.attr("style",t.style),N(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"lean_left"),ga=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:-2*c/6,y:0},{x:i+2*c/6,y:0},{x:i-c/6,y:-c},{x:c/6,y:-c}],n=V(a,i,c,r);return n.attr("style",t.style),N(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"trapezoid"),da=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:c/6,y:0},{x:i-c/6,y:0},{x:i+2*c/6,y:-c},{x:-2*c/6,y:-c}],n=V(a,i,c,r);return n.attr("style",t.style),N(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"inv_trapezoid"),ua=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:0,y:0},{x:i+c/2,y:0},{x:i,y:-c/2},{x:i+c/2,y:-c},{x:0,y:-c}],n=V(a,i,c,r);return n.attr("style",t.style),N(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"rect_right_inv_arrow"),pa=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=i/2,r=c/(2.5+i/50),n=s.height+r+t.padding,l="M 0,"+r+" a "+c+","+r+" 0,0,0 "+i+" 0 a "+c+","+r+" 0,0,0 "+-i+" 0 l 0,"+n+" a "+c+","+r+" 0,0,0 "+i+" 0 l 0,"+-n,g=a.attr("label-offset-y",r).insert("path",":first-child").attr("style",t.style).attr("d",l).attr("transform","translate("+-i/2+","+-(n/2+r)+")");return N(t,g),t.intersect=function(o){const p=B.rect(t,o),b=p.x-t.x;if(c!=0&&(Math.abs(b)t.height/2-r)){let x=r*r*(1-b*b/(c*c));x!=0&&(x=Math.sqrt(x)),x=r-x,o.y-t.y>0&&(x=-x),p.y+=x}return p},a},"cylinder"),fa=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await z(e,t,"node "+t.classes+" "+t.class,!0),c=a.insert("rect",":first-child"),r=t.positioned?t.width:s.width+t.padding,n=t.positioned?t.height:s.height+t.padding,l=t.positioned?-r/2:-s.width/2-i,g=t.positioned?-n/2:-s.height/2-i;if(c.attr("class","basic label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",g).attr("width",r).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(ht(c,t.props.borders,r,n),o.delete("borders")),o.forEach(p=>{k.warn(`Unknown node property ${p}`)})}return N(t,c),t.intersect=function(o){return B.rect(t,o)},a},"rect"),xa=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await z(e,t,"node "+t.classes,!0),c=a.insert("rect",":first-child"),r=t.positioned?t.width:s.width+t.padding,n=t.positioned?t.height:s.height+t.padding,l=t.positioned?-r/2:-s.width/2-i,g=t.positioned?-n/2:-s.height/2-i;if(c.attr("class","basic cluster composite label-container").attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("x",l).attr("y",g).attr("width",r).attr("height",n),t.props){const o=new Set(Object.keys(t.props));t.props.borders&&(ht(c,t.props.borders,r,n),o.delete("borders")),o.forEach(p=>{k.warn(`Unknown node property ${p}`)})}return N(t,c),t.intersect=function(o){return B.rect(t,o)},a},"composite"),ya=d(async(e,t)=>{const{shapeSvg:a}=await z(e,t,"label",!0);k.trace("Classes = ",t.class);const s=a.insert("rect",":first-child"),i=0,c=0;if(s.attr("width",i).attr("height",c),a.attr("class","label edgeLabel"),t.props){const r=new Set(Object.keys(t.props));t.props.borders&&(ht(s,t.props.borders,i,c),r.delete("borders")),r.forEach(n=>{k.warn(`Unknown node property ${n}`)})}return N(t,s),t.intersect=function(r){return B.rect(t,r)},a},"labelRect");function ht(e,t,a,s){const i=[],c=d(n=>{i.push(n,0)},"addBorder"),r=d(n=>{i.push(0,n)},"skipBorder");t.includes("t")?(k.debug("add top border"),c(a)):r(a),t.includes("r")?(k.debug("add right border"),c(s)):r(s),t.includes("b")?(k.debug("add bottom border"),c(a)):r(a),t.includes("l")?(k.debug("add left border"),c(s)):r(s),e.attr("stroke-dasharray",i.join(" "))}d(ht,"applyNodePropertyBorders");var ba=d(async(e,t)=>{let a;t.classes?a="node "+t.classes:a="node default";const s=e.insert("g").attr("class",a).attr("id",t.domId||t.id),i=s.insert("rect",":first-child"),c=s.insert("line"),r=s.insert("g").attr("class","label"),n=t.labelText.flat?t.labelText.flat():t.labelText;let l="";typeof n=="object"?l=n[0]:l=n,k.info("Label text abc79",l,n,typeof n=="object");const g=await U(r,l,t.labelStyle,!0,!0);let o={width:0,height:0};if(P(A())){const v=g.children[0],S=D(g);o=v.getBoundingClientRect(),S.attr("width",o.width),S.attr("height",o.height)}k.info("Text 2",n);const p=n.slice(1,n.length);let b=g.getBBox();const x=await U(r,p.join?p.join("
"):p,t.labelStyle,!0,!0);if(P(A())){const v=x.children[0],S=D(x);o=v.getBoundingClientRect(),S.attr("width",o.width),S.attr("height",o.height)}const w=t.padding/2;return D(x).attr("transform","translate( "+(o.width>b.width?0:(b.width-o.width)/2)+", "+(b.height+w+5)+")"),D(g).attr("transform","translate( "+(o.width{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.height+t.padding,c=s.width+i/4+t.padding,r=a.insert("rect",":first-child").attr("style",t.style).attr("rx",i/2).attr("ry",i/2).attr("x",-c/2).attr("y",-i/2).attr("width",c).attr("height",i);return N(t,r),t.intersect=function(n){return B.rect(t,n)},a},"stadium"),ma=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await z(e,t,H(t,void 0),!0),c=a.insert("circle",":first-child");return c.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),k.info("Circle main"),N(t,c),t.intersect=function(r){return k.info("Circle intersect",t,s.width/2+i,r),B.circle(t,s.width/2+i,r)},a},"circle"),Sa=d(async(e,t)=>{const{shapeSvg:a,bbox:s,halfPadding:i}=await z(e,t,H(t,void 0),!0),c=5,r=a.insert("g",":first-child"),n=r.insert("circle"),l=r.insert("circle");return r.attr("class",t.class),n.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i+c).attr("width",s.width+t.padding+c*2).attr("height",s.height+t.padding+c*2),l.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",s.width/2+i).attr("width",s.width+t.padding).attr("height",s.height+t.padding),k.info("DoubleCircle main"),N(t,n),t.intersect=function(g){return k.info("DoubleCircle intersect",t,s.width/2+i+c,g),B.circle(t,s.width/2+i+c,g)},a},"doublecircle"),La=d(async(e,t)=>{const{shapeSvg:a,bbox:s}=await z(e,t,H(t,void 0),!0),i=s.width+t.padding,c=s.height+t.padding,r=[{x:0,y:0},{x:i,y:0},{x:i,y:-c},{x:0,y:-c},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-c},{x:-8,y:-c},{x:-8,y:0}],n=V(a,i,c,r);return n.attr("style",t.style),N(t,n),t.intersect=function(l){return B.polygon(t,r,l)},a},"subroutine"),ka=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=a.insert("circle",":first-child");return s.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),N(t,s),t.intersect=function(i){return B.circle(t,7,i)},a},"start"),Ht=d((e,t,a)=>{const s=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let i=70,c=10;a==="LR"&&(i=10,c=70);const r=s.append("rect").attr("x",-1*i/2).attr("y",-1*c/2).attr("width",i).attr("height",c).attr("class","fork-join");return N(t,r),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(n){return B.rect(t,n)},s},"forkJoin"),va=d((e,t)=>{const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),s=a.insert("circle",":first-child"),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),s.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),N(t,i),t.intersect=function(c){return B.circle(t,7,c)},a},"end"),Ea=d(async(e,t)=>{const a=t.padding/2,s=4,i=8;let c;t.classes?c="node "+t.classes:c="node default";const r=e.insert("g").attr("class",c).attr("id",t.domId||t.id),n=r.insert("rect",":first-child"),l=r.insert("line"),g=r.insert("line");let o=0,p=s;const b=r.insert("g").attr("class","label");let x=0;const w=t.classData.annotations?.[0],v=t.classData.annotations[0]?"«"+t.classData.annotations[0]+"»":"",S=await U(b,v,t.labelStyle,!0,!0);let _=S.getBBox();if(P(A())){const E=S.children[0],h=D(S);_=E.getBoundingClientRect(),h.attr("width",_.width),h.attr("height",_.height)}t.classData.annotations[0]&&(p+=_.height+s,o+=_.width);let I=t.classData.label;t.classData.type!==void 0&&t.classData.type!==""&&(P(A())?I+="<"+t.classData.type+">":I+="<"+t.classData.type+">");const T=await U(b,I,t.labelStyle,!0,!0);D(T).attr("class","classTitle");let m=T.getBBox();if(P(A())){const E=T.children[0],h=D(T);m=E.getBoundingClientRect(),h.attr("width",m.width),h.attr("height",m.height)}p+=m.height+s,m.width>o&&(o=m.width);const u=[];t.classData.members.forEach(async E=>{const h=E.getDisplayDetails();let W=h.displayText;P(A())&&(W=W.replace(//g,">"));const f=await U(b,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0);let O=f.getBBox();if(P(A())){const q=f.children[0],j=D(f);O=q.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>o&&(o=O.width),p+=O.height+s,u.push(f)}),p+=i;const y=[];if(t.classData.methods.forEach(async E=>{const h=E.getDisplayDetails();let W=h.displayText;P(A())&&(W=W.replace(//g,">"));const f=await U(b,W,h.cssStyle?h.cssStyle:t.labelStyle,!0,!0);let O=f.getBBox();if(P(A())){const q=f.children[0],j=D(f);O=q.getBoundingClientRect(),j.attr("width",O.width),j.attr("height",O.height)}O.width>o&&(o=O.width),p+=O.height+s,y.push(f)}),p+=i,w){let E=(o-_.width)/2;D(S).attr("transform","translate( "+(-1*o/2+E)+", "+-1*p/2+")"),x=_.height+s}let L=(o-m.width)/2;return D(T).attr("transform","translate( "+(-1*o/2+L)+", "+(-1*p/2+x)+")"),x+=m.height+s,l.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+i+x).attr("y2",-p/2-a+i+x),x+=i,u.forEach(E=>{D(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x+i/2)+")");const h=E?.getBBox();x+=(h?.height??0)+s}),x+=i,g.attr("class","divider").attr("x1",-o/2-a).attr("x2",o/2+a).attr("y1",-p/2-a+i+x).attr("y2",-p/2-a+i+x),x+=i,y.forEach(E=>{D(E).attr("transform","translate( "+-o/2+", "+(-1*p/2+x)+")");const h=E?.getBBox();x+=(h?.height??0)+s}),n.attr("style",t.style).attr("class","outer title-state").attr("x",-o/2-a).attr("y",-(p/2)-a).attr("width",o+t.padding).attr("height",p+t.padding),N(t,n),t.intersect=function(E){return B.rect(t,E)},r},"class_box"),Kt={rhombus:Yt,composite:xa,question:Yt,rect:fa,labelRect:ya,rectWithTitle:ba,choice:ia,circle:ma,doublecircle:Sa,stadium:wa,hexagon:na,block_arrow:ca,rect_left_inv_arrow:la,lean_right:oa,lean_left:ha,trapezoid:ga,inv_trapezoid:da,rect_right_inv_arrow:ua,cylinder:pa,start:ka,end:va,note:sa,subroutine:La,fork:Ht,join:Ht,class_box:Ea},ct={},ne=d(async(e,t,a)=>{let s,i;if(t.link){let c;A().securityLevel==="sandbox"?c="_top":t.linkTarget&&(c=t.linkTarget||"_blank"),s=e.insert("svg:a").attr("xlink:href",t.link).attr("target",c),i=await Kt[t.shape](s,t,a)}else i=await Kt[t.shape](e,t,a),s=i;return t.tooltip&&i.attr("title",t.tooltip),t.class&&i.attr("class","node default "+t.class),ct[t.id]=s,t.haveCallback&&ct[t.id].attr("class",ct[t.id].attr("class")+" clickable"),s},"insertNode"),_a=d(e=>{const t=ct[e.id];k.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const a=8,s=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+s-e.width/2)+", "+(e.y-e.height/2-a)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),s},"positionNode");function Nt(e,t,a=!1){const s=e;let i="default";(s?.classes?.length||0)>0&&(i=(s?.classes??[]).join(" ")),i=i+" flowchart-label";let c=0,r="",n;switch(s.type){case"round":c=5,r="rect";break;case"composite":c=0,r="composite",n=0;break;case"square":r="rect";break;case"diamond":r="question";break;case"hexagon":r="hexagon";break;case"block_arrow":r="block_arrow";break;case"odd":r="rect_left_inv_arrow";break;case"lean_right":r="lean_right";break;case"lean_left":r="lean_left";break;case"trapezoid":r="trapezoid";break;case"inv_trapezoid":r="inv_trapezoid";break;case"rect_left_inv_arrow":r="rect_left_inv_arrow";break;case"circle":r="circle";break;case"ellipse":r="ellipse";break;case"stadium":r="stadium";break;case"subroutine":r="subroutine";break;case"cylinder":r="cylinder";break;case"group":r="rect";break;case"doublecircle":r="doublecircle";break;default:r="rect"}const l=Ge(s?.styles??[]),g=s.label,o=s.size??{width:0,height:0,x:0,y:0},p=t.getDiagramId();return{labelStyle:l.labelStyle,shape:r,labelText:g,rx:c,ry:c,class:i,style:l.style,id:s.id,domId:p?`${p}-${s.id}`:s.id,directions:s.directions,width:o.width,height:o.height,x:o.x,y:o.y,positioned:a,intersect:void 0,type:s.type,padding:n??at()?.block?.padding??0,widthInColumns:s.widthInColumns??1}}d(Nt,"getNodeFromBlock");async function ce(e,t,a){const s=Nt(t,a,!1);if(s.type==="group")return;const i=at(),c=await ne(e,s,{config:i}),r=c.node().getBBox(),n=a.getBlock(s.id);n.size={width:r.width,height:r.height,x:0,y:0,node:c},a.setBlock(n),c.remove()}d(ce,"calculateBlockSize");async function le(e,t,a){const s=Nt(t,a,!0);if(a.getBlock(s.id).type!=="space"){const c=at();await ne(e,s,{config:c}),t.intersect=s?.intersect,_a(s)}}d(le,"insertBlockPositioned");async function gt(e,t,a,s){for(const i of t)await s(e,i,a),i.children&&await gt(e,i.children,a,s)}d(gt,"performOperations");async function oe(e,t,a){await gt(e,t,a,ce)}d(oe,"calculateBlockSizes");async function he(e,t,a){await gt(e,t,a,le)}d(he,"insertBlocks");async function ge(e,t,a,s,i){const c=new qe({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const r of a)r.size&&c.setNode(r.id,{width:r.size.width,height:r.size.height,intersect:r.intersect});for(const r of t)if(r.start&&r.end){const n=s.getBlock(r.start),l=s.getBlock(r.end);if(n?.size&&l?.size){const g=n.size,o=l.size,p=[{x:g.x,y:g.y},{x:g.x+(o.x-g.x)/2,y:g.y+(o.y-g.y)/2},{x:o.x,y:o.y}],b=i?`${i}-${r.id}`:r.id,x=r.thickness==="thick"?"edge-thickness-thick":"edge-thickness-normal",w=r.pattern==="dotted"?"edge-pattern-dotted":"edge-pattern-solid",v=`${x} ${w} flowchart-link LS-a1 LE-b1`;Gr(e,{v:r.start,w:r.end,name:b},{...r,id:b,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v},void 0,"block",c,i),r.label&&(await Ur(e,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:p,classes:v}),Xr({...r,x:p[1].x,y:p[1].y},{originalPath:p}))}}}d(ge,"insertEdges");var Ta=d(function(e,t){return t.db.getClasses()},"getClasses"),Da=d(async function(e,t,a,s){const{securityLevel:i,block:c}=at(),r=s.db;r.setDiagramId(t);let n;i==="sandbox"&&(n=D("#i"+t));const l=i==="sandbox"?D(n.nodes()[0].contentDocument.body):D("body"),g=i==="sandbox"?l.select(`[id="${t}"]`):D(`[id="${t}"]`);Fr(g,["point","circle","cross"],s.type,t);const p=r.getBlocks(),b=r.getBlocksFlat(),x=r.getEdges(),w=g.insert("g").attr("class","block");await oe(w,p,r);const v=$t(r);if(await he(w,p,r),await ge(w,x,b,r,t),v){const S=v,_=Math.max(1,Math.round(.125*(S.width/S.height))),I=S.height+_+10,T=S.width+10,{useMaxWidth:m}=c;Fe(g,I,T,!!m),k.debug("Here Bounds",v,S),g.attr("viewBox",`${S.x-5} ${S.y-5} ${S.width+10} ${S.height+10}`)}},"draw"),Ba={draw:Da,getClasses:Ta},Aa={parser:sr,db:Er,renderer:Ba,styles:Tr};export{Aa as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-XVyKqmZc.js b/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-yM-P6fGX.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-XVyKqmZc.js rename to apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-yM-P6fGX.js index 877537170..ef272338f 100644 --- a/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-XVyKqmZc.js +++ b/apps/pythinker-code/dist-web/assets/blockDiagram-GPEHLZMM-yM-P6fGX.js @@ -1,4 +1,4 @@ -import{g as pe}from"./chunk-FMBD7UC4-DwQl0sgV.js";import{an as fe,ao as Ut,ap as xe,aq as ye,ar as be,as as we,at as me,au as Se,av as Le,aw as ke,ax as ve,ay as Ee,az as _e,aA as Te,aB as De,aC as Be,aD as Ne,aE as Ie,aF as Ce,aG as Oe,aH as Re,aI as Ae,aJ as ze,aK as Me,aL as Pe,_ as d,F as at,d as D,e as Fe,l as k,A as We,C as Ye,aM as He,a9 as Ke,aa as Ue,c as A,a6 as Xe,aN as P,aO as vt,aP as $,aQ as Ve,u as tt,k as je,aR as Ge,i as Ot,aS as Rt,aT as Ze}from"./mermaid.core-bNlBBSwN.js";import{G as qe}from"./graph--OzhPTMs.js";import{c as Je}from"./channel-BHUY_2ZP.js";import"./index-DIfcwXP7.js";function Qe(e){return Array.isArray(e)}function $e(e){if(fe(e))return e;const t=Ut(e);if(!tr(e))return{};if(Qe(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(xe(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]"?rr(i,e):yt(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 yt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ar(a,e),yt(a,e),er(a,e),a}function tr(e){switch(Ut(e)){case Pe:case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:return!0;default:return!1}}function yt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function er(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function ar(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=d(function(T,m,u,y){for(u=u||{},y=T.length;y--;u[T[y]]=m);return u},"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],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],b=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:d(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:d(function(m,u,y,L,E,h,W){var f=h.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",h[f-1]),L.setHierarchy(h[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:L.getLogger().debug("Rule: link: ",h[f],m),this.$={edgeTypeStr:h[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:const O=parseInt(h[f]),q=L.generateId();this.$={id:q,type:"space",label:"",width:O,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);const j=L.edgeStrToEdgeData(h[f-1].edgeTypeStr),st=L.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),dt=L.edgeStrToThickness(h[f-1].edgeTypeStr),R=L.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:dt,pattern:R,directions:h[f].directions,arrowTypeEnd:j,arrowTypeStart:st},{id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:L.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]),L.generateId(),this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);const G=L.generateId();this.$={id:G,type:"composite",label:"",children:h[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[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(o,[2,16],{14:22,15:p,16:b}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[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(w,[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:b,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(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(m,u){if(u.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=u,y}},"parseError"),parse:d(function(m){var u=this,y=[0],L=[],E=[null],h=[],W=this.table,f="",O=0,q=0,j=2,st=1,dt=h.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(G.yy[ut]=this.yy[ut]);R.setInput(m,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var pt=R.yylloc;h.push(pt);var de=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(Y){y.length=y.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}d(ue,"popStack");function It(){var Y;return Y=L.pop()||R.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(L=Y,Y=L.pop()),Y=u.symbols_[Y]||Y),Y}d(It,"lex");for(var F,J,K,ft,Q={},it,Z,Ct,nt;;){if(J=y[y.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=It()),K=W[J]&&W[J][F]),typeof K>"u"||!K.length||!K[0]){var xt="";nt=[];for(it in W[J])this.terminals_[it]&&it>j&&nt.push("'"+this.terminals_[it]+"'");R.showPosition?xt="Parse error on line "+(O+1)+`: +import{g as pe}from"./chunk-FMBD7UC4-D1EnXzDm.js";import{an as fe,ao as Ut,ap as xe,aq as ye,ar as be,as as we,at as me,au as Se,av as Le,aw as ke,ax as ve,ay as Ee,az as _e,aA as Te,aB as De,aC as Be,aD as Ne,aE as Ie,aF as Ce,aG as Oe,aH as Re,aI as Ae,aJ as ze,aK as Me,aL as Pe,_ as d,F as at,d as D,e as Fe,l as k,A as We,C as Ye,aM as He,a9 as Ke,aa as Ue,c as A,a6 as Xe,aN as P,aO as vt,aP as $,aQ as Ve,u as tt,k as je,aR as Ge,i as Ot,aS as Rt,aT as Ze}from"./mermaid.core-D9FOqe1y.js";import{G as qe}from"./graph--OzhPTMs.js";import{c as Je}from"./channel-DEqePO0_.js";import"./index-CP4VUG5A.js";function Qe(e){return Array.isArray(e)}function $e(e){if(fe(e))return e;const t=Ut(e);if(!tr(e))return{};if(Qe(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(xe(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]"?rr(i,e):yt(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 yt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ar(a,e),yt(a,e),er(a,e),a}function tr(e){switch(Ut(e)){case Pe:case Me:case ze:case Ae:case Re:case Oe:case Ce:case Ie:case Ne:case Be:case De:case Te:case _e:case Ee:case ve:case ke:case Le:case Se:case me:case we:case be:case ye:return!0;default:return!1}}function yt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function er(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s=a)&&(e[s]=t[s])}function ar(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=d(function(T,m,u,y){for(u=u||{},y=T.length;y--;u[T[y]]=m);return u},"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],o=[8,10,21,28,29,30,31,39,43,46],p=[1,23],b=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],v=[1,49],S={trace:d(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:d(function(m,u,y,L,E,h,W){var f=h.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",h[f-1]),L.setHierarchy(h[f-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",h[f]),typeof h[f].length=="number"?this.$=h[f]:this.$=[h[f]];break;case 13:L.getLogger().debug("Rule: statement #2: ",h[f-1]),this.$=[h[f-1]].concat(h[f]);break;case 14:L.getLogger().debug("Rule: link: ",h[f],m),this.$={edgeTypeStr:h[f],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",h[f-3],h[f-1],h[f]),this.$={edgeTypeStr:h[f],label:h[f-1]};break;case 18:const O=parseInt(h[f]),q=L.generateId();this.$={id:q,type:"space",label:"",width:O,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",h[f-2],h[f-1],h[f]," typestr: ",h[f-1].edgeTypeStr);const j=L.edgeStrToEdgeData(h[f-1].edgeTypeStr),st=L.edgeStrToEdgeStartData(h[f-1].edgeTypeStr),dt=L.edgeStrToThickness(h[f-1].edgeTypeStr),R=L.edgeStrToPattern(h[f-1].edgeTypeStr);this.$=[{id:h[f-2].id,label:h[f-2].label,type:h[f-2].type,directions:h[f-2].directions},{id:h[f-2].id+"-"+h[f].id,start:h[f-2].id,end:h[f].id,label:h[f-1].label,type:"edge",thickness:dt,pattern:R,directions:h[f].directions,arrowTypeEnd:j,arrowTypeStart:st},{id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",h[f-1],h[f]),this.$={id:h[f-1].id,label:h[f-1].label,type:L.typeStr2Type(h[f-1].typeStr),directions:h[f-1].directions,widthInColumns:parseInt(h[f],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",h[f]),this.$={id:h[f].id,label:h[f].label,type:L.typeStr2Type(h[f].typeStr),directions:h[f].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",h[f]),this.$={type:"column-setting",columns:h[f]==="auto"?-1:parseInt(h[f])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",h[f-2],h[f-1]),L.generateId(),this.$={...h[f-2],type:"composite",children:h[f-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",h[f-2],h[f-1],h[f]);const G=L.generateId();this.$={id:G,type:"composite",label:"",children:h[f-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",h[f]),this.$={id:h[f]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",h[f-1],h[f]),this.$={id:h[f-1],label:h[f].label,typeStr:h[f].typeStr,directions:h[f].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",h[f]),this.$=[h[f]];break;case 32:L.getLogger().debug("Rule: dirList: ",h[f-1],h[f]),this.$=[h[f-1]].concat(h[f]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",h[f-2],h[f-1],h[f]),this.$={typeStr:h[f-2]+h[f],label:h[f-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",h[f-3],h[f-2]," #3:",h[f-1],h[f]),this.$={typeStr:h[f-3]+h[f],label:h[f-2],directions:h[f-1]};break;case 35:case 36:this.$={type:"classDef",id:h[f-1].trim(),css:h[f].trim()};break;case 37:this.$={type:"applyClass",id:h[f-1].trim(),styleClass:h[f].trim()};break;case 38:this.$={type:"applyStyles",id:h[f-1].trim(),stylesStr:h[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(o,[2,16],{14:22,15:p,16:b}),e(o,[2,17]),e(o,[2,18]),e(o,[2,19]),e(o,[2,20]),e(o,[2,21]),e(o,[2,22]),e(x,[2,25],{27:[1,25]}),e(o,[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(w,[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:b,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(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(o,[2,28]),e(o,[2,35]),e(o,[2,36]),e(o,[2,37]),e(o,[2,38]),{36:[1,47]},{33:48,34:v},{15:[1,50]},e(o,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:v,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:d(function(m,u){if(u.recoverable)this.trace(m);else{var y=new Error(m);throw y.hash=u,y}},"parseError"),parse:d(function(m){var u=this,y=[0],L=[],E=[null],h=[],W=this.table,f="",O=0,q=0,j=2,st=1,dt=h.slice.call(arguments,1),R=Object.create(this.lexer),G={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(G.yy[ut]=this.yy[ut]);R.setInput(m,G.yy),G.yy.lexer=R,G.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var pt=R.yylloc;h.push(pt);var de=R.options&&R.options.ranges;typeof G.yy.parseError=="function"?this.parseError=G.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ue(Y){y.length=y.length-2*Y,E.length=E.length-Y,h.length=h.length-Y}d(ue,"popStack");function It(){var Y;return Y=L.pop()||R.lex()||st,typeof Y!="number"&&(Y instanceof Array&&(L=Y,Y=L.pop()),Y=u.symbols_[Y]||Y),Y}d(It,"lex");for(var F,J,K,ft,Q={},it,Z,Ct,nt;;){if(J=y[y.length-1],this.defaultActions[J]?K=this.defaultActions[J]:((F===null||typeof F>"u")&&(F=It()),K=W[J]&&W[J][F]),typeof K>"u"||!K.length||!K[0]){var xt="";nt=[];for(it in W[J])this.terminals_[it]&&it>j&&nt.push("'"+this.terminals_[it]+"'");R.showPosition?xt="Parse error on line "+(O+1)+`: `+R.showPosition()+` Expecting `+nt.join(", ")+", got '"+(this.terminals_[F]||F)+"'":xt="Parse error on line "+(O+1)+": Unexpected "+(F==st?"end of input":"'"+(this.terminals_[F]||F)+"'"),this.parseError(xt,{text:R.match,token:this.terminals_[F]||F,line:R.yylineno,loc:pt,expected:nt})}if(K[0]instanceof Array&&K.length>1)throw new Error("Parse Error: multiple actions possible at state: "+J+", token: "+F);switch(K[0]){case 1:y.push(F),E.push(R.yytext),h.push(R.yylloc),y.push(K[1]),F=null,q=R.yyleng,f=R.yytext,O=R.yylineno,pt=R.yylloc;break;case 2:if(Z=this.productions_[K[1]][1],Q.$=E[E.length-Z],Q._$={first_line:h[h.length-(Z||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(Z||1)].first_column,last_column:h[h.length-1].last_column},de&&(Q._$.range=[h[h.length-(Z||1)].range[0],h[h.length-1].range[1]]),ft=this.performAction.apply(Q,[f,q,O,G.yy,K[1],E,h].concat(dt)),typeof ft<"u")return ft;Z&&(y=y.slice(0,-1*Z*2),E=E.slice(0,-1*Z),h=h.slice(0,-1*Z)),y.push(this.productions_[K[1]][0]),E.push(Q.$),h.push(Q._$),Ct=W[y[y.length-2]][y[y.length-1]],y.push(Ct);break;case 3:return!0}}return!0},"parse")},_=(function(){var T={EOF:1,parseError:d(function(u,y){if(this.yy.parser)this.yy.parser.parseError(u,y);else throw new Error(u)},"parseError"),setInput:d(function(m,u){return this.yy=u||this.yy||{},this._input=m,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 m=this._input[0];this.yytext+=m,this.yyleng++,this.offset++,this.match+=m,this.matched+=m;var u=m.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),m},"input"),unput:d(function(m){var u=m.length,y=m.split(/(?:\r\n?|\n)/g);this._input=m+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;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),y.length-1&&(this.yylineno-=y.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:y?(y.length===L.length?this.yylloc.first_column:0)+L[L.length-y.length].length-y[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-u]),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(m){this.unput(this.match.slice(m))},"less"),pastInput:d(function(){var m=this.matched.substr(0,this.matched.length-this.match.length);return(m.length>20?"...":"")+m.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var m=this.match;return m.length<20&&(m+=this._input.substr(0,20-m.length)),(m.substr(0,20)+(m.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var m=this.pastInput(),u=new Array(m.length+1).join("-");return m+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-BmWl5vmY.js b/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-DLUT0qV4.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-BmWl5vmY.js rename to apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-DLUT0qV4.js index 928b0b9a9..f9eec67ca 100644 --- a/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-BmWl5vmY.js +++ b/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-DLUT0qV4.js @@ -1,4 +1,4 @@ -import{g as Oe,d as Re}from"./chunk-ND2GUHAM-CyIE0WAw.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-bNlBBSwN.js";import"./index-DIfcwXP7.js";var jt=(function(){var e=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],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[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],Xt=[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],Ot=[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],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[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,Rt){var f=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[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,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}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[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},e(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:a,36:n,37:i,38:u,39:d,40:p,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]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,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}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[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=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: +import{g as Oe,d as Re}from"./chunk-ND2GUHAM-x8mUbci6.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-D9FOqe1y.js";import"./index-CP4VUG5A.js";var jt=(function(){var e=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],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[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],Xt=[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],Ot=[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],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[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,Rt){var f=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[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,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}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[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},e(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:a,36:n,37:i,38:u,39:d,40:p,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]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,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}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[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=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: `+D.showPosition()+` Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}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,re=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,re,Et,At.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},Ae=(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/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-n7KpkP5u.js b/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-n7KpkP5u.js deleted file mode 100644 index 5cf716edd..000000000 --- a/apps/pythinker-code/dist-web/assets/c4Diagram-AAUBKEIU-n7KpkP5u.js +++ /dev/null @@ -1,10 +0,0 @@ -import{g as Oe,d as Re}from"./chunk-ND2GUHAM-B0b4a7yH.js";import{s as Se,g as De,a as Pe,b as Be,_ as y,c as Dt,d as Nt,l as he,e as Ie,f as Me,h as Tt,i as pe,j as Le,w as Ne,k as Jt,m as ue}from"./mermaid.core-Br9os_fu.js";import"./index-DIKFd2HX.js";var jt=(function(){var e=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],l=[1,27],r=[1,28],a=[1,63],n=[1,64],i=[1,65],u=[1,66],d=[1,67],p=[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],Xt=[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],Ot=[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],se=[12,14,33,42],Bt=[12,14,33,42,76,77,79,80],vt=[12,33],Wt=[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,Rt){var f=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[f-3]);break;case 19:b.setTitle(h[f].substring(6)),this.$=h[f].substring(6);break;case 20:b.setAccDescription(h[f].substring(15)),this.$=h[f].substring(15);break;case 21:this.$=h[f].trim(),b.setTitle(this.$);break;case 22:case 23:this.$=h[f].trim(),b.setAccDescription(this.$);break;case 28:h[f].splice(2,0,"ENTERPRISE"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 29:h[f].splice(2,0,"SYSTEM"),b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 30:b.addPersonOrSystemBoundary(...h[f]),this.$=h[f];break;case 31:h[f].splice(2,0,"CONTAINER"),b.addContainerBoundary(...h[f]),this.$=h[f];break;case 32:b.addDeploymentNode("node",...h[f]),this.$=h[f];break;case 33:b.addDeploymentNode("nodeL",...h[f]),this.$=h[f];break;case 34:b.addDeploymentNode("nodeR",...h[f]),this.$=h[f];break;case 35:b.popBoundaryParseStack();break;case 39:b.addPersonOrSystem("person",...h[f]),this.$=h[f];break;case 40:b.addPersonOrSystem("external_person",...h[f]),this.$=h[f];break;case 41:b.addPersonOrSystem("system",...h[f]),this.$=h[f];break;case 42:b.addPersonOrSystem("system_db",...h[f]),this.$=h[f];break;case 43:b.addPersonOrSystem("system_queue",...h[f]),this.$=h[f];break;case 44:b.addPersonOrSystem("external_system",...h[f]),this.$=h[f];break;case 45:b.addPersonOrSystem("external_system_db",...h[f]),this.$=h[f];break;case 46:b.addPersonOrSystem("external_system_queue",...h[f]),this.$=h[f];break;case 47:b.addContainer("container",...h[f]),this.$=h[f];break;case 48:b.addContainer("container_db",...h[f]),this.$=h[f];break;case 49:b.addContainer("container_queue",...h[f]),this.$=h[f];break;case 50:b.addContainer("external_container",...h[f]),this.$=h[f];break;case 51:b.addContainer("external_container_db",...h[f]),this.$=h[f];break;case 52:b.addContainer("external_container_queue",...h[f]),this.$=h[f];break;case 53:b.addComponent("component",...h[f]),this.$=h[f];break;case 54:b.addComponent("component_db",...h[f]),this.$=h[f];break;case 55:b.addComponent("component_queue",...h[f]),this.$=h[f];break;case 56:b.addComponent("external_component",...h[f]),this.$=h[f];break;case 57:b.addComponent("external_component_db",...h[f]),this.$=h[f];break;case 58:b.addComponent("external_component_queue",...h[f]),this.$=h[f];break;case 60:b.addRel("rel",...h[f]),this.$=h[f];break;case 61:b.addRel("birel",...h[f]),this.$=h[f];break;case 62:b.addRel("rel_u",...h[f]),this.$=h[f];break;case 63:b.addRel("rel_d",...h[f]),this.$=h[f];break;case 64:b.addRel("rel_l",...h[f]),this.$=h[f];break;case 65:b.addRel("rel_r",...h[f]),this.$=h[f];break;case 66:b.addRel("rel_b",...h[f]),this.$=h[f];break;case 67:h[f].splice(0,1),b.addRel("rel",...h[f]),this.$=h[f];break;case 68:b.updateElStyle("update_el_style",...h[f]),this.$=h[f];break;case 69:b.updateRelStyle("update_rel_style",...h[f]),this.$=h[f];break;case 70:b.updateLayoutConfig("update_layout_config",...h[f]),this.$=h[f];break;case 71:this.$=[h[f]];break;case 72:h[f].unshift(h[f-1]),this.$=h[f];break;case 73:case 75:this.$=h[f].trim();break;case 74:let Et={};Et[h[f-1].trim()]=h[f].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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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:l,28:r,29:49,30:61,32:62,34:a,36:n,37:i,38:u,39:d,40:p,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]},e(Ct,[2,13],{43:23,29:49,30:61,32:62,20:75,34:a,36:n,37:i,38:u,39:d,40:p,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}),e(Ct,[2,14]),e(Xt,[2,16],{12:[1,76]}),e(Ct,[2,36],{12:[1,77]}),e(Ot,[2,19]),e(Ot,[2,20]),{25:[1,78]},{27:[1,79]},e(Ot,[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},e(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:a,36:n,37:i,38:u,39:d,40:p,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]},e(Ct,[2,15]),e(Xt,[2,17],{21:22,19:130,22:t,23:s,24:o,26:l,28:r}),e(Ct,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:s,24:o,26:l,28:r,34:a,36:n,37:i,38:u,39:d,40:p,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}),e(Ot,[2,21]),e(Ot,[2,22]),e(T,[2,39]),e(se,[2,71],{75:81,35:132,76:A,77:k,79:C,80:w}),e(Bt,[2,73]),{78:[1,133]},e(Bt,[2,75]),e(Bt,[2,76]),e(T,[2,40]),e(T,[2,41]),e(T,[2,42]),e(T,[2,43]),e(T,[2,44]),e(T,[2,45]),e(T,[2,46]),e(T,[2,47]),e(T,[2,48]),e(T,[2,49]),e(T,[2,50]),e(T,[2,51]),e(T,[2,52]),e(T,[2,53]),e(T,[2,54]),e(T,[2,55]),e(T,[2,56]),e(T,[2,57]),e(T,[2,58]),e(T,[2,60]),e(T,[2,61]),e(T,[2,62]),e(T,[2,63]),e(T,[2,64]),e(T,[2,65]),e(T,[2,66]),e(T,[2,67]),e(T,[2,68]),e(T,[2,69]),e(T,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(vt,[2,28]),e(vt,[2,29]),e(vt,[2,30]),e(vt,[2,31]),e(vt,[2,32]),e(vt,[2,33]),e(vt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(Xt,[2,18]),e(Ct,[2,38]),e(se,[2,72]),e(Bt,[2,74]),e(T,[2,24]),e(T,[2,35]),e(Wt,[2,25]),e(Wt,[2,26],{12:[1,138]}),e(Wt,[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=[],Rt=this.table,f="",Et=0,re=0,ke=2,le=1,Ce=h.slice.call(arguments,1),D=Object.create(this.lexer),At={yy:{}};for(var Ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ht)&&(At.yy[Ht]=this.yy[Ht]);D.setInput(x,At.yy),At.yy.lexer=D,At.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var qt=D.yylloc;h.push(qt);var we=D.options&&D.options.ranges;typeof At.yy.parseError=="function"?this.parseError=At.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Te(L){E.length=E.length-2*L,R.length=R.length-L,h.length=h.length-L}y(Te,"popStack");function oe(){var L;return L=b.pop()||D.lex()||le,typeof L!="number"&&(L instanceof Array&&(b=L,L=b.pop()),L=v.symbols_[L]||L),L}y(oe,"lex");for(var I,kt,N,Gt,wt={},Mt,W,ce,Lt;;){if(kt=E[E.length-1],this.defaultActions[kt]?N=this.defaultActions[kt]:((I===null||typeof I>"u")&&(I=oe()),N=Rt[kt]&&Rt[kt][I]),typeof N>"u"||!N.length||!N[0]){var Kt="";Lt=[];for(Mt in Rt[kt])this.terminals_[Mt]&&Mt>ke&&Lt.push("'"+this.terminals_[Mt]+"'");D.showPosition?Kt="Parse error on line "+(Et+1)+`: -`+D.showPosition()+` -Expecting `+Lt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":Kt="Parse error on line "+(Et+1)+": Unexpected "+(I==le?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Kt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:qt,expected:Lt})}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,re=D.yyleng,f=D.yytext,Et=D.yylineno,qt=D.yylloc;break;case 2:if(W=this.productions_[N[1]][1],wt.$=R[R.length-W],wt._$={first_line:h[h.length-(W||1)].first_line,last_line:h[h.length-1].last_line,first_column:h[h.length-(W||1)].first_column,last_column:h[h.length-1].last_column},we&&(wt._$.range=[h[h.length-(W||1)].range[0],h[h.length-1].range[1]]),Gt=this.performAction.apply(wt,[f,re,Et,At.yy,N[1],R,h].concat(Ce)),typeof Gt<"u")return Gt;W&&(E=E.slice(0,-1*W*2),R=R.slice(0,-1*W),h=h.slice(0,-1*W)),E.push(this.productions_[N[1]][0]),R.push(wt.$),h.push(wt._$),ce=Rt[E[E.length-2]][E[E.length-1]],E.push(ce);break;case 3:return!0}}return!0},"parse")},Ae=(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()+` -`+v+"^"},"showPosition"),test_match:y(function(x,v){var E,b,R;if(this.options.backtrack_lexer&&(R={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(R.yylloc.range=this.yylloc.range.slice(0))),b=x[0].match(/(?:\r\n?|\n).*/g),b&&(this.yylineno+=b.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:b?b[b.length-1].length-b[b.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+x[0].length},this.yytext+=x[0],this.match+=x[0],this.matches=x,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(x[0].length),this.matched+=x[0],E=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),E)return E;if(this._backtrack){for(var h in R)this[h]=R[h];return!1}return!1},"test_match"),next:y(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var x,v,E,b;this._more||(this.yytext="",this.match="");for(var R=this._currentRules(),h=0;hv[0].length)){if(v=E,b=h,this.options.backtrack_lexer){if(x=this.test_match(E,R[h]),x!==!1)return x;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(x=this.test_match(v,R[b]),x!==!1?x:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:y(function(){var v=this.next();return v||this.lex()},"lex"),begin:y(function(v){this.conditionStack.push(v)},"begin"),popState:y(function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:y(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:y(function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},"topState"),pushState:y(function(v){this.begin(v)},"pushState"),stateStackSize:y(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:y(function(v,E,b,R){switch(b){case 0:return 6;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 22;case 5:return 23;case 6:return this.begin("acc_title"),24;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),26;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:break;case 14:c;break;case 15:return 12;case 16:break;case 17:return 11;case 18:return 15;case 19:return 16;case 20:return 17;case 21:return 18;case 22:return this.begin("person_ext"),45;case 23:return this.begin("person"),44;case 24:return this.begin("system_ext_queue"),51;case 25:return this.begin("system_ext_db"),50;case 26:return this.begin("system_ext"),49;case 27:return this.begin("system_queue"),48;case 28:return this.begin("system_db"),47;case 29:return this.begin("system"),46;case 30:return this.begin("boundary"),37;case 31:return this.begin("enterprise_boundary"),34;case 32:return this.begin("system_boundary"),36;case 33:return this.begin("container_ext_queue"),57;case 34:return this.begin("container_ext_db"),56;case 35:return this.begin("container_ext"),55;case 36:return this.begin("container_queue"),54;case 37:return this.begin("container_db"),53;case 38:return this.begin("container"),52;case 39:return this.begin("container_boundary"),38;case 40:return this.begin("component_ext_queue"),63;case 41:return this.begin("component_ext_db"),62;case 42:return this.begin("component_ext"),61;case 43:return this.begin("component_queue"),60;case 44:return this.begin("component_db"),59;case 45:return this.begin("component"),58;case 46:return this.begin("node"),39;case 47:return this.begin("node"),39;case 48:return this.begin("node_l"),40;case 49:return this.begin("node_r"),41;case 50:return this.begin("rel"),64;case 51:return this.begin("birel"),65;case 52:return this.begin("rel_u"),66;case 53:return this.begin("rel_u"),66;case 54:return this.begin("rel_d"),67;case 55:return this.begin("rel_d"),67;case 56:return this.begin("rel_l"),68;case 57:return this.begin("rel_l"),68;case 58:return this.begin("rel_r"),69;case 59:return this.begin("rel_r"),69;case 60:return this.begin("rel_b"),70;case 61:return this.begin("rel_index"),71;case 62:return this.begin("update_el_style"),72;case 63:return this.begin("update_rel_style"),73;case 64:return this.begin("update_layout_config"),74;case 65:return"EOF_IN_STRUCT";case 66:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 67:this.begin("attribute");break;case 68:this.popState(),this.popState();break;case 69:return 80;case 70:break;case 71:return 80;case 72:this.begin("string");break;case 73:this.popState();break;case 74:return"STR";case 75:this.begin("string_kv");break;case 76:return this.begin("string_kv_key"),"STR_KEY";case 77:this.popState(),this.begin("string_kv_value");break;case 78:return"STR_VALUE";case 79:this.popState(),this.popState();break;case 80:return"STR";case 81:return"LBRACE";case 82:return"RBRACE";case 83:return"SPACE";case 84:return"EOL";case 85:return 14}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},string_kv_value:{rules:[78,79],inclusive:!1},string_kv_key:{rules:[77],inclusive:!1},string_kv:{rules:[76],inclusive:!1},string:{rules:[73,74],inclusive:!1},attribute:{rules:[68,69,70,71,72,75,80],inclusive:!1},update_layout_config:{rules:[65,66,67,68],inclusive:!1},update_rel_style:{rules:[65,66,67,68],inclusive:!1},update_el_style:{rules:[65,66,67,68],inclusive:!1},rel_b:{rules:[65,66,67,68],inclusive:!1},rel_r:{rules:[65,66,67,68],inclusive:!1},rel_l:{rules:[65,66,67,68],inclusive:!1},rel_d:{rules:[65,66,67,68],inclusive:!1},rel_u:{rules:[65,66,67,68],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[65,66,67,68],inclusive:!1},node_r:{rules:[65,66,67,68],inclusive:!1},node_l:{rules:[65,66,67,68],inclusive:!1},node:{rules:[65,66,67,68],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[65,66,67,68],inclusive:!1},component_ext_queue:{rules:[65,66,67,68],inclusive:!1},component_ext_db:{rules:[65,66,67,68],inclusive:!1},component_ext:{rules:[65,66,67,68],inclusive:!1},component_queue:{rules:[65,66,67,68],inclusive:!1},component_db:{rules:[65,66,67,68],inclusive:!1},component:{rules:[65,66,67,68],inclusive:!1},container_boundary:{rules:[65,66,67,68],inclusive:!1},container_ext_queue:{rules:[65,66,67,68],inclusive:!1},container_ext_db:{rules:[65,66,67,68],inclusive:!1},container_ext:{rules:[65,66,67,68],inclusive:!1},container_queue:{rules:[65,66,67,68],inclusive:!1},container_db:{rules:[65,66,67,68],inclusive:!1},container:{rules:[65,66,67,68],inclusive:!1},birel:{rules:[65,66,67,68],inclusive:!1},system_boundary:{rules:[65,66,67,68],inclusive:!1},enterprise_boundary:{rules:[65,66,67,68],inclusive:!1},boundary:{rules:[65,66,67,68],inclusive:!1},system_ext_queue:{rules:[65,66,67,68],inclusive:!1},system_ext_db:{rules:[65,66,67,68],inclusive:!1},system_ext:{rules:[65,66,67,68],inclusive:!1},system_queue:{rules:[65,66,67,68],inclusive:!1},system_db:{rules:[65,66,67,68],inclusive:!1},system:{rules:[65,66,67,68],inclusive:!1},person_ext:{rules:[65,66,67,68],inclusive:!1},person:{rules:[65,66,67,68],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,82,83,84,85],inclusive:!0}}};return _t})();Qt.lexer=Ae;function It(){this.yy={}}return y(It,"Parser"),It.prototype=Qt,Qt.Parser=It,new It})();jt.parser=jt;var Ye=jt,V=[],xt=[""],B="global",F="",X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Pt=[],ee="",ae=!1,Ut=4,Ft=2,ye,je=y(function(){return ye},"getC4Type"),Ue=y(function(e){ye=pe(e,Dt())},"setC4Type"),Fe=y(function(e,t,s,o,l,r,a,n,i){if(e==null||t===void 0||t===null||s===void 0||s===null||o===void 0||o===null)return;let u={};const d=Pt.find(p=>p.from===t&&p.to===s);if(d?u=d:Pt.push(u),u.type=e,u.from=t,u.to=s,u.label={text:o},l==null)u.techn={text:""};else if(typeof l=="object"){let[p,g]=Object.entries(l)[0];u[p]={text:g}}else u.techn={text:l};if(r==null)u.descr={text:""};else if(typeof r=="object"){let[p,g]=Object.entries(r)[0];u[p]={text:g}}else u.descr={text:r};if(typeof a=="object"){let[p,g]=Object.entries(a)[0];u[p]=g}else u.sprite=a;if(typeof n=="object"){let[p,g]=Object.entries(n)[0];u[p]=g}else u.tags=n;if(typeof i=="object"){let[p,g]=Object.entries(i)[0];u[p]=g}else u.link=i;u.wrap=mt()},"addRel"),Ve=y(function(e,t,s,o,l,r,a){if(t===null||s===null)return;let n={};const i=V.find(u=>u.alias===t);if(i&&t===i.alias?n=i:(n.alias=t,V.push(n)),s==null?n.label={text:""}:n.label={text:s},o==null)n.descr={text:""};else if(typeof o=="object"){let[u,d]=Object.entries(o)[0];n[u]={text:d}}else n.descr={text:o};if(typeof l=="object"){let[u,d]=Object.entries(l)[0];n[u]=d}else n.sprite=l;if(typeof r=="object"){let[u,d]=Object.entries(r)[0];n[u]=d}else n.tags=r;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];n[u]=d}else n.link=a;n.typeC4Shape={text:e},n.parentBoundary=B,n.wrap=mt()},"addPersonOrSystem"),ze=y(function(e,t,s,o,l,r,a,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.sprite=r;if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof n=="object"){let[d,p]=Object.entries(n)[0];i[d]=p}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addContainer"),Xe=y(function(e,t,s,o,l,r,a,n){if(t===null||s===null)return;let i={};const u=V.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,V.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.techn={text:""};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.techn={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof r=="object"){let[d,p]=Object.entries(r)[0];i[d]=p}else i.sprite=r;if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof n=="object"){let[d,p]=Object.entries(n)[0];i[d]=p}else i.link=n;i.wrap=mt(),i.typeC4Shape={text:e},i.parentBoundary=B},"addComponent"),We=y(function(e,t,s,o,l){if(e===null||t===null)return;let r={};const a=X.find(n=>n.alias===e);if(a&&e===a.alias?r=a:(r.alias=e,X.push(r)),t==null?r.label={text:""}:r.label={text:t},s==null)r.type={text:"system"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];r[n]={text:i}}else r.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];r[n]=i}else r.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];r[n]=i}else r.link=l;r.parentBoundary=B,r.wrap=mt(),F=B,B=e,xt.push(F)},"addPersonOrSystemBoundary"),Qe=y(function(e,t,s,o,l){if(e===null||t===null)return;let r={};const a=X.find(n=>n.alias===e);if(a&&e===a.alias?r=a:(r.alias=e,X.push(r)),t==null?r.label={text:""}:r.label={text:t},s==null)r.type={text:"container"};else if(typeof s=="object"){let[n,i]=Object.entries(s)[0];r[n]={text:i}}else r.type={text:s};if(typeof o=="object"){let[n,i]=Object.entries(o)[0];r[n]=i}else r.tags=o;if(typeof l=="object"){let[n,i]=Object.entries(l)[0];r[n]=i}else r.link=l;r.parentBoundary=B,r.wrap=mt(),F=B,B=e,xt.push(F)},"addContainerBoundary"),He=y(function(e,t,s,o,l,r,a,n){if(t===null||s===null)return;let i={};const u=X.find(d=>d.alias===t);if(u&&t===u.alias?i=u:(i.alias=t,X.push(i)),s==null?i.label={text:""}:i.label={text:s},o==null)i.type={text:"node"};else if(typeof o=="object"){let[d,p]=Object.entries(o)[0];i[d]={text:p}}else i.type={text:o};if(l==null)i.descr={text:""};else if(typeof l=="object"){let[d,p]=Object.entries(l)[0];i[d]={text:p}}else i.descr={text:l};if(typeof a=="object"){let[d,p]=Object.entries(a)[0];i[d]=p}else i.tags=a;if(typeof n=="object"){let[d,p]=Object.entries(n)[0];i[d]=p}else i.link=n;i.nodeType=e,i.parentBoundary=B,i.wrap=mt(),F=B,B=t,xt.push(F)},"addDeploymentNode"),qe=y(function(){B=F,xt.pop(),F=xt.pop(),xt.push(F)},"popBoundaryParseStack"),Ge=y(function(e,t,s,o,l,r,a,n,i,u,d){let p=V.find(g=>g.alias===t);if(!(p===void 0&&(p=X.find(g=>g.alias===t),p===void 0))){if(s!=null)if(typeof s=="object"){let[g,m]=Object.entries(s)[0];p[g]=m}else p.bgColor=s;if(o!=null)if(typeof o=="object"){let[g,m]=Object.entries(o)[0];p[g]=m}else p.fontColor=o;if(l!=null)if(typeof l=="object"){let[g,m]=Object.entries(l)[0];p[g]=m}else p.borderColor=l;if(r!=null)if(typeof r=="object"){let[g,m]=Object.entries(r)[0];p[g]=m}else p.shadowing=r;if(a!=null)if(typeof a=="object"){let[g,m]=Object.entries(a)[0];p[g]=m}else p.shape=a;if(n!=null)if(typeof n=="object"){let[g,m]=Object.entries(n)[0];p[g]=m}else p.sprite=n;if(i!=null)if(typeof i=="object"){let[g,m]=Object.entries(i)[0];p[g]=m}else p.techn=i;if(u!=null)if(typeof u=="object"){let[g,m]=Object.entries(u)[0];p[g]=m}else p.legendText=u;if(d!=null)if(typeof d=="object"){let[g,m]=Object.entries(d)[0];p[g]=m}else p.legendSprite=d}},"updateElStyle"),Ke=y(function(e,t,s,o,l,r,a){const n=Pt.find(i=>i.from===t&&i.to===s);if(n!==void 0){if(o!=null)if(typeof o=="object"){let[i,u]=Object.entries(o)[0];n[i]=u}else n.textColor=o;if(l!=null)if(typeof l=="object"){let[i,u]=Object.entries(l)[0];n[i]=u}else n.lineColor=l;if(r!=null)if(typeof r=="object"){let[i,u]=Object.entries(r)[0];n[i]=parseInt(u)}else n.offsetX=parseInt(r);if(a!=null)if(typeof a=="object"){let[i,u]=Object.entries(a)[0];n[i]=parseInt(u)}else n.offsetY=parseInt(a)}},"updateRelStyle"),Je=y(function(e,t,s){let o=Ut,l=Ft;if(typeof t=="object"){const r=Object.values(t)[0];o=parseInt(r)}else o=parseInt(t);if(typeof s=="object"){const r=Object.values(s)[0];l=parseInt(r)}else l=parseInt(s);o>=1&&(Ut=o),l>=1&&(Ft=l)},"updateLayoutConfig"),Ze=y(function(){return Ut},"getC4ShapeInRow"),$e=y(function(){return Ft},"getC4BoundaryInRow"),t0=y(function(){return B},"getCurrentBoundaryParse"),e0=y(function(){return F},"getParentBoundaryParse"),ge=y(function(e){return e==null?V:V.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),a0=y(function(e){return V.find(t=>t.alias===e)},"getC4Shape"),i0=y(function(e){return Object.keys(ge(e))},"getC4ShapeKeys"),be=y(function(e){return e==null?X:X.filter(t=>t.parentBoundary===e)},"getBoundaries"),n0=be,s0=y(function(){return Pt},"getRels"),r0=y(function(){return ee},"getTitle"),l0=y(function(e){ae=e},"setWrap"),mt=y(function(){return ae},"autoWrap"),o0=y(function(){V=[],X=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],F="",B="global",xt=[""],Pt=[],xt=[""],ee="",ae=!1,Ut=4,Ft=2},"clear"),c0={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},h0={FILLED:0,OPEN:1},u0={LEFTOF:0,RIGHTOF:1,OVER:2},d0=y(function(e){ee=pe(e,Dt())},"setTitle"),Zt={addPersonOrSystem:Ve,addPersonOrSystemBoundary:We,addContainer:ze,addContainerBoundary:Qe,addComponent:Xe,addDeploymentNode:He,popBoundaryParseStack:qe,addRel:Fe,updateElStyle:Ge,updateRelStyle:Ke,updateLayoutConfig:Je,autoWrap:mt,setWrap:l0,getC4ShapeArray:ge,getC4Shape:a0,getC4ShapeKeys:i0,getBoundaries:be,getBoundarys:n0,getCurrentBoundaryParse:t0,getParentBoundaryParse:e0,getRels:s0,getTitle:r0,getC4Type:je,getC4ShapeInRow:Ze,getC4BoundaryInRow:$e,setAccTitle:Be,getAccTitle:Pe,getAccDescription:De,setAccDescription:Se,getConfig:y(()=>Dt().c4,"getConfig"),clear:o0,LINETYPE:c0,ARROWTYPE:h0,PLACEMENT:u0,setTitle:d0,setC4Type:Ue},ie=y(function(e,t){return Re(e,t)},"drawRect"),_e=y(function(e,t,s,o,l,r){const a=e.append("image");a.attr("width",t),a.attr("height",s),a.attr("x",o),a.attr("y",l);let n=r.startsWith("data:image/png;base64")?r:Le.sanitizeUrl(r);a.attr("xlink:href",n)},"drawImage"),f0=y((e,t,s,o)=>{const l=e.append("g");let r=0;for(let a of t){let n=a.textColor?a.textColor:"#444444",i=a.lineColor?a.lineColor:"#444444",u=a.offsetX?parseInt(a.offsetX):0,d=a.offsetY?parseInt(a.offsetY):0,p="";if(r===0){let m=l.append("line");m.attr("x1",a.startPoint.x),m.attr("y1",a.startPoint.y),m.attr("x2",a.endPoint.x),m.attr("y2",a.endPoint.y),m.attr("stroke-width","1"),m.attr("stroke",i),m.style("fill","none"),a.type!=="rel_b"&&m.attr("marker-end","url("+p+"#"+o+"-arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&m.attr("marker-start","url("+p+"#"+o+"-arrowend)"),r=-1}else{let m=l.append("path");m.attr("fill","none").attr("stroke-width","1").attr("stroke",i).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&m.attr("marker-end","url("+p+"#"+o+"-arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&m.attr("marker-start","url("+p+"#"+o+"-arrowend)")}let g=s.messageFont();Q(s)(a.label.text,l,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+d,a.label.width,a.label.height,{fill:n},g),a.techn&&a.techn.text!==""&&(g=s.messageFont(),Q(s)("["+a.techn.text+"]",l,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+u,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+s.messageFontSize+5+d,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:n,"font-style":"italic"},g))}},"drawRels"),p0=y(function(e,t,s){const o=e.append("g");let l=t.bgColor?t.bgColor:"none",r=t.borderColor?t.borderColor:"#444444",a=t.fontColor?t.fontColor:"black",n={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};t.nodeType&&(n={"stroke-width":1});let i={x:t.x,y:t.y,fill:l,stroke:r,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:n};ie(o,i);let u=s.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,Q(s)(t.label.text,o,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},u),t.type&&t.type.text!==""&&(u=s.boundaryFont(),u.fontColor=a,Q(s)(t.type.text,o,t.x,t.y+t.type.Y,t.width,t.height,{fill:"#444444"},u)),t.descr&&t.descr.text!==""&&(u=s.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,Q(s)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},u))},"drawBoundary"),y0=y(function(e,t,s){let o=t.bgColor?t.bgColor:s[t.typeC4Shape.text+"_bg_color"],l=t.borderColor?t.borderColor:s[t.typeC4Shape.text+"_border_color"],r=t.fontColor?t.fontColor:"#FFFFFF",a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(t.typeC4Shape.text){case"person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const n=e.append("g");n.attr("class","person-man");const i=Oe();switch(t.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":i.x=t.x,i.y=t.y,i.fill=o,i.width=t.width,i.height=t.height,i.stroke=l,i.rx=2.5,i.ry=2.5,i.attrs={"stroke-width":.5},ie(n,i);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2).replaceAll("height",t.height)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("half",t.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":n.append("path").attr("fill",o).attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",t.x).replaceAll("starty",t.y).replaceAll("width",t.width).replaceAll("half",t.height/2)),n.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",l).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",t.x+t.width).replaceAll("starty",t.y).replaceAll("half",t.height/2));break}let u=A0(s,t.typeC4Shape.text);switch(n.append("text").attr("fill",r).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",t.typeC4Shape.width).attr("x",t.x+t.width/2-t.typeC4Shape.width/2).attr("y",t.y+t.typeC4Shape.Y).text("<<"+t.typeC4Shape.text+">>"),t.typeC4Shape.text){case"person":case"external_person":_e(n,48,48,t.x+t.width/2-24,t.y+t.image.Y,a);break}let d=s[t.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=r,Q(s)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:r},d),d=s[t.typeC4Shape.text+"Font"](),d.fontColor=r,t.techn&&t.techn?.text!==""?Q(s)(t.techn.text,n,t.x,t.y+t.techn.Y,t.width,t.height,{fill:r,"font-style":"italic"},d):t.type&&t.type.text!==""&&Q(s)(t.type.text,n,t.x,t.y+t.type.Y,t.width,t.height,{fill:r,"font-style":"italic"},d),t.descr&&t.descr.text!==""&&(d=s.personFont(),d.fontColor=r,Q(s)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:r},d)),t.height},"drawC4Shape"),g0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),b0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),_0=y(function(e,t){e.append("defs").append("symbol").attr("id",t+"-clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),x0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),m0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),v0=y(function(e,t){e.append("defs").append("marker").attr("id",t+"-filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),E0=y(function(e,t){const o=e.append("defs").append("marker").attr("id",t+"-crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);o.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),o.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},"insertArrowCrossHead"),A0=y((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"getC4ShapeFont"),Q=(function(){function e(l,r,a,n,i,u,d){const p=r.append("text").attr("x",a+i/2).attr("y",n+u/2+5).style("text-anchor","middle").text(l);o(p,d)}y(e,"byText");function t(l,r,a,n,i,u,d,p){const{fontSize:g,fontFamily:m,fontWeight:O}=p,S=l.split(Jt.lineBreakRegex);for(let P=0;P=this.data.widthLimit||s>=this.data.widthLimit||this.nextData.cnt>xe)&&(t=this.nextData.startx+e.margin+_.nextLinePaddingX,o=this.nextData.stopy+e.margin*2,this.nextData.stopx=s=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=l=o+e.height,this.nextData.cnt=1),e.x=t,e.y=o,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",o,Math.min),this.updateVal(this.data,"stopx",s,Math.max),this.updateVal(this.data,"stopy",l,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",o,Math.min),this.updateVal(this.nextData,"stopx",s,Math.max),this.updateVal(this.nextData,"stopy",l,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},te(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},te=y(function(e){Me(_,e),e.fontFamily&&(_.personFontFamily=_.systemFontFamily=_.messageFontFamily=e.fontFamily),e.fontSize&&(_.personFontSize=_.systemFontSize=_.messageFontSize=e.fontSize),e.fontWeight&&(_.personFontWeight=_.systemFontWeight=_.messageFontWeight=e.fontWeight)},"setConf"),St=y((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),Yt=y(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),k0=y(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont");function j(e,t,s,o,l){if(!t[e].width)if(s)t[e].text=Ne(t[e].text,l,o),t[e].textLines=t[e].text.split(Jt.lineBreakRegex).length,t[e].width=l,t[e].height=ue(t[e].text,o);else{let r=t[e].text.split(Jt.lineBreakRegex);t[e].textLines=r.length;let a=0;t[e].height=0,t[e].width=0;for(const n of r)t[e].width=Math.max(Tt(n,o),t[e].width),a=ue(n,o),t[e].height=t[e].height+a}}y(j,"calcC4ShapeTextWH");var ve=y(function(e,t,s){t.x=s.data.startx,t.y=s.data.starty,t.width=s.data.stopx-s.data.startx,t.height=s.data.stopy-s.data.starty,t.label.y=_.c4ShapeMargin-35;let o=t.wrap&&_.wrap,l=Yt(_);l.fontSize=l.fontSize+2,l.fontWeight="bold";let r=Tt(t.label.text,l);j("label",t,o,l,r),z.drawBoundary(e,t,_)},"drawBoundary"),Ee=y(function(e,t,s,o){let l=0;for(const r of o){l=0;const a=s[r];let n=St(_,a.typeC4Shape.text);switch(n.fontSize=n.fontSize-2,a.typeC4Shape.width=Tt("«"+a.typeC4Shape.text+"»",n),a.typeC4Shape.height=n.fontSize+2,a.typeC4Shape.Y=_.c4ShapePadding,l=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=l,l=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=l,l=a.image.Y+a.image.height);let i=a.wrap&&_.wrap,u=_.width-_.c4ShapePadding*2,d=St(_,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",a,i,d,u),a.label.Y=l+8,l=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let m=St(_,a.typeC4Shape.text);j("type",a,i,m,u),a.type.Y=l+5,l=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let m=St(_,a.techn.text);j("techn",a,i,m,u),a.techn.Y=l+5,l=a.techn.Y+a.techn.height}let p=l,g=a.label.width;if(a.descr&&a.descr.text!==""){let m=St(_,a.typeC4Shape.text);j("descr",a,i,m,u),a.descr.Y=l+20,l=a.descr.Y+a.descr.height,g=Math.max(a.label.width,a.descr.width),p=l-a.descr.textLines*5}g=g+_.c4ShapePadding,a.width=Math.max(a.width||_.width,g,_.width),a.height=Math.max(a.height||_.height,p,_.height),a.margin=a.margin||_.c4ShapeMargin,e.insert(a),z.drawC4Shape(t,a,_)}e.bumpLastMargin(_.c4ShapeMargin)},"drawC4ShapeArray"),Y=class{static{y(this,"Point")}constructor(e,t){this.x=e,this.y=t}},de=y(function(e,t){let s=e.x,o=e.y,l=t.x,r=t.y,a=s+e.width/2,n=o+e.height/2,i=Math.abs(s-l),u=Math.abs(o-r),d=u/i,p=e.height/e.width,g=null;return o==r&&sl?g=new Y(s,n):s==l&&or&&(g=new Y(a,o)),s>l&&o=d?g=new Y(s,n+d*e.width/2):g=new Y(a-i/u*e.height/2,o+e.height):s=d?g=new Y(s+e.width,n+d*e.width/2):g=new Y(a+i/u*e.height/2,o+e.height):sr?p>=d?g=new Y(s+e.width,n-d*e.width/2):g=new Y(a+e.height/2*i/u,o):s>l&&o>r&&(p>=d?g=new Y(s,n-e.width/2*d):g=new Y(a-e.height/2*i/u,o)),g},"getIntersectPoint"),C0=y(function(e,t){let s={x:0,y:0};s.x=t.x+t.width/2,s.y=t.y+t.height/2;let o=de(e,s);s.x=e.x+e.width/2,s.y=e.y+e.height/2;let l=de(t,s);return{startPoint:o,endPoint:l}},"getIntersectPoints"),w0=y(function(e,t,s,o,l){let r=0;for(let a of t){r=r+1;let n=a.wrap&&_.wrap,i=k0(_);o.db.getC4Type()==="C4Dynamic"&&(a.label.text=r+": "+a.label.text);let d=Tt(a.label.text,i);j("label",a,n,i,d),a.techn&&a.techn.text!==""&&(d=Tt(a.techn.text,i),j("techn",a,n,i,d)),a.descr&&a.descr.text!==""&&(d=Tt(a.descr.text,i),j("descr",a,n,i,d));let p=s(a.from),g=s(a.to),m=C0(p,g);a.startPoint=m.startPoint,a.endPoint=m.endPoint}z.drawRels(e,t,_,l)},"drawRels");function ne(e,t,s,o,l){let r=new me(l);r.data.widthLimit=s.data.widthLimit/Math.min($t,o.length);for(let[a,n]of o.entries()){let i=0;n.image={width:0,height:0,Y:0},n.sprite&&(n.image.width=48,n.image.height=48,n.image.Y=i,i=n.image.Y+n.image.height);let u=n.wrap&&_.wrap,d=Yt(_);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",j("label",n,u,d,r.data.widthLimit),n.label.Y=i+8,i=n.label.Y+n.label.height,n.type&&n.type.text!==""){n.type.text="["+n.type.text+"]";let O=Yt(_);j("type",n,u,O,r.data.widthLimit),n.type.Y=i+5,i=n.type.Y+n.type.height}if(n.descr&&n.descr.text!==""){let O=Yt(_);O.fontSize=O.fontSize-2,j("descr",n,u,O,r.data.widthLimit),n.descr.Y=i+20,i=n.descr.Y+n.descr.height}if(a==0||a%$t===0){let O=s.data.startx+_.diagramMarginX,S=s.data.stopy+_.diagramMarginY+i;r.setData(O,O,S,S)}else{let O=r.data.stopx!==r.data.startx?r.data.stopx+_.diagramMarginX:r.data.startx,S=r.data.starty;r.setData(O,O,S,S)}r.name=n.alias;let p=l.db.getC4ShapeArray(n.alias),g=l.db.getC4ShapeKeys(n.alias);g.length>0&&Ee(r,e,p,g),t=n.alias;let m=l.db.getBoundaries(t);m.length>0&&ne(e,t,r,m,l),n.alias!=="global"&&ve(e,n,r),s.data.stopy=Math.max(r.data.stopy+_.c4ShapeMargin,s.data.stopy),s.data.stopx=Math.max(r.data.stopx+_.c4ShapeMargin,s.data.stopx),Vt=Math.max(Vt,s.data.stopx),zt=Math.max(zt,s.data.stopy)}}y(ne,"drawInsideBoundary");var T0=y(function(e,t,s,o){_=Dt().c4;const l=Dt().securityLevel;let r;l==="sandbox"&&(r=Nt("#i"+t));const a=l==="sandbox"?Nt(r.nodes()[0].contentDocument.body):Nt("body");let n=o.db;o.db.setWrap(_.wrap),xe=n.getC4ShapeInRow(),$t=n.getC4BoundaryInRow(),he.debug(`C:${JSON.stringify(_,null,2)}`);const i=l==="sandbox"?a.select(`[id="${t}"]`):Nt(`[id="${t}"]`);z.insertComputerIcon(i,t),z.insertDatabaseIcon(i,t),z.insertClockIcon(i,t);let u=new me(o);u.setData(_.diagramMarginX,_.diagramMarginX,_.diagramMarginY,_.diagramMarginY),u.data.widthLimit=screen.availWidth,Vt=_.diagramMarginX,zt=_.diagramMarginY;const d=o.db.getTitle();let p=o.db.getBoundaries("");ne(i,"",u,p,o),z.insertArrowHead(i,t),z.insertArrowEnd(i,t),z.insertArrowCrossHead(i,t),z.insertArrowFilledHead(i,t),w0(i,o.db.getRels(),o.db.getC4Shape,o,t),u.data.stopx=Vt,u.data.stopy=zt;const g=u.data;let O=g.stopy-g.starty+2*_.diagramMarginY;const P=g.stopx-g.startx+2*_.diagramMarginX;d&&i.append("text").text(d).attr("x",(g.stopx-g.startx)/2-4*_.diagramMarginX).attr("y",g.starty+_.diagramMarginY),Ie(i,O,P,_.useMaxWidth);const M=d?60:0;i.attr("viewBox",g.startx-_.diagramMarginX+" -"+(_.diagramMarginY+M)+" "+P+" "+(O+M)),he.debug("models:",g)},"draw"),fe={drawPersonOrSystemArray:Ee,drawBoundary:ve,setConf:te,draw:T0},O0=y(e=>`.person { - stroke: ${e.personBorder}; - fill: ${e.personBkg}; - } -`,"getStyles"),R0=O0,B0={parser:Ye,db:Zt,renderer:fe,styles:R0,init:y(({c4:e,wrap:t})=>{fe.setConf(e),Zt.setWrap(t)},"init")};export{B0 as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/cameligo-Bf6VGUru.js b/apps/pythinker-code/dist-web/assets/cameligo-Bf6VGUru.js new file mode 100644 index 000000000..ebfd454ad --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/cameligo-Bf6VGUru.js @@ -0,0 +1 @@ +const e={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},o={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};export{e as conf,o as language}; diff --git a/apps/pythinker-code/dist-web/assets/channel-BHUY_2ZP.js b/apps/pythinker-code/dist-web/assets/channel-BHUY_2ZP.js deleted file mode 100644 index 2134da50a..000000000 --- a/apps/pythinker-code/dist-web/assets/channel-BHUY_2ZP.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,D as n}from"./mermaid.core-bNlBBSwN.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/pythinker-code/dist-web/assets/channel-DEqePO0_.js b/apps/pythinker-code/dist-web/assets/channel-DEqePO0_.js new file mode 100644 index 000000000..30ca14bd0 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/channel-DEqePO0_.js @@ -0,0 +1 @@ +import{U as a,D as n}from"./mermaid.core-D9FOqe1y.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js b/apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js deleted file mode 100644 index 922c921c2..000000000 --- a/apps/pythinker-code/dist-web/assets/channel-DmsKuGC5.js +++ /dev/null @@ -1 +0,0 @@ -import{U as a,D as n}from"./mermaid.core-Br9os_fu.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-DtergGMb.js b/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-DtergGMb.js deleted file mode 100644 index 27c488914..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-DtergGMb.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-Br9os_fu.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-BZ74n2hL.js b/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-S-pjhbXt.js similarity index 87% rename from apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-BZ74n2hL.js rename to apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-S-pjhbXt.js index 359d67a91..fb69b107a 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-BZ74n2hL.js +++ b/apps/pythinker-code/dist-web/assets/chunk-2J33WTMH-S-pjhbXt.js @@ -1 +1 @@ -import{_ as a,e as w,l as x}from"./mermaid.core-bNlBBSwN.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; +import{_ as a,e as w,l as x}from"./mermaid.core-D9FOqe1y.js";var d=a((e,t,i,r)=>{e.attr("class",i);const{width:o,height:h,x:n,y:c}=u(e,t);w(e,h,o,r);const s=l(n,c,o,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{const i=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,r,o)=>`${e-o} ${t-o} ${i} ${r}`,"createViewBox");export{d as s}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DHez2dpA.js b/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-BIobHdxn.js similarity index 71% rename from apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DHez2dpA.js rename to apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-BIobHdxn.js index c98415776..66980f95f 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DHez2dpA.js +++ b/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-BIobHdxn.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-Br9os_fu.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; +import{_ as i}from"./mermaid.core-D9FOqe1y.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DQH-TItP.js b/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DQH-TItP.js deleted file mode 100644 index 7ba804a8f..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-4BX2VUAB-DQH-TItP.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i}from"./mermaid.core-bNlBBSwN.js";function t(c,e){c.accDescr&&e.setAccDescription?.(c.accDescr),c.accTitle&&e.setAccTitle?.(c.accTitle),c.title&&e.setDiagramTitle?.(c.title)}i(t,"populateCommonDb");export{t as p}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-Q15Gq5Jr.js b/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-Q15Gq5Jr.js deleted file mode 100644 index 0517f5027..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-Q15Gq5Jr.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as a,d as o}from"./mermaid.core-bNlBBSwN.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-BuzvVrQ6.js b/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-ht0xpR4D.js similarity index 72% rename from apps/pythinker-code/dist-web/assets/chunk-55IACEB6-BuzvVrQ6.js rename to apps/pythinker-code/dist-web/assets/chunk-55IACEB6-ht0xpR4D.js index be51350c5..c1049a88e 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-BuzvVrQ6.js +++ b/apps/pythinker-code/dist-web/assets/chunk-55IACEB6-ht0xpR4D.js @@ -1 +1 @@ -import{_ as a,d as o}from"./mermaid.core-Br9os_fu.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; +import{_ as a,d as o}from"./mermaid.core-D9FOqe1y.js";var d=a((t,e)=>{let n;return e==="sandbox"&&(n=o("#i"+t)),(e==="sandbox"?o(n.nodes()[0].contentDocument.body):o("body")).select(`[id="${t}"]`)},"getDiagramElement");export{d as g}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CqN4oca1.js b/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CqN4oca1.js deleted file mode 100644 index 35491155d..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CqN4oca1.js +++ /dev/null @@ -1,206 +0,0 @@ -import{g as tt}from"./chunk-FMBD7UC4-DwQl0sgV.js";import{c as st}from"./chunk-ND2GUHAM-CyIE0WAw.js";import{g as it}from"./chunk-55IACEB6-Q15Gq5Jr.js";import{s as at}from"./chunk-2J33WTMH-BZ74n2hL.js";import{_ as f,l as Ie,c as F,p as rt,r as nt,u as Oe,d as de,z as ut,b as lt,a as ct,s as ot,g as ht,q as dt,t as pt,k as I,A as At,y as ft,i as gt,a8 as G}from"./mermaid.core-bNlBBSwN.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[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],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],ne=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(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:f(function(o,h,p,u,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];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:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(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:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[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},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,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:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(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:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:re},{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:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(ne,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(ne,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[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},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(ne,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:g,56:N},{45:163,51:re},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(ne,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[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:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],u=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=u.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: -`+D.showPosition()+` -Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={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},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;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(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),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===u.length?this.yylloc.first_column:0)+u[u.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(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:f(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:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` -`+h+"^"},"showPosition"),test_match:f(function(o,h){var p,u,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),u=o[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],p=this.performAction.call(this,this.yy,this,h,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),p)return p;if(this._backtrack){for(var e in C)this[e]=C[e];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var o,h,p,u;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),e=0;eh[0].length)){if(h=p,u=e,this.options.backtrack_lexer){if(o=this.test_match(p,C[e]),o!==!1)return o;if(this._backtrack){h=!1;continue}else return!1}else if(!this.options.flex)break}return h?(o=this.test_match(h,C[u]),o!==!1?o:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var h=this.next();return h||this.lex()},"lex"),begin:f(function(h){this.conditionStack.push(h)},"begin"),popState:f(function(){var h=this.conditionStack.length-1;return h>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(h){return h=this.conditionStack.length-1-Math.abs(h||0),h>=0?this.conditionStack[h]:"INITIAL"},"topState"),pushState:f(function(h){this.begin(h)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:f(function(h,p,u,C){switch(u){case 0:return 62;case 1:return 63;case 2:return 64;case 3:return 65;case 4:break;case 5:break;case 6:return this.begin("acc_title"),33;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),35;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 8;case 14:break;case 15:return 7;case 16:return 7;case 17:return"EDGE_STATE";case 18:this.begin("callback_name");break;case 19:this.popState();break;case 20:this.popState(),this.begin("callback_args");break;case 21:return 79;case 22:this.popState();break;case 23:return 80;case 24:this.popState();break;case 25:return"STR";case 26:this.begin("string");break;case 27:return 82;case 28:return 57;case 29:return this.begin("namespace"),42;case 30:return this.popState(),8;case 31:break;case 32:return this.begin("namespace-body"),39;case 33:this.popState(),this.less(0);break;case 34:return this.popState(),41;case 35:return"EOF_IN_STRUCT";case 36:return 8;case 37:break;case 38:return"EDGE_STATE";case 39:return this.begin("class"),48;case 40:return this.popState(),8;case 41:break;case 42:return this.popState(),this.popState(),41;case 43:return this.begin("class-body"),39;case 44:return this.popState(),41;case 45:return"EOF_IN_STRUCT";case 46:return"EDGE_STATE";case 47:return"OPEN_IN_STRUCT";case 48:break;case 49:return"MEMBER";case 50:return 83;case 51:return 75;case 52:return 76;case 53:return 78;case 54:return 54;case 55:return 56;case 56:return 46;case 57:return 47;case 58:return 81;case 59:this.popState();break;case 60:return"GENERICTYPE";case 61:this.begin("generic");break;case 62:this.popState();break;case 63:return"BQUOTE_STR";case 64:this.begin("bqstring");break;case 65:return 77;case 66:return 77;case 67:return 77;case 68:return 77;case 69:return 69;case 70:return 69;case 71:return 71;case 72:return 71;case 73:return 70;case 74:return 68;case 75:return 72;case 76:return 73;case 77:return 74;case 78:return 22;case 79:return 44;case 80:return 100;case 81:return 18;case 82:return"PLUS";case 83:return 87;case 84:return 61;case 85:return 89;case 86:return 89;case 87:return 90;case 88:return"EQUALS";case 89:return"EQUALS";case 90:return 60;case 91:return 12;case 92:return 14;case 93:return"PUNCTUATION";case 94:return 86;case 95:return 102;case 96:return 50;case 97:return 50;case 98:return 9}},"anonymous"),rules:[/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:\[\*\])/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:["])/,/^(?:[^"]*)/,/^(?:["])/,/^(?:style\b)/,/^(?:classDef\b)/,/^(?:namespace\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[{])/,/^(?:[}])/,/^(?:[}])/,/^(?:$)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:\[\*\])/,/^(?:class\b)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:[}])/,/^(?:[{])/,/^(?:[}])/,/^(?:$)/,/^(?:\[\*\])/,/^(?:[{])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:href\b)/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:~)/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:[`])/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?::)/,/^(?:,)/,/^(?:#)/,/^(?:#)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:\[)/,/^(?:\])/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:\s)/,/^(?:$)/],conditions:{"namespace-body":{rules:[26,29,34,35,36,37,38,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},namespace:{rules:[26,29,30,31,32,33,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},"class-body":{rules:[26,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},class:{rules:[26,40,41,42,43,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_descr:{rules:[9,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},acc_title:{rules:[7,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_args:{rules:[22,23,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},callback_name:{rules:[19,20,21,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},href:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},struct:{rules:[26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},generic:{rules:[26,50,51,52,53,54,55,56,57,58,59,60,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},bqstring:{rules:[26,50,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},string:{rules:[24,25,26,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,87,88,89,90,91,92,93,94,95,96,98],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,39,50,51,52,53,54,55,56,57,58,61,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98],inclusive:!0}}};return O})();Se.lexer=He;function le(){this.yy={}}return f(le,"Parser"),le.prototype=Se,Se.Parser=le,new le})();we.parser=we;var Bt=we,je=["#","+","~","-",""],Xe=class{static{f(this,"ClassMember")}constructor(t,i){this.memberType=i,this.visibility="",this.classifier="",this.text="";const a=gt(t,F());this.parseMember(a)}getDisplayDetails(){let t=this.visibility+G(this.id);this.memberType==="method"&&(t+=`(${G(this.parameters.trim())})`,this.returnType&&(t+=" : "+G(this.returnType))),t=t.trim();const i=this.parseClassifier();return{displayText:t,cssStyle:i}}parseMember(t){let i="";if(this.memberType==="method"){const n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t);if(n){const c=n[1]?n[1].trim():"";if(je.includes(c)&&(this.visibility=c),this.id=n[2],this.parameters=n[3]?n[3].trim():"",i=n[4]?n[4].trim():"",this.returnType=n[5]?n[5].trim():"",i===""){const l=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(l)&&(i=l,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{const r=t.length,n=t.substring(0,1),c=t.substring(r-1);je.includes(n)&&(this.visibility=n),/[$*]/.exec(c)&&(i=c),this.id=t.substring(this.visibility===""?0:1,i===""?r:r-1)}this.classifier=i,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();const a=`${this.visibility?"\\"+this.visibility:""}${G(this.id)}${this.memberType==="method"?`(${G(this.parameters)})${this.returnType?" : "+G(this.returnType):""}`:""}`;this.text=a.replaceAll("<","<").replaceAll(">",">"),this.text.startsWith("\\<")&&(this.text=this.text.replace("\\<","~"))}parseClassifier(){switch(this.classifier){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}}},pe="classId-",qe=0,P=f(t=>I.sanitizeText(t,F()),"sanitizeText"),_t=class Ve{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=new Map,this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=f(i=>{const a=st();de(i).select("svg").selectAll("g").filter(function(){return de(this).attr("title")!==null}).on("mouseover",c=>{const l=de(c.currentTarget),d=l.attr("title");if(!d)return;const m=c.currentTarget.getBoundingClientRect();a.transition().duration(200).style("opacity",".9"),a.html(ut.sanitize(d)).style("left",`${window.scrollX+m.left+m.width/2}px`).style("top",`${window.scrollY+m.bottom+4}px`),l.classed("hover",!0)}).on("mouseout",c=>{a.transition().duration(500).style("opacity",0),de(c.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=lt,this.getAccTitle=ct,this.setAccDescription=ot,this.getAccDescription=ht,this.setDiagramTitle=dt,this.getDiagramTitle=pt,this.getConfig=f(()=>F().class,"getConfig"),this.functions.push(this.setupToolTips.bind(this)),this.clear(),this.addRelation=this.addRelation.bind(this),this.addClassesToNamespace=this.addClassesToNamespace.bind(this),this.addNamespace=this.addNamespace.bind(this),this.popNamespace=this.popNamespace.bind(this),this.setCssClass=this.setCssClass.bind(this),this.addMembers=this.addMembers.bind(this),this.addClass=this.addClass.bind(this),this.setClassLabel=this.setClassLabel.bind(this),this.addAnnotation=this.addAnnotation.bind(this),this.addMember=this.addMember.bind(this),this.cleanupLabel=this.cleanupLabel.bind(this),this.addNote=this.addNote.bind(this),this.defineClass=this.defineClass.bind(this),this.setDirection=this.setDirection.bind(this),this.setLink=this.setLink.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.clear=this.clear.bind(this),this.setTooltip=this.setTooltip.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setCssStyle=this.setCssStyle.bind(this)}static{f(this,"ClassDB")}splitClassNameAndType(i){const a=I.sanitizeText(i,F());let r="",n=a;if(a.indexOf("~")>0){const c=a.split("~");n=P(c[0]),r=P(c[1])}return{className:n,type:r}}setClassLabel(i,a){const r=I.sanitizeText(i,F());a&&(a=P(a));const{className:n}=this.splitClassNameAndType(r);this.classes.get(n).label=a,this.classes.get(n).text=`${a}${this.classes.get(n).type?`<${this.classes.get(n).type}>`:""}`}addClass(i){const a=I.sanitizeText(i,F()),{className:r,type:n}=this.splitClassNameAndType(a);if(this.classes.has(r))return;const c=I.sanitizeText(r,F());this.classes.set(c,{id:c,type:n,label:c,text:`${c}${n?`<${n}>`:""}`,shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:pe+c+"-"+qe}),qe++}addInterface(i,a){const r={id:`interface${this.interfaces.length}`,label:i,classId:a};this.interfaces.push(r)}setDiagramId(i){this.diagramId=i}lookUpDomId(i){const a=I.sanitizeText(i,F());if(this.classes.has(a)){const r=this.classes.get(a).domId;return this.diagramId?`${this.diagramId}-${r}`:r}throw new Error("Class not found: "+a)}clear(){this.relations=[],this.classes=new Map,this.notes=new Map,this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.namespaceStack=[],this.diagramId="",this.direction="TB",At()}getClass(i){return this.classes.get(i)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(i){const a=typeof i=="number"?`note${i}`:i;return this.notes.get(a)}getNotes(){return this.notes}addRelation(i){Ie.debug("Adding relation: "+JSON.stringify(i));const a=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];i.relation.type1===this.relationType.LOLLIPOP&&!a.includes(i.relation.type2)?(this.addClass(i.id2),this.addInterface(i.id1,i.id2),i.id1=`interface${this.interfaces.length-1}`):i.relation.type2===this.relationType.LOLLIPOP&&!a.includes(i.relation.type1)?(this.addClass(i.id1),this.addInterface(i.id2,i.id1),i.id2=`interface${this.interfaces.length-1}`):(this.addClass(i.id1),this.addClass(i.id2)),i.id1=this.splitClassNameAndType(i.id1).className,i.id2=this.splitClassNameAndType(i.id2).className,i.relationTitle1=I.sanitizeText(i.relationTitle1.trim(),F()),i.relationTitle2=I.sanitizeText(i.relationTitle2.trim(),F()),this.relations.push(i)}addAnnotation(i,a){const r=this.splitClassNameAndType(i).className;this.classes.get(r).annotations.push(a)}addMember(i,a){this.addClass(i);const r=this.splitClassNameAndType(i).className,n=this.classes.get(r);if(typeof a=="string"){const c=a.trim();c.startsWith("<<")&&c.endsWith(">>")?n.annotations.push(P(c.substring(2,c.length-2))):c.indexOf(")")>0?n.methods.push(new Xe(c,"method")):c&&n.members.push(new Xe(c,"attribute"))}}addMembers(i,a){Array.isArray(a)&&(a.reverse(),a.forEach(r=>this.addMember(i,r)))}addNote(i,a){const r=this.notes.size,n={id:`note${r}`,class:a,text:i,index:r};return this.notes.set(n.id,n),n.id}cleanupLabel(i){return i.startsWith(":")&&(i=i.substring(1)),P(i.trim())}setCssClass(i,a){i.split(",").forEach(r=>{let n=r;/\d/.exec(r[0])&&(n=pe+n);const c=this.classes.get(n);c&&(c.cssClasses+=" "+a)})}defineClass(i,a){for(const r of i){let n=this.styleClasses.get(r);n===void 0&&(n={id:r,styles:[],textStyles:[]},this.styleClasses.set(r,n)),a&&a.forEach(c=>{if(/color/.exec(c)){const l=c.replace("fill","bgFill");n.textStyles.push(l)}n.styles.push(c)}),this.classes.forEach(c=>{c.cssClasses.includes(r)&&c.styles.push(...a.flatMap(l=>l.split(",")))})}}setTooltip(i,a){i.split(",").forEach(r=>{a!==void 0&&(this.classes.get(r).tooltip=P(a))})}getTooltip(i,a){return a&&this.namespaces.has(a)?this.namespaces.get(a).classes.get(i).tooltip:this.classes.get(i).tooltip}setLink(i,a,r){const n=F();i.split(",").forEach(c=>{let l=c;/\d/.exec(c[0])&&(l=pe+l);const d=this.classes.get(l);d&&(d.link=Oe.formatUrl(a,n),n.securityLevel==="sandbox"?d.linkTarget="_top":typeof r=="string"?d.linkTarget=P(r):d.linkTarget="_blank")}),this.setCssClass(i,"clickable")}setClickEvent(i,a,r){i.split(",").forEach(n=>{this.setClickFunc(n,a,r),this.classes.get(n).haveCallback=!0}),this.setCssClass(i,"clickable")}setClickFunc(i,a,r){const n=I.sanitizeText(i,F());if(F().securityLevel!=="loose"||a===void 0)return;const l=n;if(this.classes.has(l)){let d=[];if(typeof r=="string"){d=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let m=0;m{const m=this.lookUpDomId(l),g=document.querySelector(`[id="${m}"]`);g!==null&&g.addEventListener("click",()=>{Oe.runFunc(a,...d)},!1)})}}bindFunctions(i){this.functions.forEach(a=>{a(i)})}escapeHtml(i){return i.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}getDirection(){return this.direction}setDirection(i){this.direction=i}static resolveQualifiedId(i,a){const r=a.at(-1);return r?`${r}.${i}`:i}static getAncestorIds(i){const a=i.split("."),r=new Array(a.length);r[0]=a[0];for(let n=1;n0?c[l-1]:void 0,g=l===c.length-1,N=g&&a?a:n[l];this.namespaces.has(d)?g&&(this.namespaces.get(d).explicit=!0):this.namespaces.set(d,this.createNamespaceNode(d,N,m,g)),m&&this.linkParentChild(m,d)}return r}popNamespace(){this.namespaceStack.pop()}getNamespace(i){return this.namespaces.get(i)}getNamespaces(){return this.namespaces}addClassesToNamespace(i,a,r){if(this.namespaces.has(i)){for(const n of a){const{className:c}=this.splitClassNameAndType(n),l=this.getClass(c);l.parent=i,this.namespaces.get(i).classes.set(c,l)}for(const n of r){const c=this.getNote(n);c.parent=i,this.namespaces.get(i).notes.set(n,c)}}}setCssStyle(i,a){const r=this.classes.get(i);if(!(!a||!r))for(const n of a)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(i){let a;switch(i){case 0:a="aggregation";break;case 1:a="extension";break;case 2:a="composition";break;case 3:a="dependency";break;case 4:a="lollipop";break;default:a="none"}return a}resolveExplicitAncestor(i){let a=i;for(;a;){const r=this.namespaces.get(a);if(!r)return;if(r.explicit)return a;a=r.parent}}getData(){const i=[],a=[],r=F(),n=r.class?.hierarchicalNamespaces??!0;for(const l of this.namespaces.values()){if(!n&&!l.explicit)continue;const d={id:l.id,label:n?l.label:l.id,isGroup:!0,padding:r.class.padding??16,shape:"rect",cssStyles:[],look:r.look,parentId:n?l.parent:void 0};i.push(d)}for(const l of this.classes.values()){const d=n?l.parent:this.resolveExplicitAncestor(l.parent),m={...l,type:void 0,isGroup:!1,parentId:d,look:r.look};i.push(m)}for(const l of this.notes.values()){const d=n?l.parent:this.resolveExplicitAncestor(l.parent),m={id:l.id,label:l.text,isGroup:!1,shape:"note",padding:r.class.padding??6,cssStyles:["text-align: left","white-space: nowrap",`fill: ${r.themeVariables.noteBkgColor}`,`stroke: ${r.themeVariables.noteBorderColor}`],look:r.look,parentId:d,labelType:"markdown"};i.push(m);const g=this.classes.get(l.class)?.id;if(g){const N={id:`edgeNote${l.index}`,start:l.id,end:g,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:r.look};a.push(N)}}for(const l of this.interfaces){const d={id:l.id,label:l.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:r.look};i.push(d)}let c=0;for(const l of this.relations){c++;const d={id:ft(l.id1,l.id2,{prefix:"id",counter:c}),start:l.id1,end:l.id2,type:"normal",label:l.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(l.relation.type1),arrowTypeEnd:this.getArrowMarker(l.relation.type2),startLabelRight:l.relationTitle1==="none"?"":l.relationTitle1,endLabelLeft:l.relationTitle2==="none"?"":l.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:l.style||"",pattern:l.relation.lineType==1?"dashed":"solid",look:r.look,labelType:"markdown"};a.push(d)}return{nodes:i,edges:a,other:{},config:r,direction:this.getDirection()}}},mt=f(t=>`g.classGroup text { - fill: ${t.nodeBorder||t.classText}; - stroke: none; - font-family: ${t.fontFamily}; - font-size: 10px; - - .title { - font-weight: bolder; - } - -} - - .cluster-label text { - fill: ${t.titleColor}; - } - .cluster-label span { - color: ${t.titleColor}; - } - .cluster-label span p { - background-color: transparent; - } - - .cluster rect { - fill: ${t.clusterBkg}; - stroke: ${t.clusterBorder}; - stroke-width: 1px; - } - - .cluster text { - fill: ${t.titleColor}; - } - - .cluster span { - color: ${t.titleColor}; - } - -.nodeLabel, .edgeLabel { - color: ${t.classText}; -} - -.noteLabel .nodeLabel, .noteLabel .edgeLabel { - color: ${t.noteTextColor}; -} -.edgeLabel .label rect { - fill: ${t.mainBkg}; -} -.label text { - fill: ${t.classText}; -} - -.labelBkg { - background: ${t.mainBkg}; -} -.edgeLabel .label span { - background: ${t.mainBkg}; -} - -.classTitle { - font-weight: bolder; -} -.node rect, - .node circle, - .node ellipse, - .node polygon, - .node path { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; - stroke-width: ${t.strokeWidth}; - } - - -.divider { - stroke: ${t.nodeBorder}; - stroke-width: 1; -} - -g.clickable { - cursor: pointer; -} - -g.classGroup rect { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; -} - -g.classGroup line { - stroke: ${t.nodeBorder}; - stroke-width: 1; -} - -.classLabel .box { - stroke: none; - stroke-width: 0; - fill: ${t.mainBkg}; - opacity: 0.5; -} - -.classLabel .label { - fill: ${t.nodeBorder}; - font-size: 10px; -} - -.relation { - stroke: ${t.lineColor}; - stroke-width: ${t.strokeWidth}; - fill: none; -} - -.dashed-line{ - stroke-dasharray: 3; -} - -.dotted-line{ - stroke-dasharray: 1 2; -} - -[id$="-compositionStart"], .composition { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-compositionEnd"], .composition { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-dependencyStart"], .dependency { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-dependencyEnd"], .dependency { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-extensionStart"], .extension { - fill: transparent !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-extensionEnd"], .extension { - fill: transparent !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-aggregationStart"], .aggregation { - fill: transparent !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-aggregationEnd"], .aggregation { - fill: transparent !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-lollipopStart"], .lollipop { - fill: ${t.mainBkg} !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -[id$="-lollipopEnd"], .lollipop { - fill: ${t.mainBkg} !important; - stroke: ${t.lineColor} !important; - stroke-width: 1; -} - -.edgeTerminals { - font-size: 11px; - line-height: initial; -} - -.classTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${t.textColor}; -} - -.edgeLabel[data-look="neo"] { - background-color: ${t.edgeLabelBackground}; - p { - background-color: ${t.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${t.edgeLabelBackground}; - fill: ${t.edgeLabelBackground}; - } - text-align: center; -} - ${tt()} -`,"getStyles"),St=mt,Ct=f((t,i="TB")=>{if(!t.doc)return i;let a=i;for(const r of t.doc)r.stmt==="dir"&&(a=r.value);return a},"getDir"),bt=f(function(t,i){return i.db.getClasses()},"getClasses"),kt=f(async function(t,i,a,r){Ie.info("REF0:"),Ie.info("Drawing class diagram (v3)",i);const{securityLevel:n,state:c,layout:l}=F();r.db.setDiagramId(i);const d=r.db.getData(),m=it(i,n);d.type=r.type,d.layoutAlgorithm=rt(l),d.nodeSpacing=c?.nodeSpacing||50,d.rankSpacing=c?.rankSpacing||50,d.markers=["aggregation","extension","composition","dependency","lollipop"],d.diagramId=i,await nt(d,m);const g=8;Oe.insertTitle(m,"classDiagramTitleText",c?.titleTopMargin??25,r.db.getDiagramTitle()),at(m,g,"classDiagram",c?.useMaxWidth??!0)},"draw"),Nt={getClasses:bt,draw:kt,getDir:Ct};export{_t as C,Bt as a,Nt as c,St as s}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CnzKhSUz.js b/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-DsCy4rDg.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CnzKhSUz.js rename to apps/pythinker-code/dist-web/assets/chunk-727SXJPM-DsCy4rDg.js index 2d34e84d1..df13b5a4b 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-CnzKhSUz.js +++ b/apps/pythinker-code/dist-web/assets/chunk-727SXJPM-DsCy4rDg.js @@ -1,4 +1,4 @@ -import{g as tt}from"./chunk-FMBD7UC4-B_DrLljO.js";import{c as st}from"./chunk-ND2GUHAM-B0b4a7yH.js";import{g as it}from"./chunk-55IACEB6-BuzvVrQ6.js";import{s as at}from"./chunk-2J33WTMH-DtergGMb.js";import{_ as f,l as Ie,c as F,p as rt,r as nt,u as Oe,d as de,z as ut,b as lt,a as ct,s as ot,g as ht,q as dt,t as pt,k as I,A as At,y as ft,i as gt,a8 as G}from"./mermaid.core-Br9os_fu.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[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],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],ne=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(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:f(function(o,h,p,u,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];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:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(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:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[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},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,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:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(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:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:re},{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:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(ne,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(ne,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[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},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(ne,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:g,56:N},{45:163,51:re},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(ne,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[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:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],u=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=u.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: +import{g as tt}from"./chunk-FMBD7UC4-D1EnXzDm.js";import{c as st}from"./chunk-ND2GUHAM-x8mUbci6.js";import{g as it}from"./chunk-55IACEB6-ht0xpR4D.js";import{s as at}from"./chunk-2J33WTMH-S-pjhbXt.js";import{_ as f,l as Ie,c as F,p as rt,r as nt,u as Oe,d as de,z as ut,b as lt,a as ct,s as ot,g as ht,q as dt,t as pt,k as I,A as At,y as ft,i as gt,a8 as G}from"./mermaid.core-D9FOqe1y.js";var we=(function(){var t=f(function(O,o,h,p){for(h=h||{},p=O.length;p--;h[O[p]]=o);return h},"o"),i=[1,18],a=[1,19],r=[1,20],n=[1,41],c=[1,26],l=[1,42],d=[1,24],m=[1,25],g=[1,32],N=[1,33],Ae=[1,34],b=[1,45],fe=[1,35],ge=[1,36],me=[1,37],Ce=[1,38],be=[1,27],ke=[1,28],Ee=[1,29],Te=[1,30],ye=[1,31],k=[1,44],E=[1,46],T=[1,43],y=[1,47],De=[1,9],A=[1,8,9],Z=[1,58],$=[1,59],ee=[1,60],te=[1,61],se=[1,62],Fe=[1,63],Be=[1,64],_=[1,8,9,41],Pe=[1,77],M=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],ie=[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],ae=[13,60,86,100,102,103],U=[13,60,73,74,86,100,102,103],Me=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],z=[1,121],Y=[1,117],K=[1,113],W=[1,119],Q=[1,114],j=[1,115],X=[1,116],q=[1,118],H=[1,120],Re=[22,50,60,61,82,86,87,88,89,90],Ge=[1,128],ne=[12,39],_e=[1,8,9,39,41,44,46],ue=[1,8,9,22],Ue=[1,153],ze=[1,8,9,61],x=[1,8,9,22,50,60,61,82,86,87,88,89,90],Se={trace:f(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:f(function(o,h,p,u,C,e,J){var s=e.length-1;switch(C){case 8:this.$=e[s-1];break;case 9:case 10:case 13:case 15:this.$=e[s];break;case 11:case 14:this.$=e[s-2]+"."+e[s];break;case 12:case 16:this.$=e[s-1]+e[s];break;case 17:case 18:this.$=e[s-1]+"~"+e[s]+"~";break;case 19:u.addRelation(e[s]);break;case 20:e[s-1].title=u.cleanupLabel(e[s]),u.addRelation(e[s-1]);break;case 31:this.$=e[s].trim(),u.setAccTitle(this.$);break;case 32:case 33:this.$=e[s].trim(),u.setAccDescription(this.$);break;case 34:u.addClassesToNamespace(e[s-3],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 35:u.addClassesToNamespace(e[s-4],e[s-1][0],e[s-1][1]),u.popNamespace();break;case 36:this.$=u.addNamespace(e[s]);break;case 37:this.$=u.addNamespace(e[s-1],e[s]);break;case 38:this.$=[[e[s]],[]];break;case 39:this.$=[[e[s-1]],[]];break;case 40:e[s][0].unshift(e[s-2]),this.$=e[s];break;case 41:this.$=[[],[e[s]]];break;case 42:this.$=[[],[e[s-1]]];break;case 43:e[s][1].unshift(e[s-2]),this.$=e[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=e[s];break;case 48:u.setCssClass(e[s-2],e[s]);break;case 49:u.addMembers(e[s-3],e[s-1]);break;case 51:u.setCssClass(e[s-5],e[s-3]),u.addMembers(e[s-5],e[s-1]);break;case 52:u.addAnnotation(e[s-3],e[s-1]);break;case 53:u.addAnnotation(e[s-6],e[s-4]),u.addMembers(e[s-6],e[s-1]);break;case 54:u.addAnnotation(e[s-5],e[s-3]);break;case 55:this.$=e[s],u.addClass(e[s]);break;case 56:this.$=e[s-1],u.addClass(e[s-1]),u.setClassLabel(e[s-1],e[s]);break;case 60:u.addAnnotation(e[s],e[s-2]);break;case 61:case 74:this.$=[e[s]];break;case 62:e[s].push(e[s-1]),this.$=e[s];break;case 63:break;case 64:u.addMember(e[s-1],u.cleanupLabel(e[s]));break;case 65:break;case 66:break;case 67:this.$={id1:e[s-2],id2:e[s],relation:e[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 68:this.$={id1:e[s-3],id2:e[s],relation:e[s-1],relationTitle1:e[s-2],relationTitle2:"none"};break;case 69:this.$={id1:e[s-3],id2:e[s],relation:e[s-2],relationTitle1:"none",relationTitle2:e[s-1]};break;case 70:this.$={id1:e[s-4],id2:e[s],relation:e[s-2],relationTitle1:e[s-3],relationTitle2:e[s-1]};break;case 71:this.$=u.addNote(e[s],e[s-1]);break;case 72:this.$=u.addNote(e[s]);break;case 73:this.$=e[s-2],u.defineClass(e[s-1],e[s]);break;case 75:this.$=e[s-2].concat([e[s]]);break;case 76:u.setDirection("TB");break;case 77:u.setDirection("BT");break;case 78:u.setDirection("RL");break;case 79:u.setDirection("LR");break;case 80:this.$={type1:e[s-2],type2:e[s],lineType:e[s-1]};break;case 81:this.$={type1:"none",type2:e[s],lineType:e[s-1]};break;case 82:this.$={type1:e[s-1],type2:"none",lineType:e[s]};break;case 83:this.$={type1:"none",type2:"none",lineType:e[s]};break;case 84:this.$=u.relationType.AGGREGATION;break;case 85:this.$=u.relationType.EXTENSION;break;case 86:this.$=u.relationType.COMPOSITION;break;case 87:this.$=u.relationType.DEPENDENCY;break;case 88:this.$=u.relationType.LOLLIPOP;break;case 89:this.$=u.lineType.LINE;break;case 90:this.$=u.lineType.DOTTED_LINE;break;case 91:case 97:this.$=e[s-2],u.setClickEvent(e[s-1],e[s]);break;case 92:case 98:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 93:this.$=e[s-2],u.setLink(e[s-1],e[s]);break;case 94:this.$=e[s-3],u.setLink(e[s-2],e[s-1],e[s]);break;case 95:this.$=e[s-3],u.setLink(e[s-2],e[s-1]),u.setTooltip(e[s-2],e[s]);break;case 96:this.$=e[s-4],u.setLink(e[s-3],e[s-2],e[s]),u.setTooltip(e[s-3],e[s-1]);break;case 99:this.$=e[s-3],u.setClickEvent(e[s-2],e[s-1],e[s]);break;case 100:this.$=e[s-4],u.setClickEvent(e[s-3],e[s-2],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 101:this.$=e[s-3],u.setLink(e[s-2],e[s]);break;case 102:this.$=e[s-4],u.setLink(e[s-3],e[s-1],e[s]);break;case 103:this.$=e[s-4],u.setLink(e[s-3],e[s-1]),u.setTooltip(e[s-3],e[s]);break;case 104:this.$=e[s-5],u.setLink(e[s-4],e[s-2],e[s]),u.setTooltip(e[s-4],e[s-1]);break;case 105:this.$=e[s-2],u.setCssStyle(e[s-1],e[s]);break;case 106:u.setCssClass(e[s-1],e[s]);break;case 107:this.$=[e[s]];break;case 108:e[s-2].push(e[s]),this.$=e[s-2];break;case 110:this.$=e[s-1]+e[s];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:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(De,[2,5],{8:[1,48]}),{8:[1,49]},t(A,[2,19],{22:[1,50]}),t(A,[2,21]),t(A,[2,22]),t(A,[2,23]),t(A,[2,24]),t(A,[2,25]),t(A,[2,26]),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),{34:[1,51]},{36:[1,52]},t(A,[2,33]),t(A,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be}),{39:[1,65]},t(_,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),t(A,[2,65]),t(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:Pe,55:76},{58:78,60:[1,79]},t(A,[2,76]),t(A,[2,77]),t(A,[2,78]),t(A,[2,79]),t(M,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:b,86:k,100:E,102:T,103:y}),t(M,[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},t(ie,[2,133]),t(ie,[2,134]),t(ie,[2,135]),t(ie,[2,136]),t([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),t(De,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:i,35:a,37:r,42:n,46:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,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:c,48:l,51:d,52:m,54:g,56:N,57:Ae,60:b,62:fe,63:ge,64:me,65:Ce,75:be,76:ke,78:Ee,82:Te,83:ye,86:k,100:E,102:T,103:y},t(A,[2,20]),t(A,[2,31]),t(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:Z,69:$,70:ee,71:te,72:se,73:Fe,74:Be},t(A,[2,64]),{67:93,73:Fe,74:Be},t(ae,[2,83],{66:94,68:Z,69:$,70:ee,71:te,72:se}),t(U,[2,84]),t(U,[2,85]),t(U,[2,86]),t(U,[2,87]),t(U,[2,88]),t(Me,[2,89]),t(Me,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:n,43:23,48:l,54:g,56:N},{16:100,60:b,86:k,100:E,102:T},{41:[1,102],45:101,51:re},{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:z,50:Y,59:110,60:K,82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},{60:[1,122]},{13:Pe,55:123},t(_,[2,72]),t(_,[2,138]),{22:z,50:Y,59:124,60:K,61:[1,125],82:W,84:111,85:112,86:Q,87:j,88:X,89:q,90:H},t(Re,[2,74]),{16:39,17:40,19:126,60:b,86:k,100:E,102:T,103:y},t(M,[2,16]),t(M,[2,17]),t(M,[2,18]),{11:127,12:Ge,39:[2,36]},t(ne,[2,9],{16:85,17:86,15:130,18:[1,129],60:b,86:k,100:E,102:T,103:y}),t(ne,[2,10]),t(_e,[2,55],{11:131,12:Ge}),t(De,[2,7]),{9:[1,132]},t(ue,[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},t(ae,[2,82],{66:136,68:Z,69:$,70:ee,71:te,72:se}),t(ae,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:n,43:23,48:l,54:g,56:N},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},t(_,[2,48],{39:[1,142]}),{41:[1,143]},t(_,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:b,86:k,100:E,102:T,103:y},t(A,[2,91],{13:[1,147]}),t(A,[2,93],{13:[1,149],77:[1,148]}),t(A,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},t(A,[2,105],{61:Ue}),t(ze,[2,107],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(x,[2,109]),t(x,[2,111]),t(x,[2,112]),t(x,[2,113]),t(x,[2,114]),t(x,[2,115]),t(x,[2,116]),t(x,[2,117]),t(x,[2,118]),t(x,[2,119]),t(A,[2,106]),t(_,[2,71]),t(A,[2,73],{61:Ue}),{60:[1,155]},t(M,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:b,86:k,100:E,102:T,103:y},t(ne,[2,12]),t(_e,[2,56]),{1:[2,4]},t(ue,[2,69]),t(ue,[2,68]),{16:39,17:40,19:158,60:b,86:k,100:E,102:T,103:y},t(ae,[2,80]),t(_,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:n,43:23,48:l,54:g,56:N},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:n,43:23,48:l,54:g,56:N},{45:163,51:re},t(_,[2,49]),{41:[2,62]},t(_,[2,52],{39:[1,164]}),t(A,[2,60]),t(A,[2,92]),t(A,[2,94]),t(A,[2,95],{77:[1,165]}),t(A,[2,98]),t(A,[2,99],{13:[1,166]}),t(A,[2,101],{13:[1,168],77:[1,167]}),{22:z,50:Y,60:K,82:W,84:169,85:112,86:Q,87:j,88:X,89:q,90:H},t(x,[2,110]),t(Re,[2,75]),{14:[1,170]},t(ne,[2,11]),t(ue,[2,70]),t(_,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},t(A,[2,96]),t(A,[2,100]),t(A,[2,102]),t(A,[2,103],{77:[1,174]}),t(ze,[2,108],{85:154,22:z,50:Y,60:K,82:W,86:Q,87:j,88:X,89:q,90:H}),t(_e,[2,8]),t(_,[2,51]),{41:[1,175]},t(_,[2,54]),t(A,[2,104]),t(_,[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:f(function(o,h){if(h.recoverable)this.trace(o);else{var p=new Error(o);throw p.hash=h,p}},"parseError"),parse:f(function(o){var h=this,p=[0],u=[],C=[null],e=[],J=this.table,s="",ce=0,Ye=0,Je=2,Ke=1,Ze=e.slice.call(arguments,1),D=Object.create(this.lexer),w={yy:{}};for(var Ne in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Ne)&&(w.yy[Ne]=this.yy[Ne]);D.setInput(o,w.yy),w.yy.lexer=D,w.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var Le=D.yylloc;e.push(Le);var $e=D.options&&D.options.ranges;typeof w.yy.parseError=="function"?this.parseError=w.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(S){p.length=p.length-2*S,C.length=C.length-S,e.length=e.length-S}f(et,"popStack");function We(){var S;return S=u.pop()||D.lex()||Ke,typeof S!="number"&&(S instanceof Array&&(u=S,S=u.pop()),S=h.symbols_[S]||S),S}f(We,"lex");for(var B,V,L,xe,R={},oe,v,Qe,he;;){if(V=p[p.length-1],this.defaultActions[V]?L=this.defaultActions[V]:((B===null||typeof B>"u")&&(B=We()),L=J[V]&&J[V][B]),typeof L>"u"||!L.length||!L[0]){var ve="";he=[];for(oe in J[V])this.terminals_[oe]&&oe>Je&&he.push("'"+this.terminals_[oe]+"'");D.showPosition?ve="Parse error on line "+(ce+1)+`: `+D.showPosition()+` Expecting `+he.join(", ")+", got '"+(this.terminals_[B]||B)+"'":ve="Parse error on line "+(ce+1)+": Unexpected "+(B==Ke?"end of input":"'"+(this.terminals_[B]||B)+"'"),this.parseError(ve,{text:D.match,token:this.terminals_[B]||B,line:D.yylineno,loc:Le,expected:he})}if(L[0]instanceof Array&&L.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+B);switch(L[0]){case 1:p.push(B),C.push(D.yytext),e.push(D.yylloc),p.push(L[1]),B=null,Ye=D.yyleng,s=D.yytext,ce=D.yylineno,Le=D.yylloc;break;case 2:if(v=this.productions_[L[1]][1],R.$=C[C.length-v],R._$={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},$e&&(R._$.range=[e[e.length-(v||1)].range[0],e[e.length-1].range[1]]),xe=this.performAction.apply(R,[s,Ye,ce,w.yy,L[1],C,e].concat(Ze)),typeof xe<"u")return xe;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(R.$),e.push(R._$),Qe=J[p[p.length-2]][p[p.length-1]],p.push(Qe);break;case 3:return!0}}return!0},"parse")},He=(function(){var O={EOF:1,parseError:f(function(h,p){if(this.yy.parser)this.yy.parser.parseError(h,p);else throw new Error(h)},"parseError"),setInput:f(function(o,h){return this.yy=h||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={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:f(function(){var o=this._input[0];this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o;var h=o.match(/(?:\r\n?|\n).*/g);return h?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:f(function(o){var h=o.length,p=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),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===u.length?this.yylloc.first_column:0)+u[u.length-p.length].length-p[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(o){this.unput(this.match.slice(o))},"less"),pastInput:f(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:f(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:f(function(){var o=this.pastInput(),h=new Array(o.length+1).join("-");return o+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-BFM758F_.js b/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-C3Tgfrxz.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-BFM758F_.js rename to apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-C3Tgfrxz.js index 9b99580ae..5969f88e8 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-BFM758F_.js +++ b/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-C3Tgfrxz.js @@ -1,4 +1,4 @@ -import{g as Zt}from"./chunk-55IACEB6-Q15Gq5Jr.js";import{s as te}from"./chunk-2J33WTMH-BZ74n2hL.js";import{_ as f,l as _,c as w,r as ee,u as se,a as ie,b as re,g as ae,s as ne,q as oe,t as le,ab as ce,k as W,A as he}from"./mermaid.core-bNlBBSwN.js";var Dt=(function(){var t=f(function(Y,a,c,r){for(c=c||{},r=Y.length;r--;c[Y[r]]=a);return c},"o"),e=[1,2],l=[1,3],s=[1,4],u=[2,4],d=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],A=[1,20],k=[1,21],h=[1,22],x=[1,23],D=[1,24],$=[1,26],L=[1,27],P=[1,28],I=[1,29],J=[1,30],st=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],j=[1,34],p=[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],lt=[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],At=[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],yt={trace:f(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:f(function(a,c,r,y,E,i,F){var o=i.length-1;switch(E){case 3:return y.setRootDoc(i[o]),i[o];case 4:this.$=[];break;case 5:i[o]!="nl"&&(i[o-1].push(i[o]),this.$=i[o-1]);break;case 6:case 7:this.$=i[o];break;case 8:this.$="nl";break;case 12:this.$=i[o];break;case 13:const q=i[o-1];q.description=y.trimColon(i[o]),this.$=q;break;case 14:this.$={stmt:"relation",state1:i[o-2],state2:i[o]};break;case 15:const gt=y.trimColon(i[o]);this.$={stmt:"relation",state1:i[o-3],state2:i[o-1],description:gt};break;case 19:this.$={stmt:"state",id:i[o-3],type:"default",description:"",doc:i[o-1]};break;case 20:var B=i[o],H=i[o-2].trim();if(i[o].match(":")){var ht=i[o].split(":");B=ht[0],H=[H,ht[1]]}this.$={stmt:"state",id:B,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[o-3],type:"default",description:i[o-5],doc:i[o-1]};break;case 22:this.$={stmt:"state",id:i[o],type:"fork"};break;case 23:this.$={stmt:"state",id:i[o],type:"join"};break;case 24:this.$={stmt:"state",id:i[o],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[o-1].trim(),note:{position:i[o-2].trim(),text:i[o].trim()}};break;case 29:this.$=i[o].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[o].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[o-3],url:i[o-2],tooltip:i[o-1]};break;case 33:this.$={stmt:"click",id:i[o-3],url:i[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[o-1].trim(),classes:i[o].trim()};break;case 36:this.$={stmt:"style",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 37:this.$={stmt:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[o].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:l,6:s},{1:[3]},{3:5,4:e,5:l,6:s},{3:6,4:e,5:l,6:s},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],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,7]),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(p,[2,11]),t(p,[2,12],{14:[1,40],15:[1,41]}),t(p,[2,16]),{18:[1,42]},t(p,[2,18],{20:[1,43]}),{23:[1,44]},t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(p,[2,28]),{34:[1,49]},{36:[1,50]},t(p,[2,31]),{13:51,24:N,57:j},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,41]),t(p,[2,6]),t(p,[2,13]),{13:58,24:N,57:j},t(p,[2,17]),t(At,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(p,[2,29]),t(p,[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(p,[2,14],{14:[1,71]}),{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(p,[2,34]),t(p,[2,35]),t(p,[2,36]),t(p,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(p,[2,15]),t(p,[2,19]),t(At,u,{7:78}),t(p,[2,26]),t(p,[2,27]),{5:[1,79]},{5:[1,80]},{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,32]),t(p,[2,33]),t(p,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,c){if(c.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=c,r}},"parseError"),parse:f(function(a){var c=this,r=[0],y=[],E=[null],i=[],F=this.table,o="",B=0,H=0,ht=2,q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),M={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(M.yy[Tt]=this.yy[Tt]);b.setInput(a,M.yy),M.yy.lexer=b,M.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var qt=b.options&&b.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(O){r.length=r.length-2*O,E.length=E.length-O,i.length=i.length-O}f(Qt,"popStack");function xt(){var O;return O=y.pop()||b.lex()||q,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=c.symbols_[O]||O),O}f(xt,"lex");for(var C,U,R,_t,z={},ut,G,Lt,dt;;){if(U=r[r.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=xt()),R=F[U]&&F[U][C]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in F[U])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(B+1)+`: +import{g as Zt}from"./chunk-55IACEB6-ht0xpR4D.js";import{s as te}from"./chunk-2J33WTMH-S-pjhbXt.js";import{_ as f,l as _,c as w,r as ee,u as se,a as ie,b as re,g as ae,s as ne,q as oe,t as le,ab as ce,k as W,A as he}from"./mermaid.core-D9FOqe1y.js";var Dt=(function(){var t=f(function(Y,a,c,r){for(c=c||{},r=Y.length;r--;c[Y[r]]=a);return c},"o"),e=[1,2],l=[1,3],s=[1,4],u=[2,4],d=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],A=[1,20],k=[1,21],h=[1,22],x=[1,23],D=[1,24],$=[1,26],L=[1,27],P=[1,28],I=[1,29],J=[1,30],st=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],j=[1,34],p=[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],lt=[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],At=[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],yt={trace:f(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:f(function(a,c,r,y,E,i,F){var o=i.length-1;switch(E){case 3:return y.setRootDoc(i[o]),i[o];case 4:this.$=[];break;case 5:i[o]!="nl"&&(i[o-1].push(i[o]),this.$=i[o-1]);break;case 6:case 7:this.$=i[o];break;case 8:this.$="nl";break;case 12:this.$=i[o];break;case 13:const q=i[o-1];q.description=y.trimColon(i[o]),this.$=q;break;case 14:this.$={stmt:"relation",state1:i[o-2],state2:i[o]};break;case 15:const gt=y.trimColon(i[o]);this.$={stmt:"relation",state1:i[o-3],state2:i[o-1],description:gt};break;case 19:this.$={stmt:"state",id:i[o-3],type:"default",description:"",doc:i[o-1]};break;case 20:var B=i[o],H=i[o-2].trim();if(i[o].match(":")){var ht=i[o].split(":");B=ht[0],H=[H,ht[1]]}this.$={stmt:"state",id:B,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[o-3],type:"default",description:i[o-5],doc:i[o-1]};break;case 22:this.$={stmt:"state",id:i[o],type:"fork"};break;case 23:this.$={stmt:"state",id:i[o],type:"join"};break;case 24:this.$={stmt:"state",id:i[o],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[o-1].trim(),note:{position:i[o-2].trim(),text:i[o].trim()}};break;case 29:this.$=i[o].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[o].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[o-3],url:i[o-2],tooltip:i[o-1]};break;case 33:this.$={stmt:"click",id:i[o-3],url:i[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[o-1].trim(),classes:i[o].trim()};break;case 36:this.$={stmt:"style",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 37:this.$={stmt:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[o].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:l,6:s},{1:[3]},{3:5,4:e,5:l,6:s},{3:6,4:e,5:l,6:s},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],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,7]),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(p,[2,11]),t(p,[2,12],{14:[1,40],15:[1,41]}),t(p,[2,16]),{18:[1,42]},t(p,[2,18],{20:[1,43]}),{23:[1,44]},t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(p,[2,28]),{34:[1,49]},{36:[1,50]},t(p,[2,31]),{13:51,24:N,57:j},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,41]),t(p,[2,6]),t(p,[2,13]),{13:58,24:N,57:j},t(p,[2,17]),t(At,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(p,[2,29]),t(p,[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(p,[2,14],{14:[1,71]}),{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(p,[2,34]),t(p,[2,35]),t(p,[2,36]),t(p,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(p,[2,15]),t(p,[2,19]),t(At,u,{7:78}),t(p,[2,26]),t(p,[2,27]),{5:[1,79]},{5:[1,80]},{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,32]),t(p,[2,33]),t(p,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,c){if(c.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=c,r}},"parseError"),parse:f(function(a){var c=this,r=[0],y=[],E=[null],i=[],F=this.table,o="",B=0,H=0,ht=2,q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),M={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(M.yy[Tt]=this.yy[Tt]);b.setInput(a,M.yy),M.yy.lexer=b,M.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var qt=b.options&&b.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(O){r.length=r.length-2*O,E.length=E.length-O,i.length=i.length-O}f(Qt,"popStack");function xt(){var O;return O=y.pop()||b.lex()||q,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=c.symbols_[O]||O),O}f(xt,"lex");for(var C,U,R,_t,z={},ut,G,Lt,dt;;){if(U=r[r.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=xt()),R=F[U]&&F[U][C]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in F[U])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(B+1)+`: `+b.showPosition()+` Expecting `+dt.join(", ")+", got '"+(this.terminals_[C]||C)+"'":mt="Parse error on line "+(B+1)+": Unexpected "+(C==q?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[C]||C,line:b.yylineno,loc:Et,expected:dt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(R[0]){case 1:r.push(C),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),C=null,H=b.yyleng,o=b.yytext,B=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],z.$=E[E.length-G],z._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},qt&&(z._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(z,[o,H,B,M.yy,R[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[R[1]][0]),E.push(z.$),i.push(z._$),Lt=F[r[r.length-2]][r[r.length-1]],r.push(Lt);break;case 3:return!0}}return!0},"parse")},Jt=(function(){var Y={EOF:1,parseError:f(function(c,r){if(this.yy.parser)this.yy.parser.parseError(c,r);else throw new Error(c)},"parseError"),setInput:f(function(a,c){return this.yy=c||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var c=a.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var c=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;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),r.length-1&&(this.yylineno-=r.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===y.length?this.yylloc.first_column:0)+y[y.length-r.length].length-r[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),c=new Array(a.length+1).join("-");return a+this.upcomingInput()+` diff --git a/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-Wd9kV9EQ.js b/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-Wd9kV9EQ.js deleted file mode 100644 index 847f3c841..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-AQP2D5EJ-Wd9kV9EQ.js +++ /dev/null @@ -1,231 +0,0 @@ -import{g as Zt}from"./chunk-55IACEB6-BuzvVrQ6.js";import{s as te}from"./chunk-2J33WTMH-DtergGMb.js";import{_ as f,l as _,c as w,r as ee,u as se,a as ie,b as re,g as ae,s as ne,q as oe,t as le,ab as ce,k as W,A as he}from"./mermaid.core-Br9os_fu.js";var Dt=(function(){var t=f(function(Y,a,c,r){for(c=c||{},r=Y.length;r--;c[Y[r]]=a);return c},"o"),e=[1,2],l=[1,3],s=[1,4],u=[2,4],d=[1,9],S=[1,11],g=[1,16],n=[1,17],T=[1,18],m=[1,19],N=[1,33],A=[1,20],k=[1,21],h=[1,22],x=[1,23],D=[1,24],$=[1,26],L=[1,27],P=[1,28],I=[1,29],J=[1,30],st=[1,31],it=[1,32],rt=[1,35],at=[1,36],nt=[1,37],ot=[1,38],j=[1,34],p=[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],lt=[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],At=[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],yt={trace:f(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:f(function(a,c,r,y,E,i,F){var o=i.length-1;switch(E){case 3:return y.setRootDoc(i[o]),i[o];case 4:this.$=[];break;case 5:i[o]!="nl"&&(i[o-1].push(i[o]),this.$=i[o-1]);break;case 6:case 7:this.$=i[o];break;case 8:this.$="nl";break;case 12:this.$=i[o];break;case 13:const q=i[o-1];q.description=y.trimColon(i[o]),this.$=q;break;case 14:this.$={stmt:"relation",state1:i[o-2],state2:i[o]};break;case 15:const gt=y.trimColon(i[o]);this.$={stmt:"relation",state1:i[o-3],state2:i[o-1],description:gt};break;case 19:this.$={stmt:"state",id:i[o-3],type:"default",description:"",doc:i[o-1]};break;case 20:var B=i[o],H=i[o-2].trim();if(i[o].match(":")){var ht=i[o].split(":");B=ht[0],H=[H,ht[1]]}this.$={stmt:"state",id:B,type:"default",description:H};break;case 21:this.$={stmt:"state",id:i[o-3],type:"default",description:i[o-5],doc:i[o-1]};break;case 22:this.$={stmt:"state",id:i[o],type:"fork"};break;case 23:this.$={stmt:"state",id:i[o],type:"join"};break;case 24:this.$={stmt:"state",id:i[o],type:"choice"};break;case 25:this.$={stmt:"state",id:y.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:i[o-1].trim(),note:{position:i[o-2].trim(),text:i[o].trim()}};break;case 29:this.$=i[o].trim(),y.setAccTitle(this.$);break;case 30:case 31:this.$=i[o].trim(),y.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:i[o-3],url:i[o-2],tooltip:i[o-1]};break;case 33:this.$={stmt:"click",id:i[o-3],url:i[o-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:i[o-1].trim(),classes:i[o].trim()};break;case 36:this.$={stmt:"style",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 37:this.$={stmt:"applyClass",id:i[o-1].trim(),styleClass:i[o].trim()};break;case 38:y.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:y.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:y.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:y.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:i[o].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:i[o-2].trim(),classes:[i[o].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:e,5:l,6:s},{1:[3]},{3:5,4:e,5:l,6:s},{3:6,4:e,5:l,6:s},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],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:g,17:n,19:T,22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,7]),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(p,[2,11]),t(p,[2,12],{14:[1,40],15:[1,41]}),t(p,[2,16]),{18:[1,42]},t(p,[2,18],{20:[1,43]}),{23:[1,44]},t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(p,[2,28]),{34:[1,49]},{36:[1,50]},t(p,[2,31]),{13:51,24:N,57:j},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(lt,[2,44],{58:[1,56]}),t(lt,[2,45],{58:[1,57]}),t(p,[2,38]),t(p,[2,39]),t(p,[2,40]),t(p,[2,41]),t(p,[2,6]),t(p,[2,13]),{13:58,24:N,57:j},t(p,[2,17]),t(At,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(p,[2,29]),t(p,[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(p,[2,14],{14:[1,71]}),{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,72],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(p,[2,34]),t(p,[2,35]),t(p,[2,36]),t(p,[2,37]),t(lt,[2,46]),t(lt,[2,47]),t(p,[2,15]),t(p,[2,19]),t(At,u,{7:78}),t(p,[2,26]),t(p,[2,27]),{5:[1,79]},{5:[1,80]},{4:d,5:S,8:8,9:10,10:12,11:13,12:14,13:15,16:g,17:n,19:T,21:[1,81],22:m,24:N,25:A,26:k,27:h,28:x,29:D,32:25,33:$,35:L,37:P,38:I,41:J,45:st,48:it,51:rt,52:at,53:nt,54:ot,57:j},t(p,[2,32]),t(p,[2,33]),t(p,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:f(function(a,c){if(c.recoverable)this.trace(a);else{var r=new Error(a);throw r.hash=c,r}},"parseError"),parse:f(function(a){var c=this,r=[0],y=[],E=[null],i=[],F=this.table,o="",B=0,H=0,ht=2,q=1,gt=i.slice.call(arguments,1),b=Object.create(this.lexer),M={yy:{}};for(var Tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Tt)&&(M.yy[Tt]=this.yy[Tt]);b.setInput(a,M.yy),M.yy.lexer=b,M.yy.parser=this,typeof b.yylloc>"u"&&(b.yylloc={});var Et=b.yylloc;i.push(Et);var qt=b.options&&b.options.ranges;typeof M.yy.parseError=="function"?this.parseError=M.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Qt(O){r.length=r.length-2*O,E.length=E.length-O,i.length=i.length-O}f(Qt,"popStack");function xt(){var O;return O=y.pop()||b.lex()||q,typeof O!="number"&&(O instanceof Array&&(y=O,O=y.pop()),O=c.symbols_[O]||O),O}f(xt,"lex");for(var C,U,R,_t,z={},ut,G,Lt,dt;;){if(U=r[r.length-1],this.defaultActions[U]?R=this.defaultActions[U]:((C===null||typeof C>"u")&&(C=xt()),R=F[U]&&F[U][C]),typeof R>"u"||!R.length||!R[0]){var mt="";dt=[];for(ut in F[U])this.terminals_[ut]&&ut>ht&&dt.push("'"+this.terminals_[ut]+"'");b.showPosition?mt="Parse error on line "+(B+1)+`: -`+b.showPosition()+` -Expecting `+dt.join(", ")+", got '"+(this.terminals_[C]||C)+"'":mt="Parse error on line "+(B+1)+": Unexpected "+(C==q?"end of input":"'"+(this.terminals_[C]||C)+"'"),this.parseError(mt,{text:b.match,token:this.terminals_[C]||C,line:b.yylineno,loc:Et,expected:dt})}if(R[0]instanceof Array&&R.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+C);switch(R[0]){case 1:r.push(C),E.push(b.yytext),i.push(b.yylloc),r.push(R[1]),C=null,H=b.yyleng,o=b.yytext,B=b.yylineno,Et=b.yylloc;break;case 2:if(G=this.productions_[R[1]][1],z.$=E[E.length-G],z._$={first_line:i[i.length-(G||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(G||1)].first_column,last_column:i[i.length-1].last_column},qt&&(z._$.range=[i[i.length-(G||1)].range[0],i[i.length-1].range[1]]),_t=this.performAction.apply(z,[o,H,B,M.yy,R[1],E,i].concat(gt)),typeof _t<"u")return _t;G&&(r=r.slice(0,-1*G*2),E=E.slice(0,-1*G),i=i.slice(0,-1*G)),r.push(this.productions_[R[1]][0]),E.push(z.$),i.push(z._$),Lt=F[r[r.length-2]][r[r.length-1]],r.push(Lt);break;case 3:return!0}}return!0},"parse")},Jt=(function(){var Y={EOF:1,parseError:f(function(c,r){if(this.yy.parser)this.yy.parser.parseError(c,r);else throw new Error(c)},"parseError"),setInput:f(function(a,c){return this.yy=c||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:f(function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var c=a.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:f(function(a){var c=a.length,r=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;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),r.length-1&&(this.yylineno-=r.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===y.length?this.yylloc.first_column:0)+y[y.length-r.length].length-r[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:f(function(){return this._more=!0,this},"more"),reject:f(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:f(function(a){this.unput(this.match.slice(a))},"less"),pastInput:f(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:f(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:f(function(){var a=this.pastInput(),c=new Array(a.length+1).join("-");return a+this.upcomingInput()+` -`+c+"^"},"showPosition"),test_match:f(function(a,c){var r,y,E;if(this.options.backtrack_lexer&&(E={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(E.yylloc.range=this.yylloc.range.slice(0))),y=a[0].match(/(?:\r\n?|\n).*/g),y&&(this.yylineno+=y.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:y?y[y.length-1].length-y[y.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],r=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var i in E)this[i]=E[i];return!1}return!1},"test_match"),next:f(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,c,r,y;this._more||(this.yytext="",this.match="");for(var E=this._currentRules(),i=0;ic[0].length)){if(c=r,y=i,this.options.backtrack_lexer){if(a=this.test_match(r,E[i]),a!==!1)return a;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(a=this.test_match(c,E[y]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text. -`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:f(function(){var c=this.next();return c||this.lex()},"lex"),begin:f(function(c){this.conditionStack.push(c)},"begin"),popState:f(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:f(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:f(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:f(function(c){this.begin(c)},"pushState"),stateStackSize:f(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:f(function(c,r,y,E){function i(){const F=r.yytext.indexOf("%%");if(F===0)return!1;if(F>0){const o=r.yytext.slice(0,F),B=r.yytext.slice(F);B&&c.lexer.unput(B),r.yytext=o}return!0}switch(f(i,"processId"),y){case 0:return 38;case 1:return 40;case 2:return 39;case 3:return 44;case 4:return 51;case 5:return 52;case 6:return 53;case 7:return 54;case 8:return 5;case 9:break;case 10:break;case 11:break;case 12:break;case 13:return this.pushState("SCALE"),17;case 14:return 18;case 15:this.popState();break;case 16:return this.begin("acc_title"),33;case 17:return this.popState(),"acc_title_value";case 18:return this.begin("acc_descr"),35;case 19:return this.popState(),"acc_descr_value";case 20:this.begin("acc_descr_multiline");break;case 21:this.popState();break;case 22:return"acc_descr_multiline_value";case 23:return this.pushState("CLASSDEF"),41;case 24:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 25:return this.popState(),this.pushState("CLASSDEFID"),42;case 26:return this.popState(),43;case 27:return this.pushState("CLASS"),48;case 28:return this.popState(),this.pushState("CLASS_STYLE"),49;case 29:return this.popState(),50;case 30:return this.pushState("STYLE"),45;case 31:return this.popState(),this.pushState("STYLEDEF_STYLES"),46;case 32:return this.popState(),47;case 33:return this.pushState("SCALE"),17;case 34:return 18;case 35:this.popState();break;case 36:this.pushState("STATE");break;case 37:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),r.yytext=r.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),r.yytext=r.yytext.slice(0,-10).trim(),27;case 43:return 51;case 44:return 52;case 45:return 53;case 46:return 54;case 47:this.pushState("STATE_STRING");break;case 48:return this.pushState("STATE_ID"),"AS";case 49:return i()?(this.popState(),"ID"):void 0;case 50:this.popState();break;case 51:return"STATE_DESCR";case 52:return 19;case 53:this.popState();break;case 54:return this.popState(),this.pushState("struct"),20;case 55:return this.popState(),21;case 56:break;case 57:return this.begin("NOTE"),29;case 58:return this.popState(),this.pushState("NOTE_ID"),59;case 59:return this.popState(),this.pushState("NOTE_ID"),60;case 60:this.popState(),this.pushState("FLOATING_NOTE");break;case 61:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 62:break;case 63:return"NOTE_TEXT";case 64:return i()?(this.popState(),"ID"):void 0;case 65:return i()?(this.popState(),this.pushState("NOTE_TEXT"),24):void 0;case 66:return this.popState(),r.yytext=r.yytext.substr(2).trim(),31;case 67:return this.popState(),r.yytext=r.yytext.slice(0,-8).trim(),31;case 68:return 6;case 69:return 6;case 70:return 16;case 71:return 57;case 72:return i()?24:void 0;case 73:return r.yytext=r.yytext.trim(),14;case 74:return 15;case 75:return 28;case 76:return 58;case 77:return 5;case 78:return"INVALID"}},"anonymous"),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*<>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,55,56,57,71,72,73,74,75,76],inclusive:!1},FLOATING_NOTE_ID:{rules:[64],inclusive:!1},FLOATING_NOTE:{rules:[61,62,63],inclusive:!1},NOTE_TEXT:{rules:[66,67],inclusive:!1},NOTE_ID:{rules:[65],inclusive:!1},NOTE:{rules:[58,59,60],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,54,57,68,69,70,71,72,73,74,76,77,78],inclusive:!0}}};return Y})();yt.lexer=Jt;function ct(){this.yy={}}return f(ct,"Parser"),ct.prototype=yt,yt.Parser=ct,new ct})();Dt.parser=Dt;var Ge=Dt,ue="TB",Ft="TB",It="dir",X="state",K="root",vt="relation",de="classDef",fe="style",pe="applyClass",tt="default",Bt="divider",Gt="fill:none",Yt="fill: #333",Vt="c",Mt="markdown",Ut="normal",bt="rect",kt="rectWithTitle",Se="stateStart",ye="stateEnd",Ot="divider",Nt="roundedWithTitle",ge="note",Te="noteGroup",et="statediagram",Ee="state",_e=`${et}-${Ee}`,Wt="transition",me="note",be="note-edge",ke=`${Wt} ${be}`,De=`${et}-${me}`,ve="cluster",Ce=`${et}-${ve}`,Ae="cluster-alt",xe=`${et}-${Ae}`,jt="parent",Ht="note",Le="state",Ct="----",Ie=`${Ct}${Ht}`,Rt=`${Ct}${jt}`,zt=f((t,e=Ft)=>{if(!t.doc)return e;let l=e;for(const s of t.doc)s.stmt==="dir"&&(l=s.value);return l},"getDir"),Oe=f(function(t,e){return e.db.getClasses()},"getClasses"),Ne=f(async function(t,e,l,s){_.info("REF0:"),_.info("Drawing state diagram (v2)",e);const{securityLevel:u,state:d,layout:S}=w();s.db.extract(s.db.getRootDocV2());const g=s.db.getData(),n=Zt(e,u);g.type=s.type,g.layoutAlgorithm=S,g.nodeSpacing=d?.nodeSpacing||50,g.rankSpacing=d?.rankSpacing||50,w().look==="neo"?g.markers=["barbNeo"]:g.markers=["barb"],g.diagramId=e,await ee(g,n);const m=8;try{(typeof s.db.getLinks=="function"?s.db.getLinks():new Map).forEach((A,k)=>{const h=typeof k=="string"?k:typeof k?.id=="string"?k.id:"";if(!h){_.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(k));return}const x=n.node()?.querySelectorAll("g");let D;if(x?.forEach(I=>{I.textContent?.trim()===h&&(D=I)}),!D){_.warn("⚠️ Could not find node matching text:",h);return}const $=D.parentNode;if(!$){_.warn("⚠️ Node has no parent, cannot wrap:",h);return}const L=document.createElementNS("http://www.w3.org/2000/svg","a"),P=A.url.replace(/^"+|"+$/g,"");if(L.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",P),L.setAttribute("target","_blank"),A.tooltip){const I=A.tooltip.replace(/^"+|"+$/g,"");L.setAttribute("title",I)}$.replaceChild(L,D),L.appendChild(D),_.info("🔗 Wrapped node in tag for:",h,A.url)})}catch(N){_.error("❌ Error injecting clickable links:",N)}se.insertTitle(n,"statediagramTitleText",d?.titleTopMargin??25,s.db.getDiagramTitle()),te(n,m,et,d?.useMaxWidth??!0)},"draw"),Ye={getClasses:Oe,draw:Ne,getDir:zt},pt=new Map,V=0;function St(t="",e=0,l="",s=Ct){const u=l!==null&&l.length>0?`${s}${l}`:"";return`${Le}-${t}${u}-${e}`}f(St,"stateDomId");var Re=f((t,e,l,s,u,d,S,g)=>{_.trace("items",e),e.forEach(n=>{switch(n.stmt){case X:Z(t,n,l,s,u,d,S,g);break;case tt:Z(t,n,l,s,u,d,S,g);break;case vt:{Z(t,n.state1,l,s,u,d,S,g),Z(t,n.state2,l,s,u,d,S,g);const T=S==="neo",m={id:"edge"+V,start:n.state1.id,end:n.state2.id,arrowhead:"normal",arrowTypeEnd:T?"arrow_barb_neo":"arrow_barb",style:Gt,labelStyle:"",label:W.sanitizeText(n.description??"",w()),arrowheadStyle:Yt,labelpos:Vt,labelType:Mt,thickness:Ut,classes:Wt,look:S};u.push(m),V++}break}})},"setupDoc"),wt=f((t,e=Ft)=>{let l=e;if(t.doc)for(const s of t.doc)s.stmt==="dir"&&(l=s.value);return l},"getDir");function Q(t,e,l){if(!e.id||e.id===""||e.id==="")return;e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(u=>{const d=l.get(u);d&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...d.styles])}));const s=t.find(u=>u.id===e.id);s?Object.assign(s,e):t.push(e)}f(Q,"insertOrUpdateNode");function Kt(t){return t?.classes?.join(" ")??""}f(Kt,"getClassesFromDbInfo");function Xt(t){return t?.styles??[]}f(Xt,"getStylesFromDbInfo");var Z=f((t,e,l,s,u,d,S,g)=>{const n=e.id,T=l.get(n),m=Kt(T),N=Xt(T),A=w();if(_.info("dataFetcher parsedItem",e,T,N),n!=="root"){let k=bt;e.start===!0?k=Se:e.start===!1&&(k=ye),e.type!==tt&&(k=e.type),pt.get(n)||pt.set(n,{id:n,shape:k,description:W.sanitizeText(n,A),cssClasses:`${m} ${_e}`,cssStyles:N});const h=pt.get(n);e.description&&(Array.isArray(h.description)?(h.shape=kt,h.description.push(e.description)):h.description?.length&&h.description.length>0?(h.shape=kt,h.description===n?h.description=[e.description]:h.description=[h.description,e.description]):(h.shape=bt,h.description=e.description),h.description=W.sanitizeTextOrArray(h.description,A)),h.description?.length===1&&h.shape===kt&&(h.type==="group"?h.shape=Nt:h.shape=bt),!h.type&&e.doc&&(_.info("Setting cluster for XCX",n,wt(e)),h.type="group",h.isGroup=!0,h.dir=wt(e),h.shape=e.type===Bt?Ot:Nt,h.cssClasses=`${h.cssClasses} ${Ce} ${d?xe:""}`);const x={labelStyle:"",shape:h.shape,label:h.description,cssClasses:h.cssClasses,cssCompiledStyles:[],cssStyles:h.cssStyles,id:n,dir:h.dir,domId:St(n,V),type:h.type,isGroup:h.type==="group",padding:8,rx:10,ry:10,look:S,labelType:"markdown"};if(x.shape===Ot&&(x.label=""),t&&t.id!=="root"&&(_.trace("Setting node ",n," to be child of its parent ",t.id),x.parentId=t.id),x.centerLabel=!0,e.note){const D={labelStyle:"",shape:ge,label:e.note.text,labelType:"markdown",cssClasses:De,cssStyles:[],cssCompiledStyles:[],id:n+Ie+"-"+V,domId:St(n,V,Ht),type:h.type,isGroup:h.type==="group",padding:A.flowchart?.padding,look:S,position:e.note.position},$=n+Rt,L={labelStyle:"",shape:Te,label:e.note.text,cssClasses:h.cssClasses,cssStyles:[],id:n+Rt,domId:St(n,V,jt),type:"group",isGroup:!0,padding:16,look:S,position:e.note.position};V++,L.id=$,D.parentId=$,Q(s,L,g),Q(s,D,g),Q(s,x,g);let P=n,I=D.id;e.note.position==="left of"&&(P=D.id,I=n),u.push({id:P+"-"+I,start:P,end:I,arrowhead:"none",arrowTypeEnd:"",style:Gt,labelStyle:"",classes:ke,arrowheadStyle:Yt,labelpos:Vt,labelType:Mt,thickness:Ut,look:S})}else Q(s,x,g)}e.doc&&(_.trace("Adding nodes children "),Re(e,e.doc,l,s,u,!d,S,g))},"dataFetcher"),we=f(()=>{pt.clear(),V=0},"reset"),v={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},$t=f(()=>new Map,"newClassesList"),Pt=f(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),ft=f(t=>JSON.parse(JSON.stringify(t)),"clone"),Ve=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=$t(),this.documents={root:Pt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=ie,this.setAccTitle=re,this.getAccDescription=ae,this.setAccDescription=ne,this.setDiagramTitle=oe,this.getDiagramTitle=le,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this)}static{f(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(const s of Array.isArray(t)?t:t.doc)switch(s.stmt){case X:this.addState(s.id.trim(),s.type,s.doc,s.description,s.note);break;case vt:this.addRelation(s.state1,s.state2,s.description);break;case de:this.addStyleClass(s.id.trim(),s.classes);break;case fe:this.handleStyleDef(s);break;case pe:this.setCssClass(s.id.trim(),s.styleClass);break;case"click":this.addLink(s.id,s.url,s.tooltip);break}const e=this.getStates(),l=w();we(),Z(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,l.look,this.classes);for(const s of this.nodes)if(Array.isArray(s.label)){if(s.description=s.label.slice(1),s.isGroup&&s.description.length>0)throw new Error(`Group nodes can only have label. Remove the additional description for node [${s.id}]`);s.label=s.label[0]}}handleStyleDef(t){const e=t.id.trim().split(","),l=t.styleClass.split(",");for(const s of e){let u=this.getState(s);if(!u){const d=s.trim();this.addState(d),u=this.getState(d)}u&&(u.styles=l.map(d=>d.replace(/;/g,"")?.trim()))}}setRootDoc(t){_.info("Setting root doc",t),this.rootDoc=t,this.version===1?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(t,e,l){if(e.stmt===vt){this.docTranslator(t,e.state1,!0),this.docTranslator(t,e.state2,!1);return}if(e.stmt===X&&(e.id===v.START_NODE?(e.id=t.id+(l?"_start":"_end"),e.start=l):e.id=e.id.trim()),e.stmt!==K&&e.stmt!==X||!e.doc)return;const s=[];let u=[];for(const d of e.doc)if(d.type===Bt){const S=ft(d);S.doc=ft(u),s.push(S),u=[]}else u.push(d);if(s.length>0&&u.length>0){const d={stmt:X,id:ce(),type:"divider",doc:ft(u)};s.push(ft(d)),e.doc=s}e.doc.forEach(d=>this.docTranslator(e,d,!0))}getRootDocV2(){return this.docTranslator({id:K,stmt:K},{id:K,stmt:K,doc:this.rootDoc},!0),{id:K,doc:this.rootDoc}}addState(t,e=tt,l=void 0,s=void 0,u=void 0,d=void 0,S=void 0,g=void 0){const n=t?.trim();if(!this.currentDocument.states.has(n))_.info("Adding state ",n,s),this.currentDocument.states.set(n,{stmt:X,id:n,descriptions:[],type:e,doc:l,note:u,classes:[],styles:[],textStyles:[]});else{const T=this.currentDocument.states.get(n);if(!T)throw new Error(`State not found: ${n}`);T.doc||(T.doc=l),T.type||(T.type=e)}if(s&&(_.info("Setting state description",n,s),(Array.isArray(s)?s:[s]).forEach(m=>this.addDescription(n,m.trim()))),u){const T=this.currentDocument.states.get(n);if(!T)throw new Error(`State not found: ${n}`);T.note=u,T.note.text=W.sanitizeText(T.note.text,w())}d&&(_.info("Setting state classes",n,d),(Array.isArray(d)?d:[d]).forEach(m=>this.setCssClass(n,m.trim()))),S&&(_.info("Setting state styles",n,S),(Array.isArray(S)?S:[S]).forEach(m=>this.setStyle(n,m.trim()))),g&&(_.info("Setting state styles",n,S),(Array.isArray(g)?g:[g]).forEach(m=>this.setTextStyle(n,m.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Pt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=$t(),t||(this.links=new Map,he())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){_.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,l){this.links.set(t,{url:e,tooltip:l}),_.warn("Adding link",t,e,l)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===v.START_NODE?(this.startEndCount++,`${v.START_TYPE}${this.startEndCount}`):t}startTypeIfNeeded(t="",e=tt){return t===v.START_NODE?v.START_TYPE:e}endIdIfNeeded(t=""){return t===v.END_NODE?(this.startEndCount++,`${v.END_TYPE}${this.startEndCount}`):t}endTypeIfNeeded(t="",e=tt){return t===v.END_NODE?v.END_TYPE:e}addRelationObjs(t,e,l=""){const s=this.startIdIfNeeded(t.id.trim()),u=this.startTypeIfNeeded(t.id.trim(),t.type),d=this.startIdIfNeeded(e.id.trim()),S=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(s,u,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(d,S,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:s,id2:d,relationTitle:W.sanitizeText(l,w())})}addRelation(t,e,l){if(typeof t=="object"&&typeof e=="object")this.addRelationObjs(t,e,l);else if(typeof t=="string"&&typeof e=="string"){const s=this.startIdIfNeeded(t.trim()),u=this.startTypeIfNeeded(t),d=this.endIdIfNeeded(e.trim()),S=this.endTypeIfNeeded(e);this.addState(s,u),this.addState(d,S),this.currentDocument.relations.push({id1:s,id2:d,relationTitle:l?W.sanitizeText(l,w()):void 0})}}addDescription(t,e){const l=this.currentDocument.states.get(t),s=e.startsWith(":")?e.replace(":","").trim():e;l?.descriptions?.push(W.sanitizeText(s,w()))}cleanupLabel(t){return t.startsWith(":")?t.slice(2).trim():t.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});const l=this.classes.get(t);e&&l&&e.split(v.STYLECLASS_SEP).forEach(s=>{const u=s.replace(/([^;]*);/,"$1").trim();if(RegExp(v.COLOR_KEYWORD).exec(s)){const S=u.replace(v.FILL_KEYWORD,v.BG_FILL).replace(v.COLOR_KEYWORD,v.FILL_KEYWORD);l.textStyles.push(S)}l.styles.push(u)})}getClasses(){return this.classes}setCssClass(t,e){t.split(",").forEach(l=>{let s=this.getState(l);if(!s){const u=l.trim();this.addState(u),s=this.getState(u)}s?.classes?.push(e)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===It)}getDirection(){return this.getDirectionStatement()?.value??ue}setDirection(t){const e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:It,value:t})}trimColon(t){return t.startsWith(":")?t.slice(1).trim():t.trim()}getData(){const t=w();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:zt(this.getRootDocV2())}}getConfig(){return w().state}},$e=f(t=>` -defs [id$="-barbEnd"] { - fill: ${t.transitionColor}; - stroke: ${t.transitionColor}; - } -g.stateGroup text { - fill: ${t.nodeBorder}; - stroke: none; - font-size: 10px; -} -g.stateGroup text { - fill: ${t.textColor}; - stroke: none; - font-size: 10px; - -} -g.stateGroup .state-title { - font-weight: bolder; - fill: ${t.stateLabelColor}; -} - -g.stateGroup rect { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; -} - -g.stateGroup line { - stroke: ${t.lineColor}; - stroke-width: ${t.strokeWidth||1}; -} - -.transition { - stroke: ${t.transitionColor}; - stroke-width: ${t.strokeWidth||1}; - fill: none; -} - -.stateGroup .composit { - fill: ${t.background}; - border-bottom: 1px -} - -.stateGroup .alt-composit { - fill: #e0e0e0; - border-bottom: 1px -} - -.state-note { - stroke: ${t.noteBorderColor}; - fill: ${t.noteBkgColor}; - - text { - fill: ${t.noteTextColor}; - stroke: none; - font-size: 10px; - } -} - -.stateLabel .box { - stroke: none; - stroke-width: 0; - fill: ${t.mainBkg}; - opacity: 0.5; -} - -.edgeLabel .label rect { - fill: ${t.labelBackgroundColor}; - opacity: 0.5; -} -.edgeLabel { - background-color: ${t.edgeLabelBackground}; - p { - background-color: ${t.edgeLabelBackground}; - } - rect { - opacity: 0.5; - background-color: ${t.edgeLabelBackground}; - fill: ${t.edgeLabelBackground}; - } - text-align: center; -} -.edgeLabel .label text { - fill: ${t.transitionLabelColor||t.tertiaryTextColor}; -} -.label div .edgeLabel { - color: ${t.transitionLabelColor||t.tertiaryTextColor}; -} - -.stateLabel text { - fill: ${t.stateLabelColor}; - font-size: 10px; - font-weight: bold; -} - -.node circle.state-start { - fill: ${t.specialStateColor}; - stroke: ${t.specialStateColor}; -} - -.node .fork-join { - fill: ${t.specialStateColor}; - stroke: ${t.specialStateColor}; -} - -.node circle.state-end { - fill: ${t.innerEndBackground}; - stroke: ${t.background}; - stroke-width: 1.5 -} -.end-state-inner { - fill: ${t.compositeBackground||t.background}; - // stroke: ${t.background}; - stroke-width: 1.5 -} - -.node rect { - fill: ${t.stateBkg||t.mainBkg}; - stroke: ${t.stateBorder||t.nodeBorder}; - stroke-width: ${t.strokeWidth||1}px; -} -.node polygon { - fill: ${t.mainBkg}; - stroke: ${t.stateBorder||t.nodeBorder};; - stroke-width: ${t.strokeWidth||1}px; -} -[id$="-barbEnd"] { - fill: ${t.lineColor}; -} - -.statediagram-cluster rect { - fill: ${t.compositeTitleBackground}; - stroke: ${t.stateBorder||t.nodeBorder}; - stroke-width: ${t.strokeWidth||1}px; -} - -.cluster-label, .nodeLabel { - color: ${t.stateLabelColor}; - // line-height: 1; -} - -.statediagram-cluster rect.outer { - rx: 5px; - ry: 5px; -} -.statediagram-state .divider { - stroke: ${t.stateBorder||t.nodeBorder}; -} - -.statediagram-state .title-state { - rx: 5px; - ry: 5px; -} -.statediagram-cluster.statediagram-cluster .inner { - fill: ${t.compositeBackground||t.background}; -} -.statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${t.altBackground?t.altBackground:"#efefef"}; -} - -.statediagram-cluster .inner { - rx:0; - ry:0; -} - -.statediagram-state rect.basic { - rx: 5px; - ry: 5px; -} -.statediagram-state rect.divider { - stroke-dasharray: 10,10; - fill: ${t.altBackground?t.altBackground:"#efefef"}; -} - -.note-edge { - stroke-dasharray: 5; -} - -.statediagram-note rect { - fill: ${t.noteBkgColor}; - stroke: ${t.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} -.statediagram-note rect { - fill: ${t.noteBkgColor}; - stroke: ${t.noteBorderColor}; - stroke-width: 1px; - rx: 0; - ry: 0; -} - -.statediagram-note text { - fill: ${t.noteTextColor}; -} - -.statediagram-note .nodeLabel { - color: ${t.noteTextColor}; -} -.statediagram .edgeLabel { - color: red; // ${t.noteTextColor}; -} - -[id$="-dependencyStart"], [id$="-dependencyEnd"] { - fill: ${t.lineColor}; - stroke: ${t.lineColor}; - stroke-width: ${t.strokeWidth||1}; -} - -.statediagramTitleText { - text-anchor: middle; - font-size: 18px; - fill: ${t.textColor}; -} - -[data-look="neo"].statediagram-cluster rect { - fill: ${t.mainBkg}; - stroke: ${t.useGradient?"url("+t.svgId+"-gradient)":t.stateBorder||t.nodeBorder}; - stroke-width: ${t.strokeWidth??1}; -} -[data-look="neo"].statediagram-cluster rect.outer { - rx: ${t.radius}px; - ry: ${t.radius}px; - filter: ${t.dropShadow?t.dropShadow.replace("url(#drop-shadow)",`url(${t.svgId}-drop-shadow)`):"none"} -} -`,"getStyles"),Me=$e;export{Ve as S,Ge as a,Ye as b,Me as s}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-B_DrLljO.js b/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-D1EnXzDm.js similarity index 83% rename from apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-B_DrLljO.js rename to apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-D1EnXzDm.js index 375284e49..70aaf6105 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-B_DrLljO.js +++ b/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-D1EnXzDm.js @@ -1,4 +1,4 @@ -import{_ as e}from"./mermaid.core-Br9os_fu.js";var l=e(()=>` +import{_ as e}from"./mermaid.core-D9FOqe1y.js";var l=e(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; diff --git a/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-DwQl0sgV.js b/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-DwQl0sgV.js deleted file mode 100644 index 5ab40f04d..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-FMBD7UC4-DwQl0sgV.js +++ /dev/null @@ -1,15 +0,0 @@ -import{_ as e}from"./mermaid.core-bNlBBSwN.js";var l=e(()=>` - /* Font Awesome icon styling - consolidated */ - .label-icon { - display: inline-block; - height: 1em; - overflow: visible; - vertical-align: -0.125em; - } - - .node .label-icon path { - fill: currentColor; - stroke: revert; - stroke-width: revert; - } -`,"getIconStyles");export{l as g}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-CyIE0WAw.js b/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-CyIE0WAw.js deleted file mode 100644 index 00fa88577..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-CyIE0WAw.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-bNlBBSwN.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 s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=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"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.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"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=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{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-B0b4a7yH.js b/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-x8mUbci6.js similarity index 96% rename from apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-B0b4a7yH.js rename to apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-x8mUbci6.js index 746ba5003..e2d9a27a3 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-B0b4a7yH.js +++ b/apps/pythinker-code/dist-web/assets/chunk-ND2GUHAM-x8mUbci6.js @@ -1 +1 @@ -import{_ as i,d as l,n as d,j as o}from"./mermaid.core-Br9os_fu.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 s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=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"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.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"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=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{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h}; +import{_ as i,d as l,n as d,j as o}from"./mermaid.core-D9FOqe1y.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 s in t.attrs)e.attr(s,t.attrs[s]);return t.class&&e.attr("class",t.class),e},"drawRect"),p=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"),y=i((r,t)=>{const e=t.text.replace(d," "),s=r.append("text");s.attr("x",t.x),s.attr("y",t.y),s.attr("class","legend"),s.style("text-anchor",t.anchor),t.class&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.text(e),s},"drawText"),m=i((r,t,e,s)=>{const a=r.append("image");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.attr("xlink:href",n)},"drawImage"),g=i((r,t,e,s)=>{const a=r.append("use");a.attr("x",t),a.attr("y",e);const n=o.sanitizeUrl(s);a.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"),f=i(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),w=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{p as a,f as b,w as c,x as d,g as e,m as f,h as g,y as h}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-CFNj3DLL.js b/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-BShxGBXq.js similarity index 67% rename from apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-CFNj3DLL.js rename to apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-BShxGBXq.js index 4b0d6c6f2..446b93db9 100644 --- a/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-CFNj3DLL.js +++ b/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-BShxGBXq.js @@ -1 +1 @@ -import{_ as i}from"./mermaid.core-bNlBBSwN.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; +import{_ as i}from"./mermaid.core-D9FOqe1y.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; diff --git a/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-SK1ytu-J.js b/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-SK1ytu-J.js deleted file mode 100644 index d4b1d6e21..000000000 --- a/apps/pythinker-code/dist-web/assets/chunk-QZHKN3VN-SK1ytu-J.js +++ /dev/null @@ -1 +0,0 @@ -import{_ as i}from"./mermaid.core-Br9os_fu.js";var r=class{constructor(t){this.init=t,this.records=this.init()}static{i(this,"ImperativeState")}reset(){this.records=this.init()}};export{r as I}; diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-DAYxyfHr.js b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-DAYxyfHr.js deleted file mode 100644 index a59b802cb..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-DAYxyfHr.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CqN4oca1.js";import{_ as i}from"./mermaid.core-bNlBBSwN.js";import"./chunk-FMBD7UC4-DwQl0sgV.js";import"./chunk-ND2GUHAM-CyIE0WAw.js";import"./chunk-55IACEB6-Q15Gq5Jr.js";import"./chunk-2J33WTMH-BZ74n2hL.js";import"./index-DIfcwXP7.js";var n={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{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-D_k3Y-Z5.js b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-D_k3Y-Z5.js new file mode 100644 index 000000000..b9715616d --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-D_k3Y-Z5.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-DsCy4rDg.js";import{_ as i}from"./mermaid.core-D9FOqe1y.js";import"./chunk-FMBD7UC4-D1EnXzDm.js";import"./chunk-ND2GUHAM-x8mUbci6.js";import"./chunk-55IACEB6-ht0xpR4D.js";import"./chunk-2J33WTMH-S-pjhbXt.js";import"./index-CP4VUG5A.js";var n={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{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js b/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js deleted file mode 100644 index 62f52b954..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-4FO5ZUOK-cqr_AkFZ.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CnzKhSUz.js";import{_ as i}from"./mermaid.core-Br9os_fu.js";import"./chunk-FMBD7UC4-B_DrLljO.js";import"./chunk-ND2GUHAM-B0b4a7yH.js";import"./chunk-55IACEB6-BuzvVrQ6.js";import"./chunk-2J33WTMH-DtergGMb.js";import"./index-DIKFd2HX.js";var n={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{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-DAYxyfHr.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-DAYxyfHr.js deleted file mode 100644 index a59b802cb..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-DAYxyfHr.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CqN4oca1.js";import{_ as i}from"./mermaid.core-bNlBBSwN.js";import"./chunk-FMBD7UC4-DwQl0sgV.js";import"./chunk-ND2GUHAM-CyIE0WAw.js";import"./chunk-55IACEB6-Q15Gq5Jr.js";import"./chunk-2J33WTMH-BZ74n2hL.js";import"./index-DIfcwXP7.js";var n={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{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-D_k3Y-Z5.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-D_k3Y-Z5.js new file mode 100644 index 000000000..b9715616d --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-D_k3Y-Z5.js @@ -0,0 +1 @@ +import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-DsCy4rDg.js";import{_ as i}from"./mermaid.core-D9FOqe1y.js";import"./chunk-FMBD7UC4-D1EnXzDm.js";import"./chunk-ND2GUHAM-x8mUbci6.js";import"./chunk-55IACEB6-ht0xpR4D.js";import"./chunk-2J33WTMH-S-pjhbXt.js";import"./index-CP4VUG5A.js";var n={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{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js b/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js deleted file mode 100644 index 62f52b954..000000000 --- a/apps/pythinker-code/dist-web/assets/classDiagram-v2-Q7XG4LA2-cqr_AkFZ.js +++ /dev/null @@ -1 +0,0 @@ -import{s as a,c as s,a as e,C as t}from"./chunk-727SXJPM-CnzKhSUz.js";import{_ as i}from"./mermaid.core-Br9os_fu.js";import"./chunk-FMBD7UC4-B_DrLljO.js";import"./chunk-ND2GUHAM-B0b4a7yH.js";import"./chunk-55IACEB6-BuzvVrQ6.js";import"./chunk-2J33WTMH-DtergGMb.js";import"./index-DIKFd2HX.js";var n={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{n as diagram}; diff --git a/apps/pythinker-code/dist-web/assets/clojure-Dnu-v4kV.js b/apps/pythinker-code/dist-web/assets/clojure-Dnu-v4kV.js new file mode 100644 index 000000000..42330e442 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/clojure-Dnu-v4kV.js @@ -0,0 +1 @@ +const e={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},t={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}};export{e as conf,t as language}; diff --git a/apps/pythinker-code/dist-web/assets/codicon-ngg6Pgfi.ttf b/apps/pythinker-code/dist-web/assets/codicon-ngg6Pgfi.ttf new file mode 100644 index 000000000..82acfd5de Binary files /dev/null and b/apps/pythinker-code/dist-web/assets/codicon-ngg6Pgfi.ttf differ diff --git a/apps/pythinker-code/dist-web/assets/coffee-Bd8akH9Z.js b/apps/pythinker-code/dist-web/assets/coffee-Bd8akH9Z.js new file mode 100644 index 000000000..841b5afd6 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/coffee-Bd8akH9Z.js @@ -0,0 +1 @@ +const e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},t={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=>h&&(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,L){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,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(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 T=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:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},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,T=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,T,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?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,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,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=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,L){var o,e=L(1);function t(i){o=L(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]=E,!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,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,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]=E,M=!0)),R&&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)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*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+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/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,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},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,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){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,L){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),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=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(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){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,L){var o=L(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,L){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(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>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,L){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(E){return f.has(E)});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,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){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(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,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=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].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,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.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 E=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,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,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,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.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 C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;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 R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},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})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);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(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),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(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),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=tt({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 L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={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)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.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 Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,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 T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.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 T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.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 L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&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,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; diff --git a/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-C4dXj3jJ.js b/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-HZbchPqe.js similarity index 99% rename from apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-C4dXj3jJ.js rename to apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-HZbchPqe.js index cc28c385f..97046fa4c 100644 --- a/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-C4dXj3jJ.js +++ b/apps/pythinker-code/dist-web/assets/cose-bilkent-S5V4N54A-HZbchPqe.js @@ -1 +1 @@ -import{b4 as lt,_ as V,l as $,d as gt}from"./mermaid.core-Br9os_fu.js";import{c as tt}from"./cytoscape.esm-nFXppDBa.js";import"./index-DIKFd2HX.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(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,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){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,L){var o=L(2),e=L(8),t=L(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,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(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,L){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,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(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 T=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:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},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,T=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,T,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?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,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,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=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,L){var o,e=L(1);function t(i){o=L(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]=E,!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,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,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]=E,M=!0)),R&&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)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*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+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/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,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},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,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){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,L){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),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=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(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){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,L){var o=L(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,L){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(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>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,L){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(E){return f.has(E)});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,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){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(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,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=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].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,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.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 E=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,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,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,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.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 C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;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 R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},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})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);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(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),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(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),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=tt({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 L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={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)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.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 Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,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 T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.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 T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.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 L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&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,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; +import{b4 as lt,_ as V,l as $,d as gt}from"./mermaid.core-D9FOqe1y.js";import{c as tt}from"./cytoscape.esm-nFXppDBa.js";import"./index-CP4VUG5A.js";var k={exports:{}},Z={exports:{}},Q={exports:{}},ut=Q.exports,j;function ft(){return j||(j=1,(function(G,b){(function(I,L){G.exports=L()})(ut,function(){return(function(N){var I={};function L(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,L),e.l=!0,e.exports}return L.m=N,L.c=I,L.i=function(o){return o},L.d=function(o,e,t){L.o(o,e)||Object.defineProperty(o,e,{configurable:!1,enumerable:!0,get:t})},L.n=function(o){var e=o&&o.__esModule?function(){return o.default}:function(){return o};return L.d(e,"a",e),e},L.o=function(o,e){return Object.prototype.hasOwnProperty.call(o,e)},L.p="",L(L.s=26)})([(function(N,I,L){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,L){var o=L(2),e=L(8),t=L(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,L){function o(e){this.vGraphObject=e}N.exports=o}),(function(N,I,L){var o=L(2),e=L(10),t=L(13),i=L(0),l=L(16),g=L(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,L){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,L){var o=L(2),e=L(10),t=L(0),i=L(6),l=L(3),g=L(1),n=L(13),d=L(12),r=L(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 T=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:(T.source=v,T.target=D,T.isInterGraph=!1,this.getEdges().push(T),v.edges.push(T),D!=v&&D.edges.push(T),T)}},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,T=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,T,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?T=y[0].getParent().paddingLeft:T=this.margin,this.left=v-T,this.top=p-T,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,T=-e.MAX_VALUE,y,O,s,f,c,E=this.nodes,A=E.length,m=0;my&&(v=y),Ds&&(u=s),Ty&&(v=y),Ds&&(u=s),T=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,L){var o,e=L(1);function t(i){o=L(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]=E,!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,R=!0):(l[0]=p,l[1]=a,R=!0):S===w&&(g>d?(l[0]=h,l[1]=a,R=!0):(l[0]=u,l[1]=D,R=!0)),-Y===w?d>g?(l[2]=c,l[3]=E,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]=E,M=!0)),R&&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)),!R)switch(x){case 1:P=a,U=g+-y/w,l[0]=U,l[1]=P;break;case 2:U=u,P=n+T*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+-T*w,l[0]=U,l[1]=P;break}if(!M)switch(F){case 1:X=s,_=d+-C/w,l[2]=_,l[3]=X;break;case 2:_=A,X=r+m*w,l[2]=_,l[3]=X;break;case 3:X=E,_=d+C/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,T=void 0,y=void 0,O=void 0,s=void 0,f=void 0,c=void 0,E=void 0,A=void 0;return y=h-d,s=n-r,c=r*d-n*h,O=D-p,f=a-v,E=v*p-a*D,A=y*f-O*s,A===0?null:(u=(s*E-f*c)/A,T=(O*c-y*E)/A,new o(u,T))},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,L){function o(){}o.MAX_VALUE=2147483647,o.MIN_VALUE=-2147483648,N.exports=o}),(function(N,I,L){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,L){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),T.add(f);for(var c=f.getEdges(),u=0;u-1&&s.splice(C,1)}T=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(E,1);var A=O.getNeighborsList();A.forEach(function(R){if(v.indexOf(R)<0){var M=D.get(R),S=M-1;S==1&&f.push(R),D.set(R,S)}})}v=v.concat(f),(p.length==1||p.length==2)&&(u=!0,T=p[0])}return T},h.prototype.setGraphManager=function(a){this.graphManager=a},N.exports=h}),(function(N,I,L){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,L){var o=L(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,L){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(),T;if(this.useFRGridVariant)for(this.totalIterations%t.GRID_CALCULATION_CHECK_PERIOD==1&&r&&this.updateGrid(),T=new Set,a=0;ay||T>y)&&(r.gravitationForceX=-this.gravityConstant*v,r.gravitationForceY=-this.gravityConstant*D)):(y=h.getEstimatedSize()*this.compoundGravityRangeFactor,(u>y||T>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,L){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(E){return f.has(E)});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,E=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(c,E),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var s=this.graphManager.getAllNodes(),f={},c=0;c1){var R;for(R=0;RE&&(E=Math.floor(C.y)),m=Math.floor(C.x+n.DEFAULT_COMPONENT_SEPERATION)}this.transform(new a(r.WORLD_CENTER_X-C.x/2,r.WORLD_CENTER_Y-C.y/2))},y.radialLayout=function(s,f,c){var E=Math.max(this.maxDiagonalInTree(s),n.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(f,null,0,359,0,E);var A=u.calculateBounds(s),m=new T;m.setDeviceOrgX(A.getMinX()),m.setDeviceOrgY(A.getMinY()),m.setWorldOrgX(c.x),m.setWorldOrgY(c.y);for(var C=0;C1;){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(E-c)/x,B=P;F!=x;B=++B%U){var K=w[B].getOtherEnd(s);if(K!=f){var q=(c+F*W)%360,ht=(q+W)%360;y.branchRadialLayout(K,s,q,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=[],E=this.graphManager.getAllNodes(),A=0;A"u"&&(f[R]=[]),f[R]=f[R].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,E=f.paddingLeft,A=f.paddingTop;this.adjustLocations(this.tiledMemberPack[c],f.rect.x,f.rect.y,E,A)}},y.prototype.repopulateZeroDegreeMembers=function(){var s=this,f=this.tiledZeroDegreePack;Object.keys(f).forEach(function(c){var E=s.idToDummyNode[c],A=E.paddingLeft,m=E.paddingTop;s.adjustLocations(f[c],E.rect.x,E.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 E=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,E=0;EM&&(M=Y.rect.height)}c+=M+s.verticalPadding}},y.prototype.tileCompoundMembers=function(s,f){var c=this;this.tiledMemberPack=[],Object.keys(s).forEach(function(E){var A=f[E];c.tiledMemberPack[E]=c.tileNodes(s[E],A.paddingLeft+A.paddingRight),A.rect.width=c.tiledMemberPack[E].width,A.rect.height=c.tiledMemberPack[E].height})},y.prototype.tileNodes=function(s,f){var c=n.TILING_PADDING_VERTICAL,E=n.TILING_PADDING_HORIZONTAL,A={rows:[],rowWidth:[],rowHeight:[],width:0,height:f,verticalPadding:c,horizontalPadding:E};s.sort(function(R,M){return R.rect.width*R.rect.height>M.rect.width*M.rect.height?-1:R.rect.width*R.rect.height0&&(C+=s.horizontalPadding),s.rowWidth[c]=C,s.width0&&(R+=s.verticalPadding);var M=0;R>s.rowHeight[c]&&(M=s.rowHeight[c],s.rowHeight[c]=R,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,E=0;Ec&&(f=E,c=s.rowWidth[E]);return f},y.prototype.canAddHorizontal=function(s,f,c){var E=this.getShortestRowIndex(s);if(E<0)return!0;var A=s.rowWidth[E];if(A+s.horizontalPadding+f<=s.width)return!0;var m=0;s.rowHeight[E]0&&(m=c+s.verticalPadding-s.rowHeight[E]);var C;s.width-A>=f+s.horizontalPadding?C=(s.height+m)/(A+f+s.horizontalPadding):C=(s.height+m)/s.width,m=c+s.verticalPadding;var R;return s.widthm&&f!=c){E.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 C=Number.MIN_VALUE,R=0;RC&&(C=E[R].height);f>0&&(C+=s.verticalPadding);var M=s.rowHeight[f]+s.rowHeight[c];s.rowHeight[f]=C,s.rowHeight[c]0)for(var F=A;F<=m;F++)x[0]+=this.grid[F][C-1].length+this.grid[F][C].length-1;if(m0)for(var F=C;F<=R;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 R;R=T.getGraphManager().add(T.newGraph(),c),this.processChildrenList(R,f,T)}}},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})])})})(k)),k.exports}var yt=vt();const Et=lt(yt);tt.use(Et);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(L=>{["id","label","height","width","padding","x","y"].includes(L)||(I[L]=N[L])}),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(L=>{["id","start","end"].includes(L)||(I[L]=N[L])}),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=tt({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 L={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};I.layout(L).run(),I.ready(o=>{$.info("Cytoscape ready",o),b(I)})})}V(it,"createCytoscapeInstance");function nt(G){return G.nodes().map(b=>{const N=b.data(),I=b.position(),L={id:N.id,x:I.x,y:I.y};return Object.keys(N).forEach(o=>{o!=="id"&&(L[o]=N[o])}),L})}V(nt,"extractPositionedNodes");function ot(G){return G.edges().map(b=>{const N=b.data(),I=b._private.rscratch,L={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)||(L[o]=N[o])}),L})}V(ot,"extractPositionedEdges");async function st(G,b){$.debug("Starting cose-bilkent layout algorithm");try{at(G);const N=await it(G),I=nt(N),L=ot(N);return $.debug(`Layout completed: ${I.length} nodes, ${L.length} edges`),{nodes:I,edges:L}}catch(N){throw $.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 Lt=V(async(G,b,{insertCluster:N,insertEdge:I,insertEdgeLabel:L,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 T={...u};n[u.id]=T,g[u.id]=T,await N(r,u)}else{const T={...u};g[u.id]=T;const y=await e(p,u,{config:G.config,dir:G.direction||"TB"}),O=y.node().getBBox();T.width=O.width,T.height=O.height,T.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 T=g[u.id];return{...u,width:T.width,height:T.height}})},D=await st(v,G.config);t.debug("Positioning nodes based on layout results"),D.nodes.forEach(u=>{const T=g[u.id];T?.domId&&(T.domId.attr("transform",`translate(${u.x}, ${u.y})`),T.x=u.x,T.y=u.y,t.debug(`Positioned node ${T.id} at center (${u.x}, ${u.y})`))}),D.edges.forEach(u=>{const T=G.edges.find(y=>y.id===u.id);T&&(T.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 L(a,u);const T=g[u.start??""],y=g[u.end??""];if(T&&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,T,y,G.diagramId);i(s,f)}else{const s={...u,points:[{x:T.x||0,y:T.y||0},{x:y.x||0,y:y.y||0}]},f=I(h,s,n,G.type,T,y,G.diagramId);i(s,f)}}})),t.debug("Cose-bilkent rendering completed")},"render"),Nt=Lt;export{Nt as render}; diff --git a/apps/pythinker-code/dist-web/assets/cpp-BbWJElDN.js b/apps/pythinker-code/dist-web/assets/cpp-BbWJElDN.js new file mode 100644 index 000000000..759dd6e34 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/cpp-BbWJElDN.js @@ -0,0 +1 @@ +const e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},n={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m512","__m512d","__m512i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>="],symbols:/[=>\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*\\$/,"comment","@linecomment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],linecomment:[[/.*[^\\]$/,"comment","@pop"],[/[^]+/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/[^)]+/,"string.raw"],[/\)$S2\"/,{token:"string.raw.end",next:"@pop"}],[/\)/,"string.raw"]],annotation:[{include:"@whitespace"},[/using|alignas/,"keyword"],[/[a-zA-Z0-9_]+/,"annotation"],[/[,:]/,"delimiter"],[/[()]/,"@brackets"],[/\]\s*\]/,{token:"annotation",next:"@pop"}]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}};export{e as conf,n as language}; diff --git a/apps/pythinker-code/dist-web/assets/csharp-Co3qMtFm.js b/apps/pythinker-code/dist-web/assets/csharp-Co3qMtFm.js new file mode 100644 index 000000000..64797ee17 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/csharp-Co3qMtFm.js @@ -0,0 +1 @@ +const e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},t={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}};export{e as conf,t as language}; diff --git a/apps/pythinker-code/dist-web/assets/csp-D-4FJmMZ.js b/apps/pythinker-code/dist-web/assets/csp-D-4FJmMZ.js new file mode 100644 index 000000000..5329d89cc --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/csp-D-4FJmMZ.js @@ -0,0 +1 @@ +const t={brackets:[],autoClosingPairs:[],surroundingPairs:[]},r={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=>",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};export{e as conf,t as language}; diff --git a/apps/pythinker-code/dist-web/assets/css.worker-uch7pA5g.js b/apps/pythinker-code/dist-web/assets/css.worker-uch7pA5g.js new file mode 100644 index 000000000..07f097599 --- /dev/null +++ b/apps/pythinker-code/dist-web/assets/css.worker-uch7pA5g.js @@ -0,0 +1,93 @@ +class Vc{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?Ht.isErrorNoTelemetry(e)?new Ht(e.message+` + +`+e.stack):new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(n=>{n(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const $c=new Vc;function $n(t){Uc(t)||$c.onUnexpectedError(t)}function Hr(t){if(t instanceof Error){const{name:e,message:n,cause:r}=t,i=t.stacktrace||t.stack;return{$isError:!0,name:e,message:n,stack:i,noTelemetry:Ht.isErrorNoTelemetry(t),cause:r?Hr(r):void 0,code:t.code}}return t}const Gr="Canceled";function Uc(t){return t instanceof Hl?!0:t instanceof Error&&t.name===Gr&&t.message===Gr}class Hl extends Error{constructor(){super(Gr),this.name=this.message}}class Ht extends Error{constructor(e){super(e),this.name="CodeExpectedError"}static fromError(e){if(e instanceof Ht)return e;const n=new Ht;return n.message=e.message,n.stack=e.stack,n}static isErrorNoTelemetry(e){return e.name==="CodeExpectedError"}}class we extends Error{constructor(e){super(e||"An unexpected bug occurred."),Object.setPrototypeOf(this,we.prototype)}}function Bc(t,e="Unreachable"){throw new Error(e)}function qc(t,e="unexpected state"){if(!t)throw typeof e=="string"?new we(`Assertion Failed: ${e}`):e}function Yn(t){if(!t()){debugger;t(),$n(new we("Assertion Failed"))}}function Gl(t,e){let n=0;for(;n=0;N--)yield D[N]}t.reverse=o;function l(D){return!D||D[Symbol.iterator]().next().done===!0}t.isEmpty=l;function c(D){return D[Symbol.iterator]().next().value}t.first=c;function d(D,N){let z=0;for(const $ of D)if(N($,z++))return!0;return!1}t.some=d;function u(D,N){let z=0;for(const $ of D)if(!N($,z++))return!1;return!0}t.every=u;function m(D,N){for(const z of D)if(N(z))return z}t.find=m;function*f(D,N){for(const z of D)N(z)&&(yield z)}t.filter=f;function*g(D,N){let z=0;for(const $ of D)yield N($,z++)}t.map=g;function*b(D,N){let z=0;for(const $ of D)yield*N($,z++)}t.flatMap=b;function*k(...D){for(const N of D)Hc(N)?yield*N:yield N}t.concat=k;function F(D,N,z){let $=z;for(const L of D)$=N($,L);return $}t.reduce=F;function R(D){let N=0;for(const z of D)N++;return N}t.length=R;function*E(D,N,z=D.length){for(N<-D.length&&(N=0),N<0&&(N+=D.length),z<0?z+=D.length:z>D.length&&(z=D.length);N1)throw new AggregateError(e,"Encountered errors while disposing of store");return Array.isArray(t)?[]:t}else if(t)return t.dispose(),t}function Gc(...t){return Kn(()=>Jl(t))}class Jc{constructor(e){this._isDisposed=!1,this._fn=e}dispose(){if(!this._isDisposed){if(!this._fn)throw new Error("Unbound disposable context: Need to use an arrow function to preserve the value of this");this._isDisposed=!0,this._fn()}}}function Kn(t){return new Jc(t)}class _n{static{this.DISABLE_DISPOSED_WARNING=!1}constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}get isDisposed(){return this._isDisposed}clear(){if(this._toDispose.size!==0)try{Jl(this._toDispose)}finally{this._toDispose.clear()}}add(e){if(!e||e===fn.None)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?_n.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(e),e}delete(e){if(e){if(e===this)throw new Error("Cannot dispose a disposable on itself!");this._toDispose.delete(e),e.dispose()}}}class fn{static{this.None=Object.freeze({dispose(){}})}constructor(){this._store=new _n,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}let oe=class Un{static{this.Undefined=new Un(void 0)}constructor(e){this.element=e,this.next=Un.Undefined,this.prev=Un.Undefined}};class Xc{constructor(){this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===oe.Undefined}clear(){let e=this._first;for(;e!==oe.Undefined;){const n=e.next;e.prev=oe.Undefined,e.next=oe.Undefined,e=n}this._first=oe.Undefined,this._last=oe.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,n){const r=new oe(e);if(this._first===oe.Undefined)this._first=r,this._last=r;else if(n){const s=this._last;this._last=r,r.prev=s,s.next=r}else{const s=this._first;this._first=r,r.next=s,s.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==oe.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==oe.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==oe.Undefined&&e.next!==oe.Undefined){const n=e.prev;n.next=e.next,e.next.prev=n}else e.prev===oe.Undefined&&e.next===oe.Undefined?(this._first=oe.Undefined,this._last=oe.Undefined):e.next===oe.Undefined?(this._last=this._last.prev,this._last.next=oe.Undefined):e.prev===oe.Undefined&&(this._first=this._first.next,this._first.prev=oe.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==oe.Undefined;)yield e.element,e=e.next}}const Yc=globalThis.performance.now.bind(globalThis.performance);class yr{static create(e){return new yr(e)}constructor(e){this._now=e===!1?Date.now:Yc,this._startTime=this._now(),this._stopTime=-1}stop(){this._stopTime=this._now()}reset(){this._startTime=this._now(),this._stopTime=-1}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}}var Jr;(function(t){t.None=()=>fn.None;function e(y,_){return m(y,()=>{},0,void 0,!0,void 0,_)}t.defer=e;function n(y){return(_,I=null,M)=>{let A=!1,P;return P=y(H=>{if(!A)return P?P.dispose():A=!0,_.call(I,H)},null,M),A&&P.dispose(),P}}t.once=n;function r(y,_){return t.once(t.filter(y,_))}t.onceIf=r;function i(y,_,I){return d((M,A=null,P)=>y(H=>M.call(A,_(H)),null,P),I)}t.map=i;function s(y,_,I){return d((M,A=null,P)=>y(H=>{_(H),M.call(A,H)},null,P),I)}t.forEach=s;function a(y,_,I){return d((M,A=null,P)=>y(H=>_(H)&&M.call(A,H),null,P),I)}t.filter=a;function o(y){return y}t.signal=o;function l(...y){return(_,I=null,M)=>{const A=Gc(...y.map(P=>P(H=>_.call(I,H))));return u(A,M)}}t.any=l;function c(y,_,I,M){let A=I;return i(y,P=>(A=_(A,P),A),M)}t.reduce=c;function d(y,_){let I;const M={onWillAddFirstListener(){I=y(A.fire,A)},onDidRemoveLastListener(){I?.dispose()}},A=new Ue(M);return _?.add(A),A.event}function u(y,_){return _ instanceof Array?_.push(y):_&&_.add(y),y}function m(y,_,I=100,M=!1,A=!1,P,H){let ee,J,ve,Et=0,st;const _r={leakWarningThreshold:P,onWillAddFirstListener(){ee=y(Oc=>{Et++,J=_(J,Oc),M&&!ve&&(Ft.fire(J),J=void 0),st=()=>{const Wc=J;J=void 0,ve=void 0,(!M||Et>1)&&Ft.fire(Wc),Et=0},typeof I=="number"?(ve&&clearTimeout(ve),ve=setTimeout(st,I)):ve===void 0&&(ve=null,queueMicrotask(st))})},onWillRemoveListener(){A&&Et>0&&st?.()},onDidRemoveLastListener(){st=void 0,ee.dispose()}},Ft=new Ue(_r);return H?.add(Ft),Ft.event}t.debounce=m;function f(y,_=0,I){return t.debounce(y,(M,A)=>M?(M.push(A),M):[A],_,void 0,!0,void 0,I)}t.accumulate=f;function g(y,_=(M,A)=>M===A,I){let M=!0,A;return a(y,P=>{const H=M||!_(P,A);return M=!1,A=P,H},I)}t.latch=g;function b(y,_,I){return[t.filter(y,_,I),t.filter(y,M=>!_(M),I)]}t.split=b;function k(y,_=!1,I=[],M){let A=I.slice(),P=y(J=>{A?A.push(J):ee.fire(J)});M&&M.add(P);const H=()=>{A?.forEach(J=>ee.fire(J)),A=null},ee=new Ue({onWillAddFirstListener(){P||(P=y(J=>ee.fire(J)),M&&M.add(P))},onDidAddFirstListener(){A&&(_?setTimeout(H):H())},onDidRemoveLastListener(){P&&P.dispose(),P=null}});return M&&M.add(ee),ee.event}t.buffer=k;function F(y,_){return(M,A,P)=>{const H=_(new E);return y(function(ee){const J=H.evaluate(ee);J!==R&&M.call(A,J)},void 0,P)}}t.chain=F;const R=Symbol("HaltChainable");class E{constructor(){this.steps=[]}map(_){return this.steps.push(_),this}forEach(_){return this.steps.push(I=>(_(I),I)),this}filter(_){return this.steps.push(I=>_(I)?I:R),this}reduce(_,I){let M=I;return this.steps.push(A=>(M=_(M,A),M)),this}latch(_=(I,M)=>I===M){let I=!0,M;return this.steps.push(A=>{const P=I||!_(A,M);return I=!1,M=A,P?A:R}),this}evaluate(_){for(const I of this.steps)if(_=I(_),_===R)break;return _}}function T(y,_,I=M=>M){const M=(...ee)=>H.fire(I(...ee)),A=()=>y.on(_,M),P=()=>y.removeListener(_,M),H=new Ue({onWillAddFirstListener:A,onDidRemoveLastListener:P});return H.event}t.fromNodeEventEmitter=T;function O(y,_,I=M=>M){const M=(...ee)=>H.fire(I(...ee)),A=()=>y.addEventListener(_,M),P=()=>y.removeEventListener(_,M),H=new Ue({onWillAddFirstListener:A,onDidRemoveLastListener:P});return H.event}t.fromDOMEventEmitter=O;function V(y,_){let I;const M=new Promise((A,P)=>{const H=n(y)(A,null,_);I=()=>H.dispose()});return M.cancel=I,M}t.toPromise=V;function D(y,_){return y(I=>_.fire(I))}t.forward=D;function N(y,_,I){return _(I),y(M=>_(M))}t.runAndSubscribe=N;class z{constructor(_,I){this._observable=_,this._counter=0,this._hasChanged=!1;const M={onWillAddFirstListener:()=>{_.addObserver(this),this._observable.reportChanges()},onDidRemoveLastListener:()=>{_.removeObserver(this)}};this.emitter=new Ue(M),I&&I.add(this.emitter)}beginUpdate(_){this._counter++}handlePossibleChange(_){}handleChange(_,I){this._hasChanged=!0}endUpdate(_){this._counter--,this._counter===0&&(this._observable.reportChanges(),this._hasChanged&&(this._hasChanged=!1,this.emitter.fire(this._observable.get())))}}function $(y,_){return new z(y,_).emitter.event}t.fromObservable=$;function L(y){return(_,I,M)=>{let A=0,P=!1;const H={beginUpdate(){A++},endUpdate(){A--,A===0&&(y.reportChanges(),P&&(P=!1,_.call(I)))},handlePossibleChange(){},handleChange(){P=!0}};y.addObserver(H),y.reportChanges();const ee={dispose(){y.removeObserver(H)}};return M instanceof _n?M.add(ee):Array.isArray(M)&&M.push(ee),ee}}t.fromObservableLight=L})(Jr||(Jr={}));class Zn{static{this.all=new Set}static{this._idPool=0}constructor(e){this.listenerCount=0,this.invocationCount=0,this.elapsedOverall=0,this.durations=[],this.name=`${e}_${Zn._idPool++}`,Zn.all.add(this)}start(e){this._stopWatch=new yr,this.listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this.durations.push(e),this.elapsedOverall+=e,this.invocationCount+=1,this._stopWatch=void 0}}}let Qc=-1;class Ui{static{this._idPool=1}constructor(e,n,r=(Ui._idPool++).toString(16).padStart(3,"0")){this._errorHandler=e,this.threshold=n,this.name=r,this._warnCountdown=0}dispose(){this._stacks?.clear()}check(e,n){const r=this.threshold;if(r<=0||n{const s=this._stacks.get(e.value)||0;this._stacks.set(e.value,s-1)}}getMostFrequentStack(){if(!this._stacks)return;let e,n=0;for(const[r,i]of this._stacks)(!e||n{if(this._leakageMon&&this._size>this._leakageMon.threshold**2){const o=`[${this._leakageMon.name}] REFUSES to accept new listeners because it exceeded its threshold by far (${this._size} vs ${this._leakageMon.threshold})`;console.warn(o);const l=this._leakageMon.getMostFrequentStack()??["UNKNOWN stack",-1],c=new Zc(`${o}. HINT: Stack shows most frequent listener (${l[1]}-times)`,l[0]);return(this._options?.onListenerError||$n)(c),fn.None}if(this._disposed)return fn.None;n&&(e=e.bind(n));const i=new Er(e);let s;this._leakageMon&&this._size>=Math.ceil(this._leakageMon.threshold*.2)&&(i.stack=Bi.create(),s=this._leakageMon.check(i.stack,this._size+1)),this._listeners?this._listeners instanceof Er?(this._deliveryQueue??=new th,this._listeners=[this._listeners,i]):this._listeners.push(i):(this._options?.onWillAddFirstListener?.(this),this._listeners=i,this._options?.onDidAddFirstListener?.(this)),this._options?.onDidAddListener?.(this),this._size++;const a=Kn(()=>{s?.(),this._removeListener(i)});return r instanceof _n?r.add(a):Array.isArray(r)&&r.push(a),a},this._event}_removeListener(e){if(this._options?.onWillRemoveListener?.(this),!this._listeners)return;if(this._size===1){this._listeners=void 0,this._options?.onDidRemoveLastListener?.(this),this._size=0;return}const n=this._listeners,r=n.indexOf(e);if(r===-1)throw console.log("disposed?",this._disposed),console.log("size?",this._size),console.log("arr?",JSON.stringify(this._listeners)),new Error("Attempted to dispose unknown listener");this._size--,n[r]=void 0;const i=this._deliveryQueue.current===this;if(this._size*eh<=n.length){let s=0;for(let a=0;a0}}class th{constructor(){this.i=-1,this.end=0}enqueue(e,n,r){this.i=0,this.end=r,this.current=e,this.value=n}reset(){this.i=this.end,this.current=void 0,this.value=void 0}}function nh(){return globalThis._VSCODE_NLS_MESSAGES}function Xl(){return globalThis._VSCODE_NLS_LANGUAGE}const rh=Xl()==="pseudo"||typeof document<"u"&&document.location&&typeof document.location.hash=="string"&&document.location.hash.indexOf("pseudo=true")>=0;function bs(t,e){let n;return e.length===0?n=t:n=t.replace(/\{(\d+)\}/g,(r,i)=>{const s=i[0],a=e[s];let o=r;return typeof a=="string"?o=a:(typeof a=="number"||typeof a=="boolean"||a===void 0||a===null)&&(o=String(a)),o}),rh&&(n="["+n.replace(/[aouei]/g,"$&$&")+"]"),n}function B(t,e,...n){return bs(typeof t=="number"?ih(t,e):e,n)}function ih(t,e){const n=nh()?.[t];if(typeof n!="string"){if(typeof e=="string")return e;throw new Error(`!!! NLS MISSING: ${t} !!!`)}return n}const Wt="en";let Xr=!1,Yr=!1,Fr=!1,Dn,Rr=Wt,ws=Wt,sh,Qe;const xt=globalThis;let ke;typeof xt.vscode<"u"&&typeof xt.vscode.process<"u"?ke=xt.vscode.process:typeof process<"u"&&typeof process?.versions?.node=="string"&&(ke=process);const ah=typeof ke?.versions?.electron=="string",oh=ah&&ke?.type==="renderer";if(typeof ke=="object"){Xr=ke.platform==="win32",Yr=ke.platform==="darwin",Fr=ke.platform==="linux",Fr&&ke.env.SNAP&&ke.env.SNAP_REVISION,ke.env.CI||ke.env.BUILD_ARTIFACTSTAGINGDIRECTORY||ke.env.GITHUB_WORKSPACE,Dn=Wt,Rr=Wt;const t=ke.env.VSCODE_NLS_CONFIG;if(t)try{const e=JSON.parse(t);Dn=e.userLocale,ws=e.osLocale,Rr=e.resolvedLanguage||Wt,sh=e.languagePack?.translationsConfigFile}catch{}}else typeof navigator=="object"&&!oh?(Qe=navigator.userAgent,Xr=Qe.indexOf("Windows")>=0,Yr=Qe.indexOf("Macintosh")>=0,(Qe.indexOf("Macintosh")>=0||Qe.indexOf("iPad")>=0||Qe.indexOf("iPhone")>=0)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Fr=Qe.indexOf("Linux")>=0,Qe?.indexOf("Mobi")>=0,Rr=Xl()||Wt,Dn=navigator.language.toLowerCase(),ws=Dn):console.error("Unable to resolve platform.");const gn=Xr,lh=Yr,je=Qe,ch=typeof xt.postMessage=="function"&&!xt.importScripts;(()=>{if(ch){const t=[];xt.addEventListener("message",n=>{if(n.data&&n.data.vscodeScheduleAsyncWork)for(let r=0,i=t.length;r{const r=++e;t.push({id:r,callback:n}),xt.postMessage({vscodeScheduleAsyncWork:r},"*")}}return t=>setTimeout(t)})();const hh=!!(je&&je.indexOf("Chrome")>=0);je&&je.indexOf("Firefox")>=0;!hh&&je&&je.indexOf("Safari")>=0;je&&je.indexOf("Edg/")>=0;je&&je.indexOf("Android")>=0;function dh(t){return t}class uh{constructor(e,n){this.lastCache=void 0,this.lastArgKey=void 0,typeof e=="function"?(this._fn=e,this._computeKey=dh):(this._fn=n,this._computeKey=e.getCacheKey)}get(e){const n=this._computeKey(e);return this.lastArgKey!==n&&(this.lastArgKey=n,this.lastCache=this._fn(e)),this.lastCache}}var vt;(function(t){t[t.Uninitialized=0]="Uninitialized",t[t.Running=1]="Running",t[t.Completed=2]="Completed"})(vt||(vt={}));class Qr{constructor(e){this.executor=e,this._state=vt.Uninitialized}get value(){if(this._state===vt.Uninitialized){this._state=vt.Running;try{this._value=this.executor()}catch(e){this._error=e}finally{this._state=vt.Completed}}else if(this._state===vt.Running)throw new Error("Cannot read the value of a lazy that is being initialized");if(this._error)throw this._error;return this._value}get rawValue(){return this._value}}function ph(t){return t.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function mh(t){return t.source==="^"||t.source==="^$"||t.source==="$"||t.source==="^\\s*$"?!1:!!(t.exec("")&&t.lastIndex===0)}function fh(t){return t.split(/\r\n|\r|\n/)}function gh(t){for(let e=0,n=t.length;e=0;n--){const r=t.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function Yl(t){return t>=65&&t<=90}function wh(t,e){const n=Math.min(t.length,e.length);let r;for(r=0;rJSON.parse('{"_common":[8232,32,8233,32,5760,32,8192,32,8193,32,8194,32,8195,32,8196,32,8197,32,8198,32,8200,32,8201,32,8202,32,8287,32,8199,32,8239,32,2042,95,65101,95,65102,95,65103,95,8208,45,8209,45,8210,45,65112,45,1748,45,8259,45,727,45,8722,45,10134,45,11450,45,1549,44,1643,44,184,44,42233,44,894,59,2307,58,2691,58,1417,58,1795,58,1796,58,5868,58,65072,58,6147,58,6153,58,8282,58,1475,58,760,58,42889,58,8758,58,720,58,42237,58,451,33,11601,33,660,63,577,63,2429,63,5038,63,42731,63,119149,46,8228,46,1793,46,1794,46,42510,46,68176,46,1632,46,1776,46,42232,46,1373,96,65287,96,8219,96,1523,96,8242,96,1370,96,8175,96,65344,96,900,96,8189,96,8125,96,8127,96,8190,96,697,96,884,96,712,96,714,96,715,96,756,96,699,96,701,96,700,96,702,96,42892,96,1497,96,2036,96,2037,96,5194,96,5836,96,94033,96,94034,96,65339,91,10088,40,10098,40,12308,40,64830,40,65341,93,10089,41,10099,41,12309,41,64831,41,10100,123,119060,123,10101,125,65342,94,8270,42,1645,42,8727,42,66335,42,5941,47,8257,47,8725,47,8260,47,9585,47,10187,47,10744,47,119354,47,12755,47,12339,47,11462,47,20031,47,12035,47,65340,92,65128,92,8726,92,10189,92,10741,92,10745,92,119311,92,119355,92,12756,92,20022,92,12034,92,42872,38,708,94,710,94,5869,43,10133,43,66203,43,8249,60,10094,60,706,60,119350,60,5176,60,5810,60,5120,61,11840,61,12448,61,42239,61,8250,62,10095,62,707,62,119351,62,5171,62,94015,62,8275,126,732,126,8128,126,8764,126,65372,124,65293,45,118002,50,120784,50,120794,50,120804,50,120814,50,120824,50,130034,50,42842,50,423,50,1000,50,42564,50,5311,50,42735,50,119302,51,118003,51,120785,51,120795,51,120805,51,120815,51,120825,51,130035,51,42923,51,540,51,439,51,42858,51,11468,51,1248,51,94011,51,71882,51,118004,52,120786,52,120796,52,120806,52,120816,52,120826,52,130036,52,5070,52,71855,52,118005,53,120787,53,120797,53,120807,53,120817,53,120827,53,130037,53,444,53,71867,53,118006,54,120788,54,120798,54,120808,54,120818,54,120828,54,130038,54,11474,54,5102,54,71893,54,119314,55,118007,55,120789,55,120799,55,120809,55,120819,55,120829,55,130039,55,66770,55,71878,55,2819,56,2538,56,2666,56,125131,56,118008,56,120790,56,120800,56,120810,56,120820,56,120830,56,130040,56,547,56,546,56,66330,56,2663,57,2920,57,2541,57,3437,57,118009,57,120791,57,120801,57,120811,57,120821,57,120831,57,130041,57,42862,57,11466,57,71884,57,71852,57,71894,57,9082,97,65345,97,119834,97,119886,97,119938,97,119990,97,120042,97,120094,97,120146,97,120198,97,120250,97,120302,97,120354,97,120406,97,120458,97,593,97,945,97,120514,97,120572,97,120630,97,120688,97,120746,97,65313,65,117974,65,119808,65,119860,65,119912,65,119964,65,120016,65,120068,65,120120,65,120172,65,120224,65,120276,65,120328,65,120380,65,120432,65,913,65,120488,65,120546,65,120604,65,120662,65,120720,65,5034,65,5573,65,42222,65,94016,65,66208,65,119835,98,119887,98,119939,98,119991,98,120043,98,120095,98,120147,98,120199,98,120251,98,120303,98,120355,98,120407,98,120459,98,388,98,5071,98,5234,98,5551,98,65314,66,8492,66,117975,66,119809,66,119861,66,119913,66,120017,66,120069,66,120121,66,120173,66,120225,66,120277,66,120329,66,120381,66,120433,66,42932,66,914,66,120489,66,120547,66,120605,66,120663,66,120721,66,5108,66,5623,66,42192,66,66178,66,66209,66,66305,66,65347,99,8573,99,119836,99,119888,99,119940,99,119992,99,120044,99,120096,99,120148,99,120200,99,120252,99,120304,99,120356,99,120408,99,120460,99,7428,99,1010,99,11429,99,43951,99,66621,99,128844,67,71913,67,71922,67,65315,67,8557,67,8450,67,8493,67,117976,67,119810,67,119862,67,119914,67,119966,67,120018,67,120174,67,120226,67,120278,67,120330,67,120382,67,120434,67,1017,67,11428,67,5087,67,42202,67,66210,67,66306,67,66581,67,66844,67,8574,100,8518,100,119837,100,119889,100,119941,100,119993,100,120045,100,120097,100,120149,100,120201,100,120253,100,120305,100,120357,100,120409,100,120461,100,1281,100,5095,100,5231,100,42194,100,8558,68,8517,68,117977,68,119811,68,119863,68,119915,68,119967,68,120019,68,120071,68,120123,68,120175,68,120227,68,120279,68,120331,68,120383,68,120435,68,5024,68,5598,68,5610,68,42195,68,8494,101,65349,101,8495,101,8519,101,119838,101,119890,101,119942,101,120046,101,120098,101,120150,101,120202,101,120254,101,120306,101,120358,101,120410,101,120462,101,43826,101,1213,101,8959,69,65317,69,8496,69,117978,69,119812,69,119864,69,119916,69,120020,69,120072,69,120124,69,120176,69,120228,69,120280,69,120332,69,120384,69,120436,69,917,69,120492,69,120550,69,120608,69,120666,69,120724,69,11577,69,5036,69,42224,69,71846,69,71854,69,66182,69,119839,102,119891,102,119943,102,119995,102,120047,102,120099,102,120151,102,120203,102,120255,102,120307,102,120359,102,120411,102,120463,102,43829,102,42905,102,383,102,7837,102,1412,102,119315,70,8497,70,117979,70,119813,70,119865,70,119917,70,120021,70,120073,70,120125,70,120177,70,120229,70,120281,70,120333,70,120385,70,120437,70,42904,70,988,70,120778,70,5556,70,42205,70,71874,70,71842,70,66183,70,66213,70,66853,70,65351,103,8458,103,119840,103,119892,103,119944,103,120048,103,120100,103,120152,103,120204,103,120256,103,120308,103,120360,103,120412,103,120464,103,609,103,7555,103,397,103,1409,103,117980,71,119814,71,119866,71,119918,71,119970,71,120022,71,120074,71,120126,71,120178,71,120230,71,120282,71,120334,71,120386,71,120438,71,1292,71,5056,71,5107,71,42198,71,65352,104,8462,104,119841,104,119945,104,119997,104,120049,104,120101,104,120153,104,120205,104,120257,104,120309,104,120361,104,120413,104,120465,104,1211,104,1392,104,5058,104,65320,72,8459,72,8460,72,8461,72,117981,72,119815,72,119867,72,119919,72,120023,72,120179,72,120231,72,120283,72,120335,72,120387,72,120439,72,919,72,120494,72,120552,72,120610,72,120668,72,120726,72,11406,72,5051,72,5500,72,42215,72,66255,72,731,105,9075,105,65353,105,8560,105,8505,105,8520,105,119842,105,119894,105,119946,105,119998,105,120050,105,120102,105,120154,105,120206,105,120258,105,120310,105,120362,105,120414,105,120466,105,120484,105,618,105,617,105,953,105,8126,105,890,105,120522,105,120580,105,120638,105,120696,105,120754,105,1110,105,42567,105,1231,105,43893,105,5029,105,71875,105,65354,106,8521,106,119843,106,119895,106,119947,106,119999,106,120051,106,120103,106,120155,106,120207,106,120259,106,120311,106,120363,106,120415,106,120467,106,1011,106,1112,106,65322,74,117983,74,119817,74,119869,74,119921,74,119973,74,120025,74,120077,74,120129,74,120181,74,120233,74,120285,74,120337,74,120389,74,120441,74,42930,74,895,74,1032,74,5035,74,5261,74,42201,74,119844,107,119896,107,119948,107,120000,107,120052,107,120104,107,120156,107,120208,107,120260,107,120312,107,120364,107,120416,107,120468,107,8490,75,65323,75,117984,75,119818,75,119870,75,119922,75,119974,75,120026,75,120078,75,120130,75,120182,75,120234,75,120286,75,120338,75,120390,75,120442,75,922,75,120497,75,120555,75,120613,75,120671,75,120729,75,11412,75,5094,75,5845,75,42199,75,66840,75,1472,108,8739,73,9213,73,65512,73,1633,108,1777,73,66336,108,125127,108,118001,108,120783,73,120793,73,120803,73,120813,73,120823,73,130033,73,65321,73,8544,73,8464,73,8465,73,117982,108,119816,73,119868,73,119920,73,120024,73,120128,73,120180,73,120232,73,120284,73,120336,73,120388,73,120440,73,65356,108,8572,73,8467,108,119845,108,119897,108,119949,108,120001,108,120053,108,120105,73,120157,73,120209,73,120261,73,120313,73,120365,73,120417,73,120469,73,448,73,120496,73,120554,73,120612,73,120670,73,120728,73,11410,73,1030,73,1216,73,1493,108,1503,108,1575,108,126464,108,126592,108,65166,108,65165,108,1994,108,11599,73,5825,73,42226,73,93992,73,66186,124,66313,124,119338,76,8556,76,8466,76,117985,76,119819,76,119871,76,119923,76,120027,76,120079,76,120131,76,120183,76,120235,76,120287,76,120339,76,120391,76,120443,76,11472,76,5086,76,5290,76,42209,76,93974,76,71843,76,71858,76,66587,76,66854,76,65325,77,8559,77,8499,77,117986,77,119820,77,119872,77,119924,77,120028,77,120080,77,120132,77,120184,77,120236,77,120288,77,120340,77,120392,77,120444,77,924,77,120499,77,120557,77,120615,77,120673,77,120731,77,1018,77,11416,77,5047,77,5616,77,5846,77,42207,77,66224,77,66321,77,119847,110,119899,110,119951,110,120003,110,120055,110,120107,110,120159,110,120211,110,120263,110,120315,110,120367,110,120419,110,120471,110,1400,110,1404,110,65326,78,8469,78,117987,78,119821,78,119873,78,119925,78,119977,78,120029,78,120081,78,120185,78,120237,78,120289,78,120341,78,120393,78,120445,78,925,78,120500,78,120558,78,120616,78,120674,78,120732,78,11418,78,42208,78,66835,78,3074,111,3202,111,3330,111,3458,111,2406,111,2662,111,2790,111,3046,111,3174,111,3302,111,3430,111,3664,111,3792,111,4160,111,1637,111,1781,111,65359,111,8500,111,119848,111,119900,111,119952,111,120056,111,120108,111,120160,111,120212,111,120264,111,120316,111,120368,111,120420,111,120472,111,7439,111,7441,111,43837,111,959,111,120528,111,120586,111,120644,111,120702,111,120760,111,963,111,120532,111,120590,111,120648,111,120706,111,120764,111,11423,111,4351,111,1413,111,1505,111,1607,111,126500,111,126564,111,126596,111,65259,111,65260,111,65258,111,65257,111,1726,111,64428,111,64429,111,64427,111,64426,111,1729,111,64424,111,64425,111,64423,111,64422,111,1749,111,3360,111,4125,111,66794,111,71880,111,71895,111,66604,111,1984,79,2534,79,2918,79,12295,79,70864,79,71904,79,118000,79,120782,79,120792,79,120802,79,120812,79,120822,79,130032,79,65327,79,117988,79,119822,79,119874,79,119926,79,119978,79,120030,79,120082,79,120134,79,120186,79,120238,79,120290,79,120342,79,120394,79,120446,79,927,79,120502,79,120560,79,120618,79,120676,79,120734,79,11422,79,1365,79,11604,79,4816,79,2848,79,66754,79,42227,79,71861,79,66194,79,66219,79,66564,79,66838,79,9076,112,65360,112,119849,112,119901,112,119953,112,120005,112,120057,112,120109,112,120161,112,120213,112,120265,112,120317,112,120369,112,120421,112,120473,112,961,112,120530,112,120544,112,120588,112,120602,112,120646,112,120660,112,120704,112,120718,112,120762,112,120776,112,11427,112,65328,80,8473,80,117989,80,119823,80,119875,80,119927,80,119979,80,120031,80,120083,80,120187,80,120239,80,120291,80,120343,80,120395,80,120447,80,929,80,120504,80,120562,80,120620,80,120678,80,120736,80,11426,80,5090,80,5229,80,42193,80,66197,80,119850,113,119902,113,119954,113,120006,113,120058,113,120110,113,120162,113,120214,113,120266,113,120318,113,120370,113,120422,113,120474,113,1307,113,1379,113,1382,113,8474,81,117990,81,119824,81,119876,81,119928,81,119980,81,120032,81,120084,81,120188,81,120240,81,120292,81,120344,81,120396,81,120448,81,11605,81,119851,114,119903,114,119955,114,120007,114,120059,114,120111,114,120163,114,120215,114,120267,114,120319,114,120371,114,120423,114,120475,114,43847,114,43848,114,7462,114,11397,114,43905,114,119318,82,8475,82,8476,82,8477,82,117991,82,119825,82,119877,82,119929,82,120033,82,120189,82,120241,82,120293,82,120345,82,120397,82,120449,82,422,82,5025,82,5074,82,66740,82,5511,82,42211,82,94005,82,65363,115,119852,115,119904,115,119956,115,120008,115,120060,115,120112,115,120164,115,120216,115,120268,115,120320,115,120372,115,120424,115,120476,115,42801,115,445,115,1109,115,43946,115,71873,115,66632,115,65331,83,117992,83,119826,83,119878,83,119930,83,119982,83,120034,83,120086,83,120138,83,120190,83,120242,83,120294,83,120346,83,120398,83,120450,83,1029,83,1359,83,5077,83,5082,83,42210,83,94010,83,66198,83,66592,83,119853,116,119905,116,119957,116,120009,116,120061,116,120113,116,120165,116,120217,116,120269,116,120321,116,120373,116,120425,116,120477,116,8868,84,10201,84,128872,84,65332,84,117993,84,119827,84,119879,84,119931,84,119983,84,120035,84,120087,84,120139,84,120191,84,120243,84,120295,84,120347,84,120399,84,120451,84,932,84,120507,84,120565,84,120623,84,120681,84,120739,84,11430,84,5026,84,42196,84,93962,84,71868,84,66199,84,66225,84,66325,84,119854,117,119906,117,119958,117,120010,117,120062,117,120114,117,120166,117,120218,117,120270,117,120322,117,120374,117,120426,117,120478,117,42911,117,7452,117,43854,117,43858,117,651,117,965,117,120534,117,120592,117,120650,117,120708,117,120766,117,1405,117,66806,117,71896,117,8746,85,8899,85,117994,85,119828,85,119880,85,119932,85,119984,85,120036,85,120088,85,120140,85,120192,85,120244,85,120296,85,120348,85,120400,85,120452,85,1357,85,4608,85,66766,85,5196,85,42228,85,94018,85,71864,85,8744,118,8897,118,65366,118,8564,118,119855,118,119907,118,119959,118,120011,118,120063,118,120115,118,120167,118,120219,118,120271,118,120323,118,120375,118,120427,118,120479,118,7456,118,957,118,120526,118,120584,118,120642,118,120700,118,120758,118,1141,118,1496,118,71430,118,43945,118,71872,118,119309,86,1639,86,1783,86,8548,86,117995,86,119829,86,119881,86,119933,86,119985,86,120037,86,120089,86,120141,86,120193,86,120245,86,120297,86,120349,86,120401,86,120453,86,1140,86,11576,86,5081,86,5167,86,42719,86,42214,86,93960,86,71840,86,66845,86,623,119,119856,119,119908,119,119960,119,120012,119,120064,119,120116,119,120168,119,120220,119,120272,119,120324,119,120376,119,120428,119,120480,119,7457,119,1121,119,1309,119,1377,119,71434,119,71438,119,71439,119,43907,119,71910,87,71919,87,117996,87,119830,87,119882,87,119934,87,119986,87,120038,87,120090,87,120142,87,120194,87,120246,87,120298,87,120350,87,120402,87,120454,87,1308,87,5043,87,5076,87,42218,87,5742,120,10539,120,10540,120,10799,120,65368,120,8569,120,119857,120,119909,120,119961,120,120013,120,120065,120,120117,120,120169,120,120221,120,120273,120,120325,120,120377,120,120429,120,120481,120,5441,120,5501,120,5741,88,9587,88,66338,88,71916,88,65336,88,8553,88,117997,88,119831,88,119883,88,119935,88,119987,88,120039,88,120091,88,120143,88,120195,88,120247,88,120299,88,120351,88,120403,88,120455,88,42931,88,935,88,120510,88,120568,88,120626,88,120684,88,120742,88,11436,88,11613,88,5815,88,42219,88,66192,88,66228,88,66327,88,66855,88,611,121,7564,121,65369,121,119858,121,119910,121,119962,121,120014,121,120066,121,120118,121,120170,121,120222,121,120274,121,120326,121,120378,121,120430,121,120482,121,655,121,7935,121,43866,121,947,121,8509,121,120516,121,120574,121,120632,121,120690,121,120748,121,1199,121,4327,121,71900,121,65337,89,117998,89,119832,89,119884,89,119936,89,119988,89,120040,89,120092,89,120144,89,120196,89,120248,89,120300,89,120352,89,120404,89,120456,89,933,89,978,89,120508,89,120566,89,120624,89,120682,89,120740,89,11432,89,1198,89,5033,89,5053,89,42220,89,94019,89,71844,89,66226,89,119859,122,119911,122,119963,122,120015,122,120067,122,120119,122,120171,122,120223,122,120275,122,120327,122,120379,122,120431,122,120483,122,7458,122,43923,122,71876,122,71909,90,66293,90,65338,90,8484,90,8488,90,117999,90,119833,90,119885,90,119937,90,119989,90,120041,90,120197,90,120249,90,120301,90,120353,90,120405,90,120457,90,918,90,120493,90,120551,90,120609,90,120667,90,120725,90,5059,90,42204,90,71849,90,65282,34,65283,35,65284,36,65285,37,65286,38,65290,42,65291,43,65294,46,65295,47,65296,48,65298,50,65299,51,65300,52,65301,53,65302,54,65303,55,65304,56,65305,57,65308,60,65309,61,65310,62,65312,64,65316,68,65318,70,65319,71,65324,76,65329,81,65330,82,65333,85,65334,86,65335,87,65343,95,65346,98,65348,100,65350,102,65355,107,65357,109,65358,110,65361,113,65362,114,65364,116,65365,117,65367,119,65370,122,65371,123,65373,125,119846,109],"_default":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8217,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"cs":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"de":[65374,126,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"es":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"fr":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"it":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ja":[8211,45,8218,44,65281,33,8216,96,8245,96,180,96,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65292,44,65297,49,65307,59],"ko":[8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pl":[65374,126,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"pt-BR":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"qps-ploc":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"ru":[65374,126,8218,44,65306,58,65281,33,8216,96,8245,96,180,96,12494,47,305,105,921,73,1009,112,215,120,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"tr":[160,32,8211,45,65374,126,8218,44,65306,58,65281,33,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65288,40,65289,41,65292,44,65297,49,65307,59,65311,63],"zh-hans":[160,32,65374,126,8218,44,8245,96,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89,65297,49],"zh-hant":[8211,45,65374,126,8218,44,180,96,12494,47,1047,51,1073,54,1072,97,1040,65,1068,98,1042,66,1089,99,1057,67,1077,101,1045,69,1053,72,305,105,1050,75,921,73,1052,77,1086,111,1054,79,1009,112,1088,112,1056,80,1075,114,1058,84,215,120,1093,120,1061,88,1091,121,1059,89]}'))}static{this.cache=new uh({getCacheKey:JSON.stringify},e=>{function n(d){const u=new Map;for(let m=0;m!d.startsWith("_")&&Object.hasOwn(s,d));a.length===0&&(a=["_default"]);let o;for(const d of a){const u=n(s[d]);o=i(o,u)}const l=n(s._common),c=r(l,o);return new pt(c)})}static getInstance(e){return pt.cache.get(Array.from(e))}static{this._locales=new Qr(()=>Object.keys(pt.ambiguousCharacterData.value).filter(e=>!e.startsWith("_")))}static getLocales(){return pt._locales.value}constructor(e){this.confusableDictionary=e}isAmbiguous(e){return this.confusableDictionary.has(e)}getPrimaryConfusable(e){return this.confusableDictionary.get(e)}getConfusableCodePoints(){return new Set(this.confusableDictionary.keys())}}class St{static getRawData(){return JSON.parse('{"_common":[11,12,13,127,847,1564,4447,4448,6068,6069,6155,6156,6157,6158,7355,7356,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8204,8205,8206,8207,8234,8235,8236,8237,8238,8239,8287,8288,8289,8290,8291,8292,8293,8294,8295,8296,8297,8298,8299,8300,8301,8302,8303,10240,12644,65024,65025,65026,65027,65028,65029,65030,65031,65032,65033,65034,65035,65036,65037,65038,65039,65279,65440,65520,65521,65522,65523,65524,65525,65526,65527,65528,65532,78844,119155,119156,119157,119158,119159,119160,119161,119162,917504,917505,917506,917507,917508,917509,917510,917511,917512,917513,917514,917515,917516,917517,917518,917519,917520,917521,917522,917523,917524,917525,917526,917527,917528,917529,917530,917531,917532,917533,917534,917535,917536,917537,917538,917539,917540,917541,917542,917543,917544,917545,917546,917547,917548,917549,917550,917551,917552,917553,917554,917555,917556,917557,917558,917559,917560,917561,917562,917563,917564,917565,917566,917567,917568,917569,917570,917571,917572,917573,917574,917575,917576,917577,917578,917579,917580,917581,917582,917583,917584,917585,917586,917587,917588,917589,917590,917591,917592,917593,917594,917595,917596,917597,917598,917599,917600,917601,917602,917603,917604,917605,917606,917607,917608,917609,917610,917611,917612,917613,917614,917615,917616,917617,917618,917619,917620,917621,917622,917623,917624,917625,917626,917627,917628,917629,917630,917631,917760,917761,917762,917763,917764,917765,917766,917767,917768,917769,917770,917771,917772,917773,917774,917775,917776,917777,917778,917779,917780,917781,917782,917783,917784,917785,917786,917787,917788,917789,917790,917791,917792,917793,917794,917795,917796,917797,917798,917799,917800,917801,917802,917803,917804,917805,917806,917807,917808,917809,917810,917811,917812,917813,917814,917815,917816,917817,917818,917819,917820,917821,917822,917823,917824,917825,917826,917827,917828,917829,917830,917831,917832,917833,917834,917835,917836,917837,917838,917839,917840,917841,917842,917843,917844,917845,917846,917847,917848,917849,917850,917851,917852,917853,917854,917855,917856,917857,917858,917859,917860,917861,917862,917863,917864,917865,917866,917867,917868,917869,917870,917871,917872,917873,917874,917875,917876,917877,917878,917879,917880,917881,917882,917883,917884,917885,917886,917887,917888,917889,917890,917891,917892,917893,917894,917895,917896,917897,917898,917899,917900,917901,917902,917903,917904,917905,917906,917907,917908,917909,917910,917911,917912,917913,917914,917915,917916,917917,917918,917919,917920,917921,917922,917923,917924,917925,917926,917927,917928,917929,917930,917931,917932,917933,917934,917935,917936,917937,917938,917939,917940,917941,917942,917943,917944,917945,917946,917947,917948,917949,917950,917951,917952,917953,917954,917955,917956,917957,917958,917959,917960,917961,917962,917963,917964,917965,917966,917967,917968,917969,917970,917971,917972,917973,917974,917975,917976,917977,917978,917979,917980,917981,917982,917983,917984,917985,917986,917987,917988,917989,917990,917991,917992,917993,917994,917995,917996,917997,917998,917999],"cs":[173,8203,12288],"de":[173,8203,12288],"es":[8203,12288],"fr":[173,8203,12288],"it":[160,173,12288],"ja":[173],"ko":[173,12288],"pl":[173,8203,12288],"pt-BR":[173,8203,12288],"qps-ploc":[160,173,8203,12288],"ru":[173,12288],"tr":[160,173,8203,12288],"zh-hans":[160,173,8203,12288],"zh-hant":[173,12288]}')}static{this._data=void 0}static getData(){return this._data||(this._data=new Set([...Object.values(St.getRawData())].flat())),this._data}static isInvisibleCharacter(e){return St.getData().has(e)}static get codePoints(){return St.getData()}}const Nr="default",_h="$initialize";class Eh{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.method=i,this.args=s,this.type=0}}class vs{constructor(e,n,r,i){this.vsWorker=e,this.seq=n,this.res=r,this.err=i,this.type=1}}class Fh{constructor(e,n,r,i,s){this.vsWorker=e,this.req=n,this.channel=r,this.eventName=i,this.arg=s,this.type=2}}class Rh{constructor(e,n,r){this.vsWorker=e,this.req=n,this.event=r,this.type=3}}class Nh{constructor(e,n){this.vsWorker=e,this.req=n,this.type=4}}class Dh{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null),this._pendingEmitters=new Map,this._pendingEvents=new Map}setWorkerId(e){this._workerId=e}async sendMessage(e,n,r){const i=String(++this._lastSentReq);return new Promise((s,a)=>{this._pendingReplies[i]={resolve:s,reject:a},this._send(new Eh(this._workerId,i,e,n,r))})}listen(e,n,r){let i=null;const s=new Ue({onWillAddFirstListener:()=>{i=String(++this._lastSentReq),this._pendingEmitters.set(i,s),this._send(new Fh(this._workerId,i,e,n,r))},onDidRemoveLastListener:()=>{this._pendingEmitters.delete(i),this._send(new Nh(this._workerId,i)),i=null}});return s.event}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}createProxyToRemoteChannel(e,n){const r={get:(i,s)=>(typeof s=="string"&&!i[s]&&(Kl(s)?i[s]=a=>this.listen(e,s,a):Ql(s)?i[s]=this.listen(e,s,void 0):s.charCodeAt(0)===36&&(i[s]=async(...a)=>(await n?.(),this.sendMessage(e,s,a)))),i[s])};return new Proxy(Object.create(null),r)}_handleMessage(e){switch(e.type){case 1:return this._handleReplyMessage(e);case 0:return this._handleRequestMessage(e);case 2:return this._handleSubscribeEventMessage(e);case 3:return this._handleEventMessage(e);case 4:return this._handleUnsubscribeEventMessage(e)}}_handleReplyMessage(e){if(!this._pendingReplies[e.seq]){console.warn("Got reply to unknown seq");return}const n=this._pendingReplies[e.seq];if(delete this._pendingReplies[e.seq],e.err){let r=e.err;if(e.err.$isError){const i=new Error;i.name=e.err.name,i.message=e.err.message,i.stack=e.err.stack,r=i}n.reject(r);return}n.resolve(e.res)}_handleRequestMessage(e){const n=e.req;this._handler.handleMessage(e.channel,e.method,e.args).then(i=>{this._send(new vs(this._workerId,n,i,void 0))},i=>{i.detail instanceof Error&&(i.detail=Hr(i.detail)),this._send(new vs(this._workerId,n,void 0,Hr(i)))})}_handleSubscribeEventMessage(e){const n=e.req,r=this._handler.handleEvent(e.channel,e.eventName,e.arg)(i=>{this._send(new Rh(this._workerId,n,i))});this._pendingEvents.set(n,r)}_handleEventMessage(e){if(!this._pendingEmitters.has(e.req)){console.warn("Got event for unknown req");return}this._pendingEmitters.get(e.req).fire(e.event)}_handleUnsubscribeEventMessage(e){if(!this._pendingEvents.has(e.req)){console.warn("Got unsubscribe for unknown req");return}this._pendingEvents.get(e.req).dispose(),this._pendingEvents.delete(e.req)}_send(e){const n=[];if(e.type===0)for(let r=0;r{e(r,i)},handleMessage:(r,i,s)=>this._handleMessage(r,i,s),handleEvent:(r,i,s)=>this._handleEvent(r,i,s)}),this.requestHandler=n(this)}onmessage(e){this._protocol.handleMessage(e)}_handleMessage(e,n,r){if(e===Nr&&n===_h)return this.initialize(r[0]);const i=e===Nr?this.requestHandler:this._localChannels.get(e);if(!i)return Promise.reject(new Error(`Missing channel ${e} on worker thread`));const s=i[n];if(typeof s!="function")return Promise.reject(new Error(`Missing method ${n} on worker thread channel ${e}`));try{return Promise.resolve(s.apply(i,r))}catch(a){return Promise.reject(a)}}_handleEvent(e,n,r){const i=e===Nr?this.requestHandler:this._localChannels.get(e);if(!i)throw new Error(`Missing channel ${e} on worker thread`);if(Kl(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);const a=s.call(i,r);if(typeof a!="function")throw new Error(`Missing dynamic event ${n} on request handler.`);return a}if(Ql(n)){const s=i[n];if(typeof s!="function")throw new Error(`Missing event ${n} on request handler.`);return s}throw new Error(`Malformed event name ${n}`)}getChannel(e){if(!this._remoteChannels.has(e)){const n=this._protocol.createProxyToRemoteChannel(e);this._remoteChannels.set(e,n)}return this._remoteChannels.get(e)}async initialize(e){this._protocol.setWorkerId(e)}}let ys=!1;function Lh(t){if(ys)throw new Error("WebWorker already initialized!");ys=!0;const e=new Ih(n=>globalThis.postMessage(n),n=>t(n));return globalThis.onmessage=n=>{e.onmessage(n.data)},e}class ot{constructor(e,n,r,i){this.originalStart=e,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}new Qr(()=>new Uint8Array(256));function xs(t,e){return(e<<5)-e+t|0}function Mh(t,e){e=xs(149417,e);for(let n=0,r=t.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ot(this.m_originalStart,this.m_originalCount,this.m_modifiedStart,this.m_modifiedCount)),this.m_originalCount=0,this.m_modifiedCount=0,this.m_originalStart=1073741824,this.m_modifiedStart=1073741824}AddOriginalElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(e,n){this.m_originalStart=Math.min(this.m_originalStart,e),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_modifiedCount++}getChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes}getReverseChanges(){return(this.m_originalCount>0||this.m_modifiedCount>0)&&this.MarkNextChange(),this.m_changes.reverse(),this.m_changes}}class dt{constructor(e,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=e,this._modifiedSequence=n;const[i,s,a]=dt._getElements(e),[o,l,c]=dt._getElements(n);this._hasStrings=a&&c,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const n=e.getElements();if(dt._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,s=n.length;i=e&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(e>n||r>i){let u;return r<=i?(Rt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),u=[new ot(e,0,r,i-r+1)]):e<=n?(Rt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[new ot(e,n-e+1,r,0)]):(Rt.Assert(e===n+1,"originalStart should only be one more than originalEnd"),Rt.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const a=[0],o=[0],l=this.ComputeRecursionPoint(e,n,r,i,a,o,s),c=a[0],d=o[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,r,d,s);let m=[];return s[0]?m=[new ot(c+1,n-(c+1)+1,d+1,i-(d+1)+1)]:m=this.ComputeDiffRecursive(c+1,n,d+1,i,s),this.ConcatenateChanges(u,m)}return[new ot(e,n-e+1,r,i-r+1)]}WALKTRACE(e,n,r,i,s,a,o,l,c,d,u,m,f,g,b,k,F,R){let E=null,T=null,O=new Cs,V=n,D=r,N=f[0]-k[0]-i,z=-1073741824,$=this.m_forwardHistory.length-1;do{const L=N+e;L===V||L=0&&(c=this.m_forwardHistory[$],e=c[0],V=1,D=c.length-1)}while(--$>=-1);if(E=O.getReverseChanges(),R[0]){let L=f[0]+1,y=k[0]+1;if(E!==null&&E.length>0){const _=E[E.length-1];L=Math.max(L,_.getOriginalEnd()),y=Math.max(y,_.getModifiedEnd())}T=[new ot(L,m-L+1,y,b-y+1)]}else{O=new Cs,V=a,D=o,N=f[0]-k[0]-l,z=1073741824,$=F?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const L=N+s;L===V||L=d[L+1]?(u=d[L+1]-1,g=u-N-l,u>z&&O.MarkNextChange(),z=u+1,O.AddOriginalElement(u+1,g+1),N=L+1-s):(u=d[L-1],g=u-N-l,u>z&&O.MarkNextChange(),z=u,O.AddModifiedElement(u+1,g+1),N=L-1-s),$>=0&&(d=this.m_reverseHistory[$],s=d[0],V=1,D=d.length-1)}while(--$>=-1);T=O.getChanges()}return this.ConcatenateChanges(E,T)}ComputeRecursionPoint(e,n,r,i,s,a,o){let l=0,c=0,d=0,u=0,m=0,f=0;e--,r--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=n-e+(i-r),b=g+1,k=new Int32Array(b),F=new Int32Array(b),R=i-r,E=n-e,T=e-r,O=n-i,D=(E-R)%2===0;k[R]=e,F[E]=n,o[0]=!1;for(let N=1;N<=g/2+1;N++){let z=0,$=0;d=this.ClipDiagonalBound(R-N,N,R,b),u=this.ClipDiagonalBound(R+N,N,R,b);for(let y=d;y<=u;y+=2){y===d||yz+$&&(z=l,$=c),!D&&Math.abs(y-E)<=N-1&&l>=F[y])return s[0]=l,a[0]=c,_<=F[y]&&N<=1448?this.WALKTRACE(R,d,u,T,E,m,f,O,k,F,l,n,s,c,i,a,D,o):null}const L=(z-e+($-r)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(z,L))return o[0]=!0,s[0]=z,a[0]=$,L>0&&N<=1448?this.WALKTRACE(R,d,u,T,E,m,f,O,k,F,l,n,s,c,i,a,D,o):(e++,r++,[new ot(e,n-e+1,r,i-r+1)]);m=this.ClipDiagonalBound(E-N,N,E,b),f=this.ClipDiagonalBound(E+N,N,E,b);for(let y=m;y<=f;y+=2){y===m||y=F[y+1]?l=F[y+1]-1:l=F[y-1],c=l-(y-E)-O;const _=l;for(;l>e&&c>r&&this.ElementsAreEqual(l,c);)l--,c--;if(F[y]=l,D&&Math.abs(y-R)<=N&&l<=k[y])return s[0]=l,a[0]=c,_>=k[y]&&N<=1448?this.WALKTRACE(R,d,u,T,E,m,f,O,k,F,l,n,s,c,i,a,D,o):null}if(N<=1447){let y=new Int32Array(u-d+2);y[0]=R-d+1,Nt.Copy2(k,d,y,1,u-d+1),this.m_forwardHistory.push(y),y=new Int32Array(f-m+2),y[0]=E-m+1,Nt.Copy2(F,m,y,1,f-m+1),this.m_reverseHistory.push(y)}}return this.WALKTRACE(R,d,u,T,E,m,f,O,k,F,l,n,s,c,i,a,D,o)}PrettifyChanges(e){for(let n=0;n0,o=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=e[n];let i=0,s=0;if(n>0){const u=e[n-1];i=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const a=r.originalLength>0,o=r.modifiedLength>0;let l=0,c=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let u=1;;u++){const m=r.originalStart-u,f=r.modifiedStart-u;if(mc&&(c=b,l=u)}r.originalStart-=l,r.modifiedStart-=l;const d=[null];if(n>0&&this.ChangesOverlap(e[n-1],e[n],d)){e[n-1]=d[0],e.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=e.length;n0&&f>l&&(l=f,c=u,d=m)}return l>0?[c,d]:null}_contiguousSequenceScore(e,n,r){let i=0;for(let s=0;s=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[e])}_OriginalRegionIsBoundary(e,n){if(this._OriginalIsBoundary(e)||this._OriginalIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(e){return e<=0||e>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[e])}_ModifiedRegionIsBoundary(e,n){if(this._ModifiedIsBoundary(e)||this._ModifiedIsBoundary(e-1))return!0;if(n>0){const r=e+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(e,n,r,i){const s=this._OriginalRegionIsBoundary(e,n)?1:0,a=this._ModifiedRegionIsBoundary(r,i)?1:0;return s+a}ConcatenateChanges(e,n){const r=[];if(e.length===0||n.length===0)return n.length>0?n:e;if(this.ChangesOverlap(e[e.length-1],n[0],r)){const i=new Array(e.length+n.length-1);return Nt.Copy(e,0,i,0,e.length-1),i[e.length-1]=r[0],Nt.Copy(n,1,i,e.length,n.length-1),i}else{const i=new Array(e.length+n.length);return Nt.Copy(e,0,i,0,e.length),Nt.Copy(n,0,i,e.length,n.length),i}}ChangesOverlap(e,n,r){if(Rt.Assert(e.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),Rt.Assert(e.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),e.originalStart+e.originalLength>=n.originalStart||e.modifiedStart+e.modifiedLength>=n.modifiedStart){const i=e.originalStart;let s=e.originalLength;const a=e.modifiedStart;let o=e.modifiedLength;return e.originalStart+e.originalLength>=n.originalStart&&(s=n.originalStart+n.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=n.modifiedStart&&(o=n.modifiedStart+n.modifiedLength-e.modifiedStart),r[0]=new ot(i,s,a,o),!0}else return r[0]=null,!1}ClipDiagonalBound(e,n,r,i){if(e>=0&&er||e===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=e,this.endColumn=n):(this.startLineNumber=e,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return de.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return de.containsPosition(this,e)}static containsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.columne.endColumn)}static strictContainsPosition(e,n){return!(n.lineNumbere.endLineNumber||n.lineNumber===e.startLineNumber&&n.column<=e.startColumn||n.lineNumber===e.endLineNumber&&n.column>=e.endColumn)}containsRange(e){return de.containsRange(this,e)}static containsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumne.endColumn)}strictContainsRange(e){return de.strictContainsRange(this,e)}static strictContainsRange(e,n){return!(n.startLineNumbere.endLineNumber||n.endLineNumber>e.endLineNumber||n.startLineNumber===e.startLineNumber&&n.startColumn<=e.startColumn||n.endLineNumber===e.endLineNumber&&n.endColumn>=e.endColumn)}plusRange(e){return de.plusRange(this,e)}static plusRange(e,n){let r,i,s,a;return n.startLineNumbere.endLineNumber?(s=n.endLineNumber,a=n.endColumn):n.endLineNumber===e.endLineNumber?(s=n.endLineNumber,a=Math.max(n.endColumn,e.endColumn)):(s=e.endLineNumber,a=e.endColumn),new de(r,i,s,a)}intersectRanges(e){return de.intersectRanges(this,e)}static intersectRanges(e,n){let r=e.startLineNumber,i=e.startColumn,s=e.endLineNumber,a=e.endColumn;const o=n.startLineNumber,l=n.startColumn,c=n.endLineNumber,d=n.endColumn;return rc?(s=c,a=d):s===c&&(a=Math.min(a,d)),r>s||r===s&&i>a?null:new de(r,i,s,a)}equalsRange(e){return de.equalsRange(this,e)}static equalsRange(e,n){return!e&&!n?!0:!!e&&!!n&&e.startLineNumber===n.startLineNumber&&e.startColumn===n.startColumn&&e.endLineNumber===n.endLineNumber&&e.endColumn===n.endColumn}getEndPosition(){return de.getEndPosition(this)}static getEndPosition(e){return new re(e.endLineNumber,e.endColumn)}getStartPosition(){return de.getStartPosition(this)}static getStartPosition(e){return new re(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,n){return new de(this.startLineNumber,this.startColumn,e,n)}setStartPosition(e,n){return new de(e,n,this.endLineNumber,this.endColumn)}collapseToStart(){return de.collapseToStart(this)}static collapseToStart(e){return new de(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}collapseToEnd(){return de.collapseToEnd(this)}static collapseToEnd(e){return new de(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn)}delta(e){return new de(this.startLineNumber+e,this.startColumn,this.endLineNumber+e,this.endColumn)}isSingleLine(){return this.startLineNumber===this.endLineNumber}static fromPositions(e,n=e){return new de(e.lineNumber,e.column,n.lineNumber,n.column)}static lift(e){return e?new de(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return!!e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,n){return!(e.endLineNumbere.startLineNumber}toJSON(){return this}};function ks(t){return t<0?0:t>255?255:t|0}function Dt(t){return t<0?0:t>4294967295?4294967295:t|0}class qi{constructor(e){const n=ks(e);this._defaultValue=n,this._asciiMap=qi._createAsciiMap(n),this._map=new Map}static _createAsciiMap(e){const n=new Uint8Array(256);return n.fill(e),n}set(e,n){const r=ks(n);e>=0&&e<256?this._asciiMap[e]=r:this._map.set(e,r)}get(e){return e>=0&&e<256?this._asciiMap[e]:this._map.get(e)||this._defaultValue}clear(){this._asciiMap.fill(this._defaultValue),this._map.clear()}}class zh{constructor(e,n,r){const i=new Uint8Array(e*n);for(let s=0,a=e*n;sn&&(n=l),o>r&&(r=o),c>r&&(r=c)}n++,r++;const i=new zh(r,n,0);for(let s=0,a=e.length;s=this._maxCharCode?0:this._states.get(e,n)}}let Dr=null;function Th(){return Dr===null&&(Dr=new Ph([[1,104,2],[1,72,2],[1,102,6],[1,70,6],[2,116,3],[2,84,3],[3,116,4],[3,84,4],[4,112,5],[4,80,5],[5,115,9],[5,83,9],[5,58,10],[6,105,7],[6,73,7],[7,108,8],[7,76,8],[8,101,9],[8,69,9],[9,58,10],[10,47,11],[11,47,12]])),Dr}let Zt=null;function Oh(){if(Zt===null){Zt=new qi(0);const t=` <>'"、。。、,.:;‘〈「『〔([{「」}])〕』」〉’`~…|`;for(let n=0;ni);if(i>0){const o=n.charCodeAt(i-1),l=n.charCodeAt(a);(o===40&&l===41||o===91&&l===93||o===123&&l===125)&&a--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:a+2},url:n.substring(i,a+1)}}static computeLinks(e,n=Th()){const r=Oh(),i=[];for(let s=1,a=e.getLineCount();s<=a;s++){const o=e.getLineContent(s),l=o.length;let c=0,d=0,u=0,m=1,f=!1,g=!1,b=!1,k=!1;for(;c=0?(i+=r?1:-1,i<0?i=e.length-1:i%=e.length,e[i]):null}}const Zl=Object.freeze(function(t,e){const n=setTimeout(t.bind(e),0);return{dispose(){clearTimeout(n)}}});var tr;(function(t){function e(n){return n===t.None||n===t.Cancelled||n instanceof Bn?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}t.isCancellationToken=e,t.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Jr.None}),t.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Zl})})(tr||(tr={}));class Bn{constructor(){this._isCancelled=!1,this._emitter=null}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?Zl:(this._emitter||(this._emitter=new Ue),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Vh{constructor(e){this._token=void 0,this._parentListener=void 0,this._parentListener=e&&e.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Bn),this._token}cancel(){this._token?this._token instanceof Bn&&this._token.cancel():this._token=tr.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener?.dispose(),this._token?this._token instanceof Bn&&this._token.dispose():this._token=tr.None}}class Hi{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(e,n){this._keyCodeToStr[e]=n,this._strToKeyCode[n.toLowerCase()]=e}keyCodeToStr(e){return this._keyCodeToStr[e]}strToKeyCode(e){return this._strToKeyCode[e.toLowerCase()]||0}}const qn=new Hi,Zr=new Hi,ei=new Hi,$h=new Array(230),Uh=Object.create(null),Bh=Object.create(null);(function(){const e=[[1,0,"None",0,"unknown",0,"VK_UNKNOWN","",""],[1,1,"Hyper",0,"",0,"","",""],[1,2,"Super",0,"",0,"","",""],[1,3,"Fn",0,"",0,"","",""],[1,4,"FnLock",0,"",0,"","",""],[1,5,"Suspend",0,"",0,"","",""],[1,6,"Resume",0,"",0,"","",""],[1,7,"Turbo",0,"",0,"","",""],[1,8,"Sleep",0,"",0,"VK_SLEEP","",""],[1,9,"WakeUp",0,"",0,"","",""],[0,10,"KeyA",31,"A",65,"VK_A","",""],[0,11,"KeyB",32,"B",66,"VK_B","",""],[0,12,"KeyC",33,"C",67,"VK_C","",""],[0,13,"KeyD",34,"D",68,"VK_D","",""],[0,14,"KeyE",35,"E",69,"VK_E","",""],[0,15,"KeyF",36,"F",70,"VK_F","",""],[0,16,"KeyG",37,"G",71,"VK_G","",""],[0,17,"KeyH",38,"H",72,"VK_H","",""],[0,18,"KeyI",39,"I",73,"VK_I","",""],[0,19,"KeyJ",40,"J",74,"VK_J","",""],[0,20,"KeyK",41,"K",75,"VK_K","",""],[0,21,"KeyL",42,"L",76,"VK_L","",""],[0,22,"KeyM",43,"M",77,"VK_M","",""],[0,23,"KeyN",44,"N",78,"VK_N","",""],[0,24,"KeyO",45,"O",79,"VK_O","",""],[0,25,"KeyP",46,"P",80,"VK_P","",""],[0,26,"KeyQ",47,"Q",81,"VK_Q","",""],[0,27,"KeyR",48,"R",82,"VK_R","",""],[0,28,"KeyS",49,"S",83,"VK_S","",""],[0,29,"KeyT",50,"T",84,"VK_T","",""],[0,30,"KeyU",51,"U",85,"VK_U","",""],[0,31,"KeyV",52,"V",86,"VK_V","",""],[0,32,"KeyW",53,"W",87,"VK_W","",""],[0,33,"KeyX",54,"X",88,"VK_X","",""],[0,34,"KeyY",55,"Y",89,"VK_Y","",""],[0,35,"KeyZ",56,"Z",90,"VK_Z","",""],[0,36,"Digit1",22,"1",49,"VK_1","",""],[0,37,"Digit2",23,"2",50,"VK_2","",""],[0,38,"Digit3",24,"3",51,"VK_3","",""],[0,39,"Digit4",25,"4",52,"VK_4","",""],[0,40,"Digit5",26,"5",53,"VK_5","",""],[0,41,"Digit6",27,"6",54,"VK_6","",""],[0,42,"Digit7",28,"7",55,"VK_7","",""],[0,43,"Digit8",29,"8",56,"VK_8","",""],[0,44,"Digit9",30,"9",57,"VK_9","",""],[0,45,"Digit0",21,"0",48,"VK_0","",""],[1,46,"Enter",3,"Enter",13,"VK_RETURN","",""],[1,47,"Escape",9,"Escape",27,"VK_ESCAPE","",""],[1,48,"Backspace",1,"Backspace",8,"VK_BACK","",""],[1,49,"Tab",2,"Tab",9,"VK_TAB","",""],[1,50,"Space",10,"Space",32,"VK_SPACE","",""],[0,51,"Minus",88,"-",189,"VK_OEM_MINUS","-","OEM_MINUS"],[0,52,"Equal",86,"=",187,"VK_OEM_PLUS","=","OEM_PLUS"],[0,53,"BracketLeft",92,"[",219,"VK_OEM_4","[","OEM_4"],[0,54,"BracketRight",94,"]",221,"VK_OEM_6","]","OEM_6"],[0,55,"Backslash",93,"\\",220,"VK_OEM_5","\\","OEM_5"],[0,56,"IntlHash",0,"",0,"","",""],[0,57,"Semicolon",85,";",186,"VK_OEM_1",";","OEM_1"],[0,58,"Quote",95,"'",222,"VK_OEM_7","'","OEM_7"],[0,59,"Backquote",91,"`",192,"VK_OEM_3","`","OEM_3"],[0,60,"Comma",87,",",188,"VK_OEM_COMMA",",","OEM_COMMA"],[0,61,"Period",89,".",190,"VK_OEM_PERIOD",".","OEM_PERIOD"],[0,62,"Slash",90,"/",191,"VK_OEM_2","/","OEM_2"],[1,63,"CapsLock",8,"CapsLock",20,"VK_CAPITAL","",""],[1,64,"F1",59,"F1",112,"VK_F1","",""],[1,65,"F2",60,"F2",113,"VK_F2","",""],[1,66,"F3",61,"F3",114,"VK_F3","",""],[1,67,"F4",62,"F4",115,"VK_F4","",""],[1,68,"F5",63,"F5",116,"VK_F5","",""],[1,69,"F6",64,"F6",117,"VK_F6","",""],[1,70,"F7",65,"F7",118,"VK_F7","",""],[1,71,"F8",66,"F8",119,"VK_F8","",""],[1,72,"F9",67,"F9",120,"VK_F9","",""],[1,73,"F10",68,"F10",121,"VK_F10","",""],[1,74,"F11",69,"F11",122,"VK_F11","",""],[1,75,"F12",70,"F12",123,"VK_F12","",""],[1,76,"PrintScreen",0,"",0,"","",""],[1,77,"ScrollLock",84,"ScrollLock",145,"VK_SCROLL","",""],[1,78,"Pause",7,"PauseBreak",19,"VK_PAUSE","",""],[1,79,"Insert",19,"Insert",45,"VK_INSERT","",""],[1,80,"Home",14,"Home",36,"VK_HOME","",""],[1,81,"PageUp",11,"PageUp",33,"VK_PRIOR","",""],[1,82,"Delete",20,"Delete",46,"VK_DELETE","",""],[1,83,"End",13,"End",35,"VK_END","",""],[1,84,"PageDown",12,"PageDown",34,"VK_NEXT","",""],[1,85,"ArrowRight",17,"RightArrow",39,"VK_RIGHT","Right",""],[1,86,"ArrowLeft",15,"LeftArrow",37,"VK_LEFT","Left",""],[1,87,"ArrowDown",18,"DownArrow",40,"VK_DOWN","Down",""],[1,88,"ArrowUp",16,"UpArrow",38,"VK_UP","Up",""],[1,89,"NumLock",83,"NumLock",144,"VK_NUMLOCK","",""],[1,90,"NumpadDivide",113,"NumPad_Divide",111,"VK_DIVIDE","",""],[1,91,"NumpadMultiply",108,"NumPad_Multiply",106,"VK_MULTIPLY","",""],[1,92,"NumpadSubtract",111,"NumPad_Subtract",109,"VK_SUBTRACT","",""],[1,93,"NumpadAdd",109,"NumPad_Add",107,"VK_ADD","",""],[1,94,"NumpadEnter",3,"",0,"","",""],[1,95,"Numpad1",99,"NumPad1",97,"VK_NUMPAD1","",""],[1,96,"Numpad2",100,"NumPad2",98,"VK_NUMPAD2","",""],[1,97,"Numpad3",101,"NumPad3",99,"VK_NUMPAD3","",""],[1,98,"Numpad4",102,"NumPad4",100,"VK_NUMPAD4","",""],[1,99,"Numpad5",103,"NumPad5",101,"VK_NUMPAD5","",""],[1,100,"Numpad6",104,"NumPad6",102,"VK_NUMPAD6","",""],[1,101,"Numpad7",105,"NumPad7",103,"VK_NUMPAD7","",""],[1,102,"Numpad8",106,"NumPad8",104,"VK_NUMPAD8","",""],[1,103,"Numpad9",107,"NumPad9",105,"VK_NUMPAD9","",""],[1,104,"Numpad0",98,"NumPad0",96,"VK_NUMPAD0","",""],[1,105,"NumpadDecimal",112,"NumPad_Decimal",110,"VK_DECIMAL","",""],[0,106,"IntlBackslash",97,"OEM_102",226,"VK_OEM_102","",""],[1,107,"ContextMenu",58,"ContextMenu",93,"","",""],[1,108,"Power",0,"",0,"","",""],[1,109,"NumpadEqual",0,"",0,"","",""],[1,110,"F13",71,"F13",124,"VK_F13","",""],[1,111,"F14",72,"F14",125,"VK_F14","",""],[1,112,"F15",73,"F15",126,"VK_F15","",""],[1,113,"F16",74,"F16",127,"VK_F16","",""],[1,114,"F17",75,"F17",128,"VK_F17","",""],[1,115,"F18",76,"F18",129,"VK_F18","",""],[1,116,"F19",77,"F19",130,"VK_F19","",""],[1,117,"F20",78,"F20",131,"VK_F20","",""],[1,118,"F21",79,"F21",132,"VK_F21","",""],[1,119,"F22",80,"F22",133,"VK_F22","",""],[1,120,"F23",81,"F23",134,"VK_F23","",""],[1,121,"F24",82,"F24",135,"VK_F24","",""],[1,122,"Open",0,"",0,"","",""],[1,123,"Help",0,"",0,"","",""],[1,124,"Select",0,"",0,"","",""],[1,125,"Again",0,"",0,"","",""],[1,126,"Undo",0,"",0,"","",""],[1,127,"Cut",0,"",0,"","",""],[1,128,"Copy",0,"",0,"","",""],[1,129,"Paste",0,"",0,"","",""],[1,130,"Find",0,"",0,"","",""],[1,131,"AudioVolumeMute",117,"AudioVolumeMute",173,"VK_VOLUME_MUTE","",""],[1,132,"AudioVolumeUp",118,"AudioVolumeUp",175,"VK_VOLUME_UP","",""],[1,133,"AudioVolumeDown",119,"AudioVolumeDown",174,"VK_VOLUME_DOWN","",""],[1,134,"NumpadComma",110,"NumPad_Separator",108,"VK_SEPARATOR","",""],[0,135,"IntlRo",115,"ABNT_C1",193,"VK_ABNT_C1","",""],[1,136,"KanaMode",0,"",0,"","",""],[0,137,"IntlYen",0,"",0,"","",""],[1,138,"Convert",0,"",0,"","",""],[1,139,"NonConvert",0,"",0,"","",""],[1,140,"Lang1",0,"",0,"","",""],[1,141,"Lang2",0,"",0,"","",""],[1,142,"Lang3",0,"",0,"","",""],[1,143,"Lang4",0,"",0,"","",""],[1,144,"Lang5",0,"",0,"","",""],[1,145,"Abort",0,"",0,"","",""],[1,146,"Props",0,"",0,"","",""],[1,147,"NumpadParenLeft",0,"",0,"","",""],[1,148,"NumpadParenRight",0,"",0,"","",""],[1,149,"NumpadBackspace",0,"",0,"","",""],[1,150,"NumpadMemoryStore",0,"",0,"","",""],[1,151,"NumpadMemoryRecall",0,"",0,"","",""],[1,152,"NumpadMemoryClear",0,"",0,"","",""],[1,153,"NumpadMemoryAdd",0,"",0,"","",""],[1,154,"NumpadMemorySubtract",0,"",0,"","",""],[1,155,"NumpadClear",131,"Clear",12,"VK_CLEAR","",""],[1,156,"NumpadClearEntry",0,"",0,"","",""],[1,0,"",5,"Ctrl",17,"VK_CONTROL","",""],[1,0,"",4,"Shift",16,"VK_SHIFT","",""],[1,0,"",6,"Alt",18,"VK_MENU","",""],[1,0,"",57,"Meta",91,"VK_COMMAND","",""],[1,157,"ControlLeft",5,"",0,"VK_LCONTROL","",""],[1,158,"ShiftLeft",4,"",0,"VK_LSHIFT","",""],[1,159,"AltLeft",6,"",0,"VK_LMENU","",""],[1,160,"MetaLeft",57,"",0,"VK_LWIN","",""],[1,161,"ControlRight",5,"",0,"VK_RCONTROL","",""],[1,162,"ShiftRight",4,"",0,"VK_RSHIFT","",""],[1,163,"AltRight",6,"",0,"VK_RMENU","",""],[1,164,"MetaRight",57,"",0,"VK_RWIN","",""],[1,165,"BrightnessUp",0,"",0,"","",""],[1,166,"BrightnessDown",0,"",0,"","",""],[1,167,"MediaPlay",0,"",0,"","",""],[1,168,"MediaRecord",0,"",0,"","",""],[1,169,"MediaFastForward",0,"",0,"","",""],[1,170,"MediaRewind",0,"",0,"","",""],[1,171,"MediaTrackNext",124,"MediaTrackNext",176,"VK_MEDIA_NEXT_TRACK","",""],[1,172,"MediaTrackPrevious",125,"MediaTrackPrevious",177,"VK_MEDIA_PREV_TRACK","",""],[1,173,"MediaStop",126,"MediaStop",178,"VK_MEDIA_STOP","",""],[1,174,"Eject",0,"",0,"","",""],[1,175,"MediaPlayPause",127,"MediaPlayPause",179,"VK_MEDIA_PLAY_PAUSE","",""],[1,176,"MediaSelect",128,"LaunchMediaPlayer",181,"VK_MEDIA_LAUNCH_MEDIA_SELECT","",""],[1,177,"LaunchMail",129,"LaunchMail",180,"VK_MEDIA_LAUNCH_MAIL","",""],[1,178,"LaunchApp2",130,"LaunchApp2",183,"VK_MEDIA_LAUNCH_APP2","",""],[1,179,"LaunchApp1",0,"",0,"VK_MEDIA_LAUNCH_APP1","",""],[1,180,"SelectTask",0,"",0,"","",""],[1,181,"LaunchScreenSaver",0,"",0,"","",""],[1,182,"BrowserSearch",120,"BrowserSearch",170,"VK_BROWSER_SEARCH","",""],[1,183,"BrowserHome",121,"BrowserHome",172,"VK_BROWSER_HOME","",""],[1,184,"BrowserBack",122,"BrowserBack",166,"VK_BROWSER_BACK","",""],[1,185,"BrowserForward",123,"BrowserForward",167,"VK_BROWSER_FORWARD","",""],[1,186,"BrowserStop",0,"",0,"VK_BROWSER_STOP","",""],[1,187,"BrowserRefresh",0,"",0,"VK_BROWSER_REFRESH","",""],[1,188,"BrowserFavorites",0,"",0,"VK_BROWSER_FAVORITES","",""],[1,189,"ZoomToggle",0,"",0,"","",""],[1,190,"MailReply",0,"",0,"","",""],[1,191,"MailForward",0,"",0,"","",""],[1,192,"MailSend",0,"",0,"","",""],[1,0,"",114,"KeyInComposition",229,"","",""],[1,0,"",116,"ABNT_C2",194,"VK_ABNT_C2","",""],[1,0,"",96,"OEM_8",223,"VK_OEM_8","",""],[1,0,"",0,"",0,"VK_KANA","",""],[1,0,"",0,"",0,"VK_HANGUL","",""],[1,0,"",0,"",0,"VK_JUNJA","",""],[1,0,"",0,"",0,"VK_FINAL","",""],[1,0,"",0,"",0,"VK_HANJA","",""],[1,0,"",0,"",0,"VK_KANJI","",""],[1,0,"",0,"",0,"VK_CONVERT","",""],[1,0,"",0,"",0,"VK_NONCONVERT","",""],[1,0,"",0,"",0,"VK_ACCEPT","",""],[1,0,"",0,"",0,"VK_MODECHANGE","",""],[1,0,"",0,"",0,"VK_SELECT","",""],[1,0,"",0,"",0,"VK_PRINT","",""],[1,0,"",0,"",0,"VK_EXECUTE","",""],[1,0,"",0,"",0,"VK_SNAPSHOT","",""],[1,0,"",0,"",0,"VK_HELP","",""],[1,0,"",0,"",0,"VK_APPS","",""],[1,0,"",0,"",0,"VK_PROCESSKEY","",""],[1,0,"",0,"",0,"VK_PACKET","",""],[1,0,"",0,"",0,"VK_DBE_SBCSCHAR","",""],[1,0,"",0,"",0,"VK_DBE_DBCSCHAR","",""],[1,0,"",0,"",0,"VK_ATTN","",""],[1,0,"",0,"",0,"VK_CRSEL","",""],[1,0,"",0,"",0,"VK_EXSEL","",""],[1,0,"",0,"",0,"VK_EREOF","",""],[1,0,"",0,"",0,"VK_PLAY","",""],[1,0,"",0,"",0,"VK_ZOOM","",""],[1,0,"",0,"",0,"VK_NONAME","",""],[1,0,"",0,"",0,"VK_PA1","",""],[1,0,"",0,"",0,"VK_OEM_CLEAR","",""]],n=[],r=[];for(const i of e){const[s,a,o,l,c,d,u,m,f]=i;if(r[a]||(r[a]=!0,Uh[o]=a,Bh[o.toLowerCase()]=a),!n[l]){if(n[l]=!0,!c)throw new Error(`String representation missing for key code ${l} around scan code ${o}`);qn.define(l,c),Zr.define(l,m||c),ei.define(l,f||m||c)}d&&($h[d]=l)}})();var _s;(function(t){function e(o){return qn.keyCodeToStr(o)}t.toString=e;function n(o){return qn.strToKeyCode(o)}t.fromString=n;function r(o){return Zr.keyCodeToStr(o)}t.toUserSettingsUS=r;function i(o){return ei.keyCodeToStr(o)}t.toUserSettingsGeneral=i;function s(o){return Zr.strToKeyCode(o)||ei.strToKeyCode(o)}t.fromUserSettings=s;function a(o){if(o>=98&&o<=113)return null;switch(o){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return qn.keyCodeToStr(o)}t.toElectronAccelerator=a})(_s||(_s={}));function qh(t,e){const n=(e&65535)<<16>>>0;return(t|n)>>>0}var Es={};let Ut;const Ir=globalThis.vscode;if(typeof Ir<"u"&&typeof Ir.process<"u"){const t=Ir.process;Ut={get platform(){return t.platform},get arch(){return t.arch},get env(){return t.env},cwd(){return t.cwd()}}}else typeof process<"u"&&typeof process?.versions?.node=="string"?Ut={get platform(){return process.platform},get arch(){return process.arch},get env(){return Es},cwd(){return Es.VSCODE_CWD||process.cwd()}}:Ut={get platform(){return gn?"win32":lh?"darwin":"linux"},get arch(){},get env(){return{}},cwd(){return"/"}};const nr=Ut.cwd,jh=Ut.env,Hh=Ut.platform,Gh=65,Jh=97,Xh=90,Yh=122,Ct=46,fe=47,Ce=92,Ge=58,Qh=63;class ec extends Error{constructor(e,n,r){let i;typeof n=="string"&&n.indexOf("not ")===0?(i="must not be",n=n.replace(/^not /,"")):i="must be";const s=e.indexOf(".")!==-1?"property":"argument";let a=`The "${e}" ${s} ${i} of type ${n}`;a+=`. Received type ${typeof r}`,super(a),this.code="ERR_INVALID_ARG_TYPE"}}function Kh(t,e){if(t===null||typeof t!="object")throw new ec(e,"Object",t)}function ce(t,e){if(typeof t!="string")throw new ec(e,"string",t)}const ft=Hh==="win32";function X(t){return t===fe||t===Ce}function ti(t){return t===fe}function Je(t){return t>=Gh&&t<=Xh||t>=Jh&&t<=Yh}function rr(t,e,n,r){let i="",s=0,a=-1,o=0,l=0;for(let c=0;c<=t.length;++c){if(c2){const d=i.lastIndexOf(n);d===-1?(i="",s=0):(i=i.slice(0,d),s=i.length-1-i.lastIndexOf(n)),a=c,o=0;continue}else if(i.length!==0){i="",s=0,a=c,o=0;continue}}e&&(i+=i.length>0?`${n}..`:"..",s=2)}else i.length>0?i+=`${n}${t.slice(a+1,c)}`:i=t.slice(a+1,c),s=c-a-1;a=c,o=0}else l===Ct&&o!==-1?++o:o=-1}return i}function Zh(t){return t?`${t[0]==="."?"":"."}${t}`:""}function tc(t,e){Kh(e,"pathObject");const n=e.dir||e.root,r=e.base||`${e.name||""}${Zh(e.ext)}`;return n?n===e.root?`${n}${r}`:`${n}${t}${r}`:r}const Se={resolve(...t){let e="",n="",r=!1;for(let i=t.length-1;i>=-1;i--){let s;if(i>=0){if(s=t[i],ce(s,`paths[${i}]`),s.length===0)continue}else e.length===0?s=nr():(s=jh[`=${e}`]||nr(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Ce)&&(s=`${e}\\`));const a=s.length;let o=0,l="",c=!1;const d=s.charCodeAt(0);if(a===1)X(d)&&(o=1,c=!0);else if(X(d))if(c=!0,X(s.charCodeAt(1))){let u=2,m=u;for(;u2&&X(s.charCodeAt(2))&&(c=!0,o=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(r){if(e.length>0)break}else if(n=`${s.slice(o)}\\${n}`,r=c,c&&e.length>0)break}return n=rr(n,!r,"\\",X),r?`${e}\\${n}`:`${e}${n}`||"."},normalize(t){ce(t,"path");const e=t.length;if(e===0)return".";let n=0,r,i=!1;const s=t.charCodeAt(0);if(e===1)return ti(s)?"\\":t;if(X(s))if(i=!0,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))&&(i=!0,n=3));let a=n0&&X(t.charCodeAt(e-1))&&(a+="\\"),!i&&r===void 0&&t.includes(":")){if(a.length>=2&&Je(a.charCodeAt(0))&&a.charCodeAt(1)===Ge)return`.\\${a}`;let o=t.indexOf(":");do if(o===e-1||X(t.charCodeAt(o+1)))return`.\\${a}`;while((o=t.indexOf(":",o+1))!==-1)}return r===void 0?i?`\\${a}`:a:i?`${r}\\${a}`:`${r}${a}`},isAbsolute(t){ce(t,"path");const e=t.length;if(e===0)return!1;const n=t.charCodeAt(0);return X(n)||e>2&&Je(n)&&t.charCodeAt(1)===Ge&&X(t.charCodeAt(2))},join(...t){if(t.length===0)return".";let e,n;for(let s=0;s0&&(e===void 0?e=n=a:e+=`\\${a}`)}if(e===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&X(n.charCodeAt(0))){++i;const s=n.length;s>1&&X(n.charCodeAt(1))&&(++i,s>2&&(X(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(e=`\\${e.slice(i)}`)}return Se.normalize(e)},relative(t,e){if(ce(t,"from"),ce(e,"to"),t===e)return"";const n=Se.resolve(t),r=Se.resolve(e);if(n===r||(t=n.toLowerCase(),e=r.toLowerCase(),t===e))return"";if(n.length!==t.length||r.length!==e.length){const g=n.split("\\"),b=r.split("\\");g[g.length-1]===""&&g.pop(),b[b.length-1]===""&&b.pop();const k=g.length,F=b.length,R=kR?b.slice(E).join("\\"):k>R?"..\\".repeat(k-1-E)+"..":"":"..\\".repeat(k-E)+b.slice(E).join("\\")}let i=0;for(;ii&&t.charCodeAt(s-1)===Ce;)s--;const a=s-i;let o=0;for(;oo&&e.charCodeAt(l-1)===Ce;)l--;const c=l-o,d=ad){if(e.charCodeAt(o+m)===Ce)return r.slice(o+m+1);if(m===2)return r.slice(o+m)}a>d&&(t.charCodeAt(i+m)===Ce?u=m:m===2&&(u=3)),u===-1&&(u=0)}let f="";for(m=i+u+1;m<=s;++m)(m===s||t.charCodeAt(m)===Ce)&&(f+=f.length===0?"..":"\\..");return o+=u,f.length>0?`${f}${r.slice(o,l)}`:(r.charCodeAt(o)===Ce&&++o,r.slice(o,l))},toNamespacedPath(t){if(typeof t!="string"||t.length===0)return t;const e=Se.resolve(t);if(e.length<=2)return t;if(e.charCodeAt(0)===Ce){if(e.charCodeAt(1)===Ce){const n=e.charCodeAt(2);if(n!==Qh&&n!==Ct)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Je(e.charCodeAt(0))&&e.charCodeAt(1)===Ge&&e.charCodeAt(2)===Ce)return`\\\\?\\${e}`;return e},dirname(t){ce(t,"path");const e=t.length;if(e===0)return".";let n=-1,r=0;const i=t.charCodeAt(0);if(e===1)return X(i)?t:".";if(X(i)){if(n=r=1,X(t.charCodeAt(1))){let o=2,l=o;for(;o2&&X(t.charCodeAt(2))?3:2,r=n);let s=-1,a=!0;for(let o=e-1;o>=r;--o)if(X(t.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(n===-1)return".";s=n}return t.slice(0,s)},basename(t,e){e!==void 0&&ce(e,"suffix"),ce(t,"path");let n=0,r=-1,i=!0,s;if(t.length>=2&&Je(t.charCodeAt(0))&&t.charCodeAt(1)===Ge&&(n=2),e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=n;--s){const l=t.charCodeAt(s);if(X(l)){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=n;--s)if(X(t.charCodeAt(s))){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){ce(t,"path");let e=0,n=-1,r=0,i=-1,s=!0,a=0;t.length>=2&&t.charCodeAt(1)===Ge&&Je(t.charCodeAt(0))&&(e=r=2);for(let o=t.length-1;o>=e;--o){const l=t.charCodeAt(o);if(X(l)){if(!s){r=o+1;break}continue}i===-1&&(s=!1,i=o+1),l===Ct?n===-1?n=o:a!==1&&(a=1):n!==-1&&(a=-1)}return n===-1||i===-1||a===0||a===1&&n===i-1&&n===r+1?"":t.slice(n,i)},format:tc.bind(null,"\\"),parse(t){ce(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.length;let r=0,i=t.charCodeAt(0);if(n===1)return X(i)?(e.root=e.dir=t,e):(e.base=e.name=t,e);if(X(i)){if(r=1,X(t.charCodeAt(1))){let u=2,m=u;for(;u0&&(e.root=t.slice(0,r));let s=-1,a=r,o=-1,l=!0,c=t.length-1,d=0;for(;c>=r;--c){if(i=t.charCodeAt(c),X(i)){if(!l){a=c+1;break}continue}o===-1&&(l=!1,o=c+1),i===Ct?s===-1?s=c:d!==1&&(d=1):s!==-1&&(d=-1)}return o!==-1&&(s===-1||d===0||d===1&&s===o-1&&s===a+1?e.base=e.name=t.slice(a,o):(e.name=t.slice(a,s),e.base=t.slice(a,o),e.ext=t.slice(s,o))),a>0&&a!==r?e.dir=t.slice(0,a-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},ed=(()=>{if(ft){const t=/\\/g;return()=>{const e=nr().replace(t,"/");return e.slice(e.indexOf("/"))}}return()=>nr()})(),_e={resolve(...t){let e="",n=!1;for(let r=t.length-1;r>=0&&!n;r--){const i=t[r];ce(i,`paths[${r}]`),i.length!==0&&(e=`${i}/${e}`,n=i.charCodeAt(0)===fe)}if(!n){const r=ed();e=`${r}/${e}`,n=r.charCodeAt(0)===fe}return e=rr(e,!n,"/",ti),n?`/${e}`:e.length>0?e:"."},normalize(t){if(ce(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===fe,n=t.charCodeAt(t.length-1)===fe;return t=rr(t,!e,"/",ti),t.length===0?e?"/":n?"./":".":(n&&(t+="/"),e?`/${t}`:t)},isAbsolute(t){return ce(t,"path"),t.length>0&&t.charCodeAt(0)===fe},join(...t){if(t.length===0)return".";const e=[];for(let n=0;n0&&e.push(r)}return e.length===0?".":_e.normalize(e.join("/"))},relative(t,e){if(ce(t,"from"),ce(e,"to"),t===e||(t=_e.resolve(t),e=_e.resolve(e),t===e))return"";const n=1,r=t.length,i=r-n,s=1,a=e.length-s,o=io){if(e.charCodeAt(s+c)===fe)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else i>o&&(t.charCodeAt(n+c)===fe?l=c:c===0&&(l=0));let d="";for(c=n+l+1;c<=r;++c)(c===r||t.charCodeAt(c)===fe)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(s+l)}`},toNamespacedPath(t){return t},dirname(t){if(ce(t,"path"),t.length===0)return".";const e=t.charCodeAt(0)===fe;let n=-1,r=!0;for(let i=t.length-1;i>=1;--i)if(t.charCodeAt(i)===fe){if(!r){n=i;break}}else r=!1;return n===-1?e?"/":".":e&&n===1?"//":t.slice(0,n)},basename(t,e){e!==void 0&&ce(e,"suffix"),ce(t,"path");let n=0,r=-1,i=!0,s;if(e!==void 0&&e.length>0&&e.length<=t.length){if(e===t)return"";let a=e.length-1,o=-1;for(s=t.length-1;s>=0;--s){const l=t.charCodeAt(s);if(l===fe){if(!i){n=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(l===e.charCodeAt(a)?--a===-1&&(r=s):(a=-1,r=o))}return n===r?r=o:r===-1&&(r=t.length),t.slice(n,r)}for(s=t.length-1;s>=0;--s)if(t.charCodeAt(s)===fe){if(!i){n=s+1;break}}else r===-1&&(i=!1,r=s+1);return r===-1?"":t.slice(n,r)},extname(t){ce(t,"path");let e=-1,n=0,r=-1,i=!0,s=0;for(let a=t.length-1;a>=0;--a){const o=t[a];if(o==="/"){if(!i){n=a+1;break}continue}r===-1&&(i=!1,r=a+1),o==="."?e===-1?e=a:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||r===-1||s===0||s===1&&e===r-1&&e===n+1?"":t.slice(e,r)},format:tc.bind(null,"/"),parse(t){ce(t,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(t.length===0)return e;const n=t.charCodeAt(0)===fe;let r;n?(e.root="/",r=1):r=0;let i=-1,s=0,a=-1,o=!0,l=t.length-1,c=0;for(;l>=r;--l){const d=t.charCodeAt(l);if(d===fe){if(!o){s=l+1;break}continue}a===-1&&(o=!1,a=l+1),d===Ct?i===-1?i=l:c!==1&&(c=1):i!==-1&&(c=-1)}if(a!==-1){const d=s===0&&n?1:s;i===-1||c===0||c===1&&i===a-1&&i===s+1?e.base=e.name=t.slice(d,a):(e.name=t.slice(d,i),e.base=t.slice(d,a),e.ext=t.slice(i,a))}return s>0?e.dir=t.slice(0,s-1):n&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};_e.win32=Se.win32=Se;_e.posix=Se.posix=_e;ft?Se.normalize:_e.normalize;ft?Se.resolve:_e.resolve;ft?Se.relative:_e.relative;ft?Se.dirname:_e.dirname;ft?Se.basename:_e.basename;ft?Se.extname:_e.extname;ft?Se.sep:_e.sep;const td=/^\w[\w\d+.-]*$/,nd=/^\//,rd=/^\/\//;function id(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!td.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path){if(t.authority){if(!nd.test(t.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(rd.test(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function sd(t,e){return!t&&!e?"file":t}function ad(t,e){switch(t){case"https":case"http":case"file":e?e[0]!==We&&(e=We+e):e=We;break}return e}const ie="",We="/",od=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;let Gi=class jn{static isUri(e){return e instanceof jn?!0:!e||typeof e!="object"?!1:typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function"}constructor(e,n,r,i,s,a=!1){typeof e=="object"?(this.scheme=e.scheme||ie,this.authority=e.authority||ie,this.path=e.path||ie,this.query=e.query||ie,this.fragment=e.fragment||ie):(this.scheme=sd(e,a),this.authority=n||ie,this.path=ad(this.scheme,r||ie),this.query=i||ie,this.fragment=s||ie,id(this,a))}get fsPath(){return ni(this,!1)}with(e){if(!e)return this;let{scheme:n,authority:r,path:i,query:s,fragment:a}=e;return n===void 0?n=this.scheme:n===null&&(n=ie),r===void 0?r=this.authority:r===null&&(r=ie),i===void 0?i=this.path:i===null&&(i=ie),s===void 0?s=this.query:s===null&&(s=ie),a===void 0?a=this.fragment:a===null&&(a=ie),n===this.scheme&&r===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new It(n,r,i,s,a)}static parse(e,n=!1){const r=od.exec(e);return r?new It(r[2]||ie,In(r[4]||ie),In(r[5]||ie),In(r[7]||ie),In(r[9]||ie),n):new It(ie,ie,ie,ie,ie)}static file(e){let n=ie;if(gn&&(e=e.replace(/\\/g,We)),e[0]===We&&e[1]===We){const r=e.indexOf(We,2);r===-1?(n=e.substring(2),e=We):(n=e.substring(2,r),e=e.substring(r)||We)}return new It("file",n,e,ie,ie)}static from(e,n){return new It(e.scheme,e.authority,e.path,e.query,e.fragment,n)}static joinPath(e,...n){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return gn&&e.scheme==="file"?r=jn.file(Se.join(ni(e,!0),...n)).path:r=_e.join(e.path,...n),e.with({path:r})}toString(e=!1){return ri(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof jn)return e;{const n=new It(e);return n._formatted=e.external??null,n._fsPath=e._sep===nc?e.fsPath??null:null,n}}else return e}};const nc=gn?1:void 0;class It extends Gi{constructor(){super(...arguments),this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=ni(this,!1)),this._fsPath}toString(e=!1){return e?ri(this,!0):(this._formatted||(this._formatted=ri(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=nc),this._formatted&&(e.external=this._formatted),this.path&&(e.path=this.path),this.scheme&&(e.scheme=this.scheme),this.authority&&(e.authority=this.authority),this.query&&(e.query=this.query),this.fragment&&(e.fragment=this.fragment),e}}const rc={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function Fs(t,e,n){let r,i=-1;for(let s=0;s=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||e&&a===47||n&&a===91||n&&a===93||n&&a===58)i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r!==void 0&&(r+=t.charAt(s));else{r===void 0&&(r=t.substr(0,s));const o=rc[a];o!==void 0?(i!==-1&&(r+=encodeURIComponent(t.substring(i,s)),i=-1),r+=o):i===-1&&(i=s)}}return i!==-1&&(r+=encodeURIComponent(t.substring(i))),r!==void 0?r:t}function ld(t){let e;for(let n=0;n1&&t.scheme==="file"?n=`//${t.authority}${t.path}`:t.path.charCodeAt(0)===47&&(t.path.charCodeAt(1)>=65&&t.path.charCodeAt(1)<=90||t.path.charCodeAt(1)>=97&&t.path.charCodeAt(1)<=122)&&t.path.charCodeAt(2)===58?e?n=t.path.substr(1):n=t.path[1].toLowerCase()+t.path.substr(2):n=t.path,gn&&(n=n.replace(/\//g,"\\")),n}function ri(t,e){const n=e?ld:Fs;let r="",{scheme:i,authority:s,path:a,query:o,fragment:l}=t;if(i&&(r+=i,r+=":"),(s||i==="file")&&(r+=We,r+=We),s){let c=s.indexOf("@");if(c!==-1){const d=s.substr(0,c);s=s.substr(c+1),c=d.lastIndexOf(":"),c===-1?r+=n(d,!1,!1):(r+=n(d.substr(0,c),!1,!1),r+=":",r+=n(d.substr(c+1),!1,!0)),r+="@"}s=s.toLowerCase(),c=s.lastIndexOf(":"),c===-1?r+=n(s,!1,!0):(r+=n(s.substr(0,c),!1,!0),r+=s.substr(c))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const c=a.charCodeAt(1);c>=65&&c<=90&&(a=`/${String.fromCharCode(c+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const c=a.charCodeAt(0);c>=65&&c<=90&&(a=`${String.fromCharCode(c+32)}:${a.substr(2)}`)}r+=n(a,!0,!1)}return o&&(r+="?",r+=n(o,!1,!1)),l&&(r+="#",r+=e?l:Fs(l,!1,!1)),r}function ic(t){try{return decodeURIComponent(t)}catch{return t.length>3?t.substr(0,3)+ic(t.substr(3)):t}}const Rs=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function In(t){return t.match(Rs)?t.replace(Rs,e=>ic(e)):t}class Ee extends Y{constructor(e,n,r,i){super(e,n,r,i),this.selectionStartLineNumber=e,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(e){return Ee.selectionsEqual(this,e)}static selectionsEqual(e,n){return e.selectionStartLineNumber===n.selectionStartLineNumber&&e.selectionStartColumn===n.selectionStartColumn&&e.positionLineNumber===n.positionLineNumber&&e.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(e,n){return this.getDirection()===0?new Ee(this.startLineNumber,this.startColumn,e,n):new Ee(e,n,this.startLineNumber,this.startColumn)}getPosition(){return new re(this.positionLineNumber,this.positionColumn)}getSelectionStart(){return new re(this.selectionStartLineNumber,this.selectionStartColumn)}setStartPosition(e,n){return this.getDirection()===0?new Ee(e,n,this.endLineNumber,this.endColumn):new Ee(this.endLineNumber,this.endColumn,e,n)}static fromPositions(e,n=e){return new Ee(e.lineNumber,e.column,n.lineNumber,n.column)}static fromRange(e,n){return n===0?new Ee(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):new Ee(e.endLineNumber,e.endColumn,e.startLineNumber,e.startColumn)}static liftSelection(e){return new Ee(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn)}static selectionsArrEqual(e,n){if(e&&!n||!e&&n)return!1;if(!e&&!n)return!0;if(e.length!==n.length)return!1;for(let r=0,i=e.length;r{this._tokenizationSupports.get(e)===n&&(this._tokenizationSupports.delete(e),this.handleChange([e]))})}get(e){return this._tokenizationSupports.get(e)||null}registerFactory(e,n){this._factories.get(e)?.dispose();const r=new ud(this,e,n);return this._factories.set(e,r),Kn(()=>{const i=this._factories.get(e);!i||i!==r||(this._factories.delete(e),i.dispose())})}async getOrCreate(e){const n=this.get(e);if(n)return n;const r=this._factories.get(e);return!r||r.isResolved?null:(await r.resolve(),this.get(e))}isResolved(e){if(this.get(e))return!0;const r=this._factories.get(e);return!!(!r||r.isResolved)}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._tokenizationSupports.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class ud extends fn{get isResolved(){return this._isResolved}constructor(e,n,r){super(),this._registry=e,this._languageId=n,this._factory=r,this._isDisposed=!1,this._resolvePromise=null,this._isResolved=!1}dispose(){this._isDisposed=!0,super.dispose()}async resolve(){return this._resolvePromise||(this._resolvePromise=this._create()),this._resolvePromise}async _create(){const e=await this._factory.tokenizationSupport;this._isResolved=!0,e&&!this._isDisposed&&this._register(this._registry.register(this._languageId,e))}}class pd{constructor(e,n,r){this.offset=e,this.type=n,this.language=r,this._tokenBrand=void 0}toString(){return"("+this.offset+", "+this.type+")"}}var Ds;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(Ds||(Ds={}));var Is;(function(t){const e=new Map;e.set(0,U.symbolMethod),e.set(1,U.symbolFunction),e.set(2,U.symbolConstructor),e.set(3,U.symbolField),e.set(4,U.symbolVariable),e.set(5,U.symbolClass),e.set(6,U.symbolStruct),e.set(7,U.symbolInterface),e.set(8,U.symbolModule),e.set(9,U.symbolProperty),e.set(10,U.symbolEvent),e.set(11,U.symbolOperator),e.set(12,U.symbolUnit),e.set(13,U.symbolValue),e.set(15,U.symbolEnum),e.set(14,U.symbolConstant),e.set(15,U.symbolEnum),e.set(16,U.symbolEnumMember),e.set(17,U.symbolKeyword),e.set(28,U.symbolSnippet),e.set(18,U.symbolText),e.set(19,U.symbolColor),e.set(20,U.symbolFile),e.set(21,U.symbolReference),e.set(22,U.symbolCustomColor),e.set(23,U.symbolFolder),e.set(24,U.symbolTypeParameter),e.set(25,U.account),e.set(26,U.issues),e.set(27,U.tools);function n(a){let o=e.get(a);return o||(console.info("No codicon found for CompletionItemKind "+a),o=U.symbolProperty),o}t.toIcon=n;function r(a){switch(a){case 0:return B(728,"Method");case 1:return B(729,"Function");case 2:return B(730,"Constructor");case 3:return B(731,"Field");case 4:return B(732,"Variable");case 5:return B(733,"Class");case 6:return B(734,"Struct");case 7:return B(735,"Interface");case 8:return B(736,"Module");case 9:return B(737,"Property");case 10:return B(738,"Event");case 11:return B(739,"Operator");case 12:return B(740,"Unit");case 13:return B(741,"Value");case 14:return B(742,"Constant");case 15:return B(743,"Enum");case 16:return B(744,"Enum Member");case 17:return B(745,"Keyword");case 18:return B(746,"Text");case 19:return B(747,"Color");case 20:return B(748,"File");case 21:return B(749,"Reference");case 22:return B(750,"Custom Color");case 23:return B(751,"Folder");case 24:return B(752,"Type Parameter");case 25:return B(753,"User");case 26:return B(754,"Issue");case 27:return B(755,"Tool");case 28:return B(756,"Snippet");default:return""}}t.toLabel=r;const i=new Map;i.set("method",0),i.set("function",1),i.set("constructor",2),i.set("field",3),i.set("variable",4),i.set("class",5),i.set("struct",6),i.set("interface",7),i.set("module",8),i.set("property",9),i.set("event",10),i.set("operator",11),i.set("unit",12),i.set("value",13),i.set("constant",14),i.set("enum",15),i.set("enum-member",16),i.set("enumMember",16),i.set("keyword",17),i.set("snippet",28),i.set("text",18),i.set("color",19),i.set("file",20),i.set("reference",21),i.set("customcolor",22),i.set("folder",23),i.set("type-parameter",24),i.set("typeParameter",24),i.set("account",25),i.set("issue",26),i.set("tool",27);function s(a,o){let l=i.get(a);return typeof l>"u"&&!o&&(l=9),l}t.fromString=s})(Is||(Is={}));var Ls;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(Ls||(Ls={}));var Ms;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(Ms||(Ms={}));var As;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(As||(As={}));var zs;(function(t){t[t.Automatic=0]="Automatic",t[t.PasteAs=1]="PasteAs"})(zs||(zs={}));var Ps;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(Ps||(Ps={}));var Ts;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Ts||(Ts={}));B(757,"array"),B(758,"boolean"),B(759,"class"),B(760,"constant"),B(761,"constructor"),B(762,"enumeration"),B(763,"enumeration member"),B(764,"event"),B(765,"field"),B(766,"file"),B(767,"function"),B(768,"interface"),B(769,"key"),B(770,"method"),B(771,"module"),B(772,"namespace"),B(773,"null"),B(774,"number"),B(775,"object"),B(776,"operator"),B(777,"package"),B(778,"property"),B(779,"string"),B(780,"struct"),B(781,"type parameter"),B(782,"variable");var Os;(function(t){const e=new Map;e.set(0,U.symbolFile),e.set(1,U.symbolModule),e.set(2,U.symbolNamespace),e.set(3,U.symbolPackage),e.set(4,U.symbolClass),e.set(5,U.symbolMethod),e.set(6,U.symbolProperty),e.set(7,U.symbolField),e.set(8,U.symbolConstructor),e.set(9,U.symbolEnum),e.set(10,U.symbolInterface),e.set(11,U.symbolFunction),e.set(12,U.symbolVariable),e.set(13,U.symbolConstant),e.set(14,U.symbolString),e.set(15,U.symbolNumber),e.set(16,U.symbolBoolean),e.set(17,U.symbolArray),e.set(18,U.symbolObject),e.set(19,U.symbolKey),e.set(20,U.symbolNull),e.set(21,U.symbolEnumMember),e.set(22,U.symbolStruct),e.set(23,U.symbolEvent),e.set(24,U.symbolOperator),e.set(25,U.symbolTypeParameter);function n(s){let a=e.get(s);return a||(console.info("No codicon found for SymbolKind "+s),a=U.symbolProperty),a}t.toIcon=n;const r=new Map;r.set(0,20),r.set(1,8),r.set(2,8),r.set(3,8),r.set(4,5),r.set(5,0),r.set(6,9),r.set(7,3),r.set(8,2),r.set(9,15),r.set(10,7),r.set(11,1),r.set(12,4),r.set(13,14),r.set(14,18),r.set(15,13),r.set(16,13),r.set(17,13),r.set(18,13),r.set(19,17),r.set(20,13),r.set(21,16),r.set(22,6),r.set(23,10),r.set(24,11),r.set(25,24);function i(s){let a=r.get(s);return a===void 0&&(console.info("No completion kind found for SymbolKind "+s),a=20),a}t.toCompletionKind=i})(Os||(Os={}));let df=class lt{static{this.Comment=new lt("comment")}static{this.Imports=new lt("imports")}static{this.Region=new lt("region")}static fromValue(e){switch(e){case"comment":return lt.Comment;case"imports":return lt.Imports;case"region":return lt.Region}return new lt(e)}constructor(e){this.value=e}};var Ws;(function(t){t[t.AIGenerated=1]="AIGenerated"})(Ws||(Ws={}));var Vs;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(Vs||(Vs={}));var $s;(function(t){function e(n){return!n||typeof n!="object"?!1:typeof n.id=="string"&&typeof n.title=="string"}t.is=e})($s||($s={}));var Us;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(Us||(Us={}));new dd;var Bs;(function(t){t[t.Unknown=0]="Unknown",t[t.Disabled=1]="Disabled",t[t.Enabled=2]="Enabled"})(Bs||(Bs={}));var qs;(function(t){t[t.Invoke=1]="Invoke",t[t.Auto=2]="Auto"})(qs||(qs={}));var js;(function(t){t[t.None=0]="None",t[t.KeepWhitespace=1]="KeepWhitespace",t[t.InsertAsSnippet=4]="InsertAsSnippet"})(js||(js={}));var Hs;(function(t){t[t.Method=0]="Method",t[t.Function=1]="Function",t[t.Constructor=2]="Constructor",t[t.Field=3]="Field",t[t.Variable=4]="Variable",t[t.Class=5]="Class",t[t.Struct=6]="Struct",t[t.Interface=7]="Interface",t[t.Module=8]="Module",t[t.Property=9]="Property",t[t.Event=10]="Event",t[t.Operator=11]="Operator",t[t.Unit=12]="Unit",t[t.Value=13]="Value",t[t.Constant=14]="Constant",t[t.Enum=15]="Enum",t[t.EnumMember=16]="EnumMember",t[t.Keyword=17]="Keyword",t[t.Text=18]="Text",t[t.Color=19]="Color",t[t.File=20]="File",t[t.Reference=21]="Reference",t[t.Customcolor=22]="Customcolor",t[t.Folder=23]="Folder",t[t.TypeParameter=24]="TypeParameter",t[t.User=25]="User",t[t.Issue=26]="Issue",t[t.Tool=27]="Tool",t[t.Snippet=28]="Snippet"})(Hs||(Hs={}));var Gs;(function(t){t[t.Deprecated=1]="Deprecated"})(Gs||(Gs={}));var Js;(function(t){t[t.Invoke=0]="Invoke",t[t.TriggerCharacter=1]="TriggerCharacter",t[t.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(Js||(Js={}));var Xs;(function(t){t[t.EXACT=0]="EXACT",t[t.ABOVE=1]="ABOVE",t[t.BELOW=2]="BELOW"})(Xs||(Xs={}));var Ys;(function(t){t[t.NotSet=0]="NotSet",t[t.ContentFlush=1]="ContentFlush",t[t.RecoverFromMarkers=2]="RecoverFromMarkers",t[t.Explicit=3]="Explicit",t[t.Paste=4]="Paste",t[t.Undo=5]="Undo",t[t.Redo=6]="Redo"})(Ys||(Ys={}));var Qs;(function(t){t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(Qs||(Qs={}));var Ks;(function(t){t[t.Text=0]="Text",t[t.Read=1]="Read",t[t.Write=2]="Write"})(Ks||(Ks={}));var Zs;(function(t){t[t.None=0]="None",t[t.Keep=1]="Keep",t[t.Brackets=2]="Brackets",t[t.Advanced=3]="Advanced",t[t.Full=4]="Full"})(Zs||(Zs={}));var ea;(function(t){t[t.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",t[t.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",t[t.accessibilitySupport=2]="accessibilitySupport",t[t.accessibilityPageSize=3]="accessibilityPageSize",t[t.allowOverflow=4]="allowOverflow",t[t.allowVariableLineHeights=5]="allowVariableLineHeights",t[t.allowVariableFonts=6]="allowVariableFonts",t[t.allowVariableFontsInAccessibilityMode=7]="allowVariableFontsInAccessibilityMode",t[t.ariaLabel=8]="ariaLabel",t[t.ariaRequired=9]="ariaRequired",t[t.autoClosingBrackets=10]="autoClosingBrackets",t[t.autoClosingComments=11]="autoClosingComments",t[t.screenReaderAnnounceInlineSuggestion=12]="screenReaderAnnounceInlineSuggestion",t[t.autoClosingDelete=13]="autoClosingDelete",t[t.autoClosingOvertype=14]="autoClosingOvertype",t[t.autoClosingQuotes=15]="autoClosingQuotes",t[t.autoIndent=16]="autoIndent",t[t.autoIndentOnPaste=17]="autoIndentOnPaste",t[t.autoIndentOnPasteWithinString=18]="autoIndentOnPasteWithinString",t[t.automaticLayout=19]="automaticLayout",t[t.autoSurround=20]="autoSurround",t[t.bracketPairColorization=21]="bracketPairColorization",t[t.guides=22]="guides",t[t.codeLens=23]="codeLens",t[t.codeLensFontFamily=24]="codeLensFontFamily",t[t.codeLensFontSize=25]="codeLensFontSize",t[t.colorDecorators=26]="colorDecorators",t[t.colorDecoratorsLimit=27]="colorDecoratorsLimit",t[t.columnSelection=28]="columnSelection",t[t.comments=29]="comments",t[t.contextmenu=30]="contextmenu",t[t.copyWithSyntaxHighlighting=31]="copyWithSyntaxHighlighting",t[t.cursorBlinking=32]="cursorBlinking",t[t.cursorSmoothCaretAnimation=33]="cursorSmoothCaretAnimation",t[t.cursorStyle=34]="cursorStyle",t[t.cursorSurroundingLines=35]="cursorSurroundingLines",t[t.cursorSurroundingLinesStyle=36]="cursorSurroundingLinesStyle",t[t.cursorWidth=37]="cursorWidth",t[t.cursorHeight=38]="cursorHeight",t[t.disableLayerHinting=39]="disableLayerHinting",t[t.disableMonospaceOptimizations=40]="disableMonospaceOptimizations",t[t.domReadOnly=41]="domReadOnly",t[t.dragAndDrop=42]="dragAndDrop",t[t.dropIntoEditor=43]="dropIntoEditor",t[t.editContext=44]="editContext",t[t.emptySelectionClipboard=45]="emptySelectionClipboard",t[t.experimentalGpuAcceleration=46]="experimentalGpuAcceleration",t[t.experimentalWhitespaceRendering=47]="experimentalWhitespaceRendering",t[t.extraEditorClassName=48]="extraEditorClassName",t[t.fastScrollSensitivity=49]="fastScrollSensitivity",t[t.find=50]="find",t[t.fixedOverflowWidgets=51]="fixedOverflowWidgets",t[t.folding=52]="folding",t[t.foldingStrategy=53]="foldingStrategy",t[t.foldingHighlight=54]="foldingHighlight",t[t.foldingImportsByDefault=55]="foldingImportsByDefault",t[t.foldingMaximumRegions=56]="foldingMaximumRegions",t[t.unfoldOnClickAfterEndOfLine=57]="unfoldOnClickAfterEndOfLine",t[t.fontFamily=58]="fontFamily",t[t.fontInfo=59]="fontInfo",t[t.fontLigatures=60]="fontLigatures",t[t.fontSize=61]="fontSize",t[t.fontWeight=62]="fontWeight",t[t.fontVariations=63]="fontVariations",t[t.formatOnPaste=64]="formatOnPaste",t[t.formatOnType=65]="formatOnType",t[t.glyphMargin=66]="glyphMargin",t[t.gotoLocation=67]="gotoLocation",t[t.hideCursorInOverviewRuler=68]="hideCursorInOverviewRuler",t[t.hover=69]="hover",t[t.inDiffEditor=70]="inDiffEditor",t[t.inlineSuggest=71]="inlineSuggest",t[t.letterSpacing=72]="letterSpacing",t[t.lightbulb=73]="lightbulb",t[t.lineDecorationsWidth=74]="lineDecorationsWidth",t[t.lineHeight=75]="lineHeight",t[t.lineNumbers=76]="lineNumbers",t[t.lineNumbersMinChars=77]="lineNumbersMinChars",t[t.linkedEditing=78]="linkedEditing",t[t.links=79]="links",t[t.matchBrackets=80]="matchBrackets",t[t.minimap=81]="minimap",t[t.mouseStyle=82]="mouseStyle",t[t.mouseWheelScrollSensitivity=83]="mouseWheelScrollSensitivity",t[t.mouseWheelZoom=84]="mouseWheelZoom",t[t.multiCursorMergeOverlapping=85]="multiCursorMergeOverlapping",t[t.multiCursorModifier=86]="multiCursorModifier",t[t.mouseMiddleClickAction=87]="mouseMiddleClickAction",t[t.multiCursorPaste=88]="multiCursorPaste",t[t.multiCursorLimit=89]="multiCursorLimit",t[t.occurrencesHighlight=90]="occurrencesHighlight",t[t.occurrencesHighlightDelay=91]="occurrencesHighlightDelay",t[t.overtypeCursorStyle=92]="overtypeCursorStyle",t[t.overtypeOnPaste=93]="overtypeOnPaste",t[t.overviewRulerBorder=94]="overviewRulerBorder",t[t.overviewRulerLanes=95]="overviewRulerLanes",t[t.padding=96]="padding",t[t.pasteAs=97]="pasteAs",t[t.parameterHints=98]="parameterHints",t[t.peekWidgetDefaultFocus=99]="peekWidgetDefaultFocus",t[t.placeholder=100]="placeholder",t[t.definitionLinkOpensInPeek=101]="definitionLinkOpensInPeek",t[t.quickSuggestions=102]="quickSuggestions",t[t.quickSuggestionsDelay=103]="quickSuggestionsDelay",t[t.readOnly=104]="readOnly",t[t.readOnlyMessage=105]="readOnlyMessage",t[t.renameOnType=106]="renameOnType",t[t.renderRichScreenReaderContent=107]="renderRichScreenReaderContent",t[t.renderControlCharacters=108]="renderControlCharacters",t[t.renderFinalNewline=109]="renderFinalNewline",t[t.renderLineHighlight=110]="renderLineHighlight",t[t.renderLineHighlightOnlyWhenFocus=111]="renderLineHighlightOnlyWhenFocus",t[t.renderValidationDecorations=112]="renderValidationDecorations",t[t.renderWhitespace=113]="renderWhitespace",t[t.revealHorizontalRightPadding=114]="revealHorizontalRightPadding",t[t.roundedSelection=115]="roundedSelection",t[t.rulers=116]="rulers",t[t.scrollbar=117]="scrollbar",t[t.scrollBeyondLastColumn=118]="scrollBeyondLastColumn",t[t.scrollBeyondLastLine=119]="scrollBeyondLastLine",t[t.scrollPredominantAxis=120]="scrollPredominantAxis",t[t.selectionClipboard=121]="selectionClipboard",t[t.selectionHighlight=122]="selectionHighlight",t[t.selectionHighlightMaxLength=123]="selectionHighlightMaxLength",t[t.selectionHighlightMultiline=124]="selectionHighlightMultiline",t[t.selectOnLineNumbers=125]="selectOnLineNumbers",t[t.showFoldingControls=126]="showFoldingControls",t[t.showUnused=127]="showUnused",t[t.snippetSuggestions=128]="snippetSuggestions",t[t.smartSelect=129]="smartSelect",t[t.smoothScrolling=130]="smoothScrolling",t[t.stickyScroll=131]="stickyScroll",t[t.stickyTabStops=132]="stickyTabStops",t[t.stopRenderingLineAfter=133]="stopRenderingLineAfter",t[t.suggest=134]="suggest",t[t.suggestFontSize=135]="suggestFontSize",t[t.suggestLineHeight=136]="suggestLineHeight",t[t.suggestOnTriggerCharacters=137]="suggestOnTriggerCharacters",t[t.suggestSelection=138]="suggestSelection",t[t.tabCompletion=139]="tabCompletion",t[t.tabIndex=140]="tabIndex",t[t.trimWhitespaceOnDelete=141]="trimWhitespaceOnDelete",t[t.unicodeHighlighting=142]="unicodeHighlighting",t[t.unusualLineTerminators=143]="unusualLineTerminators",t[t.useShadowDOM=144]="useShadowDOM",t[t.useTabStops=145]="useTabStops",t[t.wordBreak=146]="wordBreak",t[t.wordSegmenterLocales=147]="wordSegmenterLocales",t[t.wordSeparators=148]="wordSeparators",t[t.wordWrap=149]="wordWrap",t[t.wordWrapBreakAfterCharacters=150]="wordWrapBreakAfterCharacters",t[t.wordWrapBreakBeforeCharacters=151]="wordWrapBreakBeforeCharacters",t[t.wordWrapColumn=152]="wordWrapColumn",t[t.wordWrapOverride1=153]="wordWrapOverride1",t[t.wordWrapOverride2=154]="wordWrapOverride2",t[t.wrappingIndent=155]="wrappingIndent",t[t.wrappingStrategy=156]="wrappingStrategy",t[t.showDeprecated=157]="showDeprecated",t[t.inertialScroll=158]="inertialScroll",t[t.inlayHints=159]="inlayHints",t[t.wrapOnEscapedLineFeeds=160]="wrapOnEscapedLineFeeds",t[t.effectiveCursorStyle=161]="effectiveCursorStyle",t[t.editorClassName=162]="editorClassName",t[t.pixelRatio=163]="pixelRatio",t[t.tabFocusMode=164]="tabFocusMode",t[t.layoutInfo=165]="layoutInfo",t[t.wrappingInfo=166]="wrappingInfo",t[t.defaultColorDecorators=167]="defaultColorDecorators",t[t.colorDecoratorsActivatedOn=168]="colorDecoratorsActivatedOn",t[t.inlineCompletionsAccessibilityVerbose=169]="inlineCompletionsAccessibilityVerbose",t[t.effectiveEditContext=170]="effectiveEditContext",t[t.scrollOnMiddleClick=171]="scrollOnMiddleClick",t[t.effectiveAllowVariableFonts=172]="effectiveAllowVariableFonts"})(ea||(ea={}));var ta;(function(t){t[t.TextDefined=0]="TextDefined",t[t.LF=1]="LF",t[t.CRLF=2]="CRLF"})(ta||(ta={}));var na;(function(t){t[t.LF=0]="LF",t[t.CRLF=1]="CRLF"})(na||(na={}));var ra;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(ra||(ra={}));var ia;(function(t){t[t.Increase=0]="Increase",t[t.Decrease=1]="Decrease"})(ia||(ia={}));var sa;(function(t){t[t.None=0]="None",t[t.Indent=1]="Indent",t[t.IndentOutdent=2]="IndentOutdent",t[t.Outdent=3]="Outdent"})(sa||(sa={}));var aa;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(aa||(aa={}));var oa;(function(t){t[t.Type=1]="Type",t[t.Parameter=2]="Parameter"})(oa||(oa={}));var la;(function(t){t[t.Accepted=0]="Accepted",t[t.Rejected=1]="Rejected",t[t.Ignored=2]="Ignored"})(la||(la={}));var ca;(function(t){t[t.Code=1]="Code",t[t.Label=2]="Label"})(ca||(ca={}));var ha;(function(t){t[t.Automatic=0]="Automatic",t[t.Explicit=1]="Explicit"})(ha||(ha={}));var ii;(function(t){t[t.DependsOnKbLayout=-1]="DependsOnKbLayout",t[t.Unknown=0]="Unknown",t[t.Backspace=1]="Backspace",t[t.Tab=2]="Tab",t[t.Enter=3]="Enter",t[t.Shift=4]="Shift",t[t.Ctrl=5]="Ctrl",t[t.Alt=6]="Alt",t[t.PauseBreak=7]="PauseBreak",t[t.CapsLock=8]="CapsLock",t[t.Escape=9]="Escape",t[t.Space=10]="Space",t[t.PageUp=11]="PageUp",t[t.PageDown=12]="PageDown",t[t.End=13]="End",t[t.Home=14]="Home",t[t.LeftArrow=15]="LeftArrow",t[t.UpArrow=16]="UpArrow",t[t.RightArrow=17]="RightArrow",t[t.DownArrow=18]="DownArrow",t[t.Insert=19]="Insert",t[t.Delete=20]="Delete",t[t.Digit0=21]="Digit0",t[t.Digit1=22]="Digit1",t[t.Digit2=23]="Digit2",t[t.Digit3=24]="Digit3",t[t.Digit4=25]="Digit4",t[t.Digit5=26]="Digit5",t[t.Digit6=27]="Digit6",t[t.Digit7=28]="Digit7",t[t.Digit8=29]="Digit8",t[t.Digit9=30]="Digit9",t[t.KeyA=31]="KeyA",t[t.KeyB=32]="KeyB",t[t.KeyC=33]="KeyC",t[t.KeyD=34]="KeyD",t[t.KeyE=35]="KeyE",t[t.KeyF=36]="KeyF",t[t.KeyG=37]="KeyG",t[t.KeyH=38]="KeyH",t[t.KeyI=39]="KeyI",t[t.KeyJ=40]="KeyJ",t[t.KeyK=41]="KeyK",t[t.KeyL=42]="KeyL",t[t.KeyM=43]="KeyM",t[t.KeyN=44]="KeyN",t[t.KeyO=45]="KeyO",t[t.KeyP=46]="KeyP",t[t.KeyQ=47]="KeyQ",t[t.KeyR=48]="KeyR",t[t.KeyS=49]="KeyS",t[t.KeyT=50]="KeyT",t[t.KeyU=51]="KeyU",t[t.KeyV=52]="KeyV",t[t.KeyW=53]="KeyW",t[t.KeyX=54]="KeyX",t[t.KeyY=55]="KeyY",t[t.KeyZ=56]="KeyZ",t[t.Meta=57]="Meta",t[t.ContextMenu=58]="ContextMenu",t[t.F1=59]="F1",t[t.F2=60]="F2",t[t.F3=61]="F3",t[t.F4=62]="F4",t[t.F5=63]="F5",t[t.F6=64]="F6",t[t.F7=65]="F7",t[t.F8=66]="F8",t[t.F9=67]="F9",t[t.F10=68]="F10",t[t.F11=69]="F11",t[t.F12=70]="F12",t[t.F13=71]="F13",t[t.F14=72]="F14",t[t.F15=73]="F15",t[t.F16=74]="F16",t[t.F17=75]="F17",t[t.F18=76]="F18",t[t.F19=77]="F19",t[t.F20=78]="F20",t[t.F21=79]="F21",t[t.F22=80]="F22",t[t.F23=81]="F23",t[t.F24=82]="F24",t[t.NumLock=83]="NumLock",t[t.ScrollLock=84]="ScrollLock",t[t.Semicolon=85]="Semicolon",t[t.Equal=86]="Equal",t[t.Comma=87]="Comma",t[t.Minus=88]="Minus",t[t.Period=89]="Period",t[t.Slash=90]="Slash",t[t.Backquote=91]="Backquote",t[t.BracketLeft=92]="BracketLeft",t[t.Backslash=93]="Backslash",t[t.BracketRight=94]="BracketRight",t[t.Quote=95]="Quote",t[t.OEM_8=96]="OEM_8",t[t.IntlBackslash=97]="IntlBackslash",t[t.Numpad0=98]="Numpad0",t[t.Numpad1=99]="Numpad1",t[t.Numpad2=100]="Numpad2",t[t.Numpad3=101]="Numpad3",t[t.Numpad4=102]="Numpad4",t[t.Numpad5=103]="Numpad5",t[t.Numpad6=104]="Numpad6",t[t.Numpad7=105]="Numpad7",t[t.Numpad8=106]="Numpad8",t[t.Numpad9=107]="Numpad9",t[t.NumpadMultiply=108]="NumpadMultiply",t[t.NumpadAdd=109]="NumpadAdd",t[t.NUMPAD_SEPARATOR=110]="NUMPAD_SEPARATOR",t[t.NumpadSubtract=111]="NumpadSubtract",t[t.NumpadDecimal=112]="NumpadDecimal",t[t.NumpadDivide=113]="NumpadDivide",t[t.KEY_IN_COMPOSITION=114]="KEY_IN_COMPOSITION",t[t.ABNT_C1=115]="ABNT_C1",t[t.ABNT_C2=116]="ABNT_C2",t[t.AudioVolumeMute=117]="AudioVolumeMute",t[t.AudioVolumeUp=118]="AudioVolumeUp",t[t.AudioVolumeDown=119]="AudioVolumeDown",t[t.BrowserSearch=120]="BrowserSearch",t[t.BrowserHome=121]="BrowserHome",t[t.BrowserBack=122]="BrowserBack",t[t.BrowserForward=123]="BrowserForward",t[t.MediaTrackNext=124]="MediaTrackNext",t[t.MediaTrackPrevious=125]="MediaTrackPrevious",t[t.MediaStop=126]="MediaStop",t[t.MediaPlayPause=127]="MediaPlayPause",t[t.LaunchMediaPlayer=128]="LaunchMediaPlayer",t[t.LaunchMail=129]="LaunchMail",t[t.LaunchApp2=130]="LaunchApp2",t[t.Clear=131]="Clear",t[t.MAX_VALUE=132]="MAX_VALUE"})(ii||(ii={}));var si;(function(t){t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error"})(si||(si={}));var ai;(function(t){t[t.Unnecessary=1]="Unnecessary",t[t.Deprecated=2]="Deprecated"})(ai||(ai={}));var da;(function(t){t[t.Inline=1]="Inline",t[t.Gutter=2]="Gutter"})(da||(da={}));var ua;(function(t){t[t.Normal=1]="Normal",t[t.Underlined=2]="Underlined"})(ua||(ua={}));var pa;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.TEXTAREA=1]="TEXTAREA",t[t.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",t[t.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",t[t.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",t[t.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",t[t.CONTENT_TEXT=6]="CONTENT_TEXT",t[t.CONTENT_EMPTY=7]="CONTENT_EMPTY",t[t.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",t[t.CONTENT_WIDGET=9]="CONTENT_WIDGET",t[t.OVERVIEW_RULER=10]="OVERVIEW_RULER",t[t.SCROLLBAR=11]="SCROLLBAR",t[t.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",t[t.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(pa||(pa={}));var ma;(function(t){t[t.AIGenerated=1]="AIGenerated"})(ma||(ma={}));var fa;(function(t){t[t.Invoke=0]="Invoke",t[t.Automatic=1]="Automatic"})(fa||(fa={}));var ga;(function(t){t[t.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",t[t.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",t[t.TOP_CENTER=2]="TOP_CENTER"})(ga||(ga={}));var ba;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(ba||(ba={}));var wa;(function(t){t[t.Word=0]="Word",t[t.Line=1]="Line",t[t.Suggest=2]="Suggest"})(wa||(wa={}));var va;(function(t){t[t.Left=0]="Left",t[t.Right=1]="Right",t[t.None=2]="None",t[t.LeftOfInjectedText=3]="LeftOfInjectedText",t[t.RightOfInjectedText=4]="RightOfInjectedText"})(va||(va={}));var ya;(function(t){t[t.Off=0]="Off",t[t.On=1]="On",t[t.Relative=2]="Relative",t[t.Interval=3]="Interval",t[t.Custom=4]="Custom"})(ya||(ya={}));var xa;(function(t){t[t.None=0]="None",t[t.Text=1]="Text",t[t.Blocks=2]="Blocks"})(xa||(xa={}));var Sa;(function(t){t[t.Smooth=0]="Smooth",t[t.Immediate=1]="Immediate"})(Sa||(Sa={}));var Ca;(function(t){t[t.Auto=1]="Auto",t[t.Hidden=2]="Hidden",t[t.Visible=3]="Visible"})(Ca||(Ca={}));var oi;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(oi||(oi={}));var ka;(function(t){t.Off="off",t.OnCode="onCode",t.On="on"})(ka||(ka={}));var _a;(function(t){t[t.Invoke=1]="Invoke",t[t.TriggerCharacter=2]="TriggerCharacter",t[t.ContentChange=3]="ContentChange"})(_a||(_a={}));var Ea;(function(t){t[t.File=0]="File",t[t.Module=1]="Module",t[t.Namespace=2]="Namespace",t[t.Package=3]="Package",t[t.Class=4]="Class",t[t.Method=5]="Method",t[t.Property=6]="Property",t[t.Field=7]="Field",t[t.Constructor=8]="Constructor",t[t.Enum=9]="Enum",t[t.Interface=10]="Interface",t[t.Function=11]="Function",t[t.Variable=12]="Variable",t[t.Constant=13]="Constant",t[t.String=14]="String",t[t.Number=15]="Number",t[t.Boolean=16]="Boolean",t[t.Array=17]="Array",t[t.Object=18]="Object",t[t.Key=19]="Key",t[t.Null=20]="Null",t[t.EnumMember=21]="EnumMember",t[t.Struct=22]="Struct",t[t.Event=23]="Event",t[t.Operator=24]="Operator",t[t.TypeParameter=25]="TypeParameter"})(Ea||(Ea={}));var Fa;(function(t){t[t.Deprecated=1]="Deprecated"})(Fa||(Fa={}));var Ra;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Ra||(Ra={}));var Na;(function(t){t[t.Hidden=0]="Hidden",t[t.Blink=1]="Blink",t[t.Smooth=2]="Smooth",t[t.Phase=3]="Phase",t[t.Expand=4]="Expand",t[t.Solid=5]="Solid"})(Na||(Na={}));var Da;(function(t){t[t.Line=1]="Line",t[t.Block=2]="Block",t[t.Underline=3]="Underline",t[t.LineThin=4]="LineThin",t[t.BlockOutline=5]="BlockOutline",t[t.UnderlineThin=6]="UnderlineThin"})(Da||(Da={}));var Ia;(function(t){t[t.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",t[t.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",t[t.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",t[t.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Ia||(Ia={}));var La;(function(t){t[t.None=0]="None",t[t.Same=1]="Same",t[t.Indent=2]="Indent",t[t.DeepIndent=3]="DeepIndent"})(La||(La={}));class md{static{this.CtrlCmd=2048}static{this.Shift=1024}static{this.Alt=512}static{this.WinCtrl=256}static chord(e,n){return qh(e,n)}}function fd(){return{editor:void 0,languages:void 0,CancellationTokenSource:Vh,Emitter:Ue,KeyCode:ii,KeyMod:md,Position:re,Range:Y,Selection:Ee,SelectionDirection:oi,MarkerSeverity:si,MarkerTag:ai,Uri:Gi,Token:pd}}var Ma;class gd{constructor(){this[Ma]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,n=0){const r=this._map.get(e);if(r)return n!==0&&this.touch(r,n),r.value}set(e,n,r=0){let i=this._map.get(e);if(i)i.value=n,r!==0&&this.touch(i,r);else{switch(i={key:e,value:n,next:void 0,previous:void 0},r){case 0:this.addItemLast(i);break;case 1:this.addItemFirst(i);break;case 2:this.addItemLast(i);break;default:this.addItemLast(i);break}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){const n=this._map.get(e);if(n)return this._map.delete(e),this.removeItem(n),this._size--,n.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,n){const r=this._state;let i=this._head;for(;i;){if(n?e.bind(n)(i.value,i.key,this):e(i.value,i.key,this),this._state!==r)throw new Error("LinkedMap got modified during iteration.");i=i.next}}keys(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.key,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}values(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:r.value,done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}entries(){const e=this,n=this._state;let r=this._head;const i={[Symbol.iterator](){return i},next(){if(e._state!==n)throw new Error("LinkedMap got modified during iteration.");if(r){const s={value:[r.key,r.value],done:!1};return r=r.next,s}else return{value:void 0,done:!0}}};return i}[(Ma=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._head,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.next,r--;this._head=n,this._size=r,n&&(n.previous=void 0),this._state++}trimNew(e){if(e>=this.size)return;if(e===0){this.clear();return}let n=this._tail,r=this.size;for(;n&&r>e;)this._map.delete(n.key),n=n.previous,r--;this._tail=n,this._size=r,n&&(n.next=void 0),this._state++}addItemFirst(e){if(!this._head&&!this._tail)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");this._tail=e,this._state++}removeItem(e){if(e===this._head&&e===this._tail)this._head=void 0,this._tail=void 0;else if(e===this._head){if(!e.next)throw new Error("Invalid list");e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw new Error("Invalid list");e.previous.next=void 0,this._tail=e.previous}else{const n=e.next,r=e.previous;if(!n||!r)throw new Error("Invalid list");n.previous=r,r.next=n}e.next=void 0,e.previous=void 0,this._state++}touch(e,n){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(n!==1&&n!==2)){if(n===1){if(e===this._head)return;const r=e.next,i=e.previous;e===this._tail?(i.next=void 0,this._tail=i):(r.previous=i,i.next=r),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(n===2){if(e===this._tail)return;const r=e.next,i=e.previous;e===this._head?(r.previous=void 0,this._head=r):(r.previous=i,i.next=r),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){const e=[];return this.forEach((n,r)=>{e.push([r,n])}),e}fromJSON(e){this.clear();for(const[n,r]of e)this.set(n,r)}}class bd extends gd{constructor(e,n=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,n),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get(e,n=2){return super.get(e,n)}peek(e){return super.get(e,0)}set(e,n){return super.set(e,n,2),this}checkTrim(){this.size>this._limit&&this.trim(Math.round(this._limit*this._ratio))}}class wd extends bd{constructor(e,n=1){super(e,n)}trim(e){this.trimOld(e)}set(e,n){return super.set(e,n),this.checkTrim(),this}}class vd{constructor(){this.map=new Map}add(e,n){let r=this.map.get(e);r||(r=new Set,this.map.set(e,r)),r.add(n)}delete(e,n){const r=this.map.get(e);r&&(r.delete(n),r.size===0&&this.map.delete(e))}forEach(e,n){const r=this.map.get(e);r&&r.forEach(n)}}new wd(10);var Aa;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=4]="Right",t[t.Full=7]="Full"})(Aa||(Aa={}));var za;(function(t){t[t.Left=1]="Left",t[t.Center=2]="Center",t[t.Right=3]="Right"})(za||(za={}));var Pa;(function(t){t[t.LTR=0]="LTR",t[t.RTL=1]="RTL"})(Pa||(Pa={}));var Ta;(function(t){t[t.Both=0]="Both",t[t.Right=1]="Right",t[t.Left=2]="Left",t[t.None=3]="None"})(Ta||(Ta={}));function yd(t){if(!t||t.length===0)return!1;for(let e=0,n=t.length;e=n)break;const i=t.charCodeAt(e);if(i===110||i===114||i===87)return!0}}return!1}function xd(t,e,n,r,i){if(r===0)return!0;const s=e.charCodeAt(r-1);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r);if(t.get(a)!==0)return!0}return!1}function Sd(t,e,n,r,i){if(r+i===n)return!0;const s=e.charCodeAt(r+i);if(t.get(s)!==0||s===13||s===10)return!0;if(i>0){const a=e.charCodeAt(r+i-1);if(t.get(a)!==0)return!0}return!1}function Cd(t,e,n,r,i){return xd(t,e,n,r,i)&&Sd(t,e,n,r,i)}class kd{constructor(e,n){this._wordSeparators=e,this._searchRegex=n,this._prevMatchStartIndex=-1,this._prevMatchLength=0}reset(e){this._searchRegex.lastIndex=e,this._prevMatchStartIndex=-1,this._prevMatchLength=0}next(e){const n=e.length;let r;do{if(this._prevMatchStartIndex+this._prevMatchLength===n||(r=this._searchRegex.exec(e),!r))return null;const i=r.index,s=r[0].length;if(i===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Sh(e,n,this._searchRegex.lastIndex)>65535?this._searchRegex.lastIndex+=2:this._searchRegex.lastIndex+=1;continue}return null}if(this._prevMatchStartIndex=i,this._prevMatchLength=s,!this._wordSeparators||Cd(this._wordSeparators,e,n,i,s))return r}while(r);return null}}const _d="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Ed(t=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const n of _d)t.indexOf(n)>=0||(e+="\\"+n);return e+="\\s]+)",new RegExp(e,"g")}const sc=Ed();function ac(t){let e=sc;if(t&&t instanceof RegExp)if(t.global)e=t;else{let n="g";t.ignoreCase&&(n+="i"),t.multiline&&(n+="m"),t.unicode&&(n+="u"),e=new RegExp(t.source,n)}return e.lastIndex=0,e}const oc=new Xc;oc.unshift({maxLen:1e3,windowSize:15,timeBudget:150});function Ji(t,e,n,r,i){if(e=ac(e),i||(i=Qn.first(oc)),n.length>i.maxLen){let c=t-i.maxLen/2;return c<0?c=0:r+=c,n=n.substring(c,t+i.maxLen/2),Ji(t,e,n,r,i)}const s=Date.now(),a=t-1-r;let o=-1,l=null;for(let c=1;!(Date.now()-s>=i.timeBudget);c++){const d=a-i.windowSize*c;e.lastIndex=Math.max(0,d);const u=Fd(e,n,a,o);if(!u&&l||(l=u,d<=0))break;o=d}if(l){const c={word:l[0],startColumn:r+1+l.index,endColumn:r+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function Fd(t,e,n,r){let i;for(;i=t.exec(e);){const s=i.index||0;if(s<=n&&t.lastIndex>=n)return i;if(r>0&&s>r)return null}return null}class Rd{static computeUnicodeHighlights(e,n,r){const i=r?r.startLineNumber:1,s=r?r.endLineNumber:e.getLineCount(),a=new Oa(n),o=a.getCandidateCodePoints();let l;o==="allNonBasicAscii"?l=new RegExp("[^\\t\\n\\r\\x20-\\x7E]","g"):l=new RegExp(`${Nd(Array.from(o))}`,"g");const c=new kd(null,l),d=[];let u=!1,m,f=0,g=0,b=0;e:for(let k=i,F=s;k<=F;k++){const R=e.getLineContent(k),E=R.length;c.reset(0);do if(m=c.next(R),m){let T=m.index,O=m.index+m[0].length;if(T>0){const z=R.charCodeAt(T-1);Kr(z)&&T--}if(O+1=1e3){u=!0;break e}d.push(new Y(k,T+1,k,O+1))}}while(m)}return{ranges:d,hasMore:u,ambiguousCharacterCount:f,invisibleCharacterCount:g,nonBasicAsciiCharacterCount:b}}static computeUnicodeHighlightReason(e,n){const r=new Oa(n);switch(r.shouldHighlightNonBasicASCII(e,null)){case 0:return null;case 2:return{kind:1};case 3:{const s=e.codePointAt(0),a=r.ambiguousCharacters.getPrimaryConfusable(s),o=pt.getLocales().filter(l=>!pt.getInstance(new Set([...n.allowedLocales,l])).isAmbiguous(s));return{kind:0,confusableWith:String.fromCodePoint(a),notAmbiguousInLocales:o}}case 1:return{kind:2}}}}function Nd(t,e){return`[${ph(t.map(r=>String.fromCodePoint(r)).join(""))}]`}class Oa{constructor(e){this.options=e,this.allowedCodePoints=new Set(e.allowedCodePoints),this.ambiguousCharacters=pt.getInstance(new Set(e.allowedLocales))}getCandidateCodePoints(){if(this.options.nonBasicASCII)return"allNonBasicAscii";const e=new Set;if(this.options.invisibleCharacters)for(const n of St.codePoints)Wa(String.fromCodePoint(n))||e.add(n);if(this.options.ambiguousCharacters)for(const n of this.ambiguousCharacters.getConfusableCodePoints())e.add(n);for(const n of this.allowedCodePoints)e.delete(n);return e}shouldHighlightNonBasicASCII(e,n){const r=e.codePointAt(0);if(this.allowedCodePoints.has(r))return 0;if(this.options.nonBasicASCII)return 1;let i=!1,s=!1;if(n)for(const a of n){const o=a.codePointAt(0),l=kh(a);i=i||l,!l&&!this.ambiguousCharacters.isAmbiguous(o)&&!St.isInvisibleCharacter(o)&&(s=!0)}return!i&&s?0:this.options.invisibleCharacters&&!Wa(e)&&St.isInvisibleCharacter(r)?2:this.options.ambiguousCharacters&&this.ambiguousCharacters.isAmbiguous(r)?3:0}}function Wa(t){return t===" "||t===` +`||t===" "}class Hn{constructor(e,n,r){this.changes=e,this.moves=n,this.hitTimeout=r}}class Dd{constructor(e,n){this.lineRangeMapping=e,this.changes=n}}function Id(t,e,n=(r,i)=>r===i){if(t===e)return!0;if(!t||!e||t.length!==e.length)return!1;for(let r=0,i=t.length;r0}t.isGreaterThan=r;function i(s){return s===0}t.isNeitherLessOrGreaterThan=i,t.greaterThan=1,t.lessThan=-1,t.neitherLessOrGreaterThan=0})(li||(li={}));function hn(t,e){return(n,r)=>e(t(n),t(r))}const dn=(t,e)=>t-e;function Pd(t){return(e,n)=>-t(e,n)}class Gn{static{this.empty=new Gn(e=>{})}constructor(e){this.iterate=e}toArray(){const e=[];return this.iterate(n=>(e.push(n),!0)),e}filter(e){return new Gn(n=>this.iterate(r=>e(r)?n(r):!0))}map(e){return new Gn(n=>this.iterate(r=>n(e(r))))}findLast(e){let n;return this.iterate(r=>(e(r)&&(n=r),!0)),n}findLastMaxBy(e){let n,r=!0;return this.iterate(i=>((r||li.isGreaterThan(e(i,n)))&&(r=!1,n=i),!0)),n}}class Q{static fromTo(e,n){return new Q(e,n)}static addRange(e,n){let r=0;for(;rn))return new Q(e,n)}static ofLength(e){return new Q(0,e)}static ofStartAndLength(e,n){return new Q(e,e+n)}static emptyAt(e){return new Q(e,e)}constructor(e,n){if(this.start=e,this.endExclusive=n,e>n)throw new we(`Invalid range: ${this.toString()}`)}get isEmpty(){return this.start===this.endExclusive}delta(e){return new Q(this.start+e,this.endExclusive+e)}deltaStart(e){return new Q(this.start+e,this.endExclusive)}deltaEnd(e){return new Q(this.start,this.endExclusive+e)}get length(){return this.endExclusive-this.start}toString(){return`[${this.start}, ${this.endExclusive})`}equals(e){return this.start===e.start&&this.endExclusive===e.endExclusive}contains(e){return this.start<=e&&e=e.endExclusive}slice(e){return e.slice(this.start,this.endExclusive)}substring(e){return e.substring(this.start,this.endExclusive)}clip(e){if(this.isEmpty)throw new we(`Invalid clipping range: ${this.toString()}`);return Math.max(this.start,Math.min(this.endExclusive-1,e))}clipCyclic(e){if(this.isEmpty)throw new we(`Invalid clipping range: ${this.toString()}`);return e=this.endExclusive?this.start+(e-this.start)%this.length:e}forEach(e){for(let n=this.start;ne.startLineNumber,dn)}static joinMany(e){if(e.length===0)return[];let n=new Be(e[0].slice());for(let r=1;rn)throw new we(`startLineNumber ${e} cannot be after endLineNumberExclusive ${n}`);this.startLineNumber=e,this.endLineNumberExclusive=n}contains(e){return this.startLineNumber<=e&&ei.endLineNumberExclusive>=e.startLineNumber),r=Jt(this._normalizedRanges,i=>i.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)this._normalizedRanges.splice(n,0,e);else if(n===r-1){const i=this._normalizedRanges[n];this._normalizedRanges[n]=i.join(e)}else{const i=this._normalizedRanges[n].join(this._normalizedRanges[r-1]).join(e);this._normalizedRanges.splice(n,r-n,i)}}contains(e){const n=Gt(this._normalizedRanges,r=>r.startLineNumber<=e);return!!n&&n.endLineNumberExclusive>e}intersects(e){const n=Gt(this._normalizedRanges,r=>r.startLineNumbere.startLineNumber}getUnion(e){if(this._normalizedRanges.length===0)return e;if(e._normalizedRanges.length===0)return this;const n=[];let r=0,i=0,s=null;for(;r=a.startLineNumber?s=new G(s.startLineNumber,Math.max(s.endLineNumberExclusive,a.endLineNumberExclusive)):(n.push(s),s=a)}return s!==null&&n.push(s),new Be(n)}subtractFrom(e){const n=ci(this._normalizedRanges,a=>a.endLineNumberExclusive>=e.startLineNumber),r=Jt(this._normalizedRanges,a=>a.startLineNumber<=e.endLineNumberExclusive)+1;if(n===r)return new Be([e]);const i=[];let s=e.startLineNumber;for(let a=n;as&&i.push(new G(s,o.startLineNumber)),s=o.endLineNumberExclusive}return se.toString()).join(", ")}getIntersection(e){const n=[];let r=0,i=0;for(;rn.delta(e)))}}class Le{static{this.zero=new Le(0,0)}static betweenPositions(e,n){return e.lineNumber===n.lineNumber?new Le(0,n.column-e.column):new Le(n.lineNumber-e.lineNumber,n.column-1)}static fromPosition(e){return new Le(e.lineNumber-1,e.column-1)}static ofRange(e){return Le.betweenPositions(e.getStartPosition(),e.getEndPosition())}static ofText(e){let n=0,r=0;for(const i of e)i===` +`?(n++,r=0):r++;return new Le(n,r)}constructor(e,n){this.lineCount=e,this.columnCount=n}isGreaterThanOrEqualTo(e){return this.lineCount!==e.lineCount?this.lineCount>e.lineCount:this.columnCount>=e.columnCount}add(e){return e.lineCount===0?new Le(this.lineCount,this.columnCount+e.columnCount):new Le(this.lineCount+e.lineCount,e.columnCount)}createRange(e){return this.lineCount===0?new Y(e.lineNumber,e.column,e.lineNumber,e.column+this.columnCount):new Y(e.lineNumber,e.column,e.lineNumber+this.lineCount,this.columnCount+1)}toRange(){return new Y(1,1,this.lineCount+1,this.columnCount+1)}toLineRange(){return G.ofLength(1,this.lineCount+1)}addToPosition(e){return this.lineCount===0?new re(e.lineNumber,e.column+this.columnCount):new re(e.lineNumber+this.lineCount,this.columnCount+1)}toString(){return`${this.lineCount},${this.columnCount}`}}class Od{getOffsetRange(e){return new Q(this.getOffset(e.getStartPosition()),this.getOffset(e.getEndPosition()))}getRange(e){return Y.fromPositions(this.getPosition(e.start),this.getPosition(e.endExclusive))}getStringReplacement(e){return new Jn.deps.StringReplacement(this.getOffsetRange(e.range),e.text)}getTextReplacement(e){return new Jn.deps.TextReplacement(this.getRange(e.replaceRange),e.newText)}getTextEdit(e){const n=e.replacements.map(r=>this.getTextReplacement(r));return new Jn.deps.TextEdit(n)}}class Jn{static{this._deps=void 0}static get deps(){if(!this._deps)throw new Error("Dependencies not set. Call _setDependencies first.");return this._deps}}class Wd extends Od{constructor(e){super(),this.text=e,this.lineStartOffsetByLineIdx=[],this.lineEndOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let n=0;n0&&e.charAt(n-1)==="\r"?this.lineEndOffsetByLineIdx.push(n-1):this.lineEndOffsetByLineIdx.push(n));this.lineEndOffsetByLineIdx.push(e.length)}getOffset(e){const n=this._validatePosition(e);return this.lineStartOffsetByLineIdx[n.lineNumber-1]+n.column-1}_validatePosition(e){if(e.lineNumber<1)return new re(1,1);const n=this.textLength.lineCount+1;if(e.lineNumber>n){const i=this.getLineLength(n);return new re(n,i+1)}if(e.column<1)return new re(e.lineNumber,1);const r=this.getLineLength(e.lineNumber);return e.column-1>r?new re(e.lineNumber,r+1):e}getPosition(e){const n=Jt(this.lineStartOffsetByLineIdx,s=>s<=e),r=n+1,i=e-this.lineStartOffsetByLineIdx[n]+1;return new re(r,i)}get textLength(){const e=this.lineStartOffsetByLineIdx.length-1;return new Jn.deps.TextLength(e,this.text.length-this.lineStartOffsetByLineIdx[e])}getLineLength(e){return this.lineEndOffsetByLineIdx[e-1]-this.lineStartOffsetByLineIdx[e-1]}}class Vd{constructor(){this._transformer=void 0}get endPositionExclusive(){return this.length.addToPosition(new re(1,1))}get lineRange(){return this.length.toLineRange()}getValue(){return this.getValueOfRange(this.length.toRange())}getValueOfOffsetRange(e){return this.getValueOfRange(this.getTransformer().getRange(e))}getLineLength(e){return this.getValueOfRange(new Y(e,1,e,Number.MAX_SAFE_INTEGER)).length}getTransformer(){return this._transformer||(this._transformer=new Wd(this.getValue())),this._transformer}getLineAt(e){return this.getValueOfRange(new Y(e,1,e,Number.MAX_SAFE_INTEGER))}}class $d extends Vd{constructor(e,n){qc(n>=1),super(),this._getLineContent=e,this._lineCount=n}getValueOfRange(e){if(e.startLineNumber===e.endLineNumber)return this._getLineContent(e.startLineNumber).substring(e.startColumn-1,e.endColumn-1);let n=this._getLineContent(e.startLineNumber).substring(e.startColumn-1);for(let r=e.startLineNumber+1;re[n-1],e.length)}}class ct{static joinReplacements(e,n){if(e.length===0)throw new we;if(e.length===1)return e[0];const r=e[0].range.getStartPosition(),i=e[e.length-1].range.getEndPosition();let s="";for(let a=0;a ${n.lineNumber},${n.column}): "${this.text}"`}}class ze{static inverse(e,n,r){const i=[];let s=1,a=1;for(const l of e){const c=new ze(new G(s,l.original.startLineNumber),new G(a,l.modified.startLineNumber));c.modified.isEmpty||i.push(c),s=l.original.endLineNumberExclusive,a=l.modified.endLineNumberExclusive}const o=new ze(new G(s,n+1),new G(a,r+1));return o.modified.isEmpty||i.push(o),i}static clip(e,n,r){const i=[];for(const s of e){const a=s.original.intersect(n),o=s.modified.intersect(r);a&&!a.isEmpty&&o&&!o.isEmpty&&i.push(new ze(a,o))}return i}constructor(e,n){this.original=e,this.modified=n}toString(){return`{${this.original.toString()}->${this.modified.toString()}}`}flip(){return new ze(this.modified,this.original)}join(e){return new ze(this.original.join(e.original),this.modified.join(e.modified))}toRangeMapping(){const e=this.original.toInclusiveRange(),n=this.modified.toInclusiveRange();if(e&&n)return new Me(e,n);if(this.original.startLineNumber===1||this.modified.startLineNumber===1){if(!(this.modified.startLineNumber===1&&this.original.startLineNumber===1))throw new we("not a valid diff");return new Me(new Y(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Y(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1))}else return new Me(new Y(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),new Y(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER,this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER))}toRangeMapping2(e,n){if(Va(this.original.endLineNumberExclusive,e)&&Va(this.modified.endLineNumberExclusive,n))return new Me(new Y(this.original.startLineNumber,1,this.original.endLineNumberExclusive,1),new Y(this.modified.startLineNumber,1,this.modified.endLineNumberExclusive,1));if(!this.original.isEmpty&&!this.modified.isEmpty)return new Me(Y.fromPositions(new re(this.original.startLineNumber,1),Lt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),Y.fromPositions(new re(this.modified.startLineNumber,1),Lt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));if(this.original.startLineNumber>1&&this.modified.startLineNumber>1)return new Me(Y.fromPositions(Lt(new re(this.original.startLineNumber-1,Number.MAX_SAFE_INTEGER),e),Lt(new re(this.original.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),e)),Y.fromPositions(Lt(new re(this.modified.startLineNumber-1,Number.MAX_SAFE_INTEGER),n),Lt(new re(this.modified.endLineNumberExclusive-1,Number.MAX_SAFE_INTEGER),n)));throw new we}}function Lt(t,e){if(t.lineNumber<1)return new re(1,1);if(t.lineNumber>e.length)return new re(e.length,e[e.length-1].length+1);const n=e[t.lineNumber-1];return t.column>n.length+1?new re(t.lineNumber,n.length+1):t}function Va(t,e){return t>=1&&t<=e.length}class nt extends ze{static fromRangeMappings(e){const n=G.join(e.map(i=>G.fromRangeInclusive(i.originalRange))),r=G.join(e.map(i=>G.fromRangeInclusive(i.modifiedRange)));return new nt(n,r,e)}constructor(e,n,r){super(e,n),this.innerChanges=r}flip(){return new nt(this.modified,this.original,this.innerChanges?.map(e=>e.flip()))}withInnerChangesFromLineRanges(){return new nt(this.original,this.modified,[this.toRangeMapping()])}}class Me{static fromEdit(e){const n=e.getNewRanges();return e.replacements.map((i,s)=>new Me(i.range,n[s]))}static assertSorted(e){for(let n=1;n${this.modifiedRange.toString()}}`}flip(){return new Me(this.modifiedRange,this.originalRange)}toTextEdit(e){const n=e.getValueOfRange(this.modifiedRange);return new ct(this.originalRange,n)}}function $a(t,e,n,r=!1){const i=[];for(const s of Ld(t.map(a=>Ud(a,e,n)),(a,o)=>a.original.intersectsOrTouches(o.original)||a.modified.intersectsOrTouches(o.modified))){const a=s[0],o=s[s.length-1];i.push(new nt(a.original.join(o.original),a.modified.join(o.modified),s.map(l=>l.innerChanges[0])))}return Yn(()=>!r&&i.length>0&&(i[0].modified.startLineNumber!==i[0].original.startLineNumber||n.length.lineCount-i[i.length-1].modified.endLineNumberExclusive!==e.length.lineCount-i[i.length-1].original.endLineNumberExclusive)?!1:Gl(i,(s,a)=>a.original.startLineNumber-s.original.endLineNumberExclusive===a.modified.startLineNumber-s.modified.endLineNumberExclusive&&s.original.endLineNumberExclusive=n.getLineLength(t.modifiedRange.startLineNumber)&&t.originalRange.startColumn-1>=e.getLineLength(t.originalRange.startLineNumber)&&t.originalRange.startLineNumber<=t.originalRange.endLineNumber+i&&t.modifiedRange.startLineNumber<=t.modifiedRange.endLineNumber+i&&(r=1);const s=new G(t.originalRange.startLineNumber+r,t.originalRange.endLineNumber+1+i),a=new G(t.modifiedRange.startLineNumber+r,t.modifiedRange.endLineNumber+1+i);return new nt(s,a,[t])}const Bd=3;class qd{computeDiff(e,n,r){const s=new Gd(e,n,{maxComputationTime:r.maxComputationTimeMs,shouldIgnoreTrimWhitespace:r.ignoreTrimWhitespace,shouldComputeCharChanges:!0,shouldMakePrettyDiff:!0,shouldPostProcessCharChanges:!0}).computeDiff(),a=[];let o=null;for(const l of s.changes){let c;l.originalEndLineNumber===0?c=new G(l.originalStartLineNumber+1,l.originalStartLineNumber+1):c=new G(l.originalStartLineNumber,l.originalEndLineNumber+1);let d;l.modifiedEndLineNumber===0?d=new G(l.modifiedStartLineNumber+1,l.modifiedStartLineNumber+1):d=new G(l.modifiedStartLineNumber,l.modifiedEndLineNumber+1);let u=new nt(c,d,l.charChanges?.map(m=>new Me(new Y(m.originalStartLineNumber,m.originalStartColumn,m.originalEndLineNumber,m.originalEndColumn),new Y(m.modifiedStartLineNumber,m.modifiedStartColumn,m.modifiedEndLineNumber,m.modifiedEndColumn))));o&&(o.modified.endLineNumberExclusive===u.modified.startLineNumber||o.original.endLineNumberExclusive===u.original.startLineNumber)&&(u=new nt(o.original.join(u.original),o.modified.join(u.modified),o.innerChanges&&u.innerChanges?o.innerChanges.concat(u.innerChanges):void 0),a.pop()),a.push(u),o=u}return Yn(()=>Gl(a,(l,c)=>c.original.startLineNumber-l.original.endLineNumberExclusive===c.modified.startLineNumber-l.modified.endLineNumberExclusive&&l.original.endLineNumberExclusive(e===10?"\\n":String.fromCharCode(e))+`-(${this._lineNumbers[n]},${this._columns[n]})`).join(", ")+"]"}_assertIndex(e,n){if(e<0||e>=n.length)throw new Error("Illegal index")}getElements(){return this._charCodes}getStartLineNumber(e){return e>0&&e===this._lineNumbers.length?this.getEndLineNumber(e-1):(this._assertIndex(e,this._lineNumbers),this._lineNumbers[e])}getEndLineNumber(e){return e===-1?this.getStartLineNumber(e+1):(this._assertIndex(e,this._lineNumbers),this._charCodes[e]===10?this._lineNumbers[e]+1:this._lineNumbers[e])}getStartColumn(e){return e>0&&e===this._columns.length?this.getEndColumn(e-1):(this._assertIndex(e,this._columns),this._columns[e])}getEndColumn(e){return e===-1?this.getStartColumn(e+1):(this._assertIndex(e,this._columns),this._charCodes[e]===10?1:this._columns[e]+1)}}class Bt{constructor(e,n,r,i,s,a,o,l){this.originalStartLineNumber=e,this.originalStartColumn=n,this.originalEndLineNumber=r,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=l}static createFromDiffChange(e,n,r){const i=n.getStartLineNumber(e.originalStart),s=n.getStartColumn(e.originalStart),a=n.getEndLineNumber(e.originalStart+e.originalLength-1),o=n.getEndColumn(e.originalStart+e.originalLength-1),l=r.getStartLineNumber(e.modifiedStart),c=r.getStartColumn(e.modifiedStart),d=r.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=r.getEndColumn(e.modifiedStart+e.modifiedLength-1);return new Bt(i,s,a,o,l,c,d,u)}}function Hd(t){if(t.length<=1)return t;const e=[t[0]];let n=e[0];for(let r=1,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&s()){const f=r.createCharSequence(e,n.originalStart,n.originalStart+n.originalLength-1),g=i.createCharSequence(e,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);if(f.getElements().length>0&&g.getElements().length>0){let b=lc(f,g,s,!0).changes;o&&(b=Hd(b)),m=[];for(let k=0,F=b.length;k1&&b>1;){const k=m.charCodeAt(g-2),F=f.charCodeAt(b-2);if(k!==F)break;g--,b--}(g>1||b>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,g,a+1,1,b)}{let g=di(m,1),b=di(f,1);const k=m.length+1,F=f.length+1;for(;g!0;const e=Date.now();return()=>Date.now()-e{r.push(le.fromOffsetPairs(i?i.getEndExclusives():Ve.zero,s?s.getStarts():new Ve(n,(i?i.seq2Range.endExclusive-i.seq1Range.endExclusive:0)+n)))}),r}static fromOffsetPairs(e,n){return new le(new Q(e.offset1,n.offset1),new Q(e.offset2,n.offset2))}static assertSorted(e){let n;for(const r of e){if(n&&!(n.seq1Range.endExclusive<=r.seq1Range.start&&n.seq2Range.endExclusive<=r.seq2Range.start))throw new we("Sequence diffs must be sorted");n=r}}constructor(e,n){this.seq1Range=e,this.seq2Range=n}swap(){return new le(this.seq2Range,this.seq1Range)}toString(){return`${this.seq1Range} <-> ${this.seq2Range}`}join(e){return new le(this.seq1Range.join(e.seq1Range),this.seq2Range.join(e.seq2Range))}delta(e){return e===0?this:new le(this.seq1Range.delta(e),this.seq2Range.delta(e))}deltaStart(e){return e===0?this:new le(this.seq1Range.deltaStart(e),this.seq2Range.deltaStart(e))}deltaEnd(e){return e===0?this:new le(this.seq1Range.deltaEnd(e),this.seq2Range.deltaEnd(e))}intersect(e){const n=this.seq1Range.intersect(e.seq1Range),r=this.seq2Range.intersect(e.seq2Range);if(!(!n||!r))return new le(n,r)}getStarts(){return new Ve(this.seq1Range.start,this.seq2Range.start)}getEndExclusives(){return new Ve(this.seq1Range.endExclusive,this.seq2Range.endExclusive)}}class Ve{static{this.zero=new Ve(0,0)}static{this.max=new Ve(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER)}constructor(e,n){this.offset1=e,this.offset2=n}toString(){return`${this.offset1} <-> ${this.offset2}`}delta(e){return e===0?this:new Ve(this.offset1+e,this.offset2+e)}equals(e){return this.offset1===e.offset1&&this.offset2===e.offset2}}class En{static{this.instance=new En}isValid(){return!0}}class Jd{constructor(e){if(this.timeout=e,this.startTime=Date.now(),this.valid=!0,e<=0)throw new we("timeout must be positive")}isValid(){return!(Date.now()-this.startTime0&&b>0&&a.get(g-1,b-1)===3&&(R+=o.get(g-1,b-1)),R+=i?i(g,b):1):R=-1;const E=Math.max(k,F,R);if(E===R){const T=g>0&&b>0?o.get(g-1,b-1):0;o.set(g,b,T+1),a.set(g,b,3)}else E===k?(o.set(g,b,0),a.set(g,b,1)):E===F&&(o.set(g,b,0),a.set(g,b,2));s.set(g,b,E)}const l=[];let c=e.length,d=n.length;function u(g,b){(g+1!==c||b+1!==d)&&l.push(new le(new Q(g+1,c),new Q(b+1,d))),c=g,d=b}let m=e.length-1,f=n.length-1;for(;m>=0&&f>=0;)a.get(m,f)===3?(u(m,f),m--,f--):a.get(m,f)===1?m--:f--;return u(-1,-1),l.reverse(),new rt(l,!1)}}class cc{compute(e,n,r=En.instance){if(e.length===0||n.length===0)return rt.trivial(e,n);const i=e,s=n;function a(b,k){for(;bi.length||T>s.length)continue;const O=a(E,T);l.set(d,O);const V=E===F?c.get(d+1):c.get(d-1);if(c.set(d,O!==E?new qa(V,E,T,O-E):V),l.get(d)===i.length&&l.get(d)-d===s.length)break e}}let u=c.get(d);const m=[];let f=i.length,g=s.length;for(;;){const b=u?u.x+u.length:0,k=u?u.y+u.length:0;if((b!==f||k!==g)&&m.push(new le(new Q(b,f),new Q(k,g))),!u)break;f=u.x,g=u.y,u=u.prev}return m.reverse(),new rt(m,!1)}}class qa{constructor(e,n,r,i){this.prev=e,this.x=n,this.y=r,this.length=i}}class Yd{constructor(){this.positiveArr=new Int32Array(10),this.negativeArr=new Int32Array(10)}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){if(e<0){if(e=-e-1,e>=this.negativeArr.length){const r=this.negativeArr;this.negativeArr=new Int32Array(r.length*2),this.negativeArr.set(r)}this.negativeArr[e]=n}else{if(e>=this.positiveArr.length){const r=this.positiveArr;this.positiveArr=new Int32Array(r.length*2),this.positiveArr.set(r)}this.positiveArr[e]=n}}}class Qd{constructor(){this.positiveArr=[],this.negativeArr=[]}get(e){return e<0?(e=-e-1,this.negativeArr[e]):this.positiveArr[e]}set(e,n){e<0?(e=-e-1,this.negativeArr[e]=n):this.positiveArr[e]=n}}class ir{constructor(e,n,r){this.lines=e,this.range=n,this.considerWhitespaceChanges=r,this.elements=[],this.firstElementOffsetByLineIdx=[],this.lineStartOffsets=[],this.trimmedWsLengthsByLineIdx=[],this.firstElementOffsetByLineIdx.push(0);for(let i=this.range.startLineNumber;i<=this.range.endLineNumber;i++){let s=e[i-1],a=0;i===this.range.startLineNumber&&this.range.startColumn>1&&(a=this.range.startColumn-1,s=s.substring(a)),this.lineStartOffsets.push(a);let o=0;if(!r){const c=s.trimStart();o=s.length-c.length,s=c.trimEnd()}this.trimmedWsLengthsByLineIdx.push(o);const l=i===this.range.endLineNumber?Math.min(this.range.endColumn-1-a-o,s.length):s.length;for(let c=0;cString.fromCharCode(n)).join("")}getElement(e){return this.elements[e]}get length(){return this.elements.length}getBoundaryScore(e){const n=Ga(e>0?this.elements[e-1]:-1),r=Ga(es<=e),i=e-this.firstElementOffsetByLineIdx[r];return new re(this.range.startLineNumber+r,1+this.lineStartOffsets[r]+i+(i===0&&n==="left"?0:this.trimmedWsLengthsByLineIdx[r]))}translateRange(e){const n=this.translateOffset(e.start,"right"),r=this.translateOffset(e.endExclusive,"left");return r.isBefore(n)?Y.fromPositions(r,r):Y.fromPositions(n,r)}findWordContaining(e){if(e<0||e>=this.elements.length||!Mt(this.elements[e]))return;let n=e;for(;n>0&&Mt(this.elements[n-1]);)n--;let r=e;for(;r=this.elements.length||!Mt(this.elements[e]))return;let n=e;for(;n>0&&Mt(this.elements[n-1])&&!ja(this.elements[n]);)n--;let r=e;for(;ri<=e.start)??0,r=Td(this.firstElementOffsetByLineIdx,i=>e.endExclusive<=i)??this.elements.length;return new Q(n,r)}}function Mt(t){return t>=97&&t<=122||t>=65&&t<=90||t>=48&&t<=57}function ja(t){return t>=65&&t<=90}const Kd={0:0,1:0,2:0,3:10,4:2,5:30,6:3,7:10,8:10};function Ha(t){return Kd[t]}function Ga(t){return t===10?8:t===13?7:ui(t)?6:t>=97&&t<=122?0:t>=65&&t<=90?1:t>=48&&t<=57?2:t===-1?3:t===44||t===59?5:4}function Zd(t,e,n,r,i,s){let{moves:a,excludedChanges:o}=tu(t,e,n,s);if(!s.isValid())return[];const l=t.filter(d=>!o.has(d)),c=nu(l,r,i,e,n,s);return zd(a,c),a=ru(a),a=a.filter(d=>{const u=d.original.toOffsetRange().slice(e).map(f=>f.trim());return u.join(` +`).length>=15&&eu(u,f=>f.length>=2)>=2}),a=iu(t,a),a}function eu(t,e){let n=0;for(const r of t)e(r)&&n++;return n}function tu(t,e,n,r){const i=[],s=t.filter(l=>l.modified.isEmpty&&l.original.length>=3).map(l=>new bn(l.original,e,l)),a=new Set(t.filter(l=>l.original.isEmpty&&l.modified.length>=3).map(l=>new bn(l.modified,n,l))),o=new Set;for(const l of s){let c=-1,d;for(const u of a){const m=l.computeSimilarity(u);m>c&&(c=m,d=u)}if(c>.9&&d&&(a.delete(d),i.push(new ze(l.range,d.range)),o.add(l.source),o.add(d.source)),!r.isValid())return{moves:i,excludedChanges:o}}return{moves:i,excludedChanges:o}}function nu(t,e,n,r,i,s){const a=[],o=new vd;for(const m of t)for(let f=m.original.startLineNumber;fm.modified.startLineNumber,dn));for(const m of t){let f=[];for(let g=m.modified.startLineNumber;g{for(const T of f)if(T.originalLineRange.endLineNumberExclusive+1===R.endLineNumberExclusive&&T.modifiedLineRange.endLineNumberExclusive+1===k.endLineNumberExclusive){T.originalLineRange=new G(T.originalLineRange.startLineNumber,R.endLineNumberExclusive),T.modifiedLineRange=new G(T.modifiedLineRange.startLineNumber,k.endLineNumberExclusive),F.push(T);return}const E={modifiedLineRange:k,originalLineRange:R};l.push(E),F.push(E)}),f=F}if(!s.isValid())return[]}l.sort(Pd(hn(m=>m.modifiedLineRange.length,dn)));const c=new Be,d=new Be;for(const m of l){const f=m.modifiedLineRange.startLineNumber-m.originalLineRange.startLineNumber,g=c.subtractFrom(m.modifiedLineRange),b=d.subtractFrom(m.originalLineRange).getWithDelta(f),k=g.getIntersection(b);for(const F of k.ranges){if(F.length<3)continue;const R=F,E=F.delta(-f);a.push(new ze(E,R)),c.addRange(R),d.addRange(E)}}a.sort(hn(m=>m.original.startLineNumber,dn));const u=new xr(t);for(let m=0;mV.original.startLineNumber<=f.original.startLineNumber),b=Gt(t,V=>V.modified.startLineNumber<=f.modified.startLineNumber),k=Math.max(f.original.startLineNumber-g.original.startLineNumber,f.modified.startLineNumber-b.modified.startLineNumber),F=u.findLastMonotonous(V=>V.original.startLineNumberV.modified.startLineNumberr.length||D>i.length||c.contains(D)||d.contains(V)||!Ja(r[V-1],i[D-1],s))break}T>0&&(d.addRange(new G(f.original.startLineNumber-T,f.original.startLineNumber)),c.addRange(new G(f.modified.startLineNumber-T,f.modified.startLineNumber)));let O;for(O=0;Or.length||D>i.length||c.contains(D)||d.contains(V)||!Ja(r[V-1],i[D-1],s))break}O>0&&(d.addRange(new G(f.original.endLineNumberExclusive,f.original.endLineNumberExclusive+O)),c.addRange(new G(f.modified.endLineNumberExclusive,f.modified.endLineNumberExclusive+O))),(T>0||O>0)&&(a[m]=new ze(new G(f.original.startLineNumber-T,f.original.endLineNumberExclusive+O),new G(f.modified.startLineNumber-T,f.modified.endLineNumberExclusive+O)))}return a}function Ja(t,e,n){if(t.trim()===e.trim())return!0;if(t.length>300&&e.length>300)return!1;const i=new cc().compute(new ir([t],new Y(1,1,1,t.length),!1),new ir([e],new Y(1,1,1,e.length),!1),n);let s=0;const a=le.invert(i.diffs,t.length);for(const d of a)d.seq1Range.forEach(u=>{ui(t.charCodeAt(u))||s++});function o(d){let u=0;for(let m=0;me.length?t:e);return s/l>.6&&l>10}function ru(t){if(t.length===0)return t;t.sort(hn(n=>n.original.startLineNumber,dn));const e=[t[0]];for(let n=1;n=0&&a>=0&&s+a<=2){e[e.length-1]=r.join(i);continue}e.push(i)}return e}function iu(t,e){const n=new xr(t);return e=e.filter(r=>{const i=n.findLastMonotonous(o=>o.original.startLineNumbero.modified.startLineNumber0&&(o=o.delta(c))}i.push(o)}return r.length>0&&i.push(r[r.length-1]),i}function su(t,e,n){if(!t.getBoundaryScore||!e.getBoundaryScore)return n;for(let r=0;r0?n[r-1]:void 0,s=n[r],a=r+1=r.start&&t.seq2Range.start-a>=i.start&&n.isStronglyEqual(t.seq2Range.start-a,t.seq2Range.endExclusive-a)&&a<100;)a++;a--;let o=0;for(;t.seq1Range.start+oc&&(c=g,l=d)}return t.delta(l)}function au(t,e,n){const r=[];for(const i of n){const s=r[r.length-1];if(!s){r.push(i);continue}i.seq1Range.start-s.seq1Range.endExclusive<=2||i.seq2Range.start-s.seq2Range.endExclusive<=2?r[r.length-1]=new le(s.seq1Range.join(i.seq1Range),s.seq2Range.join(i.seq2Range)):r.push(i)}return r}function Ka(t,e,n,r,i=!1){const s=le.invert(n,t.length),a=[];let o=new Ve(0,0);function l(d,u){if(d.offset10;){const R=s[0];if(!(R.seq1Range.intersects(g.seq1Range)||R.seq2Range.intersects(g.seq2Range)))break;const T=r(t,R.seq1Range.start),O=r(e,R.seq2Range.start),V=new le(T,O),D=V.intersect(R);if(k+=D.seq1Range.length,F+=D.seq2Range.length,g=g.join(V),g.seq1Range.endExclusive>=R.seq1Range.endExclusive)s.shift();else break}(i&&k+F0;){const d=s.shift();d.seq1Range.isEmpty||(l(d.getStarts(),d),l(d.getEndExclusives().delta(-1),d))}return ou(n,a)}function ou(t,e){const n=[];for(;t.length>0||e.length>0;){const r=t[0],i=e[0];let s;r&&(!i||r.seq1Range.start0&&n[n.length-1].seq1Range.endExclusive>=s.seq1Range.start?n[n.length-1]=n[n.length-1].join(s):n.push(s)}return n}function lu(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const o=[r[0]];for(let l=1;l5||g.seq1Range.length+g.seq2Range.length>5)};var a=u;const c=r[l],d=o[o.length-1];u(d,c)?(s=!0,o[o.length-1]=o[o.length-1].join(c)):o.push(c)}r=o}while(i++<10&&s);return r}function cu(t,e,n){let r=n;if(r.length===0)return r;let i=0,s;do{s=!1;const l=[r[0]];for(let c=1;c5||k.length>500)return!1;const R=t.getText(k).trim();if(R.length>20||R.split(/\r\n|\r|\n/).length>1)return!1;const E=t.countLinesIn(g.seq1Range),T=g.seq1Range.length,O=e.countLinesIn(g.seq2Range),V=g.seq2Range.length,D=t.countLinesIn(b.seq1Range),N=b.seq1Range.length,z=e.countLinesIn(b.seq2Range),$=b.seq2Range.length,L=130;function y(_){return Math.min(_,L)}return Math.pow(Math.pow(y(E*40+T),1.5)+Math.pow(y(O*40+V),1.5),1.5)+Math.pow(Math.pow(y(D*40+N),1.5)+Math.pow(y(z*40+$),1.5),1.5)>(L**1.5)**1.5*1.3};var o=m;const d=r[c],u=l[l.length-1];m(u,d)?(s=!0,l[l.length-1]=l[l.length-1].join(d)):l.push(d)}r=l}while(i++<10&&s);const a=[];return Ad(r,(l,c,d)=>{let u=c;function m(R){return R.length>0&&R.trim().length<=3&&c.seq1Range.length+c.seq2Range.length>100}const f=t.extendToFullLines(c.seq1Range),g=t.getText(new Q(f.start,c.seq1Range.start));m(g)&&(u=u.deltaStart(-g.length));const b=t.getText(new Q(c.seq1Range.endExclusive,f.endExclusive));m(b)&&(u=u.deltaEnd(b.length));const k=le.fromOffsetPairs(l?l.getEndExclusives():Ve.zero,d?d.getStarts():Ve.max),F=u.intersect(k);a.length>0&&F.getStarts().equals(a[a.length-1].getEndExclusives())?a[a.length-1]=a[a.length-1].join(F):a.push(F)}),a}class Za{constructor(e,n){this.trimmedHash=e,this.lines=n}getElement(e){return this.trimmedHash[e]}get length(){return this.trimmedHash.length}getBoundaryScore(e){const n=e===0?0:eo(this.lines[e-1]),r=e===this.lines.length?0:eo(this.lines[e]);return 1e3-(n+r)}getText(e){return this.lines.slice(e.start,e.endExclusive).join(` +`)}isStronglyEqual(e,n){return this.lines[e]===this.lines[n]}}function eo(t){let e=0;for(;eD===N))return new Hn([],[],!1);if(e.length===1&&e[0].length===0||n.length===1&&n[0].length===0)return new Hn([new nt(new G(1,e.length+1),new G(1,n.length+1),[new Me(new Y(1,1,e.length,e[e.length-1].length+1),new Y(1,1,n.length,n[n.length-1].length+1))])],[],!1);const i=r.maxComputationTimeMs===0?En.instance:new Jd(r.maxComputationTimeMs),s=!r.ignoreTrimWhitespace,a=new Map;function o(D){let N=a.get(D);return N===void 0&&(N=a.size,a.set(D,N)),N}const l=e.map(D=>o(D.trim())),c=n.map(D=>o(D.trim())),d=new Za(l,e),u=new Za(c,n),m=d.length+u.length<1700?this.dynamicProgrammingDiffing.compute(d,u,i,(D,N)=>e[D]===n[N]?n[N].length===0?.1:1+Math.log(1+n[N].length):.99):this.myersDiffingAlgorithm.compute(d,u,i);let f=m.diffs,g=m.hitTimeout;f=Xa(d,u,f),f=lu(d,u,f);const b=[],k=D=>{if(s)for(let N=0;ND.seq1Range.start-F===D.seq2Range.start-R);const N=D.seq1Range.start-F;k(N),F=D.seq1Range.endExclusive,R=D.seq2Range.endExclusive;const z=this.refineDiff(e,n,D,i,s,r);z.hitTimeout&&(g=!0);for(const $ of z.mappings)b.push($)}k(e.length-F);const E=new Ln(e),T=new Ln(n),O=$a(b,E,T);let V=[];return r.computeMoves&&(V=this.computeMoves(O,e,n,l,c,i,s,r)),Yn(()=>{function D(z,$){if(z.lineNumber<1||z.lineNumber>$.length)return!1;const L=$[z.lineNumber-1];return!(z.column<1||z.column>L.length+1)}function N(z,$){return!(z.startLineNumber<1||z.startLineNumber>$.length+1||z.endLineNumberExclusive<1||z.endLineNumberExclusive>$.length+1)}for(const z of O){if(!z.innerChanges)return!1;for(const $ of z.innerChanges)if(!(D($.modifiedRange.getStartPosition(),n)&&D($.modifiedRange.getEndPosition(),n)&&D($.originalRange.getStartPosition(),e)&&D($.originalRange.getEndPosition(),e)))return!1;if(!N(z.modified,n)||!N(z.original,e))return!1}return!0}),new Hn(O,V,g)}computeMoves(e,n,r,i,s,a,o,l){return Zd(e,n,r,i,s,a).map(u=>{const m=this.refineDiff(n,r,new le(u.original.toOffsetRange(),u.modified.toOffsetRange()),a,o,l),f=$a(m.mappings,new Ln(n),new Ln(r),!0);return new Dd(u,f)})}refineDiff(e,n,r,i,s,a){const l=du(r).toRangeMapping2(e,n),c=new ir(e,l.originalRange,s),d=new ir(n,l.modifiedRange,s),u=c.length+d.length<500?this.dynamicProgrammingDiffing.compute(c,d,i):this.myersDiffingAlgorithm.compute(c,d,i);let m=u.diffs;return m=Xa(c,d,m),m=Ka(c,d,m,(g,b)=>g.findWordContaining(b)),a.extendToSubwords&&(m=Ka(c,d,m,(g,b)=>g.findSubWordContaining(b),!0)),m=au(c,d,m),m=cu(c,d,m),{mappings:m.map(g=>new Me(c.translateRange(g.seq1Range),d.translateRange(g.seq2Range))),hitTimeout:u.hitTimeout}}}function du(t){return new ze(new G(t.seq1Range.start+1,t.seq1Range.endExclusive+1),new G(t.seq2Range.start+1,t.seq2Range.endExclusive+1))}const to={getLegacy:()=>new qd,getDefault:()=>new hu};function mt(t,e){const n=Math.pow(10,e);return Math.round(t*n)/n}class x{constructor(e,n,r,i=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,n))|0,this.b=Math.min(255,Math.max(0,r))|0,this.a=mt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.r===n.r&&e.g===n.g&&e.b===n.b&&e.a===n.a}}class Ae{constructor(e,n,r,i){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=mt(Math.max(Math.min(1,n),0),3),this.l=mt(Math.max(Math.min(1,r),0),3),this.a=mt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.l===n.l&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=e.a,a=Math.max(n,r,i),o=Math.min(n,r,i);let l=0,c=0;const d=(o+a)/2,u=a-o;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),a){case n:l=(r-i)/u+(r1&&(r-=1),r<1/6?e+(n-e)*6*r:r<1/2?n:r<2/3?e+(n-e)*(2/3-r)*6:e}static toRGBA(e){const n=e.h/360,{s:r,l:i,a:s}=e;let a,o,l;if(r===0)a=o=l=i;else{const c=i<.5?i*(1+r):i+r-i*r,d=2*i-c;a=Ae._hue2rgb(d,c,n+1/3),o=Ae._hue2rgb(d,c,n),l=Ae._hue2rgb(d,c,n-1/3)}return new x(Math.round(a*255),Math.round(o*255),Math.round(l*255),s)}}class Vt{constructor(e,n,r,i){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=mt(Math.max(Math.min(1,n),0),3),this.v=mt(Math.max(Math.min(1,r),0),3),this.a=mt(Math.max(Math.min(1,i),0),3)}static equals(e,n){return e.h===n.h&&e.s===n.s&&e.v===n.v&&e.a===n.a}static fromRGBA(e){const n=e.r/255,r=e.g/255,i=e.b/255,s=Math.max(n,r,i),a=Math.min(n,r,i),o=s-a,l=s===0?0:o/s;let c;return o===0?c=0:s===n?c=((r-i)/o%6+6)%6:s===r?c=(i-n)/o+2:c=(n-r)/o+4,new Vt(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:n,s:r,v:i,a:s}=e,a=i*r,o=a*(1-Math.abs(n/60%2-1)),l=i-a;let[c,d,u]=[0,0,0];return n<60?(c=a,d=o):n<120?(c=o,d=a):n<180?(d=a,u=o):n<240?(d=o,u=a):n<300?(c=o,u=a):n<=360&&(c=a,u=o),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new x(c,d,u,s)}}let sr=class ue{static fromHex(e){return ue.Format.CSS.parseHex(e)||ue.red}static equals(e,n){return!e&&!n?!0:!e||!n?!1:e.equals(n)}get hsla(){return this._hsla?this._hsla:Ae.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Vt.fromRGBA(this.rgba)}constructor(e){if(e)if(e instanceof x)this.rgba=e;else if(e instanceof Ae)this._hsla=e,this.rgba=Ae.toRGBA(e);else if(e instanceof Vt)this._hsva=e,this.rgba=Vt.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}equals(e){return!!e&&x.equals(this.rgba,e.rgba)&&Ae.equals(this.hsla,e.hsla)&&Vt.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=ue._relativeLuminanceForComponent(this.rgba.r),n=ue._relativeLuminanceForComponent(this.rgba.g),r=ue._relativeLuminanceForComponent(this.rgba.b),i=.2126*e+.7152*n+.0722*r;return mt(i,4)}static _relativeLuminanceForComponent(e){const n=e/255;return n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>r}isDarkerThan(e){const n=this.getRelativeLuminance(),r=e.getRelativeLuminance();return n>>0),this._toNumber32Bit}static getLighterColor(e,n,r){if(e.isLighterThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(s-i)/s,e.lighten(r)}static getDarkerColor(e,n,r){if(e.isDarkerThan(n))return e;r=r||.5;const i=e.getRelativeLuminance(),s=n.getRelativeLuminance();return r=r*(i-s)/i,e.darken(r)}static{this.white=new ue(new x(255,255,255,1))}static{this.black=new ue(new x(0,0,0,1))}static{this.red=new ue(new x(255,0,0,1))}static{this.blue=new ue(new x(0,0,255,1))}static{this.green=new ue(new x(0,255,0,1))}static{this.cyan=new ue(new x(0,255,255,1))}static{this.lightgrey=new ue(new x(211,211,211,1))}static{this.transparent=new ue(new x(0,0,0,0))}};(function(t){(function(e){(function(n){function r(b){return b.rgba.a===1?`rgb(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b})`:t.Format.CSS.formatRGBA(b)}n.formatRGB=r;function i(b){return`rgba(${b.rgba.r}, ${b.rgba.g}, ${b.rgba.b}, ${+b.rgba.a.toFixed(2)})`}n.formatRGBA=i;function s(b){return b.hsla.a===1?`hsl(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%)`:t.Format.CSS.formatHSLA(b)}n.formatHSL=s;function a(b){return`hsla(${b.hsla.h}, ${Math.round(b.hsla.s*100)}%, ${Math.round(b.hsla.l*100)}%, ${b.hsla.a.toFixed(2)})`}n.formatHSLA=a;function o(b){const k=b.toString(16);return k.length!==2?"0"+k:k}function l(b){return`#${o(b.rgba.r)}${o(b.rgba.g)}${o(b.rgba.b)}`}n.formatHex=l;function c(b,k=!1){return k&&b.rgba.a===1?t.Format.CSS.formatHex(b):`#${o(b.rgba.r)}${o(b.rgba.g)}${o(b.rgba.b)}${o(Math.round(b.rgba.a*255))}`}n.formatHexA=c;function d(b){return b.isOpaque()?t.Format.CSS.formatHex(b):t.Format.CSS.formatRGBA(b)}n.format=d;function u(b){if(b==="transparent")return t.transparent;if(b.startsWith("#"))return f(b);if(b.startsWith("rgba(")){const k=b.match(/rgba\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+(\.\d+)?)\)/);if(!k)throw new Error("Invalid color format "+b);const F=parseInt(k.groups?.r??"0"),R=parseInt(k.groups?.g??"0"),E=parseInt(k.groups?.b??"0"),T=parseFloat(k.groups?.a??"0");return new t(new x(F,R,E,T))}if(b.startsWith("rgb(")){const k=b.match(/rgb\((?(?:\+|-)?\d+), *(?(?:\+|-)?\d+), *(?(?:\+|-)?\d+)\)/);if(!k)throw new Error("Invalid color format "+b);const F=parseInt(k.groups?.r??"0"),R=parseInt(k.groups?.g??"0"),E=parseInt(k.groups?.b??"0");return new t(new x(F,R,E))}return m(b)}n.parse=u;function m(b){switch(b){case"aliceblue":return new t(new x(240,248,255,1));case"antiquewhite":return new t(new x(250,235,215,1));case"aqua":return new t(new x(0,255,255,1));case"aquamarine":return new t(new x(127,255,212,1));case"azure":return new t(new x(240,255,255,1));case"beige":return new t(new x(245,245,220,1));case"bisque":return new t(new x(255,228,196,1));case"black":return new t(new x(0,0,0,1));case"blanchedalmond":return new t(new x(255,235,205,1));case"blue":return new t(new x(0,0,255,1));case"blueviolet":return new t(new x(138,43,226,1));case"brown":return new t(new x(165,42,42,1));case"burlywood":return new t(new x(222,184,135,1));case"cadetblue":return new t(new x(95,158,160,1));case"chartreuse":return new t(new x(127,255,0,1));case"chocolate":return new t(new x(210,105,30,1));case"coral":return new t(new x(255,127,80,1));case"cornflowerblue":return new t(new x(100,149,237,1));case"cornsilk":return new t(new x(255,248,220,1));case"crimson":return new t(new x(220,20,60,1));case"cyan":return new t(new x(0,255,255,1));case"darkblue":return new t(new x(0,0,139,1));case"darkcyan":return new t(new x(0,139,139,1));case"darkgoldenrod":return new t(new x(184,134,11,1));case"darkgray":return new t(new x(169,169,169,1));case"darkgreen":return new t(new x(0,100,0,1));case"darkgrey":return new t(new x(169,169,169,1));case"darkkhaki":return new t(new x(189,183,107,1));case"darkmagenta":return new t(new x(139,0,139,1));case"darkolivegreen":return new t(new x(85,107,47,1));case"darkorange":return new t(new x(255,140,0,1));case"darkorchid":return new t(new x(153,50,204,1));case"darkred":return new t(new x(139,0,0,1));case"darksalmon":return new t(new x(233,150,122,1));case"darkseagreen":return new t(new x(143,188,143,1));case"darkslateblue":return new t(new x(72,61,139,1));case"darkslategray":return new t(new x(47,79,79,1));case"darkslategrey":return new t(new x(47,79,79,1));case"darkturquoise":return new t(new x(0,206,209,1));case"darkviolet":return new t(new x(148,0,211,1));case"deeppink":return new t(new x(255,20,147,1));case"deepskyblue":return new t(new x(0,191,255,1));case"dimgray":return new t(new x(105,105,105,1));case"dimgrey":return new t(new x(105,105,105,1));case"dodgerblue":return new t(new x(30,144,255,1));case"firebrick":return new t(new x(178,34,34,1));case"floralwhite":return new t(new x(255,250,240,1));case"forestgreen":return new t(new x(34,139,34,1));case"fuchsia":return new t(new x(255,0,255,1));case"gainsboro":return new t(new x(220,220,220,1));case"ghostwhite":return new t(new x(248,248,255,1));case"gold":return new t(new x(255,215,0,1));case"goldenrod":return new t(new x(218,165,32,1));case"gray":return new t(new x(128,128,128,1));case"green":return new t(new x(0,128,0,1));case"greenyellow":return new t(new x(173,255,47,1));case"grey":return new t(new x(128,128,128,1));case"honeydew":return new t(new x(240,255,240,1));case"hotpink":return new t(new x(255,105,180,1));case"indianred":return new t(new x(205,92,92,1));case"indigo":return new t(new x(75,0,130,1));case"ivory":return new t(new x(255,255,240,1));case"khaki":return new t(new x(240,230,140,1));case"lavender":return new t(new x(230,230,250,1));case"lavenderblush":return new t(new x(255,240,245,1));case"lawngreen":return new t(new x(124,252,0,1));case"lemonchiffon":return new t(new x(255,250,205,1));case"lightblue":return new t(new x(173,216,230,1));case"lightcoral":return new t(new x(240,128,128,1));case"lightcyan":return new t(new x(224,255,255,1));case"lightgoldenrodyellow":return new t(new x(250,250,210,1));case"lightgray":return new t(new x(211,211,211,1));case"lightgreen":return new t(new x(144,238,144,1));case"lightgrey":return new t(new x(211,211,211,1));case"lightpink":return new t(new x(255,182,193,1));case"lightsalmon":return new t(new x(255,160,122,1));case"lightseagreen":return new t(new x(32,178,170,1));case"lightskyblue":return new t(new x(135,206,250,1));case"lightslategray":return new t(new x(119,136,153,1));case"lightslategrey":return new t(new x(119,136,153,1));case"lightsteelblue":return new t(new x(176,196,222,1));case"lightyellow":return new t(new x(255,255,224,1));case"lime":return new t(new x(0,255,0,1));case"limegreen":return new t(new x(50,205,50,1));case"linen":return new t(new x(250,240,230,1));case"magenta":return new t(new x(255,0,255,1));case"maroon":return new t(new x(128,0,0,1));case"mediumaquamarine":return new t(new x(102,205,170,1));case"mediumblue":return new t(new x(0,0,205,1));case"mediumorchid":return new t(new x(186,85,211,1));case"mediumpurple":return new t(new x(147,112,219,1));case"mediumseagreen":return new t(new x(60,179,113,1));case"mediumslateblue":return new t(new x(123,104,238,1));case"mediumspringgreen":return new t(new x(0,250,154,1));case"mediumturquoise":return new t(new x(72,209,204,1));case"mediumvioletred":return new t(new x(199,21,133,1));case"midnightblue":return new t(new x(25,25,112,1));case"mintcream":return new t(new x(245,255,250,1));case"mistyrose":return new t(new x(255,228,225,1));case"moccasin":return new t(new x(255,228,181,1));case"navajowhite":return new t(new x(255,222,173,1));case"navy":return new t(new x(0,0,128,1));case"oldlace":return new t(new x(253,245,230,1));case"olive":return new t(new x(128,128,0,1));case"olivedrab":return new t(new x(107,142,35,1));case"orange":return new t(new x(255,165,0,1));case"orangered":return new t(new x(255,69,0,1));case"orchid":return new t(new x(218,112,214,1));case"palegoldenrod":return new t(new x(238,232,170,1));case"palegreen":return new t(new x(152,251,152,1));case"paleturquoise":return new t(new x(175,238,238,1));case"palevioletred":return new t(new x(219,112,147,1));case"papayawhip":return new t(new x(255,239,213,1));case"peachpuff":return new t(new x(255,218,185,1));case"peru":return new t(new x(205,133,63,1));case"pink":return new t(new x(255,192,203,1));case"plum":return new t(new x(221,160,221,1));case"powderblue":return new t(new x(176,224,230,1));case"purple":return new t(new x(128,0,128,1));case"rebeccapurple":return new t(new x(102,51,153,1));case"red":return new t(new x(255,0,0,1));case"rosybrown":return new t(new x(188,143,143,1));case"royalblue":return new t(new x(65,105,225,1));case"saddlebrown":return new t(new x(139,69,19,1));case"salmon":return new t(new x(250,128,114,1));case"sandybrown":return new t(new x(244,164,96,1));case"seagreen":return new t(new x(46,139,87,1));case"seashell":return new t(new x(255,245,238,1));case"sienna":return new t(new x(160,82,45,1));case"silver":return new t(new x(192,192,192,1));case"skyblue":return new t(new x(135,206,235,1));case"slateblue":return new t(new x(106,90,205,1));case"slategray":return new t(new x(112,128,144,1));case"slategrey":return new t(new x(112,128,144,1));case"snow":return new t(new x(255,250,250,1));case"springgreen":return new t(new x(0,255,127,1));case"steelblue":return new t(new x(70,130,180,1));case"tan":return new t(new x(210,180,140,1));case"teal":return new t(new x(0,128,128,1));case"thistle":return new t(new x(216,191,216,1));case"tomato":return new t(new x(255,99,71,1));case"turquoise":return new t(new x(64,224,208,1));case"violet":return new t(new x(238,130,238,1));case"wheat":return new t(new x(245,222,179,1));case"white":return new t(new x(255,255,255,1));case"whitesmoke":return new t(new x(245,245,245,1));case"yellow":return new t(new x(255,255,0,1));case"yellowgreen":return new t(new x(154,205,50,1));default:return null}}function f(b){const k=b.length;if(k===0||b.charCodeAt(0)!==35)return null;if(k===7){const F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),R=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),E=16*g(b.charCodeAt(5))+g(b.charCodeAt(6));return new t(new x(F,R,E,1))}if(k===9){const F=16*g(b.charCodeAt(1))+g(b.charCodeAt(2)),R=16*g(b.charCodeAt(3))+g(b.charCodeAt(4)),E=16*g(b.charCodeAt(5))+g(b.charCodeAt(6)),T=16*g(b.charCodeAt(7))+g(b.charCodeAt(8));return new t(new x(F,R,E,T/255))}if(k===4){const F=g(b.charCodeAt(1)),R=g(b.charCodeAt(2)),E=g(b.charCodeAt(3));return new t(new x(16*F+F,16*R+R,16*E+E))}if(k===5){const F=g(b.charCodeAt(1)),R=g(b.charCodeAt(2)),E=g(b.charCodeAt(3)),T=g(b.charCodeAt(4));return new t(new x(16*F+F,16*R+R,16*E+E,(16*T+T)/255))}return null}n.parseHex=f;function g(b){switch(b){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(t.Format||(t.Format={}))})(sr||(sr={}));function hc(t){const e=[];for(const n of t){const r=Number(n);(r||r===0&&n.replace(/\s/g,"")!=="")&&e.push(r)}return e}function Xi(t,e,n,r){return{red:t/255,blue:n/255,green:e/255,alpha:r}}function en(t,e){const n=e.index,r=e[0].length;if(n===void 0)return;const i=t.positionAt(n);return{startLineNumber:i.lineNumber,startColumn:i.column,endLineNumber:i.lineNumber,endColumn:i.column+r}}function uu(t,e){if(!t)return;const n=sr.Format.CSS.parseHex(e);if(n)return{range:t,color:Xi(n.rgba.r,n.rgba.g,n.rgba.b,n.rgba.a)}}function no(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=hc(i);return{range:t,color:Xi(s[0],s[1],s[2],n?s[3]:1)}}function ro(t,e,n){if(!t||e.length!==1)return;const i=e[0].values(),s=hc(i),a=new sr(new Ae(s[0],s[1]/100,s[2]/100,n?s[3]:1));return{range:t,color:Xi(a.rgba.r,a.rgba.g,a.rgba.b,a.rgba.a)}}function tn(t,e){return typeof t=="string"?[...t.matchAll(e)]:t.findMatches(e)}function pu(t){const e=[],r=tn(t,/\b(rgb|rgba|hsl|hsla)(\([0-9\s,.\%]*\))|^(#)([A-Fa-f0-9]{3})\b|^(#)([A-Fa-f0-9]{4})\b|^(#)([A-Fa-f0-9]{6})\b|^(#)([A-Fa-f0-9]{8})\b|(?<=['"\s])(#)([A-Fa-f0-9]{3})\b|(?<=['"\s])(#)([A-Fa-f0-9]{4})\b|(?<=['"\s])(#)([A-Fa-f0-9]{6})\b|(?<=['"\s])(#)([A-Fa-f0-9]{8})\b/gm);if(r.length>0)for(const i of r){const s=i.filter(c=>c!==void 0),a=s[1],o=s[2];if(!o)continue;let l;if(a==="rgb"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*\)$/gm;l=no(en(t,i),tn(o,c),!1)}else if(a==="rgba"){const c=/^\(\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]|[0-9])\s*,\s*(0[.][0-9]+|[.][0-9]+|[01][.]|[01])\s*\)$/gm;l=no(en(t,i),tn(o,c),!0)}else if(a==="hsl"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*\)$/gm;l=ro(en(t,i),tn(o,c),!1)}else if(a==="hsla"){const c=/^\(\s*((?:360(?:\.0+)?|(?:36[0]|3[0-5][0-9]|[12][0-9][0-9]|[1-9]?[0-9])(?:\.\d+)?))\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(100|\d{1,2}[.]\d*|\d{1,2})%\s*[\s,]\s*(0[.][0-9]+|[.][0-9]+|[01][.]0*|[01])\s*\)$/gm;l=ro(en(t,i),tn(o,c),!0)}else a==="#"&&(l=uu(en(t,i),a+o));l&&e.push(l)}return e}function mu(t){return!t||typeof t.getValue!="function"||typeof t.positionAt!="function"?[]:pu(t)}const fu=/^-+|-+$/g,io=100,gu=5;function bu(t,e){let n=[];if(e.findRegionSectionHeaders&&e.foldingRules?.markers){const r=wu(t,e);n=n.concat(r)}if(e.findMarkSectionHeaders){const r=vu(t,e);n=n.concat(r)}return n}function wu(t,e){const n=[],r=t.getLineCount();for(let i=1;i<=r;i++){const s=t.getLineContent(i),a=s.match(e.foldingRules.markers.start);if(a){const o={startLineNumber:i,startColumn:a[0].length+1,endLineNumber:i,endColumn:s.length+1};if(o.endColumn>o.startColumn){const l={range:o,...yu(s.substring(a[0].length)),shouldBeInComments:!1};(l.text||l.hasSeparatorLine)&&n.push(l)}}}return n}function vu(t,e){const n=[],r=t.getLineCount();if(!e.markSectionHeaderRegex||e.markSectionHeaderRegex.trim()==="")return n;const i=yd(e.markSectionHeaderRegex),s=new RegExp(e.markSectionHeaderRegex,`gdm${i?"s":""}`);if(mh(s))return n;for(let a=1;a<=r;a+=io-gu){const o=Math.min(a+io-1,r),l=[];for(let u=a;u<=o;u++)l.push(t.getLineContent(u));const c=l.join(` +`);s.lastIndex=0;let d;for(;(d=s.exec(c))!==null;){const u=c.substring(0,d.index),m=(u.match(/\n/g)||[]).length,f=a+m,g=d[0].split(` +`),b=g.length,k=f+b-1,F=u.lastIndexOf(` +`)+1,R=d.index-F+1,E=g[g.length-1],T=b===1?R+d[0].length:E.length+1,O={startLineNumber:f,startColumn:R,endLineNumber:k,endColumn:T},V=(d.groups??{}).label??"",D=((d.groups??{}).separator??"")!=="",N={range:O,text:V,hasSeparatorLine:D,shouldBeInComments:!0};(N.text||N.hasSeparatorLine)&&(n.length===0||n[n.length-1].range.endLineNumber{this.completeCallback=e,this.errorCallback=n})}complete(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.completeCallback(e),this.outcome={outcome:0,value:e},n()})}error(e){return this.isSettled?Promise.resolve():new Promise(n=>{this.errorCallback(e),this.outcome={outcome:1,value:e},n()})}cancel(){return this.error(new Hl)}}var so;(function(t){async function e(r){let i;const s=await Promise.all(r.map(a=>a.then(o=>o,o=>{i||(i=o)})));if(typeof i<"u")throw i;return s}t.settled=e;function n(r){return new Promise(async(i,s)=>{try{await r(i,s)}catch(a){s(a)}})}t.withAsyncBody=n})(so||(so={}));class Su{constructor(){this._unsatisfiedConsumers=[],this._unconsumedValues=[]}get hasFinalValue(){return!!this._finalValue}produce(e){if(this._ensureNoFinalValue(),this._unsatisfiedConsumers.length>0){const n=this._unsatisfiedConsumers.shift();this._resolveOrRejectDeferred(n,e)}else this._unconsumedValues.push(e)}produceFinal(e){this._ensureNoFinalValue(),this._finalValue=e;for(const n of this._unsatisfiedConsumers)this._resolveOrRejectDeferred(n,e);this._unsatisfiedConsumers.length=0}_ensureNoFinalValue(){if(this._finalValue)throw new we("ProducerConsumer: cannot produce after final value has been set")}_resolveOrRejectDeferred(e,n){n.ok?e.complete(n.value):e.error(n.error)}consume(){if(this._unconsumedValues.length>0||this._finalValue){const e=this._unconsumedValues.length>0?this._unconsumedValues.shift():this._finalValue;return e.ok?Promise.resolve(e.value):Promise.reject(e.error)}else{const e=new xu;return this._unsatisfiedConsumers.push(e),e.p}}}class De{constructor(e,n){this._onReturn=n,this._producerConsumer=new Su,this._iterator={next:()=>this._producerConsumer.consume(),return:()=>(this._onReturn?.(),Promise.resolve({done:!0,value:void 0})),throw:async r=>(this._finishError(r),{done:!0,value:void 0})},queueMicrotask(async()=>{const r=e({emitOne:i=>this._producerConsumer.produce({ok:!0,value:{done:!1,value:i}}),emitMany:i=>{for(const s of i)this._producerConsumer.produce({ok:!0,value:{done:!1,value:s}})},reject:i=>this._finishError(i)});if(!this._producerConsumer.hasFinalValue)try{await r,this._finishOk()}catch(i){this._finishError(i)}})}static fromArray(e){return new De(n=>{n.emitMany(e)})}static fromPromise(e){return new De(async n=>{n.emitMany(await e)})}static fromPromisesResolveOrder(e){return new De(async n=>{await Promise.all(e.map(async r=>n.emitOne(await r)))})}static merge(e){return new De(async n=>{await Promise.all(e.map(async r=>{for await(const i of r)n.emitOne(i)}))})}static{this.EMPTY=De.fromArray([])}static map(e,n){return new De(async r=>{for await(const i of e)r.emitOne(n(i))})}map(e){return De.map(this,e)}static coalesce(e){return De.filter(e,n=>!!n)}coalesce(){return De.coalesce(this)}static filter(e,n){return new De(async r=>{for await(const i of e)n(i)&&r.emitOne(i)})}filter(e){return De.filter(this,e)}_finishOk(){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!0,value:{done:!0,value:void 0}})}_finishError(e){this._producerConsumer.hasFinalValue||this._producerConsumer.produceFinal({ok:!1,error:e})}[Symbol.asyncIterator](){return this._iterator}}class Cu{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,n){e=Dt(e);const r=this.values,i=this.prefixSum,s=n.length;return s===0?!1:(this.values=new Uint32Array(r.length+s),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e),e+s),this.values.set(n,e),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}setValue(e,n){return e=Dt(e),n=Dt(n),this.values[e]===n?!1:(this.values[e]=n,e-1=r.length)return!1;const s=r.length-e;return n>=s&&(n=s),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,e),0),this.values.set(r.subarray(e+n),e),this.prefixSum=new Uint32Array(this.values.length),e-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=Dt(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),e>=this.values.length&&(e=this.values.length-1);for(let r=n;r<=e;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],e),this.prefixSum[e]}getIndexOf(e){e=Math.floor(e),this.getTotalSum();let n=0,r=this.values.length-1,i=0,s=0,a=0;for(;n<=r;)if(i=n+(r-n)/2|0,s=this.prefixSum[i],a=s-this.values[i],e=s)n=i+1;else break;return new ku(i,e-a)}}class ku{constructor(e,n){this.index=e,this.remainder=n,this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=n}}class _u{constructor(e,n,r,i){this._uri=e,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const n=e.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new re(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;ie.push(this._models[n])),e}$acceptNewModel(e){this._models[e.url]=new Fu(Gi.parse(e.url),e.lines,e.EOL,e.versionId)}$acceptModelChanged(e,n){if(!this._models[e])return;this._models[e].onEvents(n)}$acceptRemovedModel(e){this._models[e]&&delete this._models[e]}}class Fu extends _u{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}findMatches(e){const n=[];for(let r=0;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{const s=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>s&&(r=s,i=!0)}return i?{lineNumber:n,column:r}:e}}class pn{constructor(e=null){this._foreignModule=e,this._requestHandlerBrand=void 0,this._workerTextModelSyncServer=new Eu}dispose(){}async $ping(){return"pong"}_getModel(e){return this._workerTextModelSyncServer.getModel(e)}getModels(){return this._workerTextModelSyncServer.getModels()}$acceptNewModel(e){this._workerTextModelSyncServer.$acceptNewModel(e)}$acceptModelChanged(e,n){this._workerTextModelSyncServer.$acceptModelChanged(e,n)}$acceptRemovedModel(e){this._workerTextModelSyncServer.$acceptRemovedModel(e)}async $computeUnicodeHighlights(e,n,r){const i=this._getModel(e);return i?Rd.computeUnicodeHighlights(i,n,r):{ranges:[],hasMore:!1,ambiguousCharacterCount:0,invisibleCharacterCount:0,nonBasicAsciiCharacterCount:0}}async $findSectionHeaders(e,n){const r=this._getModel(e);return r?bu(r,n):[]}async $computeDiff(e,n,r,i){const s=this._getModel(e),a=this._getModel(n);return!s||!a?null:pn.computeDiff(s,a,r,i)}static computeDiff(e,n,r,i){const s=i==="advanced"?to.getDefault():to.getLegacy(),a=e.getLinesContent(),o=n.getLinesContent(),l=s.computeDiff(a,o,r),c=l.changes.length>0?!1:this._modelsAreIdentical(e,n);function d(u){return u.map(m=>[m.original.startLineNumber,m.original.endLineNumberExclusive,m.modified.startLineNumber,m.modified.endLineNumberExclusive,m.innerChanges?.map(f=>[f.originalRange.startLineNumber,f.originalRange.startColumn,f.originalRange.endLineNumber,f.originalRange.endColumn,f.modifiedRange.startLineNumber,f.modifiedRange.startColumn,f.modifiedRange.endLineNumber,f.modifiedRange.endColumn])])}return{identical:c,quitEarly:l.hitTimeout,changes:d(l.changes),moves:l.moves.map(u=>[u.lineRangeMapping.original.startLineNumber,u.lineRangeMapping.original.endLineNumberExclusive,u.lineRangeMapping.modified.startLineNumber,u.lineRangeMapping.modified.endLineNumberExclusive,d(u.changes)])}}static _modelsAreIdentical(e,n){const r=e.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let s=1;s<=r;s++){const a=e.getLineContent(s),o=n.getLineContent(s);if(a!==o)return!1}return!0}static{this._diffLimit=1e5}async $computeMoreMinimalEdits(e,n,r){const i=this._getModel(e);if(!i)return n;const s=[];let a;n=n.slice(0).sort((l,c)=>{if(l.range&&c.range)return Y.compareRangesUsingStarts(l.range,c.range);const d=l.range?0:1,u=c.range?0:1;return d-u});let o=0;for(let l=1;lpn._diffLimit){s.push({range:l,text:c});continue}const m=Ah(u,c,r),f=i.offsetAt(Y.lift(l).getStartPosition());for(const g of m){const b=i.positionAt(f+g.originalStart),k=i.positionAt(f+g.originalStart+g.originalLength),F={text:c.substr(g.modifiedStart,g.modifiedLength),range:{startLineNumber:b.lineNumber,startColumn:b.column,endLineNumber:k.lineNumber,endColumn:k.column}};i.getValueInRange(F.range)!==F.text&&s.push(F)}}return typeof a=="number"&&s.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),s}async $computeLinks(e){const n=this._getModel(e);return n?Wh(n):null}async $computeDefaultDocumentColors(e){const n=this._getModel(e);return n?mu(n):null}static{this._suggestionsLimit=1e4}async $textualSuggest(e,n,r,i){const s=new yr,a=new RegExp(r,i),o=new Set;e:for(const l of e){const c=this._getModel(l);if(c){for(const d of c.words(a))if(!(d===n||!isNaN(Number(d)))&&(o.add(d),o.size>pn._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}}async $computeWordRanges(e,n,r,i){const s=this._getModel(e);if(!s)return Object.create(null);const a=new RegExp(r,i),o=Object.create(null);for(let l=n.startLineNumber;l{const i=ar.getChannel(r),a={host:new Proxy({},{get(o,l,c){if(l!=="then"){if(typeof l!="string")throw new Error("Not supported");return(...d)=>i.$fhr(l,d)}}}),getMirrorModels:()=>n.requestHandler.getModels()};return e=t(a),new pn(e)});return e}function Nu(t){self.onmessage=e=>{Ru(n=>t(n,e.data))}}var p;(function(t){t[t.Ident=0]="Ident",t[t.AtKeyword=1]="AtKeyword",t[t.String=2]="String",t[t.BadString=3]="BadString",t[t.UnquotedString=4]="UnquotedString",t[t.Hash=5]="Hash",t[t.Num=6]="Num",t[t.Percentage=7]="Percentage",t[t.Dimension=8]="Dimension",t[t.UnicodeRange=9]="UnicodeRange",t[t.CDO=10]="CDO",t[t.CDC=11]="CDC",t[t.Colon=12]="Colon",t[t.SemiColon=13]="SemiColon",t[t.CurlyL=14]="CurlyL",t[t.CurlyR=15]="CurlyR",t[t.ParenthesisL=16]="ParenthesisL",t[t.ParenthesisR=17]="ParenthesisR",t[t.BracketL=18]="BracketL",t[t.BracketR=19]="BracketR",t[t.Whitespace=20]="Whitespace",t[t.Includes=21]="Includes",t[t.Dashmatch=22]="Dashmatch",t[t.SubstringOperator=23]="SubstringOperator",t[t.PrefixOperator=24]="PrefixOperator",t[t.SuffixOperator=25]="SuffixOperator",t[t.Delim=26]="Delim",t[t.EMS=27]="EMS",t[t.EXS=28]="EXS",t[t.Length=29]="Length",t[t.Angle=30]="Angle",t[t.Time=31]="Time",t[t.Freq=32]="Freq",t[t.Exclamation=33]="Exclamation",t[t.Resolution=34]="Resolution",t[t.Comma=35]="Comma",t[t.Charset=36]="Charset",t[t.EscapedJavaScript=37]="EscapedJavaScript",t[t.BadEscapedJavaScript=38]="BadEscapedJavaScript",t[t.Comment=39]="Comment",t[t.SingleLineComment=40]="SingleLineComment",t[t.EOF=41]="EOF",t[t.ContainerQueryLength=42]="ContainerQueryLength",t[t.CustomToken=43]="CustomToken"})(p||(p={}));class ao{constructor(e){this.source=e,this.len=e.length,this.position=0}substring(e,n=this.position){return this.source.substring(e,n)}eos(){return this.len<=this.position}pos(){return this.position}goBackTo(e){this.position=e}goBack(e){this.position-=e}advance(e){this.position+=e}nextChar(){return this.source.charCodeAt(this.position++)||0}peekChar(e=0){return this.source.charCodeAt(this.position+e)||0}lookbackChar(e=0){return this.source.charCodeAt(this.position-e)||0}advanceIfChar(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1}advanceIfChars(e){if(this.position+e.length>this.source.length)return!1;let n=0;for(;nn&&r===po?(e=!0,!1):(n=r===Mr,!0)),e&&this.stream.advance(1),!0}return!1}_number(){let e=0,n;return this.stream.peekChar()===go&&(e=1),n=this.stream.peekChar(e),n>=nn&&n<=rn?(this.stream.advance(e+1),this.stream.advanceWhileChar(r=>r>=nn&&r<=rn||e===0&&r===go),!0):!1}_newline(e){const n=this.stream.peekChar();switch(n){case zt:case an:case At:return this.stream.advance(1),e.push(String.fromCharCode(n)),n===zt&&this.stream.advanceIfChar(At)&&e.push(` +`),!0}return!1}_escape(e,n){let r=this.stream.peekChar();if(r===Ar){this.stream.advance(1),r=this.stream.peekChar();let i=0;for(;i<6&&(r>=nn&&r<=rn||r>=Mn&&r<=oo||r>=An&&r<=co);)this.stream.advance(1),r=this.stream.peekChar(),i++;if(i>0){try{const s=parseInt(this.stream.substring(this.stream.pos()-i),16);s&&e.push(String.fromCharCode(s))}catch{}return r===zr||r===Pr?this.stream.advance(1):this._newline([]),!0}if(r!==zt&&r!==an&&r!==At)return this.stream.advance(1),e.push(String.fromCharCode(r)),!0;if(n)return this._newline(e)}return!1}_stringChar(e,n){const r=this.stream.peekChar();return r!==0&&r!==e&&r!==Ar&&r!==zt&&r!==an&&r!==At?(this.stream.advance(1),n.push(String.fromCharCode(r)),!0):!1}_string(e){if(this.stream.peekChar()===fo||this.stream.peekChar()===mo){const n=this.stream.nextChar();for(e.push(String.fromCharCode(n));this._stringChar(n,e)||this._escape(e,!0););return this.stream.peekChar()===n?(this.stream.nextChar(),e.push(String.fromCharCode(n)),p.String):p.BadString}return null}_unquotedChar(e){const n=this.stream.peekChar();return n!==0&&n!==Ar&&n!==fo&&n!==mo&&n!==dc&&n!==uc&&n!==zr&&n!==Pr&&n!==At&&n!==an&&n!==zt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unquotedString(e){let n=!1;for(;this._unquotedChar(e)||this._escape(e);)n=!0;return n}_whitespace(){return this.stream.advanceWhileChar(n=>n===zr||n===Pr||n===At||n===an||n===zt)>0}_name(e){let n=!1;for(;this._identChar(e)||this._escape(e);)n=!0;return n}ident(e){const n=this.stream.pos();if(this._minus(e)){if(this._minus(e)||this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(n),!1}_identFirstChar(e){const n=this.stream.peekChar();return n===uo||n>=Mn&&n<=lo||n>=An&&n<=ho||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_minus(e){const n=this.stream.peekChar();return n===gt?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_identChar(e){const n=this.stream.peekChar();return n===uo||n===gt||n>=Mn&&n<=lo||n>=An&&n<=ho||n>=nn&&n<=rn||n>=128&&n<=65535?(this.stream.advance(1),e.push(String.fromCharCode(n)),!0):!1}_unicodeRange(){if(this.stream.advanceIfChar(Gu)){const e=r=>r>=nn&&r<=rn||r>=Mn&&r<=oo||r>=An&&r<=co,n=this.stream.advanceWhileChar(e)+this.stream.advanceWhileChar(r=>r===Hu);if(n>=1&&n<=6)if(this.stream.advanceIfChar(gt)){const r=this.stream.advanceWhileChar(e);if(r>=1&&r<=6)return!0}else return!0}return!1}}function pe(t,e){if(t.length0?t.lastIndexOf(e)===n:n===0?t===e:!1}function Ju(t,e,n=4){let r=Math.abs(t.length-e.length);if(r>n)return 0;let i=[],s=[],a,o;for(a=0;a0;)(e&1)===1&&(n+=t),t+=t,e=e>>>1;return n}var v;(function(t){t[t.Undefined=0]="Undefined",t[t.Identifier=1]="Identifier",t[t.Stylesheet=2]="Stylesheet",t[t.Ruleset=3]="Ruleset",t[t.Selector=4]="Selector",t[t.SimpleSelector=5]="SimpleSelector",t[t.SelectorInterpolation=6]="SelectorInterpolation",t[t.SelectorCombinator=7]="SelectorCombinator",t[t.SelectorCombinatorParent=8]="SelectorCombinatorParent",t[t.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",t[t.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",t[t.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",t[t.Page=12]="Page",t[t.PageBoxMarginBox=13]="PageBoxMarginBox",t[t.ClassSelector=14]="ClassSelector",t[t.IdentifierSelector=15]="IdentifierSelector",t[t.ElementNameSelector=16]="ElementNameSelector",t[t.PseudoSelector=17]="PseudoSelector",t[t.AttributeSelector=18]="AttributeSelector",t[t.Declaration=19]="Declaration",t[t.Declarations=20]="Declarations",t[t.Property=21]="Property",t[t.Expression=22]="Expression",t[t.BinaryExpression=23]="BinaryExpression",t[t.Term=24]="Term",t[t.Operator=25]="Operator",t[t.Value=26]="Value",t[t.StringLiteral=27]="StringLiteral",t[t.URILiteral=28]="URILiteral",t[t.EscapedValue=29]="EscapedValue",t[t.Function=30]="Function",t[t.NumericValue=31]="NumericValue",t[t.HexColorValue=32]="HexColorValue",t[t.RatioValue=33]="RatioValue",t[t.MixinDeclaration=34]="MixinDeclaration",t[t.MixinReference=35]="MixinReference",t[t.VariableName=36]="VariableName",t[t.VariableDeclaration=37]="VariableDeclaration",t[t.Prio=38]="Prio",t[t.Interpolation=39]="Interpolation",t[t.NestedProperties=40]="NestedProperties",t[t.ExtendsReference=41]="ExtendsReference",t[t.SelectorPlaceholder=42]="SelectorPlaceholder",t[t.Debug=43]="Debug",t[t.If=44]="If",t[t.Else=45]="Else",t[t.For=46]="For",t[t.Each=47]="Each",t[t.While=48]="While",t[t.MixinContentReference=49]="MixinContentReference",t[t.MixinContentDeclaration=50]="MixinContentDeclaration",t[t.Media=51]="Media",t[t.Keyframe=52]="Keyframe",t[t.FontFace=53]="FontFace",t[t.Import=54]="Import",t[t.Namespace=55]="Namespace",t[t.Invocation=56]="Invocation",t[t.FunctionDeclaration=57]="FunctionDeclaration",t[t.ReturnStatement=58]="ReturnStatement",t[t.MediaQuery=59]="MediaQuery",t[t.MediaCondition=60]="MediaCondition",t[t.MediaFeature=61]="MediaFeature",t[t.FunctionParameter=62]="FunctionParameter",t[t.FunctionArgument=63]="FunctionArgument",t[t.KeyframeSelector=64]="KeyframeSelector",t[t.ViewPort=65]="ViewPort",t[t.Document=66]="Document",t[t.AtApplyRule=67]="AtApplyRule",t[t.CustomPropertyDeclaration=68]="CustomPropertyDeclaration",t[t.CustomPropertySet=69]="CustomPropertySet",t[t.ListEntry=70]="ListEntry",t[t.Supports=71]="Supports",t[t.SupportsCondition=72]="SupportsCondition",t[t.NamespacePrefix=73]="NamespacePrefix",t[t.GridLine=74]="GridLine",t[t.Plugin=75]="Plugin",t[t.UnknownAtRule=76]="UnknownAtRule",t[t.Use=77]="Use",t[t.ModuleConfiguration=78]="ModuleConfiguration",t[t.Forward=79]="Forward",t[t.ForwardVisibility=80]="ForwardVisibility",t[t.Module=81]="Module",t[t.UnicodeRange=82]="UnicodeRange",t[t.Layer=83]="Layer",t[t.LayerNameList=84]="LayerNameList",t[t.LayerName=85]="LayerName",t[t.PropertyAtRule=86]="PropertyAtRule",t[t.Container=87]="Container"})(v||(v={}));var K;(function(t){t[t.Mixin=0]="Mixin",t[t.Rule=1]="Rule",t[t.Variable=2]="Variable",t[t.Function=3]="Function",t[t.Keyframe=4]="Keyframe",t[t.Unknown=5]="Unknown",t[t.Module=6]="Module",t[t.Forward=7]="Forward",t[t.ForwardVisibility=8]="ForwardVisibility",t[t.Property=9]="Property"})(K||(K={}));function pi(t,e){let n=null;return!t||et.end?null:(t.accept(r=>r.offset===-1&&r.length===-1?!0:r.offset<=e&&r.end>=e?(n?r.length<=n.length&&(n=r):n=r,!0):!1),n)}function Yi(t,e){let n=pi(t,e);const r=[];for(;n;)r.unshift(n),n=n.parent;return r}function Yu(t){const e=t.findParent(v.Declaration),n=e&&e.getValue();return n&&n.encloses(t)?e:null}class W{get end(){return this.offset+this.length}constructor(e=-1,n=-1,r){this.parent=null,this.offset=e,this.length=n,r&&(this.nodeType=r)}set type(e){this.nodeType=e}get type(){return this.nodeType||v.Undefined}getTextProvider(){let e=this;for(;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:()=>"unknown"}getText(){return this.getTextProvider()(this.offset,this.length)}matches(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e}startsWith(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e}endsWith(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e}accept(e){if(e(this)&&this.children)for(const n of this.children)n.accept(e)}acceptVisitor(e){this.accept(e.visitNode.bind(e))}adoptChild(e,n=-1){if(e.parent&&e.parent.children){const i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;let r=this.children;return r||(r=this.children=[]),n!==-1?r.splice(n,0,e):r.push(e),e}attachTo(e,n=-1){return e&&e.adoptChild(this,n),this}collectIssues(e){this.issues&&e.push.apply(e,this.issues)}addIssue(e){this.issues||(this.issues=[]),this.issues.push(e)}hasIssue(e){return Array.isArray(this.issues)&&this.issues.some(n=>n.getRule()===e)}isErroneous(e=!1){return this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(n=>n.isErroneous(!0))}setNode(e,n,r=-1){return n?(n.attachTo(this,r),this[e]=n,!0):!1}addChild(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1}updateOffsetAndLength(e){(e.offsetthis.end||this.length===-1)&&(this.length=n-this.offset)}hasChildren(){return!!this.children&&this.children.length>0}getChildren(){return this.children?this.children.slice(0):[]}getChild(e){return this.children&&e=0;r--)if(n=this.children[r],n.offset<=e)return n}return null}findChildAtOffset(e,n){const r=this.findFirstChildBeforeOffset(e);return r&&r.end>=e?n&&r.findChildAtOffset(e,!0)||r:null}encloses(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length}getParent(){let e=this.parent;for(;e instanceof xe;)e=e.parent;return e}findParent(e){let n=this;for(;n&&n.type!==e;)n=n.parent;return n}findAParent(...e){let n=this;for(;n&&!e.some(r=>n.type===r);)n=n.parent;return n}setData(e,n){this.options||(this.options={}),this.options[e]=n}getData(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]}}class xe extends W{constructor(e,n=-1){super(-1,-1),this.attachTo(e,n),this.offset=-1,this.length=-1}}class Qu extends W{constructor(e,n){super(e,n)}get type(){return v.UnicodeRange}setRangeStart(e){return this.setNode("rangeStart",e)}getRangeStart(){return this.rangeStart}setRangeEnd(e){return this.setNode("rangeEnd",e)}getRangeEnd(){return this.rangeEnd}}class Pe extends W{constructor(e,n){super(e,n),this.isCustomProperty=!1}get type(){return v.Identifier}containsInterpolation(){return this.hasChildren()}}class Ku extends W{constructor(e,n){super(e,n)}get type(){return v.Stylesheet}}class Qi extends W{constructor(e,n){super(e,n)}get type(){return v.Declarations}}class ae extends W{constructor(e,n){super(e,n)}getDeclarations(){return this.declarations}setDeclarations(e){return this.setNode("declarations",e)}}class kt extends ae{constructor(e,n){super(e,n)}get type(){return v.Ruleset}getSelectors(){return this.selectors||(this.selectors=new xe(this)),this.selectors}isNested(){return!!this.parent&&this.parent.findParent(v.Declarations)!==null}}class Rn extends W{constructor(e,n){super(e,n)}get type(){return v.Selector}}class qt extends W{constructor(e,n){super(e,n)}get type(){return v.SimpleSelector}}class Ki extends W{constructor(e,n){super(e,n)}}class Zu extends ae{constructor(e,n){super(e,n)}get type(){return v.CustomPropertySet}}class Te extends Ki{constructor(e,n){super(e,n),this.property=null}get type(){return v.Declaration}setProperty(e){return this.setNode("property",e)}getProperty(){return this.property}getFullPropertyName(){const e=this.property?this.property.getName():"unknown";if(this.parent instanceof Qi&&this.parent.getParent()instanceof fc){const n=this.parent.getParent().getParent();if(n instanceof Te)return n.getFullPropertyName()+e}return e}getNonPrefixedPropertyName(){const e=this.getFullPropertyName();if(e&&e.charAt(0)==="-"){const n=e.indexOf("-",1);if(n!==-1)return e.substring(n+1)}return e}setValue(e){return this.setNode("value",e)}getValue(){return this.value}setNestedProperties(e){return this.setNode("nestedProperties",e)}getNestedProperties(){return this.nestedProperties}}class ep extends Te{constructor(e,n){super(e,n)}get type(){return v.CustomPropertyDeclaration}setPropertySet(e){return this.setNode("propertySet",e)}getPropertySet(){return this.propertySet}}class Zi extends W{constructor(e,n){super(e,n)}get type(){return v.Property}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}getName(){return Xu(this.getText(),/[_\+]+$/)}isCustomProperty(){return!!this.identifier&&this.identifier.isCustomProperty}}class tp extends W{constructor(e,n){super(e,n)}get type(){return v.Invocation}getArguments(){return this.arguments||(this.arguments=new xe(this)),this.arguments}}class Nn extends tp{constructor(e,n){super(e,n)}get type(){return v.Function}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class Sr extends W{constructor(e,n){super(e,n)}get type(){return v.FunctionParameter}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setDefaultValue(e){return this.setNode("defaultValue",e,0)}getDefaultValue(){return this.defaultValue}}class Xt extends W{constructor(e,n){super(e,n)}get type(){return v.FunctionArgument}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class np extends ae{constructor(e,n){super(e,n)}get type(){return v.If}setExpression(e){return this.setNode("expression",e,0)}setElseClause(e){return this.setNode("elseClause",e)}}class rp extends ae{constructor(e,n){super(e,n)}get type(){return v.For}setVariable(e){return this.setNode("variable",e,0)}}class ip extends ae{constructor(e,n){super(e,n)}get type(){return v.Each}getVariables(){return this.variables||(this.variables=new xe(this)),this.variables}}class sp extends ae{constructor(e,n){super(e,n)}get type(){return v.While}}class ap extends ae{constructor(e,n){super(e,n)}get type(){return v.Else}}class or extends ae{constructor(e,n){super(e,n)}get type(){return v.FunctionDeclaration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}getParameters(){return this.parameters||(this.parameters=new xe(this)),this.parameters}}class op extends ae{constructor(e,n){super(e,n)}get type(){return v.ViewPort}}class mc extends ae{constructor(e,n){super(e,n)}get type(){return v.FontFace}}class fc extends ae{constructor(e,n){super(e,n)}get type(){return v.NestedProperties}}class gc extends ae{constructor(e,n){super(e,n)}get type(){return v.Keyframe}setKeyword(e){return this.setNode("keyword",e,0)}getKeyword(){return this.keyword}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}}class yo extends ae{constructor(e,n){super(e,n)}get type(){return v.KeyframeSelector}}class es extends W{constructor(e,n){super(e,n)}get type(){return v.Import}setMedialist(e){return e?(e.attachTo(this),!0):!1}}class lp extends W{get type(){return v.Use}getParameters(){return this.parameters||(this.parameters=new xe(this)),this.parameters}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class cp extends W{get type(){return v.ModuleConfiguration}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getName(){return this.identifier?this.identifier.getText():""}setValue(e){return this.setNode("value",e,0)}getValue(){return this.value}}class hp extends W{get type(){return v.Forward}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}getMembers(){return this.members||(this.members=new xe(this)),this.members}getParameters(){return this.parameters||(this.parameters=new xe(this)),this.parameters}}class dp extends W{get type(){return v.ForwardVisibility}setIdentifier(e){return this.setNode("identifier",e,0)}getIdentifier(){return this.identifier}}class up extends W{constructor(e,n){super(e,n)}get type(){return v.Namespace}}class ts extends ae{constructor(e,n){super(e,n)}get type(){return v.Media}}class mi extends ae{constructor(e,n){super(e,n)}get type(){return v.Supports}}class pp extends ae{constructor(e,n){super(e,n)}get type(){return v.Layer}setNames(e){return this.setNode("names",e)}getNames(){return this.names}}class mp extends ae{constructor(e,n){super(e,n)}get type(){return v.PropertyAtRule}setName(e){return e?(e.attachTo(this),this.name=e,!0):!1}getName(){return this.name}}class fp extends ae{constructor(e,n){super(e,n)}get type(){return v.Document}}class gp extends ae{constructor(e,n){super(e,n)}get type(){return v.Container}}class bc extends W{constructor(e,n){super(e,n)}}class wc extends W{constructor(e,n){super(e,n)}get type(){return v.MediaQuery}}class bp extends W{constructor(e,n){super(e,n)}get type(){return v.MediaCondition}}class wp extends W{constructor(e,n){super(e,n)}get type(){return v.MediaFeature}}class mn extends W{constructor(e,n){super(e,n)}get type(){return v.SupportsCondition}}class vp extends ae{constructor(e,n){super(e,n)}get type(){return v.Page}}class yp extends ae{constructor(e,n){super(e,n)}get type(){return v.PageBoxMarginBox}}class vc extends W{constructor(e,n){super(e,n)}get type(){return v.Expression}}class ns extends W{constructor(e,n){super(e,n)}get type(){return v.BinaryExpression}setLeft(e){return this.setNode("left",e)}getLeft(){return this.left}setRight(e){return this.setNode("right",e)}getRight(){return this.right}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}}class xp extends W{constructor(e,n){super(e,n)}get type(){return v.Term}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setExpression(e){return this.setNode("expression",e)}getExpression(){return this.expression}}class Sp extends W{constructor(e,n){super(e,n)}get type(){return v.AttributeSelector}setNamespacePrefix(e){return this.setNode("namespacePrefix",e)}getNamespacePrefix(){return this.namespacePrefix}setIdentifier(e){return this.setNode("identifier",e)}getIdentifier(){return this.identifier}setOperator(e){return this.setNode("operator",e)}getOperator(){return this.operator}setValue(e){return this.setNode("value",e)}getValue(){return this.value}}class rs extends W{constructor(e,n){super(e,n)}get type(){return v.HexColorValue}}class Cp extends W{constructor(e,n){super(e,n)}get type(){return v.RatioValue}}const kp=46,_p=48,Ep=57;class is extends W{constructor(e,n){super(e,n)}get type(){return v.NumericValue}getValue(){const e=this.getText();let n=0,r;for(let i=0,s=e.length;i0&&(n+=`/${Array.isArray(e.comment)?e.comment.join(""):e.comment}`),i=e.args??{};return Mp(r,i)}var Lp=/{([^}]+)}/g;function Mp(t,e){return Object.keys(e).length===0?t:t.replace(Lp,(n,r)=>e[r]??n)}class te{constructor(e,n){this.id=e,this.message=n}}const S={NumberExpected:new te("css-numberexpected",w("number expected")),ConditionExpected:new te("css-conditionexpected",w("condition expected")),RuleOrSelectorExpected:new te("css-ruleorselectorexpected",w("at-rule or selector expected")),DotExpected:new te("css-dotexpected",w("dot expected")),ColonExpected:new te("css-colonexpected",w("colon expected")),SemiColonExpected:new te("css-semicolonexpected",w("semi-colon expected")),TermExpected:new te("css-termexpected",w("term expected")),ExpressionExpected:new te("css-expressionexpected",w("expression expected")),OperatorExpected:new te("css-operatorexpected",w("operator expected")),IdentifierExpected:new te("css-identifierexpected",w("identifier expected")),PercentageExpected:new te("css-percentageexpected",w("percentage expected")),URIOrStringExpected:new te("css-uriorstringexpected",w("uri or string expected")),URIExpected:new te("css-uriexpected",w("URI expected")),VariableNameExpected:new te("css-varnameexpected",w("variable name expected")),VariableValueExpected:new te("css-varvalueexpected",w("variable value expected")),PropertyValueExpected:new te("css-propertyvalueexpected",w("property value expected")),LeftCurlyExpected:new te("css-lcurlyexpected",w("{ expected")),RightCurlyExpected:new te("css-rcurlyexpected",w("} expected")),LeftSquareBracketExpected:new te("css-rbracketexpected",w("[ expected")),RightSquareBracketExpected:new te("css-lbracketexpected",w("] expected")),LeftParenthesisExpected:new te("css-lparentexpected",w("( expected")),RightParenthesisExpected:new te("css-rparentexpected",w(") expected")),CommaExpected:new te("css-commaexpected",w("comma expected")),PageDirectiveOrDeclarationExpected:new te("css-pagedirordeclexpected",w("page directive or declaraton expected")),UnknownAtRule:new te("css-unknownatrule",w("at-rule unknown")),UnknownKeyword:new te("css-unknownkeyword",w("unknown keyword")),SelectorExpected:new te("css-selectorexpected",w("selector expected")),StringLiteralExpected:new te("css-stringliteralexpected",w("string literal expected")),WhitespaceExpected:new te("css-whitespaceexpected",w("whitespace expected")),MediaQueryExpected:new te("css-mediaqueryexpected",w("media query expected")),IdentifierOrWildcardExpected:new te("css-idorwildcardexpected",w("identifier or wildcard expected")),WildcardExpected:new te("css-wildcardexpected",w("wildcard expected")),IdentifierOrVariableExpected:new te("css-idorvarexpected",w("identifier or variable expected"))};var So;(function(t){function e(n){return typeof n=="string"}t.is=e})(So||(So={}));var gi;(function(t){function e(n){return typeof n=="string"}t.is=e})(gi||(gi={}));var Co;(function(t){t.MIN_VALUE=-2147483648,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(Co||(Co={}));var cr;(function(t){t.MIN_VALUE=0,t.MAX_VALUE=2147483647;function e(n){return typeof n=="number"&&t.MIN_VALUE<=n&&n<=t.MAX_VALUE}t.is=e})(cr||(cr={}));var ye;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=cr.MAX_VALUE),i===Number.MAX_VALUE&&(i=cr.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}t.is=n})(ye||(ye={}));var Z;(function(t){function e(r,i,s,a){if(C.uinteger(r)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(a))return{start:ye.create(r,i),end:ye.create(s,a)};if(ye.is(r)&&ye.is(i))return{start:r,end:i};throw new Error(`Range#create called with invalid arguments[${r}, ${i}, ${s}, ${a}]`)}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&ye.is(i.start)&&ye.is(i.end)}t.is=n})(Z||(Z={}));var yn;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&Z.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}t.is=n})(yn||(yn={}));var ko;(function(t){function e(r,i,s,a){return{targetUri:r,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&Z.is(i.targetRange)&&C.string(i.targetUri)&&Z.is(i.targetSelectionRange)&&(Z.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}t.is=n})(ko||(ko={}));var bi;(function(t){function e(r,i,s,a){return{red:r,green:i,blue:s,alpha:a}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}t.is=n})(bi||(bi={}));var _o;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&Z.is(i.range)&&bi.is(i.color)}t.is=n})(_o||(_o={}));var Eo;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.undefined(i.textEdit)||j.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,j.is))}t.is=n})(Eo||(Eo={}));var Fo;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(Fo||(Fo={}));var Ro;(function(t){function e(r,i,s,a,o,l){const c={startLine:r,endLine:i};return C.defined(s)&&(c.startCharacter=s),C.defined(a)&&(c.endCharacter=a),C.defined(o)&&(c.kind=o),C.defined(l)&&(c.collapsedText=l),c}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}t.is=n})(Ro||(Ro={}));var wi;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&yn.is(i.location)&&C.string(i.message)}t.is=n})(wi||(wi={}));var hr;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(hr||(hr={}));var No;(function(t){t.Unnecessary=1,t.Deprecated=2})(No||(No={}));var Do;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&C.string(r.href)}t.is=e})(Do||(Do={}));var dr;(function(t){function e(r,i,s,a,o,l){let c={range:r,message:i};return C.defined(s)&&(c.severity=s),C.defined(a)&&(c.code=a),C.defined(o)&&(c.source=o),C.defined(l)&&(c.relatedInformation=l),c}t.create=e;function n(r){var i;let s=r;return C.defined(s)&&Z.is(s.range)&&C.string(s.message)&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,wi.is))}t.is=n})(dr||(dr={}));var _t;(function(t){function e(r,i,...s){let a={title:r,command:i};return C.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}t.is=n})(_t||(_t={}));var j;(function(t){function e(s,a){return{range:s,newText:a}}t.replace=e;function n(s,a){return{range:{start:s,end:s},newText:a}}t.insert=n;function r(s){return{range:s,newText:""}}t.del=r;function i(s){const a=s;return C.objectLiteral(a)&&C.string(a.newText)&&Z.is(a.range)}t.is=i})(j||(j={}));var vi;(function(t){function e(r,i,s){const a={label:r};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}t.is=n})(vi||(vi={}));var Yt;(function(t){function e(n){const r=n;return C.string(r)}t.is=e})(Yt||(Yt={}));var Io;(function(t){function e(s,a,o){return{range:s,newText:a,annotationId:o}}t.replace=e;function n(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}t.insert=n;function r(s,a){return{range:s,newText:"",annotationId:a}}t.del=r;function i(s){const a=s;return j.is(a)&&(vi.is(a.annotationId)||Yt.is(a.annotationId))}t.is=i})(Io||(Io={}));var ur;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&_i.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(ur||(ur={}));var yi;(function(t){function e(r,i,s){let a={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Yt.is(i.annotationId))}t.is=n})(yi||(yi={}));var xi;(function(t){function e(r,i,s,a){let o={kind:"rename",oldUri:r,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}t.create=e;function n(r){let i=r;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Yt.is(i.annotationId))}t.is=n})(xi||(xi={}));var Si;(function(t){function e(r,i,s){let a={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}t.create=e;function n(r){let i=r;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Yt.is(i.annotationId))}t.is=n})(Si||(Si={}));var Ci;(function(t){function e(n){let r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(i=>C.string(i.kind)?yi.is(i)||xi.is(i)||Si.is(i):ur.is(i)))}t.is=e})(Ci||(Ci={}));var Lo;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)}t.is=n})(Lo||(Lo={}));var ki;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}t.is=n})(ki||(ki={}));var _i;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}t.is=n})(_i||(_i={}));var Mo;(function(t){function e(r,i,s,a){return{uri:r,languageId:i,version:s,text:a}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}t.is=n})(Mo||(Mo={}));var qe;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(qe||(qe={}));var xn;(function(t){function e(n){const r=n;return C.objectLiteral(n)&&qe.is(r.kind)&&C.string(r.value)}t.is=e})(xn||(xn={}));var q;(function(t){t.Text=1,t.Method=2,t.Function=3,t.Constructor=4,t.Field=5,t.Variable=6,t.Class=7,t.Interface=8,t.Module=9,t.Property=10,t.Unit=11,t.Value=12,t.Enum=13,t.Keyword=14,t.Snippet=15,t.Color=16,t.File=17,t.Reference=18,t.Folder=19,t.EnumMember=20,t.Constant=21,t.Struct=22,t.Event=23,t.Operator=24,t.TypeParameter=25})(q||(q={}));var Fe;(function(t){t.PlainText=1,t.Snippet=2})(Fe||(Fe={}));var yt;(function(t){t.Deprecated=1})(yt||(yt={}));var Ao;(function(t){function e(r,i,s){return{newText:r,insert:i,replace:s}}t.create=e;function n(r){const i=r;return i&&C.string(i.newText)&&Z.is(i.insert)&&Z.is(i.replace)}t.is=n})(Ao||(Ao={}));var zo;(function(t){t.asIs=1,t.adjustIndentation=2})(zo||(zo={}));var Po;(function(t){function e(n){const r=n;return r&&(C.string(r.detail)||r.detail===void 0)&&(C.string(r.description)||r.description===void 0)}t.is=e})(Po||(Po={}));var To;(function(t){function e(n){return{label:n}}t.create=e})(To||(To={}));var Oo;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Oo||(Oo={}));var pr;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}t.is=n})(pr||(pr={}));var Wo;(function(t){function e(n){let r=n;return!!r&&C.objectLiteral(r)&&(xn.is(r.contents)||pr.is(r.contents)||C.typedArray(r.contents,pr.is))&&(n.range===void 0||Z.is(n.range))}t.is=e})(Wo||(Wo={}));var Vo;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(Vo||(Vo={}));var $o;(function(t){function e(n,r,...i){let s={label:n};return C.defined(r)&&(s.documentation=r),C.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})($o||($o={}));var $t;(function(t){t.Text=1,t.Read=2,t.Write=3})($t||($t={}));var Uo;(function(t){function e(n,r){let i={range:n};return C.number(r)&&(i.kind=r),i}t.create=e})(Uo||(Uo={}));var Ze;(function(t){t.File=1,t.Module=2,t.Namespace=3,t.Package=4,t.Class=5,t.Method=6,t.Property=7,t.Field=8,t.Constructor=9,t.Enum=10,t.Interface=11,t.Function=12,t.Variable=13,t.Constant=14,t.String=15,t.Number=16,t.Boolean=17,t.Array=18,t.Object=19,t.Key=20,t.Null=21,t.EnumMember=22,t.Struct=23,t.Event=24,t.Operator=25,t.TypeParameter=26})(Ze||(Ze={}));var Bo;(function(t){t.Deprecated=1})(Bo||(Bo={}));var qo;(function(t){function e(n,r,i,s,a){let o={name:n,kind:r,location:{uri:s,range:i}};return a&&(o.containerName=a),o}t.create=e})(qo||(qo={}));var jo;(function(t){function e(n,r,i,s){return s!==void 0?{name:n,kind:r,location:{uri:i,range:s}}:{name:n,kind:r,location:{uri:i}}}t.create=e})(jo||(jo={}));var Ho;(function(t){function e(r,i,s,a,o,l){let c={name:r,detail:i,kind:s,range:a,selectionRange:o};return l!==void 0&&(c.children=l),c}t.create=e;function n(r){let i=r;return i&&C.string(i.name)&&C.number(i.kind)&&Z.is(i.range)&&Z.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(Ho||(Ho={}));var Ei;(function(t){t.Empty="",t.QuickFix="quickfix",t.Refactor="refactor",t.RefactorExtract="refactor.extract",t.RefactorInline="refactor.inline",t.RefactorRewrite="refactor.rewrite",t.Source="source",t.SourceOrganizeImports="source.organizeImports",t.SourceFixAll="source.fixAll"})(Ei||(Ei={}));var mr;(function(t){t.Invoked=1,t.Automatic=2})(mr||(mr={}));var Go;(function(t){function e(r,i,s){let a={diagnostics:r};return i!=null&&(a.only=i),s!=null&&(a.triggerKind=s),a}t.create=e;function n(r){let i=r;return C.defined(i)&&C.typedArray(i.diagnostics,dr.is)&&(i.only===void 0||C.typedArray(i.only,C.string))&&(i.triggerKind===void 0||i.triggerKind===mr.Invoked||i.triggerKind===mr.Automatic)}t.is=n})(Go||(Go={}));var Fi;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):_t.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}t.create=e;function n(r){let i=r;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,dr.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||_t.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||Ci.is(i.edit))}t.is=n})(Fi||(Fi={}));var Jo;(function(t){function e(r,i){let s={range:r};return C.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return C.defined(i)&&Z.is(i.range)&&(C.undefined(i.command)||_t.is(i.command))}t.is=n})(Jo||(Jo={}));var Xo;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}t.is=n})(Xo||(Xo={}));var Yo;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return C.defined(i)&&Z.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}t.is=n})(Yo||(Yo={}));var fr;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return C.objectLiteral(i)&&Z.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(fr||(fr={}));var Qo;(function(t){t.namespace="namespace",t.type="type",t.class="class",t.enum="enum",t.interface="interface",t.struct="struct",t.typeParameter="typeParameter",t.parameter="parameter",t.variable="variable",t.property="property",t.enumMember="enumMember",t.event="event",t.function="function",t.method="method",t.macro="macro",t.keyword="keyword",t.modifier="modifier",t.comment="comment",t.string="string",t.number="number",t.regexp="regexp",t.operator="operator",t.decorator="decorator"})(Qo||(Qo={}));var Ko;(function(t){t.declaration="declaration",t.definition="definition",t.readonly="readonly",t.static="static",t.deprecated="deprecated",t.abstract="abstract",t.async="async",t.modification="modification",t.documentation="documentation",t.defaultLibrary="defaultLibrary"})(Ko||(Ko={}));var Zo;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&(r.resultId===void 0||typeof r.resultId=="string")&&Array.isArray(r.data)&&(r.data.length===0||typeof r.data[0]=="number")}t.is=e})(Zo||(Zo={}));var el;(function(t){function e(r,i){return{range:r,text:i}}t.create=e;function n(r){const i=r;return i!=null&&Z.is(i.range)&&C.string(i.text)}t.is=n})(el||(el={}));var tl;(function(t){function e(r,i,s){return{range:r,variableName:i,caseSensitiveLookup:s}}t.create=e;function n(r){const i=r;return i!=null&&Z.is(i.range)&&C.boolean(i.caseSensitiveLookup)&&(C.string(i.variableName)||i.variableName===void 0)}t.is=n})(tl||(tl={}));var nl;(function(t){function e(r,i){return{range:r,expression:i}}t.create=e;function n(r){const i=r;return i!=null&&Z.is(i.range)&&(C.string(i.expression)||i.expression===void 0)}t.is=n})(nl||(nl={}));var rl;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return C.defined(i)&&Z.is(r.stoppedLocation)}t.is=n})(rl||(rl={}));var Ri;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(Ri||(Ri={}));var Ni;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&(i.tooltip===void 0||C.string(i.tooltip)||xn.is(i.tooltip))&&(i.location===void 0||yn.is(i.location))&&(i.command===void 0||_t.is(i.command))}t.is=n})(Ni||(Ni={}));var il;(function(t){function e(r,i,s){const a={position:r,label:i};return s!==void 0&&(a.kind=s),a}t.create=e;function n(r){const i=r;return C.objectLiteral(i)&&ye.is(i.position)&&(C.string(i.label)||C.typedArray(i.label,Ni.is))&&(i.kind===void 0||Ri.is(i.kind))&&i.textEdits===void 0||C.typedArray(i.textEdits,j.is)&&(i.tooltip===void 0||C.string(i.tooltip)||xn.is(i.tooltip))&&(i.paddingLeft===void 0||C.boolean(i.paddingLeft))&&(i.paddingRight===void 0||C.boolean(i.paddingRight))}t.is=n})(il||(il={}));var sl;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(sl||(sl={}));var al;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(al||(al={}));var ol;(function(t){function e(n){return{items:n}}t.create=e})(ol||(ol={}));var ll;(function(t){t.Invoked=0,t.Automatic=1})(ll||(ll={}));var cl;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(cl||(cl={}));var hl;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(hl||(hl={}));var dl;(function(t){function e(n){const r=n;return C.objectLiteral(r)&&gi.is(r.uri)&&C.string(r.name)}t.is=e})(dl||(dl={}));var ul;(function(t){function e(s,a,o,l){return new Ap(s,a,o,l)}t.create=e;function n(s){let a=s;return!!(C.defined(a)&&C.string(a.uri)&&(C.undefined(a.languageId)||C.string(a.languageId))&&C.uinteger(a.lineCount)&&C.func(a.getText)&&C.func(a.positionAt)&&C.func(a.offsetAt))}t.is=n;function r(s,a){let o=s.getText(),l=i(a,(d,u)=>{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),c=o.length;for(let d=l.length-1;d>=0;d--){let u=l[d],m=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)o=o.substring(0,m)+u.newText+o.substring(f,o.length);else throw new Error("Overlapping edit");c=m}return o}t.applyEdits=r;function i(s,a){if(s.length<=1)return s;const o=s.length/2|0,l=s.slice(0,o),c=s.slice(o);i(l,a),i(c,a);let d=0,u=0,m=0;for(;d0&&e.push(n.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ye.create(0,e);for(;re?i=a:r=a+1}let s=r-1;return ye.create(s,e-n[s])}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1"u"}t.undefined=r;function i(f){return f===!0||f===!1}t.boolean=i;function s(f){return e.call(f)==="[object String]"}t.string=s;function a(f){return e.call(f)==="[object Number]"}t.number=a;function o(f,g,b){return e.call(f)==="[object Number]"&&g<=f&&f<=b}t.numberRange=o;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}t.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}t.uinteger=c;function d(f){return e.call(f)==="[object Function]"}t.func=d;function u(f){return f!==null&&typeof f=="object"}t.objectLiteral=u;function m(f,g){return Array.isArray(f)&&f.every(g)}t.typedArray=m})(C||(C={}));class Sn{constructor(e,n,r,i){this._uri=e,this._languageId=n,this._version=r,this._content=i,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){const n=this.offsetAt(e.start),r=this.offsetAt(e.end);return this._content.substring(n,r)}return this._content}update(e,n){for(let r of e)if(Sn.isIncremental(r)){const i=Sc(r.range),s=this.offsetAt(i.start),a=this.offsetAt(i.end);this._content=this._content.substring(0,s)+r.text+this._content.substring(a,this._content.length);const o=Math.max(i.start.line,0),l=Math.max(i.end.line,0);let c=this._lineOffsets;const d=pl(r.text,!1,s);if(l-o===d.length)for(let m=0,f=d.length;me?i=a:r=a+1}let s=r-1;return{line:s,character:e-n[s]}}offsetAt(e){let n=this.getLineOffsets();if(e.line>=n.length)return this._content.length;if(e.line<0)return 0;let r=n[e.line],i=e.line+1{let m=d.range.start.line-u.range.start.line;return m===0?d.range.start.character-u.range.start.character:m}),l=0;const c=[];for(const d of o){let u=i.offsetAt(d.range.start);if(ul&&c.push(a.substring(l,u)),d.newText.length&&c.push(d.newText),l=i.offsetAt(d.range.end)}return c.push(a.substr(l)),c.join("")}t.applyEdits=r})(Di||(Di={}));function Ii(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);Ii(r,e),Ii(i,e);let s=0,a=0,o=0;for(;sn.line||e.line===n.line&&e.character>n.character?{start:n,end:e}:t}function zp(t){const e=Sc(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var ml;(function(t){t.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[qe.Markdown,qe.PlainText]}},hover:{contentFormat:[qe.Markdown,qe.PlainText]}}}})(ml||(ml={}));var Cn;(function(t){t[t.Unknown=0]="Unknown",t[t.File=1]="File",t[t.Directory=2]="Directory",t[t.SymbolicLink=64]="SymbolicLink"})(Cn||(Cn={}));const Pp=/(^#([0-9A-F]{3}){1,2}$)|(^#([0-9A-F]{4}){1,2}$)/i,Tp=[{label:"rgb",func:"rgb($red, $green, $blue)",insertText:"rgb(${1:red}, ${2:green}, ${3:blue})",desc:w("Creates a Color from red, green, and blue values.")},{label:"rgba",func:"rgba($red, $green, $blue, $alpha)",insertText:"rgba(${1:red}, ${2:green}, ${3:blue}, ${4:alpha})",desc:w("Creates a Color from red, green, blue, and alpha values.")},{label:"rgb relative",func:"rgb(from $color $red $green $blue)",insertText:"rgb(from ${1:color} ${2:r} ${3:g} ${4:b})",desc:w("Creates a Color from the red, green, and blue values of another Color.")},{label:"hsl",func:"hsl($hue, $saturation, $lightness)",insertText:"hsl(${1:hue}, ${2:saturation}, ${3:lightness})",desc:w("Creates a Color from hue, saturation, and lightness values.")},{label:"hsla",func:"hsla($hue, $saturation, $lightness, $alpha)",insertText:"hsla(${1:hue}, ${2:saturation}, ${3:lightness}, ${4:alpha})",desc:w("Creates a Color from hue, saturation, lightness, and alpha values.")},{label:"hsl relative",func:"hsl(from $color $hue $saturation $lightness)",insertText:"hsl(from ${1:color} ${2:h} ${3:s} ${4:l})",desc:w("Creates a Color from the hue, saturation, and lightness values of another Color.")},{label:"hwb",func:"hwb($hue $white $black)",insertText:"hwb(${1:hue} ${2:white} ${3:black})",desc:w("Creates a Color from hue, white, and black values.")},{label:"hwb relative",func:"hwb(from $color $hue $white $black)",insertText:"hwb(from ${1:color} ${2:h} ${3:w} ${4:b})",desc:w("Creates a Color from the hue, white, and black values of another Color.")},{label:"lab",func:"lab($lightness $a $b)",insertText:"lab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"lab relative",func:"lab(from $color $lightness $a $b)",insertText:"lab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"oklab",func:"oklab($lightness $a $b)",insertText:"oklab(${1:lightness} ${2:a} ${3:b})",desc:w("Creates a Color from lightness, a, and b values.")},{label:"oklab relative",func:"oklab(from $color $lightness $a $b)",insertText:"oklab(from ${1:color} ${2:l} ${3:a} ${4:b})",desc:w("Creates a Color from the lightness, a, and b values of another Color.")},{label:"lch",func:"lch($lightness $chroma $hue)",insertText:"lch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"lch relative",func:"lch(from $color $lightness $chroma $hue)",insertText:"lch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"oklch",func:"oklch($lightness $chroma $hue)",insertText:"oklch(${1:lightness} ${2:chroma} ${3:hue})",desc:w("Creates a Color from lightness, chroma, and hue values.")},{label:"oklch relative",func:"oklch(from $color $lightness $chroma $hue)",insertText:"oklch(from ${1:color} ${2:l} ${3:c} ${4:h})",desc:w("Creates a Color from the lightness, chroma, and hue values of another Color.")},{label:"color",func:"color($color-space $red $green $blue)",insertText:"color(${1|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${2:red} ${3:green} ${4:blue})",desc:w("Creates a Color in a specific color space from red, green, and blue values.")},{label:"color relative",func:"color(from $color $color-space $red $green $blue)",insertText:"color(from ${1:color} ${2|srgb,srgb-linear,display-p3,a98-rgb,prophoto-rgb,rec2020,xyx,xyz-d50,xyz-d65|} ${3:r} ${4:g} ${5:b})",desc:w("Creates a Color in a specific color space from the red, green, and blue values of another Color.")},{label:"color-mix",func:"color-mix(in $color-space, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|srgb,srgb-linear,lab,oklab,xyz,xyz-d50,xyz-d65|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a rectangular color space.")},{label:"color-mix hue",func:"color-mix(in $color-space $interpolation-method hue, $color $percentage, $color $percentage)",insertText:"color-mix(in ${1|hsl,hwb,lch,oklch|} ${2|shorter hue,longer hue,increasing hue,decreasing hue|}, ${3:color} ${4:percentage}, ${5:color} ${6:percentage})",desc:w("Mix two colors together in a polar color space.")}],Op=/^(rgb|rgba|hsl|hsla|hwb)$/i,gr={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",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",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",grey:"#808080",green:"#008000",greenyellow:"#adff2f",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",lightgrey:"#d3d3d3",lightgreen:"#90ee90",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:"#9370d8",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:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",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",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Wp=new RegExp(`^(${Object.keys(gr).join("|")})$`,"i"),Li={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."},Vp=new RegExp(`^(${Object.keys(Li).join("|")})$`,"i");function at(t,e){const r=t.getText().match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(r){r[2]&&(e=100);const i=parseFloat(r[1])/e;if(i>=0&&i<=1)return i}throw new Error}function fl(t){const e=t.getText(),n=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg|rad|grad|turn)?$/);if(n)switch(n[2]){case"deg":return parseFloat(e)%360;case"rad":return parseFloat(e)*180/Math.PI%360;case"grad":return parseFloat(e)*.9%360;case"turn":return parseFloat(e)*360%360;default:if(typeof n[2]>"u")return parseFloat(e)%360}throw new Error}function $p(t){const e=t.getName();return e?Op.test(e):!1}function gl(t){return Pp.test(t)||Wp.test(t)||Vp.test(t)}const bl=48,Up=57,Bp=65,zn=97,qp=102;function he(t){return t=zn&&t<=qp?t-zn+10:0)}function wl(t){if(t[0]!=="#")return null;switch(t.length){case 4:return{red:he(t.charCodeAt(1))*17/255,green:he(t.charCodeAt(2))*17/255,blue:he(t.charCodeAt(3))*17/255,alpha:1};case 5:return{red:he(t.charCodeAt(1))*17/255,green:he(t.charCodeAt(2))*17/255,blue:he(t.charCodeAt(3))*17/255,alpha:he(t.charCodeAt(4))*17/255};case 7:return{red:(he(t.charCodeAt(1))*16+he(t.charCodeAt(2)))/255,green:(he(t.charCodeAt(3))*16+he(t.charCodeAt(4)))/255,blue:(he(t.charCodeAt(5))*16+he(t.charCodeAt(6)))/255,alpha:1};case 9:return{red:(he(t.charCodeAt(1))*16+he(t.charCodeAt(2)))/255,green:(he(t.charCodeAt(3))*16+he(t.charCodeAt(4)))/255,blue:(he(t.charCodeAt(5))*16+he(t.charCodeAt(6)))/255,alpha:(he(t.charCodeAt(7))*16+he(t.charCodeAt(8)))/255}}return null}function Cc(t,e,n,r=1){if(t=t/60,e===0)return{red:n,green:n,blue:n,alpha:r};{const i=(o,l,c)=>{for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-o)*c+o:c<3?l:c<4?(l-o)*(4-c)+o:o},s=n<=.5?n*(e+1):n+e-n*e,a=n*2-s;return{red:i(a,s,t+2),green:i(a,s,t),blue:i(a,s,t-2),alpha:r}}}function kc(t){const e=t.red,n=t.green,r=t.blue,i=t.alpha,s=Math.max(e,n,r),a=Math.min(e,n,r);let o=0,l=0;const c=(a+s)/2,d=s-a;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case e:o=(n-r)/d+(n=1){const l=e/(e+n);return{red:l,green:l,blue:l,alpha:r}}const i=Cc(t,1,.5,r);let s=i.red;s*=1-e-n,s+=e;let a=i.green;a*=1-e-n,a+=e;let o=i.blue;return o*=1-e-n,o+=e,{red:s,green:a,blue:o,alpha:r}}function Hp(t){const e=kc(t),n=Math.min(t.red,t.green,t.blue),r=1-Math.max(t.red,t.green,t.blue);return{h:e.h,w:n,b:r,a:e.a}}function Gp(t){if(t.type===v.HexColorValue){const e=t.getText();return wl(e)}else if(t.type===v.Function){const e=t,n=e.getName();let r=e.getArguments().getChildren();if(r.length===1){const i=r[0].getChildren();if(i.length===1&&i[0].type===v.Expression&&(r=i[0].getChildren(),r.length===3)){const s=r[2];if(s instanceof ns){const a=s.getLeft(),o=s.getRight(),l=s.getOperator();a&&o&&l&&l.matches("/")&&(r=[r[0],r[1],a,o])}}}if(!n||r.length<3||r.length>4)return null;try{const i=r.length===4?at(r[3],1):1;if(n==="rgb"||n==="rgba")return{red:at(r[0],255),green:at(r[1],255),blue:at(r[2],255),alpha:i};if(n==="hsl"||n==="hsla"){const s=fl(r[0]),a=at(r[1],100),o=at(r[2],100);return Cc(s,a,o,i)}else if(n==="hwb"){const s=fl(r[0]),a=at(r[1],100),o=at(r[2],100);return jp(s,a,o,i)}}catch{return null}}else if(t.type===v.Identifier){if(t.parent&&t.parent.type!==v.Term)return null;const e=t.parent;if(e&&e.parent&&e.parent.type===v.BinaryExpression){const i=e.parent;if(i.parent&&i.parent.type===v.ListEntry&&i.parent.key===i)return null}const n=t.getText().toLowerCase();if(n==="none")return null;const r=gr[n];if(r)return wl(r)}return null}const vl={bottom:"Computes to ‘100%’ for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to ‘50%’ (‘left 50%’) for the horizontal position if the horizontal position is not otherwise specified, or ‘50%’ (‘top 50%’) for the vertical position if it is.",left:"Computes to ‘0%’ for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to ‘100%’ for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to ‘0%’ for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},yl={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to ‘repeat no-repeat’.","repeat-y":"Computes to ‘no-repeat repeat’.",round:"Repeated as often as will fit within the background positioning area. If it doesn’t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},xl={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as ‘none’, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},Jp=["medium","thick","thin"],Sl={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},Cl={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},kl={initial:"Represents the value specified as the property’s initial value.",inherit:"Represents the computed value of the property on the element’s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},_l={"var()":"Evaluates the value of a custom variable.","calc()":"Evaluates an mathematical expression. The following operators can be used: + - * /."},El={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop’s position and the first specified color-stop’s position."},Fl={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value “start” or “end”.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},Rl={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},_c={length:["cap","ch","cm","cqb","cqh","cqi","cqmax","cqmin","cqw","dvb","dvh","dvi","dvw","em","ex","ic","in","lh","lvb","lvh","lvi","lvw","mm","pc","pt","px","q","rcap","rch","rem","rex","ric","rlh","svb","svh","svi","svw","vb","vh","vi","vmax","vmin","vw"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Xp=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Yp=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Qp=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Pn(t){return Object.keys(t).map(e=>t[e])}function Ie(t){return typeof t<"u"}class kr{constructor(e=new Fn){this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:p.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}peekIdent(e){return p.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekKeyword(e){return p.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()}peekDelim(e){return p.Delim===this.token.type&&e===this.token.text}peek(e){return e===this.token.type}peekOne(...e){return e.indexOf(this.token.type)!==-1}peekRegExp(e,n){return e!==this.token.type?!1:n.test(this.token.text)}hasWhitespace(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset}consumeToken(){this.prevToken=this.token,this.token=this.scanner.scan()}acceptUnicodeRange(){const e=this.scanner.tryScanUnicode();return e?(this.prevToken=e,this.token=this.scanner.scan(),!0):!1}mark(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}}restoreAtMark(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)}try(e){const n=this.mark(),r=e();return r||(this.restoreAtMark(n),null)}acceptOneKeyword(e){if(p.AtKeyword===this.token.type){for(const n of e)if(n.length===this.token.text.length&&n===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1}accept(e){return e===this.token.type?(this.consumeToken(),!0):!1}acceptIdent(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1}acceptKeyword(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1}acceptDelim(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1}acceptRegexp(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1}_parseRegexp(e){let n=this.createNode(v.Identifier);do;while(this.acceptRegexp(e));return this.finish(n)}acceptUnquotedString(){const e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);const n=this.scanner.scanUnquotedString();return n?(this.token=n,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)}resync(e,n){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(n&&n.indexOf(this.token.type)!==-1)return!0;if(this.token.type===p.EOF)return!1;this.token=this.scanner.scan()}}createNode(e){return new W(this.token.offset,this.token.len,e)}create(e){return new e(this.token.offset,this.token.len)}finish(e,n,r,i){if(!(e instanceof xe)&&(n&&this.markError(e,n,r,i),this.prevToken)){const s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e}markError(e,n,r,i){this.token!==this.lastErrorToken&&(e.addIssue(new xc(e,n,Re.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(r||i)&&this.resync(r,i)}parseStylesheet(e){const n=e.version,r=e.getText(),i=(s,a)=>{if(e.version!==n)throw new Error("Underlying model has changed, AST is no longer valid");return r.substr(s,a)};return this.internalParse(r,this._parseStylesheet,i)}internalParse(e,n,r){this.scanner.setSource(e),this.token=this.scanner.scan();const i=n.bind(this)();return i&&(r?i.textProvider=r:i.textProvider=(s,a)=>e.substr(s,a)),i}_parseStylesheet(){const e=this.create(Ku);for(;e.addChild(this._parseStylesheetStart()););let n=!1;do{let r=!1;do{r=!1;const i=this._parseStylesheetStatement();for(i&&(e.addChild(i),r=!0,n=!1,!this.peek(p.EOF)&&this._needsSemicolonAfter(i)&&!this.accept(p.SemiColon)&&this.markError(e,S.SemiColonExpected));this.accept(p.SemiColon)||this.accept(p.CDO)||this.accept(p.CDC);)r=!0,n=!1}while(r);if(this.peek(p.EOF))break;n||(this.peek(p.AtKeyword)?this.markError(e,S.UnknownAtRule):this.markError(e,S.RuleOrSelectorExpected),n=!0),this.consumeToken()}while(!this.peek(p.EOF));return this.finish(e)}_parseStylesheetStart(){return this._parseCharset()}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)}_parseStylesheetAtStatement(e=!1){return this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseLayer(e)||this._parsePropertyAtRule()||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseContainer(e)||this._parseUnknownAtRule()}_tryParseRuleset(e){const n=this.mark();if(this._parseSelector(e)){for(;this.accept(p.Comma)&&this._parseSelector(e););if(this.accept(p.CurlyL))return this.restoreAtMark(n),this._parseRuleset(e)}return this.restoreAtMark(n),null}_parseRuleset(e=!1){const n=this.create(kt),r=n.getSelectors();if(!r.addChild(this._parseSelector(e)))return null;for(;this.accept(p.Comma);)if(!r.addChild(this._parseSelector(e)))return this.finish(n,S.SelectorExpected);return this._parseBody(n,this._parseRuleSetDeclaration.bind(this))}_parseRuleSetDeclarationAtStatement(){return this._parseMedia(!0)||this._parseSupports(!0)||this._parseLayer(!0)||this._parseContainer(!0)||this._parseUnknownAtRule()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this.peek(p.Ident)?this._tryParseRuleset(!0)||this._parseDeclaration():this._parseRuleset(!0)}_needsSemicolonAfter(e){switch(e.type){case v.Keyframe:case v.ViewPort:case v.Media:case v.Ruleset:case v.Namespace:case v.If:case v.For:case v.Each:case v.While:case v.MixinDeclaration:case v.FunctionDeclaration:case v.MixinContentDeclaration:return!1;case v.ExtendsReference:case v.MixinContentReference:case v.ReturnStatement:case v.MediaQuery:case v.Debug:case v.Import:case v.AtApplyRule:case v.CustomPropertyDeclaration:return!0;case v.VariableDeclaration:return e.needsSemicolon;case v.MixinReference:return!e.getContent();case v.Declaration:return!e.getNestedProperties()}return!1}_parseDeclarations(e){const n=this.create(Qi);if(!this.accept(p.CurlyL))return null;let r=e();for(;n.addChild(r)&&!this.peek(p.CurlyR);){if(this._needsSemicolonAfter(r)&&!this.accept(p.SemiColon))return this.finish(n,S.SemiColonExpected,[p.SemiColon,p.CurlyR]);for(r&&this.prevToken&&this.prevToken.type===p.SemiColon&&(r.semicolonPosition=this.prevToken.offset);this.accept(p.SemiColon););r=e()}return this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected,[p.CurlyR,p.SemiColon])}_parseBody(e,n){return e.setDeclarations(this._parseDeclarations(n))?this.finish(e):this.finish(e,S.LeftCurlyExpected,[p.CurlyR,p.SemiColon])}_parseSelector(e){const n=this.create(Rn);let r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());)r=!0,n.addChild(this._parseCombinator());return r?this.finish(n):null}_parseDeclaration(e){const n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;const r=this.create(Te);return r.setProperty(this._parseProperty())?this.accept(p.Colon)?(this.prevToken&&(r.colonPosition=this.prevToken.offset),r.setValue(this._parseExpr())?(r.addChild(this._parsePrio()),this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)):this.finish(r,S.PropertyValueExpected)):this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]):null}_tryParseCustomPropertyDeclaration(e){if(!this.peekRegExp(p.Ident,/^--/))return null;const n=this.create(ep);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected,[p.Colon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);const r=this.mark();if(this.peek(p.CurlyL)){const s=this.create(Zu),a=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(s.setDeclarations(a)&&!a.isErroneous(!0)&&(s.addChild(this._parsePrio()),this.peek(p.SemiColon)))return this.finish(s),n.setPropertySet(s),n.semicolonPosition=this.token.offset,this.finish(n);this.restoreAtMark(r)}const i=this._parseExpr();return i&&!i.isErroneous(!0)&&(this._parsePrio(),this.peekOne(...e||[],p.SemiColon,p.EOF))?(n.setValue(i),this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)):(this.restoreAtMark(r),n.addChild(this._parseCustomPropertyValue(e)),n.addChild(this._parsePrio()),Ie(n.colonPosition)&&this.token.offset===n.colonPosition+1?this.finish(n,S.PropertyValueExpected):this.finish(n))}_parseCustomPropertyValue(e=[p.CurlyR]){const n=this.create(W),r=()=>s===0&&a===0&&o===0,i=()=>e.indexOf(this.token.type)!==-1;let s=0,a=0,o=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(r())break e;break;case p.Exclamation:if(r())break e;break;case p.CurlyL:s++;break;case p.CurlyR:if(s--,s<0){if(i()&&a===0&&o===0)break e;return this.finish(n,S.LeftCurlyExpected)}break;case p.ParenthesisL:a++;break;case p.ParenthesisR:if(a--,a<0){if(i()&&o===0&&s===0)break e;return this.finish(n,S.LeftParenthesisExpected)}break;case p.BracketL:o++;break;case p.BracketR:if(o--,o<0)return this.finish(n,S.LeftSquareBracketExpected);break;case p.BadString:break e;case p.EOF:let l=S.RightCurlyExpected;return o>0?l=S.RightSquareBracketExpected:a>0&&(l=S.RightParenthesisExpected),this.finish(n,l)}this.consumeToken()}return this.finish(n)}_tryToParseDeclaration(e){const n=this.mark();return this._parseProperty()&&this.accept(p.Colon)?(this.restoreAtMark(n),this._parseDeclaration(e)):(this.restoreAtMark(n),null)}_parseProperty(){const e=this.create(Zi),n=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(n),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null}_parsePropertyIdentifier(){return this._parseIdent()}_parseCharset(){if(!this.peek(p.Charset))return null;const e=this.create(W);return this.consumeToken(),this.accept(p.String)?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.IdentifierExpected)}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(es);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected):this._completeParseImport(e)}_completeParseImport(e){if(this.acceptIdent("layer")&&this.accept(p.ParenthesisL)){if(!e.addChild(this._parseLayerName()))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[])}return this.acceptIdent("supports")&&this.accept(p.ParenthesisL)&&(e.addChild(this._tryToParseDeclaration()||this._parseSupportsCondition()),!this.accept(p.ParenthesisR))?this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))}_parseNamespace(){if(!this.peekKeyword("@namespace"))return null;const e=this.create(up);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,S.URIExpected,[p.SemiColon]):this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected)}_parseFontFace(){if(!this.peekKeyword("@font-face"))return null;const e=this.create(mc);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseViewPort(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;const e=this.create(op);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseKeyframe(){if(!this.peekRegExp(p.AtKeyword,this.keyframeRegex))return null;const e=this.create(gc),n=this.create(W);return this.consumeToken(),e.setKeyword(this.finish(n)),n.matches("@-ms-keyframes")&&this.markError(n,S.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,S.IdentifierExpected,[p.CurlyR])}_parseKeyframeIdent(){return this._parseIdent([K.Keyframe])}_parseKeyframeSelector(){const e=this.create(yo);let n=!1;if(e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return null;for(;this.accept(p.Comma);)if(n=!1,e.addChild(this._parseIdent())&&(n=!0),this.accept(p.Percentage)&&(n=!0),!n)return this.finish(e,S.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_tryParseKeyframeSelector(){const e=this.create(yo),n=this.mark();let r=!1;if(e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return null;for(;this.accept(p.Comma);)if(r=!1,e.addChild(this._parseIdent())&&(r=!0),this.accept(p.Percentage)&&(r=!0),!r)return this.restoreAtMark(n),null;return this.peek(p.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(n),null)}_parsePropertyAtRule(){if(!this.peekKeyword("@property"))return null;const e=this.create(mp);return this.consumeToken(),!this.peekRegExp(p.Ident,/^--/)||!e.setName(this._parseIdent([K.Property]))?this.finish(e,S.IdentifierExpected):this._parseBody(e,this._parseDeclaration.bind(this))}_parseLayer(e=!1){if(!this.peekKeyword("@layer"))return null;const n=this.create(pp);this.consumeToken();const r=this._parseLayerNameList();return r&&n.setNames(r),(!r||r.getChildren().length===1)&&this.peek(p.CurlyL)?this._parseBody(n,this._parseLayerDeclaration.bind(this,e)):this.accept(p.SemiColon)?this.finish(n):this.finish(n,S.SemiColonExpected)}_parseLayerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseLayerNameList(){const e=this.createNode(v.LayerNameList);if(!e.addChild(this._parseLayerName()))return null;for(;this.accept(p.Comma);)if(!e.addChild(this._parseLayerName()))return this.finish(e,S.IdentifierExpected);return this.finish(e)}_parseLayerName(){const e=this.createNode(v.LayerName);if(!e.addChild(this._parseIdent()))return null;for(;!this.hasWhitespace()&&this.acceptDelim(".");)if(this.hasWhitespace()||!e.addChild(this._parseIdent()))return this.finish(e,S.IdentifierExpected);return this.finish(e)}_parseSupports(e=!1){if(!this.peekKeyword("@supports"))return null;const n=this.create(mi);return this.consumeToken(),n.addChild(this._parseSupportsCondition()),this._parseBody(n,this._parseSupportsDeclaration.bind(this,e))}_parseSupportsDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseSupportsCondition(){const e=this.create(mn);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(p.Ident,/^(and|or)$/i)){const n=this.token.text.toLowerCase();for(;this.acceptIdent(n);)e.addChild(this._parseSupportsConditionInParens())}return this.finish(e)}_parseSupportsConditionInParens(){const e=this.create(mn);if(this.accept(p.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([p.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,S.ConditionExpected):this.accept(p.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,S.RightParenthesisExpected,[p.ParenthesisR],[]);if(this.peek(p.Ident)){const n=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=1;for(;this.token.type!==p.EOF&&r!==0;)this.token.type===p.ParenthesisL?r++:this.token.type===p.ParenthesisR&&r--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(n)}return this.finish(e,S.LeftParenthesisExpected,[],[p.ParenthesisL])}_parseMediaDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseMedia(e=!1){if(!this.peekKeyword("@media"))return null;const n=this.create(ts);return this.consumeToken(),n.addChild(this._parseMediaQueryList())?this._parseBody(n,this._parseMediaDeclaration.bind(this,e)):this.finish(n,S.MediaQueryExpected)}_parseMediaQueryList(){const e=this.create(bc);if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseMediaQuery()))return this.finish(e,S.MediaQueryExpected);return this.finish(e)}_parseMediaQuery(){const e=this.create(wc),n=this.mark();if(this.acceptIdent("not"),this.peek(p.ParenthesisL))this.restoreAtMark(n),e.addChild(this._parseMediaCondition());else{if(this.acceptIdent("only"),!e.addChild(this._parseIdent()))return null;this.acceptIdent("and")&&e.addChild(this._parseMediaCondition())}return this.finish(e)}_parseRatio(){const e=this.mark(),n=this.create(Cp);return this._parseNumeric()?this.acceptDelim("/")?this._parseNumeric()?this.finish(n):this.finish(n,S.NumberExpected):(this.restoreAtMark(e),null):null}_parseMediaCondition(){const e=this.create(bp);this.acceptIdent("not");let n=!0;for(;n;){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(this.peek(p.ParenthesisL)||this.peekIdent("not")?e.addChild(this._parseMediaCondition()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL]);n=this.acceptIdent("and")||this.acceptIdent("or")}return this.finish(e)}_parseMediaFeature(){const e=[p.ParenthesisR],n=this.create(wp);if(n.addChild(this._parseMediaFeatureName())){if(this.accept(p.Colon)){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}else if(this._parseMediaFeatureRangeOperator()){if(!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}}else if(n.addChild(this._parseMediaFeatureValue())){if(!this._parseMediaFeatureRangeOperator())return this.finish(n,S.OperatorExpected,[],e);if(!n.addChild(this._parseMediaFeatureName()))return this.finish(n,S.IdentifierExpected,[],e);if(this._parseMediaFeatureRangeOperator()&&!n.addChild(this._parseMediaFeatureValue()))return this.finish(n,S.TermExpected,[],e)}else return this.finish(n,S.IdentifierExpected,[],e);return this.finish(n)}_parseMediaFeatureRangeOperator(){return this.acceptDelim("<")||this.acceptDelim(">")?(this.hasWhitespace()||this.acceptDelim("="),!0):!!this.acceptDelim("=")}_parseMediaFeatureName(){return this._parseIdent()}_parseMediaFeatureValue(){return this._parseRatio()||this._parseTermExpression()}_parseMedium(){const e=this.create(W);return e.addChild(this._parseIdent())?this.finish(e):null}_parsePageDeclaration(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()}_parsePage(){if(!this.peekKeyword("@page"))return null;const e=this.create(vp);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(p.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,S.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))}_parsePageMarginBox(){if(!this.peek(p.AtKeyword))return null;const e=this.create(yp);return this.acceptOneKeyword(Qp)||this.markError(e,S.UnknownAtRule,[],[p.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parsePageSelector(){if(!this.peek(p.Ident)&&!this.peek(p.Colon))return null;const e=this.create(W);return e.addChild(this._parseIdent()),this.accept(p.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)}_parseDocument(){if(!this.peekKeyword("@-moz-document"))return null;const e=this.create(fp);return this.consumeToken(),this.resync([],[p.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))}_parseContainerDeclaration(e=!1){return e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)}_parseContainer(e=!1){if(!this.peekKeyword("@container"))return null;const n=this.create(gp);return this.consumeToken(),n.addChild(this._parseIdent()),n.addChild(this._parseContainerQuery()),this._parseBody(n,this._parseContainerDeclaration.bind(this,e))}_parseContainerQuery(){const e=this.create(W);if(this.acceptIdent("not"))e.addChild(this._parseContainerQueryInParens());else if(e.addChild(this._parseContainerQueryInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseContainerQueryInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseContainerQueryInParens());return this.finish(e)}_parseContainerQueryInParens(){const e=this.create(W);if(this.accept(p.ParenthesisL)){if(this.peekIdent("not")||this.peek(p.ParenthesisL)?e.addChild(this._parseContainerQuery()):e.addChild(this._parseMediaFeature()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else if(this.acceptIdent("style")){if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseStyleQuery(){const e=this.create(W);if(this.acceptIdent("not"))e.addChild(this._parseStyleInParens());else if(this.peek(p.ParenthesisL)){if(e.addChild(this._parseStyleInParens()),this.peekIdent("and"))for(;this.acceptIdent("and");)e.addChild(this._parseStyleInParens());else if(this.peekIdent("or"))for(;this.acceptIdent("or");)e.addChild(this._parseStyleInParens())}else e.addChild(this._parseDeclaration([p.ParenthesisR]));return this.finish(e)}_parseStyleInParens(){const e=this.create(W);if(this.accept(p.ParenthesisL)){if(e.addChild(this._parseStyleQuery()),!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[],[p.CurlyL])}else return this.finish(e,S.LeftParenthesisExpected,[],[p.CurlyL]);return this.finish(e)}_parseUnknownAtRule(){if(!this.peek(p.AtKeyword))return null;const e=this.create(yc);e.addChild(this._parseUnknownAtRuleName());const n=()=>i===0&&s===0&&a===0;let r=0,i=0,s=0,a=0;e:for(;;){switch(this.token.type){case p.SemiColon:if(n())break e;break;case p.EOF:return i>0?this.finish(e,S.RightCurlyExpected):a>0?this.finish(e,S.RightSquareBracketExpected):s>0?this.finish(e,S.RightParenthesisExpected):this.finish(e);case p.CurlyL:r++,i++;break;case p.CurlyR:if(i--,r>0&&i===0){if(this.consumeToken(),a>0)return this.finish(e,S.RightSquareBracketExpected);if(s>0)return this.finish(e,S.RightParenthesisExpected);break e}if(i<0){if(s===0&&a===0)break e;return this.finish(e,S.LeftCurlyExpected)}break;case p.ParenthesisL:s++;break;case p.ParenthesisR:if(s--,s<0)return this.finish(e,S.LeftParenthesisExpected);break;case p.BracketL:a++;break;case p.BracketR:if(a--,a<0)return this.finish(e,S.LeftSquareBracketExpected);break}this.consumeToken()}return e}_parseUnknownAtRuleName(){const e=this.create(W);return this.accept(p.AtKeyword)?this.finish(e):e}_parseOperator(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(p.Dashmatch)||this.peek(p.Includes)||this.peek(p.SubstringOperator)||this.peek(p.PrefixOperator)||this.peek(p.SuffixOperator)||this.peekDelim("=")){const e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}else return null}_parseUnaryOperator(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;const e=this.create(W);return this.consumeToken(),this.finish(e)}_parseCombinator(){if(this.peekDelim(">")){const e=this.create(W);this.consumeToken();const n=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return e.type=v.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){const e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){const e=this.create(W);return this.consumeToken(),e.type=v.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){const e=this.create(W);this.consumeToken();const n=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=v.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(n)}return null}_parseSimpleSelector(){const e=this.create(qt);let n=0;for(e.addChild(this._parseElementName()||this._parseNestingSelector())&&n++;(n===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)n++;return n>0?this.finish(e):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);return this.consumeToken(),this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()}_parseSelectorIdent(){return this._parseIdent()}_parseHash(){if(!this.peek(p.Hash)&&!this.peekDelim("#"))return null;const e=this.createNode(v.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,S.IdentifierExpected)}else this.consumeToken();return this.finish(e)}_parseClass(){if(!this.peekDelim("."))return null;const e=this.createNode(v.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,S.IdentifierExpected):this.finish(e)}_parseElementName(){const e=this.mark(),n=this.createNode(v.ElementNameSelector);return n.addChild(this._parseNamespacePrefix()),!n.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(n)}_parseNamespacePrefix(){const e=this.mark(),n=this.createNode(v.NamespacePrefix);return!n.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(n):(this.restoreAtMark(e),null)}_parseAttrib(){if(!this.peek(p.BracketL))return null;const e=this.create(Sp);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i"),this.acceptIdent("s")),this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)):this.finish(e,S.IdentifierExpected)}_parsePseudo(){const e=this._tryParsePseudoIdentifier();if(e){if(!this.hasWhitespace()&&this.accept(p.ParenthesisL)){const n=()=>{const i=this.create(W);if(!i.addChild(this._parseSelector(!0)))return null;for(;this.accept(p.Comma)&&i.addChild(this._parseSelector(!0)););return this.peek(p.ParenthesisR)?this.finish(i):null};if(!e.addChild(this.try(n))&&e.addChild(this._parseBinaryExpr())&&this.acceptIdent("of")&&!e.addChild(this.try(n)))return this.finish(e,S.SelectorExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return this.finish(e)}return null}_tryParsePseudoIdentifier(){if(!this.peek(p.Colon))return null;const e=this.mark(),n=this.createNode(v.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(p.Colon),this.hasWhitespace()||!n.addChild(this._parseIdent())?this.finish(n,S.IdentifierExpected):this.finish(n))}_tryParsePrio(){const e=this.mark(),n=this._parsePrio();return n||(this.restoreAtMark(e),null)}_parsePrio(){if(!this.peek(p.Exclamation))return null;const e=this.createNode(v.Prio);return this.accept(p.Exclamation)&&this.acceptIdent("important")?this.finish(e):null}_parseExpr(e=!1){const n=this.create(vc);if(!n.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(p.Comma)){if(e)return this.finish(n);this.consumeToken()}if(!n.addChild(this._parseBinaryExpr()))break}return this.finish(n)}_parseUnicodeRange(){if(!this.peekIdent("u"))return null;const e=this.create(Qu);return this.acceptUnicodeRange()?this.finish(e):null}_parseNamedLine(){if(!this.peek(p.BracketL))return null;const e=this.createNode(v.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(p.BracketR)?this.finish(e):this.finish(e,S.RightSquareBracketExpected)}_parseBinaryExpr(e,n){let r=this.create(ns);if(!r.setLeft(e||this._parseTerm()))return null;if(!r.setOperator(n||this._parseOperator()))return this.finish(r);if(!r.setRight(this._parseTerm()))return this.finish(r,S.TermExpected);r=this.finish(r);const i=this._parseOperator();return i&&(r=this._parseBinaryExpr(r,i)),this.finish(r)}_parseTerm(){let e=this.create(xp);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null}_parseTermExpression(){return this._parseURILiteral()||this._parseUnicodeRange()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(W);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseNumeric(){if(this.peek(p.Num)||this.peek(p.Percentage)||this.peek(p.Resolution)||this.peek(p.Length)||this.peek(p.EMS)||this.peek(p.EXS)||this.peek(p.Angle)||this.peek(p.Time)||this.peek(p.Dimension)||this.peek(p.ContainerQueryLength)||this.peek(p.Freq)){const e=this.create(is);return this.consumeToken(),this.finish(e)}return null}_parseStringLiteral(){if(!this.peek(p.String)&&!this.peek(p.BadString))return null;const e=this.createNode(v.StringLiteral);return this.consumeToken(),this.finish(e)}_parseURILiteral(){if(!this.peekRegExp(p.Ident,/^url(-prefix)?$/i))return null;const e=this.mark(),n=this.createNode(v.URILiteral);return this.accept(p.Ident),this.hasWhitespace()||!this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),n.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected))}_parseURLArgument(){const e=this.create(W);return!this.accept(p.String)&&!this.accept(p.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)}_parseIdent(e){if(!this.peek(p.Ident))return null;const n=this.create(Pe);return e&&(n.referenceTypes=e),n.isCustomProperty=this.peekRegExp(p.Ident,/^--/),this.consumeToken(),this.finish(n)}_parseFunction(){const e=this.mark(),n=this.create(Nn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)n.getArguments().addChild(this._parseFunctionArgument())||this.markError(n,S.ExpressionExpected);return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_parseFunctionIdentifier(){if(!this.peek(p.Ident))return null;const e=this.create(Pe);if(e.referenceTypes=[K.Function],this.acceptIdent("progid")){if(this.accept(p.Colon))for(;this.accept(p.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)}_parseFunctionArgument(){const e=this.create(Xt);return e.setValue(this._parseExpr(!0))?this.finish(e):null}_parseHexColor(){if(this.peekRegExp(p.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){const e=this.create(rs);return this.consumeToken(),this.finish(e)}else return null}}function Kp(t,e){let n=0,r=t.length;if(r===0)return 0;for(;ne+n||this.offset===e&&this.length===n?this.findInScope(e,n):null}findInScope(e,n=0){const r=e+n,i=Kp(this.children,a=>a.offset>r);if(i===0)return this;const s=this.children[i-1];return s.offset<=e&&s.offset+s.length>=e+n?s.findInScope(e,n):this}addSymbol(e){this.symbols.push(e)}getSymbol(e,n){for(let r=0;r/g,">")}function tm(t,e){if(!t.description||t.description==="")return"";if(typeof t.description!="string")return t.description.value;let n="";if(e?.documentation!==!1){t.status&&(n+=Rc(t.status)),n+=t.description;const r=Nc(t.browsers);r&&(n+=` +(`+r+")"),"syntax"in t&&(n+=` + +Syntax: ${t.syntax}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` + +`),n+=t.references.map(r=>`${r.name}: ${r.url}`).join(" | ")),n}function nm(t,e){if(!t.description||t.description==="")return"";let n="";if(e?.documentation!==!1){t.status&&(n+=Rc(t.status)),typeof t.description=="string"?n+=Wn(t.description):n+=t.description.kind===qe.Markdown?t.description.value:Wn(t.description.value);const r=Nc(t.browsers);r&&(n+=` + +(`+Wn(r)+")"),"syntax"in t&&t.syntax&&(n+=` + +Syntax: ${Wn(t.syntax)}`)}return t.references&&t.references.length>0&&e?.references!==!1&&(n.length>0&&(n+=` + +`),n+=t.references.map(r=>`[${r.name}](${r.url})`).join(" | ")),n}function Nc(t=[]){return t.length===0?null:t.map(e=>{let n="";const r=e.match(/([A-Z]+)(\d+)?/),i=r[1],s=r[2];return i in Nl&&(n+=Nl[i]),s&&(n+=" "+s),n}).join(", ")}var Dc;(()=>{var t={470:i=>{function s(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}function a(l,c){for(var d,u="",m=0,f=-1,g=0,b=0;b<=l.length;++b){if(b2){var k=u.lastIndexOf("/");if(k!==u.length-1){k===-1?(u="",m=0):m=(u=u.slice(0,k)).length-1-u.lastIndexOf("/"),f=b,g=0;continue}}else if(u.length===2||u.length===1){u="",m=0,f=b,g=0;continue}}c&&(u.length>0?u+="/..":u="..",m=2)}else u.length>0?u+="/"+l.slice(f+1,b):u=l.slice(f+1,b),m=b-f-1;f=b,g=0}else d===46&&g!==-1?++g:g=-1}return u}var o={resolve:function(){for(var l,c="",d=!1,u=arguments.length-1;u>=-1&&!d;u--){var m;u>=0?m=arguments[u]:(l===void 0&&(l=process.cwd()),m=l),s(m),m.length!==0&&(c=m+"/"+c,d=m.charCodeAt(0)===47)}return c=a(c,!d),d?c.length>0?"/"+c:"/":c.length>0?c:"."},normalize:function(l){if(s(l),l.length===0)return".";var c=l.charCodeAt(0)===47,d=l.charCodeAt(l.length-1)===47;return(l=a(l,!c)).length!==0||c||(l="."),l.length>0&&d&&(l+="/"),c?"/"+l:l},isAbsolute:function(l){return s(l),l.length>0&&l.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var l,c=0;c0&&(l===void 0?l=d:l+="/"+d)}return l===void 0?".":o.normalize(l)},relative:function(l,c){if(s(l),s(c),l===c||(l=o.resolve(l))===(c=o.resolve(c)))return"";for(var d=1;db){if(c.charCodeAt(f+F)===47)return c.slice(f+F+1);if(F===0)return c.slice(f+F)}else m>b&&(l.charCodeAt(d+F)===47?k=F:F===0&&(k=0));break}var R=l.charCodeAt(d+F);if(R!==c.charCodeAt(f+F))break;R===47&&(k=F)}var E="";for(F=d+k+1;F<=u;++F)F!==u&&l.charCodeAt(F)!==47||(E.length===0?E+="..":E+="/..");return E.length>0?E+c.slice(f+k):(f+=k,c.charCodeAt(f)===47&&++f,c.slice(f))},_makeLong:function(l){return l},dirname:function(l){if(s(l),l.length===0)return".";for(var c=l.charCodeAt(0),d=c===47,u=-1,m=!0,f=l.length-1;f>=1;--f)if((c=l.charCodeAt(f))===47){if(!m){u=f;break}}else m=!1;return u===-1?d?"/":".":d&&u===1?"//":l.slice(0,u)},basename:function(l,c){if(c!==void 0&&typeof c!="string")throw new TypeError('"ext" argument must be a string');s(l);var d,u=0,m=-1,f=!0;if(c!==void 0&&c.length>0&&c.length<=l.length){if(c.length===l.length&&c===l)return"";var g=c.length-1,b=-1;for(d=l.length-1;d>=0;--d){var k=l.charCodeAt(d);if(k===47){if(!f){u=d+1;break}}else b===-1&&(f=!1,b=d+1),g>=0&&(k===c.charCodeAt(g)?--g==-1&&(m=d):(g=-1,m=b))}return u===m?m=b:m===-1&&(m=l.length),l.slice(u,m)}for(d=l.length-1;d>=0;--d)if(l.charCodeAt(d)===47){if(!f){u=d+1;break}}else m===-1&&(f=!1,m=d+1);return m===-1?"":l.slice(u,m)},extname:function(l){s(l);for(var c=-1,d=0,u=-1,m=!0,f=0,g=l.length-1;g>=0;--g){var b=l.charCodeAt(g);if(b!==47)u===-1&&(m=!1,u=g+1),b===46?c===-1?c=g:f!==1&&(f=1):c!==-1&&(f=-1);else if(!m){d=g+1;break}}return c===-1||u===-1||f===0||f===1&&c===u-1&&c===d+1?"":l.slice(c,u)},format:function(l){if(l===null||typeof l!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof l);return(function(c,d){var u=d.dir||d.root,m=d.base||(d.name||"")+(d.ext||"");return u?u===d.root?u+m:u+"/"+m:m})(0,l)},parse:function(l){s(l);var c={root:"",dir:"",base:"",ext:"",name:""};if(l.length===0)return c;var d,u=l.charCodeAt(0),m=u===47;m?(c.root="/",d=1):d=0;for(var f=-1,g=0,b=-1,k=!0,F=l.length-1,R=0;F>=d;--F)if((u=l.charCodeAt(F))!==47)b===-1&&(k=!1,b=F+1),u===46?f===-1?f=F:R!==1&&(R=1):f!==-1&&(R=-1);else if(!k){g=F+1;break}return f===-1||b===-1||R===0||R===1&&f===b-1&&f===g+1?b!==-1&&(c.base=c.name=g===0&&m?l.slice(1,b):l.slice(g,b)):(g===0&&m?(c.name=l.slice(1,f),c.base=l.slice(1,b)):(c.name=l.slice(g,f),c.base=l.slice(g,b)),c.ext=l.slice(f,b)),g>0?c.dir=l.slice(0,g-1):m&&(c.dir="/"),c},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o}},e={};function n(i){var s=e[i];if(s!==void 0)return s.exports;var a=e[i]={exports:{}};return t[i](a,a.exports,n),a.exports}n.d=(i,s)=>{for(var a in s)n.o(s,a)&&!n.o(i,a)&&Object.defineProperty(i,a,{enumerable:!0,get:s[a]})},n.o=(i,s)=>Object.prototype.hasOwnProperty.call(i,s),n.r=i=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})};var r={};(()=>{let i;n.r(r),n.d(r,{URI:()=>m,Utils:()=>$}),typeof process=="object"?i=process.platform==="win32":typeof navigator=="object"&&(i=navigator.userAgent.indexOf("Windows")>=0);const s=/^\w[\w\d+.-]*$/,a=/^\//,o=/^\/\//;function l(L,y){if(!L.scheme&&y)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${L.authority}", path: "${L.path}", query: "${L.query}", fragment: "${L.fragment}"}`);if(L.scheme&&!s.test(L.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(L.path){if(L.authority){if(!a.test(L.path))throw new Error('[UriError]: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character')}else if(o.test(L.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const c="",d="/",u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class m{static isUri(y){return y instanceof m||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="string"&&typeof y.with=="function"&&typeof y.toString=="function"}scheme;authority;path;query;fragment;constructor(y,_,I,M,A,P=!1){typeof y=="object"?(this.scheme=y.scheme||c,this.authority=y.authority||c,this.path=y.path||c,this.query=y.query||c,this.fragment=y.fragment||c):(this.scheme=(function(H,ee){return H||ee?H:"file"})(y,P),this.authority=_||c,this.path=(function(H,ee){switch(H){case"https":case"http":case"file":ee?ee[0]!==d&&(ee=d+ee):ee=d}return ee})(this.scheme,I||c),this.query=M||c,this.fragment=A||c,l(this,P))}get fsPath(){return R(this)}with(y){if(!y)return this;let{scheme:_,authority:I,path:M,query:A,fragment:P}=y;return _===void 0?_=this.scheme:_===null&&(_=c),I===void 0?I=this.authority:I===null&&(I=c),M===void 0?M=this.path:M===null&&(M=c),A===void 0?A=this.query:A===null&&(A=c),P===void 0?P=this.fragment:P===null&&(P=c),_===this.scheme&&I===this.authority&&M===this.path&&A===this.query&&P===this.fragment?this:new g(_,I,M,A,P)}static parse(y,_=!1){const I=u.exec(y);return I?new g(I[2]||c,V(I[4]||c),V(I[5]||c),V(I[7]||c),V(I[9]||c),_):new g(c,c,c,c,c)}static file(y){let _=c;if(i&&(y=y.replace(/\\/g,d)),y[0]===d&&y[1]===d){const I=y.indexOf(d,2);I===-1?(_=y.substring(2),y=d):(_=y.substring(2,I),y=y.substring(I)||d)}return new g("file",_,y,c,c)}static from(y){const _=new g(y.scheme,y.authority,y.path,y.query,y.fragment);return l(_,!0),_}toString(y=!1){return E(this,y)}toJSON(){return this}static revive(y){if(y){if(y instanceof m)return y;{const _=new g(y);return _._formatted=y.external,_._fsPath=y._sep===f?y.fsPath:null,_}}return y}}const f=i?1:void 0;class g extends m{_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=R(this)),this._fsPath}toString(y=!1){return y?E(this,!0):(this._formatted||(this._formatted=E(this,!1)),this._formatted)}toJSON(){const y={$mid:1};return this._fsPath&&(y.fsPath=this._fsPath,y._sep=f),this._formatted&&(y.external=this._formatted),this.path&&(y.path=this.path),this.scheme&&(y.scheme=this.scheme),this.authority&&(y.authority=this.authority),this.query&&(y.query=this.query),this.fragment&&(y.fragment=this.fragment),y}}const b={58:"%3A",47:"%2F",63:"%3F",35:"%23",91:"%5B",93:"%5D",64:"%40",33:"%21",36:"%24",38:"%26",39:"%27",40:"%28",41:"%29",42:"%2A",43:"%2B",44:"%2C",59:"%3B",61:"%3D",32:"%20"};function k(L,y,_){let I,M=-1;for(let A=0;A=97&&P<=122||P>=65&&P<=90||P>=48&&P<=57||P===45||P===46||P===95||P===126||y&&P===47||_&&P===91||_&&P===93||_&&P===58)M!==-1&&(I+=encodeURIComponent(L.substring(M,A)),M=-1),I!==void 0&&(I+=L.charAt(A));else{I===void 0&&(I=L.substr(0,A));const H=b[P];H!==void 0?(M!==-1&&(I+=encodeURIComponent(L.substring(M,A)),M=-1),I+=H):M===-1&&(M=A)}}return M!==-1&&(I+=encodeURIComponent(L.substring(M))),I!==void 0?I:L}function F(L){let y;for(let _=0;_1&&L.scheme==="file"?`//${L.authority}${L.path}`:L.path.charCodeAt(0)===47&&(L.path.charCodeAt(1)>=65&&L.path.charCodeAt(1)<=90||L.path.charCodeAt(1)>=97&&L.path.charCodeAt(1)<=122)&&L.path.charCodeAt(2)===58?L.path[1].toLowerCase()+L.path.substr(2):L.path,i&&(_=_.replace(/\//g,"\\")),_}function E(L,y){const _=y?F:k;let I="",{scheme:M,authority:A,path:P,query:H,fragment:ee}=L;if(M&&(I+=M,I+=":"),(A||M==="file")&&(I+=d,I+=d),A){let J=A.indexOf("@");if(J!==-1){const ve=A.substr(0,J);A=A.substr(J+1),J=ve.lastIndexOf(":"),J===-1?I+=_(ve,!1,!1):(I+=_(ve.substr(0,J),!1,!1),I+=":",I+=_(ve.substr(J+1),!1,!0)),I+="@"}A=A.toLowerCase(),J=A.lastIndexOf(":"),J===-1?I+=_(A,!1,!0):(I+=_(A.substr(0,J),!1,!0),I+=A.substr(J))}if(P){if(P.length>=3&&P.charCodeAt(0)===47&&P.charCodeAt(2)===58){const J=P.charCodeAt(1);J>=65&&J<=90&&(P=`/${String.fromCharCode(J+32)}:${P.substr(3)}`)}else if(P.length>=2&&P.charCodeAt(1)===58){const J=P.charCodeAt(0);J>=65&&J<=90&&(P=`${String.fromCharCode(J+32)}:${P.substr(2)}`)}I+=_(P,!0,!1)}return H&&(I+="?",I+=_(H,!1,!1)),ee&&(I+="#",I+=y?ee:k(ee,!1,!1)),I}function T(L){try{return decodeURIComponent(L)}catch{return L.length>3?L.substr(0,3)+T(L.substr(3)):L}}const O=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function V(L){return L.match(O)?L.replace(O,(y=>T(y))):L}var D=n(470);const N=D.posix||D,z="/";var $;(function(L){L.joinPath=function(y,..._){return y.with({path:N.join(y.path,..._)})},L.resolvePath=function(y,..._){let I=y.path,M=!1;I[0]!==z&&(I=z+I,M=!0);let A=N.resolve(I,..._);return M&&A[0]===z&&!y.authority&&(A=A.substring(1)),y.with({path:A})},L.dirname=function(y){if(y.path.length===0||y.path===z)return y;let _=N.dirname(y.path);return _.length===1&&_.charCodeAt(0)===46&&(_=""),y.with({path:_})},L.basename=function(y){return N.basename(y.path)},L.extname=function(y){return N.extname(y.path)}})($||($={}))})(),Dc=r})();const{URI:os,Utils:ht}=Dc;function Tr(t){return ht.dirname(os.parse(t)).toString(!0)}function Ot(t,...e){return ht.joinPath(os.parse(t),...e).toString(!0)}class rm{constructor(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}onCssURILiteralValue(e){this.literalCompletions.push(e)}onCssImportPath(e){this.importCompletions.push(e)}async computeCompletions(e,n){const r={items:[],isIncomplete:!1};for(const i of this.literalCompletions){const s=i.uriValue,a=Or(s);if(a==="."||a==="..")r.isIncomplete=!0;else{const o=await this.providePathSuggestions(s,i.position,i.range,e,n);for(let l of o)r.items.push(l)}}for(const i of this.importCompletions){const s=i.pathValue,a=Or(s);if(a==="."||a==="..")r.isIncomplete=!0;else{let o=await this.providePathSuggestions(s,i.position,i.range,e,n);e.languageId==="scss"&&o.forEach(l=>{pe(l.label,"_")&&pc(l.label,".scss")&&(l.textEdit?l.textEdit.newText=l.label.slice(1,-5):l.label=l.label.slice(1,-5))});for(let l of o)r.items.push(l)}}return r}async providePathSuggestions(e,n,r,i,s){const a=Or(e),o=pe(e,"'")||pe(e,'"'),l=o?a.slice(0,n.character-(r.start.character+1)):a.slice(0,n.character-r.start.character),c=i.uri,d=o?om(r,1,-1):r,u=sm(l,a,d),m=l.substring(0,l.lastIndexOf("/")+1);let f=s.resolveReference(m||".",c);if(f)try{const g=[],b=await this.readDirectory(f);for(const[k,F]of b)k.charCodeAt(0)!==im&&(F===Cn.Directory||Ot(f,k)!==c)&&g.push(am(k,F===Cn.Directory,u));return g}catch{}return[]}}const im=46;function Or(t){return pe(t,"'")||pe(t,'"')?t.slice(1,-1):t}function sm(t,e,n){let r;const i=t.lastIndexOf("/");if(i===-1)r=n;else{const s=e.slice(i+1),a=br(n.end,-s.length),o=s.indexOf(" ");let l;o!==-1?l=br(a,o):l=n.end,r=Z.create(a,l)}return r}function am(t,e,n){return e?(t=t+"/",{label:Vn(t),kind:q.Folder,textEdit:j.replace(n,Vn(t)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:Vn(t),kind:q.File,textEdit:j.replace(n,Vn(t))}}function Vn(t){return t.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function br(t,e){return ye.create(t.line,t.character+e)}function om(t,e,n){const r=br(t.start,e),i=br(t.end,n);return Z.create(r,i)}const Xe=Fe.Snippet,Dl={title:"Suggest",command:"editor.action.triggerSuggest"};var $e;(function(t){t.Enums=" ",t.Normal="d",t.VendorPrefixed="x",t.Term="y",t.Variable="z"})($e||($e={}));class ls{constructor(e=null,n,r){this.variablePrefix=e,this.lsOptions=n,this.cssDataManager=r,this.completionParticipants=[]}configure(e){this.defaultSettings=e}getSymbolContext(){return this.symbolContext||(this.symbolContext=new Mi(this.styleSheet)),this.symbolContext}setCompletionParticipants(e){this.completionParticipants=e||[]}async doComplete2(e,n,r,i,s=this.defaultSettings){if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return this.doComplete(e,n,r,s);const a=new rm(this.lsOptions.fileSystemProvider.readDirectory),o=this.completionParticipants;this.completionParticipants=[a].concat(o);const l=this.doComplete(e,n,r,s);try{const c=await a.computeCompletions(e,i);return{isIncomplete:l.isIncomplete||c.isIncomplete,itemDefaults:l.itemDefaults,items:c.items.concat(l.items)}}finally{this.completionParticipants=o}}doComplete(e,n,r,i){this.offset=e.offsetAt(n),this.position=n,this.currentWord=dm(e,this.offset),this.defaultReplaceRange=Z.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=r,this.documentSettings=i;try{const s={isIncomplete:!1,itemDefaults:{editRange:{start:{line:n.line,character:n.character-this.currentWord.length},end:n}},items:[]};this.nodePath=Yi(this.styleSheet,this.offset);for(let a=this.nodePath.length-1;a>=0;a--){const o=this.nodePath[a];if(o instanceof Zi)this.getCompletionsForDeclarationProperty(o.getParent(),s);else if(o instanceof vc)o.parent instanceof fi?this.getVariableProposals(null,s):this.getCompletionsForExpression(o,s);else if(o instanceof qt){const l=o.findAParent(v.ExtendsReference,v.Ruleset);if(l)if(l.type===v.ExtendsReference)this.getCompletionsForExtendsReference(l,o,s);else{const c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(o instanceof Xt)this.getCompletionsForFunctionArgument(o,o.getParent(),s);else if(o instanceof Qi)this.getCompletionsForDeclarations(o,s);else if(o instanceof Cr)this.getCompletionsForVariableDeclaration(o,s);else if(o instanceof kt)this.getCompletionsForRuleSet(o,s);else if(o instanceof fi)this.getCompletionsForInterpolation(o,s);else if(o instanceof or)this.getCompletionsForFunctionDeclaration(o,s);else if(o instanceof lr)this.getCompletionsForMixinReference(o,s);else if(o instanceof Nn)this.getCompletionsForFunctionArgument(null,o,s);else if(o instanceof mi)this.getCompletionsForSupports(o,s);else if(o instanceof mn)this.getCompletionsForSupportsCondition(o,s);else if(o instanceof wn)this.getCompletionsForExtendsReference(o,null,s);else if(o.type===v.URILiteral)this.getCompletionForUriLiteralValue(o,s);else if(o.parent===null)this.getCompletionForTopLevel(s);else if(o.type===v.StringLiteral&&this.isImportPathParent(o.parent.type))this.getCompletionForImportPath(o,s);else continue;if(s.items.length>0||this.offset>o.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}}isImportPathParent(e){return e===v.Import}finalize(e){return e}findInNodePath(...e){for(let n=this.nodePath.length-1;n>=0;n--){const r=this.nodePath[n];if(e.indexOf(r.type)!==-1)return r}return null}getCompletionsForDeclarationProperty(e,n){return this.getPropertyProposals(e,n)}getPropertyProposals(e,n){const r=this.isTriggerPropertyValueCompletionEnabled,i=this.isCompletePropertyWithSemicolonEnabled;return this.cssDataManager.getProperties().forEach(a=>{let o,l,c=!1;e?(o=this.getCompletionRange(e.getProperty()),l=a.name,Ie(e.colonPosition)||(l+=": ",c=!0)):(o=this.getCompletionRange(null),l=a.name+": ",c=!0),!e&&i&&(l+="$0;"),e&&!e.semicolonPosition&&i&&this.offset>=this.textDocument.offsetAt(o.end)&&(l+="$0;");const d={label:a.name,documentation:ut(a,this.doesSupportMarkdown()),tags:on(a)?[yt.Deprecated]:[],textEdit:j.replace(o,l),insertTextFormat:Fe.Snippet,kind:q.Property};a.restrictions||(c=!1),r&&c&&(d.command=Dl);const m=(255-(typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50)).toString(16),f=pe(a.name,"-")?$e.VendorPrefixed:$e.Normal;d.sortText=f+"_"+m,n.items.push(d)}),this.completionParticipants.forEach(a=>{a.onCssProperty&&a.onCssProperty({propertyName:this.currentWord,range:this.defaultReplaceRange})}),n}get isTriggerPropertyValueCompletionEnabled(){return this.documentSettings?.triggerPropertyValueCompletion??!0}get isCompletePropertyWithSemicolonEnabled(){return this.documentSettings?.completePropertyWithSemicolon??!0}getCompletionsForDeclarationValue(e,n){const r=e.getFullPropertyName(),i=this.cssDataManager.getProperty(r);let s=e.getValue()||null;for(;s&&s.hasChildren();)s=s.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(a=>{a.onCssPropertyValue&&a.onCssPropertyValue({propertyName:r,propertyValue:this.currentWord,range:this.getCompletionRange(s)})}),i){if(i.restrictions)for(const a of i.restrictions)switch(a){case"color":this.getColorProposals(i,s,n);break;case"position":this.getPositionProposals(i,s,n);break;case"repeat":this.getRepeatStyleProposals(i,s,n);break;case"line-style":this.getLineStyleProposals(i,s,n);break;case"line-width":this.getLineWidthProposals(i,s,n);break;case"geometry-box":this.getGeometryBoxProposals(i,s,n);break;case"box":this.getBoxProposals(i,s,n);break;case"image":this.getImageProposals(i,s,n);break;case"timing-function":this.getTimingFunctionProposals(i,s,n);break;case"shape":this.getBasicShapeProposals(i,s,n);break}this.getValueEnumProposals(i,s,n),this.getCSSWideKeywordProposals(i,s,n),this.getUnitProposals(i,s,n)}else{const a=lm(this.styleSheet,e);for(const o of a.getEntries())n.items.push({label:o,textEdit:j.replace(this.getCompletionRange(s),o),kind:q.Value})}return this.getVariableProposals(s,n),this.getTermProposals(i,s,n),n}getValueEnumProposals(e,n,r){if(e.values)for(const i of e.values){let s=i.name,a;if(pc(s,")")){const c=s.lastIndexOf("(");c!==-1&&(s=s.substring(0,c+1)+"$1"+s.substring(c+1),a=Xe)}let o=$e.Enums;pe(i.name,"-")&&(o+=$e.VendorPrefixed);const l={label:i.name,documentation:ut(i,this.doesSupportMarkdown()),tags:on(e)?[yt.Deprecated]:[],textEdit:j.replace(this.getCompletionRange(n),s),sortText:o,kind:q.Value,insertTextFormat:a};r.items.push(l)}return r}getCSSWideKeywordProposals(e,n,r){for(const i in kl)r.items.push({label:i,documentation:kl[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});for(const i in _l){const s=Pt(i);r.items.push({label:i,documentation:_l[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:Xe,command:pe(i,"var")?Dl:void 0})}return r}getCompletionsForInterpolation(e,n){return this.offset>=e.offset+2&&this.getVariableProposals(null,n),n}getVariableProposals(e,n){const r=this.getSymbolContext().findSymbolsAtOffset(this.offset,K.Variable);for(const i of r){const s=pe(i.name,"--")?`var(${i.name})`:i.name,a={label:i.name,documentation:i.value?wo(i.value):i.value,textEdit:j.replace(this.getCompletionRange(e),s),kind:q.Variable,sortText:$e.Variable};if(typeof a.documentation=="string"&&gl(a.documentation)&&(a.kind=q.Color),i.node.type===v.FunctionParameter){const o=i.node.getParent();o.type===v.MixinDeclaration&&(a.detail=w("argument from '{0}'",o.getName()))}n.items.push(a)}return n}getVariableProposalsForCSSVarFunction(e){const n=new Ai;this.styleSheet.acceptVisitor(new hm(n,this.offset));let r=this.getSymbolContext().findSymbolsAtOffset(this.offset,K.Variable);for(const i of r){if(pe(i.name,"--")){const s={label:i.name,documentation:i.value?wo(i.value):i.value,textEdit:j.replace(this.getCompletionRange(null),i.name),kind:q.Variable};typeof s.documentation=="string"&&gl(s.documentation)&&(s.kind=q.Color),e.items.push(s)}n.remove(i.name)}for(const i of n.getEntries())if(pe(i,"--")){const s={label:i,textEdit:j.replace(this.getCompletionRange(null),i),kind:q.Variable};e.items.push(s)}return e}getUnitProposals(e,n,r){let i="0";if(this.currentWord.length>0){const s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(i=s[0],r.isIncomplete=i.length===this.currentWord.length)}else this.currentWord.length===0&&(r.isIncomplete=!0);if(n&&n.parent&&n.parent.type===v.Term&&(n=n.getParent()),e.restrictions)for(const s of e.restrictions){const a=_c[s];if(a)for(const o of a){const l=i+o;r.items.push({label:l,textEdit:j.replace(this.getCompletionRange(n),l),kind:q.Unit})}}return r}getCompletionRange(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){const n=e.end!==-1?this.textDocument.positionAt(e.end):this.position,r=this.textDocument.positionAt(e.offset);if(r.line===n.line)return Z.create(r,n)}return this.defaultReplaceRange}getColorProposals(e,n,r){for(const s in gr)r.items.push({label:s,documentation:gr[s],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Color});for(const s in Li)r.items.push({label:s,documentation:Li[s],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Value});const i=new Ai;this.styleSheet.acceptVisitor(new cm(i,this.offset));for(const s of i.getEntries())r.items.push({label:s,textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Color});for(const s of Tp)r.items.push({label:s.label,detail:s.func,documentation:s.desc,textEdit:j.replace(this.getCompletionRange(n),s.insertText),insertTextFormat:Xe,kind:q.Function});return r}getPositionProposals(e,n,r){for(const i in vl)r.items.push({label:i,documentation:vl[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getRepeatStyleProposals(e,n,r){for(const i in yl)r.items.push({label:i,documentation:yl[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getLineStyleProposals(e,n,r){for(const i in xl)r.items.push({label:i,documentation:xl[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getLineWidthProposals(e,n,r){for(const i of Jp)r.items.push({label:i,textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getGeometryBoxProposals(e,n,r){for(const i in Cl)r.items.push({label:i,documentation:Cl[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getBoxProposals(e,n,r){for(const i in Sl)r.items.push({label:i,documentation:Sl[i],textEdit:j.replace(this.getCompletionRange(n),i),kind:q.Value});return r}getImageProposals(e,n,r){for(const i in El){const s=Pt(i);r.items.push({label:i,documentation:El[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?Xe:void 0})}return r}getTimingFunctionProposals(e,n,r){for(const i in Fl){const s=Pt(i);r.items.push({label:i,documentation:Fl[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?Xe:void 0})}return r}getBasicShapeProposals(e,n,r){for(const i in Rl){const s=Pt(i);r.items.push({label:i,documentation:Rl[i],textEdit:j.replace(this.getCompletionRange(n),s),kind:q.Function,insertTextFormat:i!==s?Xe:void 0})}return r}getCompletionsForStylesheet(e){const n=this.styleSheet.findFirstChildBeforeOffset(this.offset);return n?n instanceof kt?this.getCompletionsForRuleSet(n,e):n instanceof mi?this.getCompletionsForSupports(n,e):e:this.getCompletionForTopLevel(e)}getCompletionForTopLevel(e){return this.cssDataManager.getAtDirectives().forEach(n=>{e.items.push({label:n.name,textEdit:j.replace(this.getCompletionRange(null),n.name),documentation:ut(n,this.doesSupportMarkdown()),tags:on(n)?[yt.Deprecated]:[],kind:q.Keyword})}),this.getCompletionsForSelector(null,!1,e),e}getCompletionsForRuleSet(e,n){const r=e.getDeclarations();return r&&r.endsWith("}")&&this.offset>=r.end?this.getCompletionForTopLevel(n):!r||this.offset<=r.offset?this.getCompletionsForSelector(e,e.isNested(),n):this.getCompletionsForDeclarations(e.getDeclarations(),n)}getCompletionsForSelector(e,n,r){const i=this.findInNodePath(v.PseudoSelector,v.IdentifierSelector,v.ClassSelector,v.ElementNameSelector);if(!i&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=Z.create(ye.create(this.position.line,this.position.character-this.currentWord.length),this.position)),this.cssDataManager.getPseudoClasses().forEach(c=>{const d=Pt(c.name),u={label:c.name,textEdit:j.replace(this.getCompletionRange(i),d),documentation:ut(c,this.doesSupportMarkdown()),tags:on(c)?[yt.Deprecated]:[],kind:q.Function,insertTextFormat:c.name!==d?Xe:void 0};pe(c.name,":-")&&(u.sortText=$e.VendorPrefixed),r.items.push(u)}),this.cssDataManager.getPseudoElements().forEach(c=>{const d=Pt(c.name),u={label:c.name,textEdit:j.replace(this.getCompletionRange(i),d),documentation:ut(c,this.doesSupportMarkdown()),tags:on(c)?[yt.Deprecated]:[],kind:q.Function,insertTextFormat:c.name!==d?Xe:void 0};pe(c.name,"::-")&&(u.sortText=$e.VendorPrefixed),r.items.push(u)}),!n){for(const c of Xp)r.items.push({label:c,textEdit:j.replace(this.getCompletionRange(i),c),kind:q.Keyword});for(const c of Yp)r.items.push({label:c,textEdit:j.replace(this.getCompletionRange(i),c),kind:q.Keyword})}const o={};o[this.currentWord]=!0;const l=this.textDocument.getText();if(this.styleSheet.accept(c=>{if(c.type===v.SimpleSelector&&c.length>0){const d=l.substr(c.offset,c.length);return d.charAt(0)==="."&&!o[d]&&(o[d]=!0,r.items.push({label:d,textEdit:j.replace(this.getCompletionRange(i),d),kind:q.Keyword})),!1}return!0}),e&&e.isNested()){const c=e.getSelectors().findFirstChildBeforeOffset(this.offset);c&&e.getSelectors().getChildren().indexOf(c)===0&&this.getPropertyProposals(null,r)}return r}getCompletionsForDeclarations(e,n){if(!e||this.offset===e.offset)return n;const r=e.findFirstChildBeforeOffset(this.offset);if(!r)return this.getCompletionsForDeclarationProperty(null,n);if(r instanceof Ki){const i=r;if(!Ie(i.colonPosition)||this.offset<=i.colonPosition)return this.getCompletionsForDeclarationProperty(i,n);if(Ie(i.semicolonPosition)&&i.semicolonPositione.colonPosition&&this.getVariableProposals(e.getValue()||null,n),n}getCompletionsForExpression(e,n){const r=e.getParent();if(r instanceof Xt)return this.getCompletionsForFunctionArgument(r,r.getParent(),n),n;const i=e.findParent(v.Declaration);if(!i)return this.getTermProposals(void 0,null,n),n;const s=e.findChildAtOffset(this.offset,!0);return s?s instanceof is||s instanceof Pe?this.getCompletionsForDeclarationValue(i,n):n:this.getCompletionsForDeclarationValue(i,n)}getCompletionsForFunctionArgument(e,n,r){const i=n.getIdentifier();return i&&i.matches("var")&&(!n.getArguments().hasChildren()||n.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(r),r}getCompletionsForFunctionDeclaration(e,n){const r=e.getDeclarations();return r&&this.offset>r.offset&&this.offset{s.onCssMixinReference&&s.onCssMixinReference({mixinName:this.currentWord,range:this.getCompletionRange(i)})}),n}getTermProposals(e,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,K.Function);for(const s of i)s.node instanceof or&&r.items.push(this.makeTermProposal(s,s.node.getParameters(),n));return r}makeTermProposal(e,n,r){e.node;const i=n.getChildren().map(a=>a instanceof Sr?a.getName():a.getText()),s=e.name+"("+i.map((a,o)=>"${"+(o+1)+":"+a+"}").join(", ")+")";return{label:e.name,detail:e.name+"("+i.join(", ")+")",textEdit:j.replace(this.getCompletionRange(r),s),insertTextFormat:Xe,kind:q.Function,sortText:$e.Term}}getCompletionsForSupportsCondition(e,n){const r=e.findFirstChildBeforeOffset(this.offset);if(r){if(r instanceof Te)return!Ie(r.colonPosition)||this.offset<=r.colonPosition?this.getCompletionsForDeclarationProperty(r,n):this.getCompletionsForDeclarationValue(r,n);if(r instanceof mn)return this.getCompletionsForSupportsCondition(r,n)}return Ie(e.lParent)&&this.offset>e.lParent&&(!Ie(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,n):n}getCompletionsForSupports(e,n){const r=e.getDeclarations();if(!r||this.offset<=r.offset){const s=e.findFirstChildBeforeOffset(this.offset);return s instanceof mn?this.getCompletionsForSupportsCondition(s,n):n}return this.getCompletionForTopLevel(n)}getCompletionsForExtendsReference(e,n,r){return r}getCompletionForUriLiteralValue(e,n){let r,i,s;if(e.hasChildren()){const a=e.getChild(0);r=a.getText(),i=this.position,s=this.getCompletionRange(a)}else{r="",i=this.position;const a=this.textDocument.positionAt(e.offset+4);s=Z.create(a,a)}return this.completionParticipants.forEach(a=>{a.onCssURILiteralValue&&a.onCssURILiteralValue({uriValue:r,position:i,range:s})}),n}getCompletionForImportPath(e,n){return this.completionParticipants.forEach(r=>{r.onCssImportPath&&r.onCssImportPath({pathValue:e.getText(),position:this.position,range:this.getCompletionRange(e)})}),n}hasCharacterAtPosition(e,n){const r=this.textDocument.getText();return e>=0&&e=0&&` +\r":{[()]},*>+`.indexOf(r.charAt(n))===-1;)n--;return r.substring(n+1,e)}let cs=class zi{constructor(){this.parent=null,this.children=null,this.attributes=null}findAttribute(e){if(this.attributes){for(const n of this.attributes)if(n.name===e)return n.value}return null}addChild(e){e instanceof zi&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)}append(e){if(this.attributes){const n=this.attributes[this.attributes.length-1];n.value=n.value+e}}prepend(e){if(this.attributes){const n=this.attributes[0];n.value=e+n.value}}findRoot(){let e=this;for(;e.parent&&!(e.parent instanceof Qt);)e=e.parent;return e}removeChild(e){if(this.children){const n=this.children.indexOf(e);if(n!==-1)return this.children.splice(n,1),!0}return!1}addAttr(e,n){this.attributes||(this.attributes=[]);for(const r of this.attributes)if(r.name===e){r.value+=" "+n;return}this.attributes.push({name:e,value:n})}clone(e=!0){const n=new zi;if(this.attributes){n.attributes=[];for(const r of this.attributes)n.addAttr(r.name,r.value)}if(e&&this.children){n.children=[];for(let r=0;r"),this.writeLine(n,i.join(""))}}var tt;(function(t){function e(r,i){return i+n(r)+i}t.ensure=e;function n(r){const i=r.match(/^['"](.*)["']$/);return i?i[1]:r}t.remove=n})(tt||(tt={}));class Wr{constructor(){this.id=0,this.attr=0,this.tag=0}}function Ic(t,e){let n=new cs;for(const r of t.getChildren())switch(r.type){case v.SelectorCombinator:if(e){const o=r.getText().split("&");if(o.length===1){n.addAttr("name",o[0]);break}n=e.cloneWithParent(),o[0]&&n.findRoot().prepend(o[0]);for(let l=1;l1){const c=e.cloneWithParent();n.addChild(c.findRoot()),n=c}n.append(o[l])}}break;case v.SelectorPlaceholder:if(r.matches("@at-root"))return n;case v.ElementNameSelector:const i=r.getText();n.addAttr("name",i==="*"?"element":Ne(i));break;case v.ClassSelector:n.addAttr("class",Ne(r.getText().substring(1)));break;case v.IdentifierSelector:n.addAttr("id",Ne(r.getText().substring(1)));break;case v.MixinDeclaration:n.addAttr("class",r.getName());break;case v.PseudoSelector:n.addAttr(Ne(r.getText()),"");break;case v.AttributeSelector:const s=r,a=s.getIdentifier();if(a){const o=s.getValue(),l=s.getOperator();let c;if(o&&l)switch(Ne(l.getText())){case"|=":c=`${tt.remove(Ne(o.getText()))}-…`;break;case"^=":c=`${tt.remove(Ne(o.getText()))}…`;break;case"$=":c=`…${tt.remove(Ne(o.getText()))}`;break;case"~=":c=` … ${tt.remove(Ne(o.getText()))} … `;break;case"*=":c=`…${tt.remove(Ne(o.getText()))}…`;break;default:c=tt.remove(Ne(o.getText()));break}n.addAttr(Ne(a.getText()),c)}break}return n}function Ne(t){const e=new Fn;e.setSource(t);const n=e.scanUnquotedString();return n?n.text:t}class um{constructor(e){this.cssDataManager=e}selectorToMarkedString(e,n){const r=fm(e);if(r){const i=new Il('"').print(r,n);return i.push(this.selectorToSpecificityMarkedString(e)),i}else return[]}simpleSelectorToMarkedString(e){const n=Ic(e),r=new Il('"').print(n);return r.push(this.selectorToSpecificityMarkedString(e)),r}isPseudoElementIdentifier(e){const n=e.match(/^::?([\w-]+)/);return n?!!this.cssDataManager.getPseudoElement("::"+n[1]):!1}selectorToSpecificityMarkedString(e){const n=s=>{const a=new Wr;let o=new Wr;for(const l of s)for(const c of l.getChildren()){const d=r(c);if(d.id>o.id){o=d;continue}else if(d.ido.attr){o=d;continue}else if(d.attro.tag){o=d;continue}}return a.id+=o.id,a.attr+=o.attr,a.tag+=o.tag,a},r=s=>{const a=new Wr;e:for(const o of s.getChildren()){switch(o.type){case v.IdentifierSelector:a.id++;break;case v.ClassSelector:case v.AttributeSelector:a.attr++;break;case v.ElementNameSelector:if(o.matches("*"))break;a.tag++;break;case v.PseudoSelector:const l=o.getText(),c=o.getChildren();if(this.isPseudoElementIdentifier(l)){if(l.match(/^::slotted/i)&&c.length>0){a.tag++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}a.tag++;continue e}if(l.match(/^:where/i))continue e;if(l.match(/^:(?:not|has|is)/i)&&c.length>0){let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:host|host-context)/i)&&c.length>0){a.attr++;let d=n(c);a.id+=d.id,a.attr+=d.attr,a.tag+=d.tag;continue e}if(l.match(/^:(?:nth-child|nth-last-child)/i)&&c.length>0){if(a.attr++,c.length===3&&c[1].type===23){let g=n(c[2].getChildren());a.id+=g.id,a.attr+=g.attr,a.tag+=g.tag;continue e}const d=new kr,u=c[1].getText();d.scanner.setSource(u);const m=d.scanner.scan(),f=d.scanner.scan();if(m.text==="n"||m.text==="-n"&&f.text==="of"){const g=[],k=u.slice(f.offset+2).split(",");for(const R of k){const E=d.internalParse(R,d._parseSelector);E&&g.push(E)}let F=n(g);a.id+=F.id,a.attr+=F.attr,a.tag+=F.tag;continue e}continue e}a.attr++;continue e}if(o.getChildren().length>0){const l=r(o);a.id+=l.id,a.attr+=l.attr,a.tag+=l.tag}}return a},i=r(e);return`[${w("Selector Specificity")}](https://developer.mozilla.org/docs/Web/CSS/Specificity): (${i.id}, ${i.attr}, ${i.tag})`}}class pm{constructor(e){this.prev=null,this.element=e}processSelector(e){let n=null;if(!(this.element instanceof Qt)&&e.getChildren().some(r=>r.hasChildren()&&r.getChild(0).type===v.SelectorCombinator)){const r=this.element.findRoot();r.parent instanceof Qt&&(n=this.element,this.element=r.parent,this.element.removeChild(r),this.prev=null)}for(const r of e.getChildren()){if(r instanceof qt){if(this.prev instanceof qt){const a=new Pi("…");this.element.addChild(a),this.element=a}else this.prev&&(this.prev.matches("+")||this.prev.matches("~"))&&this.element.parent&&(this.element=this.element.parent);this.prev&&this.prev.matches("~")&&this.element.addChild(new Pi("⋮"));const i=Ic(r,n),s=i.findRoot();this.element.addChild(s),this.element=i}(r instanceof qt||r.type===v.SelectorCombinatorParent||r.type===v.SelectorCombinatorShadowPiercingDescendant||r.type===v.SelectorCombinatorSibling||r.type===v.SelectorCombinatorAllSiblings)&&(this.prev=r)}}}function mm(t){switch(t.type){case v.MixinDeclaration:case v.Stylesheet:return!0}return!1}function fm(t){if(t.matches("@at-root"))return null;const e=new Qt,n=[],r=t.getParent();if(r instanceof kt){let s=r.getParent();for(;s&&!mm(s);){if(s instanceof kt){if(s.getSelectors().matches("@at-root"))break;n.push(s)}s=s.getParent()}}const i=new pm(e);for(let s=n.length-1;s>=0;s--){const a=n[s].getSelectors().getChild(0);a&&i.processSelector(a)}return i.processSelector(t),e}class hs{constructor(e,n){this.clientCapabilities=e,this.cssDataManager=n,this.selectorPrinting=new um(n)}configure(e){this.defaultSettings=e}doHover(e,n,r,i=this.defaultSettings){function s(d){return Z.create(e.positionAt(d.offset),e.positionAt(d.end))}const a=e.offsetAt(n),o=Yi(r,a);let l=null,c;for(let d=0;dtypeof n=="string"?n:n.value):e.value}doesSupportMarkdown(){if(!Ie(this.supportsMarkdown)){if(!Ie(this.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;const e=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.hover;this.supportsMarkdown=e&&e.contentFormat&&Array.isArray(e.contentFormat)&&e.contentFormat.indexOf(qe.Markdown)!==-1}return this.supportsMarkdown}}const Ll=/^\w+:\/\//,Ml=/^data:/;class ds{constructor(e,n){this.fileSystemProvider=e,this.resolveModuleReferences=n}configure(e){this.defaultSettings=e}findDefinition(e,n,r){const i=new Mi(r),s=e.offsetAt(n),a=pi(r,s);if(!a)return null;const o=i.findSymbolFromNode(a);return o?{uri:e.uri,range:Ke(o.node,e)}:null}findReferences(e,n,r){return this.findDocumentHighlights(e,n,r).map(s=>({uri:e.uri,range:s.range}))}getHighlightNode(e,n,r){const i=e.offsetAt(n);let s=pi(r,i);if(!(!s||s.type===v.Stylesheet||s.type===v.Declarations))return s.type===v.Identifier&&s.parent&&s.parent.type===v.ClassSelector&&(s=s.parent),s}findDocumentHighlights(e,n,r){const i=[],s=this.getHighlightNode(e,n,r);if(!s)return i;const a=new Mi(r),o=a.findSymbolFromNode(s),l=s.getText();return r.accept(c=>{if(o){if(a.matchesSymbol(c,o))return i.push({kind:zl(c),range:Ke(c,e)}),!1}else s&&s.type===c.type&&c.matches(l)&&i.push({kind:zl(c),range:Ke(c,e)});return!0}),i}isRawStringDocumentLinkNode(e){return e.type===v.Import}findDocumentLinks(e,n,r){const i=this.findUnresolvedLinks(e,n),s=[];for(let a of i){const o=a.link,l=o.target;if(!(!l||Ml.test(l)))if(Ll.test(l))s.push(o);else{const c=r.resolveReference(l,e.uri);c&&(o.target=c),s.push(o)}}return s}async findDocumentLinks2(e,n,r){const i=this.findUnresolvedLinks(e,n),s=[];for(let a of i){const o=a.link,l=o.target;if(!(!l||Ml.test(l)))if(Ll.test(l))s.push(o);else{const c=await this.resolveReference(l,e.uri,r,a.isRawLink);c!==void 0&&(o.target=c,s.push(o))}}return s}findUnresolvedLinks(e,n){const r=[],i=s=>{let a=s.getText();const o=Ke(s,e);if(o.start.line===o.end.line&&o.start.character===o.end.character)return;(pe(a,"'")||pe(a,'"'))&&(a=a.slice(1,-1));const l=s.parent?this.isRawStringDocumentLinkNode(s.parent):!1;r.push({link:{target:a,range:o},isRawLink:l})};return n.accept(s=>{if(s.type===v.URILiteral){const a=s.getChild(0);return a&&i(a),!1}if(s.parent&&this.isRawStringDocumentLinkNode(s.parent)){const a=s.getText();return(pe(a,"'")||pe(a,'"'))&&i(s),!1}return!0}),r}findSymbolInformations(e,n){const r=[],i=(s,a,o)=>{const l=o instanceof W?Ke(o,e):o,c={name:s||w(""),kind:a,location:yn.create(e.uri,l)};r.push(c)};return this.collectDocumentSymbols(e,n,i),r}findDocumentSymbols(e,n){const r=[],i=[],s=(a,o,l,c,d)=>{const u=l instanceof W?Ke(l,e):l;let m=c instanceof W?Ke(c,e):c;(!m||!Al(u,m))&&(m=Z.create(u.start,u.start));const f={name:a||w(""),kind:o,range:u,selectionRange:m};let g=i.pop();for(;g&&!Al(g[1],u);)g=i.pop();if(g){const b=g[0];b.children||(b.children=[]),b.children.push(f),i.push(g)}else r.push(f);d&&i.push([f,Ke(d,e)])};return this.collectDocumentSymbols(e,n,s),r}collectDocumentSymbols(e,n,r){n.accept(i=>{if(i instanceof kt){for(const s of i.getSelectors().getChildren())if(s instanceof Rn){const a=Z.create(e.positionAt(s.offset),e.positionAt(i.end));r(s.getText(),Ze.Class,a,s,i.getDeclarations())}}else if(i instanceof Cr)r(i.getName(),Ze.Variable,i,i.getVariable(),void 0);else if(i instanceof vn)r(i.getName(),Ze.Method,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof or)r(i.getName(),Ze.Function,i,i.getIdentifier(),i.getDeclarations());else if(i instanceof gc){const s=w("@keyframes {0}",i.getName());r(s,Ze.Class,i,i.getIdentifier(),i.getDeclarations())}else if(i instanceof mc){const s=w("@font-face");r(s,Ze.Class,i,void 0,i.getDeclarations())}else if(i instanceof ts){const s=i.getChild(0);if(s instanceof bc){const a="@media "+s.getText();r(a,Ze.Module,i,s,i.getDeclarations())}}return!0})}findDocumentColors(e,n){const r=[];return n.accept(i=>{const s=gm(i,e);return s&&r.push(s),!0}),r}getColorPresentations(e,n,r,i){const s=[],a=Math.round(r.red*255),o=Math.round(r.green*255),l=Math.round(r.blue*255);let c;r.alpha===1?c=`rgb(${a}, ${o}, ${l})`:c=`rgba(${a}, ${o}, ${l}, ${r.alpha})`,s.push({label:c,textEdit:j.replace(i,c)}),r.alpha===1?c=`#${bt(a)}${bt(o)}${bt(l)}`:c=`#${bt(a)}${bt(o)}${bt(l)}${bt(Math.round(r.alpha*255))}`,s.push({label:c,textEdit:j.replace(i,c)});const d=kc(r);d.a===1?c=`hsl(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%)`:c=`hsla(${d.h}, ${Math.round(d.s*100)}%, ${Math.round(d.l*100)}%, ${d.a})`,s.push({label:c,textEdit:j.replace(i,c)});const u=Hp(r);return u.a===1?c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}%)`:c=`hwb(${u.h} ${Math.round(u.w*100)}% ${Math.round(u.b*100)}% / ${u.a})`,s.push({label:c,textEdit:j.replace(i,c)}),s}prepareRename(e,n,r){const i=this.getHighlightNode(e,n,r);if(i)return Z.create(e.positionAt(i.offset),e.positionAt(i.end))}doRename(e,n,r,i){const a=this.findDocumentHighlights(e,n,i).map(o=>j.replace(o.range,r));return{changes:{[e.uri]:a}}}async resolveModuleReference(e,n,r){if(pe(n,"file://")){const i=bm(e);if(i&&i!=="."&&i!==".."){const s=r.resolveReference("/",n),a=Tr(n),o=await this.resolvePathToModule(i,a,s);if(o){const l=e.substring(i.length+1);return Ot(o,l)}}}}async mapReference(e,n){return e}async resolveReference(e,n,r,i=!1,s=this.defaultSettings){if(e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider)return e=e.substring(1),this.mapReference(await this.resolveModuleReference(e,n,r),i);const a=await this.mapReference(r.resolveReference(e,n),i);if(this.resolveModuleReferences){if(a&&await this.fileExists(a))return a;const o=await this.mapReference(await this.resolveModuleReference(e,n,r),i);if(o)return o}if(a&&!await this.fileExists(a)){const o=r.resolveReference("/",n);if(s&&o){if(e in s)return this.mapReference(Ot(o,s[e]),i);const l=e.indexOf("/"),c=`${e.substring(0,l)}/`;if(c in s){const d=s[c].slice(0,-1);let u=Ot(o,d);return this.mapReference(u=Ot(u,e.substring(c.length-1)),i)}}}return a}async resolvePathToModule(e,n,r){const i=Ot(n,"node_modules",e,"package.json");if(await this.fileExists(i))return Tr(i);if(r&&n.startsWith(r)&&n.length!==r.length)return this.resolvePathToModule(e,Tr(n),r)}async fileExists(e){if(!this.fileSystemProvider)return!1;try{const n=await this.fileSystemProvider.stat(e);return!(n.type===Cn.Unknown&&n.size===-1)}catch{return!1}}}function gm(t,e){const n=Gp(t);if(n){const r=Ke(t,e);return{color:n,range:r}}return null}function Ke(t,e){return Z.create(e.positionAt(t.offset),e.positionAt(t.end))}function Al(t,e){const n=e.start.line,r=e.end.line,i=t.start.line,s=t.end.line;return!(ns||r>s||n===i&&e.start.charactert.end.character)}function zl(t){if(t.type===v.Selector||t instanceof Pe&&t.parent&&t.parent instanceof Zi&&t.isCustomProperty)return $t.Write;if(t.parent)switch(t.parent.type){case v.FunctionDeclaration:case v.MixinDeclaration:case v.Keyframe:case v.VariableDeclaration:case v.FunctionParameter:return $t.Write}return $t.Read}function bt(t){const e=t.toString(16);return e.length!==2?"0"+e:e}function bm(t){const e=t.indexOf("/");if(e===-1)return"";if(t[0]==="@"){const n=t.indexOf("/",e+1);return n===-1?t:t.substring(0,n)}return t.substring(0,e)}const Tt=Re.Warning,Pl=Re.Error,Oe=Re.Ignore;class me{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}}class wm{constructor(e,n,r){this.id=e,this.message=n,this.defaultValue=r}}const ne={AllVendorPrefixes:new me("compatibleVendorPrefixes",w("When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Oe),IncludeStandardPropertyWhenUsingVendorPrefix:new me("vendorPrefix",w("When using a vendor-specific prefix also include the standard property"),Tt),DuplicateDeclarations:new me("duplicateProperties",w("Do not use duplicate style definitions"),Oe),EmptyRuleSet:new me("emptyRules",w("Do not use empty rulesets"),Tt),ImportStatemement:new me("importStatement",w("Import statements do not load in parallel"),Oe),BewareOfBoxModelSize:new me("boxModel",w("Do not use width or height when using padding or border"),Oe),UniversalSelector:new me("universalSelector",w("The universal selector (*) is known to be slow"),Oe),ZeroWithUnit:new me("zeroUnits",w("No unit for zero needed"),Oe),RequiredPropertiesForFontFace:new me("fontFaceProperties",w("@font-face rule must define 'src' and 'font-family' properties"),Tt),HexColorLength:new me("hexColorLength",w("Hex colors must consist of three, four, six or eight hex numbers"),Pl),ArgsInColorFunction:new me("argumentsInColorFunction",w("Invalid number of parameters"),Pl),UnknownProperty:new me("unknownProperties",w("Unknown property."),Tt),UnknownAtRules:new me("unknownAtRules",w("Unknown at-rule."),Tt),IEStarHack:new me("ieHack",w("IE hacks are only necessary when supporting IE7 and older"),Oe),UnknownVendorSpecificProperty:new me("unknownVendorSpecificProperties",w("Unknown vendor specific property."),Oe),PropertyIgnoredDueToDisplay:new me("propertyIgnoredDueToDisplay",w("Property is ignored due to the display."),Tt),AvoidImportant:new me("important",w("Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Oe),AvoidFloat:new me("float",w("Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Oe),AvoidIdSelector:new me("idSelector",w("Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Oe)},vm={ValidProperties:new wm("validProperties",w("A list of properties that are not validated against the `unknownProperties` rule."),[])};class ym{constructor(e={}){this.conf=e}getRule(e){if(this.conf.hasOwnProperty(e.id)){const n=xm(this.conf[e.id]);if(n)return n}return e.defaultValue}getSetting(e){return this.conf[e.id]}}function xm(t){switch(t){case"ignore":return Re.Ignore;case"warning":return Re.Warning;case"error":return Re.Error}return null}class us{constructor(e){this.cssDataManager=e}doCodeActions(e,n,r,i){return this.doCodeActions2(e,n,r,i).map(s=>{const a=s.edit&&s.edit.documentChanges&&s.edit.documentChanges[0];return _t.create(s.title,"_css.applyCodeAction",e.uri,e.version,a&&a.edits)})}doCodeActions2(e,n,r,i){const s=[];if(r.diagnostics)for(const a of r.diagnostics)this.appendFixesForMarker(e,i,a,s);return s}getFixesForUnknownProperty(e,n,r,i){const s=n.getName(),a=[];this.cssDataManager.getProperties().forEach(l=>{const c=Ju(s,l.name);c>=s.length/2&&a.push({property:l.name,score:c})}),a.sort((l,c)=>c.score-l.score||l.property.localeCompare(c.property));let o=3;for(const l of a){const c=l.property,d=w("Rename to '{0}'",c),u=j.replace(r.range,c),m=ki.create(e.uri,e.version),f={documentChanges:[ur.create(m,[u])]},g=Fi.create(d,f,Ei.QuickFix);if(g.diagnostics=[r],i.push(g),--o<=0)return}}appendFixesForMarker(e,n,r,i){if(r.code!==ne.UnknownProperty.id)return;const s=e.offsetAt(r.range.start),a=e.offsetAt(r.range.end),o=Yi(n,s);for(let l=o.length-1;l>=0;l--){const c=o[l];if(c instanceof Te){const d=c.getProperty();if(d&&d.offset===s&&d.end===a){this.getFixesForUnknownProperty(e,d,r,i);return}}}}}class Sm{constructor(e){this.fullPropertyName=e.getFullPropertyName().toLowerCase(),this.node=e}}function cn(t,e,n,r){const i=t[e];i.value=n,n&&(Ec(i.properties,r)||i.properties.push(r))}function Cm(t,e,n){cn(t,"top",e,n),cn(t,"right",e,n),cn(t,"bottom",e,n),cn(t,"left",e,n)}function be(t,e,n,r){e==="top"||e==="right"||e==="bottom"||e==="left"?cn(t,e,n,r):Cm(t,n,r)}function Vr(t,e,n){switch(e.length){case 1:be(t,void 0,e[0],n);break;case 2:be(t,"top",e[0],n),be(t,"bottom",e[0],n),be(t,"right",e[1],n),be(t,"left",e[1],n);break;case 3:be(t,"top",e[0],n),be(t,"right",e[1],n),be(t,"left",e[1],n),be(t,"bottom",e[2],n);break;case 4:be(t,"top",e[0],n),be(t,"right",e[1],n),be(t,"bottom",e[2],n),be(t,"left",e[3],n);break}}function Ti(t,e){for(let n of e)if(t.matches(n))return!0;return!1}function kn(t,e=!0){return e&&Ti(t,["initial","unset"])?!1:parseFloat(t.getText())!==0}function Tl(t,e=!0){return t.map(n=>kn(n,e))}function wr(t,e=!0){return!(Ti(t,["none","hidden"])||e&&Ti(t,["initial","unset"]))}function km(t,e=!0){return t.map(n=>wr(n,e))}function _m(t){const e=t.getChildren();if(e.length===1){const n=e[0];return kn(n)&&wr(n)}for(const n of e){const r=n;if(!kn(r,!1)||!wr(r,!1))return!1}return!0}function Em(t){const e={top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};for(const n of t){const r=n.node.value;if(!(typeof r>"u"))switch(n.fullPropertyName){case"box-sizing":return{top:{value:!1,properties:[]},right:{value:!1,properties:[]},bottom:{value:!1,properties:[]},left:{value:!1,properties:[]}};case"width":e.width=n;break;case"height":e.height=n;break;default:const i=n.fullPropertyName.split("-");switch(i[0]){case"border":switch(i[1]){case void 0:case"top":case"right":case"bottom":case"left":switch(i[2]){case void 0:be(e,i[1],_m(r),n);break;case"width":be(e,i[1],kn(r,!1),n);break;case"style":be(e,i[1],wr(r,!0),n);break}break;case"width":Vr(e,Tl(r.getChildren(),!1),n);break;case"style":Vr(e,km(r.getChildren(),!0),n);break}break;case"padding":i.length===1?Vr(e,Tl(r.getChildren(),!0),n):be(e,i[1],kn(r,!0),n);break}break}}return e}class Ol{constructor(){this.data={}}add(e,n,r){let i=this.data[e];i||(i={nodes:[],names:[]},this.data[e]=i),i.names.push(n),r&&i.nodes.push(r)}}class jt{static entries(e,n,r,i,s){const a=new jt(n,r,i);return e.acceptVisitor(a),a.completeValidations(),a.getEntries(s)}constructor(e,n,r){this.cssDataManager=r,this.warnings=[],this.settings=n,this.documentText=e.getText(),this.keyframes=new Ol,this.validProperties={};const i=n.getSetting(vm.ValidProperties);Array.isArray(i)&&i.forEach(s=>{if(typeof s=="string"){const a=s.trim().toLowerCase();a.length&&(this.validProperties[a]=!0)}})}isValidPropertyDeclaration(e){const n=e.fullPropertyName;return this.validProperties[n]}fetch(e,n){const r=[];for(const i of e)i.fullPropertyName===n&&r.push(i);return r}fetchWithValue(e,n,r){const i=[];for(const s of e)if(s.fullPropertyName===n){const a=s.node.getValue();a&&this.findValueInExpression(a,r)&&i.push(s)}return i}findValueInExpression(e,n){let r=!1;return e.accept(i=>(i.type===v.Identifier&&i.matches(n)&&(r=!0),!r)),r}getEntries(e=Re.Warning|Re.Error){return this.warnings.filter(n=>(n.getLevel()&e)!==0)}addEntry(e,n,r){const i=new xc(e,n,this.settings.getRule(n),r);this.warnings.push(i)}getMissingNames(e,n){const r=e.slice(0);for(let s=0;s0){const l=this.fetch(r,"float");for(let c=0;c0){const l=this.fetch(r,"vertical-align");for(let c=0;c1)for(let m=0;mO.startsWith(T))&&g.delete(R)}}const b=[];for(let F=0,R=jt.prefixes.length;Fs instanceof ns?(i+=1,!1):!0),i!==r&&this.addEntry(e,ne.ArgsInColorFunction)),!0}}jt.prefixes=["-ms-","-moz-","-o-","-webkit-"];class ps{constructor(e){this.cssDataManager=e}configure(e){this.settings=e}doValidation(e,n,r=this.settings){if(r&&r.validate===!1)return[];const i=[];i.push.apply(i,as.entries(n)),i.push.apply(i,jt.entries(n,e,new ym(r&&r.lint),this.cssDataManager));const s=[];for(const o in ne)s.push(ne[o].id);function a(o){const l=Z.create(e.positionAt(o.getOffset()),e.positionAt(o.getOffset()+o.getLength())),c=e.languageId;return{code:o.getRule().id,source:c,message:o.getMessage(),severity:o.getLevel()===Re.Warning?hr.Warning:hr.Error,range:l}}return i.filter(o=>o.getLevel()!==Re.Ignore).map(a)}}const Wl=47,Fm=10,Rm=13,Nm=12,Dm=36,Im=35,Lm=123,ln=61,Mm=33,Am=60,zm=62,$r=46;let it=p.CustomToken;const Oi=it++,vr=it++;it++;const Lc=it++,Mc=it++,Wi=it++,Vi=it++,Xn=it++;it++;class Ac extends Fn{scanNext(e){if(this.stream.advanceIfChar(Dm)){const n=["$"];if(this.ident(n))return this.finishToken(e,Oi,n.join(""));this.stream.goBackTo(e)}return this.stream.advanceIfChars([Im,Lm])?this.finishToken(e,vr):this.stream.advanceIfChars([ln,ln])?this.finishToken(e,Lc):this.stream.advanceIfChars([Mm,ln])?this.finishToken(e,Mc):this.stream.advanceIfChar(Am)?this.stream.advanceIfChar(ln)?this.finishToken(e,Vi):this.finishToken(e,p.Delim):this.stream.advanceIfChar(zm)?this.stream.advanceIfChar(ln)?this.finishToken(e,Wi):this.finishToken(e,p.Delim):this.stream.advanceIfChars([$r,$r,$r])?this.finishToken(e,Xn):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([Wl,Wl])?(this.stream.advanceWhileChar(e=>{switch(e){case Fm:case Rm:case Nm:return!1;default:return!0}}),!0):!1}}class Ur{constructor(e,n){this.id=e,this.message=n}}const Br={FromExpected:new Ur("scss-fromexpected",w("'from' expected")),ThroughOrToExpected:new Ur("scss-throughexpected",w("'through' or 'to' expected")),InExpected:new Ur("scss-fromexpected",w("'in' expected"))};class Pm extends kr{constructor(){super(new Ac)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(e)||super._parseStylesheetAtStatement(e):this._parseRuleset(!0)||this._parseVariableDeclaration()}_parseImport(){if(!this.peekKeyword("@import"))return null;const e=this.create(es);if(this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,S.URIOrStringExpected);for(;this.accept(p.Comma);)if(!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))return this.finish(e,S.URIOrStringExpected);return this._completeParseImport(e)}_parseVariableDeclaration(e=[]){if(!this.peek(Oi))return null;const n=this.create(Cr);if(!n.setVariable(this._parseVariable()))return null;if(!this.accept(p.Colon))return this.finish(n,S.ColonExpected);if(this.prevToken&&(n.colonPosition=this.prevToken.offset),!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);for(;this.peek(p.Exclamation);)if(!n.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(p.Ident,/^(default|global)$/))return this.finish(n,S.UnknownKeyword);this.consumeToken()}return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseMediaCondition(){return this._parseInterpolation()||super._parseMediaCondition()}_parseMediaFeatureRangeOperator(){return this.accept(Vi)||this.accept(Wi)||super._parseMediaFeatureRangeOperator()}_parseMediaFeatureName(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()}_parseKeyframeSelector(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseWarnAndDebug()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseVariableDeclaration()||this._parseMixinContent()}_parseVariable(){if(!this.peek(Oi))return null;const e=this.create(ss);return this.consumeToken(),e}_parseModuleMember(){const e=this.mark(),n=this.create(xo);return n.setIdentifier(this._parseIdent([K.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(e),null):n.addChild(this._parseVariable()||this._parseFunction())?n:this.finish(n,S.IdentifierOrVariableExpected):null}_parseIdent(e){if(!this.peek(p.Ident)&&!this.peek(vr)&&!this.peekDelim("-"))return null;const n=this.create(Pe);n.referenceTypes=e,n.isCustomProperty=this.peekRegExp(p.Ident,/^--/);let r=!1;const i=()=>{const s=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(s),null):this._parseInterpolation()};for(;(this.accept(p.Ident)||n.addChild(i())||r&&this.acceptRegexp(/^[\w-]/))&&(r=!0,!this.hasWhitespace()););return r?this.finish(n):null}_parseTermExpression(){return this._parseModuleMember()||this._parseVariable()||this._parseNestingSelector()||super._parseTermExpression()}_parseInterpolation(){if(this.peek(vr)){const e=this.create(fi);return this.consumeToken(),!e.addChild(this._parseExpr())&&!this._parseNestingSelector()?this.accept(p.CurlyR)?this.finish(e):this.finish(e,S.ExpressionExpected):this.accept(p.CurlyR)?this.finish(e):this.finish(e,S.RightCurlyExpected)}return null}_parseOperator(){if(this.peek(Lc)||this.peek(Mc)||this.peek(Wi)||this.peek(Vi)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){const e=this.createNode(v.Operator);return this.consumeToken(),this.finish(e)}return super._parseOperator()}_parseUnaryOperator(){if(this.peekIdent("not")){const e=this.create(W);return this.consumeToken(),this.finish(e)}return super._parseUnaryOperator()}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseRuleSetDeclarationAtStatement():this._parseVariableDeclaration()||this._tryParseRuleset(!0)||this._parseDeclaration()}_parseDeclaration(e){const n=this._tryParseCustomPropertyDeclaration(e);if(n)return n;const r=this.create(Te);if(!r.setProperty(this._parseProperty()))return null;if(!this.accept(p.Colon))return this.finish(r,S.ColonExpected,[p.Colon],e||[p.SemiColon]);this.prevToken&&(r.colonPosition=this.prevToken.offset);let i=!1;if(r.setValue(this._parseExpr())&&(i=!0,r.addChild(this._parsePrio())),this.peek(p.CurlyL))r.setNestedProperties(this._parseNestedProperties());else if(!i)return this.finish(r,S.PropertyValueExpected);return this.peek(p.SemiColon)&&(r.semicolonPosition=this.token.offset),this.finish(r)}_parseNestedProperties(){const e=this.create(fc);return this._parseBody(e,this._parseDeclaration.bind(this))}_parseExtends(){if(this.peekKeyword("@extend")){const e=this.create(wn);if(this.consumeToken(),!e.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(e,S.SelectorExpected);for(;this.accept(p.Comma);)e.getSelectors().addChild(this._parseSimpleSelector());return this.accept(p.Exclamation)&&!this.acceptIdent("optional")?this.finish(e,S.UnknownKeyword):this.finish(e)}return null}_parseSimpleSelectorBody(){return this._parseSelectorPlaceholder()||super._parseSimpleSelectorBody()}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorPlaceholder(){if(this.peekDelim("%")){const e=this.createNode(v.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(e)}else if(this.peekKeyword("@at-root")){const e=this.createNode(v.SelectorPlaceholder);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.acceptIdent("with")&&!this.acceptIdent("without"))return this.finish(e,S.IdentifierExpected);if(!this.accept(p.Colon))return this.finish(e,S.ColonExpected);if(!e.addChild(this._parseIdent()))return this.finish(e,S.IdentifierExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}return this.finish(e)}return null}_parseElementName(){const e=this.mark(),n=super._parseElementName();return n&&!this.hasWhitespace()&&this.peek(p.ParenthesisL)?(this.restoreAtMark(e),null):n}_tryParsePseudoIdentifier(){return this._parseInterpolation()||super._tryParsePseudoIdentifier()}_parseWarnAndDebug(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;const e=this.createNode(v.Debug);return this.consumeToken(),e.addChild(this._parseExpr()),this.finish(e)}_parseControlStatement(e=this._parseRuleSetDeclaration.bind(this)){return this.peek(p.AtKeyword)?this._parseIfStatement(e)||this._parseForStatement(e)||this._parseEachStatement(e)||this._parseWhileStatement(e):null}_parseIfStatement(e){return this.peekKeyword("@if")?this._internalParseIfStatement(e):null}_internalParseIfStatement(e){const n=this.create(np);if(this.consumeToken(),!n.setExpression(this._parseExpr(!0)))return this.finish(n,S.ExpressionExpected);if(this._parseBody(n,e),this.acceptKeyword("@else")){if(this.peekIdent("if"))n.setElseClause(this._internalParseIfStatement(e));else if(this.peek(p.CurlyL)){const r=this.create(ap);this._parseBody(r,e),n.setElseClause(r)}}return this.finish(n)}_parseForStatement(e){if(!this.peekKeyword("@for"))return null;const n=this.create(rp);return this.consumeToken(),n.setVariable(this._parseVariable())?this.acceptIdent("from")?n.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(n,Br.ThroughOrToExpected,[p.CurlyR]):n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,Br.FromExpected,[p.CurlyR]):this.finish(n,S.VariableNameExpected,[p.CurlyR])}_parseEachStatement(e){if(!this.peekKeyword("@each"))return null;const n=this.create(ip);this.consumeToken();const r=n.getVariables();if(!r.addChild(this._parseVariable()))return this.finish(n,S.VariableNameExpected,[p.CurlyR]);for(;this.accept(p.Comma);)if(!r.addChild(this._parseVariable()))return this.finish(n,S.VariableNameExpected,[p.CurlyR]);return this.finish(r),this.acceptIdent("in")?n.addChild(this._parseExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR]):this.finish(n,Br.InExpected,[p.CurlyR])}_parseWhileStatement(e){if(!this.peekKeyword("@while"))return null;const n=this.create(sp);return this.consumeToken(),n.addChild(this._parseBinaryExpr())?this._parseBody(n,e):this.finish(n,S.ExpressionExpected,[p.CurlyR])}_parseFunctionBodyDeclaration(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))}_parseFunctionDeclaration(){if(!this.peekKeyword("@function"))return null;const e=this.create(or);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([K.Function])))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.CurlyR]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}return this.accept(p.ParenthesisR)?this._parseBody(e,this._parseFunctionBodyDeclaration.bind(this)):this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}_parseReturnStatement(){if(!this.peekKeyword("@return"))return null;const e=this.createNode(v.ReturnStatement);return this.consumeToken(),e.addChild(this._parseExpr())?this.finish(e):this.finish(e,S.ExpressionExpected)}_parseMixinDeclaration(){if(!this.peekKeyword("@mixin"))return null;const e=this.create(vn);if(this.consumeToken(),!e.setIdentifier(this._parseIdent([K.Mixin])))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(this.accept(p.ParenthesisL)){if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyR])}return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))}_parseParameterDeclaration(){const e=this.create(Sr);return e.setIdentifier(this._parseVariable())?(this.accept(Xn),this.accept(p.Colon)&&!e.setDefaultValue(this._parseExpr(!0))?this.finish(e,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.finish(e)):null}_parseMixinContent(){if(!this.peekKeyword("@content"))return null;const e=this.create(Fp);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return this.finish(e)}_parseMixinReference(){if(!this.peekKeyword("@include"))return null;const e=this.create(lr);this.consumeToken();const n=this._parseIdent([K.Mixin]);if(!e.setIdentifier(n))return this.finish(e,S.IdentifierExpected,[p.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){const r=this._parseIdent([K.Mixin]);if(!r)return this.finish(e,S.IdentifierExpected,[p.CurlyR]);const i=this.create(xo);n.referenceTypes=[K.Module],i.setIdentifier(n),e.setIdentifier(r),e.addChild(i)}if(this.accept(p.ParenthesisL)){if(e.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getArguments().addChild(this._parseFunctionArgument()))return this.finish(e,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(p.CurlyL))&&e.setContent(this._parseMixinContentDeclaration()),this.finish(e)}_parseMixinContentDeclaration(){const e=this.create(Rp);if(this.acceptIdent("using")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.CurlyL]);if(e.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(e,S.VariableNameExpected)}if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.CurlyL])}return this.peek(p.CurlyL)&&this._parseBody(e,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(e)}_parseMixinReferenceBodyStatement(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_parseFunctionArgument(){const e=this.create(Xt),n=this.mark(),r=this._parseVariable();if(r)if(this.accept(p.Colon))e.setIdentifier(r);else{if(this.accept(Xn))return e.setValue(r),this.finish(e);this.restoreAtMark(n)}return e.setValue(this._parseExpr(!0))?(this.accept(Xn),e.addChild(this._parsePrio()),this.finish(e)):e.setValue(this._tryParsePrio())?this.finish(e):null}_parseURLArgument(){const e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const r=this.create(W);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}_parseOperation(){if(!this.peek(p.ParenthesisL))return null;const e=this.create(W);for(this.consumeToken();e.addChild(this._parseListElement());)this.accept(p.Comma);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseListElement(){const e=this.create(Np),n=this._parseBinaryExpr();if(!n)return null;if(this.accept(p.Colon)){if(e.setKey(n),!e.setValue(this._parseBinaryExpr()))return this.finish(e,S.ExpressionExpected)}else e.setValue(n);return this.finish(e)}_parseUse(){if(!this.peekKeyword("@use"))return null;const e=this.create(lp);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,S.StringLiteralExpected);if(!this.peek(p.SemiColon)&&!this.peek(p.EOF)){if(!this.peekRegExp(p.Ident,/as|with/))return this.finish(e,S.UnknownKeyword);if(this.acceptIdent("as")&&!e.setIdentifier(this._parseIdent([K.Module]))&&!this.acceptDelim("*"))return this.finish(e,S.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}}return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,S.SemiColonExpected):this.finish(e)}_parseModuleConfigDeclaration(){const e=this.create(cp);return e.setIdentifier(this._parseVariable())?!this.accept(p.Colon)||!e.setValue(this._parseExpr(!0))?this.finish(e,S.VariableValueExpected,[],[p.Comma,p.ParenthesisR]):this.accept(p.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(e,S.UnknownKeyword):this.finish(e):null}_parseForward(){if(!this.peekKeyword("@forward"))return null;const e=this.create(hp);if(this.consumeToken(),!e.addChild(this._parseStringLiteral()))return this.finish(e,S.StringLiteralExpected);if(this.acceptIdent("as")){const n=this._parseIdent([K.Forward]);if(!e.setIdentifier(n))return this.finish(e,S.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(e,S.WildcardExpected)}if(this.acceptIdent("with")){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected,[p.ParenthesisR]);if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);for(;this.accept(p.Comma)&&!this.peek(p.ParenthesisR);)if(!e.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(e,S.VariableNameExpected);if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected)}else if((this.peekIdent("hide")||this.peekIdent("show"))&&!e.addChild(this._parseForwardVisibility()))return this.finish(e,S.IdentifierOrVariableExpected);return!this.accept(p.SemiColon)&&!this.accept(p.EOF)?this.finish(e,S.SemiColonExpected):this.finish(e)}_parseForwardVisibility(){const e=this.create(dp);for(e.setIdentifier(this._parseIdent());e.addChild(this._parseVariable()||this._parseIdent());)this.accept(p.Comma);return e.getChildren().length>1?e:null}_parseSupportsCondition(){return this._parseInterpolation()||super._parseSupportsCondition()}}const et=w("Sass documentation");class ge extends ls{constructor(e,n){super("$",e,n),Vl(ge.scssModuleLoaders),Vl(ge.scssModuleBuiltIns)}isImportPathParent(e){return e===v.Forward||e===v.Use||super.isImportPathParent(e)}getCompletionForImportPath(e,n){const r=e.getParent().type;if(r===v.Forward||r===v.Use)for(let i of ge.scssModuleBuiltIns){const s={label:i.label,documentation:i.documentation,textEdit:j.replace(this.getCompletionRange(e),`'${i.label}'`),kind:q.Module};n.items.push(s)}return super.getCompletionForImportPath(e,n)}createReplaceFunction(){let e=1;return(n,r)=>"\\"+r+": ${"+e+++":"+(ge.variableDefaults[r]||"")+"}"}createFunctionProposals(e,n,r,i){for(const s of e){const a=s.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),l={label:s.func.substr(0,s.func.indexOf("(")),detail:s.func,documentation:s.desc,textEdit:j.replace(this.getCompletionRange(n),a),insertTextFormat:Fe.Snippet,kind:q.Function};r&&(l.sortText="z"),i.items.push(l)}return i}getCompletionsForSelector(e,n,r){return this.createFunctionProposals(ge.selectorFuncs,null,!0,r),super.getCompletionsForSelector(e,n,r)}getTermProposals(e,n,r){let i=ge.builtInFuncs;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(ge.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionForAtDirectives(n),this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}getCompletionsForExtendsReference(e,n,r){const i=this.getSymbolContext().findSymbolsAtOffset(this.offset,K.Rule);for(const s of i){const a={label:s.name,textEdit:j.replace(this.getCompletionRange(n),s.name),kind:q.Function};r.items.push(a)}return r}getCompletionForAtDirectives(e){return e.items.push(...ge.scssAtDirectives),e}getCompletionForTopLevel(e){return this.getCompletionForAtDirectives(e),this.getCompletionForModuleLoaders(e),super.getCompletionForTopLevel(e),e}getCompletionForModuleLoaders(e){return e.items.push(...ge.scssModuleLoaders),e}}ge.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"};ge.colorProposals=[{func:"red($color)",desc:w("Gets the red component of a color.")},{func:"green($color)",desc:w("Gets the green component of a color.")},{func:"blue($color)",desc:w("Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:w("Mixes two colors together.")},{func:"hue($color)",desc:w("Gets the hue component of a color.")},{func:"saturation($color)",desc:w("Gets the saturation component of a color.")},{func:"lightness($color)",desc:w("Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:w("Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:w("Makes a color lighter.")},{func:"darken($color, $amount)",desc:w("Makes a color darker.")},{func:"saturate($color, $amount)",desc:w("Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:w("Makes a color less saturated.")},{func:"grayscale($color)",desc:w("Converts a color to grayscale.")},{func:"complement($color)",desc:w("Returns the complement of a color.")},{func:"invert($color)",desc:w("Returns the inverse of a color.")},{func:"alpha($color)",desc:w("Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:w("Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:w("Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:w("Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:w("Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:w("Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:w("Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:w("Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:w("Converts a color into the format understood by IE filters.")}];ge.selectorFuncs=[{func:"selector-nest($selectors…)",desc:w("Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors…)",desc:w("Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:w("Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:w("Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:w("Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:w("Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:w("Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:w("Parses a selector into the format returned by &.")}];ge.builtInFuncs=[{func:"unquote($string)",desc:w("Removes quotes from a string.")},{func:"quote($string)",desc:w("Adds quotes to a string.")},{func:"str-length($string)",desc:w("Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:w("Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:w("Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:w("Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:w("Converts a string to upper case.")},{func:"to-lower-case($string)",desc:w("Converts a string to lower case.")},{func:"percentage($number)",desc:w("Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:w("Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:w("Rounds a number up to the next whole number.")},{func:"floor($number)",desc:w("Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:w("Returns the absolute value of a number.")},{func:"min($numbers)",desc:w("Finds the minimum of several numbers.")},{func:"max($numbers)",desc:w("Finds the maximum of several numbers.")},{func:"random([$limit])",desc:w("Returns a random number.")},{func:"length($list)",desc:w("Returns the length of a list.")},{func:"nth($list, $n)",desc:w("Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:w("Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:w("Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:w("Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:w("Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:w("Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:w("Returns the separator of a list.")},{func:"map-get($map, $key)",desc:w("Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:w("Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:w("Returns a new map with keys removed.")},{func:"map-keys($map)",desc:w("Returns a list of all keys in a map.")},{func:"map-values($map)",desc:w("Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:w("Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:w("Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:w("Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:w("Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:w("Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:w("Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:w("Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:w("Returns the type of a value.")},{func:"unit($number)",desc:w("Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:w("Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:w("Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args…)",desc:w("Dynamically calls a Sass function.")}];ge.scssAtDirectives=[{label:"@extend",documentation:w("Inherits the styles of another selector."),kind:q.Keyword},{label:"@at-root",documentation:w("Causes one or more rules to be emitted at the root of the document."),kind:q.Keyword},{label:"@debug",documentation:w("Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:q.Keyword},{label:"@warn",documentation:w("Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:q.Keyword},{label:"@error",documentation:w("Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:q.Keyword},{label:"@if",documentation:w("Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { + $0 +}`,insertTextFormat:Fe.Snippet,kind:q.Keyword},{label:"@for",documentation:w("For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:Fe.Snippet,kind:q.Keyword},{label:"@each",documentation:w("Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:Fe.Snippet,kind:q.Keyword},{label:"@while",documentation:w("While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { + $0 +}`,insertTextFormat:Fe.Snippet,kind:q.Keyword},{label:"@mixin",documentation:w("Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { + $0 +}`,insertTextFormat:Fe.Snippet,kind:q.Keyword},{label:"@include",documentation:w("Includes the styles defined by another mixin into the current rule."),kind:q.Keyword},{label:"@function",documentation:w("Defines complex operations that can be re-used throughout stylesheets."),kind:q.Keyword}];ge.scssModuleLoaders=[{label:"@use",documentation:w("Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:et,url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:Fe.Snippet,kind:q.Keyword},{label:"@forward",documentation:w("Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:et,url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:Fe.Snippet,kind:q.Keyword}];ge.scssModuleBuiltIns=[{label:"sass:math",documentation:w("Provides functions that operate on numbers."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:w("Makes it easy to combine, search, or split apart strings."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:w("Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:w("Lets you access and modify values in lists."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:w("Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:w("Provides access to Sass’s powerful selector engine."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:w("Exposes the details of Sass’s inner workings."),references:[{name:et,url:"https://sass-lang.com/documentation/modules/meta"}]}];function Vl(t){t.forEach(e=>{if(e.documentation&&e.references&&e.references.length>0){const n=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};n.value+=` + +`,n.value+=e.references.map(r=>`[${r.name}](${r.url})`).join(" | "),e.documentation=n}})}const $l=47,Tm=10,Om=13,Wm=12,qr=96,jr=46;let Vm=p.CustomToken;const $i=Vm++;class zc extends Fn{scanNext(e){const n=this.escapedJavaScript();return n!==null?this.finishToken(e,n):this.stream.advanceIfChars([jr,jr,jr])?this.finishToken(e,$i):super.scanNext(e)}comment(){return super.comment()?!0:!this.inURL&&this.stream.advanceIfChars([$l,$l])?(this.stream.advanceWhileChar(e=>{switch(e){case Tm:case Om:case Wm:return!1;default:return!0}}),!0):!1}escapedJavaScript(){return this.stream.peekChar()===qr?(this.stream.advance(1),this.stream.advanceWhileChar(n=>n!==qr),this.stream.advanceIfChar(qr)?p.EscapedJavaScript:p.BadEscapedJavaScript):null}}class $m extends kr{constructor(){super(new zc)}_parseStylesheetStatement(e=!1){return this.peek(p.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||super._parseStylesheetAtStatement(e):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)}_parseImport(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;const e=this.create(es);if(this.consumeToken(),this.accept(p.ParenthesisL)){if(!this.accept(p.Ident))return this.finish(e,S.IdentifierExpected,[p.SemiColon]);do if(!this.accept(p.Comma))break;while(this.accept(p.Ident));if(!this.accept(p.ParenthesisR))return this.finish(e,S.RightParenthesisExpected,[p.SemiColon])}return!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,S.URIOrStringExpected,[p.SemiColon]):(!this.peek(p.SemiColon)&&!this.peek(p.EOF)&&e.setMedialist(this._parseMediaQueryList()),this._completeParseImport(e))}_parsePlugin(){if(!this.peekKeyword("@plugin"))return null;const e=this.createNode(v.Plugin);return this.consumeToken(),e.addChild(this._parseStringLiteral())?this.accept(p.SemiColon)?this.finish(e):this.finish(e,S.SemiColonExpected):this.finish(e,S.StringLiteralExpected)}_parseMediaQuery(){const e=super._parseMediaQuery();if(!e){const n=this.create(wc);return n.addChild(this._parseVariable())?this.finish(n):null}return e}_parseMediaDeclaration(e=!1){return this._tryParseRuleset(e)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(e)}_parseMediaFeatureName(){return this._parseIdent()||this._parseVariable()}_parseVariableDeclaration(e=[]){const n=this.create(Cr),r=this.mark();if(!n.setVariable(this._parseVariable(!0)))return null;if(this.accept(p.Colon)){if(this.prevToken&&(n.colonPosition=this.prevToken.offset),n.setValue(this._parseDetachedRuleSet()))n.needsSemicolon=!1;else if(!n.setValue(this._parseExpr()))return this.finish(n,S.VariableValueExpected,[],e);n.addChild(this._parsePrio())}else return this.restoreAtMark(r),null;return this.peek(p.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)}_parseDetachedRuleSet(){let e=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(p.ParenthesisL)){let r=this.create(vn);if(r.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)r.getParameters().addChild(this._parseMixinParameter())||this.markError(r,S.IdentifierExpected,[],[p.ParenthesisR]);if(!this.accept(p.ParenthesisR))return this.restoreAtMark(e),null}else return this.restoreAtMark(e),null;if(!this.peek(p.CurlyL))return null;const n=this.create(ae);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)}_parseDetachedRuleSetBody(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()}_addLookupChildren(e){if(!e.addChild(this._parseLookupValue()))return!1;let n=!1;for(;this.peek(p.BracketL)&&(n=!0),!!e.addChild(this._parseLookupValue());)n=!1;return!n}_parseLookupValue(){const e=this.create(W),n=this.mark();return this.accept(p.BracketL)?(e.addChild(this._parseVariable(!1,!0))||e.addChild(this._parsePropertyIdentifier()))&&this.accept(p.BracketR)||this.accept(p.BracketR)?e:(this.restoreAtMark(n),null):(this.restoreAtMark(n),null)}_parseVariable(e=!1,n=!1){const r=!e&&this.peekDelim("$");if(!this.peekDelim("@")&&!r&&!this.peek(p.AtKeyword))return null;const i=this.create(ss),s=this.mark();for(;this.acceptDelim("@")||!e&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(s),null;return!this.accept(p.AtKeyword)&&!this.accept(p.Ident)?(this.restoreAtMark(s),null):!n&&this.peek(p.BracketL)&&!this._addLookupChildren(i)?(this.restoreAtMark(s),null):i}_parseTermExpression(){return this._parseVariable()||this._parseEscaped()||super._parseTermExpression()||this._tryParseMixinReference(!1)}_parseEscaped(){if(this.peek(p.EscapedJavaScript)||this.peek(p.BadEscapedJavaScript)){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.finish(e)}if(this.peekDelim("~")){const e=this.createNode(v.EscapedValue);return this.consumeToken(),this.accept(p.String)||this.accept(p.EscapedJavaScript)?this.finish(e):this.finish(e,S.TermExpected)}return null}_parseOperator(){const e=this._parseGuardOperator();return e||super._parseOperator()}_parseGuardOperator(){if(this.peekDelim(">")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}else if(this.peekDelim("=")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("<"),e}else if(this.peekDelim("<")){const e=this.createNode(v.Operator);return this.consumeToken(),this.acceptDelim("="),e}return null}_parseRuleSetDeclaration(){return this.peek(p.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseLayer()||this._parsePropertyAtRule()||this._parseContainer(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||this._parseRuleSetDeclarationAtStatement():this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||this._parseDeclaration()}_parseKeyframeIdent(){return this._parseIdent([K.Keyframe])||this._parseVariable()}_parseKeyframeSelector(){return this._parseDetachedRuleSetMixin()||super._parseKeyframeSelector()}_parseSelector(e){const n=this.create(Rn);let r=!1;for(e&&(r=n.addChild(this._parseCombinator()));n.addChild(this._parseSimpleSelector());){r=!0;const i=this.mark();if(n.addChild(this._parseGuard())&&this.peek(p.CurlyL))break;this.restoreAtMark(i),n.addChild(this._parseCombinator())}return r?this.finish(n):null}_parseNestingSelector(){if(this.peekDelim("&")){const e=this.createNode(v.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(p.Num)||this.accept(p.Dimension)||e.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(e)}return null}_parseSelectorIdent(){if(!this.peekInterpolatedIdent())return null;const e=this.createNode(v.SelectorInterpolation);return this._acceptInterpolatedIdent(e)?this.finish(e):null}_parsePropertyIdentifier(e=!1){const n=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,n))return null;const r=this.mark(),i=this.create(Pe);i.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");let s=!1;return e?i.isCustomProperty?s=i.addChild(this._parseIdent()):s=i.addChild(this._parseRegexp(n)):i.isCustomProperty?s=this._acceptInterpolatedIdent(i):s=this._acceptInterpolatedIdent(i,n),s?(!e&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(i)):(this.restoreAtMark(r),null)}peekInterpolatedIdent(){return this.peek(p.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")}_acceptInterpolatedIdent(e,n){let r=!1;const i=()=>{const a=this.mark();return this.acceptDelim("-")&&(this.hasWhitespace()||this.acceptDelim("-"),this.hasWhitespace())?(this.restoreAtMark(a),null):this._parseInterpolation()},s=n?()=>this.acceptRegexp(n):()=>this.accept(p.Ident);for(;(s()||e.addChild(this._parseInterpolation()||this.try(i)))&&(r=!0,!this.hasWhitespace()););return r}_parseInterpolation(){const e=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){const n=this.createNode(v.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.CurlyL)?(this.restoreAtMark(e),null):n.addChild(this._parseIdent())?this.accept(p.CurlyR)?this.finish(n):this.finish(n,S.RightCurlyExpected):this.finish(n,S.IdentifierExpected)}return null}_tryParseMixinDeclaration(){const e=this.mark(),n=this.create(vn);if(!n.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)n.getParameters().addChild(this._parseMixinParameter())||this.markError(n,S.IdentifierExpected,[],[p.ParenthesisR]);return this.accept(p.ParenthesisR)?(n.setGuard(this._parseGuard()),this.peek(p.CurlyL)?this._parseBody(n,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(e),null)):(this.restoreAtMark(e),null)}_parseMixInBodyDeclaration(){return this._parseFontFace()||this._parseRuleSetDeclaration()}_parseMixinDeclarationIdentifier(){let e;if(this.peekDelim("#")||this.peekDelim(".")){if(e=this.create(Pe),this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseIdent()))return null}else if(this.peek(p.Hash))e=this.create(Pe),this.consumeToken();else return null;return e.referenceTypes=[K.Mixin],this.finish(e)}_parsePseudo(){if(!this.peek(p.Colon))return null;const e=this.mark(),n=this.create(wn);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(n):(this.restoreAtMark(e),super._parsePseudo())}_parseExtend(){if(!this.peekDelim("&"))return null;const e=this.mark(),n=this.create(wn);return this.consumeToken(),this.hasWhitespace()||!this.accept(p.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(e),null):this._completeExtends(n)}_completeExtends(e){if(!this.accept(p.ParenthesisL))return this.finish(e,S.LeftParenthesisExpected);const n=e.getSelectors();if(!n.addChild(this._parseSelector(!0)))return this.finish(e,S.SelectorExpected);for(;this.accept(p.Comma);)if(!n.addChild(this._parseSelector(!0)))return this.finish(e,S.SelectorExpected);return this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)}_parseDetachedRuleSetMixin(){if(!this.peek(p.AtKeyword))return null;const e=this.mark(),n=this.create(lr);return n.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(p.ParenthesisL))?(this.restoreAtMark(e),null):this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_tryParseMixinReference(e=!0){const n=this.mark(),r=this.create(lr);let i=this._parseMixinDeclarationIdentifier();for(;i;){this.acceptDelim(">");const a=this._parseMixinDeclarationIdentifier();if(a)r.getNamespaces().addChild(i),i=a;else break}if(!r.setIdentifier(i))return this.restoreAtMark(n),null;let s=!1;if(this.accept(p.ParenthesisL)){if(s=!0,r.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!r.getArguments().addChild(this._parseMixinArgument()))return this.finish(r,S.ExpressionExpected)}if(!this.accept(p.ParenthesisR))return this.finish(r,S.RightParenthesisExpected);i.referenceTypes=[K.Mixin]}else i.referenceTypes=[K.Mixin,K.Rule];return this.peek(p.BracketL)?e||this._addLookupChildren(r):r.addChild(this._parsePrio()),!s&&!this.peek(p.SemiColon)&&!this.peek(p.CurlyR)&&!this.peek(p.EOF)?(this.restoreAtMark(n),null):this.finish(r)}_parseMixinArgument(){const e=this.create(Xt),n=this.mark(),r=this._parseVariable();return r&&(this.accept(p.Colon)?e.setIdentifier(r):this.restoreAtMark(n)),e.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(e):(this.restoreAtMark(n),null)}_parseMixinParameter(){const e=this.create(Sr);if(this.peekKeyword("@rest")){const r=this.create(W);return this.consumeToken(),this.accept($i)?(e.setIdentifier(this.finish(r)),this.finish(e)):this.finish(e,S.DotExpected,[],[p.Comma,p.ParenthesisR])}if(this.peek($i)){const r=this.create(W);return this.consumeToken(),e.setIdentifier(this.finish(r)),this.finish(e)}let n=!1;return e.setIdentifier(this._parseVariable())&&(this.accept(p.Colon),n=!0),!e.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!n?null:this.finish(e)}_parseGuard(){if(!this.peekIdent("when"))return null;const e=this.create(Dp);if(this.consumeToken(),!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,S.ConditionExpected);for(;this.acceptIdent("and")||this.accept(p.Comma);)if(!e.getConditions().addChild(this._parseGuardCondition()))return this.finish(e,S.ConditionExpected);return this.finish(e)}_parseGuardCondition(){const e=this.create(Ip);return e.isNegated=this.acceptIdent("not"),this.accept(p.ParenthesisL)?(e.addChild(this._parseExpr()),this.accept(p.ParenthesisR)?this.finish(e):this.finish(e,S.RightParenthesisExpected)):e.isNegated?this.finish(e,S.LeftParenthesisExpected):null}_parseFunction(){const e=this.mark(),n=this.create(Nn);if(!n.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(p.ParenthesisL))return this.restoreAtMark(e),null;if(n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(p.Comma)||this.accept(p.SemiColon))&&!this.peek(p.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,S.ExpressionExpected)}return this.accept(p.ParenthesisR)?this.finish(n):this.finish(n,S.RightParenthesisExpected)}_parseFunctionIdentifier(){if(this.peekDelim("%")){const e=this.create(Pe);return e.referenceTypes=[K.Function],this.consumeToken(),this.finish(e)}return super._parseFunctionIdentifier()}_parseURLArgument(){const e=this.mark(),n=super._parseURLArgument();if(!n||!this.peek(p.ParenthesisR)){this.restoreAtMark(e);const r=this.create(W);return r.addChild(this._parseBinaryExpr()),this.finish(r)}return n}}class Kt extends ls{constructor(e,n){super("@",e,n)}createFunctionProposals(e,n,r,i){for(const s of e){const a={label:s.name,detail:s.example,documentation:s.description,textEdit:j.replace(this.getCompletionRange(n),s.name+"($0)"),insertTextFormat:Fe.Snippet,kind:q.Function};r&&(a.sortText="z"),i.items.push(a)}return i}getTermProposals(e,n,r){let i=Kt.builtInProposals;return e&&(i=i.filter(s=>!s.type||!e.restrictions||e.restrictions.indexOf(s.type)!==-1)),this.createFunctionProposals(i,n,!0,r),super.getTermProposals(e,n,r)}getColorProposals(e,n,r){return this.createFunctionProposals(Kt.colorProposals,n,!1,r),super.getColorProposals(e,n,r)}getCompletionsForDeclarationProperty(e,n){return this.getCompletionsForSelector(null,!0,n),super.getCompletionsForDeclarationProperty(e,n)}}Kt.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:w("returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:w('"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:w("returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:w("returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:w("generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:w("bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:w("URL encodes a string")},{name:"e",example:"e(@string);",description:w("escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:w("string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:w("remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:w("parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:w("converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:w("inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:w("absolute value of a number"),example:"abs(number);"},{name:"acos",description:w("arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:w("arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:w("rounds up to an integer")},{name:"cos",description:w("cosine function"),example:"cos(number);"},{name:"floor",description:w("rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:w("converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:w("rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:w("calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:w("sine function"),example:"sin(number);"},{name:"tan",description:w("tangent function"),example:"tan(number);"},{name:"atan",description:w("arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:w("returns pi"),example:"pi();"},{name:"pow",description:w("first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:w("first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:w("returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:w("returns the lowest of one or more values"),example:"max(@x, @y);"}];Kt.colorProposals=[{name:"argb",example:"argb(@color);",description:w("creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:w("creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:w("creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:w("creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:w("creates a color")},{name:"hue",example:"hue(@color);",description:w("returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:w("returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:w("returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:w("returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:w("returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:w("returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:w("returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:w("returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:w("returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:w("returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:w("return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:w("return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:w("return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:w("return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:w("return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:w("return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:w("return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:w("return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:w("return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:w("returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:w("return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}];function Um(t,e){const n=Bm(t);return qm(n,e)}function Bm(t){function e(d){return t.positionAt(d.offset).line}function n(d){return t.positionAt(d.offset+d.len).line}function r(){switch(t.languageId){case"scss":return new Ac;case"less":return new zc;default:return new Fn}}function i(d,u){const m=e(d),f=n(d);return m!==f?{startLine:m,endLine:f,kind:u}:null}const s=[],a=[],o=r();o.ignoreComment=!1,o.setSource(t.getText());let l=o.scan(),c=null;for(;l.type!==p.EOF;){switch(l.type){case p.CurlyL:case vr:{a.push({line:e(l),type:"brace",isStart:!0});break}case p.CurlyR:{if(a.length!==0){const d=Ul(a,"brace");if(!d)break;let u=n(l);d.type==="brace"&&(c&&n(c)!==u&&u--,d.line!==u&&s.push({startLine:d.line,endLine:u,kind:void 0}))}break}case p.Comment:{const d=f=>f==="#region"?{line:e(l),type:"comment",isStart:!0}:{line:n(l),type:"comment",isStart:!1},m=(f=>{const g=f.text.match(/^\s*\/\*\s*(#region|#endregion)\b\s*(.*?)\s*\*\//);if(g)return d(g[1]);if(t.languageId==="scss"||t.languageId==="less"){const b=f.text.match(/^\s*\/\/\s*(#region|#endregion)\b\s*(.*?)\s*/);if(b)return d(b[1])}return null})(l);if(m)if(m.isStart)a.push(m);else{const f=Ul(a,"comment");if(!f)break;f.type==="comment"&&f.line!==m.line&&s.push({startLine:f.line,endLine:m.line,kind:"region"})}else{const f=i(l,"comment");f&&s.push(f)}break}}c=l,l=o.scan()}return s}function Ul(t,e){if(t.length===0)return null;for(let n=t.length-1;n>=0;n--)if(t[n].type===e&&t[n].isStart)return t.splice(n,1)[0];return null}function qm(t,e){const n=e&&e.rangeLimit||Number.MAX_VALUE,r=t.sort((a,o)=>{let l=a.startLine-o.startLine;return l===0&&(l=a.endLine-o.endLine),l}),i=[];let s=-1;return r.forEach(a=>{a.startLine=0;c--)if(this.__items[c].match(l))return!0;return!1},s.prototype.set_indent=function(l,c){this.is_empty()&&(this.__indent_count=l||0,this.__alignment_count=c||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},s.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},s.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},s.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var l=this.__parent.current_line;return l.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),l.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),l.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,l.__items[0]===" "&&(l.__items.splice(0,1),l.__character_count-=1),!0}return!1},s.prototype.is_empty=function(){return this.__items.length===0},s.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},s.prototype.push=function(l){this.__items.push(l);var c=l.lastIndexOf(` +`);c!==-1?this.__character_count=l.length-c:this.__character_count+=l.length},s.prototype.pop=function(){var l=null;return this.is_empty()||(l=this.__items.pop(),this.__character_count-=l.length),l},s.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},s.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},s.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},s.prototype.toString=function(){var l="";return this.is_empty()?this.__parent.indent_empty_lines&&(l=this.__parent.get_indent_string(this.__indent_count)):(l=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),l+=this.__items.join("")),l};function a(l,c){this.__cache=[""],this.__indent_size=l.indent_size,this.__indent_string=l.indent_char,l.indent_with_tabs||(this.__indent_string=new Array(l.indent_size+1).join(l.indent_char)),c=c||"",l.indent_level>0&&(c=new Array(l.indent_level+1).join(this.__indent_string)),this.__base_string=c,this.__base_string_length=c.length}a.prototype.get_indent_size=function(l,c){var d=this.__base_string_length;return c=c||0,l<0&&(d=0),d+=l*this.__indent_size,d+=c,d},a.prototype.get_indent_string=function(l,c){var d=this.__base_string;return c=c||0,l<0&&(l=0,d=""),c+=l*this.__indent_size,this.__ensure_cache(c),d+=this.__cache[c],d},a.prototype.__ensure_cache=function(l){for(;l>=this.__cache.length;)this.__add_column()},a.prototype.__add_column=function(){var l=this.__cache.length,c=0,d="";this.__indent_size&&l>=this.__indent_size&&(c=Math.floor(l/this.__indent_size),l-=c*this.__indent_size,d=new Array(c+1).join(this.__indent_string)),l&&(d+=new Array(l+1).join(" ")),this.__cache.push(d)};function o(l,c){this.__indent_cache=new a(l,c),this.raw=!1,this._end_with_newline=l.end_with_newline,this.indent_size=l.indent_size,this.wrap_line_length=l.wrap_line_length,this.indent_empty_lines=l.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new s(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(l,c){return this.__indent_cache.get_indent_string(l,c)},o.prototype.get_indent_size=function(l,c){return this.__indent_cache.get_indent_size(l,c)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(l){return this.is_empty()||!l&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(l){this.trim(!0);var c=this.current_line.pop();c&&(c[c.length-1]===` +`&&(c=c.replace(/\n+$/g,"")),this.current_line.push(c)),this._end_with_newline&&this.__add_outputline();var d=this.__lines.join(` +`);return l!==` +`&&(d=d.replace(/[\n]/g,l)),d},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(l,c){return l=l||0,c=c||0,this.next_line.set_indent(l,c),this.__lines.length>1?(this.current_line.set_indent(l,c),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(l){for(var c=0;c1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(l,c){for(var d=this.__lines.length-2;d>=0;){var u=this.__lines[d];if(u.is_empty())break;if(u.item(0).indexOf(l)!==0&&u.item(-1)!==c){this.__lines.splice(d+1,0,new s(this)),this.previous_line=this.__lines[this.__lines.length-2];break}d--}},i.exports.Output=o}),,,,(function(i){function s(l,c){this.raw_options=a(l,c),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}s.prototype._get_array=function(l,c){var d=this.raw_options[l],u=c||[];return typeof d=="object"?d!==null&&typeof d.concat=="function"&&(u=d.concat()):typeof d=="string"&&(u=d.split(/[^a-zA-Z0-9_\/\-]+/)),u},s.prototype._get_boolean=function(l,c){var d=this.raw_options[l],u=d===void 0?!!c:!!d;return u},s.prototype._get_characters=function(l,c){var d=this.raw_options[l],u=c||"";return typeof d=="string"&&(u=d.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),u},s.prototype._get_number=function(l,c){var d=this.raw_options[l];c=parseInt(c,10),isNaN(c)&&(c=0);var u=parseInt(d,10);return isNaN(u)&&(u=c),u},s.prototype._get_selection=function(l,c,d){var u=this._get_selection_list(l,c,d);if(u.length!==1)throw new Error("Invalid Option Value: The option '"+l+`' can only be one of the following values: +`+c+` +You passed in: '`+this.raw_options[l]+"'");return u[0]},s.prototype._get_selection_list=function(l,c,d){if(!c||c.length===0)throw new Error("Selection list cannot be empty.");if(d=d||[c[0]],!this._is_valid_selection(d,c))throw new Error("Invalid Default Value!");var u=this._get_array(l,d);if(!this._is_valid_selection(u,c))throw new Error("Invalid Option Value: The option '"+l+`' can contain only the following values: +`+c+` +You passed in: '`+this.raw_options[l]+"'");return u},s.prototype._is_valid_selection=function(l,c){return l.length&&c.length&&!l.some(function(d){return c.indexOf(d)===-1})};function a(l,c){var d={};l=o(l);var u;for(u in l)u!==c&&(d[u]=l[u]);if(c&&l[c])for(u in l[c])d[u]=l[c][u];return d}function o(l){var c={},d;for(d in l){var u=d.replace(/-/g,"_");c[u]=l[d]}return c}i.exports.Options=s,i.exports.normalizeOpts=o,i.exports.mergeOpts=a}),,(function(i){var s=RegExp.prototype.hasOwnProperty("sticky");function a(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}a.prototype.restart=function(){this.__position=0},a.prototype.back=function(){this.__position>0&&(this.__position-=1)},a.prototype.hasNext=function(){return this.__position=0&&o=0&&l=o.length&&this.__input.substring(l-o.length,l).toLowerCase()===o},i.exports.InputScanner=a}),,,,,(function(i){function s(a,o){a=typeof a=="string"?a:a.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(a+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(a+/\sbeautify\signore:end\s/.source+o,"g")}s.prototype.get_directives=function(a){if(!a.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var l=this.__directive_pattern.exec(a);l;)o[l[1]]=l[2],l=this.__directive_pattern.exec(a);return o},s.prototype.readIgnored=function(a){return a.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=s}),,(function(i,s,a){var o=a(16).Beautifier,l=a(17).Options;function c(d,u){var m=new o(d,u);return m.beautify()}i.exports=c,i.exports.defaultOptions=function(){return new l}}),(function(i,s,a){var o=a(17).Options,l=a(2).Output,c=a(8).InputScanner,d=a(13).Directives,u=new d(/\/\*/,/\*\//),m=/\r\n|[\r\n]/,f=/\r\n|[\r\n]/g,g=/\s/,b=/(?:\s|\n)+/g,k=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,F=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function R(E,T){this._source_text=E||"",this._options=new o(T),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}R.prototype.eatString=function(E){var T="";for(this._ch=this._input.next();this._ch;){if(T+=this._ch,this._ch==="\\")T+=this._input.next();else if(E.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return T},R.prototype.eatWhitespace=function(E){for(var T=g.test(this._input.peek()),O=0;g.test(this._input.peek());)this._ch=this._input.next(),E&&this._ch===` +`&&(O===0||O0&&this._indentLevel--},R.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var E=this._source_text,T=this._options.eol;T==="auto"&&(T=` +`,E&&m.test(E||"")&&(T=E.match(m)[0])),E=E.replace(f,` +`);var O=E.match(/^[\t ]*/)[0];this._output=new l(this._options,O),this._input=new c(E),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var V=0,D=!1,N=!1,z=!1,$=!1,L=!1,y=this._ch,_=!1,I,M,A;I=this._input.read(b),M=I!=="",A=y,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),y=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var P=this._input.read(k),H=u.get_directives(P);H&&H.ignore==="start"&&(P+=u.readIgnored(this._input)),this.print_string(P),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(F)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(M),this.print_string(this._ch);var ee=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ee.match(/[ :]$/)&&(ee=this.eatString(": ").replace(/\s+$/,""),this.print_string(ee),this._output.space_before_token=!0),V===0&&ee.indexOf(":")!==-1&&(N=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(M),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var J=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);J.match(/[ :]$/)&&(J=this.eatString(": ").replace(/\s+$/,""),this.print_string(J),this._output.space_before_token=!0),V===0&&J.indexOf(":")!==-1?(N=!0,this.indent()):J in this.NESTED_AT_RULE?(this._nestedLevel+=1,J in this.CONDITIONAL_GROUP_RULE&&(z=!0)):V===0&&!N&&($=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(M),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")N&&(N=!1,this.outdent()),$=!1,z?(z=!1,D=this._indentLevel>=this._nestedLevel):D=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&D&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(A==="("?this._output.space_before_token=!1:A!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),A==="{"&&this._output.trim(!0),N&&(this.outdent(),N=!1),this.print_string(this._ch),D=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var ve=0;ve"||this._ch==="+"||this._ch==="~")&&!N&&V===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&g.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(M),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),g.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var _r=A==='"'||A==="'";this.preserveSingleSpace(_r||M),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===` +`&&_&&this._output.add_new_line()}var Ft=this._output.get_code(T);return Ft},i.exports.Beautifier=R}),(function(i,s,a){var o=a(6).Options;function l(c){o.call(this,c,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var d=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||d;var u=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var m=0;m0&&jl(r,u-1);)u--;u===0||ql(r,u-1)?d=u:u0){const d=n.insertSpaces?vo(" ",o*s):vo(" ",s);c=c.split(` +`).join(` +`+d),e.start.character===0&&(c=d+c)}return[{range:e,newText:c}]}function Bl(t){return t.replace(/^\s+/,"")}const Gm=123,Jm=125;function Xm(t,e){for(;e>=0;){const n=t.charCodeAt(e);if(n===Gm)return!0;if(n===Jm)return!1;e--}return!1}function Ye(t,e,n){if(t&&t.hasOwnProperty(e)){const r=t[e];if(r!==null)return r}return n}function Ym(t,e,n){let r=e,i=0;const s=n.tabSize||4;for(;r && ]#",relevance:50,description:"@counter-style descriptor. Specifies the symbols used by the marker-construction algorithm specified by the system descriptor. Needs to be specified if the counter system is 'additive'.",restrictions:["integer","string","image","identifier"]},{name:"align-content",browsers:["E12","FF28","S9","C29","IE11","O16"],values:[{name:"center",description:"Lines are packed toward the center of the flex container."},{name:"flex-end",description:"Lines are packed toward the end of the flex container."},{name:"flex-start",description:"Lines are packed toward the start of the flex container."},{name:"space-around",description:"Lines are evenly distributed in the flex container, with half-size spaces on either end."},{name:"space-between",description:"Lines are evenly distributed in the flex container."},{name:"stretch",description:"Lines stretch to take up the remaining space."},{name:"start"},{name:"end"},{name:"normal"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"space-around"},{name:"space-between"},{name:"space-evenly"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | | | ? ",relevance:66,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-content"}],description:"Aligns a flex container's lines within the flex container when there is extra space in the cross-axis, similar to how 'justify-content' aligns individual items within the main-axis.",restrictions:["enum"]},{name:"align-items",browsers:["E12","FF20","S9","C29","IE11","O16"],values:[{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"normal"},{name:"start"},{name:"end"},{name:"self-start"},{name:"self-end"},{name:"first baseline"},{name:"last baseline"},{name:"stretch"},{name:"safe"},{name:"unsafe"}],syntax:"normal | stretch | | [ ? ]",relevance:87,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-items"}],description:"Aligns flex items along the cross axis of the current line of the flex container.",restrictions:["enum"]},{name:"justify-items",browsers:["E12","FF20","S9","C52","IE11","O12.1"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"safe"},{name:"unsafe"},{name:"legacy"}],syntax:"normal | stretch | | ? [ | left | right ] | legacy | legacy && [ left | right | center ]",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-items"}],description:"Defines the default justify-self for all items of the box, giving them the default way of justifying each box along the appropriate axis",restrictions:["enum"]},{name:"justify-self",browsers:["E16","FF45","S10.1","C57","IE10","O44"],values:[{name:"auto"},{name:"normal"},{name:"end"},{name:"start"},{name:"flex-end",description:'"Flex items are packed toward the end of the line."'},{name:"flex-start",description:'"Flex items are packed toward the start of the line."'},{name:"self-end",description:"The item is packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis."},{name:"self-start",description:"The item is packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.."},{name:"center",description:"The items are packed flush to each other toward the center of the of the alignment container."},{name:"left"},{name:"right"},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"save"},{name:"unsave"}],syntax:"auto | normal | stretch | | ? [ | left | right ]",relevance:55,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/justify-self"}],description:"Defines the way of justifying a box inside its container along the appropriate axis.",restrictions:["enum"]},{name:"align-self",browsers:["E12","FF20","S9","C29","IE10","O12.1"],values:[{name:"auto",description:"Computes to the value of 'align-items' on the element's parent, or 'stretch' if the element has no parent. On absolutely positioned elements, it computes to itself."},{name:"normal"},{name:"self-end"},{name:"self-start"},{name:"baseline",description:"If the flex item's inline axis is the same as the cross axis, this value is identical to 'flex-start'. Otherwise, it participates in baseline alignment."},{name:"center",description:"The flex item's margin box is centered in the cross axis within the line."},{name:"flex-end",description:"The cross-end margin edge of the flex item is placed flush with the cross-end edge of the line."},{name:"flex-start",description:"The cross-start margin edge of the flex item is placed flush with the cross-start edge of the line."},{name:"stretch",description:"If the cross size property of the flex item computes to auto, and neither of the cross-axis margins are auto, the flex item is stretched."},{name:"baseline"},{name:"first baseline"},{name:"last baseline"},{name:"safe"},{name:"unsafe"}],syntax:"auto | normal | stretch | | ? ",relevance:73,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/align-self"}],description:"Allows the default alignment along the cross axis to be overridden for individual flex items.",restrictions:["enum"]},{name:"all",browsers:["E79","FF27","S9.1","C37","O24"],values:[],syntax:"initial | inherit | unset | revert | revert-layer",relevance:53,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/all"}],description:"Shorthand that resets all properties except 'direction' and 'unicode-bidi'.",restrictions:["enum"]},{name:"alt",browsers:["S9"],values:[],relevance:50,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/alt"}],description:"Provides alternative text for assistive technology to replace the generated content of a ::before or ::after element.",restrictions:["string","enum"]},{name:"animation",browsers:["E12","FF16","S9","C43","IE10","O30"],values:[{name:"alternate",description:"The animation cycle iterations that are odd counts are played in the normal direction, and the animation cycle iterations that are even counts are played in a reverse direction."},{name:"alternate-reverse",description:"The animation cycle iterations that are odd counts are played in the reverse direction, and the animation cycle iterations that are even counts are played in a normal direction."},{name:"backwards",description:"The beginning property value (as defined in the first @keyframes at-rule) is applied before the animation is displayed, during the period defined by 'animation-delay'."},{name:"both",description:"Both forwards and backwards fill modes are applied."},{name:"forwards",description:"The final property value (as defined in the last @keyframes at-rule) is maintained after the animation completes."},{name:"infinite",description:"Causes the animation to repeat forever."},{name:"none",description:"No animation is performed"},{name:"normal",description:"Normal playback."},{name:"reverse",description:"All iterations of the animation are played in the reverse direction from the way they were specified."}],syntax:"#",relevance:82,references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/CSS/animation"}],description:"Shorthand property combines six of the animation properties into a single property.",restrictions:["time","timing-function","enum","identifier","number"]},{name:"animation-delay",browsers:["E12","FF16","S9","C43","IE10","O30"],syntax:"