clone

a browser-first diagram editor with live svg previews, local drafts and encrypted, accountless sharing

feat(diagram.zip): isolate complete renderer plane

Dami committed 4c1c98c
commit
4c1c98c1a4c1140d5cef7c0fd297b2f8fa43eb3d
parent
e41cd3671279dec99c62b08317887628802a4d73
author
Dami <dami.etoile@gmail.com>
78 files changed, +3308 -5271
D.github/workflows/diagramzip-docs.yml50-
Mdiagramzip-api/src/index.ts84+-
Mdiagramzip-api/test/aliases.test.ts19+
Mdiagramzip-api/worker-configuration.d.ts9+-
Mdiagramzip-api/wrangler.jsonc3-
Adiagramzip-client-units/bpmn/.gitignore2+
Adiagramzip-client-units/bpmn/package-lock.json730++++++
Adiagramzip-client-units/bpmn/package.json17+
Adiagramzip-client-units/bpmn/scripts/build.mjs22+
Adiagramzip-client-units/bpmn/src/frame.js63+
Adiagramzip-client-units/bpmn/unit/_headers12+
Adiagramzip-client-units/bpmn/unit/index.html14+
Adiagramzip-client-units/bpmn/unit/worker.js33+
Adiagramzip-client-units/bpmn/wrangler.jsonc15+
Adiagramzip-client-units/mermaid/.gitignore2+
Adiagramzip-client-units/mermaid/package-lock.json1616+++++++++++++
Adiagramzip-client-units/mermaid/package.json17+
Adiagramzip-client-units/mermaid/scripts/build.mjs22+
Adiagramzip-client-units/mermaid/src/frame.js63+
Adiagramzip-client-units/mermaid/unit/_headers12+
Adiagramzip-client-units/mermaid/unit/index.html14+
Adiagramzip-client-units/mermaid/unit/worker.js33+
Adiagramzip-client-units/mermaid/wrangler.jsonc15+
Mdiagramzip-docs/docs/collaboration/sharing.md5+
Mdiagramzip-docs/docs/collaboration/working-and-saved-state.md5+
Mdiagramzip-docs/docs/create/index.md4+
Mdiagramzip-render/README.md48+-
Mdiagramzip-render/package.json1+
Adiagramzip-render/scripts/deploy-compatibility-units.mjs41+
Mdiagramzip-render/scripts/smoke-units.mjs28+-
Mdiagramzip-render/src/catalog.ts11+
Adiagramzip-render/src/units/compatibility.ts14+
Adiagramzip-render/wrangler.compatibility/actdiag.jsonc1+
Adiagramzip-render/wrangler.compatibility/blockdiag.jsonc1+
Adiagramzip-render/wrangler.compatibility/c4plantuml.jsonc1+
Adiagramzip-render/wrangler.compatibility/d2.jsonc1+
Adiagramzip-render/wrangler.compatibility/dbml.jsonc1+
Adiagramzip-render/wrangler.compatibility/diagramsnet.jsonc1+
Adiagramzip-render/wrangler.compatibility/ditaa.jsonc1+
Adiagramzip-render/wrangler.compatibility/erd.jsonc1+
Adiagramzip-render/wrangler.compatibility/goat.jsonc1+
Adiagramzip-render/wrangler.compatibility/graphviz.jsonc1+
Adiagramzip-render/wrangler.compatibility/nwdiag.jsonc1+
Adiagramzip-render/wrangler.compatibility/packetdiag.jsonc1+
Adiagramzip-render/wrangler.compatibility/pikchr.jsonc1+
Adiagramzip-render/wrangler.compatibility/plantuml.jsonc1+
Adiagramzip-render/wrangler.compatibility/rackdiag.jsonc1+
Adiagramzip-render/wrangler.compatibility/seqdiag.jsonc1+
Adiagramzip-render/wrangler.compatibility/structurizr.jsonc1+
Adiagramzip-render/wrangler.compatibility/svgbob.jsonc1+
Adiagramzip-render/wrangler.compatibility/symbolator.jsonc1+
Adiagramzip-render/wrangler.compatibility/tikz.jsonc1+
Adiagramzip-render/wrangler.compatibility/umlet.jsonc1+
Adiagramzip-render/wrangler.compatibility/wireviz.jsonc1+
Mdiagramzip/PERSISTENCE.md22+-
Ddiagramzip/public/renderer-frame.html14-
Mdiagramzip/src/client-renderers.js12+-
Mdiagramzip/src/diagram-types.js7+
Mdiagramzip/src/main.js68+-
Mdiagramzip/src/persistence.js11+-
Mdiagramzip/src/preview.js47+-
Ddiagramzip/src/renderer-frame.js69-
Mdiagramzip/src/renderer-units.js22+
Mdiagramzip/src/style.css27+-
Mdiagramzip/test/client-renderers.test.js15+-
Mdiagramzip/test/diagram-types.test.js11+-
Mdiagramzip/test/persistence.test.js10+
Mdiagramzip/test/renderer-units.test.js11+-
Ddiagramzip/vite.renderer.config.js18-
Mexcalidraw/diagramzip-unit/frame.js5+-
Mpackage-lock.json1480+------------
Mpackage.json4+-
Rserver/src/main/resources/web/diagramzip/assets/index-C1W5uCoO.js → server/src/main/resources/web/diagramzip/assets/index-C8MuTfFX.js62+-
Aserver/src/main/resources/web/diagramzip/assets/index-D7UQlw3g.css1+
Dserver/src/main/resources/web/diagramzip/assets/index-DEH-xFUd.css1-
Mserver/src/main/resources/web/diagramzip/index.html4+-
Dserver/src/main/resources/web/diagramzip/renderer-frame-v2.js3598------------------------------
Dserver/src/main/resources/web/diagramzip/renderer-frame.html14-
D .github/workflows/diagramzip-docs.yml +0 -50
M diagramzip-api/src/index.ts +79 -5
@@ -23,6 +23,18 @@ const encoder = new TextEncoder()
2323 const aliasPathPattern = /^\/api\/v1\/aliases\/([A-Za-z0-9_-]{16})\/?$/2424 const renderPathPattern = /^\/api\/v1\/aliases\/([A-Za-z0-9_-]{16})\/renders\/(svg|png)\/?$/2525 const MAX_RENDER_BYTES = 12 * 1024 * 102426+const rendererUnitPattern = /^[a-z][a-z0-9-]{0,31}$/27+const rendererBuildPattern = /^[A-Za-z0-9][A-Za-z0-9._@+-]{0,127}$/28+29+interface RendererIdentity {30+ unit: string31+ build: string32+ pipeline: string[]33+}34+35+interface RenderHead extends RendererIdentity {36+ objectKey: string37+}2638 2739 function responseHeaders(extra?: HeadersInit): Headers {2840 const headers = new Headers(extra)
@@ -324,9 +336,56 @@ async function updateAlias(request: Request, env: Env, aliasId: string): Promise
324336 ), { headers: { ETag: `"${revision}"` } })325337 }326338 327-function renderObjectKey(env: Env, record: AliasRecord, format: 'svg' | 'png'): string {339+function rendererIdentity(request: Request): RendererIdentity {340+ const unit = request.headers.get('X-Renderer-Unit')?.trim() ?? ''341+ const build = request.headers.get('X-Renderer-Build')?.trim() ?? ''342+ const pipeline = (request.headers.get('X-Renderer-Pipeline') ?? '')343+ .split(',')344+ .map(value => value.trim())345+ .filter(Boolean)346+ if (!rendererUnitPattern.test(unit)347+ || !rendererBuildPattern.test(build)348+ || pipeline.length < 1349+ || pipeline.length > 8350+ || pipeline[0] !== unit351+ || pipeline.some(value => !rendererUnitPattern.test(value))) {352+ throw new RequestError(400, 'invalid_renderer_identity', 'Renderer unit, build, and pipeline headers are required.')353+ }354+ return { unit, build, pipeline }355+}356+357+function renderObjectKey(record: AliasRecord, format: 'svg' | 'png', renderer: RendererIdentity): string {328358 const extension = record.mode === 'locked' ? `${format}.enc` : format329- return `renders/${record.mode}/${env.RENDERER_BUILD}/${record.render_id}.${extension}`359+ return `renders/${record.mode}/${renderer.unit}/${renderer.build}/${record.render_id}.${extension}`360+}361+362+function renderHeadKey(record: AliasRecord, format: 'svg' | 'png'): string {363+ return `render-heads/${record.mode}/${record.render_id}.${format}.json`364+}365+366+function normalizeRenderHead(value: unknown, record: AliasRecord, format: 'svg' | 'png'): RenderHead {367+ if (!value || typeof value !== 'object') throw new Error(`Invalid render head for ${record.render_id}.`)368+ const candidate = value as Record<string, unknown>369+ const identity = {370+ unit: candidate.unit,371+ build: candidate.build,372+ pipeline: candidate.pipeline,373+ }374+ if (typeof identity.unit !== 'string'375+ || typeof identity.build !== 'string'376+ || !Array.isArray(identity.pipeline)377+ || identity.pipeline.some(value => typeof value !== 'string')378+ || !rendererUnitPattern.test(identity.unit)379+ || !rendererBuildPattern.test(identity.build)380+ || identity.pipeline.length < 1381+ || identity.pipeline.length > 8382+ || identity.pipeline[0] !== identity.unit383+ || identity.pipeline.some(value => typeof value !== 'string' || !rendererUnitPattern.test(value))) {384+ throw new Error(`Invalid render head for ${record.render_id}.`)385+ }386+ const expectedKey = renderObjectKey(record, format, identity as RendererIdentity)387+ if (candidate.objectKey !== expectedKey) throw new Error(`Invalid render head for ${record.render_id}.`)388+ return { ...(identity as RendererIdentity), objectKey: expectedKey }330389 }331390 332391 async function readRenderBody(request: Request): Promise<Uint8Array> {
@@ -390,6 +449,7 @@ async function putRender(
390449 format: 'svg' | 'png',391450 ): Promise<Response> {392451 const record = await authorizeRenderWrite(request, env, aliasId)452+ const renderer = rendererIdentity(request)393453 const mediaType = format === 'svg' ? 'image/svg+xml' : 'image/png'394454 const bytes = await readRenderBody(request)395455 if (bytes.byteLength === 0) throw new RequestError(400, 'invalid_render', 'Rendered image is empty.')
@@ -412,7 +472,8 @@ async function putRender(
412472 throw new RequestError(415, 'unsupported_media_type', `Render must use ${mediaType}.`)413473 }414474 415- await env.CONTENT.put(renderObjectKey(env, record, format), storedBytes, {475+ const objectKey = renderObjectKey(record, format, renderer)476+ await env.CONTENT.put(objectKey, storedBytes, {416477 onlyIf: { etagDoesNotMatch: '*' },417478 httpMetadata: { contentType },418479 customMetadata: {
@@ -420,9 +481,16 @@ async function putRender(
420481 renderId: record.render_id,421482 mode: record.mode,422483 format,423- rendererBuild: env.RENDERER_BUILD,484+ rendererUnit: renderer.unit,485+ rendererBuild: renderer.build,486+ rendererPipeline: renderer.pipeline.join(','),424487 },425488 })489+ const head: RenderHead = { ...renderer, objectKey }490+ await env.CONTENT.put(renderHeadKey(record, format), canonicalJson(head), {491+ httpMetadata: { contentType: 'application/json; charset=utf-8' },492+ customMetadata: { renderId: record.render_id, mode: record.mode, format },493+ })426494 return new Response(null, { status: 204, headers: responseHeaders() })427495 }428496
@@ -441,7 +509,10 @@ async function getRender(
441509 if (record.mode === 'open' && encryptedRequest) {442510 throw new RequestError(400, 'render_not_encrypted', 'This diagram render is not encrypted.')443511 }444- const object = await env.CONTENT.get(renderObjectKey(env, record, format))512+ const headObject = await env.CONTENT.get(renderHeadKey(record, format))513+ if (headObject === null) throw new RequestError(404, 'render_not_found', 'Saved render not found.')514+ const head = normalizeRenderHead(await headObject.json<unknown>(), record, format)515+ const object = await env.CONTENT.get(head.objectKey)445516 if (object === null) throw new RequestError(404, 'render_not_found', 'Saved render not found.')446517 if (request.headers.get('If-None-Match') === object.httpEtag) {447518 return new Response(null, { status: 304, headers: { ETag: object.httpEtag } })
@@ -451,6 +522,9 @@ async function getRender(
451522 headers.set('ETag', object.httpEtag)452523 headers.set('X-Content-Type-Options', 'nosniff')453524 headers.set('Content-Security-Policy', "default-src 'none'; sandbox")525+ headers.set('X-Renderer-Unit', head.unit)526+ headers.set('X-Renderer-Build', head.build)527+ headers.set('X-Renderer-Pipeline', head.pipeline.join(','))454528 headers.set('Cache-Control', record.mode === 'open'455529 ? 'public, max-age=60, stale-while-revalidate=300'456530 : 'no-store')
M diagramzip-api/test/aliases.test.ts +19 -0
@@ -4,6 +4,11 @@ import { beforeAll, describe, expect, it } from 'vitest'
44 55 const capability = 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'66 const otherCapability = 'BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBA'7+const rendererHeaders = {8+ 'X-Renderer-Unit': 'd2',9+ 'X-Renderer-Build': 'd2-compat-unit-1',10+ 'X-Renderer-Pipeline': 'd2',11+}712 const worker = (exports as unknown as {813 default: { fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response> }914 }).default
@@ -291,6 +296,7 @@ describe('open aliases', () => {
291296 'Content-Type': 'image/svg+xml',292297 'If-Match': '"1"',293298 'X-Render-Id': renderId,299+ ...rendererHeaders,294300 },295301 body: svg,296302 })
@@ -300,7 +306,18 @@ describe('open aliases', () => {
300306 expect(render.status).toBe(200)301307 expect(render.headers.get('Content-Type')).toBe('image/svg+xml')302308 expect(render.headers.get('Cache-Control')).toContain('max-age=60')309+ expect(render.headers.get('X-Renderer-Unit')).toBe('d2')310+ expect(render.headers.get('X-Renderer-Build')).toBe('d2-compat-unit-1')311+ expect(render.headers.get('X-Renderer-Pipeline')).toBe('d2')303312 expect(await render.text()).toBe(svg)313+314+ const head = await env.CONTENT.get(`render-heads/open/${renderId}.svg.json`)315+ expect(await head?.json()).toEqual({316+ unit: 'd2',317+ build: 'd2-compat-unit-1',318+ pipeline: ['d2'],319+ objectKey: `renders/open/d2/d2-compat-unit-1/${renderId}.svg`,320+ })304321 })305322 306323 it('stores locked renders opaquely and refuses an embed response', async () => {
@@ -314,6 +331,7 @@ describe('open aliases', () => {
314331 'Content-Type': 'application/json',315332 'If-Match': '"1"',316333 'X-Render-Id': renderId,334+ ...rendererHeaders,317335 },318336 body: JSON.stringify(encryptedRender),319337 })
@@ -349,6 +367,7 @@ describe('open aliases', () => {
349367 'Content-Type': 'image/svg+xml',350368 'If-Match': '"1"',351369 'X-Render-Id': renderId,370+ ...rendererHeaders,352371 },353372 body: '<svg xmlns="http://www.w3.org/2000/svg"></svg>',354373 })
M diagramzip-api/worker-configuration.d.ts +1 -8
M diagramzip-api/wrangler.jsonc +0 -3
A diagramzip-client-units/bpmn/.gitignore +2 -0
@@ -0,0 +1,2 @@
1+node_modules/2+dist/
A diagramzip-client-units/bpmn/package-lock.json +730 -0
@@ -0,0 +1,730 @@
1+{2+ "name": "@diagramzip/renderer-bpmn",3+ "version": "1.0.0",4+ "lockfileVersion": 3,5+ "requires": true,6+ "packages": {7+ "": {8+ "name": "@diagramzip/renderer-bpmn",9+ "version": "1.0.0",10+ "dependencies": {11+ "bpmn-js": "18.25.1"12+ },13+ "devDependencies": {14+ "esbuild": "0.28.1"15+ },16+ "engines": {17+ "node": ">=24"18+ }19+ },20+ "node_modules/@bpmn-io/diagram-js-ui": {21+ "version": "0.2.4",22+ "resolved": "https://registry.npmjs.org/@bpmn-io/diagram-js-ui/-/diagram-js-ui-0.2.4.tgz",23+ "integrity": "sha512-I678ZGtoH7z7FgzFhzzppM9ThsJ3Lh83kW3GjhjG3xyYciIPYHMaHK1MABP8F69H9pFZpViM6t4qUo8dwrVz0w==",24+ "license": "MIT",25+ "dependencies": {26+ "htm": "^3.1.1",27+ "preact": "^10.29.2"28+ }29+ },30+ "node_modules/@esbuild/aix-ppc64": {31+ "version": "0.28.1",32+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",33+ "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",34+ "cpu": [35+ "ppc64"36+ ],37+ "dev": true,38+ "license": "MIT",39+ "optional": true,40+ "os": [41+ "aix"42+ ],43+ "engines": {44+ "node": ">=18"45+ }46+ },47+ "node_modules/@esbuild/android-arm": {48+ "version": "0.28.1",49+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",50+ "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",51+ "cpu": [52+ "arm"53+ ],54+ "dev": true,55+ "license": "MIT",56+ "optional": true,57+ "os": [58+ "android"59+ ],60+ "engines": {61+ "node": ">=18"62+ }63+ },64+ "node_modules/@esbuild/android-arm64": {65+ "version": "0.28.1",66+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",67+ "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",68+ "cpu": [69+ "arm64"70+ ],71+ "dev": true,72+ "license": "MIT",73+ "optional": true,74+ "os": [75+ "android"76+ ],77+ "engines": {78+ "node": ">=18"79+ }80+ },81+ "node_modules/@esbuild/android-x64": {82+ "version": "0.28.1",83+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",84+ "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",85+ "cpu": [86+ "x64"87+ ],88+ "dev": true,89+ "license": "MIT",90+ "optional": true,91+ "os": [92+ "android"93+ ],94+ "engines": {95+ "node": ">=18"96+ }97+ },98+ "node_modules/@esbuild/darwin-arm64": {99+ "version": "0.28.1",100+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",101+ "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",102+ "cpu": [103+ "arm64"104+ ],105+ "dev": true,106+ "license": "MIT",107+ "optional": true,108+ "os": [109+ "darwin"110+ ],111+ "engines": {112+ "node": ">=18"113+ }114+ },115+ "node_modules/@esbuild/darwin-x64": {116+ "version": "0.28.1",117+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",118+ "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",119+ "cpu": [120+ "x64"121+ ],122+ "dev": true,123+ "license": "MIT",124+ "optional": true,125+ "os": [126+ "darwin"127+ ],128+ "engines": {129+ "node": ">=18"130+ }131+ },132+ "node_modules/@esbuild/freebsd-arm64": {133+ "version": "0.28.1",134+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",135+ "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",136+ "cpu": [137+ "arm64"138+ ],139+ "dev": true,140+ "license": "MIT",141+ "optional": true,142+ "os": [143+ "freebsd"144+ ],145+ "engines": {146+ "node": ">=18"147+ }148+ },149+ "node_modules/@esbuild/freebsd-x64": {150+ "version": "0.28.1",151+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",152+ "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",153+ "cpu": [154+ "x64"155+ ],156+ "dev": true,157+ "license": "MIT",158+ "optional": true,159+ "os": [160+ "freebsd"161+ ],162+ "engines": {163+ "node": ">=18"164+ }165+ },166+ "node_modules/@esbuild/linux-arm": {167+ "version": "0.28.1",168+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",169+ "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",170+ "cpu": [171+ "arm"172+ ],173+ "dev": true,174+ "license": "MIT",175+ "optional": true,176+ "os": [177+ "linux"178+ ],179+ "engines": {180+ "node": ">=18"181+ }182+ },183+ "node_modules/@esbuild/linux-arm64": {184+ "version": "0.28.1",185+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",186+ "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",187+ "cpu": [188+ "arm64"189+ ],190+ "dev": true,191+ "license": "MIT",192+ "optional": true,193+ "os": [194+ "linux"195+ ],196+ "engines": {197+ "node": ">=18"198+ }199+ },200+ "node_modules/@esbuild/linux-ia32": {201+ "version": "0.28.1",202+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",203+ "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",204+ "cpu": [205+ "ia32"206+ ],207+ "dev": true,208+ "license": "MIT",209+ "optional": true,210+ "os": [211+ "linux"212+ ],213+ "engines": {214+ "node": ">=18"215+ }216+ },217+ "node_modules/@esbuild/linux-loong64": {218+ "version": "0.28.1",219+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",220+ "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",221+ "cpu": [222+ "loong64"223+ ],224+ "dev": true,225+ "license": "MIT",226+ "optional": true,227+ "os": [228+ "linux"229+ ],230+ "engines": {231+ "node": ">=18"232+ }233+ },234+ "node_modules/@esbuild/linux-mips64el": {235+ "version": "0.28.1",236+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",237+ "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",238+ "cpu": [239+ "mips64el"240+ ],241+ "dev": true,242+ "license": "MIT",243+ "optional": true,244+ "os": [245+ "linux"246+ ],247+ "engines": {248+ "node": ">=18"249+ }250+ },251+ "node_modules/@esbuild/linux-ppc64": {252+ "version": "0.28.1",253+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",254+ "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",255+ "cpu": [256+ "ppc64"257+ ],258+ "dev": true,259+ "license": "MIT",260+ "optional": true,261+ "os": [262+ "linux"263+ ],264+ "engines": {265+ "node": ">=18"266+ }267+ },268+ "node_modules/@esbuild/linux-riscv64": {269+ "version": "0.28.1",270+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",271+ "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",272+ "cpu": [273+ "riscv64"274+ ],275+ "dev": true,276+ "license": "MIT",277+ "optional": true,278+ "os": [279+ "linux"280+ ],281+ "engines": {282+ "node": ">=18"283+ }284+ },285+ "node_modules/@esbuild/linux-s390x": {286+ "version": "0.28.1",287+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",288+ "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",289+ "cpu": [290+ "s390x"291+ ],292+ "dev": true,293+ "license": "MIT",294+ "optional": true,295+ "os": [296+ "linux"297+ ],298+ "engines": {299+ "node": ">=18"300+ }301+ },302+ "node_modules/@esbuild/linux-x64": {303+ "version": "0.28.1",304+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",305+ "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",306+ "cpu": [307+ "x64"308+ ],309+ "dev": true,310+ "license": "MIT",311+ "optional": true,312+ "os": [313+ "linux"314+ ],315+ "engines": {316+ "node": ">=18"317+ }318+ },319+ "node_modules/@esbuild/netbsd-arm64": {320+ "version": "0.28.1",321+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",322+ "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",323+ "cpu": [324+ "arm64"325+ ],326+ "dev": true,327+ "license": "MIT",328+ "optional": true,329+ "os": [330+ "netbsd"331+ ],332+ "engines": {333+ "node": ">=18"334+ }335+ },336+ "node_modules/@esbuild/netbsd-x64": {337+ "version": "0.28.1",338+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",339+ "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",340+ "cpu": [341+ "x64"342+ ],343+ "dev": true,344+ "license": "MIT",345+ "optional": true,346+ "os": [347+ "netbsd"348+ ],349+ "engines": {350+ "node": ">=18"351+ }352+ },353+ "node_modules/@esbuild/openbsd-arm64": {354+ "version": "0.28.1",355+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",356+ "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",357+ "cpu": [358+ "arm64"359+ ],360+ "dev": true,361+ "license": "MIT",362+ "optional": true,363+ "os": [364+ "openbsd"365+ ],366+ "engines": {367+ "node": ">=18"368+ }369+ },370+ "node_modules/@esbuild/openbsd-x64": {371+ "version": "0.28.1",372+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",373+ "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",374+ "cpu": [375+ "x64"376+ ],377+ "dev": true,378+ "license": "MIT",379+ "optional": true,380+ "os": [381+ "openbsd"382+ ],383+ "engines": {384+ "node": ">=18"385+ }386+ },387+ "node_modules/@esbuild/openharmony-arm64": {388+ "version": "0.28.1",389+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",390+ "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",391+ "cpu": [392+ "arm64"393+ ],394+ "dev": true,395+ "license": "MIT",396+ "optional": true,397+ "os": [398+ "openharmony"399+ ],400+ "engines": {401+ "node": ">=18"402+ }403+ },404+ "node_modules/@esbuild/sunos-x64": {405+ "version": "0.28.1",406+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",407+ "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",408+ "cpu": [409+ "x64"410+ ],411+ "dev": true,412+ "license": "MIT",413+ "optional": true,414+ "os": [415+ "sunos"416+ ],417+ "engines": {418+ "node": ">=18"419+ }420+ },421+ "node_modules/@esbuild/win32-arm64": {422+ "version": "0.28.1",423+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",424+ "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",425+ "cpu": [426+ "arm64"427+ ],428+ "dev": true,429+ "license": "MIT",430+ "optional": true,431+ "os": [432+ "win32"433+ ],434+ "engines": {435+ "node": ">=18"436+ }437+ },438+ "node_modules/@esbuild/win32-ia32": {439+ "version": "0.28.1",440+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",441+ "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",442+ "cpu": [443+ "ia32"444+ ],445+ "dev": true,446+ "license": "MIT",447+ "optional": true,448+ "os": [449+ "win32"450+ ],451+ "engines": {452+ "node": ">=18"453+ }454+ },455+ "node_modules/@esbuild/win32-x64": {456+ "version": "0.28.1",457+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",458+ "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",459+ "cpu": [460+ "x64"461+ ],462+ "dev": true,463+ "license": "MIT",464+ "optional": true,465+ "os": [466+ "win32"467+ ],468+ "engines": {469+ "node": ">=18"470+ }471+ },472+ "node_modules/bpmn-js": {473+ "version": "18.25.1",474+ "resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-18.25.1.tgz",475+ "integrity": "sha512-wT/TjzUQw3o5vU6nI2tytOhOm9atf2tOgCdCKF6sQUvokZ0nOEH7yfE9IvwKXclfdUxvdawgU80h909hvQJ9hw==",476+ "license": "SEE LICENSE IN LICENSE",477+ "dependencies": {478+ "bpmn-moddle": "^10.0.0",479+ "diagram-js": "^15.24.0",480+ "diagram-js-direct-editing": "^3.5.1",481+ "ids": "^3.0.2",482+ "inherits-browser": "^0.1.0",483+ "min-dash": "^5.1.0",484+ "min-dom": "^5.3.0",485+ "tiny-svg": "^4.1.4"486+ },487+ "engines": {488+ "node": "*"489+ }490+ },491+ "node_modules/bpmn-moddle": {492+ "version": "10.1.0",493+ "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-10.1.0.tgz",494+ "integrity": "sha512-k9Vl97hiFwlr4bJTQ5+pZp21bmrQwil5jnMQ30wF8vney2/WnIcJmWwYzRTAKFVoViTGowtDfbO5rGEF4viO0w==",495+ "license": "MIT",496+ "dependencies": {497+ "min-dash": "^5.1.0",498+ "moddle": "^8.2.1",499+ "moddle-xml": "^12.1.0"500+ },501+ "engines": {502+ "node": ">= 20.12"503+ }504+ },505+ "node_modules/clsx": {506+ "version": "2.1.1",507+ "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",508+ "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",509+ "license": "MIT",510+ "engines": {511+ "node": ">=6"512+ }513+ },514+ "node_modules/diagram-js": {515+ "version": "15.24.1",516+ "resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-15.24.1.tgz",517+ "integrity": "sha512-0zlPffk8pGdbUmt0RQH32N7dIbgYuLwkFlZTCi28kRSkb37GdEjONjXKs+NluZvWeLsY1hqSyq4le19ZeFE19Q==",518+ "license": "MIT",519+ "dependencies": {520+ "@bpmn-io/diagram-js-ui": "^0.2.4",521+ "clsx": "^2.1.1",522+ "didi": "^11.0.0",523+ "inherits-browser": "^0.1.0",524+ "min-dash": "^5.1.0",525+ "min-dom": "^5.3.0",526+ "object-refs": "^0.4.0",527+ "path-intersection": "^4.1.0",528+ "tiny-svg": "^4.1.4"529+ },530+ "engines": {531+ "node": "*"532+ }533+ },534+ "node_modules/diagram-js-direct-editing": {535+ "version": "3.5.1",536+ "resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-3.5.1.tgz",537+ "integrity": "sha512-fEQCQ/x5oKVV0m7Nmgv7i85Vhw+kJkKNXF8zcV5Vm0KwF8x/8e3Ax0aJgdXt8/fDPymEkY8HmZweXIipCeeh+g==",538+ "license": "MIT",539+ "dependencies": {540+ "min-dash": "^5.0.0",541+ "min-dom": "^5.3.0"542+ },543+ "engines": {544+ "node": "*"545+ },546+ "peerDependencies": {547+ "diagram-js": "*"548+ }549+ },550+ "node_modules/didi": {551+ "version": "11.0.0",552+ "resolved": "https://registry.npmjs.org/didi/-/didi-11.0.0.tgz",553+ "integrity": "sha512-PzCfRzQttvFpVcYMbSF7h8EsWjeJpVjWH4qDhB5LkMi1ILvHq4Ob0vhM2wLFziPkbUBi+PAo7ODbe2sacR7nJQ==",554+ "license": "MIT",555+ "engines": {556+ "node": ">= 20.12"557+ }558+ },559+ "node_modules/domify": {560+ "version": "3.0.0",561+ "resolved": "https://registry.npmjs.org/domify/-/domify-3.0.0.tgz",562+ "integrity": "sha512-bs2yO68JDFOm6rKv8f0EnrM2cENduhRkpqOtt/s5l5JBA/eqGBZCzLPmdYoHtJ6utgLGgcBajFsEQbl12pT0lQ==",563+ "license": "MIT",564+ "engines": {565+ "node": ">=20"566+ },567+ "funding": {568+ "url": "https://github.com/sponsors/sindresorhus"569+ }570+ },571+ "node_modules/esbuild": {572+ "version": "0.28.1",573+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",574+ "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",575+ "dev": true,576+ "hasInstallScript": true,577+ "license": "MIT",578+ "bin": {579+ "esbuild": "bin/esbuild"580+ },581+ "engines": {582+ "node": ">=18"583+ },584+ "optionalDependencies": {585+ "@esbuild/aix-ppc64": "0.28.1",586+ "@esbuild/android-arm": "0.28.1",587+ "@esbuild/android-arm64": "0.28.1",588+ "@esbuild/android-x64": "0.28.1",589+ "@esbuild/darwin-arm64": "0.28.1",590+ "@esbuild/darwin-x64": "0.28.1",591+ "@esbuild/freebsd-arm64": "0.28.1",592+ "@esbuild/freebsd-x64": "0.28.1",593+ "@esbuild/linux-arm": "0.28.1",594+ "@esbuild/linux-arm64": "0.28.1",595+ "@esbuild/linux-ia32": "0.28.1",596+ "@esbuild/linux-loong64": "0.28.1",597+ "@esbuild/linux-mips64el": "0.28.1",598+ "@esbuild/linux-ppc64": "0.28.1",599+ "@esbuild/linux-riscv64": "0.28.1",600+ "@esbuild/linux-s390x": "0.28.1",601+ "@esbuild/linux-x64": "0.28.1",602+ "@esbuild/netbsd-arm64": "0.28.1",603+ "@esbuild/netbsd-x64": "0.28.1",604+ "@esbuild/openbsd-arm64": "0.28.1",605+ "@esbuild/openbsd-x64": "0.28.1",606+ "@esbuild/openharmony-arm64": "0.28.1",607+ "@esbuild/sunos-x64": "0.28.1",608+ "@esbuild/win32-arm64": "0.28.1",609+ "@esbuild/win32-ia32": "0.28.1",610+ "@esbuild/win32-x64": "0.28.1"611+ }612+ },613+ "node_modules/htm": {614+ "version": "3.1.1",615+ "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",616+ "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==",617+ "license": "Apache-2.0"618+ },619+ "node_modules/ids": {620+ "version": "3.0.2",621+ "resolved": "https://registry.npmjs.org/ids/-/ids-3.0.2.tgz",622+ "integrity": "sha512-t6YJP4mdC+GHF96Nbis/4FEANhP/8VWmYMvUuYpXvSdrhg5hpIVbq2XZlOA3UWTbtdwPCi0q7jEXOdHkAnqOnw==",623+ "license": "MIT",624+ "engines": {625+ "node": ">= 20.12"626+ }627+ },628+ "node_modules/inherits-browser": {629+ "version": "0.1.0",630+ "resolved": "https://registry.npmjs.org/inherits-browser/-/inherits-browser-0.1.0.tgz",631+ "integrity": "sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==",632+ "license": "ISC"633+ },634+ "node_modules/min-dash": {635+ "version": "5.1.0",636+ "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-5.1.0.tgz",637+ "integrity": "sha512-HAvN6XzmCQj+js43G9sJRRw8kj/7DvoxN7qhoIN9Xo5ZN1NMljtpyKs/NunXmw0QSWwlgZzNv6tLeEa4xaZ0tg==",638+ "license": "MIT"639+ },640+ "node_modules/min-dom": {641+ "version": "5.3.0",642+ "resolved": "https://registry.npmjs.org/min-dom/-/min-dom-5.3.0.tgz",643+ "integrity": "sha512-0w5FEBgPAyHhmFojW3zxd7we3D+m5XYS3E/06OyvxmbHJoiQVa4Nagj6RWvoAKYRw5xth6cP5TMePc5cR1M9hA==",644+ "license": "MIT",645+ "dependencies": {646+ "domify": "^3.0.0",647+ "min-dash": "^5.0.0"648+ }649+ },650+ "node_modules/moddle": {651+ "version": "8.2.1",652+ "resolved": "https://registry.npmjs.org/moddle/-/moddle-8.2.1.tgz",653+ "integrity": "sha512-20qzO/ZpMGO9j9gdQgXk9bfGxb9wA3JKnGth/21YZKODLrZE4RW/uVMIL5pTskYm34Z61DucBEPkq93qByNsBQ==",654+ "license": "MIT",655+ "dependencies": {656+ "min-dash": "^5.1.0"657+ }658+ },659+ "node_modules/moddle-xml": {660+ "version": "12.1.0",661+ "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-12.1.0.tgz",662+ "integrity": "sha512-+m50j9/MFGhvWbLJoKSSjQj3uv7SYm2w5i2lfv6goWarlWW1Nd0A31NYUXmKuWnEZ8Mm/bH1RZYtuf4x8ptY7g==",663+ "license": "MIT",664+ "dependencies": {665+ "min-dash": "^5.1.0",666+ "saxen": "^11.1.0"667+ },668+ "engines": {669+ "node": ">= 18"670+ },671+ "peerDependencies": {672+ "moddle": ">= 6.2.0"673+ }674+ },675+ "node_modules/object-refs": {676+ "version": "0.4.0",677+ "resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.4.0.tgz",678+ "integrity": "sha512-6kJqKWryKZmtte6QYvouas0/EIJKPI1/MMIuRsiBlNuhIMfqYTggzX2F1AJ2+cDs288xyi9GL7FyasHINR98BQ==",679+ "license": "MIT",680+ "engines": {681+ "node": "*"682+ }683+ },684+ "node_modules/path-intersection": {685+ "version": "4.1.0",686+ "resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-4.1.0.tgz",687+ "integrity": "sha512-urUP6WvhnxbHPdHYl6L7Yrc6+1ny6uOFKPCzPxTSUSYGHG0o94RmI7SvMMaScNAM5RtTf08bg4skc6/kjfne3A==",688+ "license": "MIT",689+ "engines": {690+ "node": ">= 14.20"691+ }692+ },693+ "node_modules/preact": {694+ "version": "10.29.8",695+ "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.8.tgz",696+ "integrity": "sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==",697+ "license": "MIT",698+ "funding": {699+ "type": "opencollective",700+ "url": "https://opencollective.com/preact"701+ },702+ "peerDependencies": {703+ "preact-render-to-string": ">=5"704+ },705+ "peerDependenciesMeta": {706+ "preact-render-to-string": {707+ "optional": true708+ }709+ }710+ },711+ "node_modules/saxen": {712+ "version": "11.1.1",713+ "resolved": "https://registry.npmjs.org/saxen/-/saxen-11.1.1.tgz",714+ "integrity": "sha512-J4BkmJFaM7VgE7pgkFGsNEcqqM3h7+Mz80vfLWFhx7uNOCOXIu6LLjQHYWNejdst3pf/3JUaBIG9+pkk1umlow==",715+ "license": "MIT",716+ "engines": {717+ "node": ">= 20.12"718+ }719+ },720+ "node_modules/tiny-svg": {721+ "version": "4.1.4",722+ "resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-4.1.4.tgz",723+ "integrity": "sha512-cBaEACCbouYrQc9RG+eTXnPYosX1Ijqty/I6DdXovwDd89Pwu4jcmpOR7BuFEF9YCcd7/AWwasE0207WMK7hdw==",724+ "license": "MIT",725+ "engines": {726+ "node": ">= 20"727+ }728+ }729+ }730+}
A diagramzip-client-units/bpmn/package.json +17 -0
A diagramzip-client-units/bpmn/scripts/build.mjs +22 -0
A diagramzip-client-units/bpmn/src/frame.js +63 -0
@@ -0,0 +1,63 @@
1+import BpmnViewer from 'bpmn-js/lib/Viewer'2+3+const CHANNEL = 'diagram.zip:renderer:v1'4+const ENGINE = 'bpmn'5+const VERSION = 'bpmn-js@18.25.1'6+const BUILD = 'bpmn-js-18.25.1-client-unit-1'7+const MAX_SOURCE_LENGTH = 524_2888+9+let queue = Promise.resolve()10+11+async function render(message) {12+ if (typeof message.source !== 'string' || message.source.length > MAX_SOURCE_LENGTH) {13+ throw new Error('BPMN source must be a string no larger than 512 KiB.')14+ }15+ const container = document.createElement('div')16+ Object.assign(container.style, { width: '1280px', height: '800px' })17+ document.body.append(container)18+ const viewer = new BpmnViewer({ container })19+ try {20+ await viewer.importXML(message.source)21+ const { svg } = await viewer.saveSVG()22+ return svg23+ } finally {24+ viewer.destroy()25+ container.remove()26+ }27+}28+29+window.addEventListener('message', event => {30+ const message = event.data31+ if (32+ event.source !== parent33+ || message?.channel !== CHANNEL34+ || message?.type !== 'render'35+ || message?.engine !== ENGINE36+ || typeof message?.requestId !== 'string'37+ ) return38+39+ queue = queue.then(async () => {40+ try {41+ parent.postMessage({42+ channel: CHANNEL,43+ type: 'result',44+ requestId: message.requestId,45+ ok: true,46+ svg: await render(message),47+ version: VERSION,48+ build: BUILD,49+ pipeline: [ENGINE],50+ }, '*')51+ } catch (error) {52+ parent.postMessage({53+ channel: CHANNEL,54+ type: 'result',55+ requestId: message.requestId,56+ ok: false,57+ error: error instanceof Error ? error.message.slice(0, 500) : 'BPMN rendering failed.',58+ }, '*')59+ }60+ })61+})62+63+parent.postMessage({ channel: CHANNEL, type: 'ready', engine: ENGINE, version: VERSION, build: BUILD }, '*')
A diagramzip-client-units/bpmn/unit/_headers +12 -0
A diagramzip-client-units/bpmn/unit/index.html +14 -0
A diagramzip-client-units/bpmn/unit/worker.js +33 -0
A diagramzip-client-units/bpmn/wrangler.jsonc +15 -0
A diagramzip-client-units/mermaid/.gitignore +2 -0
@@ -0,0 +1,2 @@
1+node_modules/2+dist/
A diagramzip-client-units/mermaid/package-lock.json +1616 -0
@@ -0,0 +1,1616 @@
1+{2+ "name": "@diagramzip/renderer-mermaid",3+ "version": "1.0.0",4+ "lockfileVersion": 3,5+ "requires": true,6+ "packages": {7+ "": {8+ "name": "@diagramzip/renderer-mermaid",9+ "version": "1.0.0",10+ "dependencies": {11+ "mermaid": "11.17.0"12+ },13+ "devDependencies": {14+ "esbuild": "0.28.1"15+ },16+ "engines": {17+ "node": ">=24"18+ }19+ },20+ "node_modules/@antfu/install-pkg": {21+ "version": "1.1.0",22+ "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz",23+ "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==",24+ "license": "MIT",25+ "dependencies": {26+ "package-manager-detector": "^1.3.0",27+ "tinyexec": "^1.0.1"28+ },29+ "funding": {30+ "url": "https://github.com/sponsors/antfu"31+ }32+ },33+ "node_modules/@braintree/sanitize-url": {34+ "version": "7.1.2",35+ "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz",36+ "integrity": "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==",37+ "license": "MIT"38+ },39+ "node_modules/@chevrotain/types": {40+ "version": "11.1.2",41+ "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.2.tgz",42+ "integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==",43+ "license": "Apache-2.0"44+ },45+ "node_modules/@esbuild/aix-ppc64": {46+ "version": "0.28.1",47+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.1.tgz",48+ "integrity": "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==",49+ "cpu": [50+ "ppc64"51+ ],52+ "dev": true,53+ "license": "MIT",54+ "optional": true,55+ "os": [56+ "aix"57+ ],58+ "engines": {59+ "node": ">=18"60+ }61+ },62+ "node_modules/@esbuild/android-arm": {63+ "version": "0.28.1",64+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.1.tgz",65+ "integrity": "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==",66+ "cpu": [67+ "arm"68+ ],69+ "dev": true,70+ "license": "MIT",71+ "optional": true,72+ "os": [73+ "android"74+ ],75+ "engines": {76+ "node": ">=18"77+ }78+ },79+ "node_modules/@esbuild/android-arm64": {80+ "version": "0.28.1",81+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.1.tgz",82+ "integrity": "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==",83+ "cpu": [84+ "arm64"85+ ],86+ "dev": true,87+ "license": "MIT",88+ "optional": true,89+ "os": [90+ "android"91+ ],92+ "engines": {93+ "node": ">=18"94+ }95+ },96+ "node_modules/@esbuild/android-x64": {97+ "version": "0.28.1",98+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.1.tgz",99+ "integrity": "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==",100+ "cpu": [101+ "x64"102+ ],103+ "dev": true,104+ "license": "MIT",105+ "optional": true,106+ "os": [107+ "android"108+ ],109+ "engines": {110+ "node": ">=18"111+ }112+ },113+ "node_modules/@esbuild/darwin-arm64": {114+ "version": "0.28.1",115+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.1.tgz",116+ "integrity": "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==",117+ "cpu": [118+ "arm64"119+ ],120+ "dev": true,121+ "license": "MIT",122+ "optional": true,123+ "os": [124+ "darwin"125+ ],126+ "engines": {127+ "node": ">=18"128+ }129+ },130+ "node_modules/@esbuild/darwin-x64": {131+ "version": "0.28.1",132+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.1.tgz",133+ "integrity": "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==",134+ "cpu": [135+ "x64"136+ ],137+ "dev": true,138+ "license": "MIT",139+ "optional": true,140+ "os": [141+ "darwin"142+ ],143+ "engines": {144+ "node": ">=18"145+ }146+ },147+ "node_modules/@esbuild/freebsd-arm64": {148+ "version": "0.28.1",149+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.1.tgz",150+ "integrity": "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==",151+ "cpu": [152+ "arm64"153+ ],154+ "dev": true,155+ "license": "MIT",156+ "optional": true,157+ "os": [158+ "freebsd"159+ ],160+ "engines": {161+ "node": ">=18"162+ }163+ },164+ "node_modules/@esbuild/freebsd-x64": {165+ "version": "0.28.1",166+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.1.tgz",167+ "integrity": "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==",168+ "cpu": [169+ "x64"170+ ],171+ "dev": true,172+ "license": "MIT",173+ "optional": true,174+ "os": [175+ "freebsd"176+ ],177+ "engines": {178+ "node": ">=18"179+ }180+ },181+ "node_modules/@esbuild/linux-arm": {182+ "version": "0.28.1",183+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.1.tgz",184+ "integrity": "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==",185+ "cpu": [186+ "arm"187+ ],188+ "dev": true,189+ "license": "MIT",190+ "optional": true,191+ "os": [192+ "linux"193+ ],194+ "engines": {195+ "node": ">=18"196+ }197+ },198+ "node_modules/@esbuild/linux-arm64": {199+ "version": "0.28.1",200+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.1.tgz",201+ "integrity": "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==",202+ "cpu": [203+ "arm64"204+ ],205+ "dev": true,206+ "license": "MIT",207+ "optional": true,208+ "os": [209+ "linux"210+ ],211+ "engines": {212+ "node": ">=18"213+ }214+ },215+ "node_modules/@esbuild/linux-ia32": {216+ "version": "0.28.1",217+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.1.tgz",218+ "integrity": "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==",219+ "cpu": [220+ "ia32"221+ ],222+ "dev": true,223+ "license": "MIT",224+ "optional": true,225+ "os": [226+ "linux"227+ ],228+ "engines": {229+ "node": ">=18"230+ }231+ },232+ "node_modules/@esbuild/linux-loong64": {233+ "version": "0.28.1",234+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.1.tgz",235+ "integrity": "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==",236+ "cpu": [237+ "loong64"238+ ],239+ "dev": true,240+ "license": "MIT",241+ "optional": true,242+ "os": [243+ "linux"244+ ],245+ "engines": {246+ "node": ">=18"247+ }248+ },249+ "node_modules/@esbuild/linux-mips64el": {250+ "version": "0.28.1",251+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.1.tgz",252+ "integrity": "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==",253+ "cpu": [254+ "mips64el"255+ ],256+ "dev": true,257+ "license": "MIT",258+ "optional": true,259+ "os": [260+ "linux"261+ ],262+ "engines": {263+ "node": ">=18"264+ }265+ },266+ "node_modules/@esbuild/linux-ppc64": {267+ "version": "0.28.1",268+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.1.tgz",269+ "integrity": "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==",270+ "cpu": [271+ "ppc64"272+ ],273+ "dev": true,274+ "license": "MIT",275+ "optional": true,276+ "os": [277+ "linux"278+ ],279+ "engines": {280+ "node": ">=18"281+ }282+ },283+ "node_modules/@esbuild/linux-riscv64": {284+ "version": "0.28.1",285+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.1.tgz",286+ "integrity": "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==",287+ "cpu": [288+ "riscv64"289+ ],290+ "dev": true,291+ "license": "MIT",292+ "optional": true,293+ "os": [294+ "linux"295+ ],296+ "engines": {297+ "node": ">=18"298+ }299+ },300+ "node_modules/@esbuild/linux-s390x": {301+ "version": "0.28.1",302+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.1.tgz",303+ "integrity": "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==",304+ "cpu": [305+ "s390x"306+ ],307+ "dev": true,308+ "license": "MIT",309+ "optional": true,310+ "os": [311+ "linux"312+ ],313+ "engines": {314+ "node": ">=18"315+ }316+ },317+ "node_modules/@esbuild/linux-x64": {318+ "version": "0.28.1",319+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.1.tgz",320+ "integrity": "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==",321+ "cpu": [322+ "x64"323+ ],324+ "dev": true,325+ "license": "MIT",326+ "optional": true,327+ "os": [328+ "linux"329+ ],330+ "engines": {331+ "node": ">=18"332+ }333+ },334+ "node_modules/@esbuild/netbsd-arm64": {335+ "version": "0.28.1",336+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.1.tgz",337+ "integrity": "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==",338+ "cpu": [339+ "arm64"340+ ],341+ "dev": true,342+ "license": "MIT",343+ "optional": true,344+ "os": [345+ "netbsd"346+ ],347+ "engines": {348+ "node": ">=18"349+ }350+ },351+ "node_modules/@esbuild/netbsd-x64": {352+ "version": "0.28.1",353+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.1.tgz",354+ "integrity": "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==",355+ "cpu": [356+ "x64"357+ ],358+ "dev": true,359+ "license": "MIT",360+ "optional": true,361+ "os": [362+ "netbsd"363+ ],364+ "engines": {365+ "node": ">=18"366+ }367+ },368+ "node_modules/@esbuild/openbsd-arm64": {369+ "version": "0.28.1",370+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.1.tgz",371+ "integrity": "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==",372+ "cpu": [373+ "arm64"374+ ],375+ "dev": true,376+ "license": "MIT",377+ "optional": true,378+ "os": [379+ "openbsd"380+ ],381+ "engines": {382+ "node": ">=18"383+ }384+ },385+ "node_modules/@esbuild/openbsd-x64": {386+ "version": "0.28.1",387+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.1.tgz",388+ "integrity": "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==",389+ "cpu": [390+ "x64"391+ ],392+ "dev": true,393+ "license": "MIT",394+ "optional": true,395+ "os": [396+ "openbsd"397+ ],398+ "engines": {399+ "node": ">=18"400+ }401+ },402+ "node_modules/@esbuild/openharmony-arm64": {403+ "version": "0.28.1",404+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.1.tgz",405+ "integrity": "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==",406+ "cpu": [407+ "arm64"408+ ],409+ "dev": true,410+ "license": "MIT",411+ "optional": true,412+ "os": [413+ "openharmony"414+ ],415+ "engines": {416+ "node": ">=18"417+ }418+ },419+ "node_modules/@esbuild/sunos-x64": {420+ "version": "0.28.1",421+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.1.tgz",422+ "integrity": "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==",423+ "cpu": [424+ "x64"425+ ],426+ "dev": true,427+ "license": "MIT",428+ "optional": true,429+ "os": [430+ "sunos"431+ ],432+ "engines": {433+ "node": ">=18"434+ }435+ },436+ "node_modules/@esbuild/win32-arm64": {437+ "version": "0.28.1",438+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.1.tgz",439+ "integrity": "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==",440+ "cpu": [441+ "arm64"442+ ],443+ "dev": true,444+ "license": "MIT",445+ "optional": true,446+ "os": [447+ "win32"448+ ],449+ "engines": {450+ "node": ">=18"451+ }452+ },453+ "node_modules/@esbuild/win32-ia32": {454+ "version": "0.28.1",455+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.1.tgz",456+ "integrity": "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==",457+ "cpu": [458+ "ia32"459+ ],460+ "dev": true,461+ "license": "MIT",462+ "optional": true,463+ "os": [464+ "win32"465+ ],466+ "engines": {467+ "node": ">=18"468+ }469+ },470+ "node_modules/@esbuild/win32-x64": {471+ "version": "0.28.1",472+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.1.tgz",473+ "integrity": "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==",474+ "cpu": [475+ "x64"476+ ],477+ "dev": true,478+ "license": "MIT",479+ "optional": true,480+ "os": [481+ "win32"482+ ],483+ "engines": {484+ "node": ">=18"485+ }486+ },487+ "node_modules/@iconify/types": {488+ "version": "2.0.0",489+ "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",490+ "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",491+ "license": "MIT"492+ },493+ "node_modules/@iconify/utils": {494+ "version": "3.1.4",495+ "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.4.tgz",496+ "integrity": "sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==",497+ "license": "MIT",498+ "dependencies": {499+ "@antfu/install-pkg": "^1.1.0",500+ "@iconify/types": "^2.0.0",501+ "import-meta-resolve": "^4.2.0"502+ }503+ },504+ "node_modules/@mermaid-js/parser": {505+ "version": "1.2.1",506+ "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.2.1.tgz",507+ "integrity": "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==",508+ "license": "MIT",509+ "dependencies": {510+ "@chevrotain/types": "~11.1.2"511+ }512+ },513+ "node_modules/@types/d3": {514+ "version": "7.4.3",515+ "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",516+ "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",517+ "license": "MIT",518+ "dependencies": {519+ "@types/d3-array": "*",520+ "@types/d3-axis": "*",521+ "@types/d3-brush": "*",522+ "@types/d3-chord": "*",523+ "@types/d3-color": "*",524+ "@types/d3-contour": "*",525+ "@types/d3-delaunay": "*",526+ "@types/d3-dispatch": "*",527+ "@types/d3-drag": "*",528+ "@types/d3-dsv": "*",529+ "@types/d3-ease": "*",530+ "@types/d3-fetch": "*",531+ "@types/d3-force": "*",532+ "@types/d3-format": "*",533+ "@types/d3-geo": "*",534+ "@types/d3-hierarchy": "*",535+ "@types/d3-interpolate": "*",536+ "@types/d3-path": "*",537+ "@types/d3-polygon": "*",538+ "@types/d3-quadtree": "*",539+ "@types/d3-random": "*",540+ "@types/d3-scale": "*",541+ "@types/d3-scale-chromatic": "*",542+ "@types/d3-selection": "*",543+ "@types/d3-shape": "*",544+ "@types/d3-time": "*",545+ "@types/d3-time-format": "*",546+ "@types/d3-timer": "*",547+ "@types/d3-transition": "*",548+ "@types/d3-zoom": "*"549+ }550+ },551+ "node_modules/@types/d3-array": {552+ "version": "3.2.2",553+ "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",554+ "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",555+ "license": "MIT"556+ },557+ "node_modules/@types/d3-axis": {558+ "version": "3.0.6",559+ "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz",560+ "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",561+ "license": "MIT",562+ "dependencies": {563+ "@types/d3-selection": "*"564+ }565+ },566+ "node_modules/@types/d3-brush": {567+ "version": "3.0.6",568+ "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz",569+ "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",570+ "license": "MIT",571+ "dependencies": {572+ "@types/d3-selection": "*"573+ }574+ },575+ "node_modules/@types/d3-chord": {576+ "version": "3.0.6",577+ "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz",578+ "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==",579+ "license": "MIT"580+ },581+ "node_modules/@types/d3-color": {582+ "version": "3.1.3",583+ "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",584+ "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",585+ "license": "MIT"586+ },587+ "node_modules/@types/d3-contour": {588+ "version": "3.0.6",589+ "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz",590+ "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",591+ "license": "MIT",592+ "dependencies": {593+ "@types/d3-array": "*",594+ "@types/geojson": "*"595+ }596+ },597+ "node_modules/@types/d3-delaunay": {598+ "version": "6.0.4",599+ "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",600+ "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==",601+ "license": "MIT"602+ },603+ "node_modules/@types/d3-dispatch": {604+ "version": "3.0.7",605+ "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz",606+ "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==",607+ "license": "MIT"608+ },609+ "node_modules/@types/d3-drag": {610+ "version": "3.0.7",611+ "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz",612+ "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",613+ "license": "MIT",614+ "dependencies": {615+ "@types/d3-selection": "*"616+ }617+ },618+ "node_modules/@types/d3-dsv": {619+ "version": "3.0.7",620+ "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",621+ "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==",622+ "license": "MIT"623+ },624+ "node_modules/@types/d3-ease": {625+ "version": "3.0.2",626+ "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",627+ "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",628+ "license": "MIT"629+ },630+ "node_modules/@types/d3-fetch": {631+ "version": "3.0.7",632+ "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",633+ "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",634+ "license": "MIT",635+ "dependencies": {636+ "@types/d3-dsv": "*"637+ }638+ },639+ "node_modules/@types/d3-force": {640+ "version": "3.0.10",641+ "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz",642+ "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==",643+ "license": "MIT"644+ },645+ "node_modules/@types/d3-format": {646+ "version": "3.0.4",647+ "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz",648+ "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==",649+ "license": "MIT"650+ },651+ "node_modules/@types/d3-geo": {652+ "version": "3.1.1",653+ "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.1.tgz",654+ "integrity": "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w==",655+ "license": "MIT",656+ "dependencies": {657+ "@types/geojson": "*"658+ }659+ },660+ "node_modules/@types/d3-hierarchy": {661+ "version": "3.1.7",662+ "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",663+ "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==",664+ "license": "MIT"665+ },666+ "node_modules/@types/d3-interpolate": {667+ "version": "3.0.4",668+ "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",669+ "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",670+ "license": "MIT",671+ "dependencies": {672+ "@types/d3-color": "*"673+ }674+ },675+ "node_modules/@types/d3-path": {676+ "version": "3.1.1",677+ "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz",678+ "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==",679+ "license": "MIT"680+ },681+ "node_modules/@types/d3-polygon": {682+ "version": "3.0.2",683+ "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",684+ "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==",685+ "license": "MIT"686+ },687+ "node_modules/@types/d3-quadtree": {688+ "version": "3.0.6",689+ "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",690+ "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==",691+ "license": "MIT"692+ },693+ "node_modules/@types/d3-random": {694+ "version": "3.0.4",695+ "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.4.tgz",696+ "integrity": "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==",697+ "license": "MIT"698+ },699+ "node_modules/@types/d3-scale": {700+ "version": "4.0.9",701+ "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz",702+ "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==",703+ "license": "MIT",704+ "dependencies": {705+ "@types/d3-time": "*"706+ }707+ },708+ "node_modules/@types/d3-scale-chromatic": {709+ "version": "3.1.0",710+ "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",711+ "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==",712+ "license": "MIT"713+ },714+ "node_modules/@types/d3-selection": {715+ "version": "3.0.11",716+ "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz",717+ "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==",718+ "license": "MIT"719+ },720+ "node_modules/@types/d3-shape": {721+ "version": "3.1.8",722+ "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz",723+ "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==",724+ "license": "MIT",725+ "dependencies": {726+ "@types/d3-path": "*"727+ }728+ },729+ "node_modules/@types/d3-time": {730+ "version": "3.0.4",731+ "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz",732+ "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==",733+ "license": "MIT"734+ },735+ "node_modules/@types/d3-time-format": {736+ "version": "4.0.3",737+ "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",738+ "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==",739+ "license": "MIT"740+ },741+ "node_modules/@types/d3-timer": {742+ "version": "3.0.2",743+ "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",744+ "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",745+ "license": "MIT"746+ },747+ "node_modules/@types/d3-transition": {748+ "version": "3.0.9",749+ "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz",750+ "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==",751+ "license": "MIT",752+ "dependencies": {753+ "@types/d3-selection": "*"754+ }755+ },756+ "node_modules/@types/d3-zoom": {757+ "version": "3.0.8",758+ "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz",759+ "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==",760+ "license": "MIT",761+ "dependencies": {762+ "@types/d3-interpolate": "*",763+ "@types/d3-selection": "*"764+ }765+ },766+ "node_modules/@types/geojson": {767+ "version": "7946.0.16",768+ "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",769+ "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",770+ "license": "MIT"771+ },772+ "node_modules/@types/trusted-types": {773+ "version": "2.0.7",774+ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",775+ "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",776+ "license": "MIT",777+ "optional": true778+ },779+ "node_modules/@upsetjs/venn.js": {780+ "version": "2.0.0",781+ "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz",782+ "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==",783+ "license": "MIT",784+ "optionalDependencies": {785+ "d3-selection": "^3.0.0",786+ "d3-transition": "^3.0.1"787+ }788+ },789+ "node_modules/commander": {790+ "version": "7.2.0",791+ "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",792+ "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",793+ "license": "MIT",794+ "engines": {795+ "node": ">= 10"796+ }797+ },798+ "node_modules/cose-base": {799+ "version": "1.0.3",800+ "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",801+ "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==",802+ "license": "MIT",803+ "dependencies": {804+ "layout-base": "^1.0.0"805+ }806+ },807+ "node_modules/cytoscape": {808+ "version": "3.34.1",809+ "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.1.tgz",810+ "integrity": "sha512-Lr0RvH9H75y9ar8h9Toy6u4lxRSCcxUq+hHcQ26sVWo6BnaQp1gwEZOYqwuYTZhyW7npyKnNLP8oJ2p1/3OZ7g==",811+ "license": "MIT",812+ "engines": {813+ "node": ">=0.10"814+ }815+ },816+ "node_modules/cytoscape-cose-bilkent": {817+ "version": "4.1.0",818+ "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz",819+ "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==",820+ "license": "MIT",821+ "dependencies": {822+ "cose-base": "^1.0.0"823+ },824+ "peerDependencies": {825+ "cytoscape": "^3.2.0"826+ }827+ },828+ "node_modules/cytoscape-fcose": {829+ "version": "2.2.0",830+ "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz",831+ "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==",832+ "license": "MIT",833+ "dependencies": {834+ "cose-base": "^2.2.0"835+ },836+ "peerDependencies": {837+ "cytoscape": "^3.2.0"838+ }839+ },840+ "node_modules/cytoscape-fcose/node_modules/cose-base": {841+ "version": "2.2.0",842+ "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz",843+ "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==",844+ "license": "MIT",845+ "dependencies": {846+ "layout-base": "^2.0.0"847+ }848+ },849+ "node_modules/cytoscape-fcose/node_modules/layout-base": {850+ "version": "2.0.1",851+ "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz",852+ "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==",853+ "license": "MIT"854+ },855+ "node_modules/d3": {856+ "version": "7.9.0",857+ "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz",858+ "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==",859+ "license": "ISC",860+ "dependencies": {861+ "d3-array": "3",862+ "d3-axis": "3",863+ "d3-brush": "3",864+ "d3-chord": "3",865+ "d3-color": "3",866+ "d3-contour": "4",867+ "d3-delaunay": "6",868+ "d3-dispatch": "3",869+ "d3-drag": "3",870+ "d3-dsv": "3",871+ "d3-ease": "3",872+ "d3-fetch": "3",873+ "d3-force": "3",874+ "d3-format": "3",875+ "d3-geo": "3",876+ "d3-hierarchy": "3",877+ "d3-interpolate": "3",878+ "d3-path": "3",879+ "d3-polygon": "3",880+ "d3-quadtree": "3",881+ "d3-random": "3",882+ "d3-scale": "4",883+ "d3-scale-chromatic": "3",884+ "d3-selection": "3",885+ "d3-shape": "3",886+ "d3-time": "3",887+ "d3-time-format": "4",888+ "d3-timer": "3",889+ "d3-transition": "3",890+ "d3-zoom": "3"891+ },892+ "engines": {893+ "node": ">=12"894+ }895+ },896+ "node_modules/d3-array": {897+ "version": "3.2.4",898+ "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",899+ "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",900+ "license": "ISC",901+ "dependencies": {902+ "internmap": "1 - 2"903+ },904+ "engines": {905+ "node": ">=12"906+ }907+ },908+ "node_modules/d3-axis": {909+ "version": "3.0.0",910+ "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz",911+ "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",912+ "license": "ISC",913+ "engines": {914+ "node": ">=12"915+ }916+ },917+ "node_modules/d3-brush": {918+ "version": "3.0.0",919+ "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz",920+ "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",921+ "license": "ISC",922+ "dependencies": {923+ "d3-dispatch": "1 - 3",924+ "d3-drag": "2 - 3",925+ "d3-interpolate": "1 - 3",926+ "d3-selection": "3",927+ "d3-transition": "3"928+ },929+ "engines": {930+ "node": ">=12"931+ }932+ },933+ "node_modules/d3-chord": {934+ "version": "3.0.1",935+ "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz",936+ "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",937+ "license": "ISC",938+ "dependencies": {939+ "d3-path": "1 - 3"940+ },941+ "engines": {942+ "node": ">=12"943+ }944+ },945+ "node_modules/d3-color": {946+ "version": "3.1.0",947+ "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",948+ "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",949+ "license": "ISC",950+ "engines": {951+ "node": ">=12"952+ }953+ },954+ "node_modules/d3-contour": {955+ "version": "4.0.2",956+ "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz",957+ "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",958+ "license": "ISC",959+ "dependencies": {960+ "d3-array": "^3.2.0"961+ },962+ "engines": {963+ "node": ">=12"964+ }965+ },966+ "node_modules/d3-delaunay": {967+ "version": "6.0.4",968+ "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz",969+ "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==",970+ "license": "ISC",971+ "dependencies": {972+ "delaunator": "5"973+ },974+ "engines": {975+ "node": ">=12"976+ }977+ },978+ "node_modules/d3-dispatch": {979+ "version": "3.0.1",980+ "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz",981+ "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",982+ "license": "ISC",983+ "engines": {984+ "node": ">=12"985+ }986+ },987+ "node_modules/d3-drag": {988+ "version": "3.0.0",989+ "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz",990+ "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",991+ "license": "ISC",992+ "dependencies": {993+ "d3-dispatch": "1 - 3",994+ "d3-selection": "3"995+ },996+ "engines": {997+ "node": ">=12"998+ }999+ },1000+ "node_modules/d3-dsv": {1001+ "version": "3.0.1",1002+ "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz",1003+ "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",1004+ "license": "ISC",1005+ "dependencies": {1006+ "commander": "7",1007+ "iconv-lite": "0.6",1008+ "rw": "1"1009+ },1010+ "bin": {1011+ "csv2json": "bin/dsv2json.js",1012+ "csv2tsv": "bin/dsv2dsv.js",1013+ "dsv2dsv": "bin/dsv2dsv.js",1014+ "dsv2json": "bin/dsv2json.js",1015+ "json2csv": "bin/json2dsv.js",1016+ "json2dsv": "bin/json2dsv.js",1017+ "json2tsv": "bin/json2dsv.js",1018+ "tsv2csv": "bin/dsv2dsv.js",1019+ "tsv2json": "bin/dsv2json.js"1020+ },1021+ "engines": {1022+ "node": ">=12"1023+ }1024+ },1025+ "node_modules/d3-ease": {1026+ "version": "3.0.1",1027+ "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",1028+ "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",1029+ "license": "BSD-3-Clause",1030+ "engines": {1031+ "node": ">=12"1032+ }1033+ },1034+ "node_modules/d3-fetch": {1035+ "version": "3.0.1",1036+ "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz",1037+ "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",1038+ "license": "ISC",1039+ "dependencies": {1040+ "d3-dsv": "1 - 3"1041+ },1042+ "engines": {1043+ "node": ">=12"1044+ }1045+ },1046+ "node_modules/d3-force": {1047+ "version": "3.0.0",1048+ "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz",1049+ "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",1050+ "license": "ISC",1051+ "dependencies": {1052+ "d3-dispatch": "1 - 3",1053+ "d3-quadtree": "1 - 3",1054+ "d3-timer": "1 - 3"1055+ },1056+ "engines": {1057+ "node": ">=12"1058+ }1059+ },1060+ "node_modules/d3-format": {1061+ "version": "3.1.2",1062+ "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz",1063+ "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==",1064+ "license": "ISC",1065+ "engines": {1066+ "node": ">=12"1067+ }1068+ },1069+ "node_modules/d3-geo": {1070+ "version": "3.1.1",1071+ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",1072+ "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",1073+ "license": "ISC",1074+ "dependencies": {1075+ "d3-array": "2.5.0 - 3"1076+ },1077+ "engines": {1078+ "node": ">=12"1079+ }1080+ },1081+ "node_modules/d3-hierarchy": {1082+ "version": "3.1.2",1083+ "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",1084+ "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",1085+ "license": "ISC",1086+ "engines": {1087+ "node": ">=12"1088+ }1089+ },1090+ "node_modules/d3-interpolate": {1091+ "version": "3.0.1",1092+ "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",1093+ "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",1094+ "license": "ISC",1095+ "dependencies": {1096+ "d3-color": "1 - 3"1097+ },1098+ "engines": {1099+ "node": ">=12"1100+ }1101+ },1102+ "node_modules/d3-path": {1103+ "version": "3.1.0",1104+ "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz",1105+ "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",1106+ "license": "ISC",1107+ "engines": {1108+ "node": ">=12"1109+ }1110+ },1111+ "node_modules/d3-polygon": {1112+ "version": "3.0.1",1113+ "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz",1114+ "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",1115+ "license": "ISC",1116+ "engines": {1117+ "node": ">=12"1118+ }1119+ },1120+ "node_modules/d3-quadtree": {1121+ "version": "3.0.1",1122+ "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz",1123+ "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",1124+ "license": "ISC",1125+ "engines": {1126+ "node": ">=12"1127+ }1128+ },1129+ "node_modules/d3-random": {1130+ "version": "3.0.1",1131+ "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz",1132+ "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",1133+ "license": "ISC",1134+ "engines": {1135+ "node": ">=12"1136+ }1137+ },1138+ "node_modules/d3-sankey": {1139+ "version": "0.12.3",1140+ "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz",1141+ "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==",1142+ "license": "BSD-3-Clause",1143+ "dependencies": {1144+ "d3-array": "1 - 2",1145+ "d3-shape": "^1.2.0"1146+ }1147+ },1148+ "node_modules/d3-sankey/node_modules/d3-array": {1149+ "version": "2.12.1",1150+ "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",1151+ "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",1152+ "license": "BSD-3-Clause",1153+ "dependencies": {1154+ "internmap": "^1.0.0"1155+ }1156+ },1157+ "node_modules/d3-sankey/node_modules/d3-path": {1158+ "version": "1.0.9",1159+ "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",1160+ "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==",1161+ "license": "BSD-3-Clause"1162+ },1163+ "node_modules/d3-sankey/node_modules/d3-shape": {1164+ "version": "1.3.7",1165+ "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",1166+ "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",1167+ "license": "BSD-3-Clause",1168+ "dependencies": {1169+ "d3-path": "1"1170+ }1171+ },1172+ "node_modules/d3-sankey/node_modules/internmap": {1173+ "version": "1.0.1",1174+ "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",1175+ "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==",1176+ "license": "ISC"1177+ },1178+ "node_modules/d3-scale": {1179+ "version": "4.0.2",1180+ "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",1181+ "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",1182+ "license": "ISC",1183+ "dependencies": {1184+ "d3-array": "2.10.0 - 3",1185+ "d3-format": "1 - 3",1186+ "d3-interpolate": "1.2.0 - 3",1187+ "d3-time": "2.1.1 - 3",1188+ "d3-time-format": "2 - 4"1189+ },1190+ "engines": {1191+ "node": ">=12"1192+ }1193+ },1194+ "node_modules/d3-scale-chromatic": {1195+ "version": "3.1.0",1196+ "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",1197+ "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==",1198+ "license": "ISC",1199+ "dependencies": {1200+ "d3-color": "1 - 3",1201+ "d3-interpolate": "1 - 3"1202+ },1203+ "engines": {1204+ "node": ">=12"1205+ }1206+ },1207+ "node_modules/d3-selection": {1208+ "version": "3.0.0",1209+ "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",1210+ "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",1211+ "license": "ISC",1212+ "engines": {1213+ "node": ">=12"1214+ }1215+ },1216+ "node_modules/d3-shape": {1217+ "version": "3.2.0",1218+ "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",1219+ "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",1220+ "license": "ISC",1221+ "dependencies": {1222+ "d3-path": "^3.1.0"1223+ },1224+ "engines": {1225+ "node": ">=12"1226+ }1227+ },1228+ "node_modules/d3-time": {1229+ "version": "3.1.0",1230+ "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz",1231+ "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",1232+ "license": "ISC",1233+ "dependencies": {1234+ "d3-array": "2 - 3"1235+ },1236+ "engines": {1237+ "node": ">=12"1238+ }1239+ },1240+ "node_modules/d3-time-format": {1241+ "version": "4.1.0",1242+ "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz",1243+ "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",1244+ "license": "ISC",1245+ "dependencies": {1246+ "d3-time": "1 - 3"1247+ },1248+ "engines": {1249+ "node": ">=12"1250+ }1251+ },1252+ "node_modules/d3-timer": {1253+ "version": "3.0.1",1254+ "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz",1255+ "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",1256+ "license": "ISC",1257+ "engines": {1258+ "node": ">=12"1259+ }1260+ },1261+ "node_modules/d3-transition": {1262+ "version": "3.0.1",1263+ "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz",1264+ "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",1265+ "license": "ISC",1266+ "dependencies": {1267+ "d3-color": "1 - 3",1268+ "d3-dispatch": "1 - 3",1269+ "d3-ease": "1 - 3",1270+ "d3-interpolate": "1 - 3",1271+ "d3-timer": "1 - 3"1272+ },1273+ "engines": {1274+ "node": ">=12"1275+ },1276+ "peerDependencies": {1277+ "d3-selection": "2 - 3"1278+ }1279+ },1280+ "node_modules/d3-zoom": {1281+ "version": "3.0.0",1282+ "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz",1283+ "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",1284+ "license": "ISC",1285+ "dependencies": {1286+ "d3-dispatch": "1 - 3",1287+ "d3-drag": "2 - 3",1288+ "d3-interpolate": "1 - 3",1289+ "d3-selection": "2 - 3",1290+ "d3-transition": "2 - 3"1291+ },1292+ "engines": {1293+ "node": ">=12"1294+ }1295+ },1296+ "node_modules/dagre-d3-es": {1297+ "version": "7.0.14",1298+ "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz",1299+ "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==",1300+ "license": "MIT",1301+ "dependencies": {1302+ "d3": "^7.9.0",1303+ "lodash-es": "^4.17.21"1304+ }1305+ },1306+ "node_modules/dayjs": {1307+ "version": "1.11.23",1308+ "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz",1309+ "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==",1310+ "license": "MIT"1311+ },1312+ "node_modules/delaunator": {1313+ "version": "5.1.0",1314+ "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz",1315+ "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==",1316+ "license": "ISC",1317+ "dependencies": {1318+ "robust-predicates": "^3.0.2"1319+ }1320+ },1321+ "node_modules/dompurify": {1322+ "version": "3.4.14",1323+ "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.14.tgz",1324+ "integrity": "sha512-dVoH9z+MY+C9IilgGCk3YfFqjLi3fChm2OiKJMzh6axrJ5qwxqWaZamgmHrpv22CN/KdbZJuGEGgfQoL00LTdg==",1325+ "license": "(MPL-2.0 OR Apache-2.0)",1326+ "optionalDependencies": {1327+ "@types/trusted-types": "^2.0.7"1328+ }1329+ },1330+ "node_modules/es-toolkit": {1331+ "version": "1.51.0",1332+ "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.51.0.tgz",1333+ "integrity": "sha512-zC2lQGkM7QX+Gm6iM3+WIdZJzthsEd14LvRNJneSO2hzyz/zNBENR8+YXWo1cKxgPBtV6ksPYHELbcwBRzmdCw==",1334+ "license": "MIT",1335+ "workspaces": [1336+ "docs",1337+ "benchmarks",1338+ "tests/types",1339+ "tests/browser-compat"1340+ ]1341+ },1342+ "node_modules/esbuild": {1343+ "version": "0.28.1",1344+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",1345+ "integrity": "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==",1346+ "dev": true,1347+ "hasInstallScript": true,1348+ "license": "MIT",1349+ "bin": {1350+ "esbuild": "bin/esbuild"1351+ },1352+ "engines": {1353+ "node": ">=18"1354+ },1355+ "optionalDependencies": {1356+ "@esbuild/aix-ppc64": "0.28.1",1357+ "@esbuild/android-arm": "0.28.1",1358+ "@esbuild/android-arm64": "0.28.1",1359+ "@esbuild/android-x64": "0.28.1",1360+ "@esbuild/darwin-arm64": "0.28.1",1361+ "@esbuild/darwin-x64": "0.28.1",1362+ "@esbuild/freebsd-arm64": "0.28.1",1363+ "@esbuild/freebsd-x64": "0.28.1",1364+ "@esbuild/linux-arm": "0.28.1",1365+ "@esbuild/linux-arm64": "0.28.1",1366+ "@esbuild/linux-ia32": "0.28.1",1367+ "@esbuild/linux-loong64": "0.28.1",1368+ "@esbuild/linux-mips64el": "0.28.1",1369+ "@esbuild/linux-ppc64": "0.28.1",1370+ "@esbuild/linux-riscv64": "0.28.1",1371+ "@esbuild/linux-s390x": "0.28.1",1372+ "@esbuild/linux-x64": "0.28.1",1373+ "@esbuild/netbsd-arm64": "0.28.1",1374+ "@esbuild/netbsd-x64": "0.28.1",1375+ "@esbuild/openbsd-arm64": "0.28.1",1376+ "@esbuild/openbsd-x64": "0.28.1",1377+ "@esbuild/openharmony-arm64": "0.28.1",1378+ "@esbuild/sunos-x64": "0.28.1",1379+ "@esbuild/win32-arm64": "0.28.1",1380+ "@esbuild/win32-ia32": "0.28.1",1381+ "@esbuild/win32-x64": "0.28.1"1382+ }1383+ },1384+ "node_modules/fastdom": {1385+ "version": "1.0.12",1386+ "resolved": "https://registry.npmjs.org/fastdom/-/fastdom-1.0.12.tgz",1387+ "integrity": "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==",1388+ "license": "MIT",1389+ "dependencies": {1390+ "strictdom": "^1.0.1"1391+ }1392+ },1393+ "node_modules/hachure-fill": {1394+ "version": "0.5.2",1395+ "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz",1396+ "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==",1397+ "license": "MIT"1398+ },1399+ "node_modules/iconv-lite": {1400+ "version": "0.6.3",1401+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",1402+ "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",1403+ "license": "MIT",1404+ "dependencies": {1405+ "safer-buffer": ">= 2.1.2 < 3.0.0"1406+ },1407+ "engines": {1408+ "node": ">=0.10.0"1409+ }1410+ },1411+ "node_modules/import-meta-resolve": {1412+ "version": "4.2.0",1413+ "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",1414+ "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==",1415+ "license": "MIT",1416+ "funding": {1417+ "type": "github",1418+ "url": "https://github.com/sponsors/wooorm"1419+ }1420+ },1421+ "node_modules/internmap": {1422+ "version": "2.0.3",1423+ "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",1424+ "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",1425+ "license": "ISC",1426+ "engines": {1427+ "node": ">=12"1428+ }1429+ },1430+ "node_modules/katex": {1431+ "version": "0.16.47",1432+ "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.47.tgz",1433+ "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==",1434+ "funding": [1435+ "https://opencollective.com/katex",1436+ "https://github.com/sponsors/katex"1437+ ],1438+ "license": "MIT",1439+ "dependencies": {1440+ "commander": "^8.3.0"1441+ },1442+ "bin": {1443+ "katex": "cli.js"1444+ }1445+ },1446+ "node_modules/katex/node_modules/commander": {1447+ "version": "8.3.0",1448+ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",1449+ "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",1450+ "license": "MIT",1451+ "engines": {1452+ "node": ">= 12"1453+ }1454+ },1455+ "node_modules/khroma": {1456+ "version": "2.1.0",1457+ "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz",1458+ "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="1459+ },1460+ "node_modules/layout-base": {1461+ "version": "1.0.2",1462+ "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz",1463+ "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",1464+ "license": "MIT"1465+ },1466+ "node_modules/lodash-es": {1467+ "version": "4.18.1",1468+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",1469+ "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",1470+ "license": "MIT"1471+ },1472+ "node_modules/marked": {1473+ "version": "16.4.2",1474+ "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",1475+ "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==",1476+ "license": "MIT",1477+ "bin": {1478+ "marked": "bin/marked.js"1479+ },1480+ "engines": {1481+ "node": ">= 20"1482+ }1483+ },1484+ "node_modules/mermaid": {1485+ "version": "11.17.0",1486+ "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.0.tgz",1487+ "integrity": "sha512-Jo9N377Wb4MSnHFPTbLi2SxFpsQl4eVHoxnW5U1Md9EazvgMp3s+4ohDxr81YNTgbn5Kj7HJ3yslrSJ52kwpbA==",1488+ "license": "MIT",1489+ "dependencies": {1490+ "@braintree/sanitize-url": "^7.1.2",1491+ "@iconify/utils": "^3.0.2",1492+ "@mermaid-js/parser": "^1.2.1",1493+ "@types/d3": "^7.4.3",1494+ "@upsetjs/venn.js": "^2.0.0",1495+ "cytoscape": "^3.34.0",1496+ "cytoscape-cose-bilkent": "^4.1.0",1497+ "cytoscape-fcose": "^2.2.0",1498+ "d3": "^7.9.0",1499+ "d3-sankey": "^0.12.3",1500+ "dagre-d3-es": "7.0.14",1501+ "dayjs": "^1.11.21",1502+ "dompurify": "^3.3.3",1503+ "es-toolkit": "^1.45.1",1504+ "fastdom": "1.0.12",1505+ "katex": "^0.16.47",1506+ "khroma": "^2.1.0",1507+ "marked": "^16.3.0",1508+ "roughjs": "^4.6.6",1509+ "stylis": "^4.3.6",1510+ "ts-dedent": "^2.2.0",1511+ "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0"1512+ }1513+ },1514+ "node_modules/package-manager-detector": {1515+ "version": "1.8.0",1516+ "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.8.0.tgz",1517+ "integrity": "sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==",1518+ "license": "MIT"1519+ },1520+ "node_modules/path-data-parser": {1521+ "version": "0.1.0",1522+ "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",1523+ "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==",1524+ "license": "MIT"1525+ },1526+ "node_modules/points-on-curve": {1527+ "version": "0.2.0",1528+ "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz",1529+ "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==",1530+ "license": "MIT"1531+ },1532+ "node_modules/points-on-path": {1533+ "version": "0.2.1",1534+ "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz",1535+ "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==",1536+ "license": "MIT",1537+ "dependencies": {1538+ "path-data-parser": "0.1.0",1539+ "points-on-curve": "0.2.0"1540+ }1541+ },1542+ "node_modules/robust-predicates": {1543+ "version": "3.0.3",1544+ "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz",1545+ "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==",1546+ "license": "Unlicense"1547+ },1548+ "node_modules/roughjs": {1549+ "version": "4.6.6",1550+ "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz",1551+ "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==",1552+ "license": "MIT",1553+ "dependencies": {1554+ "hachure-fill": "^0.5.2",1555+ "path-data-parser": "^0.1.0",1556+ "points-on-curve": "^0.2.0",1557+ "points-on-path": "^0.2.1"1558+ }1559+ },1560+ "node_modules/rw": {1561+ "version": "1.3.3",1562+ "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",1563+ "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",1564+ "license": "BSD-3-Clause"1565+ },1566+ "node_modules/safer-buffer": {1567+ "version": "2.1.2",1568+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",1569+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",1570+ "license": "MIT"1571+ },1572+ "node_modules/strictdom": {1573+ "version": "1.0.1",1574+ "resolved": "https://registry.npmjs.org/strictdom/-/strictdom-1.0.1.tgz",1575+ "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==",1576+ "license": "MIT"1577+ },1578+ "node_modules/stylis": {1579+ "version": "4.4.0",1580+ "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz",1581+ "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==",1582+ "license": "MIT"1583+ },1584+ "node_modules/tinyexec": {1585+ "version": "1.3.0",1586+ "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz",1587+ "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==",1588+ "license": "MIT",1589+ "engines": {1590+ "node": ">=18"1591+ }1592+ },1593+ "node_modules/ts-dedent": {1594+ "version": "2.3.0",1595+ "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.3.0.tgz",1596+ "integrity": "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==",1597+ "license": "MIT",1598+ "engines": {1599+ "node": ">=6.10"1600+ }1601+ },1602+ "node_modules/uuid": {1603+ "version": "14.0.2",1604+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.2.tgz",1605+ "integrity": "sha512-xZe/16rV4aa+HGSOCiY2YeLT1OybRLrrkL/Rqaq7p7GMVXjFh+6wN4oMYgjFmnSnhY8t6Xpdl2l9qmnHYuMHwQ==",1606+ "funding": [1607+ "https://github.com/sponsors/broofa",1608+ "https://github.com/sponsors/ctavan"1609+ ],1610+ "license": "MIT",1611+ "bin": {1612+ "uuid": "dist-node/bin/uuid"1613+ }1614+ }1615+ }1616+}
A diagramzip-client-units/mermaid/package.json +17 -0
A diagramzip-client-units/mermaid/scripts/build.mjs +22 -0
A diagramzip-client-units/mermaid/src/frame.js +63 -0
@@ -0,0 +1,63 @@
1+import mermaid from 'mermaid'2+3+const CHANNEL = 'diagram.zip:renderer:v1'4+const ENGINE = 'mermaid'5+const VERSION = 'mermaid@11.17.0'6+const BUILD = 'mermaid-11.17.0-client-unit-1'7+const MAX_SOURCE_LENGTH = 100_0008+9+mermaid.initialize({10+ startOnLoad: false,11+ securityLevel: 'strict',12+ suppressErrorRendering: true,13+ maxTextSize: MAX_SOURCE_LENGTH,14+ maxEdges: 5_000,15+ flowchart: { useMaxWidth: false },16+})17+18+let queue = Promise.resolve()19+20+async function render(message) {21+ if (typeof message.source !== 'string' || message.source.length > MAX_SOURCE_LENGTH) {22+ throw new Error('Mermaid source must be a string no larger than 100 KB.')23+ }24+ const id = `diagramzip-${message.requestId.replace(/[^a-zA-Z0-9_-]/g, '')}`25+ const { svg } = await mermaid.render(id, message.source)26+ return svg27+}28+29+window.addEventListener('message', event => {30+ const message = event.data31+ if (32+ event.source !== parent33+ || message?.channel !== CHANNEL34+ || message?.type !== 'render'35+ || message?.engine !== ENGINE36+ || typeof message?.requestId !== 'string'37+ ) return38+39+ queue = queue.then(async () => {40+ try {41+ parent.postMessage({42+ channel: CHANNEL,43+ type: 'result',44+ requestId: message.requestId,45+ ok: true,46+ svg: await render(message),47+ version: VERSION,48+ build: BUILD,49+ pipeline: [ENGINE],50+ }, '*')51+ } catch (error) {52+ parent.postMessage({53+ channel: CHANNEL,54+ type: 'result',55+ requestId: message.requestId,56+ ok: false,57+ error: error instanceof Error ? error.message.slice(0, 500) : 'Mermaid rendering failed.',58+ }, '*')59+ }60+ })61+})62+63+parent.postMessage({ channel: CHANNEL, type: 'ready', engine: ENGINE, version: VERSION, build: BUILD }, '*')
A diagramzip-client-units/mermaid/unit/_headers +12 -0
A diagramzip-client-units/mermaid/unit/index.html +14 -0
A diagramzip-client-units/mermaid/unit/worker.js +33 -0
A diagramzip-client-units/mermaid/wrangler.jsonc +15 -0
M diagramzip-docs/docs/collaboration/sharing.md +5 -0
M diagramzip-docs/docs/collaboration/working-and-saved-state.md +5 -0
M diagramzip-docs/docs/create/index.md +4 -0
M diagramzip-render/README.md +35 -13
@@ -1,13 +1,14 @@
11 # diagramzip-render22 3-Cloudflare Worker rendering gateway for diagram.zip. The editor sends one4-bounded JSON request to `/render/v1/svg`; the gateway selects an edge adapter or5-the existing Fly compatibility origin, sanitizes and decorates the SVG, and6-returns a uniform response.3+Cloudflare Worker rendering plane for diagram.zip. Every catalog engine owns4+`https://{engine}.render.diagram.zip`. The editor talks to that unit and never5+sends an engine selector to it. The older `/render/v1/svg` gateway remains only6+as a migration fallback.77 88 The catalog deliberately contains all 30 diagram types. An engine does not9-disappear while its replacement is incomplete: it remains routed to the origin10-and its known migration loss is exposed by `/render/v1/catalog`.9+disappear while its replacement is incomplete: its small compatibility unit10+proxies only the corresponding Fly endpoint. Known migration loss is exposed11+by the unit's `/v1/capabilities` response and the gateway catalog.1112 1213 ```sh1314 npm install
@@ -15,6 +16,7 @@ npm run cf-typegen
1516 npm run check1617 npm test1718 npm run deploy:dry19+npm run deploy:compatibility-units1820 npm run dev -- --port 87881921 npm run smoke2022 ```
@@ -22,17 +24,37 @@ npm run smoke
2224 The smoke command sends one existing repository fixture for every engine and2325 checks only structural SVG coverage. It does not perform pixel comparisons.2426 27+## Unit contract28+29+Server-rendered units expose `GET /v1/health`, `GET /v1/capabilities`, and30+`POST /v1/svg`. The POST body contains source, options, metadata, and31+presentation, but never an engine field. Responses identify the exact unit,32+build, and pipeline with `X-Diagram-Unit`, `X-Renderer-Build`, and33+`X-Diagram-Pipeline`.34+35+Browser-rendered units expose the same health and capability routes plus one36+sandboxed frame. The frame accepts only its own engine over the versioned37+postMessage protocol. Mermaid, BPMN, and Excalidraw have separate packages,38+bundles, CSPs, deployments, and subdomains.39+40+A unit may translate into another renderer. Translation is private to that41+unit and is declared as an ordered pipeline. Vega-Lite therefore owns42+Vega-Lite input and reports `vegalite,vega`; callers still address only the43+Vega-Lite unit.44+2545 ## Current runtime split2646 2747 | Runtime | Engines |2848 | --- | --- |29-| Worker JavaScript | Bytefield, Nomnoml, Vega, Vega-Lite, WaveDrom |30-| Compatibility origin | The remaining 25 engines |31-32-DBML remains on the origin because its published package mixes module formats.33-GraphViz remains on the origin because the published Viz.js wrapper performs34-runtime WebAssembly instantiation; the Worker target needs a direct precompiled35-module adapter.49+| Worker JavaScript | Bytefield, Nomnoml, Vega, Vega-Lite → Vega, WaveDrom |50+| Sandboxed browser unit | Mermaid, BPMN, Excalidraw |51+| One-engine compatibility unit | The remaining 22 engines |52+53+Compatibility units are the replacement seam, not the final runtime. DBML54+currently proxies because its published package mixes module formats. GraphViz55+currently proxies because the published Viz.js wrapper performs runtime56+WebAssembly instantiation; its unit still needs a direct precompiled module57+adapter.3658 3759 All returned SVG passes through the same sanitizer. Scripts, event handlers,3860 external resources, and active embedded HTML are removed. Mermaid's
M diagramzip-render/package.json +1 -0
A diagramzip-render/scripts/deploy-compatibility-units.mjs +41 -0
M diagramzip-render/scripts/smoke-units.mjs +27 -1
@@ -3,11 +3,33 @@ import { resolve } from 'node:path'
33 44 const fixtureDirectory = resolve(import.meta.dirname, '../../ci/tests/diagrams')55 const fixtures = {6+ plantuml: 'architecture.puml',7+ graphviz: 'hello.dot',8+ d2: 'connections.d2',9+ c4plantuml: 'banking-system.puml',10+ blockdiag: 'kroki.diag',11+ seqdiag: 'sequence.diag',12+ actdiag: 'actions.diag',13+ nwdiag: 'network.diag',14+ packetdiag: 'packet.diag',15+ rackdiag: 'rack.diag',616 bytefield: 'bytefield.bf',17+ dbml: 'dbml.dbml',18+ diagramsnet: 'diagramsnet-venn.xml',19+ ditaa: 'components.ditaa',20+ erd: 'schema.erd',21+ goat: 'components.goat',722 nomnoml: 'pirate.nomnoml',23+ pikchr: 'diamond.pikchr',24+ structurizr: 'gettingstarted.structurizr',25+ svgbob: 'cloud.bob',26+ symbolator: 'component.sv',27+ tikz: 'periodic-table.tex',28+ umlet: 'umlet.xml',829 vega: 'bar-chart.vega',930 vegalite: 'discretizing-scale.vlite',1031 wavedrom: 'wavedrom.json5',32+ wireviz: 'wireviz.yaml',1133 }1234 1335 async function smoke([engine, filename]) {
@@ -35,6 +57,10 @@ async function smoke([engine, filename]) {
3557 return `${engine.padEnd(10)} ${response.headers.get('X-Diagram-Cache')?.padEnd(4)} ${body.length} bytes`3658 }3759 38-const results = await Promise.all(Object.entries(fixtures).map(smoke))60+const entries = Object.entries(fixtures)61+const results = []62+for (let index = 0; index < entries.length; index += 4) {63+ results.push(...await Promise.all(entries.slice(index, index + 4).map(smoke)))64+}3965 for (const result of results) console.log(result)4066 console.log(`${results.length}/${results.length} independent renderer units returned SVG`)
M diagramzip-render/src/catalog.ts +11 -0
@@ -43,7 +43,10 @@ const targetRuntime: Record<EngineId, EngineRuntime> = {
4343 }4444 4545 const activeRuntime: Partial<Record<EngineId, EngineRuntime>> = {46+ mermaid: 'client',47+ bpmn: 'client',4648 bytefield: 'edge-js',49+ excalidraw: 'client',4750 nomnoml: 'edge-js',4851 vega: 'edge-js',4952 vegalite: 'edge-js',
@@ -51,7 +54,10 @@ const activeRuntime: Partial<Record<EngineId, EngineRuntime>> = {
5154 }5255 5356 const versions: Partial<Record<EngineId, string>> = {57+ mermaid: 'mermaid@11.17.0',58+ bpmn: 'bpmn-js@18.25.1',5459 bytefield: 'bytefield-svg@1.11.0',60+ excalidraw: '@excalidraw/excalidraw@0.18.1',5561 nomnoml: 'nomnoml@1.7.0',5662 vega: 'vega@6.3.1',5763 vegalite: 'vega-lite@6.4.3',
@@ -60,12 +66,17 @@ const versions: Partial<Record<EngineId, string>> = {
6066 6167 const losses: Partial<Record<EngineId, readonly string[]>> = {6268 mermaid: ['External links and resource-loading elements are removed; XHTML labels retain only safe text formatting.'],69+ bpmn: ['External links and resource-loading elements are removed from exported SVG.'],6370 graphviz: [6471 'The published Viz.js wrapper performs runtime WebAssembly instantiation, which Workers prohibit; GraphViz remains on the origin until a precompiled module adapter is built.',6572 'External links and resources are rejected during SVG sanitization.',6673 ],6774 bytefield: ['Only SVG is in the v2 rendering contract.'],6875 dbml: ['The upstream package mixes ESM files into a CommonJS package and remains on the origin until it can be safely repackaged.'],76+ excalidraw: [77+ 'External resources are blocked; image data must be embedded in the scene.',78+ 'Font subsetting is disabled by the sandbox policy, so exports embed the complete self-hosted font.',79+ ],6980 nomnoml: ['Only SVG is in the v2 rendering contract.'],7081 symbolator: ['External links are removed during SVG sanitization.'],7182 vega: ['URL-backed data and images are rejected; data must be embedded as values.', 'Only SVG is in the v2 rendering contract.'],
A diagramzip-render/src/units/compatibility.ts +14 -0
A diagramzip-render/wrangler.compatibility/actdiag.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/blockdiag.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/c4plantuml.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/d2.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/dbml.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/diagramsnet.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/ditaa.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/erd.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/goat.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/graphviz.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/nwdiag.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/packetdiag.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/pikchr.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/plantuml.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/rackdiag.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/seqdiag.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/structurizr.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/svgbob.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/symbolator.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/tikz.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/umlet.jsonc +1 -0
A diagramzip-render/wrangler.compatibility/wireviz.jsonc +1 -0
M diagramzip/PERSISTENCE.md +15 -7
@@ -69,14 +69,18 @@ Cloudflare R2 owns immutable bytes:
6969 ```text7070 contents/open/{content_id}.json7171 contents/locked/{content_id}.enc72-renders/open/{renderer_build}/{render_id}.svg73-renders/open/{renderer_build}/{render_id}.png74-renders/locked/{renderer_build}/{render_id}.svg.enc75-renders/locked/{renderer_build}/{render_id}.png.enc72+renders/open/{renderer_unit}/{renderer_build}/{render_id}.svg73+renders/open/{renderer_unit}/{renderer_build}/{render_id}.png74+renders/locked/{renderer_unit}/{renderer_build}/{render_id}.svg.enc75+renders/locked/{renderer_unit}/{renderer_build}/{render_id}.png.enc76+render-heads/open/{render_id}.{svg|png}.json77+render-heads/locked/{render_id}.{svg|png}.json7678 ```7779 78-R2 object existence is the render-cache source of truth; there is no D1 row per79-render. Draft previews remain transient and use the current renderer. Only an80+Each small render-head manifest records the owning unit, exact build, explicit81+translation pipeline, and immutable object key. R2 object existence is the82+render-cache source of truth; there is no D1 row per render. Draft previews83+remain transient and use the current renderer. Only an8084 explicit alias create or save writes immutable content.8185 8286 The schema is executable in
@@ -153,6 +157,9 @@ PUT /api/v1/aliases/{alias_id}/renders/{svg|png}
153157 Authorization: Bearer {write_capability}154158 If-Match: "{revision}"155159 X-Render-Id: {render_id}160+X-Renderer-Unit: vegalite161+X-Renderer-Build: vegalite-6.4.3-vega-6.3.1-unit-1162+X-Renderer-Pipeline: vegalite,vega156163 ```157164 158165 The revision and render ID prevent a slow render from being attached after the
@@ -208,6 +215,7 @@ transiently to produce an image, but durable storage receives only ciphertext.
208215 - Rate limiting belongs on the same-origin Worker route before broad launch.209216 - Logs must not include `Authorization`, request bodies, passwords, key210217 envelopes, or fragments.211-- Render keys include a renderer-build identifier so upgrades never serve stale218+- Render keys include the owning unit and renderer-build identifier, while the219+ render-head records translated pipelines, so upgrades never serve stale212220 output under a current key.213221 - Direct R2 public access remains disabled; reads go through controlled routes.
D diagramzip/public/renderer-frame.html +0 -14
M diagramzip/src/client-renderers.js +9 -3
M diagramzip/src/diagram-types.js +7 -0
M diagramzip/src/main.js +63 -5
@@ -3,7 +3,7 @@ import { Compartment, EditorState } from '@codemirror/state'
33 import { EditorView } from '@codemirror/view'44 import { HighlightStyle, syntaxHighlighting } from '@codemirror/language'55 import { tags } from '@lezer/highlight'6-import { diagramTypeFromQuery, diagramTypes, isKnownDiagramType, languageFor } from './diagram-types.js'6+import { diagramTypeFromQuery, diagramTypes, isKnownDiagramType, languageFor, urlWithDiagramType } from './diagram-types.js'77 import { exampleStateFor } from './examples.js'88 import { stateForTypeChange } from './type-drafts.js'99 import {
@@ -83,6 +83,14 @@ document.querySelector('#app').innerHTML = `
8383 </div>8484 </header>8585 86+ <aside class="draft-bar" id="draft-bar" aria-live="polite" hidden>87+ <p>This device has changes that are not part of the saved share link.</p>88+ <div>89+ <button class="secondary-action" id="restore-saved" type="button">Restore saved</button>90+ <button class="primary-action" id="make-copy" type="button">Make a copy</button>91+ </div>92+ </aside>93+8694 <div class="mobile-tabs" role="tablist" aria-label="Workspace panel">8795 <button type="button" role="tab" aria-selected="true" data-panel="editor">Edit</button>8896 <button type="button" role="tab" aria-selected="false" data-panel="preview">Preview</button>
@@ -282,6 +290,7 @@ const preview = new PreviewController({
282290 283291 typePicker.addEventListener('change', () => {284292 const type = typePicker.value293+ history.replaceState(null, '', urlWithDiagramType(location.href, type))285294 applyState(stateForTypeChange(typeDrafts, activeType, type, currentState(), exampleStateFor))286295 })287296
@@ -301,6 +310,8 @@ document.querySelector('#lock-diagram').addEventListener('click', lockDiagram)
301310 document.querySelector('#change-password').addEventListener('click', changeDiagramPassword)302311 document.querySelector('#unlock-diagram').addEventListener('click', unlockDiagram)303312 document.querySelector('#save').addEventListener('click', () => saveDiagram())313+document.querySelector('#restore-saved').addEventListener('click', restoreSavedDiagram)314+document.querySelector('#make-copy').addEventListener('click', makeDraftCopy)304315 document.querySelector('#share').addEventListener('click', openShareDialog)305316 document.querySelector('#share-save').addEventListener('click', async () => {306317 await saveDiagram()
@@ -416,8 +427,11 @@ async function loadInitialState() {
416427 }417428 if (location.hash) history.replaceState(null, '', `${location.pathname}${location.search}`)418429 const requestedType = diagramTypeFromQuery(location.search)419- if (requestedType) return exampleStateFor(requestedType)420430 const draft = loadDraft(LOCAL_DRAFT_KEY)431+ if (requestedType) {432+ if (draft?.state.type === requestedType) return draft.state433+ return exampleStateFor(requestedType)434+ }421435 if (draft) return draft.state422436 return exampleStateFor(DEFAULT_DIAGRAM_TYPE)423437 }
@@ -572,7 +586,7 @@ async function createNewAlias(state) {
572586 setRemoteAlias(alias, alias.writeCapability, state, remote.mode === 'locked' ? bundleKey : null)573587 storeWriteCapability(alias.aliasId, alias.writeCapability)574588 removeDraft(previousDraftKey)575- history.pushState(null, '', `/d/${alias.aliasId}`)589+ history.pushState(null, '', urlWithDiagramType(`/d/${alias.aliasId}`, state.type))576590 await cacheSavedRenders(state)577591 }578592
@@ -599,7 +613,8 @@ async function cacheSavedRenders(state) {
599613 if (!remote.aliasId || !remote.writeCapability) return600614 await preview.render(state)601615 const svg = preview.svgBlobFor(state)602- if (!svg) return616+ const renderer = preview.rendererIdentityFor(state)617+ if (!svg || !renderer) return603618 604619 const renders = [['svg', svg]]605620 try {
@@ -620,6 +635,7 @@ async function cacheSavedRenders(state) {
620635 format,621636 mode: remote.mode,622637 render,638+ renderer,623639 })624640 })625641 const results = await Promise.allSettled(uploads)
@@ -919,6 +935,7 @@ function setRemoteAlias(alias, writeCapability, state, bundleKey = null) {
919935 920936 function updateSaveButton() {921937 const button = document.querySelector('#save')938+ updateDraftControls()922939 if (saving) {923940 button.textContent = 'Saving…'924941 button.disabled = true
@@ -933,6 +950,47 @@ function updateSaveButton() {
933950 button.disabled = false934951 }935952 953+function updateDraftControls() {954+ const bar = document.querySelector('#draft-bar')955+ const hasLocalOverlay = Boolean(remote.aliasId && remote.savedState && remote.dirty)956+ bar.hidden = !hasLocalOverlay957+ document.querySelector('#restore-saved').disabled = saving958+ document.querySelector('#make-copy').disabled = saving959+}960+961+function restoreSavedDiagram() {962+ if (!remote.aliasId || !remote.savedState || !remote.dirty) return963+ clearTimeout(renderTimer)964+ clearTimeout(commitDetails.timeout)965+ remote.mode = remote.savedMode966+ remote.keyEnvelopeDirty = false967+ remote.dirty = false968+ removeDraft(`${ALIAS_DRAFT_PREFIX}${remote.aliasId}`)969+ typeDrafts.clear()970+ applyState(remote.savedState, false)971+ history.replaceState(null, '', urlWithDiagramType(location.href, remote.savedState.type))972+ updatePrivacyControls()973+ updateSaveButton()974+ showToast('Restored saved diagram')975+}976+977+async function makeDraftCopy() {978+ if (saving || !remote.aliasId || !remote.dirty) return979+ commitState(false)980+ const state = currentState()981+ saving = true982+ updateSaveButton()983+ try {984+ await createNewAlias(state)985+ showToast('Saved as a new diagram')986+ } catch (error) {987+ showToast(error instanceof Error ? error.message : 'Could not make a copy.')988+ } finally {989+ saving = false990+ updateSaveButton()991+ }992+}993+936994 function updatePrivacyControls() {937995 const locked = remote.mode === 'locked'938996 document.querySelector('#privacy-label').textContent = locked ? 'Password locked' : 'Open'
@@ -963,7 +1021,7 @@ function startNewDiagram() {
9631021 dirty: true,9641022 }9651023 typeDrafts.clear()966- history.pushState(null, '', '/')1024+ history.pushState(null, '', urlWithDiagramType('/', DEFAULT_DIAGRAM_TYPE))9671025 applyState(exampleStateFor(DEFAULT_DIAGRAM_TYPE))9681026 }9691027
M diagramzip/src/persistence.js +10 -1
@@ -204,13 +204,19 @@ export class PersistenceClient {
204204 }205205 206206 207- async uploadRender({ aliasId, renderId, revision, writeCapability, format, mode, render }) {207+ async uploadRender({ aliasId, renderId, revision, writeCapability, format, mode, render, renderer }) {208208 if (!ALIAS_ID_PATTERN.test(aliasId)) throw new Error('Invalid diagram alias.')209209 if (!WRITE_CAPABILITY_PATTERN.test(renderId)) throw new Error('Invalid render ID.')210210 if (!Number.isSafeInteger(revision) || revision < 1) throw new Error('Invalid alias revision.')211211 if (!WRITE_CAPABILITY_PATTERN.test(writeCapability)) throw new Error('Invalid write capability.')212212 if (format !== 'svg' && format !== 'png') throw new Error('Invalid render format.')213213 if (mode !== 'open' && mode !== 'locked') throw new Error('Invalid diagram mode.')214+ if (!renderer || !/^[a-z][a-z0-9-]{0,31}$/.test(renderer.unit)215+ || typeof renderer.build !== 'string' || !/^[A-Za-z0-9][A-Za-z0-9._@+-]{0,127}$/.test(renderer.build)216+ || !Array.isArray(renderer.pipeline) || renderer.pipeline.length < 1217+ || renderer.pipeline.some(value => !/^[a-z][a-z0-9-]{0,31}$/.test(value))) {218+ throw new Error('Invalid renderer identity.')219+ }214220 const contentType = mode === 'locked'215221 ? 'application/json'216222 : format === 'svg' ? 'image/svg+xml' : 'image/png'
@@ -222,6 +228,9 @@ export class PersistenceClient {
222228 'Content-Type': contentType,223229 'If-Match': `"${revision}"`,224230 'X-Render-Id': renderId,231+ 'X-Renderer-Unit': renderer.unit,232+ 'X-Renderer-Build': renderer.build,233+ 'X-Renderer-Pipeline': renderer.pipeline.join(','),225234 },226235 body,227236 })
M diagramzip/src/preview.js +36 -11
@@ -24,6 +24,7 @@ export class PreviewController {
2424 this.renderLoop = null2525 this.latestRenderKey = null2626 this.latestSvgBlob = null27+ this.latestRendererIdentity = null2728 this.imageFallbackUrl = null2829 this.activeImageUrl = null2930 this.drag = null
@@ -83,24 +84,32 @@ export class PreviewController {
8384 8485 try {8586 const clientAdapter = clientAdapterFor(type)86- let sourceSvg87+ let rendered8788 if (clientAdapter) {8889 try {89- const rendered = await clientAdapter.render({ type, source, options }, abortController.signal)90- sourceSvg = sanitizeAndDecorateSvg(rendered.body, meta, presentation, type)90+ const clientRender = await clientAdapter.render({ type, source, options }, abortController.signal)91+ rendered = {92+ body: sanitizeAndDecorateSvg(clientRender.body, meta, presentation, type),93+ identity: {94+ unit: type,95+ build: clientRender.build || clientRender.version,96+ pipeline: Array.isArray(clientRender.pipeline) ? clientRender.pipeline : [type],97+ },98+ }9199 this.status.dataset.cache = 'browser'92- this.status.dataset.renderer = rendered.runtime100+ this.status.dataset.renderer = type93101 } catch (error) {94102 if (error.name === 'AbortError') throw error95- sourceSvg = await this.renderThroughGateway({ type, source, options, meta, presentation }, abortController.signal)103+ rendered = await this.renderThroughGateway({ type, source, options, meta, presentation }, abortController.signal)96104 }97105 } else {98- sourceSvg = await this.renderThroughGateway({ type, source, options, meta, presentation }, abortController.signal)106+ rendered = await this.renderThroughGateway({ type, source, options, meta, presentation }, abortController.signal)99107 }100108 if (requestNumber !== this.requestNumber) return101- const { blob, background } = this.normalizedSvgBlob(sourceSvg)109+ const { blob, background } = this.normalizedSvgBlob(rendered.body)102110 this.latestRenderKey = renderKey103111 this.latestSvgBlob = blob112+ this.latestRendererIdentity = rendered.identity104113 this.imageFallbackUrl = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(await blob.text())}`105114 this.stage.style.setProperty('--render-background', background)106115 const nextObjectUrl = URL.createObjectURL(blob)
@@ -129,7 +138,7 @@ export class PreviewController {
129138 { source, format: 'svg', options, metadata: meta, presentation },130139 signal,131140 )132- if (response.ok || response.status < 500) return await this.renderResponse(response)141+ if (response.ok || response.status < 500) return await this.renderResponse(response, type)133142 await response.body?.cancel()134143 } catch (error) {135144 if (error.name === 'AbortError') throw error
@@ -144,7 +153,7 @@ export class PreviewController {
144153 metadata: meta,145154 presentation,146155 }, signal)147- return this.renderResponse(response)156+ return this.renderResponse(response, type)148157 }149158 150159 renderRequest(endpoint, body, signal) {
@@ -156,13 +165,23 @@ export class PreviewController {
156165 })157166 }158167 159- async renderResponse(response) {168+ async renderResponse(response, fallbackUnit) {160169 if (!response.ok) throw new Error(await this.errorMessage(response))161170 this.status.dataset.cache = response.headers.get('X-Diagram-Cache')?.toLowerCase() ?? 'miss'162171 this.status.dataset.renderer = response.headers.get('X-Diagram-Unit')?.toLowerCase()163172 ?? response.headers.get('X-Diagram-Renderer')?.toLowerCase()164173 ?? 'gateway'165- return response.text()174+ const unit = response.headers.get('X-Diagram-Unit')?.toLowerCase()175+ ?? response.headers.get('X-Diagram-Engine')?.toLowerCase()176+ ?? fallbackUnit177+ const build = response.headers.get('X-Renderer-Build')178+ ?? response.headers.get('X-Diagram-Engine-Version')179+ ?? `${unit}-unknown`180+ const pipeline = (response.headers.get('X-Diagram-Pipeline') ?? unit)181+ .split(',')182+ .map(value => value.trim().toLowerCase())183+ .filter(Boolean)184+ return { body: await response.text(), identity: { unit, build, pipeline } }166185 }167186 168187 retryBlockedImage() {
@@ -186,6 +205,12 @@ export class PreviewController {
186205 return this.latestRenderKey === renderKey ? this.latestSvgBlob : null187206 }188207 208+ rendererIdentityFor(state) {209+ const { type, source, options = {}, meta = {}, presentation = {} } = state210+ const renderKey = JSON.stringify({ type, source, options, meta, presentation })211+ return this.latestRenderKey === renderKey ? this.latestRendererIdentity : null212+ }213+189214 async errorMessage(response) {190215 const body = await response.text()191216 if (response.headers.get('Content-Type')?.includes('application/json')) {
D diagramzip/src/renderer-frame.js +0 -69
@@ -1,69 +0,0 @@
1-import mermaid from 'mermaid'2-import BpmnViewer from 'bpmn-js/lib/Viewer'3-4-const CHANNEL = 'diagram.zip:renderer:v1'5-const VERSIONS = {6- mermaid: 'mermaid@11.17.0',7- bpmn: 'bpmn-js@18.25.1',8-}9-10-mermaid.initialize({11- startOnLoad: false,12- securityLevel: 'strict',13- suppressErrorRendering: true,14- maxTextSize: 100_000,15- maxEdges: 5_000,16- flowchart: { useMaxWidth: false },17-})18-19-let queue = Promise.resolve()20-21-async function renderMermaid(message) {22- const id = `diagramzip-${message.requestId.replace(/[^a-zA-Z0-9_-]/g, '')}`23- const { svg } = await mermaid.render(id, message.source)24- return svg25-}26-27-async function renderBpmn(message) {28- const container = document.createElement('div')29- Object.assign(container.style, { width: '1280px', height: '800px' })30- document.body.append(container)31- const viewer = new BpmnViewer({ container })32- try {33- await viewer.importXML(message.source)34- const { svg } = await viewer.saveSVG()35- return svg36- } finally {37- viewer.destroy()38- container.remove()39- }40-}41-42-async function render(message) {43- let svg44- if (message.engine === 'mermaid') svg = await renderMermaid(message)45- else if (message.engine === 'bpmn') svg = await renderBpmn(message)46- else throw new Error(`No client renderer for ${message.engine}.`)47- return { svg, version: VERSIONS[message.engine] }48-}49-50-window.addEventListener('message', event => {51- if (event.source !== parent || event.data?.channel !== CHANNEL || event.data?.type !== 'render') return52- const message = event.data53- queue = queue.then(async () => {54- try {55- const result = await render(message)56- parent.postMessage({ channel: CHANNEL, type: 'result', requestId: message.requestId, ok: true, ...result }, '*')57- } catch (error) {58- parent.postMessage({59- channel: CHANNEL,60- type: 'result',61- requestId: message.requestId,62- ok: false,63- error: error instanceof Error ? error.message.slice(0, 500) : 'Client rendering failed.',64- }, '*')65- }66- })67-})68-69-parent.postMessage({ channel: CHANNEL, type: 'ready' }, '*')
M diagramzip/src/renderer-units.js +22 -0
@@ -1,9 +1,31 @@
11 export const HTTP_RENDERER_UNITS = Object.freeze({2+ plantuml: 'https://plantuml.render.diagram.zip/v1/svg',3+ graphviz: 'https://graphviz.render.diagram.zip/v1/svg',4+ d2: 'https://d2.render.diagram.zip/v1/svg',5+ c4plantuml: 'https://c4plantuml.render.diagram.zip/v1/svg',6+ blockdiag: 'https://blockdiag.render.diagram.zip/v1/svg',7+ seqdiag: 'https://seqdiag.render.diagram.zip/v1/svg',8+ actdiag: 'https://actdiag.render.diagram.zip/v1/svg',9+ nwdiag: 'https://nwdiag.render.diagram.zip/v1/svg',10+ packetdiag: 'https://packetdiag.render.diagram.zip/v1/svg',11+ rackdiag: 'https://rackdiag.render.diagram.zip/v1/svg',212 bytefield: 'https://bytefield.render.diagram.zip/v1/svg',13+ dbml: 'https://dbml.render.diagram.zip/v1/svg',14+ diagramsnet: 'https://diagramsnet.render.diagram.zip/v1/svg',15+ ditaa: 'https://ditaa.render.diagram.zip/v1/svg',16+ erd: 'https://erd.render.diagram.zip/v1/svg',17+ goat: 'https://goat.render.diagram.zip/v1/svg',318 nomnoml: 'https://nomnoml.render.diagram.zip/v1/svg',19+ pikchr: 'https://pikchr.render.diagram.zip/v1/svg',20+ structurizr: 'https://structurizr.render.diagram.zip/v1/svg',21+ svgbob: 'https://svgbob.render.diagram.zip/v1/svg',22+ symbolator: 'https://symbolator.render.diagram.zip/v1/svg',23+ tikz: 'https://tikz.render.diagram.zip/v1/svg',24+ umlet: 'https://umlet.render.diagram.zip/v1/svg',425 vega: 'https://vega.render.diagram.zip/v1/svg',526 vegalite: 'https://vegalite.render.diagram.zip/v1/svg',627 wavedrom: 'https://wavedrom.render.diagram.zip/v1/svg',28+ wireviz: 'https://wireviz.render.diagram.zip/v1/svg',729 })830 931 export function httpRendererUnitFor(engine) {
M diagramzip/src/style.css +25 -2
@@ -73,11 +73,12 @@ button { cursor: pointer; }
7373 7474 .app-shell {7575 display: grid;76- grid-template-rows: 58px minmax(0, 1fr);76+ grid-template-rows: 58px auto minmax(0, 1fr);7777 height: 100%;7878 }7979 8080 .app-header {81+ grid-row: 1;8182 display: flex;8283 align-items: center;8384 justify-content: space-between;
@@ -112,6 +113,24 @@ button { cursor: pointer; }
112113 min-width: 0;113114 }114115 116+.draft-bar {117+ grid-row: 2;118+ display: flex;119+ align-items: center;120+ justify-content: space-between;121+ gap: 16px;122+ min-height: 46px;123+ padding: 7px 14px 7px 20px;124+ border-bottom: 1px solid var(--line);125+ background: var(--soft);126+}127+128+.draft-bar[hidden] { display: none; }129+.draft-bar p { margin: 0; font-size: 13px; }130+.draft-bar div { display: flex; flex: 0 0 auto; gap: 7px; }131+132+.workspace { grid-row: 3; }133+115134 .render-status {116135 max-width: min(38vw, 420px);117136 overflow: hidden;
@@ -460,7 +479,7 @@ dialog::backdrop {
460479 :focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }461480 462481 @media (max-width: 760px) {463- .app-shell { grid-template-rows: 58px 42px minmax(0, 1fr); }482+ .app-shell { grid-template-rows: 58px auto 42px minmax(0, 1fr); }464483 .render-status { display: none; }465484 .render-status[data-state="error"] {466485 position: fixed;
@@ -482,6 +501,10 @@ dialog::backdrop {
482501 .app-header { padding-left: 14px; }483502 .brand span:last-child { display: none; }484503 .header-meta { flex: 1; justify-content: flex-end; gap: 6px; }504+ .draft-bar { align-items: stretch; flex-direction: column; gap: 7px; padding: 9px 14px; }505+ .draft-bar div { display: grid; grid-template-columns: 1fr 1fr; }506+ .mobile-tabs { grid-row: 3; }507+ .workspace { grid-row: 4; }485508 .type-picker { flex: 0 1 142px; min-width: 0; }486509 .type-picker select { width: 100%; max-width: 142px; }487510 .mobile-tabs {
M diagramzip/test/client-renderers.test.js +14 -1
@@ -11,7 +11,16 @@ function fakeBrowser() {
1111 postMessage(message) {1212 queueMicrotask(() => listener({1313 source: contentWindow,14- data: { channel: CHANNEL, type: 'result', requestId: message.requestId, ok: true, svg: '<svg/>', version: 'mermaid@test' },14+ data: {15+ channel: CHANNEL,16+ type: 'result',17+ requestId: message.requestId,18+ ok: true,19+ svg: '<svg/>',20+ version: 'mermaid@test',21+ build: 'mermaid-test-unit-1',22+ pipeline: ['mermaid'],23+ },1524 }))1625 },1726 }
@@ -31,6 +40,8 @@ function fakeBrowser() {
3140 3241 test('registers the first client-native renderer cohort', () => {3342 assert.deepEqual(CLIENT_RENDERER_IDS, ['mermaid', 'bpmn', 'excalidraw'])43+ assert.equal(CLIENT_RENDERERS.mermaid.frameUrl, 'https://mermaid.render.diagram.zip/index.html?v=1')44+ assert.equal(CLIENT_RENDERERS.bpmn.frameUrl, 'https://bpmn.render.diagram.zip/index.html?v=1')3445 assert.equal(CLIENT_RENDERERS.excalidraw.frameUrl, 'https://excalidraw.render.diagram.zip/index.html?v=3')3546 assert.equal(clientAdapterFor('graphviz'), null)3647 })
@@ -42,6 +53,8 @@ test('renders through a script-only unique-origin frame', async () => {
4253 assert.equal(result.body, '<svg/>')4354 assert.equal(result.runtime, 'client')4455 assert.equal(result.version, 'mermaid@test')56+ assert.equal(result.build, 'mermaid-test-unit-1')57+ assert.deepEqual(result.pipeline, ['mermaid'])4558 assert.equal(browser.attributes.get('sandbox'), 'allow-scripts')4659 assert.equal(browser.attributes.has('allow-same-origin'), false)4760 })
M diagramzip/test/diagram-types.test.js +10 -1
M diagramzip/test/persistence.test.js +10 -0
M diagramzip/test/renderer-units.test.js +7 -4
D diagramzip/vite.renderer.config.js +0 -18
M excalidraw/diagramzip-unit/frame.js +4 -1
M package-lock.json +71 -1409
@@ -15,9 +15,7 @@
1515 "@codemirror/language": "^6.12.4",1616 "@lezer/highlight": "^1.2.3",1717 "blocked-at": "^1.2.0",18- "bpmn-js": "18.25.1",1918 "codemirror": "^6.0.2",20- "mermaid": "11.17.0",2119 "pako": "^3.0.1",2220 "saxes": "6.0.0"2321 },
@@ -28,41 +26,6 @@
2826 "node": ">=24"2927 }3028 },31- "node_modules/@antfu/install-pkg": {32- "version": "1.1.0",33- "resolved": "https://registry.npmjs.org/@antfu/install-pkg/-/install-pkg-1.1.0.tgz",34- "integrity": "sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==",35- "license": "MIT",36- "dependencies": {37- "package-manager-detector": "^1.3.0",38- "tinyexec": "^1.0.1"39- },40- "funding": {41- "url": "https://github.com/sponsors/antfu"42- }43- },44- "node_modules/@bpmn-io/diagram-js-ui": {45- "version": "0.2.4",46- "resolved": "https://registry.npmjs.org/@bpmn-io/diagram-js-ui/-/diagram-js-ui-0.2.4.tgz",47- "integrity": "sha512-I678ZGtoH7z7FgzFhzzppM9ThsJ3Lh83kW3GjhjG3xyYciIPYHMaHK1MABP8F69H9pFZpViM6t4qUo8dwrVz0w==",48- "license": "MIT",49- "dependencies": {50- "htm": "^3.1.1",51- "preact": "^10.29.2"52- }53- },54- "node_modules/@braintree/sanitize-url": {55- "version": "7.1.2",56- "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-7.1.2.tgz",57- "integrity": "sha512-jigsZK+sMF/cuiB7sERuo9V7N9jx+dhmHHnQyDSVdpZwVutaBu7WvNYqMDLSgFgfB30n452TP3vjDAvFC973mA==",58- "license": "MIT"59- },60- "node_modules/@chevrotain/types": {61- "version": "11.1.2",62- "resolved": "https://registry.npmjs.org/@chevrotain/types/-/types-11.1.2.tgz",63- "integrity": "sha512-U+HFai5+zmJCkK86QsaJtoITlboZHBqrVketcO2ROv865xfCMSFpELQoz1GkX5GzME8pTa+3kbKrZHQtI0gdbw==",64- "license": "Apache-2.0"65- },6629 "node_modules/@codemirror/autocomplete": {6730 "version": "6.20.3",6831 "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.20.3.tgz",
@@ -197,23 +160,6 @@
197160 "w3c-keyname": "^2.2.4"198161 }199162 },200- "node_modules/@iconify/types": {201- "version": "2.0.0",202- "resolved": "https://registry.npmjs.org/@iconify/types/-/types-2.0.0.tgz",203- "integrity": "sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==",204- "license": "MIT"205- },206- "node_modules/@iconify/utils": {207- "version": "3.1.4",208- "resolved": "https://registry.npmjs.org/@iconify/utils/-/utils-3.1.4.tgz",209- "integrity": "sha512-b1S7B1k9ohZ+iNTi2ATxbRYG9fTrJmUT0rc46bvVnNxqNRGW7dyo/vRREwyniI5IRN2RSJHDcm+s3BjWrSAjHw==",210- "license": "MIT",211- "dependencies": {212- "@antfu/install-pkg": "^1.1.0",213- "@iconify/types": "^2.0.0",214- "import-meta-resolve": "^4.2.0"215- }216- },217163 "node_modules/@lezer/common": {218164 "version": "1.5.2",219165 "resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.5.2.tgz",
@@ -277,15 +223,6 @@
277223 "integrity": "sha512-FY+MKLBoTsLNJF/eLWaOsXGdz6uh3Iu1axjPf6TUq92IYumcTcXWHoS747JARLkcdlJ/Waiaxc5wQfFO8jC6NA==",278224 "license": "MIT"279225 },280- "node_modules/@mermaid-js/parser": {281- "version": "1.2.1",282- "resolved": "https://registry.npmjs.org/@mermaid-js/parser/-/parser-1.2.1.tgz",283- "integrity": "sha512-n12NohV3mrUyUL2o93IgG/ifeW9FTyeJn3zDxkhwa8MJ9Fxg3HQMlA3RiGmD/3UnJvheztkjjQAjA2T4LmUcpw==",284- "license": "MIT",285- "dependencies": {286- "@chevrotain/types": "~11.1.2"287- }288- },289226 "node_modules/@oxc-project/types": {290227 "version": "0.146.0",291228 "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.146.0.tgz",
@@ -576,330 +513,12 @@
576513 "dev": true,577514 "license": "MIT"578515 },579- "node_modules/@types/d3": {580- "version": "7.4.3",581- "resolved": "https://registry.npmjs.org/@types/d3/-/d3-7.4.3.tgz",582- "integrity": "sha512-lZXZ9ckh5R8uiFVt8ogUNf+pIrK4EsWrx2Np75WvF/eTpJ0FMHNhjXk8CKEx/+gpHbNQyJWehbFaTvqmHWB3ww==",583- "license": "MIT",584- "dependencies": {585- "@types/d3-array": "*",586- "@types/d3-axis": "*",587- "@types/d3-brush": "*",588- "@types/d3-chord": "*",589- "@types/d3-color": "*",590- "@types/d3-contour": "*",591- "@types/d3-delaunay": "*",592- "@types/d3-dispatch": "*",593- "@types/d3-drag": "*",594- "@types/d3-dsv": "*",595- "@types/d3-ease": "*",596- "@types/d3-fetch": "*",597- "@types/d3-force": "*",598- "@types/d3-format": "*",599- "@types/d3-geo": "*",600- "@types/d3-hierarchy": "*",601- "@types/d3-interpolate": "*",602- "@types/d3-path": "*",603- "@types/d3-polygon": "*",604- "@types/d3-quadtree": "*",605- "@types/d3-random": "*",606- "@types/d3-scale": "*",607- "@types/d3-scale-chromatic": "*",608- "@types/d3-selection": "*",609- "@types/d3-shape": "*",610- "@types/d3-time": "*",611- "@types/d3-time-format": "*",612- "@types/d3-timer": "*",613- "@types/d3-transition": "*",614- "@types/d3-zoom": "*"615- }616- },617- "node_modules/@types/d3-array": {618- "version": "3.2.2",619- "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-3.2.2.tgz",620- "integrity": "sha512-hOLWVbm7uRza0BYXpIIW5pxfrKe0W+D5lrFiAEYR+pb6w3N2SwSMaJbXdUfSEv+dT4MfHBLtn5js0LAWaO6otw==",621- "license": "MIT"622- },623- "node_modules/@types/d3-axis": {624- "version": "3.0.6",625- "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-3.0.6.tgz",626- "integrity": "sha512-pYeijfZuBd87T0hGn0FO1vQ/cgLk6E1ALJjfkC0oJ8cbwkZl3TpgS8bVBLZN+2jjGgg38epgxb2zmoGtSfvgMw==",627- "license": "MIT",628- "dependencies": {629- "@types/d3-selection": "*"630- }631- },632- "node_modules/@types/d3-brush": {633- "version": "3.0.6",634- "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-3.0.6.tgz",635- "integrity": "sha512-nH60IZNNxEcrh6L1ZSMNA28rj27ut/2ZmI3r96Zd+1jrZD++zD3LsMIjWlvg4AYrHn/Pqz4CF3veCxGjtbqt7A==",636- "license": "MIT",637- "dependencies": {638- "@types/d3-selection": "*"639- }640- },641- "node_modules/@types/d3-chord": {642- "version": "3.0.6",643- "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-3.0.6.tgz",644- "integrity": "sha512-LFYWWd8nwfwEmTZG9PfQxd17HbNPksHBiJHaKuY1XeqscXacsS2tyoo6OdRsjf+NQYeB6XrNL3a25E3gH69lcg==",645- "license": "MIT"646- },647- "node_modules/@types/d3-color": {648- "version": "3.1.3",649- "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-3.1.3.tgz",650- "integrity": "sha512-iO90scth9WAbmgv7ogoq57O9YpKmFBbmoEoCHDB2xMBY0+/KVrqAaCDyCE16dUspeOvIxFFRI+0sEtqDqy2b4A==",651- "license": "MIT"652- },653- "node_modules/@types/d3-contour": {654- "version": "3.0.6",655- "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-3.0.6.tgz",656- "integrity": "sha512-BjzLgXGnCWjUSYGfH1cpdo41/hgdWETu4YxpezoztawmqsvCeep+8QGfiY6YbDvfgHz/DkjeIkkZVJavB4a3rg==",657- "license": "MIT",658- "dependencies": {659- "@types/d3-array": "*",660- "@types/geojson": "*"661- }662- },663- "node_modules/@types/d3-delaunay": {664- "version": "6.0.4",665- "resolved": "https://registry.npmjs.org/@types/d3-delaunay/-/d3-delaunay-6.0.4.tgz",666- "integrity": "sha512-ZMaSKu4THYCU6sV64Lhg6qjf1orxBthaC161plr5KuPHo3CNm8DTHiLw/5Eq2b6TsNP0W0iJrUOFscY6Q450Hw==",667- "license": "MIT"668- },669- "node_modules/@types/d3-dispatch": {670- "version": "3.0.7",671- "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-3.0.7.tgz",672- "integrity": "sha512-5o9OIAdKkhN1QItV2oqaE5KMIiXAvDWBDPrD85e58Qlz1c1kI/J0NcqbEG88CoTwJrYe7ntUCVfeUl2UJKbWgA==",673- "license": "MIT"674- },675- "node_modules/@types/d3-drag": {676- "version": "3.0.7",677- "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-3.0.7.tgz",678- "integrity": "sha512-HE3jVKlzU9AaMazNufooRJ5ZpWmLIoc90A37WU2JMmeq28w1FQqCZswHZ3xR+SuxYftzHq6WU6KJHvqxKzTxxQ==",679- "license": "MIT",680- "dependencies": {681- "@types/d3-selection": "*"682- }683- },684- "node_modules/@types/d3-dsv": {685- "version": "3.0.7",686- "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-3.0.7.tgz",687- "integrity": "sha512-n6QBF9/+XASqcKK6waudgL0pf/S5XHPPI8APyMLLUHd8NqouBGLsU8MgtO7NINGtPBtk9Kko/W4ea0oAspwh9g==",688- "license": "MIT"689- },690- "node_modules/@types/d3-ease": {691- "version": "3.0.2",692- "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-3.0.2.tgz",693- "integrity": "sha512-NcV1JjO5oDzoK26oMzbILE6HW7uVXOHLQvHshBUW4UMdZGfiY6v5BeQwh9a9tCzv+CeefZQHJt5SRgK154RtiA==",694- "license": "MIT"695- },696- "node_modules/@types/d3-fetch": {697- "version": "3.0.7",698- "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-3.0.7.tgz",699- "integrity": "sha512-fTAfNmxSb9SOWNB9IoG5c8Hg6R+AzUHDRlsXsDZsNp6sxAEOP0tkP3gKkNSO/qmHPoBFTxNrjDprVHDQDvo5aA==",700- "license": "MIT",701- "dependencies": {702- "@types/d3-dsv": "*"703- }704- },705- "node_modules/@types/d3-force": {706- "version": "3.0.10",707- "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-3.0.10.tgz",708- "integrity": "sha512-ZYeSaCF3p73RdOKcjj+swRlZfnYpK1EbaDiYICEEp5Q6sUiqFaFQ9qgoshp5CzIyyb/yD09kD9o2zEltCexlgw==",709- "license": "MIT"710- },711- "node_modules/@types/d3-format": {712- "version": "3.0.4",713- "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-3.0.4.tgz",714- "integrity": "sha512-fALi2aI6shfg7vM5KiR1wNJnZ7r6UuggVqtDA+xiEdPZQwy/trcQaHnwShLuLdta2rTymCNpxYTiMZX/e09F4g==",715- "license": "MIT"716- },717- "node_modules/@types/d3-geo": {718- "version": "3.1.1",719- "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-3.1.1.tgz",720- "integrity": "sha512-65Emv9fQiQQqphLlRkuQ5ypPsOmWPhtBGCMv61JDPEPMvsx+gzhGf74yw1a78xFKPj6zw4AgQICJoQv0vK9M2w==",721- "license": "MIT",722- "dependencies": {723- "@types/geojson": "*"724- }725- },726- "node_modules/@types/d3-hierarchy": {727- "version": "3.1.7",728- "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-3.1.7.tgz",729- "integrity": "sha512-tJFtNoYBtRtkNysX1Xq4sxtjK8YgoWUNpIiUee0/jHGRwqvzYxkq0hGVbbOGSz+JgFxxRu4K8nb3YpG3CMARtg==",730- "license": "MIT"731- },732- "node_modules/@types/d3-interpolate": {733- "version": "3.0.4",734- "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-3.0.4.tgz",735- "integrity": "sha512-mgLPETlrpVV1YRJIglr4Ez47g7Yxjl1lj7YKsiMCb27VJH9W8NVM6Bb9d8kkpG/uAQS5AmbA48q2IAolKKo1MA==",736- "license": "MIT",737- "dependencies": {738- "@types/d3-color": "*"739- }740- },741- "node_modules/@types/d3-path": {742- "version": "3.1.1",743- "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-3.1.1.tgz",744- "integrity": "sha512-VMZBYyQvbGmWyWVea0EHs/BwLgxc+MKi1zLDCONksozI4YJMcTt8ZEuIR4Sb1MMTE8MMW49v0IwI5+b7RmfWlg==",745- "license": "MIT"746- },747- "node_modules/@types/d3-polygon": {748- "version": "3.0.2",749- "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-3.0.2.tgz",750- "integrity": "sha512-ZuWOtMaHCkN9xoeEMr1ubW2nGWsp4nIql+OPQRstu4ypeZ+zk3YKqQT0CXVe/PYqrKpZAi+J9mTs05TKwjXSRA==",751- "license": "MIT"752- },753- "node_modules/@types/d3-quadtree": {754- "version": "3.0.6",755- "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-3.0.6.tgz",756- "integrity": "sha512-oUzyO1/Zm6rsxKRHA1vH0NEDG58HrT5icx/azi9MF1TWdtttWl0UIUsjEQBBh+SIkrpd21ZjEv7ptxWys1ncsg==",757- "license": "MIT"758- },759- "node_modules/@types/d3-random": {760- "version": "3.0.4",761- "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-3.0.4.tgz",762- "integrity": "sha512-UHYId5WTCx4L4YNel7NU00XUXXgvgpgZOvp10PuvsQENjMDXhh2RyFc0KBjO7B45ne4Ha1yVH7ii0vnzKkuzWA==",763- "license": "MIT"764- },765- "node_modules/@types/d3-scale": {766- "version": "4.0.9",767- "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-4.0.9.tgz",768- "integrity": "sha512-dLmtwB8zkAeO/juAMfnV+sItKjlsw2lKdZVVy6LRr0cBmegxSABiLEpGVmSJJ8O08i4+sGR6qQtb6WtuwJdvVw==",769- "license": "MIT",770- "dependencies": {771- "@types/d3-time": "*"772- }773- },774- "node_modules/@types/d3-scale-chromatic": {775- "version": "3.1.0",776- "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",777- "integrity": "sha512-iWMJgwkK7yTRmWqRB5plb1kadXyQ5Sj8V/zYlFGMUBbIPKQScw+Dku9cAAMgJG+z5GYDoMjWGLVOvjghDEFnKQ==",778- "license": "MIT"779- },780- "node_modules/@types/d3-selection": {781- "version": "3.0.11",782- "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-3.0.11.tgz",783- "integrity": "sha512-bhAXu23DJWsrI45xafYpkQ4NtcKMwWnAC/vKrd2l+nxMFuvOT3XMYTIj2opv8vq8AO5Yh7Qac/nSeP/3zjTK0w==",784- "license": "MIT"785- },786- "node_modules/@types/d3-shape": {787- "version": "3.1.8",788- "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-3.1.8.tgz",789- "integrity": "sha512-lae0iWfcDeR7qt7rA88BNiqdvPS5pFVPpo5OfjElwNaT2yyekbM0C9vK+yqBqEmHr6lDkRnYNoTBYlAgJa7a4w==",790- "license": "MIT",791- "dependencies": {792- "@types/d3-path": "*"793- }794- },795- "node_modules/@types/d3-time": {796- "version": "3.0.4",797- "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-3.0.4.tgz",798- "integrity": "sha512-yuzZug1nkAAaBlBBikKZTgzCeA+k1uy4ZFwWANOfKw5z5LRhV0gNA7gNkKm7HoK+HRN0wX3EkxGk0fpbWhmB7g==",799- "license": "MIT"800- },801- "node_modules/@types/d3-time-format": {802- "version": "4.0.3",803- "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-4.0.3.tgz",804- "integrity": "sha512-5xg9rC+wWL8kdDj153qZcsJ0FWiFt0J5RB6LYUNZjwSnesfblqrI/bJ1wBdJ8OQfncgbJG5+2F+qfqnqyzYxyg==",805- "license": "MIT"806- },807- "node_modules/@types/d3-timer": {808- "version": "3.0.2",809- "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-3.0.2.tgz",810- "integrity": "sha512-Ps3T8E8dZDam6fUyNiMkekK3XUsaUEik+idO9/YjPtfj2qruF8tFBXS7XhtE4iIXBLxhmLjP3SXpLhVf21I9Lw==",811- "license": "MIT"812- },813- "node_modules/@types/d3-transition": {814- "version": "3.0.9",815- "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-3.0.9.tgz",816- "integrity": "sha512-uZS5shfxzO3rGlu0cC3bjmMFKsXv+SmZZcgp0KD22ts4uGXp5EVYGzu/0YdwZeKmddhcAccYtREJKkPfXkZuCg==",817- "license": "MIT",818- "dependencies": {819- "@types/d3-selection": "*"820- }821- },822- "node_modules/@types/d3-zoom": {823- "version": "3.0.8",824- "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-3.0.8.tgz",825- "integrity": "sha512-iqMC4/YlFCSlO8+2Ii1GGGliCAY4XdeG748w5vQUbevlbDu0zSjH/+jojorQVBK/se0j6DUFNPBGSqD3YWYnDw==",826- "license": "MIT",827- "dependencies": {828- "@types/d3-interpolate": "*",829- "@types/d3-selection": "*"830- }831- },832- "node_modules/@types/geojson": {833- "version": "7946.0.16",834- "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz",835- "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==",836- "license": "MIT"837- },838- "node_modules/@types/trusted-types": {839- "version": "2.0.7",840- "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.7.tgz",841- "integrity": "sha512-ScaPdn1dQczgbl0QFTeTOmVHFULt394XJgOQNoyVhZ6r2vLnMLJfBPd53SB52T/3G36VI1/g2MZaX0cwDuXsfw==",842- "license": "MIT",843- "optional": true844- },845- "node_modules/@upsetjs/venn.js": {846- "version": "2.0.0",847- "resolved": "https://registry.npmjs.org/@upsetjs/venn.js/-/venn.js-2.0.0.tgz",848- "integrity": "sha512-WbBhLrooyePuQ1VZxrJjtLvTc4NVfpOyKx0sKqioq9bX1C1m7Jgykkn8gLrtwumBioXIqam8DLxp88Adbue6Hw==",849- "license": "MIT",850- "optionalDependencies": {851- "d3-selection": "^3.0.0",852- "d3-transition": "^3.0.1"853- }854- },855516 "node_modules/blocked-at": {856517 "version": "1.2.0",857518 "resolved": "https://registry.npmjs.org/blocked-at/-/blocked-at-1.2.0.tgz",858519 "integrity": "sha512-Ba9yhK4KcFrgqEPgsU0qVGiMimf+VrD9QJo9pgwjg4yl0GXwgOJS8IRx2rPepQjalrmUdGTqX47bSuJLUMLX7w==",859520 "license": "ISC"860521 },861- "node_modules/bpmn-js": {862- "version": "18.25.1",863- "resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-18.25.1.tgz",864- "integrity": "sha512-wT/TjzUQw3o5vU6nI2tytOhOm9atf2tOgCdCKF6sQUvokZ0nOEH7yfE9IvwKXclfdUxvdawgU80h909hvQJ9hw==",865- "license": "SEE LICENSE IN LICENSE",866- "dependencies": {867- "bpmn-moddle": "^10.0.0",868- "diagram-js": "^15.24.0",869- "diagram-js-direct-editing": "^3.5.1",870- "ids": "^3.0.2",871- "inherits-browser": "^0.1.0",872- "min-dash": "^5.1.0",873- "min-dom": "^5.3.0",874- "tiny-svg": "^4.1.4"875- },876- "engines": {877- "node": "*"878- }879- },880- "node_modules/bpmn-moddle": {881- "version": "10.1.0",882- "resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-10.1.0.tgz",883- "integrity": "sha512-k9Vl97hiFwlr4bJTQ5+pZp21bmrQwil5jnMQ30wF8vney2/WnIcJmWwYzRTAKFVoViTGowtDfbO5rGEF4viO0w==",884- "license": "MIT",885- "dependencies": {886- "min-dash": "^5.1.0",887- "moddle": "^8.2.1",888- "moddle-xml": "^12.1.0"889- },890- "engines": {891- "node": ">= 20.12"892- }893- },894- "node_modules/clsx": {895- "version": "2.1.1",896- "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz",897- "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==",898- "license": "MIT",899- "engines": {900- "node": ">=6"901- }902- },903522 "node_modules/codemirror": {904523 "version": "6.0.2",905524 "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-6.0.2.tgz",
@@ -915,817 +534,104 @@
915534 "@codemirror/view": "^6.0.0"916535 }917536 },918- "node_modules/commander": {919- "version": "7.2.0",920- "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz",921- "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==",922- "license": "MIT",923- "engines": {924- "node": ">= 10"925- }926- },927- "node_modules/cose-base": {928- "version": "1.0.3",929- "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-1.0.3.tgz",930- "integrity": "sha512-s9whTXInMSgAp/NVXVNuVxVKzGH2qck3aQlVHxDCdAEPgtMKwc4Wq6/QKhgdEdgbLSi9rBTAcPoRa6JpiG4ksg==",931- "license": "MIT",932- "dependencies": {933- "layout-base": "^1.0.0"934- }935- },936537 "node_modules/crelt": {937538 "version": "1.0.7",938539 "resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.7.tgz",939540 "integrity": "sha512-aK6BbWfhf4U/wCcLHKPJl/xa6VkVstRaPywWtMKGwuOLc/wZTyQYuoxgvZnNsBvv7Kg3YTBQYYBCggcviQczuA==",940541 "license": "MIT"941542 },942- "node_modules/cytoscape": {943- "version": "3.34.1",944- "resolved": "https://registry.npmjs.org/cytoscape/-/cytoscape-3.34.1.tgz",945- "integrity": "sha512-Lr0RvH9H75y9ar8h9Toy6u4lxRSCcxUq+hHcQ26sVWo6BnaQp1gwEZOYqwuYTZhyW7npyKnNLP8oJ2p1/3OZ7g==",946- "license": "MIT",543+ "node_modules/detect-libc": {544+ "version": "2.1.2",545+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",546+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",547+ "dev": true,548+ "license": "Apache-2.0",947549 "engines": {948- "node": ">=0.10"550+ "node": ">=8"949551 }950552 },951- "node_modules/cytoscape-cose-bilkent": {952- "version": "4.1.0",953- "resolved": "https://registry.npmjs.org/cytoscape-cose-bilkent/-/cytoscape-cose-bilkent-4.1.0.tgz",954- "integrity": "sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==",553+ "node_modules/fdir": {554+ "version": "6.5.0",555+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",556+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",557+ "dev": true,955558 "license": "MIT",956- "dependencies": {957- "cose-base": "^1.0.0"559+ "engines": {560+ "node": ">=12.0.0"958561 },959562 "peerDependencies": {960- "cytoscape": "^3.2.0"961- }962- },963- "node_modules/cytoscape-fcose": {964- "version": "2.2.0",965- "resolved": "https://registry.npmjs.org/cytoscape-fcose/-/cytoscape-fcose-2.2.0.tgz",966- "integrity": "sha512-ki1/VuRIHFCzxWNrsshHYPs6L7TvLu3DL+TyIGEsRcvVERmxokbf5Gdk7mFxZnTdiGtnA4cfSmjZJMviqSuZrQ==",967- "license": "MIT",968- "dependencies": {969- "cose-base": "^2.2.0"563+ "picomatch": "^3 || ^4"970564 },971- "peerDependencies": {972- "cytoscape": "^3.2.0"565+ "peerDependenciesMeta": {566+ "picomatch": {567+ "optional": true568+ }973569 }974570 },975- "node_modules/cytoscape-fcose/node_modules/cose-base": {976- "version": "2.2.0",977- "resolved": "https://registry.npmjs.org/cose-base/-/cose-base-2.2.0.tgz",978- "integrity": "sha512-AzlgcsCbUMymkADOJtQm3wO9S3ltPfYOFD5033keQn9NJzIbtnZj+UdBJe7DYml/8TdbtHJW3j58SOnKhWY/5g==",571+ "node_modules/fsevents": {572+ "version": "2.3.3",573+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",574+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",575+ "dev": true,576+ "hasInstallScript": true,979577 "license": "MIT",980- "dependencies": {981- "layout-base": "^2.0.0"982- }983- },984- "node_modules/cytoscape-fcose/node_modules/layout-base": {985- "version": "2.0.1",986- "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-2.0.1.tgz",987- "integrity": "sha512-dp3s92+uNI1hWIpPGH3jK2kxE2lMjdXdr+DH8ynZHpd6PUlH6x6cbuXnoMmiNumznqaNO31xu9e79F0uuZ0JFg==",988- "license": "MIT"989- },990- "node_modules/d3": {991- "version": "7.9.0",992- "resolved": "https://registry.npmjs.org/d3/-/d3-7.9.0.tgz",993- "integrity": "sha512-e1U46jVP+w7Iut8Jt8ri1YsPOvFpg46k+K8TpCb0P+zjCkjkPnV7WzfDJzMHy1LnA+wj5pLT1wjO901gLXeEhA==",994- "license": "ISC",995- "dependencies": {996- "d3-array": "3",997- "d3-axis": "3",998- "d3-brush": "3",999- "d3-chord": "3",1000- "d3-color": "3",1001- "d3-contour": "4",1002- "d3-delaunay": "6",1003- "d3-dispatch": "3",1004- "d3-drag": "3",1005- "d3-dsv": "3",1006- "d3-ease": "3",1007- "d3-fetch": "3",1008- "d3-force": "3",1009- "d3-format": "3",1010- "d3-geo": "3",1011- "d3-hierarchy": "3",1012- "d3-interpolate": "3",1013- "d3-path": "3",1014- "d3-polygon": "3",1015- "d3-quadtree": "3",1016- "d3-random": "3",1017- "d3-scale": "4",1018- "d3-scale-chromatic": "3",1019- "d3-selection": "3",1020- "d3-shape": "3",1021- "d3-time": "3",1022- "d3-time-format": "4",1023- "d3-timer": "3",1024- "d3-transition": "3",1025- "d3-zoom": "3"1026- },578+ "optional": true,579+ "os": [580+ "darwin"581+ ],1027582 "engines": {1028- "node": ">=12"583+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"1029584 }1030585 },1031- "node_modules/d3-array": {1032- "version": "3.2.4",1033- "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-3.2.4.tgz",1034- "integrity": "sha512-tdQAmyA18i4J7wprpYq8ClcxZy3SC31QMeByyCFyRt7BVHdREQZ5lpzoe5mFEYZUWe+oq8HBvk9JjpibyEV4Jg==",1035- "license": "ISC",586+ "node_modules/lightningcss": {587+ "version": "1.33.0",588+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",589+ "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",590+ "dev": true,591+ "license": "MPL-2.0",1036592 "dependencies": {1037- "internmap": "1 - 2"593+ "detect-libc": "^2.0.3"1038594 },1039595 "engines": {1040- "node": ">=12"1041- }1042- },1043- "node_modules/d3-axis": {1044- "version": "3.0.0",1045- "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-3.0.0.tgz",1046- "integrity": "sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==",1047- "license": "ISC",1048- "engines": {1049- "node": ">=12"1050- }1051- },1052- "node_modules/d3-brush": {1053- "version": "3.0.0",1054- "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-3.0.0.tgz",1055- "integrity": "sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==",1056- "license": "ISC",1057- "dependencies": {1058- "d3-dispatch": "1 - 3",1059- "d3-drag": "2 - 3",1060- "d3-interpolate": "1 - 3",1061- "d3-selection": "3",1062- "d3-transition": "3"596+ "node": ">= 12.0.0"1063597 },1064- "engines": {1065- "node": ">=12"1066- }1067- },1068- "node_modules/d3-chord": {1069- "version": "3.0.1",1070- "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-3.0.1.tgz",1071- "integrity": "sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==",1072- "license": "ISC",1073- "dependencies": {1074- "d3-path": "1 - 3"598+ "funding": {599+ "type": "opencollective",600+ "url": "https://opencollective.com/parcel"1075601 },1076- "engines": {1077- "node": ">=12"602+ "optionalDependencies": {603+ "lightningcss-android-arm64": "1.33.0",604+ "lightningcss-darwin-arm64": "1.33.0",605+ "lightningcss-darwin-x64": "1.33.0",606+ "lightningcss-freebsd-x64": "1.33.0",607+ "lightningcss-linux-arm-gnueabihf": "1.33.0",608+ "lightningcss-linux-arm64-gnu": "1.33.0",609+ "lightningcss-linux-arm64-musl": "1.33.0",610+ "lightningcss-linux-x64-gnu": "1.33.0",611+ "lightningcss-linux-x64-musl": "1.33.0",612+ "lightningcss-win32-arm64-msvc": "1.33.0",613+ "lightningcss-win32-x64-msvc": "1.33.0"1078614 }1079615 },1080- "node_modules/d3-color": {1081- "version": "3.1.0",1082- "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-3.1.0.tgz",1083- "integrity": "sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA==",1084- "license": "ISC",616+ "node_modules/lightningcss-android-arm64": {617+ "version": "1.33.0",618+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",619+ "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",620+ "cpu": [621+ "arm64"622+ ],623+ "dev": true,624+ "license": "MPL-2.0",625+ "optional": true,626+ "os": [627+ "android"628+ ],1085629 "engines": {1086- "node": ">=12"1087- }1088- },1089- "node_modules/d3-contour": {1090- "version": "4.0.2",1091- "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-4.0.2.tgz",1092- "integrity": "sha512-4EzFTRIikzs47RGmdxbeUvLWtGedDUNkTcmzoeyg4sP/dvCexO47AaQL7VKy/gul85TOxw+IBgA8US2xwbToNA==",1093- "license": "ISC",1094- "dependencies": {1095- "d3-array": "^3.2.0"1096- },1097- "engines": {1098- "node": ">=12"1099- }1100- },1101- "node_modules/d3-delaunay": {1102- "version": "6.0.4",1103- "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-6.0.4.tgz",1104- "integrity": "sha512-mdjtIZ1XLAM8bm/hx3WwjfHt6Sggek7qH043O8KEjDXN40xi3vx/6pYSVTwLjEgiXQTbvaouWKynLBiUZ6SK6A==",1105- "license": "ISC",1106- "dependencies": {1107- "delaunator": "5"1108- },1109- "engines": {1110- "node": ">=12"1111- }1112- },1113- "node_modules/d3-dispatch": {1114- "version": "3.0.1",1115- "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-3.0.1.tgz",1116- "integrity": "sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==",1117- "license": "ISC",1118- "engines": {1119- "node": ">=12"1120- }1121- },1122- "node_modules/d3-drag": {1123- "version": "3.0.0",1124- "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-3.0.0.tgz",1125- "integrity": "sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==",1126- "license": "ISC",1127- "dependencies": {1128- "d3-dispatch": "1 - 3",1129- "d3-selection": "3"1130- },1131- "engines": {1132- "node": ">=12"1133- }1134- },1135- "node_modules/d3-dsv": {1136- "version": "3.0.1",1137- "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-3.0.1.tgz",1138- "integrity": "sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==",1139- "license": "ISC",1140- "dependencies": {1141- "commander": "7",1142- "iconv-lite": "0.6",1143- "rw": "1"1144- },1145- "bin": {1146- "csv2json": "bin/dsv2json.js",1147- "csv2tsv": "bin/dsv2dsv.js",1148- "dsv2dsv": "bin/dsv2dsv.js",1149- "dsv2json": "bin/dsv2json.js",1150- "json2csv": "bin/json2dsv.js",1151- "json2dsv": "bin/json2dsv.js",1152- "json2tsv": "bin/json2dsv.js",1153- "tsv2csv": "bin/dsv2dsv.js",1154- "tsv2json": "bin/dsv2json.js"1155- },1156- "engines": {1157- "node": ">=12"1158- }1159- },1160- "node_modules/d3-ease": {1161- "version": "3.0.1",1162- "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-3.0.1.tgz",1163- "integrity": "sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==",1164- "license": "BSD-3-Clause",1165- "engines": {1166- "node": ">=12"1167- }1168- },1169- "node_modules/d3-fetch": {1170- "version": "3.0.1",1171- "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-3.0.1.tgz",1172- "integrity": "sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==",1173- "license": "ISC",1174- "dependencies": {1175- "d3-dsv": "1 - 3"1176- },1177- "engines": {1178- "node": ">=12"1179- }1180- },1181- "node_modules/d3-force": {1182- "version": "3.0.0",1183- "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-3.0.0.tgz",1184- "integrity": "sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==",1185- "license": "ISC",1186- "dependencies": {1187- "d3-dispatch": "1 - 3",1188- "d3-quadtree": "1 - 3",1189- "d3-timer": "1 - 3"1190- },1191- "engines": {1192- "node": ">=12"1193- }1194- },1195- "node_modules/d3-format": {1196- "version": "3.1.2",1197- "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-3.1.2.tgz",1198- "integrity": "sha512-AJDdYOdnyRDV5b6ArilzCPPwc1ejkHcoyFarqlPqT7zRYjhavcT3uSrqcMvsgh2CgoPbK3RCwyHaVyxYcP2Arg==",1199- "license": "ISC",1200- "engines": {1201- "node": ">=12"1202- }1203- },1204- "node_modules/d3-geo": {1205- "version": "3.1.1",1206- "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-3.1.1.tgz",1207- "integrity": "sha512-637ln3gXKXOwhalDzinUgY83KzNWZRKbYubaG+fGVuc/dxO64RRljtCTnf5ecMyE1RIdtqpkVcq0IbtU2S8j2Q==",1208- "license": "ISC",1209- "dependencies": {1210- "d3-array": "2.5.0 - 3"1211- },1212- "engines": {1213- "node": ">=12"1214- }1215- },1216- "node_modules/d3-hierarchy": {1217- "version": "3.1.2",1218- "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz",1219- "integrity": "sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA==",1220- "license": "ISC",1221- "engines": {1222- "node": ">=12"1223- }1224- },1225- "node_modules/d3-interpolate": {1226- "version": "3.0.1",1227- "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-3.0.1.tgz",1228- "integrity": "sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==",1229- "license": "ISC",1230- "dependencies": {1231- "d3-color": "1 - 3"1232- },1233- "engines": {1234- "node": ">=12"1235- }1236- },1237- "node_modules/d3-path": {1238- "version": "3.1.0",1239- "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-3.1.0.tgz",1240- "integrity": "sha512-p3KP5HCf/bvjBSSKuXid6Zqijx7wIfNW+J/maPs+iwR35at5JCbLUT0LzF1cnjbCHWhqzQTIN2Jpe8pRebIEFQ==",1241- "license": "ISC",1242- "engines": {1243- "node": ">=12"1244- }1245- },1246- "node_modules/d3-polygon": {1247- "version": "3.0.1",1248- "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-3.0.1.tgz",1249- "integrity": "sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==",1250- "license": "ISC",1251- "engines": {1252- "node": ">=12"1253- }1254- },1255- "node_modules/d3-quadtree": {1256- "version": "3.0.1",1257- "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-3.0.1.tgz",1258- "integrity": "sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==",1259- "license": "ISC",1260- "engines": {1261- "node": ">=12"1262- }1263- },1264- "node_modules/d3-random": {1265- "version": "3.0.1",1266- "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-3.0.1.tgz",1267- "integrity": "sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==",1268- "license": "ISC",1269- "engines": {1270- "node": ">=12"1271- }1272- },1273- "node_modules/d3-sankey": {1274- "version": "0.12.3",1275- "resolved": "https://registry.npmjs.org/d3-sankey/-/d3-sankey-0.12.3.tgz",1276- "integrity": "sha512-nQhsBRmM19Ax5xEIPLMY9ZmJ/cDvd1BG3UVvt5h3WRxKg5zGRbvnteTyWAbzeSvlh3tW7ZEmq4VwR5mB3tutmQ==",1277- "license": "BSD-3-Clause",1278- "dependencies": {1279- "d3-array": "1 - 2",1280- "d3-shape": "^1.2.0"1281- }1282- },1283- "node_modules/d3-sankey/node_modules/d3-array": {1284- "version": "2.12.1",1285- "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.12.1.tgz",1286- "integrity": "sha512-B0ErZK/66mHtEsR1TkPEEkwdy+WDesimkM5gpZr5Dsg54BiTA5RXtYW5qTLIAcekaS9xfZrzBLF/OAkB3Qn1YQ==",1287- "license": "BSD-3-Clause",1288- "dependencies": {1289- "internmap": "^1.0.0"1290- }1291- },1292- "node_modules/d3-sankey/node_modules/d3-path": {1293- "version": "1.0.9",1294- "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-1.0.9.tgz",1295- "integrity": "sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==",1296- "license": "BSD-3-Clause"1297- },1298- "node_modules/d3-sankey/node_modules/d3-shape": {1299- "version": "1.3.7",1300- "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.3.7.tgz",1301- "integrity": "sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==",1302- "license": "BSD-3-Clause",1303- "dependencies": {1304- "d3-path": "1"1305- }1306- },1307- "node_modules/d3-sankey/node_modules/internmap": {1308- "version": "1.0.1",1309- "resolved": "https://registry.npmjs.org/internmap/-/internmap-1.0.1.tgz",1310- "integrity": "sha512-lDB5YccMydFBtasVtxnZ3MRBHuaoE8GKsppq+EchKL2U4nK/DmEpPHNH8MZe5HkMtpSiTSOZwfN0tzYjO/lJEw==",1311- "license": "ISC"1312- },1313- "node_modules/d3-scale": {1314- "version": "4.0.2",1315- "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-4.0.2.tgz",1316- "integrity": "sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ==",1317- "license": "ISC",1318- "dependencies": {1319- "d3-array": "2.10.0 - 3",1320- "d3-format": "1 - 3",1321- "d3-interpolate": "1.2.0 - 3",1322- "d3-time": "2.1.1 - 3",1323- "d3-time-format": "2 - 4"1324- },1325- "engines": {1326- "node": ">=12"1327- }1328- },1329- "node_modules/d3-scale-chromatic": {1330- "version": "3.1.0",1331- "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-3.1.0.tgz",1332- "integrity": "sha512-A3s5PWiZ9YCXFye1o246KoscMWqf8BsD9eRiJ3He7C9OBaxKhAd5TFCdEx/7VbKtxxTsu//1mMJFrEt572cEyQ==",1333- "license": "ISC",1334- "dependencies": {1335- "d3-color": "1 - 3",1336- "d3-interpolate": "1 - 3"1337- },1338- "engines": {1339- "node": ">=12"1340- }1341- },1342- "node_modules/d3-selection": {1343- "version": "3.0.0",1344- "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",1345- "integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",1346- "license": "ISC",1347- "engines": {1348- "node": ">=12"1349- }1350- },1351- "node_modules/d3-shape": {1352- "version": "3.2.0",1353- "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-3.2.0.tgz",1354- "integrity": "sha512-SaLBuwGm3MOViRq2ABk3eLoxwZELpH6zhl3FbAoJ7Vm1gofKx6El1Ib5z23NUEhF9AsGl7y+dzLe5Cw2AArGTA==",1355- "license": "ISC",1356- "dependencies": {1357- "d3-path": "^3.1.0"1358- },1359- "engines": {1360- "node": ">=12"1361- }1362- },1363- "node_modules/d3-time": {1364- "version": "3.1.0",1365- "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-3.1.0.tgz",1366- "integrity": "sha512-VqKjzBLejbSMT4IgbmVgDjpkYrNWUYJnbCGo874u7MMKIWsILRX+OpX/gTk8MqjpT1A/c6HY2dCA77ZN0lkQ2Q==",1367- "license": "ISC",1368- "dependencies": {1369- "d3-array": "2 - 3"1370- },1371- "engines": {1372- "node": ">=12"1373- }1374- },1375- "node_modules/d3-time-format": {1376- "version": "4.1.0",1377- "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-4.1.0.tgz",1378- "integrity": "sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg==",1379- "license": "ISC",1380- "dependencies": {1381- "d3-time": "1 - 3"1382- },1383- "engines": {1384- "node": ">=12"1385- }1386- },1387- "node_modules/d3-timer": {1388- "version": "3.0.1",1389- "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-3.0.1.tgz",1390- "integrity": "sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==",1391- "license": "ISC",1392- "engines": {1393- "node": ">=12"1394- }1395- },1396- "node_modules/d3-transition": {1397- "version": "3.0.1",1398- "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-3.0.1.tgz",1399- "integrity": "sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==",1400- "license": "ISC",1401- "dependencies": {1402- "d3-color": "1 - 3",1403- "d3-dispatch": "1 - 3",1404- "d3-ease": "1 - 3",1405- "d3-interpolate": "1 - 3",1406- "d3-timer": "1 - 3"1407- },1408- "engines": {1409- "node": ">=12"1410- },1411- "peerDependencies": {1412- "d3-selection": "2 - 3"1413- }1414- },1415- "node_modules/d3-zoom": {1416- "version": "3.0.0",1417- "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-3.0.0.tgz",1418- "integrity": "sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==",1419- "license": "ISC",1420- "dependencies": {1421- "d3-dispatch": "1 - 3",1422- "d3-drag": "2 - 3",1423- "d3-interpolate": "1 - 3",1424- "d3-selection": "2 - 3",1425- "d3-transition": "2 - 3"1426- },1427- "engines": {1428- "node": ">=12"1429- }1430- },1431- "node_modules/dagre-d3-es": {1432- "version": "7.0.14",1433- "resolved": "https://registry.npmjs.org/dagre-d3-es/-/dagre-d3-es-7.0.14.tgz",1434- "integrity": "sha512-P4rFMVq9ESWqmOgK+dlXvOtLwYg0i7u0HBGJER0LZDJT2VHIPAMZ/riPxqJceWMStH5+E61QxFra9kIS3AqdMg==",1435- "license": "MIT",1436- "dependencies": {1437- "d3": "^7.9.0",1438- "lodash-es": "^4.17.21"1439- }1440- },1441- "node_modules/dayjs": {1442- "version": "1.11.23",1443- "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.23.tgz",1444- "integrity": "sha512-QDTCU0M0MxR3hQfnlDJfwekQiaanm1ubOD231u73WBckQ/fsamwRLiE2GBz6D3a/xF1NgfiDLJjXBa1hYOYTtQ==",1445- "license": "MIT"1446- },1447- "node_modules/delaunator": {1448- "version": "5.1.0",1449- "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-5.1.0.tgz",1450- "integrity": "sha512-AGrQ4QSgssa1NGmWmLPqN5NY2KajF5MqxetNEO+o0n3ZwZZeTmt7bBnvzHWrmkZFxGgr4HdyFgelzgi06otLuQ==",1451- "license": "ISC",1452- "dependencies": {1453- "robust-predicates": "^3.0.2"1454- }1455- },1456- "node_modules/detect-libc": {1457- "version": "2.1.2",1458- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",1459- "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",1460- "dev": true,1461- "license": "Apache-2.0",1462- "engines": {1463- "node": ">=8"1464- }1465- },1466- "node_modules/diagram-js": {1467- "version": "15.24.1",1468- "resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-15.24.1.tgz",1469- "integrity": "sha512-0zlPffk8pGdbUmt0RQH32N7dIbgYuLwkFlZTCi28kRSkb37GdEjONjXKs+NluZvWeLsY1hqSyq4le19ZeFE19Q==",1470- "license": "MIT",1471- "dependencies": {1472- "@bpmn-io/diagram-js-ui": "^0.2.4",1473- "clsx": "^2.1.1",1474- "didi": "^11.0.0",1475- "inherits-browser": "^0.1.0",1476- "min-dash": "^5.1.0",1477- "min-dom": "^5.3.0",1478- "object-refs": "^0.4.0",1479- "path-intersection": "^4.1.0",1480- "tiny-svg": "^4.1.4"1481- },1482- "engines": {1483- "node": "*"1484- }1485- },1486- "node_modules/diagram-js-direct-editing": {1487- "version": "3.5.1",1488- "resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-3.5.1.tgz",1489- "integrity": "sha512-fEQCQ/x5oKVV0m7Nmgv7i85Vhw+kJkKNXF8zcV5Vm0KwF8x/8e3Ax0aJgdXt8/fDPymEkY8HmZweXIipCeeh+g==",1490- "license": "MIT",1491- "dependencies": {1492- "min-dash": "^5.0.0",1493- "min-dom": "^5.3.0"1494- },1495- "engines": {1496- "node": "*"1497- },1498- "peerDependencies": {1499- "diagram-js": "*"1500- }1501- },1502- "node_modules/didi": {1503- "version": "11.0.0",1504- "resolved": "https://registry.npmjs.org/didi/-/didi-11.0.0.tgz",1505- "integrity": "sha512-PzCfRzQttvFpVcYMbSF7h8EsWjeJpVjWH4qDhB5LkMi1ILvHq4Ob0vhM2wLFziPkbUBi+PAo7ODbe2sacR7nJQ==",1506- "license": "MIT",1507- "engines": {1508- "node": ">= 20.12"1509- }1510- },1511- "node_modules/domify": {1512- "version": "3.0.0",1513- "resolved": "https://registry.npmjs.org/domify/-/domify-3.0.0.tgz",1514- "integrity": "sha512-bs2yO68JDFOm6rKv8f0EnrM2cENduhRkpqOtt/s5l5JBA/eqGBZCzLPmdYoHtJ6utgLGgcBajFsEQbl12pT0lQ==",1515- "license": "MIT",1516- "engines": {1517- "node": ">=20"1518- },1519- "funding": {1520- "url": "https://github.com/sponsors/sindresorhus"1521- }1522- },1523- "node_modules/dompurify": {1524- "version": "3.4.14",1525- "resolved": "https://registry.npmjs.org/dompurify/-/dompurify-3.4.14.tgz",1526- "integrity": "sha512-dVoH9z+MY+C9IilgGCk3YfFqjLi3fChm2OiKJMzh6axrJ5qwxqWaZamgmHrpv22CN/KdbZJuGEGgfQoL00LTdg==",1527- "license": "(MPL-2.0 OR Apache-2.0)",1528- "optionalDependencies": {1529- "@types/trusted-types": "^2.0.7"1530- }1531- },1532- "node_modules/es-toolkit": {1533- "version": "1.51.0",1534- "resolved": "https://registry.npmjs.org/es-toolkit/-/es-toolkit-1.51.0.tgz",1535- "integrity": "sha512-zC2lQGkM7QX+Gm6iM3+WIdZJzthsEd14LvRNJneSO2hzyz/zNBENR8+YXWo1cKxgPBtV6ksPYHELbcwBRzmdCw==",1536- "license": "MIT",1537- "workspaces": [1538- "docs",1539- "benchmarks",1540- "tests/types",1541- "tests/browser-compat"1542- ]1543- },1544- "node_modules/fastdom": {1545- "version": "1.0.12",1546- "resolved": "https://registry.npmjs.org/fastdom/-/fastdom-1.0.12.tgz",1547- "integrity": "sha512-LB+xjSTEbjHE1cWsxu+tN2Xqr1kpi+V9aADI7sVM5ZMaXyYGPHULQMzpJMYqOTULK/73pUkWVzzObFRBkPr+hg==",1548- "license": "MIT",1549- "dependencies": {1550- "strictdom": "^1.0.1"1551- }1552- },1553- "node_modules/fdir": {1554- "version": "6.5.0",1555- "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",1556- "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",1557- "dev": true,1558- "license": "MIT",1559- "engines": {1560- "node": ">=12.0.0"1561- },1562- "peerDependencies": {1563- "picomatch": "^3 || ^4"1564- },1565- "peerDependenciesMeta": {1566- "picomatch": {1567- "optional": true1568- }1569- }1570- },1571- "node_modules/fsevents": {1572- "version": "2.3.3",1573- "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",1574- "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",1575- "dev": true,1576- "hasInstallScript": true,1577- "license": "MIT",1578- "optional": true,1579- "os": [1580- "darwin"1581- ],1582- "engines": {1583- "node": "^8.16.0 || ^10.6.0 || >=11.0.0"1584- }1585- },1586- "node_modules/hachure-fill": {1587- "version": "0.5.2",1588- "resolved": "https://registry.npmjs.org/hachure-fill/-/hachure-fill-0.5.2.tgz",1589- "integrity": "sha512-3GKBOn+m2LX9iq+JC1064cSFprJY4jL1jCXTcpnfER5HYE2l/4EfWSGzkPa/ZDBmYI0ZOEj5VHV/eKnPGkHuOg==",1590- "license": "MIT"1591- },1592- "node_modules/htm": {1593- "version": "3.1.1",1594- "resolved": "https://registry.npmjs.org/htm/-/htm-3.1.1.tgz",1595- "integrity": "sha512-983Vyg8NwUE7JkZ6NmOqpCZ+sh1bKv2iYTlUkzlWmA5JD2acKoxd4KVxbMmxX/85mtfdnDmTFoNKcg5DGAvxNQ==",1596- "license": "Apache-2.0"1597- },1598- "node_modules/iconv-lite": {1599- "version": "0.6.3",1600- "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz",1601- "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",1602- "license": "MIT",1603- "dependencies": {1604- "safer-buffer": ">= 2.1.2 < 3.0.0"1605- },1606- "engines": {1607- "node": ">=0.10.0"1608- }1609- },1610- "node_modules/ids": {1611- "version": "3.0.2",1612- "resolved": "https://registry.npmjs.org/ids/-/ids-3.0.2.tgz",1613- "integrity": "sha512-t6YJP4mdC+GHF96Nbis/4FEANhP/8VWmYMvUuYpXvSdrhg5hpIVbq2XZlOA3UWTbtdwPCi0q7jEXOdHkAnqOnw==",1614- "license": "MIT",1615- "engines": {1616- "node": ">= 20.12"1617- }1618- },1619- "node_modules/import-meta-resolve": {1620- "version": "4.2.0",1621- "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.2.0.tgz",1622- "integrity": "sha512-Iqv2fzaTQN28s/FwZAoFq0ZSs/7hMAHJVX+w8PZl3cY19Pxk6jFFalxQoIfW2826i/fDLXv8IiEZRIT0lDuWcg==",1623- "license": "MIT",1624- "funding": {1625- "type": "github",1626- "url": "https://github.com/sponsors/wooorm"1627- }1628- },1629- "node_modules/inherits-browser": {1630- "version": "0.1.0",1631- "resolved": "https://registry.npmjs.org/inherits-browser/-/inherits-browser-0.1.0.tgz",1632- "integrity": "sha512-CJHHvW3jQ6q7lzsXPpapLdMx5hDpSF3FSh45pwsj6bKxJJ8Nl8v43i5yXnr3BdfOimGHKyniewQtnAIp3vyJJw==",1633- "license": "ISC"1634- },1635- "node_modules/internmap": {1636- "version": "2.0.3",1637- "resolved": "https://registry.npmjs.org/internmap/-/internmap-2.0.3.tgz",1638- "integrity": "sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==",1639- "license": "ISC",1640- "engines": {1641- "node": ">=12"1642- }1643- },1644- "node_modules/katex": {1645- "version": "0.16.47",1646- "resolved": "https://registry.npmjs.org/katex/-/katex-0.16.47.tgz",1647- "integrity": "sha512-Eeo8Ys1doU1z+x8AZsPpQu+p/QcZBI5PeOo7QGQdy2x2m0MU/hYagBbGOmXwr5KVbEfVuWv9LpnQWeehogurjg==",1648- "funding": [1649- "https://opencollective.com/katex",1650- "https://github.com/sponsors/katex"1651- ],1652- "license": "MIT",1653- "dependencies": {1654- "commander": "^8.3.0"1655- },1656- "bin": {1657- "katex": "cli.js"1658- }1659- },1660- "node_modules/katex/node_modules/commander": {1661- "version": "8.3.0",1662- "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz",1663- "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==",1664- "license": "MIT",1665- "engines": {1666- "node": ">= 12"1667- }1668- },1669- "node_modules/khroma": {1670- "version": "2.1.0",1671- "resolved": "https://registry.npmjs.org/khroma/-/khroma-2.1.0.tgz",1672- "integrity": "sha512-Ls993zuzfayK269Svk9hzpeGUKob/sIgZzyHYdjQoAdQetRKpOLj+k/QQQ/6Qi0Yz65mlROrfd+Ev+1+7dz9Kw=="1673- },1674- "node_modules/layout-base": {1675- "version": "1.0.2",1676- "resolved": "https://registry.npmjs.org/layout-base/-/layout-base-1.0.2.tgz",1677- "integrity": "sha512-8h2oVEZNktL4BH2JCOI90iD1yXwL6iNW7KcCKT2QZgQJR2vbqDsldCTPRU9NifTCqHZci57XvQQ15YTu+sTYPg==",1678- "license": "MIT"1679- },1680- "node_modules/lightningcss": {1681- "version": "1.33.0",1682- "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz",1683- "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==",1684- "dev": true,1685- "license": "MPL-2.0",1686- "dependencies": {1687- "detect-libc": "^2.0.3"1688- },1689- "engines": {1690- "node": ">= 12.0.0"1691- },1692- "funding": {1693- "type": "opencollective",1694- "url": "https://opencollective.com/parcel"1695- },1696- "optionalDependencies": {1697- "lightningcss-android-arm64": "1.33.0",1698- "lightningcss-darwin-arm64": "1.33.0",1699- "lightningcss-darwin-x64": "1.33.0",1700- "lightningcss-freebsd-x64": "1.33.0",1701- "lightningcss-linux-arm-gnueabihf": "1.33.0",1702- "lightningcss-linux-arm64-gnu": "1.33.0",1703- "lightningcss-linux-arm64-musl": "1.33.0",1704- "lightningcss-linux-x64-gnu": "1.33.0",1705- "lightningcss-linux-x64-musl": "1.33.0",1706- "lightningcss-win32-arm64-msvc": "1.33.0",1707- "lightningcss-win32-x64-msvc": "1.33.0"1708- }1709- },1710- "node_modules/lightningcss-android-arm64": {1711- "version": "1.33.0",1712- "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz",1713- "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==",1714- "cpu": [1715- "arm64"1716- ],1717- "dev": true,1718- "license": "MPL-2.0",1719- "optional": true,1720- "os": [1721- "android"1722- ],1723- "engines": {1724- "node": ">= 12.0.0"1725- },1726- "funding": {1727- "type": "opencollective",1728- "url": "https://opencollective.com/parcel"630+ "node": ">= 12.0.0"631+ },632+ "funding": {633+ "type": "opencollective",634+ "url": "https://opencollective.com/parcel"1729635 }1730636 },1731637 "node_modules/lightningcss-darwin-arm64": {
@@ -1950,95 +856,6 @@
1950856 "url": "https://opencollective.com/parcel"1951857 }1952858 },1953- "node_modules/lodash-es": {1954- "version": "4.18.1",1955- "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.18.1.tgz",1956- "integrity": "sha512-J8xewKD/Gk22OZbhpOVSwcs60zhd95ESDwezOFuA3/099925PdHJ7OFHNTGtajL3AlZkykD32HykiMo+BIBI8A==",1957- "license": "MIT"1958- },1959- "node_modules/marked": {1960- "version": "16.4.2",1961- "resolved": "https://registry.npmjs.org/marked/-/marked-16.4.2.tgz",1962- "integrity": "sha512-TI3V8YYWvkVf3KJe1dRkpnjs68JUPyEa5vjKrp1XEEJUAOaQc+Qj+L1qWbPd0SJuAdQkFU0h73sXXqwDYxsiDA==",1963- "license": "MIT",1964- "bin": {1965- "marked": "bin/marked.js"1966- },1967- "engines": {1968- "node": ">= 20"1969- }1970- },1971- "node_modules/mermaid": {1972- "version": "11.17.0",1973- "resolved": "https://registry.npmjs.org/mermaid/-/mermaid-11.17.0.tgz",1974- "integrity": "sha512-Jo9N377Wb4MSnHFPTbLi2SxFpsQl4eVHoxnW5U1Md9EazvgMp3s+4ohDxr81YNTgbn5Kj7HJ3yslrSJ52kwpbA==",1975- "license": "MIT",1976- "dependencies": {1977- "@braintree/sanitize-url": "^7.1.2",1978- "@iconify/utils": "^3.0.2",1979- "@mermaid-js/parser": "^1.2.1",1980- "@types/d3": "^7.4.3",1981- "@upsetjs/venn.js": "^2.0.0",1982- "cytoscape": "^3.34.0",1983- "cytoscape-cose-bilkent": "^4.1.0",1984- "cytoscape-fcose": "^2.2.0",1985- "d3": "^7.9.0",1986- "d3-sankey": "^0.12.3",1987- "dagre-d3-es": "7.0.14",1988- "dayjs": "^1.11.21",1989- "dompurify": "^3.3.3",1990- "es-toolkit": "^1.45.1",1991- "fastdom": "1.0.12",1992- "katex": "^0.16.47",1993- "khroma": "^2.1.0",1994- "marked": "^16.3.0",1995- "roughjs": "^4.6.6",1996- "stylis": "^4.3.6",1997- "ts-dedent": "^2.2.0",1998- "uuid": "^11.1.0 || ^12 || ^13 || ^14.0.0"1999- }2000- },2001- "node_modules/min-dash": {2002- "version": "5.1.0",2003- "resolved": "https://registry.npmjs.org/min-dash/-/min-dash-5.1.0.tgz",2004- "integrity": "sha512-HAvN6XzmCQj+js43G9sJRRw8kj/7DvoxN7qhoIN9Xo5ZN1NMljtpyKs/NunXmw0QSWwlgZzNv6tLeEa4xaZ0tg==",2005- "license": "MIT"2006- },2007- "node_modules/min-dom": {2008- "version": "5.3.0",2009- "resolved": "https://registry.npmjs.org/min-dom/-/min-dom-5.3.0.tgz",2010- "integrity": "sha512-0w5FEBgPAyHhmFojW3zxd7we3D+m5XYS3E/06OyvxmbHJoiQVa4Nagj6RWvoAKYRw5xth6cP5TMePc5cR1M9hA==",2011- "license": "MIT",2012- "dependencies": {2013- "domify": "^3.0.0",2014- "min-dash": "^5.0.0"2015- }2016- },2017- "node_modules/moddle": {2018- "version": "8.2.1",2019- "resolved": "https://registry.npmjs.org/moddle/-/moddle-8.2.1.tgz",2020- "integrity": "sha512-20qzO/ZpMGO9j9gdQgXk9bfGxb9wA3JKnGth/21YZKODLrZE4RW/uVMIL5pTskYm34Z61DucBEPkq93qByNsBQ==",2021- "license": "MIT",2022- "dependencies": {2023- "min-dash": "^5.1.0"2024- }2025- },2026- "node_modules/moddle-xml": {2027- "version": "12.1.0",2028- "resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-12.1.0.tgz",2029- "integrity": "sha512-+m50j9/MFGhvWbLJoKSSjQj3uv7SYm2w5i2lfv6goWarlWW1Nd0A31NYUXmKuWnEZ8Mm/bH1RZYtuf4x8ptY7g==",2030- "license": "MIT",2031- "dependencies": {2032- "min-dash": "^5.1.0",2033- "saxen": "^11.1.0"2034- },2035- "engines": {2036- "node": ">= 18"2037- },2038- "peerDependencies": {2039- "moddle": ">= 6.2.0"2040- }2041- },2042859 "node_modules/nanoid": {2043860 "version": "3.3.18",2044861 "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",
@@ -2058,21 +875,6 @@
2058875 "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"2059876 }2060877 },2061- "node_modules/object-refs": {2062- "version": "0.4.0",2063- "resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.4.0.tgz",2064- "integrity": "sha512-6kJqKWryKZmtte6QYvouas0/EIJKPI1/MMIuRsiBlNuhIMfqYTggzX2F1AJ2+cDs288xyi9GL7FyasHINR98BQ==",2065- "license": "MIT",2066- "engines": {2067- "node": "*"2068- }2069- },2070- "node_modules/package-manager-detector": {2071- "version": "1.8.0",2072- "resolved": "https://registry.npmjs.org/package-manager-detector/-/package-manager-detector-1.8.0.tgz",2073- "integrity": "sha512-yQA4H19AmPEoMUeavPMDIe1higySl/gH/yaQrkT/s07Qp+7pp2hYz30N3z2l5BkjVkF9Ow6o0wjJamm2y7Sn0A==",2074- "license": "MIT"2075- },2076878 "node_modules/pako": {2077879 "version": "3.0.1",2078880 "resolved": "https://registry.npmjs.org/pako/-/pako-3.0.1.tgz",
@@ -2089,21 +891,6 @@
2089891 ],2090892 "license": "(MIT AND Zlib)"2091893 },2092- "node_modules/path-data-parser": {2093- "version": "0.1.0",2094- "resolved": "https://registry.npmjs.org/path-data-parser/-/path-data-parser-0.1.0.tgz",2095- "integrity": "sha512-NOnmBpt5Y2RWbuv0LMzsayp3lVylAHLPUTut412ZA3l+C4uw4ZVkQbjShYCQ8TCpUMdPapr4YjUqLYD6v68j+w==",2096- "license": "MIT"2097- },2098- "node_modules/path-intersection": {2099- "version": "4.1.0",2100- "resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-4.1.0.tgz",2101- "integrity": "sha512-urUP6WvhnxbHPdHYl6L7Yrc6+1ny6uOFKPCzPxTSUSYGHG0o94RmI7SvMMaScNAM5RtTf08bg4skc6/kjfne3A==",2102- "license": "MIT",2103- "engines": {2104- "node": ">= 14.20"2105- }2106- },2107894 "node_modules/picocolors": {2108895 "version": "1.1.1",2109896 "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",
@@ -2124,22 +911,6 @@
2124911 "url": "https://github.com/sponsors/jonschlinkert"2125912 }2126913 },2127- "node_modules/points-on-curve": {2128- "version": "0.2.0",2129- "resolved": "https://registry.npmjs.org/points-on-curve/-/points-on-curve-0.2.0.tgz",2130- "integrity": "sha512-0mYKnYYe9ZcqMCWhUjItv/oHjvgEsfKvnUTg8sAtnHr3GVy7rGkXCb6d5cSyqrWqL4k81b9CPg3urd+T7aop3A==",2131- "license": "MIT"2132- },2133- "node_modules/points-on-path": {2134- "version": "0.2.1",2135- "resolved": "https://registry.npmjs.org/points-on-path/-/points-on-path-0.2.1.tgz",2136- "integrity": "sha512-25ClnWWuw7JbWZcgqY/gJ4FQWadKxGWk+3kR/7kD0tCaDtPPMj7oHu2ToLaVhfpnHrZzYby2w6tUA0eOIuUg8g==",2137- "license": "MIT",2138- "dependencies": {2139- "path-data-parser": "0.1.0",2140- "points-on-curve": "0.2.0"2141- }2142- },2143914 "node_modules/postcss": {2144915 "version": "8.5.26",2145916 "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",
@@ -2169,30 +940,6 @@
2169940 "node": "^10 || ^12 || >=14"2170941 }2171942 },2172- "node_modules/preact": {2173- "version": "10.29.8",2174- "resolved": "https://registry.npmjs.org/preact/-/preact-10.29.8.tgz",2175- "integrity": "sha512-ej2aVZ+vZ8WO7tvlQWRM9N63A0KzF9q4mWJfDUHgYaIofWY9hu74QdnQrjoPMmZi2/nZ5gN0bJCQF49xQqx09Q==",2176- "license": "MIT",2177- "funding": {2178- "type": "opencollective",2179- "url": "https://opencollective.com/preact"2180- },2181- "peerDependencies": {2182- "preact-render-to-string": ">=5"2183- },2184- "peerDependenciesMeta": {2185- "preact-render-to-string": {2186- "optional": true2187- }2188- }2189- },2190- "node_modules/robust-predicates": {2191- "version": "3.0.3",2192- "resolved": "https://registry.npmjs.org/robust-predicates/-/robust-predicates-3.0.3.tgz",2193- "integrity": "sha512-NS3levdsRIUOmiJ8FZWCP7LG3QpJyrs/TE0Zpf1yvZu8cAJJ6QMW92H1c7kWpdIHo8RvmLxN/o2JXTKHp74lUA==",2194- "license": "Unlicense"2195- },2196943 "node_modules/rolldown": {2197944 "version": "1.2.5",2198945 "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.5.tgz",
@@ -2227,39 +974,6 @@
2227974 "@rolldown/binding-win32-x64-msvc": "1.2.5"2228975 }2229976 },2230- "node_modules/roughjs": {2231- "version": "4.6.6",2232- "resolved": "https://registry.npmjs.org/roughjs/-/roughjs-4.6.6.tgz",2233- "integrity": "sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==",2234- "license": "MIT",2235- "dependencies": {2236- "hachure-fill": "^0.5.2",2237- "path-data-parser": "^0.1.0",2238- "points-on-curve": "^0.2.0",2239- "points-on-path": "^0.2.1"2240- }2241- },2242- "node_modules/rw": {2243- "version": "1.3.3",2244- "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz",2245- "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==",2246- "license": "BSD-3-Clause"2247- },2248- "node_modules/safer-buffer": {2249- "version": "2.1.2",2250- "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",2251- "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",2252- "license": "MIT"2253- },2254- "node_modules/saxen": {2255- "version": "11.1.1",2256- "resolved": "https://registry.npmjs.org/saxen/-/saxen-11.1.1.tgz",2257- "integrity": "sha512-J4BkmJFaM7VgE7pgkFGsNEcqqM3h7+Mz80vfLWFhx7uNOCOXIu6LLjQHYWNejdst3pf/3JUaBIG9+pkk1umlow==",2258- "license": "MIT",2259- "engines": {2260- "node": ">= 20.12"2261- }2262- },2263977 "node_modules/saxes": {2264978 "version": "6.0.0",2265979 "resolved": "https://registry.npmjs.org/saxes/-/saxes-6.0.0.tgz",
@@ -2282,42 +996,12 @@
2282996 "node": ">=0.10.0"2283997 }2284998 },2285- "node_modules/strictdom": {2286- "version": "1.0.1",2287- "resolved": "https://registry.npmjs.org/strictdom/-/strictdom-1.0.1.tgz",2288- "integrity": "sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==",2289- "license": "MIT"2290- },2291999 "node_modules/style-mod": {22921000 "version": "4.1.3",22931001 "resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.1.3.tgz",22941002 "integrity": "sha512-i/n8VsZydrugj3Iuzll8+x/00GH2vnYsk1eomD8QiRrSAeW6ItbCQDtfXCeJHd0iwiNagqjQkvpvREEPtW3IoQ==",22951003 "license": "MIT"22961004 },2297- "node_modules/stylis": {2298- "version": "4.4.0",2299- "resolved": "https://registry.npmjs.org/stylis/-/stylis-4.4.0.tgz",2300- "integrity": "sha512-5Z9ZpRzfuH6l/UAvCPAPUo3665Nk2wLaZU3x+TLHKVzIz33+sbJqbtrYoC3KD4/uVOr2Zp+L0LySezP9OHV9yA==",2301- "license": "MIT"2302- },2303- "node_modules/tiny-svg": {2304- "version": "4.1.4",2305- "resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-4.1.4.tgz",2306- "integrity": "sha512-cBaEACCbouYrQc9RG+eTXnPYosX1Ijqty/I6DdXovwDd89Pwu4jcmpOR7BuFEF9YCcd7/AWwasE0207WMK7hdw==",2307- "license": "MIT",2308- "engines": {2309- "node": ">= 20"2310- }2311- },2312- "node_modules/tinyexec": {2313- "version": "1.3.0",2314- "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-1.3.0.tgz",2315- "integrity": "sha512-QKAl9m8gWWGHV8jZcPeym6j+XULi6tOf1mT83WYJ4Lk2ytW/uwAWkrP0uFsdoYMdueVJ0qs26wZ+23xeB4ibNQ==",2316- "license": "MIT",2317- "engines": {2318- "node": ">=18"2319- }2320- },23211005 "node_modules/tinyglobby": {23221006 "version": "0.2.17",23231007 "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",
@@ -2335,28 +1019,6 @@
23351019 "url": "https://github.com/sponsors/SuperchupuDev"23361020 }23371021 },2338- "node_modules/ts-dedent": {2339- "version": "2.3.0",2340- "resolved": "https://registry.npmjs.org/ts-dedent/-/ts-dedent-2.3.0.tgz",2341- "integrity": "sha512-JfJeIHke7y2egdGGgRAvpCwYFUsHlM2gPcrVOxFkznt/4uzQ7HFmvE63iFHVLBJNDuyDOQgijDK/tXH/f6Msjg==",2342- "license": "MIT",2343- "engines": {2344- "node": ">=6.10"2345- }2346- },2347- "node_modules/uuid": {2348- "version": "14.0.2",2349- "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.2.tgz",2350- "integrity": "sha512-xZe/16rV4aa+HGSOCiY2YeLT1OybRLrrkL/Rqaq7p7GMVXjFh+6wN4oMYgjFmnSnhY8t6Xpdl2l9qmnHYuMHwQ==",2351- "funding": [2352- "https://github.com/sponsors/broofa",2353- "https://github.com/sponsors/ctavan"2354- ],2355- "license": "MIT",2356- "bin": {2357- "uuid": "dist-node/bin/uuid"2358- }2359- },23601022 "node_modules/vite": {23611023 "version": "8.2.2",23621024 "resolved": "https://registry.npmjs.org/vite/-/vite-8.2.2.tgz",
M package.json +1 -3
R server/src/main/resources/web/diagramzip/assets/index-C1W5uCoO.js → server/src/main/resources/web/diagramzip/assets/index-C8MuTfFX.js +35 -27
@@ -12,7 +12,7 @@ var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function
1212 `&&(t=``);else{let e=t.indexOf(`1313 `);e>-1&&(t=t.slice(0,e))}return e+t.length<=this.to?t:t.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,t=this.lineAfter(e),n=e+t.length;for(let e=this.rangeIndex;;){let r=this.ranges[e].to;if(r>=n||(t=t.slice(0,r-(n-t.length)),e++,e==this.ranges.length))break;let i=this.ranges[e].from,a=this.lineAfter(i);t+=a,n=i+a.length}return{line:t,end:n}}skipGapsTo(e,t,n){for(;;){let r=this.ranges[this.rangeIndex].to,i=e+t;if(n>0?r>i:r>=i)break;let a=this.ranges[++this.rangeIndex].from;t+=a-r}return t}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,t,n,r){let i=4;if(this.ranges.length>1){r=this.skipGapsTo(t,r,1),t+=r;let e=this.chunk.length;r=this.skipGapsTo(n,r,-1),n+=r,i+=this.chunk.length-e}let a=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&i==4&&a>=0&&this.chunk[a]==e&&this.chunk[a+2]==t?this.chunk[a+2]=n:this.chunk.push(e,t,n,i),r}parseLine(e){let{line:t,end:n}=this.nextLine(),r=0,{streamParser:i}=this.lang,a=new Md(t,e?e.state.tabSize:4,e?mu(e.state):2);if(a.eol())i.blankLine(this.state,a.indentUnit);else for(;!a.eol();){let e=Vd(i.token,a,this.state);if(e&&(r=this.emitToken(this.lang.tokenTable.resolve(e),this.parsedPos+a.start,this.parsedPos+a.pos,r)),a.start>1e4)break}this.parsedPos=n,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=K.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:Wd,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new K(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new K(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function Vd(e,t,n){t.start=t.pos;for(let r=0;r<10;r++){let r=e(t,n);if(t.pos>t.start)return r}throw Error(`Stream parser failed to advance stream.`)}var Hd=Object.create(null),Ud=[Xc.none],Wd=new Zc(Ud),Gd=[],Kd=Object.create(null),qd=Object.create(null);for(let[e,t]of[[`variable`,`variableName`],[`variable-2`,`variableName.special`],[`string-2`,`string.special`],[`def`,`variableName.definition`],[`tag`,`tagName`],[`attribute`,`attributeName`],[`type`,`typeName`],[`builtin`,`variableName.standard`],[`qualifier`,`modifier`],[`error`,`invalid`],[`header`,`heading`],[`property`,`propertyName`]])qd[e]=Zd(Hd,t);var Jd=class{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),qd)}resolve(e){return e?this.table[e]||(this.table[e]=Zd(this.extra,e)):0}},Yd=new Jd(Hd);function Xd(e,t){Gd.indexOf(e)>-1||(Gd.push(e),console.warn(t))}function Zd(e,t){let n=[];for(let r of t.split(` `)){let t=[];for(let n of r.split(`.`)){let r=e[n]||J[n];r?typeof r==`function`?t.length?t=t.map(r):Xd(n,`Modifier ${n} used at start of tag`):t.length?Xd(n,`Tag ${n} used as modifier`):t=Array.isArray(r)?r:[r]:Xd(n,`Unknown highlighting tag ${n}`)}for(let e of t)n.push(e)}if(!n.length)return 0;let r=t.replace(/ /g,`_`),i=r+` `+n.map(e=>e.id),a=Kd[i];if(a)return a.id;let o=Kd[i]=Xc.define({id:Ud.length,name:r,props:[Ol({[r]:n})]});return Ud.push(o),o.id}function Qd(e,t){let n=Xc.define({id:Ud.length,name:`Document`,props:[Xl.add(()=>e),vu.add(()=>e=>t.getIndent(e))],top:!0});return Ud.push(n),n}R.RTL,R.LTR;var $d=e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=af(e.state,n.from);return r.line?tf(e):r.block?rf(e):!1};function ef(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return i?(r(n.update(i)),!0):!1}}var tf=ef(uf,0),nf=ef(lf,0),rf=ef((e,t)=>lf(e,t,cf(t)),0);function af(e,t){let n=e.languageDataAt(`commentTokens`,t,1);return n.length?n[0]:{}}var of=50;function sf(e,{open:t,close:n},r,i){let a=e.sliceDoc(r-of,r),o=e.sliceDoc(i,i+of),s=/\s*$/.exec(a)[0].length,c=/^\s*/.exec(o)[0].length,l=a.length-s;if(a.slice(l-t.length,l)==t&&o.slice(c,c+n.length)==n)return{open:{pos:r-s,margin:s&&1},close:{pos:i+c,margin:c&&1}};let u,d;i-r<=100?u=d=e.sliceDoc(r,i):(u=e.sliceDoc(r,r+of),d=e.sliceDoc(i-of,i));let f=/^\s*/.exec(u)[0].length,p=/\s*$/.exec(d)[0].length,m=d.length-p-n.length;return u.slice(f,f+t.length)==t&&d.slice(m,m+n.length)==n?{open:{pos:r+f+t.length,margin:+!!/\s/.test(u.charAt(f+t.length))},close:{pos:i-p-n.length,margin:+!!/\s/.test(d.charAt(m-1))}}:null}function cf(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to);i.from>r.from&&i.from==n.to&&(i=n.to==r.to+1?r:e.doc.lineAt(n.to-1));let a=t.length-1;a>=0&&t[a].to>r.from?t[a].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}function lf(e,t,n=t.selection.ranges){let r=n.map(e=>af(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>sf(t,r[n],e.from,e.to));if(e!=2&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+` `},{from:e.to,insert:` `+r[t].close}]))};if(e!=1&&i.some(e=>e)){let e=[];for(let t=0,n;t<i.length;t++)if(n=i[t]){let i=r[t],{open:a,close:o}=n;e.push({from:a.pos-i.open.length,to:a.pos+a.margin},{from:o.pos-o.margin,to:o.pos+i.close.length})}return{changes:e}}return null}function uf(e,t,n=t.selection.ranges){let r=[],i=-1;ranges:for(let{from:e,to:a}of n){let n=r.length,o=1e9,s;for(let n=e;n<=a;){let c=t.doc.lineAt(n);if(s==null&&(s=af(t,c.from).line,!s))continue ranges;if(c.from>i&&(e==a||a>c.from)){i=c.from;let e=/^\s*/.exec(c.text)[0].length,t=e==c.length,n=c.text.slice(e,e+s.length)==s?e:-1;e<c.text.length&&e<o&&(o=e),r.push({line:c,comment:n,token:s,indent:e,empty:t,single:!1})}n=c.to+1}if(o<1e9)for(let e=n;e<r.length;e++)r[e].indent<r[e].line.text.length&&(r[e].indent=o);r.length==n+1&&(r[n].single=!0)}if(e!=2&&r.some(e=>e.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:a,single:o}of r)(o||!a)&&e.push({from:t.from+i,insert:n+` `});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(e!=1&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,a=r+i.length;t.text[a-t.from]==` `&&a++,e.push({from:r,to:a})}return{changes:e}}return null}var df=He.define(),ff=He.define(),pf=E.define(),mf=E.define({combine(e){return tt(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})}}),hf=we.define({create(){return Pf.empty},update(e,t){let n=t.state.facet(mf),r=t.annotation(df);if(r){let i=Sf.fromTransaction(t,r.selection),a=r.side,o=a==0?e.undone:e.done;return o=i?Cf(o,o.length,n.minDepth,i):kf(o,t.startState.selection),new Pf(a==0?r.rest:o,a==0?o:r.rest)}let i=t.annotation(ff);if((i==`full`||i==`before`)&&(e=e.isolate()),t.annotation(O.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let a=Sf.fromTransaction(t),o=t.annotation(O.time),s=t.annotation(O.userEvent);return a?e=e.addChanges(a,o,s,n,t):t.selection&&(e=e.addSelection(t.startState.selection,o,s,n.newGroupDelay)),(i==`full`||i==`after`)&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}},fromJSON(e){return new Pf(e.done.map(Sf.fromJSON),e.undone.map(Sf.fromJSON))}});function gf(e={}){return[hf,mf.of(e),U.domEventHandlers({beforeinput(e,t){let n=e.inputType==`historyUndo`?vf:e.inputType==`historyRedo`?yf:null;return n?(e.preventDefault(),n(t)):!1}})]}function _f(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(hf,!1);if(!i)return!1;let a=i.pop(e,n,t);return a?(r(a),!0):!1}}var vf=_f(0,!1),yf=_f(1,!1),bf=_f(0,!0),xf=_f(1,!0),Sf=class e{constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(t){return new e(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){return{changes:this.changes?.toJSON(),mapped:this.mapped?.toJSON(),startSelection:this.startSelection?.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(t){return new e(t.changes&&C.fromJSON(t.changes),[],t.mapped&&le.fromJSON(t.mapped),t.startSelection&&T.fromJSON(t.startSelection),t.selectionsAfter.map(T.fromJSON))}static fromTransaction(t,n){let r=Df;for(let e of t.startState.facet(pf)){let n=e(t);n.length&&(r=r.concat(n))}return!r.length&&t.changes.empty?null:new e(t.changes.invert(t.startState.doc),r,void 0,n||t.startState.selection,Df)}static selection(t){return new e(void 0,Df,void 0,void 0,t)}};function Cf(e,t,n,r){let i=t+1>n+20?t-n-1:0,a=e.slice(i,t);return a.push(r),a}function wf(e,t){let n=[],r=!1;return e.iterChangedRanges((e,t)=>n.push(e,t)),t.iterChangedRanges((e,t,i,a)=>{for(let e=0;e<n.length;){let t=n[e++],o=n[e++];a>=t&&i<=o&&(r=!0)}}),r}function Tf(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((e,n)=>e.empty!=t.ranges[n].empty).length===0}function Ef(e,t){return e.length?t.length?e.concat(t):e:t}var Df=[],Of=200;function kf(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-Of));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),Cf(e,e.length-1,1e9,n.setSelAfter(r)))}return[Sf.selection([t])]}function Af(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function jf(e,t){if(!e.length)return e;let n=e.length,r=Df;for(;n;){let i=Mf(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[Sf.selection(r)]:Df}function Mf(e,t,n){let r=Ef(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):Df,n);if(!e.changes)return Sf.selection(r);let i=e.changes.map(t),a=t.mapDesc(e.changes,!0),o=e.mapped?e.mapped.composeDesc(a):a;return new Sf(i,D.mapEffects(e.effects,t),o,e.startSelection.map(a),r)}var Nf=/^(input\.type|delete)($|\.)/,Pf=class e{constructor(e,t,n=0,r=void 0){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new e(this.done,this.undone):this}addChanges(t,n,r,i,a){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&t.changes&&(!r||Nf.test(r))&&(!s.selectionsAfter.length&&n-this.prevTime<i.newGroupDelay&&i.joinToEvent(a,wf(s.changes,t.changes))||r==`input.type.compose`)?Cf(o,o.length-1,i.minDepth,new Sf(t.changes.compose(s.changes),Ef(D.mapEffects(t.effects,s.changes),s.effects),s.mapped,s.startSelection,Df)):Cf(o,o.length,i.minDepth,t),new e(o,Df,n,r)}addSelection(t,n,r,i){let a=this.done.length?this.done[this.done.length-1].selectionsAfter:Df;return a.length>0&&n-this.prevTime<i&&r==this.prevUserEvent&&r&&/^select($|\.)/.test(r)&&Tf(a[a.length-1],t)?this:new e(kf(this.done,t),this.undone,n,r)}addMapping(t){return new e(jf(this.done,t),jf(this.undone,t),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=e==0?this.done:this.undone;if(r.length==0)return null;let i=r[r.length-1],a=i.selectionsAfter[0]||(i.startSelection?i.startSelection.map(i.changes.invertedDesc,1):t.selection);if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:df.of({side:e,rest:Af(r),selection:a}),userEvent:e==0?`select.undo`:`select.redo`,scrollIntoView:!0});if(i.changes){let n=r.length==1?Df:r.slice(0,r.length-1);return i.mapped&&(n=jf(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:df.of({side:e,rest:n,selection:a}),filter:!1,userEvent:e==0?`undo`:`redo`,scrollIntoView:!0})}return null}};Pf.empty=new Pf(Df,Df);var Ff=[{key:`Mod-z`,run:vf,preventDefault:!0},{key:`Mod-y`,mac:`Mod-Shift-z`,run:yf,preventDefault:!0},{linux:`Ctrl-Shift-z`,run:yf,preventDefault:!0},{key:`Mod-u`,run:bf,preventDefault:!0},{key:`Alt-u`,mac:`Mod-Shift-u`,run:xf,preventDefault:!0}];function If(e,t){return T.create(e.ranges.map(t),e.mainIndex)}function Lf(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:`select`})}function Rf({state:e,dispatch:t},n){let r=If(e.selection,n);return!r.eq(e.selection,!0)&&(t(Lf(e,r)),!0)}function zf(e,t){return T.cursor(t?e.to:e.from)}function Bf(e,t){return Rf(e,n=>n.empty?e.moveByChar(n,t):zf(n,t))}function Vf(e){return e.textDirectionAt(e.state.selection.main.head)==R.LTR}var Hf=e=>Bf(e,!Vf(e)),Uf=e=>Bf(e,Vf(e));function Wf(e,t){return Rf(e,n=>n.empty?e.moveByGroup(n,t):zf(n,t))}var Gf=e=>Wf(e,!Vf(e)),Kf=e=>Wf(e,Vf(e));typeof Intl<`u`&&Intl.Segmenter;function qf(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function Jf(e,t,n){let r=Y(e).resolveInner(t.head),i=n?W.closedBy:W.openedBy;for(let a=t.head;;){let t=n?r.childAfter(a):r.childBefore(a);if(!t)break;qf(e,t,i)?r=t:a=n?t.to:t.from}let a=r.type.prop(i),o,s;return s=a&&(o=n?Od(e,r.from,1):Od(e,r.to,-1))&&o.matched?n?o.end.to:o.end.from:n?r.to:r.from,T.cursor(s,n?-1:1)}var Yf=e=>Rf(e,t=>Jf(e.state,t,!Vf(e))),Xf=e=>Rf(e,t=>Jf(e.state,t,Vf(e)));function Zf(e,t){return Rf(e,n=>{if(!n.empty)return zf(n,t);let r=e.moveVertically(n,t);return r.head==n.head?e.moveToLineBoundary(n,t):r})}var Qf=e=>Zf(e,!1),$f=e=>Zf(e,!0);function ep(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,n=0,r=0,i;if(t){for(let t of e.state.facet(U.scrollMargins)){let i=t(e);i?.top&&(n=Math.max(i?.top,n)),i?.bottom&&(r=Math.max(i?.bottom,r))}i=e.scrollDOM.clientHeight-n-r}else i=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:r,selfScroll:t,height:Math.max(e.defaultLineHeight,i-5)}}function tp(e,t){let n=ep(e),{state:r}=e,i=If(r.selection,r=>r.empty?e.moveVertically(r,t,n.height):zf(r,t));if(i.eq(r.selection))return!1;let a;if(n.selfScroll){let t=e.coordsAtPos(r.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),s=o.top+n.marginTop,c=o.bottom-n.marginBottom;t&&t.top>s&&t.bottom<c&&(a=U.scrollIntoView(i.main.head,{y:`start`,yMargin:t.top-s}))}return e.dispatch(Lf(r,i),{effects:a}),!0}var np=e=>tp(e,!1),rp=e=>tp(e,!0);function ip(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=T.cursor(r.from+n))}return i}var ap=e=>Rf(e,t=>ip(e,t,!0)),op=e=>Rf(e,t=>ip(e,t,!1)),sp=e=>Rf(e,t=>ip(e,t,!Vf(e))),cp=e=>Rf(e,t=>ip(e,t,Vf(e))),lp=e=>Rf(e,t=>T.cursor(e.lineBlockAt(t.head).from,1)),up=e=>Rf(e,t=>T.cursor(e.lineBlockAt(t.head).to,-1));function dp(e,t,n){let r=!1,i=If(e.selection,t=>{let i=Od(e,t.head,-1)||Od(e,t.head,1)||t.head>0&&Od(e,t.head-1,1)||t.head<e.doc.length&&Od(e,t.head+1,-1);if(!i||!i.end)return t;r=!0;let a=i.start.from==t.head?i.end.to:i.end.from;return n?T.range(t.anchor,a):T.cursor(a)});return r?(t(Lf(e,i)),!0):!1}var fp=({state:e,dispatch:t})=>dp(e,t,!1);function pp(e,t,n){let r=If(e.state.selection,e=>{e.undirectional&&e.head>=e.anchor!=t&&(e=T.range(e.head,e.anchor));let r=n(e);return T.range(e.anchor,r.head,r.goalColumn,r.bidiLevel||void 0,r.assoc)});return!r.eq(e.state.selection)&&(e.dispatch(Lf(e.state,r)),!0)}function mp(e,t){return pp(e,t,n=>e.moveByChar(n,t))}var hp=e=>mp(e,!Vf(e)),gp=e=>mp(e,Vf(e));function _p(e,t){return pp(e,t,n=>e.moveByGroup(n,t))}var vp=e=>_p(e,!Vf(e)),yp=e=>_p(e,Vf(e)),bp=e=>{let t=!Vf(e);return pp(e,t,n=>Jf(e.state,n,t))},xp=e=>{let t=Vf(e);return pp(e,t,n=>Jf(e.state,n,t))};function Sp(e,t){return pp(e,t,n=>e.moveVertically(n,t))}var Cp=e=>Sp(e,!1),wp=e=>Sp(e,!0);function Tp(e,t){return pp(e,t,n=>e.moveVertically(n,t,ep(e).height))}var Ep=e=>Tp(e,!1),Dp=e=>Tp(e,!0),Op=e=>pp(e,!0,t=>ip(e,t,!0)),kp=e=>pp(e,!1,t=>ip(e,t,!1)),Ap=e=>{let t=!Vf(e);return pp(e,t,n=>ip(e,n,t))},jp=e=>{let t=Vf(e);return pp(e,t,n=>ip(e,n,t))},Mp=e=>pp(e,!1,t=>T.cursor(e.lineBlockAt(t.head).from)),Np=e=>pp(e,!0,t=>T.cursor(e.lineBlockAt(t.head).to)),Pp=({state:e,dispatch:t})=>(t(Lf(e,{anchor:0})),!0),Fp=({state:e,dispatch:t})=>(t(Lf(e,{anchor:e.doc.length})),!0),Ip=({state:e,dispatch:t})=>(t(Lf(e,{anchor:e.selection.main.anchor,head:0})),!0),Lp=({state:e,dispatch:t})=>(t(Lf(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),Rp=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:`select`})),!0),zp=({state:e,dispatch:t})=>{let n=im(e).map(({from:t,to:n})=>T.undirectionalRange(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:T.create(n),userEvent:`select`})),!0},Bp=({state:e,dispatch:t})=>{let n=If(e.selection,t=>{let n=Y(e),r=n.resolveStack(t.from,1);if(t.empty){let e=n.resolveStack(t.from,-1);e.node.from>=r.node.from&&e.node.to<=r.node.to&&(r=e)}for(let e=r;e;e=e.next){let{node:n}=e;if((n.from<t.from&&n.to>=t.to||n.to>t.to&&n.from<=t.from)&&e.next)return T.undirectionalRange(n.from,n.to)}return t});return!n.eq(e.selection)&&(t(Lf(e,n)),!0)};function Vp(e,t){let{state:n}=e,r=n.selection,i=n.selection.ranges.slice();for(let r of n.selection.ranges){let a=n.doc.lineAt(r.head);if(t?a.to<e.state.doc.length:a.from>0)for(let n=r;;){let r=e.moveVertically(n,t);if(r.head<a.from||r.head>a.to){i.some(e=>e.head==r.head)||i.push(r);break}if(r.head==n.head)break;n=r}}return i.length!=r.ranges.length&&(e.dispatch(Lf(n,T.create(i,i.length-1))),!0)}var Hp=e=>Vp(e,!1),Up=e=>Vp(e,!0),Wp=({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=T.create([n.main]):n.main.empty||(r=T.create([T.cursor(n.main.head)])),r?(t(Lf(e,r)),!0):!1};function Gp(e,t){if(e.state.readOnly)return!1;let n=`delete.selection`,{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:a}=r;if(i==a){let o=t(r);o<i?(n=`delete.backward`,o=Kp(e,o,!1)):o>i&&(n=`delete.forward`,o=Kp(e,o,!0)),i=Math.min(i,o),a=Math.max(a,o)}else i=Kp(e,i,!1),a=Kp(e,a,!0);return i==a?{range:r}:{changes:{from:i,to:a},range:T.cursor(i,i<r.head?-1:1)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:n==`delete.selection`?U.announce.of(r.phrase(`Selection deleted`)):void 0})),!0)}function Kp(e,t,n){if(e instanceof U)for(let r of e.state.facet(U.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{e<t&&r>t&&(t=n?r:e)});return t}var qp=(e,t,n)=>Gp(e,r=>{let i=r.from,{state:a}=e,o=a.doc.lineAt(i),s,c;if(n&&!t&&i>o.from&&i<o.from+200&&!/[^ \t]/.test(s=o.text.slice(0,i-o.from))){if(s[s.length-1]==` `)return i-1;let e=yt(s,a.tabSize)%mu(a)||mu(a);for(let t=0;t<e&&s[s.length-1-t]==` `;t++)i--;c=i}else c=b(o.text,i-o.from,t,t)+o.from,c==i&&o.number!=(t?a.doc.lines:1)?c+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,i-o.from))&&(c=b(o.text,c-o.from,!1,!1)+o.from);return c}),Jp=e=>qp(e,!1,!0),Yp=e=>qp(e,!0,!1),Xp=(e,t)=>Gp(e,n=>{let r=n.head,{state:i}=e,a=i.doc.lineAt(r),o=i.charCategorizer(r);for(let e=null;;){if(r==(t?a.to:a.from)){r==n.head&&a.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let s=b(a.text,r-a.from,t)+a.from,c=a.text.slice(Math.min(r,s)-a.from,Math.max(r,s)-a.from),l=o(c);if(e!=null&&l!=e)break;(c!=` `||r!=n.head)&&(e=l),r=s}return r}),Zp=e=>Xp(e,!1),Qp=e=>Xp(e,!0),$p=e=>Gp(e,t=>{let n=e.lineBlockAt(t.head).to;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),em=e=>Gp(e,t=>{let n=e.moveToLineBoundary(t,!1).head;return t.head>n?n:Math.max(0,t.head-1)}),tm=e=>Gp(e,t=>{let n=e.moveToLineBoundary(t,!0).head;return t.head<n?n:Math.min(e.state.doc.length,t.head+1)}),nm=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:p.of([``,``])},range:T.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:`input`})),!0},rm=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||t.from==0||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:b(r.text,n-r.from,!1)+r.from,a=n==r.to?n+1:b(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:a,insert:e.doc.slice(n,a).append(e.doc.slice(i,n))},range:T.cursor(a)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:`move.character`})),!0)};function im(e){let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.from),a=e.doc.lineAt(r.to);if(!r.empty&&r.to==a.from&&(a=e.doc.lineAt(r.to-1)),n>=i.number){let e=t[t.length-1];e.to=a.to,e.ranges.push(r)}else t.push({from:i.from,to:a.to,ranges:[r]});n=a.number+1}return t}function am(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of im(e)){if(n?t.to==e.doc.length:t.from==0)continue;let a=e.doc.lineAt(n?t.to+1:t.from-1),o=a.length+1;if(n){r.push({from:t.to,to:a.to},{from:t.from,insert:a.text+e.lineBreak});for(let n of t.ranges)i.push(T.range(Math.min(e.doc.length,n.anchor+o),Math.min(e.doc.length,n.head+o)))}else{r.push({from:a.from,to:t.from},{from:t.to,insert:e.lineBreak+a.text});for(let e of t.ranges)i.push(T.range(e.anchor-o,e.head-o))}}return r.length?(t(e.update({changes:r,scrollIntoView:!0,selection:T.create(i,e.selection.mainIndex),userEvent:`move.line`})),!0):!1}var om=({state:e,dispatch:t})=>am(e,t,!1),sm=({state:e,dispatch:t})=>am(e,t,!0);function cm(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of im(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});let i=e.changes(r);return t(e.update({changes:i,selection:e.selection.map(i,n?1:-1),scrollIntoView:!0,userEvent:`input.copyline`})),!0}var lm=({state:e,dispatch:t})=>cm(e,t,!1),um=({state:e,dispatch:t})=>cm(e,t,!0),dm=e=>{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(im(t).map(({from:e,to:n})=>(e>0?e--:n<t.doc.length&&n++,{from:e,to:n}))),r=If(t.selection,t=>{let n;if(e.lineWrapping){let r=e.lineBlockAt(t.head),i=e.coordsAtPos(t.head,t.assoc||1);i&&(n=r.bottom+e.documentTop-i.bottom+e.defaultLineHeight/2)}return e.moveVertically(t,!0,n)}).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:`delete.line`}),!0};function fm(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n=Y(e).resolveInner(t),r=n.childBefore(t),i=n.childAfter(t),a;return r&&i&&r.to<=t&&i.from>=t&&(a=r.type.prop(W.closedBy))&&a.indexOf(i.name)>-1&&e.doc.lineAt(r.to).from==e.doc.lineAt(i.from).from&&!/\S/.test(e.sliceDoc(r.to,i.from))?{from:r.to,to:i.from}:null}var pm=hm(!1),mm=hm(!0);function hm(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,a=t.doc.lineAt(r),o=!e&&r==i&&fm(t,r);e&&(r=i=(i<=a.to?a:t.doc.lineAt(i)).to);let s=new _u(t,{simulateBreak:r,simulateDoubleBreak:!!o}),c=gu(s,r);for(c??=yt(/^\s*/.exec(t.doc.lineAt(r).text)[0],t.tabSize);i<a.to&&/\s/.test(a.text[i-a.from]);)i++;o?{from:r,to:i}=o:r>a.from&&r<a.from+100&&!/\S/.test(a.text.slice(0,r))&&(r=a.from);let l=[``,hu(t,c)];return o&&l.push(hu(t,s.lineIndent(a.from,-1))),{changes:{from:r,to:i,insert:p.of(l)},range:T.cursor(r+1+l[1].length)}});return n(t.update(r,{scrollIntoView:!0,userEvent:`input`})),!0}}function gm(e,t){let n=-1;return e.changeByRange(r=>{let i=[];for(let a=r.from;a<=r.to;){let o=e.doc.lineAt(a);o.number>n&&(r.empty||r.to>o.from)&&(t(o,i,r),n=o.number),a=o.to+1}let a=e.changes(i);return{changes:i,range:T.range(a.mapPos(r.anchor,1),a.mapPos(r.head,1))}})}var _m=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new _u(e,{overrideIndentation:e=>n[e]??-1}),i=gm(e,(t,i,a)=>{let o=gu(r,t.from);if(o==null)return;/\S/.test(t.text)||(o=0);let s=/^\s*/.exec(t.text)[0],c=hu(e,o);(s!=c||a.from<t.from+s.length)&&(n[t.from]=o,i.push({from:t.from,to:t.from+s.length,insert:c}))});return i.changes.empty||t(e.update(i,{userEvent:`indent`})),!0},vm=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(gm(e,(t,n)=>{n.push({from:t.from,insert:e.facet(pu)})}),{userEvent:`input.indent`})),!0),ym=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(gm(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=yt(r,e.tabSize),a=0,o=hu(e,Math.max(0,i-mu(e)));for(;a<r.length&&a<o.length&&r.charCodeAt(a)==o.charCodeAt(a);)a++;n.push({from:t.from+a,to:t.from+r.length,insert:o.slice(a)})}),{userEvent:`delete.dedent`})),!0),bm=e=>(e.setTabFocusMode(),!0),xm=[{key:`Ctrl-b`,run:Hf,shift:hp,preventDefault:!0},{key:`Ctrl-f`,run:Uf,shift:gp},{key:`Ctrl-p`,run:Qf,shift:Cp},{key:`Ctrl-n`,run:$f,shift:wp},{key:`Ctrl-a`,run:lp,shift:Mp},{key:`Ctrl-e`,run:up,shift:Np},{key:`Ctrl-d`,run:Yp},{key:`Ctrl-h`,run:Jp},{key:`Ctrl-k`,run:$p},{key:`Ctrl-Alt-h`,run:Zp},{key:`Ctrl-o`,run:nm},{key:`Ctrl-t`,run:rm},{key:`Ctrl-v`,run:rp}],Sm=[{key:`ArrowLeft`,run:Hf,shift:hp,preventDefault:!0},{key:`Mod-ArrowLeft`,mac:`Alt-ArrowLeft`,run:Gf,shift:vp,preventDefault:!0},{mac:`Cmd-ArrowLeft`,run:sp,shift:Ap,preventDefault:!0},{key:`ArrowRight`,run:Uf,shift:gp,preventDefault:!0},{key:`Mod-ArrowRight`,mac:`Alt-ArrowRight`,run:Kf,shift:yp,preventDefault:!0},{mac:`Cmd-ArrowRight`,run:cp,shift:jp,preventDefault:!0},{key:`ArrowUp`,run:Qf,shift:Cp,preventDefault:!0},{mac:`Cmd-ArrowUp`,run:Pp,shift:Ip},{mac:`Ctrl-ArrowUp`,run:np,shift:Ep},{key:`ArrowDown`,run:$f,shift:wp,preventDefault:!0},{mac:`Cmd-ArrowDown`,run:Fp,shift:Lp},{mac:`Ctrl-ArrowDown`,run:rp,shift:Dp},{key:`PageUp`,run:np,shift:Ep},{key:`PageDown`,run:rp,shift:Dp},{key:`Home`,run:op,shift:kp,preventDefault:!0},{key:`Mod-Home`,run:Pp,shift:Ip},{key:`End`,run:ap,shift:Op,preventDefault:!0},{key:`Mod-End`,run:Fp,shift:Lp},{key:`Enter`,run:pm,shift:pm},{key:`Mod-a`,run:Rp},{key:`Backspace`,run:Jp,shift:Jp,preventDefault:!0},{key:`Delete`,run:Yp,preventDefault:!0},{key:`Mod-Backspace`,mac:`Alt-Backspace`,run:Zp,preventDefault:!0},{key:`Mod-Delete`,mac:`Alt-Delete`,run:Qp,preventDefault:!0},{mac:`Mod-Backspace`,run:em,preventDefault:!0},{mac:`Mod-Delete`,run:tm,preventDefault:!0}].concat(xm.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),Cm=[{key:`Alt-ArrowLeft`,mac:`Ctrl-ArrowLeft`,run:Yf,shift:bp},{key:`Alt-ArrowRight`,mac:`Ctrl-ArrowRight`,run:Xf,shift:xp},{key:`Alt-ArrowUp`,run:om},{key:`Shift-Alt-ArrowUp`,run:lm},{key:`Alt-ArrowDown`,run:sm},{key:`Shift-Alt-ArrowDown`,run:um},{key:`Mod-Alt-ArrowUp`,run:Hp},{key:`Mod-Alt-ArrowDown`,run:Up},{key:`Escape`,run:Wp},{key:`Mod-Enter`,run:mm},{key:`Alt-l`,mac:`Ctrl-l`,run:zp},{key:`Mod-i`,run:Bp,preventDefault:!0},{key:`Mod-[`,run:ym},{key:`Mod-]`,run:vm},{key:`Mod-Alt-\\`,run:_m},{key:`Shift-Mod-k`,run:dm},{key:`Shift-Mod-\\`,run:fp},{key:`Mod-/`,run:$d},{key:`Alt-A`,mac:`Ctrl-A`,run:nf},{key:`Ctrl-m`,mac:`Shift-Alt-m`,run:bm}].concat(Sm),wm=typeof String.prototype.normalize==`function`?e=>e.normalize(`NFKD`):e=>e,Tm=class{constructor(e,t,n=0,r=e.length,i,a){this.test=a,this.value={from:0,to:0,precise:!1},this.done=!1,this.matches=[],this.buffer=``,this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i(wm(e)):wm,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return x(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=oe(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=S(e);let r=this.normalize(t);if(r.length)for(let e=0,i=n,a=!0;;e++){let n=r.charCodeAt(e),o=this.match(n,i,a,this.bufferPos+this.bufferStart,e==r.length-1);if(o)return this.value=o,this;if(e==r.length-1)break;a&&e<t.length&&t.charCodeAt(e)==n?i++:a=!1}}}match(e,t,n,r,i){let a=null;for(let t=0;t<this.matches.length;){let n=this.matches[t],o=!1;this.query.charCodeAt(n.index)==e&&(n.index==this.query.length-1?a={from:n.from,to:r,precise:i&&n.precise}:(n.index++,o=!0)),o?t++:this.matches.splice(t,1)}return this.query.charCodeAt(0)==e&&(this.query.length==1?a={from:t,to:r,precise:n&&i}:this.matches.push({from:t,index:1,precise:n})),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}};typeof Symbol<`u`&&(Tm.prototype[Symbol.iterator]=function(){return this});var Em={from:-1,to:-1,match:/.*/.exec(``),precise:!0},Dm=`gm`+(/x/.unicode==null?``:`u`),Om=class{constructor(e,t,n,r=0,i=e.length){if(this.text=e,this.to=i,this.curLine=``,this.done=!1,this.value=Em,/\\[sWDnr]|\n|\r|\[\^/.test(t))return new jm(e,t,n,r,i);this.re=new RegExp(t,Dm+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.iter=e.iter();let a=e.lineAt(r);this.curLineStart=a.from,this.matchPos=Nm(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine=``:(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine=``:this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=Nm(this.text,r+ +(n==r)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<r||n>this.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,precise:!0,match:t},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}},km=new WeakMap,Am=class e{constructor(e,t){this.from=e,this.text=t}get to(){return this.from+this.text.length}static get(t,n,r){let i=km.get(t);if(!i||i.from>=r||i.to<=n){let i=new e(n,t.sliceString(n,r));return km.set(t,i),i}if(i.from==n&&i.to==r)return i;let{text:a,from:o}=i;return o>n&&(a=t.sliceString(n,o)+a,o=n),i.to<r&&(a+=t.sliceString(i.to,r)),km.set(t,new e(o,a)),new e(n,a.slice(n-o,r-o))}},jm=class{constructor(e,t,n,r,i){this.text=e,this.to=i,this.done=!1,this.value=Em,this.matchPos=Nm(e,r),this.re=new RegExp(t,Dm+(n?.ignoreCase?`i`:``)),this.test=n?.test,this.flat=Am.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,precise:!0,match:t},this.matchPos=Nm(this.text,n+ +(e==n)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=Am.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}};typeof Symbol<`u`&&(Om.prototype[Symbol.iterator]=jm.prototype[Symbol.iterator]=function(){return this});function Mm(e){try{return new RegExp(e,Dm),!0}catch{return!1}}function Nm(e,t){if(t>=e.length)return t;let n=e.lineAt(t),r;for(;t<n.to&&(r=n.text.charCodeAt(t-n.from))>=56320&&r<57344;)t++;return t}var Pm=e=>{let{state:t}=e,n=String(t.doc.lineAt(e.state.selection.main.head).number),{close:r,result:i}=mc(e,{label:t.phrase(`Go to line`),input:{type:`text`,name:`line`,value:n},focus:!0,submitLabel:t.phrase(`go`)});return i.then(n=>{let i=n&&/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.elements.line.value);if(!i){e.dispatch({effects:r});return}let a=t.doc.lineAt(t.selection.main.head),[,o,s,c,l]=i,u=c?+c.slice(1):0,d=s?+s:a.number;if(s&&l){let e=d/100;o&&(e=e*(o==`-`?-1:1)+a.number/t.doc.lines),d=Math.round(t.doc.lines*e)}else s&&o&&(d=d*(o==`-`?-1:1)+a.number);let f=t.doc.line(Math.max(1,Math.min(t.doc.lines,d))),p=T.cursor(f.from+Math.max(0,Math.min(u,f.length)));e.dispatch({effects:[r,U.scrollIntoView(p.from,{y:`center`})],selection:p})}),!0},Fm={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},Im=E.define({combine(e){return tt(e,Fm,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})}});function Lm(e){let t=[Um,Hm];return e&&t.push(Im.of(e)),t}var Rm=L.mark({class:`cm-selectionMatch`}),zm=L.mark({class:`cm-selectionMatch cm-selectionMatch-main`});function Bm(e,t,n,r){return(n==0||e(t.sliceDoc(n-1,n))!=j.Word)&&(r==t.doc.length||e(t.sliceDoc(r,r+1))!=j.Word)}function Vm(e,t,n,r){return e(t.sliceDoc(n,n+1))==j.Word&&e(t.sliceDoc(r-1,r))==j.Word}var Hm=B.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(Im),{state:n}=e,r=n.selection;if(r.ranges.length>1)return L.none;let i=r.main,a,o=null;if(i.empty){if(!t.highlightWordAroundCursor)return L.none;let e=n.wordAt(i.head);if(!e)return L.none;o=n.charCategorizer(i.head),a=n.sliceDoc(e.from,e.to)}else{let e=i.to-i.from;if(e<t.minSelectionLength||e>200)return L.none;if(t.wholeWords){if(a=n.sliceDoc(i.from,i.to),o=n.charCategorizer(i.head),!(Bm(o,n,i.from,i.to)&&Vm(o,n,i.from,i.to)))return L.none}else if(a=n.sliceDoc(i.from,i.to),!a)return L.none}let s=[];for(let r of e.visibleRanges){let e=new Tm(n.doc,a,r.from,r.to);for(;!e.next().done;){let{from:r,to:a}=e.value;if((!o||Bm(o,n,r,a))&&(i.empty&&r<=i.from&&a>=i.to?s.push(zm.range(r,a)):(r>=i.to||a<=i.from)&&s.push(Rm.range(r,a)),s.length>t.maxMatches))return L.none}}return L.set(s)}},{decorations:e=>e.decorations}),Um=U.baseTheme({".cm-selectionMatch":{backgroundColor:`#99ff7780`},".cm-searchMatch .cm-selectionMatch":{backgroundColor:`transparent`}}),Wm=({state:e,dispatch:t})=>{let{selection:n}=e,r=T.create(n.ranges.map(t=>e.wordAt(t.head)||T.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)};function Gm(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),a=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new Tm(e.doc,t,r[r.length-1].to);;)if(i.next(),i.done){if(n)return null;i=new Tm(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}else{if(n&&r.some(e=>e.from==i.value.from))continue;if(a){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}}var Km=({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return Wm({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=Gm(e,r);return i?(t(e.update({selection:e.selection.addRange(T.range(i.from,i.to),!1),effects:U.scrollIntoView(i.to)})),!0):!1},qm=E.define({combine(e){return tt(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Dh(e),scrollToMatch:e=>U.scrollIntoView(e)})}}),Jm=class{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||``,this.valid=!!this.search&&(!this.regexp||Mm(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord,this.test=e.test}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>t==`n`?`1414 `:t==`r`?`\r`:t==`t`?` `:`\\`)}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord&&this.test==e.test}create(){return this.regexp?new ah(this):new $m(this)}getCursor(e,t=0,n){let r=e.doc?e:M.create({doc:e});return n??=r.doc.length,this.regexp?th(this,r,t,n):Zm(this,r,t,n)}},Ym=class{constructor(e){this.spec=e}};function Xm(e,t,n){return(r,i,a,o)=>n&&!n(r,i,a,o)?!1:e(r>=o&&i<=o+a.length?a.slice(r-o,i-o):t.doc.sliceString(r,i),t,r,i)}function Zm(e,t,n,r){let i;return e.wholeWord&&(i=Qm(t.doc,t.charCategorizer(t.selection.main.head))),e.test&&(i=Xm(e.test,t,i)),new Tm(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),i)}function Qm(e,t){return(n,r,i,a)=>((a>n||a+i.length<r)&&(a=Math.max(0,n-2),i=e.sliceString(a,Math.min(e.length,r+2))),(t(nh(i,n-a))!=j.Word||t(rh(i,n-a))!=j.Word)&&(t(rh(i,r-a))!=j.Word||t(nh(i,r-a))!=j.Word))}var $m=class extends Ym{constructor(e){super(e)}nextMatch(e,t,n){let r=Zm(this.spec,e,n,e.doc.length).nextOverlapping();if(r.done){let n=Math.min(e.doc.length,t+this.spec.unquoted.length);r=Zm(this.spec,e,0,n).nextOverlapping()}return r.done||r.value.from==t&&r.value.to==n?null:r.value}prevMatchInRange(e,t,n){for(let r=n;;){let n=Math.max(t,r-1e4-this.spec.unquoted.length),i=Zm(this.spec,e,n,r),a=null;for(;!i.nextOverlapping().done;)a=i.value;if(a)return a;if(n==t)return null;r-=1e4}}prevMatch(e,t,n){let r=this.prevMatchInRange(e,0,t);return r||=this.prevMatchInRange(e,Math.max(0,n-this.spec.unquoted.length),e.doc.length),r&&(r.from!=t||r.to!=n)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,t){let n=Zm(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=Zm(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}};function eh(e,t,n){return(r,i,a)=>(!n||n(r,i,a))&&e(a[0],t,r,i)}function th(e,t,n,r){let i;return e.wholeWord&&(i=ih(t.charCategorizer(t.selection.main.head))),e.test&&(i=eh(e.test,t,i)),new Om(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:i},n,r)}function nh(e,t){return e.slice(b(e,t,!1),t)}function rh(e,t){return e.slice(t,b(e,t))}function ih(e){return(t,n,r)=>!r[0].length||(e(nh(r.input,r.index))!=j.Word||e(rh(r.input,r.index))!=j.Word)&&(e(rh(r.input,r.index+r[0].length))!=j.Word||e(nh(r.input,r.index+r[0].length))!=j.Word)}var ah=class extends Ym{nextMatch(e,t,n){let r=th(this.spec,e,n,e.doc.length).next();return r.done&&(r=th(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-r*1e4),a=th(this.spec,e,i,n),o=null;for(;!a.next().done;)o=a.value;if(o&&(i==t||o.from>i+10))return o;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(t,n)=>{if(n==`&`)return e.match[0];if(n==`$`)return`$`;for(let t=n.length;t>0;t--){let r=+n.slice(0,t);if(r>0&&r<e.match.length)return e.match[r]+n.slice(t)}return t})}matchAll(e,t){let n=th(this.spec,e,0,e.doc.length),r=[];for(;!n.next().done;){if(r.length>=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=th(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}},oh=D.define(),sh=D.define(),ch=we.define({create(e){return new lh(xh(e).create(),null)},update(e,t){for(let n of t.effects)n.is(oh)?e=new lh(n.value.create(),e.panel):n.is(sh)&&(e=new lh(e.query,n.value?bh:null));return e},provide:e=>pc.from(e,e=>e.panel)}),lh=class{constructor(e,t){this.query=e,this.panel=t}},uh=L.mark({class:`cm-searchMatch`}),dh=L.mark({class:`cm-searchMatch cm-searchMatch-selected`}),fh=B.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(ch))}update(e){let t=e.state.field(ch);(t!=e.startState.field(ch)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return L.none;let{view:n}=this,r=new ct;for(let t=0,i=n.visibleRanges,a=i.length;t<a;t++){let{from:o,to:s}=i[t];for(;t<a-1&&s>i[t+1].from-500;)s=i[++t].to;e.highlight(n.state,o,s,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?dh:uh)})}return r.finish()}},{decorations:e=>e.decorations});function ph(e){return t=>{let n=t.state.field(ch,!1);return n&&n.query.spec.valid?e(t,n):wh(t)}}var mh=ph((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=T.single(r.from,r.to),a=e.state.facet(qm);return e.dispatch({selection:i,effects:[jh(e,r),a.scrollToMatch(i.main,e)],userEvent:`select.search`}),Ch(e),!0}),hh=ph((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let a=T.single(i.from,i.to),o=e.state.facet(qm);return e.dispatch({selection:a,effects:[jh(e,i),o.scrollToMatch(a.main,e)],userEvent:`select.search`}),Ch(e),!0}),gh=ph((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!n||!n.length?!1:(e.dispatch({selection:T.create(n.map(e=>T.range(e.from,e.to))),userEvent:`select.search.matches`}),!0)}),_h=({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,a=[],o=0;for(let t=new Tm(e.doc,e.sliceDoc(r,i));!t.next().done;){if(a.length>1e3)return!1;t.value.from==r&&(o=a.length),a.push(T.range(t.value.from,t.value.to))}return t(e.update({selection:T.create(a,o),userEvent:`select.search.matches`})),!0},vh=ph((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let a=t.nextMatch(n,r,r);if(!a)return!1;let o=a,s=[],c,l,u=[];o.precise?o.from==r&&o.to==i&&(l=n.toText(t.getReplacement(o)),s.push({from:o.from,to:o.to,insert:l}),o=t.nextMatch(n,o.from,o.to),u.push(U.announce.of(n.phrase(`replaced match on line $`,n.doc.lineAt(r).number)+`.`))):o=t.nextMatch(n,o.from,o.to);let d=e.state.changes(s);return o&&(c=T.single(o.from,o.to).map(d),u.push(jh(e,o)),u.push(n.facet(qm).scrollToMatch(c.main,e))),e.dispatch({changes:d,selection:c,effects:u,userEvent:`input.replace`}),!0}),yh=ph((e,{query:t})=>{if(e.state.readOnly)return!1;let n=[];for(let r of t.matchAll(e.state,1e9)){let{from:e,to:i,precise:a}=r;a&&n.push({from:e,to:i,insert:t.getReplacement(r)})}if(!n.length)return!1;let r=e.state.phrase(`replaced $ matches`,n.length)+`.`;return e.dispatch({changes:n,effects:U.announce.of(r),userEvent:`input.replace.all`}),!0});function bh(e){return e.state.facet(qm).createPanel(e)}function xh(e,t){let n=e.selection.main,r=n.empty||n.to>n.from+100?``:e.sliceDoc(n.from,n.to);if(t&&!r)return t;let i=e.facet(qm);return new Jm({search:t?.literal??i.literal?r:r.replace(/\n/g,`\\n`),caseSensitive:t?.caseSensitive??i.caseSensitive,literal:t?.literal??i.literal,regexp:t?.regexp??i.regexp,wholeWord:t?.wholeWord??i.wholeWord})}function Sh(e){let t=lc(e,bh);return t&&t.dom.querySelector(`[main-field]`)}function Ch(e){let t=Sh(e);t&&t==e.root.activeElement&&t.select()}var wh=e=>{let t=e.state.field(ch,!1);if(t&&t.panel){let n=Sh(e);if(n&&n!=e.root.activeElement){let r=xh(e.state,t.query.spec);r.valid&&e.dispatch({effects:oh.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[sh.of(!0),t?oh.of(xh(e.state,t.query.spec)):D.appendConfig.of(Nh)]});return!0},Th=e=>{let t=e.state.field(ch,!1);if(!t||!t.panel)return!1;let n=lc(e,bh);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:sh.of(!1)}),!0},Eh=[{key:`Mod-f`,run:wh,scope:`editor search-panel`},{key:`F3`,run:mh,shift:hh,scope:`editor search-panel`,preventDefault:!0},{key:`Mod-g`,run:mh,shift:hh,scope:`editor search-panel`,preventDefault:!0},{key:`Escape`,run:Th,scope:`editor search-panel`},{key:`Mod-Shift-l`,run:_h},{key:`Mod-Alt-g`,run:Pm},{key:`Mod-d`,run:Km,preventDefault:!0}],Dh=class{constructor(e){this.view=e;let t=this.query=e.state.field(ch).query.spec;this.commit=this.commit.bind(this),this.searchField=P(`input`,{value:t.search,placeholder:Oh(e,`Find`),"aria-label":Oh(e,`Find`),class:`cm-textfield`,name:`search`,form:``,"main-field":`true`,onchange:this.commit,onkeyup:this.commit}),this.replaceField=P(`input`,{value:t.replace,placeholder:Oh(e,`Replace`),"aria-label":Oh(e,`Replace`),class:`cm-textfield`,name:`replace`,form:``,onchange:this.commit,onkeyup:this.commit}),this.caseField=P(`input`,{type:`checkbox`,name:`case`,form:``,checked:t.caseSensitive,onchange:this.commit}),this.reField=P(`input`,{type:`checkbox`,name:`re`,form:``,checked:t.regexp,onchange:this.commit}),this.wordField=P(`input`,{type:`checkbox`,name:`word`,form:``,checked:t.wholeWord,onchange:this.commit});function n(e,t,n){return P(`button`,{class:`cm-button`,name:e,onclick:t,type:`button`},n)}this.dom=P(`div`,{onkeydown:e=>this.keydown(e),class:`cm-search`},[this.searchField,n(`next`,()=>mh(e),[Oh(e,`next`)]),n(`prev`,()=>hh(e),[Oh(e,`previous`)]),n(`select`,()=>gh(e),[Oh(e,`all`)]),P(`label`,null,[this.caseField,Oh(e,`match case`)]),P(`label`,null,[this.reField,Oh(e,`regexp`)]),P(`label`,null,[this.wordField,Oh(e,`by word`)]),...e.state.readOnly?[]:[P(`br`),this.replaceField,n(`replace`,()=>vh(e),[Oh(e,`replace`)]),n(`replaceAll`,()=>yh(e),[Oh(e,`replace all`)])],P(`button`,{name:`close`,onclick:()=>Th(e),"aria-label":Oh(e,`close`),type:`button`},[`×`])])}commit(){let e=new Jm({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:oh.of(e)}))}keydown(e){Bo(this.view,e,`search-panel`)?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?hh:mh)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),vh(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(oh)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(qm).top}};function Oh(e,t){return e.state.phrase(t)}var kh=30,Ah=/[\s\.,:;?!]/;function jh(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,a=Math.max(r.from,t-kh),o=Math.min(i,n+kh),s=e.state.sliceDoc(a,o);if(a!=r.from){for(let e=0;e<kh;e++)if(!Ah.test(s[e+1])&&Ah.test(s[e])){s=s.slice(e);break}}if(o!=i){for(let e=s.length-1;e>s.length-kh;e--)if(!Ah.test(s[e-1])&&Ah.test(s[e])){s=s.slice(0,e);break}}return U.announce.of(`${e.state.phrase(`current match`)}. ${s} ${e.state.phrase(`on line`)} ${r.number}.`)}var Mh=U.baseTheme({".cm-panel.cm-search":{padding:`2px 6px 4px`,position:`relative`,"& [name=close]":{position:`absolute`,top:`0`,right:`4px`,backgroundColor:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0},"& input, & button, & label":{margin:`.2em .6em .2em 0`},"& input[type=checkbox]":{marginRight:`.2em`},"& label":{fontSize:`80%`,whiteSpace:`pre`}},"&light .cm-searchMatch":{backgroundColor:`#ffff0054`},"&dark .cm-searchMatch":{backgroundColor:`#00ffff8a`},"&light .cm-searchMatch-selected":{backgroundColor:`#ff6a0054`},"&dark .cm-searchMatch-selected":{backgroundColor:`#ff00ff8a`}}),Nh=[ch,De.low(fh),Mh],Ph=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=Y(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(Vh(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function Fh(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function Ih(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=Fh(t)+Fh(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function Lh(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:Ih(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function Rh(e,t){return n=>{for(let t=Y(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var zh=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function Bh(e){return e.selection.main.from}function Vh(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var Hh=He.define();function Uh(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:T.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var Wh=new WeakMap;function Gh(e){if(!Array.isArray(e))return e;let t=Wh.get(e);return t||Wh.set(e,t=Lh(e)),t}var Kh=D.define(),qh=D.define(),Jh=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let n=x(e,t),r=S(n);this.chars.push(n);let i=e.slice(t,t+r),a=i.toUpperCase();this.folded.push(x(a==i?i.toLowerCase():a,0)),t+=r}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:n,any:r,precise:i,byWord:a}=this;if(t.length==1){let r=x(e,0),i=S(r),a=i==e.length?0:-100;if(r!=t[0]){if(r==n[0])a+=-200;else return null}return this.ret(a,[0,i])}let o=e.indexOf(this.pattern);if(o==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let s=t.length,c=0;if(o<0){for(let i=0,a=Math.min(e.length,200);i<a&&c<s;){let a=x(e,i);(a==t[c]||a==n[c])&&(r[c++]=i),i+=S(a)}if(c<s)return null}let l=0,u=0,d=!1,f=0,p=-1,m=-1,h=/[a-z]/.test(e),g=!0;for(let r=0,c=Math.min(e.length,200),_=0;r<c&&u<s;){let c=x(e,r);o<0&&(l<s&&c==t[l]&&(i[l++]=r),f<s&&(c==t[f]||c==n[f]?(f==0&&(p=r),m=r+1,f++):f=0));let v,y=c<255?c>=48&&c<=57||c>=97&&c<=122?2:+(c>=65&&c<=90):(v=oe(c))==v.toLowerCase()?v==v.toUpperCase()?0:2:1;(!r||y==1&&h||_==0&&y!=0)&&(t[u]==c||n[u]==c&&(d=!0)?a[u++]=r:a.length&&(g=!1)),_=y,r+=S(c)}return u==s&&a[0]==0&&g?this.result(-100+(d?-200:0),a,e):f==s&&p==0?this.ret(-200-e.length+(m==e.length?0:-100),[0,m]):o>-1?this.ret(-700-e.length,[o,o+this.pattern.length]):f==s?this.ret(-900-e.length,[p,m]):u==s?this.result(-100+(d?-200:0)+-700+(g?0:-1100),a,e):t.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,t,n){let r=[],i=0;for(let e of t){let t=e+(this.astral?S(x(n,e)):1);i&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return this.ret(e-n.length,r)}},Yh=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},X=E.define({combine(e){return tt(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:Zh,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>Xh(e(n),t(n)),optionClass:(e,t)=>n=>Xh(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function Xh(e,t){return e?t?e+` `+t:e:t}function Zh(e,t,n,r,i,a){let o=e.textDirection==R.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let g=(t.bottom-t.top)/a.offsetHeight,_=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/g}px; max-width: ${d/_}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var Qh=D.define();function $h(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function eg(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var tg=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(X);this.optionContent=$h(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=eg(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:Qh.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(X).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:qh.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=eg(r.length,i,e.state.facet(X).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=eg(t.options.length,t.selected,this.view.state.facet(X).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>vr(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&rg(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(X).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0)){if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function ng(e,t){return n=>new tg(n,e,t)}function rg(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function ig(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function ag(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(X);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new zh(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new Yh(n):new Jh(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new zh(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):ig(e.completion)>ig(c)&&(s[s.length-1]=e),c=e.completion}return s}var og=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,dg(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=ag(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(X).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,dg(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:bg,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},sg=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(fg,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(X),i=(r.override||n.languageDataAt(`autocomplete`,Bh(n)).map(Gh)).map(e=>(this.active.find(t=>t.source==e)||new mg(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(_g));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!cg(i,this.active)||o?a=og.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new mg(e.source,0):e));for(let e of t.effects)e.is(Qh)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?lg:ug}};function cg(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var lg={"aria-autocomplete":`list`},ug={};function dg(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var fg=[];function pg(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(Hh);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var mg=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=pg(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(Kh))i=new e(i.source,1,n.value);else if(n.is(qh))i=new e(i.source,0);else if(n.is(_g))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(Bh(e.state))}},hg=class e extends mg{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=Bh(t.state);if(o>a||!r||n&2&&(Bh(t.startState)==this.from||o<this.limit))return new mg(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return gg(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new Ph(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??Bh(t.state)):new mg(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new mg(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function gg(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):Vh(e,!0).test(i)}var _g=D.define({map(e,t){return e.map(e=>e.map(t))}}),vg=we.define({create(){return sg.start()},update(e,t){return e.update(t)},provide:e=>[Ys.from(e,e=>e.tooltip),U.contentAttributes.from(e,e=>e.attrs)]});function yg(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(vg).active.find(e=>e.source==t.source);return r instanceof hg&&(typeof n==`string`?e.dispatch({...Uh(e.state,n,r.from,r.to),annotations:Hh.of(t.completion)}):n(e,t.completion,r.from,r.to),!0)}var bg=ng(vg,yg);function xg(e,t=`option`){return n=>{let r=n.state.field(vg,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(X).interactionDelay)return!1;let i=1,a;t==`page`&&(a=oc(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:Qh.of(s)}),!0}}var Sg=e=>{let t=e.state.field(vg,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(X).interactionDelay?!1:yg(e,t.open.options[t.open.selected])},Cg=e=>e.state.field(vg,!1)?(e.dispatch({effects:Kh.of(!0)}),!0):!1,wg=e=>{let t=e.state.field(vg,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:qh.of(null)}),!0)},Tg=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},Eg=50,Dg=1e3,Og=B.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(vg).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(vg),n=e.state.facet(X);if(!e.selectionSet&&!e.docChanged&&e.startState.field(vg)==t)return;let r=e.transactions.some(e=>{let t=pg(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>Eg&&Date.now()-n.time>Dg){for(let e of n.context.abortListeners)try{e()}catch(e){vr(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(Kh)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(vg);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(X).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new Ph(t,Bh(t),e.explicit,this.view),r=new Tg(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:qh.of(null)}),vr(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(X).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(X),n=this.view.state.field(vg);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=Bh(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new hg(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending){if(i.done==null){let n=new mg(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:_g.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(vg,!1);if(t&&t.tooltip&&this.view.state.facet(X).closeOnBlur){let n=t.open&&oc(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:qh.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Kh.of(!1)}),20),this.composing=0}}}),kg=typeof navigator==`object`&&/Win/.test(navigator.platform),Ag=De.highest(U.domEventHandlers({keydown(e,t){let n=t.state.field(vg,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(kg&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&yg(t,r),!1}})),jg=U.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Mg={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Ng=D.define({map(e,t){return t.mapPos(e,-1,ce.TrackAfter)??void 0}}),Pg=new class extends nt{};Pg.startSide=1,Pg.endSide=-1;var Fg=we.define({create(){return N.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Ng)&&(e=e.update({add:[Pg.range(n.value,n.value+1)]}));return e}});function Ig(){return[Vg,Fg]}var Lg=`()[]{}<>«»»«[]{}`;function Rg(e){for(let t=0;t<16;t+=2)if(Lg.charCodeAt(t)==e)return Lg.charAt(t+1);return oe(e<128?e:e+1)}function zg(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||Mg}var Bg=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),Vg=U.inputHandler.of((e,t,n,r)=>{if((Bg?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||r.length==2&&S(x(r,0))==1||t!=i.from||n!=i.to)return!1;let a=Ug(e.state,r);return a?(e.dispatch(a),!0):!1}),Hg=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=zg(e,e.selection.main.head).brackets||Mg.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=Kg(e.doc,t.head);for(let i of n)if(i==r&&Gg(e.doc,t.head)==Rg(x(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:T.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:`delete.backward`})),!r}}];function Ug(e,t){let n=zg(e,e.selection.main.head),r=n.brackets||Mg.brackets;for(let i of r){let a=Rg(x(i,0));if(t==i)return a==i?Yg(e,i,r.indexOf(i+i+i)>-1,n):qg(e,i,a,n.before||Mg.before);if(t==a&&Wg(e,e.selection.main.from))return Jg(e,i,a)}return null}function Wg(e,t){let n=!1;return e.field(Fg).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function Gg(e,t){let n=e.sliceString(t,t+2);return n.slice(0,S(x(n,0)))}function Kg(e,t){let n=e.sliceString(t-2,t);return S(x(n,0))==n.length?n:n.slice(1)}function qg(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Ng.of(a.to+t.length),range:T.range(a.anchor+t.length,a.head+t.length)};let o=Gg(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:Ng.of(a.head+t.length),range:T.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function Jg(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&Gg(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:T.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function Yg(e,t,n,r){let i=r.stringPrefixes||Mg.stringPrefixes,a=null,o=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Ng.of(r.to+t.length),range:T.range(r.anchor+t.length,r.head+t.length)};let o=r.head,s=Gg(e.doc,o),c;if(s==t){if(Xg(e,o))return{changes:{insert:t+t,from:o},effects:Ng.of(o+t.length),range:T.cursor(o+t.length)};if(Wg(e,o)){let r=n&&e.sliceDoc(o,o+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:o,to:o+r.length,insert:r},range:T.cursor(o+r.length)}}}else if(n&&e.sliceDoc(o-2*t.length,o)==t+t&&(c=Qg(e,o-2*t.length,i))>-1&&Xg(e,c))return{changes:{insert:t+t+t+t,from:o},effects:Ng.of(o+t.length),range:T.cursor(o+t.length)};else if(e.charCategorizer(o)(s)!=j.Word&&Qg(e,o,i)>-1&&!Zg(e,o,t,i))return{changes:{insert:t+t,from:o},effects:Ng.of(o+t.length),range:T.cursor(o+t.length)};return{range:a=r}});return a?null:e.update(o,{scrollIntoView:!0,userEvent:`input.type`})}function Xg(e,t){let n=Y(e).resolveInner(t+1);return n.parent&&n.from==t}function Zg(e,t,n,r){let i=Y(e).resolveInner(t,-1),a=r.reduce((e,t)=>Math.max(e,t.length),0);for(let o=0;o<5;o++){let o=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+a)),s=o.indexOf(n);if(!s||s>-1&&r.indexOf(o.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function Qg(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=j.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=j.Word)return n}return-1}function $g(e={}){return[Ag,vg,X.of(e),Og,t_,jg]}var e_=[{key:`Ctrl-Space`,run:Cg},{mac:"Alt-`",run:Cg},{mac:`Alt-i`,run:Cg},{key:`Escape`,run:wg},{key:`ArrowDown`,run:xg(!0)},{key:`ArrowUp`,run:xg(!1)},{key:`PageDown`,run:xg(!0,`page`)},{key:`PageUp`,run:xg(!1,`page`)},{key:`Enter`,run:Sg}],t_=De.highest(Lo.computeN([X],e=>e.facet(X).defaultKeymap?[e_]:[])),n_=class{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}},r_=class e{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(t,n,r){let i=r.facet(__).markerFilter;i&&(t=i(t,r));let a=t.slice().sort((e,t)=>e.from-t.from||e.to-t.to),o=new ct,s=[],c=0,l=r.doc.iter(),u=0,d=r.doc.length;for(let e=0;;){let t=e==a.length?null:a[e];if(!t&&!s.length)break;let n,r;if(s.length)n=c,r=s.reduce((e,t)=>Math.min(e,t.to),t&&t.from>n?t.from:1e8);else{if(n=t.from,n>d)break;r=t.to,s.push(t),e++}for(;e<a.length;){let t=a[e];if(t.from==n&&(t.to>t.from||t.to==n))s.push(t),e++,r=Math.min(t.to,r);else{r=Math.min(t.from,r);break}}r=Math.min(r,d);let i=!1;if(s.some(e=>e.from==n&&(e.to==r||r==d))&&(i=n==r,!i&&r-n<10)){let e=n-(u+l.value.length);e>0&&(l.next(e),u=n);for(let e=n;;){if(e>=r){i=!0;break}if(!l.lineBreak&&u+l.value.length>e)break;e=u+l.value.length,u+=l.value.length,l.next()}}let f=O_(s);if(i)o.add(n,n,L.widget({widget:new x_(f),diagnostics:s.slice()}));else{let e=s.reduce((e,t)=>t.markClass?e+` `+t.markClass:e,``);o.add(n,r,L.mark({class:`cm-lintRange cm-lintRange-`+f+e,diagnostics:s.slice(),inclusiveEnd:s.some(e=>e.to>r)}))}if(c=r,c==d)break;for(let e=0;e<s.length;e++)s[e].to<=c&&s.splice(e--,1)}let f=o.finish();return new e(f,n,i_(f))}};function i_(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0)){if(!r)r=new n_(e,n,t||i.diagnostics[0]);else if(i.diagnostics.indexOf(r.diagnostic)<0)return!1;else r=new n_(r.from,n,r.diagnostic)}}),r}function a_(e,t){let n=t.pos,r=t.end||n,i=e.state.facet(__).hideOn(e,n,r);if(i!=null)return i;let a=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(e=>e.is(s_))||e.changes.touchesRange(a.from,Math.max(a.to,r)))}function o_(e,t){return e.field(u_,!1)?t:t.concat(D.appendConfig.of(A_))}var s_=D.define(),c_=D.define(),l_=D.define(),u_=we.define({create(){return new r_(L.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let n=e.diagnostics.map(t.changes),r=null,i=e.panel;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=i_(n,e.selected.diagnostic,i)||i_(n,null,i)}!n.size&&i&&t.state.facet(__).autoPanel&&(i=null),e=new r_(n,i,r)}for(let n of t.effects)if(n.is(s_)){let r=t.state.facet(__).autoPanel?n.value.length?C_.open:null:e.panel;e=r_.init(n.value,r,t.state)}else n.is(c_)?e=new r_(e.diagnostics,n.value?C_.open:null,e.selected):n.is(l_)&&(e=new r_(e.diagnostics,e.panel,n.value));return e},provide:e=>[pc.from(e,e=>e.panel),U.decorations.from(e,e=>e.diagnostics)]}),d_=L.mark({class:`cm-lintRange cm-lintRange-active`});function f_(e,t,n){let{diagnostics:r}=e.state.field(u_),i,a=-1,o=-1;r.between(t-+(n<0),t+ +(n>0),(e,r,{spec:s})=>{if(t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t<r||n<0)))return i=s.diagnostics,a=e,o=r,!1});let s=e.state.facet(__).tooltipFilter;return i&&s&&(i=s(i,e.state)),i?{pos:a,end:o,above:!0,create(){return{dom:p_(e,i)}}}:null}function p_(e,t){return P(`ul`,{class:`cm-tooltip-lint`},t.map(t=>b_(e,t,!1)))}var m_=e=>{let t=e.state.field(u_,!1);(!t||!t.panel)&&e.dispatch({effects:o_(e.state,[c_.of(!0)])});let n=lc(e,C_.open);return n&&n.dom.querySelector(`.cm-panel-lint ul`).focus(),!0},h_=e=>{let t=e.state.field(u_,!1);return!t||!t.panel?!1:(e.dispatch({effects:c_.of(!1)}),!0)},g_=[{key:`Mod-Shift-m`,run:m_,preventDefault:!0},{key:`F8`,run:e=>{let t=e.state.field(u_,!1);if(!t)return!1;let n=e.state.selection.main,r=i_(t.diagnostics,null,n.to+1);return!r&&(r=i_(t.diagnostics,null,0),!r||r.from==n.from&&r.to==n.to)?!1:(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),ac(e,r.from,1,{tooltip:k_,until:e=>e.docChanged||e.newSelection.main.head<r.from||e.newSelection.main.head>r.to}),!0)}}],__=E.define({combine(e){return{sources:e.map(e=>e.source).filter(e=>e!=null),...tt(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:v_,tooltipFilter:v_,needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t,hideOn:(e,t)=>e?t?(n,r,i)=>e(n,r,i)||t(n,r,i):e:t,autoPanel:(e,t)=>e||t})}}});function v_(e,t){return e?t?(n,r)=>t(e(n,r),r):e:t}function y_(e){let t=[];if(e)actions:for(let{name:n}of e){for(let e=0;e<n.length;e++){let r=n[e];if(/[a-zA-Z]/.test(r)&&!t.some(e=>e.toLowerCase()==r.toLowerCase())){t.push(r);continue actions}}t.push(``)}return t}function b_(e,t,n){let r=n?y_(t.actions):[];return P(`li`,{class:`cm-diagnostic cm-diagnostic-`+t.severity},P(`span`,{class:`cm-diagnosticText`},t.renderMessage?t.renderMessage(e):t.message),t.actions?.map((n,i)=>{let a=!1,o=r=>{if(r.preventDefault(),a)return;a=!0;let i=i_(e.state.field(u_).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:s}=n,c=r[i]?s.indexOf(r[i]):-1,l=c<0?s:[s.slice(0,c),P(`u`,s.slice(c,c+1)),s.slice(c+1)];return P(`button`,{type:`button`,class:`cm-diagnosticAction`+(n.markClass?` `+n.markClass:``),onclick:o,onmousedown:o,"aria-label":` Action: ${s}${c<0?``:` (access key "${r[i]})"`}.`},l)}),t.source&&P(`div`,{class:`cm-diagnosticSource`},t.source))}var x_=class extends $t{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return P(`span`,{class:`cm-lintPoint cm-lintPoint-`+this.sev})}},S_=class{constructor(e,t){this.diagnostic=t,this.id=`item_`+Math.floor(Math.random()*4294967295).toString(16),this.dom=b_(e,t,!0),this.dom.id=this.id,this.dom.setAttribute(`role`,`option`)}},C_=class e{constructor(e){this.view=e,this.items=[];let t=t=>{if(!(t.ctrlKey||t.altKey||t.metaKey)){if(t.keyCode==27)h_(this.view),this.view.focus();else if(t.keyCode==38||t.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(t.keyCode==40||t.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(t.keyCode==36)this.moveSelection(0);else if(t.keyCode==35)this.moveSelection(this.items.length-1);else if(t.keyCode==13)this.view.focus();else if(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:n}=this.items[this.selectedIndex],r=y_(n.actions);for(let i=0;i<r.length;i++)if(r[i].toUpperCase().charCodeAt(0)==t.keyCode){let t=i_(this.view.state.field(u_).diagnostics,n);t&&n.actions[i].apply(e,t.from,t.to)}}else return;t.preventDefault()}},n=e=>{for(let t=0;t<this.items.length;t++)this.items[t].dom.contains(e.target)&&this.moveSelection(t)};this.list=P(`ul`,{tabIndex:0,role:`listbox`,"aria-label":this.view.state.phrase(`Diagnostics`),onkeydown:t,onclick:n}),this.dom=P(`div`,{class:`cm-panel-lint`},this.list,P(`button`,{type:`button`,name:`close`,"aria-label":this.view.state.phrase(`close`),onclick:()=>h_(this.view)},`×`)),this.update()}get selectedIndex(){let e=this.view.state.field(u_).selected;if(!e)return-1;for(let t=0;t<this.items.length;t++)if(this.items[t].diagnostic==e.diagnostic)return t;return-1}update(){let{diagnostics:e,selected:t}=this.view.state.field(u_),n=0,r=!1,i=null,a=new Set;for(e.between(0,this.view.state.doc.length,(e,o,{spec:s})=>{for(let e of s.diagnostics){if(a.has(e))continue;a.add(e);let o=-1,s;for(let t=n;t<this.items.length;t++)if(this.items[t].diagnostic==e){o=t;break}o<0?(s=new S_(this.view,e),this.items.splice(n,0,s),r=!0):(s=this.items[o],o>n&&(this.items.splice(n,o-n),r=!0)),t&&s.diagnostic==t.diagnostic?s.dom.hasAttribute(`aria-selected`)||(s.dom.setAttribute(`aria-selected`,`true`),i=s):s.dom.hasAttribute(`aria-selected`)&&s.dom.removeAttribute(`aria-selected`),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new S_(this.view,{from:-1,to:-1,severity:`info`,message:this.view.state.phrase(`No diagnostics`)})),r=!0),i?(this.list.setAttribute(`aria-activedescendant`,i.id),this.view.requestMeasure({key:this,read:()=>({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{let n=t.height/this.list.offsetHeight;e.top<t.top?this.list.scrollTop-=(t.top-e.top)/n:e.bottom>t.bottom&&(this.list.scrollTop+=(e.bottom-t.bottom)/n)}})):this.selectedIndex<0&&this.list.removeAttribute(`aria-activedescendant`),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=i_(this.view.state.field(u_).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:l_.of(t)})}static open(t){return new e(t)}};function w_(e,t=`viewBox="0 0 40 40"`){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function T_(e){return w_(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,`width="6" height="3"`)}var E_=U.baseTheme({".cm-diagnostic":{padding:`3px 6px 3px 8px`,marginLeft:`-1px`,display:`block`,whiteSpace:`pre-wrap`},".cm-diagnostic-error":{borderLeft:`5px solid #d11`},".cm-diagnostic-warning":{borderLeft:`5px solid orange`},".cm-diagnostic-info":{borderLeft:`5px solid #999`},".cm-diagnostic-hint":{borderLeft:`5px solid #66d`},".cm-diagnosticAction":{font:`inherit`,border:`none`,padding:`2px 4px`,backgroundColor:`#444`,color:`white`,borderRadius:`3px`,marginLeft:`8px`,cursor:`pointer`},".cm-diagnosticSource":{fontSize:`70%`,opacity:.7},".cm-lintRange":{backgroundPosition:`left bottom`,backgroundRepeat:`repeat-x`,paddingBottom:`0.7px`},".cm-lintRange-error":{backgroundImage:T_(`#f11`)},".cm-lintRange-warning":{backgroundImage:T_(`orange`)},".cm-lintRange-info":{backgroundImage:T_(`#999`)},".cm-lintRange-hint":{backgroundImage:T_(`#66d`)},".cm-lintRange-active":{backgroundColor:`#ffdd9980`},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:`relative`,"&:after":{content:`""`,position:`absolute`,bottom:0,left:`-2px`,borderLeft:`3px solid transparent`,borderRight:`3px solid transparent`,borderBottom:`4px solid #d11`}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:`orange`}},".cm-lintPoint-info":{"&:after":{borderBottomColor:`#999`}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:`#66d`}},".cm-panel.cm-panel-lint":{position:`relative`,"& ul":{maxHeight:`100px`,overflowY:`auto`,"& [aria-selected]":{backgroundColor:`#ddd`,"& u":{textDecoration:`underline`}},"&:focus [aria-selected]":{background_fallback:`#bdf`,backgroundColor:`Highlight`,color_fallback:`white`,color:`HighlightText`},"& u":{textDecoration:`none`},padding:0,margin:0},"& [name=close]":{position:`absolute`,top:`0`,right:`2px`,background:`inherit`,border:`none`,font:`inherit`,padding:0,margin:0}},"&dark .cm-lintRange-active":{backgroundColor:`#86714a80`},"&dark .cm-panel.cm-panel-lint ul":{"& [aria-selected]":{backgroundColor:`#2e343e`}}});function D_(e){return e==`error`?4:e==`warning`?3:e==`info`?2:1}function O_(e){let t=`hint`,n=1;for(let r of e){let e=D_(r.severity);e>n&&(n=e,t=r.severity)}return t}var k_=ic(f_,{hideOn:a_}),A_=[u_,U.decorations.compute([u_],e=>{let{selected:t,panel:n}=e.field(u_);return!t||!n||t.from==t.to?L.none:L.set([d_.range(t.from,t.to)])}),k_,E_],j_=[Bc(),Wc(),xs(),gf(),ad(),ts(),ds(),M.allowMultipleSelections.of(!0),ju(),dd(md,{fallback:!0}),wd(),Ig(),$g(),Is(),zs(),Os(),Lm(),Lo.of([...Hg,...Cm,...Eh,...Ff,...Xu,...e_,...g_])],M_=class e{constructor(e,t,n,r,i,a,o,s,c,l=0,u){this.p=e,this.stack=t,this.state=n,this.reducePos=r,this.pos=i,this.score=a,this.buffer=o,this.bufferBase=s,this.curContext=c,this.lookAhead=l,this.parent=u}toString(){return`[${this.stack.filter((e,t)=>t%3==0).concat(this.state)}]@${this.pos}${this.score?`!`+this.score:``}`}static start(t,n,r=0){let i=t.parser.context;return new e(t,[],n,r,r,0,[],0,i?new N_(i,i.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){let t=e>>19,n=e&65535,{parser:r}=this.p,i=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),a=r.dynamicPrecedence(n);if(a&&(this.score+=a),t==0){n<r.minRepeatTerm&&this.reducePos<this.pos&&(this.reducePos=this.pos),this.pushState(r.getGoto(this.state,n,!0),this.reducePos),n<r.minRepeatTerm&&this.storeNode(n,this.reducePos,this.reducePos,i?8:4,!0),this.reduceContext(n,this.reducePos);return}let o=this.stack.length-(t-1)*3-(e&262144?6:0),s=o?this.stack[o-2]:this.p.ranges[0].from;n<r.minRepeatTerm&&s==this.reducePos&&this.reducePos<this.pos&&(this.reducePos=this.pos);let c=this.reducePos-s;c>=2e3&&!this.p.parser.nodeSet.types[n]?.isAnonymous&&(s==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=c):this.p.lastBigReductionSize<c&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=s,this.p.lastBigReductionSize=c));let l=o?this.stack[o-1]:0,u=this.bufferBase+this.buffer.length-l;if(n<r.minRepeatTerm||e&131072){let e=r.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(n,s,e,u+4,!0)}if(e&262144)this.state=this.stack[o];else{let e=this.stack[o-3];this.state=r.getGoto(e,n,!0)}for(;this.stack.length>o;)this.stack.pop();this.reduceContext(n,s)}storeNode(e,t,n,r=4,i=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let e=this.buffer.length;if(e>0&&this.buffer[e-4]==0&&this.buffer[e-1]>-1){if(t==n)return;if(this.buffer[e-2]>=t){this.buffer[e-2]=n;return}}}if(!i||this.pos==n)this.buffer.push(e,t,n,r);else{let i=this.buffer.length;if(i>0&&(this.buffer[i-4]!=0||this.buffer[i-1]<0)){let e=!1;for(let t=i;t>0&&this.buffer[t-2]>n;t-=4)if(this.buffer[t-1]>=0){e=!0;break}if(e)for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4)}this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}}shift(e,t,n,r){if(e&131072)this.pushState(e&65535,this.pos);else if(e&262144)this.pos=r,this.shiftContext(t,n),t<=this.p.parser.maxNode&&this.buffer.push(t,n,r,4);else{let i=e,{parser:a}=this.p;this.pos=r;let o=a.stateFlag(i,1);!o&&(r>n||t<=a.maxNode)&&(this.reducePos=r),this.pushState(i,o?n:Math.min(n,this.reducePos)),this.shiftContext(t,n),t<=a.maxNode&&this.buffer.push(t,n,r,4)}}apply(e,t,n,r){e&65536?this.reduce(e):this.shift(e,t,n,r)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let t=this,n=t.buffer.length;for(n&&t.buffer[n-4]==0&&(n-=4);n>0&&t.buffer[n-2]>t.reducePos;)n-=4;let r=t.buffer.slice(n),i=t.bufferBase+n;for(;t&&i==t.bufferBase;)t=t.parent;return new e(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,r,i,this.curContext,this.lookAhead,t)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new P_(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(n==0)return!1;if(!(n&65536))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r=0,i;r<t.length;r+=2)(i=t[r+1])!=this.state&&this.p.parser.hasAction(i,e)&&n.push(t[r],i);if(this.stack.length<120)for(let e=0;n.length<8&&e<t.length;e+=2){let r=t[e+1];n.some((e,t)=>t&1&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e<t.length&&n.length<4;e+=2){let r=t[e+1];if(r==this.state)continue;let i=this.split();i.pushState(r,this.pos),i.storeNode(0,i.pos,i.pos,4,!0),i.shiftContext(t[e],this.pos),i.reducePos=this.pos,i.score-=200,n.push(i)}return n}forceReduce(){let{parser:e}=this.p,t=e.stateSlot(this.state,5);if(!(t&65536))return!1;if(!e.validAction(this.state,t)){let n=t>>19,r=t&65535,i=this.stack.length-n*3;if(i<0||e.getGoto(this.stack[i],r,!1)<0){let e=this.findForcedReduction();if(e==null)return!1;t=e}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(t),!0}findForcedReduction(){let{parser:e}=this.p,t=[],n=(r,i)=>{if(!t.includes(r))return t.push(r),e.allActions(r,t=>{if(!(t&393216)){if(t&65536){let n=(t>>19)-i;if(n>1){let r=t&65535,i=this.stack.length-n*3;if(i>=0&&e.getGoto(this.stack[i],r,!1)>=0)return n<<19|65536|r}}else{let e=n(t,i+1);if(e!=null)return e}}})};return n(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;t<this.stack.length;t+=3)if(this.stack[t]!=e.stack[t])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(t)))}reduceContext(e,t){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(t)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let t=new N_(this.curContext.tracker,e);t.hash!=this.curContext.hash&&this.emitContext(),this.curContext=t}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}},N_=class{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}},P_=class{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=e&65535,n=e>>19;n==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(n-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}},F_=class e{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(t,n=t.bufferBase+t.buffer.length){return new e(t,n,n-t.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new e(this.stack,this.pos,this.index)}};function I_(e,t=Uint16Array){if(typeof e!=`string`)return e;let n=null;for(let r=0,i=0;r<e.length;){let a=0;for(;;){let t=e.charCodeAt(r++),n=!1;if(t==126){a=65535;break}t>=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),a+=i,n)break;a*=46}n?n[i++]=a:n=new t(a)}return n}var L_=class{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}},R_=new L_,z_=class{constructor(e,t){this.input=e,this.ranges=t,this.chunk=``,this.chunkOff=0,this.chunk2=``,this.chunk2Pos=0,this.next=-1,this.token=R_,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;i<n.from;){if(!r)return null;let e=this.ranges[--r];i-=n.from-e.to,n=e}for(;t<0?i>n.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let t of this.ranges)if(t.to>e)return Math.max(e,t.from);return this.end}peek(e){let t=this.chunkOff+e,n,r;if(t>=0&&t<this.chunk.length)n=this.pos+e,r=this.chunk.charCodeAt(t);else{let t=this.resolveOffset(e,1);if(t==null)return-1;if(n=t,n>=this.chunk2Pos&&n<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(n-this.chunk2Pos);else{let e=this.rangeIndex,t=this.range;for(;t.to<=n;)t=this.ranges[++e];this.chunk2=this.input.chunk(this.chunk2Pos=n),n+this.chunk2.length>t.to&&(this.chunk2=this.chunk2.slice(0,t.to-n)),r=this.chunk2.charCodeAt(0)}}return n>=this.token.lookAhead&&(this.token.lookAhead=n+1),r}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(n==null||n<this.token.start)throw RangeError(`Token end out of bounds`);this.token.value=e,this.token.end=n}acceptTokenTo(e,t){this.token.value=e,this.token.end=t}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:t}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=t,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),t=this.pos+e.length;this.chunk=t>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.next=this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?-1:this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk=``,this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=R_,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk=``,this.chunkOff=0),this.readNext()}return this}read(e,t){if(e>=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n=``;for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}},B_=class{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;U_(this.data,e,t,this.id,n.data,n.tokenPrecTable)}};B_.prototype.contextual=B_.prototype.fallback=B_.prototype.extend=!1;var V_=class{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data=typeof e==`string`?I_(e):e}token(e,t){let n=e.pos,r=0;for(;;){let n=e.next<0,i=e.resolveOffset(1,1);if(U_(this.data,e,t,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(n||r++,i==null)break;e.reset(i,e.token)}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}};V_.prototype.contextual=B_.prototype.fallback=B_.prototype.extend=!1;var H_=class{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}};function U_(e,t,n,r,i,a){let o=0,s=1<<r,{dialect:c}=n.p.parser;scan:for(;(s&e[o])!=0;){let n=e[o+1];for(let r=o+3;r<n;r+=2)if((e[r+1]&s)>0){let n=e[r];if(c.allows(n)&&(t.token.value==-1||t.token.value==n||G_(n,t.token.value,i,a))){t.acceptToken(n);break}}let r=t.next,l=0,u=e[o+2];if(t.next<0&&u>l&&e[n+u*3-3]==65535){o=e[n+u*3-1];continue scan}for(;l<u;){let i=l+u>>1,a=n+i+(i<<1),s=e[a],c=e[a+1]||65536;if(r<s)u=i;else if(r>=c)l=i+1;else{o=e[a+2],t.advance();continue scan}}break}}function W_(e,t,n){for(let r=t,i;(i=e[r])!=65535;r++)if(i==n)return r-t;return-1}function G_(e,t,n,r){let i=W_(n,r,t);return i<0||W_(n,r,e)<i}var K_=typeof process<`u`&&/\bparse\b/.test({}.LOG),q_=null;function J_(e,t,n){let r=e.cursor(G.IncludeAnonymous);for(r.moveTo(t);;)if(!(n<0?r.childBefore(t):r.childAfter(t)))for(;;){if((n<0?r.to<t:r.from>t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}var Y_=class{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?J_(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?J_(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let t=this.trees.length-1;if(t<0)return this.nextFragment(),null;let n=this.trees[t],r=this.index[t];if(r==n.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let i=n.children[r],a=this.start[t]+n.positions[r];if(a>e)return this.nextStart=a,null;if(i instanceof K){if(a==e){if(a<this.safeFrom)return null;let e=a+i.length;if(e<=this.safeTo){let t=i.prop(W.lookAhead);if(!t||e+t<this.fragment.to)return i}}this.index[t]++,a+i.length>=Math.max(this.safeFrom,e)&&(this.trees.push(i),this.start.push(a),this.index.push(0))}else this.index[t]++,this.nextStart=a+i.length}}},X_=class{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new L_)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,a=r.stateSlot(e.state,3),o=e.curContext?e.curContext.hash:0,s=0;for(let r=0;r<i.length;r++){if(!(1<<r&a))continue;let c=i[r],l=this.tokens[r];if(!(n&&!c.fallback)&&((c.contextual||l.start!=e.pos||l.mask!=a||l.context!=o)&&(this.updateCachedToken(l,c,e),l.mask=a,l.context=o),l.lookAhead>l.end+25&&(s=Math.max(l.lookAhead,s)),l.value!=0)){let r=t;if(l.extended>-1&&(t=this.addActions(e,l.extended,l.end,t)),t=this.addActions(e,l.value,l.end,t),!c.extend&&(n=l,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return s&&e.setLookAhead(s),!n&&e.pos==this.stream.end&&(n=new L_,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new L_,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r<t.specialized.length;r++)if(t.specialized[r]==e.value){let i=t.specializers[r](this.stream.read(e.start,e.end),n);if(i>=0&&n.p.parser.dialect.allows(i>>1)){i&1?e.extended=i>>1:e.value=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t<r;t+=3)if(this.actions[t]==e)return r;return this.actions[r++]=e,this.actions[r++]=t,this.actions[r++]=n,r}addActions(e,t,n,r){let{state:i}=e,{parser:a}=e.p,{data:o}=a;for(let e=0;e<2;e++)for(let s=a.stateSlot(i,e?2:1);;s+=3){if(o[s]==65535){if(o[s+1]==1)s=rv(o,s+2);else{r==0&&o[s+1]==2&&(r=this.putAction(rv(o,s+2),t,n,r));break}}o[s]==t&&(r=this.putAction(rv(o,s+1),t,n,r))}return r}},Z_=class{constructor(e,t,n,r){this.parser=e,this.input=t,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new z_(t,r),this.tokens=new X_(e,this.stream),this.topTerm=e.top[1];let{from:i}=r[0];this.stacks=[M_.start(this,e.top[0],i)],this.fragments=n.length&&this.stream.end-i>e.bufferLength*4?new Y_(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,t=this.minStackPos,n=this.stacks=[],r,i;if(this.bigReductionCount>300&&e.length==1){let[t]=e;for(;t.forceReduce()&&t.stack.length&&t.stack[t.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let a=0;a<e.length;a++){let o=e[a];for(;;){if(this.tokens.mainToken=null,o.pos>t)n.push(o);else if(this.advanceStack(o,n,e))continue;else{r||(r=[],i=[]),r.push(o);let e=this.tokens.getMainToken(o);i.push(e.value,e.end)}break}}if(!n.length){let e=r&&iv(r);if(e)return K_&&console.log(`Finish with `+this.stackID(e)),this.stackToTree(e);if(this.parser.strict)throw K_&&r&&console.log(`Stuck with token `+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):`none`)),SyntaxError(`No parse at `+t);this.recovering||=5}if(this.recovering&&r){let e=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,i,n);if(e)return K_&&console.log(`Force-finish `+this.stackID(e)),this.stackToTree(e.forceAll())}if(this.recovering){let e=this.recovering==1?1:this.recovering*3;if(n.length>e)for(n.sort((e,t)=>t.score-e.score);n.length>e;)n.pop();n.some(e=>e.reducePos>t)&&this.recovering--}else if(n.length>1){outer:for(let e=0;e<n.length-1;e++){let t=n[e];for(let r=e+1;r<n.length;r++){let i=n[r];if(t.sameState(i)||t.buffer.length>500&&i.buffer.length>500){if((t.score-i.score||t.buffer.length-i.buffer.length)>0)n.splice(r--,1);else{n.splice(e--,1);continue outer}}}}n.length>12&&(n.sort((e,t)=>t.score-e.score),n.splice(12,n.length-12))}this.minStackPos=n[0].pos;for(let e=1;e<n.length;e++)n[e].pos<this.minStackPos&&(this.minStackPos=n[e].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw RangeError(`Can't move stoppedAt forward`);this.stoppedAt=e}advanceStack(e,t,n){let r=e.pos,{parser:i}=this,a=K_?this.stackID(e)+` -> `:``;if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let o=this.fragments.nodeAt(r);o;){let r=this.parser.nodeSet.types[o.type.id]==o.type?i.getGoto(e.state,o.type.id):-1;if(r>-1&&o.length&&(!t||(o.prop(W.contextHash)||0)==n))return e.useNode(o,r),K_&&console.log(a+this.stackID(e)+` (via reuse of ${i.getName(o.type.id)})`),!0;if(!(o instanceof K)||o.children.length==0||o.positions[0]>0)break;let s=o.children[0];if(s instanceof K&&o.positions[0]==0)o=s;else break}}let o=i.stateSlot(e.state,4);if(o>0)return e.reduce(o),K_&&console.log(a+this.stackID(e)+` (via always-reduce ${i.getName(o&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let s=this.tokens.getActions(e);for(let o=0;o<s.length;){let c=s[o++],l=s[o++],u=s[o++],d=o==s.length||!n,f=d?e:e.split(),p=this.tokens.mainToken;if(f.apply(c,l,p?p.start:f.pos,u),K_&&console.log(a+this.stackID(f)+` (via ${c&65536?`reduce of ${i.getName(c&65535)}`:`shift`} for ${i.getName(l)} @ ${r}${f==e?``:`, split`})`),d)return!0;f.pos>r?t.push(f):n.push(f)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return Q_(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let a=0;a<e.length;a++){let o=e[a],s=t[a<<1],c=t[(a<<1)+1],l=K_?this.stackID(o)+` -> `:``;if(o.deadEnd&&(i||(i=!0,o.restart(),K_&&console.log(l+this.stackID(o)+` (restarted)`),this.advanceFully(o,n))))continue;let u=o.split(),d=l;for(let e=0;e<10&&u.forceReduce()&&(K_&&console.log(d+this.stackID(u)+` (via force-reduce)`),!this.advanceFully(u,n));e++)K_&&(d=this.stackID(u)+` -> `);for(let e of o.recoverByInsert(s))K_&&console.log(l+this.stackID(e)+` (via recover-insert)`),this.advanceFully(e,n);this.stream.end>o.pos?(c==o.pos&&(c++,s=0),o.recoverByDelete(s,c),K_&&console.log(l+this.stackID(o)+` (via recover-delete ${this.parser.getName(s)})`),Q_(o,n)):(!r||r.score<u.score)&&(r=u)}return r}stackToTree(e){return e.close(),K.build({buffer:F_.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let t=(q_||=new WeakMap).get(e);return t||q_.set(e,t=String.fromCodePoint(this.nextStackID++)),t+e}};function Q_(e,t){for(let n=0;n<t.length;n++){let r=t[n];if(r.pos==e.pos&&r.sameState(e)){t[n].score<e.score&&(t[n]=e);return}}t.push(e)}var $_=class{constructor(e,t,n){this.source=e,this.flags=t,this.disabled=n}allows(e){return!this.disabled||this.disabled[e]==0}},ev=e=>e,tv=class{constructor(e){this.start=e.start,this.shift=e.shift||ev,this.reduce=e.reduce||ev,this.reuse=e.reuse||ev,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}},nv=class e extends bl{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(` `);this.minRepeatTerm=t.length;for(let n=0;n<e.repeatNodeCount;n++)t.push(``);let n=Object.keys(e.topRules).map(t=>e.topRules[t][1]),r=[];for(let e=0;e<t.length;e++)r.push([]);function i(e,t,n){r[e].push([t,t.deserialize(String(n))])}if(e.nodeProps)for(let t of e.nodeProps){let e=t[0];typeof e==`string`&&(e=W[e]);for(let n=1;n<t.length;){let r=t[n++];if(r>=0)i(r,e,t[n++]);else{let a=t[n+-r];for(let o=-r;o>0;o--)i(t[n++],e,a);n++}}}this.nodeSet=new Zc(t.map((t,i)=>Xc.define({name:i>=this.minRepeatTerm?void 0:t,id:i,props:r[i],top:n.indexOf(i)>-1,error:i==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(i)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=Gc;let a=I_(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e<this.specializerSpecs.length;e++)this.specialized[e]=this.specializerSpecs[e].term;this.specializers=this.specializerSpecs.map(av),this.states=I_(e.states,Uint32Array),this.data=I_(e.stateData),this.goto=I_(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(e=>typeof e==`number`?new B_(a,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new Z_(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],a=t&1,o=r[i++];if(a&&n)return o;for(let n=i+(t>>1);i<n;i++)if(r[i]==e)return o;if(a)return-1}}hasAction(e,t){let n=this.data;for(let r=0;r<2;r++)for(let i=this.stateSlot(e,r?2:1),a;;i+=3){if((a=n[i])==65535){if(n[i+1]==1)a=n[i=rv(n,i+2)];else if(n[i+1]==2)return rv(n,i+2);else break}if(a==t||a==0)return rv(n,i+1)}return 0}stateSlot(e,t){return this.states[e*6+t]}stateFlag(e,t){return(this.stateSlot(e,0)&t)>0}validAction(e,t){return!!this.allActions(e,e=>e==t||null)}allActions(e,t){let n=this.stateSlot(e,4),r=n?t(n):void 0;for(let n=this.stateSlot(e,1);r==null;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=rv(this.data,n+2);else break}r=t(rv(this.data,n+1))}return r}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(this.data[n]==65535){if(this.data[n+1]==1)n=rv(this.data,n+2);else break}if(!(this.data[n+2]&1)){let e=this.data[n+1];t.some((t,n)=>n&1&&t==e)||t.push(this.data[n],e)}}return t}configure(t){let n=Object.assign(Object.create(e.prototype),this);if(t.props&&(n.nodeSet=this.nodeSet.extend(...t.props)),t.top){let e=this.topRules[t.top];if(!e)throw RangeError(`Invalid top rule name ${t.top}`);n.top=e}return t.tokenizers&&(n.tokenizers=this.tokenizers.map(e=>{let n=t.tokenizers.find(t=>t.from==e);return n?n.to:e})),t.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((e,r)=>{let i=t.specializers.find(t=>t.from==e.external);if(!i)return e;let a=Object.assign(Object.assign({},e),{external:i.to});return n.specializers[r]=av(a),a})),t.contextTracker&&(n.context=t.contextTracker),t.dialect&&(n.dialect=this.parseDialect(t.dialect)),t.strict!=null&&(n.strict=t.strict),t.wrap&&(n.wrappers=n.wrappers.concat(t.wrap)),t.bufferLength!=null&&(n.bufferLength=t.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return t==null?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(` `)){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;e<t.length;e++)if(!n[e])for(let n=this.dialects[t[e]],i;(i=this.data[n++])!=65535;)(r||=new Uint8Array(this.maxTerm+1))[i]=1;return new $_(e,n,r)}static deserialize(t){return new e(t)}};function rv(e,t){return e[t]|e[t+1]<<16}function iv(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||e!=null&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.score<n.score)&&(t=n)}return t}function av(e){if(e.external){let t=+!!e.extend;return(n,r)=>e.external(n,r)<<1|t}return e.get}var ov=Ol({String:J.string,Number:J.number,"True False":J.bool,PropertyName:J.propertyName,Null:J.null,", :":J.separator,"[ ]":J.squareBracket,"{ }":J.brace}),sv=nv.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:`#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O`,goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:`⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array`,maxTerm:25,nodeProps:[[`isolate`,-2,6,11,``],[`openedBy`,7,`{`,14,`[`],[`closedBy`,8,`}`,15,`]`]],propSources:[ov],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),cv=tu.define({name:`json`,parser:sv.configure({props:[vu.add({Object:ku({except:/^\s*\}/}),Array:ku({except:/^\s*\]/})}),Nu.add({"Object Array":Pu})]}),languageData:{closeBrackets:{brackets:[`[`,`{`,`"`]},indentOnInput:/^\s*[\}\]]$/}});function lv(){return new du(cv)}var uv=36,dv=1,fv=2,pv=3,mv=4,hv=5,gv=6,_v=7,vv=8,yv=9,bv=10,xv=11,Sv=12,Cv=13,wv=14,Tv=15,Ev=16,Dv=17,Ov=18,kv=19,Av=20,jv=21,Mv=22,Nv=23,Pv=24;function Fv(e){return e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57}function Iv(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function Lv(e,t,n){for(let r=!1;;){if(e.next<0)return;if(e.next==t&&!r){e.advance();return}r=n&&!r&&e.next==92,e.advance()}}function Rv(e,t){scan:for(;;){if(e.next<0)return;if(e.next==36){e.advance();for(let n=0;n<t.length;n++){if(e.next!=t.charCodeAt(n))continue scan;e.advance()}if(e.next==36){e.advance();return}}else e.advance()}}function zv(e,t){let n=`[{<(`.indexOf(String.fromCharCode(t)),r=n<0?t:`]}>)`.charCodeAt(n);for(;;){if(e.next<0)return;if(e.next==r&&e.peek(1)==39){e.advance(2);return}e.advance()}}function Bv(e,t){for(;!(e.next!=95&&!Fv(e.next));)t!=null&&(t+=String.fromCharCode(e.next)),e.advance();return t}function Vv(e){if(e.next==39||e.next==34||e.next==96){let t=e.next;e.advance(),Lv(e,t,!1)}else Bv(e)}function Hv(e,t){for(;e.next==48||e.next==49;)e.advance();t&&e.next==t&&e.advance()}function Uv(e,t){for(;;){if(e.next==46){if(t)break;t=!0}else if(e.next<48||e.next>57)break;e.advance()}if(e.next==69||e.next==101)for(e.advance(),(e.next==43||e.next==45)&&e.advance();e.next>=48&&e.next<=57;)e.advance()}function Wv(e){for(;!(e.next<0||e.next==10);)e.advance()}function Gv(e,t){for(let n=0;n<t.length;n++)if(t.charCodeAt(n)==e)return!0;return!1}var Kv=` \r15-`;function qv(e,t,n){let r=Object.create(null);r.true=r.false=hv,r.null=r.unknown=gv;for(let t of e.split(` `))t&&(r[t]=Av);for(let e of t.split(` `))e&&(r[e]=jv);for(let e of(n||``).split(` `))e&&(r[e]=Pv);return r}var Jv=`array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying `,Yv=`absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone `,Xv={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:`*+-%<>!=&|~^/`,specialVar:`?`,identifierQuotes:`"`,caseInsensitiveIdentifiers:!1,words:qv(Yv,Jv)};function Zv(e,t,n,r){let i={};for(let t in Xv)i[t]=(e.hasOwnProperty(t)?e:Xv)[t];return t&&(i.words=qv(t,n||``,r)),i}function Qv(e){return new H_(t=>{let{next:n}=t;if(t.advance(),Gv(n,Kv)){for(;Gv(t.next,Kv);)t.advance();t.acceptToken(uv)}else if(n==36&&e.doubleDollarQuotedStrings){let e=Bv(t,``);t.next==36&&(t.advance(),Rv(t,e),t.acceptToken(pv))}else if(n==39||n==34&&e.doubleQuotedStrings)Lv(t,n,e.backslashEscapes),t.acceptToken(pv);else if(n==35&&e.hashComments||n==47&&t.next==47&&e.slashComments)Wv(t),t.acceptToken(dv);else if(n==45&&t.next==45&&(!e.spaceAfterDashes||t.peek(1)==32))Wv(t),t.acceptToken(dv);else if(n==47&&t.next==42){t.advance();for(let e=1;;){let n=t.next;if(t.next<0)break;if(t.advance(),n==42&&t.next==47){if(e--,t.advance(),!e)break}else n==47&&t.next==42&&(e++,t.advance())}t.acceptToken(fv)}else if((n==101||n==69)&&t.next==39)t.advance(),Lv(t,39,!0),t.acceptToken(pv);else if((n==110||n==78)&&t.next==39&&e.charSetCasts)t.advance(),Lv(t,39,e.backslashEscapes),t.acceptToken(pv);else if(n==95&&e.charSetCasts)for(let n=0;;n++){if(t.next==39&&n>1){t.advance(),Lv(t,39,e.backslashEscapes),t.acceptToken(pv);break}if(!Fv(t.next))break;t.advance()}else if(e.plsqlQuotingMechanism&&(n==113||n==81)&&t.next==39&&t.peek(1)>0&&!Gv(t.peek(1),Kv)){let e=t.peek(1);t.advance(2),zv(t,e),t.acceptToken(pv)}else if(Gv(n,e.identifierQuotes))Lv(t,n==91?93:n,!1),t.acceptToken(kv);else if(n==40)t.acceptToken(_v);else if(n==41)t.acceptToken(vv);else if(n==123)t.acceptToken(yv);else if(n==125)t.acceptToken(bv);else if(n==91)t.acceptToken(xv);else if(n==93)t.acceptToken(Sv);else if(n==59)t.acceptToken(Cv);else if(e.unquotedBitLiterals&&n==48&&t.next==98)t.advance(),Hv(t),t.acceptToken(Mv);else if((n==98||n==66)&&(t.next==39||t.next==34)){let n=t.next;t.advance(),e.treatBitsAsBytes?(Lv(t,n,e.backslashEscapes),t.acceptToken(Nv)):(Hv(t,n),t.acceptToken(Mv))}else if(n==48&&(t.next==120||t.next==88)||(n==120||n==88)&&t.next==39){let e=t.next==39;for(t.advance();Iv(t.next);)t.advance();e&&t.next==39&&t.advance(),t.acceptToken(mv)}else if(n==46&&t.next>=48&&t.next<=57)Uv(t,!0),t.acceptToken(mv);else if(n==46)t.acceptToken(wv);else if(n>=48&&n<=57)Uv(t,!1),t.acceptToken(mv);else if(Gv(n,e.operatorChars)){for(;Gv(t.next,e.operatorChars);)t.advance();t.acceptToken(Tv)}else if(Gv(n,e.specialVar))t.next==n&&t.advance(),Vv(t),t.acceptToken(Dv);else if(n==58||n==44)t.acceptToken(Ev);else if(Fv(n)){let r=Bv(t,String.fromCharCode(n));t.acceptToken(t.next==46||t.peek(-r.length-1)==46?Ov:e.words[r.toLowerCase()]??Ov)}})}var $v=Qv(Xv),ey=nv.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:`⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement`,maxTerm:38,nodeProps:[[`isolate`,-4,1,2,3,19,``]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:`RORO`,tokenizers:[0,$v],topRules:{Script:[0,25]},tokenPrec:0});function ty(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function ny(e,t){let n=e.sliceString(t.from,t.to),r=/^([`'"\[])(.*)([`'"\]])$/.exec(n);return r?r[2]:n}function ry(e){return e&&(e.name==`Identifier`||e.name==`QuotedIdentifier`)}function iy(e,t){if(t.name==`CompositeIdentifier`){let n=[];for(let r=t.firstChild;r;r=r.nextSibling)ry(r)&&n.push(ny(e,r));return n}return[ny(e,t)]}function ay(e,t){for(let n=[];;){if(!t||t.name!=`.`)return n;let r=ty(t);if(!ry(r))return n;n.unshift(ny(e,r)),t=ty(r)}}function oy(e,t){let n=Y(e).resolveInner(t,-1),r=cy(e.doc,n);return n.name==`Identifier`||n.name==`QuotedIdentifier`||n.name==`Keyword`?{from:n.from,quoted:n.name==`QuotedIdentifier`?e.doc.sliceString(n.from,n.from+1):null,parents:ay(e.doc,ty(n)),aliases:r}:n.name==`.`?{from:t,quoted:null,parents:ay(e.doc,n),aliases:r}:{from:t,quoted:null,parents:[],empty:!0,aliases:r}}var sy=new Set(`where group having order union intersect except all distinct limit offset fetch for`.split(` `));function cy(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;e.name==`Statement`&&(n=e)}let r=null;for(let t=n.firstChild,i=!1,a=null;t;t=t.nextSibling){let n=t.name==`Keyword`?e.sliceString(t.from,t.to).toLowerCase():null,o=null;if(!i)i=n==`from`;else if(n==`as`&&a&&ry(t.nextSibling))o=ny(e,t.nextSibling);else if(n&&sy.has(n))break;else a&&ry(t)&&(o=ny(e,t));o&&(r||=Object.create(null),r[o]=iy(e,a)),a=/Identifier$/.test(t.name)?t:null}return r}function ly(e,t,n){return n.map(n=>({...n,label:n.label[0]==e?n.label:e+n.label+t,apply:void 0}))}var uy=/^\w*$/,dy=/^[`'"\[]?\w*[`'"\]]?$/;function fy(e){return e.self&&typeof e.self.label==`string`}var py=class e{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(t){let n=this.children||=Object.create(null);return n[t]||(t&&!this.list.some(e=>e.label==t)&&this.list.push(my(t,`type`,this.idQuote,this.idCaseInsensitive)),n[t]=new e(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex(t=>t.label==e.label);t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion(typeof t==`string`?my(t,`property`,this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):fy(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],r=null,i=t.replace(/\\?\./g,e=>e==`.`?`\0`:e).split(`\0`),a=this;fy(n)&&(r=n.self,n=n.children);for(let e=0;e<i.length;e++)r&&e==i.length-1&&a.addCompletion(r),a=a.child(i[e].replace(/\\\./g,`.`));a.addNamespace(n)}}};function my(e,t,n,r){return RegExp(`^[a-z_][a-z_\\d]*$`,r?`i`:``).test(e)?{label:e,type:t}:{label:e,type:t,apply:n+e+hy(n)}}function hy(e){return e===`[`?`]`:e}function gy(e,t,n,r,i,a){let o=new py(a?.spec.identifierQuotes?.[0]||`"`,!!a?.spec.caseInsensitiveIdentifiers),s=i?o.child(i):null;return o.addNamespace(e),t&&(s||o).addCompletions(t),n&&o.addCompletions(n),s&&o.addCompletions(s.list),r&&o.addCompletions((s||o).child(r).list),e=>{let{parents:t,from:n,quoted:i,empty:a,aliases:c}=oy(e.state,e.pos);if(a&&!e.explicit)return null;c&&t.length==1&&(t=c[t[0]]||t);let l=o;for(let e of t){for(;!l.children||!l.children[e];)if(l==o&&s)l=s;else if(l==s&&r)l=l.child(r);else return null;let t=l.maybeChild(e);if(!t)return null;l=t}let u=l.list;if(l==o&&c&&(u=u.concat(Object.keys(c).map(e=>({label:e,type:`constant`})))),i){let t=i[0],r=hy(t);return{from:n,to:e.state.sliceDoc(e.pos,e.pos+1)==r?e.pos+1:void 0,options:ly(t,r,u),validFor:dy}}return{from:n,options:u,validFor:uy}}}function _y(e){return e==jv?`type`:e==Av?`keyword`:`variable`}function vy(e,t,n){return Rh([`QuotedIdentifier`,`String`,`LineComment`,`BlockComment`,`.`],Lh(Object.keys(e).map(r=>n(t?r.toUpperCase():r,_y(e[r])))))}var yy=ey.configure({props:[vu.add({Statement:ku()}),Nu.add({Statement(e,t){return{from:Math.min(e.from+100,t.doc.lineAt(e.from).to),to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),Ol({Keyword:J.keyword,Type:J.typeName,Builtin:J.standard(J.name),Bits:J.number,Bytes:J.string,Bool:J.bool,Null:J.null,Number:J.number,String:J.string,Identifier:J.name,QuotedIdentifier:J.special(J.string),SpecialVar:J.special(J.name),LineComment:J.lineComment,BlockComment:J.blockComment,Operator:J.operator,"Semi Punctuation":J.punctuation,"( )":J.paren,"{ }":J.brace,"[ ]":J.squareBracket})]}),by=class e{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}configureLanguage(t,n){return new e(this.dialect,this.language.configure(t,n),this.spec)}static define(t){let n=Zv(t,t.keywords,t.types,t.builtin),r=tu.define({name:`sql`,parser:yy.configure({tokenizers:[{from:$v,to:Qv(n)}]}),languageData:{commentTokens:{line:`--`,block:{open:`/*`,close:`*/`}},closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]}}});return new e(n,r,t)}};function xy(e,t){return{label:e,type:t,boost:-1}}function Sy(e,t=!1,n){return vy(e.dialect.words,t,n||xy)}function Cy(e){return e.schema?gy(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema,e.dialect||Ey):()=>null}function wy(e){return e.schema?(e.dialect||Ey).language.data.of({autocomplete:Cy(e)}):[]}function Ty(e={}){let t=e.dialect||Ey;return new du(t.language,[wy(e),t.language.data.of({autocomplete:Sy(t,e.upperCaseKeywords,e.keywordCompletion)})])}var Ey=by.define({});Yv+``,Jv+``;var Dy=`accessible algorithm analyze asensitive authors auto_increment autocommit avg avg_row_length binlog btree cache catalog_name chain change changed checkpoint checksum class_origin client_statistics coalesce code collations columns comment committed completion concurrent consistent contains contributors convert database databases day_hour day_microsecond day_minute day_second delay_key_write delayed delimiter des_key_file dev_pop dev_samp deviance directory disable discard distinctrow div dual dumpfile enable enclosed ends engine engines enum errors escaped even event events every explain extended fast field fields flush force found_rows fulltext grants handler hash high_priority hosts hour_microsecond hour_minute hour_second ignore ignore_server_ids import index index_statistics infile innodb insensitive insert_method install invoker iterate keys kill linear lines list load lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modify mutex mysql_errno no_write_to_binlog offline offset one online optimize optionally outfile pack_keys parser partition partitions password phase plugin plugins prev processlist profile profiles purge query quick range read_write rebuild recover regexp relaylog remove rename reorganize repair repeatable replace require resume rlike row_format rtree schedule schema_name schemas second_microsecond security sensitive separator serializable server share show slave slow snapshot soname spatial sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result ssl starting starts std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace terminated triggers truncate uncommitted uninstall unlock upgrade use use_frm user_resources user_statistics utc_date utc_time utc_timestamp variables views warnings xa xor year_month zerofill`;Jv+``,Yv+``+Dy,Yv+``+Dy,Yv+``,Jv+``,Yv+``,Jv+``,Jv+``,Yv+``,Jv+``;var Oy=1,ky=2,Ay=3,jy=4,My=5,Ny=36,Py=37,Fy=38,Iy=11,Ly=13;function Ry(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function zy(e){return e==9||e==10||e==13||e==32}var By=null,Vy=null,Hy=0;function Uy(e,t){let n=e.pos+t;if(Vy==e&&Hy==n)return By;for(;zy(e.peek(t));)t++;let r=``;for(;;){let n=e.peek(t);if(!Ry(n))break;r+=String.fromCharCode(n),t++}return Vy=e,Hy=n,By=r||null}function Wy(e,t){this.name=e,this.parent=t}var Gy=new tv({start:null,shift(e,t,n,r){return t==Oy?new Wy(Uy(r,1)||``,e):e},reduce(e,t){return t==Iy&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Oy||i==Ly?new Wy(Uy(r,1)||``,e):e},strict:!1}),Ky=new H_((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let n=Uy(e,0);if(!n)return e.acceptToken(My);if(t.context&&n==t.context.name)return e.acceptToken(ky);for(let r=t.context;r;r=r.parent)if(r.name==n)return e.acceptToken(Ay,-2);e.acceptToken(jy)}else if(e.next!=33&&e.next!=63)return e.acceptToken(Oy)}},{contextual:!0});function qy(e,t){return new H_(n=>{let r=0,i=t.charCodeAt(0);scan:for(;!(n.next<0);n.advance(),r++)if(n.next==i){for(let e=1;e<t.length;e++)if(n.peek(e)!=t.charCodeAt(e))continue scan;break}r&&n.acceptToken(e)})}var Jy=qy(Ny,`-->`),Yy=qy(Py,`?>`),Xy=qy(Fy,`]]>`),Zy=Ol({Text:J.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":J.angleBracket,TagName:J.tagName,"MismatchedCloseTag/TagName":[J.tagName,J.invalid],AttributeName:J.attributeName,AttributeValue:J.attributeValue,Is:J.definitionOperator,"EntityReference CharacterReference":J.character,Comment:J.blockComment,ProcessingInst:J.processingInstruction,DoctypeDecl:J.documentMeta,Cdata:J.special(J.string)}),Qy=nv.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",stateData:")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",goto:"%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:`⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl`,maxTerm:50,context:Gy,nodeProps:[[`closedBy`,1,`SelfCloseEndTag EndTag`,13,`CloseTag MissingCloseTag`],[`openedBy`,12,`StartTag StartCloseTag`,19,`OpenTag`,20,`StartTag`],[`isolate`,-6,13,18,19,21,22,24,``]],propSources:[Zy],skippedNodes:[0],repeatNodeCount:9,tokenData:"!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[Ky,Jy,Yy,Xy,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function $y(e,t){let n=t&&t.getChild(`TagName`);return n?e.sliceString(n.from,n.to):``}function eb(e,t){let n=t&&t.firstChild;return!n||n.name!=`OpenTag`?``:$y(e,n)}function tb(e,t,n){let r=t&&t.getChildren(`Attribute`).find(e=>e.from<=n&&e.to>=n),i=r&&r.getChild(`AttributeName`);return i?e.sliceString(i.from,i.to):``}function nb(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name==`Element`)return t;return null}function rb(e,t){let n=Y(e).resolveInner(t,-1),r=null;for(let e=n;!r&&e.parent;e=e.parent)(e.name==`OpenTag`||e.name==`CloseTag`||e.name==`SelfClosingTag`||e.name==`MismatchedCloseTag`)&&(r=e);if(r&&(r.to>t||r.lastChild.type.isError)){let e=r.parent;if(n.name==`TagName`)return r.name==`CloseTag`||r.name==`MismatchedCloseTag`?{type:`closeTag`,from:n.from,context:e}:{type:`openTag`,from:n.from,context:nb(e)};if(n.name==`AttributeName`)return{type:`attrName`,from:n.from,context:r};if(n.name==`AttributeValue`)return{type:`attrValue`,from:n.from,context:r};let i=n==r||n.name==`Attribute`?n.childBefore(t):n;return i?.name==`StartTag`?{type:`openTag`,from:t,context:nb(e)}:i?.name==`StartCloseTag`&&i.to<=t?{type:`closeTag`,from:t,context:e}:i?.name==`Is`?{type:`attrValue`,from:t,context:r}:i?{type:`attrName`,from:t,context:r}:null}if(n.name==`StartCloseTag`)return{type:`closeTag`,from:t,context:n.parent};for(;n.parent&&n.to==t&&!n.lastChild?.type.isError;)n=n.parent;return n.name==`Element`||n.name==`Text`||n.name==`Document`?{type:`tag`,from:t,context:n.name==`Element`?n:nb(n)}:null}var ib=class{constructor(e,t,n){this.attrs=t,this.attrValues=n,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:`type`},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:`<`+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:`</`+this.name+`>`,boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+`>`}),this.text=e.textContent?e.textContent.map(e=>({label:e,type:`text`})):[]}},ab=/^[:\-\.\w\u00b7-\uffff]*$/;function ob(e){return Object.assign(Object.assign({type:`property`},e.completion||{}),{label:e.name})}function sb(e){return typeof e==`string`?{label:`"${e}"`,type:`constant`}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function cb(e,t){let n=[],r=[],i=Object.create(null);for(let e of t){let t=ob(e);n.push(t),e.global&&r.push(t),e.values&&(i[e.name]=e.values.map(sb))}let a=[],o=[],s=Object.create(null);for(let t of e){let e=r,c=i;t.attributes&&(e=e.concat(t.attributes.map(e=>typeof e==`string`?n.find(t=>t.label==e)||{label:e,type:`property`}:(e.values&&(c==i&&(c=Object.create(c)),c[e.name]=e.values.map(sb)),ob(e)))));let l=new ib(t,e,c);s[l.name]=l,a.push(l),t.top&&o.push(l)}o.length||(o=a);for(let t=0;t<a.length;t++){let n=e[t],r=a[t];if(n.children)for(let e of n.children)s[e]&&r.children.push(s[e]);else r.children=a}return e=>{let{doc:t}=e.state,n=rb(e.state,e.pos);if(!n||n.type==`tag`&&!e.explicit)return null;let{type:c,from:l,context:u}=n;if(c==`openTag`){let e=o,n=eb(t,u);return n&&(e=s[n]?.children||a),{from:l,options:e.map(e=>e.completion),validFor:ab}}if(c==`closeTag`){let n=eb(t,u);return n?{from:l,to:e.pos+ +(t.sliceString(e.pos,e.pos+1)==`>`),options:[s[n]?.closeNameCompletion||{label:n+`>`,type:`type`}],validFor:ab}:null}if(c==`attrName`)return{from:l,options:s[$y(t,u)]?.attrs||r,validFor:ab};if(c==`attrValue`){let n=tb(t,u,l);if(!n)return null;let r=(s[$y(t,u)]?.attrValues||i)[n];return!r||!r.length?null:{from:l,to:e.pos+ +(t.sliceString(e.pos,e.pos+1)==`"`),options:r,validFor:/^"[^"]*"?$/}}if(c==`tag`){let n=eb(t,u),r=s[n],i=[],c=u&&u.lastChild;n&&(!c||c.name!=`CloseTag`||$y(t,c)!=n)&&i.push(r?r.closeCompletion:{label:`</`+n+`>`,type:`type`,boost:2});let d=i.concat((r?.children||(u?a:o)).map(e=>e.openCompletion));if(u&&r?.text.length){let t=u.firstChild;t.to>e.pos-20&&!/\S/.test(e.state.sliceDoc(t.to,e.pos))&&(d=d.concat(r.text))}return{from:l,options:d,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}return null}}var lb=tu.define({name:`xml`,parser:Qy.configure({props:[vu.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Nu.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),Td.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/$/}});function ub(e={}){let t=[lb.data.of({autocomplete:cb(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(fb),new du(lb,t)}function db(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}var fb=U.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!lb.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=o.doc.sliceString(t-1,t)==r,i=Y(o).resolveInner(t,-1),a;if(n&&r==`>`&&i.name==`EndTag`){let n=i.parent;if(n.parent?.lastChild?.name!=`CloseTag`&&(a=db(o.doc,n.parent,t)))return{range:e,changes:{from:t,to:t+ +(o.doc.sliceString(t,t+1)===`>`),insert:`</${a}>`}}}else if(n&&r==`/`&&i.name==`StartCloseTag`){let e=i.parent;if(i.from==t-2&&e.lastChild?.name!=`CloseTag`&&(a=db(o.doc,e,t))){let e=t+ +(o.doc.sliceString(t,t+1)===`>`),n=`${a}>`;return{range:T.cursor(t+n.length,-1),changes:{from:t,to:e,insert:n}}}}return{range:e}});return!s.changes.empty&&(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),pb=63,mb=64,hb=1,gb=2,_b=3,vb=4,yb=5,bb=6,xb=7,Sb=65,Cb=66,wb=8,Tb=9,Eb=10,Db=11,Ob=12,kb=13,Ab=19,jb=20,Mb=29,Nb=33,Pb=34,Fb=47,Ib=0,Lb=1,Rb=2,zb=3,Bb=4,Vb=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};Vb.top=new Vb(null,-1,Ib);function Hb(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(Wb(t)||t==-1)return n}}function Ub(e){return e==32||e==9}function Wb(e){return e==10||e==13}function Gb(e){return Ub(e)||Wb(e)}function Kb(e){return e<0||Gb(e)}var qb=new tv({start:Vb.top,reduce(e,t){return e.type==zb&&(t==jb||t==Pb)?e.parent:e},shift(e,t,n,r){if(t==_b)return new Vb(e,Hb(r,r.pos),Lb);if(t==Sb||t==yb)return new Vb(e,Hb(r,r.pos),Rb);if(t==pb)return e.parent;if(t==Ab||t==Nb)return new Vb(e,0,zb);if(t==kb&&e.type==Bb)return e.parent;if(t==Fb){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new Vb(e,e.depth+ +t[0],Bb)}return e},hash(e){return e.hash}});function Jb(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Kb(e.peek(n+3))}var Yb=new H_((e,t)=>{if(e.next==-1&&t.canShift(mb))return e.acceptToken(mb);let n=e.peek(-1);if((Wb(n)||n<0)&&t.context.type!=zb){if(Jb(e,45)){if(t.canShift(pb))e.acceptToken(pb);else return e.acceptToken(hb,3)}if(Jb(e,46)){if(t.canShift(pb))e.acceptToken(pb);else return e.acceptToken(gb,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==Lb&&(e.next!=45||!Kb(e.peek(1))))&&e.next!=-1&&!Wb(e.next)&&e.next!=35&&e.acceptToken(pb,-n)}},{contextual:!0}),Xb=new H_((e,t)=>{if(t.context.type==zb){e.next==63&&(e.advance(),Kb(e.next)&&e.acceptToken(xb));return}if(e.next==45)e.advance(),Kb(e.next)&&e.acceptToken(t.context.type==Lb&&t.context.depth==Hb(e,e.pos-1)?vb:_b);else if(e.next==63)e.advance(),Kb(e.next)&&e.acceptToken(t.context.type==Rb&&t.context.depth==Hb(e,e.pos-1)?bb:yb);else{let n=e.pos;for(;;)if(Ub(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)ex(e);else if(e.next==38)tx(e);else if(e.next==42){tx(e);break}else if(e.next==39||e.next==34){if(nx(e,!0))break;return}else if(e.next==91||e.next==123){if(!rx(e))return;break}else{sx(e,!0,!1,0);break}for(;Ub(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Mb))return;Kb(e.peek(1))&&e.acceptTokenTo(t.context.type==Rb&&t.context.depth==Hb(e,n)?Cb:Sb,n)}}},{contextual:!0});function Zb(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Qb(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function $b(e,t){return e.next==37?(e.advance(),Qb(e.next)&&e.advance(),Qb(e.next)&&e.advance(),!0):Zb(e.next)||t&&e.next==44?(e.advance(),!0):!1}function ex(e){if(e.advance(),e.next==60){for(e.advance();;)if(!$b(e,!0)){e.next==62&&e.advance();break}}else for(;$b(e,!1););}function tx(e){for(e.advance();!Kb(e.next)&&ax(e.next)!=`f`;)e.advance()}function nx(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(Wb(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function rx(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!nx(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||Wb(e.next))return!1;else e.advance()}var ix=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function ax(e){return e<33?`u`:e>125?`s`:ix[e-33]}function ox(e,t){let n=ax(e);return n!=`u`&&!(t&&n==`f`)}function sx(e,t,n,r){if(ax(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&ox(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;Gb(a);){if(Wb(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?ox(e.peek(o+1),n):a==35?e.peek(o-1)!=32:ox(a,n)))||!n&&s<=r||s==0&&!n&&(Jb(e,45,o)||Jb(e,46,o)))break;if(t&&ax(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var cx=new H_((e,t)=>{if(e.next==33)ex(e),e.acceptToken(Ob);else if(e.next==38||e.next==42){let t=e.next==38?Eb:Db;tx(e),e.acceptToken(t)}else e.next==39||e.next==34?(nx(e,!1),e.acceptToken(Tb)):sx(e,!1,t.context.type==zb,t.context.depth)&&e.acceptToken(wb)}),lx=new H_((e,t)=>{let n=t.context.type==Bb?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(Jb(e,45,i)||Jb(e,46,i))||!Wb(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=Wb(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(kb,r)}),ux=Ol({DirectiveName:J.keyword,DirectiveContent:J.attributeValue,"DirectiveEnd DocEnd":J.meta,QuotedLiteral:J.string,BlockLiteralHeader:J.special(J.string),BlockLiteralContent:J.content,Literal:J.content,"Key/Literal Key/QuotedLiteral":J.definition(J.propertyName),"Anchor Alias":J.labelName,Tag:J.typeName,Comment:J.lineComment,": , -":J.separator,"?":J.punctuation,"[ ]":J.squareBracket,"{ }":J.brace}),dx=nv.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:qb,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[ux],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Yb,Xb,cx,lx,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),fx=tu.define({name:`yaml`,parser:dx.configure({props:[vu.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Du({closing:`}`}),FlowSequence:Du({closing:`]`})}),Nu.add({"FlowMapping FlowSequence":Pu,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function px(){return new du(fx)}J.meta;var mx=[[`plantuml`,`PlantUML`],[`mermaid`,`Mermaid`],[`graphviz`,`GraphViz`],[`d2`,`D2`],[`c4plantuml`,`C4 PlantUML`],[`blockdiag`,`BlockDiag`],[`seqdiag`,`SeqDiag`],[`actdiag`,`ActDiag`],[`nwdiag`,`NwDiag`],[`packetdiag`,`PacketDiag`],[`rackdiag`,`RackDiag`],[`bpmn`,`BPMN`],[`bytefield`,`Bytefield`],[`dbml`,`DBML`],[`diagramsnet`,`Diagrams.net`],[`ditaa`,`Ditaa`],[`erd`,`ERD`],[`excalidraw`,`Excalidraw`],[`goat`,`GoAT`],[`nomnoml`,`Nomnoml`],[`pikchr`,`Pikchr`],[`structurizr`,`Structurizr`],[`svgbob`,`Svgbob`],[`symbolator`,`Symbolator`],[`tikz`,`TikZ`],[`umlet`,`UMLet`],[`vega`,`Vega`],[`vegalite`,`Vega-Lite`],[`wavedrom`,`WaveDrom`],[`wireviz`,`WireViz`]].map(([e,t])=>({id:e,label:t})),hx=new Set(`actor.alt.and.as.class.component.database.direction.else.end.endnote.endif.endwhile.flowchart.graph.group.if.interface.loop.namespace.node.note.package.participant.rectangle.return.skinparam.start.state.stop.subgraph.then.title.while`.split(`.`)),gx=Id.define({startState:()=>({blockComment:!1}),token(e,t){return t.blockComment?(e.skipTo(`*/`)?(e.match(`*/`),t.blockComment=!1):e.skipToEnd(),`blockComment`):e.match(`/*`)?(t.blockComment=!0,`blockComment`):e.match(/^\s*(?:%%|\/\/|'|#).*/)?`lineComment`:e.match(/^@(?:start|end)[a-z0-9_]*/i)?`keyword`:e.match(/^"(?:[^"\\]|\\.)*"/)?`string`:e.match(/^(?:--?>|<--?|==>|<==|\.\.>|<\.\.|->|<-|=>|<=|--|\.\.)/)?`operator`:e.match(/^#[0-9a-f]{3,8}\b/i)?`color`:e.match(/^\b\d+(?:\.\d+)?\b/)?`number`:e.match(/^\b[a-z_][\w-]*\b/i)?hx.has(e.current().toLowerCase())?`keyword`:`variableName`:(e.next(),null)}}),_x=new Set([`bytefield`,`excalidraw`,`vega`,`vegalite`,`wavedrom`]),vx=new Set([`bpmn`,`diagramsnet`,`umlet`]);function yx(e){return _x.has(e)?lv():vx.has(e)?ub():e===`wireviz`?px():e===`dbml`?Ty():gx}function bx(e){return mx.some(t=>t.id===e)}function xx(e=``){let t=new URLSearchParams(e).get(`type`);return bx(t)?t:null}var Sx=`<?xml version="1.0" encoding="UTF-8"?>15+`;function qv(e,t,n){let r=Object.create(null);r.true=r.false=hv,r.null=r.unknown=gv;for(let t of e.split(` `))t&&(r[t]=Av);for(let e of t.split(` `))e&&(r[e]=jv);for(let e of(n||``).split(` `))e&&(r[e]=Pv);return r}var Jv=`array binary bit boolean char character clob date decimal double float int integer interval large national nchar nclob numeric object precision real smallint time timestamp varchar varying `,Yv=`absolute action add after all allocate alter and any are as asc assertion at authorization before begin between both breadth by call cascade cascaded case cast catalog check close collate collation column commit condition connect connection constraint constraints constructor continue corresponding count create cross cube current current_date current_default_transform_group current_transform_group_for_type current_path current_role current_time current_timestamp current_user cursor cycle data day deallocate declare default deferrable deferred delete depth deref desc describe descriptor deterministic diagnostics disconnect distinct do domain drop dynamic each else elseif end end-exec equals escape except exception exec execute exists exit external fetch first for foreign found from free full function general get global go goto grant group grouping handle having hold hour identity if immediate in indicator initially inner inout input insert intersect into is isolation join key language last lateral leading leave left level like limit local localtime localtimestamp locator loop map match method minute modifies module month names natural nesting new next no none not of old on only open option or order ordinality out outer output overlaps pad parameter partial path prepare preserve primary prior privileges procedure public read reads recursive redo ref references referencing relative release repeat resignal restrict result return returns revoke right role rollback rollup routine row rows savepoint schema scroll search second section select session session_user set sets signal similar size some space specific specifictype sql sqlexception sqlstate sqlwarning start state static system_user table temporary then timezone_hour timezone_minute to trailing transaction translation treat trigger under undo union unique unnest until update usage user using value values view when whenever where while with without work write year zone `,Xv={backslashEscapes:!1,hashComments:!1,spaceAfterDashes:!1,slashComments:!1,doubleQuotedStrings:!1,doubleDollarQuotedStrings:!1,unquotedBitLiterals:!1,treatBitsAsBytes:!1,charSetCasts:!1,plsqlQuotingMechanism:!1,operatorChars:`*+-%<>!=&|~^/`,specialVar:`?`,identifierQuotes:`"`,caseInsensitiveIdentifiers:!1,words:qv(Yv,Jv)};function Zv(e,t,n,r){let i={};for(let t in Xv)i[t]=(e.hasOwnProperty(t)?e:Xv)[t];return t&&(i.words=qv(t,n||``,r)),i}function Qv(e){return new H_(t=>{let{next:n}=t;if(t.advance(),Gv(n,Kv)){for(;Gv(t.next,Kv);)t.advance();t.acceptToken(uv)}else if(n==36&&e.doubleDollarQuotedStrings){let e=Bv(t,``);t.next==36&&(t.advance(),Rv(t,e),t.acceptToken(pv))}else if(n==39||n==34&&e.doubleQuotedStrings)Lv(t,n,e.backslashEscapes),t.acceptToken(pv);else if(n==35&&e.hashComments||n==47&&t.next==47&&e.slashComments)Wv(t),t.acceptToken(dv);else if(n==45&&t.next==45&&(!e.spaceAfterDashes||t.peek(1)==32))Wv(t),t.acceptToken(dv);else if(n==47&&t.next==42){t.advance();for(let e=1;;){let n=t.next;if(t.next<0)break;if(t.advance(),n==42&&t.next==47){if(e--,t.advance(),!e)break}else n==47&&t.next==42&&(e++,t.advance())}t.acceptToken(fv)}else if((n==101||n==69)&&t.next==39)t.advance(),Lv(t,39,!0),t.acceptToken(pv);else if((n==110||n==78)&&t.next==39&&e.charSetCasts)t.advance(),Lv(t,39,e.backslashEscapes),t.acceptToken(pv);else if(n==95&&e.charSetCasts)for(let n=0;;n++){if(t.next==39&&n>1){t.advance(),Lv(t,39,e.backslashEscapes),t.acceptToken(pv);break}if(!Fv(t.next))break;t.advance()}else if(e.plsqlQuotingMechanism&&(n==113||n==81)&&t.next==39&&t.peek(1)>0&&!Gv(t.peek(1),Kv)){let e=t.peek(1);t.advance(2),zv(t,e),t.acceptToken(pv)}else if(Gv(n,e.identifierQuotes))Lv(t,n==91?93:n,!1),t.acceptToken(kv);else if(n==40)t.acceptToken(_v);else if(n==41)t.acceptToken(vv);else if(n==123)t.acceptToken(yv);else if(n==125)t.acceptToken(bv);else if(n==91)t.acceptToken(xv);else if(n==93)t.acceptToken(Sv);else if(n==59)t.acceptToken(Cv);else if(e.unquotedBitLiterals&&n==48&&t.next==98)t.advance(),Hv(t),t.acceptToken(Mv);else if((n==98||n==66)&&(t.next==39||t.next==34)){let n=t.next;t.advance(),e.treatBitsAsBytes?(Lv(t,n,e.backslashEscapes),t.acceptToken(Nv)):(Hv(t,n),t.acceptToken(Mv))}else if(n==48&&(t.next==120||t.next==88)||(n==120||n==88)&&t.next==39){let e=t.next==39;for(t.advance();Iv(t.next);)t.advance();e&&t.next==39&&t.advance(),t.acceptToken(mv)}else if(n==46&&t.next>=48&&t.next<=57)Uv(t,!0),t.acceptToken(mv);else if(n==46)t.acceptToken(wv);else if(n>=48&&n<=57)Uv(t,!1),t.acceptToken(mv);else if(Gv(n,e.operatorChars)){for(;Gv(t.next,e.operatorChars);)t.advance();t.acceptToken(Tv)}else if(Gv(n,e.specialVar))t.next==n&&t.advance(),Vv(t),t.acceptToken(Dv);else if(n==58||n==44)t.acceptToken(Ev);else if(Fv(n)){let r=Bv(t,String.fromCharCode(n));t.acceptToken(t.next==46||t.peek(-r.length-1)==46?Ov:e.words[r.toLowerCase()]??Ov)}})}var $v=Qv(Xv),ey=nv.deserialize({version:14,states:"%vQ]QQOOO#wQRO'#DSO$OQQO'#CwO%eQQO'#CxO%lQQO'#CyO%sQQO'#CzOOQQ'#DS'#DSOOQQ'#C}'#C}O'UQRO'#C{OOQQ'#Cv'#CvOOQQ'#C|'#C|Q]QQOOQOQQOOO'`QQO'#DOO(xQRO,59cO)PQQO,59cO)UQQO'#DSOOQQ,59d,59dO)cQQO,59dOOQQ,59e,59eO)jQQO,59eOOQQ,59f,59fO)qQQO,59fOOQQ-E6{-E6{OOQQ,59b,59bOOQQ-E6z-E6zOOQQ,59j,59jOOQQ-E6|-E6|O+VQRO1G.}O+^QQO,59cOOQQ1G/O1G/OOOQQ1G/P1G/POOQQ1G/Q1G/QP+kQQO'#C}O+rQQO1G.}O)PQQO,59cO,PQQO'#Cw",stateData:",[~OtOSPOSQOS~ORUOSUOTUOUUOVROXSOZTO]XO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O^]ORvXSvXTvXUvXVvXXvXZvX]vX_vX`vXavXbvXcvXdvXevXfvXgvXhvX~OsvX~P!jOa_Ob_Oc_O~ORUOSUOTUOUUOVROXSOZTO^tO_UO`UOa`Ob`Oc`OdUOeUOfUOgUOhUO~OWaO~P$ZOYcO~P$ZO[eO~P$ZORUOSUOTUOUUOVROXSOZTO^QO_UO`UOaPObPOcPOdUOeUOfUOgUOhUO~O]hOsoX~P%zOajObjOcjO~O^]ORkaSkaTkaUkaVkaXkaZka]ka_ka`kaakabkackadkaekafkagkahka~Oska~P'kO^]O~OWvXYvX[vX~P!jOWnO~P$ZOYoO~P$ZO[pO~P$ZO^]ORkiSkiTkiUkiVkiXkiZki]ki_ki`kiakibkickidkiekifkigkihki~Oski~P)xOWkaYka[ka~P'kO]hO~P$ZOWkiYki[ki~P)xOasObsOcsO~O",goto:"#hwPPPPPPPPPPPPPPPPPPPPPPPPPPx||||!Y!^!d!xPPP#[TYOZeUORSTWZbdfqT[OZQZORiZSWOZQbRQdSQfTZgWbdfqQ^PWk^lmrQl_Qm`RrseVORSTWZbdfq",nodeNames:`⚠ LineComment BlockComment String Number Bool Null ( ) { } [ ] ; . Operator Punctuation SpecialVar Identifier QuotedIdentifier Keyword Type Bits Bytes Builtin Script Statement CompositeIdentifier Parens Braces Brackets Statement`,maxTerm:38,nodeProps:[[`isolate`,-4,1,2,3,19,``]],skippedNodes:[0,1,2],repeatNodeCount:3,tokenData:`RORO`,tokenizers:[0,$v],topRules:{Script:[0,25]},tokenPrec:0});function ty(e){let t=e.cursor().moveTo(e.from,-1);for(;/Comment/.test(t.name);)t.moveTo(t.from,-1);return t.node}function ny(e,t){let n=e.sliceString(t.from,t.to),r=/^([`'"\[])(.*)([`'"\]])$/.exec(n);return r?r[2]:n}function ry(e){return e&&(e.name==`Identifier`||e.name==`QuotedIdentifier`)}function iy(e,t){if(t.name==`CompositeIdentifier`){let n=[];for(let r=t.firstChild;r;r=r.nextSibling)ry(r)&&n.push(ny(e,r));return n}return[ny(e,t)]}function ay(e,t){for(let n=[];;){if(!t||t.name!=`.`)return n;let r=ty(t);if(!ry(r))return n;n.unshift(ny(e,r)),t=ty(r)}}function oy(e,t){let n=Y(e).resolveInner(t,-1),r=cy(e.doc,n);return n.name==`Identifier`||n.name==`QuotedIdentifier`||n.name==`Keyword`?{from:n.from,quoted:n.name==`QuotedIdentifier`?e.doc.sliceString(n.from,n.from+1):null,parents:ay(e.doc,ty(n)),aliases:r}:n.name==`.`?{from:t,quoted:null,parents:ay(e.doc,n),aliases:r}:{from:t,quoted:null,parents:[],empty:!0,aliases:r}}var sy=new Set(`where group having order union intersect except all distinct limit offset fetch for`.split(` `));function cy(e,t){let n;for(let e=t;!n;e=e.parent){if(!e)return null;e.name==`Statement`&&(n=e)}let r=null;for(let t=n.firstChild,i=!1,a=null;t;t=t.nextSibling){let n=t.name==`Keyword`?e.sliceString(t.from,t.to).toLowerCase():null,o=null;if(!i)i=n==`from`;else if(n==`as`&&a&&ry(t.nextSibling))o=ny(e,t.nextSibling);else if(n&&sy.has(n))break;else a&&ry(t)&&(o=ny(e,t));o&&(r||=Object.create(null),r[o]=iy(e,a)),a=/Identifier$/.test(t.name)?t:null}return r}function ly(e,t,n){return n.map(n=>({...n,label:n.label[0]==e?n.label:e+n.label+t,apply:void 0}))}var uy=/^\w*$/,dy=/^[`'"\[]?\w*[`'"\]]?$/;function fy(e){return e.self&&typeof e.self.label==`string`}var py=class e{constructor(e,t){this.idQuote=e,this.idCaseInsensitive=t,this.list=[],this.children=void 0}child(t){let n=this.children||=Object.create(null);return n[t]||(t&&!this.list.some(e=>e.label==t)&&this.list.push(my(t,`type`,this.idQuote,this.idCaseInsensitive)),n[t]=new e(this.idQuote,this.idCaseInsensitive))}maybeChild(e){return this.children?this.children[e]:null}addCompletion(e){let t=this.list.findIndex(t=>t.label==e.label);t>-1?this.list[t]=e:this.list.push(e)}addCompletions(e){for(let t of e)this.addCompletion(typeof t==`string`?my(t,`property`,this.idQuote,this.idCaseInsensitive):t)}addNamespace(e){Array.isArray(e)?this.addCompletions(e):fy(e)?this.addNamespace(e.children):this.addNamespaceObject(e)}addNamespaceObject(e){for(let t of Object.keys(e)){let n=e[t],r=null,i=t.replace(/\\?\./g,e=>e==`.`?`\0`:e).split(`\0`),a=this;fy(n)&&(r=n.self,n=n.children);for(let e=0;e<i.length;e++)r&&e==i.length-1&&a.addCompletion(r),a=a.child(i[e].replace(/\\\./g,`.`));a.addNamespace(n)}}};function my(e,t,n,r){return RegExp(`^[a-z_][a-z_\\d]*$`,r?`i`:``).test(e)?{label:e,type:t}:{label:e,type:t,apply:n+e+hy(n)}}function hy(e){return e===`[`?`]`:e}function gy(e,t,n,r,i,a){let o=new py(a?.spec.identifierQuotes?.[0]||`"`,!!a?.spec.caseInsensitiveIdentifiers),s=i?o.child(i):null;return o.addNamespace(e),t&&(s||o).addCompletions(t),n&&o.addCompletions(n),s&&o.addCompletions(s.list),r&&o.addCompletions((s||o).child(r).list),e=>{let{parents:t,from:n,quoted:i,empty:a,aliases:c}=oy(e.state,e.pos);if(a&&!e.explicit)return null;c&&t.length==1&&(t=c[t[0]]||t);let l=o;for(let e of t){for(;!l.children||!l.children[e];)if(l==o&&s)l=s;else if(l==s&&r)l=l.child(r);else return null;let t=l.maybeChild(e);if(!t)return null;l=t}let u=l.list;if(l==o&&c&&(u=u.concat(Object.keys(c).map(e=>({label:e,type:`constant`})))),i){let t=i[0],r=hy(t);return{from:n,to:e.state.sliceDoc(e.pos,e.pos+1)==r?e.pos+1:void 0,options:ly(t,r,u),validFor:dy}}return{from:n,options:u,validFor:uy}}}function _y(e){return e==jv?`type`:e==Av?`keyword`:`variable`}function vy(e,t,n){return Rh([`QuotedIdentifier`,`String`,`LineComment`,`BlockComment`,`.`],Lh(Object.keys(e).map(r=>n(t?r.toUpperCase():r,_y(e[r])))))}var yy=ey.configure({props:[vu.add({Statement:ku()}),Nu.add({Statement(e,t){return{from:Math.min(e.from+100,t.doc.lineAt(e.from).to),to:e.to}},BlockComment(e){return{from:e.from+2,to:e.to-2}}}),Ol({Keyword:J.keyword,Type:J.typeName,Builtin:J.standard(J.name),Bits:J.number,Bytes:J.string,Bool:J.bool,Null:J.null,Number:J.number,String:J.string,Identifier:J.name,QuotedIdentifier:J.special(J.string),SpecialVar:J.special(J.name),LineComment:J.lineComment,BlockComment:J.blockComment,Operator:J.operator,"Semi Punctuation":J.punctuation,"( )":J.paren,"{ }":J.brace,"[ ]":J.squareBracket})]}),by=class e{constructor(e,t,n){this.dialect=e,this.language=t,this.spec=n}get extension(){return this.language.extension}configureLanguage(t,n){return new e(this.dialect,this.language.configure(t,n),this.spec)}static define(t){let n=Zv(t,t.keywords,t.types,t.builtin),r=tu.define({name:`sql`,parser:yy.configure({tokenizers:[{from:$v,to:Qv(n)}]}),languageData:{commentTokens:{line:`--`,block:{open:`/*`,close:`*/`}},closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,"`"]}}});return new e(n,r,t)}};function xy(e,t){return{label:e,type:t,boost:-1}}function Sy(e,t=!1,n){return vy(e.dialect.words,t,n||xy)}function Cy(e){return e.schema?gy(e.schema,e.tables,e.schemas,e.defaultTable,e.defaultSchema,e.dialect||Ey):()=>null}function wy(e){return e.schema?(e.dialect||Ey).language.data.of({autocomplete:Cy(e)}):[]}function Ty(e={}){let t=e.dialect||Ey;return new du(t.language,[wy(e),t.language.data.of({autocomplete:Sy(t,e.upperCaseKeywords,e.keywordCompletion)})])}var Ey=by.define({});Yv+``,Jv+``;var Dy=`accessible algorithm analyze asensitive authors auto_increment autocommit avg avg_row_length binlog btree cache catalog_name chain change changed checkpoint checksum class_origin client_statistics coalesce code collations columns comment committed completion concurrent consistent contains contributors convert database databases day_hour day_microsecond day_minute day_second delay_key_write delayed delimiter des_key_file dev_pop dev_samp deviance directory disable discard distinctrow div dual dumpfile enable enclosed ends engine engines enum errors escaped even event events every explain extended fast field fields flush force found_rows fulltext grants handler hash high_priority hosts hour_microsecond hour_minute hour_second ignore ignore_server_ids import index index_statistics infile innodb insensitive insert_method install invoker iterate keys kill linear lines list load lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modify mutex mysql_errno no_write_to_binlog offline offset one online optimize optionally outfile pack_keys parser partition partitions password phase plugin plugins prev processlist profile profiles purge query quick range read_write rebuild recover regexp relaylog remove rename reorganize repair repeatable replace require resume rlike row_format rtree schedule schema_name schemas second_microsecond security sensitive separator serializable server share show slave slow snapshot soname spatial sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result ssl starting starts std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace terminated triggers truncate uncommitted uninstall unlock upgrade use use_frm user_resources user_statistics utc_date utc_time utc_timestamp variables views warnings xa xor year_month zerofill`;Jv+``,Yv+``+Dy,Yv+``+Dy,Yv+``,Jv+``,Yv+``,Jv+``,Jv+``,Yv+``,Jv+``;var Oy=1,ky=2,Ay=3,jy=4,My=5,Ny=36,Py=37,Fy=38,Iy=11,Ly=13;function Ry(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}function zy(e){return e==9||e==10||e==13||e==32}var By=null,Vy=null,Hy=0;function Uy(e,t){let n=e.pos+t;if(Vy==e&&Hy==n)return By;for(;zy(e.peek(t));)t++;let r=``;for(;;){let n=e.peek(t);if(!Ry(n))break;r+=String.fromCharCode(n),t++}return Vy=e,Hy=n,By=r||null}function Wy(e,t){this.name=e,this.parent=t}var Gy=new tv({start:null,shift(e,t,n,r){return t==Oy?new Wy(Uy(r,1)||``,e):e},reduce(e,t){return t==Iy&&e?e.parent:e},reuse(e,t,n,r){let i=t.type.id;return i==Oy||i==Ly?new Wy(Uy(r,1)||``,e):e},strict:!1}),Ky=new H_((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let n=Uy(e,0);if(!n)return e.acceptToken(My);if(t.context&&n==t.context.name)return e.acceptToken(ky);for(let r=t.context;r;r=r.parent)if(r.name==n)return e.acceptToken(Ay,-2);e.acceptToken(jy)}else if(e.next!=33&&e.next!=63)return e.acceptToken(Oy)}},{contextual:!0});function qy(e,t){return new H_(n=>{let r=0,i=t.charCodeAt(0);scan:for(;!(n.next<0);n.advance(),r++)if(n.next==i){for(let e=1;e<t.length;e++)if(n.peek(e)!=t.charCodeAt(e))continue scan;break}r&&n.acceptToken(e)})}var Jy=qy(Ny,`-->`),Yy=qy(Py,`?>`),Xy=qy(Fy,`]]>`),Zy=Ol({Text:J.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":J.angleBracket,TagName:J.tagName,"MismatchedCloseTag/TagName":[J.tagName,J.invalid],AttributeName:J.attributeName,AttributeValue:J.attributeValue,Is:J.definitionOperator,"EntityReference CharacterReference":J.character,Comment:J.blockComment,ProcessingInst:J.processingInstruction,DoctypeDecl:J.documentMeta,Cdata:J.special(J.string)}),Qy=nv.deserialize({version:14,states:",lOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DT'#DTOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C|'#C|O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C}'#C}O$dOrO,59^OOOP,59^,59^OOOS'#DO'#DOO$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6z-E6zOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6{-E6{OOOP1G.x1G.xOOOS-E6|-E6|OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'mO!bO,59eOOOO-E6w-E6wO'{OpO1G.uO'{OpO1G.uOOOP1G.u1G.uO(TOpO7+$fOOOP7+$f7+$fO(]O!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(hO#tO'#CnO(vO&jO'#CnOOOO1G.q1G.qO)UOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO)^O#tO,59YOOOO,59Y,59YOOOO'#C{'#C{O)lO&jO,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.tOOOO-E6y-E6y",stateData:")z~OPQOSVOTWOVWOWWOXWOiXOyPO!QTO!SUO~OvZOx]O~O^`Oz^O~OPQOQcOSVOTWOVWOWWOXWOyPO!QTO!SUO~ORdO~P!SOteO!PgO~OuhO!RjO~O^lOz^O~OvZOxoO~O^qOz^O~O[vO`sOdwOz^O~ORyO~P!SO^{Oz^O~OteO!P}O~OuhO!R!PO~O^!QOz^O~O[!SOz^O~O[!VO`sOd!WOz^O~Oa!YOz^O~Oz^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oz^O~O[!_Oz^O~O[!aOz^O~O[!cO`sOd!dOz^O~O[!cO`sOd!dO~Oa!eOz^O~Oz^O{!gO}!hO~Oz^O[ma`madma~O[!kOz^O~O[!lOz^O~O[!mO`sOd!nO~OW!qOX!qO{!sO|!qO~OW!tOX!tO}!sO!O!tO~O[!vOz^O~OW!qOX!qO{!yO|!qO~OW!tOX!tO}!yO!O!tO~O",goto:"%cxPPPPPPPPPPyyP!PP!VPP!`!jP!pyyyP!v!|#S$[$k$q$w$}%TPPPP%ZXWORYbXRORYb_t`qru!T!U!bQ!i!YS!p!e!fR!w!oQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!j!oQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!j!]R!o!eQu`S!UqrU![u!U!bR!b!TQ!r!gR!x!rQ!u!hR!z!uQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:`⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl`,maxTerm:50,context:Gy,nodeProps:[[`closedBy`,1,`SelfCloseEndTag EndTag`,13,`CloseTag MissingCloseTag`],[`openedBy`,12,`StartTag StartCloseTag`,19,`OpenTag`,20,`StartTag`],[`isolate`,-6,13,18,19,21,22,24,``]],propSources:[Zy],skippedNodes:[0],repeatNodeCount:9,tokenData:"!)v~R!YOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs*vsv$qvw+fwx/ix}$q}!O0[!O!P$q!P!Q2z!Q![$q![!]4n!]!^$q!^!_8U!_!`!#t!`!a!$l!a!b!%d!b!c$q!c!}4n!}#P$q#P#Q!'W#Q#R$q#R#S4n#S#T$q#T#o4n#o%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U$q4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qi$zXVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qa%nVVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%gP&YTVPOv&Tw!^&T!_;'S&T;'S;=`&i<%lO&TP&lP;=`<%l&T`&tS!O`Ov&ox;'S&o;'S;=`'Q<%lO&o`'TP;=`<%l&oa'ZP;=`<%l%gX'eWVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^W(ST|WOr'}sv'}w;'S'};'S;=`(c<%lO'}W(fP;=`<%l'}X(lP;=`<%l'^h(vV|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oh)`P;=`<%l(oi)fP;=`<%l$qo)t`VP|W!O`zUOX$qXY)iYZ)iZ]$q]^)i^p$qpq)iqr$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk+PV{YVP!O`Ov%gwx&Tx!^%g!^!_&o!_;'S%g;'S;=`'W<%lO%g~+iast,n![!]-r!c!}-r#R#S-r#T#o-r%W%o-r%p&a-r&b1p-r4U4d-r4e$IS-r$I`$Ib-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~,qQ!Q![,w#l#m-V~,zQ!Q![,w!]!^-Q~-VOX~~-YR!Q![-c!c!i-c#T#Z-c~-fS!Q![-c!]!^-Q!c!i-c#T#Z-c~-ug}!O-r!O!P-r!Q![-r![!]-r!]!^/^!c!}-r#R#S-r#T#o-r$}%O-r%W%o-r%p&a-r&b1p-r1p4U-r4U4d-r4e$IS-r$I`$Ib-r$Je$Jg-r$Kh%#t-r&/x&Et-r&FV;'S-r;'S;:j/c?&r?Ah-r?BY?Mn-r~/cOW~~/fP;=`<%l-rk/rW}bVP|WOr'^rs&Tsv'^w!^'^!^!_'}!_;'S'^;'S;=`(i<%lO'^k0eZVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O1W!O!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk1aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a2S!a;'S$q;'S;=`)c<%lO$qk2_X!PQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qm3TZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a3v!a;'S$q;'S;=`)c<%lO$qm4RXdSVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo4{!P`S^QVP|W!O`Or$qrs%gsv$qwx'^x}$q}!O4n!O!P4n!P!Q$q!Q![4n![!]4n!]!^$q!^!_(o!_!c$q!c!}4n!}#R$q#R#S4n#S#T$q#T#o4n#o$}$q$}%O4n%O%W$q%W%o4n%o%p$q%p&a4n&a&b$q&b1p4n1p4U4n4U4d4n4d4e$q4e$IS4n$IS$I`$q$I`$Ib4n$Ib$Je$q$Je$Jg4n$Jg$Kh$q$Kh%#t4n%#t&/x$q&/x&Et4n&Et&FV$q&FV;'S4n;'S;:j8O;:j;=`)c<%l?&r$q?&r?Ah4n?Ah?BY$q?BY?Mn4n?MnO$qo8RP;=`<%l4ni8]Y|W!O`Oq(oqr8{rs&osv(owx'}x!a(o!a!b!#U!b;'S(o;'S;=`)]<%lO(oi9S_|W!O`Or(ors&osv(owx'}x}(o}!O:R!O!f(o!f!g;e!g!}(o!}#ODh#O#W(o#W#XLp#X;'S(o;'S;=`)]<%lO(oi:YX|W!O`Or(ors&osv(owx'}x}(o}!O:u!O;'S(o;'S;=`)]<%lO(oi;OV!QP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oi;lX|W!O`Or(ors&osv(owx'}x!q(o!q!r<X!r;'S(o;'S;=`)]<%lO(oi<`X|W!O`Or(ors&osv(owx'}x!e(o!e!f<{!f;'S(o;'S;=`)]<%lO(oi=SX|W!O`Or(ors&osv(owx'}x!v(o!v!w=o!w;'S(o;'S;=`)]<%lO(oi=vX|W!O`Or(ors&osv(owx'}x!{(o!{!|>c!|;'S(o;'S;=`)]<%lO(oi>jX|W!O`Or(ors&osv(owx'}x!r(o!r!s?V!s;'S(o;'S;=`)]<%lO(oi?^X|W!O`Or(ors&osv(owx'}x!g(o!g!h?y!h;'S(o;'S;=`)]<%lO(oi@QY|W!O`Or?yrs@psv?yvwA[wxBdx!`?y!`!aCr!a;'S?y;'S;=`Db<%lO?ya@uV!O`Ov@pvxA[x!`@p!`!aAy!a;'S@p;'S;=`B^<%lO@pPA_TO!`A[!`!aAn!a;'SA[;'S;=`As<%lOA[PAsOiPPAvP;=`<%lA[aBQSiP!O`Ov&ox;'S&o;'S;=`'Q<%lO&oaBaP;=`<%l@pXBiX|WOrBdrsA[svBdvwA[w!`Bd!`!aCU!a;'SBd;'S;=`Cl<%lOBdXC]TiP|WOr'}sv'}w;'S'};'S;=`(c<%lO'}XCoP;=`<%lBdiC{ViP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiDeP;=`<%l?yiDoZ|W!O`Or(ors&osv(owx'}x!e(o!e!fEb!f#V(o#V#WIr#W;'S(o;'S;=`)]<%lO(oiEiX|W!O`Or(ors&osv(owx'}x!f(o!f!gFU!g;'S(o;'S;=`)]<%lO(oiF]X|W!O`Or(ors&osv(owx'}x!c(o!c!dFx!d;'S(o;'S;=`)]<%lO(oiGPX|W!O`Or(ors&osv(owx'}x!v(o!v!wGl!w;'S(o;'S;=`)]<%lO(oiGsX|W!O`Or(ors&osv(owx'}x!c(o!c!dH`!d;'S(o;'S;=`)]<%lO(oiHgX|W!O`Or(ors&osv(owx'}x!}(o!}#OIS#O;'S(o;'S;=`)]<%lO(oiI]V|W!O`yPOr(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(oiIyX|W!O`Or(ors&osv(owx'}x#W(o#W#XJf#X;'S(o;'S;=`)]<%lO(oiJmX|W!O`Or(ors&osv(owx'}x#T(o#T#UKY#U;'S(o;'S;=`)]<%lO(oiKaX|W!O`Or(ors&osv(owx'}x#h(o#h#iK|#i;'S(o;'S;=`)]<%lO(oiLTX|W!O`Or(ors&osv(owx'}x#T(o#T#UH`#U;'S(o;'S;=`)]<%lO(oiLwX|W!O`Or(ors&osv(owx'}x#c(o#c#dMd#d;'S(o;'S;=`)]<%lO(oiMkX|W!O`Or(ors&osv(owx'}x#V(o#V#WNW#W;'S(o;'S;=`)]<%lO(oiN_X|W!O`Or(ors&osv(owx'}x#h(o#h#iNz#i;'S(o;'S;=`)]<%lO(oi! RX|W!O`Or(ors&osv(owx'}x#m(o#m#n! n#n;'S(o;'S;=`)]<%lO(oi! uX|W!O`Or(ors&osv(owx'}x#d(o#d#e!!b#e;'S(o;'S;=`)]<%lO(oi!!iX|W!O`Or(ors&osv(owx'}x#X(o#X#Y?y#Y;'S(o;'S;=`)]<%lO(oi!#_V!SP|W!O`Or(ors&osv(owx'}x;'S(o;'S;=`)]<%lO(ok!$PXaQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qo!$wX[UVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!%mZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!&`!a;'S$q;'S;=`)c<%lO$qk!&kX!RQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$qk!'aZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_#P$q#P#Q!(S#Q;'S$q;'S;=`)c<%lO$qk!(]ZVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_!`$q!`!a!)O!a;'S$q;'S;=`)c<%lO$qk!)ZXxQVP|W!O`Or$qrs%gsv$qwx'^x!^$q!^!_(o!_;'S$q;'S;=`)c<%lO$q",tokenizers:[Ky,Jy,Yy,Xy,0,1,2,3,4],topRules:{Document:[0,6]},tokenPrec:0});function $y(e,t){let n=t&&t.getChild(`TagName`);return n?e.sliceString(n.from,n.to):``}function eb(e,t){let n=t&&t.firstChild;return!n||n.name!=`OpenTag`?``:$y(e,n)}function tb(e,t,n){let r=t&&t.getChildren(`Attribute`).find(e=>e.from<=n&&e.to>=n),i=r&&r.getChild(`AttributeName`);return i?e.sliceString(i.from,i.to):``}function nb(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name==`Element`)return t;return null}function rb(e,t){let n=Y(e).resolveInner(t,-1),r=null;for(let e=n;!r&&e.parent;e=e.parent)(e.name==`OpenTag`||e.name==`CloseTag`||e.name==`SelfClosingTag`||e.name==`MismatchedCloseTag`)&&(r=e);if(r&&(r.to>t||r.lastChild.type.isError)){let e=r.parent;if(n.name==`TagName`)return r.name==`CloseTag`||r.name==`MismatchedCloseTag`?{type:`closeTag`,from:n.from,context:e}:{type:`openTag`,from:n.from,context:nb(e)};if(n.name==`AttributeName`)return{type:`attrName`,from:n.from,context:r};if(n.name==`AttributeValue`)return{type:`attrValue`,from:n.from,context:r};let i=n==r||n.name==`Attribute`?n.childBefore(t):n;return i?.name==`StartTag`?{type:`openTag`,from:t,context:nb(e)}:i?.name==`StartCloseTag`&&i.to<=t?{type:`closeTag`,from:t,context:e}:i?.name==`Is`?{type:`attrValue`,from:t,context:r}:i?{type:`attrName`,from:t,context:r}:null}if(n.name==`StartCloseTag`)return{type:`closeTag`,from:t,context:n.parent};for(;n.parent&&n.to==t&&!n.lastChild?.type.isError;)n=n.parent;return n.name==`Element`||n.name==`Text`||n.name==`Document`?{type:`tag`,from:t,context:n.name==`Element`?n:nb(n)}:null}var ib=class{constructor(e,t,n){this.attrs=t,this.attrValues=n,this.children=[],this.name=e.name,this.completion=Object.assign(Object.assign({type:`type`},e.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:`<`+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:`</`+this.name+`>`,boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+`>`}),this.text=e.textContent?e.textContent.map(e=>({label:e,type:`text`})):[]}},ab=/^[:\-\.\w\u00b7-\uffff]*$/;function ob(e){return Object.assign(Object.assign({type:`property`},e.completion||{}),{label:e.name})}function sb(e){return typeof e==`string`?{label:`"${e}"`,type:`constant`}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function cb(e,t){let n=[],r=[],i=Object.create(null);for(let e of t){let t=ob(e);n.push(t),e.global&&r.push(t),e.values&&(i[e.name]=e.values.map(sb))}let a=[],o=[],s=Object.create(null);for(let t of e){let e=r,c=i;t.attributes&&(e=e.concat(t.attributes.map(e=>typeof e==`string`?n.find(t=>t.label==e)||{label:e,type:`property`}:(e.values&&(c==i&&(c=Object.create(c)),c[e.name]=e.values.map(sb)),ob(e)))));let l=new ib(t,e,c);s[l.name]=l,a.push(l),t.top&&o.push(l)}o.length||(o=a);for(let t=0;t<a.length;t++){let n=e[t],r=a[t];if(n.children)for(let e of n.children)s[e]&&r.children.push(s[e]);else r.children=a}return e=>{let{doc:t}=e.state,n=rb(e.state,e.pos);if(!n||n.type==`tag`&&!e.explicit)return null;let{type:c,from:l,context:u}=n;if(c==`openTag`){let e=o,n=eb(t,u);return n&&(e=s[n]?.children||a),{from:l,options:e.map(e=>e.completion),validFor:ab}}if(c==`closeTag`){let n=eb(t,u);return n?{from:l,to:e.pos+ +(t.sliceString(e.pos,e.pos+1)==`>`),options:[s[n]?.closeNameCompletion||{label:n+`>`,type:`type`}],validFor:ab}:null}if(c==`attrName`)return{from:l,options:s[$y(t,u)]?.attrs||r,validFor:ab};if(c==`attrValue`){let n=tb(t,u,l);if(!n)return null;let r=(s[$y(t,u)]?.attrValues||i)[n];return!r||!r.length?null:{from:l,to:e.pos+ +(t.sliceString(e.pos,e.pos+1)==`"`),options:r,validFor:/^"[^"]*"?$/}}if(c==`tag`){let n=eb(t,u),r=s[n],i=[],c=u&&u.lastChild;n&&(!c||c.name!=`CloseTag`||$y(t,c)!=n)&&i.push(r?r.closeCompletion:{label:`</`+n+`>`,type:`type`,boost:2});let d=i.concat((r?.children||(u?a:o)).map(e=>e.openCompletion));if(u&&r?.text.length){let t=u.firstChild;t.to>e.pos-20&&!/\S/.test(e.state.sliceDoc(t.to,e.pos))&&(d=d.concat(r.text))}return{from:l,options:d,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}return null}}var lb=tu.define({name:`xml`,parser:Qy.configure({props:[vu.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),Nu.add({Element(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`OpenTag`?null:{from:t.to,to:n.name==`CloseTag`?n.from:e.to}}}),Td.add({"OpenTag CloseTag":e=>e.getChild(`TagName`)})]}),languageData:{commentTokens:{block:{open:`<!--`,close:`-->`}},indentOnInput:/^\s*<\/$/}});function ub(e={}){let t=[lb.data.of({autocomplete:cb(e.elements||[],e.attributes||[])})];return e.autoCloseTags!==!1&&t.push(fb),new du(lb,t)}function db(e,t,n=e.length){if(!t)return``;let r=t.firstChild,i=r&&r.getChild(`TagName`);return i?e.sliceString(i.from,Math.min(i.to,n)):``}var fb=U.inputHandler.of((e,t,n,r,i)=>{if(e.composing||e.state.readOnly||t!=n||r!=`>`&&r!=`/`||!lb.isActiveAt(e.state,t,-1))return!1;let a=i(),{state:o}=a,s=o.changeByRange(e=>{let{head:t}=e,n=o.doc.sliceString(t-1,t)==r,i=Y(o).resolveInner(t,-1),a;if(n&&r==`>`&&i.name==`EndTag`){let n=i.parent;if(n.parent?.lastChild?.name!=`CloseTag`&&(a=db(o.doc,n.parent,t)))return{range:e,changes:{from:t,to:t+ +(o.doc.sliceString(t,t+1)===`>`),insert:`</${a}>`}}}else if(n&&r==`/`&&i.name==`StartCloseTag`){let e=i.parent;if(i.from==t-2&&e.lastChild?.name!=`CloseTag`&&(a=db(o.doc,e,t))){let e=t+ +(o.doc.sliceString(t,t+1)===`>`),n=`${a}>`;return{range:T.cursor(t+n.length,-1),changes:{from:t,to:e,insert:n}}}}return{range:e}});return!s.changes.empty&&(e.dispatch([a,o.update(s,{userEvent:`input.complete`,scrollIntoView:!0})]),!0)}),pb=63,mb=64,hb=1,gb=2,_b=3,vb=4,yb=5,bb=6,xb=7,Sb=65,Cb=66,wb=8,Tb=9,Eb=10,Db=11,Ob=12,kb=13,Ab=19,jb=20,Mb=29,Nb=33,Pb=34,Fb=47,Ib=0,Lb=1,Rb=2,zb=3,Bb=4,Vb=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};Vb.top=new Vb(null,-1,Ib);function Hb(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(Wb(t)||t==-1)return n}}function Ub(e){return e==32||e==9}function Wb(e){return e==10||e==13}function Gb(e){return Ub(e)||Wb(e)}function Kb(e){return e<0||Gb(e)}var qb=new tv({start:Vb.top,reduce(e,t){return e.type==zb&&(t==jb||t==Pb)?e.parent:e},shift(e,t,n,r){if(t==_b)return new Vb(e,Hb(r,r.pos),Lb);if(t==Sb||t==yb)return new Vb(e,Hb(r,r.pos),Rb);if(t==pb)return e.parent;if(t==Ab||t==Nb)return new Vb(e,0,zb);if(t==kb&&e.type==Bb)return e.parent;if(t==Fb){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new Vb(e,e.depth+ +t[0],Bb)}return e},hash(e){return e.hash}});function Jb(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&Kb(e.peek(n+3))}var Yb=new H_((e,t)=>{if(e.next==-1&&t.canShift(mb))return e.acceptToken(mb);let n=e.peek(-1);if((Wb(n)||n<0)&&t.context.type!=zb){if(Jb(e,45)){if(t.canShift(pb))e.acceptToken(pb);else return e.acceptToken(hb,3)}if(Jb(e,46)){if(t.canShift(pb))e.acceptToken(pb);else return e.acceptToken(gb,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==Lb&&(e.next!=45||!Kb(e.peek(1))))&&e.next!=-1&&!Wb(e.next)&&e.next!=35&&e.acceptToken(pb,-n)}},{contextual:!0}),Xb=new H_((e,t)=>{if(t.context.type==zb){e.next==63&&(e.advance(),Kb(e.next)&&e.acceptToken(xb));return}if(e.next==45)e.advance(),Kb(e.next)&&e.acceptToken(t.context.type==Lb&&t.context.depth==Hb(e,e.pos-1)?vb:_b);else if(e.next==63)e.advance(),Kb(e.next)&&e.acceptToken(t.context.type==Rb&&t.context.depth==Hb(e,e.pos-1)?bb:yb);else{let n=e.pos;for(;;)if(Ub(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)ex(e);else if(e.next==38)tx(e);else if(e.next==42){tx(e);break}else if(e.next==39||e.next==34){if(nx(e,!0))break;return}else if(e.next==91||e.next==123){if(!rx(e))return;break}else{sx(e,!0,!1,0);break}for(;Ub(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(Mb))return;Kb(e.peek(1))&&e.acceptTokenTo(t.context.type==Rb&&t.context.depth==Hb(e,n)?Cb:Sb,n)}}},{contextual:!0});function Zb(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function Qb(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function $b(e,t){return e.next==37?(e.advance(),Qb(e.next)&&e.advance(),Qb(e.next)&&e.advance(),!0):Zb(e.next)||t&&e.next==44?(e.advance(),!0):!1}function ex(e){if(e.advance(),e.next==60){for(e.advance();;)if(!$b(e,!0)){e.next==62&&e.advance();break}}else for(;$b(e,!1););}function tx(e){for(e.advance();!Kb(e.next)&&ax(e.next)!=`f`;)e.advance()}function nx(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(Wb(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function rx(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!nx(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||Wb(e.next))return!1;else e.advance()}var ix=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function ax(e){return e<33?`u`:e>125?`s`:ix[e-33]}function ox(e,t){let n=ax(e);return n!=`u`&&!(t&&n==`f`)}function sx(e,t,n,r){if(ax(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&ox(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;Gb(a);){if(Wb(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?ox(e.peek(o+1),n):a==35?e.peek(o-1)!=32:ox(a,n)))||!n&&s<=r||s==0&&!n&&(Jb(e,45,o)||Jb(e,46,o)))break;if(t&&ax(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var cx=new H_((e,t)=>{if(e.next==33)ex(e),e.acceptToken(Ob);else if(e.next==38||e.next==42){let t=e.next==38?Eb:Db;tx(e),e.acceptToken(t)}else e.next==39||e.next==34?(nx(e,!1),e.acceptToken(Tb)):sx(e,!1,t.context.type==zb,t.context.depth)&&e.acceptToken(wb)}),lx=new H_((e,t)=>{let n=t.context.type==Bb?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(Jb(e,45,i)||Jb(e,46,i))||!Wb(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=Wb(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(kb,r)}),ux=Ol({DirectiveName:J.keyword,DirectiveContent:J.attributeValue,"DirectiveEnd DocEnd":J.meta,QuotedLiteral:J.string,BlockLiteralHeader:J.special(J.string),BlockLiteralContent:J.content,Literal:J.content,"Key/Literal Key/QuotedLiteral":J.definition(J.propertyName),"Anchor Alias":J.labelName,Tag:J.typeName,Comment:J.lineComment,": , -":J.separator,"?":J.punctuation,"[ ]":J.squareBracket,"{ }":J.brace}),dx=nv.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:qb,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[ux],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[Yb,Xb,cx,lx,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),fx=tu.define({name:`yaml`,parser:dx.configure({props:[vu.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:Du({closing:`}`}),FlowSequence:Du({closing:`]`})}),Nu.add({"FlowMapping FlowSequence":Pu,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function px(){return new du(fx)}J.meta;var mx=[[`plantuml`,`PlantUML`],[`mermaid`,`Mermaid`],[`graphviz`,`GraphViz`],[`d2`,`D2`],[`c4plantuml`,`C4 PlantUML`],[`blockdiag`,`BlockDiag`],[`seqdiag`,`SeqDiag`],[`actdiag`,`ActDiag`],[`nwdiag`,`NwDiag`],[`packetdiag`,`PacketDiag`],[`rackdiag`,`RackDiag`],[`bpmn`,`BPMN`],[`bytefield`,`Bytefield`],[`dbml`,`DBML`],[`diagramsnet`,`Diagrams.net`],[`ditaa`,`Ditaa`],[`erd`,`ERD`],[`excalidraw`,`Excalidraw`],[`goat`,`GoAT`],[`nomnoml`,`Nomnoml`],[`pikchr`,`Pikchr`],[`structurizr`,`Structurizr`],[`svgbob`,`Svgbob`],[`symbolator`,`Symbolator`],[`tikz`,`TikZ`],[`umlet`,`UMLet`],[`vega`,`Vega`],[`vegalite`,`Vega-Lite`],[`wavedrom`,`WaveDrom`],[`wireviz`,`WireViz`]].map(([e,t])=>({id:e,label:t})),hx=new Set(`actor.alt.and.as.class.component.database.direction.else.end.endnote.endif.endwhile.flowchart.graph.group.if.interface.loop.namespace.node.note.package.participant.rectangle.return.skinparam.start.state.stop.subgraph.then.title.while`.split(`.`)),gx=Id.define({startState:()=>({blockComment:!1}),token(e,t){return t.blockComment?(e.skipTo(`*/`)?(e.match(`*/`),t.blockComment=!1):e.skipToEnd(),`blockComment`):e.match(`/*`)?(t.blockComment=!0,`blockComment`):e.match(/^\s*(?:%%|\/\/|'|#).*/)?`lineComment`:e.match(/^@(?:start|end)[a-z0-9_]*/i)?`keyword`:e.match(/^"(?:[^"\\]|\\.)*"/)?`string`:e.match(/^(?:--?>|<--?|==>|<==|\.\.>|<\.\.|->|<-|=>|<=|--|\.\.)/)?`operator`:e.match(/^#[0-9a-f]{3,8}\b/i)?`color`:e.match(/^\b\d+(?:\.\d+)?\b/)?`number`:e.match(/^\b[a-z_][\w-]*\b/i)?hx.has(e.current().toLowerCase())?`keyword`:`variableName`:(e.next(),null)}}),_x=new Set([`bytefield`,`excalidraw`,`vega`,`vegalite`,`wavedrom`]),vx=new Set([`bpmn`,`diagramsnet`,`umlet`]);function yx(e){return _x.has(e)?lv():vx.has(e)?ub():e===`wireviz`?px():e===`dbml`?Ty():gx}function bx(e){return mx.some(t=>t.id===e)}function xx(e=``){let t=new URLSearchParams(e).get(`type`);return bx(t)?t:null}function Sx(e,t){if(!bx(t))throw Error(`Unsupported diagram type.`);let n=new URL(e,`https://diagram.zip`);return n.searchParams.set(`type`,t),`${n.pathname}${n.search}${n.hash}`}var Cx=`<?xml version="1.0" encoding="UTF-8"?>1616 <bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:qa="http://some-company/schema/bpmn/qa" id="_RdgBELNaEeSYkoSLDs6j-w" targetNamespace="http://activiti.org/bpmn">1717 <bpmn2:process id="Process_1">1818 <bpmn2:task id="Task_1" name="Examine Situation" qa:suitable="0.7">
@@ -94,13 +94,13 @@ var e=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports);(function
9494 </bpmndi:BPMNPlane>9595 </bpmndi:BPMNDiagram>9696 </bpmn2:definitions>97-`,Cx=`(draw-column-headers)97+`,wx=`(draw-column-headers)9898 (draw-box "Address" {:span 4})9999 (draw-box "Size" {:span 2})100100 (draw-box 0 {:span 2})101101 (draw-gap "Payload")102102 (draw-bottom)103-`,wx=`dogs -> cats -> mice: chase103+`,Tx=`dogs -> cats -> mice: chase104104 replica 1 <-> replica 2105105 a -> b: To err is human, to moo bovine {106106 style.animated: true
@@ -109,7 +109,7 @@ a -> b: To err is human, to moo bovine {
109109 shape: diamond110110 }111111 }112-`,Tx=`Table users {112+`,Ex=`Table users {113113 id integer114114 username varchar115115 role varchar
@@ -132,7 +132,7 @@ Enum post_status {
132132 }133133 134134 Ref: posts.user_id > users.id // many-to-one135-`,Ex=`<mxfile host="localhost" modified="2021-05-13T15:13:49.065Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" etag="wSTZ0NLKJqQDPf-wjMNB" version="@DRAWIO-VERSION@" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">3VpdU+s4DP01PK5HtiTLfmwL3H3ZJ3Zmn0Mb2s4tTSeEBfbXr0LT2wbncvkI7WYDMzSy3CTnyEeSwxlObh+/ldlm8Ucxy1dnDmaPZ3h+5pwlCPqntjxtLUKNYV4uZ43T3nC1/CdvjNBY75ez/K7lWBXFqlpu2sZpsV7n06ply8qyeGi73RSr9lU32TxPDFfTbJVa/1rOqkVjtT7uB37Pl/NFc+ngZDtwnU2/z8vift1cb12s8+3Ibbb7muYZ7xbZrHg4MOHFGU7Koqi2n24fJ/mqhnWH2Hbe5U9Gf9xyma+rt0xwlqmZ9He2um+evLm36mkHhU5S1PVk/LBYVvnVJpvWIw9KvNrKosqqZbFWy28IarhZrlaTYlWUz7PxEoIAq73QecuqDgdfu91VZfE93zk+o4TjRXW70jOrH9OH2d1qXlb544GpebhveXGbV+WTujSj6MAgWYsueI8hNAw1EenYG+/QEgs7jLaJz4c92zrFQAAOzlvhgNFvXRYHvFv9FhSOFAOCOAqNT9bE3/zHXe2J0A8NFz/nxfXIi0VOebkI7PUqp+DFW2fIO6+/7NFjygt7G0J0IZLeJSbE2MgmgKOamaAnMeXFARknMQrqohUl0fbDC36Wlxc0uEsey+QkNDBYDd0YrUdG8YDU5gHZOOuDJ3ZgrfPp+hDoWBAE/SBNPSNt3Wg0fqsQHa4e7h15wmgsB+s9K7awg/ZpB6s1KkkcKIJlQKAEeRetcQREEFXYkEQ6iHA9EcF9pgjqSBGCfjIKJ1kDpBIfiFBCtFFUcNpMeDQYFGjkCACRO4hgQ6A5RKcCk0TqIALEuEBWPFJEiNH1w4tPeBklxCgMVY1kDex6/mexqTl4zgbFurpq/GB3vq3CLLVhrocOE/rz0RP84gy3IbdBARUBDwGDIHfITofq9BXrkmA6HhqmwvACUw1Qzaiq7xIFNBKjHBXTkGA6GRqmAYLRYkUlNWrVwbEt2FpenjJmY4Lv+dDw9ULtUqQdvwLGa65UB4xoO2T4C+FlSOC9GBq8TIkkxHaN4Y4qCZx2naPBaQIzGZF6wQNq+xjbpYPKrDlunKYd43hwmIrnpB44pbZy2u6Nhoeqd+EVdXXxpAinbd54MjiB1S75FYQRgxGwQThErjeLjgpw2r6N/2/4hlPWt5z2YePhFWBRO12P2gVLBPL2RbWApF2yDb7eM6r37Y6Kb0dPdj68CE67MutMjBEic0Br/XGrhbQpGw0uaElrLF37pFAK2wD+Remgw0E1g2zUoCXXscH/hQB3dGWDC1ptD14pcYlOKbs+7cvS7a8370t27ErefPDF1bzMZst8z0njccggfy1tCrFhODhebFcwGl06on21hQAdyyLWwrQ/OvY0lfrgg3gR0gN3+eKznKZ9Ybr99hlO8w++9Do2eW0dg1/wRR2rTEtOiFrb67L1tfpRPwSlTWbaDb3v/dcNX8t0aIywN6CwkmZuAXkrJWLIqVoGbbL0x0o/lKQtaprI3/miLMuuPyB8J6WEgA1GrVRBIvlgO7rYIy6TtKlNc/9ndEzQT7MPvDH77yQhYjIuIEBg9BARO8rfX6chdXFgRbkTFUfaFV3voE9P9/9w8zx28A9NePEv</diagram></mxfile>`,Dx=`[Person]135+`,Dx=`<mxfile host="localhost" modified="2021-05-13T15:13:49.065Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" etag="wSTZ0NLKJqQDPf-wjMNB" version="@DRAWIO-VERSION@" type="device"><diagram id="3228e29e-7158-1315-38df-8450db1d8a1d" name="Page-1">3VpdU+s4DP01PK5HtiTLfmwL3H3ZJ3Zmn0Mb2s4tTSeEBfbXr0LT2wbncvkI7WYDMzSy3CTnyEeSwxlObh+/ldlm8Ucxy1dnDmaPZ3h+5pwlCPqntjxtLUKNYV4uZ43T3nC1/CdvjNBY75ez/K7lWBXFqlpu2sZpsV7n06ply8qyeGi73RSr9lU32TxPDFfTbJVa/1rOqkVjtT7uB37Pl/NFc+ngZDtwnU2/z8vift1cb12s8+3Ibbb7muYZ7xbZrHg4MOHFGU7Koqi2n24fJ/mqhnWH2Hbe5U9Gf9xyma+rt0xwlqmZ9He2um+evLm36mkHhU5S1PVk/LBYVvnVJpvWIw9KvNrKosqqZbFWy28IarhZrlaTYlWUz7PxEoIAq73QecuqDgdfu91VZfE93zk+o4TjRXW70jOrH9OH2d1qXlb544GpebhveXGbV+WTujSj6MAgWYsueI8hNAw1EenYG+/QEgs7jLaJz4c92zrFQAAOzlvhgNFvXRYHvFv9FhSOFAOCOAqNT9bE3/zHXe2J0A8NFz/nxfXIi0VOebkI7PUqp+DFW2fIO6+/7NFjygt7G0J0IZLeJSbE2MgmgKOamaAnMeXFARknMQrqohUl0fbDC36Wlxc0uEsey+QkNDBYDd0YrUdG8YDU5gHZOOuDJ3ZgrfPp+hDoWBAE/SBNPSNt3Wg0fqsQHa4e7h15wmgsB+s9K7awg/ZpB6s1KkkcKIJlQKAEeRetcQREEFXYkEQ6iHA9EcF9pgjqSBGCfjIKJ1kDpBIfiFBCtFFUcNpMeDQYFGjkCACRO4hgQ6A5RKcCk0TqIALEuEBWPFJEiNH1w4tPeBklxCgMVY1kDex6/mexqTl4zgbFurpq/GB3vq3CLLVhrocOE/rz0RP84gy3IbdBARUBDwGDIHfITofq9BXrkmA6HhqmwvACUw1Qzaiq7xIFNBKjHBXTkGA6GRqmAYLRYkUlNWrVwbEt2FpenjJmY4Lv+dDw9ULtUqQdvwLGa65UB4xoO2T4C+FlSOC9GBq8TIkkxHaN4Y4qCZx2naPBaQIzGZF6wQNq+xjbpYPKrDlunKYd43hwmIrnpB44pbZy2u6Nhoeqd+EVdXXxpAinbd54MjiB1S75FYQRgxGwQThErjeLjgpw2r6N/2/4hlPWt5z2YePhFWBRO12P2gVLBPL2RbWApF2yDb7eM6r37Y6Kb0dPdj68CE67MutMjBEic0Br/XGrhbQpGw0uaElrLF37pFAK2wD+Remgw0E1g2zUoCXXscH/hQB3dGWDC1ptD14pcYlOKbs+7cvS7a8370t27ErefPDF1bzMZst8z0njccggfy1tCrFhODhebFcwGl06on21hQAdyyLWwrQ/OvY0lfrgg3gR0gN3+eKznKZ9Ybr99hlO8w++9Do2eW0dg1/wRR2rTEtOiFrb67L1tfpRPwSlTWbaDb3v/dcNX8t0aIywN6CwkmZuAXkrJWLIqVoGbbL0x0o/lKQtaprI3/miLMuuPyB8J6WEgA1GrVRBIvlgO7rYIy6TtKlNc/9ndEzQT7MPvDH77yQhYjIuIEBg9BARO8rfX6chdXFgRbkTFUfaFV3voE9P9/9w8zx28A9NePEv</diagram></mxfile>`,Ox=`[Person]136136 *name137137 height138138 weight
@@ -145,7 +145,7 @@ state
145145 country146146 147147 Person *--1 Location148-`,Ox=`{148+`,kx=`{149149 "type": "excalidraw",150150 "version": 2,151151 "source": "https://excalidraw.com",
@@ -503,7 +503,7 @@ Person *--1 Location
503503 "gridSize": null504504 }505505 }506-`,kx=`+-------------------+ ^ .---.506+`,Ax=`+-------------------+ ^ .---.507507 | ‗A Box‗ |__.--.__ __.--> | .-. | |508508 | | '--' v | * |<--- | |509509 +-------------------+ '-' | |
@@ -527,7 +527,7 @@ Person *--1 Location
527527 .-. .---+--------. / A || B ·bold· | ^528528 | | | Not a dot | <---+---<-- A dash--is not a line v |529529 '-' '---------+--' / Nor/is this. ---530-`,Ax=`[Pirate|eyeCount: Int|raid();pillage()|530+`,jx=`[Pirate|eyeCount: Int|raid();pillage()|531531 [beard]--[parrot]532532 [beard]-:>[foul mouth]533533 ]
@@ -540,7 +540,7 @@ Person *--1 Location
540540 [Pirate]-> *[rum|tastiness: Int|swig()]541541 [Pirate]->[singing]542542 [singing]<->[rum]543-`,jx=`nwdiag {543+`,Mx=`nwdiag {544544 network dmz {545545 address = "210.x.x.x/24"546546
@@ -556,7 +556,7 @@ Person *--1 Location
556556 db02;557557 }558558 }559-`,Mx=`packetdiag {559+`,Nx=`packetdiag {560560 colwidth = 32;561561 node_height = 72;562562
@@ -578,12 +578,12 @@ Person *--1 Location
578578 160-191: (Options and Padding);579579 192-223: data [colheight = 3];580580 }581-`,Nx=`D: diamond "Cardinal" "Points"581+`,Px=`D: diamond "Cardinal" "Points"582582 dot ".n" above at D.n583583 dot " .e" ljust at D.e584584 dot ".s" below at D.s585585 dot ".w " rjust at D.w586-`,Px=`rackdiag {586+`,Fx=`rackdiag {587587 16U;588588 1: UPS [2U];589589 3: DB Server;
@@ -593,7 +593,7 @@ Person *--1 Location
593593 7: Load Balancer;594594 8: L3 Switch;595595 }596-`,Fx=` .-,( ),-.596+`,Ix=` .-,( ),-.597597 ___ _ .-( )-.598598 [___]|=| -->( ) __________599599 /::/ |_| '-( ).-' --->[_...__... ]
@@ -602,7 +602,7 @@ Person *--1 Location
602602 '--->| | |==|603603 |____| | |604604 /::::/ |__|605-`,Ix=`module demo_device #(605+`,Lx=`module demo_device #(606606 //# {{}}607607 parameter SIZE = 8,608608 parameter RESET_ACTIVE_LEVEL = 1
@@ -617,7 +617,7 @@ Person *--1 Location
617617 output wire [SIZE-1:0] data_out618618 );619619 // ...620-endmodule`,Lx=`% From: https://tikz.net/periodic-table/620+endmodule`,Rx=`% From: https://tikz.net/periodic-table/621621 622622 % Adapted from https://texample.net/tikz/examples/periodic-table-of-chemical-elements.623623 % All Credit to Ivan Griffin.
@@ -893,7 +893,7 @@ endmodule`,Lx=`% From: https://tikz.net/periodic-table/
893893 \\end{tikzpicture}894894 895895 \\end{document}896-`,Rx=`<?xml version="1.0" encoding="UTF-8"?>896+`,zx=`<?xml version="1.0" encoding="UTF-8"?>897897 <umlet_diagram>898898 <element>899899 <type>com.umlet.element.base.Relation</type>
@@ -1246,7 +1246,7 @@ endmodule`,Lx=`% From: https://tikz.net/periodic-table/
12461246 <additional_attributes>transparentSelection=false</additional_attributes>12471247 </element>12481248 </umlet_diagram>1249-`,zx=`{1249+`,Bx=`{12501250 "$schema": "https://vega.github.io/schema/vega/v5.json",12511251 "width": 400,12521252 "height": 200,
@@ -1341,7 +1341,7 @@ endmodule`,Lx=`% From: https://tikz.net/periodic-table/
13411341 }13421342 ]13431343 }1344-`,Bx=`{1344+`,Vx=`{13451345 "$schema": "https://vega.github.io/schema/vega-lite/v4.json",13461346 "description": "Horizontally concatenated charts that show different types of discretizing scales.",13471347 "data": {
@@ -1470,14 +1470,14 @@ endmodule`,Lx=`% From: https://tikz.net/periodic-table/
14701470 }14711471 }14721472 }1473-`,Vx=`{ signal: [1473+`,Hx=`{ signal: [14741474 { name: "clk", wave: "p.....|..." },14751475 { name: "Data", wave: "x.345x|=.x", data: ["head", "body", "tail", "data"] },14761476 { name: "Request", wave: "0.1..0|1.0" },14771477 {},14781478 { name: "Acknowledge", wave: "1.....|01." }14791479 ]}1480-`,Hx=`connectors:1480+`,Ux=`connectors:14811481 X1:14821482 type: D-Sub14831483 subtype: female
@@ -1503,7 +1503,7 @@ connections:
15031503 -15041504 - X1: 515051505 - W1: s1506-`;function Ux(e){return e^e>>1}function Wx(e,t){let n=Ux(e);return{meta:{title:n&1?t.title:``,description:n&2?t.description:``},presentation:{background:n&4?`#f4f4f4`:``,padding:n&8?24:0,frame:!!(n&16)}}}var Gx=4,Kx=0,qx=1,Jx=2;function Yx(e){let t=e.length;for(;--t>=0;)e[t]=0}var Xx=29,Zx=256,Qx=286,$x=30,eS=19,tS=573,nS=15,rS=16,iS=256,aS=16,oS=17,sS=18,cS=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),lS=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);var uS=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dS=512,fS=Array(576);Yx(fS);var pS=Array($x*2);Yx(pS);var mS=Array(dS);Yx(mS);var hS=Array(256);Yx(hS);var gS=Array(Xx);Yx(gS);var _S=Array($x);Yx(_S);var vS=e=>e<256?mS[e]:mS[256+(e>>>7)],yS=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},bS=(e,t,n)=>{e.bi_valid>rS-n?(e.bi_buf|=t<<e.bi_valid&65535,yS(e,e.bi_buf),e.bi_buf=t>>rS-e.bi_valid,e.bi_valid+=n-rS):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},xS=(e,t,n)=>{bS(e,n[t*2],n[t*2+1])},SS=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},CS=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=nS;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<tS;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},wS=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=nS;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=SS(r[t]++,t))}},TS=e=>{let t;for(t=0;t<Qx;t++)e.dyn_ltree[t*2]=0;for(t=0;t<$x;t++)e.dyn_dtree[t*2]=0;for(t=0;t<eS;t++)e.bl_tree[t*2]=0;e.dyn_ltree[iS*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},ES=e=>{e.bi_valid>8?yS(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},DS=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},OS=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&DS(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!DS(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},kS=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?xS(e,i,t):(o=hS[i],xS(e,o+Zx+1,t),s=cS[o],s!==0&&(i-=gS[o],bS(e,i,s)),r--,o=vS(r),xS(e,o,n),s=lS[o],s!==0&&(r-=_S[o],bS(e,r,s)));while(a<e.sym_next);xS(e,iS,t)},AS=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=tS,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)OS(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],OS(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,OS(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],CS(e,t),wS(n,c,e.bl_count)},jS=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},MS=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do xS(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(xS(e,oS,e.bl_tree),bS(e,s-3,3)):(xS(e,sS,e.bl_tree),bS(e,s-11,7)):(a!==i&&(xS(e,a,e.bl_tree),s--),xS(e,aS,e.bl_tree),bS(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},NS=e=>{let t;for(jS(e,e.dyn_ltree,e.l_desc.max_code),jS(e,e.dyn_dtree,e.d_desc.max_code),AS(e,e.bl_desc),t=18;t>=3&&e.bl_tree[uS[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},PS=(e,t,n,r)=>{let i;for(bS(e,t-257,5),bS(e,n-1,5),bS(e,r-4,4),i=0;i<r;i++)bS(e,e.bl_tree[uS[i]*2+1],3);MS(e,e.dyn_ltree,t-1),MS(e,e.dyn_dtree,n-1)},FS=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return Kx;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return qx;for(n=32;n<Zx;n++)if(e.dyn_ltree[n*2]!==0)return qx;return Kx},IS=(e,t,n,r)=>{bS(e,0+ +!!r,3),ES(e),yS(e,n),yS(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},LS=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===Jx&&(e.strm.data_type=FS(e)),AS(e,e.l_desc),AS(e,e.d_desc),o=NS(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?IS(e,t,n,r):e.strategy===Gx||a===i?(bS(e,2+ +!!r,3),kS(e,fS,pS)):(bS(e,4+ +!!r,3),PS(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),kS(e,e.dyn_ltree,e.dyn_dtree)),TS(e),r&&ES(e)},RS=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(hS[n]+Zx+1)*2]++,e.dyn_dtree[vS(t)*2]++),e.sym_next===e.sym_end),zS=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},BS=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),VS=(e,t,n,r)=>{let i=BS,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},Z=3,HS=258,US=262,WS=1,GS=2,KS=3,qS=4,JS=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},YS=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,XS=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=YS(e,e.ins_h,e.window[t+Z-1]);else{let r=e.window,i=r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24;n=e.ins_h=Math.imul(i,66521)+66521>>>16&e.hash_mask}let r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},ZS=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},QS=(e,t)=>{LS(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,ZS(e.strm)},$S=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=zS(e.adler,t,i,n):e.state.wrap===2&&(e.adler=VS(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},eC=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-US?e.strstart-(e.w_size-US):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+HS,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=HS-(f-r),r=f-HS,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},tC=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-US)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),JS(e),r+=t),e.strm.avail_in===0)break;if(n=$S(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>Z)for(i=e.strstart-e.insert;e.insert&&(XS(e,i),i++,e.insert--,!(e.lookahead+e.insert<=Z)););}else if(e.lookahead+e.insert>=Z)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=YS(e,e.ins_h,e.window[i+1]);e.insert&&(XS(e,i),i++,e.insert--,!(e.lookahead+e.insert<Z)););}while(e.lookahead<US&&e.strm.avail_in!==0)},nC=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==4||t===0||r!==i+e.strm.avail_in)))break;o=+(t===4&&r===i+e.strm.avail_in),IS(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,ZS(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&($S(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?qS:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?GS:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&($S(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===4)&&t!==0&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===4&&e.strm.avail_in===0&&r===i),IS(e,e.block_start,r,o),e.block_start+=r,ZS(e.strm)),o?KS:WS)},rC=(e,t)=>{let n,r;for(;;){if(e.lookahead<US){if(tC(e),e.lookahead<US&&t===0)return WS;if(e.lookahead===0)break}if(n=0,e.lookahead>=Z&&(n=XS(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-US&&(e.match_length=eC(e,n)),e.match_length>=Z){if(r=RS(e,e.strstart-e.match_start,e.match_length-Z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Z){e.match_length--;do e.strstart++,n=XS(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=YS(e,e.ins_h,e.window[e.strstart+1]))}else r=RS(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(QS(e,!1),e.strm.avail_out===0))return WS}return e.insert=e.strstart<Z-1?e.strstart:Z-1,t===4?(QS(e,!0),e.strm.avail_out===0?KS:qS):e.sym_next&&(QS(e,!1),e.strm.avail_out===0)?WS:GS},iC=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<US){if(tC(e),e.lookahead<US&&t===0)return WS;if(e.lookahead===0)break}if(n=0,e.lookahead>=Z&&(n=XS(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Z-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-US&&(e.match_length=eC(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===Z&&e.strstart-e.match_start>4096)&&(e.match_length=Z-1)),e.prev_length>=Z&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Z,r=RS(e,e.strstart-1-e.prev_match,e.prev_length-Z),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=XS(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Z-1,e.strstart++,r&&(QS(e,!1),e.strm.avail_out===0))return WS}else if(e.match_available){if(r=RS(e,0,e.window[e.strstart-1]),r&&QS(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return WS}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=RS(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<Z-1?e.strstart:Z-1,t===4?(QS(e,!0),e.strm.avail_out===0?KS:qS):e.sym_next&&(QS(e,!1),e.strm.avail_out===0)?WS:GS},aC=class{constructor(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}};new aC(0,0,0,0,nC),new aC(4,4,8,4,rC),new aC(4,5,16,8,rC),new aC(4,6,32,32,rC),new aC(4,4,16,16,iC),new aC(8,16,32,32,iC),new aC(8,16,128,128,iC),new aC(8,32,128,256,iC),new aC(32,128,258,1024,iC),new aC(32,258,258,4096,iC),new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var oC=`plantuml`,sC=`@startuml1506+`;function Wx(e){return e^e>>1}function Gx(e,t){let n=Wx(e);return{meta:{title:n&1?t.title:``,description:n&2?t.description:``},presentation:{background:n&4?`#f4f4f4`:``,padding:n&8?24:0,frame:!!(n&16)}}}var Kx=4,qx=0,Jx=1,Yx=2;function Xx(e){let t=e.length;for(;--t>=0;)e[t]=0}var Zx=29,Qx=256,$x=286,eS=30,tS=19,nS=573,rS=15,iS=16,aS=256,oS=16,sS=17,cS=18,lS=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),uS=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]);new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]);var dS=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),fS=512,pS=Array(576);Xx(pS);var mS=Array(eS*2);Xx(mS);var hS=Array(fS);Xx(hS);var gS=Array(256);Xx(gS);var _S=Array(Zx);Xx(_S);var vS=Array(eS);Xx(vS);var yS=e=>e<256?hS[e]:hS[256+(e>>>7)],bS=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},xS=(e,t,n)=>{e.bi_valid>iS-n?(e.bi_buf|=t<<e.bi_valid&65535,bS(e,e.bi_buf),e.bi_buf=t>>iS-e.bi_valid,e.bi_valid+=n-iS):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},SS=(e,t,n)=>{xS(e,n[t*2],n[t*2+1])},CS=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},wS=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=rS;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<nS;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},TS=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=rS;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=CS(r[t]++,t))}},ES=e=>{let t;for(t=0;t<$x;t++)e.dyn_ltree[t*2]=0;for(t=0;t<eS;t++)e.dyn_dtree[t*2]=0;for(t=0;t<tS;t++)e.bl_tree[t*2]=0;e.dyn_ltree[aS*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},DS=e=>{e.bi_valid>8?bS(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},OS=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},kS=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&OS(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!OS(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},AS=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?SS(e,i,t):(o=gS[i],SS(e,o+Qx+1,t),s=lS[o],s!==0&&(i-=_S[o],xS(e,i,s)),r--,o=yS(r),SS(e,o,n),s=uS[o],s!==0&&(r-=vS[o],xS(e,r,s)));while(a<e.sym_next);SS(e,aS,t)},jS=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=nS,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)kS(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],kS(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,kS(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],wS(e,t),TS(n,c,e.bl_count)},MS=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},NS=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do SS(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(SS(e,sS,e.bl_tree),xS(e,s-3,3)):(SS(e,cS,e.bl_tree),xS(e,s-11,7)):(a!==i&&(SS(e,a,e.bl_tree),s--),SS(e,oS,e.bl_tree),xS(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},PS=e=>{let t;for(MS(e,e.dyn_ltree,e.l_desc.max_code),MS(e,e.dyn_dtree,e.d_desc.max_code),jS(e,e.bl_desc),t=18;t>=3&&e.bl_tree[dS[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},FS=(e,t,n,r)=>{let i;for(xS(e,t-257,5),xS(e,n-1,5),xS(e,r-4,4),i=0;i<r;i++)xS(e,e.bl_tree[dS[i]*2+1],3);NS(e,e.dyn_ltree,t-1),NS(e,e.dyn_dtree,n-1)},IS=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return qx;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return Jx;for(n=32;n<Qx;n++)if(e.dyn_ltree[n*2]!==0)return Jx;return qx},LS=(e,t,n,r)=>{xS(e,0+ +!!r,3),DS(e),bS(e,n),bS(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},RS=(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===Yx&&(e.strm.data_type=IS(e)),jS(e,e.l_desc),jS(e,e.d_desc),o=PS(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?LS(e,t,n,r):e.strategy===Kx||a===i?(xS(e,2+ +!!r,3),AS(e,pS,mS)):(xS(e,4+ +!!r,3),FS(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),AS(e,e.dyn_ltree,e.dyn_dtree)),ES(e),r&&DS(e)},zS=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(gS[n]+Qx+1)*2]++,e.dyn_dtree[yS(t)*2]++),e.sym_next===e.sym_end),BS=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},VS=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),HS=(e,t,n,r)=>{let i=VS,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},Z=3,US=258,WS=262,GS=1,KS=2,qS=3,JS=4,YS=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},XS=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,ZS=(e,t)=>{let n;if(e.legacy_hash)n=e.ins_h=XS(e,e.ins_h,e.window[t+Z-1]);else{let r=e.window,i=r[t]|r[t+1]<<8|r[t+2]<<16|r[t+3]<<24;n=e.ins_h=Math.imul(i,66521)+66521>>>16&e.hash_mask}let r=e.prev[t&e.w_mask]=e.head[n];return e.head[n]=t,r},QS=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},$S=(e,t)=>{RS(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,QS(e.strm)},eC=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=BS(e.adler,t,i,n):e.state.wrap===2&&(e.adler=HS(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},tC=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-WS?e.strstart-(e.w_size-WS):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+US,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do if(i=t,l[i+o]===m&&l[i+o-1]===p&&l[i]===l[r]&&l[++i]===l[r+1]){r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=US-(f-r),r=f-US,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},nC=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-WS)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),YS(e),r+=t),e.strm.avail_in===0)break;if(n=eC(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,!e.legacy_hash){if(e.lookahead+e.insert>Z)for(i=e.strstart-e.insert;e.insert&&(ZS(e,i),i++,e.insert--,!(e.lookahead+e.insert<=Z)););}else if(e.lookahead+e.insert>=Z)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=XS(e,e.ins_h,e.window[i+1]);e.insert&&(ZS(e,i),i++,e.insert--,!(e.lookahead+e.insert<Z)););}while(e.lookahead<WS&&e.strm.avail_in!==0)},rC=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==4||t===0||r!==i+e.strm.avail_in)))break;o=+(t===4&&r===i+e.strm.avail_in),LS(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,QS(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(eC(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?JS:t!==0&&t!==4&&e.strm.avail_in===0&&e.strstart===e.block_start?KS:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(eC(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===4)&&t!==0&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===4&&e.strm.avail_in===0&&r===i),LS(e,e.block_start,r,o),e.block_start+=r,QS(e.strm)),o?qS:GS)},iC=(e,t)=>{let n,r;for(;;){if(e.lookahead<WS){if(nC(e),e.lookahead<WS&&t===0)return GS;if(e.lookahead===0)break}if(n=0,e.lookahead>=Z&&(n=ZS(e,e.strstart)),n!==0&&e.strstart-n<=e.w_size-WS&&(e.match_length=tC(e,n)),e.match_length>=Z){if(r=zS(e,e.strstart-e.match_start,e.match_length-Z),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=Z){e.match_length--;do e.strstart++,n=ZS(e,e.strstart);while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.legacy_hash&&(e.ins_h=e.window[e.strstart],e.ins_h=XS(e,e.ins_h,e.window[e.strstart+1]))}else r=zS(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&($S(e,!1),e.strm.avail_out===0))return GS}return e.insert=e.strstart<Z-1?e.strstart:Z-1,t===4?($S(e,!0),e.strm.avail_out===0?qS:JS):e.sym_next&&($S(e,!1),e.strm.avail_out===0)?GS:KS},aC=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<WS){if(nC(e),e.lookahead<WS&&t===0)return GS;if(e.lookahead===0)break}if(n=0,e.lookahead>=Z&&(n=ZS(e,e.strstart)),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=Z-1,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-WS&&(e.match_length=tC(e,n),e.match_length<=5&&(e.strategy===1||e.match_length===Z&&e.strstart-e.match_start>4096)&&(e.match_length=Z-1)),e.prev_length>=Z&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-Z,r=zS(e,e.strstart-1-e.prev_match,e.prev_length-Z),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(n=ZS(e,e.strstart));while(--e.prev_length!==0);if(e.match_available=0,e.match_length=Z-1,e.strstart++,r&&($S(e,!1),e.strm.avail_out===0))return GS}else if(e.match_available){if(r=zS(e,0,e.window[e.strstart-1]),r&&$S(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return GS}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=zS(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<Z-1?e.strstart:Z-1,t===4?($S(e,!0),e.strm.avail_out===0?qS:JS):e.sym_next&&($S(e,!1),e.strm.avail_out===0)?GS:KS},oC=class{constructor(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}};new oC(0,0,0,0,rC),new oC(4,4,8,4,iC),new oC(4,5,16,8,iC),new oC(4,6,32,32,iC),new oC(4,4,16,16,aC),new oC(8,16,32,32,aC),new oC(8,16,128,128,aC),new oC(8,32,128,256,aC),new oC(32,128,258,1024,aC),new oC(32,258,258,4096,aC),new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var sC=`plantuml`,cC=`@startuml15071507 skinparam monochrome true15081508 skinparam shadowing false15091509
@@ -1521,7 +1521,7 @@ Alice -> Tandem: Add "Buy paint"
15211521 Tandem -> Bob: Share the new task15221522 Bob -> Tandem: Mark it done15231523 Tandem --> Alice: Everyone is in sync1524-@enduml`;new TextEncoder,new TextDecoder;function cC(e={}){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Invalid diagram metadata.`);let t=e.title??``,n=e.description??``;if(typeof t!=`string`||typeof n!=`string`)throw Error(`Invalid diagram metadata.`);return{title:t,description:n}}function lC(e={}){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Invalid diagram presentation.`);let t=e.background??``,n=e.padding??0,r=e.frame??!1;if(typeof t!=`string`||t&&!/^#[0-9a-f]{6}$/i.test(t)||!Number.isInteger(n)||n<0||n>256||typeof r!=`boolean`)throw Error(`Invalid diagram presentation.`);return{background:t,padding:n,frame:r}}var uC={plantuml:sC,mermaid:`flowchart LR1524+@enduml`;new TextEncoder,new TextDecoder;function lC(e={}){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Invalid diagram metadata.`);let t=e.title??``,n=e.description??``;if(typeof t!=`string`||typeof n!=`string`)throw Error(`Invalid diagram metadata.`);return{title:t,description:n}}function uC(e={}){if(typeof e!=`object`||!e||Array.isArray(e))throw Error(`Invalid diagram presentation.`);let t=e.background??``,n=e.padding??0,r=e.frame??!1;if(typeof t!=`string`||t&&!/^#[0-9a-f]{6}$/i.test(t)||!Number.isInteger(n)||n<0||n>256||typeof r!=`boolean`)throw Error(`Invalid diagram presentation.`);return{background:t,padding:n,frame:r}}var dC={plantuml:cC,mermaid:`flowchart LR15251525 Alice([Alice]) -->|describes the shared list| AliceAgent["Alice Agent"]15261526 AliceAgent -->|drafts the experience| Tandem["Tandem App"]15271527 Bob([Bob]) -->|reviews the plan| BobAgent["Bob Agent"]
@@ -1640,11 +1640,11 @@ Rel(bob, tandem, "Completes tasks")
16401640 +--------+--------+16411641 | Shared Tasks |16421642 | {s} |1643- +-----------------+`,d2:wx,nwdiag:jx,packetdiag:Mx,rackdiag:Px,bpmn:Sx.replaceAll(`Examine Situation`,`Bob Agent tests Tandem`).replaceAll(`Things OK?`,`Tests pass?`).replaceAll(`Notification Sent`,`Alice and Bob share tasks`).replaceAll(`Error Propagated`,`Alice Agent revises flow`).replaceAll(`Klaus`,`Alice`).replaceAll(`Walter`,`Bob`),bytefield:Cx,dbml:Tx,diagramsnet:Ex,erd:Dx,excalidraw:Ox,goat:kx,nomnoml:Ax,pikchr:Nx,svgbob:Fx,symbolator:Ix,tikz:Lx,umlet:Rx,vega:zx,vegalite:Bx,wavedrom:Vx,wireviz:Hx},dC={plantuml:[`Tandem task sync`,`Alice and Bob coordinate shared tasks through their agents.`],mermaid:[`Shared task flow`,`A compact view of ideas moving through the Tandem team.`],graphviz:[`Tandem collaboration graph`,`People and agents converge on one synchronized task list.`],d2:[`Connection styles`,`D2 connection, arrowhead, shape, and animation syntax.`],c4plantuml:[`Tandem system context`,`The people and software systems surrounding Tandem.`],blockdiag:[`Tandem block flow`,`A block-oriented view of the shared task workflow.`],seqdiag:[`Tandem task sequence`,`A task moves from Alice to Bob and back through Tandem.`],actdiag:[`Tandem delivery activities`,`Work crosses Alice, Alice Agent, and Bob Agent lanes.`],nwdiag:[`Network layout`,`A sample network topology and its connected address ranges.`],packetdiag:[`TCP packet structure`,`The bit-level layout of a TCP packet header.`],rackdiag:[`Rack layout`,`A sample equipment rack rendered from rackdiag syntax.`],bpmn:[`Agent-assisted review`,`A BPMN review flow that branches on test results.`],bytefield:[`Byte field layout`,`A compact byte-oriented protocol field example.`],dbml:[`Database schema`,`Tables and relationships expressed with DBML.`],diagramsnet:[`Venn diagram`,`An overlapping-set example imported from diagrams.net.`],ditaa:[`Tandem ASCII architecture`,`An ASCII sketch becomes a rendered system diagram.`],erd:[`Data model`,`Entities and relationships in a small relational schema.`],excalidraw:[`Venn sketch`,`A hand-drawn overlapping-set diagram.`],goat:[`Component shapes`,`GoAT exercises boxes, connectors, curves, and symbols.`],nomnoml:[`Pirate class diagram`,`A playful class diagram demonstrating Nomnoml syntax.`],pikchr:[`Cardinal points`,`A diamond marks north, east, south, and west.`],structurizr:[`Tandem landscape`,`A software landscape linking people, agents, and Tandem.`],svgbob:[`Cloud network`,`An ASCII cloud connects clients and services.`],symbolator:[`Hardware component`,`A component symbol generated from interface declarations.`],tikz:[`Periodic table`,`A color-coded periodic table rendered with TikZ.`],umlet:[`UML example`,`A UMLet document rendered directly from its XML form.`],vega:[`Bar chart`,`A declarative bar chart expressed with Vega.`],vegalite:[`Discretizing scale`,`A Vega-Lite example comparing discretized values.`],wavedrom:[`Timing diagram`,`Digital signals and timing relationships rendered by WaveDrom.`],wireviz:[`Wiring harness`,`Connections, cables, and pins described with WireViz.`]};function fC(e){return uC[e]??sC}function pC(e){let t=mx.findIndex(t=>t.id===e),[n,r]=dC[e]??[`Diagram example`,`A diagram.zip catalog example.`];return{type:e,source:fC(e),options:{},...Wx(Math.max(t,0),{title:n,description:r})}}function mC(e,t,n,r,i){return e.set(t,{...r,type:t}),e.get(n)??i(n)}var hC=`/api/v1`,gC=/^[A-Za-z0-9_-]{16}$/,_C=/^[A-Za-z0-9_-]{43}$/;function vC(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function yC(){return vC(crypto.getRandomValues(new Uint8Array(32)))}function bC(e){return e.match(/^\/d\/([A-Za-z0-9_-]{16})\/?$/)?.[1]??null}function xC(e,t){if(!gC.test(t))throw Error(`Invalid diagram alias.`);return new URL(`/d/${t}`,e).toString()}function SC(e,t,n){if(!_C.test(n))throw Error(`Invalid write capability.`);let r=new URL(xC(e,t));return r.hash=`w=${n}`,r.toString()}function CC(e,t,n=`svg`){if(!gC.test(t))throw Error(`Invalid diagram alias.`);if(n!==`svg`&&n!==`png`)throw Error(`Invalid render format.`);return new URL(`${hC}/aliases/${t}/renders/${n}`,e).toString()}function wC(e){return e.match(/^#w=([A-Za-z0-9_-]{43})$/)?.[1]??null}var TC=class extends Error{constructor(e,{status:t,code:n}={}){super(e),this.status=t,this.code=n}};function EC(e){if(!e||typeof e!=`object`||typeof e.type!=`string`||typeof e.source!=`string`)throw Error(`Invalid diagram state.`);return{mode:`open`,diagram:{type:e.type,source:e.source,options:e.options??{},presentation:lC(e.presentation)},metadata:cC(e.meta)}}function DC(e){if(!e||typeof e!=`object`||!gC.test(e.aliasId)||!_C.test(e.contentId)||!_C.test(e.renderId)||!Number.isSafeInteger(e.revision)||e.mode!==`open`&&e.mode!==`locked`)throw new TC(`The persistence service returned an invalid response.`,{code:`invalid_response`});let t={aliasId:e.aliasId,contentId:e.contentId,renderId:e.renderId,revision:e.revision,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt};if(e.mode===`locked`){if(!e.encryptedContent||!e.encryptedMetadata||!e.keyEnvelope)throw new TC(`The persistence service returned an invalid locked diagram.`,{code:`invalid_response`});return{...t,encryptedContent:e.encryptedContent,encryptedMetadata:e.encryptedMetadata,keyEnvelope:e.keyEnvelope}}if(!e.diagram||typeof e.diagram!=`object`)throw new TC(`The persistence service returned an invalid open diagram.`,{code:`invalid_response`});return{...t,state:{type:e.diagram.type,source:e.diagram.source,options:e.diagram.options??{},presentation:lC(e.diagram.presentation),meta:cC(e.metadata)}}}var OC=class{constructor({fetchImpl:e=globalThis.fetch,origin:t=globalThis.location?.origin??`http://localhost`,apiPrefix:n=hC}={}){this.fetch=(...t)=>e(...t),this.origin=t,this.apiPrefix=n.replace(/\/$/,``)}url(e=``){return new URL(`${this.apiPrefix}/aliases${e}`,this.origin)}async request(e,t){let n=await this.fetch(e,t),r=await n.json().catch(()=>null);if(!n.ok)throw new TC(r?.error?.message||`Persistence request failed with HTTP ${n.status}.`,{status:n.status,code:r?.error?.code});return DC(r)}async errorFor(e){let t=await e.json().catch(()=>null);return new TC(t?.error?.message||`Persistence request failed with HTTP ${e.status}.`,{status:e.status,code:t?.error?.code})}async createPayload(e){let t=yC();return{...await this.request(this.url(),{method:`POST`,headers:{Authorization:`Bearer ${t}`,"Content-Type":`application/json`},body:JSON.stringify(e)}),writeCapability:t}}createAlias(e){return this.createPayload(EC(e))}createLockedAlias(e){if(e?.mode!==`locked`)throw Error(`Invalid locked diagram payload.`);return this.createPayload(e)}getAlias(e){if(!gC.test(e))throw Error(`Invalid diagram alias.`);return this.request(this.url(`/${e}`),{headers:{Accept:`application/json`}})}updatePayload(e,t,n,r){if(!gC.test(e))throw Error(`Invalid diagram alias.`);if(!Number.isSafeInteger(n)||n<1)throw Error(`Invalid alias revision.`);if(!_C.test(r))throw Error(`Invalid write capability.`);return this.request(this.url(`/${e}`),{method:`PUT`,headers:{Accept:`application/json`,Authorization:`Bearer ${r}`,"Content-Type":`application/json`,"If-Match":`"${n}"`},body:JSON.stringify(t)})}updateAlias(e,t,n,r){return this.updatePayload(e,EC(t),n,r)}updateLockedAlias(e,t,n,r){if(t?.mode!==`locked`)throw Error(`Invalid locked diagram payload.`);return this.updatePayload(e,t,n,r)}async uploadRender({aliasId:e,renderId:t,revision:n,writeCapability:r,format:i,mode:a,render:o}){if(!gC.test(e))throw Error(`Invalid diagram alias.`);if(!_C.test(t))throw Error(`Invalid render ID.`);if(!Number.isSafeInteger(n)||n<1)throw Error(`Invalid alias revision.`);if(!_C.test(r))throw Error(`Invalid write capability.`);if(i!==`svg`&&i!==`png`)throw Error(`Invalid render format.`);if(a!==`open`&&a!==`locked`)throw Error(`Invalid diagram mode.`);let s=a===`locked`?`application/json`:i===`svg`?`image/svg+xml`:`image/png`,c=a===`locked`?JSON.stringify(o):o,l=await this.fetch(this.url(`/${e}/renders/${i}`),{method:`PUT`,headers:{Authorization:`Bearer ${r}`,"Content-Type":s,"If-Match":`"${n}"`,"X-Render-Id":t},body:c});if(!l.ok)throw await this.errorFor(l)}async getEncryptedRender(e,t){if(!gC.test(e))throw Error(`Invalid diagram alias.`);if(t!==`svg`&&t!==`png`)throw Error(`Invalid render format.`);let n=this.url(`/${e}/renders/${t}`);n.searchParams.set(`encrypted`,`1`);let r=await this.fetch(n,{headers:{Accept:`application/json`}});if(!r.ok)throw await this.errorFor(r);return r.json()}},kC=6e5,AC=new TextEncoder,jC=new TextDecoder,MC=AC.encode(`diagram.zip:content:v1`),NC=AC.encode(`diagram.zip:metadata:v1`),PC=AC.encode(`diagram.zip:bundle-key:v1`);function FC(e){if(e!==`svg`&&e!==`png`)throw Error(`Invalid render format.`);return AC.encode(`diagram.zip:render:${e}:v1`)}function IC(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...e.subarray(r,r+n));return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function LC(e){if(typeof e!=`string`||!/^[A-Za-z0-9_-]+$/.test(e))throw Error(`Invalid encrypted diagram.`);let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t+`=`.repeat((4-t.length%4)%4),r=atob(n),i=Uint8Array.from(r,e=>e.charCodeAt(0));if(IC(i)!==e)throw Error(`Invalid encrypted diagram.`);return i}function RC(e){return crypto.getRandomValues(new Uint8Array(e))}async function zC(e,t){if(!(e instanceof Uint8Array)||e.byteLength!==32)throw Error(`Invalid diagram key.`);return crypto.subtle.importKey(`raw`,e,{name:`AES-GCM`},!1,t)}async function BC(e,{iterations:t,salt:n}){if(typeof e!=`string`)throw Error(`Password is required.`);let r=await crypto.subtle.importKey(`raw`,AC.encode(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,iterations:t,salt:n},r,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}async function VC(e,t,n){let r=RC(12),i=await crypto.subtle.encrypt({name:`AES-GCM`,iv:r,additionalData:n,tagLength:128},t,e);return{v:1,alg:`A256GCM`,iv:IC(r),ciphertext:IC(new Uint8Array(i))}}async function HC(e,t,n){if(!e||e.v!==1||e.alg!==`A256GCM`)throw Error(`Invalid encrypted diagram.`);let r=LC(e.iv);if(r.byteLength!==12)throw Error(`Invalid encrypted diagram.`);let i=LC(e.ciphertext);if(i.byteLength<16)throw Error(`Invalid encrypted diagram.`);return new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:n,tagLength:128},t,i))}async function UC(e,t,n){return VC(AC.encode(JSON.stringify(e)),t,n)}async function WC(e,t,n){return JSON.parse(jC.decode(await HC(e,t,n)))}function GC(e,t){if(!e||typeof e!=`object`||!bx(e.type)||typeof e.source!=`string`||!e.options||typeof e.options!=`object`||Array.isArray(e.options))throw Error(`Invalid encrypted diagram.`);return{type:e.type,source:e.source,options:e.options,presentation:lC(e.presentation),meta:cC(t)}}async function KC(e,t){if(typeof t!=`string`||t.length<8)throw Error(`Password must be at least 8 characters.`);let n=RC(16),r={name:`PBKDF2`,hash:`SHA-256`,iterations:kC,salt:IC(n)};return{v:1,kdf:r,wrap:await VC(e,await BC(t,{iterations:r.iterations,salt:n}),PC)}}async function qC(e,t){if(!e||e.v!==1||e.kdf?.name!==`PBKDF2`||e.kdf.hash!==`SHA-256`||!Number.isInteger(e.kdf.iterations)||e.kdf.iterations<1e5||e.kdf.iterations>5e6)throw Error(`Invalid encrypted diagram.`);let n=LC(e.kdf.salt);if(n.byteLength!==16)throw Error(`Invalid encrypted diagram.`);let r=await BC(t,{iterations:e.kdf.iterations,salt:n}),i=await HC(e.wrap,r,PC);if(i.byteLength!==32)throw Error(`Invalid encrypted diagram.`);return i}async function JC(e,t,n){let r=GC({type:e.type,source:e.source,options:e.options??{},presentation:e.presentation},e.meta),i=await zC(t,[`encrypt`]);return{mode:`locked`,encryptedContent:await UC({type:r.type,source:r.source,options:r.options,presentation:r.presentation},i,MC),encryptedMetadata:await UC(r.meta,i,NC),keyEnvelope:n}}async function YC(e,t){let n=RC(32);return{bundleKey:n,payload:await JC(e,n,await KC(n,t))}}async function XC(e,t){if(!e||e.mode!==`locked`)throw Error(`Invalid encrypted diagram.`);try{let n=await qC(e.keyEnvelope,t),r=await zC(n,[`decrypt`]),[i,a]=await Promise.all([WC(e.encryptedContent,r,MC),WC(e.encryptedMetadata,r,NC)]);return{bundleKey:n,state:GC(i,a)}}catch{throw Error(`Wrong password or damaged diagram.`)}}async function ZC(e,t,n){if(!(e instanceof Blob))throw Error(`Invalid rendered image.`);let r=await zC(t,[`encrypt`]);return VC(new Uint8Array(await e.arrayBuffer()),r,FC(n))}var QC=`diagram.zip:renderer:v1`,$C=2e4,ew=Object.freeze({mermaid:Object.freeze({frameUrl:`/diagram.zip/renderer-frame.html?v=2`}),bpmn:Object.freeze({frameUrl:`/diagram.zip/renderer-frame.html?v=2`}),excalidraw:Object.freeze({frameUrl:`https://excalidraw.render.diagram.zip/index.html?v=3`})});Object.freeze(Object.keys(ew));function tw(e){return e?.name===`AbortError`?e:new DOMException(`Render superseded.`,`AbortError`)}var nw=class{constructor({documentObject:e=document,windowObject:t=window,frameUrl:n}={}){this.document=e,this.window=t,this.frameUrl=n,this.frame=null,this.ready=null,this.resolveReady=null,this.rejectReady=null,this.sequence=0,this.pending=new Map,this.handleMessage=e=>this.receive(e),this.window.addEventListener(`message`,this.handleMessage)}ensureFrame(){if(this.frame)return this.ready;let e=this.document.createElement(`iframe`);return e.title=`Diagram renderer`,e.setAttribute(`sandbox`,`allow-scripts`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,Object.assign(e.style,{position:`fixed`,left:`-200vw`,top:`0`,width:`1280px`,height:`800px`,border:`0`,pointerEvents:`none`,visibility:`hidden`}),this.ready=new Promise((e,t)=>{this.resolveReady=e,this.rejectReady=t}),e.addEventListener(`error`,()=>this.rejectReady?.(Error(`The client renderer could not be loaded.`)),{once:!0}),e.src=this.frameUrl,this.frame=e,this.document.body.append(e),this.ready}receive(e){if(!this.frame||e.source!==this.frame.contentWindow||e.data?.channel!==QC)return;if(e.data.type===`ready`){this.resolveReady?.(),this.resolveReady=null,this.rejectReady=null;return}if(e.data.type!==`result`)return;let t=this.pending.get(e.data.requestId);t&&(this.pending.delete(e.data.requestId),t.finish(),e.data.ok&&typeof e.data.svg==`string`?t.resolve({body:e.data.svg,version:e.data.version,runtime:`client`}):t.reject(Error(e.data.error||`Client rendering failed.`)))}async render(e,t,n){let r;try{await Promise.race([this.ensureFrame(),new Promise((e,t)=>{r=setTimeout(()=>t(Error(`The client renderer timed out while loading.`)),$C)})])}finally{clearTimeout(r)}if(n.aborted)throw tw(n.reason);let i=`${Date.now().toString(36)}-${++this.sequence}`;return new Promise((r,a)=>{let o=setTimeout(()=>{this.pending.delete(i),n.removeEventListener(`abort`,s),a(Error(`The client renderer timed out.`))},$C),s=()=>{this.pending.delete(i),clearTimeout(o),a(tw(n.reason))};n.addEventListener(`abort`,s,{once:!0}),this.pending.set(i,{resolve:r,reject:a,finish:()=>{clearTimeout(o),n.removeEventListener(`abort`,s)}}),this.frame.contentWindow.postMessage({channel:QC,type:`render`,requestId:i,engine:e,source:t},`*`)})}},rw=new Map;function iw(e){let t=ew[e];if(!t)return null;let n=rw.get(t.frameUrl);return n||(n=new nw({frameUrl:t.frameUrl}),rw.set(t.frameUrl,n)),{id:e,runtime:`client`,render:({source:t},r)=>n.render(e,t,r)}}var aw=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR=` 1643+ +-----------------+`,d2:Tx,nwdiag:Mx,packetdiag:Nx,rackdiag:Fx,bpmn:Cx.replaceAll(`Examine Situation`,`Bob Agent tests Tandem`).replaceAll(`Things OK?`,`Tests pass?`).replaceAll(`Notification Sent`,`Alice and Bob share tasks`).replaceAll(`Error Propagated`,`Alice Agent revises flow`).replaceAll(`Klaus`,`Alice`).replaceAll(`Walter`,`Bob`),bytefield:wx,dbml:Ex,diagramsnet:Dx,erd:Ox,excalidraw:kx,goat:Ax,nomnoml:jx,pikchr:Px,svgbob:Ix,symbolator:Lx,tikz:Rx,umlet:zx,vega:Bx,vegalite:Vx,wavedrom:Hx,wireviz:Ux},fC={plantuml:[`Tandem task sync`,`Alice and Bob coordinate shared tasks through their agents.`],mermaid:[`Shared task flow`,`A compact view of ideas moving through the Tandem team.`],graphviz:[`Tandem collaboration graph`,`People and agents converge on one synchronized task list.`],d2:[`Connection styles`,`D2 connection, arrowhead, shape, and animation syntax.`],c4plantuml:[`Tandem system context`,`The people and software systems surrounding Tandem.`],blockdiag:[`Tandem block flow`,`A block-oriented view of the shared task workflow.`],seqdiag:[`Tandem task sequence`,`A task moves from Alice to Bob and back through Tandem.`],actdiag:[`Tandem delivery activities`,`Work crosses Alice, Alice Agent, and Bob Agent lanes.`],nwdiag:[`Network layout`,`A sample network topology and its connected address ranges.`],packetdiag:[`TCP packet structure`,`The bit-level layout of a TCP packet header.`],rackdiag:[`Rack layout`,`A sample equipment rack rendered from rackdiag syntax.`],bpmn:[`Agent-assisted review`,`A BPMN review flow that branches on test results.`],bytefield:[`Byte field layout`,`A compact byte-oriented protocol field example.`],dbml:[`Database schema`,`Tables and relationships expressed with DBML.`],diagramsnet:[`Venn diagram`,`An overlapping-set example imported from diagrams.net.`],ditaa:[`Tandem ASCII architecture`,`An ASCII sketch becomes a rendered system diagram.`],erd:[`Data model`,`Entities and relationships in a small relational schema.`],excalidraw:[`Venn sketch`,`A hand-drawn overlapping-set diagram.`],goat:[`Component shapes`,`GoAT exercises boxes, connectors, curves, and symbols.`],nomnoml:[`Pirate class diagram`,`A playful class diagram demonstrating Nomnoml syntax.`],pikchr:[`Cardinal points`,`A diamond marks north, east, south, and west.`],structurizr:[`Tandem landscape`,`A software landscape linking people, agents, and Tandem.`],svgbob:[`Cloud network`,`An ASCII cloud connects clients and services.`],symbolator:[`Hardware component`,`A component symbol generated from interface declarations.`],tikz:[`Periodic table`,`A color-coded periodic table rendered with TikZ.`],umlet:[`UML example`,`A UMLet document rendered directly from its XML form.`],vega:[`Bar chart`,`A declarative bar chart expressed with Vega.`],vegalite:[`Discretizing scale`,`A Vega-Lite example comparing discretized values.`],wavedrom:[`Timing diagram`,`Digital signals and timing relationships rendered by WaveDrom.`],wireviz:[`Wiring harness`,`Connections, cables, and pins described with WireViz.`]};function pC(e){return dC[e]??cC}function mC(e){let t=mx.findIndex(t=>t.id===e),[n,r]=fC[e]??[`Diagram example`,`A diagram.zip catalog example.`];return{type:e,source:pC(e),options:{},...Gx(Math.max(t,0),{title:n,description:r})}}function hC(e,t,n,r,i){return e.set(t,{...r,type:t}),e.get(n)??i(n)}var gC=`/api/v1`,_C=/^[A-Za-z0-9_-]{16}$/,vC=/^[A-Za-z0-9_-]{43}$/;function yC(e){let t=``;for(let n of e)t+=String.fromCharCode(n);return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function bC(){return yC(crypto.getRandomValues(new Uint8Array(32)))}function xC(e){return e.match(/^\/d\/([A-Za-z0-9_-]{16})\/?$/)?.[1]??null}function SC(e,t){if(!_C.test(t))throw Error(`Invalid diagram alias.`);return new URL(`/d/${t}`,e).toString()}function CC(e,t,n){if(!vC.test(n))throw Error(`Invalid write capability.`);let r=new URL(SC(e,t));return r.hash=`w=${n}`,r.toString()}function wC(e,t,n=`svg`){if(!_C.test(t))throw Error(`Invalid diagram alias.`);if(n!==`svg`&&n!==`png`)throw Error(`Invalid render format.`);return new URL(`${gC}/aliases/${t}/renders/${n}`,e).toString()}function TC(e){return e.match(/^#w=([A-Za-z0-9_-]{43})$/)?.[1]??null}var EC=class extends Error{constructor(e,{status:t,code:n}={}){super(e),this.status=t,this.code=n}};function DC(e){if(!e||typeof e!=`object`||typeof e.type!=`string`||typeof e.source!=`string`)throw Error(`Invalid diagram state.`);return{mode:`open`,diagram:{type:e.type,source:e.source,options:e.options??{},presentation:uC(e.presentation)},metadata:lC(e.meta)}}function OC(e){if(!e||typeof e!=`object`||!_C.test(e.aliasId)||!vC.test(e.contentId)||!vC.test(e.renderId)||!Number.isSafeInteger(e.revision)||e.mode!==`open`&&e.mode!==`locked`)throw new EC(`The persistence service returned an invalid response.`,{code:`invalid_response`});let t={aliasId:e.aliasId,contentId:e.contentId,renderId:e.renderId,revision:e.revision,mode:e.mode,createdAt:e.createdAt,updatedAt:e.updatedAt};if(e.mode===`locked`){if(!e.encryptedContent||!e.encryptedMetadata||!e.keyEnvelope)throw new EC(`The persistence service returned an invalid locked diagram.`,{code:`invalid_response`});return{...t,encryptedContent:e.encryptedContent,encryptedMetadata:e.encryptedMetadata,keyEnvelope:e.keyEnvelope}}if(!e.diagram||typeof e.diagram!=`object`)throw new EC(`The persistence service returned an invalid open diagram.`,{code:`invalid_response`});return{...t,state:{type:e.diagram.type,source:e.diagram.source,options:e.diagram.options??{},presentation:uC(e.diagram.presentation),meta:lC(e.metadata)}}}var kC=class{constructor({fetchImpl:e=globalThis.fetch,origin:t=globalThis.location?.origin??`http://localhost`,apiPrefix:n=gC}={}){this.fetch=(...t)=>e(...t),this.origin=t,this.apiPrefix=n.replace(/\/$/,``)}url(e=``){return new URL(`${this.apiPrefix}/aliases${e}`,this.origin)}async request(e,t){let n=await this.fetch(e,t),r=await n.json().catch(()=>null);if(!n.ok)throw new EC(r?.error?.message||`Persistence request failed with HTTP ${n.status}.`,{status:n.status,code:r?.error?.code});return OC(r)}async errorFor(e){let t=await e.json().catch(()=>null);return new EC(t?.error?.message||`Persistence request failed with HTTP ${e.status}.`,{status:e.status,code:t?.error?.code})}async createPayload(e){let t=bC();return{...await this.request(this.url(),{method:`POST`,headers:{Authorization:`Bearer ${t}`,"Content-Type":`application/json`},body:JSON.stringify(e)}),writeCapability:t}}createAlias(e){return this.createPayload(DC(e))}createLockedAlias(e){if(e?.mode!==`locked`)throw Error(`Invalid locked diagram payload.`);return this.createPayload(e)}getAlias(e){if(!_C.test(e))throw Error(`Invalid diagram alias.`);return this.request(this.url(`/${e}`),{headers:{Accept:`application/json`}})}updatePayload(e,t,n,r){if(!_C.test(e))throw Error(`Invalid diagram alias.`);if(!Number.isSafeInteger(n)||n<1)throw Error(`Invalid alias revision.`);if(!vC.test(r))throw Error(`Invalid write capability.`);return this.request(this.url(`/${e}`),{method:`PUT`,headers:{Accept:`application/json`,Authorization:`Bearer ${r}`,"Content-Type":`application/json`,"If-Match":`"${n}"`},body:JSON.stringify(t)})}updateAlias(e,t,n,r){return this.updatePayload(e,DC(t),n,r)}updateLockedAlias(e,t,n,r){if(t?.mode!==`locked`)throw Error(`Invalid locked diagram payload.`);return this.updatePayload(e,t,n,r)}async uploadRender({aliasId:e,renderId:t,revision:n,writeCapability:r,format:i,mode:a,render:o,renderer:s}){if(!_C.test(e))throw Error(`Invalid diagram alias.`);if(!vC.test(t))throw Error(`Invalid render ID.`);if(!Number.isSafeInteger(n)||n<1)throw Error(`Invalid alias revision.`);if(!vC.test(r))throw Error(`Invalid write capability.`);if(i!==`svg`&&i!==`png`)throw Error(`Invalid render format.`);if(a!==`open`&&a!==`locked`)throw Error(`Invalid diagram mode.`);if(!s||!/^[a-z][a-z0-9-]{0,31}$/.test(s.unit)||typeof s.build!=`string`||!/^[A-Za-z0-9][A-Za-z0-9._@+-]{0,127}$/.test(s.build)||!Array.isArray(s.pipeline)||s.pipeline.length<1||s.pipeline.some(e=>!/^[a-z][a-z0-9-]{0,31}$/.test(e)))throw Error(`Invalid renderer identity.`);let c=a===`locked`?`application/json`:i===`svg`?`image/svg+xml`:`image/png`,l=a===`locked`?JSON.stringify(o):o,u=await this.fetch(this.url(`/${e}/renders/${i}`),{method:`PUT`,headers:{Authorization:`Bearer ${r}`,"Content-Type":c,"If-Match":`"${n}"`,"X-Render-Id":t,"X-Renderer-Unit":s.unit,"X-Renderer-Build":s.build,"X-Renderer-Pipeline":s.pipeline.join(`,`)},body:l});if(!u.ok)throw await this.errorFor(u)}async getEncryptedRender(e,t){if(!_C.test(e))throw Error(`Invalid diagram alias.`);if(t!==`svg`&&t!==`png`)throw Error(`Invalid render format.`);let n=this.url(`/${e}/renders/${t}`);n.searchParams.set(`encrypted`,`1`);let r=await this.fetch(n,{headers:{Accept:`application/json`}});if(!r.ok)throw await this.errorFor(r);return r.json()}},AC=6e5,jC=new TextEncoder,MC=new TextDecoder,NC=jC.encode(`diagram.zip:content:v1`),PC=jC.encode(`diagram.zip:metadata:v1`),FC=jC.encode(`diagram.zip:bundle-key:v1`);function IC(e){if(e!==`svg`&&e!==`png`)throw Error(`Invalid render format.`);return jC.encode(`diagram.zip:render:${e}:v1`)}function LC(e){let t=``,n=32768;for(let r=0;r<e.length;r+=n)t+=String.fromCharCode(...e.subarray(r,r+n));return btoa(t).replaceAll(`+`,`-`).replaceAll(`/`,`_`).replace(/=+$/,``)}function RC(e){if(typeof e!=`string`||!/^[A-Za-z0-9_-]+$/.test(e))throw Error(`Invalid encrypted diagram.`);let t=e.replaceAll(`-`,`+`).replaceAll(`_`,`/`),n=t+`=`.repeat((4-t.length%4)%4),r=atob(n),i=Uint8Array.from(r,e=>e.charCodeAt(0));if(LC(i)!==e)throw Error(`Invalid encrypted diagram.`);return i}function zC(e){return crypto.getRandomValues(new Uint8Array(e))}async function BC(e,t){if(!(e instanceof Uint8Array)||e.byteLength!==32)throw Error(`Invalid diagram key.`);return crypto.subtle.importKey(`raw`,e,{name:`AES-GCM`},!1,t)}async function VC(e,{iterations:t,salt:n}){if(typeof e!=`string`)throw Error(`Password is required.`);let r=await crypto.subtle.importKey(`raw`,jC.encode(e),`PBKDF2`,!1,[`deriveKey`]);return crypto.subtle.deriveKey({name:`PBKDF2`,hash:`SHA-256`,iterations:t,salt:n},r,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`])}async function HC(e,t,n){let r=zC(12),i=await crypto.subtle.encrypt({name:`AES-GCM`,iv:r,additionalData:n,tagLength:128},t,e);return{v:1,alg:`A256GCM`,iv:LC(r),ciphertext:LC(new Uint8Array(i))}}async function UC(e,t,n){if(!e||e.v!==1||e.alg!==`A256GCM`)throw Error(`Invalid encrypted diagram.`);let r=RC(e.iv);if(r.byteLength!==12)throw Error(`Invalid encrypted diagram.`);let i=RC(e.ciphertext);if(i.byteLength<16)throw Error(`Invalid encrypted diagram.`);return new Uint8Array(await crypto.subtle.decrypt({name:`AES-GCM`,iv:r,additionalData:n,tagLength:128},t,i))}async function WC(e,t,n){return HC(jC.encode(JSON.stringify(e)),t,n)}async function GC(e,t,n){return JSON.parse(MC.decode(await UC(e,t,n)))}function KC(e,t){if(!e||typeof e!=`object`||!bx(e.type)||typeof e.source!=`string`||!e.options||typeof e.options!=`object`||Array.isArray(e.options))throw Error(`Invalid encrypted diagram.`);return{type:e.type,source:e.source,options:e.options,presentation:uC(e.presentation),meta:lC(t)}}async function qC(e,t){if(typeof t!=`string`||t.length<8)throw Error(`Password must be at least 8 characters.`);let n=zC(16),r={name:`PBKDF2`,hash:`SHA-256`,iterations:AC,salt:LC(n)};return{v:1,kdf:r,wrap:await HC(e,await VC(t,{iterations:r.iterations,salt:n}),FC)}}async function JC(e,t){if(!e||e.v!==1||e.kdf?.name!==`PBKDF2`||e.kdf.hash!==`SHA-256`||!Number.isInteger(e.kdf.iterations)||e.kdf.iterations<1e5||e.kdf.iterations>5e6)throw Error(`Invalid encrypted diagram.`);let n=RC(e.kdf.salt);if(n.byteLength!==16)throw Error(`Invalid encrypted diagram.`);let r=await VC(t,{iterations:e.kdf.iterations,salt:n}),i=await UC(e.wrap,r,FC);if(i.byteLength!==32)throw Error(`Invalid encrypted diagram.`);return i}async function YC(e,t,n){let r=KC({type:e.type,source:e.source,options:e.options??{},presentation:e.presentation},e.meta),i=await BC(t,[`encrypt`]);return{mode:`locked`,encryptedContent:await WC({type:r.type,source:r.source,options:r.options,presentation:r.presentation},i,NC),encryptedMetadata:await WC(r.meta,i,PC),keyEnvelope:n}}async function XC(e,t){let n=zC(32);return{bundleKey:n,payload:await YC(e,n,await qC(n,t))}}async function ZC(e,t){if(!e||e.mode!==`locked`)throw Error(`Invalid encrypted diagram.`);try{let n=await JC(e.keyEnvelope,t),r=await BC(n,[`decrypt`]),[i,a]=await Promise.all([GC(e.encryptedContent,r,NC),GC(e.encryptedMetadata,r,PC)]);return{bundleKey:n,state:KC(i,a)}}catch{throw Error(`Wrong password or damaged diagram.`)}}async function QC(e,t,n){if(!(e instanceof Blob))throw Error(`Invalid rendered image.`);let r=await BC(t,[`encrypt`]);return HC(new Uint8Array(await e.arrayBuffer()),r,IC(n))}var $C=`diagram.zip:renderer:v1`,ew=2e4,tw=Object.freeze({mermaid:Object.freeze({frameUrl:`https://mermaid.render.diagram.zip/index.html?v=1`}),bpmn:Object.freeze({frameUrl:`https://bpmn.render.diagram.zip/index.html?v=1`}),excalidraw:Object.freeze({frameUrl:`https://excalidraw.render.diagram.zip/index.html?v=3`})});Object.freeze(Object.keys(tw));function nw(e){return e?.name===`AbortError`?e:new DOMException(`Render superseded.`,`AbortError`)}var rw=class{constructor({documentObject:e=document,windowObject:t=window,frameUrl:n}={}){this.document=e,this.window=t,this.frameUrl=n,this.frame=null,this.ready=null,this.resolveReady=null,this.rejectReady=null,this.sequence=0,this.pending=new Map,this.handleMessage=e=>this.receive(e),this.window.addEventListener(`message`,this.handleMessage)}ensureFrame(){if(this.frame)return this.ready;let e=this.document.createElement(`iframe`);return e.title=`Diagram renderer`,e.setAttribute(`sandbox`,`allow-scripts`),e.setAttribute(`aria-hidden`,`true`),e.tabIndex=-1,Object.assign(e.style,{position:`fixed`,left:`-200vw`,top:`0`,width:`1280px`,height:`800px`,border:`0`,pointerEvents:`none`,visibility:`hidden`}),this.ready=new Promise((e,t)=>{this.resolveReady=e,this.rejectReady=t}),e.addEventListener(`error`,()=>this.rejectReady?.(Error(`The client renderer could not be loaded.`)),{once:!0}),e.src=this.frameUrl,this.frame=e,this.document.body.append(e),this.ready}receive(e){if(!this.frame||e.source!==this.frame.contentWindow||e.data?.channel!==$C)return;if(e.data.type===`ready`){this.resolveReady?.(),this.resolveReady=null,this.rejectReady=null;return}if(e.data.type!==`result`)return;let t=this.pending.get(e.data.requestId);t&&(this.pending.delete(e.data.requestId),t.finish(),e.data.ok&&typeof e.data.svg==`string`?t.resolve({body:e.data.svg,version:e.data.version,build:e.data.build,pipeline:e.data.pipeline,runtime:`client`}):t.reject(Error(e.data.error||`Client rendering failed.`)))}async render(e,t,n){let r;try{await Promise.race([this.ensureFrame(),new Promise((e,t)=>{r=setTimeout(()=>t(Error(`The client renderer timed out while loading.`)),ew)})])}finally{clearTimeout(r)}if(n.aborted)throw nw(n.reason);let i=`${Date.now().toString(36)}-${++this.sequence}`;return new Promise((r,a)=>{let o=setTimeout(()=>{this.pending.delete(i),n.removeEventListener(`abort`,s),a(Error(`The client renderer timed out.`))},ew),s=()=>{this.pending.delete(i),clearTimeout(o),a(nw(n.reason))};n.addEventListener(`abort`,s,{once:!0}),this.pending.set(i,{resolve:r,reject:a,finish:()=>{clearTimeout(o),n.removeEventListener(`abort`,s)}}),this.frame.contentWindow.postMessage({channel:$C,type:`render`,requestId:i,engine:e,source:t},`*`)})}},iw=new Map;function aw(e){let t=tw[e];if(!t)return null;let n=iw.get(t.frameUrl);return n||(n=new rw({frameUrl:t.frameUrl}),iw.set(t.frameUrl,n)),{id:e,runtime:`client`,render:({source:t},r)=>n.render(e,t,r)}}var ow=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR=` 16441644 \r -퟿-�𐀀-􏿿`,e.S=` \r1645-`,e.NAME_START_CHAR=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,e.NAME_CHAR=`-`+e.NAME_START_CHAR+`.0-9·̀-ͯ‿-⁀`,e.CHAR_RE=RegExp(`^[`+e.CHAR+`]$`,`u`),e.S_RE=RegExp(`^[`+e.S+`]+$`,`u`),e.NAME_START_CHAR_RE=RegExp(`^[`+e.NAME_START_CHAR+`]$`,`u`),e.NAME_CHAR_RE=RegExp(`^[`+e.NAME_CHAR+`]$`,`u`),e.NAME_RE=RegExp(`^[`+e.NAME_START_CHAR+`][`+e.NAME_CHAR+`]*$`,`u`),e.NMTOKEN_RE=RegExp(`^[`+e.NAME_CHAR+`]+$`,`u`);var t=9,n=10,r=13,i=32;e.S_LIST=[i,n,r,t];function a(e){return e>=i&&e<=55295||e===n||e===r||e===t||e>=57344&&e<=65533||e>=65536&&e<=1114111}e.isChar=a;function o(e){return e===i||e===n||e===r||e===t}e.isS=o;function s(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}e.isNameStartChar=s;function c(e){return s(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e.isNameChar=c})),ow=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR=`-퟿-�𐀀-􏿿`,e.RESTRICTED_CHAR=`-\b\v\f--„†-Ÿ`,e.S=` \r1646-`,e.NAME_START_CHAR=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,e.NAME_CHAR=`-`+e.NAME_START_CHAR+`.0-9·̀-ͯ‿-⁀`,e.CHAR_RE=RegExp(`^[`+e.CHAR+`]$`,`u`),e.RESTRICTED_CHAR_RE=RegExp(`^[`+e.RESTRICTED_CHAR+`]$`,`u`),e.S_RE=RegExp(`^[`+e.S+`]+$`,`u`),e.NAME_START_CHAR_RE=RegExp(`^[`+e.NAME_START_CHAR+`]$`,`u`),e.NAME_CHAR_RE=RegExp(`^[`+e.NAME_CHAR+`]$`,`u`),e.NAME_RE=RegExp(`^[`+e.NAME_START_CHAR+`][`+e.NAME_CHAR+`]*$`,`u`),e.NMTOKEN_RE=RegExp(`^[`+e.NAME_CHAR+`]+$`,`u`);var t=9,n=10,r=13,i=32;e.S_LIST=[i,n,r,t];function a(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}e.isChar=a;function o(e){return e>=1&&e<=8||e===11||e===12||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159}e.isRestrictedChar=o;function s(e){return e===9||e===10||e===13||e>31&&e<127||e===133||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}e.isCharAndNotRestricted=s;function c(e){return e===i||e===n||e===r||e===t}e.isS=c;function l(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}e.isNameStartChar=l;function u(e){return l(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e.isNameChar=u})),sw=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NC_NAME_START_CHAR=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,e.NC_NAME_CHAR=`-`+e.NC_NAME_START_CHAR+`.0-9·̀-ͯ‿-⁀`,e.NC_NAME_START_CHAR_RE=RegExp(`^[`+e.NC_NAME_START_CHAR+`]$`,`u`),e.NC_NAME_CHAR_RE=RegExp(`^[`+e.NC_NAME_CHAR+`]$`,`u`),e.NC_NAME_RE=RegExp(`^[`+e.NC_NAME_START_CHAR+`][`+e.NC_NAME_CHAR+`]*$`,`u`);function t(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}e.isNCNameStartChar=t;function n(e){return t(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e.isNCNameChar=n})),cw=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SaxesParser=e.EVENTS=void 0;var t=aw(),n=ow(),r=sw(),i=t.isS,a=t.isChar,o=t.isNameStartChar,s=t.isNameChar,c=t.S_LIST,l=t.NAME_RE,u=n.isChar,d=r.isNCNameStartChar,f=r.isNCNameChar,p=r.NC_NAME_RE,m=`http://www.w3.org/XML/1998/namespace`,h=`http://www.w3.org/2000/xmlns/`,g={__proto__:null,xml:m,xmlns:h},_={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},v=-1,y=-2,ee=0,te=1,ne=2,re=3,b=4,ie=5,ae=6,x=7,oe=8,S=9,se=10,ce=11,le=12,C=13,w=14,ue=15,de=16,fe=17,pe=18,me=19,he=20,T=21,ge=22,_e=23,E=24,ve=25,ye=26,be=27,xe=28,Se=29,Ce=30,we=31,Te=32,Ee=33,De=34,Oe=35,ke=36,Ae=37,je=38,Me=39,Ne=40,Pe=41,Fe=42,Ie=43,Le=44,Re=9,ze=10,Be=13,Ve=32,He=33,Ue=34,We=38,D=39,O=45,Ge=47,Ke=59,qe=60,Je=61,k=62,A=63,Ye=91,Xe=93,j=133,Ze=8232,Qe=e=>e===Ue||e===D,$e=[Ue,D],et=[...$e,Ye,k],M=[...$e,qe,Xe],tt=[Je,A,...c],nt=[...c,k,We,qe];function rt(e,t,n){switch(t){case`xml`:n!==m&&e.fail(`xml prefix must be bound to ${m}.`);break;case`xmlns`:n!==h&&e.fail(`xmlns prefix must be bound to ${h}.`)}switch(n){case h:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI \1647-${h}.`);break;case m:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}function it(e,t){for(let n of Object.keys(t))rt(e,n,t[n])}var at=e=>p.test(e),ot=e=>l.test(e),N=0,st=1,ct=2;e.EVENTS=[`xmldecl`,`text`,`processinginstruction`,`doctype`,`comment`,`opentagstart`,`attribute`,`opentag`,`closetag`,`cdata`,`error`,`end`,`ready`];var lt={xmldecl:`xmldeclHandler`,text:`textHandler`,processinginstruction:`piHandler`,doctype:`doctypeHandler`,comment:`commentHandler`,opentagstart:`openTagStartHandler`,attribute:`attributeHandler`,opentag:`openTagHandler`,closetag:`closeTagHandler`,cdata:`cdataHandler`,error:`errorHandler`,end:`endHandler`,ready:`readyHandler`};e.SaxesParser=class{constructor(e){this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,t){this.nameStartCheck=d,this.nameCheck=f,this.isName=at,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},g);let e=this.opt.additionalNamespaces;e!=null&&(it(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=o,this.nameCheck=s,this.isName=ot,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var e;this.openWakaBang=``,this.text=``,this.name=``,this.piTarget=``,this.entity=``,this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk=``,this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=N,this.attribList=[];let{fragmentOpt:t}=this;this.state=t?C:ee,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:n}=this.opt;if(n===void 0){if(this.opt.forceXMLVersion===!0)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);n=`1.0`}this.setXMLVersion(n),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(_),(e=this.readyHandler)==null||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[lt[e]]=t}off(e){this[lt[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close; assign an onready handler.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===Be||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return v;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=Ve||n===Re)return n;switch(n){case ze:return this.line++,this.column=0,this.positionAtNewLine=this.position,ze;case Be:return e.charCodeAt(t+1)===ze&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,y;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+(n-55296)*1024+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return v;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==Ze||n===Re)return n;switch(n){case ze:return this.line++,this.column=0,this.positionAtNewLine=this.position,ze;case Be:{let n=e.charCodeAt(t+1);(n===ze||n===j)&&(this.i=t+2)}case j:case Ze:return this.line++,this.column=0,this.positionAtNewLine=this.position,y;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+(n-55296)*1024+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===y?ze:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===y,a=i?ze:r;if(a===v||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case y:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=ze;break;case v:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===v)return this.name+=e.slice(t),v;if(!s(n))return this.name+=e.slice(t,this.prevI),n===y?ze:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===v||!i(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=a,this.getCode=this.getCode10):(this.isChar=u,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=te}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case qe:if(this.state=ue,this.text.length!==0)throw Error(`no-empty text at start`);break;case v:break;default:this.unget(),this.state=C,this.xmlDeclPossible=!1}}sDoctype(){var e;let t=this.captureTo(et);switch(t){case k:(e=this.doctypeHandler)==null||e.call(this,this.text),this.text=``,this.state=C,this.doctype=!0;break;case v:break;default:this.text+=String.fromCodePoint(t),t===Ye?this.state=b:Qe(t)&&(this.state=re,this.q=t)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=ne)}sDTD(){let e=this.captureTo(M);e!==v&&(this.text+=String.fromCodePoint(e),e===Xe?this.state=ne:e===qe?this.state=ae:Qe(e)&&(this.state=ie,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=b,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case He:this.state=x,this.openWakaBang=``;break;case A:this.state=ce;break;default:this.state=b}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?oe:b,this.openWakaBang=``)}sDTDComment(){this.captureToChar(O)&&(this.text+=`-`,this.state=S)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===O?se:oe}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===k?this.state=b:(this.fail(`malformed comment.`),this.state=oe)}sDTDPI(){this.captureToChar(A)&&(this.text+=`?`,this.state=le)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===k&&(this.state=b)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;loop:for(;;)switch(this.getCode()){case y:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case Ke:{let{entityReturnState:n}=this,r=this.entity+t.slice(e,this.prevI);this.state=n;let i;r===``?(this.fail(`empty entity name.`),i=`&;`):(i=this.parseEntity(r),this.entity=``),(n!==C||this.textHandler!==void 0)&&(this.text+=i);break loop}case v:this.entity+=t.slice(e);break loop}}sOpenWaka(){let e=this.getCode();if(o(e))this.state=De,this.unget(),this.xmlDeclPossible=!1;else switch(e){case Ge:this.state=Ie,this.xmlDeclPossible=!1;break;case He:this.state=de,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case A:this.state=_e;break;default:this.fail(`disallowed character in tag name`),this.state=C,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case`[CDATA[`:!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0),this.state=he,this.openWakaBang=``;break;case`--`:this.state=fe,this.openWakaBang=``;break;case`DOCTYPE`:this.state=ne,(this.doctype||this.sawRoot)&&this.fail(`inappropriately located doctype declaration.`),this.openWakaBang=``;break;default:this.openWakaBang.length>=7&&this.fail(`incorrect syntax.`)}}sComment(){this.captureToChar(O)&&(this.state=pe)}sCommentEnding(){var e;let t=this.getCodeNorm();t===O?(this.state=me,(e=this.commentHandler)==null||e.call(this,this.text),this.text=``):(this.text+=`-${String.fromCodePoint(t)}`,this.state=fe)}sCommentEnded(){let e=this.getCodeNorm();e===k?this.state=C:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=fe)}sCData(){this.captureToChar(Xe)&&(this.state=T)}sCDataEnding(){let e=this.getCodeNorm();e===Xe?this.state=ge:(this.text+=`]${String.fromCodePoint(e)}`,this.state=he)}sCDataEnding2(){var e;let t=this.getCodeNorm();switch(t){case k:(e=this.cdataHandler)==null||e.call(this,this.text),this.text=``,this.state=C;break;case Xe:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=he}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=E):e===A||i(e)?(this.fail(`processing instruction without a target.`),this.state=e===A?ye:ve):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=E)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===v){this.piTarget+=e.slice(t);return}if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===A;r||i(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?Ee:be):this.state=r?ye:ve:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===A?this.state=ye:i(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(A)&&(this.state=ye)}sPIEnding(){var e;let t=this.getCodeNorm();if(t===k){let{piTarget:t}=this;t.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),(e=this.piHandler)==null||e.call(this,{target:t,body:this.text}),this.piTarget=this.text=``,this.state=C}else t===A?this.text+=`?`:(this.text+=`?${String.fromCodePoint(t)}`,this.state=ve);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();if(e===A){this.state=Ee;return}e!==v&&(this.state=xe,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(tt);if(e===A){this.state=Ee,this.name+=this.text,this.text=``,this.fail(`XML declaration is incomplete.`);return}if(i(e)||e===Je){if(this.name+=this.text,this.text=``,!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail(`did not expect any more name/value pairs.`);break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(`, `)}`)}this.state=e===Je?Ce:Se}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===A){this.state=Ee,this.fail(`XML declaration is incomplete.`);return}i(e)||(e!==Je&&this.fail(`value required.`),this.state=Ce)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===A){this.state=Ee,this.fail(`XML declaration is incomplete.`);return}i(e)||(Qe(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=Ve),this.state=we)}sXMLDeclValue(){let e=this.captureTo([this.q,A]);if(e===A){this.state=Ee,this.text=``,this.fail(`XML declaration is incomplete.`);return}if(e===v)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=Te}sXMLDeclSeparator(){let e=this.getCodeNorm();if(e===A){this.state=Ee;return}i(e)||(this.fail(`whitespace required.`),this.unget()),this.state=be}sXMLDeclEnding(){var e;this.getCodeNorm()===k?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),(e=this.xmldeclHandler)==null||e.call(this,this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=C):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){var e;let t=this.captureNameChars();if(t===v)return;let n=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=n.ns=Object.create(null)),(e=this.openTagStartHandler)==null||e.call(this,n),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),t){case k:this.openTag();break;case Ge:this.state=Oe;break;default:i(t)||this.fail(`disallowed character in tag name.`),this.state=ke}}sOpenTagSlash(){this.getCode()===k?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=ke)}sAttrib(){let e=this.skipSpaces();e!==v&&(o(e)?(this.unget(),this.state=Ae):e===k?this.openTag():e===Ge?this.state=Oe:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===Je?this.state=Me:i(e)?this.state=je:e===k?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==v&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case v:return;case Je:this.state=Me;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===k?this.openTag():o(e)?(this.unget(),this.state=Ae):(this.fail(`disallowed character in attribute name.`),this.state=ke)}}sAttribValue(){let e=this.getCodeNorm();Qe(e)?(this.q=e,this.state=Ne):i(e)||(this.fail(`unquoted attribute value.`),this.state=Fe,this.unget())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=Pe;return;case We:this.text+=t.slice(n,this.prevI),this.state=w,this.entityReturnState=Ne;return;case ze:case y:case Re:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case qe:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case v:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();i(e)?this.state=ke:e===k?this.openTag():e===Ge?this.state=Oe:o(e)?(this.fail(`no whitespace between attributes.`),this.unget(),this.state=Ae):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(nt);switch(e){case We:this.state=w,this.entityReturnState=Fe;break;case qe:this.fail(`disallowed character.`);break;case v:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===k?this.openTag():this.state=ke}}sCloseTag(){let e=this.captureNameChars();e===k?this.closeTag():i(e)?this.state=Le:e!==v&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case k:this.closeTag();break;case v:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;scanLoop:for(;;)switch(this.getCode()){case qe:if(this.state=ue,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=N;break scanLoop;case We:this.state=w,this.entityReturnState=C,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=N;break scanLoop;case Xe:switch(t){case N:t=st;break;case st:t=ct;break;case ct:break;default:throw Error(`impossible state`)}break;case k:t===ct&&this.fail(`the string "]]>" is disallowed in char data.`),t=N;break;case y:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=N;break;case v:r!==void 0&&(this.text+=n.slice(e));break scanLoop;default:t=N}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;outRootLoop:for(;;){let a=this.getCode();switch(a){case qe:if(this.state=ue,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break outRootLoop;case We:this.state=w,this.entityReturnState=C,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break outRootLoop;case y:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case v:n!==void 0&&(this.text+=t.slice(e));break outRootLoop;default:i(a)||(r=!0)}}r&&(!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){var n;let{prefix:r,local:i}=this.qname(e),a={name:e,prefix:r,local:i,value:t};if(this.attribList.push(a),(n=this.attributeHandler)==null||n.call(this,a),r===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[i]=e,rt(this,i,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,rt(this,``,e)}}pushAttribPlain(e,t){var n;let r={name:e,value:t};this.attribList.push(r),(n=this.attributeHandler)==null||n.call(this,r)}end(){var e,t;this.sawRoot||this.fail(`document must contain a root element.`);let{tags:n}=this;for(;n.length>0;){let e=n.pop();this.fail(`unclosed tag: ${e.name}`)}this.state!==ee&&this.state!==C&&this.fail(`unexpected end.`);let{text:r}=this;return r.length!==0&&((e=this.textHandler)==null||e.call(this,r),this.text=``),this._closed=!0,(t=this.endHandler)==null||t.call(this),this._init(),this}resolve(e){var t;let n=this.topNS[e];if(n!==void 0)return n;let{tags:r}=this;for(let t=r.length-1;t>=0;t--)if(n=r[t].ns[e],n!==void 0)return n;return n=this.ns[e],n===void 0?(t=this.opt).resolvePrefix?.call(t,e):n}qname(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qname(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let{name:e,prefix:i,local:a}=t,o,s;i===``?(o=e===`xmlns`?h:``,s=e):(o=this.resolve(i),o===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),o=i),s=`{${o}}${a}`),r.has(s)&&this.fail(`duplicate attribute: ${s}.`),r.add(s),t.uri=o,n[e]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){var e;this.processAttribs();let{tags:t}=this,n=this.tag;n.isSelfClosing=!1,(e=this.openTagHandler)==null||e.call(this,n),t.push(n),this.state=C,this.name=``}openSelfClosingTag(){var e,t;this.processAttribs();let{tags:n}=this,r=this.tag;r.isSelfClosing=!0,(e=this.openTagHandler)==null||e.call(this,r),(t=this.closeTagHandler)==null||t.call(this,r),(this.tag=n[n.length-1]??null)===null&&(this.closedRoot=!0),this.state=C,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=C,this.name=``,t===``){this.fail(`weird empty close tag.`),this.text+=`</>`;return}let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}}}))(),lw=4194304,uw=new Set([`script`,`iframe`,`object`,`embed`,`audio`,`video`]),dw=new Set([`foreignobject`,`div`,`span`,`p`,`br`,`b`,`strong`,`i`,`em`,`small`,`sub`,`sup`,`code`,`ul`,`ol`,`li`,`a`]),fw=/^data:image\/(?:png|jpeg|gif|webp);base64,[a-z0-9+/=\s]+$/i,pw=/^data:(?:font\/(?:woff2?|opentype|truetype)|application\/(?:x-)?font-woff2?);base64,[a-z0-9+/=\s]+$/i,mw=class extends Error{constructor(e){super(e),this.name=`ClientSvgError`}};function hw(e){let t=e.trim();return t.startsWith(`#`)||fw.test(t)||pw.test(t)}function gw(e){if(/@import|expression\s*\(|javascript\s*:|data\s*:\s*text\/html|behavior\s*:|-moz-binding/i.test(e))return!0;let t=/url\s*\(\s*(['"]?)(.*?)\1\s*\)/gi;for(let n of e.matchAll(t))if(!hw(n[2]??``))return!0;return/url\s*\(/i.test(e.replace(t,``))}function _w(e){let t=e.trim();return t.startsWith(`#`)||fw.test(t)}function vw(e,t){let n=e.toLowerCase();return n.startsWith(`on`)?!1:n===`href`||n===`xlink:href`||n===`src`?_w(t):[`style`,`filter`,`fill`,`stroke`,`clip-path`,`mask`].includes(n)?!gw(t):n!==`xml:base`&&!/javascript\s*:/i.test(t)}function yw(e){return e.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`)}function bw(e){return yw(e).replaceAll(`"`,`&quot;`)}function xw(e){if(e.type===`text`)return yw(e.value);let t=[...e.attributes].map(([e,t])=>` ${e}="${bw(t)}"`).join(``);return`<${e.name}${t}>${e.children.map(xw).join(``)}</${e.name}>`}function Sw(e){return e.name.toLowerCase().split(`:`).at(-1)??e.name.toLowerCase()}function Cw(e){if(e===void 0||!/^-?\d+(?:\.\d+)?(?:px)?$/.test(e.trim()))return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function ww(e){let t=e.attributes.get(`viewBox`)?.trim().split(/[\s,]+/).map(Number);if(t?.length===4&&t.every(Number.isFinite)&&t[2]>0&&t[3]>0)return t;let n=Cw(e.attributes.get(`width`)),r=Cw(e.attributes.get(`height`));return n!==null&&r!==null?[0,0,n,r]:null}function Tw(e,t){let n=e.attributes.get(`style`);if(!n)return null;for(let e of n.split(`;`)){let n=e.indexOf(`:`);if(n>=0&&e.slice(0,n).trim().toLowerCase()===t)return e.slice(n+1).trim()}return null}function Ew(e){let t=(e.attributes.get(`fill`)??Tw(e,`fill`)??``).replaceAll(` `,``).toLowerCase();return t===`white`||t===`#fff`||t===`#ffffff`||t===`rgb(255,255,255)`}function Dw(e){if(e===void 0||!/^-?\d+(?:\.\d+)?$/.test(e.trim()))return null;let t=Number(e);return Number.isFinite(t)?t:null}function Ow(e,t){let n=e.attributes.get(`width`)?.trim(),r=e.attributes.get(`height`)?.trim();if(n===`100%`&&r===`100%`)return!0;let i=Dw(e.attributes.get(`x`)??`0`),a=Dw(e.attributes.get(`y`)??`0`),o=Dw(n),s=Dw(r);if([i,a,o,s].some(e=>e===null))return!1;let[c,l,u,d]=t,f=.01;return i<=c+f&&a<=l+f&&i+o>=c+u-f&&a+s>=l+d-f}function kw(e,t,n){let r=Sw(e),i=new Set((e.attributes.get(`class`)??``).toLowerCase().split(/\s+/));return r===`rect`&&i.has(`backdrop`)||r===`rect`&&t!==null&&Ew(e)&&Ow(e,t)?!0:n===`graphviz`&&r===`polygon`&&Ew(e)&&(e.attributes.get(`stroke`)??``).toLowerCase()===`none`}function Aw(e,t,n){let r=Sw(e)===`svg`?ww(e)??t:t;e.children=e.children.filter(e=>e.type===`text`||!kw(e,r,n)&&(Aw(e,r,n),!0))}function jw(e,t){let n=(e.attributes.get(`style`)??``).split(`;`).map(e=>e.trim()).filter(Boolean).filter(e=>!/^background(?:-color)?\s*:/i.test(e));n.push(`background-color:${t}`),e.attributes.set(`style`,`${n.join(`;`)};`)}function Mw(e,t=[],n=[]){return{type:`element`,name:e,attributes:new Map(t),children:n}}function Nw(e,t,n,r){let i=[],a=null;t.title&&i.push(Mw(`title`,[],[{type:`text`,value:t.title}])),t.description&&i.push(Mw(`desc`,[],[{type:`text`,value:t.description}]));let o=ww(e);if((n.padding||n.background||n.frame)&&o===null)throw new mw(`Renderer output has no usable SVG dimensions for presentation settings.`);if(o!==null){let[t,r,s,c]=o,l=n.padding,u=[t-l,r-l,s+l*2,c+l*2];e.attributes.set(`viewBox`,u.join(` `)),e.attributes.has(`width`)&&e.attributes.set(`width`,String(u[2])),e.attributes.has(`height`)&&e.attributes.set(`height`,String(u[3])),n.background&&i.push(Mw(`rect`,[[`x`,String(u[0])],[`y`,String(u[1])],[`width`,String(u[2])],[`height`,String(u[3])],[`fill`,n.background]])),n.frame&&(a=Mw(`rect`,[[`x`,String(u[0]+.5)],[`y`,String(u[1]+.5)],[`width`,String(Math.max(0,u[2]-1))],[`height`,String(Math.max(0,u[3]-1))],[`fill`,`none`],[`stroke`,`#000000`],[`stroke-width`,`1`],[`vector-effect`,`non-scaling-stroke`]]))}n.background&&(Aw(e,o,r),jw(e,n.background)),e.children.unshift(...i),a&&e.children.push(a)}function Pw(e,t,n,r){if(e.length>lw)throw new mw(`Rendered SVG is too large.`);let i=null,a=[],o=0,s=null,c=new cw.SaxesParser({xmlns:!0});c.on(`doctype`,e=>{e.includes(`[`)&&(s=Error(`Internal DOCTYPE subsets are not allowed`))}),c.on(`opentag`,e=>{let t=e.local.toLowerCase(),n=t===`foreignobject`||a.some(e=>Sw(e)===`foreignobject`);if(o>0||uw.has(t)||n&&!dw.has(t)){o++;return}let r=Mw(e.name);for(let t of Object.values(e.attributes))vw(t.name,t.value)&&r.attributes.set(t.name,t.value);let c=a.at(-1);c?c.children.push(r):i===null?i=r:s=Error(`Multiple root elements`),a.push(r)});let l=e=>{if(o>0||e===``)return;let t=a.at(-1);if(t){if(Sw(t)===`style`&&gw(e))throw new mw(`Renderer output contains unsafe CSS.`);t.children.push({type:`text`,value:e})}else e.trim()!==``&&(s=Error(`Text outside root element`))};c.on(`text`,l),c.on(`cdata`,l),c.on(`closetag`,()=>{o>0?o--:a.pop()}),c.on(`error`,e=>{s=e});try{c.write(e).close()}catch(e){if(e instanceof mw)throw e;s=e}if(s!==null||i===null||Sw(i)!==`svg`)throw new mw(`Renderer returned invalid SVG.`);return Nw(i,t,n,r),xw(i)}var Fw=Object.freeze({bytefield:`https://bytefield.render.diagram.zip/v1/svg`,nomnoml:`https://nomnoml.render.diagram.zip/v1/svg`,vega:`https://vega.render.diagram.zip/v1/svg`,vegalite:`https://vegalite.render.diagram.zip/v1/svg`,wavedrom:`https://wavedrom.render.diagram.zip/v1/svg`});function Iw(e){return Fw[e]??null}function Lw(e,t,n){return Math.min(Math.max(e,t),n)}var Rw=class{constructor({stage:e,image:t,status:n,minimap:r,minimapImage:i,minimapViewport:a}){this.stage=e,this.image=t,this.status=n,this.minimap=r,this.minimapImage=i,this.minimapViewport=a,this.scale=1,this.x=0,this.y=0,this.objectUrl=null,this.abortController=null,this.requestNumber=0,this.pendingRender=null,this.renderLoop=null,this.latestRenderKey=null,this.latestSvgBlob=null,this.imageFallbackUrl=null,this.activeImageUrl=null,this.drag=null,this.image.addEventListener(`load`,()=>{this.image.src===this.activeImageUrl&&(this.imageFallbackUrl=null,this.setStatus(`Rendered`,`ready`),this.fit())}),this.image.addEventListener(`error`,()=>this.retryBlockedImage()),this.stage.addEventListener(`pointerdown`,e=>this.startPan(e)),this.stage.addEventListener(`pointermove`,e=>this.pan(e)),this.stage.addEventListener(`pointerup`,e=>this.endPan(e)),this.stage.addEventListener(`pointercancel`,e=>this.endPan(e)),this.stage.addEventListener(`wheel`,e=>this.wheelZoom(e),{passive:!1}),this.minimap.addEventListener(`pointerdown`,e=>this.moveFromMinimap(e)),new ResizeObserver(()=>this.updateTransform()).observe(this.stage)}render({type:e,source:t,options:n={},meta:r={},presentation:i={}}){if(!t.trim()){this.requestNumber++,this.pendingRender=null,this.abortController?.abort(),this.setStatus(`Write something to render.`,`idle`);return}let a=JSON.stringify({type:e,source:t,options:n,meta:r,presentation:i});return this.latestRenderKey===a&&this.latestSvgBlob?Promise.resolve():(this.pendingRender={type:e,source:t,options:n,meta:r,presentation:i,renderKey:a,requestNumber:++this.requestNumber},this.abortController?.abort(),this.renderLoop||=this.drainRenderQueue(),this.renderLoop)}async drainRenderQueue(){try{for(;this.pendingRender;){let e=this.pendingRender;this.pendingRender=null,await this.performRender(e)}}finally{this.renderLoop=null,this.pendingRender&&(this.renderLoop=this.drainRenderQueue())}}async performRender({type:e,source:t,options:n,meta:r,presentation:i,renderKey:a,requestNumber:o}){let s=new AbortController;this.abortController=s,this.setStatus(`Rendering…`,`loading`),this.stage.style.setProperty(`--render-background`,`var(--preview-bg)`);try{let c=iw(e),l;if(c)try{let a=await c.render({type:e,source:t,options:n},s.signal);l=Pw(a.body,r,i,e),this.status.dataset.cache=`browser`,this.status.dataset.renderer=a.runtime}catch(a){if(a.name===`AbortError`)throw a;l=await this.renderThroughGateway({type:e,source:t,options:n,meta:r,presentation:i},s.signal)}else l=await this.renderThroughGateway({type:e,source:t,options:n,meta:r,presentation:i},s.signal);if(o!==this.requestNumber)return;let{blob:u,background:d}=this.normalizedSvgBlob(l);this.latestRenderKey=a,this.latestSvgBlob=u,this.imageFallbackUrl=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await u.text())}`,this.stage.style.setProperty(`--render-background`,d);let f=URL.createObjectURL(u),p=this.objectUrl;this.objectUrl=f,this.activeImageUrl=f,this.image.src=f,this.minimapImage.src=f,this.image.hidden=!1,this.setStatus(`Loading image…`,`loading`),p&&URL.revokeObjectURL(p)}catch(e){if(e.name===`AbortError`)return;this.setStatus(e.message||`Could not render this diagram.`,`error`)}finally{this.abortController===s&&(this.abortController=null)}}async renderThroughGateway({type:e,source:t,options:n,meta:r,presentation:i},a){let o=Iw(e);if(o)try{let e=await this.renderRequest(o,{source:t,format:`svg`,options:n,metadata:r,presentation:i},a);if(e.ok||e.status<500)return await this.renderResponse(e);await e.body?.cancel()}catch(e){if(e.name===`AbortError`)throw e}let s=await this.renderRequest(`/render/v1/svg`,{engine:e,source:t,format:`svg`,options:n,metadata:r,presentation:i},a);return this.renderResponse(s)}renderRequest(e,t,n){return fetch(e,{method:`POST`,headers:{Accept:`image/svg+xml`,"Content-Type":`application/json`},body:JSON.stringify(t),signal:n})}async renderResponse(e){if(!e.ok)throw Error(await this.errorMessage(e));return this.status.dataset.cache=e.headers.get(`X-Diagram-Cache`)?.toLowerCase()??`miss`,this.status.dataset.renderer=e.headers.get(`X-Diagram-Unit`)?.toLowerCase()??e.headers.get(`X-Diagram-Renderer`)?.toLowerCase()??`gateway`,e.text()}retryBlockedImage(){if(this.image.src===this.activeImageUrl){if(this.imageFallbackUrl&&this.activeImageUrl.startsWith(`blob:`)){let e=this.imageFallbackUrl;this.imageFallbackUrl=null,this.objectUrl&&URL.revokeObjectURL(this.objectUrl),this.objectUrl=null,this.activeImageUrl=e,this.image.src=e,this.minimapImage.src=e;return}this.setStatus(`The rendered image was blocked or invalid.`,`error`)}}svgBlobFor(e){let{type:t,source:n,options:r={},meta:i={},presentation:a={}}=e,o=JSON.stringify({type:t,source:n,options:r,meta:i,presentation:a});return this.latestRenderKey===o?this.latestSvgBlob:null}async errorMessage(e){let t=await e.text();if(e.headers.get(`Content-Type`)?.includes(`application/json`))try{let e=JSON.parse(t);if(typeof e?.error?.message==`string`)return e.error.message}catch{}return new DOMParser().parseFromString(t,`text/html`).body.textContent.trim().replace(/\s+/g,` `)||`Render failed with HTTP ${e.status}.`}normalizedSvgBlob(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`).documentElement,n=t.getAttribute(`viewBox`)?.trim().split(/[\s,]+/).map(Number);t.nodeName===`svg`&&n?.length===4&&n.every(Number.isFinite)&&(t.hasAttribute(`width`)||t.setAttribute(`width`,String(n[2])),t.hasAttribute(`height`)||t.setAttribute(`height`,String(n[3])),e=new XMLSerializer().serializeToString(t));let r=t.style.backgroundColor||t.style.background,i=r&&r!==`transparent`?r:`#ffffff`;return{blob:new Blob([e],{type:`image/svg+xml`}),background:i}}setStatus(e,t){this.status.textContent=e,this.status.dataset.state=t}zoom(e){if(this.image.hidden)return;let t=this.stage.getBoundingClientRect();this.zoomAt(e,t.width/2,t.height/2)}zoomAt(e,t,n){let r=Lw(this.scale*e,.1,8),i=(t-this.x)/this.scale,a=(n-this.y)/this.scale;this.x=t-i*r,this.y=n-a*r,this.scale=r,this.updateTransform()}wheelZoom(e){if(this.image.hidden||e.target.closest(`.preview-toolbar, .minimap`))return;e.preventDefault();let t=this.stage.getBoundingClientRect(),n=e.deltaY*(e.deltaMode===WheelEvent.DOM_DELTA_LINE?16:e.deltaMode===WheelEvent.DOM_DELTA_PAGE?t.height:1);this.zoomAt(Math.exp(-Lw(n,-240,240)*.002),e.clientX-t.left,e.clientY-t.top)}oneToOne(){if(this.image.hidden)return;let e=this.stage.getBoundingClientRect();this.scale=1,this.x=(e.width-this.image.naturalWidth)/2,this.y=(e.height-this.image.naturalHeight)/2,this.updateTransform()}fit(){if(!this.image.naturalWidth||!this.image.naturalHeight)return;let e=this.stage.getBoundingClientRect(),t=Math.min(64,e.width*.12);this.scale=Lw(Math.min((e.width-t*2)/this.image.naturalWidth,(e.height-t*2)/this.image.naturalHeight),.1,2),this.x=(e.width-this.image.naturalWidth*this.scale)/2,this.y=(e.height-this.image.naturalHeight*this.scale)/2,this.updateTransform()}updateTransform(){this.image.style.transform=`translate(${this.x}px, ${this.y}px) scale(${this.scale})`,this.updateMinimap()}startPan(e){this.image.hidden||e.button!==0||e.target.closest(`.preview-toolbar, .minimap`)||(this.drag={pointerId:e.pointerId,x:e.clientX,y:e.clientY,originX:this.x,originY:this.y},this.stage.setPointerCapture(e.pointerId),this.stage.dataset.dragging=`true`)}pan(e){!this.drag||e.pointerId!==this.drag.pointerId||(this.x=this.drag.originX+e.clientX-this.drag.x,this.y=this.drag.originY+e.clientY-this.drag.y,this.updateTransform())}endPan(e){!this.drag||e.pointerId!==this.drag.pointerId||(this.drag=null,delete this.stage.dataset.dragging)}moveFromMinimap(e){if(!this.image.naturalWidth||!this.image.naturalHeight)return;let t=this.minimap.getBoundingClientRect(),n=Math.min(t.width/this.image.naturalWidth,t.height/this.image.naturalHeight),r=(t.width-this.image.naturalWidth*n)/2,i=(t.height-this.image.naturalHeight*n)/2,a=(e.clientX-t.left-r)/n,o=(e.clientY-t.top-i)/n,s=this.stage.getBoundingClientRect();this.x=s.width/2-a*this.scale,this.y=s.height/2-o*this.scale,this.updateTransform()}updateMinimap(){if(!this.image.naturalWidth||!this.image.naturalHeight)return;let e=this.stage.getBoundingClientRect(),t=this.image.naturalWidth*this.scale,n=this.image.naturalHeight*this.scale,r=this.x>=0&&this.y>=0&&this.x+t<=e.width&&this.y+n<=e.height;if(this.minimap.hidden=r,r)return;let i=this.minimap.getBoundingClientRect(),a=Math.min(i.width/this.image.naturalWidth,i.height/this.image.naturalHeight),o=(i.width-this.image.naturalWidth*a)/2,s=(i.height-this.image.naturalHeight*a)/2,c=Lw(-this.x/this.scale,0,this.image.naturalWidth),l=Lw(-this.y/this.scale,0,this.image.naturalHeight),u=Lw((e.width-this.x)/this.scale,0,this.image.naturalWidth),d=Lw((e.height-this.y)/this.scale,0,this.image.naturalHeight);this.minimapViewport.style.left=`${o+c*a}px`,this.minimapViewport.style.top=`${s+l*a}px`,this.minimapViewport.style.width=`${Math.max(4,(u-c)*a)}px`,this.minimapViewport.style.height=`${Math.max(4,(d-l)*a)}px`}},zw=`diagram.zip:draft:local:v2`,Bw=`diagram.zip:draft:alias:v1:`,Vw=`diagram.zip:write:v1:`,Hw=new ke,Uw=new OC,Ww,Gw=!1,Kw,qw=!1,Jw=``,Q={aliasId:null,contentId:null,renderId:null,revision:null,mode:`open`,savedMode:null,writeCapability:null,savedState:null,savedSnapshot:null,bundleKey:null,keyEnvelope:null,encryptedContent:null,encryptedMetadata:null,keyEnvelopeDirty:!1,dirty:!0},Yw=new Map;document.querySelector(`#app`).innerHTML=`1645+`,e.NAME_START_CHAR=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,e.NAME_CHAR=`-`+e.NAME_START_CHAR+`.0-9·̀-ͯ‿-⁀`,e.CHAR_RE=RegExp(`^[`+e.CHAR+`]$`,`u`),e.S_RE=RegExp(`^[`+e.S+`]+$`,`u`),e.NAME_START_CHAR_RE=RegExp(`^[`+e.NAME_START_CHAR+`]$`,`u`),e.NAME_CHAR_RE=RegExp(`^[`+e.NAME_CHAR+`]$`,`u`),e.NAME_RE=RegExp(`^[`+e.NAME_START_CHAR+`][`+e.NAME_CHAR+`]*$`,`u`),e.NMTOKEN_RE=RegExp(`^[`+e.NAME_CHAR+`]+$`,`u`);var t=9,n=10,r=13,i=32;e.S_LIST=[i,n,r,t];function a(e){return e>=i&&e<=55295||e===n||e===r||e===t||e>=57344&&e<=65533||e>=65536&&e<=1114111}e.isChar=a;function o(e){return e===i||e===n||e===r||e===t}e.isS=o;function s(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}e.isNameStartChar=s;function c(e){return s(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e.isNameChar=c})),sw=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CHAR=`-퟿-�𐀀-􏿿`,e.RESTRICTED_CHAR=`-\b\v\f--„†-Ÿ`,e.S=` \r1646+`,e.NAME_START_CHAR=`:A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,e.NAME_CHAR=`-`+e.NAME_START_CHAR+`.0-9·̀-ͯ‿-⁀`,e.CHAR_RE=RegExp(`^[`+e.CHAR+`]$`,`u`),e.RESTRICTED_CHAR_RE=RegExp(`^[`+e.RESTRICTED_CHAR+`]$`,`u`),e.S_RE=RegExp(`^[`+e.S+`]+$`,`u`),e.NAME_START_CHAR_RE=RegExp(`^[`+e.NAME_START_CHAR+`]$`,`u`),e.NAME_CHAR_RE=RegExp(`^[`+e.NAME_CHAR+`]$`,`u`),e.NAME_RE=RegExp(`^[`+e.NAME_START_CHAR+`][`+e.NAME_CHAR+`]*$`,`u`),e.NMTOKEN_RE=RegExp(`^[`+e.NAME_CHAR+`]+$`,`u`);var t=9,n=10,r=13,i=32;e.S_LIST=[i,n,r,t];function a(e){return e>=1&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}e.isChar=a;function o(e){return e>=1&&e<=8||e===11||e===12||e>=14&&e<=31||e>=127&&e<=132||e>=134&&e<=159}e.isRestrictedChar=o;function s(e){return e===9||e===10||e===13||e>31&&e<127||e===133||e>159&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}e.isCharAndNotRestricted=s;function c(e){return e===i||e===n||e===r||e===t}e.isS=c;function l(e){return e>=65&&e<=90||e>=97&&e<=122||e===58||e===95||e===8204||e===8205||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}e.isNameStartChar=l;function u(e){return l(e)||e>=48&&e<=57||e===45||e===46||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e.isNameChar=u})),cw=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.NC_NAME_START_CHAR=`A-Z_a-zÀ-ÖØ-öø-˿Ͱ-ͽͿ-῿‌-‍⁰-↏Ⰰ-⿯、-퟿豈-﷏ﷰ-�𐀀-󯿿`,e.NC_NAME_CHAR=`-`+e.NC_NAME_START_CHAR+`.0-9·̀-ͯ‿-⁀`,e.NC_NAME_START_CHAR_RE=RegExp(`^[`+e.NC_NAME_START_CHAR+`]$`,`u`),e.NC_NAME_CHAR_RE=RegExp(`^[`+e.NC_NAME_CHAR+`]$`,`u`),e.NC_NAME_RE=RegExp(`^[`+e.NC_NAME_START_CHAR+`][`+e.NC_NAME_CHAR+`]*$`,`u`);function t(e){return e>=65&&e<=90||e===95||e>=97&&e<=122||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=767||e>=880&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}e.isNCNameStartChar=t;function n(e){return t(e)||e===45||e===46||e>=48&&e<=57||e===183||e>=768&&e<=879||e>=8255&&e<=8256}e.isNCNameChar=n})),lw=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SaxesParser=e.EVENTS=void 0;var t=ow(),n=sw(),r=cw(),i=t.isS,a=t.isChar,o=t.isNameStartChar,s=t.isNameChar,c=t.S_LIST,l=t.NAME_RE,u=n.isChar,d=r.isNCNameStartChar,f=r.isNCNameChar,p=r.NC_NAME_RE,m=`http://www.w3.org/XML/1998/namespace`,h=`http://www.w3.org/2000/xmlns/`,g={__proto__:null,xml:m,xmlns:h},_={__proto__:null,amp:`&`,gt:`>`,lt:`<`,quot:`"`,apos:`'`},v=-1,y=-2,ee=0,te=1,ne=2,re=3,b=4,ie=5,ae=6,x=7,oe=8,S=9,se=10,ce=11,le=12,C=13,w=14,ue=15,de=16,fe=17,pe=18,me=19,he=20,T=21,ge=22,_e=23,E=24,ve=25,ye=26,be=27,xe=28,Se=29,Ce=30,we=31,Te=32,Ee=33,De=34,Oe=35,ke=36,Ae=37,je=38,Me=39,Ne=40,Pe=41,Fe=42,Ie=43,Le=44,Re=9,ze=10,Be=13,Ve=32,He=33,Ue=34,We=38,D=39,O=45,Ge=47,Ke=59,qe=60,Je=61,k=62,A=63,Ye=91,Xe=93,j=133,Ze=8232,Qe=e=>e===Ue||e===D,$e=[Ue,D],et=[...$e,Ye,k],M=[...$e,qe,Xe],tt=[Je,A,...c],nt=[...c,k,We,qe];function rt(e,t,n){switch(t){case`xml`:n!==m&&e.fail(`xml prefix must be bound to ${m}.`);break;case`xmlns`:n!==h&&e.fail(`xmlns prefix must be bound to ${h}.`)}switch(n){case h:e.fail(t===``?`the default namespace may not be set to ${n}.`:`may not assign a prefix (even "xmlns") to the URI \1647+${h}.`);break;case m:switch(t){case`xml`:break;case``:e.fail(`the default namespace may not be set to ${n}.`);break;default:e.fail(`may not assign the xml namespace to another prefix.`)}}}function it(e,t){for(let n of Object.keys(t))rt(e,n,t[n])}var at=e=>p.test(e),ot=e=>l.test(e),N=0,st=1,ct=2;e.EVENTS=[`xmldecl`,`text`,`processinginstruction`,`doctype`,`comment`,`opentagstart`,`attribute`,`opentag`,`closetag`,`cdata`,`error`,`end`,`ready`];var lt={xmldecl:`xmldeclHandler`,text:`textHandler`,processinginstruction:`piHandler`,doctype:`doctypeHandler`,comment:`commentHandler`,opentagstart:`openTagStartHandler`,attribute:`attributeHandler`,opentag:`openTagHandler`,closetag:`closeTagHandler`,cdata:`cdataHandler`,error:`errorHandler`,end:`endHandler`,ready:`readyHandler`};e.SaxesParser=class{constructor(e){this.opt=e??{},this.fragmentOpt=!!this.opt.fragment;let t=this.xmlnsOpt=!!this.opt.xmlns;if(this.trackPosition=this.opt.position!==!1,this.fileName=this.opt.fileName,t){this.nameStartCheck=d,this.nameCheck=f,this.isName=at,this.processAttribs=this.processAttribsNS,this.pushAttrib=this.pushAttribNS,this.ns=Object.assign({__proto__:null},g);let e=this.opt.additionalNamespaces;e!=null&&(it(this,e),Object.assign(this.ns,e))}else this.nameStartCheck=o,this.nameCheck=s,this.isName=ot,this.processAttribs=this.processAttribsPlain,this.pushAttrib=this.pushAttribPlain;this.stateTable=[this.sBegin,this.sBeginWhitespace,this.sDoctype,this.sDoctypeQuote,this.sDTD,this.sDTDQuoted,this.sDTDOpenWaka,this.sDTDOpenWakaBang,this.sDTDComment,this.sDTDCommentEnding,this.sDTDCommentEnded,this.sDTDPI,this.sDTDPIEnding,this.sText,this.sEntity,this.sOpenWaka,this.sOpenWakaBang,this.sComment,this.sCommentEnding,this.sCommentEnded,this.sCData,this.sCDataEnding,this.sCDataEnding2,this.sPIFirstChar,this.sPIRest,this.sPIBody,this.sPIEnding,this.sXMLDeclNameStart,this.sXMLDeclName,this.sXMLDeclEq,this.sXMLDeclValueStart,this.sXMLDeclValue,this.sXMLDeclSeparator,this.sXMLDeclEnding,this.sOpenTag,this.sOpenTagSlash,this.sAttrib,this.sAttribName,this.sAttribNameSawWhite,this.sAttribValue,this.sAttribValueQuoted,this.sAttribValueClosed,this.sAttribValueUnquoted,this.sCloseTag,this.sCloseTagSawWhite],this._init()}get closed(){return this._closed}_init(){var e;this.openWakaBang=``,this.text=``,this.name=``,this.piTarget=``,this.entity=``,this.q=null,this.tags=[],this.tag=null,this.topNS=null,this.chunk=``,this.chunkPosition=0,this.i=0,this.prevI=0,this.carriedFromPrevious=void 0,this.forbiddenState=N,this.attribList=[];let{fragmentOpt:t}=this;this.state=t?C:ee,this.reportedTextBeforeRoot=this.reportedTextAfterRoot=this.closedRoot=this.sawRoot=t,this.xmlDeclPossible=!t,this.xmlDeclExpects=[`version`],this.entityReturnState=void 0;let{defaultXMLVersion:n}=this.opt;if(n===void 0){if(this.opt.forceXMLVersion===!0)throw Error(`forceXMLVersion set but defaultXMLVersion is not set`);n=`1.0`}this.setXMLVersion(n),this.positionAtNewLine=0,this.doctype=!1,this._closed=!1,this.xmlDecl={version:void 0,encoding:void 0,standalone:void 0},this.line=1,this.column=0,this.ENTITIES=Object.create(_),(e=this.readyHandler)==null||e.call(this)}get position(){return this.chunkPosition+this.i}get columnIndex(){return this.position-this.positionAtNewLine}on(e,t){this[lt[e]]=t}off(e){this[lt[e]]=void 0}makeError(e){let t=this.fileName??``;return this.trackPosition&&(t.length>0&&(t+=`:`),t+=`${this.line}:${this.column}`),t.length>0&&(t+=`: `),Error(t+e)}fail(e){let t=this.makeError(e),n=this.errorHandler;if(n===void 0)throw t;return n(t),this}write(e){if(this.closed)return this.fail(`cannot write after close; assign an onready handler.`);let t=!1;e===null?(t=!0,e=``):typeof e==`object`&&(e=e.toString()),this.carriedFromPrevious!==void 0&&(e=`${this.carriedFromPrevious}${e}`,this.carriedFromPrevious=void 0);let n=e.length,r=e.charCodeAt(n-1);!t&&(r===Be||r>=55296&&r<=56319)&&(this.carriedFromPrevious=e[n-1],n--,e=e.slice(0,n));let{stateTable:i}=this;for(this.chunk=e,this.i=0;this.i<n;)i[this.state].call(this);return this.chunkPosition+=n,t?this.end():this}close(){return this.write(null)}getCode10(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return v;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>=Ve||n===Re)return n;switch(n){case ze:return this.line++,this.column=0,this.positionAtNewLine=this.position,ze;case Be:return e.charCodeAt(t+1)===ze&&(this.i=t+2),this.line++,this.column=0,this.positionAtNewLine=this.position,y;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+(n-55296)*1024+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCode11(){let{chunk:e,i:t}=this;if(this.prevI=t,this.i=t+1,t>=e.length)return v;let n=e.charCodeAt(t);if(this.column++,n<55296){if(n>31&&n<127||n>159&&n!==Ze||n===Re)return n;switch(n){case ze:return this.line++,this.column=0,this.positionAtNewLine=this.position,ze;case Be:{let n=e.charCodeAt(t+1);(n===ze||n===j)&&(this.i=t+2)}case j:case Ze:return this.line++,this.column=0,this.positionAtNewLine=this.position,y;default:return this.fail(`disallowed character.`),n}}if(n>56319)return n>=57344&&n<=65533||this.fail(`disallowed character.`),n;let r=65536+(n-55296)*1024+(e.charCodeAt(t+1)-56320);return this.i=t+2,r>1114111&&this.fail(`disallowed character.`),r}getCodeNorm(){let e=this.getCode();return e===y?ze:e}unget(){this.i=this.prevI,this.column--}captureTo(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode(),i=r===y,a=i?ze:r;if(a===v||e.includes(a))return this.text+=n.slice(t,this.prevI),a;i&&(this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i)}}captureToChar(e){let{i:t}=this,{chunk:n}=this;for(;;){let r=this.getCode();switch(r){case y:this.text+=`${n.slice(t,this.prevI)}\n`,t=this.i,r=ze;break;case v:return this.text+=n.slice(t),!1}if(r===e)return this.text+=n.slice(t,this.prevI),!0}}captureNameChars(){let{chunk:e,i:t}=this;for(;;){let n=this.getCode();if(n===v)return this.name+=e.slice(t),v;if(!s(n))return this.name+=e.slice(t,this.prevI),n===y?ze:n}}skipSpaces(){for(;;){let e=this.getCodeNorm();if(e===v||!i(e))return e}}setXMLVersion(e){this.currentXMLVersion=e,e===`1.0`?(this.isChar=a,this.getCode=this.getCode10):(this.isChar=u,this.getCode=this.getCode11)}sBegin(){this.chunk.charCodeAt(0)===65279&&(this.i++,this.column++),this.state=te}sBeginWhitespace(){let e=this.i,t=this.skipSpaces();switch(this.prevI!==e&&(this.xmlDeclPossible=!1),t){case qe:if(this.state=ue,this.text.length!==0)throw Error(`no-empty text at start`);break;case v:break;default:this.unget(),this.state=C,this.xmlDeclPossible=!1}}sDoctype(){var e;let t=this.captureTo(et);switch(t){case k:(e=this.doctypeHandler)==null||e.call(this,this.text),this.text=``,this.state=C,this.doctype=!0;break;case v:break;default:this.text+=String.fromCodePoint(t),t===Ye?this.state=b:Qe(t)&&(this.state=re,this.q=t)}}sDoctypeQuote(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.q=null,this.state=ne)}sDTD(){let e=this.captureTo(M);e!==v&&(this.text+=String.fromCodePoint(e),e===Xe?this.state=ne:e===qe?this.state=ae:Qe(e)&&(this.state=ie,this.q=e))}sDTDQuoted(){let e=this.q;this.captureToChar(e)&&(this.text+=String.fromCodePoint(e),this.state=b,this.q=null)}sDTDOpenWaka(){let e=this.getCodeNorm();switch(this.text+=String.fromCodePoint(e),e){case He:this.state=x,this.openWakaBang=``;break;case A:this.state=ce;break;default:this.state=b}}sDTDOpenWakaBang(){let e=String.fromCodePoint(this.getCodeNorm()),t=this.openWakaBang+=e;this.text+=e,t!==`-`&&(this.state=t===`--`?oe:b,this.openWakaBang=``)}sDTDComment(){this.captureToChar(O)&&(this.text+=`-`,this.state=S)}sDTDCommentEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),this.state=e===O?se:oe}sDTDCommentEnded(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===k?this.state=b:(this.fail(`malformed comment.`),this.state=oe)}sDTDPI(){this.captureToChar(A)&&(this.text+=`?`,this.state=le)}sDTDPIEnding(){let e=this.getCodeNorm();this.text+=String.fromCodePoint(e),e===k&&(this.state=b)}sText(){this.tags.length===0?this.handleTextOutsideRoot():this.handleTextInRoot()}sEntity(){let{i:e}=this,{chunk:t}=this;loop:for(;;)switch(this.getCode()){case y:this.entity+=`${t.slice(e,this.prevI)}\n`,e=this.i;break;case Ke:{let{entityReturnState:n}=this,r=this.entity+t.slice(e,this.prevI);this.state=n;let i;r===``?(this.fail(`empty entity name.`),i=`&;`):(i=this.parseEntity(r),this.entity=``),(n!==C||this.textHandler!==void 0)&&(this.text+=i);break loop}case v:this.entity+=t.slice(e);break loop}}sOpenWaka(){let e=this.getCode();if(o(e))this.state=De,this.unget(),this.xmlDeclPossible=!1;else switch(e){case Ge:this.state=Ie,this.xmlDeclPossible=!1;break;case He:this.state=de,this.openWakaBang=``,this.xmlDeclPossible=!1;break;case A:this.state=_e;break;default:this.fail(`disallowed character in tag name`),this.state=C,this.xmlDeclPossible=!1}}sOpenWakaBang(){switch(this.openWakaBang+=String.fromCodePoint(this.getCodeNorm()),this.openWakaBang){case`[CDATA[`:!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0),this.state=he,this.openWakaBang=``;break;case`--`:this.state=fe,this.openWakaBang=``;break;case`DOCTYPE`:this.state=ne,(this.doctype||this.sawRoot)&&this.fail(`inappropriately located doctype declaration.`),this.openWakaBang=``;break;default:this.openWakaBang.length>=7&&this.fail(`incorrect syntax.`)}}sComment(){this.captureToChar(O)&&(this.state=pe)}sCommentEnding(){var e;let t=this.getCodeNorm();t===O?(this.state=me,(e=this.commentHandler)==null||e.call(this,this.text),this.text=``):(this.text+=`-${String.fromCodePoint(t)}`,this.state=fe)}sCommentEnded(){let e=this.getCodeNorm();e===k?this.state=C:(this.fail(`malformed comment.`),this.text+=`--${String.fromCodePoint(e)}`,this.state=fe)}sCData(){this.captureToChar(Xe)&&(this.state=T)}sCDataEnding(){let e=this.getCodeNorm();e===Xe?this.state=ge:(this.text+=`]${String.fromCodePoint(e)}`,this.state=he)}sCDataEnding2(){var e;let t=this.getCodeNorm();switch(t){case k:(e=this.cdataHandler)==null||e.call(this,this.text),this.text=``,this.state=C;break;case Xe:this.text+=`]`;break;default:this.text+=`]]${String.fromCodePoint(t)}`,this.state=he}}sPIFirstChar(){let e=this.getCodeNorm();this.nameStartCheck(e)?(this.piTarget+=String.fromCodePoint(e),this.state=E):e===A||i(e)?(this.fail(`processing instruction without a target.`),this.state=e===A?ye:ve):(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(e),this.state=E)}sPIRest(){let{chunk:e,i:t}=this;for(;;){let n=this.getCodeNorm();if(n===v){this.piTarget+=e.slice(t);return}if(!this.nameCheck(n)){this.piTarget+=e.slice(t,this.prevI);let r=n===A;r||i(n)?this.piTarget===`xml`?(this.xmlDeclPossible||this.fail(`an XML declaration must be at the start of the document.`),this.state=r?Ee:be):this.state=r?ye:ve:(this.fail(`disallowed character in processing instruction name.`),this.piTarget+=String.fromCodePoint(n));break}}}sPIBody(){if(this.text.length===0){let e=this.getCodeNorm();e===A?this.state=ye:i(e)||(this.text=String.fromCodePoint(e))}else this.captureToChar(A)&&(this.state=ye)}sPIEnding(){var e;let t=this.getCodeNorm();if(t===k){let{piTarget:t}=this;t.toLowerCase()===`xml`&&this.fail(`the XML declaration must appear at the start of the document.`),(e=this.piHandler)==null||e.call(this,{target:t,body:this.text}),this.piTarget=this.text=``,this.state=C}else t===A?this.text+=`?`:(this.text+=`?${String.fromCodePoint(t)}`,this.state=ve);this.xmlDeclPossible=!1}sXMLDeclNameStart(){let e=this.skipSpaces();if(e===A){this.state=Ee;return}e!==v&&(this.state=xe,this.name=String.fromCodePoint(e))}sXMLDeclName(){let e=this.captureTo(tt);if(e===A){this.state=Ee,this.name+=this.text,this.text=``,this.fail(`XML declaration is incomplete.`);return}if(i(e)||e===Je){if(this.name+=this.text,this.text=``,!this.xmlDeclExpects.includes(this.name))switch(this.name.length){case 0:this.fail(`did not expect any more name/value pairs.`);break;case 1:this.fail(`expected the name ${this.xmlDeclExpects[0]}.`);break;default:this.fail(`expected one of ${this.xmlDeclExpects.join(`, `)}`)}this.state=e===Je?Ce:Se}}sXMLDeclEq(){let e=this.getCodeNorm();if(e===A){this.state=Ee,this.fail(`XML declaration is incomplete.`);return}i(e)||(e!==Je&&this.fail(`value required.`),this.state=Ce)}sXMLDeclValueStart(){let e=this.getCodeNorm();if(e===A){this.state=Ee,this.fail(`XML declaration is incomplete.`);return}i(e)||(Qe(e)?this.q=e:(this.fail(`value must be quoted.`),this.q=Ve),this.state=we)}sXMLDeclValue(){let e=this.captureTo([this.q,A]);if(e===A){this.state=Ee,this.text=``,this.fail(`XML declaration is incomplete.`);return}if(e===v)return;let t=this.text;switch(this.text=``,this.name){case`version`:{this.xmlDeclExpects=[`encoding`,`standalone`];let e=t;this.xmlDecl.version=e,/^1\.[0-9]+$/.test(e)?this.opt.forceXMLVersion||this.setXMLVersion(e):this.fail(`version number must match /^1\\.[0-9]+$/.`);break}case`encoding`:/^[A-Za-z][A-Za-z0-9._-]*$/.test(t)||this.fail(`encoding value must match /^[A-Za-z0-9][A-Za-z0-9._-]*$/.`),this.xmlDeclExpects=[`standalone`],this.xmlDecl.encoding=t;break;case`standalone`:t!==`yes`&&t!==`no`&&this.fail(`standalone value must match "yes" or "no".`),this.xmlDeclExpects=[],this.xmlDecl.standalone=t}this.name=``,this.state=Te}sXMLDeclSeparator(){let e=this.getCodeNorm();if(e===A){this.state=Ee;return}i(e)||(this.fail(`whitespace required.`),this.unget()),this.state=be}sXMLDeclEnding(){var e;this.getCodeNorm()===k?(this.piTarget===`xml`?this.name!==`version`&&this.xmlDeclExpects.includes(`version`)&&this.fail(`XML declaration must contain a version.`):this.fail(`processing instructions are not allowed before root.`),(e=this.xmldeclHandler)==null||e.call(this,this.xmlDecl),this.name=``,this.piTarget=this.text=``,this.state=C):this.fail(`The character ? is disallowed anywhere in XML declarations.`),this.xmlDeclPossible=!1}sOpenTag(){var e;let t=this.captureNameChars();if(t===v)return;let n=this.tag={name:this.name,attributes:Object.create(null)};switch(this.name=``,this.xmlnsOpt&&(this.topNS=n.ns=Object.create(null)),(e=this.openTagStartHandler)==null||e.call(this,n),this.sawRoot=!0,!this.fragmentOpt&&this.closedRoot&&this.fail(`documents may contain only one root.`),t){case k:this.openTag();break;case Ge:this.state=Oe;break;default:i(t)||this.fail(`disallowed character in tag name.`),this.state=ke}}sOpenTagSlash(){this.getCode()===k?this.openSelfClosingTag():(this.fail(`forward-slash in opening tag not followed by >.`),this.state=ke)}sAttrib(){let e=this.skipSpaces();e!==v&&(o(e)?(this.unget(),this.state=Ae):e===k?this.openTag():e===Ge?this.state=Oe:this.fail(`disallowed character in attribute name.`))}sAttribName(){let e=this.captureNameChars();e===Je?this.state=Me:i(e)?this.state=je:e===k?(this.fail(`attribute without value.`),this.pushAttrib(this.name,this.name),this.name=this.text=``,this.openTag()):e!==v&&this.fail(`disallowed character in attribute name.`)}sAttribNameSawWhite(){let e=this.skipSpaces();switch(e){case v:return;case Je:this.state=Me;break;default:this.fail(`attribute without value.`),this.text=``,this.name=``,e===k?this.openTag():o(e)?(this.unget(),this.state=Ae):(this.fail(`disallowed character in attribute name.`),this.state=ke)}}sAttribValue(){let e=this.getCodeNorm();Qe(e)?(this.q=e,this.state=Ne):i(e)||(this.fail(`unquoted attribute value.`),this.state=Fe,this.unget())}sAttribValueQuoted(){let{q:e,chunk:t}=this,{i:n}=this;for(;;)switch(this.getCode()){case e:this.pushAttrib(this.name,this.text+t.slice(n,this.prevI)),this.name=this.text=``,this.q=null,this.state=Pe;return;case We:this.text+=t.slice(n,this.prevI),this.state=w,this.entityReturnState=Ne;return;case ze:case y:case Re:this.text+=`${t.slice(n,this.prevI)} `,n=this.i;break;case qe:this.text+=t.slice(n,this.prevI),this.fail(`disallowed character.`);return;case v:this.text+=t.slice(n);return}}sAttribValueClosed(){let e=this.getCodeNorm();i(e)?this.state=ke:e===k?this.openTag():e===Ge?this.state=Oe:o(e)?(this.fail(`no whitespace between attributes.`),this.unget(),this.state=Ae):this.fail(`disallowed character in attribute name.`)}sAttribValueUnquoted(){let e=this.captureTo(nt);switch(e){case We:this.state=w,this.entityReturnState=Fe;break;case qe:this.fail(`disallowed character.`);break;case v:break;default:this.text.includes(`]]>`)&&this.fail(`the string "]]>" is disallowed in char data.`),this.pushAttrib(this.name,this.text),this.name=this.text=``,e===k?this.openTag():this.state=ke}}sCloseTag(){let e=this.captureNameChars();e===k?this.closeTag():i(e)?this.state=Le:e!==v&&this.fail(`disallowed character in closing tag.`)}sCloseTagSawWhite(){switch(this.skipSpaces()){case k:this.closeTag();break;case v:break;default:this.fail(`disallowed character in closing tag.`)}}handleTextInRoot(){let{i:e,forbiddenState:t}=this,{chunk:n,textHandler:r}=this;scanLoop:for(;;)switch(this.getCode()){case qe:if(this.state=ue,r!==void 0){let{text:t}=this,i=n.slice(e,this.prevI);t.length===0?i.length!==0&&r(i):(r(t+i),this.text=``)}t=N;break scanLoop;case We:this.state=w,this.entityReturnState=C,r!==void 0&&(this.text+=n.slice(e,this.prevI)),t=N;break scanLoop;case Xe:switch(t){case N:t=st;break;case st:t=ct;break;case ct:break;default:throw Error(`impossible state`)}break;case k:t===ct&&this.fail(`the string "]]>" is disallowed in char data.`),t=N;break;case y:r!==void 0&&(this.text+=`${n.slice(e,this.prevI)}\n`),e=this.i,t=N;break;case v:r!==void 0&&(this.text+=n.slice(e));break scanLoop;default:t=N}this.forbiddenState=t}handleTextOutsideRoot(){let{i:e}=this,{chunk:t,textHandler:n}=this,r=!1;outRootLoop:for(;;){let a=this.getCode();switch(a){case qe:if(this.state=ue,n!==void 0){let{text:r}=this,i=t.slice(e,this.prevI);r.length===0?i.length!==0&&n(i):(n(r+i),this.text=``)}break outRootLoop;case We:this.state=w,this.entityReturnState=C,n!==void 0&&(this.text+=t.slice(e,this.prevI)),r=!0;break outRootLoop;case y:n!==void 0&&(this.text+=`${t.slice(e,this.prevI)}\n`),e=this.i;break;case v:n!==void 0&&(this.text+=t.slice(e));break outRootLoop;default:i(a)||(r=!0)}}r&&(!this.sawRoot&&!this.reportedTextBeforeRoot&&(this.fail(`text data outside of root node.`),this.reportedTextBeforeRoot=!0),this.closedRoot&&!this.reportedTextAfterRoot&&(this.fail(`text data outside of root node.`),this.reportedTextAfterRoot=!0))}pushAttribNS(e,t){var n;let{prefix:r,local:i}=this.qname(e),a={name:e,prefix:r,local:i,value:t};if(this.attribList.push(a),(n=this.attributeHandler)==null||n.call(this,a),r===`xmlns`){let e=t.trim();this.currentXMLVersion===`1.0`&&e===``&&this.fail(`invalid attempt to undefine prefix in XML 1.0`),this.topNS[i]=e,rt(this,i,e)}else if(e===`xmlns`){let e=t.trim();this.topNS[``]=e,rt(this,``,e)}}pushAttribPlain(e,t){var n;let r={name:e,value:t};this.attribList.push(r),(n=this.attributeHandler)==null||n.call(this,r)}end(){var e,t;this.sawRoot||this.fail(`document must contain a root element.`);let{tags:n}=this;for(;n.length>0;){let e=n.pop();this.fail(`unclosed tag: ${e.name}`)}this.state!==ee&&this.state!==C&&this.fail(`unexpected end.`);let{text:r}=this;return r.length!==0&&((e=this.textHandler)==null||e.call(this,r),this.text=``),this._closed=!0,(t=this.endHandler)==null||t.call(this),this._init(),this}resolve(e){var t;let n=this.topNS[e];if(n!==void 0)return n;let{tags:r}=this;for(let t=r.length-1;t>=0;t--)if(n=r[t].ns[e],n!==void 0)return n;return n=this.ns[e],n===void 0?(t=this.opt).resolvePrefix?.call(t,e):n}qname(e){let t=e.indexOf(`:`);if(t===-1)return{prefix:``,local:e};let n=e.slice(t+1),r=e.slice(0,t);return(r===``||n===``||n.includes(`:`))&&this.fail(`malformed name: ${e}.`),{prefix:r,local:n}}processAttribsNS(){let{attribList:e}=this,t=this.tag;{let{prefix:e,local:n}=this.qname(t.name);t.prefix=e,t.local=n;let r=t.uri=this.resolve(e)??``;e!==``&&(e===`xmlns`&&this.fail(`tags may not have "xmlns" as prefix.`),r===``&&(this.fail(`unbound namespace prefix: ${JSON.stringify(e)}.`),t.uri=e))}if(e.length===0)return;let{attributes:n}=t,r=new Set;for(let t of e){let{name:e,prefix:i,local:a}=t,o,s;i===``?(o=e===`xmlns`?h:``,s=e):(o=this.resolve(i),o===void 0&&(this.fail(`unbound namespace prefix: ${JSON.stringify(i)}.`),o=i),s=`{${o}}${a}`),r.has(s)&&this.fail(`duplicate attribute: ${s}.`),r.add(s),t.uri=o,n[e]=t}this.attribList=[]}processAttribsPlain(){let{attribList:e}=this,t=this.tag.attributes;for(let{name:n,value:r}of e)t[n]!==void 0&&this.fail(`duplicate attribute: ${n}.`),t[n]=r;this.attribList=[]}openTag(){var e;this.processAttribs();let{tags:t}=this,n=this.tag;n.isSelfClosing=!1,(e=this.openTagHandler)==null||e.call(this,n),t.push(n),this.state=C,this.name=``}openSelfClosingTag(){var e,t;this.processAttribs();let{tags:n}=this,r=this.tag;r.isSelfClosing=!0,(e=this.openTagHandler)==null||e.call(this,r),(t=this.closeTagHandler)==null||t.call(this,r),(this.tag=n[n.length-1]??null)===null&&(this.closedRoot=!0),this.state=C,this.name=``}closeTag(){let{tags:e,name:t}=this;if(this.state=C,this.name=``,t===``){this.fail(`weird empty close tag.`),this.text+=`</>`;return}let n=this.closeTagHandler,r=e.length;for(;r-->0;){let r=this.tag=e.pop();if(this.topNS=r.ns,n?.(r),r.name===t)break;this.fail(`unexpected close tag.`)}r===0?this.closedRoot=!0:r<0&&(this.fail(`unmatched closing tag: ${t}.`),this.text+=`</${t}>`)}parseEntity(e){if(e[0]!==`#`){let t=this.ENTITIES[e];return t===void 0?(this.fail(this.isName(e)?`undefined entity.`:`disallowed character in entity name.`),`&${e};`):t}let t=NaN;return e[1]===`x`&&/^#x[0-9a-f]+$/i.test(e)?t=parseInt(e.slice(2),16):/^#[0-9]+$/.test(e)&&(t=parseInt(e.slice(1),10)),this.isChar(t)?String.fromCodePoint(t):(this.fail(`malformed character entity.`),`&${e};`)}}}))(),uw=4194304,dw=new Set([`script`,`iframe`,`object`,`embed`,`audio`,`video`]),fw=new Set([`foreignobject`,`div`,`span`,`p`,`br`,`b`,`strong`,`i`,`em`,`small`,`sub`,`sup`,`code`,`ul`,`ol`,`li`,`a`]),pw=/^data:image\/(?:png|jpeg|gif|webp);base64,[a-z0-9+/=\s]+$/i,mw=/^data:(?:font\/(?:woff2?|opentype|truetype)|application\/(?:x-)?font-woff2?);base64,[a-z0-9+/=\s]+$/i,hw=class extends Error{constructor(e){super(e),this.name=`ClientSvgError`}};function gw(e){let t=e.trim();return t.startsWith(`#`)||pw.test(t)||mw.test(t)}function _w(e){if(/@import|expression\s*\(|javascript\s*:|data\s*:\s*text\/html|behavior\s*:|-moz-binding/i.test(e))return!0;let t=/url\s*\(\s*(['"]?)(.*?)\1\s*\)/gi;for(let n of e.matchAll(t))if(!gw(n[2]??``))return!0;return/url\s*\(/i.test(e.replace(t,``))}function vw(e){let t=e.trim();return t.startsWith(`#`)||pw.test(t)}function yw(e,t){let n=e.toLowerCase();return n.startsWith(`on`)?!1:n===`href`||n===`xlink:href`||n===`src`?vw(t):[`style`,`filter`,`fill`,`stroke`,`clip-path`,`mask`].includes(n)?!_w(t):n!==`xml:base`&&!/javascript\s*:/i.test(t)}function bw(e){return e.replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`)}function xw(e){return bw(e).replaceAll(`"`,`&quot;`)}function Sw(e){if(e.type===`text`)return bw(e.value);let t=[...e.attributes].map(([e,t])=>` ${e}="${xw(t)}"`).join(``);return`<${e.name}${t}>${e.children.map(Sw).join(``)}</${e.name}>`}function Cw(e){return e.name.toLowerCase().split(`:`).at(-1)??e.name.toLowerCase()}function ww(e){if(e===void 0||!/^-?\d+(?:\.\d+)?(?:px)?$/.test(e.trim()))return null;let t=Number.parseFloat(e);return Number.isFinite(t)&&t>0?t:null}function Tw(e){let t=e.attributes.get(`viewBox`)?.trim().split(/[\s,]+/).map(Number);if(t?.length===4&&t.every(Number.isFinite)&&t[2]>0&&t[3]>0)return t;let n=ww(e.attributes.get(`width`)),r=ww(e.attributes.get(`height`));return n!==null&&r!==null?[0,0,n,r]:null}function Ew(e,t){let n=e.attributes.get(`style`);if(!n)return null;for(let e of n.split(`;`)){let n=e.indexOf(`:`);if(n>=0&&e.slice(0,n).trim().toLowerCase()===t)return e.slice(n+1).trim()}return null}function Dw(e){let t=(e.attributes.get(`fill`)??Ew(e,`fill`)??``).replaceAll(` `,``).toLowerCase();return t===`white`||t===`#fff`||t===`#ffffff`||t===`rgb(255,255,255)`}function Ow(e){if(e===void 0||!/^-?\d+(?:\.\d+)?$/.test(e.trim()))return null;let t=Number(e);return Number.isFinite(t)?t:null}function kw(e,t){let n=e.attributes.get(`width`)?.trim(),r=e.attributes.get(`height`)?.trim();if(n===`100%`&&r===`100%`)return!0;let i=Ow(e.attributes.get(`x`)??`0`),a=Ow(e.attributes.get(`y`)??`0`),o=Ow(n),s=Ow(r);if([i,a,o,s].some(e=>e===null))return!1;let[c,l,u,d]=t,f=.01;return i<=c+f&&a<=l+f&&i+o>=c+u-f&&a+s>=l+d-f}function Aw(e,t,n){let r=Cw(e),i=new Set((e.attributes.get(`class`)??``).toLowerCase().split(/\s+/));return r===`rect`&&i.has(`backdrop`)||r===`rect`&&t!==null&&Dw(e)&&kw(e,t)?!0:n===`graphviz`&&r===`polygon`&&Dw(e)&&(e.attributes.get(`stroke`)??``).toLowerCase()===`none`}function jw(e,t,n){let r=Cw(e)===`svg`?Tw(e)??t:t;e.children=e.children.filter(e=>e.type===`text`||!Aw(e,r,n)&&(jw(e,r,n),!0))}function Mw(e,t){let n=(e.attributes.get(`style`)??``).split(`;`).map(e=>e.trim()).filter(Boolean).filter(e=>!/^background(?:-color)?\s*:/i.test(e));n.push(`background-color:${t}`),e.attributes.set(`style`,`${n.join(`;`)};`)}function Nw(e,t=[],n=[]){return{type:`element`,name:e,attributes:new Map(t),children:n}}function Pw(e,t,n,r){let i=[],a=null;t.title&&i.push(Nw(`title`,[],[{type:`text`,value:t.title}])),t.description&&i.push(Nw(`desc`,[],[{type:`text`,value:t.description}]));let o=Tw(e);if((n.padding||n.background||n.frame)&&o===null)throw new hw(`Renderer output has no usable SVG dimensions for presentation settings.`);if(o!==null){let[t,r,s,c]=o,l=n.padding,u=[t-l,r-l,s+l*2,c+l*2];e.attributes.set(`viewBox`,u.join(` `)),e.attributes.has(`width`)&&e.attributes.set(`width`,String(u[2])),e.attributes.has(`height`)&&e.attributes.set(`height`,String(u[3])),n.background&&i.push(Nw(`rect`,[[`x`,String(u[0])],[`y`,String(u[1])],[`width`,String(u[2])],[`height`,String(u[3])],[`fill`,n.background]])),n.frame&&(a=Nw(`rect`,[[`x`,String(u[0]+.5)],[`y`,String(u[1]+.5)],[`width`,String(Math.max(0,u[2]-1))],[`height`,String(Math.max(0,u[3]-1))],[`fill`,`none`],[`stroke`,`#000000`],[`stroke-width`,`1`],[`vector-effect`,`non-scaling-stroke`]]))}n.background&&(jw(e,o,r),Mw(e,n.background)),e.children.unshift(...i),a&&e.children.push(a)}function Fw(e,t,n,r){if(e.length>uw)throw new hw(`Rendered SVG is too large.`);let i=null,a=[],o=0,s=null,c=new lw.SaxesParser({xmlns:!0});c.on(`doctype`,e=>{e.includes(`[`)&&(s=Error(`Internal DOCTYPE subsets are not allowed`))}),c.on(`opentag`,e=>{let t=e.local.toLowerCase(),n=t===`foreignobject`||a.some(e=>Cw(e)===`foreignobject`);if(o>0||dw.has(t)||n&&!fw.has(t)){o++;return}let r=Nw(e.name);for(let t of Object.values(e.attributes))yw(t.name,t.value)&&r.attributes.set(t.name,t.value);let c=a.at(-1);c?c.children.push(r):i===null?i=r:s=Error(`Multiple root elements`),a.push(r)});let l=e=>{if(o>0||e===``)return;let t=a.at(-1);if(t){if(Cw(t)===`style`&&_w(e))throw new hw(`Renderer output contains unsafe CSS.`);t.children.push({type:`text`,value:e})}else e.trim()!==``&&(s=Error(`Text outside root element`))};c.on(`text`,l),c.on(`cdata`,l),c.on(`closetag`,()=>{o>0?o--:a.pop()}),c.on(`error`,e=>{s=e});try{c.write(e).close()}catch(e){if(e instanceof hw)throw e;s=e}if(s!==null||i===null||Cw(i)!==`svg`)throw new hw(`Renderer returned invalid SVG.`);return Pw(i,t,n,r),Sw(i)}var Iw=Object.freeze({plantuml:`https://plantuml.render.diagram.zip/v1/svg`,graphviz:`https://graphviz.render.diagram.zip/v1/svg`,d2:`https://d2.render.diagram.zip/v1/svg`,c4plantuml:`https://c4plantuml.render.diagram.zip/v1/svg`,blockdiag:`https://blockdiag.render.diagram.zip/v1/svg`,seqdiag:`https://seqdiag.render.diagram.zip/v1/svg`,actdiag:`https://actdiag.render.diagram.zip/v1/svg`,nwdiag:`https://nwdiag.render.diagram.zip/v1/svg`,packetdiag:`https://packetdiag.render.diagram.zip/v1/svg`,rackdiag:`https://rackdiag.render.diagram.zip/v1/svg`,bytefield:`https://bytefield.render.diagram.zip/v1/svg`,dbml:`https://dbml.render.diagram.zip/v1/svg`,diagramsnet:`https://diagramsnet.render.diagram.zip/v1/svg`,ditaa:`https://ditaa.render.diagram.zip/v1/svg`,erd:`https://erd.render.diagram.zip/v1/svg`,goat:`https://goat.render.diagram.zip/v1/svg`,nomnoml:`https://nomnoml.render.diagram.zip/v1/svg`,pikchr:`https://pikchr.render.diagram.zip/v1/svg`,structurizr:`https://structurizr.render.diagram.zip/v1/svg`,svgbob:`https://svgbob.render.diagram.zip/v1/svg`,symbolator:`https://symbolator.render.diagram.zip/v1/svg`,tikz:`https://tikz.render.diagram.zip/v1/svg`,umlet:`https://umlet.render.diagram.zip/v1/svg`,vega:`https://vega.render.diagram.zip/v1/svg`,vegalite:`https://vegalite.render.diagram.zip/v1/svg`,wavedrom:`https://wavedrom.render.diagram.zip/v1/svg`,wireviz:`https://wireviz.render.diagram.zip/v1/svg`});function Lw(e){return Iw[e]??null}function Rw(e,t,n){return Math.min(Math.max(e,t),n)}var zw=class{constructor({stage:e,image:t,status:n,minimap:r,minimapImage:i,minimapViewport:a}){this.stage=e,this.image=t,this.status=n,this.minimap=r,this.minimapImage=i,this.minimapViewport=a,this.scale=1,this.x=0,this.y=0,this.objectUrl=null,this.abortController=null,this.requestNumber=0,this.pendingRender=null,this.renderLoop=null,this.latestRenderKey=null,this.latestSvgBlob=null,this.latestRendererIdentity=null,this.imageFallbackUrl=null,this.activeImageUrl=null,this.drag=null,this.image.addEventListener(`load`,()=>{this.image.src===this.activeImageUrl&&(this.imageFallbackUrl=null,this.setStatus(`Rendered`,`ready`),this.fit())}),this.image.addEventListener(`error`,()=>this.retryBlockedImage()),this.stage.addEventListener(`pointerdown`,e=>this.startPan(e)),this.stage.addEventListener(`pointermove`,e=>this.pan(e)),this.stage.addEventListener(`pointerup`,e=>this.endPan(e)),this.stage.addEventListener(`pointercancel`,e=>this.endPan(e)),this.stage.addEventListener(`wheel`,e=>this.wheelZoom(e),{passive:!1}),this.minimap.addEventListener(`pointerdown`,e=>this.moveFromMinimap(e)),new ResizeObserver(()=>this.updateTransform()).observe(this.stage)}render({type:e,source:t,options:n={},meta:r={},presentation:i={}}){if(!t.trim()){this.requestNumber++,this.pendingRender=null,this.abortController?.abort(),this.setStatus(`Write something to render.`,`idle`);return}let a=JSON.stringify({type:e,source:t,options:n,meta:r,presentation:i});return this.latestRenderKey===a&&this.latestSvgBlob?Promise.resolve():(this.pendingRender={type:e,source:t,options:n,meta:r,presentation:i,renderKey:a,requestNumber:++this.requestNumber},this.abortController?.abort(),this.renderLoop||=this.drainRenderQueue(),this.renderLoop)}async drainRenderQueue(){try{for(;this.pendingRender;){let e=this.pendingRender;this.pendingRender=null,await this.performRender(e)}}finally{this.renderLoop=null,this.pendingRender&&(this.renderLoop=this.drainRenderQueue())}}async performRender({type:e,source:t,options:n,meta:r,presentation:i,renderKey:a,requestNumber:o}){let s=new AbortController;this.abortController=s,this.setStatus(`Rendering…`,`loading`),this.stage.style.setProperty(`--render-background`,`var(--preview-bg)`);try{let c=aw(e),l;if(c)try{let a=await c.render({type:e,source:t,options:n},s.signal);l={body:Fw(a.body,r,i,e),identity:{unit:e,build:a.build||a.version,pipeline:Array.isArray(a.pipeline)?a.pipeline:[e]}},this.status.dataset.cache=`browser`,this.status.dataset.renderer=e}catch(a){if(a.name===`AbortError`)throw a;l=await this.renderThroughGateway({type:e,source:t,options:n,meta:r,presentation:i},s.signal)}else l=await this.renderThroughGateway({type:e,source:t,options:n,meta:r,presentation:i},s.signal);if(o!==this.requestNumber)return;let{blob:u,background:d}=this.normalizedSvgBlob(l.body);this.latestRenderKey=a,this.latestSvgBlob=u,this.latestRendererIdentity=l.identity,this.imageFallbackUrl=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(await u.text())}`,this.stage.style.setProperty(`--render-background`,d);let f=URL.createObjectURL(u),p=this.objectUrl;this.objectUrl=f,this.activeImageUrl=f,this.image.src=f,this.minimapImage.src=f,this.image.hidden=!1,this.setStatus(`Loading image…`,`loading`),p&&URL.revokeObjectURL(p)}catch(e){if(e.name===`AbortError`)return;this.setStatus(e.message||`Could not render this diagram.`,`error`)}finally{this.abortController===s&&(this.abortController=null)}}async renderThroughGateway({type:e,source:t,options:n,meta:r,presentation:i},a){let o=Lw(e);if(o)try{let s=await this.renderRequest(o,{source:t,format:`svg`,options:n,metadata:r,presentation:i},a);if(s.ok||s.status<500)return await this.renderResponse(s,e);await s.body?.cancel()}catch(e){if(e.name===`AbortError`)throw e}let s=await this.renderRequest(`/render/v1/svg`,{engine:e,source:t,format:`svg`,options:n,metadata:r,presentation:i},a);return this.renderResponse(s,e)}renderRequest(e,t,n){return fetch(e,{method:`POST`,headers:{Accept:`image/svg+xml`,"Content-Type":`application/json`},body:JSON.stringify(t),signal:n})}async renderResponse(e,t){if(!e.ok)throw Error(await this.errorMessage(e));this.status.dataset.cache=e.headers.get(`X-Diagram-Cache`)?.toLowerCase()??`miss`,this.status.dataset.renderer=e.headers.get(`X-Diagram-Unit`)?.toLowerCase()??e.headers.get(`X-Diagram-Renderer`)?.toLowerCase()??`gateway`;let n=e.headers.get(`X-Diagram-Unit`)?.toLowerCase()??e.headers.get(`X-Diagram-Engine`)?.toLowerCase()??t,r=e.headers.get(`X-Renderer-Build`)??e.headers.get(`X-Diagram-Engine-Version`)??`${n}-unknown`,i=(e.headers.get(`X-Diagram-Pipeline`)??n).split(`,`).map(e=>e.trim().toLowerCase()).filter(Boolean);return{body:await e.text(),identity:{unit:n,build:r,pipeline:i}}}retryBlockedImage(){if(this.image.src===this.activeImageUrl){if(this.imageFallbackUrl&&this.activeImageUrl.startsWith(`blob:`)){let e=this.imageFallbackUrl;this.imageFallbackUrl=null,this.objectUrl&&URL.revokeObjectURL(this.objectUrl),this.objectUrl=null,this.activeImageUrl=e,this.image.src=e,this.minimapImage.src=e;return}this.setStatus(`The rendered image was blocked or invalid.`,`error`)}}svgBlobFor(e){let{type:t,source:n,options:r={},meta:i={},presentation:a={}}=e,o=JSON.stringify({type:t,source:n,options:r,meta:i,presentation:a});return this.latestRenderKey===o?this.latestSvgBlob:null}rendererIdentityFor(e){let{type:t,source:n,options:r={},meta:i={},presentation:a={}}=e,o=JSON.stringify({type:t,source:n,options:r,meta:i,presentation:a});return this.latestRenderKey===o?this.latestRendererIdentity:null}async errorMessage(e){let t=await e.text();if(e.headers.get(`Content-Type`)?.includes(`application/json`))try{let e=JSON.parse(t);if(typeof e?.error?.message==`string`)return e.error.message}catch{}return new DOMParser().parseFromString(t,`text/html`).body.textContent.trim().replace(/\s+/g,` `)||`Render failed with HTTP ${e.status}.`}normalizedSvgBlob(e){let t=new DOMParser().parseFromString(e,`image/svg+xml`).documentElement,n=t.getAttribute(`viewBox`)?.trim().split(/[\s,]+/).map(Number);t.nodeName===`svg`&&n?.length===4&&n.every(Number.isFinite)&&(t.hasAttribute(`width`)||t.setAttribute(`width`,String(n[2])),t.hasAttribute(`height`)||t.setAttribute(`height`,String(n[3])),e=new XMLSerializer().serializeToString(t));let r=t.style.backgroundColor||t.style.background,i=r&&r!==`transparent`?r:`#ffffff`;return{blob:new Blob([e],{type:`image/svg+xml`}),background:i}}setStatus(e,t){this.status.textContent=e,this.status.dataset.state=t}zoom(e){if(this.image.hidden)return;let t=this.stage.getBoundingClientRect();this.zoomAt(e,t.width/2,t.height/2)}zoomAt(e,t,n){let r=Rw(this.scale*e,.1,8),i=(t-this.x)/this.scale,a=(n-this.y)/this.scale;this.x=t-i*r,this.y=n-a*r,this.scale=r,this.updateTransform()}wheelZoom(e){if(this.image.hidden||e.target.closest(`.preview-toolbar, .minimap`))return;e.preventDefault();let t=this.stage.getBoundingClientRect(),n=e.deltaY*(e.deltaMode===WheelEvent.DOM_DELTA_LINE?16:e.deltaMode===WheelEvent.DOM_DELTA_PAGE?t.height:1);this.zoomAt(Math.exp(-Rw(n,-240,240)*.002),e.clientX-t.left,e.clientY-t.top)}oneToOne(){if(this.image.hidden)return;let e=this.stage.getBoundingClientRect();this.scale=1,this.x=(e.width-this.image.naturalWidth)/2,this.y=(e.height-this.image.naturalHeight)/2,this.updateTransform()}fit(){if(!this.image.naturalWidth||!this.image.naturalHeight)return;let e=this.stage.getBoundingClientRect(),t=Math.min(64,e.width*.12);this.scale=Rw(Math.min((e.width-t*2)/this.image.naturalWidth,(e.height-t*2)/this.image.naturalHeight),.1,2),this.x=(e.width-this.image.naturalWidth*this.scale)/2,this.y=(e.height-this.image.naturalHeight*this.scale)/2,this.updateTransform()}updateTransform(){this.image.style.transform=`translate(${this.x}px, ${this.y}px) scale(${this.scale})`,this.updateMinimap()}startPan(e){this.image.hidden||e.button!==0||e.target.closest(`.preview-toolbar, .minimap`)||(this.drag={pointerId:e.pointerId,x:e.clientX,y:e.clientY,originX:this.x,originY:this.y},this.stage.setPointerCapture(e.pointerId),this.stage.dataset.dragging=`true`)}pan(e){!this.drag||e.pointerId!==this.drag.pointerId||(this.x=this.drag.originX+e.clientX-this.drag.x,this.y=this.drag.originY+e.clientY-this.drag.y,this.updateTransform())}endPan(e){!this.drag||e.pointerId!==this.drag.pointerId||(this.drag=null,delete this.stage.dataset.dragging)}moveFromMinimap(e){if(!this.image.naturalWidth||!this.image.naturalHeight)return;let t=this.minimap.getBoundingClientRect(),n=Math.min(t.width/this.image.naturalWidth,t.height/this.image.naturalHeight),r=(t.width-this.image.naturalWidth*n)/2,i=(t.height-this.image.naturalHeight*n)/2,a=(e.clientX-t.left-r)/n,o=(e.clientY-t.top-i)/n,s=this.stage.getBoundingClientRect();this.x=s.width/2-a*this.scale,this.y=s.height/2-o*this.scale,this.updateTransform()}updateMinimap(){if(!this.image.naturalWidth||!this.image.naturalHeight)return;let e=this.stage.getBoundingClientRect(),t=this.image.naturalWidth*this.scale,n=this.image.naturalHeight*this.scale,r=this.x>=0&&this.y>=0&&this.x+t<=e.width&&this.y+n<=e.height;if(this.minimap.hidden=r,r)return;let i=this.minimap.getBoundingClientRect(),a=Math.min(i.width/this.image.naturalWidth,i.height/this.image.naturalHeight),o=(i.width-this.image.naturalWidth*a)/2,s=(i.height-this.image.naturalHeight*a)/2,c=Rw(-this.x/this.scale,0,this.image.naturalWidth),l=Rw(-this.y/this.scale,0,this.image.naturalHeight),u=Rw((e.width-this.x)/this.scale,0,this.image.naturalWidth),d=Rw((e.height-this.y)/this.scale,0,this.image.naturalHeight);this.minimapViewport.style.left=`${o+c*a}px`,this.minimapViewport.style.top=`${s+l*a}px`,this.minimapViewport.style.width=`${Math.max(4,(u-c)*a)}px`,this.minimapViewport.style.height=`${Math.max(4,(d-l)*a)}px`}},Bw=`diagram.zip:draft:local:v2`,Vw=`diagram.zip:draft:alias:v1:`,Hw=`diagram.zip:write:v1:`,Uw=new ke,Ww=new kC,Gw,Kw=!1,qw,Jw=!1,Yw=``,Q={aliasId:null,contentId:null,renderId:null,revision:null,mode:`open`,savedMode:null,writeCapability:null,savedState:null,savedSnapshot:null,bundleKey:null,keyEnvelope:null,encryptedContent:null,encryptedMetadata:null,keyEnvelopeDirty:!1,dirty:!0},Xw=new Map;document.querySelector(`#app`).innerHTML=`16481648 <main class="app-shell">16491649 <header class="app-header">16501650 <a class="brand" href="/" aria-label="New diagram"><img class="brand-mark" src="/diagram.zip/icon.svg" alt=""><span>diagram.zip</span></a>
@@ -1666,6 +1666,14 @@ ${h}.`);break;case m:switch(t){case`xml`:break;case``:e.fail(`the default namesp
16661666 </div>16671667 </header>16681668 1669+ <aside class="draft-bar" id="draft-bar" aria-live="polite" hidden>1670+ <p>This device has changes that are not part of the saved share link.</p>1671+ <div>1672+ <button class="secondary-action" id="restore-saved" type="button">Restore saved</button>1673+ <button class="primary-action" id="make-copy" type="button">Make a copy</button>1674+ </div>1675+ </aside>1676+16691677 <div class="mobile-tabs" role="tablist" aria-label="Workspace panel">16701678 <button type="button" role="tab" aria-selected="true" data-panel="editor">Edit</button>16711679 <button type="button" role="tab" aria-selected="false" data-panel="preview">Preview</button>
@@ -1796,4 +1804,4 @@ ${h}.`);break;case m:switch(t){case`xml`:break;case``:e.fail(`the default namesp
17961804 </dialog>17971805 17981806 <div class="toast" id="toast" role="status" aria-live="polite"></div>1799-`;var Xw=document.querySelector(`#diagram-type`),Zw=document.querySelector(`#diagram-title`),Qw=document.querySelector(`#diagram-description`),$w=document.querySelector(`#diagram-background`),eT=document.querySelector(`#diagram-padding`),tT=document.querySelector(`#diagram-frame`);for(let{id:e,label:t}of mx)Xw.add(new Option(t,e));var nT=await fT(),rT=cC(nT.meta),iT=lC(nT.presentation);Xw.value=nT.type,Zw.value=rT.title,Qw.value=rT.description,$w.value=iT.background,eT.value=String(iT.padding),tT.checked=iT.frame,BT(),Kw=nT.type,Yw.set(nT.type,nT);var aT=sd.define([{tag:J.keyword,color:`var(--syntax-keyword)`,fontWeight:`650`},{tag:J.string,color:`var(--syntax-string)`},{tag:[J.comment,J.lineComment,J.blockComment],color:`var(--syntax-comment)`,fontStyle:`italic`},{tag:[J.number,J.bool],color:`var(--syntax-number)`},{tag:[J.operator,J.punctuation],color:`var(--syntax-operator)`},{tag:[J.variableName,J.typeName],color:`var(--syntax-variable)`}]),oT=new U({state:M.create({doc:nT.source,extensions:[j_,Hw.of(yx(nT.type)),dd(aT),U.theme({"&":{height:`100%`,backgroundColor:`transparent`},".cm-scroller":{fontFamily:`var(--font-mono)`,lineHeight:`1.65`},".cm-content":{padding:`28px 10px 80px`},".cm-gutters":{backgroundColor:`transparent`,border:`0`,paddingLeft:`12px`},".cm-activeLine, .cm-activeLineGutter":{backgroundColor:`var(--editor-active-line)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--ink)`},"&.cm-focused":{outline:`none`}}),U.updateListener.of(e=>{e.docChanged&&!Gw&&lT()})]}),parent:document.querySelector(`#editor`)}),sT=new Rw({stage:document.querySelector(`#preview-stage`),image:document.querySelector(`#preview-image`),status:document.querySelector(`.render-status`),minimap:document.querySelector(`#minimap`),minimapImage:document.querySelector(`#minimap-image`),minimapViewport:document.querySelector(`#minimap-viewport`)});Xw.addEventListener(`change`,()=>{let e=Xw.value;pT(mC(Yw,Kw,e,cT(),pC))}),document.querySelector(`#details`).addEventListener(`click`,()=>{document.querySelector(`#details-dialog`).showModal(),Zw.focus()});for(let e of[Zw,Qw,$w,eT,tT])e.addEventListener(`input`,()=>{BT(),clearTimeout(dT.timeout),dT.timeout=setTimeout(dT,220)});document.querySelector(`#details-dialog`).addEventListener(`close`,dT),document.querySelector(`#lock-diagram`).addEventListener(`click`,ST),document.querySelector(`#change-password`).addEventListener(`click`,CT),document.querySelector(`#unlock-diagram`).addEventListener(`click`,wT),document.querySelector(`#save`).addEventListener(`click`,()=>_T()),document.querySelector(`#share`).addEventListener(`click`,mT),document.querySelector(`#share-save`).addEventListener(`click`,async()=>{await _T(),hT()}),document.querySelector(`.brand`).addEventListener(`click`,e=>{e.preventDefault(),confirm(`Start a new diagram?`)&&zT()}),document.querySelectorAll(`[data-preview-action]`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.dataset.previewAction;t===`zoom-out`&&sT.zoom(.8),t===`zoom-in`&&sT.zoom(1.25),t===`fit`&&sT.fit(),t===`one-to-one`&&sT.oneToOne()})}),document.querySelectorAll(`.mobile-tabs button`).forEach(e=>{e.addEventListener(`click`,()=>{document.querySelector(`.workspace`).dataset.mobilePanel=e.dataset.panel,document.querySelectorAll(`.mobile-tabs button`).forEach(t=>{t.setAttribute(`aria-selected`,String(t===e))}),e.dataset.panel===`preview`&&sT.fit()})}),document.querySelectorAll(`[data-copy]`).forEach(e=>{e.addEventListener(`click`,async()=>{let t=document.querySelector(`#${e.dataset.copy}`);t.value&&(await VT(t.value),$(`Copied`))})}),window.addEventListener(`popstate`,()=>location.reload()),window.addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),_T())});function cT(){let e=Math.min(256,Math.max(0,Number.parseInt(eT.value,10)||0));return{type:Xw.value,source:oT.state.doc.toString(),options:{},meta:cC({title:Zw.value,description:Qw.value}),presentation:lC({background:$w.value,padding:e,frame:tT.checked})}}function lT(e=1200){clearTimeout(Ww),Ww=setTimeout(uT,e)}function uT(e=!0){let t=cT();MT(t),Q.dirty=Q.keyEnvelopeDirty||Q.savedSnapshot!==kT(t,Q.mode),LT(),RT(),e&&sT.render(t)}function dT(){clearTimeout(dT.timeout),uT()}async function fT(){let e=bC(location.pathname);if(e){let t=wC(location.hash);t&&PT(e,t),location.hash&&history.replaceState(null,``,`${location.pathname}${location.search}`);try{let n=await Uw.getAlias(e),r=t??FT(e);if(n.mode===`locked`){let e=await TT(n);return e?(IT(n,r,e.state,e.bundleKey),e.state):(Jw=`A password is required to open this diagram.`,pC(oC))}IT(n,r,n.state);let i=jT(`${Bw}${e}`);return i?.revision===n.revision?i.state:n.state}catch(e){Jw=e instanceof TC?e.message:`This saved diagram could not be loaded.`}}location.hash&&history.replaceState(null,``,`${location.pathname}${location.search}`);let t=xx(location.search);if(t)return pC(t);let n=jT(zw);return n?n.state:pC(oC)}function pT(e,t=!0){if(!bx(e.type))throw Error(`Unsupported diagram type.`);let n=cC(e.meta),r=lC(e.presentation);Gw=!0,Kw=e.type,Yw.set(e.type,{...e,meta:n,presentation:r}),Xw.value=e.type,Zw.value=n.title,Qw.value=n.description,$w.value=r.background,eT.value=String(r.padding),tT.checked=r.frame,BT(),oT.dispatch({changes:{from:0,to:oT.state.doc.length,insert:e.source},effects:Hw.reconfigure(yx(e.type))}),Gw=!1,t?uT():sT.render(cT())}function mT(){uT(),hT(),document.querySelector(`#share-dialog`).showModal()}function hT(){let e=!!Q.aliasId,t=e&&Q.savedMode===`locked`,n=e?xC(location.origin,Q.aliasId):``,r=e&&Q.writeCapability?SC(location.origin,Q.aliasId,Q.writeCapability):``,i=t?null:Q.savedState,a=i?CC(location.origin,Q.aliasId,`svg`):``,o=document.querySelector(`#image-link`),s=document.querySelector(`#markdown-link`),c=i?.meta.title.trim().replace(/[\[\]\r\n]/g,` `)||`Diagram`;gT(`viewer-link`,n,`Save to create a read link`),gT(`editor-link`,r,e?`No write capability on this device`:`Save to create an edit link`),gT(`image-link`,a,t?`Encrypted diagrams cannot be embedded`:e?`Unavailable for this diagram`:`Save to create an image link`),gT(`markdown-link`,a?`![${c}](${a})`:``,t?`Encrypted diagrams cannot be embedded`:e?`Unavailable for this diagram`:`Save to create Markdown`),document.querySelector(`#editor-link-note`).textContent=r?`Anyone with this link can update the diagram.`:e?`This device has read-only access. Save a copy to create a new edit link.`:`The edit link is a bearer credential and appears after saving.`,document.querySelector(`#image-link-note`).textContent=t?`This diagram is encrypted in your browser. Image embeds are disabled because they cannot ask for its password.`:``,o.dataset.state=t?`unavailable`:`ready`,s.dataset.state=t?`unavailable`:`ready`;let l=document.querySelector(`#share-status`),u=document.querySelector(`#share-save`);u.hidden=e&&!Q.dirty,e?Q.dirty&&Q.writeCapability?(l.textContent=`These links show the last saved version. Save your changes before sharing.`,u.textContent=`Save changes`):Q.dirty?(l.textContent=`You are editing a read-only diagram. Save a copy to share your changes.`,u.textContent=`Save as new`):l.textContent=t?Q.writeCapability?`The read link asks for the password. The edit link also grants permission to save changes.`:`The read link asks for the password. This device has read-only access.`:Q.writeCapability?`Copy a read link, or share the edit capability carefully.`:`This diagram is read-only on this device.`:(l.textContent=`Save this diagram to create stable share links.`,u.textContent=`Save diagram`)}function gT(e,t,n){let r=document.querySelector(`#${e}`),i=document.querySelector(`[data-copy="${e}"]`);r.value=t,r.placeholder=t?``:n,i.disabled=!t}async function _T(){if(qw)return!1;uT(!1);let e=cT();if(Q.aliasId&&!Q.dirty)return $(`Already saved`),!0;qw=!0,LT();try{if(Q.aliasId&&Q.writeCapability)return IT(Q.mode===`locked`?await Uw.updateLockedAlias(Q.aliasId,await yT(e),Q.revision,Q.writeCapability):await Uw.updateAlias(Q.aliasId,e,Q.revision,Q.writeCapability),Q.writeCapability,e,Q.mode===`locked`?Q.bundleKey:null),NT(`${Bw}${Q.aliasId}`),await bT(e),$(`Saved`),!0;let t=!!Q.aliasId;return await vT(e),$(t?`Saved as a new diagram`:`Saved`),!0}catch(t){return t instanceof TC&&t.status===412&&Q.aliasId?await DT(e):($(t instanceof Error?t.message:`Could not save this diagram.`),!1)}finally{qw=!1,LT()}}async function vT(e){let t=Q.aliasId,n=t?`${Bw}${t}`:zw,r=Q.bundleKey,i=Q.mode===`locked`?await Uw.createLockedAlias(await yT(e)):await Uw.createAlias(e);IT(i,i.writeCapability,e,Q.mode===`locked`?r:null),PT(i.aliasId,i.writeCapability),NT(n),history.pushState(null,``,`/d/${i.aliasId}`),await bT(e)}async function yT(e){if(!(Q.bundleKey instanceof Uint8Array)||!Q.keyEnvelope)throw Error(`This diagram is missing its browser encryption key.`);return Q.savedMode===`locked`&&Q.savedSnapshot===kT(e,`locked`)&&Q.encryptedContent&&Q.encryptedMetadata?{mode:`locked`,encryptedContent:Q.encryptedContent,encryptedMetadata:Q.encryptedMetadata,keyEnvelope:Q.keyEnvelope}:JC(e,Q.bundleKey,Q.keyEnvelope)}async function bT(e){if(!Q.aliasId||!Q.writeCapability)return;await sT.render(e);let t=sT.svgBlobFor(e);if(!t)return;let n=[[`svg`,t]];try{n.push([`png`,await xT(t)])}catch{}let r=n.map(async([e,t])=>{let n=Q.mode===`locked`?await ZC(t,Q.bundleKey,e):t;return Uw.uploadRender({aliasId:Q.aliasId,renderId:Q.renderId,revision:Q.revision,writeCapability:Q.writeCapability,format:e,mode:Q.mode,render:n})});(await Promise.allSettled(r)).every(e=>e.status===`rejected`)&&sT.setStatus(`Saved; render cache unavailable`,`ready`)}async function xT(e){let t=URL.createObjectURL(e);try{let e=new Image;e.src=t,await e.decode();let n=Math.min(1,4096/Math.max(e.naturalWidth,e.naturalHeight)),r=Math.max(1,Math.round(e.naturalWidth*n)),i=Math.max(1,Math.round(e.naturalHeight*n)),a=document.createElement(`canvas`);a.width=r,a.height=i;let o=a.getContext(`2d`);if(!o)throw Error(`Canvas is unavailable.`);o.drawImage(e,0,0,r,i);let s=await new Promise(e=>a.toBlob(e,`image/png`));if(!s)throw Error(`Could not create a PNG render.`);return s}finally{URL.revokeObjectURL(t)}}async function ST(){let e=await ET({title:`Lock diagram`,copy:`The source, metadata, and saved render will be encrypted in this browser. The password cannot be recovered.`,submitLabel:`Lock diagram`,confirm:!0});if(e!==null)try{let{bundleKey:t,payload:n}=await YC(cT(),e);Q.mode=`locked`,Q.bundleKey=t,Q.keyEnvelope=n.keyEnvelope,Q.encryptedContent=n.encryptedContent,Q.encryptedMetadata=n.encryptedMetadata,Q.keyEnvelopeDirty=!0,NT(Q.aliasId?`${Bw}${Q.aliasId}`:zw),uT(!1),$(`Locked in this browser — save to persist`)}catch(e){$(e instanceof Error?e.message:`Could not lock this diagram.`)}}async function CT(){if(Q.mode!==`locked`||!(Q.bundleKey instanceof Uint8Array))return;let e=await ET({title:`Change password`,copy:`Only the encrypted bundle key will be rewrapped. The diagram content does not need to be re-encrypted.`,submitLabel:`Change password`,confirm:!0});if(e!==null)try{Q.keyEnvelope=await KC(Q.bundleKey,e),Q.keyEnvelopeDirty=!0,uT(!1),$(`Password changed — save to persist`)}catch(e){$(e instanceof Error?e.message:`Could not change the password.`)}}function wT(){Q.mode===`locked`&&confirm(`Remove password protection? The next save will store the diagram in plaintext.`)&&(Q.mode=`open`,Q.keyEnvelopeDirty=!1,uT(!1),$(`Password removed — save to persist`))}async function TT(e){for(;;){let t=await ET({title:`Unlock diagram`,copy:`Decryption happens only in this browser. The password is never sent to diagram.zip.`,submitLabel:`Unlock`,confirm:!1});if(t===null)return null;try{return await XC(e,t)}catch(e){$(e instanceof Error?e.message:`Could not unlock this diagram.`)}}}function ET({title:e,copy:t,submitLabel:n,confirm:r}){let i=document.querySelector(`#password-dialog`),a=document.querySelector(`#password-form`),o=document.querySelector(`#diagram-password`),s=document.querySelector(`#diagram-password-confirm`),c=document.querySelector(`#password-confirm-field`),l=document.querySelector(`#password-error`);return document.querySelector(`#password-title`).textContent=e,document.querySelector(`#password-copy`).textContent=t,document.querySelector(`#password-submit`).textContent=n,c.hidden=!r,o.autocomplete=r?`new-password`:`current-password`,o.value=``,s.value=``,l.textContent=``,new Promise(e=>{let t=!1,n=n=>{t||(t=!0,a.removeEventListener(`submit`,c),document.querySelector(`#password-cancel`).removeEventListener(`click`,u),i.removeEventListener(`cancel`,u),i.removeEventListener(`close`,d),e(n))},c=e=>{e.preventDefault();let t=o.value;if(r&&t.length<8){l.textContent=`Use at least 8 characters.`,o.focus();return}if(r&&t!==s.value){l.textContent=`The passwords do not match.`,s.focus();return}i.close(),n(t)},u=e=>{e.preventDefault(),i.close(),n(null)},d=()=>n(null);a.addEventListener(`submit`,c),document.querySelector(`#password-cancel`).addEventListener(`click`,u),i.addEventListener(`cancel`,u),i.addEventListener(`close`,d),i.showModal(),o.focus()})}async function DT(e){let t=await OT();if(t===`reload`){let e=Q.aliasId,t=Q.writeCapability;try{let n=await Uw.getAlias(e),r=n.state,i=null;if(n.mode===`locked`){let e=await TT(n);if(!e)return!1;r=e.state,i=e.bundleKey}return IT(n,t,r,i),NT(`${Bw}${e}`),pT(r,!1),LT(),$(`Reloaded saved diagram`),!0}catch(e){return $(e instanceof Error?e.message:`Could not reload this diagram.`),!1}}return t===`copy`&&(await vT(e),$(`Saved as a new diagram`),!0)}function OT(){let e=document.querySelector(`#conflict-dialog`);return e.returnValue=``,e.showModal(),new Promise(t=>{e.addEventListener(`close`,()=>t(e.returnValue),{once:!0})})}function kT(e,t=`open`){return JSON.stringify({mode:t,type:e.type,source:e.source,options:e.options??{},meta:cC(e.meta),presentation:lC(e.presentation)})}function AT(e){if(!e||typeof e!=`object`||!bx(e.type)||typeof e.source!=`string`)return null;try{return{type:e.type,source:e.source,options:e.options??{},meta:cC(e.meta),presentation:lC(e.presentation)}}catch{return null}}function jT(e){try{let t=JSON.parse(localStorage.getItem(e)),n=AT(t?.state);return n?{state:n,revision:t.revision??null}:null}catch{return null}}function MT(e){if(Q.mode===`locked`)return;let t=Q.aliasId?`${Bw}${Q.aliasId}`:zw;try{localStorage.setItem(t,JSON.stringify({state:e,revision:Q.revision}))}catch{}}function NT(e){try{localStorage.removeItem(e)}catch{}}function PT(e,t){try{localStorage.setItem(`${Vw}${e}`,t)}catch{}}function FT(e){try{return wC(`#w=${localStorage.getItem(`${Vw}${e}`)??``}`)}catch{return null}}function IT(e,t,n,r=null){Q={aliasId:e.aliasId,contentId:e.contentId,renderId:e.renderId,revision:e.revision,mode:e.mode,savedMode:e.mode,writeCapability:t,savedState:n,savedSnapshot:kT(n,e.mode),bundleKey:r,keyEnvelope:e.mode===`locked`?e.keyEnvelope:null,encryptedContent:e.mode===`locked`?e.encryptedContent:null,encryptedMetadata:e.mode===`locked`?e.encryptedMetadata:null,keyEnvelopeDirty:!1,dirty:!1},RT(),LT()}function LT(){let e=document.querySelector(`#save`);if(qw){e.textContent=`Saving…`,e.disabled=!0;return}if(Q.aliasId&&!Q.dirty){e.textContent=`Saved`,e.disabled=!0;return}e.textContent=Q.aliasId&&!Q.writeCapability?`Save copy`:`Save`,e.disabled=!1}function RT(){let e=Q.mode===`locked`;document.querySelector(`#privacy-label`).textContent=e?`Password locked`:`Open`,document.querySelector(`#privacy-description`).textContent=e?`Source, metadata, and saved renders are encrypted in your browser. Password-locked diagrams cannot be embedded.`:`Anyone with the read link can open and embed this diagram.`,document.querySelector(`#lock-diagram`).hidden=e,document.querySelector(`#change-password`).hidden=!e,document.querySelector(`#unlock-diagram`).hidden=!e}function zT(){Q={aliasId:null,contentId:null,renderId:null,revision:null,mode:`open`,savedMode:null,writeCapability:null,savedState:null,savedSnapshot:null,bundleKey:null,keyEnvelope:null,encryptedContent:null,encryptedMetadata:null,keyEnvelopeDirty:!1,dirty:!0},Yw.clear(),history.pushState(null,``,`/`),pT(pC(oC))}function BT(){let e=Zw.value.trim(),t=Qw.value.trim();document.title=e?`${e} — diagram.zip`:`diagram.zip`,document.querySelector(`meta[name="description"]`).content=t||`Create diagrams from text and share them as a link.`}async function VT(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);let t=document.createElement(`textarea`);t.value=e,document.body.append(t),t.select(),document.execCommand(`copy`),t.remove()}function $(e){let t=document.querySelector(`#toast`);t.textContent=e,t.dataset.visible=`true`,clearTimeout($.timeout),$.timeout=setTimeout(()=>delete t.dataset.visible,1800)}uT(),Jw&&$(Jw);\ No newline at end of file1807+`;var Zw=document.querySelector(`#diagram-type`),Qw=document.querySelector(`#diagram-title`),$w=document.querySelector(`#diagram-description`),eT=document.querySelector(`#diagram-background`),tT=document.querySelector(`#diagram-padding`),nT=document.querySelector(`#diagram-frame`);for(let{id:e,label:t}of mx)Zw.add(new Option(t,e));var rT=await pT(),iT=lC(rT.meta),aT=uC(rT.presentation);Zw.value=rT.type,Qw.value=iT.title,$w.value=iT.description,eT.value=aT.background,tT.value=String(aT.padding),nT.checked=aT.frame,WT(),qw=rT.type,Xw.set(rT.type,rT);var oT=sd.define([{tag:J.keyword,color:`var(--syntax-keyword)`,fontWeight:`650`},{tag:J.string,color:`var(--syntax-string)`},{tag:[J.comment,J.lineComment,J.blockComment],color:`var(--syntax-comment)`,fontStyle:`italic`},{tag:[J.number,J.bool],color:`var(--syntax-number)`},{tag:[J.operator,J.punctuation],color:`var(--syntax-operator)`},{tag:[J.variableName,J.typeName],color:`var(--syntax-variable)`}]),sT=new U({state:M.create({doc:rT.source,extensions:[j_,Uw.of(yx(rT.type)),dd(oT),U.theme({"&":{height:`100%`,backgroundColor:`transparent`},".cm-scroller":{fontFamily:`var(--font-mono)`,lineHeight:`1.65`},".cm-content":{padding:`28px 10px 80px`},".cm-gutters":{backgroundColor:`transparent`,border:`0`,paddingLeft:`12px`},".cm-activeLine, .cm-activeLineGutter":{backgroundColor:`var(--editor-active-line)`},".cm-cursor, .cm-dropCursor":{borderLeftColor:`var(--ink)`},"&.cm-focused":{outline:`none`}}),U.updateListener.of(e=>{e.docChanged&&!Kw&&uT()})]}),parent:document.querySelector(`#editor`)}),cT=new zw({stage:document.querySelector(`#preview-stage`),image:document.querySelector(`#preview-image`),status:document.querySelector(`.render-status`),minimap:document.querySelector(`#minimap`),minimapImage:document.querySelector(`#minimap-image`),minimapViewport:document.querySelector(`#minimap-viewport`)});Zw.addEventListener(`change`,()=>{let e=Zw.value;history.replaceState(null,``,Sx(location.href,e)),mT(hC(Xw,qw,e,lT(),mC))}),document.querySelector(`#details`).addEventListener(`click`,()=>{document.querySelector(`#details-dialog`).showModal(),Qw.focus()});for(let e of[Qw,$w,eT,tT,nT])e.addEventListener(`input`,()=>{WT(),clearTimeout(fT.timeout),fT.timeout=setTimeout(fT,220)});document.querySelector(`#details-dialog`).addEventListener(`close`,fT),document.querySelector(`#lock-diagram`).addEventListener(`click`,CT),document.querySelector(`#change-password`).addEventListener(`click`,wT),document.querySelector(`#unlock-diagram`).addEventListener(`click`,TT),document.querySelector(`#save`).addEventListener(`click`,()=>vT()),document.querySelector(`#restore-saved`).addEventListener(`click`,BT),document.querySelector(`#make-copy`).addEventListener(`click`,VT),document.querySelector(`#share`).addEventListener(`click`,hT),document.querySelector(`#share-save`).addEventListener(`click`,async()=>{await vT(),gT()}),document.querySelector(`.brand`).addEventListener(`click`,e=>{e.preventDefault(),confirm(`Start a new diagram?`)&&UT()}),document.querySelectorAll(`[data-preview-action]`).forEach(e=>{e.addEventListener(`click`,()=>{let t=e.dataset.previewAction;t===`zoom-out`&&cT.zoom(.8),t===`zoom-in`&&cT.zoom(1.25),t===`fit`&&cT.fit(),t===`one-to-one`&&cT.oneToOne()})}),document.querySelectorAll(`.mobile-tabs button`).forEach(e=>{e.addEventListener(`click`,()=>{document.querySelector(`.workspace`).dataset.mobilePanel=e.dataset.panel,document.querySelectorAll(`.mobile-tabs button`).forEach(t=>{t.setAttribute(`aria-selected`,String(t===e))}),e.dataset.panel===`preview`&&cT.fit()})}),document.querySelectorAll(`[data-copy]`).forEach(e=>{e.addEventListener(`click`,async()=>{let t=document.querySelector(`#${e.dataset.copy}`);t.value&&(await GT(t.value),$(`Copied`))})}),window.addEventListener(`popstate`,()=>location.reload()),window.addEventListener(`keydown`,e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`s`&&(e.preventDefault(),vT())});function lT(){let e=Math.min(256,Math.max(0,Number.parseInt(tT.value,10)||0));return{type:Zw.value,source:sT.state.doc.toString(),options:{},meta:lC({title:Qw.value,description:$w.value}),presentation:uC({background:eT.value,padding:e,frame:nT.checked})}}function uT(e=1200){clearTimeout(Gw),Gw=setTimeout(dT,e)}function dT(e=!0){let t=lT();NT(t),Q.dirty=Q.keyEnvelopeDirty||Q.savedSnapshot!==AT(t,Q.mode),RT(),HT(),e&&cT.render(t)}function fT(){clearTimeout(fT.timeout),dT()}async function pT(){let e=xC(location.pathname);if(e){let t=TC(location.hash);t&&FT(e,t),location.hash&&history.replaceState(null,``,`${location.pathname}${location.search}`);try{let n=await Ww.getAlias(e),r=t??IT(e);if(n.mode===`locked`){let e=await ET(n);return e?(LT(n,r,e.state,e.bundleKey),e.state):(Yw=`A password is required to open this diagram.`,mC(sC))}LT(n,r,n.state);let i=MT(`${Vw}${e}`);return i?.revision===n.revision?i.state:n.state}catch(e){Yw=e instanceof EC?e.message:`This saved diagram could not be loaded.`}}location.hash&&history.replaceState(null,``,`${location.pathname}${location.search}`);let t=xx(location.search),n=MT(Bw);return t?n?.state.type===t?n.state:mC(t):n?n.state:mC(sC)}function mT(e,t=!0){if(!bx(e.type))throw Error(`Unsupported diagram type.`);let n=lC(e.meta),r=uC(e.presentation);Kw=!0,qw=e.type,Xw.set(e.type,{...e,meta:n,presentation:r}),Zw.value=e.type,Qw.value=n.title,$w.value=n.description,eT.value=r.background,tT.value=String(r.padding),nT.checked=r.frame,WT(),sT.dispatch({changes:{from:0,to:sT.state.doc.length,insert:e.source},effects:Uw.reconfigure(yx(e.type))}),Kw=!1,t?dT():cT.render(lT())}function hT(){dT(),gT(),document.querySelector(`#share-dialog`).showModal()}function gT(){let e=!!Q.aliasId,t=e&&Q.savedMode===`locked`,n=e?SC(location.origin,Q.aliasId):``,r=e&&Q.writeCapability?CC(location.origin,Q.aliasId,Q.writeCapability):``,i=t?null:Q.savedState,a=i?wC(location.origin,Q.aliasId,`svg`):``,o=document.querySelector(`#image-link`),s=document.querySelector(`#markdown-link`),c=i?.meta.title.trim().replace(/[\[\]\r\n]/g,` `)||`Diagram`;_T(`viewer-link`,n,`Save to create a read link`),_T(`editor-link`,r,e?`No write capability on this device`:`Save to create an edit link`),_T(`image-link`,a,t?`Encrypted diagrams cannot be embedded`:e?`Unavailable for this diagram`:`Save to create an image link`),_T(`markdown-link`,a?`![${c}](${a})`:``,t?`Encrypted diagrams cannot be embedded`:e?`Unavailable for this diagram`:`Save to create Markdown`),document.querySelector(`#editor-link-note`).textContent=r?`Anyone with this link can update the diagram.`:e?`This device has read-only access. Save a copy to create a new edit link.`:`The edit link is a bearer credential and appears after saving.`,document.querySelector(`#image-link-note`).textContent=t?`This diagram is encrypted in your browser. Image embeds are disabled because they cannot ask for its password.`:``,o.dataset.state=t?`unavailable`:`ready`,s.dataset.state=t?`unavailable`:`ready`;let l=document.querySelector(`#share-status`),u=document.querySelector(`#share-save`);u.hidden=e&&!Q.dirty,e?Q.dirty&&Q.writeCapability?(l.textContent=`These links show the last saved version. Save your changes before sharing.`,u.textContent=`Save changes`):Q.dirty?(l.textContent=`You are editing a read-only diagram. Save a copy to share your changes.`,u.textContent=`Save as new`):l.textContent=t?Q.writeCapability?`The read link asks for the password. The edit link also grants permission to save changes.`:`The read link asks for the password. This device has read-only access.`:Q.writeCapability?`Copy a read link, or share the edit capability carefully.`:`This diagram is read-only on this device.`:(l.textContent=`Save this diagram to create stable share links.`,u.textContent=`Save diagram`)}function _T(e,t,n){let r=document.querySelector(`#${e}`),i=document.querySelector(`[data-copy="${e}"]`);r.value=t,r.placeholder=t?``:n,i.disabled=!t}async function vT(){if(Jw)return!1;dT(!1);let e=lT();if(Q.aliasId&&!Q.dirty)return $(`Already saved`),!0;Jw=!0,RT();try{if(Q.aliasId&&Q.writeCapability)return LT(Q.mode===`locked`?await Ww.updateLockedAlias(Q.aliasId,await bT(e),Q.revision,Q.writeCapability):await Ww.updateAlias(Q.aliasId,e,Q.revision,Q.writeCapability),Q.writeCapability,e,Q.mode===`locked`?Q.bundleKey:null),PT(`${Vw}${Q.aliasId}`),await xT(e),$(`Saved`),!0;let t=!!Q.aliasId;return await yT(e),$(t?`Saved as a new diagram`:`Saved`),!0}catch(t){return t instanceof EC&&t.status===412&&Q.aliasId?await OT(e):($(t instanceof Error?t.message:`Could not save this diagram.`),!1)}finally{Jw=!1,RT()}}async function yT(e){let t=Q.aliasId,n=t?`${Vw}${t}`:Bw,r=Q.bundleKey,i=Q.mode===`locked`?await Ww.createLockedAlias(await bT(e)):await Ww.createAlias(e);LT(i,i.writeCapability,e,Q.mode===`locked`?r:null),FT(i.aliasId,i.writeCapability),PT(n),history.pushState(null,``,Sx(`/d/${i.aliasId}`,e.type)),await xT(e)}async function bT(e){if(!(Q.bundleKey instanceof Uint8Array)||!Q.keyEnvelope)throw Error(`This diagram is missing its browser encryption key.`);return Q.savedMode===`locked`&&Q.savedSnapshot===AT(e,`locked`)&&Q.encryptedContent&&Q.encryptedMetadata?{mode:`locked`,encryptedContent:Q.encryptedContent,encryptedMetadata:Q.encryptedMetadata,keyEnvelope:Q.keyEnvelope}:YC(e,Q.bundleKey,Q.keyEnvelope)}async function xT(e){if(!Q.aliasId||!Q.writeCapability)return;await cT.render(e);let t=cT.svgBlobFor(e),n=cT.rendererIdentityFor(e);if(!t||!n)return;let r=[[`svg`,t]];try{r.push([`png`,await ST(t)])}catch{}let i=r.map(async([e,t])=>{let r=Q.mode===`locked`?await QC(t,Q.bundleKey,e):t;return Ww.uploadRender({aliasId:Q.aliasId,renderId:Q.renderId,revision:Q.revision,writeCapability:Q.writeCapability,format:e,mode:Q.mode,render:r,renderer:n})});(await Promise.allSettled(i)).every(e=>e.status===`rejected`)&&cT.setStatus(`Saved; render cache unavailable`,`ready`)}async function ST(e){let t=URL.createObjectURL(e);try{let e=new Image;e.src=t,await e.decode();let n=Math.min(1,4096/Math.max(e.naturalWidth,e.naturalHeight)),r=Math.max(1,Math.round(e.naturalWidth*n)),i=Math.max(1,Math.round(e.naturalHeight*n)),a=document.createElement(`canvas`);a.width=r,a.height=i;let o=a.getContext(`2d`);if(!o)throw Error(`Canvas is unavailable.`);o.drawImage(e,0,0,r,i);let s=await new Promise(e=>a.toBlob(e,`image/png`));if(!s)throw Error(`Could not create a PNG render.`);return s}finally{URL.revokeObjectURL(t)}}async function CT(){let e=await DT({title:`Lock diagram`,copy:`The source, metadata, and saved render will be encrypted in this browser. The password cannot be recovered.`,submitLabel:`Lock diagram`,confirm:!0});if(e!==null)try{let{bundleKey:t,payload:n}=await XC(lT(),e);Q.mode=`locked`,Q.bundleKey=t,Q.keyEnvelope=n.keyEnvelope,Q.encryptedContent=n.encryptedContent,Q.encryptedMetadata=n.encryptedMetadata,Q.keyEnvelopeDirty=!0,PT(Q.aliasId?`${Vw}${Q.aliasId}`:Bw),dT(!1),$(`Locked in this browser — save to persist`)}catch(e){$(e instanceof Error?e.message:`Could not lock this diagram.`)}}async function wT(){if(Q.mode!==`locked`||!(Q.bundleKey instanceof Uint8Array))return;let e=await DT({title:`Change password`,copy:`Only the encrypted bundle key will be rewrapped. The diagram content does not need to be re-encrypted.`,submitLabel:`Change password`,confirm:!0});if(e!==null)try{Q.keyEnvelope=await qC(Q.bundleKey,e),Q.keyEnvelopeDirty=!0,dT(!1),$(`Password changed — save to persist`)}catch(e){$(e instanceof Error?e.message:`Could not change the password.`)}}function TT(){Q.mode===`locked`&&confirm(`Remove password protection? The next save will store the diagram in plaintext.`)&&(Q.mode=`open`,Q.keyEnvelopeDirty=!1,dT(!1),$(`Password removed — save to persist`))}async function ET(e){for(;;){let t=await DT({title:`Unlock diagram`,copy:`Decryption happens only in this browser. The password is never sent to diagram.zip.`,submitLabel:`Unlock`,confirm:!1});if(t===null)return null;try{return await ZC(e,t)}catch(e){$(e instanceof Error?e.message:`Could not unlock this diagram.`)}}}function DT({title:e,copy:t,submitLabel:n,confirm:r}){let i=document.querySelector(`#password-dialog`),a=document.querySelector(`#password-form`),o=document.querySelector(`#diagram-password`),s=document.querySelector(`#diagram-password-confirm`),c=document.querySelector(`#password-confirm-field`),l=document.querySelector(`#password-error`);return document.querySelector(`#password-title`).textContent=e,document.querySelector(`#password-copy`).textContent=t,document.querySelector(`#password-submit`).textContent=n,c.hidden=!r,o.autocomplete=r?`new-password`:`current-password`,o.value=``,s.value=``,l.textContent=``,new Promise(e=>{let t=!1,n=n=>{t||(t=!0,a.removeEventListener(`submit`,c),document.querySelector(`#password-cancel`).removeEventListener(`click`,u),i.removeEventListener(`cancel`,u),i.removeEventListener(`close`,d),e(n))},c=e=>{e.preventDefault();let t=o.value;if(r&&t.length<8){l.textContent=`Use at least 8 characters.`,o.focus();return}if(r&&t!==s.value){l.textContent=`The passwords do not match.`,s.focus();return}i.close(),n(t)},u=e=>{e.preventDefault(),i.close(),n(null)},d=()=>n(null);a.addEventListener(`submit`,c),document.querySelector(`#password-cancel`).addEventListener(`click`,u),i.addEventListener(`cancel`,u),i.addEventListener(`close`,d),i.showModal(),o.focus()})}async function OT(e){let t=await kT();if(t===`reload`){let e=Q.aliasId,t=Q.writeCapability;try{let n=await Ww.getAlias(e),r=n.state,i=null;if(n.mode===`locked`){let e=await ET(n);if(!e)return!1;r=e.state,i=e.bundleKey}return LT(n,t,r,i),PT(`${Vw}${e}`),mT(r,!1),RT(),$(`Reloaded saved diagram`),!0}catch(e){return $(e instanceof Error?e.message:`Could not reload this diagram.`),!1}}return t===`copy`&&(await yT(e),$(`Saved as a new diagram`),!0)}function kT(){let e=document.querySelector(`#conflict-dialog`);return e.returnValue=``,e.showModal(),new Promise(t=>{e.addEventListener(`close`,()=>t(e.returnValue),{once:!0})})}function AT(e,t=`open`){return JSON.stringify({mode:t,type:e.type,source:e.source,options:e.options??{},meta:lC(e.meta),presentation:uC(e.presentation)})}function jT(e){if(!e||typeof e!=`object`||!bx(e.type)||typeof e.source!=`string`)return null;try{return{type:e.type,source:e.source,options:e.options??{},meta:lC(e.meta),presentation:uC(e.presentation)}}catch{return null}}function MT(e){try{let t=JSON.parse(localStorage.getItem(e)),n=jT(t?.state);return n?{state:n,revision:t.revision??null}:null}catch{return null}}function NT(e){if(Q.mode===`locked`)return;let t=Q.aliasId?`${Vw}${Q.aliasId}`:Bw;try{localStorage.setItem(t,JSON.stringify({state:e,revision:Q.revision}))}catch{}}function PT(e){try{localStorage.removeItem(e)}catch{}}function FT(e,t){try{localStorage.setItem(`${Hw}${e}`,t)}catch{}}function IT(e){try{return TC(`#w=${localStorage.getItem(`${Hw}${e}`)??``}`)}catch{return null}}function LT(e,t,n,r=null){Q={aliasId:e.aliasId,contentId:e.contentId,renderId:e.renderId,revision:e.revision,mode:e.mode,savedMode:e.mode,writeCapability:t,savedState:n,savedSnapshot:AT(n,e.mode),bundleKey:r,keyEnvelope:e.mode===`locked`?e.keyEnvelope:null,encryptedContent:e.mode===`locked`?e.encryptedContent:null,encryptedMetadata:e.mode===`locked`?e.encryptedMetadata:null,keyEnvelopeDirty:!1,dirty:!1},HT(),RT()}function RT(){let e=document.querySelector(`#save`);if(zT(),Jw){e.textContent=`Saving…`,e.disabled=!0;return}if(Q.aliasId&&!Q.dirty){e.textContent=`Saved`,e.disabled=!0;return}e.textContent=Q.aliasId&&!Q.writeCapability?`Save copy`:`Save`,e.disabled=!1}function zT(){let e=document.querySelector(`#draft-bar`);e.hidden=!(Q.aliasId&&Q.savedState&&Q.dirty),document.querySelector(`#restore-saved`).disabled=Jw,document.querySelector(`#make-copy`).disabled=Jw}function BT(){!Q.aliasId||!Q.savedState||!Q.dirty||(clearTimeout(Gw),clearTimeout(fT.timeout),Q.mode=Q.savedMode,Q.keyEnvelopeDirty=!1,Q.dirty=!1,PT(`${Vw}${Q.aliasId}`),Xw.clear(),mT(Q.savedState,!1),history.replaceState(null,``,Sx(location.href,Q.savedState.type)),HT(),RT(),$(`Restored saved diagram`))}async function VT(){if(Jw||!Q.aliasId||!Q.dirty)return;dT(!1);let e=lT();Jw=!0,RT();try{await yT(e),$(`Saved as a new diagram`)}catch(e){$(e instanceof Error?e.message:`Could not make a copy.`)}finally{Jw=!1,RT()}}function HT(){let e=Q.mode===`locked`;document.querySelector(`#privacy-label`).textContent=e?`Password locked`:`Open`,document.querySelector(`#privacy-description`).textContent=e?`Source, metadata, and saved renders are encrypted in your browser. Password-locked diagrams cannot be embedded.`:`Anyone with the read link can open and embed this diagram.`,document.querySelector(`#lock-diagram`).hidden=e,document.querySelector(`#change-password`).hidden=!e,document.querySelector(`#unlock-diagram`).hidden=!e}function UT(){Q={aliasId:null,contentId:null,renderId:null,revision:null,mode:`open`,savedMode:null,writeCapability:null,savedState:null,savedSnapshot:null,bundleKey:null,keyEnvelope:null,encryptedContent:null,encryptedMetadata:null,keyEnvelopeDirty:!1,dirty:!0},Xw.clear(),history.pushState(null,``,Sx(`/`,sC)),mT(mC(sC))}function WT(){let e=Qw.value.trim(),t=$w.value.trim();document.title=e?`${e} — diagram.zip`:`diagram.zip`,document.querySelector(`meta[name="description"]`).content=t||`Create diagrams from text and share them as a link.`}async function GT(e){if(navigator.clipboard)return navigator.clipboard.writeText(e);let t=document.createElement(`textarea`);t.value=e,document.body.append(t),t.select(),document.execCommand(`copy`),t.remove()}function $(e){let t=document.querySelector(`#toast`);t.textContent=e,t.dataset.visible=`true`,clearTimeout($.timeout),$.timeout=setTimeout(()=>delete t.dataset.visible,1800)}dT(),Yw&&$(Yw);\ No newline at end of file
A server/src/main/resources/web/diagramzip/assets/index-D7UQlw3g.css +1 -0
@@ -0,0 +1 @@
1+:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--page:#fff;--surface:#fff;--surface-raised:#fff;--ink:#000;--muted:#666;--line:#ddd;--soft:#f3f3f3;--action-bg:#000;--action-ink:#fff;--danger:#333;--editor-active-line:#0000000b;--syntax-keyword:#111;--syntax-string:#333;--syntax-comment:#858585;--syntax-number:#444;--syntax-operator:#555;--syntax-variable:#222;--dot:#0000001c;--preview-bg:#fff;--shadow:0 22px 70px #0000001f;--font-sans:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--font-mono:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;font-family:var(--font-sans);font-synthesis:none;text-rendering:optimizelegibility}*{box-sizing:border-box}html,body,#app{height:100%}body{background:var(--page);color:var(--ink);margin:0;overflow:hidden}.app-shell,dialog,.toast{-webkit-user-select:none;user-select:none}.cm-content,.share-options input,.details-fields input,.details-fields textarea,.details-fields select,.render-status[data-state=error]{-webkit-user-select:text;user-select:text}button,input,select,textarea{font:inherit}button,select,textarea{color:inherit}button{cursor:pointer}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.app-shell{grid-template-rows:58px auto minmax(0,1fr);height:100%;display:grid}.app-header{border-bottom:1px solid var(--line);background:color-mix(in srgb, var(--page), transparent 5%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);z-index:10;grid-row:1;justify-content:space-between;align-items:center;gap:20px;padding:0 14px 0 20px;display:flex}.brand{color:var(--ink);letter-spacing:-.025em;align-items:center;gap:10px;font-weight:780;text-decoration:none;display:inline-flex}.brand-mark{width:24px;height:24px;display:block}.header-meta{align-items:center;gap:9px;min-width:0;display:flex}.draft-bar{border-bottom:1px solid var(--line);background:var(--soft);grid-row:2;justify-content:space-between;align-items:center;gap:16px;min-height:46px;padding:7px 14px 7px 20px;display:flex}.draft-bar[hidden]{display:none}.draft-bar p{margin:0;font-size:13px}.draft-bar div{flex:none;gap:7px;display:flex}.workspace{grid-row:3}.render-status{max-width:min(38vw,420px);color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.render-status[data-state=error]{color:var(--danger)}.render-status[data-state=loading]:before{content:"◌ "}.type-picker select,.primary-action,.secondary-action,.docs-link,.preview-toolbar button,.mobile-tabs button,.icon-button,.share-options button{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-height:36px}.type-picker select{max-width:170px;padding:7px 30px 7px 11px}.primary-action{border-color:var(--action-bg);background:var(--action-bg);color:var(--action-ink);padding:7px 15px;font-weight:720}.secondary-action{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-height:36px;padding:7px 12px;font-weight:680}.secondary-action:hover{background:var(--soft)}.docs-link{width:36px;min-width:36px;height:36px;color:var(--ink);place-items:center;text-decoration:none;display:inline-grid}.docs-link:hover{background:var(--soft)}.docs-link-icon{width:19px;height:19px;display:block}.workspace{grid-template-columns:minmax(340px,.82fr) minmax(440px,1.18fr);min-width:0;min-height:0;display:grid}.editor-panel,.preview-panel{min-width:0;min-height:0}.editor-panel{border-right:1px solid var(--line);background:var(--surface);overflow:hidden}#editor{height:100%}.cm-editor{color:var(--ink);font-size:14px}.cm-gutter{color:var(--muted)}.cm-selectionBackground{background:color-mix(in srgb, var(--ink), transparent 78%)!important}.preview-panel{background:var(--preview-bg)}.preview-stage{touch-action:none;background-image:radial-gradient(var(--dot) 1px, transparent 1px);cursor:grab;background-size:20px 20px;background-color:var(--render-background,var(--preview-bg));width:100%;height:100%;min-height:320px;position:relative;overflow:hidden}.preview-stage[data-dragging=true]{cursor:grabbing}#preview-image{transform-origin:0 0;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;max-width:none;position:absolute;top:0;left:0}.preview-stage:has(#preview-image:not([hidden])) .preview-empty{display:none}.preview-empty{color:var(--muted);margin:0;position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%)}.preview-toolbar{border:1px solid var(--line);background:color-mix(in srgb, var(--surface-raised), transparent 7%);box-shadow:var(--shadow);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-radius:14px;gap:6px;padding:5px;display:flex;position:absolute;bottom:14px;left:14px}.preview-toolbar button{background:0 0;min-width:36px;padding:6px 9px}.preview-toolbar button:hover{background:var(--soft)}.minimap{border:1px solid var(--line);background:var(--render-background,var(--preview-bg));width:168px;height:108px;box-shadow:var(--shadow);cursor:crosshair;border-radius:12px;position:absolute;bottom:14px;right:14px;overflow:hidden}.minimap img{object-fit:contain;pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%}#minimap-viewport{border:2px solid var(--ink);background:color-mix(in srgb, var(--ink), transparent 82%);pointer-events:none;min-width:4px;min-height:4px;position:absolute}.mobile-tabs{display:none}dialog{width:min(620px,100% - 28px);max-height:calc(100% - 28px);color:var(--ink);border:1px solid var(--line);background:var(--surface-raised);box-shadow:var(--shadow);border-radius:12px;padding:0}dialog::backdrop{background:color-mix(in srgb, var(--page), transparent 25%);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.dialog-card{padding:20px}.dialog-header{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;margin:-4px -4px 20px;padding:0 0 12px;display:flex}.dialog-header h1{letter-spacing:-.01em;margin:0;font-size:17px;font-weight:750;line-height:1.25}.icon-button{border-radius:6px;flex:none;width:32px;min-height:32px;padding:0;font-size:20px;line-height:1}.share-options{gap:18px;display:grid}.share-status,.dialog-copy{color:var(--muted);margin:-8px 0 20px;line-height:1.5}.share-options label>span{margin-bottom:7px;font-weight:700;display:block}.share-options label>div{grid-template-columns:minmax(0,1fr) auto;gap:7px;display:grid}.share-options input{min-width:0;height:40px;color:var(--ink);border:1px solid var(--line);background:var(--page);font:12px/1.4 var(--font-mono);border-radius:9px;padding:8px 10px}.share-options button{padding:7px 13px;font-weight:700}.share-options button:disabled{cursor:not-allowed;opacity:.42}.share-options small{color:var(--danger);margin-top:6px;display:block}.details-fields{gap:18px;display:grid}.details-fields label>span{margin-bottom:7px;font-weight:700;display:block}.details-fields input,.details-fields textarea{width:100%;color:var(--ink);border:1px solid var(--line);background:var(--page);resize:vertical;border-radius:10px;padding:10px 12px}.details-fields input{height:42px}.details-fields textarea{min-height:108px;line-height:1.5}.presentation-fields{border:1px solid var(--line);border-radius:12px;grid-template-columns:minmax(0,1fr) 120px auto;align-items:end;gap:12px;margin:2px 0 0;padding:16px;display:grid}.presentation-fields legend{padding:0 6px;font-weight:750}.presentation-fields label>span{margin-bottom:7px;font-weight:700;display:block}.presentation-fields select,.presentation-fields input[type=number]{border:1px solid var(--line);background:var(--page);border-radius:9px;width:100%;height:40px;padding:8px 10px}.number-field{position:relative}.number-field input{padding-right:34px!important}.number-field span{color:var(--muted);font-size:13px;position:absolute;top:10px;right:10px}.presentation-fields .checkbox-field{align-items:center;gap:8px;min-height:40px;padding:0 4px;display:flex}.presentation-fields .checkbox-field input{width:18px;height:18px;accent-color:var(--ink)}.presentation-fields .checkbox-field span{margin:0;display:inline}.privacy-fields{border:1px solid var(--line);border-radius:12px;justify-content:space-between;align-items:center;gap:18px;margin:2px 0 0;padding:16px;display:flex}.privacy-fields legend{padding:0 6px;font-weight:750}.privacy-fields strong{margin-bottom:4px;display:block}.privacy-fields p{color:var(--muted);margin:0;font-size:13px;line-height:1.45}.privacy-actions{flex-wrap:wrap;flex:none;justify-content:flex-end;gap:7px;display:flex}.form-error{min-height:20px;color:var(--danger);margin:12px 0 -4px;font-size:13px}.dialog-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:22px;display:flex}.conflict-actions{justify-content:space-between}.toast{z-index:30;background:var(--ink);color:var(--page);opacity:0;pointer-events:none;border-radius:999px;padding:9px 15px;font-size:13px;font-weight:740;transition:opacity .14s,transform .14s;position:fixed;top:72px;left:50%;transform:translate(-50%,-10px)}.toast[data-visible=true]{opacity:1;transform:translate(-50%)}:focus-visible{outline:2px solid var(--ink);outline-offset:2px}@media (width<=760px){.app-shell{grid-template-rows:58px auto 42px minmax(0,1fr)}.render-status{display:none}.render-status[data-state=error]{z-index:20;border:1px solid color-mix(in srgb, var(--danger), transparent 55%);background:var(--surface-raised);max-width:none;max-height:84px;box-shadow:var(--shadow);white-space:normal;border-radius:10px;padding:10px 12px;display:block;position:fixed;top:108px;left:10px;right:10px;overflow:auto}.app-header{padding-left:14px}.brand span:last-child{display:none}.header-meta{flex:1;justify-content:flex-end;gap:6px}.draft-bar{flex-direction:column;align-items:stretch;gap:7px;padding:9px 14px}.draft-bar div{grid-template-columns:1fr 1fr;display:grid}.mobile-tabs{grid-row:3}.workspace{grid-row:4}.type-picker{flex:0 142px;min-width:0}.type-picker select{width:100%;max-width:142px}.mobile-tabs{border-bottom:1px solid var(--line);background:var(--page);grid-template-columns:1fr 1fr;gap:4px;padding:4px;display:grid}.mobile-tabs button{min-height:32px;color:var(--muted);background:0 0;border-color:#0000;font-size:13px;font-weight:700}.mobile-tabs button[aria-selected=true]{background:var(--soft);color:var(--ink)}.workspace{width:100%;display:block;overflow:hidden}.workspace[data-mobile-panel=editor] .preview-panel,.workspace[data-mobile-panel=preview] .editor-panel{display:none}.editor-panel,.preview-panel{border-right:0;width:100%;height:100%}.minimap{width:132px;height:88px}.presentation-fields{grid-template-columns:1fr 100px}.presentation-fields .checkbox-field{grid-column:1/-1}.privacy-fields{flex-direction:column;align-items:stretch}.privacy-actions{justify-content:flex-start}}@media (width<=390px){.app-header{gap:8px}.header-meta{gap:6px}.type-picker{flex-basis:108px}.type-picker select{max-width:108px}#details{width:36px;padding-inline:0;font-size:0}#details:before{content:"…";font-size:18px;line-height:1}.primary-action,.secondary-action{padding-inline:9px}.preview-toolbar{bottom:10px;left:10px}.minimap{bottom:62px;right:10px}}
D server/src/main/resources/web/diagramzip/assets/index-DEH-xFUd.css +0 -1
@@ -1 +0,0 @@
1-:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;--page:#fff;--surface:#fff;--surface-raised:#fff;--ink:#000;--muted:#666;--line:#ddd;--soft:#f3f3f3;--action-bg:#000;--action-ink:#fff;--danger:#333;--editor-active-line:#0000000b;--syntax-keyword:#111;--syntax-string:#333;--syntax-comment:#858585;--syntax-number:#444;--syntax-operator:#555;--syntax-variable:#222;--dot:#0000001c;--preview-bg:#fff;--shadow:0 22px 70px #0000001f;--font-sans:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;--font-mono:"SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;font-family:var(--font-sans);font-synthesis:none;text-rendering:optimizelegibility}*{box-sizing:border-box}html,body,#app{height:100%}body{background:var(--page);color:var(--ink);margin:0;overflow:hidden}.app-shell,dialog,.toast{-webkit-user-select:none;user-select:none}.cm-content,.share-options input,.details-fields input,.details-fields textarea,.details-fields select,.render-status[data-state=error]{-webkit-user-select:text;user-select:text}button,input,select,textarea{font:inherit}button,select,textarea{color:inherit}button{cursor:pointer}.sr-only{clip:rect(0, 0, 0, 0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.app-shell{grid-template-rows:58px minmax(0,1fr);height:100%;display:grid}.app-header{border-bottom:1px solid var(--line);background:color-mix(in srgb, var(--page), transparent 5%);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);z-index:10;justify-content:space-between;align-items:center;gap:20px;padding:0 14px 0 20px;display:flex}.brand{color:var(--ink);letter-spacing:-.025em;align-items:center;gap:10px;font-weight:780;text-decoration:none;display:inline-flex}.brand-mark{width:24px;height:24px;display:block}.header-meta{align-items:center;gap:9px;min-width:0;display:flex}.render-status{max-width:min(38vw,420px);color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.render-status[data-state=error]{color:var(--danger)}.render-status[data-state=loading]:before{content:"◌ "}.type-picker select,.primary-action,.secondary-action,.docs-link,.preview-toolbar button,.mobile-tabs button,.icon-button,.share-options button{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-height:36px}.type-picker select{max-width:170px;padding:7px 30px 7px 11px}.primary-action{border-color:var(--action-bg);background:var(--action-bg);color:var(--action-ink);padding:7px 15px;font-weight:720}.secondary-action{border:1px solid var(--line);background:var(--surface);border-radius:10px;min-height:36px;padding:7px 12px;font-weight:680}.secondary-action:hover{background:var(--soft)}.docs-link{width:36px;min-width:36px;height:36px;color:var(--ink);place-items:center;text-decoration:none;display:inline-grid}.docs-link:hover{background:var(--soft)}.docs-link-icon{width:19px;height:19px;display:block}.workspace{grid-template-columns:minmax(340px,.82fr) minmax(440px,1.18fr);min-width:0;min-height:0;display:grid}.editor-panel,.preview-panel{min-width:0;min-height:0}.editor-panel{border-right:1px solid var(--line);background:var(--surface);overflow:hidden}#editor{height:100%}.cm-editor{color:var(--ink);font-size:14px}.cm-gutter{color:var(--muted)}.cm-selectionBackground{background:color-mix(in srgb, var(--ink), transparent 78%)!important}.preview-panel{background:var(--preview-bg)}.preview-stage{touch-action:none;background-image:radial-gradient(var(--dot) 1px, transparent 1px);cursor:grab;background-size:20px 20px;background-color:var(--render-background,var(--preview-bg));width:100%;height:100%;min-height:320px;position:relative;overflow:hidden}.preview-stage[data-dragging=true]{cursor:grabbing}#preview-image{transform-origin:0 0;-webkit-user-select:none;user-select:none;-webkit-user-drag:none;max-width:none;position:absolute;top:0;left:0}.preview-stage:has(#preview-image:not([hidden])) .preview-empty{display:none}.preview-empty{color:var(--muted);margin:0;position:absolute;inset:50% auto auto 50%;transform:translate(-50%,-50%)}.preview-toolbar{border:1px solid var(--line);background:color-mix(in srgb, var(--surface-raised), transparent 7%);box-shadow:var(--shadow);-webkit-backdrop-filter:blur(12px);backdrop-filter:blur(12px);border-radius:14px;gap:6px;padding:5px;display:flex;position:absolute;bottom:14px;left:14px}.preview-toolbar button{background:0 0;min-width:36px;padding:6px 9px}.preview-toolbar button:hover{background:var(--soft)}.minimap{border:1px solid var(--line);background:var(--render-background,var(--preview-bg));width:168px;height:108px;box-shadow:var(--shadow);cursor:crosshair;border-radius:12px;position:absolute;bottom:14px;right:14px;overflow:hidden}.minimap img{object-fit:contain;pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%}#minimap-viewport{border:2px solid var(--ink);background:color-mix(in srgb, var(--ink), transparent 82%);pointer-events:none;min-width:4px;min-height:4px;position:absolute}.mobile-tabs{display:none}dialog{width:min(620px,100% - 28px);max-height:calc(100% - 28px);color:var(--ink);border:1px solid var(--line);background:var(--surface-raised);box-shadow:var(--shadow);border-radius:12px;padding:0}dialog::backdrop{background:color-mix(in srgb, var(--page), transparent 25%);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.dialog-card{padding:20px}.dialog-header{border-bottom:1px solid var(--line);justify-content:space-between;align-items:center;gap:12px;margin:-4px -4px 20px;padding:0 0 12px;display:flex}.dialog-header h1{letter-spacing:-.01em;margin:0;font-size:17px;font-weight:750;line-height:1.25}.icon-button{border-radius:6px;flex:none;width:32px;min-height:32px;padding:0;font-size:20px;line-height:1}.share-options{gap:18px;display:grid}.share-status,.dialog-copy{color:var(--muted);margin:-8px 0 20px;line-height:1.5}.share-options label>span{margin-bottom:7px;font-weight:700;display:block}.share-options label>div{grid-template-columns:minmax(0,1fr) auto;gap:7px;display:grid}.share-options input{min-width:0;height:40px;color:var(--ink);border:1px solid var(--line);background:var(--page);font:12px/1.4 var(--font-mono);border-radius:9px;padding:8px 10px}.share-options button{padding:7px 13px;font-weight:700}.share-options button:disabled{cursor:not-allowed;opacity:.42}.share-options small{color:var(--danger);margin-top:6px;display:block}.details-fields{gap:18px;display:grid}.details-fields label>span{margin-bottom:7px;font-weight:700;display:block}.details-fields input,.details-fields textarea{width:100%;color:var(--ink);border:1px solid var(--line);background:var(--page);resize:vertical;border-radius:10px;padding:10px 12px}.details-fields input{height:42px}.details-fields textarea{min-height:108px;line-height:1.5}.presentation-fields{border:1px solid var(--line);border-radius:12px;grid-template-columns:minmax(0,1fr) 120px auto;align-items:end;gap:12px;margin:2px 0 0;padding:16px;display:grid}.presentation-fields legend{padding:0 6px;font-weight:750}.presentation-fields label>span{margin-bottom:7px;font-weight:700;display:block}.presentation-fields select,.presentation-fields input[type=number]{border:1px solid var(--line);background:var(--page);border-radius:9px;width:100%;height:40px;padding:8px 10px}.number-field{position:relative}.number-field input{padding-right:34px!important}.number-field span{color:var(--muted);font-size:13px;position:absolute;top:10px;right:10px}.presentation-fields .checkbox-field{align-items:center;gap:8px;min-height:40px;padding:0 4px;display:flex}.presentation-fields .checkbox-field input{width:18px;height:18px;accent-color:var(--ink)}.presentation-fields .checkbox-field span{margin:0;display:inline}.privacy-fields{border:1px solid var(--line);border-radius:12px;justify-content:space-between;align-items:center;gap:18px;margin:2px 0 0;padding:16px;display:flex}.privacy-fields legend{padding:0 6px;font-weight:750}.privacy-fields strong{margin-bottom:4px;display:block}.privacy-fields p{color:var(--muted);margin:0;font-size:13px;line-height:1.45}.privacy-actions{flex-wrap:wrap;flex:none;justify-content:flex-end;gap:7px;display:flex}.form-error{min-height:20px;color:var(--danger);margin:12px 0 -4px;font-size:13px}.dialog-actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;margin-top:22px;display:flex}.conflict-actions{justify-content:space-between}.toast{z-index:30;background:var(--ink);color:var(--page);opacity:0;pointer-events:none;border-radius:999px;padding:9px 15px;font-size:13px;font-weight:740;transition:opacity .14s,transform .14s;position:fixed;top:72px;left:50%;transform:translate(-50%,-10px)}.toast[data-visible=true]{opacity:1;transform:translate(-50%)}:focus-visible{outline:2px solid var(--ink);outline-offset:2px}@media (width<=760px){.app-shell{grid-template-rows:58px 42px minmax(0,1fr)}.render-status{display:none}.render-status[data-state=error]{z-index:20;border:1px solid color-mix(in srgb, var(--danger), transparent 55%);background:var(--surface-raised);max-width:none;max-height:84px;box-shadow:var(--shadow);white-space:normal;border-radius:10px;padding:10px 12px;display:block;position:fixed;top:108px;left:10px;right:10px;overflow:auto}.app-header{padding-left:14px}.brand span:last-child{display:none}.header-meta{flex:1;justify-content:flex-end;gap:6px}.type-picker{flex:0 142px;min-width:0}.type-picker select{width:100%;max-width:142px}.mobile-tabs{border-bottom:1px solid var(--line);background:var(--page);grid-template-columns:1fr 1fr;gap:4px;padding:4px;display:grid}.mobile-tabs button{min-height:32px;color:var(--muted);background:0 0;border-color:#0000;font-size:13px;font-weight:700}.mobile-tabs button[aria-selected=true]{background:var(--soft);color:var(--ink)}.workspace{width:100%;display:block;overflow:hidden}.workspace[data-mobile-panel=editor] .preview-panel,.workspace[data-mobile-panel=preview] .editor-panel{display:none}.editor-panel,.preview-panel{border-right:0;width:100%;height:100%}.minimap{width:132px;height:88px}.presentation-fields{grid-template-columns:1fr 100px}.presentation-fields .checkbox-field{grid-column:1/-1}.privacy-fields{flex-direction:column;align-items:stretch}.privacy-actions{justify-content:flex-start}}@media (width<=390px){.app-header{gap:8px}.header-meta{gap:6px}.type-picker{flex-basis:108px}.type-picker select{max-width:108px}#details{width:36px;padding-inline:0;font-size:0}#details:before{content:"…";font-size:18px;line-height:1}.primary-action,.secondary-action{padding-inline:9px}.preview-toolbar{bottom:10px;left:10px}.minimap{bottom:62px;right:10px}}
M server/src/main/resources/web/diagramzip/index.html +2 -2
D server/src/main/resources/web/diagramzip/renderer-frame-v2.js +0 -3598
@@ -1,3598 +0,0 @@
1-(function(){var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),l=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},u=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var l=r(i),u=0,d=l.length,f;u<d;u++)f=l[u],!a.call(e,f)&&f!==o&&t(e,f,{get:(e=>i[e]).bind(null,f),enumerable:!(s=n(i,f))||s.enumerable});return e},d=(n,r,o)=>(o=n==null?{}:e(i(n)),u(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),f,p,m,h=o((()=>{f=Object.defineProperty,p=(e,t)=>f(e,`name`,{value:t,configurable:!0}),m=(e,t)=>{for(var n in t)f(e,n,{get:t[n],enumerable:!0})}})),g=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){"use strict";var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,l=`week`,u=`month`,d=`quarter`,f=`year`,p=`date`,m=`Invalid Date`,h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},v=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},y={s:v,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+v(r,2,`0`)+`:`+v(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,u),a=n-i<0,o=t.clone().add(r+(a?-1:1),u);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:l,d:s,D:p,h:o,m:a,s:i,ms:r,Q:d}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},b=`en`,x={};x[b]=_;var S=`$isDayjsObject`,C=function(e){return e instanceof D||!(!e||!e[S])},w=function e(t,n,r){var i;if(!t)return b;if(typeof t==`string`){var a=t.toLowerCase();x[a]&&(i=a),n&&(x[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;x[s]=t,i=s}return!r&&i&&(b=i),i||!r&&b},T=function(e,t){if(C(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new D(n)},E=y;E.l=w,E.i=C,E.w=function(e,t){return T(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var D=function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=_.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(E.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(h);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return E},v.isValid=function(){return this.$d.toString()!==m},v.isSame=function(e,t){var n=T(e);return this.startOf(t)<=n&&n<=this.endOf(t)},v.isAfter=function(e,t){return T(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<T(e)},v.$g=function(e,t,n){return E.u(e)?this[t]:this.set(n,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var n=this,r=!!E.u(t)||t,d=E.p(e),m=function(e,t){var i=E.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},h=function(e,t){return E.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},g=this.$W,_=this.$M,v=this.$D,y=`set`+(this.$u?`UTC`:``);switch(d){case f:return r?m(1,0):m(31,11);case u:return r?m(1,_):m(0,_+1);case l:var b=this.$locale().weekStart||0,x=(g<b?g+7:g)-b;return m(r?v-x:v+(6-x),_);case s:case p:return h(y+`Hours`,0);case o:return h(y+`Minutes`,1);case a:return h(y+`Seconds`,2);case i:return h(y+`Milliseconds`,3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var n,l=E.p(e),d=`set`+(this.$u?`UTC`:``),m=(n={},n[s]=d+`Date`,n[p]=d+`Date`,n[u]=d+`Month`,n[f]=d+`FullYear`,n[o]=d+`Hours`,n[a]=d+`Minutes`,n[i]=d+`Seconds`,n[r]=d+`Milliseconds`,n)[l],h=l===s?this.$D+(t-this.$W):t;if(l===u||l===f){var g=this.clone().set(p,1);g.$d[m](h),g.init(),this.$d=g.set(p,Math.min(this.$D,g.daysInMonth())).$d}else m&&this.$d[m](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[E.p(e)]()},v.add=function(r,d){var p,m=this;r=Number(r);var h=E.p(d),g=function(e){var t=T(m);return E.w(t.date(t.date()+Math.round(e*r)),m)};if(h===u)return this.set(u,this.$M+r);if(h===f)return this.set(f,this.$y+r);if(h===s)return g(1);if(h===l)return g(7);var _=(p={},p[a]=t,p[o]=n,p[i]=e,p)[h]||1,v=this.$d.getTime()+r*_;return E.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||m;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=E.z(this),a=this.$H,o=this.$m,s=this.$M,l=n.weekdays,u=n.months,d=n.meridiem,f=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},p=function(e){return E.s(a%12||12,e,`0`)},h=d||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(g,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return E.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return E.s(s+1,2,`0`);case`MMM`:return f(n.monthsShort,s,u,3);case`MMMM`:return f(u,s);case`D`:return t.$D;case`DD`:return E.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return f(n.weekdaysMin,t.$W,l,2);case`ddd`:return f(n.weekdaysShort,t.$W,l,3);case`dddd`:return l[t.$W];case`H`:return String(a);case`HH`:return E.s(a,2,`0`);case`h`:return p(1);case`hh`:return p(2);case`a`:return h(a,o,!0);case`A`:return h(a,o,!1);case`m`:return String(o);case`mm`:return E.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return E.s(t.$s,2,`0`);case`SSS`:return E.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(r,p,m){var h,g=this,_=E.p(p),v=T(r),y=(v.utcOffset()-this.utcOffset())*t,b=this-v,x=function(){return E.m(g,v)};switch(_){case f:h=x()/12;break;case u:h=x();break;case d:h=x()/3;break;case l:h=(b-y)/6048e5;break;case s:h=(b-y)/864e5;break;case o:h=b/n;break;case a:h=b/t;break;case i:h=b/e;break;default:h=b}return m?h:E.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return x[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=w(e,t,!0);return r&&(n.$L=r),n},v.clone=function(){return E.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},_}(),O=D.prototype;return T.prototype=O,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,u],[`$y`,f],[`$D`,p]].forEach((function(e){O[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),T.extend=function(e,t){return e.$i||=(e(t,D,T),!0),T},T.locale=w,T.isDayjs=C,T.unix=function(e){return T(1e3*e)},T.en=x[b],T.Ls=x,T.p={},T}))})),_,v,y,b,x,S=o((()=>{h(),_=d(g(),1),v={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},y={trace:p((...e)=>{},`trace`),debug:p((...e)=>{},`debug`),info:p((...e)=>{},`info`),warn:p((...e)=>{},`warn`),error:p((...e)=>{},`error`),fatal:p((...e)=>{},`fatal`)},b=p(function(e=`fatal`){let t=v.fatal;typeof e==`string`?e.toLowerCase()in v&&(t=v[e]):typeof e==`number`&&(t=e),y.trace=()=>{},y.debug=()=>{},y.info=()=>{},y.warn=()=>{},y.error=()=>{},y.fatal=()=>{},t<=v.fatal&&(y.fatal=console.error?console.error.bind(console,x(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,x(`FATAL`))),t<=v.error&&(y.error=console.error?console.error.bind(console,x(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,x(`ERROR`))),t<=v.warn&&(y.warn=console.warn?console.warn.bind(console,x(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,x(`WARN`))),t<=v.info&&(y.info=console.info?console.info.bind(console,x(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,x(`INFO`))),t<=v.debug&&(y.debug=console.debug?console.debug.bind(console,x(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,x(`DEBUG`))),t<=v.trace&&(y.trace=console.debug?console.debug.bind(console,x(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,x(`TRACE`)))},`setLogLevel`),x=p(e=>`%c${(0,_.default)().format(`ss.SSS`)} : ${e} : `,`format`)})),C,w=o((()=>{C={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return C.hue2rgb(a,i,e+1/3)*255;case`g`:return C.hue2rgb(a,i,e)*255;case`b`:return C.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,l=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return l*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}}})),T,E=o((()=>{T={clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10}})),D,O=o((()=>{D={dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}})),k,A=o((()=>{w(),E(),O(),k={channel:C,lang:T,unit:D}})),j,M,N=o((()=>{A(),j={};for(let e=0;e<=255;e++)j[e]=k.unit.dec2hex(e);M={ALL:0,RGB:1,HSL:2}})),P,F=o((()=>{N(),P=class{constructor(){this.type=M.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=M.ALL}is(e){return this.type===e}}})),I,L=o((()=>{A(),F(),N(),I=class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new P}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=M.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=k.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=k.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=k.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=k.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=k.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=k.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(M.HSL)&&t!==void 0?t:(this._ensureHSL(),k.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(M.HSL)&&t!==void 0?t:(this._ensureHSL(),k.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(M.HSL)&&t!==void 0?t:(this._ensureHSL(),k.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(M.RGB)&&t!==void 0?t:(this._ensureRGB(),k.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(M.RGB)&&t!==void 0?t:(this._ensureRGB(),k.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(M.RGB)&&t!==void 0?t:(this._ensureRGB(),k.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(M.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(M.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(M.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(M.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(M.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(M.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}})),R,ee=o((()=>{L(),R=new I({r:0,g:0,b:0,a:0},`transparent`)})),z,B=o((()=>{ee(),N(),z={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(z.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,l=o?8:4,u=a?0:-1,d=o?255:15;return R.set({r:(r>>l*(u+3)&d)*s,g:(r>>l*(u+2)&d)*s,b:(r>>l*(u+1)&d)*s,a:a?(r&d)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${j[Math.round(t)]}${j[Math.round(n)]}${j[Math.round(r)]}${j[Math.round(i*255)]}`:`#${j[Math.round(t)]}${j[Math.round(n)]}${j[Math.round(r)]}`}}})),te,ne=o((()=>{A(),ee(),te={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(te.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return k.channel.clamp.h(parseFloat(e)*.9);case`rad`:return k.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return k.channel.clamp.h(parseFloat(e)*360)}}return k.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(te.re);if(!n)return;let[,r,i,a,o,s]=n;return R.set({h:te._hue2deg(r),s:k.channel.clamp.s(parseFloat(i)),l:k.channel.clamp.l(parseFloat(a)),a:o?k.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${k.lang.round(t)}, ${k.lang.round(n)}%, ${k.lang.round(r)}%, ${i})`:`hsl(${k.lang.round(t)}, ${k.lang.round(n)}%, ${k.lang.round(r)}%)`}}})),re,ie=o((()=>{B(),re={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=re.colors[e];if(t)return z.parse(t)},stringify:e=>{let t=z.stringify(e);for(let e in re.colors)if(re.colors[e]===t)return e}}})),ae,oe=o((()=>{A(),ee(),ae={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(ae.re);if(!n)return;let[,r,i,a,o,s,l,u,d]=n;return R.set({r:k.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:k.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:k.channel.clamp.b(l?parseFloat(s)*2.55:parseFloat(s)),a:u?k.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${k.lang.round(t)}, ${k.lang.round(n)}, ${k.lang.round(r)}, ${k.lang.round(i)})`:`rgb(${k.lang.round(t)}, ${k.lang.round(n)}, ${k.lang.round(r)})`}}})),se,ce=o((()=>{B(),ne(),ie(),oe(),N(),se={format:{keyword:re,hex:z,rgb:ae,rgba:ae,hsl:te,hsla:te},parse:e=>{if(typeof e!=`string`)return e;let t=z.parse(e)||ae.parse(e)||te.parse(e)||re.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(M.HSL)||e.data.r===void 0?te.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ae.stringify(e):z.stringify(e)}})),le,ue=o((()=>{A(),ce(),le=(e,t)=>{let n=se.parse(e);for(let e in t)n[e]=k.channel.clamp[e](t[e]);return se.stringify(n)}})),de,fe=o((()=>{A(),ee(),ce(),ue(),de=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return le(e,{a:t});let i=R.set({r:k.channel.clamp.r(e),g:k.channel.clamp.g(t),b:k.channel.clamp.b(n),a:k.channel.clamp.a(r)});return se.stringify(i)}})),pe,me=o((()=>{A(),ce(),pe=(e,t)=>k.lang.round(se.parse(e)[t])})),he,ge=o((()=>{A(),ce(),he=e=>{let{r:t,g:n,b:r}=se.parse(e),i=.2126*k.channel.toLinear(t)+.7152*k.channel.toLinear(n)+.0722*k.channel.toLinear(r);return k.lang.round(i)}})),_e,ve=o((()=>{ge(),_e=e=>he(e)>=.5})),ye,be=o((()=>{ve(),ye=e=>!_e(e)})),xe,Se=o((()=>{A(),ce(),xe=(e,t,n)=>{let r=se.parse(e),i=r[t],a=k.channel.clamp[t](i+n);return i!==a&&(r[t]=a),se.stringify(r)}})),V,Ce=o((()=>{Se(),V=(e,t)=>xe(e,`l`,t)})),we,Te=o((()=>{Se(),we=(e,t)=>xe(e,`l`,-t)})),Ee,De=o((()=>{Se(),Ee=(e,t)=>xe(e,`a`,-t)})),H,Oe=o((()=>{ce(),ue(),H=(e,t)=>{let n=se.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return le(e,r)}})),ke,Ae=o((()=>{ce(),fe(),ke=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=se.parse(e),{r:s,g:l,b:u,a:d}=se.parse(t),f=n/100,p=f*2-1,m=o-d,h=((p*m===-1?p:(p+m)/(1+p*m))+1)/2,g=1-h,_=r*h+s*g,v=i*h+l*g,y=a*h+u*g,b=o*f+d*(1-f);return de(_,v,y,b)}})),U,je=o((()=>{ce(),Ae(),U=(e,t=100)=>{let n=se.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,ke(n,e,t)}})),Me=o((()=>{fe(),me(),be(),Ce(),Te(),De(),Oe(),je()})),Ne=o((()=>{Me()}));function Pe(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Fe(e){if(Array.isArray(e))return e}function Ie(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function Le(){throw TypeError(`Invalid attempt to destructure non-iterable instance.2-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Re(e,t){return Fe(e)||Ie(e,t)||ze(e,t)||Le()}function ze(e,t){if(e){if(typeof e==`string`)return Pe(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Pe(e,t):void 0}}function Be(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return it(e,t,r)}}function Ve(e){return function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return at(e,n)}}function He(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ft;if(Xe&&Xe(e,null),!dt(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(Ze(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ue(e){for(let t=0;t<e.length;t++)xt(e,t)||(e[t]=null);return e}function We(e){let t=nt(null);for(let r of Ye(e)){var n=Re(r,2);let i=n[0],a=n[1];xt(e,i)&&(t[i]=dt(a)?Ue(a):a&&typeof a==`object`&&a.constructor===Object?We(a):a)}return t}function Ge(e){switch(typeof e){case`string`:return e;case`number`:return _t(e);case`boolean`:return vt(e);case`bigint`:return yt?yt(e):`0`;case`symbol`:return bt?bt(e):`Symbol()`;case`undefined`:return St(e);case`function`:case`object`:{if(e===null)return St(e);let t=e,n=Ke(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:St(e)}return St(e)}default:return St(e)}}function Ke(e,t){for(;e!==null;){let n=$e(e,t);if(n){if(n.get)return Be(n.get);if(typeof n.value==`function`)return Be(n.value)}e=Qe(e)}function n(){return null}return n}function qe(e){try{return Ct(e,``),!0}catch{return!1}}function Je(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:gee(),t=e=>Je(e);if(t.version=`3.4.14`,t.removed=[],!e||!e.document||e.document.nodeType!==Lt.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,l=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let u=e.DOMParser,d=e.trustedTypes,f=s.prototype,p=Ke(f,`cloneNode`),m=Ke(f,`remove`),h=Ke(f,`nextSibling`),g=Ke(f,`childNodes`),_=Ke(f,`parentNode`),v=Ke(f,`shadowRoot`),y=Ke(f,`attributes`),b=o&&o.prototype?Ke(o.prototype,`nodeType`):null,x=o&&o.prototype?Ke(o.prototype,`nodeName`):null,S=o&&o.prototype?Ke(o.prototype,`ownerDocument`):null,C=function(e){return b?b(e):e.nodeType},w=function(e){return x?x(e):e.nodeName};if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let T,E=``,D,O=!1,k=0,A=function(){if(k>0)throw wt(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},j=function(e){A(),k++;try{return T.createHTML(e)}finally{k--}},M=function(e){A(),k++;try{return T.createScriptURL(e)}finally{k--}},N=function(){return O||=(D=_ee(d,i),!0),D},P=n,F=P.implementation,I=P.createNodeIterator,L=P.createDocumentFragment,R=P.getElementsByTagName,ee=r.importNode,z=zt();t.isSupported=typeof Ye==`function`&&typeof _==`function`&&F&&F.createHTMLDocument!==void 0;let B=ree,te=iee,ne=aee,re=oee,ie=see,ae=cee,oe=lee,se=dee,ce=Pt,le=null,ue=He({},[...Tt,...Et,...Dt,...Ot,...kt]),de=null,fe=He({},[...At,...jt,...Mt,...Nt]),pe=Object.seal(nt(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),me=null,he=null,ge=Object.seal(nt(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),_e=!0,ve=!0,ye=!1,be=!0,xe=!1,Se=!0,V=!1,Ce=!1,we=null,Te=null,Ee=!1,De=!1,H=!1,Oe=!1,ke=!0,Ae=!1,U=`user-content-`,je=!0,Me=!1,Ne={},Pe=null,Fe=He({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Ie=null,Le=He({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Re=null,ze=He({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Be=`http://www.w3.org/1998/Math/MathML`,Ve=`http://www.w3.org/2000/svg`,Ue=`http://www.w3.org/1999/xhtml`,Xe=Ue,Ze=!1,Qe=null,$e=He({},[Be,Ve,Ue],pt),rt=et([`mi`,`mo`,`mn`,`ms`,`mtext`]),it=He({},rt),at=et([`annotation-xml`]),_t=He({},at),vt=He({},[`title`,`style`,`font`,`a`,`script`]),yt=null,bt=[`application/xhtml+xml`,`text/html`],St=null,Rt=null,Ht=n.createElement(`form`),Ut=function(e){return e instanceof RegExp||e instanceof Function},Wt=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Rt&&Rt===e)return;(!e||typeof e!=`object`)&&(e={}),e=We(e),yt=bt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,St=yt===`application/xhtml+xml`?pt:ft,le=Bt(e,`ALLOWED_TAGS`,ue,{transform:St}),de=Bt(e,`ALLOWED_ATTR`,fe,{transform:St}),Qe=Bt(e,`ALLOWED_NAMESPACES`,$e,{transform:pt}),Re=Bt(e,`ADD_URI_SAFE_ATTR`,ze,{transform:St,base:ze}),Ie=Bt(e,`ADD_DATA_URI_TAGS`,Le,{transform:St,base:Le}),Pe=Bt(e,`FORBID_CONTENTS`,Fe,{transform:St}),me=Bt(e,`FORBID_TAGS`,We({}),{transform:St}),he=Bt(e,`FORBID_ATTR`,We({}),{transform:St}),Ne=xt(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?We(e.USE_PROFILES):e.USE_PROFILES:!1,_e=e.ALLOW_ARIA_ATTR!==!1,ve=e.ALLOW_DATA_ATTR!==!1,ye=e.ALLOW_UNKNOWN_PROTOCOLS||!1,be=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,xe=e.SAFE_FOR_TEMPLATES||!1,Se=e.SAFE_FOR_XML!==!1,V=e.WHOLE_DOCUMENT||!1,De=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,Oe=e.RETURN_TRUSTED_TYPE||!1,Ee=e.FORCE_BODY||!1,ke=e.SANITIZE_DOM!==!1,Ae=e.SANITIZE_NAMED_PROPS||!1,je=e.KEEP_CONTENT!==!1,Me=e.IN_PLACE||!1,ce=qe(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:Pt,Xe=typeof e.NAMESPACE==`string`?e.NAMESPACE:Ue,it=Vt(e,`MATHML_TEXT_INTEGRATION_POINTS`,()=>He({},rt)),_t=Vt(e,`HTML_INTEGRATION_POINTS`,()=>He({},at));let t=Vt(e,`CUSTOM_ELEMENT_HANDLING`,()=>nt(null));if(pe=nt(null),xt(t,`tagNameCheck`)&&Ut(t.tagNameCheck)&&(pe.tagNameCheck=t.tagNameCheck),xt(t,`attributeNameCheck`)&&Ut(t.attributeNameCheck)&&(pe.attributeNameCheck=t.attributeNameCheck),xt(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(pe.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),tt(pe),xe&&(ve=!1),H&&(De=!0),Ne&&(le=He({},kt),de=nt(null),Ne.html===!0&&(He(le,Tt),He(de,At)),Ne.svg===!0&&(He(le,Et),He(de,jt),He(de,Nt)),Ne.svgFilters===!0&&(He(le,Dt),He(de,jt),He(de,Nt)),Ne.mathMl===!0&&(He(le,Ot),He(de,Mt),He(de,Nt))),ge.tagCheck=null,ge.attributeCheck=null,xt(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?ge.tagCheck=e.ADD_TAGS:dt(e.ADD_TAGS)&&(le===ue&&(le=We(le)),He(le,e.ADD_TAGS,St))),xt(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?ge.attributeCheck=e.ADD_ATTR:dt(e.ADD_ATTR)&&(de===fe&&(de=We(de)),He(de,e.ADD_ATTR,St))),xt(e,`ADD_FORBID_CONTENTS`)&&dt(e.ADD_FORBID_CONTENTS)&&(Pe===Fe&&(Pe=We(Pe)),He(Pe,e.ADD_FORBID_CONTENTS,St)),je&&(le[`#text`]=!0),V&&He(le,[`html`,`head`,`body`]),le.table&&(He(le,[`tbody`]),delete me.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw wt(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw wt(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=T;T=e.TRUSTED_TYPES_POLICY;try{E=j(``)}catch(e){throw T=t,e}}else e.TRUSTED_TYPES_POLICY===null?(T=void 0,E=``):(T===void 0&&(T=N()),T&&typeof E==`string`&&(E=j(``)));et&&et(e),Rt=e},Gt=He({},[...Et,...Dt,...tee]),Kt=He({},[...Ot,...nee]),vee=function(e,t,n){return t.namespaceURI===Ue?e===`svg`:t.namespaceURI===Be?e===`svg`&&(n===`annotation-xml`||it[n]):!!Gt[e]},yee=function(e,t,n){return t.namespaceURI===Ue?e===`math`:t.namespaceURI===Ve?e===`math`&&_t[n]:!!Kt[e]},qt=function(e,t,n){return t.namespaceURI===Ve&&!_t[n]||t.namespaceURI===Be&&!it[n]?!1:!Kt[e]&&(vt[e]||!Gt[e])},bee=function(e){let t=_(e);(!t||!t.tagName)&&(t={namespaceURI:Xe,tagName:`template`});let n=ft(e.tagName),r=ft(t.tagName);return Qe[e.namespaceURI]?e.namespaceURI===Ve?vee(n,t,r):e.namespaceURI===Be?yee(n,t,r):e.namespaceURI===Ue?qt(n,t,r):!!(yt===`application/xhtml+xml`&&Qe[e.namespaceURI]):!1},Jt=function(e){lt(t.removed,{element:e});try{_(e).removeChild(e)}catch{if(m(e),!_(e))throw wt(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},Yt=function(e,t,n){try{e.removeAttributeNode(t)}catch{try{e.removeAttribute(n)}catch{}}},Xt=function(e){W(e);let t=g(e);if(t){let e=[];ot(t,t=>{lt(e,t)}),ot(e,e=>{try{m(e)}catch{}})}let n=y(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;typeof i==`string`&&Yt(e,r,i)}},Zt=function(e,n,r){if(!r)try{r=n.getAttributeNode(e)}catch{r=null}lt(t.removed,{attribute:r||null,from:n});try{r?n.removeAttributeNode(r):n.removeAttribute(e)}catch{try{n.removeAttribute(e)}catch{}}if(e===`is`){if(De||H)try{Jt(n)}catch{}else try{n.setAttribute(e,``)}catch{}}},xee=function(e){let t=y(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;typeof i!=`string`||de[St(i)]||Yt(e,r,i)}},W=function(e){let t=[e];for(;t.length>0;){let e=t.pop();C(e)===Lt.element&&xee(e);let n=g(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},Qt=function(e,t){return Se?e===`patchsrc`||e===`for`&&t!==`label`&&t!==`output`:!1},$t=function(e){if(!Se)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=C(e);if(n===Lt.processingInstruction||n===Lt.comment&&Ct(It,e.data)){try{m(e)}catch{}continue}if(n===Lt.element){let t=e,n=St(w(e));try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&Qt(`for`,n)&&t.removeAttribute(`for`)}catch{}}let r=g(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},en=function(e){let t=null,r=null;if(Ee)e=`<remove></remove>`+e;else{let t=mt(e,/^[\r\n\t ]+/);r=t&&t[0]}yt===`application/xhtml+xml`&&Xe===Ue&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=T?j(e):e;if(Xe===Ue)try{t=new u().parseFromString(i,yt)}catch{}if(!t||!t.documentElement){t=F.createDocument(Xe,`template`,null);try{t.documentElement.innerHTML=Ze?E:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),Xe===Ue?R.call(t,V?`html`:`body`)[0]:V?t.documentElement:a},tn=function(e){let t=S?S(e):e.ownerDocument;return I.call(t||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},nn=function(e){return e=ht(e,B,` `),e=ht(e,te,` `),e=ht(e,ne,` `),e},rn=function(e){e.normalize();let t=S?S(e):e.ownerDocument,n=I.call(t||e,e,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null),r=n.nextNode();for(;r;)r.data=nn(r.data),r=n.nextNode();let i=e.querySelectorAll?.call(e,`template`);i&&ot(i,e=>{on(e.content)&&rn(e.content)})},an=function(e){let t=x?x(e):null;return typeof t!=`string`||St(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==y(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==b(e)||e.childNodes!==g(e)},on=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return b(e)===Lt.documentFragment}catch{return!1}},sn=function(e){if(!b||typeof e!=`object`||!e)return!1;try{return typeof b(e)==`number`}catch{return!1}};function cn(e,n,r){e.length!==0&&ot(e,e=>{e.call(t,n,r,Rt)})}let ln=function(e,t){return!!(Se&&e.hasChildNodes()&&!sn(e.firstElementChild)&&Ct(Ft,e.textContent)&&Ct(Ft,e.innerHTML)||Se&&e.namespaceURI===Ue&&mee[t]&&(sn(e.firstElementChild)||typeof e.textContent==`string`&&Ct(hee[t],e.textContent))||e.nodeType===Lt.processingInstruction||Se&&e.nodeType===Lt.comment&&Ct(It,e.data))},un=function(e,t){if(e instanceof RegExp)return Ct(e,t);if(e instanceof Function){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return!!e(t,...r)}return!1},dn=function(e,t,n){if(!me[t]&&_n(t)&&un(pe.tagNameCheck,t))return!1;if(je&&!Pe[t]){let t=_(e),r=g(e);if(r&&t){let i=r.length;for(let a=i-1;a>=0;--a){let i=e===n?p(r[a],!0):r[a];t.insertBefore(i,h(e))}}}return Jt(e),!0},fn=function(e,t,n,r){return e.length===0?t:t===n||t===r?We(t):t},pn=function(e,t){return e===t||_(e)!==null?!1:(Me&&W(e),!0)},mn=function(e,n){if(cn(z.beforeSanitizeElements,e,null),pn(e,n))return!0;if(an(e))return Jt(e),!0;let r=St(w(e));if(le=fn(z.uponSanitizeElement,le,ue,we),cn(z.uponSanitizeElement,e,{tagName:r,allowedTags:le}),pn(e,n))return!0;if(ln(e,r))return Jt(e),!0;if(me[r]||!(ge.tagCheck instanceof Function&&ge.tagCheck(r))&&!le[r]){let t=dn(e,r,n);return t===!1&&cn(z.afterSanitizeElements,e,null),t}if(C(e)===Lt.element&&!bee(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Ct(fee,e.innerHTML))return Jt(e),!0;if(xe&&e.nodeType===Lt.text){let n=nn(e.textContent);e.textContent!==n&&(lt(t.removed,{element:e.cloneNode()}),e.textContent=n)}return cn(z.afterSanitizeElements,e,null),!1},hn=function(e,t,r){if(he[t]||Qt(t,e)||ke&&(t===`id`||t===`name`)&&(r in n||r in Ht))return!1;let i=de[t]||ge.attributeCheck instanceof Function&&ge.attributeCheck(t,e);return ve&&Ct(re,t)||_e&&Ct(ie,t)?!0:i?Re[t]||Ct(ce,ht(r,oe,``))||(t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&gt(r,`data:`)===0&&Ie[e]||ye&&!Ct(ae,ht(r,oe,``))?!0:!r:_n(e)&&un(pe.tagNameCheck,e)&&un(pe.attributeNameCheck,t,e)||t===`is`&&pe.allowCustomizedBuiltInElements&&un(pe.tagNameCheck,r)},gn=He({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),_n=function(e){return!gn[ft(e)]&&Ct(se,e)},G=function(e,t,n,r){if(T&&typeof d==`object`&&typeof d.getAttributeType==`function`&&!n)switch(d.getAttributeType(e,t)){case`TrustedHTML`:return j(r);case`TrustedScriptURL`:return M(r)}return r},vn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),an(e)?Jt(e):ct(t.removed)}catch{Zt(n,e)}},yn=function(e){cn(z.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||an(e))return;de=fn(z.uponSanitizeAttribute,de,fe,Te);let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:de,forceKeepAttr:void 0},r=t.length,i=St(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,l=a.value,u=St(o),d=l,f=o===`value`?d:eee(d);if(n.attrName=u,n.attrValue=f,n.keepAttr=!0,n.forceKeepAttr=void 0,cn(z.uponSanitizeAttribute,e,n),f=n.attrValue,Ae&&(u===`id`||u===`name`)&&gt(f,U)!==0&&(Zt(o,e,a),f=U+f),Se&&Ct(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,f)){Zt(o,e,a);continue}if(u===`attributename`&&mt(f,`href`)){Zt(o,e,a);continue}if(!n.forceKeepAttr){if(!n.keepAttr){Zt(o,e,a);continue}if(!be&&Ct(pee,f)){Zt(o,e,a);continue}if(xe&&(f=nn(f)),!hn(i,u,f)){Zt(o,e,a);continue}f=G(i,u,s,f),f!==d&&vn(e,o,s,f)}}cn(z.afterSanitizeAttributes,e,null)},bn=function(e){let t=null,n=tn(e);for(cn(z.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(cn(z.uponSanitizeShadowNode,t,null),mn(t,e),yn(t),on(t.content)&&bn(t.content),C(t)===Lt.element){let e=v(t);on(e)&&(xn(e),bn(e))}cn(z.afterSanitizeShadowDOM,e,null)},xn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){bn(e.shadow);continue}let n=e.node,r=C(n)===Lt.element,i=g(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=x?x(n):null;if(typeof e==`string`&&St(e)===`template`){let e=n.content;on(e)&&t.push({node:e,shadow:null})}}if(r){let e=v(n);on(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Ze=!e,Ze&&(e=`<!-->`),typeof e!=`string`&&!sn(e)&&(e=Ge(e),typeof e!=`string`))throw wt(`dirty is not a string, aborting`);if(!t.isSupported)return e;Ce?(le=we,de=Te):Wt(n),(z.uponSanitizeElement.length>0||z.uponSanitizeAttribute.length>0)&&(le=We(le)),z.uponSanitizeAttribute.length>0&&(de=We(de)),t.removed=[];let l=Me&&typeof e!=`string`&&sn(e);if(l){$t(e);let t=w(e);if(typeof t==`string`){let n=St(t);if(!le[n]||me[n])throw Xt(e),wt(`root node is forbidden and cannot be sanitized in-place`)}if(an(e))throw Xt(e),wt(`root node is clobbered and cannot be sanitized in-place`);try{xn(e)}catch(t){throw Xt(e),t}}else if(sn(e))i=en(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===Lt.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),xn(a);else{if(!De&&!xe&&!V&&e.indexOf(`<`)===-1)return T&&Oe?j(e):e;if(i=en(e),!i)return De?null:Oe?E:``}i&&Ee&&Jt(i.firstChild);let u=l?e:i;try{let e=tn(u);for(;o=e.nextNode();)mn(o,u),yn(o),on(o.content)&&bn(o.content)}catch(n){throw l&&(Xt(e),ot(t.removed,e=>{e.element&&W(e.element)})),n}if(l)return ot(t.removed,e=>{e.element&&W(e.element)}),xe&&rn(e),e;if(De){if(xe&&rn(i),H)for(s=L.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(de.shadowroot||de.shadowrootmode)&&(s=ee.call(r,s,!0)),s}let d=V?i.outerHTML:i.innerHTML;return V&&le[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Ct(uee,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>3-`+d),xe&&(d=nn(d)),T&&Oe?j(d):d},t.setConfig=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Wt(e),Ce=!0,we=le,Te=de},t.clearConfig=function(){Rt=null,Ce=!1,we=null,Te=null,T=D,E=``},t.isValidAttribute=function(e,t,n){Rt||Wt({});let r=St(e),i=St(t);return hn(r,i,n)},t.addHook=function(e,t){typeof t==`function`&&xt(z,e)&&lt(z[e],t)},t.removeHook=function(e,t){if(xt(z,e)){if(t!==void 0){let n=st(z[e],t);return n===-1?void 0:ut(z[e],n,1)[0]}return ct(z[e])}},t.removeHooks=function(e){xt(z,e)&&(z[e]=[])},t.removeAllHooks=function(){z=zt()},t}var Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,it,at,ot,st,ct,lt,ut,dt,ft,pt,mt,ht,gt,eee,_t,vt,yt,bt,xt,St,Ct,wt,Tt,Et,Dt,tee,Ot,nee,kt,At,jt,Mt,Nt,ree,iee,aee,oee,see,Pt,cee,lee,uee,dee,Ft,It,fee,pee,Lt,Rt,mee,hee,gee,_ee,zt,Bt,Vt,Ht,Ut=o((()=>{Ye=Object.entries,Xe=Object.setPrototypeOf,Ze=Object.isFrozen,Qe=Object.getPrototypeOf,$e=Object.getOwnPropertyDescriptor,et=Object.freeze,tt=Object.seal,nt=Object.create,rt=typeof Reflect<`u`&&Reflect,it=rt.apply,at=rt.construct,et||=function(e){return e},tt||=function(e){return e},it||=function(e,t){for(var n=arguments.length,r=Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];return e.apply(t,r)},at||=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return new e(...n)},ot=Be(Array.prototype.forEach),st=Be(Array.prototype.lastIndexOf),ct=Be(Array.prototype.pop),lt=Be(Array.prototype.push),ut=Be(Array.prototype.splice),dt=Array.isArray,ft=Be(String.prototype.toLowerCase),pt=Be(String.prototype.toString),mt=Be(String.prototype.match),ht=Be(String.prototype.replace),gt=Be(String.prototype.indexOf),eee=Be(String.prototype.trim),_t=Be(Number.prototype.toString),vt=Be(Boolean.prototype.toString),yt=typeof BigInt>`u`?null:Be(BigInt.prototype.toString),bt=typeof Symbol>`u`?null:Be(Symbol.prototype.toString),xt=Be(Object.prototype.hasOwnProperty),St=Be(Object.prototype.toString),Ct=Be(RegExp.prototype.test),wt=Ve(TypeError),Tt=et(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Et=et(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Dt=et([`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`]),tee=et([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Ot=et(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),nee=et([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),kt=et([`#text`]),At=et(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),jt=et(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.pointer-events.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.vector-effect.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Mt=et(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Nt=et([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),ree=tt(/{{[\w\W]*|^[\w\W]*}}/g),iee=tt(/<%[\w\W]*|^[\w\W]*%>/g),aee=tt(/\${[\w\W]*/g),oee=tt(/^data-[\-\w.\u00B7-\uFFFF]+$/),see=tt(/^aria-[\-\w]+$/),Pt=tt(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),cee=tt(/^(?:\w+script|data):/i),lee=tt(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),uee=tt(/^html$/i),dee=tt(/^[a-z][.\w]*(-[.\w]+)+$/i),Ft=tt(/<[/\w!]/g),It=tt(/<[/\w]/g),fee=tt(/<\/no(script|embed|frames)/i),pee=tt(/\/>/i),Lt={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Rt=[`style`,`script`,`xmp`,`iframe`,`noembed`,`noframes`,`plaintext`,`noscript`],mee=et(He({},Rt)),hee=function(){let e={};return ot(Rt,t=>{e[t]=tt(RegExp(`</`+t+`(?=[\\t\\n\\f\\r />])`,`i`))}),et(e)}(),gee=function(){return typeof window>`u`?null:window},_ee=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},zt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Bt=function(e,t,n,r){return xt(e,t)&&dt(e[t])?He(r.base?We(r.base):{},e[t],r.transform):n},Vt=function(e,t,n){let r=xt(e,t)?e[t]:void 0;return r&&typeof r==`object`?We(r):n()},Ht=Je()})),Wt=l({ParseError:()=>Sn,SETTINGS_SCHEMA:()=>En,__defineFunction:()=>Qt,__defineMacro:()=>G,__defineSymbol:()=>W,__domTree:()=>Ao,__parse:()=>To,__renderToDomTree:()=>Do,__renderToHTMLTree:()=>Oo,__setFontMetrics:()=>Xt,default:()=>rne,render:()=>Co,renderToString:()=>wo,version:()=>ko});function Gt(e){if(typeof e!=`string`)return e.enum[0];switch(e){case`boolean`:return!1;case`string`:return``;case`number`:return 0;case`object`:return{};default:throw Error(`Unexpected schema type; settings must declare an explicit default.`)}}function Kt(e){return e.default===void 0?Gt(Array.isArray(e.type)?e.type[0]:e.type):e.default}function vee(e,t,n,r){var i=n[t];e[t]=i===void 0?Kt(r):r.processor?r.processor(i):i}function yee(e){for(var t=0;t<zn.length;t++)for(var n=zn[t],r=0;r<n.blocks.length;r++){var i=n.blocks[r];if(e>=i[0]&&e<=i[1])return n.name}return null}function qt(e){for(var t=0;t<Bn.length;t+=2)if(e>=Bn[t]&&e<=Bn[t+1])return!0;return!1}function bee(e){return`toText`in e}function Jt(e){if(e instanceof nr)return e;throw Error(`Expected symbolNode but got `+String(e)+`.`)}function Yt(e){if(e instanceof er)return e;throw Error(`Expected span<HtmlDomNode> but got `+String(e)+`.`)}function Xt(e,t){or[e]=t}function Zt(e,t,n){if(!or[t])throw Error(`Font metrics not found for font: `+t+`.`);var r=e.charCodeAt(0),i=or[t][r];if(!i&&e[0]in cr&&(r=cr[e[0]].charCodeAt(0),i=or[t][r]),!i&&n===`text`&&qt(r)&&(i=or[t][77]),i)return{depth:i[0],height:i[1],italic:i[2],skew:i[3],width:i[4]}}function xee(e){var t=e>=5?0:e>=3?1:2;if(!lr[t]){var n=lr[t]={cssEmPerMu:sr.quad[t]/18};for(var r in sr)sr.hasOwnProperty(r)&&(n[r]=sr[r][t])}return lr[t]}function W(e,t,n,r,i,a){ur[e][i]={font:t,group:n,replace:r},a&&r&&(ur[e][r]=ur[e][i])}function Qt(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs,argTypes:r.argTypes,allowedInArgument:!!r.allowedInArgument,allowedInText:!!r.allowedInText,allowedInMath:r.allowedInMath===void 0||r.allowedInMath,numOptionalArgs:r.numOptionalArgs||0,infix:!!r.infix,primitive:!!r.primitive,handler:i},l=0;l<n.length;++l)_i[n[l]]=s;t&&(a&&(vi[t]=a),o&&(yi[t]=o))}function $t(e){var{type:t,htmlBuilder:n,mathmlBuilder:r}=e;Qt({type:t,names:[],props:{numArgs:0},handler(){throw Error(`Should never be called.`)},htmlBuilder:n,mathmlBuilder:r})}function en(e,t){var n=ri([`base`],e,t),r=ri([`strut`]);return r.style.height=Jn(n.height+n.depth),n.depth&&(r.style.verticalAlign=Jn(-n.depth)),n.children.unshift(r),n}function tn(e,t){var n=null;e.length===1&&e[0].type===`tag`&&(n=e[0].tag,e=e[0].body);var r=Si(e,t,`root`),i;r.length===2&&r[1].hasClass(`tag`)&&(i=r.pop());for(var a=[],o=[],s=0;s<r.length;s++)if(o.push(r[s]),r[s].hasClass(`mbin`)||r[s].hasClass(`mrel`)||r[s].hasClass(`allowbreak`)){for(var l=!1;s<r.length-1&&r[s+1].hasClass(`mspace`)&&!r[s+1].hasClass(`newline`);)s++,o.push(r[s]),r[s].hasClass(`nobreak`)&&(l=!0);l||(a.push(en(o,t)),o=[])}else r[s].hasClass(`newline`)&&(o.pop(),o.length>0&&(a.push(en(o,t)),o=[]),a.push(r[s]));o.length>0&&a.push(en(o,t));var u;n?(u=en(Si(n,t,!0),t),u.classes=[`tag`],a.push(u)):i&&a.push(i);var d=ri([`katex-html`],a);if(d.setAttribute(`aria-hidden`,`true`),u){var f=u.children[0];f.style.height=Jn(d.height+d.depth),d.depth&&(f.style.verticalAlign=Jn(-d.depth))}return d}function nn(e){return new Wn(e)}function rn(e){if(!e)return!1;if(e.type===`mi`&&e.children.length===1){var t=e.children[0];return t instanceof Ai&&t.text===`.`}if(e.type===`mo`&&e.children.length===1&&e.getAttribute(`separator`)===`true`&&e.getAttribute(`lspace`)===`0em`&&e.getAttribute(`rspace`)===`0em`){var n=e.children[0];return n instanceof Ai&&n.text===`,`}return!1}function an(e,t,n,r,i){var a=Fi(e,n),o=a.length===1&&a[0]instanceof ki&&dte.has(a[0].type)?a[0]:new ki(`mrow`,a),s=new ki(`annotation`,[new Ai(t)]);s.setAttribute(`encoding`,`application/x-tex`);var l=new ki(`semantics`,[o,s]),u=new ki(`math`,[l]);return u.setAttribute(`xmlns`,`http://www.w3.org/1998/Math/MathML`),r&&u.setAttribute(`display`,`block`),ri([i?`katex`:`katex-mathml`],[u])}function on(e){return e in bte}function sn(e,t){if(!e||e.type!==t)throw Error(`Expected node of type `+t+`, but got `+(e?`node of type `+e.type:String(e)));return e}function cn(e){var t=ln(e);if(!t)throw Error(`Expected node of symbol group type, but got `+(e?`node of type `+e.type:String(e)));return t}function ln(e){return e&&(e.type===`atom`||xte.hasOwnProperty(e.type))?e:null}function un(e,t){var n=Si(e.body,t,!0);return ri([e.mclass],n,t)}function dn(e,t){var n,r=Fi(e.body,t);return e.mclass===`minner`?n=new ki(`mpadded`,r):e.mclass===`mord`?e.isCharacterBox?(n=r[0],n.type=`mi`):n=new ki(`mi`,r):(e.isCharacterBox?(n=r[0],n.type=`mo`):n=new ki(`mo`,r),e.mclass===`mbin`?(n.attributes.lspace=`0.22em`,n.attributes.rspace=`0.22em`):e.mclass===`mpunct`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0.17em`):e.mclass===`mopen`||e.mclass===`mclose`?(n.attributes.lspace=`0em`,n.attributes.rspace=`0em`):e.mclass===`minner`&&(n.attributes.lspace=`0.0556em`,n.attributes.width=`+0.1111em`)),n}function fn(e,t,n){var r=Cte[e];switch(r){case`\\\\cdrightarrow`:case`\\\\cdleftarrow`:return n.callFunction(r,[t[0]],[t[1]]);case`\\uparrow`:case`\\downarrow`:var i=n.callFunction(`\\\\cdleft`,[t[0]],[]),a={type:`atom`,text:r,mode:`math`,family:`rel`},o={type:`ordgroup`,mode:`math`,body:[i,n.callFunction(`\\Big`,[a],[]),n.callFunction(`\\\\cdright`,[t[1]],[])]};return n.callFunction(`\\\\cdparent`,[o],[]);case`\\\\cdlongequal`:return n.callFunction(`\\\\cdlongequal`,[],[]);case`\\Vert`:return n.callFunction(`\\Big`,[{type:`textord`,text:`\\Vert`,mode:`math`}],[]);default:return{type:`textord`,text:` `,mode:`math`}}}function pn(e){var t=[];for(e.gullet.beginGroup(),e.gullet.macros.set(`\\cr`,`\\\\\\relax`),e.gullet.beginGroup();;){t.push(e.parseExpression(!1,`\\\\`)),e.gullet.endGroup(),e.gullet.beginGroup();var n=e.fetch().text;if(n===`&`||n===`\\\\`)e.consume();else if(n===`\\end`){t[t.length-1].length===0&&t.pop();break}else throw new Sn(`Expected \\\\ or \\cr or \\end`,e.nextToken)}for(var r=[],i=[r],a=0;a<t.length;a++){for(var o=t[a],s=Xi(),l=0;l<o.length;l++)if(!Zi(o[l]))s.body.push(o[l]);else{r.push(s),l+=1;var u=cn(o[l]).text,d=[,,];if(d[0]={type:`ordgroup`,mode:`math`,body:[]},d[1]={type:`ordgroup`,mode:`math`,body:[]},!`=|.`.includes(u)){if(`<>AV`.includes(u))for(var f=0;f<2;f++){for(var p=!0,m=l+1;m<o.length;m++){if(wte(o[m],u)){p=!1,l=m;break}if(Zi(o[m]))throw new Sn(`Missing a `+u+` character to complete a CD arrow.`,o[m]);d[f].body.push(o[m])}if(p)throw new Sn(`Missing a `+u+` character to complete a CD arrow.`,o[l])}else throw new Sn(`Expected one of "<>AV=|." after @`,o[l])}var h={type:`styling`,body:[fn(u,d,e)],mode:`math`,style:`display`,resetFont:!0};r.push(h),s=Xi()}a%2==0?r.push(s):r.shift(),r=[],i.push(r)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:`math`,body:i,arraystretch:1,addJot:!0,rowGaps:[null],cols:Array(i[0].length).fill({type:`align`,align:`c`,pregap:.25,postgap:.25}),colSeparationType:`CD`,hLinesBeforeRow:Array(i.length+1).fill([])}}function mn(e){return`isMiddle`in e}function hn(e,t){var n=ln(e);if(n&&Fte.has(n.text))return n;throw n?new Sn(`Invalid delimiter '`+n.text+`' after '`+t.funcName+`'`,e):new Sn(`Invalid delimiter type '`+e.type+`'`,e)}function gn(e){if(!e.body)throw Error(`Bug: The leftright ParseNode wasn't fully parsed.`)}function _n(e){for(var{type:t,names:n,props:r,handler:i,htmlBuilder:a,mathmlBuilder:o}=e,s={type:t,numArgs:r.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler:i},l=0;l<n.length;++l)Ea[n[l]]=s;a&&(vi[t]=a),o&&(yi[t]=o)}function G(e,t){Da[e]=t}function vn(e){var t=[];e.consumeSpaces();var n=e.fetch().text;for(n===`\\relax`&&(e.consume(),e.consumeSpaces(),n=e.fetch().text);n===`\\hline`||n===`\\hdashline`;)e.consume(),t.push(n===`\\hdashline`),e.consumeSpaces(),n=e.fetch().text;return t}function yn(e){if(!e.includes(`ed`))return!e.includes(`*`)}function bn(e,t,n){var{hskipBeforeAndAfter:r,addJot:i,cols:a,arraystretch:o,colSeparationType:s,autoTag:l,singleRow:u,emptySingleRow:d,maxNumCols:f,leqno:p}=t;if(e.gullet.beginGroup(),u||e.gullet.macros.set(`\\cr`,`\\\\\\relax`),!o){var m=e.gullet.expandMacroAsText(`\\arraystretch`);if(m==null)o=1;else if(o=parseFloat(m),!o||o<0)throw new Sn(`Invalid \\arraystretch: `+m)}e.gullet.beginGroup();var h=[],g=[h],_=[],v=[],y=l==null?void 0:[];function b(){l&&e.gullet.macros.set(`\\@eqnsw`,`1`,!0)}function x(){y&&(e.gullet.macros.get(`\\df@tag`)?(y.push(e.subparse([new ka(`\\df@tag`)])),e.gullet.macros.set(`\\df@tag`,void 0,!0)):y.push(!!l&&e.gullet.macros.get(`\\@eqnsw`)===`1`))}for(b(),v.push(vn(e));;){var S=e.parseExpression(!1,u?`\\end`:`\\\\`);e.gullet.endGroup(),e.gullet.beginGroup();var C={type:`ordgroup`,mode:e.mode,body:S};n&&(C={type:`styling`,mode:e.mode,style:n,resetFont:!0,body:[C]}),h.push(C);var w=e.fetch().text;if(w===`&`){if(f&&h.length===f){if(u||s)throw new Sn(`Too many tab characters: &`,e.nextToken);e.settings.reportNonstrict(`textEnv`,`Too few columns specified in the {array} column argument.`)}e.consume()}else if(w===`\\end`){x(),h.length===1&&C.type===`styling`&&C.body.length===1&&C.body[0].type===`ordgroup`&&C.body[0].body.length===0&&(g.length>1||!d)&&g.pop(),v.length<g.length+1&&v.push([]);break}else if(w===`\\\\`){e.consume();var T=void 0;e.gullet.future().text!==` `&&(T=e.parseSizeGroup(!0)),_.push(T?T.value:null),x(),v.push(vn(e)),h=[],g.push(h),b()}else throw new Sn(`Expected & or \\\\ or \\cr or \\end`,e.nextToken)}return e.gullet.endGroup(),e.gullet.endGroup(),{type:`array`,mode:e.mode,addJot:i,arraystretch:o,body:g,cols:a,rowGaps:_,hskipBeforeAndAfter:r,hLinesBeforeRow:v,colSeparationType:s,tags:y,leqno:p}}function xn(e){return e.slice(0,1)===`d`?`display`:`text`}function See(e,t,n){for(var r=Si(e,t,!1),i=t.sizeMultiplier/n.sizeMultiplier,a=0;a<r.length;a++){var o=r[a].classes.indexOf(`sizing`);o<0?Array.prototype.push.apply(r[a].classes,t.sizingClasses(n)):r[a].classes[o+1]===`reset-size`+t.size&&(r[a].classes[o+1]=`reset-size`+n.size),r[a].height*=i,r[a].depth*=i}return oi(r)}function Cee(e){return e in Xa}var Sn,wee,Tee,Eee,Dee,Cn,wn,Oee,Tn,kee,En,Dn,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Aee,jee,Mee,Nee,Pee,Fee,Rn,zn,Bn,Vn,Hn,Iee,Lee,Ree,zee,Bee,Vee,Hee,Uee,Wee,Un,Gee,Wn,Gn,Kee,Kn,qn,Jn,Yn,Xn,Zn,Qn,qee,$n,er,tr,Jee,Yee,nr,rr,ir,ar,Xee,or,sr,cr,lr,ur,K,dr,q,J,fr,pr,mr,hr,gr,_r,vr,yr,Y,br,X,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr,Ir,Lr,Rr,zr,Br,Vr,Zee,Hr,Ur,Wr,Gr,Kr,qr,Jr,Yr,Xr,Qee,$ee,Zr,Qr,$r,ete,ei,tte,ti,ni,ri,ii,ai,nte,oi,si,rte,ci,li,ui,di,fi,pi,mi,hi,gi,ite,ate,_i,vi,yi,bi,xi,ote,ste,cte,lte,Si,Ci,wi,Ti,Ei,Di,Oi,ki,Ai,ji,ute,dte,Mi,Ni,fte,Pi,Fi,Ii,Li,pte,Ri,zi,Bi,Vi,Hi,mte,hte,gte,Ui,_te,vte,Wi,yte,bte,xte,Gi,Ki,qi,Ste,Ji,Yi,Cte,Xi,Zi,wte,Qi,$i,ea,ta,Tte,na,ra,ia,aa,Ete,Dte,oa,sa,ca,la,ua,Ote,kte,da,fa,pa,ma,Ate,ha,jte,ga,_a,va,Mte,Nte,ya,Pte,ba,xa,Sa,Ca,Fte,wa,Ta,Ea,Da,Oa,ka,Aa,Ite,ja,Lte,Ma,Na,Pa,Fa,Ia,La,Rte,zte,Ra,za,Ba,Va,Bte,Ha,Ua,Wa,Ga,Ka,qa,Vte,Hte,Ja,Ute,Ya,Wte,Xa,Gte,Za,Qa,$a,eo,to,no,Kte,ro,io,ao,oo,qte,Jte,Yte,Xte,so,Zte,Qte,co,$te,ene,lo,uo,fo,tne,po,mo,ho,go,nne,_o,vo,yo,bo,xo,So,Co,wo,To,Eo,Do,Oo,ko,Ao,rne,ine=o((()=>{for(Sn=class e extends Error{constructor(t,n){var r=`KaTeX parse error: `+t,i,a,o=n&&n.loc;if(o&&o.start<=o.end){var s=o.lexer.input;i=o.start,a=o.end,i===s.length?r+=` at end of input: `:r+=` at position `+(i+1)+`: `;var l=s.slice(i,a).replace(/[^]/g,`$&̲`),u=i>15?`…`+s.slice(i-15,i):s.slice(0,i),d=a+15<s.length?s.slice(a,a+15)+`…`:s.slice(a);r+=u+l+d}super(r),this.name=`ParseError`,this.position=void 0,this.length=void 0,this.rawMessage=void 0,Object.setPrototypeOf(this,e.prototype),this.position=i,i!=null&&a!=null&&(this.length=a-i),this.rawMessage=t}},wee=/([A-Z])/g,Tee=e=>e.replace(wee,`-$1`).toLowerCase(),Eee={"&":`&amp;`,">":`&gt;`,"<":`&lt;`,'"':`&quot;`,"'":`&#x27;`},Dee=/[&><"']/g,Cn=e=>String(e).replace(Dee,e=>Eee[e]),wn=e=>e.type===`ordgroup`||e.type===`color`?e.body.length===1?wn(e.body[0]):e:e.type===`font`?wn(e.body):e,Oee=new Set([`mathord`,`textord`,`atom`]),Tn=e=>Oee.has(wn(e).type),kee=e=>{var t=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(e);return t?t[2]!==`:`||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?null:t[1].toLowerCase():`_relative`},En={displayMode:{type:`boolean`,description:`Render math in display mode, which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.`,cli:`-d, --display-mode`},output:{type:{enum:[`htmlAndMathml`,`html`,`mathml`]},description:`Determines the markup language of the output.`,cli:`-F, --format <type>`},leqno:{type:`boolean`,description:`Render display math in leqno style (left-justified tags).`},fleqn:{type:`boolean`,description:`Render display math flush left.`},throwOnError:{type:`boolean`,default:!0,cli:`-t, --no-throw-on-error`,cliDescription:`Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error.`},errorColor:{type:`string`,default:`#cc0000`,cli:`-c, --error-color <color>`,cliDescription:`A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.`,cliProcessor:e=>`#`+e},macros:{type:`object`,cli:`-m, --macro <def>`,cliDescription:`Define custom macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).`,cliDefault:[],cliProcessor:(e,t)=>(t.push(e),t)},minRuleThickness:{type:`number`,description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:e=>Math.max(0,e),cli:`--min-rule-thickness <size>`,cliProcessor:parseFloat},colorIsTextColor:{type:`boolean`,description:`Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.`,cli:`-b, --color-is-text-color`},strict:{type:[{enum:[`warn`,`ignore`,`error`]},`boolean`,`function`],description:`Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.`,cli:`-S, --strict`,cliDefault:!1},trust:{type:[`boolean`,`function`],description:`Trust the input, enabling all HTML features such as \\url.`,cli:`-T, --trust`},maxSize:{type:`number`,default:1/0,description:`If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large`,processor:e=>Math.max(0,e),cli:`-s, --max-size <n>`,cliProcessor:parseInt},maxExpand:{type:`number`,default:1e3,description:`Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to Infinity, the macro expander will try to fully expand as in LaTeX.`,processor:e=>Math.max(0,e),cli:`-e, --max-expand <n>`,cliProcessor:e=>e===`Infinity`?1/0:parseInt(e)},globalGroup:{type:`boolean`,cli:!1}},Dn=class{constructor(e){e===void 0&&(e={}),this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,e||={};for(var t of Object.keys(En)){var n=En[t];n&&vee(this,t,e,n)}}reportNonstrict(e,t,n){var r=this.strict;if(typeof r==`function`&&(r=r(e,t,n)),!(!r||r===`ignore`)){if(r===!0||r===`error`)throw new Sn(`LaTeX-incompatible input and strict mode is set to 'error': `+(t+` [`+e+`]`),n);r===`warn`?typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)):typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`))}}useStrictBehavior(e,t,n){var r=this.strict;if(typeof r==`function`)try{r=r(e,t,n)}catch{r=`error`}return!r||r===`ignore`?!1:r===!0||r===`error`?!0:r===`warn`?(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to 'warn': `+(t+` [`+e+`]`)),!1):(typeof console<`u`&&console.warn(`LaTeX-incompatible input and strict mode is set to `+(`unrecognized '`+r+`': `+t+` [`+e+`]`)),!1)}isTrusted(e){if(`url`in e&&e.url&&!e.protocol){var t=kee(e.url);if(t==null)return!1;e.protocol=t}return!!(typeof this.trust==`function`?this.trust(e):this.trust)}},On=class{constructor(e,t,n){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=e,this.size=t,this.cramped=n}sup(){return Ln[Aee[this.id]]}sub(){return Ln[jee[this.id]]}fracNum(){return Ln[Mee[this.id]]}fracDen(){return Ln[Nee[this.id]]}cramp(){return Ln[Pee[this.id]]}text(){return Ln[Fee[this.id]]}isTight(){return this.size>=2}},kn=0,An=1,jn=2,Mn=3,Nn=4,Pn=5,Fn=6,In=7,Ln=[new On(kn,0,!1),new On(An,0,!0),new On(jn,1,!1),new On(Mn,1,!0),new On(Nn,2,!1),new On(Pn,2,!0),new On(Fn,3,!1),new On(In,3,!0)],Aee=[Nn,Pn,Nn,Pn,Fn,In,Fn,In],jee=[Pn,Pn,Pn,Pn,In,In,In,In],Mee=[jn,Mn,Nn,Pn,Fn,In,Fn,In],Nee=[Mn,Mn,Pn,Pn,In,In,In,In],Pee=[An,An,Mn,Mn,Pn,Pn,In,In],Fee=[kn,An,jn,Mn,jn,Mn,jn,Mn],Rn={DISPLAY:Ln[kn],TEXT:Ln[jn],SCRIPT:Ln[Nn],SCRIPTSCRIPT:Ln[Fn]},zn=[{name:`latin`,blocks:[[256,591],[768,879]]},{name:`cyrillic`,blocks:[[1024,1279]]},{name:`armenian`,blocks:[[1328,1423]]},{name:`brahmic`,blocks:[[2304,4255]]},{name:`georgian`,blocks:[[4256,4351]]},{name:`cjk`,blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:`hangul`,blocks:[[44032,55215]]}],Bn=[],zn.forEach(e=>e.blocks.forEach(e=>Bn.push(...e))),Vn=e=>e+` `+e,Hn=80,Iee=function(e,t){return`M95,`+(622+e+t)+`4-c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-145-c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-546-c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,107-s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-4298-c69,-144,104.5,-217.7,106.5,-2219-l`+e/2.075+` -`+e+`10-c5.3,-9.3,12,-14,20,-1411-H400000v`+(40+e)+`H845.272412-s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,713-c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z14-M`+(834+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Lee=function(e,t){return`M263,`+(601+e+t)+`c0.7,0,18,39.7,52,11915-c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,12016-c340,-704.7,510.7,-1060.3,512,-106717-l`+e/2.084+` -`+e+`18-c4.7,-7.3,11,-11,19,-1119-H40000v`+(40+e)+`H1012.320-s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,23221-c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-122-s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,2623-c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z24-M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},Ree=function(e,t){return`M983 `+(10+e+t)+`25-l`+e/3.13+` -`+e+`26-c4,-6.7,10,-10,18,-10 H400000v`+(40+e)+`27-H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,728-s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-74429-c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-3030-c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,72231-c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.532-c53.7,-170.3,84.5,-266.8,92.5,-289.5z33-M`+(1001+e)+` `+t+`h400000v`+(40+e)+`h-400000z`},zee=function(e,t){return`M424,`+(2398+e+t)+`34-c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-51435-c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,2036-s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-12137-s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-108138-l`+e/4.223+` -`+e+`c4,-6.7,10,-10,18,-10 H40000039-v`+(40+e)+`H1014.640-s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,118541-c-2,6,-10,9,-24,942-c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+` `+t+`43-h400000v`+(40+e)+`h-400000z`},Bee=function(e,t){return`M473,`+(2713+e+t)+`44-c339.3,-1799.3,509.3,-2700,510,-2702 l`+e/5.298+` -`+e+`45-c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+e)+`H1017.746-s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,947-c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-120048-c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-2649-s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,50-606zM`+(1001+e)+` `+t+`h400000v`+(40+e)+`H1017.7z`},Vee=function(e){var t=e/2;return`M400000 `+e+` H0 L`+t+` 0 l65 45 L145 `+(e-80)+` H400000z`},Hee=function(e,t,n){var r=n-54-t-e;return`M702 `+(e+t)+`H400000`+(40+e)+`51-H742v`+r+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 152-h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 17053-c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.66754-219 661 l218 661zM702 `+t+`H400000v`+(40+e)+`H742z`},Uee=function(e,t,n){t=1e3*t;var r=``;switch(e){case`sqrtMain`:r=Iee(t,Hn);break;case`sqrtSize1`:r=Lee(t,Hn);break;case`sqrtSize2`:r=Ree(t,Hn);break;case`sqrtSize3`:r=zee(t,Hn);break;case`sqrtSize4`:r=Bee(t,Hn);break;case`sqrtTall`:r=Hee(t,Hn,n)}return r},Wee=function(e,t){switch(e){case`⎜`:return Vn(`M291 0 H417 V`+t+` H291z`);case`∣`:return Vn(`M145 0 H188 V`+t+` H145z`);case`∥`:return Vn(`M145 0 H188 V`+t+` H145z`)+Vn(`M367 0 H410 V`+t+` H367z`);case`⎟`:return Vn(`M457 0 H583 V`+t+` H457z`);case`⎢`:return Vn(`M319 0 H403 V`+t+` H319z`);case`⎥`:return Vn(`M263 0 H347 V`+t+` H263z`);case`⎪`:return Vn(`M384 0 H504 V`+t+` H384z`);case`⏐`:return Vn(`M312 0 H355 V`+t+` H312z`);case`‖`:return Vn(`M257 0 H300 V`+t+` H257z`)+Vn(`M478 0 H521 V`+t+` H478z`);default:return``}},Un={doubleleftarrow:`M262 15755-l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.356- 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-2857- 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.558-c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.559- 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-8760--86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.761--2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z62-m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l63--10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.564- 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 8865--33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-6866--17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-1867--13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h39978268-c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.369--107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-12070- 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.871--5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 24772-c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 20873- 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.374- 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-20275- l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 11776--45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.777- 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 1378- 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.68879- 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.780--331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 8081-H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 082- 435 0h399565z`,leftgroupunder:`M400000 26283-H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 21984- 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.385--3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 586--18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.787--196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.588- 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.389--4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.790--10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z91-m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.33392- 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 593- 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.66794--152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 1295- 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.796--2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 097-v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.598--83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.399--68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21100- 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Vn(`M40 281 V428 H0 V94 H40 V241 H400000 v40z`),leftbracketunder:Vn(`M0 0 h120 V290 H399995 v120 H0z`),leftbracketover:Vn(`M0 440 h120 V150 H399995 v-120 H0z`),leftmapsto:Vn(`M40 281 V448H0V74H40V241H400000v40z`),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23101--.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8102-c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3103- 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Vn(`M0 50 h400000 v40H0z m0 194h40000v40H0z`),midbrace:`M200428 334104-c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14105--53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7106- 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11107- 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214108-c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14109- 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3110- 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0111--5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6112--320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z113-m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8114-60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8115--451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z116-m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2117-c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6118--480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z119-m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0120-85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8121--707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z122-m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1123-c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128124--16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20125- 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7126- 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85127--40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5128--12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67129- 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l130--6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5131-s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1132-c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3133- 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237134--174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0135- 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18136- 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3137--3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2138--10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58139- 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11140--18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7141- 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z142-m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8143- 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5144--7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95145--27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8146- 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3147- 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3148--64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z149-m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3150- 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0151--13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21152- 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Vn(`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`),rightbracketunder:Vn(`M399995 0 h-120 V290 H0 v120 H400000z`),rightbracketover:Vn(`M399995 440 h-120 V150 H0 v-120 H399995z`),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23153- 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32154--52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142155--167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40156- 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69157--70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3158--40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19159--37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101160- 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167161-c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3162- 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42163- 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333164--19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70165- 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7166--2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0167- 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0168- 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128169--68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418170--8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9171- 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114172-c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751173- 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457174--11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0175- 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697176- 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696177- -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345178--11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409179- 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9180- 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409181- -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5182-3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11183-10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63184--1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1185--7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59186-H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359187-c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22188-c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10189--11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10190--11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10191--11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,192--5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,193--11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,194--11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,195--11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202196-c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5197-c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130198-s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47199-121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6200-s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11201-c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z202-M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32203--27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0204-13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39205--84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5206--119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5207--12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67208-151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11209-c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17210-c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21211-c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40212-c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z213-M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0214-c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,215--231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6216-c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z217-M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11218-c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,219-1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,220--152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z221-M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0222-c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,223--231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6224-c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z225-M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Gee=function(e,t){switch(e){case`lbrack`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v1759 v84 h347 v-84226-H403z M403 1759 V0 H319 V1759 v`+t+` v1759 v84 h84z`;case`rbrack`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v1759 H0 v84 H347z227-M347 1759 V0 H263 V1759 v`+t+` v1759 h84z`;case`vert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15228-c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15229-c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z`;case`doublevert`:return`M145 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15230-c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15231-c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+t+` v585 h43z232-M367 15 v585 v`+t+` v585 c2.667,10,9.667,15,21,15233-c10,0,16.667,-5,20,-15 v-585 v`+-t+` v-585 c-2.667,-10,-9.667,-15,-21,-15234-c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+t+` v585 h43z`;case`lfloor`:return`M319 602 V0 H403 V602 v`+t+` v1715 h263 v84 H319z235-MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`rfloor`:return`M319 602 V0 H403 V602 v`+t+` v1799 H0 v-84 H319z236-MM319 602 V0 H403 V602 v`+t+` v1715 H319z`;case`lceil`:return`M403 1759 V84 H666 V0 H319 V1759 v`+t+` v602 h84z237-M403 1759 V0 H319 V1759 v`+t+` v602 h84z`;case`rceil`:return`M347 1759 V0 H0 V84 H263 V1759 v`+t+` v602 h84z238-M347 1759 V0 h-84 V1759 v`+t+` v602 h84z`;case`lparen`:return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1239-c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,240--36,557 l0,`+(t+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,241-949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9242-c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,243--544.7,-112.5,-882c-2,-104,-3,-167,-3,-189244-l0,-`+(t+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,245--210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case`rparen`:return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,246-63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5247-c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(t+9)+`248-c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664249-c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11250-c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17251-c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558252-l0,-`+(t+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,253--470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw Error(`Unknown stretchy delimiter.`)}},Wn=class{constructor(e){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=e,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(e){return this.classes.includes(e)}toNode(){for(var e=document.createDocumentFragment(),t=0;t<this.children.length;t++)e.appendChild(this.children[t].toNode());return e}toMarkup(){for(var e=``,t=0;t<this.children.length;t++)e+=this.children[t].toMarkup();return e}toText(){return this.children.map(e=>{if(bee(e))return e.toText();throw Error(`Expected MathDomNode with toText, got `+e.constructor.name)}).join(``)}},Gn={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Kee={ex:!0,em:!0,mu:!0},Kn=function(e){return typeof e!=`string`&&(e=e.unit),e in Gn||e in Kee||e===`ex`},qn=function(e,t){var n;if(e.unit in Gn)n=Gn[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if(e.unit===`mu`)n=t.fontMetrics().cssEmPerMu;else{var r=t.style.isTight()?t.havingStyle(t.style.text()):t;if(e.unit===`ex`)n=r.fontMetrics().xHeight;else if(e.unit===`em`)n=r.fontMetrics().quad;else throw new Sn(`Invalid unit: '`+e.unit+`'`);r!==t&&(n*=r.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*n,t.maxSize)},Jn=function(e){return+e.toFixed(4)+`em`},Yn=function(e){return e.filter(e=>e).join(` `)},Xn=function(e){var t=``;for(var n of Object.keys(e)){var r=e[n];r!==void 0&&(t+=Tee(n)+`:`+r+`;`)}return t},Zn=function(e,t,n){if(this.classes=e||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=n||{},t){t.style.isTight()&&this.classes.push(`mtight`);var r=t.getColor();r&&(this.style.color=r)}},Qn=function(e){var t=document.createElement(e);t.className=Yn(this.classes),Object.assign(t.style,this.style);for(var n of Object.keys(this.attributes))t.setAttribute(n,this.attributes[n]);for(var r=0;r<this.children.length;r++)t.appendChild(this.children[r].toNode());return t},qee=/[\s"'>/=\x00-\x1f]/,$n=function(e){var t=`<`+e;this.classes.length&&(t+=` class="`+Cn(Yn(this.classes))+`"`);var n=Xn(this.style);n&&(t+=` style="`+Cn(n)+`"`);for(var r of Object.keys(this.attributes)){if(qee.test(r))throw new Sn(`Invalid attribute name '`+r+`'`);t+=` `+r+`="`+Cn(this.attributes[r])+`"`}t+=`>`;for(var i=0;i<this.children.length;i++)t+=this.children[i].toMarkup();return t+=`</`+e+`>`,t},er=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,this.italic=void 0,Zn.call(this,e,n,r),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Qn.call(this,`span`)}toMarkup(){return $n.call(this,`span`)}},tr=class{constructor(e,t,n,r){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Zn.call(this,t,r),this.children=n||[],this.setAttribute(`href`,e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return this.classes.includes(e)}toNode(){return Qn.call(this,`a`)}toMarkup(){return $n.call(this,`a`)}},Jee=class{constructor(e,t,n){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=t,this.src=e,this.classes=[`mord`],this.height=0,this.depth=0,this.maxFontSize=0,this.style=n}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createElement(`img`);return e.src=this.src,e.alt=this.alt,e.className=`mord`,Object.assign(e.style,this.style),e}toMarkup(){var e=`<img src="`+Cn(this.src)+`"`+(` alt="`+Cn(this.alt)+`"`),t=Xn(this.style);return t&&(e+=` style="`+Cn(t)+`"`),e+=`'/>`,e}},Yee={î:`ı̂`,ï:`ı̈`,í:`ı́`,ì:`ı̀`},nr=class{constructor(e,t,n,r,i,a,o,s){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=e,this.height=t||0,this.depth=n||0,this.italic=r||0,this.skew=i||0,this.width=a||0,this.classes=o||[],this.style=s||{},this.maxFontSize=0;var l=yee(this.text.charCodeAt(0));l&&this.classes.push(l+`_fallback`),/[îïíì]/.test(this.text)&&(this.text=Yee[this.text])}hasClass(e){return this.classes.includes(e)}toNode(){var e=document.createTextNode(this.text),t=null;return this.italic>0&&(t=document.createElement(`span`),t.style.marginRight=Jn(this.italic)),this.classes.length>0&&(t||=document.createElement(`span`),t.className=Yn(this.classes)),Object.keys(this.style).length>0&&(t||=document.createElement(`span`),Object.assign(t.style,this.style)),t?(t.appendChild(e),t):e}toMarkup(){var e=!1,t=`<span`;this.classes.length&&(e=!0,t+=` class="`,t+=Cn(Yn(this.classes)),t+=`"`);var n=``;this.italic>0&&(n+=`margin-right:`+Jn(this.italic)+`;`),n+=Xn(this.style),n&&(e=!0,t+=` style="`+Cn(n)+`"`);var r=Cn(this.text);return e?(t+=`>`,t+=r,t+=`</span>`,t):r}},rr=class{constructor(e,t){this.children=void 0,this.attributes=void 0,this.children=e||[],this.attributes=t||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);for(var n=0;n<this.children.length;n++)e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<svg xmlns="http://www.w3.org/2000/svg"`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Cn(this.attributes[t])+`"`;e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</svg>`,e}},ir=class{constructor(e,t){this.pathName=void 0,this.alternate=void 0,this.pathName=e,this.alternate=t}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return this.alternate?e.setAttribute(`d`,this.alternate):e.setAttribute(`d`,Un[this.pathName]),e}toMarkup(){return this.alternate?`<path d="`+Cn(this.alternate)+`"/>`:`<path d="`+Cn(Un[this.pathName])+`"/>`}},ar=class{constructor(e){this.attributes=void 0,this.attributes=e||{}}toNode(){var e=document.createElementNS(`http://www.w3.org/2000/svg`,`line`);for(var t of Object.keys(this.attributes))e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var e=`<line`;for(var t of Object.keys(this.attributes))e+=` `+t+`="`+Cn(this.attributes[t])+`"`;return e+=`/>`,e}},Xee=e=>e instanceof er||e instanceof tr||e instanceof Wn,or={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},sr={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},cr={Å:`A`,Ð:`D`,Þ:`o`,å:`a`,ð:`d`,þ:`o`,А:`A`,Б:`B`,В:`B`,Г:`F`,Д:`A`,Е:`E`,Ж:`K`,З:`3`,И:`N`,Й:`N`,К:`K`,Л:`N`,М:`M`,Н:`H`,О:`O`,П:`N`,Р:`P`,С:`C`,Т:`T`,У:`y`,Ф:`O`,Х:`X`,Ц:`U`,Ч:`h`,Ш:`W`,Щ:`W`,Ъ:`B`,Ы:`X`,Ь:`B`,Э:`3`,Ю:`X`,Я:`R`,а:`a`,б:`b`,в:`a`,г:`r`,д:`y`,е:`e`,ж:`m`,з:`e`,и:`n`,й:`n`,к:`n`,л:`n`,м:`m`,н:`n`,о:`o`,п:`n`,р:`p`,с:`c`,т:`o`,у:`y`,ф:`b`,х:`x`,ц:`n`,ч:`n`,ш:`w`,щ:`w`,ъ:`a`,ы:`m`,ь:`a`,э:`e`,ю:`m`,я:`r`},lr={},ur={math:{},text:{}},K=`math`,dr=`text`,q=`main`,J=`ams`,fr=`accent-token`,pr=`bin`,mr=`close`,hr=`inner`,gr=`mathord`,_r=`op-token`,vr=`open`,yr=`punct`,Y=`rel`,br=`spacing`,X=`textord`,W(K,q,Y,`≡`,`\\equiv`,!0),W(K,q,Y,`≺`,`\\prec`,!0),W(K,q,Y,`≻`,`\\succ`,!0),W(K,q,Y,`∼`,`\\sim`,!0),W(K,q,Y,`⊥`,`\\perp`),W(K,q,Y,`⪯`,`\\preceq`,!0),W(K,q,Y,`⪰`,`\\succeq`,!0),W(K,q,Y,`≃`,`\\simeq`,!0),W(K,q,Y,`∣`,`\\mid`,!0),W(K,q,Y,`≪`,`\\ll`,!0),W(K,q,Y,`≫`,`\\gg`,!0),W(K,q,Y,`≍`,`\\asymp`,!0),W(K,q,Y,`∥`,`\\parallel`),W(K,q,Y,`⋈`,`\\bowtie`,!0),W(K,q,Y,`⌣`,`\\smile`,!0),W(K,q,Y,`⊑`,`\\sqsubseteq`,!0),W(K,q,Y,`⊒`,`\\sqsupseteq`,!0),W(K,q,Y,`≐`,`\\doteq`,!0),W(K,q,Y,`⌢`,`\\frown`,!0),W(K,q,Y,`∋`,`\\ni`,!0),W(K,q,Y,`∝`,`\\propto`,!0),W(K,q,Y,`⊢`,`\\vdash`,!0),W(K,q,Y,`⊣`,`\\dashv`,!0),W(K,q,Y,`∋`,`\\owns`),W(K,q,yr,`.`,`\\ldotp`),W(K,q,yr,`⋅`,`\\cdotp`),W(K,q,yr,`⋅`,`·`),W(dr,q,X,`⋅`,`·`),W(K,q,X,`#`,`\\#`),W(dr,q,X,`#`,`\\#`),W(K,q,X,`&`,`\\&`),W(dr,q,X,`&`,`\\&`),W(K,q,X,`ℵ`,`\\aleph`,!0),W(K,q,X,`∀`,`\\forall`,!0),W(K,q,X,`ℏ`,`\\hbar`,!0),W(K,q,X,`∃`,`\\exists`,!0),W(K,q,X,`∇`,`\\nabla`,!0),W(K,q,X,`♭`,`\\flat`,!0),W(K,q,X,`ℓ`,`\\ell`,!0),W(K,q,X,`♮`,`\\natural`,!0),W(K,q,X,`♣`,`\\clubsuit`,!0),W(K,q,X,`℘`,`\\wp`,!0),W(K,q,X,`♯`,`\\sharp`,!0),W(K,q,X,`♢`,`\\diamondsuit`,!0),W(K,q,X,`ℜ`,`\\Re`,!0),W(K,q,X,`♡`,`\\heartsuit`,!0),W(K,q,X,`ℑ`,`\\Im`,!0),W(K,q,X,`♠`,`\\spadesuit`,!0),W(K,q,X,`§`,`\\S`,!0),W(dr,q,X,`§`,`\\S`),W(K,q,X,`¶`,`\\P`,!0),W(dr,q,X,`¶`,`\\P`),W(K,q,X,`†`,`\\dag`),W(dr,q,X,`†`,`\\dag`),W(dr,q,X,`†`,`\\textdagger`),W(K,q,X,`‡`,`\\ddag`),W(dr,q,X,`‡`,`\\ddag`),W(dr,q,X,`‡`,`\\textdaggerdbl`),W(K,q,mr,`⎱`,`\\rmoustache`,!0),W(K,q,vr,`⎰`,`\\lmoustache`,!0),W(K,q,mr,`⟯`,`\\rgroup`,!0),W(K,q,vr,`⟮`,`\\lgroup`,!0),W(K,q,pr,`∓`,`\\mp`,!0),W(K,q,pr,`⊖`,`\\ominus`,!0),W(K,q,pr,`⊎`,`\\uplus`,!0),W(K,q,pr,`⊓`,`\\sqcap`,!0),W(K,q,pr,`∗`,`\\ast`),W(K,q,pr,`⊔`,`\\sqcup`,!0),W(K,q,pr,`◯`,`\\bigcirc`,!0),W(K,q,pr,`∙`,`\\bullet`,!0),W(K,q,pr,`‡`,`\\ddagger`),W(K,q,pr,`≀`,`\\wr`,!0),W(K,q,pr,`⨿`,`\\amalg`),W(K,q,pr,`&`,`\\And`),W(K,q,Y,`⟵`,`\\longleftarrow`,!0),W(K,q,Y,`⇐`,`\\Leftarrow`,!0),W(K,q,Y,`⟸`,`\\Longleftarrow`,!0),W(K,q,Y,`⟶`,`\\longrightarrow`,!0),W(K,q,Y,`⇒`,`\\Rightarrow`,!0),W(K,q,Y,`⟹`,`\\Longrightarrow`,!0),W(K,q,Y,`↔`,`\\leftrightarrow`,!0),W(K,q,Y,`⟷`,`\\longleftrightarrow`,!0),W(K,q,Y,`⇔`,`\\Leftrightarrow`,!0),W(K,q,Y,`⟺`,`\\Longleftrightarrow`,!0),W(K,q,Y,`↦`,`\\mapsto`,!0),W(K,q,Y,`⟼`,`\\longmapsto`,!0),W(K,q,Y,`↗`,`\\nearrow`,!0),W(K,q,Y,`↩`,`\\hookleftarrow`,!0),W(K,q,Y,`↪`,`\\hookrightarrow`,!0),W(K,q,Y,`↘`,`\\searrow`,!0),W(K,q,Y,`↼`,`\\leftharpoonup`,!0),W(K,q,Y,`⇀`,`\\rightharpoonup`,!0),W(K,q,Y,`↙`,`\\swarrow`,!0),W(K,q,Y,`↽`,`\\leftharpoondown`,!0),W(K,q,Y,`⇁`,`\\rightharpoondown`,!0),W(K,q,Y,`↖`,`\\nwarrow`,!0),W(K,q,Y,`⇌`,`\\rightleftharpoons`,!0),W(K,J,Y,`≮`,`\\nless`,!0),W(K,J,Y,``,`\\@nleqslant`),W(K,J,Y,``,`\\@nleqq`),W(K,J,Y,`⪇`,`\\lneq`,!0),W(K,J,Y,`≨`,`\\lneqq`,!0),W(K,J,Y,``,`\\@lvertneqq`),W(K,J,Y,`⋦`,`\\lnsim`,!0),W(K,J,Y,`⪉`,`\\lnapprox`,!0),W(K,J,Y,`⊀`,`\\nprec`,!0),W(K,J,Y,`⋠`,`\\npreceq`,!0),W(K,J,Y,`⋨`,`\\precnsim`,!0),W(K,J,Y,`⪹`,`\\precnapprox`,!0),W(K,J,Y,`≁`,`\\nsim`,!0),W(K,J,Y,``,`\\@nshortmid`),W(K,J,Y,`∤`,`\\nmid`,!0),W(K,J,Y,`⊬`,`\\nvdash`,!0),W(K,J,Y,`⊭`,`\\nvDash`,!0),W(K,J,Y,`⋪`,`\\ntriangleleft`),W(K,J,Y,`⋬`,`\\ntrianglelefteq`,!0),W(K,J,Y,`⊊`,`\\subsetneq`,!0),W(K,J,Y,``,`\\@varsubsetneq`),W(K,J,Y,`⫋`,`\\subsetneqq`,!0),W(K,J,Y,``,`\\@varsubsetneqq`),W(K,J,Y,`≯`,`\\ngtr`,!0),W(K,J,Y,``,`\\@ngeqslant`),W(K,J,Y,``,`\\@ngeqq`),W(K,J,Y,`⪈`,`\\gneq`,!0),W(K,J,Y,`≩`,`\\gneqq`,!0),W(K,J,Y,``,`\\@gvertneqq`),W(K,J,Y,`⋧`,`\\gnsim`,!0),W(K,J,Y,`⪊`,`\\gnapprox`,!0),W(K,J,Y,`⊁`,`\\nsucc`,!0),W(K,J,Y,`⋡`,`\\nsucceq`,!0),W(K,J,Y,`⋩`,`\\succnsim`,!0),W(K,J,Y,`⪺`,`\\succnapprox`,!0),W(K,J,Y,`≆`,`\\ncong`,!0),W(K,J,Y,``,`\\@nshortparallel`),W(K,J,Y,`∦`,`\\nparallel`,!0),W(K,J,Y,`⊯`,`\\nVDash`,!0),W(K,J,Y,`⋫`,`\\ntriangleright`),W(K,J,Y,`⋭`,`\\ntrianglerighteq`,!0),W(K,J,Y,``,`\\@nsupseteqq`),W(K,J,Y,`⊋`,`\\supsetneq`,!0),W(K,J,Y,``,`\\@varsupsetneq`),W(K,J,Y,`⫌`,`\\supsetneqq`,!0),W(K,J,Y,``,`\\@varsupsetneqq`),W(K,J,Y,`⊮`,`\\nVdash`,!0),W(K,J,Y,`⪵`,`\\precneqq`,!0),W(K,J,Y,`⪶`,`\\succneqq`,!0),W(K,J,Y,``,`\\@nsubseteqq`),W(K,J,pr,`⊴`,`\\unlhd`),W(K,J,pr,`⊵`,`\\unrhd`),W(K,J,Y,`↚`,`\\nleftarrow`,!0),W(K,J,Y,`↛`,`\\nrightarrow`,!0),W(K,J,Y,`⇍`,`\\nLeftarrow`,!0),W(K,J,Y,`⇏`,`\\nRightarrow`,!0),W(K,J,Y,`↮`,`\\nleftrightarrow`,!0),W(K,J,Y,`⇎`,`\\nLeftrightarrow`,!0),W(K,J,Y,`△`,`\\vartriangle`),W(K,J,X,`ℏ`,`\\hslash`),W(K,J,X,`▽`,`\\triangledown`),W(K,J,X,`◊`,`\\lozenge`),W(K,J,X,`Ⓢ`,`\\circledS`),W(K,J,X,`®`,`\\circledR`),W(dr,J,X,`®`,`\\circledR`),W(K,J,X,`∡`,`\\measuredangle`,!0),W(K,J,X,`∄`,`\\nexists`),W(K,J,X,`℧`,`\\mho`),W(K,J,X,`Ⅎ`,`\\Finv`,!0),W(K,J,X,`⅁`,`\\Game`,!0),W(K,J,X,`‵`,`\\backprime`),W(K,J,X,`▲`,`\\blacktriangle`),W(K,J,X,`▼`,`\\blacktriangledown`),W(K,J,X,`■`,`\\blacksquare`),W(K,J,X,`⧫`,`\\blacklozenge`),W(K,J,X,`★`,`\\bigstar`),W(K,J,X,`∢`,`\\sphericalangle`,!0),W(K,J,X,`∁`,`\\complement`,!0),W(K,J,X,`ð`,`\\eth`,!0),W(dr,q,X,`ð`,`ð`),W(K,J,X,`╱`,`\\diagup`),W(K,J,X,`╲`,`\\diagdown`),W(K,J,X,`□`,`\\square`),W(K,J,X,`□`,`\\Box`),W(K,J,X,`◊`,`\\Diamond`),W(K,J,X,`¥`,`\\yen`,!0),W(dr,J,X,`¥`,`\\yen`,!0),W(K,J,X,`✓`,`\\checkmark`,!0),W(dr,J,X,`✓`,`\\checkmark`),W(K,J,X,`ℶ`,`\\beth`,!0),W(K,J,X,`ℸ`,`\\daleth`,!0),W(K,J,X,`ℷ`,`\\gimel`,!0),W(K,J,X,`ϝ`,`\\digamma`,!0),W(K,J,X,`ϰ`,`\\varkappa`),W(K,J,vr,`┌`,`\\@ulcorner`,!0),W(K,J,mr,`┐`,`\\@urcorner`,!0),W(K,J,vr,`└`,`\\@llcorner`,!0),W(K,J,mr,`┘`,`\\@lrcorner`,!0),W(K,J,Y,`≦`,`\\leqq`,!0),W(K,J,Y,`⩽`,`\\leqslant`,!0),W(K,J,Y,`⪕`,`\\eqslantless`,!0),W(K,J,Y,`≲`,`\\lesssim`,!0),W(K,J,Y,`⪅`,`\\lessapprox`,!0),W(K,J,Y,`≊`,`\\approxeq`,!0),W(K,J,pr,`⋖`,`\\lessdot`),W(K,J,Y,`⋘`,`\\lll`,!0),W(K,J,Y,`≶`,`\\lessgtr`,!0),W(K,J,Y,`⋚`,`\\lesseqgtr`,!0),W(K,J,Y,`⪋`,`\\lesseqqgtr`,!0),W(K,J,Y,`≑`,`\\doteqdot`),W(K,J,Y,`≓`,`\\risingdotseq`,!0),W(K,J,Y,`≒`,`\\fallingdotseq`,!0),W(K,J,Y,`∽`,`\\backsim`,!0),W(K,J,Y,`⋍`,`\\backsimeq`,!0),W(K,J,Y,`⫅`,`\\subseteqq`,!0),W(K,J,Y,`⋐`,`\\Subset`,!0),W(K,J,Y,`⊏`,`\\sqsubset`,!0),W(K,J,Y,`≼`,`\\preccurlyeq`,!0),W(K,J,Y,`⋞`,`\\curlyeqprec`,!0),W(K,J,Y,`≾`,`\\precsim`,!0),W(K,J,Y,`⪷`,`\\precapprox`,!0),W(K,J,Y,`⊲`,`\\vartriangleleft`),W(K,J,Y,`⊴`,`\\trianglelefteq`),W(K,J,Y,`⊨`,`\\vDash`,!0),W(K,J,Y,`⊪`,`\\Vvdash`,!0),W(K,J,Y,`⌣`,`\\smallsmile`),W(K,J,Y,`⌢`,`\\smallfrown`),W(K,J,Y,`≏`,`\\bumpeq`,!0),W(K,J,Y,`≎`,`\\Bumpeq`,!0),W(K,J,Y,`≧`,`\\geqq`,!0),W(K,J,Y,`⩾`,`\\geqslant`,!0),W(K,J,Y,`⪖`,`\\eqslantgtr`,!0),W(K,J,Y,`≳`,`\\gtrsim`,!0),W(K,J,Y,`⪆`,`\\gtrapprox`,!0),W(K,J,pr,`⋗`,`\\gtrdot`),W(K,J,Y,`⋙`,`\\ggg`,!0),W(K,J,Y,`≷`,`\\gtrless`,!0),W(K,J,Y,`⋛`,`\\gtreqless`,!0),W(K,J,Y,`⪌`,`\\gtreqqless`,!0),W(K,J,Y,`≖`,`\\eqcirc`,!0),W(K,J,Y,`≗`,`\\circeq`,!0),W(K,J,Y,`≜`,`\\triangleq`,!0),W(K,J,Y,`∼`,`\\thicksim`),W(K,J,Y,`≈`,`\\thickapprox`),W(K,J,Y,`⫆`,`\\supseteqq`,!0),W(K,J,Y,`⋑`,`\\Supset`,!0),W(K,J,Y,`⊐`,`\\sqsupset`,!0),W(K,J,Y,`≽`,`\\succcurlyeq`,!0),W(K,J,Y,`⋟`,`\\curlyeqsucc`,!0),W(K,J,Y,`≿`,`\\succsim`,!0),W(K,J,Y,`⪸`,`\\succapprox`,!0),W(K,J,Y,`⊳`,`\\vartriangleright`),W(K,J,Y,`⊵`,`\\trianglerighteq`),W(K,J,Y,`⊩`,`\\Vdash`,!0),W(K,J,Y,`∣`,`\\shortmid`),W(K,J,Y,`∥`,`\\shortparallel`),W(K,J,Y,`≬`,`\\between`,!0),W(K,J,Y,`⋔`,`\\pitchfork`,!0),W(K,J,Y,`∝`,`\\varpropto`),W(K,J,Y,`◀`,`\\blacktriangleleft`),W(K,J,Y,`∴`,`\\therefore`,!0),W(K,J,Y,`∍`,`\\backepsilon`),W(K,J,Y,`▶`,`\\blacktriangleright`),W(K,J,Y,`∵`,`\\because`,!0),W(K,J,Y,`⋘`,`\\llless`),W(K,J,Y,`⋙`,`\\gggtr`),W(K,J,pr,`⊲`,`\\lhd`),W(K,J,pr,`⊳`,`\\rhd`),W(K,J,Y,`≂`,`\\eqsim`,!0),W(K,q,Y,`⋈`,`\\Join`),W(K,J,Y,`≑`,`\\Doteq`,!0),W(K,J,pr,`∔`,`\\dotplus`,!0),W(K,J,pr,`∖`,`\\smallsetminus`),W(K,J,pr,`⋒`,`\\Cap`,!0),W(K,J,pr,`⋓`,`\\Cup`,!0),W(K,J,pr,`⩞`,`\\doublebarwedge`,!0),W(K,J,pr,`⊟`,`\\boxminus`,!0),W(K,J,pr,`⊞`,`\\boxplus`,!0),W(K,J,pr,`⋇`,`\\divideontimes`,!0),W(K,J,pr,`⋉`,`\\ltimes`,!0),W(K,J,pr,`⋊`,`\\rtimes`,!0),W(K,J,pr,`⋋`,`\\leftthreetimes`,!0),W(K,J,pr,`⋌`,`\\rightthreetimes`,!0),W(K,J,pr,`⋏`,`\\curlywedge`,!0),W(K,J,pr,`⋎`,`\\curlyvee`,!0),W(K,J,pr,`⊝`,`\\circleddash`,!0),W(K,J,pr,`⊛`,`\\circledast`,!0),W(K,J,pr,`⋅`,`\\centerdot`),W(K,J,pr,`⊺`,`\\intercal`,!0),W(K,J,pr,`⋒`,`\\doublecap`),W(K,J,pr,`⋓`,`\\doublecup`),W(K,J,pr,`⊠`,`\\boxtimes`,!0),W(K,J,Y,`⇢`,`\\dashrightarrow`,!0),W(K,J,Y,`⇠`,`\\dashleftarrow`,!0),W(K,J,Y,`⇇`,`\\leftleftarrows`,!0),W(K,J,Y,`⇆`,`\\leftrightarrows`,!0),W(K,J,Y,`⇚`,`\\Lleftarrow`,!0),W(K,J,Y,`↞`,`\\twoheadleftarrow`,!0),W(K,J,Y,`↢`,`\\leftarrowtail`,!0),W(K,J,Y,`↫`,`\\looparrowleft`,!0),W(K,J,Y,`⇋`,`\\leftrightharpoons`,!0),W(K,J,Y,`↶`,`\\curvearrowleft`,!0),W(K,J,Y,`↺`,`\\circlearrowleft`,!0),W(K,J,Y,`↰`,`\\Lsh`,!0),W(K,J,Y,`⇈`,`\\upuparrows`,!0),W(K,J,Y,`↿`,`\\upharpoonleft`,!0),W(K,J,Y,`⇃`,`\\downharpoonleft`,!0),W(K,q,Y,`⊶`,`\\origof`,!0),W(K,q,Y,`⊷`,`\\imageof`,!0),W(K,J,Y,`⊸`,`\\multimap`,!0),W(K,J,Y,`↭`,`\\leftrightsquigarrow`,!0),W(K,J,Y,`⇉`,`\\rightrightarrows`,!0),W(K,J,Y,`⇄`,`\\rightleftarrows`,!0),W(K,J,Y,`↠`,`\\twoheadrightarrow`,!0),W(K,J,Y,`↣`,`\\rightarrowtail`,!0),W(K,J,Y,`↬`,`\\looparrowright`,!0),W(K,J,Y,`↷`,`\\curvearrowright`,!0),W(K,J,Y,`↻`,`\\circlearrowright`,!0),W(K,J,Y,`↱`,`\\Rsh`,!0),W(K,J,Y,`⇊`,`\\downdownarrows`,!0),W(K,J,Y,`↾`,`\\upharpoonright`,!0),W(K,J,Y,`⇂`,`\\downharpoonright`,!0),W(K,J,Y,`⇝`,`\\rightsquigarrow`,!0),W(K,J,Y,`⇝`,`\\leadsto`),W(K,J,Y,`⇛`,`\\Rrightarrow`,!0),W(K,J,Y,`↾`,`\\restriction`),W(K,q,X,`‘`,"`"),W(K,q,X,`$`,`\\$`),W(dr,q,X,`$`,`\\$`),W(dr,q,X,`$`,`\\textdollar`),W(K,q,X,`%`,`\\%`),W(dr,q,X,`%`,`\\%`),W(K,q,X,`_`,`\\_`),W(dr,q,X,`_`,`\\_`),W(dr,q,X,`_`,`\\textunderscore`),W(K,q,X,`∠`,`\\angle`,!0),W(K,q,X,`∞`,`\\infty`,!0),W(K,q,X,`′`,`\\prime`),W(K,q,X,`△`,`\\triangle`),W(K,q,X,`Γ`,`\\Gamma`,!0),W(K,q,X,`Δ`,`\\Delta`,!0),W(K,q,X,`Θ`,`\\Theta`,!0),W(K,q,X,`Λ`,`\\Lambda`,!0),W(K,q,X,`Ξ`,`\\Xi`,!0),W(K,q,X,`Π`,`\\Pi`,!0),W(K,q,X,`Σ`,`\\Sigma`,!0),W(K,q,X,`Υ`,`\\Upsilon`,!0),W(K,q,X,`Φ`,`\\Phi`,!0),W(K,q,X,`Ψ`,`\\Psi`,!0),W(K,q,X,`Ω`,`\\Omega`,!0),W(K,q,X,`A`,`Α`),W(K,q,X,`B`,`Β`),W(K,q,X,`E`,`Ε`),W(K,q,X,`Z`,`Ζ`),W(K,q,X,`H`,`Η`),W(K,q,X,`I`,`Ι`),W(K,q,X,`K`,`Κ`),W(K,q,X,`M`,`Μ`),W(K,q,X,`N`,`Ν`),W(K,q,X,`O`,`Ο`),W(K,q,X,`P`,`Ρ`),W(K,q,X,`T`,`Τ`),W(K,q,X,`X`,`Χ`),W(K,q,X,`¬`,`\\neg`,!0),W(K,q,X,`¬`,`\\lnot`),W(K,q,X,`⊤`,`\\top`),W(K,q,X,`⊥`,`\\bot`),W(K,q,X,`∅`,`\\emptyset`),W(K,J,X,`∅`,`\\varnothing`),W(K,q,gr,`α`,`\\alpha`,!0),W(K,q,gr,`β`,`\\beta`,!0),W(K,q,gr,`γ`,`\\gamma`,!0),W(K,q,gr,`δ`,`\\delta`,!0),W(K,q,gr,`ϵ`,`\\epsilon`,!0),W(K,q,gr,`ζ`,`\\zeta`,!0),W(K,q,gr,`η`,`\\eta`,!0),W(K,q,gr,`θ`,`\\theta`,!0),W(K,q,gr,`ι`,`\\iota`,!0),W(K,q,gr,`κ`,`\\kappa`,!0),W(K,q,gr,`λ`,`\\lambda`,!0),W(K,q,gr,`μ`,`\\mu`,!0),W(K,q,gr,`ν`,`\\nu`,!0),W(K,q,gr,`ξ`,`\\xi`,!0),W(K,q,gr,`ο`,`\\omicron`,!0),W(K,q,gr,`π`,`\\pi`,!0),W(K,q,gr,`ρ`,`\\rho`,!0),W(K,q,gr,`σ`,`\\sigma`,!0),W(K,q,gr,`τ`,`\\tau`,!0),W(K,q,gr,`υ`,`\\upsilon`,!0),W(K,q,gr,`ϕ`,`\\phi`,!0),W(K,q,gr,`χ`,`\\chi`,!0),W(K,q,gr,`ψ`,`\\psi`,!0),W(K,q,gr,`ω`,`\\omega`,!0),W(K,q,gr,`ε`,`\\varepsilon`,!0),W(K,q,gr,`ϑ`,`\\vartheta`,!0),W(K,q,gr,`ϖ`,`\\varpi`,!0),W(K,q,gr,`ϱ`,`\\varrho`,!0),W(K,q,gr,`ς`,`\\varsigma`,!0),W(K,q,gr,`φ`,`\\varphi`,!0),W(K,q,pr,`∗`,`*`,!0),W(K,q,pr,`+`,`+`),W(K,q,pr,`−`,`-`,!0),W(K,q,pr,`⋅`,`\\cdot`,!0),W(K,q,pr,`∘`,`\\circ`,!0),W(K,q,pr,`÷`,`\\div`,!0),W(K,q,pr,`±`,`\\pm`,!0),W(K,q,pr,`×`,`\\times`,!0),W(K,q,pr,`∩`,`\\cap`,!0),W(K,q,pr,`∪`,`\\cup`,!0),W(K,q,pr,`∖`,`\\setminus`,!0),W(K,q,pr,`∧`,`\\land`),W(K,q,pr,`∨`,`\\lor`),W(K,q,pr,`∧`,`\\wedge`,!0),W(K,q,pr,`∨`,`\\vee`,!0),W(K,q,X,`√`,`\\surd`),W(K,q,vr,`⟨`,`\\langle`,!0),W(K,q,vr,`∣`,`\\lvert`),W(K,q,vr,`∥`,`\\lVert`),W(K,q,mr,`?`,`?`),W(K,q,mr,`!`,`!`),W(K,q,mr,`⟩`,`\\rangle`,!0),W(K,q,mr,`∣`,`\\rvert`),W(K,q,mr,`∥`,`\\rVert`),W(K,q,Y,`=`,`=`),W(K,q,Y,`:`,`:`),W(K,q,Y,`≈`,`\\approx`,!0),W(K,q,Y,`≅`,`\\cong`,!0),W(K,q,Y,`≥`,`\\ge`),W(K,q,Y,`≥`,`\\geq`,!0),W(K,q,Y,`←`,`\\gets`),W(K,q,Y,`>`,`\\gt`,!0),W(K,q,Y,`∈`,`\\in`,!0),W(K,q,Y,``,`\\@not`),W(K,q,Y,`⊂`,`\\subset`,!0),W(K,q,Y,`⊃`,`\\supset`,!0),W(K,q,Y,`⊆`,`\\subseteq`,!0),W(K,q,Y,`⊇`,`\\supseteq`,!0),W(K,J,Y,`⊈`,`\\nsubseteq`,!0),W(K,J,Y,`⊉`,`\\nsupseteq`,!0),W(K,q,Y,`⊨`,`\\models`),W(K,q,Y,`←`,`\\leftarrow`,!0),W(K,q,Y,`≤`,`\\le`),W(K,q,Y,`≤`,`\\leq`,!0),W(K,q,Y,`<`,`\\lt`,!0),W(K,q,Y,`→`,`\\rightarrow`,!0),W(K,q,Y,`→`,`\\to`),W(K,J,Y,`≱`,`\\ngeq`,!0),W(K,J,Y,`≰`,`\\nleq`,!0),W(K,q,br,`\xA0`,`\\ `),W(K,q,br,`\xA0`,`\\space`),W(K,q,br,`\xA0`,`\\nobreakspace`),W(dr,q,br,`\xA0`,`\\ `),W(dr,q,br,`\xA0`,` `),W(dr,q,br,`\xA0`,`\\space`),W(dr,q,br,`\xA0`,`\\nobreakspace`),W(K,q,br,``,`\\nobreak`),W(K,q,br,``,`\\allowbreak`),W(K,q,yr,`,`,`,`),W(K,q,yr,`;`,`;`),W(K,J,pr,`⊼`,`\\barwedge`,!0),W(K,J,pr,`⊻`,`\\veebar`,!0),W(K,q,pr,`⊙`,`\\odot`,!0),W(K,q,pr,`⊕`,`\\oplus`,!0),W(K,q,pr,`⊗`,`\\otimes`,!0),W(K,q,X,`∂`,`\\partial`,!0),W(K,q,pr,`⊘`,`\\oslash`,!0),W(K,J,pr,`⊚`,`\\circledcirc`,!0),W(K,J,pr,`⊡`,`\\boxdot`,!0),W(K,q,pr,`△`,`\\bigtriangleup`),W(K,q,pr,`▽`,`\\bigtriangledown`),W(K,q,pr,`†`,`\\dagger`),W(K,q,pr,`⋄`,`\\diamond`),W(K,q,pr,`⋆`,`\\star`),W(K,q,pr,`◃`,`\\triangleleft`),W(K,q,pr,`▹`,`\\triangleright`),W(K,q,vr,`{`,`\\{`),W(dr,q,X,`{`,`\\{`),W(dr,q,X,`{`,`\\textbraceleft`),W(K,q,mr,`}`,`\\}`),W(dr,q,X,`}`,`\\}`),W(dr,q,X,`}`,`\\textbraceright`),W(K,q,vr,`{`,`\\lbrace`),W(K,q,mr,`}`,`\\rbrace`),W(K,q,vr,`[`,`\\lbrack`,!0),W(dr,q,X,`[`,`\\lbrack`,!0),W(K,q,mr,`]`,`\\rbrack`,!0),W(dr,q,X,`]`,`\\rbrack`,!0),W(K,q,vr,`(`,`\\lparen`,!0),W(K,q,mr,`)`,`\\rparen`,!0),W(dr,q,X,`<`,`\\textless`,!0),W(dr,q,X,`>`,`\\textgreater`,!0),W(K,q,vr,`⌊`,`\\lfloor`,!0),W(K,q,mr,`⌋`,`\\rfloor`,!0),W(K,q,vr,`⌈`,`\\lceil`,!0),W(K,q,mr,`⌉`,`\\rceil`,!0),W(K,q,X,`\\`,`\\backslash`),W(K,q,X,`∣`,`|`),W(K,q,X,`∣`,`\\vert`),W(dr,q,X,`|`,`\\textbar`,!0),W(K,q,X,`∥`,`\\|`),W(K,q,X,`∥`,`\\Vert`),W(dr,q,X,`∥`,`\\textbardbl`),W(dr,q,X,`~`,`\\textasciitilde`),W(dr,q,X,`\\`,`\\textbackslash`),W(dr,q,X,`^`,`\\textasciicircum`),W(K,q,Y,`↑`,`\\uparrow`,!0),W(K,q,Y,`⇑`,`\\Uparrow`,!0),W(K,q,Y,`↓`,`\\downarrow`,!0),W(K,q,Y,`⇓`,`\\Downarrow`,!0),W(K,q,Y,`↕`,`\\updownarrow`,!0),W(K,q,Y,`⇕`,`\\Updownarrow`,!0),W(K,q,_r,`∐`,`\\coprod`),W(K,q,_r,`⋁`,`\\bigvee`),W(K,q,_r,`⋀`,`\\bigwedge`),W(K,q,_r,`⨄`,`\\biguplus`),W(K,q,_r,`⋂`,`\\bigcap`),W(K,q,_r,`⋃`,`\\bigcup`),W(K,q,_r,`∫`,`\\int`),W(K,q,_r,`∫`,`\\intop`),W(K,q,_r,`∬`,`\\iint`),W(K,q,_r,`∭`,`\\iiint`),W(K,q,_r,`∏`,`\\prod`),W(K,q,_r,`∑`,`\\sum`),W(K,q,_r,`⨂`,`\\bigotimes`),W(K,q,_r,`⨁`,`\\bigoplus`),W(K,q,_r,`⨀`,`\\bigodot`),W(K,q,_r,`∮`,`\\oint`),W(K,q,_r,`∯`,`\\oiint`),W(K,q,_r,`∰`,`\\oiiint`),W(K,q,_r,`⨆`,`\\bigsqcup`),W(K,q,_r,`∫`,`\\smallint`),W(dr,q,hr,`…`,`\\textellipsis`),W(K,q,hr,`…`,`\\mathellipsis`),W(dr,q,hr,`…`,`\\ldots`,!0),W(K,q,hr,`…`,`\\ldots`,!0),W(K,q,hr,`⋯`,`\\@cdots`,!0),W(K,q,hr,`⋱`,`\\ddots`,!0),W(K,q,X,`⋮`,`\\varvdots`),W(dr,q,X,`⋮`,`\\varvdots`),W(K,q,fr,`ˊ`,`\\acute`),W(K,q,fr,`ˋ`,`\\grave`),W(K,q,fr,`¨`,`\\ddot`),W(K,q,fr,`~`,`\\tilde`),W(K,q,fr,`ˉ`,`\\bar`),W(K,q,fr,`˘`,`\\breve`),W(K,q,fr,`ˇ`,`\\check`),W(K,q,fr,`^`,`\\hat`),W(K,q,fr,`⃗`,`\\vec`),W(K,q,fr,`˙`,`\\dot`),W(K,q,fr,`˚`,`\\mathring`),W(K,q,gr,``,`\\@imath`),W(K,q,gr,``,`\\@jmath`),W(K,q,X,`ı`,`ı`),W(K,q,X,`ȷ`,`ȷ`),W(dr,q,X,`ı`,`\\i`,!0),W(dr,q,X,`ȷ`,`\\j`,!0),W(dr,q,X,`ß`,`\\ss`,!0),W(dr,q,X,`æ`,`\\ae`,!0),W(dr,q,X,`œ`,`\\oe`,!0),W(dr,q,X,`ø`,`\\o`,!0),W(dr,q,X,`Æ`,`\\AE`,!0),W(dr,q,X,`Œ`,`\\OE`,!0),W(dr,q,X,`Ø`,`\\O`,!0),W(dr,q,fr,`ˊ`,`\\'`),W(dr,q,fr,`ˋ`,"\\`"),W(dr,q,fr,`ˆ`,`\\^`),W(dr,q,fr,`˜`,`\\~`),W(dr,q,fr,`ˉ`,`\\=`),W(dr,q,fr,`˘`,`\\u`),W(dr,q,fr,`˙`,`\\.`),W(dr,q,fr,`¸`,`\\c`),W(dr,q,fr,`˚`,`\\r`),W(dr,q,fr,`ˇ`,`\\v`),W(dr,q,fr,`¨`,`\\"`),W(dr,q,fr,`˝`,`\\H`),W(dr,q,fr,`◯`,`\\textcircled`),xr={"--":!0,"---":!0,"``":!0,"''":!0},W(dr,q,X,`–`,`--`,!0),W(dr,q,X,`–`,`\\textendash`),W(dr,q,X,`—`,`---`,!0),W(dr,q,X,`—`,`\\textemdash`),W(dr,q,X,`‘`,"`",!0),W(dr,q,X,`‘`,`\\textquoteleft`),W(dr,q,X,`’`,`'`,!0),W(dr,q,X,`’`,`\\textquoteright`),W(dr,q,X,`“`,"``",!0),W(dr,q,X,`“`,`\\textquotedblleft`),W(dr,q,X,`”`,`''`,!0),W(dr,q,X,`”`,`\\textquotedblright`),W(K,q,X,`°`,`\\degree`,!0),W(dr,q,X,`°`,`\\degree`),W(dr,q,X,`°`,`\\textdegree`,!0),W(K,q,X,`£`,`\\pounds`),W(K,q,X,`£`,`\\mathsterling`,!0),W(dr,q,X,`£`,`\\pounds`),W(dr,q,X,`£`,`\\textsterling`,!0),W(K,J,X,`✠`,`\\maltese`),W(dr,J,X,`✠`,`\\maltese`),Sr=`0123456789/@."`,Cr=0;Cr<Sr.length;Cr++)wr=Sr.charAt(Cr),W(K,q,X,wr,wr);for(Tr=`0123456789!@*()-=+";:?/.,`,Er=0;Er<Tr.length;Er++)Dr=Tr.charAt(Er),W(dr,q,X,Dr,Dr);for(Or=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`,kr=0;kr<Or.length;kr++)Ar=Or.charAt(kr),W(K,q,gr,Ar,Ar),W(dr,q,X,Ar,Ar);for(W(K,J,X,`C`,`ℂ`),W(dr,J,X,`C`,`ℂ`),W(K,J,X,`H`,`ℍ`),W(dr,J,X,`H`,`ℍ`),W(K,J,X,`N`,`ℕ`),W(dr,J,X,`N`,`ℕ`),W(K,J,X,`P`,`ℙ`),W(dr,J,X,`P`,`ℙ`),W(K,J,X,`Q`,`ℚ`),W(dr,J,X,`Q`,`ℚ`),W(K,J,X,`R`,`ℝ`),W(dr,J,X,`R`,`ℝ`),W(K,J,X,`Z`,`ℤ`),W(dr,J,X,`Z`,`ℤ`),W(K,q,gr,`h`,`ℎ`),W(dr,q,gr,`h`,`ℎ`),Mr=0;Mr<Or.length;Mr++)Nr=Or.charAt(Mr),jr=String.fromCharCode(55349,56320+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56372+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56424+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56580+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56684+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56736+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56788+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56840+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56944+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),Mr<26&&(jr=String.fromCharCode(55349,56632+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr),jr=String.fromCharCode(55349,56476+Mr),W(K,q,gr,Nr,jr),W(dr,q,X,Nr,jr));for(jr=String.fromCharCode(55349,56668),W(K,q,gr,`k`,jr),W(dr,q,X,`k`,jr),Pr=0;Pr<10;Pr++)Fr=Pr.toString(),jr=String.fromCharCode(55349,57294+Pr),W(K,q,gr,Fr,jr),W(dr,q,X,Fr,jr),jr=String.fromCharCode(55349,57314+Pr),W(K,q,gr,Fr,jr),W(dr,q,X,Fr,jr),jr=String.fromCharCode(55349,57324+Pr),W(K,q,gr,Fr,jr),W(dr,q,X,Fr,jr),jr=String.fromCharCode(55349,57334+Pr),W(K,q,gr,Fr,jr),W(dr,q,X,Fr,jr);for(Ir=`ÐÞþ`,Lr=0;Lr<Ir.length;Lr++)Rr=Ir.charAt(Lr),W(K,q,gr,Rr,Rr),W(dr,q,X,Rr,Rr);zr={mathClass:`mathbf`,textClass:`textbf`,font:`Main-Bold`},Br={mathClass:`mathnormal`,textClass:`textit`,font:`Math-Italic`},Vr={mathClass:`boldsymbol`,textClass:`boldsymbol`,font:`Main-BoldItalic`},Zee={mathClass:`mathscr`,textClass:`textscr`,font:`Script-Regular`},Hr={mathClass:``,textClass:``,font:``},Ur={mathClass:`mathfrak`,textClass:`textfrak`,font:`Fraktur-Regular`},Wr={mathClass:`mathbb`,textClass:`textbb`,font:`AMS-Regular`},Gr={mathClass:`mathboldfrak`,textClass:`textboldfrak`,font:`Fraktur-Regular`},Kr={mathClass:`mathsf`,textClass:`textsf`,font:`SansSerif-Regular`},qr={mathClass:`mathboldsf`,textClass:`textboldsf`,font:`SansSerif-Bold`},Jr={mathClass:`mathitsf`,textClass:`textitsf`,font:`SansSerif-Italic`},Yr={mathClass:`mathtt`,textClass:`texttt`,font:`Typewriter-Regular`},Xr=[zr,zr,Br,Br,Vr,Vr,Zee,Hr,Hr,Hr,Ur,Ur,Wr,Wr,Gr,Gr,Kr,Kr,qr,qr,Jr,Jr,Hr,Hr,Yr,Yr],Qee=[zr,Hr,Kr,qr,Yr],$ee=e=>{var t=e.charCodeAt(0),n=e.charCodeAt(1),r=(t-55296)*1024+(n-56320)+65536;if(119808<=r&&r<120484)return Xr[Math.floor((r-119808)/26)];if(120782<=r&&r<=120831)return Qee[Math.floor((r-120782)/10)];if(r===120485||r===120486)return Xr[0];if(120486<r&&r<120782)return Hr;throw new Sn(`Unsupported character: `+e)},Zr=function(e,t,n){if(ur[n][e]){var r=ur[n][e].replace;r&&(e=r)}return{value:e,metrics:Zt(e,t,n)}},Qr=function(e,t,n,r,i){var a=Zr(e,t,n),o=a.metrics;e=a.value;var s;if(o){var l=o.italic;(n===`text`||r&&r.font===`mathit`)&&(l=0),s=new nr(e,o.height,o.depth,l,o.skew,o.width,i)}else typeof console<`u`&&console.warn(`No character metrics `+(`for '`+e+`' in style '`+t+`' and mode '`+n+`'`)),s=new nr(e,0,0,0,0,0,i);if(r){s.maxFontSize=r.sizeMultiplier,r.style.isTight()&&s.classes.push(`mtight`);var u=r.getColor();u&&(s.style.color=u)}return s},$r=function(e,t,n,r){return r===void 0&&(r=[]),n.font===`boldsymbol`&&Zr(e,`Main-Bold`,t).metrics?Qr(e,`Main-Bold`,t,n,r.concat([`mathbf`])):e===`\\`||ur[t][e].font===`main`?Qr(e,`Main-Regular`,t,n,r):Qr(e,`AMS-Regular`,t,n,r.concat([`amsrm`]))},ete=function(e,t,n){return n!==`textord`&&Zr(e,`Math-BoldItalic`,t).metrics?{fontName:`Math-BoldItalic`,fontClass:`boldsymbol`}:{fontName:`Main-Bold`,fontClass:`mathbf`}},ei=function(e,t,n){var r=e.mode,i=e.text,a=[`mord`],{font:o,fontFamily:s,fontWeight:l,fontShape:u}=t,d=r===`math`||r===`text`&&!!o,f=d?o:s,p=``,m=``;if(i.charCodeAt(0)===55349){var h=$ee(i);p=h.font,m=h[r+`Class`]}if(p)return Qr(i,p,r,t,a.concat(m));if(f){var g,_;if(f===`boldsymbol`){var v=ete(i,r,n);g=v.fontName,_=[v.fontClass]}else d?(g=di[o].fontName,_=[o]):(g=ui(s,l,u),_=[s,l,u]);if(Zr(i,g,r).metrics)return Qr(i,g,r,t,a.concat(_));if(xr.hasOwnProperty(i)&&g.slice(0,10)===`Typewriter`){for(var y=[],b=0;b<i.length;b++)y.push(Qr(i[b],g,r,t,a.concat(_)));return oi(y)}}if(n===`mathord`)return Qr(i,`Math-Italic`,r,t,a.concat([`mathnormal`]));if(n===`textord`){var x=ur[r][i]&&ur[r][i].font;if(x===`ams`)return Qr(i,ui(`amsrm`,l,u),r,t,a.concat(`amsrm`,l,u));if(x===`main`||!x)return Qr(i,ui(`textrm`,l,u),r,t,a.concat(l,u));var S=ui(x,l,u);return Qr(i,S,r,t,a.concat(S,l,u))}throw Error(`unexpected type: `+n+` in makeOrd`)},tte=(e,t)=>{if(Yn(e.classes)!==Yn(t.classes)||e.skew!==t.skew||e.maxFontSize!==t.maxFontSize||e.italic!==0&&e.hasClass(`mathnormal`))return!1;if(e.classes.length===1){var n=e.classes[0];if(n===`mbin`||n===`mord`)return!1}for(var r of Object.keys(e.style))if(e.style[r]!==t.style[r])return!1;for(var i of Object.keys(t.style))if(e.style[i]!==t.style[i])return!1;return!0},ti=e=>{for(var t=0;t<e.length-1;t++){var n=e[t],r=e[t+1];n instanceof nr&&r instanceof nr&&tte(n,r)&&(n.text+=r.text,n.height=Math.max(n.height,r.height),n.depth=Math.max(n.depth,r.depth),n.italic=r.italic,e.splice(t+1,1),t--)}return e},ni=function(e){for(var t=0,n=0,r=0,i=0;i<e.children.length;i++){var a=e.children[i];a.height>t&&(t=a.height),a.depth>n&&(n=a.depth),a.maxFontSize>r&&(r=a.maxFontSize)}e.height=t,e.depth=n,e.maxFontSize=r},ri=function(e,t,n,r){var i=new er(e,t,n,r);return ni(i),i},ii=(e,t,n,r)=>new er(e,t,n,r),ai=function(e,t,n){var r=ri([e],[],t);return r.height=Math.max(n||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),r.style.borderBottomWidth=Jn(r.height),r.maxFontSize=1,r},nte=function(e,t,n,r){var i=new tr(e,t,n,r);return ni(i),i},oi=function(e){var t=new Wn(e);return ni(t),t},si=function(e,t){return e instanceof Wn?ri([],[e],t):e},rte=function(e){if(e.positionType===`individualShift`){for(var t=e.children,n=[t[0]],r=-t[0].shift-t[0].elem.depth,i=r,a=1;a<t.length;a++){var o=-t[a].shift-i-t[a].elem.depth,s=o-(t[a-1].elem.height+t[a-1].elem.depth);i+=o,n.push({type:`kern`,size:s}),n.push(t[a])}return{children:n,depth:r}}var l;if(e.positionType===`top`){for(var u=e.positionData,d=0;d<e.children.length;d++){var f=e.children[d];u-=f.type===`kern`?f.size:f.elem.height+f.elem.depth}l=u}else if(e.positionType===`bottom`)l=-e.positionData;else{var p=e.children[0];if(p.type!==`elem`)throw Error(`First child must have type "elem".`);if(e.positionType===`shift`)l=-p.elem.depth-e.positionData;else if(e.positionType===`firstBaseline`)l=-p.elem.depth;else throw Error(`Invalid positionType `+e.positionType+`.`)}return{children:e.children,depth:l}},ci=function(e,t){for(var{children:n,depth:r}=rte(e),i=0,a=0;a<n.length;a++){var o=n[a];if(o.type===`elem`){var s=o.elem;i=Math.max(i,s.maxFontSize,s.height)}}i+=2;var l=ri([`pstrut`],[]);l.style.height=Jn(i);for(var u=[],d=r,f=r,p=r,m=0;m<n.length;m++){var h=n[m];if(h.type===`kern`)p+=h.size;else{var g=h.elem,_=h.wrapperClasses||[],v=h.wrapperStyle||{},y=ri(_,[l,g],void 0,v);y.style.top=Jn(-i-p-g.depth),h.marginLeft&&(y.style.marginLeft=h.marginLeft),h.marginRight&&(y.style.marginRight=h.marginRight),u.push(y),p+=g.height+g.depth}d=Math.min(d,p),f=Math.max(f,p)}var b=ri([`vlist`],u);b.style.height=Jn(f);var x;if(d<0){var S=ri([`vlist`],[ri([],[])]);S.style.height=Jn(-d),x=[ri([`vlist-r`],[b,ri([`vlist-s`],[new nr(`​`)])]),ri([`vlist-r`],[S])]}else x=[ri([`vlist-r`],[b])];var C=ri([`vlist-t`],x);return x.length===2&&C.classes.push(`vlist-t2`),C.height=f,C.depth=-d,C},li=(e,t)=>{var n=ri([`mspace`],[],t),r=qn(e,t);return n.style.marginRight=Jn(r),n},ui=(e,t,n)=>{var r,i;switch(e){case`amsrm`:r=`AMS`;break;case`textrm`:r=`Main`;break;case`textsf`:r=`SansSerif`;break;case`texttt`:r=`Typewriter`;break;default:r=e}return i=t===`textbf`&&n===`textit`?`BoldItalic`:t===`textbf`?`Bold`:n===`textit`?`Italic`:`Regular`,r+`-`+i},di={mathbf:{variant:`bold`,fontName:`Main-Bold`},mathrm:{variant:`normal`,fontName:`Main-Regular`},textit:{variant:`italic`,fontName:`Main-Italic`},mathit:{variant:`italic`,fontName:`Main-Italic`},mathnormal:{variant:`italic`,fontName:`Math-Italic`},mathsfit:{variant:`sans-serif-italic`,fontName:`SansSerif-Italic`},mathbb:{variant:`double-struck`,fontName:`AMS-Regular`},mathcal:{variant:`script`,fontName:`Caligraphic-Regular`},mathfrak:{variant:`fraktur`,fontName:`Fraktur-Regular`},mathscr:{variant:`script`,fontName:`Script-Regular`},mathsf:{variant:`sans-serif`,fontName:`SansSerif-Regular`},mathtt:{variant:`monospace`,fontName:`Typewriter-Regular`}},fi={vec:[`vec`,.471,.714],oiintSize1:[`oiintSize1`,.957,.499],oiintSize2:[`oiintSize2`,1.472,.659],oiiintSize1:[`oiiintSize1`,1.304,.499],oiiintSize2:[`oiiintSize2`,1.98,.659]},pi=function(e,t){var[n,r,i]=fi[e],a=new ir(n),o=ii([`overlay`],[new rr([a],{width:Jn(r),height:Jn(i),style:`width:`+Jn(r),viewBox:`0 0 `+1e3*r+` `+1e3*i,preserveAspectRatio:`xMinYMin`})],t);return o.height=i,o.style.height=Jn(i),o.style.width=Jn(r),o},mi={number:3,unit:`mu`},hi={number:4,unit:`mu`},gi={number:5,unit:`mu`},ite={mord:{mop:mi,mbin:hi,mrel:gi,minner:mi},mop:{mord:mi,mop:mi,mrel:gi,minner:mi},mbin:{mord:hi,mop:hi,mopen:hi,minner:hi},mrel:{mord:gi,mop:gi,mopen:gi,minner:gi},mopen:{},mclose:{mop:mi,mbin:hi,mrel:gi,minner:mi},mpunct:{mord:mi,mop:mi,mrel:gi,mopen:mi,mclose:mi,mpunct:mi,minner:mi},minner:{mord:mi,mop:mi,mbin:hi,mrel:gi,mopen:mi,mpunct:mi,minner:mi}},ate={mord:{mop:mi},mop:{mord:mi,mop:mi},mbin:{},mrel:{},mopen:{},mclose:{mop:mi},mpunct:{},minner:{mop:mi}},_i={},vi={},yi={},bi=function(e){return e.type===`ordgroup`&&e.body.length===1?e.body[0]:e},xi=function(e){return e.type===`ordgroup`?e.body:[e]},ote=new Set([`leftmost`,`mbin`,`mopen`,`mrel`,`mop`,`mpunct`]),ste=new Set([`rightmost`,`mrel`,`mclose`,`mpunct`]),cte={display:Rn.DISPLAY,text:Rn.TEXT,script:Rn.SCRIPT,scriptscript:Rn.SCRIPTSCRIPT},lte={mord:`mord`,mop:`mop`,mbin:`mbin`,mrel:`mrel`,mopen:`mopen`,mclose:`mclose`,mpunct:`mpunct`,minner:`minner`},Si=function(e,t,n,r){r===void 0&&(r=[null,null]);for(var i=[],a=0;a<e.length;a++){var o=Oi(e[a],t);if(o instanceof Wn){var s=o.children;i.push(...s)}else i.push(o)}if(ti(i),!n)return i;var l=t;if(e.length===1){var u=e[0];u.type===`sizing`?l=t.havingSize(u.size):u.type===`styling`&&(l=t.havingStyle(cte[u.style]))}var d=ri([r[0]||`leftmost`],[],t),f=ri([r[1]||`rightmost`],[],t),p=n===`root`;return Ci(i,(e,t)=>{var n=t.classes[0],r=e.classes[0];n===`mbin`&&ste.has(r)?t.classes[0]=`mord`:r===`mbin`&&ote.has(n)&&(e.classes[0]=`mord`)},{node:d},f,p),Ci(i,(e,t)=>{var n=Ei(t),r=Ei(e),i=n&&r?e.hasClass(`mtight`)?ate[n]?.[r]:ite[n]?.[r]:null;if(i)return li(i,l)},{node:d},f,p),i},Ci=function(e,t,n,r,i){r&&e.push(r);for(var a=0;a<e.length;a++){var o=e[a],s=wi(o);if(s){Ci(s.children,t,n,null,i);continue}var l=!o.hasClass(`mspace`);if(l){var u=t(o,n.node);u&&(n.insertAfter?n.insertAfter(u):(e.unshift(u),a++))}l?n.node=o:i&&o.hasClass(`newline`)&&(n.node=ri([`leftmost`])),n.insertAfter=(t=>n=>{e.splice(t+1,0,n),a++})(a)}r&&e.pop()},wi=function(e){return e instanceof Wn||e instanceof tr||e instanceof er&&e.hasClass(`enclosing`)?e:null},Ti=function(e,t){var n=wi(e);if(n){var r=n.children;if(r.length){if(t===`right`)return Ti(r[r.length-1],`right`);if(t===`left`)return Ti(r[0],`left`)}}return e},Ei=function(e,t){return e?(t&&(e=Ti(e,t)),lte[e.classes[0]]||null):null},Di=function(e,t){var n=[`nulldelimiter`].concat(e.baseSizingClasses());return ri(t.concat(n))},Oi=function(e,t,n){if(!e)return ri();if(vi[e.type]){var r=vi[e.type](e,t);if(n&&t.size!==n.size){r=ri(t.sizingClasses(n),[r],t);var i=t.sizeMultiplier/n.sizeMultiplier;r.height*=i,r.depth*=i}return r}throw new Sn(`Got group of unknown type: '`+e.type+`'`)},ki=class{constructor(e,t,n){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=e,this.attributes={},this.children=t||[],this.classes=n||[]}setAttribute(e,t){this.attributes[e]=t}getAttribute(e){return this.attributes[e]}toNode(){var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,this.type);for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);this.classes.length>0&&(e.className=Yn(this.classes));for(var n=0;n<this.children.length;n++)if(this.children[n]instanceof Ai&&this.children[n+1]instanceof Ai){for(var r=this.children[n].toText()+this.children[++n].toText();this.children[n+1]instanceof Ai;)r+=this.children[++n].toText();e.appendChild(new Ai(r).toNode())}else e.appendChild(this.children[n].toNode());return e}toMarkup(){var e=`<`+this.type;for(var t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&(e+=` `+t+`="`,e+=Cn(this.attributes[t]),e+=`"`);this.classes.length>0&&(e+=` class ="`+Cn(Yn(this.classes))+`"`),e+=`>`;for(var n=0;n<this.children.length;n++)e+=this.children[n].toMarkup();return e+=`</`+this.type+`>`,e}toText(){return this.children.map(e=>e.toText()).join(``)}},Ai=class{constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return Cn(this.toText())}toText(){return this.text}},ji=class{constructor(e){this.width=void 0,this.character=void 0,this.width=e,this.character=e>=.05555&&e<=.05556?` `:e>=.1666&&e<=.1667?` `:e>=.2222&&e<=.2223?` `:e>=.2777&&e<=.2778?`  `:e>=-.05556&&e<=-.05555?` ⁣`:e>=-.1667&&e<=-.1666?` ⁣`:e>=-.2223&&e<=-.2222?` ⁣`:e>=-.2778&&e<=-.2777?` ⁣`:null}toNode(){if(this.character)return document.createTextNode(this.character);var e=document.createElementNS(`http://www.w3.org/1998/Math/MathML`,`mspace`);return e.setAttribute(`width`,Jn(this.width)),e}toMarkup(){return this.character?`<mtext>`+this.character+`</mtext>`:`<mspace width="`+Jn(this.width)+`"/>`}toText(){return this.character?this.character:` `}},ute=new Set([`\\imath`,`\\jmath`]),dte=new Set([`mrow`,`mtable`]),Mi=function(e,t,n){return ur[t][e]&&ur[t][e].replace&&e.charCodeAt(0)!==55349&&!(xr.hasOwnProperty(e)&&n&&(n.fontFamily&&n.fontFamily.slice(4,6)===`tt`||n.font&&n.font.slice(4,6)===`tt`))&&(e=ur[t][e].replace),new Ai(e)},Ni=function(e){return e.length===1?e[0]:new ki(`mrow`,e)},fte={mathit:`italic`,boldsymbol:e=>e.type===`textord`?`bold`:`bold-italic`,mathbf:`bold`,mathbb:`double-struck`,mathsfit:`sans-serif-italic`,mathfrak:`fraktur`,mathscr:`script`,mathcal:`script`,mathsf:`sans-serif`,mathtt:`monospace`},Pi=(e,t)=>{if(e.mode===`text`){if(t.fontFamily===`texttt`)return`monospace`;if(t.fontFamily===`textsf`)return t.fontShape===`textit`&&t.fontWeight===`textbf`?`sans-serif-bold-italic`:t.fontShape===`textit`?`sans-serif-italic`:t.fontWeight===`textbf`?`bold-sans-serif`:`sans-serif`;if(t.fontShape===`textit`&&t.fontWeight===`textbf`)return`bold-italic`;if(t.fontShape===`textit`)return`italic`;if(t.fontWeight===`textbf`)return`bold`}var n=t.font;if(!n||n===`mathnormal`)return null;var r=e.mode,i=fte[n];if(i)return typeof i==`function`?i(e):i;var a=e.text;if(ute.has(a))return null;if(ur[r][a]){var o=ur[r][a].replace;o&&(a=o)}var s=di[n].fontName;return Zt(a,s,r)?di[n].variant:null},Fi=function(e,t,n){if(e.length===1){var r=Li(e[0],t);return n&&r instanceof ki&&r.type===`mo`&&(r.setAttribute(`lspace`,`0em`),r.setAttribute(`rspace`,`0em`)),[r]}for(var i=[],a,o=0;o<e.length;o++){var s=Li(e[o],t);if(s instanceof ki&&a instanceof ki){if(s.type===`mtext`&&a.type===`mtext`&&s.getAttribute(`mathvariant`)===a.getAttribute(`mathvariant`)){a.children.push(...s.children);continue}if(s.type===`mn`&&a.type===`mn`){a.children.push(...s.children);continue}if(rn(s)&&a.type===`mn`){a.children.push(...s.children);continue}if(s.type===`mn`&&rn(a))s.children=[...a.children,...s.children],i.pop();else if((s.type===`msup`||s.type===`msub`)&&s.children.length>=1&&(a.type===`mn`||rn(a))){var l=s.children[0];l instanceof ki&&l.type===`mn`&&(l.children=[...a.children,...l.children],i.pop())}else if(a.type===`mi`&&a.children.length===1){var u=a.children[0];if(u instanceof Ai&&u.text===`̸`&&(s.type===`mo`||s.type===`mi`||s.type===`mn`)){var d=s.children[0];d instanceof Ai&&d.text.length>0&&(d.text=d.text.slice(0,1)+`̸`+d.text.slice(1),i.pop())}}}i.push(s),a=s}return i},Ii=function(e,t,n){return Ni(Fi(e,t,n))},Li=function(e,t){if(!e)return new ki(`mrow`);if(yi[e.type])return yi[e.type](e,t);throw new Sn(`Got group of unknown type: '`+e.type+`'`)},pte=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Ri=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],zi=function(e,t){return t.size<2?e:pte[e-1][t.size-1]},Bi=class e{constructor(t){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=t.style,this.color=t.color,this.size=t.size||e.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||``,this.fontFamily=t.fontFamily||``,this.fontWeight=t.fontWeight||``,this.fontShape=t.fontShape||``,this.sizeMultiplier=Ri[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var n={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};return Object.assign(n,t),new e(n)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:zi(this.textSize,e)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(e){return this.size===e&&this.textSize===e?this:this.extend({style:this.style.text(),size:e,textSize:e,sizeMultiplier:Ri[e-1]})}havingBaseStyle(t){t||=this.style.text();var n=zi(e.BASESIZE,t);return this.size===n&&this.textSize===e.BASESIZE&&this.style===t?this:this.extend({style:t,size:n})}havingBaseSizing(){var e;switch(this.style.id){case 4:case 5:e=3;break;case 6:case 7:e=1;break;default:e=6}return this.extend({style:this.style.text(),size:e})}withColor(e){return this.extend({color:e})}withPhantom(){return this.extend({phantom:!0})}withFont(e){return this.extend({font:e})}withTextFontFamily(e){return this.extend({fontFamily:e,font:``})}withTextFontWeight(e){return this.extend({fontWeight:e,font:``})}withTextFontShape(e){return this.extend({fontShape:e,font:``})}sizingClasses(e){return e.size===this.size?[]:[`sizing`,`reset-size`+e.size,`size`+this.size]}baseSizingClasses(){return this.size===e.BASESIZE?[]:[`sizing`,`reset-size`+this.size,`size`+e.BASESIZE]}fontMetrics(){return this._fontMetrics||=xee(this.size),this._fontMetrics}getColor(){return this.phantom?`transparent`:this.color}},Bi.BASESIZE=6,Vi=function(e){return new Bi({style:e.displayMode?Rn.DISPLAY:Rn.TEXT,maxSize:e.maxSize,minRuleThickness:e.minRuleThickness})},Hi=function(e,t){if(t.displayMode){var n=[`katex-display`];t.leqno&&n.push(`leqno`),t.fleqn&&n.push(`fleqn`),e=ri(n,[e])}return e},mte=function(e,t,n){var r=Vi(n),i;return n.output===`mathml`?an(e,t,r,n.displayMode,!0):(i=n.output===`html`?ri([`katex`],[tn(e,r)]):ri([`katex`],[an(e,t,r,n.displayMode,!1),tn(e,r)]),Hi(i,n))},hte=function(e,t,n){return Hi(ri([`katex`],[tn(e,Vi(n))]),n)},gte={widehat:`^`,widecheck:`ˇ`,widetilde:`~`,utilde:`~`,overleftarrow:`←`,underleftarrow:`←`,xleftarrow:`←`,overrightarrow:`→`,underrightarrow:`→`,xrightarrow:`→`,underbrace:`⏟`,overbrace:`⏞`,underbracket:`⎵`,overbracket:`⎴`,overgroup:`⏠`,undergroup:`⏡`,overleftrightarrow:`↔`,underleftrightarrow:`↔`,xleftrightarrow:`↔`,Overrightarrow:`⇒`,xRightarrow:`⇒`,overleftharpoon:`↼`,xleftharpoonup:`↼`,overrightharpoon:`⇀`,xrightharpoonup:`⇀`,xLeftarrow:`⇐`,xLeftrightarrow:`⇔`,xhookleftarrow:`↩`,xhookrightarrow:`↪`,xmapsto:`↦`,xrightharpoondown:`⇁`,xleftharpoondown:`↽`,xrightleftharpoons:`⇌`,xleftrightharpoons:`⇋`,xtwoheadleftarrow:`↞`,xtwoheadrightarrow:`↠`,xlongequal:`=`,xtofrom:`⇄`,xrightleftarrows:`⇄`,xrightequilibrium:`⇌`,xleftequilibrium:`⇋`,"\\cdrightarrow":`→`,"\\cdleftarrow":`←`,"\\cdlongequal":`=`},Ui=function(e){var t=new ki(`mo`,[new Ai(gte[e.replace(/^\\/,``)])]);return t.setAttribute(`stretchy`,`true`),t},_te={overrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],overleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],underrightarrow:[[`rightarrow`],.888,522,`xMaxYMin`],underleftarrow:[[`leftarrow`],.888,522,`xMinYMin`],xrightarrow:[[`rightarrow`],1.469,522,`xMaxYMin`],"\\cdrightarrow":[[`rightarrow`],3,522,`xMaxYMin`],xleftarrow:[[`leftarrow`],1.469,522,`xMinYMin`],"\\cdleftarrow":[[`leftarrow`],3,522,`xMinYMin`],Overrightarrow:[[`doublerightarrow`],.888,560,`xMaxYMin`],xRightarrow:[[`doublerightarrow`],1.526,560,`xMaxYMin`],xLeftarrow:[[`doubleleftarrow`],1.526,560,`xMinYMin`],overleftharpoon:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoonup:[[`leftharpoon`],.888,522,`xMinYMin`],xleftharpoondown:[[`leftharpoondown`],.888,522,`xMinYMin`],overrightharpoon:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoonup:[[`rightharpoon`],.888,522,`xMaxYMin`],xrightharpoondown:[[`rightharpoondown`],.888,522,`xMaxYMin`],xlongequal:[[`longequal`],.888,334,`xMinYMin`],"\\cdlongequal":[[`longequal`],3,334,`xMinYMin`],xtwoheadleftarrow:[[`twoheadleftarrow`],.888,334,`xMinYMin`],xtwoheadrightarrow:[[`twoheadrightarrow`],.888,334,`xMaxYMin`],overleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],overbrace:[[`leftbrace`,`midbrace`,`rightbrace`],1.6,548],underbrace:[[`leftbraceunder`,`midbraceunder`,`rightbraceunder`],1.6,548],underleftrightarrow:[[`leftarrow`,`rightarrow`],.888,522],xleftrightarrow:[[`leftarrow`,`rightarrow`],1.75,522],xLeftrightarrow:[[`doubleleftarrow`,`doublerightarrow`],1.75,560],xrightleftharpoons:[[`leftharpoondownplus`,`rightharpoonplus`],1.75,716],xleftrightharpoons:[[`leftharpoonplus`,`rightharpoondownplus`],1.75,716],xhookleftarrow:[[`leftarrow`,`righthook`],1.08,522],xhookrightarrow:[[`lefthook`,`rightarrow`],1.08,522],overlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],underlinesegment:[[`leftlinesegment`,`rightlinesegment`],.888,522],overbracket:[[`leftbracketover`,`rightbracketover`],1.6,440],underbracket:[[`leftbracketunder`,`rightbracketunder`],1.6,410],overgroup:[[`leftgroup`,`rightgroup`],.888,342],undergroup:[[`leftgroupunder`,`rightgroupunder`],.888,342],xmapsto:[[`leftmapsto`,`rightarrow`],1.5,522],xtofrom:[[`leftToFrom`,`rightToFrom`],1.75,528],xrightleftarrows:[[`baraboveleftarrow`,`rightarrowabovebar`],1.75,901],xrightequilibrium:[[`baraboveshortleftharpoon`,`rightharpoonaboveshortbar`],1.75,716],xleftequilibrium:[[`shortbaraboveleftharpoon`,`shortrightharpoonabovebar`],1.75,716]},vte=new Set([`widehat`,`widecheck`,`widetilde`,`utilde`]),Wi=function(e,t){function n(){var n=4e5,r=e.label.slice(1);if(vte.has(r)&&`base`in e){var i=e.base.type===`ordgroup`?e.base.body.length:1,a,o,s;if(i>5)r===`widehat`||r===`widecheck`?(a=420,n=2364,s=.42,o=r+`4`):(a=312,n=2340,s=.34,o=`tilde4`);else{var l=[1,1,2,2,3,3][i];r===`widehat`||r===`widecheck`?(n=[0,1062,2364,2364,2364][l],a=[0,239,300,360,420][l],s=[0,.24,.3,.3,.36,.42][l],o=r+l):(n=[0,600,1033,2339,2340][l],a=[0,260,286,306,312][l],s=[0,.26,.286,.3,.306,.34][l],o=`tilde`+l)}var u=new ir(o);return{span:ii([],[new rr([u],{width:`100%`,height:Jn(s),viewBox:`0 0 `+n+` `+a,preserveAspectRatio:`none`})],t),minWidth:0,height:s}}var d=[],f=_te[r];if(!f)throw Error(`No SVG data for "`+r+`".`);var[p,m,h]=f,g=h/1e3,_=p.length,v,y;if(_===1){if(f.length!==4)throw Error(`Expected 4-tuple for single-path SVG data "`+r+`".`);v=[`hide-tail`],y=[f[3]]}else if(_===2)v=[`halfarrow-left`,`halfarrow-right`],y=[`xMinYMin`,`xMaxYMin`];else if(_===3)v=[`brace-left`,`brace-center`,`brace-right`],y=[`xMinYMin`,`xMidYMin`,`xMaxYMin`];else throw Error(`Correct katexImagesData or update code here to support254- `+_+` children.`);for(var b=0;b<_;b++){var x=new ir(p[b]),S=new rr([x],{width:`400em`,height:Jn(g),viewBox:`0 0 `+n+` `+h,preserveAspectRatio:y[b]+` slice`}),C=ii([v[b]],[S],t);if(_===1)return{span:C,minWidth:m,height:g};C.style.height=Jn(g),d.push(C)}return{span:ri([`stretchy`],d,t),minWidth:m,height:g}}var{span:r,minWidth:i,height:a}=n();return r.height=a,r.style.height=Jn(a),i>0&&(r.style.minWidth=Jn(i)),r},yte=function(e,t,n,r,i){var a,o=e.height+e.depth+n+r;if(/fbox|color|angl/.test(t)){if(a=ri([`stretchy`,t],[],i),t===`fbox`){var s=i.color&&i.getColor();s&&(a.style.borderColor=s)}}else{var l=[];/^[bx]cancel$/.test(t)&&l.push(new ar({x1:`0`,y1:`0`,x2:`100%`,y2:`100%`,"stroke-width":`0.046em`})),/^x?cancel$/.test(t)&&l.push(new ar({x1:`0`,y1:`100%`,x2:`100%`,y2:`0`,"stroke-width":`0.046em`})),a=ii([],[new rr(l,{width:`100%`,height:Jn(o)})],i)}return a.height=o,a.style.height=Jn(o),a},bte={bin:1,close:1,inner:1,open:1,punct:1,rel:1},xte={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Gi=e=>{if(e instanceof nr)return e;if(Xee(e)&&e.children.length===1)return Gi(e.children[0])},Ki=(e,t)=>{var n,r,i;e&&e.type===`supsub`?(r=sn(e.base,`accent`),n=r.base,e.base=n,i=Yt(Oi(e,t)),e.base=r):(r=sn(e,`accent`),n=r.base);var a=Oi(n,t.havingCrampedStyle()),o=r.isShifty&&Tn(n),s=0;o&&(s=Gi(a)?.skew??0);var l=r.label===`\\c`,u=l?a.height+a.depth:Math.min(a.height,t.fontMetrics().xHeight),d;if(r.isStretchy)d=Wi(r,t),d=ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`elem`,elem:d,wrapperClasses:[`svg-align`],wrapperStyle:s>0?{width:`calc(100% - `+Jn(2*s)+`)`,marginLeft:Jn(2*s)}:void 0}]});else{var f,p;r.label===`\\vec`?(f=pi(`vec`,t),p=fi.vec[1]):(f=ei({type:`textord`,mode:r.mode,text:r.label},t,`textord`),f=Jt(f),f.italic=0,p=f.width,l&&(u+=f.depth)),d=ri([`accent-body`],[f]);var m=r.label===`\\textcircled`;m&&(d.classes.push(`accent-full`),u=a.height);var h=s;m||(h-=p/2),d.style.left=Jn(h),r.label===`\\textcircled`&&(d.style.top=`.2em`),d=ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:-u},{type:`elem`,elem:d}]})}var g=ri([`mord`,`accent`],[d],t);return i?(i.children[0]=g,i.height=Math.max(g.height,i.height),i.classes[0]=`mord`,i):g},qi=(e,t)=>{var n=e.isStretchy?Ui(e.label):new ki(`mo`,[Mi(e.label,e.mode)]),r=new ki(`mover`,[Li(e.base,t),n]);return r.setAttribute(`accent`,`true`),r},Ste=new RegExp([`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`].map(e=>`\\`+e).join(`|`)),Qt({type:`accent`,names:[`\\acute`,`\\grave`,`\\ddot`,`\\tilde`,`\\bar`,`\\breve`,`\\check`,`\\hat`,`\\vec`,`\\dot`,`\\mathring`,`\\widecheck`,`\\widehat`,`\\widetilde`,`\\overrightarrow`,`\\overleftarrow`,`\\Overrightarrow`,`\\overleftrightarrow`,`\\overgroup`,`\\overlinesegment`,`\\overleftharpoon`,`\\overrightharpoon`],props:{numArgs:1},handler:(e,t)=>{var n=bi(t[0]),r=!Ste.test(e.funcName),i=!r||e.funcName===`\\widehat`||e.funcName===`\\widetilde`||e.funcName===`\\widecheck`;return{type:`accent`,mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:i,base:n}},htmlBuilder:Ki,mathmlBuilder:qi}),Qt({type:`accent`,names:[`\\'`,"\\`",`\\^`,`\\~`,`\\=`,`\\u`,`\\.`,`\\"`,`\\c`,`\\r`,`\\H`,`\\v`,`\\textcircled`],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`primitive`]},handler:(e,t)=>{var n=t[0],r=e.parser.mode;return r===`math`&&(e.parser.settings.reportNonstrict(`mathVsTextAccents`,`LaTeX's accent `+e.funcName+` works only in text mode`),r=`text`),{type:`accent`,mode:r,label:e.funcName,isStretchy:!1,isShifty:!0,base:n}},htmlBuilder:Ki,mathmlBuilder:qi}),Qt({type:`accentUnder`,names:[`\\underleftarrow`,`\\underrightarrow`,`\\underleftrightarrow`,`\\undergroup`,`\\underlinesegment`,`\\utilde`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`accentUnder`,mode:n.mode,label:r,base:i}},htmlBuilder:(e,t)=>{var n=Oi(e.base,t),r=Wi(e,t),i=e.label===`\\utilde`?.12:0;return ri([`mord`,`accentunder`],[ci({positionType:`top`,positionData:n.height,children:[{type:`elem`,elem:r,wrapperClasses:[`svg-align`]},{type:`kern`,size:i},{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=Ui(e.label),r=new ki(`munder`,[Li(e.base,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),Ji=e=>{var t=new ki(`mpadded`,e?[e]:[]);return t.setAttribute(`width`,`+0.6em`),t.setAttribute(`lspace`,`0.3em`),t},Qt({type:`xArrow`,names:[`\\xleftarrow`,`\\xrightarrow`,`\\xLeftarrow`,`\\xRightarrow`,`\\xleftrightarrow`,`\\xLeftrightarrow`,`\\xhookleftarrow`,`\\xhookrightarrow`,`\\xmapsto`,`\\xrightharpoondown`,`\\xrightharpoonup`,`\\xleftharpoondown`,`\\xleftharpoonup`,`\\xrightleftharpoons`,`\\xleftrightharpoons`,`\\xlongequal`,`\\xtwoheadrightarrow`,`\\xtwoheadleftarrow`,`\\xtofrom`,`\\xrightleftarrows`,`\\xrightequilibrium`,`\\xleftequilibrium`,`\\\\cdrightarrow`,`\\\\cdleftarrow`,`\\\\cdlongequal`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r,funcName:i}=e;return{type:`xArrow`,mode:r.mode,label:i,body:t[0],below:n[0]}},htmlBuilder(e,t){var n=t.style,r=t.havingStyle(n.sup()),i=si(Oi(e.body,r,t),t),a=e.label.slice(0,2)===`\\x`?`x`:`cd`;i.classes.push(a+`-arrow-pad`);var o;e.below&&(r=t.havingStyle(n.sub()),o=si(Oi(e.below,r,t),t),o.classes.push(a+`-arrow-pad`));var s=Wi(e,t),l=-t.fontMetrics().axisHeight+.5*s.height,u=-t.fontMetrics().axisHeight-.5*s.height-.111;(i.depth>.25||e.label===`\\xleftequilibrium`)&&(u-=i.depth);var d;if(o){var f=-t.fontMetrics().axisHeight+o.height+.5*s.height+.111;d=ci({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:u},{type:`elem`,elem:s,shift:l,wrapperClasses:[`svg-align`]},{type:`elem`,elem:o,shift:f}]})}else d=ci({positionType:`individualShift`,children:[{type:`elem`,elem:i,shift:u},{type:`elem`,elem:s,shift:l,wrapperClasses:[`svg-align`]}]});return ri([`mrel`,`x-arrow`],[d],t)},mathmlBuilder(e,t){var n=Ui(e.label);n.setAttribute(`minsize`,e.label.charAt(0)===`x`?`1.75em`:`3.0em`);var r;if(e.body){var i=Ji(Li(e.body,t));if(e.below){var a=Ji(Li(e.below,t));r=new ki(`munderover`,[n,a,i])}else r=new ki(`mover`,[n,i])}else if(e.below){var o=Ji(Li(e.below,t));r=new ki(`munder`,[n,o])}else r=Ji(),r=new ki(`mover`,[n,r]);return r}}),Qt({type:`mclass`,names:[`\\mathord`,`\\mathbin`,`\\mathrel`,`\\mathopen`,`\\mathclose`,`\\mathpunct`,`\\mathinner`],props:{numArgs:1,primitive:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`mclass`,mode:n.mode,mclass:`m`+r.slice(5),body:xi(i),isCharacterBox:Tn(i)}},htmlBuilder:un,mathmlBuilder:dn}),Yi=e=>{var t=e.type===`ordgroup`&&e.body.length?e.body[0]:e;return t.type===`atom`&&(t.family===`bin`||t.family===`rel`)?`m`+t.family:`mord`},Qt({type:`mclass`,names:[`\\@binrel`],props:{numArgs:2},handler(e,t){var{parser:n}=e;return{type:`mclass`,mode:n.mode,mclass:Yi(t[0]),body:xi(t[1]),isCharacterBox:Tn(t[1])}}}),Qt({type:`mclass`,names:[`\\stackrel`,`\\overset`,`\\underset`],props:{numArgs:2},handler(e,t){var{parser:n,funcName:r}=e,i=t[1],a=t[0],o=r===`\\stackrel`?`mrel`:Yi(i),s={type:`op`,mode:i.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!==`\\stackrel`,body:xi(i)},l={type:`supsub`,mode:a.mode,base:s,sup:r===`\\underset`?null:a,sub:r===`\\underset`?a:null};return{type:`mclass`,mode:n.mode,mclass:o,body:[l],isCharacterBox:Tn(l)}},htmlBuilder:un,mathmlBuilder:dn}),Qt({type:`pmb`,names:[`\\pmb`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`pmb`,mode:n.mode,mclass:Yi(t[0]),body:xi(t[0])}},htmlBuilder(e,t){var n=Si(e.body,t,!0),r=ri([e.mclass],n,t);return r.style.textShadow=`0.02em 0.01em 0.04px`,r},mathmlBuilder(e,t){var n=Fi(e.body,t),r=new ki(`mstyle`,n);return r.setAttribute(`style`,`text-shadow: 0.02em 0.01em 0.04px`),r}}),Cte={">":`\\\\cdrightarrow`,"<":`\\\\cdleftarrow`,"=":`\\\\cdlongequal`,A:`\\uparrow`,V:`\\downarrow`,"|":`\\Vert`,".":`no arrow`},Xi=()=>({type:`styling`,body:[],mode:`math`,style:`display`,resetFont:!0}),Zi=e=>e.type===`textord`&&e.text===`@`,wte=(e,t)=>(e.type===`mathord`||e.type===`atom`)&&e.text===t,Qt({type:`cdlabel`,names:[`\\\\cdleft`,`\\\\cdright`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`cdlabel`,mode:n.mode,side:r.slice(4),label:t[0]}},htmlBuilder(e,t){var n=t.havingStyle(t.style.sup()),r=si(Oi(e.label,n,t),t);return r.classes.push(`cd-label-`+e.side),r.style.bottom=Jn(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,t){var n=new ki(`mrow`,[Li(e.label,t)]);return n=new ki(`mpadded`,[n]),n.setAttribute(`width`,`0`),e.side===`left`&&n.setAttribute(`lspace`,`-1width`),n.setAttribute(`voffset`,`0.7em`),n=new ki(`mstyle`,[n]),n.setAttribute(`displaystyle`,`false`),n.setAttribute(`scriptlevel`,`1`),n}}),Qt({type:`cdlabelparent`,names:[`\\\\cdparent`],props:{numArgs:1},handler(e,t){var{parser:n}=e;return{type:`cdlabelparent`,mode:n.mode,fragment:t[0]}},htmlBuilder(e,t){var n=si(Oi(e.fragment,t),t);return n.classes.push(`cd-vert-arrow`),n},mathmlBuilder(e,t){return new ki(`mrow`,[Li(e.fragment,t)])}}),Qt({type:`textord`,names:[`\\@char`],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var{parser:n}=e,r=sn(t[0],`ordgroup`).body,i=``,a=0;a<r.length;a++){var o=sn(r[a],`textord`);i+=o.text}var s=parseInt(i),l;if(isNaN(s))throw new Sn(`\\@char has non-numeric argument `+i);if(s<0||s>=1114111)throw new Sn(`\\@char with invalid code point `+i);return s<=65535?l=String.fromCharCode(s):(s-=65536,l=String.fromCharCode((s>>10)+55296,(s&1023)+56320)),{type:`textord`,mode:n.mode,text:l}}}),Qi=(e,t)=>oi(Si(e.body,t.withColor(e.color),!1)),$i=(e,t)=>{var n=Fi(e.body,t.withColor(e.color)),r=new ki(`mstyle`,n);return r.setAttribute(`mathcolor`,e.color),r},Qt({type:`color`,names:[`\\textcolor`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`original`]},handler(e,t){var{parser:n}=e,r=sn(t[0],`color-token`).color,i=t[1];return{type:`color`,mode:n.mode,color:r,body:xi(i)}},htmlBuilder:Qi,mathmlBuilder:$i}),Qt({type:`color`,names:[`\\color`],props:{numArgs:1,allowedInText:!0,argTypes:[`color`]},handler(e,t){var{parser:n,breakOnTokenText:r}=e,i=sn(t[0],`color-token`).color;n.gullet.macros.set(`\\current@color`,i);var a=n.parseExpression(!0,r);return{type:`color`,mode:n.mode,color:i,body:a}},htmlBuilder:Qi,mathmlBuilder:$i}),Qt({type:`cr`,names:[`\\\\`],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,n){var{parser:r}=e,i=r.gullet.future().text===`[`?r.parseSizeGroup(!0):null,a=!r.settings.displayMode||!r.settings.useStrictBehavior(`newLineInDisplayMode`,`In LaTeX, \\\\ or \\newline does nothing in display mode`);return{type:`cr`,mode:r.mode,newLine:a,size:i&&sn(i,`size`).value}},htmlBuilder(e,t){var n=ri([`mspace`],[],t);return e.newLine&&(n.classes.push(`newline`),e.size&&(n.style.marginTop=Jn(qn(e.size,t)))),n},mathmlBuilder(e,t){var n=new ki(`mspace`);return e.newLine&&(n.setAttribute(`linebreak`,`newline`),e.size&&n.setAttribute(`height`,Jn(qn(e.size,t)))),n}}),ea={"\\global":`\\global`,"\\long":`\\\\globallong`,"\\\\globallong":`\\\\globallong`,"\\def":`\\gdef`,"\\gdef":`\\gdef`,"\\edef":`\\xdef`,"\\xdef":`\\xdef`,"\\let":`\\\\globallet`,"\\futurelet":`\\\\globalfuture`},ta=e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new Sn(`Expected a control sequence`,e);return t},Tte=e=>{var t=e.gullet.popToken();return t.text===`=`&&(t=e.gullet.popToken(),t.text===` `&&(t=e.gullet.popToken())),t},na=(e,t,n,r)=>{var i=e.gullet.macros.get(n.text);i??=(n.noexpand=!0,{tokens:[n],numArgs:0,unexpandable:!e.gullet.isExpandable(n.text)}),e.gullet.macros.set(t,i,r)},Qt({type:`internal`,names:[`\\global`,`\\long`,`\\\\globallong`],props:{numArgs:0,allowedInText:!0},handler(e){var{parser:t,funcName:n}=e;t.consumeSpaces();var r=t.fetch();if(ea[r.text])return(n===`\\global`||n===`\\\\globallong`)&&(r.text=ea[r.text]),sn(t.parseFunction(),`internal`);throw new Sn(`Invalid token after macro prefix`,r)}}),Qt({type:`internal`,names:[`\\def`,`\\gdef`,`\\edef`,`\\xdef`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=t.gullet.popToken(),i=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(i))throw new Sn(`Expected a control sequence`,r);for(var a=0,o,s=[[]];t.gullet.future().text!==`{`;)if(r=t.gullet.popToken(),r.text===`#`){if(t.gullet.future().text===`{`){o=t.gullet.future(),s[a].push(`{`);break}if(r=t.gullet.popToken(),!/^[1-9]$/.test(r.text))throw new Sn(`Invalid argument number "`+r.text+`"`);if(parseInt(r.text)!==a+1)throw new Sn(`Argument number "`+r.text+`" out of order`);a++,s.push([])}else if(r.text===`EOF`)throw new Sn(`Expected a macro definition`);else s[a].push(r.text);var{tokens:l}=t.gullet.consumeArg();return o&&l.unshift(o),(n===`\\edef`||n===`\\xdef`)&&(l=t.gullet.expandTokens(l),l.reverse()),t.gullet.macros.set(i,{tokens:l,numArgs:a,delimiters:s},n===ea[n]),{type:`internal`,mode:t.mode}}}),Qt({type:`internal`,names:[`\\let`,`\\\\globallet`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=ta(t.gullet.popToken());return t.gullet.consumeSpaces(),na(t,r,Tte(t),n===`\\\\globallet`),{type:`internal`,mode:t.mode}}}),Qt({type:`internal`,names:[`\\futurelet`,`\\\\globalfuture`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:t,funcName:n}=e,r=ta(t.gullet.popToken()),i=t.gullet.popToken(),a=t.gullet.popToken();return na(t,r,a,n===`\\\\globalfuture`),t.gullet.pushToken(a),t.gullet.pushToken(i),{type:`internal`,mode:t.mode}}}),ra=function(e,t,n){var r=Zt(ur.math[e]&&ur.math[e].replace||e,t,n);if(!r)throw Error(`Unsupported symbol `+e+` and font size `+t+`.`);return r},ia=function(e,t,n,r){var i=n.havingBaseStyle(t),a=ri(r.concat(i.sizingClasses(n)),[e],n),o=i.sizeMultiplier/n.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},aa=function(e,t,n){var r=t.havingBaseStyle(n),i=(1-t.sizeMultiplier/r.sizeMultiplier)*t.fontMetrics().axisHeight;e.classes.push(`delimcenter`),e.style.top=Jn(i),e.height-=i,e.depth+=i},Ete=function(e,t,n,r,i,a){var o=ia(Qr(e,`Main-Regular`,i,r),t,r,a);return n&&aa(o,r,t),o},Dte=function(e,t,n,r){return Qr(e,`Size`+t+`-Regular`,n,r)},oa=function(e,t,n,r,i,a){var o=Dte(e,t,i,r),s=ia(ri([`delimsizing`,`size`+t],[o],r),Rn.TEXT,r,a);return n&&aa(s,r,Rn.TEXT),s},sa=function(e,t,n){return{type:`elem`,elem:ri([`delimsizinginner`,t===`Size1-Regular`?`delim-size1`:`delim-size4`],[ri([],[Qr(e,t,n)])])}},ca=function(e,t,n){var r=or[`Size4-Regular`][e.charCodeAt(0)]?or[`Size4-Regular`][e.charCodeAt(0)][4]:or[`Size1-Regular`][e.charCodeAt(0)][4],i=new ir(`inner`,Wee(e,Math.round(1e3*t))),a=ii([],[new rr([i],{width:Jn(r),height:Jn(t),style:`width:`+Jn(r),viewBox:`0 0 `+1e3*r+` `+Math.round(1e3*t),preserveAspectRatio:`xMinYMin`})],n);return a.height=t,a.style.height=Jn(t),a.style.width=Jn(r),{type:`elem`,elem:a}},la=.008,ua={type:`kern`,size:-1*la},Ote=new Set([`|`,`\\lvert`,`\\rvert`,`\\vert`]),kte=new Set([`\\|`,`\\lVert`,`\\rVert`,`\\Vert`]),da=function(e,t,n,r,i,a){var o,s,l,u,d=``,f=0;o=l=u=e,s=null;var p=`Size1-Regular`;e===`\\uparrow`?l=u=`⏐`:e===`\\Uparrow`?l=u=`‖`:e===`\\downarrow`?o=l=`⏐`:e===`\\Downarrow`?o=l=`‖`:e===`\\updownarrow`?(o=`\\uparrow`,l=`⏐`,u=`\\downarrow`):e===`\\Updownarrow`?(o=`\\Uparrow`,l=`‖`,u=`\\Downarrow`):Ote.has(e)?(l=`∣`,d=`vert`,f=333):kte.has(e)?(l=`∥`,d=`doublevert`,f=556):e===`[`||e===`\\lbrack`?(o=`⎡`,l=`⎢`,u=`⎣`,p=`Size4-Regular`,d=`lbrack`,f=667):e===`]`||e===`\\rbrack`?(o=`⎤`,l=`⎥`,u=`⎦`,p=`Size4-Regular`,d=`rbrack`,f=667):e===`\\lfloor`||e===`⌊`?(l=o=`⎢`,u=`⎣`,p=`Size4-Regular`,d=`lfloor`,f=667):e===`\\lceil`||e===`⌈`?(o=`⎡`,l=u=`⎢`,p=`Size4-Regular`,d=`lceil`,f=667):e===`\\rfloor`||e===`⌋`?(l=o=`⎥`,u=`⎦`,p=`Size4-Regular`,d=`rfloor`,f=667):e===`\\rceil`||e===`⌉`?(o=`⎤`,l=u=`⎥`,p=`Size4-Regular`,d=`rceil`,f=667):e===`(`||e===`\\lparen`?(o=`⎛`,l=`⎜`,u=`⎝`,p=`Size4-Regular`,d=`lparen`,f=875):e===`)`||e===`\\rparen`?(o=`⎞`,l=`⎟`,u=`⎠`,p=`Size4-Regular`,d=`rparen`,f=875):e===`\\{`||e===`\\lbrace`?(o=`⎧`,s=`⎨`,u=`⎩`,l=`⎪`,p=`Size4-Regular`):e===`\\}`||e===`\\rbrace`?(o=`⎫`,s=`⎬`,u=`⎭`,l=`⎪`,p=`Size4-Regular`):e===`\\lgroup`||e===`⟮`?(o=`⎧`,u=`⎩`,l=`⎪`,p=`Size4-Regular`):e===`\\rgroup`||e===`⟯`?(o=`⎫`,u=`⎭`,l=`⎪`,p=`Size4-Regular`):e===`\\lmoustache`||e===`⎰`?(o=`⎧`,u=`⎭`,l=`⎪`,p=`Size4-Regular`):(e===`\\rmoustache`||e===`⎱`)&&(o=`⎫`,u=`⎩`,l=`⎪`,p=`Size4-Regular`);var m=ra(o,p,i),h=m.height+m.depth,g=ra(l,p,i),_=g.height+g.depth,v=ra(u,p,i),y=v.height+v.depth,b=0,x=1;if(s!==null){var S=ra(s,p,i);b=S.height+S.depth,x=2}var C=h+y+b,w=C+Math.max(0,Math.ceil((t-C)/(x*_)))*x*_,T=r.fontMetrics().axisHeight;n&&(T*=r.sizeMultiplier);var E=w/2-T,D=[];if(d.length>0){var O=w-h-y,k=Math.round(w*1e3),A=Gee(d,Math.round(O*1e3)),j=new ir(d,A),M=Jn(f/1e3),N=Jn(k/1e3),P=ii([],[new rr([j],{width:M,height:N,viewBox:`0 0 `+f+` `+k})],r);P.height=k/1e3,P.style.width=M,P.style.height=N,D.push({type:`elem`,elem:P})}else{if(D.push(sa(u,p,i)),D.push(ua),s===null){var F=w-h-y+2*la;D.push(ca(l,F,r))}else{var I=(w-h-y-b)/2+2*la;D.push(ca(l,I,r)),D.push(ua),D.push(sa(s,p,i)),D.push(ua),D.push(ca(l,I,r))}D.push(ua),D.push(sa(o,p,i))}var L=r.havingBaseStyle(Rn.TEXT);return ia(ri([`delimsizing`,`mult`],[ci({positionType:`bottom`,positionData:E,children:D})],L),Rn.TEXT,r,a)},fa=80,pa=.08,ma=function(e,t,n,r,i){var a=Uee(e,r,n),o=new ir(e,a);return ii([`hide-tail`],[new rr([o],{width:`400em`,height:Jn(t),viewBox:`0 0 400000 `+n,preserveAspectRatio:`xMinYMin slice`})],i)},Ate=function(e,t){var n=t.havingBaseSizing(),r=ba(`\\surd`,e*n.sizeMultiplier,ya,n),i=n.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,s,l,u,d;return r.type===`small`?(u=1e3+1e3*a+fa,e<1?i=1:e<1.4&&(i=.7),s=(1+a+pa)/i,l=(1+a)/i,o=ma(`sqrtMain`,s,u,a,t),o.style.minWidth=`0.853em`,d=.833/i):r.type===`large`?(u=(1e3+fa)*_a[r.size],l=(_a[r.size]+a)/i,s=(_a[r.size]+a+pa)/i,o=ma(`sqrtSize`+r.size,s,u,a,t),o.style.minWidth=`1.02em`,d=1/i):(s=e+a+pa,l=e+a,u=Math.floor(1e3*e+a)+fa,o=ma(`sqrtTall`,s,u,a,t),o.style.minWidth=`0.742em`,d=1.056),o.height=l,o.style.height=Jn(s),{span:o,advanceWidth:d,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},ha=new Set([`(`,`\\lparen`,`)`,`\\rparen`,`[`,`\\lbrack`,`]`,`\\rbrack`,`\\{`,`\\lbrace`,`\\}`,`\\rbrace`,`\\lfloor`,`\\rfloor`,`⌊`,`⌋`,`\\lceil`,`\\rceil`,`⌈`,`⌉`,`\\surd`]),jte=new Set([`\\uparrow`,`\\downarrow`,`\\updownarrow`,`\\Uparrow`,`\\Downarrow`,`\\Updownarrow`,`|`,`\\|`,`\\vert`,`\\Vert`,`\\lvert`,`\\rvert`,`\\lVert`,`\\rVert`,`\\lgroup`,`\\rgroup`,`⟮`,`⟯`,`\\lmoustache`,`\\rmoustache`,`⎰`,`⎱`]),ga=new Set([`<`,`>`,`\\langle`,`\\rangle`,`/`,`\\backslash`,`\\lt`,`\\gt`]),_a=[0,1.2,1.8,2.4,3],va=function(e,t,n,r,i){if(e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`),ha.has(e)||ga.has(e))return oa(e,t,!1,n,r,i);if(jte.has(e))return da(e,_a[t],!1,n,r,i);throw new Sn(`Illegal delimiter: '`+e+`'`)},Mte=[{type:`small`,style:Rn.SCRIPTSCRIPT},{type:`small`,style:Rn.SCRIPT},{type:`small`,style:Rn.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4}],Nte=[{type:`small`,style:Rn.SCRIPTSCRIPT},{type:`small`,style:Rn.SCRIPT},{type:`small`,style:Rn.TEXT},{type:`stack`}],ya=[{type:`small`,style:Rn.SCRIPTSCRIPT},{type:`small`,style:Rn.SCRIPT},{type:`small`,style:Rn.TEXT},{type:`large`,size:1},{type:`large`,size:2},{type:`large`,size:3},{type:`large`,size:4},{type:`stack`}],Pte=function(e){if(e.type===`small`)return`Main-Regular`;if(e.type===`large`)return`Size`+e.size+`-Regular`;if(e.type===`stack`)return`Size4-Regular`;var t=e.type;throw Error(`Add support for delim type '`+t+`' here.`)},ba=function(e,t,n,r){for(var i=Math.min(2,3-r.style.size);i<n.length;i++){var a=n[i];if(a.type===`stack`)break;var o=ra(e,Pte(a),`math`),s=o.height+o.depth;if(a.type===`small`){var l=r.havingBaseStyle(a.style);s*=l.sizeMultiplier}if(s>t)return a}return n[n.length-1]},xa=function(e,t,n,r,i,a){e===`<`||e===`\\lt`||e===`⟨`?e=`\\langle`:(e===`>`||e===`\\gt`||e===`⟩`)&&(e=`\\rangle`);var o=ga.has(e)?Mte:ha.has(e)?ya:Nte,s=ba(e,t,o,r);return s.type===`small`?Ete(e,s.style,n,r,i,a):s.type===`large`?oa(e,s.size,n,r,i,a):da(e,t,n,r,i,a)},Sa=function(e,t,n,r,i,a){var o=r.fontMetrics().axisHeight*r.sizeMultiplier,s=901,l=5/r.fontMetrics().ptPerEm,u=Math.max(t-o,n+o);return xa(e,Math.max(u/500*s,2*u-l),!0,r,i,a)},Ca={"\\bigl":{mclass:`mopen`,size:1},"\\Bigl":{mclass:`mopen`,size:2},"\\biggl":{mclass:`mopen`,size:3},"\\Biggl":{mclass:`mopen`,size:4},"\\bigr":{mclass:`mclose`,size:1},"\\Bigr":{mclass:`mclose`,size:2},"\\biggr":{mclass:`mclose`,size:3},"\\Biggr":{mclass:`mclose`,size:4},"\\bigm":{mclass:`mrel`,size:1},"\\Bigm":{mclass:`mrel`,size:2},"\\biggm":{mclass:`mrel`,size:3},"\\Biggm":{mclass:`mrel`,size:4},"\\big":{mclass:`mord`,size:1},"\\Big":{mclass:`mord`,size:2},"\\bigg":{mclass:`mord`,size:3},"\\Bigg":{mclass:`mord`,size:4}},Fte=new Set(`(,\\lparen,),\\rparen,[,\\lbrack,],\\rbrack,\\{,\\lbrace,\\},\\rbrace,\\lfloor,\\rfloor,⌊,⌋,\\lceil,\\rceil,⌈,⌉,<,>,\\langle,⟨,\\rangle,⟩,\\lt,\\gt,\\lvert,\\rvert,\\lVert,\\rVert,\\lgroup,\\rgroup,⟮,⟯,\\lmoustache,\\rmoustache,⎰,⎱,/,\\backslash,|,\\vert,\\|,\\Vert,\\uparrow,\\Uparrow,\\downarrow,\\Downarrow,\\updownarrow,\\Updownarrow,.`.split(`,`)),Qt({type:`delimsizing`,names:[`\\bigl`,`\\Bigl`,`\\biggl`,`\\Biggl`,`\\bigr`,`\\Bigr`,`\\biggr`,`\\Biggr`,`\\bigm`,`\\Bigm`,`\\biggm`,`\\Biggm`,`\\big`,`\\Big`,`\\bigg`,`\\Bigg`],props:{numArgs:1,argTypes:[`primitive`]},handler:(e,t)=>{var n=hn(t[0],e);return{type:`delimsizing`,mode:e.parser.mode,size:Ca[e.funcName].size,mclass:Ca[e.funcName].mclass,delim:n.text}},htmlBuilder:(e,t)=>e.delim===`.`?ri([e.mclass]):va(e.delim,e.size,t,e.mode,[e.mclass]),mathmlBuilder:e=>{var t=[];e.delim!==`.`&&t.push(Mi(e.delim,e.mode));var n=new ki(`mo`,t);e.mclass===`mopen`||e.mclass===`mclose`?n.setAttribute(`fence`,`true`):n.setAttribute(`fence`,`false`),n.setAttribute(`stretchy`,`true`);var r=Jn(_a[e.size]);return n.setAttribute(`minsize`,r),n.setAttribute(`maxsize`,r),n}}),Qt({type:`leftright-right`,names:[`\\right`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=e.parser.gullet.macros.get(`\\current@color`);if(n&&typeof n!=`string`)throw new Sn(`\\current@color set to non-string in \\right`);return{type:`leftright-right`,mode:e.parser.mode,delim:hn(t[0],e).text,color:n}}}),Qt({type:`leftright`,names:[`\\left`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=hn(t[0],e),r=e.parser;++r.leftrightDepth;var i=r.parseExpression(!1);--r.leftrightDepth,r.expect(`\\right`,!1);var a=sn(r.parseFunction(),`leftright-right`);return{type:`leftright`,mode:r.mode,body:i,left:n.text,right:a.delim,rightColor:a.color}},htmlBuilder:(e,t)=>{gn(e);for(var n=Si(e.body,t,!0,[`mopen`,`mclose`]),r=0,i=0,a=!1,o=0;o<n.length;o++){var s=n[o];mn(s)?a=!0:(r=Math.max(n[o].height,r),i=Math.max(n[o].depth,i))}r*=t.sizeMultiplier,i*=t.sizeMultiplier;var l=e.left===`.`?Di(t,[`mopen`]):Sa(e.left,r,i,t,e.mode,[`mopen`]);if(n.unshift(l),a)for(var u=1;u<n.length;u++){var d=n[u];if(mn(d)){var f=d.isMiddle;n[u]=Sa(f.delim,r,i,f.options,e.mode,[])}}var p;if(e.right===`.`)p=Di(t,[`mclose`]);else{var m=e.rightColor?t.withColor(e.rightColor):t;p=Sa(e.right,r,i,m,e.mode,[`mclose`])}return n.push(p),ri([`minner`],n,t)},mathmlBuilder:(e,t)=>{gn(e);var n=Fi(e.body,t);if(e.left!==`.`){var r=new ki(`mo`,[Mi(e.left,e.mode)]);r.setAttribute(`fence`,`true`),n.unshift(r)}if(e.right!==`.`){var i=new ki(`mo`,[Mi(e.right,e.mode)]);i.setAttribute(`fence`,`true`),e.rightColor&&i.setAttribute(`mathcolor`,e.rightColor),n.push(i)}return Ni(n)}}),Qt({type:`middle`,names:[`\\middle`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var n=hn(t[0],e);if(!e.parser.leftrightDepth)throw new Sn(`\\middle without preceding \\left`,n);return{type:`middle`,mode:e.parser.mode,delim:n.text}},htmlBuilder:(e,t)=>{var n;return e.delim===`.`?n=Di(t,[]):(n=va(e.delim,1,t,e.mode,[]),n.isMiddle={delim:e.delim,options:t}),n},mathmlBuilder:(e,t)=>{var n=e.delim===`\\vert`||e.delim===`|`?Mi(`|`,`text`):Mi(e.delim,e.mode),r=new ki(`mo`,[n]);return r.setAttribute(`fence`,`true`),r.setAttribute(`lspace`,`0.05em`),r.setAttribute(`rspace`,`0.05em`),r}}),wa=(e,t)=>{var n=si(Oi(e.body,t),t),r=e.label.slice(1),i=t.sizeMultiplier,a,o,s=Tn(e.body);if(r===`sout`)a=ri([`stretchy`,`sout`]),a.height=t.fontMetrics().defaultRuleThickness/i,o=-.5*t.fontMetrics().xHeight;else if(r===`phase`){var l=qn({number:.6,unit:`pt`},t),u=qn({number:.35,unit:`ex`},t),d=t.havingBaseSizing();i/=d.sizeMultiplier;var f=n.height+n.depth+l+u;n.style.paddingLeft=Jn(f/2+l);var p=Math.floor(1e3*f*i),m=Vee(p);a=ii([`hide-tail`],[new rr([new ir(`phase`,m)],{width:`400em`,height:Jn(p/1e3),viewBox:`0 0 400000 `+p,preserveAspectRatio:`xMinYMin slice`})],t),a.style.height=Jn(f),o=n.depth+l+u}else{/cancel/.test(r)?s||n.classes.push(`cancel-pad`):r===`angl`?n.classes.push(`anglpad`):n.classes.push(`boxpad`);var h,g,_=0;/box/.test(r)?(_=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),h=t.fontMetrics().fboxsep+(r===`colorbox`?0:_),g=h):r===`angl`?(_=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness),h=4*_,g=Math.max(0,.25-n.depth)):(h=s?.2:0,g=h),a=yte(n,r,h,g,t),/fbox|boxed|fcolorbox/.test(r)?(a.style.borderStyle=`solid`,a.style.borderWidth=Jn(_)):r===`angl`&&_!==.049&&(a.style.borderTopWidth=Jn(_),a.style.borderRightWidth=Jn(_)),o=n.depth+g,e.backgroundColor&&(a.style.backgroundColor=e.backgroundColor,e.borderColor&&(a.style.borderColor=e.borderColor))}var v;if(e.backgroundColor)v=ci({positionType:`individualShift`,children:[{type:`elem`,elem:a,shift:o},{type:`elem`,elem:n,shift:0}]});else{var y=/cancel|phase/.test(r)?[`svg-align`]:[];v=ci({positionType:`individualShift`,children:[{type:`elem`,elem:n,shift:0},{type:`elem`,elem:a,shift:o,wrapperClasses:y}]})}return/cancel/.test(r)&&(v.height=n.height,v.depth=n.depth),/cancel/.test(r)&&!s?ri([`mord`,`cancel-lap`],[v],t):ri([`mord`],[v],t)},Ta=(e,t)=>{var n,r=new ki(e.label.includes(`colorbox`)?`mpadded`:`menclose`,[Li(e.body,t)]);switch(e.label){case`\\cancel`:r.setAttribute(`notation`,`updiagonalstrike`);break;case`\\bcancel`:r.setAttribute(`notation`,`downdiagonalstrike`);break;case`\\phase`:r.setAttribute(`notation`,`phasorangle`);break;case`\\sout`:r.setAttribute(`notation`,`horizontalstrike`);break;case`\\fbox`:r.setAttribute(`notation`,`box`);break;case`\\angl`:r.setAttribute(`notation`,`actuarial`);break;case`\\fcolorbox`:case`\\colorbox`:if(n=t.fontMetrics().fboxsep*t.fontMetrics().ptPerEm,r.setAttribute(`width`,`+`+2*n+`pt`),r.setAttribute(`height`,`+`+2*n+`pt`),r.setAttribute(`lspace`,n+`pt`),r.setAttribute(`voffset`,n+`pt`),e.label===`\\fcolorbox`){var i=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness);r.setAttribute(`style`,`border: `+Jn(i)+` solid `+e.borderColor)}break;case`\\xcancel`:r.setAttribute(`notation`,`updiagonalstrike downdiagonalstrike`)}return e.backgroundColor&&r.setAttribute(`mathbackground`,e.backgroundColor),r},Qt({type:`enclose`,names:[`\\colorbox`],props:{numArgs:2,allowedInText:!0,argTypes:[`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=sn(t[0],`color-token`).color,o=t[1];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:a,body:o}},htmlBuilder:wa,mathmlBuilder:Ta}),Qt({type:`enclose`,names:[`\\fcolorbox`],props:{numArgs:3,allowedInText:!0,argTypes:[`color`,`color`,`hbox`]},handler(e,t,n){var{parser:r,funcName:i}=e,a=sn(t[0],`color-token`).color,o=sn(t[1],`color-token`).color,s=t[2];return{type:`enclose`,mode:r.mode,label:i,backgroundColor:o,borderColor:a,body:s}},htmlBuilder:wa,mathmlBuilder:Ta}),Qt({type:`enclose`,names:[`\\fbox`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\fbox`,body:t[0]}}}),Qt({type:`enclose`,names:[`\\cancel`,`\\bcancel`,`\\xcancel`,`\\phase`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:wa,mathmlBuilder:Ta}),Qt({type:`enclose`,names:[`\\sout`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e;n.mode===`math`&&n.settings.reportNonstrict(`mathVsSout`,`LaTeX's \\sout works only in text mode`);var i=t[0];return{type:`enclose`,mode:n.mode,label:r,body:i}},htmlBuilder:wa,mathmlBuilder:Ta}),Qt({type:`enclose`,names:[`\\angl`],props:{numArgs:1,argTypes:[`hbox`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`enclose`,mode:n.mode,label:`\\angl`,body:t[0]}}}),Ea={},Da={},Oa=class e{constructor(e,t,n){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=e,this.start=t,this.end=n}static range(t,n){return n?!t||!t.loc||!n.loc||t.loc.lexer!==n.loc.lexer?null:new e(t.loc.lexer,t.loc.start,n.loc.end):t&&t.loc}},ka=class e{constructor(e,t){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=e,this.loc=t}range(t,n){return new e(n,Oa.range(this,t))}},Aa=e=>{if(!e.parser.settings.displayMode)throw new Sn(`{`+e.envName+`} can be used only in display mode.`)},Ite=new Set([`gather`,`gather*`]),ja=function(e,t){var n,r,i=e.body.length,a=e.hLinesBeforeRow,o=0,s=Array(i),l=[],u=Math.max(t.fontMetrics().arrayRuleWidth,t.minRuleThickness),d=1/t.fontMetrics().ptPerEm,f=5*d;e.colSeparationType&&e.colSeparationType===`small`&&(f=.2778*(t.havingStyle(Rn.SCRIPT).sizeMultiplier/t.sizeMultiplier));var p=e.colSeparationType===`CD`?qn({number:3,unit:`ex`},t):12*d,m=3*d,h=e.arraystretch*p,g=.7*h,_=.3*h,v=0;function y(e){for(var t=0;t<e.length;++t)t>0&&(v+=.25),l.push({pos:v,isDashed:e[t]})}for(y(a[0]),n=0;n<e.body.length;++n){var b=e.body[n],x=g,S=_;o<b.length&&(o=b.length);var C={cells:Array(b.length),height:0,depth:0,pos:0};for(r=0;r<b.length;++r){var w=Oi(b[r],t);S<w.depth&&(S=w.depth),x<w.height&&(x=w.height),C.cells[r]=w}var T=e.rowGaps[n],E=0;T&&(E=qn(T,t),E>0&&(E+=_,S<E&&(S=E),E=0)),e.addJot&&n<e.body.length-1&&(S+=m),C.height=x,C.depth=S,v+=x,C.pos=v,v+=S+E,s[n]=C,y(a[n+1])}var D=v/2+t.fontMetrics().axisHeight,O=e.cols||[],k=[],A,j,M=[];if(e.tags&&e.tags.some(e=>e))for(n=0;n<i;++n){var N=s[n],P=N.pos-D,F=e.tags[n],I=void 0;I=F===!0?ri([`eqn-num`],[],t):F===!1?ri([],[],t):ri([],Si(F,t,!0),t),I.depth=N.depth,I.height=N.height,M.push({type:`elem`,elem:I,shift:P})}for(r=0,j=0;r<o||j<O.length;++r,++j){for(var L=O[j],R=!0;(ee=L)?.type===`separator`;){var ee;if(R||(A=ri([`arraycolsep`],[]),A.style.width=Jn(t.fontMetrics().doubleRuleSep),k.push(A)),L.separator===`|`||L.separator===`:`){var z=L.separator===`|`?`solid`:`dashed`,B=ri([`vertical-separator`],[],t);B.style.height=Jn(v),B.style.borderRightWidth=Jn(u),B.style.borderRightStyle=z,B.style.margin=`0 `+Jn(-u/2);var te=v-D;te&&(B.style.verticalAlign=Jn(-te)),k.push(B)}else throw new Sn(`Invalid separator type: `+L.separator);j++,L=O[j],R=!1}if(!(r>=o)){var ne=void 0;(r>0||e.hskipBeforeAndAfter)&&(ne=L?.pregap??f,ne!==0&&(A=ri([`arraycolsep`],[]),A.style.width=Jn(ne),k.push(A)));var re=[];for(n=0;n<i;++n){var ie=s[n],ae=ie.cells[r];if(ae){var oe=ie.pos-D;ae.depth=ie.depth,ae.height=ie.height,re.push({type:`elem`,elem:ae,shift:oe})}}var se=ci({positionType:`individualShift`,children:re}),ce=ri([`col-align-`+(L?.align||`c`)],[se]);k.push(ce),(r<o-1||e.hskipBeforeAndAfter)&&(ne=L?.postgap??f,ne!==0&&(A=ri([`arraycolsep`],[]),A.style.width=Jn(ne),k.push(A)))}}var le=ri([`mtable`],k);if(l.length>0){for(var ue=ai(`hline`,t,u),de=ai(`hdashline`,t,u),fe=[{type:`elem`,elem:le,shift:0}];l.length>0;){var pe=l.pop(),me=pe.pos-D;pe.isDashed?fe.push({type:`elem`,elem:de,shift:me}):fe.push({type:`elem`,elem:ue,shift:me})}le=ci({positionType:`individualShift`,children:fe})}if(M.length===0)return ri([`mord`],[le],t);var he=ri([`tag`],[ci({positionType:`individualShift`,children:M})],t);return oi([le,he])},Lte={c:`center `,l:`left `,r:`right `},Ma=function(e,t){for(var n=[],r=new ki(`mtd`,[],[`mtr-glue`]),i=new ki(`mtd`,[],[`mml-eqn-num`]),a=0;a<e.body.length;a++){for(var o=e.body[a],s=[],l=0;l<o.length;l++)s.push(new ki(`mtd`,[Li(o[l],t)]));e.tags&&e.tags[a]&&(s.unshift(r),s.push(r),e.leqno?s.unshift(i):s.push(i)),n.push(new ki(`mtr`,s))}var u=new ki(`mtable`,n),d=e.arraystretch===.5?.1:.16+e.arraystretch-1+(e.addJot?.09:0);u.setAttribute(`rowspacing`,Jn(d));var f=``,p=``;if(e.cols&&e.cols.length>0){var m=e.cols,h=``,g=!1,_=0,v=m.length;m[0].type===`separator`&&(f+=`top `,_=1),m[m.length-1].type===`separator`&&(f+=`bottom `,--v);for(var y=_;y<v;y++){var b=m[y];b.type===`align`?(p+=Lte[b.align],g&&(h+=`none `),g=!0):b.type===`separator`&&(g&&=(h+=b.separator===`|`?`solid `:`dashed `,!1))}u.setAttribute(`columnalign`,p.trim()),/[sd]/.test(h)&&u.setAttribute(`columnlines`,h.trim())}if(e.colSeparationType===`align`){for(var x=e.cols||[],S=``,C=1;C<x.length;C++)S+=C%2?`0em `:`1em `;u.setAttribute(`columnspacing`,S.trim())}else e.colSeparationType===`alignat`||e.colSeparationType===`gather`?u.setAttribute(`columnspacing`,`0em`):e.colSeparationType===`small`?u.setAttribute(`columnspacing`,`0.2778em`):e.colSeparationType===`CD`?u.setAttribute(`columnspacing`,`0.5em`):u.setAttribute(`columnspacing`,`1em`);var w=``,T=e.hLinesBeforeRow;f+=T[0].length>0?`left `:``,f+=T[T.length-1].length>0?`right `:``;for(var E=1;E<T.length-1;E++)w+=T[E].length===0?`none `:T[E][0]?`dashed `:`solid `;return/[sd]/.test(w)&&u.setAttribute(`rowlines`,w.trim()),f!==``&&(u=new ki(`menclose`,[u]),u.setAttribute(`notation`,f.trim())),e.arraystretch&&e.arraystretch<1&&(u=new ki(`mstyle`,[u]),u.setAttribute(`scriptlevel`,`1`)),u},Na=function(e,t){e.envName.includes(`ed`)||Aa(e);var n=[],r=e.envName.includes(`at`)?`alignat`:`align`,i=e.envName===`split`,a=bn(e.parser,{cols:n,addJot:!0,autoTag:i?void 0:yn(e.envName),emptySingleRow:!0,colSeparationType:r,maxNumCols:i?2:void 0,leqno:e.parser.settings.leqno},`display`),o=0,s=0,l={type:`ordgroup`,mode:e.mode,body:[]};if(t[0]&&t[0].type===`ordgroup`){for(var u=``,d=0;d<t[0].body.length;d++){var f=sn(t[0].body[d],`textord`);u+=f.text}o=Number(u),s=o*2}var p=!s;a.body.forEach(function(e){for(var t=1;t<e.length;t+=2)sn(sn(e[t],`styling`).body[0],`ordgroup`).body.unshift(l);if(p)s<e.length&&(s=e.length);else{var n=e.length/2;if(o<n)throw new Sn(`Too many math in a row: `+(`expected `+o+`, but got `+n),e[0])}});for(var m=0;m<s;++m){var h=`r`,g=0;m%2==1?h=`l`:m>0&&p&&(g=1),n[m]={type:`align`,align:h,pregap:g,postgap:0}}return a.colSeparationType=p?`align`:`alignat`,a},_n({type:`array`,names:[`array`,`darray`],props:{numArgs:1},handler(e,t){var n=(ln(t[0])?[t[0]]:sn(t[0],`ordgroup`).body).map(function(e){var t=cn(e).text;if(`lcr`.includes(t))return{type:`align`,align:t};if(t===`|`)return{type:`separator`,separator:`|`};if(t===`:`)return{type:`separator`,separator:`:`};throw new Sn(`Unknown column alignment: `+t,e)}),r={cols:n,hskipBeforeAndAfter:!0,maxNumCols:n.length};return bn(e.parser,r,xn(e.envName))},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`matrix`,`pmatrix`,`bmatrix`,`Bmatrix`,`vmatrix`,`Vmatrix`,`matrix*`,`pmatrix*`,`bmatrix*`,`Bmatrix*`,`vmatrix*`,`Vmatrix*`],props:{numArgs:0},handler(e){var t={matrix:null,pmatrix:[`(`,`)`],bmatrix:[`[`,`]`],Bmatrix:[`\\{`,`\\}`],vmatrix:[`|`,`|`],Vmatrix:[`\\Vert`,`\\Vert`]}[e.envName.replace(`*`,``)],n=`c`,r={hskipBeforeAndAfter:!1,cols:[{type:`align`,align:n}]};if(e.envName.charAt(e.envName.length-1)===`*`){var i=e.parser;if(i.consumeSpaces(),i.fetch().text===`[`){if(i.consume(),i.consumeSpaces(),n=i.fetch().text,!`lcr`.includes(n))throw new Sn(`Expected l or c or r`,i.nextToken);i.consume(),i.consumeSpaces(),i.expect(`]`),i.consume(),r.cols=[{type:`align`,align:n}]}}var a=bn(e.parser,r,xn(e.envName)),o=Math.max(0,...a.body.map(e=>e.length));return a.cols=Array(o).fill({type:`align`,align:n}),t?{type:`leftright`,mode:e.mode,body:[a],left:t[0],right:t[1],rightColor:void 0}:a},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`smallmatrix`],props:{numArgs:0},handler(e){var t=bn(e.parser,{arraystretch:.5},`script`);return t.colSeparationType=`small`,t},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`subarray`],props:{numArgs:1},handler(e,t){var n=(ln(t[0])?[t[0]]:sn(t[0],`ordgroup`).body).map(function(e){var t=cn(e).text;if(`lc`.includes(t))return{type:`align`,align:t};throw new Sn(`Unknown column alignment: `+t,e)});if(n.length>1)throw new Sn(`{subarray} can contain only one column`);var r={cols:n,hskipBeforeAndAfter:!1,arraystretch:.5},i=bn(e.parser,r,`script`);if(i.body.length>0&&i.body[0].length>1)throw new Sn(`{subarray} can contain only one column`);return i},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`cases`,`dcases`,`rcases`,`drcases`],props:{numArgs:0},handler(e){var t=bn(e.parser,{arraystretch:1.2,cols:[{type:`align`,align:`l`,pregap:0,postgap:1},{type:`align`,align:`l`,pregap:0,postgap:0}]},xn(e.envName));return{type:`leftright`,mode:e.mode,body:[t],left:e.envName.includes(`r`)?`.`:`\\{`,right:e.envName.includes(`r`)?`\\}`:`.`,rightColor:void 0}},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`align`,`align*`,`aligned`,`split`],props:{numArgs:0},handler:Na,htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`gathered`,`gather`,`gather*`],props:{numArgs:0},handler(e){Ite.has(e.envName)&&Aa(e);var t={cols:[{type:`align`,align:`c`}],addJot:!0,colSeparationType:`gather`,autoTag:yn(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return bn(e.parser,t,`display`)},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`alignat`,`alignat*`,`alignedat`],props:{numArgs:1},handler:Na,htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`equation`,`equation*`],props:{numArgs:0},handler(e){Aa(e);var t={autoTag:yn(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return bn(e.parser,t,`display`)},htmlBuilder:ja,mathmlBuilder:Ma}),_n({type:`array`,names:[`CD`],props:{numArgs:0},handler(e){return Aa(e),pn(e.parser)},htmlBuilder:ja,mathmlBuilder:Ma}),G(`\\nonumber`,`\\gdef\\@eqnsw{0}`),G(`\\notag`,`\\nonumber`),Qt({type:`text`,names:[`\\hline`,`\\hdashline`],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,t){throw new Sn(e.funcName+` valid only within array environment`)}}),Pa=Ea,Qt({type:`environment`,names:[`\\begin`,`\\end`],props:{numArgs:1,argTypes:[`text`]},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];if(i.type!==`ordgroup`)throw new Sn(`Invalid environment name`,i);for(var a=``,o=0;o<i.body.length;++o)a+=sn(i.body[o],`textord`).text;if(r===`\\begin`){if(!Pa.hasOwnProperty(a))throw new Sn(`No such environment: `+a,i);var s=Pa[a],{args:l,optArgs:u}=n.parseArguments(`\\begin{`+a+`}`,s),d={mode:n.mode,envName:a,parser:n},f=s.handler(d,l,u);n.expect(`\\end`,!1);var p=n.nextToken,m=sn(n.parseFunction(),`environment`);if(m.name!==a)throw new Sn(`Mismatch: \\begin{`+a+`} matched by \\end{`+m.name+`}`,p);return f}return{type:`environment`,mode:n.mode,name:a,nameGroup:i}}}),Fa=(e,t)=>{var n=e.font,r=t.withFont(n);return Oi(e.body,r)},Ia=(e,t)=>{var n=e.font,r=t.withFont(n);return Li(e.body,r)},La={"\\Bbb":`\\mathbb`,"\\bold":`\\mathbf`,"\\frak":`\\mathfrak`},Qt({type:`font`,names:[`\\mathrm`,`\\mathit`,`\\mathbf`,`\\mathnormal`,`\\mathsfit`,`\\mathbb`,`\\mathcal`,`\\mathfrak`,`\\mathscr`,`\\mathsf`,`\\mathtt`,`\\Bbb`,`\\bold`,`\\frak`],props:{numArgs:1,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=bi(t[0]),a=r;return a in La&&(a=La[a]),{type:`font`,mode:n.mode,font:a.slice(1),body:i}},htmlBuilder:Fa,mathmlBuilder:Ia}),Qt({type:`mclass`,names:[`\\boldsymbol`,`\\bm`],props:{numArgs:1},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`mclass`,mode:n.mode,mclass:Yi(r),body:[{type:`font`,mode:n.mode,font:`boldsymbol`,body:r}],isCharacterBox:Tn(r)}}}),Qt({type:`font`,names:[`\\rm`,`\\sf`,`\\tt`,`\\bf`,`\\it`,`\\cal`],props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,breakOnTokenText:i}=e,{mode:a}=n,o=n.parseExpression(!0,i);return{type:`font`,mode:a,font:`math`+r.slice(1),body:{type:`ordgroup`,mode:n.mode,body:o}}},htmlBuilder:Fa,mathmlBuilder:Ia}),Rte=(e,t)=>{var n=t.style,r=n.fracNum(),i=n.fracDen(),a=t.havingStyle(r),o=Oi(e.numer,a,t);if(e.continued){var s=8.5/t.fontMetrics().ptPerEm,l=3.5/t.fontMetrics().ptPerEm;o.height=o.height<s?s:o.height,o.depth=o.depth<l?l:o.depth}a=t.havingStyle(i);var u=Oi(e.denom,a,t),d,f,p;e.hasBarLine?(e.barSize?(f=qn(e.barSize,t),d=ai(`frac-line`,t,f)):d=ai(`frac-line`,t),f=d.height,p=d.height):(d=null,f=0,p=t.fontMetrics().defaultRuleThickness);var m,h,g;n.size===Rn.DISPLAY.size?(m=t.fontMetrics().num1,h=f>0?3*p:7*p,g=t.fontMetrics().denom1):(f>0?(m=t.fontMetrics().num2,h=p):(m=t.fontMetrics().num3,h=3*p),g=t.fontMetrics().denom2);var _;if(d){var v=t.fontMetrics().axisHeight;m-o.depth-(v+.5*f)<h&&(m+=h-(m-o.depth-(v+.5*f))),v-.5*f-(u.height-g)<h&&(g+=h-(v-.5*f-(u.height-g)));var y=-(v-.5*f);_=ci({positionType:`individualShift`,children:[{type:`elem`,elem:u,shift:g},{type:`elem`,elem:d,shift:y},{type:`elem`,elem:o,shift:-m}]})}else{var b=m-o.depth-(u.height-g);b<h&&(m+=.5*(h-b),g+=.5*(h-b)),_=ci({positionType:`individualShift`,children:[{type:`elem`,elem:u,shift:g},{type:`elem`,elem:o,shift:-m}]})}a=t.havingStyle(n),_.height*=a.sizeMultiplier/t.sizeMultiplier,_.depth*=a.sizeMultiplier/t.sizeMultiplier;var x=n.size===Rn.DISPLAY.size?t.fontMetrics().delim1:n.size===Rn.SCRIPTSCRIPT.size?t.havingStyle(Rn.SCRIPT).fontMetrics().delim2:t.fontMetrics().delim2,S=e.leftDelim==null?Di(t,[`mopen`]):xa(e.leftDelim,x,!0,t.havingStyle(n),e.mode,[`mopen`]),C=e.continued?ri([]):e.rightDelim==null?Di(t,[`mclose`]):xa(e.rightDelim,x,!0,t.havingStyle(n),e.mode,[`mclose`]);return ri([`mord`].concat(a.sizingClasses(t)),[S,ri([`mfrac`],[_]),C],t)},zte=(e,t)=>{var n=new ki(`mfrac`,[Li(e.numer,t),Li(e.denom,t)]);if(!e.hasBarLine)n.setAttribute(`linethickness`,`0px`);else if(e.barSize){var r=qn(e.barSize,t);n.setAttribute(`linethickness`,Jn(r))}if(e.leftDelim!=null||e.rightDelim!=null){var i=[];if(e.leftDelim!=null){var a=new ki(`mo`,[new Ai(e.leftDelim.replace(`\\`,``))]);a.setAttribute(`fence`,`true`),i.push(a)}if(i.push(n),e.rightDelim!=null){var o=new ki(`mo`,[new Ai(e.rightDelim.replace(`\\`,``))]);o.setAttribute(`fence`,`true`),i.push(o)}return Ni(i)}return n},Ra=(e,t)=>t?{type:`styling`,mode:e.mode,style:t,body:[e]}:e,Qt({type:`genfrac`,names:[`\\cfrac`,`\\dfrac`,`\\frac`,`\\tfrac`,`\\dbinom`,`\\binom`,`\\tbinom`,`\\\\atopfrac`,`\\\\bracefrac`,`\\\\brackfrac`],props:{numArgs:2,allowedInArgument:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=t[1],o,s=null,l=null;switch(r){case`\\cfrac`:case`\\dfrac`:case`\\frac`:case`\\tfrac`:o=!0;break;case`\\\\atopfrac`:o=!1;break;case`\\dbinom`:case`\\binom`:case`\\tbinom`:o=!1,s=`(`,l=`)`;break;case`\\\\bracefrac`:o=!1,s=`\\{`,l=`\\}`;break;case`\\\\brackfrac`:o=!1,s=`[`,l=`]`;break;default:throw Error(`Unrecognized genfrac command`)}var u=r===`\\cfrac`,d=null;return u||r.startsWith(`\\d`)?d=`display`:r.startsWith(`\\t`)&&(d=`text`),Ra({type:`genfrac`,mode:n.mode,numer:i,denom:a,continued:u,hasBarLine:o,leftDelim:s,rightDelim:l,barSize:null},d)},htmlBuilder:Rte,mathmlBuilder:zte}),Qt({type:`infix`,names:[`\\over`,`\\choose`,`\\atop`,`\\brace`,`\\brack`],props:{numArgs:0,infix:!0},handler(e){var{parser:t,funcName:n,token:r}=e,i;switch(n){case`\\over`:i=`\\frac`;break;case`\\choose`:i=`\\binom`;break;case`\\atop`:i=`\\\\atopfrac`;break;case`\\brace`:i=`\\\\bracefrac`;break;case`\\brack`:i=`\\\\brackfrac`;break;default:throw Error(`Unrecognized infix genfrac command`)}return{type:`infix`,mode:t.mode,replaceWith:i,token:r}}}),za=[`display`,`text`,`script`,`scriptscript`],Ba=function(e){var t=null;return e.length>0&&(t=e,t=t===`.`?null:t),t},Qt({type:`genfrac`,names:[`\\genfrac`],props:{numArgs:6,allowedInArgument:!0,argTypes:[`math`,`math`,`size`,`text`,`math`,`math`]},handler(e,t){var{parser:n}=e,r=t[4],i=t[5],a=bi(t[0]),o=a.type===`atom`&&a.family===`open`?Ba(a.text):null,s=bi(t[1]),l=s.type===`atom`&&s.family===`close`?Ba(s.text):null,u=sn(t[2],`size`),d,f=null;u.isBlank?d=!0:(f=u.value,d=f.number>0);var p=null,m=t[3];if(m.type===`ordgroup`){if(m.body.length>0){var h=sn(m.body[0],`textord`);p=za[Number(h.text)]}}else m=sn(m,`textord`),p=za[Number(m.text)];return Ra({type:`genfrac`,mode:n.mode,numer:r,denom:i,continued:!1,hasBarLine:d,barSize:f,leftDelim:o,rightDelim:l},p)}}),Qt({type:`infix`,names:[`\\above`],props:{numArgs:1,argTypes:[`size`],infix:!0},handler(e,t){var{parser:n,funcName:r,token:i}=e;return{type:`infix`,mode:n.mode,replaceWith:`\\\\abovefrac`,size:sn(t[0],`size`).value,token:i}}}),Qt({type:`genfrac`,names:[`\\\\abovefrac`],props:{numArgs:3,argTypes:[`math`,`size`,`math`]},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0],a=sn(t[1],`infix`).size;if(!a)throw Error(`\\\\abovefrac expected size, but got `+String(a));var o=t[2],s=a.number>0;return{type:`genfrac`,mode:n.mode,numer:i,denom:o,continued:!1,hasBarLine:s,barSize:a,leftDelim:null,rightDelim:null}}}),Va=(e,t)=>{var n=t.style,r,i;e.type===`supsub`?(r=e.sup?Oi(e.sup,t.havingStyle(n.sup()),t):Oi(e.sub,t.havingStyle(n.sub()),t),i=sn(e.base,`horizBrace`)):i=sn(e,`horizBrace`);var a=Oi(i.base,t.havingBaseStyle(Rn.DISPLAY)),o=Wi(i,t),s=i.isOver?ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:a},{type:`kern`,size:.1},{type:`elem`,elem:o,wrapperClasses:[`svg-align`]}]}):ci({positionType:`bottom`,positionData:a.depth+.1+o.height,children:[{type:`elem`,elem:o,wrapperClasses:[`svg-align`]},{type:`kern`,size:.1},{type:`elem`,elem:a}]});if(r){var l=ri([`minner`,i.isOver?`mover`:`munder`],[s],t);s=i.isOver?ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:l},{type:`kern`,size:.2},{type:`elem`,elem:r}]}):ci({positionType:`bottom`,positionData:l.depth+.2+r.height+r.depth,children:[{type:`elem`,elem:r},{type:`kern`,size:.2},{type:`elem`,elem:l}]})}return ri([`minner`,i.isOver?`mover`:`munder`],[s],t)},Bte=(e,t)=>{var n=Ui(e.label);return new ki(e.isOver?`mover`:`munder`,[Li(e.base,t),n])},Qt({type:`horizBrace`,names:[`\\overbrace`,`\\underbrace`,`\\overbracket`,`\\underbracket`],props:{numArgs:1},handler(e,t){var{parser:n,funcName:r}=e;return{type:`horizBrace`,mode:n.mode,label:r,isOver:r.includes(`\\over`),base:t[0]}},htmlBuilder:Va,mathmlBuilder:Bte}),Qt({type:`href`,names:[`\\href`],props:{numArgs:2,argTypes:[`url`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[1],i=sn(t[0],`url`).url;return n.settings.isTrusted({command:`\\href`,url:i})?{type:`href`,mode:n.mode,href:i,body:xi(r)}:n.formatUnsupportedCmd(`\\href`)},htmlBuilder:(e,t)=>{var n=Si(e.body,t,!1);return nte(e.href,[],n,t)},mathmlBuilder:(e,t)=>{var n=Ii(e.body,t);return n instanceof ki||(n=new ki(`mrow`,[n])),n.setAttribute(`href`,e.href),n}}),Qt({type:`href`,names:[`\\url`],props:{numArgs:1,argTypes:[`url`],allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=sn(t[0],`url`).url;if(!n.settings.isTrusted({command:`\\url`,url:r}))return n.formatUnsupportedCmd(`\\url`);for(var i=[],a=0;a<r.length;a++){var o=r[a];o===`~`&&(o=`\\textasciitilde`),i.push({type:`textord`,mode:`text`,text:o})}var s={type:`text`,mode:n.mode,font:`\\texttt`,body:i};return{type:`href`,mode:n.mode,href:r,body:xi(s)}}}),Qt({type:`hbox`,names:[`\\hbox`],props:{numArgs:1,argTypes:[`text`],allowedInText:!0,primitive:!0},handler(e,t){var{parser:n}=e;return{type:`hbox`,mode:n.mode,body:xi(t[0])}},htmlBuilder(e,t){return oi(Si(e.body,t.withFont(``),!1))},mathmlBuilder(e,t){return new ki(`mrow`,Fi(e.body,t.withFont(``)))}}),Qt({type:`html`,names:[`\\htmlClass`,`\\htmlId`,`\\htmlStyle`,`\\htmlData`],props:{numArgs:2,argTypes:[`raw`,`original`],allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r,token:i}=e,a=sn(t[0],`raw`).string,o=t[1];n.settings.strict&&n.settings.reportNonstrict(`htmlExtension`,`HTML extension is disabled on strict mode`);var s,l={};switch(r){case`\\htmlClass`:l.class=a,s={command:`\\htmlClass`,class:a};break;case`\\htmlId`:l.id=a,s={command:`\\htmlId`,id:a};break;case`\\htmlStyle`:l.style=a,s={command:`\\htmlStyle`,style:a};break;case`\\htmlData`:for(var u=a.split(`,`),d=0;d<u.length;d++){var f=u[d],p=f.indexOf(`=`);if(p<0)throw new Sn(`\\htmlData key/value '`+f+`' missing equals sign`);var m=f.slice(0,p),h=f.slice(p+1);l[`data-`+m.trim()]=h}s={command:`\\htmlData`,attributes:l};break;default:throw Error(`Unrecognized html command`)}return n.settings.isTrusted(s)?{type:`html`,mode:n.mode,attributes:l,body:xi(o)}:n.formatUnsupportedCmd(r)},htmlBuilder:(e,t)=>{var n=Si(e.body,t,!1),r=[`enclosing`];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var i=ri(r,n,t);for(var a in e.attributes)a!==`class`&&e.attributes.hasOwnProperty(a)&&i.setAttribute(a,e.attributes[a]);return i},mathmlBuilder:(e,t)=>Ii(e.body,t)}),Qt({type:`htmlmathml`,names:[`\\html@mathml`],props:{numArgs:2,allowedInArgument:!0,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`htmlmathml`,mode:n.mode,html:xi(t[0]),mathml:xi(t[1])}},htmlBuilder:(e,t)=>oi(Si(e.html,t,!1)),mathmlBuilder:(e,t)=>Ii(e.mathml,t)}),Ha=function(e){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(e))return{number:+e,unit:`bp`};var t=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(e);if(!t)throw new Sn(`Invalid size: '`+e+`' in \\includegraphics`);var n={number:+(t[1]+t[2]),unit:t[3]};if(!Kn(n))throw new Sn(`Invalid unit: '`+n.unit+`' in \\includegraphics.`);return n},Qt({type:`includegraphics`,names:[`\\includegraphics`],props:{numArgs:1,numOptionalArgs:1,argTypes:[`raw`,`url`],allowedInText:!1},handler:(e,t,n)=>{var{parser:r}=e,i={number:0,unit:`em`},a={number:.9,unit:`em`},o={number:0,unit:`em`},s=``;if(n[0])for(var l=sn(n[0],`raw`).string.split(`,`),u=0;u<l.length;u++){var d=l[u].split(`=`);if(d.length===2){var f=d[1].trim();switch(d[0].trim()){case`alt`:s=f;break;case`width`:i=Ha(f);break;case`height`:a=Ha(f);break;case`totalheight`:o=Ha(f);break;default:throw new Sn(`Invalid key: '`+d[0]+`' in \\includegraphics.`)}}}var p=sn(t[0],`url`).url;return s===``&&(s=p,s=s.replace(/^.*[\\/]/,``),s=s.substring(0,s.lastIndexOf(`.`))),r.settings.isTrusted({command:`\\includegraphics`,url:p})?{type:`includegraphics`,mode:r.mode,alt:s,width:i,height:a,totalheight:o,src:p}:r.formatUnsupportedCmd(`\\includegraphics`)},htmlBuilder:(e,t)=>{var n=qn(e.height,t),r=0;e.totalheight.number>0&&(r=qn(e.totalheight,t)-n);var i=0;e.width.number>0&&(i=qn(e.width,t));var a={height:Jn(n+r)};i>0&&(a.width=Jn(i)),r>0&&(a.verticalAlign=Jn(-r));var o=new Jee(e.src,e.alt,a);return o.height=n,o.depth=r,o},mathmlBuilder:(e,t)=>{var n=new ki(`mglyph`,[]);n.setAttribute(`alt`,e.alt);var r=qn(e.height,t),i=0;if(e.totalheight.number>0&&(i=qn(e.totalheight,t)-r,n.setAttribute(`valign`,Jn(-i))),n.setAttribute(`height`,Jn(r+i)),e.width.number>0){var a=qn(e.width,t);n.setAttribute(`width`,Jn(a))}return n.setAttribute(`src`,e.src),n}}),Qt({type:`kern`,names:[`\\kern`,`\\mkern`,`\\hskip`,`\\mskip`],props:{numArgs:1,argTypes:[`size`],primitive:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=sn(t[0],`size`);if(n.settings.strict){var a=r[1]===`m`,o=i.value.unit===`mu`;a?(o||n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` supports only mu units, `+(`not `+i.value.unit+` units`)),n.mode!==`math`&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` works only in math mode`)):o&&n.settings.reportNonstrict(`mathVsTextUnits`,`LaTeX's `+r+` doesn't support mu units`)}return{type:`kern`,mode:n.mode,dimension:i.value}},htmlBuilder(e,t){return li(e.dimension,t)},mathmlBuilder(e,t){var n=qn(e.dimension,t);return new ji(n)}}),Qt({type:`lap`,names:[`\\mathllap`,`\\mathrlap`,`\\mathclap`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`lap`,mode:n.mode,alignment:r.slice(5),body:i}},htmlBuilder:(e,t)=>{var n;e.alignment===`clap`?(n=ri([],[Oi(e.body,t)]),n=ri([`inner`],[n],t)):n=ri([`inner`],[Oi(e.body,t)]);var r=ri([`fix`],[]),i=ri([e.alignment],[n,r],t),a=ri([`strut`]);return a.style.height=Jn(i.height+i.depth),i.depth&&(a.style.verticalAlign=Jn(-i.depth)),i.children.unshift(a),i=ri([`thinbox`],[i],t),ri([`mord`,`vbox`],[i],t)},mathmlBuilder:(e,t)=>{var n=new ki(`mpadded`,[Li(e.body,t)]);if(e.alignment!==`rlap`){var r=e.alignment===`llap`?`-1`:`-0.5`;n.setAttribute(`lspace`,r+`width`)}return n.setAttribute(`width`,`0px`),n}}),Qt({type:`styling`,names:[`\\(`,`$`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:n,parser:r}=e,i=r.mode;r.switchMode(`math`);var a=n===`\\(`?`\\)`:`$`,o=r.parseExpression(!1,a);return r.expect(a),r.switchMode(i),{type:`styling`,mode:r.mode,style:`text`,resetFont:!0,body:o}}}),Qt({type:`text`,names:[`\\)`,`\\]`],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new Sn(`Mismatched `+e.funcName)}}),Ua=(e,t)=>{switch(t.style.size){case Rn.DISPLAY.size:return e.display;case Rn.TEXT.size:return e.text;case Rn.SCRIPT.size:return e.script;case Rn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},Qt({type:`mathchoice`,names:[`\\mathchoice`],props:{numArgs:4,primitive:!0},handler:(e,t)=>{var{parser:n}=e;return{type:`mathchoice`,mode:n.mode,display:xi(t[0]),text:xi(t[1]),script:xi(t[2]),scriptscript:xi(t[3])}},htmlBuilder:(e,t)=>oi(Si(Ua(e,t),t,!1)),mathmlBuilder:(e,t)=>Ii(Ua(e,t),t)}),Wa=(e,t,n,r,i,a,o)=>{e=ri([],[e]);var s=n&&Tn(n),l,u;if(t){var d=Oi(t,r.havingStyle(i.sup()),r);u={elem:d,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-d.depth)}}if(n){var f=Oi(n,r.havingStyle(i.sub()),r);l={elem:f,kern:Math.max(r.fontMetrics().bigOpSpacing2,r.fontMetrics().bigOpSpacing4-f.height)}}var p;if(u&&l)p=ci({positionType:`bottom`,positionData:r.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:l.elem,marginLeft:Jn(-a)},{type:`kern`,size:l.kern},{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:Jn(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else if(l)p=ci({positionType:`top`,positionData:e.height-o,children:[{type:`kern`,size:r.fontMetrics().bigOpSpacing5},{type:`elem`,elem:l.elem,marginLeft:Jn(-a)},{type:`kern`,size:l.kern},{type:`elem`,elem:e}]});else if(u)p=ci({positionType:`bottom`,positionData:e.depth+o,children:[{type:`elem`,elem:e},{type:`kern`,size:u.kern},{type:`elem`,elem:u.elem,marginLeft:Jn(a)},{type:`kern`,size:r.fontMetrics().bigOpSpacing5}]});else return e;var m=[p];if(l&&a!==0&&!s){var h=ri([`mspace`],[],r);h.style.marginRight=Jn(a),m.unshift(h)}return ri([`mop`,`op-limits`],m,r)},Ga=new Set([`\\smallint`]),Ka=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=sn(e.base,`op`),i=!0):a=sn(e,`op`);var o=t.style,s=!1;o.size===Rn.DISPLAY.size&&a.symbol&&!Ga.has(a.name)&&(s=!0);var l,u;if(a.symbol){var d=s?`Size2-Regular`:`Size1-Regular`,f=``;if((a.name===`\\oiint`||a.name===`\\oiiint`)&&(f=a.name.slice(1),a.name=f===`oiint`?`\\iint`:`\\iiint`),l=Qr(a.name,d,`math`,t,[`mop`,`op-symbol`,s?`large-op`:`small-op`]),u=l.italic,f.length>0){var p=pi(f+`Size`+(s?`2`:`1`),t);l=ci({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:0},{type:`elem`,elem:p,shift:s?.08:0}]}),a.name=`\\`+f,l.classes.unshift(`mop`),l.italic=u}}else if(a.body){var m=Si(a.body,t,!0);m.length===1&&m[0]instanceof nr?(l=m[0],l.classes[0]=`mop`):l=ri([`mop`],m,t)}else{for(var h=[],g=1;g<a.name.length;g++)h.push($r(a.name[g],a.mode,t));l=ri([`mop`],h,t)}var _=0,v=0;return(l instanceof nr||a.name===`\\oiint`||a.name===`\\oiiint`)&&!a.suppressBaseShift&&(_=(l.height-l.depth)/2-t.fontMetrics().axisHeight,v=l.italic??0),i?Wa(l,n,r,t,o,v,_):(_&&(l.style.position=`relative`,l.style.top=Jn(_)),l)},qa=(e,t)=>{var n;if(e.symbol)n=new ki(`mo`,[Mi(e.name,e.mode)]),Ga.has(e.name)&&n.setAttribute(`largeop`,`false`);else if(e.body)n=new ki(`mo`,Fi(e.body,t));else{n=new ki(`mi`,[new Ai(e.name.slice(1))]);var r=new ki(`mo`,[Mi(`⁡`,`text`)]);n=e.parentIsSupSub?new ki(`mrow`,[n,r]):nn([n,r])}return n},Vte={"∏":`\\prod`,"∐":`\\coprod`,"∑":`\\sum`,"⋀":`\\bigwedge`,"⋁":`\\bigvee`,"⋂":`\\bigcap`,"⋃":`\\bigcup`,"⨀":`\\bigodot`,"⨁":`\\bigoplus`,"⨂":`\\bigotimes`,"⨄":`\\biguplus`,"⨆":`\\bigsqcup`},Qt({type:`op`,names:`\\coprod.\\bigvee.\\bigwedge.\\biguplus.\\bigcap.\\bigcup.\\intop.\\prod.\\sum.\\bigotimes.\\bigoplus.\\bigodot.\\bigsqcup.\\smallint.∏.∐.∑.⋀.⋁.⋂.⋃.⨀.⨁.⨂.⨄.⨆`.split(`.`),props:{numArgs:0},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=r;return i.length===1&&(i=Vte[i]),{type:`op`,mode:n.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:i}},htmlBuilder:Ka,mathmlBuilder:qa}),Qt({type:`op`,names:[`\\mathop`],props:{numArgs:1,primitive:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`op`,mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:xi(r)}},htmlBuilder:Ka,mathmlBuilder:qa}),Hte={"∫":`\\int`,"∬":`\\iint`,"∭":`\\iiint`,"∮":`\\oint`,"∯":`\\oiint`,"∰":`\\oiiint`},Qt({type:`op`,names:`\\arcsin.\\arccos.\\arctan.\\arctg.\\arcctg.\\arg.\\ch.\\cos.\\cosec.\\cosh.\\cot.\\cotg.\\coth.\\csc.\\ctg.\\cth.\\deg.\\dim.\\exp.\\hom.\\ker.\\lg.\\ln.\\log.\\sec.\\sin.\\sinh.\\sh.\\tan.\\tanh.\\tg.\\th`.split(`.`),props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Ka,mathmlBuilder:qa}),Qt({type:`op`,names:[`\\det`,`\\gcd`,`\\inf`,`\\lim`,`\\max`,`\\min`,`\\Pr`,`\\sup`],props:{numArgs:0},handler(e){var{parser:t,funcName:n}=e;return{type:`op`,mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:n}},htmlBuilder:Ka,mathmlBuilder:qa}),Qt({type:`op`,names:[`\\int`,`\\iint`,`\\iiint`,`\\oint`,`\\oiint`,`\\oiiint`,`∫`,`∬`,`∭`,`∮`,`∯`,`∰`],props:{numArgs:0,allowedInArgument:!0},handler(e){var{parser:t,funcName:n}=e,r=n;return r.length===1&&(r=Hte[r]),{type:`op`,mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:Ka,mathmlBuilder:qa}),Ja=(e,t)=>{var n,r,i=!1,a;e.type===`supsub`?(n=e.sup,r=e.sub,a=sn(e.base,`operatorname`),i=!0):a=sn(e,`operatorname`);var o;if(a.body.length>0){for(var s=Si(a.body.map(e=>{var t=`text`in e?e.text:void 0;return typeof t==`string`?{type:`textord`,mode:e.mode,text:t}:e}),t.withFont(`mathrm`),!0),l=0;l<s.length;l++){var u=s[l];u instanceof nr&&(u.text=u.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`))}o=ri([`mop`],s,t)}else o=ri([`mop`],[],t);return i?Wa(o,n,r,t,t.style,0,0):o},Ute=(e,t)=>{for(var n=Fi(e.body,t.withFont(`mathrm`)),r=!0,i=0;i<n.length;i++){var a=n[i];if(!(a instanceof ji)){if(a instanceof ki)switch(a.type){case`mi`:case`mn`:case`mspace`:case`mtext`:break;case`mo`:var o=a.children[0];a.children.length===1&&o instanceof Ai?o.text=o.text.replace(/\u2212/,`-`).replace(/\u2217/,`*`):r=!1;break;default:r=!1}else r=!1}}if(r){var s=n.map(e=>e.toText()).join(``);n=[new Ai(s)]}var l=new ki(`mi`,n);l.setAttribute(`mathvariant`,`normal`);var u=new ki(`mo`,[Mi(`⁡`,`text`)]);return e.parentIsSupSub?new ki(`mrow`,[l,u]):nn([l,u])},Qt({type:`operatorname`,names:[`\\operatorname@`,`\\operatornamewithlimits`],props:{numArgs:1},handler:(e,t)=>{var{parser:n,funcName:r}=e,i=t[0];return{type:`operatorname`,mode:n.mode,body:xi(i),alwaysHandleSupSub:r===`\\operatornamewithlimits`,limits:!1,parentIsSupSub:!1}},htmlBuilder:Ja,mathmlBuilder:Ute}),G(`\\operatorname`,`\\@ifstar\\operatornamewithlimits\\operatorname@`),$t({type:`ordgroup`,htmlBuilder(e,t){return e.semisimple?oi(Si(e.body,t,!1)):ri([`mord`],Si(e.body,t,!0),t)},mathmlBuilder(e,t){return Ii(e.body,t,!0)}}),Qt({type:`overline`,names:[`\\overline`],props:{numArgs:1},handler(e,t){var{parser:n}=e,r=t[0];return{type:`overline`,mode:n.mode,body:r}},htmlBuilder(e,t){var n=Oi(e.body,t.havingCrampedStyle()),r=ai(`overline-line`,t),i=t.fontMetrics().defaultRuleThickness;return ri([`mord`,`overline`],[ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:n},{type:`kern`,size:3*i},{type:`elem`,elem:r},{type:`kern`,size:i}]})],t)},mathmlBuilder(e,t){var n=new ki(`mo`,[new Ai(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new ki(`mover`,[Li(e.body,t),n]);return r.setAttribute(`accent`,`true`),r}}),Qt({type:`phantom`,names:[`\\phantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`phantom`,mode:n.mode,body:xi(r)}},htmlBuilder:(e,t)=>oi(Si(e.body,t.withPhantom(),!1)),mathmlBuilder:(e,t)=>{var n=Fi(e.body,t);return new ki(`mphantom`,n)}}),G(`\\hphantom`,`\\smash{\\phantom{#1}}`),Qt({type:`vphantom`,names:[`\\vphantom`],props:{numArgs:1,allowedInText:!0},handler:(e,t)=>{var{parser:n}=e,r=t[0];return{type:`vphantom`,mode:n.mode,body:r}},htmlBuilder:(e,t)=>ri([`mord`,`rlap`],[ri([`inner`],[Oi(e.body,t.withPhantom())]),ri([`fix`],[])],t),mathmlBuilder:(e,t)=>{var n=Fi(xi(e.body),t),r=new ki(`mphantom`,n),i=new ki(`mpadded`,[r]);return i.setAttribute(`width`,`0px`),i}}),Qt({type:`raisebox`,names:[`\\raisebox`],props:{numArgs:2,argTypes:[`size`,`hbox`],allowedInText:!0},handler(e,t){var{parser:n}=e,r=sn(t[0],`size`).value,i=t[1];return{type:`raisebox`,mode:n.mode,dy:r,body:i}},htmlBuilder(e,t){var n=Oi(e.body,t);return ci({positionType:`shift`,positionData:-qn(e.dy,t),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new ki(`mpadded`,[Li(e.body,t)]),r=e.dy.number+e.dy.unit;return n.setAttribute(`voffset`,r),n}}),Qt({type:`internal`,names:[`\\relax`],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:t}=e;return{type:`internal`,mode:t.mode}}}),Qt({type:`rule`,names:[`\\rule`],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[`size`,`size`,`size`]},handler(e,t,n){var{parser:r}=e,i=n[0],a=sn(t[0],`size`),o=sn(t[1],`size`);return{type:`rule`,mode:r.mode,shift:i&&sn(i,`size`).value,width:a.value,height:o.value}},htmlBuilder(e,t){var n=ri([`mord`,`rule`],[],t),r=qn(e.width,t),i=qn(e.height,t),a=e.shift?qn(e.shift,t):0;return n.style.borderRightWidth=Jn(r),n.style.borderTopWidth=Jn(i),n.style.bottom=Jn(a),n.width=r,n.height=i+a,n.depth=-a,n.maxFontSize=i*1.125*t.sizeMultiplier,n},mathmlBuilder(e,t){var n=qn(e.width,t),r=qn(e.height,t),i=e.shift?qn(e.shift,t):0,a=t.color&&t.getColor()||`black`,o=new ki(`mspace`);o.setAttribute(`mathbackground`,a),o.setAttribute(`width`,Jn(n)),o.setAttribute(`height`,Jn(r));var s=new ki(`mpadded`,[o]);return i>=0?s.setAttribute(`height`,Jn(i)):(s.setAttribute(`height`,Jn(i)),s.setAttribute(`depth`,Jn(-i))),s.setAttribute(`voffset`,Jn(i)),s}}),Ya=[`\\tiny`,`\\sixptsize`,`\\scriptsize`,`\\footnotesize`,`\\small`,`\\normalsize`,`\\large`,`\\Large`,`\\LARGE`,`\\huge`,`\\Huge`],Wte=(e,t)=>{var n=t.havingSize(e.size);return See(e.body,n,t)},Qt({type:`sizing`,names:Ya,props:{numArgs:0,allowedInText:!0},handler:(e,t)=>{var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!1,n);return{type:`sizing`,mode:i.mode,size:Ya.indexOf(r)+1,body:a}},htmlBuilder:Wte,mathmlBuilder:(e,t)=>{var n=t.havingSize(e.size),r=Fi(e.body,n),i=new ki(`mstyle`,r);return i.setAttribute(`mathsize`,Jn(n.sizeMultiplier)),i}}),Qt({type:`smash`,names:[`\\smash`],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(e,t,n)=>{var{parser:r}=e,i=!1,a=!1,o=n[0]&&sn(n[0],`ordgroup`);if(o)for(var s,l=0;l<o.body.length;++l){var u=o.body[l];if(s=cn(u).text,s===`t`)i=!0;else if(s===`b`)a=!0;else{i=!1,a=!1;break}}else i=!0,a=!0;var d=t[0];return{type:`smash`,mode:r.mode,body:d,smashHeight:i,smashDepth:a}},htmlBuilder:(e,t)=>{var n=ri([],[Oi(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return n;if(e.smashHeight&&(n.height=0),e.smashDepth&&(n.depth=0),e.smashHeight&&e.smashDepth)return ri([`mord`,`smash`],[n],t);if(n.children)for(var r=0;r<n.children.length;r++)e.smashHeight&&(n.children[r].height=0),e.smashDepth&&(n.children[r].depth=0);return ri([`mord`],[ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:n}]})],t)},mathmlBuilder:(e,t)=>{var n=new ki(`mpadded`,[Li(e.body,t)]);return e.smashHeight&&n.setAttribute(`height`,`0px`),e.smashDepth&&n.setAttribute(`depth`,`0px`),n}}),Qt({type:`sqrt`,names:[`\\sqrt`],props:{numArgs:1,numOptionalArgs:1},handler(e,t,n){var{parser:r}=e,i=n[0],a=t[0];return{type:`sqrt`,mode:r.mode,body:a,index:i}},htmlBuilder(e,t){var n=Oi(e.body,t.havingCrampedStyle());n.height===0&&(n.height=t.fontMetrics().xHeight),n=si(n,t);var r=t.fontMetrics().defaultRuleThickness,i=r;t.style.id<Rn.TEXT.id&&(i=t.fontMetrics().xHeight);var a=r+i/4,{span:o,ruleWidth:s,advanceWidth:l}=Ate(n.height+n.depth+a+r,t),u=o.height-s;u>n.height+n.depth+a&&(a=(a+u-n.height-n.depth)/2);var d=o.height-n.height-a-s;n.style.paddingLeft=Jn(l);var f=ci({positionType:`firstBaseline`,children:[{type:`elem`,elem:n,wrapperClasses:[`svg-align`]},{type:`kern`,size:-(n.height+d)},{type:`elem`,elem:o},{type:`kern`,size:s}]});if(e.index){var p=t.havingStyle(Rn.SCRIPTSCRIPT),m=Oi(e.index,p,t);return ri([`mord`,`sqrt`],[ri([`root`],[ci({positionType:`shift`,positionData:-(.6*(f.height-f.depth)),children:[{type:`elem`,elem:m}]})]),f],t)}return ri([`mord`,`sqrt`],[f],t)},mathmlBuilder(e,t){var{body:n,index:r}=e;return r?new ki(`mroot`,[Li(n,t),Li(r,t)]):new ki(`msqrt`,[Li(n,t)])}}),Xa={display:Rn.DISPLAY,text:Rn.TEXT,script:Rn.SCRIPT,scriptscript:Rn.SCRIPTSCRIPT},Qt({type:`styling`,names:[`\\displaystyle`,`\\textstyle`,`\\scriptstyle`,`\\scriptscriptstyle`],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:n,funcName:r,parser:i}=e,a=i.parseExpression(!0,n),o=r.slice(1,r.length-5);if(!Cee(o))throw Error(`Unknown style: `+o);return{type:`styling`,mode:i.mode,style:o,body:a}},htmlBuilder(e,t){var n=Xa[e.style],r=t.havingStyle(n);return e.resetFont&&(r=r.withFont(``)),See(e.body,r,t)},mathmlBuilder(e,t){var n=Xa[e.style],r=t.havingStyle(n);e.resetFont&&(r=r.withFont(``));var i=Fi(e.body,r),a=new ki(`mstyle`,i),o={display:[`0`,`true`],text:[`0`,`false`],script:[`1`,`false`],scriptscript:[`2`,`false`]}[e.style];return a.setAttribute(`scriptlevel`,o[0]),a.setAttribute(`displaystyle`,o[1]),a}}),Gte=function(e,t){var n=e.base;return n?n.type===`op`?n.limits&&(t.style.size===Rn.DISPLAY.size||n.alwaysHandleSupSub)?Ka:null:n.type===`operatorname`?n.alwaysHandleSupSub&&(t.style.size===Rn.DISPLAY.size||n.limits)?Ja:null:n.type===`accent`?Tn(n.base)?Ki:null:n.type===`horizBrace`&&!e.sub===n.isOver?Va:null:null},$t({type:`supsub`,htmlBuilder(e,t){var n=Gte(e,t);if(n)return n(e,t);var{base:r,sup:i,sub:a}=e,o=Oi(r,t),s,l,u=t.fontMetrics(),d=0,f=0,p=r&&Tn(r);if(i){var m=t.havingStyle(t.style.sup());s=Oi(i,m,t),p||(d=o.height-m.fontMetrics().supDrop*m.sizeMultiplier/t.sizeMultiplier)}if(a){var h=t.havingStyle(t.style.sub());l=Oi(a,h,t),p||(f=o.depth+h.fontMetrics().subDrop*h.sizeMultiplier/t.sizeMultiplier)}var g=t.style===Rn.DISPLAY?u.sup1:t.style.cramped?u.sup3:u.sup2,_=t.sizeMultiplier,v=Jn(.5/u.ptPerEm/_),y=null;if(l){var b=e.base&&e.base.type===`op`&&e.base.name&&(e.base.name===`\\oiint`||e.base.name===`\\oiiint`);(o instanceof nr||b)&&(y=Jn(-(o.italic??0)))}var x;if(s&&l){d=Math.max(d,g,s.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var S=4*u.defaultRuleThickness;if(d-s.depth-(l.height-f)<S){f=S-(d-s.depth)+l.height;var C=.8*u.xHeight-(d-s.depth);C>0&&(d+=C,f-=C)}x=ci({positionType:`individualShift`,children:[{type:`elem`,elem:l,shift:f,marginRight:v,marginLeft:y},{type:`elem`,elem:s,shift:-d,marginRight:v}]})}else if(l)f=Math.max(f,u.sub1,l.height-.8*u.xHeight),x=ci({positionType:`shift`,positionData:f,children:[{type:`elem`,elem:l,marginLeft:y,marginRight:v}]});else if(s)d=Math.max(d,g,s.depth+.25*u.xHeight),x=ci({positionType:`shift`,positionData:-d,children:[{type:`elem`,elem:s,marginRight:v}]});else throw Error(`supsub must have either sup or sub.`);return ri([Ei(o,`right`)||`mord`],[o,ri([`msupsub`],[x])],t)},mathmlBuilder(e,t){var n=!1,r,i;e.base&&e.base.type===`horizBrace`&&(i=!!e.sup,i===e.base.isOver&&(n=!0,r=e.base.isOver)),e.base&&(e.base.type===`op`||e.base.type===`operatorname`)&&(e.base.parentIsSupSub=!0);var a=[Li(e.base,t)];e.sub&&a.push(Li(e.sub,t)),e.sup&&a.push(Li(e.sup,t));var o;if(n)o=r?`mover`:`munder`;else if(!e.sub){var s=e.base;o=s&&s.type===`op`&&s.limits&&(t.style===Rn.DISPLAY||s.alwaysHandleSupSub)||s&&s.type===`operatorname`&&s.alwaysHandleSupSub&&(s.limits||t.style===Rn.DISPLAY)?`mover`:`msup`}else if(e.sup){var l=e.base;o=l&&l.type===`op`&&l.limits&&t.style===Rn.DISPLAY||l&&l.type===`operatorname`&&l.alwaysHandleSupSub&&(t.style===Rn.DISPLAY||l.limits)?`munderover`:`msubsup`}else{var u=e.base;o=u&&u.type===`op`&&u.limits&&(t.style===Rn.DISPLAY||u.alwaysHandleSupSub)||u&&u.type===`operatorname`&&u.alwaysHandleSupSub&&(u.limits||t.style===Rn.DISPLAY)?`munder`:`msub`}return new ki(o,a)}}),$t({type:`atom`,htmlBuilder(e,t){return $r(e.text,e.mode,t,[`m`+e.family])},mathmlBuilder(e,t){var n=new ki(`mo`,[Mi(e.text,e.mode)]);if(e.family===`bin`){var r=Pi(e,t);r===`bold-italic`&&n.setAttribute(`mathvariant`,r)}else e.family===`punct`?n.setAttribute(`separator`,`true`):(e.family===`open`||e.family===`close`)&&n.setAttribute(`stretchy`,`false`);return n}}),Za={mi:`italic`,mn:`normal`,mtext:`normal`},$t({type:`mathord`,htmlBuilder(e,t){return ei(e,t,`mathord`)},mathmlBuilder(e,t){var n=new ki(`mi`,[Mi(e.text,e.mode,t)]),r=Pi(e,t)||`italic`;return r!==Za[n.type]&&n.setAttribute(`mathvariant`,r),n}}),$t({type:`textord`,htmlBuilder(e,t){return ei(e,t,`textord`)},mathmlBuilder(e,t){var n=Mi(e.text,e.mode,t),r=Pi(e,t)||`normal`,i=e.mode===`text`?new ki(`mtext`,[n]):/[0-9]/.test(e.text)?new ki(`mn`,[n]):e.text===`\\prime`?new ki(`mo`,[n]):new ki(`mi`,[n]);return r!==Za[i.type]&&i.setAttribute(`mathvariant`,r),i}}),Qa={"\\nobreak":`nobreak`,"\\allowbreak":`allowbreak`},$a={" ":{},"\\ ":{},"~":{className:`nobreak`},"\\space":{},"\\nobreakspace":{className:`nobreak`}},$t({type:`spacing`,htmlBuilder(e,t){if($a.hasOwnProperty(e.text)){var n=$a[e.text].className||``;if(e.mode===`text`){var r=ei(e,t,`textord`);return r.classes.push(n),r}return ri([`mspace`,n],[$r(e.text,e.mode,t)],t)}if(Qa.hasOwnProperty(e.text))return ri([`mspace`,Qa[e.text]],[],t);throw new Sn(`Unknown type of space "`+e.text+`"`)},mathmlBuilder(e,t){var n;if($a.hasOwnProperty(e.text))n=new ki(`mtext`,[new Ai(`\xA0`)]);else if(Qa.hasOwnProperty(e.text))return new ki(`mspace`);else throw new Sn(`Unknown type of space "`+e.text+`"`);return n}}),eo=()=>{var e=new ki(`mtd`,[]);return e.setAttribute(`width`,`50%`),e},$t({type:`tag`,mathmlBuilder(e,t){var n=new ki(`mtable`,[new ki(`mtr`,[eo(),new ki(`mtd`,[Ii(e.body,t)]),eo(),new ki(`mtd`,[Ii(e.tag,t)])])]);return n.setAttribute(`width`,`100%`),n}}),to={"\\text":void 0,"\\textrm":`textrm`,"\\textsf":`textsf`,"\\texttt":`texttt`,"\\textnormal":`textrm`},no={"\\textbf":`textbf`,"\\textmd":`textmd`},Kte={"\\textit":`textit`,"\\textup":`textup`},ro=(e,t)=>{var n=e.font;return n?to[n]?t.withTextFontFamily(to[n]):no[n]?t.withTextFontWeight(no[n]):n===`\\emph`?t.fontShape===`textit`?t.withTextFontShape(`textup`):t.withTextFontShape(`textit`):t.withTextFontShape(Kte[n]):t},Qt({type:`text`,names:[`\\text`,`\\textrm`,`\\textsf`,`\\texttt`,`\\textnormal`,`\\textbf`,`\\textmd`,`\\textit`,`\\textup`,`\\emph`],props:{numArgs:1,argTypes:[`text`],allowedInArgument:!0,allowedInText:!0},handler(e,t){var{parser:n,funcName:r}=e,i=t[0];return{type:`text`,mode:n.mode,body:xi(i),font:r}},htmlBuilder(e,t){var n=ro(e,t);return ri([`mord`,`text`],Si(e.body,n,!0),n)},mathmlBuilder(e,t){var n=ro(e,t);return Ii(e.body,n)}}),Qt({type:`underline`,names:[`\\underline`],props:{numArgs:1,allowedInText:!0},handler(e,t){var{parser:n}=e;return{type:`underline`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Oi(e.body,t),r=ai(`underline-line`,t),i=t.fontMetrics().defaultRuleThickness;return ri([`mord`,`underline`],[ci({positionType:`top`,positionData:n.height,children:[{type:`kern`,size:i},{type:`elem`,elem:r},{type:`kern`,size:3*i},{type:`elem`,elem:n}]})],t)},mathmlBuilder(e,t){var n=new ki(`mo`,[new Ai(`‾`)]);n.setAttribute(`stretchy`,`true`);var r=new ki(`munder`,[Li(e.body,t),n]);return r.setAttribute(`accentunder`,`true`),r}}),Qt({type:`vcenter`,names:[`\\vcenter`],props:{numArgs:1,argTypes:[`original`],allowedInText:!1},handler(e,t){var{parser:n}=e;return{type:`vcenter`,mode:n.mode,body:t[0]}},htmlBuilder(e,t){var n=Oi(e.body,t),r=t.fontMetrics().axisHeight;return ci({positionType:`shift`,positionData:.5*(n.height-r-(n.depth+r)),children:[{type:`elem`,elem:n}]})},mathmlBuilder(e,t){var n=new ki(`mpadded`,[Li(e.body,t)],[`vcenter`]);return new ki(`mrow`,[n])}}),Qt({type:`verb`,names:[`\\verb`],props:{numArgs:0,allowedInText:!0},handler(e,t,n){throw new Sn(`\\verb ended by end of line instead of matching delimiter`)},htmlBuilder(e,t){for(var n=io(e),r=[],i=t.havingStyle(t.style.text()),a=0;a<n.length;a++){var o=n[a];o===`~`&&(o=`\\textasciitilde`),r.push(Qr(o,`Typewriter-Regular`,e.mode,i,[`mord`,`texttt`]))}return ri([`mord`,`text`].concat(i.sizingClasses(t)),ti(r),i)},mathmlBuilder(e,t){var n=new Ai(io(e)),r=new ki(`mtext`,[n]);return r.setAttribute(`mathvariant`,`monospace`),r}}),io=e=>e.body.replace(/ /g,e.star?`␣`:`\xA0`),ao=_i,oo=`[ \r255- ]`,qte=`\\\\[a-zA-Z@]+`,Jte=`\\\\[^\ud800-\udfff]`,Yte=`(`+qte+`)`+oo+`*`,Xte=`\\\\(256-|[ \r ]+257-?)[ \r ]*`,so=`[̀-ͯ]`,Zte=RegExp(so+`+$`),Qte=`(`+oo+`+)|`+(Xte+`|`)+`([!-\\[\\]-‧‪-퟿豈-￿]`+(so+`*`)+`|[\ud800-\udbff][\udc00-\udfff]`+(so+`*`)+`|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5`+(`|`+Yte)+(`|`+Jte+`)`),co=class{constructor(e,t){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=e,this.settings=t,this.tokenRegex=new RegExp(Qte,`g`),this.catcodes={"%":14,"~":13}}setCatcode(e,t){this.catcodes[e]=t}lex(){var e=this.input,t=this.tokenRegex.lastIndex;if(t===e.length)return new ka(`EOF`,new Oa(this,t,t));var n=this.tokenRegex.exec(e);if(n===null||n.index!==t)throw new Sn(`Unexpected character: '`+e[t]+`'`,new ka(e[t],new Oa(this,t,t+1)));var r=n[6]||n[3]||(n[2]?`\\ `:` `);if(this.catcodes[r]===14){var i=e.indexOf(`258-`,this.tokenRegex.lastIndex);return i===-1?(this.tokenRegex.lastIndex=e.length,this.settings.reportNonstrict(`commentAtEnd`,`% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)`)):this.tokenRegex.lastIndex=i+1,this.lex()}return new ka(r,new Oa(this,t,this.tokenRegex.lastIndex))}},$te=class{constructor(e,t){e===void 0&&(e={}),t===void 0&&(t={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=t,this.builtins=e,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new Sn(`Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug`);var e=this.undefStack.pop();for(var t in e)e.hasOwnProperty(t)&&(e[t]==null?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;this.undefStack.length>0;)this.endGroup()}has(e){return this.current.hasOwnProperty(e)||this.builtins.hasOwnProperty(e)}get(e){return this.current.hasOwnProperty(e)?this.current[e]:this.builtins[e]}set(e,t,n){if(n===void 0&&(n=!1),n){for(var r=0;r<this.undefStack.length;r++)delete this.undefStack[r][e];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][e]=t)}else{var i=this.undefStack[this.undefStack.length-1];i&&!i.hasOwnProperty(e)&&(i[e]=this.current[e])}t==null?delete this.current[e]:this.current[e]=t}},ene=Da,G(`\\noexpand`,function(e){var t=e.popToken();return e.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}}),G(`\\expandafter`,function(e){var t=e.popToken();return e.expandOnce(!0),{tokens:[t],numArgs:0}}),G(`\\@firstoftwo`,function(e){return{tokens:e.consumeArgs(2)[0],numArgs:0}}),G(`\\@secondoftwo`,function(e){return{tokens:e.consumeArgs(2)[1],numArgs:0}}),G(`\\@ifnextchar`,function(e){var t=e.consumeArgs(3);e.consumeSpaces();var n=e.future();return t[0].length===1&&t[0][0].text===n.text?{tokens:t[1],numArgs:0}:{tokens:t[2],numArgs:0}}),G(`\\@ifstar`,`\\@ifnextchar *{\\@firstoftwo{#1}}`),G(`\\TextOrMath`,function(e){var t=e.consumeArgs(2);return e.mode===`text`?{tokens:t[0],numArgs:0}:{tokens:t[1],numArgs:0}}),lo={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15},G(`\\char`,function(e){var t=e.popToken(),n,r=0;if(t.text===`'`)n=8,t=e.popToken();else if(t.text===`"`)n=16,t=e.popToken();else if(t.text==="`"){if(t=e.popToken(),t.text[0]===`\\`)r=t.text.charCodeAt(1);else if(t.text===`EOF`)throw new Sn("\\char` missing argument");else r=t.text.charCodeAt(0)}else n=10;if(n){if(r=lo[t.text],r==null||r>=n)throw new Sn(`Invalid base-`+n+` digit `+t.text);for(var i;(i=lo[e.future().text])!=null&&i<n;)r*=n,r+=i,e.popToken()}return`\\@char{`+r+`}`}),uo=(e,t,n,r)=>{var i=e.consumeArg().tokens;if(i.length!==1)throw new Sn(`\\newcommand's first argument must be a macro name`);var a=i[0].text,o=e.isDefined(a);if(o&&!t)throw new Sn(`\\newcommand{`+a+`} attempting to redefine `+(a+`; use \\renewcommand`));if(!o&&!n)throw new Sn(`\\renewcommand{`+a+`} when command `+a+` does not yet exist; use \\newcommand`);var s=0;if(i=e.consumeArg().tokens,i.length===1&&i[0].text===`[`){for(var l=``,u=e.expandNextToken();u.text!==`]`&&u.text!==`EOF`;)l+=u.text,u=e.expandNextToken();if(!l.match(/^\s*[0-9]+\s*$/))throw new Sn(`Invalid number of arguments: `+l);s=parseInt(l),i=e.consumeArg().tokens}return o&&r||e.macros.set(a,{tokens:i,numArgs:s}),``},G(`\\newcommand`,e=>uo(e,!1,!0,!1)),G(`\\renewcommand`,e=>uo(e,!0,!1,!1)),G(`\\providecommand`,e=>uo(e,!0,!0,!0)),G(`\\message`,e=>{var t=e.consumeArgs(1)[0];return console.log(t.reverse().map(e=>e.text).join(``)),``}),G(`\\errmessage`,e=>{var t=e.consumeArgs(1)[0];return console.error(t.reverse().map(e=>e.text).join(``)),``}),G(`\\show`,e=>{var t=e.popToken(),n=t.text;return console.log(t,e.macros.get(n),ao[n],ur.math[n],ur.text[n]),``}),G(`\\bgroup`,`{`),G(`\\egroup`,`}`),G(`~`,`\\nobreakspace`),G(`\\lq`,"`"),G(`\\rq`,`'`),G(`\\aa`,`\\r a`),G(`\\AA`,`\\r A`),G(`\\textcopyright`,"\\html@mathml{\\textcircled{c}}{\\char`©}"),G(`\\copyright`,`\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}`),G(`\\textregistered`,"\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),G(`ℬ`,`\\mathscr{B}`),G(`ℰ`,`\\mathscr{E}`),G(`ℱ`,`\\mathscr{F}`),G(`ℋ`,`\\mathscr{H}`),G(`ℐ`,`\\mathscr{I}`),G(`ℒ`,`\\mathscr{L}`),G(`ℳ`,`\\mathscr{M}`),G(`ℛ`,`\\mathscr{R}`),G(`ℭ`,`\\mathfrak{C}`),G(`ℌ`,`\\mathfrak{H}`),G(`ℨ`,`\\mathfrak{Z}`),G(`\\Bbbk`,`\\Bbb{k}`),G(`\\llap`,`\\mathllap{\\textrm{#1}}`),G(`\\rlap`,`\\mathrlap{\\textrm{#1}}`),G(`\\clap`,`\\mathclap{\\textrm{#1}}`),G(`\\mathstrut`,`\\vphantom{(}`),G(`\\underbar`,`\\underline{\\text{#1}}`),G(`\\not`,`\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}`),G(`\\neq`,"\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),G(`\\ne`,`\\neq`),G(`≠`,`\\neq`),G(`\\notin`,"\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),G(`∉`,`\\notin`),G(`≘`,"\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),G(`≙`,"\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),G(`≚`,"\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),G(`≛`,"\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),G(`≝`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),G(`≞`,"\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),G(`≟`,"\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),G(`⟂`,`\\perp`),G(`‼`,`\\mathclose{!\\mkern-0.8mu!}`),G(`∌`,`\\notni`),G(`⌜`,`\\ulcorner`),G(`⌝`,`\\urcorner`),G(`⌞`,`\\llcorner`),G(`⌟`,`\\lrcorner`),G(`©`,`\\copyright`),G(`®`,`\\textregistered`),G(`\\ulcorner`,`\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}`),G(`\\urcorner`,`\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}`),G(`\\llcorner`,`\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}`),G(`\\lrcorner`,`\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}`),G(`\\vdots`,`{\\varvdots\\rule{0pt}{15pt}}`),G(`⋮`,`\\vdots`),G(`\\varGamma`,`\\mathit{\\Gamma}`),G(`\\varDelta`,`\\mathit{\\Delta}`),G(`\\varTheta`,`\\mathit{\\Theta}`),G(`\\varLambda`,`\\mathit{\\Lambda}`),G(`\\varXi`,`\\mathit{\\Xi}`),G(`\\varPi`,`\\mathit{\\Pi}`),G(`\\varSigma`,`\\mathit{\\Sigma}`),G(`\\varUpsilon`,`\\mathit{\\Upsilon}`),G(`\\varPhi`,`\\mathit{\\Phi}`),G(`\\varPsi`,`\\mathit{\\Psi}`),G(`\\varOmega`,`\\mathit{\\Omega}`),G(`\\substack`,`\\begin{subarray}{c}#1\\end{subarray}`),G(`\\colon`,`\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax`),G(`\\boxed`,`\\fbox{$\\displaystyle{#1}$}`),G(`\\iff`,`\\DOTSB\\;\\Longleftrightarrow\\;`),G(`\\implies`,`\\DOTSB\\;\\Longrightarrow\\;`),G(`\\impliedby`,`\\DOTSB\\;\\Longleftarrow\\;`),G(`\\dddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}`),G(`\\ddddot`,`{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}`),fo={",":`\\dotsc`,"\\not":`\\dotsb`,"+":`\\dotsb`,"=":`\\dotsb`,"<":`\\dotsb`,">":`\\dotsb`,"-":`\\dotsb`,"*":`\\dotsb`,":":`\\dotsb`,"\\DOTSB":`\\dotsb`,"\\coprod":`\\dotsb`,"\\bigvee":`\\dotsb`,"\\bigwedge":`\\dotsb`,"\\biguplus":`\\dotsb`,"\\bigcap":`\\dotsb`,"\\bigcup":`\\dotsb`,"\\prod":`\\dotsb`,"\\sum":`\\dotsb`,"\\bigotimes":`\\dotsb`,"\\bigoplus":`\\dotsb`,"\\bigodot":`\\dotsb`,"\\bigsqcup":`\\dotsb`,"\\And":`\\dotsb`,"\\longrightarrow":`\\dotsb`,"\\Longrightarrow":`\\dotsb`,"\\longleftarrow":`\\dotsb`,"\\Longleftarrow":`\\dotsb`,"\\longleftrightarrow":`\\dotsb`,"\\Longleftrightarrow":`\\dotsb`,"\\mapsto":`\\dotsb`,"\\longmapsto":`\\dotsb`,"\\hookrightarrow":`\\dotsb`,"\\doteq":`\\dotsb`,"\\mathbin":`\\dotsb`,"\\mathrel":`\\dotsb`,"\\relbar":`\\dotsb`,"\\Relbar":`\\dotsb`,"\\xrightarrow":`\\dotsb`,"\\xleftarrow":`\\dotsb`,"\\DOTSI":`\\dotsi`,"\\int":`\\dotsi`,"\\oint":`\\dotsi`,"\\iint":`\\dotsi`,"\\iiint":`\\dotsi`,"\\iiiint":`\\dotsi`,"\\idotsint":`\\dotsi`,"\\DOTSX":`\\dotsx`},tne=new Set([`bin`,`rel`]),G(`\\dots`,function(e){var t=`\\dotso`,n=e.expandAfterFuture().text;return n in fo?t=fo[n]:(n.slice(0,4)===`\\not`||n in ur.math&&tne.has(ur.math[n].group))&&(t=`\\dotsb`),t}),po={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0},G(`\\dotso`,function(e){return e.future().text in po?`\\ldots\\,`:`\\ldots`}),G(`\\dotsc`,function(e){var t=e.future().text;return t in po&&t!==`,`?`\\ldots\\,`:`\\ldots`}),G(`\\cdots`,function(e){return e.future().text in po?`\\@cdots\\,`:`\\@cdots`}),G(`\\dotsb`,`\\cdots`),G(`\\dotsm`,`\\cdots`),G(`\\dotsi`,`\\!\\cdots`),G(`\\dotsx`,`\\ldots\\,`),G(`\\DOTSI`,`\\relax`),G(`\\DOTSB`,`\\relax`),G(`\\DOTSX`,`\\relax`),G(`\\tmspace`,`\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax`),G(`\\,`,`\\tmspace+{3mu}{.1667em}`),G(`\\thinspace`,`\\,`),G(`\\>`,`\\mskip{4mu}`),G(`\\:`,`\\tmspace+{4mu}{.2222em}`),G(`\\medspace`,`\\:`),G(`\\;`,`\\tmspace+{5mu}{.2777em}`),G(`\\thickspace`,`\\;`),G(`\\!`,`\\tmspace-{3mu}{.1667em}`),G(`\\negthinspace`,`\\!`),G(`\\negmedspace`,`\\tmspace-{4mu}{.2222em}`),G(`\\negthickspace`,`\\tmspace-{5mu}{.277em}`),G(`\\enspace`,`\\kern.5em `),G(`\\enskip`,`\\hskip.5em\\relax`),G(`\\quad`,`\\hskip1em\\relax`),G(`\\qquad`,`\\hskip2em\\relax`),G(`\\tag`,`\\@ifstar\\tag@literal\\tag@paren`),G(`\\tag@paren`,`\\tag@literal{({#1})}`),G(`\\tag@literal`,e=>{if(e.macros.get(`\\df@tag`))throw new Sn(`Multiple \\tag`);return`\\gdef\\df@tag{\\text{#1}}`}),G(`\\bmod`,`\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}`),G(`\\pod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)`),G(`\\pmod`,`\\pod{{\\rm mod}\\mkern6mu#1}`),G(`\\mod`,`\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1`),G(`\\newline`,`\\\\\\relax`),G(`\\TeX`,`\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}`),mo=Jn(or[`Main-Regular`][84][1]-.7*or[`Main-Regular`][65][1]),G(`\\LaTeX`,`\\textrm{\\html@mathml{`+(`L\\kern-.36em\\raisebox{`+mo+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{LaTeX}}`),G(`\\KaTeX`,`\\textrm{\\html@mathml{`+(`K\\kern-.17em\\raisebox{`+mo+`}{\\scriptstyle A}`)+`\\kern-.15em\\TeX}{KaTeX}}`),G(`\\hspace`,`\\@ifstar\\@hspacer\\@hspace`),G(`\\@hspace`,`\\hskip #1\\relax`),G(`\\@hspacer`,`\\rule{0pt}{0pt}\\hskip #1\\relax`),G(`\\ordinarycolon`,`:`),G(`\\vcentcolon`,`\\mathrel{\\mathop\\ordinarycolon}`),G(`\\dblcolon`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}`),G(`\\coloneqq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}`),G(`\\Coloneqq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}`),G(`\\coloneq`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}`),G(`\\Coloneq`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}`),G(`\\eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}`),G(`\\Eqqcolon`,`\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}`),G(`\\eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}`),G(`\\Eqcolon`,`\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}`),G(`\\colonapprox`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}`),G(`\\Colonapprox`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}`),G(`\\colonsim`,`\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}`),G(`\\Colonsim`,`\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}`),G(`∷`,`\\dblcolon`),G(`∹`,`\\eqcolon`),G(`≔`,`\\coloneqq`),G(`≕`,`\\eqqcolon`),G(`⩴`,`\\Coloneqq`),G(`\\ratio`,`\\vcentcolon`),G(`\\coloncolon`,`\\dblcolon`),G(`\\colonequals`,`\\coloneqq`),G(`\\coloncolonequals`,`\\Coloneqq`),G(`\\equalscolon`,`\\eqqcolon`),G(`\\equalscoloncolon`,`\\Eqqcolon`),G(`\\colonminus`,`\\coloneq`),G(`\\coloncolonminus`,`\\Coloneq`),G(`\\minuscolon`,`\\eqcolon`),G(`\\minuscoloncolon`,`\\Eqcolon`),G(`\\coloncolonapprox`,`\\Colonapprox`),G(`\\coloncolonsim`,`\\Colonsim`),G(`\\simcolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),G(`\\simcoloncolon`,`\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}`),G(`\\approxcolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}`),G(`\\approxcoloncolon`,`\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}`),G(`\\notni`,"\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),G(`\\limsup`,`\\DOTSB\\operatorname*{lim\\,sup}`),G(`\\liminf`,`\\DOTSB\\operatorname*{lim\\,inf}`),G(`\\injlim`,`\\DOTSB\\operatorname*{inj\\,lim}`),G(`\\projlim`,`\\DOTSB\\operatorname*{proj\\,lim}`),G(`\\varlimsup`,`\\DOTSB\\operatorname*{\\overline{lim}}`),G(`\\varliminf`,`\\DOTSB\\operatorname*{\\underline{lim}}`),G(`\\varinjlim`,`\\DOTSB\\operatorname*{\\underrightarrow{lim}}`),G(`\\varprojlim`,`\\DOTSB\\operatorname*{\\underleftarrow{lim}}`),G(`\\gvertneqq`,`\\html@mathml{\\@gvertneqq}{≩}`),G(`\\lvertneqq`,`\\html@mathml{\\@lvertneqq}{≨}`),G(`\\ngeqq`,`\\html@mathml{\\@ngeqq}{≱}`),G(`\\ngeqslant`,`\\html@mathml{\\@ngeqslant}{≱}`),G(`\\nleqq`,`\\html@mathml{\\@nleqq}{≰}`),G(`\\nleqslant`,`\\html@mathml{\\@nleqslant}{≰}`),G(`\\nshortmid`,`\\html@mathml{\\@nshortmid}{∤}`),G(`\\nshortparallel`,`\\html@mathml{\\@nshortparallel}{∦}`),G(`\\nsubseteqq`,`\\html@mathml{\\@nsubseteqq}{⊈}`),G(`\\nsupseteqq`,`\\html@mathml{\\@nsupseteqq}{⊉}`),G(`\\varsubsetneq`,`\\html@mathml{\\@varsubsetneq}{⊊}`),G(`\\varsubsetneqq`,`\\html@mathml{\\@varsubsetneqq}{⫋}`),G(`\\varsupsetneq`,`\\html@mathml{\\@varsupsetneq}{⊋}`),G(`\\varsupsetneqq`,`\\html@mathml{\\@varsupsetneqq}{⫌}`),G(`\\imath`,`\\html@mathml{\\@imath}{ı}`),G(`\\jmath`,`\\html@mathml{\\@jmath}{ȷ}`),G(`\\llbracket`,"\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),G(`\\rrbracket`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),G(`⟦`,`\\llbracket`),G(`⟧`,`\\rrbracket`),G(`\\lBrace`,"\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),G(`\\rBrace`,"\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),G(`⦃`,`\\lBrace`),G(`⦄`,`\\rBrace`),G(`\\minuso`,"\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),G(`⦵`,`\\minuso`),G(`\\darr`,`\\downarrow`),G(`\\dArr`,`\\Downarrow`),G(`\\Darr`,`\\Downarrow`),G(`\\lang`,`\\langle`),G(`\\rang`,`\\rangle`),G(`\\uarr`,`\\uparrow`),G(`\\uArr`,`\\Uparrow`),G(`\\Uarr`,`\\Uparrow`),G(`\\N`,`\\mathbb{N}`),G(`\\R`,`\\mathbb{R}`),G(`\\Z`,`\\mathbb{Z}`),G(`\\alef`,`\\aleph`),G(`\\alefsym`,`\\aleph`),G(`\\Alpha`,`\\mathrm{A}`),G(`\\Beta`,`\\mathrm{B}`),G(`\\bull`,`\\bullet`),G(`\\Chi`,`\\mathrm{X}`),G(`\\clubs`,`\\clubsuit`),G(`\\cnums`,`\\mathbb{C}`),G(`\\Complex`,`\\mathbb{C}`),G(`\\Dagger`,`\\ddagger`),G(`\\diamonds`,`\\diamondsuit`),G(`\\empty`,`\\emptyset`),G(`\\Epsilon`,`\\mathrm{E}`),G(`\\Eta`,`\\mathrm{H}`),G(`\\exist`,`\\exists`),G(`\\harr`,`\\leftrightarrow`),G(`\\hArr`,`\\Leftrightarrow`),G(`\\Harr`,`\\Leftrightarrow`),G(`\\hearts`,`\\heartsuit`),G(`\\image`,`\\Im`),G(`\\infin`,`\\infty`),G(`\\Iota`,`\\mathrm{I}`),G(`\\isin`,`\\in`),G(`\\Kappa`,`\\mathrm{K}`),G(`\\larr`,`\\leftarrow`),G(`\\lArr`,`\\Leftarrow`),G(`\\Larr`,`\\Leftarrow`),G(`\\lrarr`,`\\leftrightarrow`),G(`\\lrArr`,`\\Leftrightarrow`),G(`\\Lrarr`,`\\Leftrightarrow`),G(`\\Mu`,`\\mathrm{M}`),G(`\\natnums`,`\\mathbb{N}`),G(`\\Nu`,`\\mathrm{N}`),G(`\\Omicron`,`\\mathrm{O}`),G(`\\plusmn`,`\\pm`),G(`\\rarr`,`\\rightarrow`),G(`\\rArr`,`\\Rightarrow`),G(`\\Rarr`,`\\Rightarrow`),G(`\\real`,`\\Re`),G(`\\reals`,`\\mathbb{R}`),G(`\\Reals`,`\\mathbb{R}`),G(`\\Rho`,`\\mathrm{P}`),G(`\\sdot`,`\\cdot`),G(`\\sect`,`\\S`),G(`\\spades`,`\\spadesuit`),G(`\\sub`,`\\subset`),G(`\\sube`,`\\subseteq`),G(`\\supe`,`\\supseteq`),G(`\\Tau`,`\\mathrm{T}`),G(`\\thetasym`,`\\vartheta`),G(`\\weierp`,`\\wp`),G(`\\Zeta`,`\\mathrm{Z}`),G(`\\argmin`,`\\DOTSB\\operatorname*{arg\\,min}`),G(`\\argmax`,`\\DOTSB\\operatorname*{arg\\,max}`),G(`\\plim`,`\\DOTSB\\mathop{\\operatorname{plim}}\\limits`),G(`\\bra`,`\\mathinner{\\langle{#1}|}`),G(`\\ket`,`\\mathinner{|{#1}\\rangle}`),G(`\\braket`,`\\mathinner{\\langle{#1}\\rangle}`),G(`\\Bra`,`\\left\\langle#1\\right|`),G(`\\Ket`,`\\left|#1\\right\\rangle`),ho=e=>t=>{var n=t.consumeArg().tokens,r=t.consumeArg().tokens,i=t.consumeArg().tokens,a=t.consumeArg().tokens,o=t.macros.get(`|`),s=t.macros.get(`\\|`);t.macros.beginGroup();var l=t=>n=>{e&&(n.macros.set(`|`,o),i.length&&n.macros.set(`\\|`,s));var a=t;return!t&&i.length&&n.future().text===`|`&&(n.popToken(),a=!0),{tokens:a?i:r,numArgs:0}};t.macros.set(`|`,l(!1)),i.length&&t.macros.set(`\\|`,l(!0));var u=t.consumeArg().tokens,d=t.expandTokens([...a,...u,...n]);return t.macros.endGroup(),{tokens:d.reverse(),numArgs:0}},G(`\\bra@ket`,ho(!1)),G(`\\bra@set`,ho(!0)),G(`\\Braket`,`\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}`),G(`\\Set`,`\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}`),G(`\\set`,`\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}`),G(`\\angln`,`{\\angl n}`),G(`\\blue`,`\\textcolor{##6495ed}{#1}`),G(`\\orange`,`\\textcolor{##ffa500}{#1}`),G(`\\pink`,`\\textcolor{##ff00af}{#1}`),G(`\\red`,`\\textcolor{##df0030}{#1}`),G(`\\green`,`\\textcolor{##28ae7b}{#1}`),G(`\\gray`,`\\textcolor{gray}{#1}`),G(`\\purple`,`\\textcolor{##9d38bd}{#1}`),G(`\\blueA`,`\\textcolor{##ccfaff}{#1}`),G(`\\blueB`,`\\textcolor{##80f6ff}{#1}`),G(`\\blueC`,`\\textcolor{##63d9ea}{#1}`),G(`\\blueD`,`\\textcolor{##11accd}{#1}`),G(`\\blueE`,`\\textcolor{##0c7f99}{#1}`),G(`\\tealA`,`\\textcolor{##94fff5}{#1}`),G(`\\tealB`,`\\textcolor{##26edd5}{#1}`),G(`\\tealC`,`\\textcolor{##01d1c1}{#1}`),G(`\\tealD`,`\\textcolor{##01a995}{#1}`),G(`\\tealE`,`\\textcolor{##208170}{#1}`),G(`\\greenA`,`\\textcolor{##b6ffb0}{#1}`),G(`\\greenB`,`\\textcolor{##8af281}{#1}`),G(`\\greenC`,`\\textcolor{##74cf70}{#1}`),G(`\\greenD`,`\\textcolor{##1fab54}{#1}`),G(`\\greenE`,`\\textcolor{##0d923f}{#1}`),G(`\\goldA`,`\\textcolor{##ffd0a9}{#1}`),G(`\\goldB`,`\\textcolor{##ffbb71}{#1}`),G(`\\goldC`,`\\textcolor{##ff9c39}{#1}`),G(`\\goldD`,`\\textcolor{##e07d10}{#1}`),G(`\\goldE`,`\\textcolor{##a75a05}{#1}`),G(`\\redA`,`\\textcolor{##fca9a9}{#1}`),G(`\\redB`,`\\textcolor{##ff8482}{#1}`),G(`\\redC`,`\\textcolor{##f9685d}{#1}`),G(`\\redD`,`\\textcolor{##e84d39}{#1}`),G(`\\redE`,`\\textcolor{##bc2612}{#1}`),G(`\\maroonA`,`\\textcolor{##ffbde0}{#1}`),G(`\\maroonB`,`\\textcolor{##ff92c6}{#1}`),G(`\\maroonC`,`\\textcolor{##ed5fa6}{#1}`),G(`\\maroonD`,`\\textcolor{##ca337c}{#1}`),G(`\\maroonE`,`\\textcolor{##9e034e}{#1}`),G(`\\purpleA`,`\\textcolor{##ddd7ff}{#1}`),G(`\\purpleB`,`\\textcolor{##c6b9fc}{#1}`),G(`\\purpleC`,`\\textcolor{##aa87ff}{#1}`),G(`\\purpleD`,`\\textcolor{##7854ab}{#1}`),G(`\\purpleE`,`\\textcolor{##543b78}{#1}`),G(`\\mintA`,`\\textcolor{##f5f9e8}{#1}`),G(`\\mintB`,`\\textcolor{##edf2df}{#1}`),G(`\\mintC`,`\\textcolor{##e0e5cc}{#1}`),G(`\\grayA`,`\\textcolor{##f6f7f7}{#1}`),G(`\\grayB`,`\\textcolor{##f0f1f2}{#1}`),G(`\\grayC`,`\\textcolor{##e3e5e6}{#1}`),G(`\\grayD`,`\\textcolor{##d6d8da}{#1}`),G(`\\grayE`,`\\textcolor{##babec2}{#1}`),G(`\\grayF`,`\\textcolor{##888d93}{#1}`),G(`\\grayG`,`\\textcolor{##626569}{#1}`),G(`\\grayH`,`\\textcolor{##3b3e40}{#1}`),G(`\\grayI`,`\\textcolor{##21242c}{#1}`),G(`\\kaBlue`,`\\textcolor{##314453}{#1}`),G(`\\kaGreen`,`\\textcolor{##71B307}{#1}`),go={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},nne=class{constructor(e,t,n){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=t,this.expansionCount=0,this.feed(e),this.macros=new $te(ene,t.macros),this.mode=n,this.stack=[]}feed(e){this.lexer=new co(e,this.settings)}switchMode(e){this.mode=e}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(e){this.stack.push(e)}pushTokens(e){this.stack.push(...e)}scanArgument(e){var t,n,r;if(e){if(this.consumeSpaces(),this.future().text!==`[`)return null;t=this.popToken(),{tokens:r,end:n}=this.consumeArg([`]`])}else({tokens:r,start:t,end:n}=this.consumeArg());return this.pushToken(new ka(`EOF`,n.loc)),this.pushTokens(r),new ka(``,Oa.range(t,n))}consumeSpaces(){for(;this.future().text===` `;)this.stack.pop()}consumeArg(e){var t=[],n=e&&e.length>0;n||this.consumeSpaces();var r=this.future(),i,a=0,o=0;do{if(i=this.popToken(),t.push(i),i.text===`{`)++a;else if(i.text===`}`){if(--a,a===-1)throw new Sn(`Extra }`,i)}else if(i.text===`EOF`)throw new Sn(`Unexpected end of input in a macro argument, expected '`+(e&&n?e[o]:`}`)+`'`,i);if(e&&n){if((a===0||a===1&&e[o]===`{`)&&i.text===e[o]){if(++o,o===e.length){t.splice(-o,o);break}}else o=0}}while(a!==0||n);return r.text===`{`&&t[t.length-1].text===`}`&&(t.pop(),t.shift()),t.reverse(),{tokens:t,start:r,end:i}}consumeArgs(e,t){if(t){if(t.length!==e+1)throw new Sn(`The length of delimiters doesn't match the number of args!`);for(var n=t[0],r=0;r<n.length;r++){var i=this.popToken();if(n[r]!==i.text)throw new Sn(`Use of the macro doesn't match its definition`,i)}}for(var a=[],o=0;o<e;o++)a.push(this.consumeArg(t&&t[o+1]).tokens);return a}countExpansion(e){if(this.expansionCount+=e,this.expansionCount>this.settings.maxExpand)throw new Sn(`Too many expansions: infinite loop or need to increase maxExpand setting`)}expandOnce(e){var t=this.popToken(),n=t.text,r=t.noexpand?null:this._getExpansion(n);if(r==null||e&&r.unexpandable){if(e&&r==null&&n[0]===`\\`&&!this.isDefined(n))throw new Sn(`Undefined control sequence: `+n);return this.pushToken(t),!1}this.countExpansion(1);var i=r.tokens,a=this.consumeArgs(r.numArgs,r.delimiters);if(r.numArgs){i=i.slice();for(var o=i.length-1;o>=0;--o){var s=i[o];if(s.text===`#`){if(o===0)throw new Sn(`Incomplete placeholder at end of macro body`,s);if(s=i[--o],s.text===`#`)i.splice(o+1,1);else if(/^[1-9]$/.test(s.text))i.splice(o,2,...a[s.text-1]);else throw new Sn(`Not a valid argument number`,s)}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var e=this.stack.pop();return e.treatAsRelax&&(e.text=`\\relax`),e}}expandMacro(e){return this.macros.has(e)?this.expandTokens([new ka(e)]):void 0}expandTokens(e){var t=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)if(this.expandOnce(!0)===!1){var r=this.stack.pop();r.treatAsRelax&&=(r.noexpand=!1,!1),t.push(r)}return this.countExpansion(t.length),t}expandMacroAsText(e){var t=this.expandMacro(e);return t&&t.map(e=>e.text).join(``)}_getExpansion(e){var t=this.macros.get(e);if(t==null)return t;if(e.length===1){var n=this.lexer.catcodes[e];if(n!=null&&n!==13)return}var r=typeof t==`function`?t(this):t;if(typeof r==`string`){var i=0;if(r.includes(`#`))for(var a=r.replace(/##/g,``);a.includes(`#`+(i+1));)++i;for(var o=new co(r,this.settings),s=[],l=o.lex();l.text!==`EOF`;)s.push(l),l=o.lex();return s.reverse(),{tokens:s,numArgs:i}}return r}isDefined(e){return this.macros.has(e)||ao.hasOwnProperty(e)||ur.math.hasOwnProperty(e)||ur.text.hasOwnProperty(e)||go.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return t==null?ao.hasOwnProperty(e)&&!ao[e].primitive:typeof t==`string`||typeof t==`function`||!t.unexpandable}},_o=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,vo=Object.freeze({"₊":`+`,"₋":`-`,"₌":`=`,"₍":`(`,"₎":`)`,"₀":`0`,"₁":`1`,"₂":`2`,"₃":`3`,"₄":`4`,"₅":`5`,"₆":`6`,"₇":`7`,"₈":`8`,"₉":`9`,ₐ:`a`,ₑ:`e`,ₕ:`h`,ᵢ:`i`,ⱼ:`j`,ₖ:`k`,ₗ:`l`,ₘ:`m`,ₙ:`n`,ₒ:`o`,ₚ:`p`,ᵣ:`r`,ₛ:`s`,ₜ:`t`,ᵤ:`u`,ᵥ:`v`,ₓ:`x`,ᵦ:`β`,ᵧ:`γ`,ᵨ:`ρ`,ᵩ:`ϕ`,ᵪ:`χ`,"⁺":`+`,"⁻":`-`,"⁼":`=`,"⁽":`(`,"⁾":`)`,"⁰":`0`,"¹":`1`,"²":`2`,"³":`3`,"⁴":`4`,"⁵":`5`,"⁶":`6`,"⁷":`7`,"⁸":`8`,"⁹":`9`,ᴬ:`A`,ᴮ:`B`,ᴰ:`D`,ᴱ:`E`,ᴳ:`G`,ᴴ:`H`,ᴵ:`I`,ᴶ:`J`,ᴷ:`K`,ᴸ:`L`,ᴹ:`M`,ᴺ:`N`,ᴼ:`O`,ᴾ:`P`,ᴿ:`R`,ᵀ:`T`,ᵁ:`U`,ⱽ:`V`,ᵂ:`W`,ᵃ:`a`,ᵇ:`b`,ᶜ:`c`,ᵈ:`d`,ᵉ:`e`,ᶠ:`f`,ᵍ:`g`,ʰ:`h`,ⁱ:`i`,ʲ:`j`,ᵏ:`k`,ˡ:`l`,ᵐ:`m`,ⁿ:`n`,ᵒ:`o`,ᵖ:`p`,ʳ:`r`,ˢ:`s`,ᵗ:`t`,ᵘ:`u`,ᵛ:`v`,ʷ:`w`,ˣ:`x`,ʸ:`y`,ᶻ:`z`,ᵝ:`β`,ᵞ:`γ`,ᵟ:`δ`,ᵠ:`ϕ`,ᵡ:`χ`,ᶿ:`θ`}),yo={"́":{text:`\\'`,math:`\\acute`},"̀":{text:"\\`",math:`\\grave`},"̈":{text:`\\"`,math:`\\ddot`},"̃":{text:`\\~`,math:`\\tilde`},"̄":{text:`\\=`,math:`\\bar`},"̆":{text:`\\u`,math:`\\breve`},"̌":{text:`\\v`,math:`\\check`},"̂":{text:`\\^`,math:`\\hat`},"̇":{text:`\\.`,math:`\\dot`},"̊":{text:`\\r`,math:`\\mathring`},"̋":{text:`\\H`},"̧":{text:`\\c`}},bo={á:`á`,à:`à`,ä:`ä`,ǟ:`ǟ`,ã:`ã`,ā:`ā`,ă:`ă`,ắ:`ắ`,ằ:`ằ`,ẵ:`ẵ`,ǎ:`ǎ`,â:`â`,ấ:`ấ`,ầ:`ầ`,ẫ:`ẫ`,ȧ:`ȧ`,ǡ:`ǡ`,å:`å`,ǻ:`ǻ`,ḃ:`ḃ`,ć:`ć`,ḉ:`ḉ`,č:`č`,ĉ:`ĉ`,ċ:`ċ`,ç:`ç`,ď:`ď`,ḋ:`ḋ`,ḑ:`ḑ`,é:`é`,è:`è`,ë:`ë`,ẽ:`ẽ`,ē:`ē`,ḗ:`ḗ`,ḕ:`ḕ`,ĕ:`ĕ`,ḝ:`ḝ`,ě:`ě`,ê:`ê`,ế:`ế`,ề:`ề`,ễ:`ễ`,ė:`ė`,ȩ:`ȩ`,ḟ:`ḟ`,ǵ:`ǵ`,ḡ:`ḡ`,ğ:`ğ`,ǧ:`ǧ`,ĝ:`ĝ`,ġ:`ġ`,ģ:`ģ`,ḧ:`ḧ`,ȟ:`ȟ`,ĥ:`ĥ`,ḣ:`ḣ`,ḩ:`ḩ`,í:`í`,ì:`ì`,ï:`ï`,ḯ:`ḯ`,ĩ:`ĩ`,ī:`ī`,ĭ:`ĭ`,ǐ:`ǐ`,î:`î`,ǰ:`ǰ`,ĵ:`ĵ`,ḱ:`ḱ`,ǩ:`ǩ`,ķ:`ķ`,ĺ:`ĺ`,ľ:`ľ`,ļ:`ļ`,ḿ:`ḿ`,ṁ:`ṁ`,ń:`ń`,ǹ:`ǹ`,ñ:`ñ`,ň:`ň`,ṅ:`ṅ`,ņ:`ņ`,ó:`ó`,ò:`ò`,ö:`ö`,ȫ:`ȫ`,õ:`õ`,ṍ:`ṍ`,ṏ:`ṏ`,ȭ:`ȭ`,ō:`ō`,ṓ:`ṓ`,ṑ:`ṑ`,ŏ:`ŏ`,ǒ:`ǒ`,ô:`ô`,ố:`ố`,ồ:`ồ`,ỗ:`ỗ`,ȯ:`ȯ`,ȱ:`ȱ`,ő:`ő`,ṕ:`ṕ`,ṗ:`ṗ`,ŕ:`ŕ`,ř:`ř`,ṙ:`ṙ`,ŗ:`ŗ`,ś:`ś`,ṥ:`ṥ`,š:`š`,ṧ:`ṧ`,ŝ:`ŝ`,ṡ:`ṡ`,ş:`ş`,ẗ:`ẗ`,ť:`ť`,ṫ:`ṫ`,ţ:`ţ`,ú:`ú`,ù:`ù`,ü:`ü`,ǘ:`ǘ`,ǜ:`ǜ`,ǖ:`ǖ`,ǚ:`ǚ`,ũ:`ũ`,ṹ:`ṹ`,ū:`ū`,ṻ:`ṻ`,ŭ:`ŭ`,ǔ:`ǔ`,û:`û`,ů:`ů`,ű:`ű`,ṽ:`ṽ`,ẃ:`ẃ`,ẁ:`ẁ`,ẅ:`ẅ`,ŵ:`ŵ`,ẇ:`ẇ`,ẘ:`ẘ`,ẍ:`ẍ`,ẋ:`ẋ`,ý:`ý`,ỳ:`ỳ`,ÿ:`ÿ`,ỹ:`ỹ`,ȳ:`ȳ`,ŷ:`ŷ`,ẏ:`ẏ`,ẙ:`ẙ`,ź:`ź`,ž:`ž`,ẑ:`ẑ`,ż:`ż`,Á:`Á`,À:`À`,Ä:`Ä`,Ǟ:`Ǟ`,Ã:`Ã`,Ā:`Ā`,Ă:`Ă`,Ắ:`Ắ`,Ằ:`Ằ`,Ẵ:`Ẵ`,Ǎ:`Ǎ`,Â:`Â`,Ấ:`Ấ`,Ầ:`Ầ`,Ẫ:`Ẫ`,Ȧ:`Ȧ`,Ǡ:`Ǡ`,Å:`Å`,Ǻ:`Ǻ`,Ḃ:`Ḃ`,Ć:`Ć`,Ḉ:`Ḉ`,Č:`Č`,Ĉ:`Ĉ`,Ċ:`Ċ`,Ç:`Ç`,Ď:`Ď`,Ḋ:`Ḋ`,Ḑ:`Ḑ`,É:`É`,È:`È`,Ë:`Ë`,Ẽ:`Ẽ`,Ē:`Ē`,Ḗ:`Ḗ`,Ḕ:`Ḕ`,Ĕ:`Ĕ`,Ḝ:`Ḝ`,Ě:`Ě`,Ê:`Ê`,Ế:`Ế`,Ề:`Ề`,Ễ:`Ễ`,Ė:`Ė`,Ȩ:`Ȩ`,Ḟ:`Ḟ`,Ǵ:`Ǵ`,Ḡ:`Ḡ`,Ğ:`Ğ`,Ǧ:`Ǧ`,Ĝ:`Ĝ`,Ġ:`Ġ`,Ģ:`Ģ`,Ḧ:`Ḧ`,Ȟ:`Ȟ`,Ĥ:`Ĥ`,Ḣ:`Ḣ`,Ḩ:`Ḩ`,Í:`Í`,Ì:`Ì`,Ï:`Ï`,Ḯ:`Ḯ`,Ĩ:`Ĩ`,Ī:`Ī`,Ĭ:`Ĭ`,Ǐ:`Ǐ`,Î:`Î`,İ:`İ`,Ĵ:`Ĵ`,Ḱ:`Ḱ`,Ǩ:`Ǩ`,Ķ:`Ķ`,Ĺ:`Ĺ`,Ľ:`Ľ`,Ļ:`Ļ`,Ḿ:`Ḿ`,Ṁ:`Ṁ`,Ń:`Ń`,Ǹ:`Ǹ`,Ñ:`Ñ`,Ň:`Ň`,Ṅ:`Ṅ`,Ņ:`Ņ`,Ó:`Ó`,Ò:`Ò`,Ö:`Ö`,Ȫ:`Ȫ`,Õ:`Õ`,Ṍ:`Ṍ`,Ṏ:`Ṏ`,Ȭ:`Ȭ`,Ō:`Ō`,Ṓ:`Ṓ`,Ṑ:`Ṑ`,Ŏ:`Ŏ`,Ǒ:`Ǒ`,Ô:`Ô`,Ố:`Ố`,Ồ:`Ồ`,Ỗ:`Ỗ`,Ȯ:`Ȯ`,Ȱ:`Ȱ`,Ő:`Ő`,Ṕ:`Ṕ`,Ṗ:`Ṗ`,Ŕ:`Ŕ`,Ř:`Ř`,Ṙ:`Ṙ`,Ŗ:`Ŗ`,Ś:`Ś`,Ṥ:`Ṥ`,Š:`Š`,Ṧ:`Ṧ`,Ŝ:`Ŝ`,Ṡ:`Ṡ`,Ş:`Ş`,Ť:`Ť`,Ṫ:`Ṫ`,Ţ:`Ţ`,Ú:`Ú`,Ù:`Ù`,Ü:`Ü`,Ǘ:`Ǘ`,Ǜ:`Ǜ`,Ǖ:`Ǖ`,Ǚ:`Ǚ`,Ũ:`Ũ`,Ṹ:`Ṹ`,Ū:`Ū`,Ṻ:`Ṻ`,Ŭ:`Ŭ`,Ǔ:`Ǔ`,Û:`Û`,Ů:`Ů`,Ű:`Ű`,Ṽ:`Ṽ`,Ẃ:`Ẃ`,Ẁ:`Ẁ`,Ẅ:`Ẅ`,Ŵ:`Ŵ`,Ẇ:`Ẇ`,Ẍ:`Ẍ`,Ẋ:`Ẋ`,Ý:`Ý`,Ỳ:`Ỳ`,Ÿ:`Ÿ`,Ỹ:`Ỹ`,Ȳ:`Ȳ`,Ŷ:`Ŷ`,Ẏ:`Ẏ`,Ź:`Ź`,Ž:`Ž`,Ẑ:`Ẑ`,Ż:`Ż`,ά:`ά`,ὰ:`ὰ`,ᾱ:`ᾱ`,ᾰ:`ᾰ`,έ:`έ`,ὲ:`ὲ`,ή:`ή`,ὴ:`ὴ`,ί:`ί`,ὶ:`ὶ`,ϊ:`ϊ`,ΐ:`ΐ`,ῒ:`ῒ`,ῑ:`ῑ`,ῐ:`ῐ`,ό:`ό`,ὸ:`ὸ`,ύ:`ύ`,ὺ:`ὺ`,ϋ:`ϋ`,ΰ:`ΰ`,ῢ:`ῢ`,ῡ:`ῡ`,ῠ:`ῠ`,ώ:`ώ`,ὼ:`ὼ`,Ύ:`Ύ`,Ὺ:`Ὺ`,Ϋ:`Ϋ`,Ῡ:`Ῡ`,Ῠ:`Ῠ`,Ώ:`Ώ`,Ὼ:`Ὼ`},xo=class e{constructor(e,t){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode=`math`,this.gullet=new nne(e,t,this.mode),this.settings=t,this.leftrightDepth=0,this.nextToken=null}expect(e,t){if(t===void 0&&(t=!0),this.fetch().text!==e)throw new Sn(`Expected '`+e+`', got '`+this.fetch().text+`'`,this.fetch());t&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken??=this.gullet.expandNextToken(),this.nextToken}switchMode(e){this.mode=e,this.gullet.switchMode(e)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set(`\\color`,`\\textcolor`);try{var e=this.parseExpression(!1);return this.expect(`EOF`),this.settings.globalGroup||this.gullet.endGroup(),e}finally{this.gullet.endGroups()}}subparse(e){var t=this.nextToken;this.consume(),this.gullet.pushToken(new ka(`}`)),this.gullet.pushTokens(e);var n=this.parseExpression(!1);return this.expect(`}`),this.nextToken=t,n}parseExpression(t,n){for(var r=[];;){this.mode===`math`&&this.consumeSpaces();var i=this.fetch();if(e.endOfExpression.has(i.text)||n&&i.text===n||t&&ao[i.text]&&ao[i.text].infix)break;var a=this.parseAtom(n);if(!a)break;a.type!==`internal`&&r.push(a)}return this.mode===`text`&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t=-1,n,r=0;r<e.length;r++){var i=e[r];if(i.type===`infix`){if(t!==-1)throw new Sn(`only one infix operator per group`,i.token);t=r,n=i.replaceWith}}if(t!==-1&&n){var a,o,s=e.slice(0,t),l=e.slice(t+1);return a=s.length===1&&s[0].type===`ordgroup`?s[0]:{type:`ordgroup`,mode:this.mode,body:s},o=l.length===1&&l[0].type===`ordgroup`?l[0]:{type:`ordgroup`,mode:this.mode,body:l},[n===`\\\\abovefrac`?this.callFunction(n,[a,e[t],o],[]):this.callFunction(n,[a,o],[])]}return e}handleSupSubscript(e){var t=this.fetch(),n=t.text;this.consume(),this.consumeSpaces();var r;do r=this.parseGroup(e);while(r?.type===`internal`);if(!r)throw new Sn(`Expected group after '`+n+`'`,t);return r}formatUnsupportedCmd(e){for(var t=[],n=0;n<e.length;n++)t.push({type:`textord`,mode:`text`,text:e[n]});var r={type:`text`,mode:this.mode,body:t};return{type:`color`,mode:this.mode,color:this.settings.errorColor,body:[r]}}parseAtom(e){var t=this.parseGroup(`atom`,e);if(t?.type===`internal`||this.mode===`text`)return t;for(var n,r;;){this.consumeSpaces();var i=this.fetch();if(i.text===`\\limits`||i.text===`\\nolimits`){if(t&&t.type===`op`)t.limits=i.text===`\\limits`,t.alwaysHandleSupSub=!0;else if(t&&t.type===`operatorname`)t.alwaysHandleSupSub&&(t.limits=i.text===`\\limits`);else throw new Sn(`Limit controls must follow a math operator`,i);this.consume()}else if(i.text===`^`){if(n)throw new Sn(`Double superscript`,i);n=this.handleSupSubscript(`superscript`)}else if(i.text===`_`){if(r)throw new Sn(`Double subscript`,i);r=this.handleSupSubscript(`subscript`)}else if(i.text===`'`){if(n)throw new Sn(`Double superscript`,i);var a={type:`textord`,mode:this.mode,text:`\\prime`},o=[a];for(this.consume();this.fetch().text===`'`;)o.push(a),this.consume();this.fetch().text===`^`&&o.push(this.handleSupSubscript(`superscript`)),n={type:`ordgroup`,mode:this.mode,body:o}}else if(vo[i.text]){var s=_o.test(i.text),l=[];for(l.push(new ka(vo[i.text])),this.consume();;){var u=this.fetch().text;if(!vo[u]||_o.test(u)!==s)break;l.unshift(new ka(vo[u])),this.consume()}var d=this.subparse(l);s?r={type:`ordgroup`,mode:`math`,body:d}:n={type:`ordgroup`,mode:`math`,body:d}}else break}return n||r?{type:`supsub`,mode:this.mode,base:t,sup:n,sub:r}:t}parseFunction(e,t){var n=this.fetch(),r=n.text,i=ao[r];if(!i)return null;if(this.consume(),t&&t!==`atom`&&!i.allowedInArgument)throw new Sn(`Got function '`+r+`' with no arguments`+(t?` as `+t:``),n);if(this.mode===`text`&&!i.allowedInText)throw new Sn(`Can't use function '`+r+`' in text mode`,n);if(this.mode===`math`&&i.allowedInMath===!1)throw new Sn(`Can't use function '`+r+`' in math mode`,n);var{args:a,optArgs:o}=this.parseArguments(r,i);return this.callFunction(r,a,o,n,e)}callFunction(e,t,n,r,i){var a={funcName:e,parser:this,token:r,breakOnTokenText:i},o=ao[e];if(o&&o.handler)return o.handler(a,t,n);throw new Sn(`No function handler for `+e)}parseArguments(e,t){var n=t.numArgs+t.numOptionalArgs;if(n===0)return{args:[],optArgs:[]};for(var r=[],i=[],a=0;a<n;a++){var o=t.argTypes&&t.argTypes[a],s=a<t.numOptionalArgs;(`primitive`in t&&t.primitive&&o==null||t.type===`sqrt`&&a===1&&i[0]==null)&&(o=`primitive`);var l=this.parseGroupOfType(`argument to '`+e+`'`,o,s);if(s)i.push(l);else if(l!=null)r.push(l);else throw new Sn(`Null argument, please report this as a bug`)}return{args:r,optArgs:i}}parseGroupOfType(e,t,n){switch(t){case`color`:return this.parseColorGroup(n);case`size`:return this.parseSizeGroup(n);case`url`:return this.parseUrlGroup(n);case`math`:case`text`:return this.parseArgumentGroup(n,t);case`hbox`:var r=this.parseArgumentGroup(n,`text`);return r==null?null:{type:`styling`,mode:r.mode,body:[r],style:`text`,resetFont:!0};case`raw`:var i=this.parseStringGroup(`raw`,n);return i==null?null:{type:`raw`,mode:`text`,string:i.text};case`primitive`:if(n)throw new Sn(`A primitive argument cannot be optional`);var a=this.parseGroup(e);if(a==null)throw new Sn(`Expected group as `+e,this.fetch());return a;case`original`:case null:case void 0:return this.parseArgumentGroup(n);default:throw new Sn(`Unknown group type as `+e,this.fetch())}}consumeSpaces(){for(;this.fetch().text===` `;)this.consume()}parseStringGroup(e,t){var n=this.gullet.scanArgument(t);if(n==null)return null;for(var r=``,i;(i=this.fetch()).text!==`EOF`;)r+=i.text,this.consume();return this.consume(),n.text=r,n}parseRegexGroup(e,t){for(var n=this.fetch(),r=n,i=``,a;(a=this.fetch()).text!==`EOF`&&e.test(i+a.text);)r=a,i+=r.text,this.consume();if(i===``)throw new Sn(`Invalid `+t+`: '`+n.text+`'`,n);return n.range(r,i)}parseColorGroup(e){var t=this.parseStringGroup(`color`,e);if(t==null)return null;var n=/^(#[a-f0-9]{3,4}|#[a-f0-9]{6}|#[a-f0-9]{8}|[a-f0-9]{6}|[a-z]+)$/i.exec(t.text);if(!n)throw new Sn(`Invalid color: '`+t.text+`'`,t);var r=n[0];return/^[0-9a-f]{6}$/i.test(r)&&(r=`#`+r),{type:`color-token`,mode:this.mode,color:r}}parseSizeGroup(e){var t,n=!1;if(this.gullet.consumeSpaces(),t=!e&&this.gullet.future().text!==`{`?this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,`size`):this.parseStringGroup(`size`,e),!t)return null;!e&&t.text.length===0&&(t.text=`0pt`,n=!0);var r=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t.text);if(!r)throw new Sn(`Invalid size: '`+t.text+`'`,t);var i={number:+(r[1]+r[2]),unit:r[3]};if(!Kn(i))throw new Sn(`Invalid unit: '`+i.unit+`'`,t);return{type:`size`,mode:this.mode,value:i,isBlank:n}}parseUrlGroup(e){this.gullet.lexer.setCatcode(`%`,13),this.gullet.lexer.setCatcode(`~`,12);var t=this.parseStringGroup(`url`,e);if(this.gullet.lexer.setCatcode(`%`,14),this.gullet.lexer.setCatcode(`~`,13),t==null)return null;var n=t.text.replace(/\\([#$%&~_^{}])/g,`$1`);return{type:`url`,mode:this.mode,url:n}}parseArgumentGroup(e,t){var n=this.gullet.scanArgument(e);if(n==null)return null;var r=this.mode;t&&this.switchMode(t),this.gullet.beginGroup();var i=this.parseExpression(!1,`EOF`);this.expect(`EOF`),this.gullet.endGroup();var a={type:`ordgroup`,mode:this.mode,loc:n.loc,body:i};return t&&this.switchMode(r),a}parseGroup(e,t){var n=this.fetch(),r=n.text,i;if(r===`{`||r===`\\begingroup`){this.consume();var a=r===`{`?`}`:`\\endgroup`;this.gullet.beginGroup();var o=this.parseExpression(!1,a),s=this.fetch();this.expect(a),this.gullet.endGroup(),i={type:`ordgroup`,mode:this.mode,loc:Oa.range(n,s),body:o,semisimple:r===`\\begingroup`||void 0}}else if(i=this.parseFunction(t,e)||this.parseSymbol(),i==null&&r[0]===`\\`&&!go.hasOwnProperty(r)){if(this.settings.throwOnError)throw new Sn(`Undefined control sequence: `+r,n);i=this.formatUnsupportedCmd(r),this.consume()}return i}formLigatures(e){for(var t=e.length-1,n=0;n<t;++n){var r=e[n];if(r.type===`textord`){var i=r.text,a=e[n+1];if(!(!a||a.type!==`textord`)){if(i===`-`&&a.text===`-`){var o=e[n+2];n+1<t&&o&&o.type===`textord`&&o.text===`-`?(e.splice(n,3,{type:`textord`,mode:`text`,loc:Oa.range(r,o),text:`---`}),t-=2):(e.splice(n,2,{type:`textord`,mode:`text`,loc:Oa.range(r,a),text:`--`}),--t)}(i===`'`||i==="`")&&a.text===i&&(e.splice(n,2,{type:`textord`,mode:`text`,loc:Oa.range(r,a),text:i+i}),--t)}}}}parseSymbol(){var e=this.fetch(),t=e.text;if(/^\\verb[^a-zA-Z]/.test(t)){this.consume();var n=t.slice(5),r=n.charAt(0)===`*`;if(r&&(n=n.slice(1)),n.length<2||n.charAt(0)!==n.slice(-1))throw new Sn(`\\verb assertion failed --259- please report what input caused this bug`);return n=n.slice(1,-1),{type:`verb`,mode:`text`,body:n,star:r}}bo.hasOwnProperty(t[0])&&!ur[this.mode][t[0]]&&(this.settings.strict&&this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Accented Unicode text character "`+t[0]+`" used in math mode`,e),t=bo[t[0]]+t.slice(1));var i=Zte.exec(t);i&&(t=t.substring(0,i.index),t===`i`?t=`ı`:t===`j`&&(t=`ȷ`));var a;if(ur[this.mode][t]){this.settings.strict&&this.mode===`math`&&Ir.includes(t)&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Latin-1/Unicode text character "`+t[0]+`" used in math mode`,e);var o=ur[this.mode][t].group,s=Oa.range(e);a=on(o)?{type:`atom`,mode:this.mode,family:o,loc:s,text:t}:{type:o,mode:this.mode,loc:s,text:t}}else if(t.charCodeAt(0)>=128)this.settings.strict&&(qt(t.charCodeAt(0))?this.mode===`math`&&this.settings.reportNonstrict(`unicodeTextInMathMode`,`Unicode text character "`+t[0]+`" used in math mode`,e):this.settings.reportNonstrict(`unknownSymbol`,`Unrecognized Unicode character "`+t[0]+`"`+(` (`+t.charCodeAt(0)+`)`),e)),a={type:`textord`,mode:`text`,loc:Oa.range(e),text:t};else return null;if(this.consume(),i)for(var l=0;l<i[0].length;l++){var u=i[0][l];if(!yo[u])throw new Sn(`Unknown accent ' `+u+`'`,e);var d=yo[u][this.mode]||yo[u].text;if(!d)throw new Sn(`Accent `+u+` unsupported in `+this.mode+` mode`,e);a={type:`accent`,mode:this.mode,loc:Oa.range(e),label:d,isStretchy:!1,isShifty:!0,base:a}}return a}},xo.endOfExpression=new Set([`}`,`\\endgroup`,`\\end`,`\\right`,`&`]),So=function(e,t){if(!(typeof e==`string`||e instanceof String))throw TypeError(`KaTeX can only parse string typed expression`);var n=new xo(e,t);delete n.gullet.macros.current[`\\df@tag`];var r=n.parse();if(delete n.gullet.macros.current[`\\current@color`],delete n.gullet.macros.current[`\\color`],n.gullet.macros.get(`\\df@tag`)){if(!t.displayMode)throw new Sn(`\\tag works only in display equations`);r=[{type:`tag`,mode:`text`,body:r,tag:n.subparse([new ka(`\\df@tag`)])}]}return r},Co=function(e,t,n){t.textContent=``;var r=Do(e,n).toNode();t.appendChild(r)},typeof document<`u`&&document.compatMode!==`CSS1Compat`&&(typeof console<`u`&&console.warn(`Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype.`),Co=function(){throw new Sn(`KaTeX doesn't work in quirks mode.`)}),wo=function(e,t){return Do(e,t).toMarkup()},To=function(e,t){return So(e,new Dn(t))},Eo=function(e,t,n){if(n.throwOnError||!(e instanceof Sn))throw e;var r=ri([`katex-error`],[new nr(t)]);return r.setAttribute(`title`,e.toString()),r.setAttribute(`style`,`color:`+n.errorColor),r},Do=function(e,t){var n=new Dn(t);try{return mte(So(e,n),e,n)}catch(t){return Eo(t,e,n)}},Oo=function(e,t){var n=new Dn(t);try{return hte(So(e,n),e,n)}catch(t){return Eo(t,e,n)}},ko=`0.16.47`,Ao={Span:er,Anchor:tr,SymbolNode:nr,SvgNode:rr,PathNode:ir,LineNode:ar},rne={version:ko,render:Co,renderToString:wo,ParseError:Sn,SETTINGS_SCHEMA:En,__parse:To,__renderToDomTree:Do,__renderToHTMLTree:Oo,__setFontMetrics:Xt,__defineSymbol:W,__defineFunction:Qt,__defineMacro:G,__domTree:Ao}}));function ane(){let e=`data-temp-href-target`;Ht.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),Ht.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}function jo(e){return[...e.cssRules].map(e=>e.cssText).join(`260-`)}var Mo,No,Po,Fo,Io,one,sne,cne,lne,une,Lo,dne,fne,pne,mne,hne,gne,_ne,vne,yne,bne,xne,Sne,Cne,wne,Tne,Ro,zo,Bo,Vo,Ene,Ho,Dne,One,Uo,Wo,Go,Ko,qo,Jo,Yo,Xo,Zo,kne,Ane,jne,Qo,$o,es,ts,Mne,ns,Nne,rs,is,Pne,as,os,ss,cs,Fne,ls,us,ds,fs,ps,Ine,ms,Lne,Rne,hs,gs,_s,zne,Bne,Vne,Hne,vs,ys,Une,Wne,bs,xs,Gne,Kne,Ss,Cs,ws,Ts,qne,Es,Ds,Jne,Yne,Os,ks,As,Xne,Zne,Qne,js,Ms,Ns,Ps,Fs,Is,Ls,Rs,zs,Bs,Vs,Hs,Us,$ne,Z,Ws,Gs,Ks,qs,ere,Js,Ys,Xs,tre,Zs=o((()=>{S(),h(),Ne(),Ut(),Mo=p((e,t,{depth:n=2}={})=>{let r={depth:n};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(t=>Mo(e,t,r)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(t=>{e.includes(t)||e.push(t)}),e;if(e==null||n<=0)return typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t;if(t!=null&&typeof e==`object`&&typeof t==`object`){let r=e;Object.entries(t).forEach(([t,i])=>{if(typeof i==`object`){if(i===null)return;Object.hasOwn(e,t)||Object.defineProperty(e,t,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),r[t]===void 0&&(r[t]=Array.isArray(i)?[]:{}),typeof r[t]==`object`&&(r[t]=Mo(r[t],i,{depth:n-1}))}else typeof r[t]!=`object`&&(Object.hasOwn(e,t)?r[t]=i:Object.defineProperty(e,t,{value:i,writable:!0,enumerable:!0,configurable:!0}))})}return e},`assignWithDepth`),No=Mo,Po=`#ffffff`,Fo=`#f2f2f2`,Io=p((e,t)=>t?H(e,{s:-40,l:10}):H(e,{s:-40,l:-10}),`mkBorder`),one=class{static{p(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||we(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||we(this.mainBkg,10)):(this.rowOdd=this.rowOdd||V(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||V(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||H(this.primaryColor,{h:64}),this.fillType3=this.fillType3||H(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||H(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||H(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||H(this.primaryColor,{h:128}),this.fillType7=this.fillType7||H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-10}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??H(this.primaryColor,{l:-30}),this.venn2=this.venn2??H(this.secondaryColor,{l:-30}),this.venn3=this.venn3??H(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??H(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??H(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??H(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??H(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??H(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||`#777`,this.archEdgeArrowColor=this.archEdgeArrowColor||`#777`,this.archEdgeWidth=this.archEdgeWidth||`3`,this.archGroupBorderColor=this.archGroupBorderColor||`#000`,this.archGroupBorderWidth=this.archGroupBorderWidth||`2px`,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},sne=p(e=>{let t=new one;return t.calculate(e),t},`getThemeVariables`),cne=class{static{p(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=U(this.background),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=V(U(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=de(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=we(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=we(this.sectionBkgColor,10),this.taskBorderColor=de(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=de(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||V(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||we(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=V(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=V(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=V(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=U(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10);for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??V(this[`cScale`+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#FF6B6B`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#1B5E20`,complicatedBg:this.cynefin?.complicatedBg||`#0D47A1`,chaoticBg:this.cynefin?.chaoticBg||`#BF360C`,clearBg:this.cynefin?.clearBg||`#F57F17`,confusionBg:this.cynefin?.confusionBg||`#4A148C`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22`},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#ff6b6b`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=V(this.secondaryColor,20),this.git1=V(this.pie2||this.secondaryColor,20),this.git2=V(this.pie3||this.tertiaryColor,20),this.git3=V(this.pie4||H(this.primaryColor,{h:-30}),20),this.git4=V(this.pie5||H(this.primaryColor,{h:-60}),20),this.git5=V(this.pie6||H(this.primaryColor,{h:-90}),10),this.git6=V(this.pie7||H(this.primaryColor,{h:60}),10),this.git7=V(this.pie8||H(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||U(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||U(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`#2d2d2d`,this.emUiStroke=this.emUiStroke||`#555`,this.emProcessorFill=this.emProcessorFill||V(`#5a3d5c`,10),this.emProcessorStroke=this.emProcessorStroke||`#8a6d8c`,this.emReadModelFill=this.emReadModelFill||V(`#3d5a2d`,10),this.emReadModelStroke=this.emReadModelStroke||`#6d8c5c`,this.emCommandFill=this.emCommandFill||V(`#2d3d5a`,10),this.emCommandStroke=this.emCommandStroke||`#5c6d8c`,this.emEventFill=this.emEventFill||V(`#5a452d`,10),this.emEventStroke=this.emEventStroke||`#8c755c`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||V(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||V(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||V(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||V(this.background,2),this.nodeBorder=this.nodeBorder||`#999`}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},lne=p(e=>{let t=new cne;return t.calculate(e),t},`getThemeVariables`),une=class{static{p(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=H(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=Io(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=de(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||we(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||we(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||H(this[`cScale`+e],{h:180});for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{h:30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!==`calculated`){this.cScaleLabel0=this.cScaleLabel0||U(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||U(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||V(this.primaryColor,75)||`#ffffff`,this.rowEven=this.rowEven||V(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||H(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-30}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||H(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??H(this.primaryColor,{l:-30}),this.venn2=this.venn2??H(this.secondaryColor,{l:-30}),this.venn3=this.venn3??H(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??H(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??H(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??H(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??H(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??H(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||we(U(this.git0),25),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||U(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||U(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(Object.keys(this).forEach(e=>{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Lo=p(e=>{let t=new une;return t.calculate(e),t},`getThemeVariables`),dne=class{static{p(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=V(`#cde498`,10),this.primaryBorderColor=Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.primaryColor),this.lineColor=U(this.background),this.textColor=U(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=we(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||we(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||we(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||H(this[`cScale`+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||V(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||V(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||H(this.primaryColor,{l:-30}),this.pie5=this.pie5||H(this.secondaryColor,{l:-30}),this.pie6=this.pie6||H(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??H(this.primaryColor,{l:-30}),this.venn2=this.venn2??H(this.secondaryColor,{l:-30}),this.venn3=this.venn3??H(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??H(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??H(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??H(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??H(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??H(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B4513`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#C8E6C9`,complicatedBg:this.cynefin?.complicatedBg||`#DCEDC8`,chaoticBg:this.cynefin?.chaoticBg||`#FFE0B2`,clearBg:this.cynefin?.clearBg||`#FFF9C4`,confusionBg:this.cynefin?.confusionBg||`#D7CCC8`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||U(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||U(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},fne=p(e=>{let t=new dne;return t.calculate(e),t},`getThemeVariables`),pne=class{static{p(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=V(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.lineColor=U(this.background),this.textColor=U(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||V(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=V(this.contrast,55),this.border2=this.contrast,this.actorBorder=V(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=V(this.contrast,30),this.sectionBkgColor2=V(this.contrast,30),this.taskBorderColor=we(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=V(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=we(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||`#000`,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f4f4f4`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||`#000`,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#222`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=H(this.primaryColor,{h:64}),this.fillType3=H(this.secondaryColor,{h:64}),this.fillType4=H(this.primaryColor,{h:-64}),this.fillType5=H(this.secondaryColor,{h:-64}),this.fillType6=H(this.primaryColor,{h:128}),this.fillType7=H(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??this[`cScale`+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||`#8B0000`,cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||`#E8F5E9`,complicatedBg:this.cynefin?.complicatedBg||`#E3F2FD`,chaoticBg:this.cynefin?.chaoticBg||`#FBE9E7`,clearBg:this.cynefin?.clearBg||`#FFF8E1`,confusionBg:this.cynefin?.confusionBg||`#F3E5F5`,textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0`},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=we(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||H(this.primaryColor,{h:-30}),this.git4=this.pie5||H(this.primaryColor,{h:-60}),this.git5=this.pie6||H(this.primaryColor,{h:-90}),this.git6=this.pie7||H(this.primaryColor,{h:60}),this.git7=this.pie8||H(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1=`white`,this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3=`white`,this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},mne=p(e=>{let t=new pne;return t.calculate(e),t},`getThemeVariables`),hne=class{static{p(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Io(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=H(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||V(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||H(e,{h:30}),this.cScale4=this.cScale4||H(e,{h:60}),this.cScale5=this.cScale5||H(e,{h:90}),this.cScale6=this.cScale6||H(e,{h:120}),this.cScale7=this.cScale7||H(e,{h:150}),this.cScale8=this.cScale8||H(e,{h:210,l:150}),this.cScale9=this.cScale9||H(e,{h:270}),this.cScale10=this.cScale10||H(e,{h:300}),this.cScale11=this.cScale11||H(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||H(e,{h:64}),this.fillType3=this.fillType3||H(t,{h:64}),this.fillType4=this.fillType4||H(e,{h:-64}),this.fillType5=this.fillType5||H(t,{h:-64}),this.fillType6=this.fillType6||H(e,{h:128}),this.fillType7=this.fillType7||H(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||H(e,{l:-10}),this.pie5=this.pie5||H(t,{l:-10}),this.pie6=this.pie6||H(n,{l:-10}),this.pie7=this.pie7||H(e,{h:60,l:-10}),this.pie8=this.pie8||H(e,{h:-60,l:-10}),this.pie9=this.pie9||H(e,{h:120,l:0}),this.pie10=this.pie10||H(e,{h:60,l:-20}),this.pie11=this.pie11||H(e,{h:-60,l:-20}),this.pie12=this.pie12||H(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||H(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||H(e,{h:-30}),this.git4=this.git4||H(e,{h:-60}),this.git5=this.git5||H(e,{h:-90}),this.git6=this.git6||H(e,{h:60}),this.git7=this.git7||H(e,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},gne=p(e=>{let t=new hne;return t.calculate(e),t},`getThemeVariables`),_ne=class{static{p(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=U(this.background),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=V(U(`#323D47`),10),this.border1=`#ccc`,this.border2=de(255,255,255,.25),this.arrowheadColor=U(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||H(this.primaryColor,{h:64}),this.fillType3=this.fillType3||H(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||H(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||H(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||H(this.primaryColor,{h:128}),this.fillType7=this.fillType7||H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-10}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||`#0b0000`,this.git1=this.git1||`#4d1037`,this.git2=this.git2||`#3f5258`,this.git3=this.git3||`#4f2f1b`,this.git4=this.git4||`#6e0a0a`,this.git5=this.git5||`#3b0048`,this.git6=this.git6||`#995a01`,this.git7=this.git7||`#154706`,this.gitDarkMode=!0,this.gitDarkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},vne=p(e=>{let t=new _ne;return t.calculate(e),t},`getThemeVariables`),yne=class{static{p(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Io(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=H(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||V(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||H(e,{h:64}),this.fillType3=this.fillType3||H(t,{h:64}),this.fillType4=this.fillType4||H(e,{h:-64}),this.fillType5=this.fillType5||H(t,{h:-64}),this.fillType6=this.fillType6||H(e,{h:128}),this.fillType7=this.fillType7||H(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||H(e,{l:-10}),this.pie5=this.pie5||H(t,{l:-10}),this.pie6=this.pie6||H(n,{l:-10}),this.pie7=this.pie7||H(e,{h:60,l:-10}),this.pie8=this.pie8||H(e,{h:-60,l:-10}),this.pie9=this.pie9||H(e,{h:120,l:0}),this.pie10=this.pie10||H(e,{h:60,l:-20}),this.pie11=this.pie11||H(e,{h:-60,l:-20}),this.pie12=this.pie12||H(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||H(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#FFFFFF`,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||H(e,{h:-30}),this.git4=this.git4||H(e,{h:-60}),this.git5=this.git5||H(e,{h:-90}),this.git6=this.git6||H(e,{h:60}),this.git7=this.git7||H(e,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},bne=p(e=>{let t=new yne;return t.calculate(e),t},`getThemeVariables`),xne=class{static{p(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=U(this.background),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=V(U(`#323D47`),10),this.border1=`#ccc`,this.border2=de(255,255,255,.25),this.arrowheadColor=U(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||H(this.primaryColor,{h:30}),this.cScale4=this.cScale4||H(this.primaryColor,{h:60}),this.cScale5=this.cScale5||H(this.primaryColor,{h:90}),this.cScale6=this.cScale6||H(this.primaryColor,{h:120}),this.cScale7=this.cScale7||H(this.primaryColor,{h:150}),this.cScale8=this.cScale8||H(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||H(this.primaryColor,{h:270}),this.cScale10=this.cScale10||H(this.primaryColor,{h:300}),this.cScale11=this.cScale11||H(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=we(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||H(this.primaryColor,{h:64}),this.fillType3=this.fillType3||H(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||H(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||H(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||H(this.primaryColor,{h:128}),this.fillType7=this.fillType7||H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-10}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#16141F`,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Sne=p(e=>{let t=new xne;return t.calculate(e),t},`getThemeVariables`),Cne=class{static{p(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Io(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;let e=`#ECECFE`,t=`#E9E9F1`,n=H(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||V(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||H(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||H(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||H(e,{h:64}),this.fillType3=this.fillType3||H(t,{h:64}),this.fillType4=this.fillType4||H(e,{h:-64}),this.fillType5=this.fillType5||H(t,{h:-64}),this.fillType6=this.fillType6||H(e,{h:128}),this.fillType7=this.fillType7||H(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||H(e,{l:-10}),this.pie5=this.pie5||H(t,{l:-10}),this.pie6=this.pie6||H(n,{l:-10}),this.pie7=this.pie7||H(e,{h:60,l:-10}),this.pie8=this.pie8||H(e,{h:-60,l:-10}),this.pie9=this.pie9||H(e,{h:120,l:0}),this.pie10=this.pie10||H(e,{h:60,l:-20}),this.pie11=this.pie11||H(e,{h:-60,l:-20}),this.pie12=this.pie12||H(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||H(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||H(e,{h:-30}),this.git4=this.git4||H(e,{h:-60}),this.git5=this.git5||H(e,{h:-90}),this.git6=this.git6||H(e,{h:60}),this.git7=this.git7||H(e,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.fontWeight=600,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},wne=p(e=>{let t=new Cne;return t.calculate(e),t},`getThemeVariables`),Tne=class{static{p(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=V(this.primaryColor,16),this.tertiaryColor=H(this.primaryColor,{h:-160}),this.primaryBorderColor=U(this.background),this.secondaryBorderColor=Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Io(this.tertiaryColor,this.darkMode),this.primaryTextColor=U(this.primaryColor),this.secondaryTextColor=U(this.secondaryColor),this.tertiaryTextColor=U(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=V(U(`#323D47`),10),this.border1=`#ccc`,this.border2=de(255,255,255,.25),this.arrowheadColor=U(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||H(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||H(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Io(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Io(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Io(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Io(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||U(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||U(this.tertiaryColor),this.lineColor=this.lineColor||U(this.background),this.arrowheadColor=this.arrowheadColor||U(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||we(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||U(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||V(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||U(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||V(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||we(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=we(this[`cScale`+e],75);let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||H(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||H(this.primaryColor,{h:64}),this.fillType3=this.fillType3||H(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||H(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||H(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||H(this.primaryColor,{h:128}),this.fillType7=this.fillType7||H(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||H(this.primaryColor,{l:-10}),this.pie5=this.pie5||H(this.secondaryColor,{l:-10}),this.pie6=this.pie6||H(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||H(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||H(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||H(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||H(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||H(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||H(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||H(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||H(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||H(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||H(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||H(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||H(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||ye(this.quadrant1Fill)?V(this.quadrant1Fill):we(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?we(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||H(this.primaryColor,{h:-30}),this.git4=this.git4||H(this.primaryColor,{h:-60}),this.git5=this.git5||H(this.primaryColor,{h:-90}),this.git6=this.git6||H(this.primaryColor,{h:60}),this.git7=this.git7||H(this.primaryColor,{h:120}),this.darkMode?(this.git0=V(this.git0,25),this.git1=V(this.git1,25),this.git2=V(this.git2,25),this.git3=V(this.git3,25),this.git4=V(this.git4,25),this.git5=V(this.git5,25),this.git6=V(this.git6,25),this.git7=V(this.git7,25)):(this.git0=we(this.git0,25),this.git1=we(this.git1,25),this.git2=we(this.git2,25),this.git3=we(this.git3,25),this.git4=we(this.git4,25),this.git5=we(this.git5,25),this.git6=we(this.git6,25),this.git7=we(this.git7,25)),this.gitInv0=this.gitInv0||U(this.git0),this.gitInv1=this.gitInv1||U(this.git1),this.gitInv2=this.gitInv2||U(this.git2),this.gitInv3=this.gitInv3||U(this.git3),this.gitInv4=this.gitInv4||U(this.git4),this.gitInv5=this.gitInv5||U(this.git5),this.gitInv6=this.gitInv6||U(this.git6),this.gitInv7=this.gitInv7||U(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.fontWeight=600,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Po,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Fo}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ro={base:{getThemeVariables:sne},dark:{getThemeVariables:lne},default:{getThemeVariables:Lo},forest:{getThemeVariables:fne},neutral:{getThemeVariables:mne},neo:{getThemeVariables:gne},"neo-dark":{getThemeVariables:vne},redux:{getThemeVariables:bne},"redux-dark":{getThemeVariables:Sne},"redux-color":{getThemeVariables:wne},"redux-dark-color":{getThemeVariables:p(e=>{let t=new Tne;return t.calculate(e),t},`getThemeVariables`)}},zo={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:`arc`,ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:`right`,highlightSlice:``},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:``,filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Bo={...zo,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,nodePlacementAlignment:`NONE`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`,keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Ro.default.getThemeVariables(),sequence:{...zo.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{defaultRenderer:`dagre-wrapper`,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...zo.gantt,tickInterval:void 0,useWidth:void 0},c4:{...zo.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...zo.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...zo.pie,useWidth:984},xyChart:{...zo.xyChart,useWidth:void 0},requirement:{...zo.requirement,useWidth:void 0},packet:{...zo.packet},eventmodeling:{...zo.eventmodeling},treeView:{...zo.treeView,useWidth:void 0},radar:{...zo.radar},railroad:{...zo.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...zo.ishikawa},sankey:{...zo.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...zo.venn},cynefin:{...zo.cynefin}},Vo=p((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...Vo(e[r],``)]:[...n,t+r],[]),`keyify`),Ene=new Set(Vo(Bo,``)),Ho=Bo,Dne={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},One=p((e,t)=>{for(let n of Object.keys(e)){let r=e[n];(n.startsWith(`__`)||n.includes(`proto`)||n.includes(`constr`)||typeof r!=`string`||!t.test(r))&&(y.debug(`sanitize deleting dictionary entry:`,n,r),delete e[n])}},`sanitizeDictionaryConfig`),Uo=p(e=>{if(y.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>Uo(e));return}for(let t of Object.keys(e)){if(y.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!Ene.has(t)||e[t]==null){y.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){let n=Dne[t];n?One(e[t],n):(y.debug(`sanitizing object`,t),Uo(e[t]));continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(y.debug(`sanitizing css option`,t),e[t]=Wo(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}y.debug(`After sanitization`,e)}},`sanitizeDirective`),Wo=p(e=>{let t=0,n=0;for(let r of e){if(t<n)return`{ /* ERROR: Unbalanced CSS */ }`;r===`{`?t++:r===`}`&&n++}return t===n?e:`{ /* ERROR: Unbalanced CSS */ }`},`sanitizeCss`),Go=Object.freeze(Ho),Ko=p(e=>!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),qo=No({},Go),Yo=[],Xo=No({},Go),Zo=p((e,t)=>{let n=No({},e),r={};for(let e of t)ts(e),r=No(r,e);if(n=No(n,r),r.theme&&r.theme in Ro){let e=No(No({},Jo).themeVariables||{},r.themeVariables);n.theme&&n.theme in Ro&&(n.themeVariables=Ro[n.theme].getThemeVariables(e))}return Xo=n,Pne(Xo),Xo},`updateCurrentConfig`),kne=p(e=>(qo=No({},Go),qo=No(qo,e),e.theme&&Ro[e.theme]&&(qo.themeVariables=Ro[e.theme].getThemeVariables(e.themeVariables)),Zo(qo,Yo),qo),`setSiteConfig`),Ane=p(e=>{Jo=No({},e)},`saveConfigFromInitialize`),jne=p(e=>(qo=No(qo,e),Zo(qo,Yo),qo),`updateSiteConfig`),Qo=p(()=>No({},qo),`getSiteConfig`),$o=p(e=>(Zo(Xo,[e]),es()),`setConfig`),es=p(()=>No({},Xo),`getConfig`),ts=p(e=>{e&&([`secure`,...qo.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(y.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&ts(e[t])}))},`sanitize`),Mne=p(e=>{Uo(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Yo.push(e),Zo(qo,Yo)},`addDirective`),ns=p((e=qo)=>{Yo=[],Zo(e,Yo)},`reset`),Nne={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},rs={},is=p(e=>{rs[e]||(y.warn(Nne[e]),rs[e]=!0)},`issueWarning`),Pne=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&is(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),as=p(()=>{let e={};Jo&&(e=No(e,Jo));for(let t of Yo)e=No(e,t);return e},`getUserDefinedConfig`),os=p(e=>(e.flowchart?.htmlLabels!=null&&is(`FLOWCHART_HTML_LABELS_DEPRECATED`),Ko(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),ss=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,cs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Fne=/\s*%%.*\n/gm,ls=class extends Error{static{p(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},us={},ds=p(function(e,t){e=e.replace(ss,``).replace(cs,``).replace(Fne,`261-`);for(let[n,{detector:r}]of Object.entries(us))if(r(e,t))return n;throw new ls(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),fs=p((...e)=>{for(let{id:t,detector:n,loader:r}of e)ps(t,n,r)},`registerLazyLoadedDiagrams`),ps=p((e,t,n)=>{us[e]&&y.warn(`Detector with key ${e} already exists. Overwriting.`),us[e]={detector:t,loader:n},y.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),Ine=p(e=>us[e].loader,`getDiagramLoader`),ms=/<br\s*\/?>/gi,Lne=p(e=>e?vs(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),Rne=(()=>{let e=!1;return()=>{e||=(ane(),!0)}})(),p(ane,`setupDompurifyHooks`),hs=p(e=>(Rne(),Ht.sanitize(e)),`removeScript`),gs=p((e,t)=>{if(os(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=hs(e):n!==`loose`&&(e=vs(e),e=e.replace(/</g,`&lt;`).replace(/>/g,`&gt;`),e=e.replace(/=/g,`&equals;`),e=Hne(e))}return e},`sanitizeMore`),_s=p((e,t)=>e&&(e=t.dompurifyConfig?Ht.sanitize(gs(e,t),t.dompurifyConfig).toString():Ht.sanitize(gs(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),zne=p((e,t)=>typeof e==`string`?_s(e,t):e.flat().map(e=>_s(e,t)),`sanitizeTextOrArray`),Bne=p(e=>ms.test(e),`hasBreaks`),Vne=p(e=>e.split(ms),`splitBreaks`),Hne=p(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),vs=p(e=>e.replace(ms,`#br#`),`breakToPlaceholder`),ys=p(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),Une=p(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),Wne=p(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),bs=p(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];Gne(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(Kne(r))}return n.join(``)},`parseGenericTypes`),xs=p((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),Gne=p((e,t)=>{let n=xs(e,`~`),r=xs(t,`~`);return n===1&&r===1},`shouldCombineSets`),Kne=p(e=>{let t=xs(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),Ss=p(()=>window.MathMLElement!==void 0,`isMathMLSupported`),Cs=/\$\$(.*?)\$\$/g,ws=p(e=>(e.match(Cs)?.length??0)>0,`hasKatex`),Ts=p(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await Es(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),qne=p(async(e,t)=>{if(!ws(e))return e;if(!(Ss()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Cs,`MathML is unsupported in this environment.`);{let{default:n}=await Promise.resolve().then(()=>(ine(),Wt)),r=t.forceLegacyMathML||!Ss()&&t.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(ms).map(e=>ws(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace(Cs,(e,t)=>n.renderToString(t,{throwOnError:!0,displayMode:!0,output:r}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}},`renderKatexUnsanitized`),Es=p(async(e,t)=>_s(await qne(e,t),t),`renderKatexSanitized`),Ds={getRows:Lne,sanitizeText:_s,sanitizeTextOrArray:zne,hasBreaks:Bne,splitBreaks:Vne,lineBreakRegex:ms,removeScript:hs,getUrl:ys,evaluate:Ko,getMax:Une,getMin:Wne},Jne=p(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),Yne=p(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),Os=p(function(e,t,n,r){Jne(e,Yne(t,n,r))},`configureSvgSize`),ks=p(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;y.info(`SVG bounds: ${a}x${o}`,i);let s=0,l=0;y.info(`Graph bounds: ${s}x${l}`,e),s=a+n*2,l=o+n*2,y.info(`Calculated bounds: ${s}x${l}`),Os(t,l,s,r);let u=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,u)},`setupGraphViewbox`),As={},p(jo,`cssStyleSheetToString`),Xne=p((e,t,n,r)=>{let i=``;return e in As&&As[e]?i=As[e]({...n,svgId:r}):y.warn(`No theme found for ${e}`),`& {262- font-family: ${n.fontFamily};263- font-size: ${n.fontSize};264- fill: ${n.textColor}265- }266- @keyframes edge-animation-frame {267- from {268- stroke-dashoffset: 0;269- }270- }271- @keyframes dash {272- to {273- stroke-dashoffset: 0;274- }275- }276- & .edge-animation-slow {277- stroke-dasharray: 9,5 !important;278- stroke-dashoffset: 900;279- animation: dash 50s linear infinite;280- stroke-linecap: round;281- }282- & .edge-animation-fast {283- stroke-dasharray: 9,5 !important;284- stroke-dashoffset: 900;285- animation: dash 20s linear infinite;286- stroke-linecap: round;287- }288- /* Classes common for multiple diagrams */289-290- & .error-icon {291- fill: ${n.errorBkgColor};292- }293- & .error-text {294- fill: ${n.errorTextColor};295- stroke: ${n.errorTextColor};296- }297-298- & .edge-thickness-normal {299- stroke-width: ${n.strokeWidth??1}px;300- }301- & .edge-thickness-thick {302- stroke-width: 3.5px303- }304- & .edge-pattern-solid {305- stroke-dasharray: 0;306- }307- & .edge-thickness-invisible {308- stroke-width: 0;309- fill: none;310- }311- & .edge-pattern-dashed{312- stroke-dasharray: 3;313- }314- .edge-pattern-dotted {315- stroke-dasharray: 2;316- }317-318- & .marker {319- fill: ${n.lineColor};320- stroke: ${n.lineColor};321- }322- & .marker.cross {323- stroke: ${n.lineColor};324- }325-326- & svg {327- font-family: ${n.fontFamily};328- font-size: ${n.fontSize};329- }330- & p {331- margin: 0332- }333-334- ${i}335- .node .neo-node {336- stroke: ${n.nodeBorder};337- }338-339- [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {340- stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};341- filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};342- }343- [data-look="neo"].swimlane.cluster rect {344- filter: none;345- }346-347-348- [data-look="neo"].node path {349- stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};350- stroke-width: ${n.strokeWidth??1}px;351- }352-353- [data-look="neo"].node .outer-path {354- filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};355- }356-357- [data-look="neo"].node .neo-line path {358- stroke: ${n.nodeBorder};359- filter: none;360- }361-362- [data-look="neo"].node circle{363- stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};364- filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};365- }366-367- [data-look="neo"].node circle .state-start{368- fill: #000000;369- }370-371- [data-look="neo"].icon-shape .icon {372- fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};373- filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};374- }375-376- [data-look="neo"].icon-shape .icon-neo path {377- stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};378- filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};379- }380-381- ${t}382-`},`getStyles`),Zne=p((e,t)=>{t!==void 0&&(As[e]=t)},`addStylesForDiagram`),Qne=Xne,js={},m(js,{clear:()=>Is,getAccDescription:()=>Bs,getAccTitle:()=>Rs,getDiagramTitle:()=>Hs,setAccDescription:()=>zs,setAccTitle:()=>Ls,setDiagramTitle:()=>Vs}),Ms=``,Ns=``,Ps=``,Fs=p(e=>_s(e,es()),`sanitizeText`),Is=p(()=>{Ms=``,Ps=``,Ns=``},`clear`),Ls=p(e=>{Ms=Fs(e).replace(/^\s+/g,``)},`setAccTitle`),Rs=p(()=>Ms,`getAccTitle`),zs=p(e=>{Ps=Fs(e).replace(/\n\s+/g,`383-`)},`setAccDescription`),Bs=p(()=>Ps,`getAccDescription`),Vs=p(e=>{Ns=Fs(e)},`setDiagramTitle`),Hs=p(()=>Ns,`getDiagramTitle`),Us=y,$ne=b,Z=es,Ws=$o,Gs=Go,Ks=p(e=>_s(e,Z()),`sanitizeText`),qs=ks,ere=p(()=>js,`getCommonDb`),Js={},Ys=p((e,t,n)=>{Js[e]&&Us.warn(`Diagram with id ${e} already registered. Overwriting.`),Js[e]=t,n&&ps(e,n),Zne(e,t.styles),t.injectUtils?.(Us,$ne,Z,Ks,qs,ere(),()=>{})},`registerDiagram`),Xs=p(e=>{if(e in Js)return Js[e];throw new tre(e)},`getDiagram`),tre=class extends Error{static{p(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}}}));function Qs(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}var $s=o((()=>{}));function nre(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}var rre=o((()=>{}));function ec(e){let t,n,r;e.length===2?(t=e===Qs||e===nre?e:ire,n=e,r=e):(t=Qs,n=(t,n)=>Qs(e(t),n),r=(t,n)=>e(t)-n);function i(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<0?i=t+1:a=t}while(i<a)}return i}function a(e,r,i=0,a=e.length){if(i<a){if(t(r,r)!==0)return a;do{let t=i+a>>>1;n(e[t],r)<=0?i=t+1:a=t}while(i<a)}return i}function o(e,t,n=0,a=e.length){let o=i(e,t,n,a-1);return o>n&&r(e[o-1],t)>-r(e[o],t)?o-1:o}return{left:i,center:o,right:a}}function ire(){return 0}var are=o((()=>{$s(),rre()}));function ore(e){return e===null?NaN:+e}var sre=o((()=>{})),tc,cre,lre=o((()=>{$s(),are(),sre(),tc=ec(Qs),cre=tc.right,tc.left,ec(ore).center}));function ure({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):n}function dre({_intern:e,_key:t},n){let r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function fre({_intern:e,_key:t},n){let r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function pre(e){return typeof e==`object`&&e?e.valueOf():e}var nc,mre=o((()=>{nc=class extends Map{constructor(e,t=pre){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),e!=null)for(let[t,n]of e)this.set(t,n)}get(e){return super.get(ure(this,e))}has(e){return super.has(ure(this,e))}set(e,t){return super.set(dre(this,e),t)}delete(e){return super.delete(fre(this,e))}}}));function rc(e,t,n){let r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),a=r/10**i,o=a>=gre?10:a>=_re?5:a>=vre?2:1,s,l,u;return i<0?(u=10**-i/o,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=10**i*o,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=n&&n<2?rc(e,t,n*2):[s,l,u]}function hre(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];let r=t<e,[i,a,o]=r?rc(t,e,n):rc(e,t,n);if(!(a>=i))return[];let s=a-i+1,l=Array(s);if(r){if(o<0)for(let e=0;e<s;++e)l[e]=(a-e)/-o;else for(let e=0;e<s;++e)l[e]=(a-e)*o}else if(o<0)for(let e=0;e<s;++e)l[e]=(i+e)/-o;else for(let e=0;e<s;++e)l[e]=(i+e)*o;return l}function ic(e,t,n){return t=+t,e=+e,n=+n,rc(e,t,n)[2]}function ac(e,t,n){t=+t,e=+e,n=+n;let r=t<e,i=r?ic(t,e,n):ic(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}var gre,_re,vre,yre=o((()=>{gre=Math.sqrt(50),_re=Math.sqrt(10),vre=Math.sqrt(2)}));function bre(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}var xre=o((()=>{}));function Sre(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}var Cre=o((()=>{}));function wre(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=Array(i);++r<i;)a[r]=e+r*n;return a}var Tre=o((()=>{})),oc=o((()=>{lre(),$s(),are(),rre(),mre(),yre(),xre(),Cre(),sre(),Tre()}));function Ere(e){return e}var Dre=o((()=>{}));function Ore(e){return`translate(`+e+`,0)`}function kre(e){return`translate(0,`+e+`)`}function Are(e){return t=>+e(t)}function jre(e,t){return t=Math.max(0,e.bandwidth()-t*2)/2,e.round()&&(t=Math.round(t)),n=>+e(n)+t}function Mre(){return!this.__axis}function Nre(e,t){var n=[],r=null,i=null,a=6,o=6,s=3,l=typeof window<`u`&&window.devicePixelRatio>1?0:.5,u=e===sc||e===uc?-1:1,d=e===uc||e===cc?`x`:`y`,f=e===sc||e===lc?Ore:kre;function p(p){var m=r??(t.ticks?t.ticks.apply(t,n):t.domain()),h=i??(t.tickFormat?t.tickFormat.apply(t,n):Ere),g=Math.max(a,0)+s,_=t.range(),v=+_[0]+l,y=+_[_.length-1]+l,b=(t.bandwidth?jre:Are)(t.copy(),l),x=p.selection?p.selection():p,S=x.selectAll(`.domain`).data([null]),C=x.selectAll(`.tick`).data(m,t).order(),w=C.exit(),T=C.enter().append(`g`).attr(`class`,`tick`),E=C.select(`line`),D=C.select(`text`);S=S.merge(S.enter().insert(`path`,`.tick`).attr(`class`,`domain`).attr(`stroke`,`currentColor`)),C=C.merge(T),E=E.merge(T.append(`line`).attr(`stroke`,`currentColor`).attr(d+`2`,u*a)),D=D.merge(T.append(`text`).attr(`fill`,`currentColor`).attr(d,u*g).attr(`dy`,e===sc?`0em`:e===lc?`0.71em`:`0.32em`)),p!==x&&(S=S.transition(p),C=C.transition(p),E=E.transition(p),D=D.transition(p),w=w.transition(p).attr(`opacity`,dc).attr(`transform`,function(e){return isFinite(e=b(e))?f(e+l):this.getAttribute(`transform`)}),T.attr(`opacity`,dc).attr(`transform`,function(e){var t=this.parentNode.__axis;return f((t&&isFinite(t=t(e))?t:b(e))+l)})),w.remove(),S.attr(`d`,e===uc||e===cc?o?`M`+u*o+`,`+v+`H`+l+`V`+y+`H`+u*o:`M`+l+`,`+v+`V`+y:o?`M`+v+`,`+u*o+`V`+l+`H`+y+`V`+u*o:`M`+v+`,`+l+`H`+y),C.attr(`opacity`,1).attr(`transform`,function(e){return f(b(e)+l)}),E.attr(d+`2`,u*a),D.attr(d,u*g).text(h),x.filter(Mre).attr(`fill`,`none`).attr(`font-size`,10).attr(`font-family`,`sans-serif`).attr(`text-anchor`,e===cc?`start`:e===uc?`end`:`middle`),x.each(function(){this.__axis=b})}return p.scale=function(e){return arguments.length?(t=e,p):t},p.ticks=function(){return n=Array.from(arguments),p},p.tickArguments=function(e){return arguments.length?(n=e==null?[]:Array.from(e),p):n.slice()},p.tickValues=function(e){return arguments.length?(r=e==null?null:Array.from(e),p):r&&r.slice()},p.tickFormat=function(e){return arguments.length?(i=e,p):i},p.tickSize=function(e){return arguments.length?(a=o=+e,p):a},p.tickSizeInner=function(e){return arguments.length?(a=+e,p):a},p.tickSizeOuter=function(e){return arguments.length?(o=+e,p):o},p.tickPadding=function(e){return arguments.length?(s=+e,p):s},p.offset=function(e){return arguments.length?(l=+e,p):l},p}function Pre(e){return Nre(sc,e)}function Fre(e){return Nre(lc,e)}var sc,cc,lc,uc,dc,Ire=o((()=>{Dre(),sc=1,cc=2,lc=3,uc=4,dc=1e-6})),Lre=o((()=>{Ire()}));function Rre(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new fc(n)}function fc(e){this._=e}function zre(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}function Bre(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Vre(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Hre,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Hre,Ure=o((()=>{Hre={value:()=>{}},fc.prototype=Rre.prototype={constructor:fc,on:function(e,t){var n=this._,r=zre(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Bre(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Vre(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Vre(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new fc(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}}})),pc=o((()=>{Ure()})),Wre,mc,hc=o((()=>{Wre=`http://www.w3.org/1999/xhtml`,mc={svg:`http://www.w3.org/2000/svg`,xhtml:Wre,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`}}));function gc(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),mc.hasOwnProperty(t)?{space:mc[t],local:e}:e}var _c=o((()=>{hc()}));function Gre(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Kre(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function qre(e){var t=gc(e);return(t.local?Kre:Gre)(t)}var vc=o((()=>{_c(),hc()}));function Jre(){}function yc(e){return e==null?Jre:function(){return this.querySelector(e)}}var bc=o((()=>{}));function Yre(e){typeof e!=`function`&&(e=yc(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),l,u,d=0;d<o;++d)(l=a[d])&&(u=e.call(l,l.__data__,d,a))&&(`__data__`in l&&(u.__data__=l.__data__),s[d]=u);return new Ec(r,this._parents)}var Xre=o((()=>{kc(),bc()}));function Zre(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}var Qre=o((()=>{}));function $re(){return[]}function eie(e){return e==null?$re:function(){return this.querySelectorAll(e)}}var tie=o((()=>{}));function nie(e){return function(){return Zre(e.apply(this,arguments))}}function rie(e){e=typeof e==`function`?nie(e):eie(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,l,u=0;u<s;++u)(l=o[u])&&(r.push(e.call(l,l.__data__,u,o)),i.push(l));return new Ec(r,i)}var iie=o((()=>{kc(),Qre(),tie()}));function aie(e){return function(){return this.matches(e)}}function oie(e){return function(t){return t.matches(e)}}var xc=o((()=>{}));function sie(e){return function(){return uie.call(this.children,e)}}function cie(){return this.firstElementChild}function lie(e){return this.select(e==null?cie:sie(typeof e==`function`?e:oie(e)))}var uie,die=o((()=>{xc(),uie=Array.prototype.find}));function fie(){return Array.from(this.children)}function pie(e){return function(){return hie.call(this.children,e)}}function mie(e){return this.selectAll(e==null?fie:pie(typeof e==`function`?e:oie(e)))}var hie,gie=o((()=>{xc(),hie=Array.prototype.filter}));function _ie(e){typeof e!=`function`&&(e=aie(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],l,u=0;u<o;++u)(l=a[u])&&e.call(l,l.__data__,u,a)&&s.push(l);return new Ec(r,this._parents)}var vie=o((()=>{kc(),xc()}));function yie(e){return Array(e.length)}var bie=o((()=>{}));function xie(){return new Ec(this._enter||this._groups.map(yie),this._parents)}function Sc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var Sie=o((()=>{bie(),kc(),Sc.prototype={constructor:Sc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}}}));function Cie(e){return function(){return e}}var wie=o((()=>{}));function Tie(e,t,n,r,i,a){for(var o=0,s,l=t.length,u=a.length;o<u;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Sc(e,a[o]);for(;o<l;++o)(s=t[o])&&(i[o]=s)}function Eie(e,t,n,r,i,a,o){var s,l,u=new Map,d=t.length,f=a.length,p=Array(d),m;for(s=0;s<d;++s)(l=t[s])&&(p[s]=m=o.call(l,l.__data__,s,t)+``,u.has(m)?i[s]=l:u.set(m,l));for(s=0;s<f;++s)m=o.call(e,a[s],s,a)+``,(l=u.get(m))?(r[s]=l,l.__data__=a[s],u.delete(m)):n[s]=new Sc(e,a[s]);for(s=0;s<d;++s)(l=t[s])&&u.get(p[s])===l&&(i[s]=l)}function Die(e){return e.__data__}function Oie(e,t){if(!arguments.length)return Array.from(this,Die);var n=t?Eie:Tie,r=this._parents,i=this._groups;typeof e!=`function`&&(e=Cie(e));for(var a=i.length,o=Array(a),s=Array(a),l=Array(a),u=0;u<a;++u){var d=r[u],f=i[u],p=f.length,m=kie(e.call(d,d&&d.__data__,u,r)),h=m.length,g=s[u]=Array(h),_=o[u]=Array(h);n(d,f,g,_,l[u]=Array(p),m,t);for(var v=0,y=0,b,x;v<h;++v)if(b=g[v]){for(v>=y&&(y=v+1);!(x=_[y])&&++y<h;);b._next=x||null}}return o=new Ec(o,r),o._enter=s,o._exit=l,o}function kie(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}var Aie=o((()=>{kc(),Sie(),wie()}));function jie(){return new Ec(this._exit||this._groups.map(yie),this._parents)}var Mie=o((()=>{bie(),kc()}));function Nie(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}var Pie=o((()=>{}));function Fie(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),l=0;l<o;++l)for(var u=n[l],d=r[l],f=u.length,p=s[l]=Array(f),m,h=0;h<f;++h)(m=u[h]||d[h])&&(p[h]=m);for(;l<i;++l)s[l]=n[l];return new Ec(s,this._parents)}var Iie=o((()=>{kc()}));function Lie(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}var Rie=o((()=>{}));function zie(e){e||=Bie;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,l=i[a]=Array(s),u,d=0;d<s;++d)(u=o[d])&&(l[d]=u);l.sort(t)}return new Ec(i,this._parents).order()}function Bie(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}var Vie=o((()=>{kc()}));function Hie(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Uie=o((()=>{}));function Wie(){return Array.from(this)}var Gie=o((()=>{}));function Kie(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}var qie=o((()=>{}));function Jie(){let e=0;for(let t of this)++e;return e}var Yie=o((()=>{}));function Xie(){return!this.node()}var Zie=o((()=>{}));function Qie(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}var $ie=o((()=>{}));function eae(e){return function(){this.removeAttribute(e)}}function tae(e){return function(){this.removeAttributeNS(e.space,e.local)}}function nae(e,t){return function(){this.setAttribute(e,t)}}function rae(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function iae(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function aae(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function oae(e,t){var n=gc(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?tae:eae:typeof t==`function`?n.local?aae:iae:n.local?rae:nae)(n,t))}var sae=o((()=>{_c()}));function cae(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Cc=o((()=>{}));function lae(e){return function(){this.style.removeProperty(e)}}function uae(e,t,n){return function(){this.style.setProperty(e,t,n)}}function dae(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function fae(e,t,n){return arguments.length>1?this.each((t==null?lae:typeof t==`function`?dae:uae)(e,t,n??``)):wc(this.node(),e)}function wc(e,t){return e.style.getPropertyValue(t)||cae(e).getComputedStyle(e,null).getPropertyValue(t)}var pae=o((()=>{Cc()}));function mae(e){return function(){delete this[e]}}function hae(e,t){return function(){this[e]=t}}function gae(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function _ae(e,t){return arguments.length>1?this.each((t==null?mae:typeof t==`function`?gae:hae)(e,t)):this.node()[e]}var vae=o((()=>{}));function yae(e){return e.trim().split(/^|\s+/)}function Tc(e){return e.classList||new bae(e)}function bae(e){this._node=e,this._names=yae(e.getAttribute(`class`)||``)}function xae(e,t){for(var n=Tc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function Sae(e,t){for(var n=Tc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function Cae(e){return function(){xae(this,e)}}function wae(e){return function(){Sae(this,e)}}function Tae(e,t){return function(){(t.apply(this,arguments)?xae:Sae)(this,e)}}function Eae(e,t){var n=yae(e+``);if(arguments.length<2){for(var r=Tc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?Tae:t?Cae:wae)(n,t))}var Dae=o((()=>{bae.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}}}));function Oae(){this.textContent=``}function kae(e){return function(){this.textContent=e}}function Aae(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function jae(e){return arguments.length?this.each(e==null?Oae:(typeof e==`function`?Aae:kae)(e)):this.node().textContent}var Mae=o((()=>{}));function Nae(){this.innerHTML=``}function Pae(e){return function(){this.innerHTML=e}}function Fae(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function Iae(e){return arguments.length?this.each(e==null?Nae:(typeof e==`function`?Fae:Pae)(e)):this.node().innerHTML}var Lae=o((()=>{}));function Rae(){this.nextSibling&&this.parentNode.appendChild(this)}function zae(){return this.each(Rae)}var Bae=o((()=>{}));function Vae(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Hae(){return this.each(Vae)}var Uae=o((()=>{}));function Wae(e){var t=typeof e==`function`?e:qre(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var Gae=o((()=>{vc()}));function Kae(){return null}function qae(e,t){var n=typeof e==`function`?e:qre(e),r=t==null?Kae:typeof t==`function`?t:yc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}var Jae=o((()=>{vc(),bc()}));function Yae(){var e=this.parentNode;e&&e.removeChild(this)}function Xae(){return this.each(Yae)}var Zae=o((()=>{}));function Qae(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function $ae(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function eoe(e){return this.select(e?$ae:Qae)}var toe=o((()=>{}));function noe(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}var roe=o((()=>{}));function ioe(e){return function(t){e.call(this,t,this.__data__)}}function aoe(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function ooe(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function soe(e,t,n){return function(){var r=this.__on,i,a=ioe(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function coe(e,t,n){var r=aoe(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,d;l<u;++l)for(i=0,d=s[l];i<a;++i)if((o=r[i]).type===d.type&&o.name===d.name)return d.value}return}for(s=t?soe:ooe,i=0;i<a;++i)this.each(s(r[i],t,n));return this}var loe=o((()=>{}));function uoe(e,t,n){var r=cae(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function doe(e,t){return function(){return uoe(this,e,t)}}function foe(e,t){return function(){return uoe(this,e,t.apply(this,arguments))}}function poe(e,t){return this.each((typeof t==`function`?foe:doe)(e,t))}var moe=o((()=>{Cc()}));function*hoe(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var goe=o((()=>{}));function Ec(e,t){this._groups=e,this._parents=t}function Dc(){return new Ec([[document.documentElement]],Oc)}function _oe(){return this}var Oc,kc=o((()=>{Xre(),iie(),die(),gie(),vie(),Aie(),Sie(),Mie(),Pie(),Iie(),Rie(),Vie(),Uie(),Gie(),qie(),Yie(),Zie(),$ie(),sae(),pae(),vae(),Dae(),Mae(),Lae(),Bae(),Uae(),Gae(),Jae(),Zae(),toe(),roe(),loe(),moe(),goe(),Oc=[null],Ec.prototype=Dc.prototype={constructor:Ec,select:Yre,selectAll:rie,selectChild:lie,selectChildren:mie,filter:_ie,data:Oie,enter:xie,exit:jie,join:Nie,merge:Fie,selection:_oe,order:Lie,sort:zie,call:Hie,nodes:Wie,node:Kie,size:Jie,empty:Xie,each:Qie,attr:oae,style:fae,property:_ae,classed:Eae,text:jae,html:Iae,raise:zae,lower:Hae,append:Wae,insert:qae,remove:Xae,clone:eoe,datum:noe,on:coe,dispatch:poe,[Symbol.iterator]:hoe}}));function Ac(e){return typeof e==`string`?new Ec([[document.querySelector(e)]],[document.documentElement]):new Ec([[e]],Oc)}var voe=o((()=>{kc()})),jc=o((()=>{vc(),voe(),xc(),_c(),hc(),Qre(),kc(),bc(),tie(),pae(),Cc()})),yoe=o((()=>{pc(),jc()}));function Mc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Nc(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}var Pc=o((()=>{}));function Fc(){}function boe(){return this.rgb().formatHex()}function xoe(){return this.rgb().formatHex8()}function Soe(){return Aoe(this).formatHsl()}function Coe(){return this.rgb().formatRgb()}function Ic(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Noe.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?woe(t):n===3?new zc(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Lc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Lc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Poe.exec(e))?new zc(t[1],t[2],t[3],1):(t=Foe.exec(e))?new zc(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ioe.exec(e))?Lc(t[1],t[2],t[3],t[4]):(t=Loe.exec(e))?Lc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Roe.exec(e))?koe(t[1],t[2]/100,t[3]/100,1):(t=zoe.exec(e))?koe(t[1],t[2]/100,t[3]/100,t[4]):Zc.hasOwnProperty(e)?woe(Zc[e]):e===`transparent`?new zc(NaN,NaN,NaN,0):null}function woe(e){return new zc(e>>16&255,e>>8&255,e&255,1)}function Lc(e,t,n,r){return r<=0&&(e=t=n=NaN),new zc(e,t,n,r)}function Toe(e){return e instanceof Fc||(e=Ic(e)),e?(e=e.rgb(),new zc(e.r,e.g,e.b,e.opacity)):new zc}function Rc(e,t,n,r){return arguments.length===1?Toe(e):new zc(e,t,n,r??1)}function zc(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}function Eoe(){return`#${Hc(this.r)}${Hc(this.g)}${Hc(this.b)}`}function Doe(){return`#${Hc(this.r)}${Hc(this.g)}${Hc(this.b)}${Hc((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ooe(){let e=Bc(this.opacity);return`${e===1?`rgb(`:`rgba(`}${Vc(this.r)}, ${Vc(this.g)}, ${Vc(this.b)}${e===1?`)`:`, ${e})`}`}function Bc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Vc(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Hc(e){return e=Vc(e),(e<16?`0`:``)+e.toString(16)}function koe(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Uc(e,t,n,r)}function Aoe(e){if(e instanceof Uc)return new Uc(e.h,e.s,e.l,e.opacity);if(e instanceof Fc||(e=Ic(e)),!e)return new Uc;if(e instanceof Uc)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new Uc(o,s,l,e.opacity)}function joe(e,t,n,r){return arguments.length===1?Aoe(e):new Uc(e,t,n,r??1)}function Uc(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}function Moe(e){return e=(e||0)%360,e<0?e+360:e}function Wc(e){return Math.max(0,Math.min(1,e||0))}function Gc(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Kc,qc,Jc,Yc,Xc,Noe,Poe,Foe,Ioe,Loe,Roe,zoe,Zc,Boe=o((()=>{Pc(),Kc=.7,qc=1/Kc,Jc=`\\s*([+-]?\\d+)\\s*`,Yc=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Xc=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Noe=/^#([0-9a-f]{3,8})$/,Poe=RegExp(`^rgb\\(${Jc},${Jc},${Jc}\\)$`),Foe=RegExp(`^rgb\\(${Xc},${Xc},${Xc}\\)$`),Ioe=RegExp(`^rgba\\(${Jc},${Jc},${Jc},${Yc}\\)$`),Loe=RegExp(`^rgba\\(${Xc},${Xc},${Xc},${Yc}\\)$`),Roe=RegExp(`^hsl\\(${Yc},${Xc},${Xc}\\)$`),zoe=RegExp(`^hsla\\(${Yc},${Xc},${Xc},${Yc}\\)$`),Zc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Mc(Fc,Ic,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:boe,formatHex:boe,formatHex8:xoe,formatHsl:Soe,formatRgb:Coe,toString:Coe}),Mc(zc,Rc,Nc(Fc,{brighter(e){return e=e==null?qc:qc**+e,new zc(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Kc:Kc**+e,new zc(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new zc(Vc(this.r),Vc(this.g),Vc(this.b),Bc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Eoe,formatHex:Eoe,formatHex8:Doe,formatRgb:Ooe,toString:Ooe})),Mc(Uc,joe,Nc(Fc,{brighter(e){return e=e==null?qc:qc**+e,new Uc(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Kc:Kc**+e,new Uc(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new zc(Gc(e>=240?e-240:e+120,i,r),Gc(e,i,r),Gc(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Uc(Moe(this.h),Wc(this.s),Wc(this.l),Bc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=Bc(this.opacity);return`${e===1?`hsl(`:`hsla(`}${Moe(this.h)}, ${Wc(this.s)*100}%, ${Wc(this.l)*100}%${e===1?`)`:`, ${e})`}`}}))})),Voe,Hoe,Qc=o((()=>{Voe=Math.PI/180,Hoe=180/Math.PI}));function $c(e){if(e instanceof el)return new el(e.l,e.a,e.b,e.opacity);if(e instanceof ol)return Goe(e);e instanceof zc||(e=Toe(e));var t=il(e.r),n=il(e.g),r=il(e.b),i=tl((.2225045*t+.7168786*n+.0606169*r)/ll),a,o;return t===n&&n===r?a=o=i:(a=tl((.4360747*t+.3850649*n+.1430804*r)/cl),o=tl((.0139322*t+.0971045*n+.7141733*r)/ul)),new el(116*i-16,500*(a-i),200*(i-o),e.opacity)}function Uoe(e,t,n,r){return arguments.length===1?$c(e):new el(e,t,n,r??1)}function el(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}function tl(e){return e>Koe?e**(1/3):e/pl+dl}function nl(e){return e>fl?e*e*e:pl*(e-dl)}function rl(e){return 255*(e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055)}function il(e){return(e/=255)<=.04045?e/12.92:((e+.055)/1.055)**2.4}function Woe(e){if(e instanceof ol)return new ol(e.h,e.c,e.l,e.opacity);if(e instanceof el||(e=$c(e)),e.a===0&&e.b===0)return new ol(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*Hoe;return new ol(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function al(e,t,n,r){return arguments.length===1?Woe(e):new ol(e,t,n,r??1)}function ol(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function Goe(e){if(isNaN(e.h))return new el(e.l,0,0,e.opacity);var t=e.h*Voe;return new el(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}var sl,cl,ll,ul,dl,fl,pl,Koe,qoe=o((()=>{Pc(),Boe(),Qc(),sl=18,cl=.96422,ll=1,ul=.82521,dl=4/29,fl=6/29,pl=3*fl*fl,Koe=fl*fl*fl,Mc(el,Uoe,Nc(Fc,{brighter(e){return new el(this.l+sl*(e??1),this.a,this.b,this.opacity)},darker(e){return new el(this.l-sl*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=cl*nl(t),e=ll*nl(e),n=ul*nl(n),new zc(rl(3.1338561*t-1.6168667*e-.4906146*n),rl(-.9787684*t+1.9161415*e+.033454*n),rl(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}})),Mc(ol,al,Nc(Fc,{brighter(e){return new ol(this.h,this.c,this.l+sl*(e??1),this.opacity)},darker(e){return new ol(this.h,this.c,this.l-sl*(e??1),this.opacity)},rgb(){return Goe(this).rgb()}}))})),ml=o((()=>{Boe(),qoe(),Pc(),Qc()})),hl=o((()=>{})),Joe=o((()=>{hl()})),gl,Yoe=o((()=>{gl=e=>()=>e}));function Xoe(e,t){return function(n){return e+n*t}}function Zoe(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Qoe(e,t){var n=t-e;return n?Xoe(e,n>180||n<-180?n-360*Math.round(n/360):n):gl(isNaN(e)?t:e)}function $oe(e){return(e=+e)==1?_l:function(t,n){return n-t?Zoe(t,n,e):gl(isNaN(t)?n:t)}}function _l(e,t){var n=t-e;return n?Xoe(e,n):gl(isNaN(e)?t:e)}var vl=o((()=>{Yoe()})),yl,ese=o((()=>{ml(),hl(),Joe(),vl(),yl=(function e(t){var n=$oe(t);function r(e,t){var r=n((e=Rc(e)).r,(t=Rc(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=_l(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1)}));function tse(e,t){t||=[];var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function nse(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var rse=o((()=>{}));function ise(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=Array(r),a=Array(n),o;for(o=0;o<r;++o)i[o]=wl(e[o],t[o]);for(;o<n;++o)a[o]=t[o];return function(e){for(o=0;o<r;++o)a[o]=i[o](e);return a}}var ase=o((()=>{Tl()}));function ose(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}var sse=o((()=>{}));function bl(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var xl=o((()=>{}));function cse(e,t){var n={},r={},i;for(i in(typeof e!=`object`||!e)&&(e={}),(typeof t!=`object`||!t)&&(t={}),t)i in e?n[i]=wl(e[i],t[i]):r[i]=t[i];return function(e){for(i in n)r[i]=n[i](e);return r}}var lse=o((()=>{Tl()}));function use(e){return function(){return e}}function dse(e){return function(t){return e(t)+``}}function fse(e,t){var n=Sl.lastIndex=Cl.lastIndex=0,r,i,a,o=-1,s=[],l=[];for(e+=``,t+=``;(r=Sl.exec(e))&&(i=Cl.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:bl(r,i)})),n=Cl.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?dse(l[0].x):use(t):(t=l.length,function(e){for(var n=0,r;n<t;++n)s[(r=l[n]).i]=r.x(e);return s.join(``)})}var Sl,Cl,pse=o((()=>{xl(),Sl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Cl=new RegExp(Sl.source,`g`)}));function wl(e,t){var n=typeof t,r;return t==null||n===`boolean`?gl(t):(n===`number`?bl:n===`string`?(r=Ic(t))?(t=r,yl):fse:t instanceof Ic?yl:t instanceof Date?ose:nse(t)?tse:Array.isArray(t)?ise:typeof t.valueOf!=`function`&&typeof t.toString!=`function`||isNaN(t)?cse:bl)(e,t)}var Tl=o((()=>{ml(),ese(),ase(),sse(),xl(),lse(),pse(),Yoe(),rse()}));function mse(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var hse=o((()=>{}));function gse(e,t,n,r,i,a){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*El,skewX:Math.atan(l)*El,scaleX:o,scaleY:s}}var El,Dl,_se=o((()=>{El=180/Math.PI,Dl={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}}));function vse(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Dl:gse(t.a,t.b,t.c,t.d,t.e,t.f)}function yse(e){return e==null||(Ol||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Ol.setAttribute(`transform`,e),!(e=Ol.transform.baseVal.consolidate()))?Dl:(e=e.matrix,gse(e.a,e.b,e.c,e.d,e.e,e.f))}var Ol,bse=o((()=>{_se()}));function xse(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var l=o.push(`translate(`,null,t,null,n);s.push({i:l-4,x:bl(e,i)},{i:l-2,x:bl(r,a)})}else(i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:bl(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:bl(e,t)})}function l(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:bl(e,n)},{i:s-2,x:bl(t,r)})}else(n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),l(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var Sse,Cse,wse=o((()=>{xl(),bse(),Sse=xse(vse,`px, `,`px)`,`deg)`),Cse=xse(yse,`, `,`)`,`)`)}));function Tse(e){return function(t,n){var r=e((t=al(t)).h,(n=al(n)).h),i=_l(t.c,n.c),a=_l(t.l,n.l),o=_l(t.opacity,n.opacity);return function(e){return t.h=r(e),t.c=i(e),t.l=a(e),t.opacity=o(e),t+``}}}var Ese,Dse=o((()=>{ml(),vl(),Ese=Tse(Qoe)})),kl=o((()=>{Tl(),ase(),hl(),Joe(),sse(),vl(),xl(),rse(),lse(),hse(),pse(),wse(),ese(),ml(),Dse()}));function Al(){return Bl||=(Ul(Ose),Hl.now()+Vl)}function Ose(){Bl=0}function jl(){this._call=this._time=this._next=null}function kse(e,t,n){var r=new jl;return r.restart(e,t,n),r}function Ase(){Al(),++Nl;for(var e=Ll,t;e;)(t=Bl-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Nl}function jse(){Bl=(zl=Hl.now())+Vl,Nl=Pl=0;try{Ase()}finally{Nl=0,Nse(),Bl=0}}function Mse(){var e=Hl.now(),t=e-zl;t>Il&&(Vl-=t,zl=e)}function Nse(){for(var e,t=Ll,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Ll=n);Rl=e,Ml(r)}function Ml(e){Nl||(Pl&&=clearTimeout(Pl),e-Bl>24?(e<1/0&&(Pl=setTimeout(jse,e-Hl.now()-Vl)),Fl&&=clearInterval(Fl)):(Fl||=(zl=Hl.now(),setInterval(Mse,Il)),Nl=1,Ul(jse)))}var Nl,Pl,Fl,Il,Ll,Rl,zl,Bl,Vl,Hl,Ul,Pse=o((()=>{Nl=0,Pl=0,Fl=0,Il=1e3,zl=0,Bl=0,Vl=0,Hl=typeof performance==`object`&&performance.now?performance:Date,Ul=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},jl.prototype=kse.prototype={constructor:jl,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Al():+n)+(t==null?0:+t),!this._next&&Rl!==this&&(Rl?Rl._next=this:Ll=this,Rl=this),this._call=e,this._time=n,Ml()},stop:function(){this._call&&(this._call=null,this._time=1/0,Ml())}}}));function Fse(e,t,n){var r=new jl;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Ise=o((()=>{Pse()})),Wl=o((()=>{Pse(),Ise()}));function Gl(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Lse(e,n,{name:t,index:r,group:i,on:Rse,tween:zse,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Kl(e,t){var n=Jl(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function ql(e,t){var n=Jl(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function Jl(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Lse(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=kse(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var u,d,f,p;if(n.state!==1)return l();for(u in r)if(p=r[u],p.name===n.name){if(p.state===3)return Fse(o);p.state===4?(p.state=6,p.timer.stop(),p.on.call(`interrupt`,e,e.__data__,p.index,p.group),delete r[u]):+u<t&&(p.state=6,p.timer.stop(),p.on.call(`cancel`,e,e.__data__,p.index,p.group),delete r[u])}if(Fse(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(f=n.tween.length),u=0,d=-1;u<f;++u)(p=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(i[++d]=p);i.length=d+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),l())}function l(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}var Rse,zse,Yl=o((()=>{pc(),Wl(),Rse=Rre(`start`,`end`,`cancel`,`interrupt`),zse=[]}));function Bse(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}var Vse=o((()=>{Yl()}));function Hse(e){return this.each(function(){Bse(this,e)})}var Use=o((()=>{Vse()}));function Wse(e,t){var n,r;return function(){var i=ql(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Gse(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=ql(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},l=0,u=i.length;l<u;++l)if(i[l].name===t){i[l]=s;break}l===u&&i.push(s)}a.tween=i}}function Kse(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=Jl(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Wse:Gse)(n,e,t))}function Xl(e,t,n){var r=e._id;return e.each(function(){var e=ql(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return Jl(e,r).value[t]}}var Zl=o((()=>{Yl()}));function qse(e,t){var n;return(typeof t==`number`?bl:t instanceof Ic?yl:(n=Ic(t))?(t=n,yl):fse)(e,t)}var Jse=o((()=>{ml(),kl()}));function Yse(e){return function(){this.removeAttribute(e)}}function Xse(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Zse(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Qse(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function $se(e,t,n){var r,i,a;return function(){var o,s=n(this),l;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),l=s+``,o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s)))}}function ece(e,t,n){var r,i,a;return function(){var o,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),l=s+``,o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s)))}}function tce(e,t){var n=gc(e),r=n===`transform`?Cse:qse;return this.attrTween(e,typeof t==`function`?(n.local?ece:$se)(n,r,Xl(this,`attr.`+e,t)):t==null?(n.local?Xse:Yse)(n):(n.local?Qse:Zse)(n,r,t))}var nce=o((()=>{kl(),jc(),Zl(),Jse()}));function rce(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function ice(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function ace(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&ice(e,i)),n}return i._value=t,i}function oce(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&rce(e,i)),n}return i._value=t,i}function sce(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=gc(e);return this.tween(n,(r.local?ace:oce)(r,t))}var cce=o((()=>{jc()}));function lce(e,t){return function(){Kl(this,e).delay=+t.apply(this,arguments)}}function uce(e,t){return t=+t,function(){Kl(this,e).delay=t}}function dce(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?lce:uce)(t,e)):Jl(this.node(),t).delay}var fce=o((()=>{Yl()}));function pce(e,t){return function(){ql(this,e).duration=+t.apply(this,arguments)}}function mce(e,t){return t=+t,function(){ql(this,e).duration=t}}function hce(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?pce:mce)(t,e)):Jl(this.node(),t).duration}var gce=o((()=>{Yl()}));function _ce(e,t){if(typeof t!=`function`)throw Error();return function(){ql(this,e).ease=t}}function vce(e){var t=this._id;return arguments.length?this.each(_ce(t,e)):Jl(this.node(),t).ease}var yce=o((()=>{Yl()}));function bce(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();ql(this,e).ease=n}}function xce(e){if(typeof e!=`function`)throw Error();return this.each(bce(this._id,e))}var Sce=o((()=>{Yl()}));function Cce(e){typeof e!=`function`&&(e=aie(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],l,u=0;u<o;++u)(l=a[u])&&e.call(l,l.__data__,u,a)&&s.push(l);return new Ql(r,this._parents,this._name,this._id)}var wce=o((()=>{jc(),eu()}));function Tce(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var l=t[s],u=n[s],d=l.length,f=o[s]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;s<r;++s)o[s]=t[s];return new Ql(o,this._parents,this._name,this._id)}var Ece=o((()=>{eu()}));function Dce(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function Oce(e,t,n){var r,i,a=Dce(t)?Kl:ql;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function kce(e,t){var n=this._id;return arguments.length<2?Jl(this.node(),n).on.on(e):this.each(Oce(n,e,t))}var Ace=o((()=>{Yl()}));function jce(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Mce(){return this.on(`end.remove`,jce(this._id))}var Nce=o((()=>{}));function Pce(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=yc(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],l=s.length,u=a[o]=Array(l),d,f,p=0;p<l;++p)(d=s[p])&&(f=e.call(d,d.__data__,p,s))&&(`__data__`in d&&(f.__data__=d.__data__),u[p]=f,Gl(u[p],t,n,p,u,Jl(d,n)));return new Ql(a,this._parents,t,n)}var Fce=o((()=>{jc(),eu(),Yl()}));function Ice(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=eie(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var l=r[s],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=e.call(d,d.__data__,f,l),m,h=Jl(d,n),g=0,_=p.length;g<_;++g)(m=p[g])&&Gl(m,t,n,g,p,h);a.push(p),o.push(d)}return new Ql(a,o,t,n)}var Lce=o((()=>{jc(),eu(),Yl()}));function Rce(){return new zce(this._groups,this._parents)}var zce,Bce=o((()=>{jc(),zce=Dc.prototype.constructor}));function Vce(e,t){var n,r,i;return function(){var a=wc(this,e),o=(this.style.removeProperty(e),wc(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Hce(e){return function(){this.style.removeProperty(e)}}function Uce(e,t,n){var r,i=n+``,a;return function(){var o=wc(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function Wce(e,t,n){var r,i,a;return function(){var o=wc(this,e),s=n(this),l=s+``;return s??(l=s=(this.style.removeProperty(e),wc(this,e))),o===l?null:o===r&&l===i?a:(i=l,a=t(r=o,s))}}function Gce(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var l=ql(this,e),u=l.on,d=l.value[a]==null?s||=Hce(t):void 0;(u!==n||i!==d)&&(r=(n=u).copy()).on(o,i=d),l.on=r}}function Kce(e,t,n){var r=(e+=``)==`transform`?Sse:qse;return t==null?this.styleTween(e,Vce(e,r)).on(`end.style.`+e,Hce(e)):typeof t==`function`?this.styleTween(e,Wce(e,r,Xl(this,`style.`+e,t))).each(Gce(this._id,e)):this.styleTween(e,Uce(e,r,t),n).on(`end.style.`+e,null)}var qce=o((()=>{kl(),jc(),Yl(),Zl(),Jse()}));function Jce(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Yce(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&Jce(e,a,n)),r}return a._value=t,a}function Xce(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,Yce(e,t,n??``))}var Zce=o((()=>{}));function Qce(e){return function(){this.textContent=e}}function $ce(e){return function(){var t=e(this);this.textContent=t??``}}function ele(e){return this.tween(`text`,typeof e==`function`?$ce(Xl(this,`text`,e)):Qce(e==null?``:e+``))}var tle=o((()=>{Zl()}));function nle(e){return function(t){this.textContent=e.call(this,t)}}function rle(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&nle(r)),t}return r._value=e,r}function ile(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,rle(e))}var ale=o((()=>{}));function ole(){for(var e=this._name,t=this._id,n=ule(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,l,u=0;u<s;++u)if(l=o[u]){var d=Jl(l,t);Gl(l,e,n,u,o,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new Ql(r,this._parents,e,n)}var sle=o((()=>{eu(),Yl()}));function cle(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},l={value:function(){--i===0&&a()}};n.each(function(){var n=ql(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),n.on=t}),i===0&&a()})}var lle=o((()=>{Yl()}));function Ql(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function ule(){return++dle}var dle,$l,eu=o((()=>{jc(),nce(),cce(),fce(),gce(),yce(),Sce(),wce(),Ece(),Ace(),Nce(),Fce(),Lce(),Bce(),qce(),Zce(),tle(),ale(),sle(),Zl(),lle(),dle=0,$l=Dc.prototype,Ql.prototype={constructor:Ql,select:Pce,selectAll:Ice,selectChild:$l.selectChild,selectChildren:$l.selectChildren,filter:Cce,merge:Tce,selection:Rce,transition:ole,call:$l.call,nodes:$l.nodes,node:$l.node,size:$l.size,empty:$l.empty,each:$l.each,on:kce,attr:tce,attrTween:sce,style:Kce,styleTween:Xce,text:ele,textTween:ile,remove:Mce,tween:Kse,delay:dce,duration:hce,ease:vce,easeVarying:xce,end:cle,[Symbol.iterator]:$l[Symbol.iterator]}}));function fle(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var ple=o((()=>{})),mle=o((()=>{ple()}));function hle(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function gle(e){var t,n;e instanceof Ql?(t=e._id,e=e._name):(t=ule(),(n=_le).time=Al(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,l,u=0;u<s;++u)(l=o[u])&&Gl(l,e,t,u,o,n||hle(l,t));return new Ql(r,this._parents,e,t)}var _le,vle=o((()=>{eu(),Yl(),mle(),Wl(),_le={time:null,delay:0,duration:250,ease:fle}})),yle=o((()=>{jc(),Use(),vle(),Dc.prototype.interrupt=Hse,Dc.prototype.transition=gle})),tu=o((()=>{yle(),eu(),Yl(),Vse()}));function nu(e){return{type:e}}var ble,xle,Sle,Cle=o((()=>{tu(),{abs:ble,max:xle,min:Sle}=Math,[`w`,`e`].map(nu),[`n`,`s`].map(nu),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(nu)})),wle=o((()=>{Cle()}));function Tle(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Ele(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Tle;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var ru,iu,au,Dle,ou,Ole=o((()=>{ru=Math.PI,iu=2*ru,au=1e-6,Dle=iu-au,ou=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Tle:Ele(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,l=r-t,u=a-e,d=o-t,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(f>au){if(!(Math.abs(d*s-l*u)>au)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let p=n-a,m=r-o,h=s*s+l*l,g=p*p+m*m,_=Math.sqrt(h),v=Math.sqrt(f),y=i*Math.tan((ru-Math.acos((h+f-g)/(2*_*v)))/2),b=y/v,x=y/_;Math.abs(b-1)>au&&this._append`L${e+b*u},${t+b*d}`,this._append`A${i},${i},0,0,${+(d*p>u*m)},${this._x1=e+x*s},${this._y1=t+x*l}`}}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,u=t+s,d=1^a,f=a?r-i:i-r;this._x1===null?this._append`M${l},${u}`:(Math.abs(this._x1-l)>au||Math.abs(this._y1-u)>au)&&this._append`L${l},${u}`,n&&(f<0&&(f=f%iu+iu),f>Dle?this._append`A${n},${n},0,1,${d},${e-o},${t-s}A${n},${n},0,1,${d},${this._x1=l},${this._y1=u}`:f>au&&this._append`A${n},${n},0,${+(f>=ru)},${d},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}},ou.prototype})),su=o((()=>{Ole()})),kle=o((()=>{su()})),Ale=o((()=>{oc()})),jle=o((()=>{})),Mle=o((()=>{})),Nle=o((()=>{Mle()})),Ple=o((()=>{})),Fle=o((()=>{Ple(),pc(),Wl()}));function Ile(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString(`en`).replace(/,/g,``):e.toString(10)}function cu(e,t){if(!isFinite(e)||e===0)return null;var n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf(`e`),r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}var lu=o((()=>{}));function uu(e){return e=cu(Math.abs(e)),e?e[1]:NaN}var du=o((()=>{lu()}));function Lle(e,t){return function(n,r){for(var i=n.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}var Rle=o((()=>{}));function zle(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var Ble=o((()=>{}));function fu(e){if(!(t=Vle.exec(e)))throw Error(`invalid format: `+e);var t;return new pu({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function pu(e){this.fill=e.fill===void 0?` `:e.fill+``,this.align=e.align===void 0?`>`:e.align+``,this.sign=e.sign===void 0?`-`:e.sign+``,this.symbol=e.symbol===void 0?``:e.symbol+``,this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?``:e.type+``}var Vle,Hle=o((()=>{Vle=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,fu.prototype=pu.prototype,pu.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?`0`:``)+(this.width===void 0?``:Math.max(1,this.width|0))+(this.comma?`,`:``)+(this.precision===void 0?``:`.`+Math.max(0,this.precision|0))+(this.trim?`~`:``)+this.type}}));function Ule(e){out:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case`.`:r=i=n;break;case`0`:r===0&&(r=n),i=n;break;default:if(!+e[n])break out;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(i+1):e}var Wle=o((()=>{}));function Gle(e,t){var n=cu(e,t);if(!n)return mu=void 0,e.toPrecision(t);var r=n[0],i=n[1],a=i-(mu=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=r.length;return a===o?r:a>o?r+Array(a-o+1).join(`0`):a>0?r.slice(0,a)+`.`+r.slice(a):`0.`+Array(1-a).join(`0`)+cu(e,Math.max(0,t+a-1))[0]}var mu,Kle=o((()=>{lu()}));function qle(e,t){var n=cu(e,t);if(!n)return e+``;var r=n[0],i=n[1];return i<0?`0.`+Array(-i).join(`0`)+r:r.length>i+1?r.slice(0,i+1)+`.`+r.slice(i+1):r+Array(i-r.length+2).join(`0`)}var Jle=o((()=>{lu()})),hu,Yle=o((()=>{lu(),Kle(),Jle(),hu={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+``,d:Ile,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>qle(e*100,t),r:qle,s:Gle,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)}}));function Xle(e){return e}var Zle=o((()=>{}));function Qle(e){var t=e.grouping===void 0||e.thousands===void 0?Xle:Lle(gu.call(e.grouping,Number),e.thousands+``),n=e.currency===void 0?``:e.currency[0]+``,r=e.currency===void 0?``:e.currency[1]+``,i=e.decimal===void 0?`.`:e.decimal+``,a=e.numerals===void 0?Xle:zle(gu.call(e.numerals,String)),o=e.percent===void 0?`%`:e.percent+``,s=e.minus===void 0?`−`:e.minus+``,l=e.nan===void 0?`NaN`:e.nan+``;function u(e,u){e=fu(e);var d=e.fill,f=e.align,p=e.sign,m=e.symbol,h=e.zero,g=e.width,_=e.comma,v=e.precision,y=e.trim,b=e.type;b===`n`?(_=!0,b=`g`):hu[b]||(v===void 0&&(v=12),y=!0,b=`g`),(h||d===`0`&&f===`=`)&&(h=!0,d=`0`,f=`=`);var x=(u&&u.prefix!==void 0?u.prefix:``)+(m===`$`?n:m===`#`&&/[boxX]/.test(b)?`0`+b.toLowerCase():``),S=(m===`$`?r:/[%p]/.test(b)?o:``)+(u&&u.suffix!==void 0?u.suffix:``),C=hu[b],w=/[defgprs%]/.test(b);v=v===void 0?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v));function T(e){var n=x,r=S,o,u,m;if(b===`c`)r=C(e)+r,e=``;else{e=+e;var T=e<0||1/e<0;if(e=isNaN(e)?l:C(Math.abs(e),v),y&&(e=Ule(e)),T&&+e==0&&p!==`+`&&(T=!1),n=(T?p===`(`?p:s:p===`-`||p===`(`?``:p)+n,r=(b===`s`&&!isNaN(e)&&mu!==void 0?_u[8+mu/3]:``)+r+(T&&p===`(`?`)`:``),w){for(o=-1,u=e.length;++o<u;)if(m=e.charCodeAt(o),48>m||m>57){r=(m===46?i+e.slice(o+1):e.slice(o))+r,e=e.slice(0,o);break}}}_&&!h&&(e=t(e,1/0));var E=n.length+e.length+r.length,D=E<g?Array(g-E+1).join(d):``;switch(_&&h&&(e=t(D+e,D.length?g-r.length:1/0),D=``),f){case`<`:e=n+e+r+D;break;case`=`:e=n+D+e+r;break;case`^`:e=D.slice(0,E=D.length>>1)+n+e+r+D.slice(E);break;default:e=D+n+e+r}return a(e)}return T.toString=function(){return e+``},T}function d(e,t){var n=Math.max(-8,Math.min(8,Math.floor(uu(t)/3)))*3,r=10**-n,i=u((e=fu(e),e.type=`f`,e),{suffix:_u[8+n/3]});return function(e){return i(r*e)}}return{format:u,formatPrefix:d}}var gu,_u,$le=o((()=>{du(),Rle(),Ble(),Hle(),Wle(),Yle(),Kle(),Zle(),gu=Array.prototype.map,_u=[`y`,`z`,`a`,`f`,`p`,`n`,`µ`,`m`,``,`k`,`M`,`G`,`T`,`P`,`E`,`Z`,`Y`]}));function eue(e){return vu=Qle(e),yu=vu.format,tue=vu.formatPrefix,vu}var vu,yu,tue,nue=o((()=>{$le(),eue({thousands:`,`,grouping:[3],currency:[`$`,``]})}));function rue(e){return Math.max(0,-uu(Math.abs(e)))}var iue=o((()=>{du()}));function aue(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(uu(t)/3)))*3-uu(Math.abs(e)))}var oue=o((()=>{du()}));function sue(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,uu(t)-uu(e))+1}var cue=o((()=>{du()})),bu=o((()=>{nue(),$le(),Hle(),iue(),oue(),cue()})),lue=o((()=>{oc()}));function uue(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function due(){return this.eachAfter(uue)}var fue=o((()=>{}));function pue(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}var mue=o((()=>{}));function hue(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}var gue=o((()=>{}));function _ue(e,t){for(var n=this,r=[n],i=[],a,o,s,l=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++l,this);return this}var vue=o((()=>{}));function yue(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}var bue=o((()=>{}));function xue(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}var Sue=o((()=>{}));function Cue(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}var wue=o((()=>{}));function Tue(e){for(var t=this,n=Eue(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function Eue(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}var Due=o((()=>{}));function Oue(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var kue=o((()=>{}));function Aue(){return Array.from(this)}var jue=o((()=>{}));function Mue(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}var Nue=o((()=>{}));function Pue(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}var Fue=o((()=>{}));function*Iue(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}var Lue=o((()=>{}));function xu(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Bue)):t===void 0&&(t=zue);for(var n=new Su(e),r,i=[n],a,o,s,l;r=i.pop();)if((o=t(r.data))&&(l=(o=Array.from(o)).length))for(r.children=o,s=l-1;s>=0;--s)i.push(a=o[s]=new Su(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(Hue)}function Rue(){return xu(this).eachBefore(Vue)}function zue(e){return e.children}function Bue(e){return Array.isArray(e)?e[1]:null}function Vue(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Hue(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function Su(e){this.data=e,this.depth=this.height=0,this.parent=null}var Uue=o((()=>{fue(),mue(),gue(),vue(),bue(),Sue(),wue(),Due(),kue(),jue(),Nue(),Fue(),Lue(),Su.prototype=xu.prototype={constructor:Su,count:due,each:pue,eachAfter:_ue,eachBefore:hue,find:yue,sum:xue,sort:Cue,path:Tue,ancestors:Oue,descendants:Aue,leaves:Mue,links:Pue,copy:Rue,[Symbol.iterator]:Iue}}));function Wue(e){if(typeof e!=`function`)throw Error();return e}var Gue=o((()=>{}));function Cu(){return 0}function wu(e){return function(){return e}}var Kue=o((()=>{}));function que(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}var Jue=o((()=>{}));function Yue(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(r-t)/e.value;++s<l;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*u}var Xue=o((()=>{}));function Zue(e,t,n,r,i){for(var a=e.children,o,s=-1,l=a.length,u=e.value&&(i-n)/e.value;++s<l;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*u}var Que=o((()=>{}));function $ue(e,t,n,r,i,a){for(var o=[],s=t.children,l,u,d=0,f=0,p=s.length,m,h,g=t.value,_,v,y,b,x,S,C;d<p;){m=i-n,h=a-r;do _=s[f++].value;while(!_&&f<p);for(v=y=_,S=Math.max(h/m,m/h)/(g*e),C=_*_*S,x=Math.max(y/C,C/v);f<p;++f){if(_+=u=s[f].value,u<v&&(v=u),u>y&&(y=u),C=_*_*S,b=Math.max(y/C,C/v),b>x){_-=u;break}x=b}o.push(l={value:_,dice:m<h,children:s.slice(d,f)}),l.dice?Yue(l,n,r,i,g?r+=h*_/g:a):Zue(l,n,r,g?n+=m*_/g:i,a),g-=_,d=f}return o}var ede,tde,nde=o((()=>{Xue(),Que(),ede=(1+Math.sqrt(5))/2,tde=(function e(t){function n(e,n,r,i,a){$ue(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(ede)}));function rde(){var e=tde,t=!1,n=1,r=1,i=[0],a=Cu,o=Cu,s=Cu,l=Cu,u=Cu;function d(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(f),i=[0],t&&e.eachBefore(que),e}function f(t){var n=i[t.depth],r=t.x0+n,d=t.y0+n,f=t.x1-n,p=t.y1-n;f<r&&(r=f=(r+f)/2),p<d&&(d=p=(d+p)/2),t.x0=r,t.y0=d,t.x1=f,t.y1=p,t.children&&(n=i[t.depth+1]=a(t)/2,r+=u(t)-n,d+=o(t)-n,f-=s(t)-n,p-=l(t)-n,f<r&&(r=f=(r+f)/2),p<d&&(d=p=(d+p)/2),e(t,r,d,f,p))}return d.round=function(e){return arguments.length?(t=!!e,d):t},d.size=function(e){return arguments.length?(n=+e[0],r=+e[1],d):[n,r]},d.tile=function(t){return arguments.length?(e=Wue(t),d):e},d.padding=function(e){return arguments.length?d.paddingInner(e).paddingOuter(e):d.paddingInner()},d.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:wu(+e),d):a},d.paddingOuter=function(e){return arguments.length?d.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):d.paddingTop()},d.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:wu(+e),d):o},d.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:wu(+e),d):s},d.paddingBottom=function(e){return arguments.length?(l=typeof e==`function`?e:wu(+e),d):l},d.paddingLeft=function(e){return arguments.length?(u=typeof e==`function`?e:wu(+e),d):u},d}var ide=o((()=>{Jue(),nde(),Gue(),Kue()})),ade=o((()=>{Uue(),Kue(),Jue(),Xue(),ide(),Que(),nde()})),ode=o((()=>{})),sde=o((()=>{}));function Tu(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var Eu=o((()=>{}));function Du(){var e=new nc,t=[],n=[],r=Ou;function i(i){let a=e.get(i);if(a===void 0){if(r!==Ou)return r;e.set(i,a=t.push(i)-1)}return n[a%n.length]}return i.domain=function(n){if(!arguments.length)return t.slice();t=[],e=new nc;for(let r of n)e.has(r)||e.set(r,t.push(r)-1);return i},i.range=function(e){return arguments.length?(n=Array.from(e),i):n.slice()},i.unknown=function(e){return arguments.length?(r=e,i):r},i.copy=function(){return Du(t,n).unknown(r)},Tu.apply(i,arguments),i}var Ou,cde=o((()=>{oc(),Eu(),Ou=Symbol(`implicit`)}));function ku(){var e=Du().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,o,s=!1,l=0,u=0,d=.5;delete e.unknown;function f(){var e=t().length,f=i<r,p=f?i:r,m=f?r:i;a=(m-p)/Math.max(1,e-l+u*2),s&&(a=Math.floor(a)),p+=(m-p-a*(e-l))*d,o=a*(1-l),s&&(p=Math.round(p),o=Math.round(o));var h=wre(e).map(function(e){return p+a*e});return n(f?h.reverse():h)}return e.domain=function(e){return arguments.length?(t(e),f()):t()},e.range=function(e){return arguments.length?([r,i]=e,r=+r,i=+i,f()):[r,i]},e.rangeRound=function(e){return[r,i]=e,r=+r,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(e){return arguments.length?(s=!!e,f()):s},e.padding=function(e){return arguments.length?(l=Math.min(1,u=+e),f()):l},e.paddingInner=function(e){return arguments.length?(l=Math.min(1,e),f()):l},e.paddingOuter=function(e){return arguments.length?(u=+e,f()):u},e.align=function(e){return arguments.length?(d=Math.max(0,Math.min(1,e)),f()):d},e.copy=function(){return ku(t(),[r,i]).round(s).paddingInner(l).paddingOuter(u).align(d)},Tu.apply(f(),arguments)}var lde=o((()=>{oc(),Eu(),cde()}));function ude(e){return function(){return e}}var dde=o((()=>{}));function fde(e){return+e}var pde=o((()=>{}));function Au(e){return e}function ju(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:ude(isNaN(t)?NaN:.5)}function mde(e,t){var n;return e>t&&(n=e,e=t,t=n),function(n){return Math.max(e,Math.min(t,n))}}function hde(e,t,n){var r=e[0],i=e[1],a=t[0],o=t[1];return i<r?(r=ju(i,r),a=n(o,a)):(r=ju(r,i),a=n(a,o)),function(e){return a(r(e))}}function gde(e,t,n){var r=Math.min(e.length,t.length)-1,i=Array(r),a=Array(r),o=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<r;)i[o]=ju(e[o],e[o+1]),a[o]=n(t[o],t[o+1]);return function(t){var n=cre(e,t,1,r)-1;return a[n](i[n](t))}}function _de(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function vde(){var e=Mu,t=Mu,n=wl,r,i,a,o=Au,s,l,u;function d(){var n=Math.min(e.length,t.length);return o!==Au&&(o=mde(e[0],e[n-1])),s=n>2?gde:hde,l=u=null,f}function f(i){return i==null||isNaN(i=+i)?a:(l||=s(e.map(r),t,n))(r(o(i)))}return f.invert=function(n){return o(i((u||=s(t,e.map(r),bl))(n)))},f.domain=function(t){return arguments.length?(e=Array.from(t,fde),d()):e.slice()},f.range=function(e){return arguments.length?(t=Array.from(e),d()):t.slice()},f.rangeRound=function(e){return t=Array.from(e),n=mse,d()},f.clamp=function(e){return arguments.length?(o=e?!0:Au,d()):o!==Au},f.interpolate=function(e){return arguments.length?(n=e,d()):n},f.unknown=function(e){return arguments.length?(a=e,f):a},function(e,t){return r=e,i=t,d()}}function yde(){return vde()(Au,Au)}var Mu,Nu=o((()=>{oc(),kl(),dde(),pde(),Mu=[0,1]}));function bde(e,t,n,r){var i=ac(e,t,n),a;switch(r=fu(r??`,f`),r.type){case`s`:var o=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=aue(i,o))&&(r.precision=a),tue(r,o);case``:case`e`:case`g`:case`p`:case`r`:r.precision==null&&!isNaN(a=sue(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type===`e`));break;case`f`:case`%`:r.precision==null&&!isNaN(a=rue(i))&&(r.precision=a-(r.type===`%`)*2)}return yu(r)}var xde=o((()=>{oc(),bu()}));function Sde(e){var t=e.domain;return e.ticks=function(e){var n=t();return hre(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var r=t();return bde(r[0],r[r.length-1],e??10,n)},e.nice=function(n){n??=10;var r=t(),i=0,a=r.length-1,o=r[i],s=r[a],l,u,d=10;for(s<o&&(u=o,o=s,s=u,u=i,i=a,a=u);d-->0;){if(u=ic(o,s,n),u===l)return r[i]=o,r[a]=s,t(r);if(u>0)o=Math.floor(o/u)*u,s=Math.ceil(s/u)*u;else if(u<0)o=Math.ceil(o*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function Pu(){var e=yde();return e.copy=function(){return _de(e,Pu())},Tu.apply(e,arguments),Sde(e)}var Cde=o((()=>{oc(),Nu(),Eu(),xde()}));function wde(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],o;return a<i&&(o=n,n=r,r=o,o=i,i=a,a=o),e[n]=t.floor(i),e[r]=t.ceil(a),e}var Tde=o((()=>{}));function Fu(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=(e,n)=>(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n<r)||!(a>0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(s<n&&n<r);return o},i.filter=n=>Fu(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e){if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}}),n&&(i.count=(t,r)=>(Iu.setTime(+t),Lu.setTime(+r),e(Iu),e(Lu),Math.floor(n(Iu,Lu))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var Iu,Lu,Ru=o((()=>{Iu=new Date,Lu=new Date})),zu,Ede=o((()=>{Ru(),zu=Fu(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e),zu.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Fu(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):zu),zu.range})),Bu,Vu,Hu,Uu,Wu,Gu,Ku,qu=o((()=>{Bu=1e3,Vu=Bu*60,Hu=Vu*60,Uu=Hu*24,Wu=Uu*7,Gu=Uu*30,Ku=Uu*365})),Ju,Dde=o((()=>{Ru(),qu(),Ju=Fu(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Bu)},(e,t)=>(t-e)/Bu,e=>e.getUTCSeconds()),Ju.range})),Yu,Xu,Ode=o((()=>{Ru(),qu(),Yu=Fu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bu)},(e,t)=>{e.setTime(+e+t*Vu)},(e,t)=>(t-e)/Vu,e=>e.getMinutes()),Yu.range,Xu=Fu(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Vu)},(e,t)=>(t-e)/Vu,e=>e.getUTCMinutes()),Xu.range})),Zu,Qu,kde=o((()=>{Ru(),qu(),Zu=Fu(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Bu-e.getMinutes()*Vu)},(e,t)=>{e.setTime(+e+t*Hu)},(e,t)=>(t-e)/Hu,e=>e.getHours()),Zu.range,Qu=Fu(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Hu)},(e,t)=>(t-e)/Hu,e=>e.getUTCHours()),Qu.range})),$u,ed,td,Ade=o((()=>{Ru(),qu(),$u=Fu(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vu)/Uu,e=>e.getDate()-1),$u.range,ed=Fu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Uu,e=>e.getUTCDate()-1),ed.range,td=Fu(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Uu,e=>Math.floor(e/Uu)),td.range}));function nd(e){return Fu(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Vu)/Wu)}function rd(e){return Fu(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/Wu)}var id,ad,od,sd,cd,ld,ud,dd,fd,jde,Mde,pd,Nde,Pde,Fde=o((()=>{Ru(),qu(),id=nd(0),ad=nd(1),od=nd(2),sd=nd(3),cd=nd(4),ld=nd(5),ud=nd(6),id.range,ad.range,od.range,sd.range,cd.range,ld.range,ud.range,dd=rd(0),fd=rd(1),jde=rd(2),Mde=rd(3),pd=rd(4),Nde=rd(5),Pde=rd(6),dd.range,fd.range,jde.range,Mde.range,pd.range,Nde.range,Pde.range})),md,hd,Ide=o((()=>{Ru(),md=Fu(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),md.range,hd=Fu(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),hd.range})),gd,_d,Lde=o((()=>{Ru(),gd=Fu(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear()),gd.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fu(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),gd.range,_d=Fu(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear()),_d.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Fu(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),_d.range}));function Rde(e,t,n,r,i,a){let o=[[Ju,1,Bu],[Ju,5,5*Bu],[Ju,15,15*Bu],[Ju,30,30*Bu],[a,1,Vu],[a,5,5*Vu],[a,15,15*Vu],[a,30,30*Vu],[i,1,Hu],[i,3,3*Hu],[i,6,6*Hu],[i,12,12*Hu],[r,1,Uu],[r,2,2*Uu],[n,1,Wu],[t,1,Gu],[t,3,3*Gu],[e,1,Ku]];function s(e,t,n){let r=t<e;r&&([e,t]=[t,e]);let i=n&&typeof n.range==`function`?n:l(e,t,n),a=i?i.range(e,+t+1):[];return r?a.reverse():a}function l(t,n,r){let i=Math.abs(n-t)/r,a=ec(([,,e])=>e).right(o,i);if(a===o.length)return e.every(ac(t/Ku,n/Ku,r));if(a===0)return zu.every(Math.max(ac(t,n,r),1));let[s,l]=o[i/o[a-1][2]<o[a][2]/i?a-1:a];return s.every(l)}return[s,l]}var zde,Bde,Vde,Hde,Ude=o((()=>{oc(),qu(),Ede(),Dde(),Ode(),kde(),Ade(),Fde(),Ide(),Lde(),[zde,Bde]=Rde(_d,hd,dd,td,Qu,Xu),[Vde,Hde]=Rde(gd,md,id,$u,Zu,Yu)})),vd=o((()=>{Ru(),Ede(),Dde(),Ode(),kde(),Ade(),Fde(),Ide(),Lde(),Ude()}));function yd(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function bd(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function xd(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function Wde(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,u=Cd(i),d=wd(i),f=Cd(a),p=wd(a),m=Cd(o),h=wd(o),g=Cd(s),_=wd(s),v=Cd(l),y=wd(l),b={a:P,A:F,b:I,B:L,c:null,d:ffe,e:ffe,f:_fe,g:Ofe,G:Afe,H:pfe,I:mfe,j:hfe,L:gfe,m:vfe,M:yfe,p:R,q:ee,Q:$fe,s:epe,S:bfe,u:xfe,U:Sfe,V:wfe,w:Tfe,W:Efe,x:null,X:null,y:Dfe,Y:kfe,Z:jfe,"%":Qfe},x={a:z,A:B,b:te,B:ne,c:null,d:Mfe,e:Mfe,f:Lfe,g:Jfe,G:Xfe,H:Nfe,I:Pfe,j:Ffe,L:Ife,m:Rfe,M:zfe,p:re,q:ie,Q:$fe,s:epe,S:Bfe,u:Vfe,U:Hfe,V:Wfe,w:Gfe,W:Kfe,x:null,X:null,y:qfe,Y:Yfe,Z:Zfe,"%":Qfe},S={a:D,A:O,b:k,B:A,c:j,d:nfe,e:nfe,f:cfe,g:Qde,G:Zde,H:ife,I:ife,j:rfe,L:sfe,m:tfe,M:afe,p:E,q:efe,Q:ufe,s:dfe,S:ofe,u:qde,U:Jde,V:Yde,w:Kde,W:Xde,x:M,X:N,y:Qde,Y:Zde,Z:$de,"%":lfe};b.x=C(n,b),b.X=C(r,b),b.c=C(t,b),x.x=C(n,x),x.X=C(r,x),x.c=C(t,x);function C(e,t){return function(n){var r=[],i=-1,a=0,o=e.length,s,l,u;for(n instanceof Date||(n=new Date(+n));++i<o;)e.charCodeAt(i)===37&&(r.push(e.slice(a,i)),(l=Td[s=e.charAt(++i)])==null?l=s===`e`?` `:`0`:s=e.charAt(++i),(u=t[s])&&(s=u(n,l)),r.push(s),a=i+1);return r.push(e.slice(a,i)),r.join(``)}}function w(e,t){return function(n){var r=xd(1900,void 0,1),i=T(r,e,n+=``,0),a,o;if(i!=n.length)return null;if(`Q`in r)return new Date(r.Q);if(`s`in r)return new Date(r.s*1e3+(`L`in r?r.L:0));if(t&&!(`Z`in r)&&(r.Z=0),`p`in r&&(r.H=r.H%12+r.p*12),r.m===void 0&&(r.m=`q`in r?r.q:0),`V`in r){if(r.V<1||r.V>53)return null;`w`in r||(r.w=1),`Z`in r?(a=bd(xd(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?fd.ceil(a):fd(a),a=ed.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=yd(xd(r.y,0,1)),o=a.getDay(),a=o>4||o===0?ad.ceil(a):ad(a),a=$u.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?bd(xd(r.y,0,1)).getUTCDay():yd(xd(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,bd(r)):yd(r)}}function T(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,l;i<a;){if(r>=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),l=S[s in Td?t.charAt(i++):s],!l||(r=l(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function E(e,t,n){var r=u.exec(t.slice(n));return r?(e.p=d.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=m.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=f.exec(t.slice(n));return r?(e.w=p.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1}function A(e,t,n){var r=g.exec(t.slice(n));return r?(e.m=_.get(r[0].toLowerCase()),n+r[0].length):-1}function j(e,n,r){return T(e,t,n,r)}function M(e,t,r){return T(e,n,t,r)}function N(e,t,n){return T(e,r,t,n)}function P(e){return o[e.getDay()]}function F(e){return a[e.getDay()]}function I(e){return l[e.getMonth()]}function L(e){return s[e.getMonth()]}function R(e){return i[+(e.getHours()>=12)]}function ee(e){return 1+~~(e.getMonth()/3)}function z(e){return o[e.getUTCDay()]}function B(e){return a[e.getUTCDay()]}function te(e){return l[e.getUTCMonth()]}function ne(e){return s[e.getUTCMonth()]}function re(e){return i[+(e.getUTCHours()>=12)]}function ie(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=C(e+=``,b);return t.toString=function(){return e},t},parse:function(e){var t=w(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=C(e+=``,x);return t.toString=function(){return e},t},utcParse:function(e){var t=w(e+=``,!0);return t.toString=function(){return e},t}}}function Sd(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a<n?Array(n-a+1).join(t)+i:i)}function Gde(e){return e.replace(npe,`\\$&`)}function Cd(e){return RegExp(`^(?:`+e.map(Gde).join(`|`)+`)`,`i`)}function wd(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function Kde(e,t,n){var r=Ed.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function qde(e,t,n){var r=Ed.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Jde(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Yde(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function Xde(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Zde(e,t,n){var r=Ed.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Qde(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function $de(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function efe(e,t,n){var r=Ed.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function tfe(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function nfe(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function rfe(e,t,n){var r=Ed.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function ife(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function afe(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function ofe(e,t,n){var r=Ed.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function sfe(e,t,n){var r=Ed.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function cfe(e,t,n){var r=Ed.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function lfe(e,t,n){var r=tpe.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function ufe(e,t,n){var r=Ed.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function dfe(e,t,n){var r=Ed.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function ffe(e,t){return Sd(e.getDate(),t,2)}function pfe(e,t){return Sd(e.getHours(),t,2)}function mfe(e,t){return Sd(e.getHours()%12||12,t,2)}function hfe(e,t){return Sd(1+$u.count(gd(e),e),t,3)}function gfe(e,t){return Sd(e.getMilliseconds(),t,3)}function _fe(e,t){return gfe(e,t)+`000`}function vfe(e,t){return Sd(e.getMonth()+1,t,2)}function yfe(e,t){return Sd(e.getMinutes(),t,2)}function bfe(e,t){return Sd(e.getSeconds(),t,2)}function xfe(e){var t=e.getDay();return t===0?7:t}function Sfe(e,t){return Sd(id.count(gd(e)-1,e),t,2)}function Cfe(e){var t=e.getDay();return t>=4||t===0?cd(e):cd.ceil(e)}function wfe(e,t){return e=Cfe(e),Sd(cd.count(gd(e),e)+(gd(e).getDay()===4),t,2)}function Tfe(e){return e.getDay()}function Efe(e,t){return Sd(ad.count(gd(e)-1,e),t,2)}function Dfe(e,t){return Sd(e.getFullYear()%100,t,2)}function Ofe(e,t){return e=Cfe(e),Sd(e.getFullYear()%100,t,2)}function kfe(e,t){return Sd(e.getFullYear()%1e4,t,4)}function Afe(e,t){var n=e.getDay();return e=n>=4||n===0?cd(e):cd.ceil(e),Sd(e.getFullYear()%1e4,t,4)}function jfe(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Sd(t/60|0,`0`,2)+Sd(t%60,`0`,2)}function Mfe(e,t){return Sd(e.getUTCDate(),t,2)}function Nfe(e,t){return Sd(e.getUTCHours(),t,2)}function Pfe(e,t){return Sd(e.getUTCHours()%12||12,t,2)}function Ffe(e,t){return Sd(1+ed.count(_d(e),e),t,3)}function Ife(e,t){return Sd(e.getUTCMilliseconds(),t,3)}function Lfe(e,t){return Ife(e,t)+`000`}function Rfe(e,t){return Sd(e.getUTCMonth()+1,t,2)}function zfe(e,t){return Sd(e.getUTCMinutes(),t,2)}function Bfe(e,t){return Sd(e.getUTCSeconds(),t,2)}function Vfe(e){var t=e.getUTCDay();return t===0?7:t}function Hfe(e,t){return Sd(dd.count(_d(e)-1,e),t,2)}function Ufe(e){var t=e.getUTCDay();return t>=4||t===0?pd(e):pd.ceil(e)}function Wfe(e,t){return e=Ufe(e),Sd(pd.count(_d(e),e)+(_d(e).getUTCDay()===4),t,2)}function Gfe(e){return e.getUTCDay()}function Kfe(e,t){return Sd(fd.count(_d(e)-1,e),t,2)}function qfe(e,t){return Sd(e.getUTCFullYear()%100,t,2)}function Jfe(e,t){return e=Ufe(e),Sd(e.getUTCFullYear()%100,t,2)}function Yfe(e,t){return Sd(e.getUTCFullYear()%1e4,t,4)}function Xfe(e,t){var n=e.getUTCDay();return e=n>=4||n===0?pd(e):pd.ceil(e),Sd(e.getUTCFullYear()%1e4,t,4)}function Zfe(){return`+0000`}function Qfe(){return`%`}function $fe(e){return+e}function epe(e){return Math.floor(e/1e3)}var Td,Ed,tpe,npe,rpe=o((()=>{vd(),Td={"-":``,_:` `,0:`0`},Ed=/^\s*\d+/,tpe=/^%/,npe=/[\\^$*+?|[\]().{}]/g}));function ipe(e){return Dd=Wde(e),Od=Dd.format,ape=Dd.parse,ope=Dd.utcFormat,spe=Dd.utcParse,Dd}var Dd,Od,ape,ope,spe,cpe=o((()=>{rpe(),ipe({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],shortDays:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`],months:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],shortMonths:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`]})})),kd=o((()=>{cpe(),rpe()}));function lpe(e){return new Date(e)}function upe(e){return e instanceof Date?+e:+new Date(+e)}function dpe(e,t,n,r,i,a,o,s,l,u){var d=yde(),f=d.invert,p=d.domain,m=u(`.%L`),h=u(`:%S`),g=u(`%I:%M`),_=u(`%I %p`),v=u(`%a %d`),y=u(`%b %d`),b=u(`%B`),x=u(`%Y`);function S(e){return(l(e)<e?m:s(e)<e?h:o(e)<e?g:a(e)<e?_:r(e)<e?i(e)<e?v:y:n(e)<e?b:x)(e)}return d.invert=function(e){return new Date(f(e))},d.domain=function(e){return arguments.length?p(Array.from(e,upe)):p().map(lpe)},d.ticks=function(t){var n=p();return e(n[0],n[n.length-1],t??10)},d.tickFormat=function(e,t){return t==null?S:u(t)},d.nice=function(e){var n=p();return(!e||typeof e.range!=`function`)&&(e=t(n[0],n[n.length-1],e??10)),e?p(wde(n,e)):d},d.copy=function(){return _de(d,dpe(e,t,n,r,i,a,o,s,l,u))},d}function fpe(){return Tu.apply(dpe(Vde,Hde,gd,md,id,$u,Zu,Yu,Ju,Od).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var ppe=o((()=>{vd(),kd(),Nu(),Eu(),Tde()})),mpe=o((()=>{lde(),Cde(),pde(),oc(),bu(),Tde(),Nu(),cde(),ppe(),vd(),kd(),kl(),xde()}));function hpe(e){for(var t=e.length/6|0,n=Array(t),r=0;r<t;)n[r]=`#`+e.slice(r*6,++r*6);return n}var gpe=o((()=>{})),_pe,vpe=o((()=>{gpe(),_pe=hpe(`4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab`)})),ype=o((()=>{gpe(),vpe(),kl(),ml()}));function Ad(e){return function(){return e}}var jd=o((()=>{}));function bpe(e){return e>1?0:e<-1?Rd:Math.acos(e)}function xpe(e){return e>=1?zd:e<=-1?-zd:Math.asin(e)}var Md,Nd,Pd,Spe,Fd,Id,Ld,Rd,zd,Bd,Vd=o((()=>{Md=Math.abs,Nd=Math.atan2,Pd=Math.cos,Spe=Math.max,Fd=Math.min,Id=Math.sin,Ld=Math.sqrt,Rd=Math.PI,zd=Rd/2,Bd=2*Rd}));function Cpe(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new ou(t)}var Hd=o((()=>{su()}));function wpe(e){return e.innerRadius}function Tpe(e){return e.outerRadius}function Epe(e){return e.startAngle}function Dpe(e){return e.endAngle}function Ope(e){return e&&e.padAngle}function kpe(e,t,n,r,i,a,o,s){var l=n-e,u=r-t,d=o-i,f=s-a,p=f*l-d*u;if(!(p*p<1e-12))return p=(d*(t-a)-f*(e-i))/p,[e+p*l,t+p*u]}function Ud(e,t,n,r,i,a,o){var s=e-n,l=t-r,u=(o?a:-a)/Ld(s*s+l*l),d=u*l,f=-u*s,p=e+d,m=t+f,h=n+d,g=r+f,_=(p+h)/2,v=(m+g)/2,y=h-p,b=g-m,x=y*y+b*b,S=i-a,C=p*g-h*m,w=(b<0?-1:1)*Ld(Spe(0,S*S*x-C*C)),T=(C*b-y*w)/x,E=(-C*y-b*w)/x,D=(C*b+y*w)/x,O=(-C*y+b*w)/x,k=T-_,A=E-v,j=D-_,M=O-v;return k*k+A*A>j*j+M*M&&(T=D,E=O),{cx:T,cy:E,x01:-d,y01:-f,x11:T*(i/S-1),y11:E*(i/S-1)}}function Wd(){var e=wpe,t=Tpe,n=Ad(0),r=null,i=Epe,a=Dpe,o=Ope,s=null,l=Cpe(u);function u(){var u,d,f=+e.apply(this,arguments),p=+t.apply(this,arguments),m=i.apply(this,arguments)-zd,h=a.apply(this,arguments)-zd,g=Md(h-m),_=h>m;if(s||=u=l(),p<f&&(d=p,p=f,f=d),!(p>1e-12))s.moveTo(0,0);else if(g>Bd-1e-12)s.moveTo(p*Pd(m),p*Id(m)),s.arc(0,0,p,m,h,!_),f>1e-12&&(s.moveTo(f*Pd(h),f*Id(h)),s.arc(0,0,f,h,m,_));else{var v=m,y=h,b=m,x=h,S=g,C=g,w=o.apply(this,arguments)/2,T=w>1e-12&&(r?+r.apply(this,arguments):Ld(f*f+p*p)),E=Fd(Md(p-f)/2,+n.apply(this,arguments)),D=E,O=E,k,A;if(T>1e-12){var j=xpe(T/f*Id(w)),M=xpe(T/p*Id(w));(S-=j*2)>1e-12?(j*=_?1:-1,b+=j,x-=j):(S=0,b=x=(m+h)/2),(C-=M*2)>1e-12?(M*=_?1:-1,v+=M,y-=M):(C=0,v=y=(m+h)/2)}var N=p*Pd(v),P=p*Id(v),F=f*Pd(x),I=f*Id(x);if(E>1e-12){var L=p*Pd(y),R=p*Id(y),ee=f*Pd(b),z=f*Id(b),B;if(g<Rd){if(B=kpe(N,P,ee,z,L,R,F,I)){var te=N-B[0],ne=P-B[1],re=L-B[0],ie=R-B[1],ae=1/Id(bpe((te*re+ne*ie)/(Ld(te*te+ne*ne)*Ld(re*re+ie*ie)))/2),oe=Ld(B[0]*B[0]+B[1]*B[1]);D=Fd(E,(f-oe)/(ae-1)),O=Fd(E,(p-oe)/(ae+1))}else D=O=0}}C>1e-12?O>1e-12?(k=Ud(ee,z,N,P,p,O,_),A=Ud(L,R,F,I,p,O,_),s.moveTo(k.cx+k.x01,k.cy+k.y01),O<E?s.arc(k.cx,k.cy,O,Nd(k.y01,k.x01),Nd(A.y01,A.x01),!_):(s.arc(k.cx,k.cy,O,Nd(k.y01,k.x01),Nd(k.y11,k.x11),!_),s.arc(0,0,p,Nd(k.cy+k.y11,k.cx+k.x11),Nd(A.cy+A.y11,A.cx+A.x11),!_),s.arc(A.cx,A.cy,O,Nd(A.y11,A.x11),Nd(A.y01,A.x01),!_))):(s.moveTo(N,P),s.arc(0,0,p,v,y,!_)):s.moveTo(N,P),!(f>1e-12)||!(S>1e-12)?s.lineTo(F,I):D>1e-12?(k=Ud(F,I,L,R,f,-D,_),A=Ud(N,P,ee,z,f,-D,_),s.lineTo(k.cx+k.x01,k.cy+k.y01),D<E?s.arc(k.cx,k.cy,D,Nd(k.y01,k.x01),Nd(A.y01,A.x01),!_):(s.arc(k.cx,k.cy,D,Nd(k.y01,k.x01),Nd(k.y11,k.x11),!_),s.arc(0,0,f,Nd(k.cy+k.y11,k.cx+k.x11),Nd(A.cy+A.y11,A.cx+A.x11),_),s.arc(A.cx,A.cy,D,Nd(A.y11,A.x11),Nd(A.y01,A.x01),!_))):s.arc(0,0,f,x,b,_)}if(s.closePath(),u)return s=null,u+``||null}return u.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Rd/2;return[Pd(r)*n,Id(r)*n]},u.innerRadius=function(t){return arguments.length?(e=typeof t==`function`?t:Ad(+t),u):e},u.outerRadius=function(e){return arguments.length?(t=typeof e==`function`?e:Ad(+e),u):t},u.cornerRadius=function(e){return arguments.length?(n=typeof e==`function`?e:Ad(+e),u):n},u.padRadius=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:Ad(+e),u):r},u.startAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Ad(+e),u):i},u.endAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Ad(+e),u):a},u.padAngle=function(e){return arguments.length?(o=typeof e==`function`?e:Ad(+e),u):o},u.context=function(e){return arguments.length?(s=e??null,u):s},u}var Ape=o((()=>{jd(),Vd(),Hd()}));function jpe(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}var Gd=o((()=>{Array.prototype.slice}));function Mpe(e){this._context=e}function Kd(e){return new Mpe(e)}var Npe=o((()=>{Mpe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}}}));function Ppe(e){return e[0]}function Fpe(e){return e[1]}var Ipe=o((()=>{}));function qd(e,t){var n=Ad(!0),r=null,i=Kd,a=null,o=Cpe(s);e=typeof e==`function`?e:e===void 0?Ppe:Ad(e),t=typeof t==`function`?t:t===void 0?Fpe:Ad(t);function s(s){var l,u=(s=jpe(s)).length,d,f=!1,p;for(r??(a=i(p=o())),l=0;l<=u;++l)!(l<u&&n(d=s[l],l,s))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(d,l,s),+t(d,l,s));if(p)return a=null,p+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:Ad(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:Ad(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:Ad(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}var Lpe=o((()=>{Gd(),jd(),Npe(),Hd(),Ipe()}));function Rpe(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}var zpe=o((()=>{}));function Bpe(e){return e}var Vpe=o((()=>{}));function Hpe(){var e=Bpe,t=Rpe,n=null,r=Ad(0),i=Ad(Bd),a=Ad(0);function o(o){var s,l=(o=jpe(o)).length,u,d,f=0,p=Array(l),m=Array(l),h=+r.apply(this,arguments),g=Math.min(Bd,Math.max(-Bd,i.apply(this,arguments)-h)),_,v=Math.min(Math.abs(g)/l,a.apply(this,arguments)),y=v*(g<0?-1:1),b;for(s=0;s<l;++s)(b=m[p[s]=s]=+e(o[s],s,o))>0&&(f+=b);for(t==null?n!=null&&p.sort(function(e,t){return n(o[e],o[t])}):p.sort(function(e,n){return t(m[e],m[n])}),s=0,d=f?(g-l*y)/f:0;s<l;++s,h=_)u=p[s],b=m[u],_=h+(b>0?b*d:0)+y,m[u]={data:o[u],index:s,value:b,startAngle:h,endAngle:_,padAngle:v};return m}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:Ad(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:Ad(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:Ad(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:Ad(+e),o):a},o}var Upe=o((()=>{Gd(),jd(),zpe(),Vpe(),Vd()}));function Wpe(e){return new Jd(e,!0)}function Gpe(e){return new Jd(e,!1)}var Jd,Kpe=o((()=>{Jd=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}}}));function Yd(){}var Xd=o((()=>{}));function Zd(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function Qd(e){this._context=e}function $d(e){return new Qd(e)}var ef=o((()=>{Qd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Zd(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Zd(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function qpe(e){this._context=e}function Jpe(e){return new qpe(e)}var Ype=o((()=>{Xd(),ef(),qpe.prototype={areaStart:Yd,areaEnd:Yd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Zd(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function Xpe(e){this._context=e}function Zpe(e){return new Xpe(e)}var Qpe=o((()=>{ef(),Xpe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:Zd(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}}}));function $pe(e,t){this._basis=new Qd(e),this._beta=t}var eme,tme=o((()=>{ef(),$pe.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,l;++s<=n;)l=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+l*a),this._beta*t[s]+(1-this._beta)*(i+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}},eme=(function e(t){function n(e){return t===1?new Qd(e):new $pe(e,t)}return n.beta=function(t){return e(+t)},n})(.85)}));function tf(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function nf(e,t){this._context=e,this._k=(1-t)/6}var rf,af=o((()=>{nf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:tf(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:tf(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},rf=(function e(t){function n(e){return new nf(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function of(e,t){this._context=e,this._k=(1-t)/6}var nme,rme=o((()=>{Xd(),af(),of.prototype={areaStart:Yd,areaEnd:Yd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:tf(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},nme=(function e(t){function n(e){return new of(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function sf(e,t){this._context=e,this._k=(1-t)/6}var ime,ame=o((()=>{af(),sf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:tf(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},ime=(function e(t){function n(e){return new sf(e,t)}return n.tension=function(t){return e(+t)},n})(0)}));function cf(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,d=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/d,o=(o*u+e._y1*e._l23_2a-n*e._l12_2a)/d}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ome(e,t){this._context=e,this._alpha=t}var lf,uf=o((()=>{Vd(),af(),ome.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:cf(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},lf=(function e(t){function n(e){return t?new ome(e,t):new nf(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function sme(e,t){this._context=e,this._alpha=t}var cme,lme=o((()=>{rme(),Xd(),uf(),sme.prototype={areaStart:Yd,areaEnd:Yd,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:cf(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},cme=(function e(t){function n(e){return t?new sme(e,t):new of(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function ume(e,t){this._context=e,this._alpha=t}var dme,fme=o((()=>{ame(),uf(),ume.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:cf(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},dme=(function e(t){function n(e){return t?new ume(e,t):new sf(e,0)}return n.alpha=function(t){return e(+t)},n})(.5)}));function pme(e){this._context=e}function mme(e){return new pme(e)}var hme=o((()=>{Xd(),pme.prototype={areaStart:Yd,areaEnd:Yd,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}}}));function gme(e){return e<0?-1:1}function _me(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(gme(a)+gme(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function vme(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function df(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ff(e){this._context=e}function yme(e){this._context=new bme(e)}function bme(e){this._context=e}function xme(e){return new ff(e)}function Sme(e){return new yme(e)}var Cme=o((()=>{ff.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:df(this,this._t0,vme(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,df(this,vme(this,n=_me(this,e,t)),n);break;default:df(this,this._t0,n=_me(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}},(yme.prototype=Object.create(ff.prototype)).point=function(e,t){ff.prototype.point.call(this,t,e)},bme.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}}}));function wme(e){this._context=e}function Tme(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Eme(e){return new wme(e)}var Dme=o((()=>{wme.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n){if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=Tme(e),i=Tme(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o])}(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}}}));function pf(e,t){this._context=e,this._t=t}function Ome(e){return new pf(e,.5)}function kme(e){return new pf(e,0)}function Ame(e){return new pf(e,1)}var jme=o((()=>{pf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}}})),Mme=o((()=>{Ape(),Gd(),jd(),Npe(),Lpe(),Hd(),Upe(),Kpe(),Vd(),Ype(),Qpe(),ef(),tme(),rme(),ame(),af(),lme(),fme(),uf(),hme(),Cme(),Dme(),jme()}));function mf(e,t,n){this.k=e,this.x=t,this.y=n}var Nme=o((()=>{mf.prototype={constructor:mf,scale:function(e){return e===1?this:new mf(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new mf(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}},new mf(1,0,0),mf.prototype})),Pme=o((()=>{tu(),Nme()})),Fme=o((()=>{Pme(),Nme()})),hf=o((()=>{oc(),Lre(),wle(),kle(),ml(),Ale(),jle(),pc(),yoe(),Mle(),mle(),Nle(),Fle(),bu(),lue(),ade(),kl(),su(),ode(),Ple(),sde(),mpe(),ype(),jc(),Mme(),vd(),kd(),Wl(),tu(),Fme()})),gf,_f=o((()=>{Zs(),h(),hf(),gf=p(e=>{let{securityLevel:t}=Z(),n=Ac(`body`);return t===`sandbox`&&(n=Ac((Ac(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`)})),Ime,Lme,vf,Rme,yf,bf,xf,zme,Sf=o((()=>{Zs(),h(),Ime=p(e=>{let{handDrawnSeed:t}=Z();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},`solidStateFill`),Lme=p(e=>Array.isArray(e)?e:e?e.split(`;`).map(e=>e.trim()).filter(Boolean):[],`normalizeStyleList`),vf=p(e=>{let t=Rme([...e.cssCompiledStyles||[],...e.cssStyles||[],...Lme(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),Rme=p(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),yf=p(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),bf=p(e=>{let{stylesArray:t}=vf(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];yf(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),xf=p((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=Z(),{nodeBorder:i,mainBkg:a}=n,{stylesMap:o}=vf(e);return Object.assign({roughness:.7,fill:o.get(`fill`)||a,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:o.get(`stroke`)||i,seed:r,strokeWidth:o.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:zme(o.get(`stroke-dasharray`))},t)},`userNodeOverrides`),zme=p(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`)})),Bme,Cf,wf,Vme,Tf=o((()=>{Bme=Object.freeze({left:0,top:0,width:16,height:16}),Cf=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),wf=Object.freeze({...Bme,...Cf}),Vme=Object.freeze({...wf,body:``,hidden:!1})})),Hme,Ume,Wme=o((()=>{Tf(),Hme=Object.freeze({width:null,height:null}),Ume=Object.freeze({...Hme,...Cf})})),Gme,Ef,Kme=o((()=>{Gme=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!Ef(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!Ef(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!Ef(e,n)?null:e}return null},Ef=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1}));function qme(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}var Jme=o((()=>{}));function Yme(e,t){let n=qme(e,t);for(let r in Vme)r in Cf?r in e&&!(r in n)&&(n[r]=Cf[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}var Xme=o((()=>{Tf(),Jme()}));function Zme(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}var Qme=o((()=>{}));function $me(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=Yme(r[e]||i[e],a)}return o(t),n.forEach(o),Yme(e,a)}function ehe(e,t){if(e.icons[t])return $me(e,t,[]);let n=Zme(e,[t])[t];return n?$me(e,t,n):null}var the=o((()=>{Xme(),Qme()}));function nhe(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(rhe);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=ihe.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}var rhe,ihe,ahe=o((()=>{rhe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ihe=/^-?[0-9.]*[0-9]+[0-9.]*$/g}));function ohe(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function she(e,t){return e?`<defs>`+e+`</defs>`+t:t}function che(e,t,n){let r=ohe(e);return she(r.defs,t+r.content+n)}var lhe=o((()=>{}));function uhe(e,t){let n={...wf,...e},r={...Ume,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`)}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=che(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,l=i.width,u=i.height,d,f;o===null?(f=s===null?`1em`:s===`auto`?u:s,d=nhe(f,l/u)):(d=o===`auto`?l:o,f=s===null?nhe(d,u/l):s===`auto`?u:s);let p={},m=(e,t)=>{dhe(t)||(p[e]=t.toString())};m(`width`,d),m(`height`,f);let h=[i.left,i.top,l,u];return p.viewBox=h.join(` `),{attributes:p,viewBox:h,body:a}}var dhe,fhe=o((()=>{Tf(),Wme(),ahe(),lhe(),dhe=e=>e===`unset`||e===`undefined`||e===`none`}));function phe(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=Df.get(e)||0;return Df.set(e,t+1),t?`${e}${t}`:e}function mhe(e){let t=[],n;for(;n=hhe.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=phe(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}var hhe,Df,ghe=o((()=>{hhe=/\sid="(\S+)"/g,Df=new Map}));function _he(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}var vhe=o((()=>{})),yhe=o((()=>{Kme(),the(),fhe(),ghe(),vhe()})),Of,kf,Af,jf,Mf,bhe,Nf,Pf=o((()=>{Zs(),S(),h(),yhe(),Of={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},kf=new Map,Af=new Map,jf=p(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(y.debug(`Registering icon pack:`,t.name),`loader`in t)Af.set(t.name,t.loader);else if(`icons`in t)kf.set(t.name,t.icons);else throw y.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),Mf=p(async(e,t)=>{let n=Gme(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=kf.get(r);if(!i){let e=Af.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},kf.set(r,i)}catch(e){throw y.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=ehe(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),bhe=p(async e=>{try{return await Mf(e),!0}catch{return!1}},`isIconAvailable`),Nf=p(async(e,t,n)=>{let r;try{r=await Mf(e,t?.fallbackPrefix)}catch(e){y.error(e),r=Of}let i=uhe(r,t),a=_he(mhe(i.body),{...i.attributes,...n});return _s(a,es())},`getIconSVG`)})),xhe=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|&colon;)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),Ff=s((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=xhe();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var l=s;if(!l)return t.BLANK_URL;if(n(l))return l;var u=l.trimStart(),d=u.match(t.urlSchemeRegex);if(!d)return l;var f=d[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(f))return t.BLANK_URL;var p=u.replace(/\\/g,`/`);if(f===`mailto:`||f.includes(`://`))return p;if(f===`http:`||f===`https:`){if(!i(p))return t.BLANK_URL;var m=new URL(p);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return p}}));function She(e){return Array.isArray(e)}var Che=o((()=>{}));function If(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var whe=o((()=>{}));function The(){}var Ehe=o((()=>{}));function Dhe(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}var Ohe=o((()=>{}));function Lf(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Rf=o((()=>{})),zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp=o((()=>{zf=`[object RegExp]`,Bf=`[object String]`,Vf=`[object Number]`,Hf=`[object Boolean]`,Uf=`[object Arguments]`,Wf=`[object Symbol]`,Gf=`[object Date]`,Kf=`[object Map]`,qf=`[object Set]`,Jf=`[object Array]`,Yf=`[object ArrayBuffer]`,Xf=`[object Object]`,Zf=`[object DataView]`,Qf=`[object Uint8Array]`,$f=`[object Uint8ClampedArray]`,ep=`[object Uint16Array]`,tp=`[object Uint32Array]`,np=`[object Int8Array]`,rp=`[object Int16Array]`,ip=`[object Int32Array]`,ap=`[object Float32Array]`,op=`[object Float64Array]`})),cp,khe=o((()=>{cp=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()}));function lp(e){return cp.Buffer!==void 0&&cp.Buffer.isBuffer(e)}var up=o((()=>{khe()}));function Ahe(e){return Number.isSafeInteger(e)&&e>=0}var jhe=o((()=>{}));function Mhe(e){return e!=null&&typeof e!=`function`&&Ahe(e.length)}var Nhe=o((()=>{jhe()}));function Phe(e){return e===`__proto__`}var Fhe=o((()=>{}));function dp(e){return e==null||typeof e!=`object`&&typeof e!=`function`}var fp=o((()=>{}));function pp(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}var mp=o((()=>{}));function Ihe(e,t){return hp(e,void 0,e,new Map,t)}function hp(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(dp(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=hp(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,hp(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(hp(a,void 0,n,r,i));return t}if(lp(e))return e.subarray();if(pp(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=hp(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),gp(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),gp(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),gp(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,gp(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),gp(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),gp(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),gp(t,e,n,r,i),t}if(typeof e==`object`&&Lhe(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),gp(t,e,n,r,i),t}return e}function gp(e,t,n=e,r,i){let a=[...Object.keys(t),...Dhe(t)];for(let o=0;o<a.length;o++){let s=a[o],l=Object.getOwnPropertyDescriptor(e,s);(l==null||l.writable)&&(e[s]=hp(t[s],s,n,r,i))}}function Lhe(e){switch(Lf(e)){case Uf:case Jf:case Yf:case Zf:case Hf:case Gf:case ap:case op:case np:case rp:case ip:case Kf:case Vf:case Xf:case zf:case qf:case Bf:case Wf:case Qf:case $f:case ep:case tp:return!0;default:return!1}}var Rhe=o((()=>{fp(),mp(),Ohe(),Rf(),sp(),up()}));function zhe(e,t){return Ihe(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(Lf(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),gp(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case Vf:case Bf:case Hf:{let t=new e.constructor(e?.valueOf());return gp(t,e),t}case Uf:{let t={};return gp(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}var Bhe=o((()=>{Rf(),sp(),Rhe()}));function Vhe(e){return zhe(e)}var Hhe=o((()=>{Bhe()}));function _p(e){return typeof e==`object`&&!!e&&Lf(e)===`[object Arguments]`}var Uhe=o((()=>{Rf()}));function vp(e){return typeof e==`object`&&!!e}var Whe=o((()=>{}));function Ghe(e){return vp(e)&&Mhe(e)}var Khe=o((()=>{Nhe(),Whe()}));function yp(e){return pp(e)}var bp=o((()=>{mp()}));function qhe(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}var Jhe=o((()=>{}));function xp(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(xp.Cache||Map),n}var Yhe=o((()=>{xp.Cache=Map}));function Xhe(e){if(dp(e))return e;let t=Lf(e);if(!Zhe(e))return{};if(She(e)){let t=Array.from(e);return e.length>0&&typeof e[0]==`string`&&Object.hasOwn(e,`index`)&&(t.index=e.index,t.input=e.input),t}if(yp(e)){let t=e,n=t.constructor;return new n(t.buffer,t.byteOffset,t.length)}if(t===`[object ArrayBuffer]`)return new ArrayBuffer(e.byteLength);if(t===`[object DataView]`){let t=e,n=t.buffer,r=t.byteOffset,i=t.byteLength,a=new ArrayBuffer(i),o=new Uint8Array(n,r,i);return new Uint8Array(a).set(o),new DataView(a)}if(t===`[object Boolean]`||t===`[object Number]`||t===`[object String]`){let n=e.constructor,r=new n(e.valueOf());return t===`[object String]`?$he(r,e):Sp(r,e),r}if(t===`[object Date]`)return new Date(Number(e));if(t===`[object RegExp]`){let t=e,n=new RegExp(t.source,t.flags);return n.lastIndex=t.lastIndex,n}if(t===`[object Symbol]`)return Object(Symbol.prototype.valueOf.call(e));if(t===`[object Map]`){let t=e,n=new Map;return t.forEach((e,t)=>{n.set(t,e)}),n}if(t===`[object Set]`){let t=e,n=new Set;return t.forEach(e=>{n.add(e)}),n}if(t===`[object Arguments]`){let t=e,n={};return Sp(n,t),n.length=t.length,n[Symbol.iterator]=t[Symbol.iterator],n}let n={};return ege(n,e),Sp(n,e),Qhe(n,e),n}function Zhe(e){switch(Lf(e)){case Uf:case Jf:case Yf:case Zf:case Hf:case Gf:case ap:case op:case np:case rp:case ip:case Kf:case Vf:case Xf:case zf:case qf:case Bf:case Wf:case Qf:case $f:case ep:case tp:return!0;default:return!1}}function Sp(e,t){for(let n in t)Object.hasOwn(t,n)&&(e[n]=t[n])}function Qhe(e,t){let n=Object.getOwnPropertySymbols(t);for(let r=0;r<n.length;r++){let i=n[r];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function $he(e,t){let n=t.valueOf().length;for(let r in t)Object.hasOwn(t,r)&&(Number.isNaN(Number(r))||Number(r)>=n)&&(e[r]=t[r])}function ege(e,t){let n=Object.getPrototypeOf(t);n!==null&&typeof t.constructor==`function`&&Object.setPrototypeOf(e,n)}var tge=o((()=>{fp(),Rf(),sp(),Che(),bp()}));function nge(e){if(dp(e))return e;if(Array.isArray(e)||pp(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}var rge=o((()=>{fp(),mp()}));function ige(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=Cp(i,t,r,new Map)}return i}function Cp(e,t,n,r){if(dp(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return nge(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...Dhe(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Phe(o))continue;let s=t[o],l=e[o];if(_p(s)&&(s={...s}),_p(l)&&(l={...l}),lp(s)&&(s=Vhe(s)),Array.isArray(s)){if(Array.isArray(l)){let e=[],t=Reflect.ownKeys(l);for(let n=0;n<t.length;n++){let r=t[n];e[r]=l[r]}l=e}else if(Ghe(l)){let e=[];for(let t=0;t<l.length;t++)e[t]=l[t];l=e}else l=[]}let u=n(l,s,o,e,t,r);u===void 0?Array.isArray(s)||vp(l)&&vp(s)&&(If(l)||If(s)||yp(l)||yp(s))?e[o]=Cp(l,s,n,r):l==null&&If(s)?e[o]=Cp({},s,n,r):l==null&&yp(s)?e[o]=Vhe(s):(l===void 0||s!==void 0)&&(e[o]=s):e[o]=u}return e}var age=o((()=>{fp(),rge(),Ohe(),up(),Fhe(),whe(),Hhe(),Uhe(),Whe(),Khe(),bp()}));function oge(e,...t){return ige(e,...t,The)}var sge=o((()=>{Ehe(),age()}));function cge(e){if(e==null)return!0;if(Mhe(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!lp(e)&&!yp(e)&&!_p(e)?!1:e.length===0;if(typeof e==`object`||typeof e==`function`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return qhe(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var lge=o((()=>{up(),Nhe(),Uhe(),Jhe(),bp()})),wp=o((()=>{Yhe(),tge(),sge(),lge()}));function Tp(e,t){return e?_ge[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}function uge(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,gge.sanitizeUrl)(n)}function Ep(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function dge(e){let t,n=0;return e.forEach(e=>{n+=Ep(e,t),t=e}),Fp(e,n/2)}function fge(e){return e.length===1?e[0]:dge(e)}function pge(e,t,n){let r=structuredClone(n);y.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=Fp(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}function Dp(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}function mge(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}function Op(e,t){return Bp(e,t).height}function kp(e,t){return Bp(e,t).width}function Ap(e){return`str`in e}function jp(e,t){return oge({},e,t)}function Mp(e){return e??null}function hge(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}var gge,_ge,vge,yge,Np,bge,xge,Sge,Pp,Fp,Cge,Ip,Lp,Rp,wge,Tge,zp,Ege,Bp,Dge,Vp,Oge,kge,Hp,Up,Age,Wp,Gp,Kp=o((()=>{Zs(),S(),h(),gge=Ff(),hf(),wp(),_ge={curveBasis:$d,curveBasisClosed:Jpe,curveBasisOpen:Zpe,curveBumpX:Wpe,curveBumpY:Gpe,curveBundle:eme,curveCardinalClosed:nme,curveCardinalOpen:ime,curveCardinal:rf,curveCatmullRomClosed:cme,curveCatmullRomOpen:dme,curveCatmullRom:lf,curveLinear:Kd,curveLinearClosed:mme,curveMonotoneX:xme,curveMonotoneY:Sme,curveNatural:Eme,curveStep:Ome,curveStepAfter:Ame,curveStepBefore:kme},vge=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,yge=p(function(e,t){let n=Np(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);Uo(e),r=No(r,[...e])}else r=n.args;if(!r)return;let i=ds(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),Np=p(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${vge.source})(?=[}][%]{2}).*384-`,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),y.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=cs.exec(e))!==null;)if(r.index===cs.lastIndex&&cs.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return y.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),bge=p(function(e){return e.replace(cs,``)},`removeDirectives`),xge=p(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`),p(Tp,`interpolateToCurve`),p(uge,`formatUrl`),Sge=p((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){y.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`),p(Ep,`distance`),p(dge,`traverseEdge`),p(fge,`calcLabelPosition`),Pp=p((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),Fp=p((e,t)=>{let n,r=t;for(let t of e){if(n){let e=Ep(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:Pp((1-i)*n.x+i*t.x,5),y:Pp((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),Cge=p((e,t,n)=>{y.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=Fp(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`),p(pge,`calcTerminalLabelPosition`),p(Dp,`getStylesFromArray`),Ip=0,Lp=p(()=>(Ip++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Ip),`generateId`),p(mge,`makeRandomHex`),Rp=p(e=>mge(e.length),`random`),wge=p(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Tge=p(function(e,t){let n=t.text.replace(Ds.lineBreakRegex,` `),[,r]=Hp(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),zp=xp((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),Ds.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=kp(`${e} `,n),l=kp(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Ege(e,t,`-`,n);i.push(a,...r),a=o}else l+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Ege=xp((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let l=`${o}${e}`;if(kp(l,r)>=t){let e=s+1,t=i.length===e,r=`${l}${n}`;a.push(t?l:r),o=``}else o=l}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`),p(Op,`calculateTextHeight`),p(kp,`calculateTextWidth`),Bp=xp((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Hp(n),o=[`sans-serif`,r],s=e.split(Ds.lineBreakRegex),l=[],u=Ac(`body`);if(!u.remove)return{width:0,height:0,lineHeight:0};let d=u.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=wge();o.text=r||`​`;let s=Tge(d,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),l=(s._groups||s)[0][0].getBBox();if(l.width===0&&l.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,l.width)),t=Math.round(l.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}l.push(n)}return d.remove(),l[isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Dge=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{p(this,`InitIDGenerator`)}},Oge=p(function(e){return Vp||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Vp.innerHTML=e,unescape(Vp.textContent)},`entityDecode`),p(Ap,`isDetailedError`),kge=p((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Hp=p(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`),p(jp,`cleanAndMerge`),Up={assignWithDepth:No,wrapLabel:zp,calculateTextHeight:Op,calculateTextWidth:kp,calculateTextDimensions:Bp,cleanAndMerge:jp,detectInit:yge,detectDirective:Np,isSubstringInArray:xge,interpolateToCurve:Tp,calcLabelPosition:fge,calcCardinalityPosition:Cge,calcTerminalLabelPosition:pge,formatUrl:uge,getStylesFromArray:Dp,generateId:Lp,random:Rp,runFunc:Sge,entityDecode:Oge,insertTitle:kge,isLabelCoordinateInPath:hge,parseFontSize:Hp,InitIDGenerator:Dge},Age=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Wp=p(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),Gp=p((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`),p(Mp,`handleUndefinedAttr`),p(hge,`isLabelCoordinateInPath`)})),jge=s(((e,t)=>{(function(e){"use strict";var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(e){return setTimeout(e,16)};function r(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}r.prototype={constructor:r,runTasks:function(e){for(var t;t=e.shift();)t()},measure:function(e,t){var n=t?e.bind(t):e;return this.reads.push(n),i(this),n},mutate:function(e,t){var n=t?e.bind(t):e;return this.writes.push(n),i(this),n},clear:function(e){return o(this.reads,e)||o(this.writes,e)},extend:function(e){if(typeof e!=`object`)throw Error(`expected object`);var t=Object.create(this);return s(t,e),t.fastdom=this,t.initialize&&t.initialize(),t},catch:null};function i(e){e.scheduled||(e.scheduled=!0,e.raf(a.bind(null,e)))}function a(e){var t=e.writes,n=e.reads,r;try{n.length,e.runTasks(n),t.length,e.runTasks(t)}catch(e){r=e}if(e.scheduled=!1,(n.length||t.length)&&i(e),r){if(r.message,e.catch)e.catch(r);else throw r}}function o(e,t){var n=e.indexOf(t);return!!~n&&!!e.splice(n,1)}function s(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}var l=e.fastdom=e.fastdom||new r;typeof define==`function`?define(function(){return l}):typeof t==`object`&&(t.exports=l)})(typeof window<`u`?window:e===void 0?globalThis:e)})),Mge=s(((e,t)=>{(function(){var e={initialize:function(){this._tasks=new Map},mutate:function(e,t){return n(this,`mutate`,e,t)},measure:function(e,t){return n(this,`measure`,e,t)},clear:function(e){var t=this._tasks,n=t.get(e);this.fastdom.clear(n),t.delete(e)}};function n(e,t,n,r){var i=e._tasks,a=e.fastdom,o,s=new Promise(function(e,l){o=a[t](function(){i.delete(s);try{e(r?n.call(r):n())}catch(e){l(e)}},r)});return i.set(s,o),s}(typeof define)[0]==`f`?define(function(){return e}):(typeof t)[0]==`o`?t.exports=e:window.fastdomPromised=e})()}));function qp(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function Nge(e){Qp=e}function Jp(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(em.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}function Yp(e,t){if(t){if(em.escapeTest.test(e))return e.replace(em.escapeReplace,Dm)}else if(em.escapeTestNoEncode.test(e))return e.replace(em.escapeReplaceNoEncode,Dm);return e}function Pge(e){try{e=encodeURI(e).replace(em.percentDecode,`%`)}catch{return null}return e}function Fge(e,t){let n=e.replace(em.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(em.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t){if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``)}for(;r<n.length;r++)n[r]=n[r].trim().replace(em.slashPipe,`|`);return n}function Xp(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Ige(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Lge(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let l={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,l}function Rge(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`385-`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`386-`)}function Zp(e,t){return Pm.parse(e,t)}var Qp,$p,zge,em,Bge,Vge,Hge,tm,Uge,nm,rm,im,Wge,am,Gge,om,Kge,qge,sm,cm,Jge,lm,um,dm,Yge,Xge,Zge,Qge,fm,$ge,pm,mm,hm,e_e,gm,t_e,n_e,r_e,_m,i_e,a_e,vm,o_e,s_e,c_e,l_e,u_e,d_e,f_e,ym,p_e,bm,xm,m_e,Sm,Cm,h_e,wm,g_e,Tm,Em,__e,Dm,Om,km,Am,jm,Mm,Nm,v_e,Pm,y_e=o((()=>{Qp=qp(),$p={exec:()=>null},zge=(()=>{try{return!0}catch{return!1}})(),em={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Bge=/^(?:[ \t]*(?:\n|$))+/,Vge=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Hge=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,tm=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Uge=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,nm=/(?:[*+-]|\d{1,9}[.)])/,rm=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,im=Jp(rm).replace(/bull/g,nm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),Wge=Jp(rm).replace(/bull/g,nm).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),am=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Gge=/^[^\n]+/,om=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Kge=Jp(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,om).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),qge=Jp(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,nm).getRegex(),sm=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,cm=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Jge=Jp(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,cm).replace(`tag`,sm).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),lm=Jp(am).replace(`hr`,tm).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,sm).getRegex(),um={blockquote:Jp(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,lm).getRegex(),code:Vge,def:Kge,fences:Hge,heading:Uge,hr:tm,html:Jge,lheading:im,list:qge,newline:Bge,paragraph:lm,table:$p,text:Gge},dm=Jp(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,tm).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,sm).getRegex(),Yge={...um,lheading:Wge,table:dm,paragraph:Jp(am).replace(`hr`,tm).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,dm).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,sm).getRegex()},Xge={...um,html:Jp(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,cm).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:$p,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Jp(am).replace(`hr`,tm).replace(`heading`,` *#{1,6} *[^387-]`).replace(`lheading`,im).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Zge=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Qge=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,fm=/^( {2,}|\\)\n(?!\s*$)/,$ge=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,pm=/[\p{P}\p{S}]/u,mm=/[\s\p{P}\p{S}]/u,hm=/[^\s\p{P}\p{S}]/u,e_e=Jp(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,mm).getRegex(),gm=/(?!~)[\p{P}\p{S}]/u,t_e=/(?!~)[\s\p{P}\p{S}]/u,n_e=/(?:[^\s\p{P}\p{S}]|~)/u,r_e=Jp(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,zge?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),_m=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,i_e=Jp(_m,`u`).replace(/punct/g,pm).getRegex(),a_e=Jp(_m,`u`).replace(/punct/g,gm).getRegex(),vm=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,o_e=Jp(vm,`gu`).replace(/notPunctSpace/g,hm).replace(/punctSpace/g,mm).replace(/punct/g,pm).getRegex(),s_e=Jp(vm,`gu`).replace(/notPunctSpace/g,n_e).replace(/punctSpace/g,t_e).replace(/punct/g,gm).getRegex(),c_e=Jp(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,hm).replace(/punctSpace/g,mm).replace(/punct/g,pm).getRegex(),l_e=Jp(/\\(punct)/,`gu`).replace(/punct/g,pm).getRegex(),u_e=Jp(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),d_e=Jp(cm).replace(`(?:-->|$)`,`-->`).getRegex(),f_e=Jp(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,d_e).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ym=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,p_e=Jp(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,ym).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),bm=Jp(/^!?\[(label)\]\[(ref)\]/).replace(`label`,ym).replace(`ref`,om).getRegex(),xm=Jp(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,om).getRegex(),m_e=Jp(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,bm).replace(`nolink`,xm).getRegex(),Sm=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Cm={_backpedal:$p,anyPunctuation:l_e,autolink:u_e,blockSkip:r_e,br:fm,code:Qge,del:$p,emStrongLDelim:i_e,emStrongRDelimAst:o_e,emStrongRDelimUnd:c_e,escape:Zge,link:p_e,nolink:xm,punctuation:e_e,reflink:bm,reflinkSearch:m_e,tag:f_e,text:$ge,url:$p},h_e={...Cm,link:Jp(/^!?\[(label)\]\((.*?)\)/).replace(`label`,ym).getRegex(),reflink:Jp(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,ym).getRegex()},wm={...Cm,emStrongRDelimAst:s_e,emStrongLDelim:a_e,url:Jp(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,Sm).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:Jp(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,Sm).getRegex()},g_e={...wm,br:Jp(fm).replace(`{2,}`,`*`).getRegex(),text:Jp(wm.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},Tm={normal:um,gfm:Yge,pedantic:Xge},Em={normal:Cm,gfm:wm,breaks:g_e,pedantic:h_e},__e={"&":`&amp;`,"<":`&lt;`,">":`&gt;`,'"':`&quot;`,"'":`&#39;`},Dm=e=>__e[e],Om=class{options;rules;lexer;constructor(e){this.options=e||Qp}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Xp(e,`388-`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=Rge(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Xp(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Xp(t[0],`389-`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Xp(t[0],`390-`).split(`391-`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`392-`),l=s.replace(this.rules.other.blockquoteSetextReplace,`393- $1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}394-${s}`:s,r=r?`${r}395-${l}`:l;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,i,!0),this.lexer.state.top=u,e.length===0)break;let d=i.at(-1);if(d?.type===`code`)break;if(d?.type===`blockquote`){let t=d,a=t.raw+`396-`+e.join(`397-`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}if(d?.type===`list`){let t=d,a=t.raw+`398-`+e.join(`399-`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-d.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`400-`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let l=t[2].split(`401-`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),u=e.split(`402-`,1)[0],d=!l.trim(),f=0;if(this.options.pedantic?(f=2,s=l.trimStart()):d?f=t[1].length+1:(f=t[2].search(this.rules.other.nonSpaceChar),f=f>4?1:f,s=l.slice(f),f+=t[1].length),d&&this.rules.other.blankLine.test(u)&&(r+=u+`403-`,e=e.substring(u.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(f),n=this.rules.other.hrRegex(f),i=this.rules.other.fencesBeginRegex(f),a=this.rules.other.headingBeginRegex(f),o=this.rules.other.htmlBeginRegex(f);for(;e;){let p=e.split(`404-`,1)[0],m;if(u=p,this.options.pedantic?(u=u.replace(this.rules.other.listReplaceNesting,` `),m=u):m=u.replace(this.rules.other.tabCharGlobal,` `),i.test(u)||a.test(u)||o.test(u)||t.test(u)||n.test(u))break;if(m.search(this.rules.other.nonSpaceChar)>=f||!u.trim())s+=`405-`+m.slice(f);else{if(d||l.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(l)||a.test(l)||n.test(l))break;s+=`406-`+u}!d&&!u.trim()&&(d=!0),r+=p+`407-`,e=e.substring(p.length+1),l=m.slice(f)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let p=null,m;this.options.gfm&&(p=this.rules.other.listIsTask.exec(s),p&&(m=p[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!p,checked:m,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Fge(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`408-`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Fge(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`409-`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Xp(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Ige(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Lge(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Lge(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,l=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,t=t.slice(-1*e.length+n);(r=l.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,l=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=l.slice(1,-1);return{type:`em`,raw:l,text:e,tokens:this.lexer.inlineTokens(e)}}let u=l.slice(2,-2);return{type:`strong`,raw:l,text:u,tokens:this.lexer.inlineTokens(u)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},km=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Qp,this.options.tokenizer=this.options.tokenizer||new Om,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:em,block:Tm.normal,inline:Em.normal};this.options.pedantic?(t.block=Tm.pedantic,t.inline=Em.pedantic):this.options.gfm&&(t.block=Tm.gfm,t.inline=this.options.breaks?Em.breaks:Em.gfm),this.tokenizer.rules=t}static get rules(){return{block:Tm,inline:Em}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(em.carriageReturn,`410-`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(em.tabCharGlobal,` `).replace(em.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`411-`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`412-`)?``:`413-`)+r.raw,n.text+=`414-`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`415-`)?``:`416-`)+r.raw,n.text+=`417-`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`418-`)?``:`419-`)+r.raw,a.text+=`420-`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`421-`)?``:`422-`)+r.raw,n.text+=`423-`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}throw Error(t)}}return t}},Am=class{options;parser;constructor(e){this.options=e||Qp}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(em.notSpaceStart)?.[0],i=e.replace(em.endingNewline,``)+`424-`;return r?`<pre><code class="language-`+Yp(r)+`">`+(n?i:Yp(i,!0))+`</code></pre>425-`:`<pre><code>`+(n?i:Yp(i,!0))+`</code></pre>426-`}blockquote({tokens:e}){return`<blockquote>427-${this.parser.parse(e)}</blockquote>428-`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>429-`}hr(e){return`<hr>430-`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>431-`+r+`</`+i+`>432-`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Yp(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>433-`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>434-`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>435-<thead>436-`+t+`</thead>437-`+r+`</table>438-`}tablerow({text:e}){return`<tr>439-${e}</tr>440-`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>441-`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Yp(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Pge(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Yp(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Pge(e);if(i===null)return Yp(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Yp(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Yp(e.text)}},jm=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Mm=class e{options;renderer;textRenderer;constructor(e){this.options=e||Qp,this.options.renderer=this.options.renderer||new Am,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new jm}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`def`:n+=this.renderer.def(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`442-`+this.renderer.text(i);n+=t?this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Nm=class{options;block;constructor(e){this.options=e||Qp}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?km.lex:km.lexInline}provideParser(){return this.block?Mm.parse:Mm.parseInline}},v_e=class{defaults=qp();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Mm;Renderer=Am;TextRenderer=jm;Lexer=km;Tokenizer=Om;Hooks=Nm;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Am(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Om(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Nm;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];t[r]=Nm.passThroughHooks.has(n)?e=>{if(this.defaults.async&&Nm.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return km.lex(e,t??this.defaults)}parser(e,t){return Mm.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?km.lex:km.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?Mm.parse:Mm.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?km.lex:km.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?Mm.parse:Mm.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`443-Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Yp(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}},Pm=new v_e,Zp.options=Zp.setOptions=function(e){return Pm.setOptions(e),Zp.defaults=Pm.defaults,Nge(Zp.defaults),Zp},Zp.getDefaults=qp,Zp.defaults=Qp,Zp.use=function(...e){return Pm.use(...e),Zp.defaults=Pm.defaults,Nge(Zp.defaults),Zp},Zp.walkTokens=function(e,t){return Pm.walkTokens(e,t)},Zp.parseInline=Pm.parseInline,Zp.Parser=Mm,Zp.parser=Mm.parse,Zp.Renderer=Am,Zp.TextRenderer=jm,Zp.Lexer=km,Zp.lexer=km.lex,Zp.Tokenizer=Om,Zp.Hooks=Nm,Zp.parse=Zp,Zp.options,Zp.setOptions,Zp.use,Zp.walkTokens,Zp.parseInline,Mm.parse,km.lex}));function b_e(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=Array.from(typeof e==`string`?[e]:e);r[r.length-1]=r[r.length-1].replace(/\r?\n([\t ]*)$/,``);var i=r.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(i.length){var a=RegExp(`444-[ ]{${Math.min.apply(Math,i)}}`,`g`);r=r.map(function(e){return e.replace(a,`445-`)})}r[0]=r[0].replace(/^\r?\n/,``);var o=r[0];return t.forEach(function(e,t){var n=o.match(/(?:^|\n)( *)$/),i=n?n[1]:``,a=e;typeof e==`string`&&e.includes(`446-`)&&(a=String(e).split(`447-`).map(function(e,t){return t===0?e:`${i}${e}`}).join(`448-`)),o+=a+r[t+1]}),o}var x_e=o((()=>{}));function S_e(e,{markdownAutoWrap:t}){return b_e(e.replace(/<br\/>/g,`449-`).replace(/\n{2,}/g,`450-`))}function C_e(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}function w_e(e,t={}){let n=S_e(e,t),r=Zp.lexer(n),i=[[]],a=0;function o(e,t=`normal`){e.type===`text`?e.text.split(`451-`).forEach((e,n)=>{n!==0&&(a++,i.push([])),e.split(` `).forEach(e=>{e=e.replace(/&#39;/g,`'`),e&&i[a].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{o(t,e.type)}):e.type===`html`&&i[a].push({content:e.text,type:`normal`})}return p(o,`processNode`),r.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{o(e)}):e.type===`html`?i[a].push({content:e.text,type:`normal`}):i[a].push({content:e.raw,type:`normal`})}),i}function T_e(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}function E_e(e,{markdownAutoWrap:t}={}){let n=Zp.lexer(e);function r(e){return e.type===`text`?t===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,`&nbsp;`):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(r).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(r).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(r).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(y.warn(`Unsupported markdown: ${e.type}`),e.raw)}return p(r,`output`),n.map(r).join(``)}function D_e(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}function O_e(e,t){return Fm(e,[],D_e(t.content),t.type)}function Fm(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?Fm(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}function k_e(e,t){if(e.some(({content:e})=>e.includes(`452-`)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return Im(e,t)}function Im(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return Im(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=O_e(t,a);n.push([r]),i.content&&e.unshift(i)}return Im(e,t,n)}function Lm(e,t){t&&e.attr(`style`,t)}async function A_e(e,t,n,r,i=!1,a=es()){let o=e.append(`foreignObject`);o.attr(`width`,`${Math.min(10*n,Gm)}px`),o.attr(`height`,`${Math.min(10*n,Gm)}px`);let s=o.append(`xhtml:div`),l=ws(t.label)?await Es(t.label.replace(Ds.lineBreakRegex,`453-`),a):_s(t.label,a),u=t.isNode?`nodeLabel`:`edgeLabel`,d=s.append(`span`);return d.html(l),Lm(d,t.labelStyle),d.attr(`class`,`${u} ${r}`),Lm(s,t.labelStyle),s.style(`display`,`table-cell`),s.style(`white-space`,`nowrap`),s.style(`line-height`,`1.5`),n!==1/0&&(s.style(`max-width`,n+`px`),s.style(`text-align`,`center`)),s.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),i&&s.attr(`class`,`labelBkg`),(await Wm.measure(()=>s.node().getBoundingClientRect())).width===n&&(s.style(`display`,`table`),s.style(`white-space`,`break-spaces`),s.style(`width`,n+`px`)),o.node()}function Rm(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}function j_e(e,t,n){let r=e.append(`text`),i=Rm(r,1,t);Bm(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}function M_e(e,t,n){let r=e.append(`text`),i=Rm(r,1,t);Bm(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}function N_e(e,t,n,r=!1,i=!1){let a=1.1,o=t.append(`g`),s=o.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),l=o.append(`text`).attr(`y`,`-10.1`);i&&l.attr(`text-anchor`,`middle`);let u=0;for(let t of n){let n=p(t=>j_e(o,a,t)<=e,`checkWidth`),r=n(t)?[t]:k_e(t,n);for(let e of r)Bm(Rm(l,u,a,i),e),u++}if(r){let e=l.node().getBBox();return s.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),o.node()}return l.node()}function zm(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}function Bm(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(zm(t.content)):r.text(` `+zm(t.content))})}async function P_e(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await bhe(n)?await Nf(n,void 0,{class:`label-icon`}):`<i class='${_s(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}var F_e,I_e,Vm,Hm,Um,L_e,R_e,z_e,Wm,Gm,Km,qm=o((()=>{Pf(),Kp(),Zs(),S(),h(),F_e=d(jge(),1),I_e=d(Mge(),1),hf(),y_e(),x_e(),Vm=typeof performance<`u`&&typeof performance.now==`function`,Hm=p(()=>Vm?performance.now():0,`now`),Um=`🧜 `,L_e=`Mermaid render`,R_e=`Mermaid`,z_e={parse:`tertiary`,prepare:`secondary`,measure:`primary`,layout:`primary-dark`,layoutCore:`error`,draw:`primary-light`,paint:`secondary-dark`,serialize:`tertiary-dark`,render:`primary-light`},class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{p(this,`Profiler`)}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(e){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(e))}tickSync(e,t){if(!this.enabled)return t();let n=Hm();try{return t()}finally{this.buckets[e]=(this.buckets[e]??0)+(Hm()-n)}}async tick(e,t){if(!this.enabled)return t();let n=Hm();try{return await t()}finally{this.buckets[e]=(this.buckets[e]??0)+(Hm()-n)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();let e=this.roots.at(-1),t=this.runLabel??e?.name;return e&&(this.records.push({label:t??e.name,tree:e,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(e,t)),this.runLabel=void 0,e}begin(e){if(!this.enabled)return;let t={name:e,start:Hm(),duration:-1,children:[]},n=this.stack.at(-1);if(n?n.children.push(t):this.roots.push(t),this.stack.push(t),Vm&&typeof performance.mark==`function`)try{performance.mark(`${Um}${e} \u25B6`)}catch{}}end(){if(!this.enabled)return;let e=this.stack.pop();if(!e)return;let t=Hm();if(e.duration=t-e.start,Vm&&typeof performance.measure==`function`)try{performance.measure(`${Um}${e.name}`,{start:e.start,end:t,detail:{devtools:{dataType:`track-entry`,track:L_e,trackGroup:R_e,color:z_e[e.name]??`primary`,tooltipText:`${e.name} \u2014 ${e.duration.toFixed(1)} ms`}}})}catch{}}async span(e,t){if(!this.enabled)return t();this.begin(e);try{return await t()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(e=this.report(),t){if(!e)return;let n=e.duration,r=t&&t!==e.name?`${e.name} [${t}]`:e.name,i=[`ms % phase`],a=p((e,t)=>{let r=` `.repeat(t),o=e.duration.toFixed(1).padStart(8),s=n>0?`${(e.duration/n*100).toFixed(0).padStart(3)}%`:` -`;i.push(`${o} ${s} ${r}${e.name}`);for(let n of e.children)a(n,t+1);if(e.children.length>0){let t=e.children.reduce((e,t)=>e+t.duration,0),n=e.duration-t;if(n>.5){let e=n.toFixed(1).padStart(8);i.push(`${e} ${r} (self)`)}}},`walk`);a(e,0);let o=Object.keys(this.buckets);if(o.length>0){i.push(`—— buckets (summed) ——`);for(let e of o)i.push(`${this.buckets[e].toFixed(1).padStart(8)} ${e}`)}console.log(`${Um}mermaid render profile \xB7 ${r}454-${i.join(`455-`)}`)}},globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:`0.0.0`},Wm=F_e.default.extend({raf(e){typeof queueMicrotask==`function`?queueMicrotask(e):setTimeout(e,0)}}).extend(I_e.default),p(S_e,`preprocessMarkdown`),p(C_e,`nonMarkdownToLines`),p(w_e,`markdownToLines`),p(T_e,`nonMarkdownToHTML`),p(E_e,`markdownToHTML`),p(D_e,`splitTextToChars`),p(O_e,`splitWordToFitWidth`),p(Fm,`splitWordToFitWidthRecursion`),p(k_e,`splitLineToFitWidth`),p(Im,`splitLineToFitWidthRecursion`),p(Lm,`applyStyle`),Gm=16384,p(A_e,`addHtmlSpan`),p(Rm,`createTspan`),p(j_e,`computeWidthOfText`),p(M_e,`computeDimensionOfText`),p(N_e,`createFormattedText`),p(zm,`decodeHTMLEntities`),p(Bm,`updateTextContentAndStyles`),p(P_e,`replaceIconSubstring`),Km=p(async(e,t=``,{style:n=``,isTitle:r=!1,classes:i=``,useHtmlLabels:a=!0,markdown:o=!0,isNode:s=!0,width:l=200,addSvgBackground:u=!1}={},d)=>{if(y.debug(`XYZ createText`,t,n,r,i,a,s,`addSvgBackground: `,u),a){let r=o?E_e(t,d):T_e(t),a=await P_e(Wp(r),d),f=t.replace(/\\\\/g,`\\`);return await A_e(e,{isNode:s,label:ws(t)?f:a,labelStyle:n.replace(`fill:`,`color:`)},l,i,u,d)}{let i=Wp(t.replace(/<br\s*\/?>/g,`<br/>`)),a=N_e(l,e,o?w_e(i.replace(`<br>`,`<br/>`),d):C_e(i),t?u:!1,!s);if(s){/stroke:/.exec(n)&&(n=n.replace(`stroke:`,`lineColor:`));let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);Ac(a).attr(`style`,e)}else{let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);Ac(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);Ac(a).select(`text`).attr(`style`,t)}return r?Ac(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):Ac(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`)}));function Jm(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function B_e(e,t){return e[0]===t[0]&&e[1]===t[1]}function V_e(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)Jm(e,s,i);let l=function(e,t,n){let r=[];for(let t of e){let e=[...t];B_e(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,l=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||l%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),l++}return i}(o,a,r);if(i){for(let e of o)Jm(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),Jm(r,t,n)})(l,s,-i)}return l}function Ym(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),V_e(e,r,n,i||1)}function Xm(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}function Zm(e,t){return e.type===t}function Qm(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:dve,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:vh,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:yh,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!Zm(a,yh);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return Qm(`M0,0`+e);i++,o=bh[a.text],r=a.text}else Zm(a,vh)?o=bh[r]:(i++,o=bh[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!Zm(t,vh))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof bh[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function H_e(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function U_e(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,l=0;for(let{key:u,data:d}of e){switch(u){case`M`:t.push({key:`M`,data:[...d]}),[r,i]=d,[a,o]=d;break;case`C`:t.push({key:`C`,data:[...d]}),r=d[4],i=d[5],s=d[2],l=d[3];break;case`L`:t.push({key:`L`,data:[...d]}),[r,i]=d;break;case`H`:r=d[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=d[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-l)):(e=r,a=i),t.push({key:`C`,data:[e,a,...d]}),s=d[0],l=d[1],r=d[2],i=d[3];break}case`T`:{let[e,a]=d,o=0,u=0;n===`Q`||n===`T`?(o=r+(r-s),u=i+(i-l)):(o=r,u=i);let f=r+2*(o-r)/3,p=i+2*(u-i)/3,m=e+2*(o-e)/3,h=a+2*(u-a)/3;t.push({key:`C`,data:[f,p,m,h,e,a]}),s=o,l=u,r=e,i=a;break}case`Q`:{let[e,n,a,o]=d,u=r+2*(e-r)/3,f=i+2*(n-i)/3,p=a+2*(e-a)/3,m=o+2*(n-o)/3;t.push({key:`C`,data:[u,f,p,m,a,o]}),s=e,l=n,r=a,i=o;break}case`A`:{let e=Math.abs(d[0]),n=Math.abs(d[1]),a=d[2],o=d[3],s=d[4],l=d[5],u=d[6];e===0||n===0?(t.push({key:`C`,data:[r,i,l,u,l,u]}),r=l,i=u):(r!==l||i!==u)&&(W_e(r,i,l,u,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=l,i=u);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=u}return t}function $m(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function W_e(e,t,n,r,i,a,o,s,l,u){let d=(f=o,Math.PI*f/180);var f;let p=[],m=0,h=0,g=0,_=0;if(u)[m,h,g,_]=u;else{[e,t]=$m(e,t,-d),[n,r]=$m(n,r,-d);let o=(e-n)/2,u=(t-r)/2,f=o*o/(i*i)+u*u/(a*a);f>1&&(f=Math.sqrt(f),i*=f,a*=f);let p=i*i,v=a*a,y=p*v-p*u*u-v*o*o,b=p*u*u+v*o*o,x=(s===l?-1:1)*Math.sqrt(Math.abs(y/b));g=x*i*u/a+(e+n)/2,_=x*-a*o/i+(t+r)/2,m=Math.asin(parseFloat(((t-_)/a).toFixed(9))),h=Math.asin(parseFloat(((r-_)/a).toFixed(9))),e<g&&(m=Math.PI-m),n<g&&(h=Math.PI-h),m<0&&(m=2*Math.PI+m),h<0&&(h=2*Math.PI+h),l&&m>h&&(m-=2*Math.PI),!l&&h>m&&(h-=2*Math.PI)}let v=h-m;if(Math.abs(v)>120*Math.PI/180){let e=h,t=n,s=r;h=l&&h>m?m+120*Math.PI/180*1:m+120*Math.PI/180*-1,p=W_e(n=g+i*Math.cos(h),r=_+a*Math.sin(h),t,s,i,a,o,0,l,[h,e,g,_])}v=h-m;let y=Math.cos(m),b=Math.sin(m),x=Math.cos(h),S=Math.sin(h),C=Math.tan(v/4),w=4/3*i*C,T=4/3*a*C,E=[e,t],D=[e+w*b,t-T*y],O=[n+w*S,r-T*x],k=[n,r];if(D[0]=2*E[0]-D[0],D[1]=2*E[1]-D[1],u)return[D,O,k].concat(p);{p=[D,O,k].concat(p);let e=[];for(let t=0;t<p.length;t+=3){let n=$m(p[t][0],p[t][1],d),r=$m(p[t+1][0],p[t+1][1],d),i=$m(p[t+2][0],p[t+2][1],d);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}function G_e(e,t,n,r,i){return{type:`path`,ops:oh(e,t,n,r,i)}}function eh(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(...oh(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(...oh(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?G_e(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function K_e(e,t,n,r,i){return function(e,t){return eh(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function q_e(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=ch(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:ch(n[0],1.5*(1+.22*t.roughness),Z_e(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=ch(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:ch(a,1.5*(1+.22*t.roughness),Z_e(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function J_e(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),l=1-n.curveFitting;return o+=ah(o*l,n),s+=ah(s*l,n),{increment:a,rx:o,ry:s}}function th(e,t,n,r){let[i,a]=$_e(r.increment,e,t,r.rx,r.ry,1,r.increment*ih(.1,ih(.4,1,n),n),n),o=lh(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=$_e(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=lh(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function Y_e(e,t,n,r,i,a,o,s,l){let u=e,d=t,f=Math.abs(n/2),p=Math.abs(r/2);f+=ah(.01*f,l),p+=ah(.01*p,l);let m=i,h=a;for(;m<0;)m+=2*Math.PI,h+=2*Math.PI;h-m>2*Math.PI&&(m=0,h=2*Math.PI);let g=2*Math.PI/l.curveStepCount,_=Math.min(g/2,(h-m)/2),v=eve(_,u,d,f,p,m,h,1,l);if(!l.disableMultiStroke){let e=eve(_,u,d,f,p,m,h,1.5,l);v.push(...e)}return o&&(s?v.push(...oh(u,d,u+f*Math.cos(m),d+p*Math.sin(m),l),...oh(u,d,u+f*Math.cos(h),d+p*Math.sin(h),l)):v.push({op:`lineTo`,data:[u,d]},{op:`lineTo`,data:[u+f*Math.cos(m),d+p*Math.sin(m)]})),{type:`path`,ops:v}}function X_e(e,t){let n=U_e(H_e(Qm(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...oh(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,l,u]=o;r.push(...tve(e,n,i,s,l,u,a,t)),a=[l,u];break}case`Z`:r.push(...oh(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function nh(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+ah(e,t),r[0][1]+ah(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+ah(e,t),r[a][1]+ah(e,t)]})}}return{type:`fillPath`,ops:n}}function rh(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!_h[n])switch(n){case`zigzag`:_h[n]||(_h[n]=new ave(t));break;case`cross-hatch`:_h[n]||(_h[n]=new ove(t));break;case`dots`:_h[n]||(_h[n]=new sve(t));break;case`dashed`:_h[n]||(_h[n]=new cve(t));break;case`zigzag-line`:_h[n]||(_h[n]=new lve(t));break;default:n=`hachure`,_h[n]||(_h[n]=new gh(t))}return _h[n]}(t,fve).fillPolygons(e,t)}function Z_e(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Q_e(e){return e.randomizer||=new uve(e.seed||0),e.randomizer.next()}function ih(e,t,n,r=1){return n.roughness*r*(Q_e(n)*(t-e)+e)}function ah(e,t,n=1){return ih(-e,e,t,n)}function oh(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sh(e,t,n,r,i,!0,!1);if(o)return s;let l=sh(e,t,n,r,i,!0,!0);return s.concat(l)}function sh(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,l=Math.sqrt(s),u=1;u=l<200?1:l>500?.4:-.0016668*l+1.233334;let d=i.maxRandomnessOffset||0;d*d*100>s&&(d=l/10);let f=d/2,p=.2+.2*Q_e(i),m=i.bowing*i.maxRandomnessOffset*(r-t)/200,h=i.bowing*i.maxRandomnessOffset*(e-n)/200;m=ah(m,i,u),h=ah(h,i,u);let g=[],_=()=>ah(f,i,u),v=()=>ah(d,i,u),y=i.preserveVertices;return a&&(o?g.push({op:`move`,data:[e+(y?0:_()),t+(y?0:_())]}):g.push({op:`move`,data:[e+(y?0:ah(d,i,u)),t+(y?0:ah(d,i,u))]})),o?g.push({op:`bcurveTo`,data:[m+e+(n-e)*p+_(),h+t+(r-t)*p+_(),m+e+2*(n-e)*p+_(),h+t+2*(r-t)*p+_(),n+(y?0:_()),r+(y?0:_())]}):g.push({op:`bcurveTo`,data:[m+e+(n-e)*p+v(),h+t+(r-t)*p+v(),m+e+2*(n-e)*p+v(),h+t+2*(r-t)*p+v(),n+(y?0:v()),r+(y?0:v())]}),g}function ch(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+ah(t,n),e[0][1]+ah(t,n)]),r.push([e[0][0]+ah(t,n),e[0][1]+ah(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+ah(t,n),e[i][1]+ah(t,n)]),i===e.length-1&&r.push([e[i][0]+ah(t,n),e[i][1]+ah(t,n)]);return lh(r,null,n)}function lh(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+ah(e,n),t[1]+ah(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...sh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function $_e(e,t,n,r,i,a,o,s){let l=[],u=[];if(s.roughness===0){e/=4,u.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];l.push(e),u.push(e)}u.push([t+r*Math.cos(0),n+i*Math.sin(0)]),u.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let d=ah(.5,s)-Math.PI/2;u.push([ah(a,s)+t+.9*r*Math.cos(d-e),ah(a,s)+n+.9*i*Math.sin(d-e)]);let f=2*Math.PI+d-.01;for(let o=d;o<f;o+=e){let e=[ah(a,s)+t+r*Math.cos(o),ah(a,s)+n+i*Math.sin(o)];l.push(e),u.push(e)}u.push([ah(a,s)+t+r*Math.cos(d+2*Math.PI+.5*o),ah(a,s)+n+i*Math.sin(d+2*Math.PI+.5*o)]),u.push([ah(a,s)+t+.98*r*Math.cos(d+o),ah(a,s)+n+.98*i*Math.sin(d+o)]),u.push([ah(a,s)+t+.9*r*Math.cos(d+.5*o),ah(a,s)+n+.9*i*Math.sin(d+.5*o)])}return[u,l]}function eve(e,t,n,r,i,a,o,s,l){let u=a+ah(.1,l),d=[];d.push([ah(s,l)+t+.9*r*Math.cos(u-e),ah(s,l)+n+.9*i*Math.sin(u-e)]);for(let a=u;a<=o;a+=e)d.push([ah(s,l)+t+r*Math.cos(a),ah(s,l)+n+i*Math.sin(a)]);return d.push([t+r*Math.cos(o),n+i*Math.sin(o)]),d.push([t+r*Math.cos(o),n+i*Math.sin(o)]),lh(d,null,l)}function tve(e,t,n,r,i,a,o,s){let l=[],u=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],d=[0,0],f=s.disableMultiStroke?1:2,p=s.preserveVertices;for(let m=0;m<f;m++)m===0?l.push({op:`move`,data:[o[0],o[1]]}):l.push({op:`move`,data:[o[0]+(p?0:ah(u[0],s)),o[1]+(p?0:ah(u[0],s))]}),d=p?[i,a]:[i+ah(u[m],s),a+ah(u[m],s)],l.push({op:`bcurveTo`,data:[e+ah(u[m],s),t+ah(u[m],s),n+ah(u[m],s),r+ah(u[m],s),d[0],d[1]]});return l}function uh(e){return[...e]}function nve(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(uh(e[0]),uh(e[1]),uh(e[2]),uh(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(uh(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function dh(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function rve(e,t,n){let r=dh(t,n);if(r===0)return dh(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),dh(e,fh(t,n,i))}function fh(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function ph(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let l=3*i[0]-2*a[0]-n[0];l*=l;let u=3*i[1]-2*a[1]-n[1];return u*=u,o<l&&(o=l),s<u&&(s=u),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(dh(a,o))>1&&i.push(n)):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],l=e[t+3],u=fh(a,o,r),d=fh(o,s,r),f=fh(s,l,r),p=fh(u,d,r),m=fh(d,f,r),h=fh(p,m,r);ph([a,u,p,h],0,n,i),ph([h,m,f,l],0,n,i)}var a,o;return i}function ive(e,t){return mh(e,0,e.length,t)}function mh(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],l=0,u=1;for(let r=t+1;r<n-1;++r){let t=rve(e[r],o,s);t>l&&(l=t,u=r)}return Math.sqrt(l)>r?(mh(e,t,u+1,r,a),mh(e,u,n,r,a)):(a.length||a.push(o),a.push(s)),a}function hh(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)ph(e,3*n,t,r);return n&&n>0?mh(r,0,r.length,n):r}var gh,ave,ove,sve,cve,lve,_h,uve,dve,vh,yh,bh,fve,xh,Sh,pve,Ch,mve,wh,Th=o((()=>{gh=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=Ym(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}},ave=class extends gh{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=Ym(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)Xm([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},ove=class extends gh{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},sve=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=Ym(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=Xm(o),s=e/r,l=Math.ceil(s)-1,u=e-l*r,d=(o[0][0]+o[1][0])/2-r/4,f=Math.min(o[0][1],o[1][1]);for(let e=0;e<l;e++){let o=f+u+e*r,s=d-a+2*Math.random()*a,l=o-a+2*Math.random()*a,p=this.helper.ellipse(s,l,i,i,t);n.push(...p.ops)}}return{type:`fillSketch`,ops:n}}},cve=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=Ym(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=Xm(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,l=e[0],u=e[1];l[0]>u[0]&&(l=e[1],u=e[0]);let d=Math.atan((u[1]-l[1])/(u[0]-l[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,u=[l[0]+a*Math.cos(d)+s*Math.cos(d),l[1]+a*Math.sin(d)+s*Math.sin(d)],f=[l[0]+o*Math.cos(d)+s*Math.cos(d),l[1]+o*Math.sin(d)+s*Math.sin(d)];i.push(...this.helper.doubleLineOps(u[0],u[1],f[0],f[1],t))}})),i}},lve=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=Ym(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=Xm(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let l=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),u=[o[0]+i*Math.cos(l),o[1]+i*Math.sin(l)],d=[o[0]+a*Math.cos(l),o[1]+a*Math.sin(l)],f=[u[0]+s*Math.cos(l+Math.PI/4),u[1]+s*Math.sin(l+Math.PI/4)];r.push(...this.helper.doubleLineOps(u[0],u[1],f[0],f[1],n),...this.helper.doubleLineOps(f[0],f[1],d[0],d[1],n))}})),r}},_h={},uve=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},dve=0,vh=1,yh=2,bh={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0},fve={randOffset:function(e,t){return ah(e,t)},randOffsetWithRange:function(e,t,n){return ih(e,t,n)},ellipse:function(e,t,n,r,i){return th(e,t,i,J_e(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return oh(e,t,n,r,i,!0)}},xh=`none`,Sh=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[G_e(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=K_e(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(nh([i],a)):o.push(rh([i],a))}return a.stroke!==xh&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=J_e(n,r,a),l=th(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=th(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(rh([l.estimatedPoints],a))}return a.stroke!==xh&&o.push(l.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[eh(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let l=this._o(s),u=[],d=Y_e(e,t,n,r,i,a,o,!0,l);if(o&&l.fill){if(l.fillStyle===`solid`){let o=Object.assign({},l);o.disableMultiStroke=!0;let s=Y_e(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,u.push(s)}else u.push(function(e,t,n,r,i,a,o){let s=e,l=t,u=Math.abs(n/2),d=Math.abs(r/2);u+=ah(.01*u,o),d+=ah(.01*d,o);let f=i,p=a;for(;f<0;)f+=2*Math.PI,p+=2*Math.PI;p-f>2*Math.PI&&(f=0,p=2*Math.PI);let m=(p-f)/o.curveStepCount,h=[];for(let e=f;e<=p;e+=m)h.push([s+u*Math.cos(e),l+d*Math.sin(e)]);return h.push([s+u*Math.cos(p),l+d*Math.sin(p)]),h.push([s,l]),rh([h],o)}(e,t,n,r,i,a,l))}return l.stroke!==xh&&u.push(d),this._d(`arc`,u,l)}curve(e,t){let n=this._o(t),r=[],i=q_e(e,n);if(n.fill&&n.fill!==xh){if(n.fillStyle===`solid`){let t=q_e(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...hh(nve([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...hh(nve(r),10,(1+n.roughness)/2))}t.length&&r.push(rh([t],n))}}return n.stroke!==xh&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=eh(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(nh([e],n)):r.push(rh([e],n))),n.stroke!==xh&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==xh,a=n.stroke!==xh,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=U_e(H_e(Qm(e))),i=[],a=[],o=[0,0],s=[],l=()=>{s.length>=4&&a.push(...hh(s,t)),s=[]},u=()=>{l(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:u(),o=[t[0],t[1]],a.push(o);break;case`L`:l(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:l(),a.push([o[0],o[1]])}if(u(),!n)return i;let d=[];for(let e of i){let t=ive(e,n);t.length&&d.push(t)}return d}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),l=X_e(e,n);if(i){if(n.fillStyle===`solid`){if(s.length===1){let t=X_e(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(nh(s,n))}else r.push(rh(s,n))}return a&&(o?s.forEach((e=>{r.push(eh(e,!1,n))})):r.push(l)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:xh};break;case`fillPath`:t={d:this.opsToPath(e),stroke:xh,strokeWidth:0,fill:n.fill||xh};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||xh,strokeWidth:n,fill:xh}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},pve=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Sh(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let l=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(l),l}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},Ch=`http://www.w3.org/2000/svg`,mve=class{constructor(e,t){this.svg=e,this.gen=new Sh(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(Ch,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(Ch,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(Ch,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(Ch,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let l=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(l)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},wh={canvas:(e,t)=>new pve(e,t),svg:(e,t)=>new mve(e,t),generator:e=>new Sh(e),newSeed:()=>Sh.newSeed()}}));async function Eh(e){let t=e.getElementsByTagName(`img`);if(!t||t.length===0)return;let n=!Dh(e);await Promise.all([...t].map(e=>new Promise(t=>{function r(){if(e.style.display=`flex`,e.style.flexDirection=`column`,n){let t=Z().fontSize?Z().fontSize:window.getComputedStyle(document.body).fontSize,[n=Ho.fontSize]=Hp(t),r=n*5+`px`;e.style.minWidth=r,e.style.maxWidth=r}else e.style.width=`100%`;t(e)}p(r,`setupImage`),setTimeout(()=>{e.complete&&r()}),e.addEventListener(`error`,r),e.addEventListener(`load`,r)})))}function Dh(e){return e.nodeType===Hye?e.textContent?.trim()!==``:e.nodeType!==Vye||e.tagName.toLowerCase()===`img`?!1:[...e.childNodes].some(Dh)}function Oh(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}function kh(e,t,n,r,i,a){let o=[],s=n-e,l=r-t,u=s/a,d=2*Math.PI/u,f=t+l/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=f+i*Math.sin(d*(n-e));o.push({x:n,y:r})}return o}function Ah(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*l,a=e+n*Math.cos(r),u=t+n*Math.sin(r);o.push({x:-a,y:-u})}return o}function jh(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=p((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return s.appendChild(n),s}function hve(e,t){return e.intersect(t)}function gve(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,l=Math.sqrt(t*t*s*s+n*n*o*o),u=Math.abs(t*n*o/l);r.x<i&&(u=-u);var d=Math.abs(t*n*s/l);return r.y<a&&(d=-d),{x:i+u,y:a+d}}function _ve(e,t,n){return $h(e,t,t,n)}function vve(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,l=i*r.x+a*r.y+o,u=1e-6;if(s!==0&&l!==0&&Mh(s,l))return;let d=r.y-n.y,f=n.x-r.x,p=r.x*n.y-n.x*r.y,m=d*e.x+f*e.y+p,h=d*t.x+f*t.y+p;if(Math.abs(m)<u&&Math.abs(h)<u&&Mh(m,h))return;let g=i*f-d*a;if(g===0)return;let _=Math.abs(g/2),v=a*p-f*o,y=v<0?(v-_)/g:(v+_)/g;return v=d*o-i*p,{x:y,y:v<0?(v-_)/g:(v+_)/g}}}function Mh(e,t){return e*t>0}function yve(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let l=r-e.width/2-o,u=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=qye(e,n,{x:l+i.x,y:u+i.y},{x:l+o.x,y:u+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,l=Math.sqrt(o*o+s*s);return a<l?-1:a===l?0:1}),a[0]):e}function bve(e,t){let{labelStyles:n}=bf(t);t.labelStyle=n;let r=Yh(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=wh.svg(a),l=xf(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=s.circle(0,0,2,l),d=a.insert(()=>u,`:first-child`);return d.attr(`class`,`anchor`).attr(`style`,Mp(o)),Jh(t,d),t.intersect=function(e){return y.info(`Circle intersect`,t,1,e),eg.circle(t,1,e)},a}function Nh(e,t,n,r,i,a,o){let s=(e+n)/2,l=(t+r)/2,u=Math.atan2(r-t,n-e),d=(n-e)/2,f=(r-t)/2,p=d/i,m=f/a,h=Math.sqrt(p**2+m**2);if(h>1)throw Error(`The given radii are too small to create an arc between the points.`);let g=Math.sqrt(1-h**2),_=s+g*a*Math.sin(u)*(o?-1:1),v=l-g*i*Math.cos(u)*(o?-1:1),y=Math.atan2((t-v)/a,(e-_)/i),b=Math.atan2((r-v)/a,(n-_)/i)-y;o&&b<0&&(b+=2*Math.PI),!o&&b>0&&(b-=2*Math.PI);let x=[];for(let e=0;e<20;e++){let t=y+e/19*b,n=_+i*Math.cos(t),r=v+a*Math.sin(t);x.push({x:n,y:r})}return x}function xve(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}async function Sve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=p(e=>e+o,`calcTotalHeight`),l=p(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await Kh(e,t,Yh(t)),f=s(t?.height?t?.height:d.height),[m,h]=l(f),g=xve(f,m,h),_=(t?.width?t?.width:d.width)+a*2+g-g,v=f,{cssStyles:y}=t,b=[{x:_/2,y:-v/2},{x:-_/2,y:-v/2},...Nh(-_/2,-v/2,-_/2,v/2,m,h,!1),{x:_/2,y:v/2},...Nh(_/2,v/2,_/2,-v/2,m,h,!0)],x=wh.svg(u),S=xf(t,{});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=Oh(b),w=x.path(C,S),T=u.insert(()=>w,`:first-child`);return T.attr(`class`,`basic label-container outer-path`),y&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,y),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${m/2}, 0)`),Jh(t,T),t.intersect=function(e){return eg.polygon(t,b,e)},u}async function Cve(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await Kh(e,t,Yh(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,80),f=Math.max(Math.min(d*.08,12),5),m=Math.max(o.height+u*2+f,t.height??0),h=-m/2+f,g=m/2,_=d*.72,v=[`M${-d/2},${h}`,`L${-_/2},${g}`,`A${_/2},${f} 0 0 0 ${_/2},${g}`,`L${d/2},${h}`,`A${d/2},${f} 0 0 0 ${-d/2},${h}`,`Z`].join(` `),{cssStyles:y}=t,b=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=wh.svg(a).path(v,xf(t,{}));b.node()?.appendChild(e),y&&b.attr(`style`,y)}else b.append(`path`).attr(`d`,v).attr(`style`,i);b.append(`ellipse`).attr(`cx`,0).attr(`cy`,h).attr(`rx`,d/2).attr(`ry`,f).attr(`style`,`fill:none;stroke:${l};stroke-width:1px`),Jh(t,b);let x=h+(g-h)/2;s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${x-o.height/2-(o.y-(o.top??0))})`);let S=p((e,t,n)=>Array.from({length:13},(r,i)=>{let a=Math.PI-i*Math.PI/12;return{x:e*Math.cos(a),y:t+n*f*Math.sin(a)}}),`arc`),C=[...S(d/2,h,-1),...S(_/2,g,1).reverse()];return t.intersect=function(e){return eg.polygon(t,C,e)},a}async function wve(e,t){let{themeVariables:n}=Z(),r=n.clusterBkg,i=n.clusterBorder,{nodeStyles:a}=bf(t),{shapeSvg:o,bbox:s}=await Kh(e,t,Yh(t)),l=t.padding??8,u=s.height,d=Math.max(s.width+l*2,Jye,t?.width??0),f=Math.max(u+ng+tg+l*2,t?.height??0),p=-d/2,m=-f/2,h=-(ng+tg)/2,g=o.select(`.label`);g&&(t.useHtmlLabels??os(Z())?g.attr(`transform`,`translate(${-s.width/2}, ${-s.height/2+h})`):g.attr(`transform`,`translate(0, ${-s.height/2+h})`));let _;if(t.look===`handDrawn`){let e=wh.svg(o),n=xf(t,{fill:r,stroke:i,fillStyle:`solid`}),a=e.path(Zh(p,m,d,f,rg),n);_=o.insert(()=>a,`:first-child`),_.attr(`class`,`basic label-container collapsed-group`).attr(`style`,Mp(t.cssStyles))}else _=o.insert(`rect`,`:first-child`),_.attr(`class`,`basic label-container collapsed-group`).attr(`style`,a).attr(`rx`,rg).attr(`ry`,rg).attr(`x`,p).attr(`y`,m).attr(`width`,d).attr(`height`,f).attr(`fill`,r).attr(`stroke`,i);let v=m+l+u+ng;o.append(`line`).attr(`class`,`collapsed-separator`).attr(`x1`,p+8).attr(`y1`,v).attr(`x2`,p+d-8).attr(`y2`,v).attr(`stroke`,i).attr(`stroke-dasharray`,`3, 3`);let y=v+tg/2;for(let e=-1;e<=1;e++)o.append(`circle`).attr(`class`,`collapsed-indicator`).attr(`cx`,e*10).attr(`cy`,y).attr(`r`,2.5).attr(`fill`,i);return Jh(t,_),t.calcIntersect=function(e,t){return eg.rect(e,t)},t.intersect=function(e){return eg.rect(t,e)},o}function Ph(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}async function Tve(e,t){let n=t,{shapeSvg:r,bbox:i}=await Kh(e,n,Yh(n)),a=n.padding??0,o=i.height+2*a,s=o/2,l=i.width+2*s+a,u=n.width??0,d=n.positioned&&(n.widthInColumns??1)>1&&u>l?u:l,f=Qye(n.directions??[],i,n,d),p=Ph(r,d,o,f);return p.attr(`style`,n.style??null),Jh(n,p),n.intersect=function(e){return eg.polygon(n,f,e)},r}async function Eve(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await Kh(e,t,Yh(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,90),f=Math.max(o.height+u*2+18,t.height??0),p=-f/2,{cssStyles:m}=t,h=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=wh.svg(a).path(Zh(-d/2,p,d,f,12),xf(t,{}));h.node()?.appendChild(e),m&&h.attr(`style`,m)}else h.append(`rect`).attr(`x`,-d/2).attr(`y`,p).attr(`width`,d).attr(`height`,f).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);h.append(`line`).attr(`x1`,-d/2).attr(`y1`,p+18).attr(`x2`,d/2).attr(`y2`,p+18).attr(`style`,`stroke:${l};stroke-width:1px`);for(let e=0;e<3;e++)h.append(`circle`).attr(`cx`,-d/2+12+e*9).attr(`cy`,p+9).attr(`r`,2.5).attr(`style`,`fill:${l};stroke:none`);h.append(`rect`).attr(`class`,`browser-address-bar`).attr(`x`,-d/2+44).attr(`y`,p+4).attr(`width`,Math.max(d-56,10)).attr(`height`,10).attr(`rx`,3).attr(`ry`,3).attr(`style`,`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Jh(t,h);let g=p+18+(f-18)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${g-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return eg.rect(t,e)},a}async function Dve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=(t?.width??l.width)+(t.look===`neo`?a*2:a+og),d=(t?.height??l.height)+(t.look===`neo`?o*2:o),f=u,p=-d,m=[{x:0+og,y:p},{x:f,y:p},{x:f,y:0},{x:0,y:0},{x:0,y:p+og},{x:0+og,y:p}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{}),r=Oh(m),i=e.path(r,n);h=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${d/2})`),g&&h.attr(`style`,g)}else h=Ph(s,u,d,m);return r&&h.attr(`style`,r),Jh(t,h),t.intersect=function(e){return eg.polygon(t,m,e)},s}function Ove(e,t){let{nodeStyles:n}=bf(t);t.label=``;let r=e.insert(`g`).attr(`class`,Yh(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=wh.svg(r),l=xf(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=Oh(o),d=s.path(u,l),f=r.insert(()=>d,`:first-child`);return i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return eg.polygon(t,o,e)},r}async function Fh(e,t,n){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await Kh(e,t,Yh(t)),l=n?.padding??s,u=t.look===`neo`?o.width/2+32:o.width/2+l,d,{cssStyles:f}=t;if(t.look===`handDrawn`){let e=wh.svg(a),n=xf(t,{}),r=e.circle(0,0,u*2,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,Mp(f))}else d=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,u).attr(`cx`,0).attr(`cy`,0);return Jh(t,d),t.calcIntersect=function(e,t){let n=e.width/2;return eg.circle(e,n,t)},t.intersect=function(e){return y.info(`Circle intersect`,t,u,e),eg.circle(t,u,e)},a}async function kve(e,t){let n=t,{shapeSvg:r,bbox:i,halfPadding:a}=await Kh(e,n,[`node`,n.cssClasses,n.class].filter(Boolean).join(` `)),o=r.insert(`rect`,`:first-child`),s=n.padding??0,l=n.positioned?n.width??0:i.width+s,u=n.positioned?n.height??0:i.height+s,d=n.positioned?-l/2:-i.width/2-a,f=n.positioned?-u/2:-i.height/2-a;return o.attr(`class`,`basic cluster composite label-container`).attr(`style`,n.style??null).attr(`rx`,n.rx??null).attr(`ry`,n.ry??null).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u),Jh(n,o),n.intersect=function(e){return eg.rect(n,e)},r}async function Ave(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,label:s}=await Kh(e,t,Yh(t)),l=n?.nodeBorder??n?.lineColor??`currentColor`,u=t.padding??12,d=Math.max(o.width+u*2,t.width??0,90),f=Math.max(o.height+u*2+20,t.height??0),p=-f/2,{cssStyles:m}=t,h=a.insert(`g`,`:first-child`).attr(`class`,`basic label-container`);if(t.look===`handDrawn`){let e=wh.svg(a).path(Zh(-d/2,p,d,f,12),xf(t,{}));h.node()?.appendChild(e),m&&h.attr(`style`,m)}else h.append(`rect`).attr(`x`,-d/2).attr(`y`,p).attr(`width`,d).attr(`height`,f).attr(`rx`,12).attr(`ry`,12).attr(`style`,i);h.append(`text`).attr(`x`,-d/2+12).attr(`y`,p+16).attr(`class`,`console-glyph`).attr(`style`,`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(`>_`),Jh(t,h);let g=p+20+(f-20)/2;return s.attr(`transform`,`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${g-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(e){return eg.rect(t,e)},a}function jve(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}456- M ${i.x},${i.y} L ${o.x},${o.y}`}function Mve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,Yh(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=wh.svg(i),l=xf(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=s.circle(0,0,a*2,l),d=jve(a),f=s.path(d,l),p=i.insert(()=>u,`:first-child`);return p.insert(()=>f),p.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),Jh(t,p),t.intersect=function(e){return y.info(`crossedCircle intersect`,t,{radius:a,point:e}),eg.circle(t,a,e)},i}function Ih(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*l,a=e+n*Math.cos(r),u=t+n*Math.sin(r);o.push({x:-a,y:-u})}return o}async function Nve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=t.look===`neo`?18:t.padding??0,l=t.look===`neo`?12:t.padding??0,u=a.width+s,d=a.height+l,f=Math.max(5,d*.1),{cssStyles:p}=t,m=[...Ih(u/2,-d/2,f,30,-90,0),{x:-u/2-f,y:f},...Ih(u/2+f*2,-f,f,20,-180,-270),...Ih(u/2+f*2,f,f,20,-90,-180),{x:-u/2-f,y:-d/2},...Ih(u/2,d/2,f,20,0,90)],h=[{x:u/2,y:-d/2-f},{x:-u/2,y:-d/2-f},...Ih(u/2,-d/2,f,20,-90,0),{x:-u/2-f,y:-f},...Ih(u/2+u*.1,-f,f,20,-180,-270),...Ih(u/2+u*.1,f,f,20,-90,-180),{x:-u/2-f,y:d/2},...Ih(u/2,d/2,f,20,0,90),{x:-u/2,y:d/2+f},{x:u/2,y:d/2+f}],g=wh.svg(i),_=xf(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Oh(m).replace(`Z`,``),y=g.path(v,_),b=Oh(h),x=g.path(b,{..._}),S=i.insert(`g`,`:first-child`);return S.insert(()=>x,`:first-child`).attr(`stroke-opacity`,0),S.insert(()=>y,`:first-child`),S.attr(`class`,`text`),p&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${f}, 0)`),o.attr(`transform`,`translate(${-u/2+f-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Jh(t,S),t.intersect=function(e){return eg.polygon(t,h,e)},i}function Lh(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*l,a=e+n*Math.cos(r),u=t+n*Math.sin(r);o.push({x:a,y:u})}return o}async function Pve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=t.look===`neo`?18:t.padding??0,l=t.look===`neo`?12:t.padding??0,u=a.width+(t.look===`neo`?s*2:s),d=a.height+(t.look===`neo`?l*2:l),f=Math.max(5,d*.1),{cssStyles:p}=t,m=[...Lh(u/2,-d/2,f,20,-90,0),{x:u/2+f,y:-f},...Lh(u/2+f*2,-f,f,20,-180,-270),...Lh(u/2+f*2,f,f,20,-90,-180),{x:u/2+f,y:d/2},...Lh(u/2,d/2,f,20,0,90)],h=[{x:-u/2,y:-d/2-f},{x:u/2,y:-d/2-f},...Lh(u/2,-d/2,f,20,-90,0),{x:u/2+f,y:-f},...Lh(u/2+f*2,-f,f,20,-180,-270),...Lh(u/2+f*2,f,f,20,-90,-180),{x:u/2+f,y:d/2},...Lh(u/2,d/2,f,20,0,90),{x:u/2,y:d/2+f},{x:-u/2,y:d/2+f}],g=wh.svg(i),_=xf(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Oh(m).replace(`Z`,``),y=g.path(v,_),b=Oh(h),x=g.path(b,{..._}),S=i.insert(`g`,`:first-child`);return S.insert(()=>x,`:first-child`).attr(`stroke-opacity`,0),S.insert(()=>y,`:first-child`),S.attr(`class`,`text`),p&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-f}, 0)`),o.attr(`transform`,`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Jh(t,S),t.intersect=function(e){return eg.polygon(t,h,e)},i}function Rh(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,l=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*l,a=e+n*Math.cos(r),u=t+n*Math.sin(r);o.push({x:-a,y:-u})}return o}async function Fve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=t.look===`neo`?18:t.padding??0,l=t.look===`neo`?12:t.padding??0,u=a.width+(t.look===`neo`?s*2:s),d=a.height+(t.look===`neo`?l*2:l),f=Math.max(5,d*.1),{cssStyles:p}=t,m=[...Rh(u/2,-d/2,f,30,-90,0),{x:-u/2-f,y:f},...Rh(u/2+f*2,-f,f,20,-180,-270),...Rh(u/2+f*2,f,f,20,-90,-180),{x:-u/2-f,y:-d/2},...Rh(u/2,d/2,f,20,0,90)],h=[...Rh(-u/2+f+f/2,-d/2,f,20,-90,-180),{x:u/2-f/2,y:f},...Rh(-u/2-f/2,-f,f,20,0,90),...Rh(-u/2-f/2,f,f,20,-90,0),{x:u/2-f/2,y:-f},...Rh(-u/2+f+f/2,d/2,f,30,-180,-270)],g=[{x:u/2,y:-d/2-f},{x:-u/2,y:-d/2-f},...Rh(u/2,-d/2,f,20,-90,0),{x:-u/2-f,y:-f},...Rh(u/2+f*2,-f,f,20,-180,-270),...Rh(u/2+f*2,f,f,20,-90,-180),{x:-u/2-f,y:d/2},...Rh(u/2,d/2,f,20,0,90),{x:-u/2,y:d/2+f},{x:u/2-f-f/2,y:d/2+f},...Rh(-u/2+f+f/2,-d/2,f,20,-90,-180),{x:u/2-f/2,y:f},...Rh(-u/2-f/2,-f,f,20,0,90),...Rh(-u/2-f/2,f,f,20,-90,0),{x:u/2-f/2,y:-f},...Rh(-u/2+f+f/2,d/2,f,30,-180,-270)],_=wh.svg(i),v=xf(t,{fill:`none`});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=Oh(m).replace(`Z`,``),b=_.path(y,v),x=Oh(h).replace(`Z`,``),S=_.path(x,v),C=Oh(g),w=_.path(C,{...v}),T=i.insert(`g`,`:first-child`);return T.insert(()=>w,`:first-child`).attr(`stroke-opacity`,0),T.insert(()=>b,`:first-child`),T.insert(()=>S,`:first-child`),T.attr(`class`,`text`),p&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(${f-f/4}, 0)`),o.attr(`transform`,`translate(${-u/2+(t.padding??0)/2-(a.x-(a.left??0))},${-d/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Jh(t,T),t.intersect=function(e){return eg.polygon(t,g,e)},i}async function Ive(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=Math.max(20,(l.width+a*2)*1.25,t?.width??0),d=Math.max(5,l.height+o*2,t?.height??0),f=d/2,{cssStyles:p}=t,m=wh.svg(s),h=xf(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=u,_=d,v=g-f,y=_/4,b=[{x:v,y:0},{x:y,y:0},{x:0,y:_/2},{x:y,y:_},{x:v,y:_},...Ah(-v,-_/2,f,50,270,90)],x=Oh(b),S=m.path(x,h),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-u/2}, ${-d/2})`),Jh(t,C),t.intersect=function(e){return eg.polygon(t,b,e)},s}async function Lve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=t.padding??20,l=Math.max(a.width+s*2,t.width??0,100),u=Math.min(Math.max(l*.23,16),56),d=u*.27,f=Math.max(a.height+s*2,t.height?t.height-(2*u-d):0),p=Math.min(l*.177,f*.45),m=f+2*u-d,h=-m/2,g=h+2*u-d,_=i.insert(`g`,`:first-child`).attr(`class`,`basic label-container`),{cssStyles:v}=t;if(t.look===`handDrawn`){let e=wh.svg(i),n=xf(t,{}),r=e.path(Zh(-l/2,g,l,f,p),n),a=e.circle(0,h+u,u*2,n);_.insert(()=>a,`:first-child`),_.insert(()=>r,`:first-child`),v&&_.attr(`style`,v)}else _.append(`rect`).attr(`x`,-l/2).attr(`y`,g).attr(`width`,l).attr(`height`,f).attr(`rx`,p).attr(`ry`,p).attr(`style`,r),_.append(`circle`).attr(`cx`,0).attr(`cy`,h+u).attr(`r`,u).attr(`style`,r);Jh(t,_);let y=g+f/2;o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`);let b=h+u,x=Math.asin(Math.min(1,(g-b)/u))*180/Math.PI,S=[...Ah(0,-b,u,24,180+x,-x),...Ah(-(-l/2+p),-(g+p),p,12,90,0),...Ah(-(-l/2+p),-(m/2-p),p,12,360,270),...Ah(-(l/2-p),-(m/2-p),p,12,270,180),...Ah(-(l/2-p),-(g+p),p,12,180,90)];return t.intersect=function(e){return eg.polygon(t,S,e)},i}async function Rve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i,s=t.width??0;if(t.width&&(t.width-=o,t.width<cg&&(t.width=cg)),t.height){let e=s/2/(2.5+s/50);t.height=t.height-a-e*3,t.height<sg&&(t.height=sg)}let{shapeSvg:l,bbox:u,label:d}=await Kh(e,t,Yh(t)),f=Math.max(t.width??0,u.width)+o,p=f/2,m=p/(2.5+f/50),h=Math.max(t.height??0,u.height)+a+m,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=wh.svg(l),n=ebe(0,0,f,h,p,m),r=tbe(0,m,f,h,p,m),i=xf(t,{}),a=e.path(n,i),o=e.path(r,xf(t,{fill:`none`}));g=l.insert(()=>o,`:first-child`),g=l.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=$ye(0,0,f,h,p,m);g=l.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,Mp(_)).attr(`style`,r)}return g.attr(`label-offset-y`,m),g.attr(`transform`,`translate(${-f/2}, ${-(h/2+m)})`),Jh(t,g),d.attr(`transform`,`translate(${-(u.width/2)-(u.x-(u.left??0))}, ${-(u.height/2)+(t.padding??0)/1.5-(u.y-(u.top??0))})`),t.intersect=function(e){let n=eg.rect(t,e),r=n.x-(t.x??0);if(p!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-m)){let i=m*m*(1-r*r/(p*p));i>0&&(i=Math.sqrt(i)),i=m-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},l}async function zh(e,t,n){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await Kh(e,t,Yh(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),l=Math.max(o.height+n.labelPaddingY*2,t?.height||0),u=-s/2,d=-l/2,f,{rx:p,ry:m}=t,{cssStyles:h}=t;if(n?.rx&&n.ry&&(p=n.rx,m=n.ry),t.look===`handDrawn`){let e=wh.svg(a),n=xf(t,{}),r=p||m?e.path(Zh(u,d,s,l,p||0),n):e.rectangle(u,d,s,l,n);f=a.insert(()=>r,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,Mp(h))}else f=a.insert(`rect`,`:first-child`),f.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,Mp(p)).attr(`ry`,Mp(m)).attr(`x`,u).attr(`y`,d).attr(`width`,s).attr(`height`,l);return Jh(t,f,t.look===`handDrawn`?void 0:{width:s,height:l}),t.calcIntersect=function(e,t){return eg.rect(e,t)},t.intersect=function(e){return eg.rect(t,e)},a}async function zve(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,l=await zh(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=wh.svg(l),n=xf(t,{}),r=l.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return l;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return l;return l.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),l.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),l}let u=l.select(`.basic.label-container`),d=(Number(u.attr(`width`))||o)??0,f=(Number(u.attr(`height`))||s)??0;return d>0&&f>0&&u.attr(`stroke-dasharray`,`${d} ${f}`),l}async function Bve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:l}=await Kh(e,t,Yh(t)),u=s.width+i,d=s.height+a,f=d*.2,p=-u/2,m=-d/2-f/2,{cssStyles:h}=t,g=wh.svg(o),_=xf(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),l.attr(`transform`,`translate(${p+(t.padding??0)/2-(s.x-(s.left??0))}, ${m+f+(t.padding??0)/2-(s.y-(s.top??0))})`),Jh(t,b),t.intersect=function(e){return eg.rect(t,e)},o}async function Vve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=(t?.width?t?.width/2:l.width/2)+(o??0),d=u-i,f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{roughness:.2,strokeWidth:2.5}),r=xf(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,u*2,n),a=e.circle(0,0,d*2,r);f=s.insert(`g`,`:first-child`),f.attr(`class`,Mp(t.cssClasses)).attr(`style`,Mp(p)),f.node()?.appendChild(i),f.node()?.appendChild(a)}else{f=s.insert(`g`,`:first-child`);let e=f.insert(`circle`,`:first-child`),t=f.insert(`circle`);f.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,d).attr(`cx`,0).attr(`cy`,0)}return Jh(t,f),t.intersect=function(e){return y.info(`DoubleCircle intersect`,t,u,e),eg.circle(t,u,e)},s}function Hve(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=bf(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,Yh(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=wh.svg(a),{nodeBorder:l}=n,u=xf(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(u.roughness=0);let d=s.circle(0,0,14,u),f=a.insert(()=>d,`:first-child`);return f.selectAll(`path`).attr(`style`,`fill: ${l} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&f.selectAll(`path`).attr(`style`,i),Jh(t,f),t.intersect=function(e){return y.info(`filledCircle intersect`,t,{radius:7,point:e}),eg.circle(t,7,e)},a}async function Uve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<lg&&(t.height=lg),t.width=(t?.width??0)-a-a/2,t.width<ug&&(t.width=ug));let{shapeSvg:o,bbox:s,label:l}=await Kh(e,t,Yh(t)),u=(t?.width?t?.width:s.width)+(a??0),d=t?.height?t?.height:u+s.height,f=d,p=[{x:0,y:-d},{x:f,y:-d},{x:f/2,y:0}],{cssStyles:m}=t,h=wh.svg(o),g=xf(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Oh(p),v=h.path(_,g),b=o.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,Jh(t,b),l.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-d/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return y.info(`Triangle intersect`,t,p,e),eg.polygon(t,p,e)},o}async function Wve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=t.padding??12,l=Math.max(a.width+s*2,t.width??0,90),u=a.height+s*2,d=Math.max(Math.min(u*.16,14),8),f=Math.max(u+d,t.height??0),p=f-d,m=Math.max(l*.38,28),h=-f/2,g=[{x:-l/2,y:h},{x:-l/2+m,y:h},{x:-l/2+m,y:h+d},{x:l/2,y:h+d},{x:l/2,y:f/2},{x:-l/2,y:f/2}],_=[`M${g[0].x},${g[0].y}`,...g.slice(1).map(e=>`L${e.x},${e.y}`),`Z`].join(` `),{cssStyles:v}=t,y;if(t.look===`handDrawn`){let e=wh.svg(i).path(_,xf(t,{}));y=i.insert(()=>e,`:first-child`).attr(`class`,`basic label-container`),v&&y.attr(`style`,v)}else y=i.insert(`path`,`:first-child`).attr(`d`,_).attr(`class`,`basic label-container`).attr(`style`,r);t.look===`handDrawn`?Jh(t,y):Jh(t,y,{width:l,height:f});let b=h+d+p/2;return o.attr(`transform`,`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(e){return eg.polygon(t,g,e)},i}function Gve(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=bf(t);t.label=``;let o=e.insert(`g`).attr(`class`,Yh(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,l=Math.max(70,t?.width??0),u=Math.max(10,t?.height??0);n===`LR`&&(l=Math.max(10,t?.width??0),u=Math.max(70,t?.height??0));let d=-1*l/2,f=-1*u/2,p=wh.svg(o),m=xf(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(d,f,l,u,m),g=o.insert(()=>h,`:first-child`);s&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,a),Jh(t,g);let _=r?.padding??0;return t.width&&t.height&&(t.width+=_/2||0,t.height+=_/2||0),t.intersect=function(e){return eg.rect(t,e)},o}async function Kve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await Kh(e,t,Yh(t)),l=(t?.width?t?.width:Math.max(15,s.width))+i*2,u=(t?.height?t?.height:Math.max(10,s.height))+a*2,d=u/2,{cssStyles:f}=t,p=wh.svg(o),m=xf(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-l/2,y:-u/2},{x:l/2-d,y:-u/2},...Ah(-l/2+d,0,d,50,90,270),{x:l/2-d,y:u/2},{x:-l/2,y:u/2}],g=Oh(h),_=p.path(g,m),v=o.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Jh(t,v),t.intersect=function(e){return y.info(`Pill intersect`,t,{radius:d,point:e}),eg.polygon(t,h,e)},o}async function qve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:l,bbox:u}=await Kh(e,t,Yh(t)),d=(t?.height?t?.height:u.height)+o,f=d/i,p=(t?.width?t?.width:u.width)+2*f+s,m=[{x:f,y:0},{x:p-f,y:0},{x:p,y:-d/2},{x:p-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}],h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=wh.svg(l),n=xf(t,{}),r=nbe(0,0,p,d,f),i=e.path(r,n);h=l.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-p/2}, ${d/2})`),g&&h.attr(`style`,g)}else h=Ph(l,p,d,m);return r&&h.attr(`style`,r),t.width=p,t.height=d,Jh(t,h),t.intersect=function(e){return eg.polygon(t,m,e)},l}async function Jve(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await Kh(e,t,Yh(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,l=wh.svg(i),u=xf(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],f=Oh(d),p=l.path(f,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-a/2}, ${-o/2})`),Jh(t,m),t.intersect=function(e){return y.info(`Pill intersect`,t,{points:d}),eg.polygon(t,d,e)},i}async function Yve(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=bf(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r?.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,label:f}=await Kh(e,t,`icon-shape default`),p=t.pos===`t`,m=s,h=s,{nodeBorder:g}=n,{stylesMap:_}=vf(t),v=-h/2,b=-m/2,x=t.label?8:0,S=wh.svg(u),C=xf(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=S.rectangle(v,b,h,m,C),T=Math.max(h,d.width),E=m+d.height+x,D=S.rectangle(-T/2,-E/2,T,E,{...C,fill:`transparent`,stroke:`none`}),O=u.insert(()=>w,`:first-child`),k=u.insert(()=>D);if(t.icon){let e=u.append(`g`);e.html(`<g>${await Nf(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?d.height/2+x/2-i/2-o:-d.height/2-x/2-i/2-o})`),e.attr(`style`,`color: ${_.get(`stroke`)??g};`)}return f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${p?-E/2:E/2-d.height})`),O.attr(`transform`,`translate(0,${p?d.height/2+x/2:-d.height/2-x/2})`),Jh(t,k),t.intersect=function(e){if(y.info(`iconSquare intersect`,t,e),!t.label)return eg.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+x},{x:n+h/2,y:r-i/2+d.height+x},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+d.height+x},{x:n-d.width/2,y:r-i/2+d.height+x}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+d.width/2,y:r-i/2+m},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],eg.polygon(t,a,e)},u}async function Xve(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=bf(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r?.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,label:f}=await Kh(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:g}=n,{stylesMap:_}=vf(t),v=wh.svg(u),b=xf(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`),b.stroke=_.get(`fill`)??g;let x=u.append(`g`);t.icon&&x.html(`<g>${await Nf(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let S=x.node().getBBox(),C=S.width,w=S.height,T=S.x,E=S.y,D=Math.max(C,w)*Math.SQRT2+40,O=v.circle(0,0,D,b),k=Math.max(D,d.width),A=D+d.height+p,j=v.rectangle(-k/2,-A/2,k,A,{...b,fill:`transparent`,stroke:`none`}),M=u.insert(()=>O,`:first-child`),N=u.insert(()=>j);return x.attr(`transform`,`translate(${-C/2-T},${m?d.height/2+p/2-w/2-E:-d.height/2-p/2-w/2-E})`),x.attr(`style`,`color: ${_.get(`stroke`)??h};`),f.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-A/2:A/2-d.height})`),M.attr(`transform`,`translate(0,${m?d.height/2+p/2:-d.height/2-p/2})`),Jh(t,N),t.intersect=function(e){return y.info(`iconSquare intersect`,t,e),eg.rect(t,e)},u}async function Zve(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=bf(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r?.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await Kh(e,t,`icon-shape default`),m=t.pos===`t`,h=s+f*2,g=s+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:b}=vf(t),x=-g/2,S=-h/2,C=t.label?8:0,w=wh.svg(u),T=xf(t,{});t.look!==`handDrawn`&&(T.roughness=0,T.fillStyle=`solid`),T.stroke=b.get(`fill`)??v;let E=w.path(Zh(x,S,g,h,5),T),D=Math.max(g,d.width),O=h+d.height+C,k=w.rectangle(-D/2,-O/2,D,O,{...T,fill:`transparent`,stroke:`none`}),A=u.insert(()=>E,`:first-child`).attr(`class`,`icon-shape2`),j=u.insert(()=>k);if(t.icon){let e=u.append(`g`);e.html(`<g>${await Nf(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+C/2-i/2-o:-d.height/2-C/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-O/2:O/2-d.height})`),A.attr(`transform`,`translate(0,${m?d.height/2+C/2:-d.height/2-C/2})`),Jh(t,j),t.intersect=function(e){if(y.info(`iconSquare intersect`,t,e),!t.label)return eg.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+C},{x:n+g/2,y:r-i/2+d.height+C},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+C},{x:n-d.width/2,y:r-i/2+d.height+C}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],eg.polygon(t,a,e)},u}async function Qve(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=bf(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),l=r?.wrappingWidth;t.width=Math.max(s,l??0);let{shapeSvg:u,bbox:d,halfPadding:f,label:p}=await Kh(e,t,`icon-shape default`),m=t.pos===`t`,h=s+f*2,g=s+f*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:b}=vf(t),x=-g/2,S=-h/2,C=t.label?8:0,w=wh.svg(u),T=xf(t,{});t.look!==`handDrawn`&&(T.roughness=0,T.fillStyle=`solid`),T.stroke=b.get(`fill`)??v;let E=w.path(Zh(x,S,g,h,.1),T),D=Math.max(g,d.width),O=h+d.height+C,k=w.rectangle(-D/2,-O/2,D,O,{...T,fill:`transparent`,stroke:`none`}),A=u.insert(()=>E,`:first-child`),j=u.insert(()=>k);if(t.icon){let e=u.append(`g`);e.html(`<g>${await Nf(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?d.height/2+C/2-i/2-o:-d.height/2-C/2-i/2-o})`),e.attr(`style`,`color: ${b.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-d.width/2-(d.x-(d.left??0))},${m?-O/2:O/2-d.height})`),A.attr(`transform`,`translate(0,${m?d.height/2+C/2:-d.height/2-C/2})`),Jh(t,j),t.intersect=function(e){if(y.info(`iconSquare intersect`,t,e),!t.label)return eg.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2},{x:n+d.width/2,y:r-i/2+d.height+C},{x:n+g/2,y:r-i/2+d.height+C},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+d.height+C},{x:n-d.width/2,y:r-i/2+d.height+C}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+d.width/2,y:r-i/2+h},{x:n+d.width/2/2,y:r+i/2},{x:n-d.width/2,y:r+i/2},{x:n-d.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],eg.polygon(t,a,e)},u}async function $ve(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=bf(t);t.labelStyle=o;let s=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let l=Math.max(t.label?s??0:0,t?.assetWidth??i),u=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:l,d=t.constraint===`on`?u/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(u,s??0);let{shapeSvg:f,bbox:p,label:m}=await Kh(e,t,`image-shape default`),h=t.pos===`t`,g=-u/2,_=-d/2,v=t.label?8:0,b=wh.svg(f),x=xf(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=b.rectangle(g,_,u,d,x),C=Math.max(u,p.width),w=d+p.height+v,T=b.rectangle(-C/2,-w/2,C,w,{...x,fill:`none`,stroke:`none`}),E=f.insert(()=>S,`:first-child`),D=f.insert(()=>T);if(t.img){let e=f.append(`image`);e.attr(`href`,t.img),e.attr(`width`,u),e.attr(`height`,d),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-u/2},${h?w/2-d:-w/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-d/2-p.height/2-v/2:d/2-p.height/2+v/2})`),E.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),Jh(t,D),t.intersect=function(e){if(y.info(`iconSquare intersect`,t,e),!t.label)return eg.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+u/2,y:r-i/2+p.height+v},{x:n+u/2,y:r+i/2},{x:n-u/2,y:r+i/2},{x:n-u/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-u/2,y:r-i/2},{x:n+u/2,y:r-i/2},{x:n+u/2,y:r-i/2+d},{x:n+p.width/2,y:r-i/2+d},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+d},{x:n-u/2,y:r-i/2+d}],eg.polygon(t,a,e)},f}async function eye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=Math.max(l.height+a*2,t.height??0),d=Math.max(l.width+o*2,(t.width??0)-u),f=[{x:0,y:0},{x:d,y:0},{x:d+3*u/6,y:-u},{x:-3*u/6,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{}),r=Oh(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=Ph(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,Jh(t,p),t.intersect=function(e){return eg.polygon(t,f,e)},s}async function tye(e,t){let{shapeSvg:n,bbox:r,label:i}=await Kh(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),Jh(t,a),t.intersect=function(e){return eg.rect(t,e)},n}async function nye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=Math.max(l.height+a,t.height??0),d=Math.max(l.width+o,(t.width??0)-u),f=[{x:0,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:-(3*u)/6,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{}),r=Oh(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=Ph(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,Jh(t,p),t.intersect=function(e){return eg.polygon(t,f,e)},s}async function rye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=Math.max(l.height+a,t.height??0),d=Math.max(l.width+o,(t.width??0)-u),f=[{x:-3*u/6,y:0},{x:d,y:0},{x:d+3*u/6,y:-u},{x:0,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{}),r=Oh(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=Ph(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,Jh(t,p),t.intersect=function(e){return eg.polygon(t,f,e)},s}function iye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,Yh(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),l=[{x:o,y:0},{x:0,y:s+7/2},{x:o-14,y:s+7/2},{x:0,y:2*s},{x:o,y:s-7/2},{x:14,y:s-7/2}],u=wh.svg(i),d=xf(t,{});t.look!==`handDrawn`&&(d.roughness=0,d.fillStyle=`solid`);let f=Oh(l),p=u.path(f,d),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${o/2},${-s})`),Jh(t,m),t.intersect=function(e){return y.info(`lightningBolt intersect`,t,e),eg.polygon(t,l,e)},i}async function aye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<fg&&(t.width=fg);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<dg&&(t.height=dg)}let{shapeSvg:s,bbox:l,label:u}=await Kh(e,t,Yh(t)),d=(t?.width?t?.width:l.width)+a*2,f=d/2,p=f/(2.5+d/50),m=(t?.height?t?.height:l.height)+p+o*2,h=m*.1,g,{cssStyles:_}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=ibe(0,0,d,m,f,p,h),r=abe(0,p,d,m,f,p),i=xf(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),g=s.insert(()=>a,`:first-child`),g.attr(`class`,`basic label-container`),_&&g.attr(`style`,_)}else{let e=rbe(0,0,d,m,f,p,h);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,Mp(_)).attr(`style`,r)}return g.attr(`label-offset-y`,p),g.attr(`transform`,`translate(${-d/2}, ${-(m/2+p)})`),Jh(t,g),u.attr(`transform`,`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(e){let n=eg.rect(t,e),r=n.x-(t.x??0);if(f!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-p)){let i=p*p*(1-r*r/(f*f));i>0&&(i=Math.sqrt(i)),i=p-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}async function oye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:l,label:u}=await Kh(e,t,Yh(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+p,{cssStyles:h}=t,g=wh.svg(s),_=xf(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...kh(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),b.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)+d/2*.1/2-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),Jh(t,b),t.intersect=function(e){return eg.polygon(t,v,e)},s}async function sye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:l,bbox:u,label:d}=await Kh(e,t,Yh(t)),f=(t?.width?t?.width:u.width)+a*2+2*s,p=(t?.height?t?.height:u.height)+o*2+2*s,m=f-2*s,h=p-2*s,g=-m/2,_=-h/2,{cssStyles:v}=t,y=wh.svg(l),b=xf(t,{}),x=[{x:g-s,y:_+s},{x:g-s,y:_+h+s},{x:g+m-s,y:_+h+s},{x:g+m-s,y:_+h},{x:g+m,y:_+h},{x:g+m,y:_+h-s},{x:g+m+s,y:_+h-s},{x:g+m+s,y:_-s},{x:g+s,y:_-s},{x:g+s,y:_},{x:g,y:_},{x:g,y:_+s}],S=[{x:g,y:_+s},{x:g+m-s,y:_+s},{x:g+m-s,y:_+h},{x:g+m,y:_+h},{x:g+m,y:_},{x:g,y:_}];t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let C=Oh(x),w=y.path(C,b),T=Oh(S),E=y.path(T,b);t.look!==`handDrawn`&&(w=jh(w),E=jh(E));let D=l.insert(`g`,`:first-child`);return D.insert(()=>w),D.insert(()=>E),D.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&D.selectAll(`path`).attr(`style`,r),d.attr(`transform`,`translate(${-(u.width/2)-s-(u.x-(u.left??0))}, ${-(u.height/2)+s-(u.y-(u.top??0))})`),Jh(t,D),t.intersect=function(e){return eg.polygon(t,x,e)},l}async function cye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=t.padding??0,l=t.look===`neo`?16:s,u=t.look===`neo`?12:s,d=!0;(t.width||t.height)&&(d=!1,t.width=(t?.width??0)-l*2,t.height=(t?.height??0)-u*3);let f=Math.max(a.width,t?.width??0)+l*2,p=Math.max(a.height,t?.height??0)+u*3,m=t.look===`neo`?p/4:p/8,h=p+(d?m/2:-m/2),g=-f/2,_=-h/2,{cssStyles:v}=t,y=kh(g-10,_+h+10,g+f-10,_+h+10,m,.8),b=y?.[y.length-1],x=[{x:g-10,y:_+10},{x:g-10,y:_+h+10},...y,{x:g+f-10,y:b.y-10},{x:g+f,y:b.y-10},{x:g+f,y:b.y-20},{x:g+f+10,y:b.y-20},{x:g+f+10,y:_-10},{x:g+10,y:_-10},{x:g+10,y:_},{x:g,y:_},{x:g,y:_+10}],S=[{x:g,y:_+10},{x:g+f-10,y:_+10},{x:g+f-10,y:b.y-10},{x:g+f,y:b.y-10},{x:g+f,y:_},{x:g,y:_}],C=wh.svg(i),w=xf(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`);let T=Oh(x),E=C.path(T,w),D=Oh(S),O=C.path(D,w),k=i.insert(()=>E,`:first-child`);return k.insert(()=>O),k.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&k.selectAll(`path`).attr(`style`,r),k.attr(`transform`,`translate(0,${-m/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-m/2-(a.y-(a.top??0))})`),Jh(t,k),t.intersect=function(e){return eg.polygon(t,x,e)},i}async function lye(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r,t.useHtmlLabels||os(es())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await Kh(e,t,Yh(t)),l=Math.max(o.width+(t.padding??0)*2,t?.width??0),u=Math.max(o.height+(t.padding??0)*2,t?.height??0),d=-l/2,f=-u/2,{cssStyles:p}=t,m=wh.svg(a),h=xf(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=m.rectangle(d,f,l,u,h),_=a.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),p&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,p),i&&t.look!==`handDrawn`&&_.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Jh(t,_),t.intersect=function(e){return eg.rect(t,e)},a}async function uye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await Kh(e,t,Yh(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,l=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=wh.svg(i),n=xf(t,{}),r=obe(0,0,o),a=e.path(r,n);u=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),d&&u.attr(`style`,d)}else u=Ph(i,o,o,l),u.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&u.attr(`style`,r),Jh(t,u),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=eg.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}async function dye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:l,label:u}=await Kh(e,t,Yh(t)),d=l.width+(t.look===`neo`?a*2:a),f=Math.max(l.height+(t.look===`neo`?o*2:o),t.height??0),p=f/4,m=-Math.max(d,(t.width??0)-p)/2,h=-f/2,g=h/2,_=[{x:m+g,y:h},{x:m,y:0},{x:m+g,y:-h},{x:-m,y:-h},{x:-m,y:h}],{cssStyles:v}=t,y=wh.svg(s),b=xf(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=Oh(_),S=y.path(x,b),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(${-g/2},0)`),u.attr(`transform`,`translate(${-g/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Jh(t,C),t.intersect=function(e){return eg.polygon(t,_,e)},s}async function fye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),o=a.insert(`g`),s=a.insert(`g`).attr(`class`,`label`).attr(`style`,r),l=t.description,u=t.label,d=await Qh(s,u,t.labelStyle,!0,!0),f={width:0,height:0};if(os(Z())){let e=d.children[0],t=Ac(d);f=e.getBoundingClientRect(),t.attr(`width`,f.width),t.attr(`height`,f.height)}y.info(`Text 2`,l);let p=l||[],m=d.getBBox(),h=await Qh(s,Array.isArray(p)?p.join(`<br/>`):p,t.labelStyle,!0,!0),g=h.children[0],_=Ac(h);f=g.getBoundingClientRect(),_.attr(`width`,f.width),_.attr(`height`,f.height);let v=(t.padding||0)/2;Ac(h).attr(`transform`,`translate( `+(f.width>m.width?0:(m.width-f.width)/2)+`, `+(m.height+v+5)+`)`),Ac(d).attr(`transform`,`translate( `+(f.width<m.width?0:-(m.width-f.width)/2)+`, 0)`),f=s.node().getBBox(),s.attr(`transform`,`translate(`+-f.width/2+`, `+(-f.height/2-v+3)+`)`);let b=f.width+(t.padding||0),x=f.height+(t.padding||0),S=-f.width/2-v,C=-f.height/2-v,w,T;if(t.look===`handDrawn`){let e=wh.svg(a),n=xf(t,{}),r=e.path(Zh(S,C,b,x,t.rx||0),n),i=e.line(-f.width/2-v,-f.height/2-v+m.height+v,f.width/2+v,-f.height/2-v+m.height+v,n);T=a.insert(()=>(y.debug(`Rough node insert CXC`,r),i),`:first-child`),w=a.insert(()=>(y.debug(`Rough node insert CXC`,r),r),`:first-child`)}else w=o.insert(`rect`,`:first-child`),T=o.insert(`line`),w.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-f.width/2-v).attr(`y`,-f.height/2-v).attr(`width`,f.width+(t.padding||0)).attr(`height`,f.height+(t.padding||0)),T.attr(`class`,`divider`).attr(`x1`,-f.width/2-v).attr(`x2`,f.width/2+v).attr(`y1`,-f.height/2-v+m.height+v).attr(`y2`,-f.height/2-v+m.height+v);return Jh(t,w),t.intersect=function(e){return eg.rect(t,e)},a}async function pye(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return zh(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}async function mye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:l}=await Kh(e,t,Yh(t)),u=(t?.width??s.width)+i*2+(t.look===`neo`?pg:pg*2),d=(t?.height??s.height)+a*2,f=u-pg,p=d,m=pg-u/2,h=-d/2,{cssStyles:g}=t,_=wh.svg(o),v=xf(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m+f,y:h},{x:m+f,y:h+p},{x:m-pg,y:h+p},{x:m-pg,y:h},{x:m,y:h},{x:m,y:h+p}],b=_.polygon(y.map(e=>[e.x,e.y]),v),x=o.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`).attr(`style`,Mp(g)),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),g&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),l.attr(`transform`,`translate(${pg/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Jh(t,x),t.intersect=function(e){return eg.rect(t,e)},o}async function hye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:l,label:u}=await Kh(e,t,Yh(t)),d=(t?.width?t?.width:l.width)+a*2,f=((t?.height?t?.height:l.height)+o*2)*1.5,p=d,m=f/1.5,h=-p/2,g=-m/2,{cssStyles:_}=t,v=wh.svg(s),y=xf(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:h,y:g},{x:h,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g-m/2}],x=Oh(b),S=v.path(x,y),C=s.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&C.selectChildren(`path`).attr(`style`,r),C.attr(`transform`,`translate(0, ${m/4})`),u.attr(`transform`,`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-m/4+(t.padding??0)-(l.y-(l.top??0))})`),Jh(t,C),t.intersect=function(e){return eg.polygon(t,b,e)},s}async function gye(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return zh(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}async function _ye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=l.height+(t.look===`neo`?o*2:o),d=l.width+u/4+(t.look===`neo`?a*2:a),f=u/2,{cssStyles:p}=t,m=wh.svg(s),h=xf(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-d/2+f,y:-u/2},{x:d/2-f,y:-u/2},...Ah(-d/2+f,0,f,50,90,270),{x:d/2-f,y:u/2},...Ah(d/2-f,0,f,50,270,450)],_=Oh(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),Jh(t,y),t.intersect=function(e){return eg.polygon(t,g,e)},s}async function vye(e,t){return zh(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}function yye(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:l,nodeShadow:u}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let d=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),f=wh.svg(d),p=xf(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),h=s??l,g=(t.width??0)*5/14,_=f.circle(0,0,g,{...p,fill:h,stroke:h,strokeWidth:2,fillStyle:`solid`}),v=d.insert(()=>m,`:first-child`);if(v.insert(()=>_),t.look!==`handDrawn`&&v.attr(`class`,`outer-path`),a&&v.selectAll(`path`).attr(`style`,a),i&&v.selectAll(`path`).attr(`style`,i),t.width<25&&u&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;v.attr(`style`,`filter:url(#${n})`)}return Jh(t,v),t.intersect=function(e){return eg.circle(t,(t.width??0)/2,e)},d}function bye(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=wh.svg(a).circle(0,0,t.width,Ime(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return Jh(t,o),t.intersect=function(e){return eg.circle(t,(t.width??7)/2,e)},a}async function xye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=Math.max(l.width+2*mg+a,t.width??0),d=Math.max(l.height+o,t.height??0),f=u-2*mg,p=d,m=-u/2,h=-d/2,g=[{x:0,y:0},{x:f,y:0},{x:f,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:f+8,y:0},{x:f+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{}),r=e.rectangle(m,h,f+16,p,n),i=e.line(m+mg,h,m+mg,h+p,n),a=e.line(m+mg+f,h,m+mg+f,h+p,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:l}=t;o.attr(`class`,`basic label-container`).attr(`style`,Mp(l)),Jh(t,o)}else{let e=Ph(s,f,p,g);r&&e.attr(`style`,r),Jh(t,e)}return t.intersect=function(e){return eg.polygon(t,g,e)},s}async function Sye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-hg*(t.height+o*2),10));let{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=(t?.height?t?.height:l.height)+o*2,d=hg*u,f=hg*u,p=(t?.width?t?.width:l.width)+a*2+d-d,m=u,h=-p/2,g=-m/2,{cssStyles:_}=t,v=wh.svg(s),y=xf(t,{}),b=[{x:h-d/2,y:g},{x:h+p+d/2,y:g},{x:h+p+d/2,y:g+m},{x:h-d/2,y:g+m}],x=[{x:h+p-d/2,y:g+m},{x:h+p+d/2,y:g+m},{x:h+p+d/2,y:g+m-f}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=Oh(b),C=v.path(S,y),w=Oh(x),T=v.path(w,{...y,fillStyle:`solid`}),E=s.insert(()=>T,`:first-child`);return E.insert(()=>C,`:first-child`),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),Jh(t,E),t.intersect=function(e){return eg.polygon(t,b,e)},s}async function Cye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await Kh(e,t,Yh(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),l=Math.max(a.height+(t.padding??0)*2,t?.height??0),u=l/8,d=.2*s,f=.2*l,p=l+u,{cssStyles:m}=t,h=wh.svg(i),g=xf(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-s/2-s/2*.1,y:p/2},...kh(-s/2-s/2*.1,p/2,s/2+s/2*.1,p/2,u,.8),{x:s/2+s/2*.1,y:-p/2},{x:-s/2-s/2*.1,y:-p/2}],v=-s/2+s/2*.1,y=-p/2-f*.4,b=[{x:v+s-d,y:(y+l)*1.3},{x:v+s,y:y+l-f},{x:v+s,y:(y+l)*.9},...kh(v+s,(y+l)*1.25,v+s-d,(y+l)*1.3,-l*.02,.5)],x=Oh(_),S=h.path(x,g),C=Oh(b),w=h.path(C,{...g,fillStyle:`solid`}),T=i.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),T.attr(`transform`,`translate(0,${-u/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-u/2-(a.y-(a.top??0))})`),Jh(t,T),t.intersect=function(e){return eg.polygon(t,_,e)},i}async function wye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await Kh(e,t,Yh(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),l=-o/2,u=-s/2,d=i.insert(`rect`,`:first-child`);return d.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,l).attr(`y`,u).attr(`width`,o).attr(`height`,s),Jh(t,d),t.intersect=function(e){return eg.rect(t,e)},i}async function Tye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2,o=t.height??0;if(t.height&&(t.height-=a,t.height<gg&&(t.height=gg)),t.width){let e=o/2/(2.5+o/50);t.width=t.width-a-e*3,t.width<_g&&(t.width=_g)}let{shapeSvg:s,bbox:l,label:u}=await Kh(e,t,Yh(t)),d=Math.max(t.height??0,l.height)+a,f=d/2,p=f/(2.5+d/50),m=Math.max(t.width??0,l.width)+p+a,{cssStyles:h}=t,g;if(t.look===`handDrawn`){let e=wh.svg(s),n=cbe(0,0,m,d,p,f),r=lbe(0,0,m,d,p,f),i=e.path(n,xf(t,{})),a=e.path(r,xf(t,{fill:`none`}));g=s.insert(()=>a,`:first-child`),g=s.insert(()=>i,`:first-child`),g.attr(`class`,`basic label-container`),h&&g.attr(`style`,h)}else{let e=sbe(0,0,m,d,p,f);g=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,Mp(h)).attr(`style`,r),g.attr(`class`,`basic label-container outer-path`),h&&g.selectAll(`path`).attr(`style`,h),r&&g.selectAll(`path`).attr(`style`,r)}return g.attr(`label-offset-x`,p),g.attr(`transform`,`translate(${-m/2}, ${d/2} )`),u.attr(`transform`,`translate(${-(l.width/2)-p-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Jh(t,g),t.intersect=function(e){let n=eg.rect(t,e),r=n.y-(t.y??0);if(f!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-p)){let i=p*p*(1-r*r/(f*f));i!=0&&(i=Math.sqrt(Math.abs(i))),i=p-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},s}async function Eye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=Math.max(l.height+a,t.height??0),d=Math.max(l.width+o,(t.width??0)-u),f=[{x:-3*u/6,y:0},{x:d+3*u/6,y:0},{x:d,y:-u},{x:0,y:-u}],p,{cssStyles:m}=t;if(t.look===`handDrawn`){let e=wh.svg(s),n=xf(t,{}),r=Oh(f),i=e.path(r,n);p=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-d/2}, ${u/2})`),m&&p.attr(`style`,m)}else p=Ph(s,d,u,f);return r&&p.attr(`style`,r),t.width=d,t.height=u,Jh(t,p),t.intersect=function(e){return eg.polygon(t,f,e)},s}async function Dye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=(t?.width?t?.width:l.width)+a*2,d=(t?.height?t?.height:l.height)+o*2,{cssStyles:f}=t,p=wh.svg(s),m=xf(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2*.8,y:-d/2},{x:u/2*.8,y:-d/2},{x:u/2,y:-d/2*.6},{x:u/2,y:d/2},{x:-u/2,y:d/2},{x:-u/2,y:-d/2*.6}],g=Oh(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Jh(t,v),t.intersect=function(e){return eg.polygon(t,h,e)},s}async function Oye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<yg&&(t.width=yg),t.height=t?.height??0,t.height<vg&&(t.height=vg));let{shapeSvg:o,bbox:s,label:l}=await Kh(e,t,Yh(t)),u=Ko(Z().flowchart?.htmlLabels),d=(t?.width?t?.width:s.width)+a,f=t?.height?t?.height:d+s.height,p=f,m=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-f}],{cssStyles:h}=t,g=wh.svg(o),_=xf(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Oh(m),b=g.path(v,_),x=o.insert(()=>b,`:first-child`).attr(`transform`,`translate(${-f/2}, ${f/2})`).attr(`class`,`outer-path`);return h&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectChildren(`path`).attr(`style`,r),t.width=d,t.height=f,Jh(t,x),l.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${f/2-(s.height+(t.padding??0)/(u?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(e){return y.info(`Triangle intersect`,t,m,e),eg.polygon(t,m,e)},o}async function kye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:l,bbox:u,label:d}=await Kh(e,t,Yh(t)),f=(t?.width?t?.width:u.width)+(a??0)*2,p=(t?.height?t?.height:u.height)+(o??0)*2,m=t.look===`neo`?p/4:p/8,h=p+(s?m:-m),{cssStyles:g}=t,_=14-f,v=_>0?_/2:0,y=wh.svg(l),b=xf(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=[{x:-f/2-v,y:h/2},...kh(-f/2-v,h/2,f/2+v,h/2,m,.8),{x:f/2+v,y:-h/2},{x:-f/2-v,y:-h/2}],S=Oh(x),C=y.path(S,b),w=l.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-m/2})`),d.attr(`transform`,`translate(${-f/2+(t.padding??0)-(u.x-(u.left??0))},${-p/2+(t.padding??0)-m-(u.y-(u.top??0))})`),Jh(t,w),t.intersect=function(e){return eg.polygon(t,x,e)},l}async function Aye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:l}=await Kh(e,t,Yh(t)),u=(t?.width?t?.width:l.width)+a*2,d=(t?.height?t?.height:l.height)+o,f=d/8,p=d+f*2,{cssStyles:m}=t,h=wh.svg(s),g=xf(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2,y:p/2},...kh(-u/2,p/2,u/2,p/2,f,1),{x:u/2,y:-p/2},...kh(u/2,-p/2,-u/2,-p/2,f,-1)],v=Oh(_),y=h.path(v,g),b=s.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container`),m&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),Jh(t,b),t.intersect=function(e){return eg.polygon(t,_,e)},s}async function jye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-bg,10),t.height=Math.max((t?.height??0)-a*2-bg,10));let{shapeSvg:o,bbox:s,label:l}=await Kh(e,t,Yh(t)),u=(t?.width?t?.width:s.width)+i*2+bg,d=(t?.height?t?.height:s.height)+a*2+bg,f=u-bg,p=d-bg,m=-f/2,h=-p/2,{cssStyles:g}=t,_=wh.svg(o),v=xf(t,{}),y=[{x:m-bg,y:h-bg},{x:m-bg,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-bg}],b=`M${m-bg},${h-bg} L${m+f},${h-bg} L${m+f},${h+p} L${m-bg},${h+p} L${m-bg},${h-bg}457- M${m-bg},${h} L${m+f},${h}458- M${m},${h-bg} L${m},${h+p}`;t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=_.path(b,v),S=o.insert(()=>x,`:first-child`);return S.attr(`transform`,`translate(${bg/2}, ${bg/2})`),S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectAll(`path`).attr(`style`,r),l.attr(`transform`,`translate(${-(s.width/2)+bg/2-(s.x-(s.left??0))}, ${-(s.height/2)+bg/2-(s.y-(s.top??0))})`),Jh(t,S),t.intersect=function(e){return eg.polygon(t,y,e)},o}async function Bh(e,t){let n=t;n.alias&&(t.label=n.alias);let{theme:r,themeVariables:i}=es(),{rowEven:a,rowOdd:o,nodeBorder:s,borderColorArray:l}=i;if(t.look===`handDrawn`){let{themeVariables:n}=es(),{background:r}=n;await Bh(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let u=es();t.useHtmlLabels=u.htmlLabels;let d=u.er?.diagramPadding??10,f=u.er?.entityPadding??6,{cssStyles:p}=t,{labelStyles:m,nodeStyles:h}=bf(t);if(n.attributes.length===0&&t.label){let i={rx:0,ry:0,labelPaddingX:d,labelPaddingY:d*1.5,classes:``};kp(t.label,u)+i.labelPaddingX*2<u.er.minEntityWidth&&(t.width=u.er.minEntityWidth);let a=await zh(e,t,i);if(r!=null&&xg.has(r)){let e=n.colorIndex??0;a.attr(`data-color-id`,`color-${e%l.length}`)}if(!Ko(u.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}u.htmlLabels||(d*=1.25,f*=1.25);let g=Yh(t);g||=`node default`;let _=e.insert(`g`).attr(`class`,g).attr(`id`,t.domId||t.id),v=await Vh(_,t.label??``,u,0,0,[`name`],m);v.height+=f;let y=0,b=[],x=[],S=0,C=0,w=0,T=0,E=!0,D=!0;for(let e of n.attributes){let t=await Vh(_,e.type,u,0,y,[`attribute-type`],m);S=Math.max(S,t.width+d);let n=await Vh(_,e.name,u,0,y,[`attribute-name`],m);C=Math.max(C,n.width+d);let r=await Vh(_,e.keys.join(),u,0,y,[`attribute-keys`],m);w=Math.max(w,r.width+d);let i=await Vh(_,e.comment,u,0,y,[`attribute-comment`],m);T=Math.max(T,i.width+d);let a=Math.max(t.height,n.height,r.height,i.height)+f;x.push({yOffset:y,rowHeight:a}),y+=a}let O=4;w<=d&&(E=!1,w=0,O--),T<=d&&(D=!1,T=0,O--);let k=_.node().getBBox();if(v.width+d*2-(S+C+w+T)>0){let e=v.width+d*2-(S+C+w+T);S+=e/O,C+=e/O,w>0&&(w+=e/O),T>0&&(T+=e/O)}let A=S+C+w+T,j=wh.svg(_),M=xf(t,{});t.look!==`handDrawn`&&(M.roughness=0,M.fillStyle=`solid`);let N=0;x.length>0&&(N=x.reduce((e,t)=>e+(t?.rowHeight??0),0));let P=Math.max(k.width+d*2,t?.width||0,A),F=Math.max((N??0)+v.height,t?.height||0),I=-P/2,L=-F/2;if(_.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=Ac(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?a+=S:r.attr(`class`).includes(`attribute-keys`)?a+=S+C:r.attr(`class`).includes(`attribute-comment`)&&(a+=S+C+w))}r.attr(`transform`,`translate(${I+d/2+a}, ${o+L+v.height+f/2})`)}),_.select(`.name`).attr(`transform`,`translate(`+-v.width/2+`, `+(L+f/2)+`)`),r!=null&&xg.has(r)){let e=n.colorIndex??0;_.attr(`data-color-id`,`color-${e%l.length}`)}let R=j.rectangle(I,L,P,F,M),ee=_.insert(()=>R,`:first-child`).attr(`class`,`outer-path`).attr(`style`,p.join(``));b.push(0);for(let[e,t]of x.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=j.rectangle(I,v.height+L+t?.yOffset,P,t?.rowHeight,{...M,fill:n?a:o,stroke:s});_.insert(()=>r,`g.label`).attr(`style`,p.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let z=1e-4,B=Hh(I,v.height+L,P+I,v.height+L,z),te=j.polygon(B.map(e=>[e.x,e.y]),M);if(_.insert(()=>te).attr(`class`,`divider`),B=Hh(S+I,v.height+L,S+I,F+L,z),te=j.polygon(B.map(e=>[e.x,e.y]),M),_.insert(()=>te).attr(`class`,`divider`),E){let e=S+C+I;B=Hh(e,v.height+L,e,F+L,z),te=j.polygon(B.map(e=>[e.x,e.y]),M),_.insert(()=>te).attr(`class`,`divider`)}if(D){let e=S+C+w+I;B=Hh(e,v.height+L,e,F+L,z),te=j.polygon(B.map(e=>[e.x,e.y]),M),_.insert(()=>te).attr(`class`,`divider`)}for(let e of b){let t=v.height+L+e;B=Hh(I,t,P+I,t,z),te=j.polygon(B.map(e=>[e.x,e.y]),M),_.insert(()=>te).attr(`class`,`divider`)}if(Jh(t,ee),h&&t.look!==`handDrawn`){if(r!=null&&ube.has(r))_.selectAll(`path`).attr(`style`,h);else{let e=h.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);_.selectAll(`path`).attr(`style`,e??``),_.selectAll(`.row-rect-even path`).attr(`style`,h)}}return t.intersect=function(e){return eg.rect(t,e)},_}async function Vh(e,t,n,r=0,i=0,a=[],o=``){let s=e.insert(`g`).attr(`class`,`label ${a.join(` `)}`).attr(`transform`,`translate(${r}, ${i})`).attr(`style`,o);t!==bs(t)&&(t=bs(t),t=t.replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`));let l=s.node().appendChild(await Km(s,t,{width:kp(t,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(t.includes(`&lt;`)||t.includes(`&gt;`)){let e=l.children[0];for(e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`&lt;`,`<`).replaceAll(`&gt;`,`>`)}let u=l.getBBox();if(Ko(n.htmlLabels)){let e=l.children[0];e.style.textAlign=`start`;let t=Ac(l);u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}return u}function Hh(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}async function Mye(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,Yh(t)).attr(`id`,t.domId||t.id),s=null,l=null,u=null,d=null,f=0,p=0,m=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Uh(s,{text:`\xAB${e}\xBB`},0),f=s.node().getBBox().height}l=o.insert(`g`).attr(`class`,`label-group text`),await Uh(l,t,0,[`font-weight: bolder`]);let h=l.node().getBBox();p=h.height,u=o.insert(`g`).attr(`class`,`members-group text`);let g=0;for(let e of t.members){let t=await Uh(u,e,g,[e.parseClassifier()]);g+=t+a}m=u.node().getBBox().height,m<=0&&(m=i/2),d=o.insert(`g`).attr(`class`,`methods-group text`);let _=0;for(let e of t.methods){let t=await Uh(d,e,_,[e.parseClassifier()]);_+=t+a}let v=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return l.attr(`transform`,`translate(${-h.width/2}, ${f})`),v=o.node().getBBox(),u.attr(`transform`,`translate(0, ${f+p+i*2})`),v=o.node().getBBox(),d.attr(`transform`,`translate(0, ${f+p+(m?m+i*4:i*2)})`),v=o.node().getBBox(),{shapeSvg:o,bbox:v}}async function Uh(e,t,n,r=[]){let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),a=es(),o=`useHtmlLabels`in t?t.useHtmlLabels:Ko(a.htmlLabels)??!0,s=``;s=`text`in t?t.text:t.label,!o&&s.startsWith(`\\`)&&(s=s.substring(1)),ws(s)&&(o=!0);let l=await Km(i,Ks(Wp(s)),{width:kp(s,a)+50,classes:`markdown-node-label`,useHtmlLabels:o},a),u,d=1;if(o){let e=l.children[0],t=Ac(l);d=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(d+=e.innerHTML.split(`<mrow>`).length-1),await Eh(e),u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}else{r.includes(`font-weight: bolder`)&&Ac(l).selectAll(`tspan`).attr(`font-weight`,``),d=l.children.length;let e=l.children[0];(l.textContent===``||l.textContent.includes(`&gt`))&&(e.textContent=s[0]+s.substring(1).replaceAll(`&gt;`,`>`).replaceAll(`&lt;`,`<`).trim(),s[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),u=l.getBBox()}return i.attr(`transform`,`translate(0,`+(-u.height/(2*d)+n)+`)`),u.height}async function Nye(e,t){let n=Z(),{themeVariables:r}=n,{useGradient:i}=r,a=n.class.padding??12,o=a,s=t.useHtmlLabels??Ko(n.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];let{shapeSvg:u,bbox:d}=await Mye(e,t,n,s,o),{labelStyles:f,nodeStyles:p}=bf(t);t.labelStyle=f,t.cssStyles=l.styles||``;let m=l.styles?.join(`;`)||p||``;t.cssStyles||=m.replaceAll(`!important`,``).split(`;`);let h=l.members.length===0&&l.methods.length===0&&!n.class?.hideEmptyMembersBox,g=wh.svg(u),_=xf(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Math.max(t.width??0,d.width),y=Math.max(t.height??0,d.height),b=(t.height??0)>d.height;l.members.length===0&&l.methods.length===0?y+=o:l.members.length>0&&l.methods.length===0&&(y+=o*2);let x=-v/2,S=-y/2,C=h?a*2:l.members.length===0&&l.methods.length===0?-a:0;b&&(C=a*2);let w=g.rectangle(x-a,S-a-(h?a:l.members.length===0&&l.methods.length===0?-a/2:0),v+2*a,y+2*a+C,_),T=u.insert(()=>w,`:first-child`);T.attr(`class`,`basic label-container outer-path`);let E=T.node().getBBox(),D=u.select(`.annotation-group`).node().getBBox().height-(h?a/2:0)||0,O=u.select(`.label-group`).node().getBBox().height-(h?a/2:0)||0,k=u.select(`.members-group`).node().getBBox().height-(h?a/2:0)||0,A=(D+O+S+a-(S-a-(h?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(u.selectAll(`.text`).each((e,t,r)=>{let i=Ac(r[t]),d=i.attr(`transform`),f=0;if(d){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(d);e&&(f=parseFloat(e[2]))}let p=f+S+a-(h?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(i.attr(`class`).includes(`methods-group`)){let e=Math.max(k,o/2);p=b?Math.max(A,D+O+e+S+o*2+a)+o*2:D+O+e+S+o*4+a}l.members.length===0&&l.methods.length===0&&n.class?.hideEmptyMembersBox&&(p=l.annotations.length>0?f-o:f),s||(p-=4);let m=x;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(m=-i.node()?.getBBox().width/2||0,u.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(m=0)})),i.attr(`transform`,`translate(${m}, ${p})`)}),l.members.length>0||l.methods.length>0||h){let e=D+O+S+a,n=g.line(E.x,e,E.x+E.width,e+.001,_);u.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,m)}if(h||l.members.length>0||l.methods.length>0){let e=D+O+k+S+o*2+a,n=g.line(E.x,b?Math.max(A,e):e,E.x+E.width,(b?Math.max(A,e):e)+.001,_);u.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,m)}if(l.look!==`handDrawn`&&u.selectAll(`path`).attr(`style`,m),T.select(`:nth-child(2)`).attr(`style`,m),u.selectAll(`.divider`).select(`path`).attr(`style`,m),t.labelStyle?u.selectAll(`span`).attr(`style`,t.labelStyle):u.selectAll(`span`).attr(`style`,m),!s){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(m);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}else if(f){let t=e.exec(f);if(t){let e=t[0].replace(`color`,`fill`);u.selectAll(`tspan`).attr(`style`,e)}}}return Jh(t,T),t.intersect=function(e){return eg.rect(t,e)},u}async function Pye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let i=t,a=t,o=`verifyMethod`in t,s=Yh(t),l=Z(),{themeVariables:u}=l,{borderColorArray:d,requirementEdgeLabelBackground:f}=u,p=l.layout===`elk`?`start`:`center`,m=e.insert(`g`).attr(`class`,s).attr(`id`,t.domId??t.id),h;h=o?await Wh(m,`&lt;&lt;${i.type}&gt;&gt;`,0,t.labelStyle):await Wh(m,`&lt;&lt;Element&gt;&gt;`,0,t.labelStyle);let g=h,_=await Wh(m,i.name,g,t.labelStyle+`; font-weight: bold;`);if(g+=_+20,o){let e=await Wh(m,`${i.requirementId?`ID: ${i.requirementId}`:``}`,g,t.labelStyle,p);g+=e;let n=await Wh(m,`${i.text?`Text: ${i.text}`:``}`,g,t.labelStyle,p);g+=n;let r=await Wh(m,`${i.risk?`Risk: ${i.risk}`:``}`,g,t.labelStyle,p);g+=r,await Wh(m,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:``}`,g,t.labelStyle,p)}else{let e=await Wh(m,`${a.type?`Type: ${a.type}`:``}`,g,t.labelStyle,p);g+=e,await Wh(m,`${a.docRef?`Doc Ref: ${a.docRef}`:``}`,g,t.labelStyle,p)}let v=(m.node()?.getBBox().width??200)+20,y=(m.node()?.getBBox().height??200)+20,b=-v/2,x=-y/2,S=wh.svg(m),C=xf(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=S.rectangle(b,x,v,y,C),T=m.insert(()=>w,`:first-child`);if(T.attr(`class`,`basic label-container outer-path`).attr(`style`,r),d?.length){let e=t.colorIndex??0;m.attr(`data-color-id`,`color-${e%d.length}`)}if(m.selectAll(`.label`).each((e,t,n)=>{let r=Ac(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]))}let s=o-y/2,l=b+10;(t===0||t===1)&&(l=a),r.attr(`transform`,`translate(${l}, ${s+20})`)}),g>h+_+20){let e=x+h+_+20,n;if(t.look===`neo`){let t=.001,r=[[b,e],[b+v,e],[b+v,e+t],[b,e+t]];n=S.polygon(r,C)}else n=S.line(b,e,b+v,e,C);m.insert(()=>n).attr(`class`,`divider`)}return Jh(t,T),t.intersect=function(e){return eg.rect(t,e)},r&&t.look!==`handDrawn`&&(f||d?.length)&&m.selectAll(`path`).attr(`style`,r),m}async function Wh(e,t,n,r=``,i=`center`){if(t===``)return 0;let a=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),o=Z(),s=o.htmlLabels??!0,l=await Km(a,Ks(Wp(t)),{width:kp(t,o)+50,classes:`markdown-node-label`,useHtmlLabels:s,style:r},o),u;if(s){let e=l.children[0],t=Ac(l);i===`start`&&Ac(e).style(`text-align`,`left`),u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}else{let e=l.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);if(i===`start`){e.setAttribute(`text-anchor`,`start`);for(let t of e.children)t.setAttribute(`text-anchor`,`start`)}u=l.getBBox(),u.height+=6}return a.attr(`transform`,`translate(${-u.width/2},${-u.height/2+n})`),u.height}async function Fye(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=bf(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:l}=await Kh(e,t,Yh(t)),u=t.padding||10,d=``,f;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(d=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),f=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,d).attr(`target`,`_blank`));let p={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},m,h;f?{label:m,bbox:h}=await qh(f,`ticket`in t&&t.ticket||``,p):{label:m,bbox:h}=await qh(o,`ticket`in t&&t.ticket||``,p);let{label:g,bbox:_}=await qh(o,`assigned`in t&&t.assigned||``,p);t.width=a;let v=t?.width||0,y=Math.max(h.height,_.height)/2,b=Math.max(s.height+20,t?.height||0)+y,x=-v/2,S=-b/2;l.attr(`transform`,`translate(`+(u-v/2)+`, `+(-y-s.height/2)+`)`),m.attr(`transform`,`translate(`+(u-v/2)+`, `+(-y+s.height/2)+`)`),g.attr(`transform`,`translate(`+(u+v/2-_.width-20)+`, `+(-y+s.height/2)+`)`);let C,{rx:w,ry:T}=t,{cssStyles:E}=t;if(t.look===`handDrawn`){let e=wh.svg(o),n=xf(t,{}),r=w||T?e.path(Zh(x,S,v,b,w||0),n):e.rectangle(x,S,v,b,n);C=o.insert(()=>r,`:first-child`),C.attr(`class`,`basic label-container`).attr(`style`,E||null)}else{C=o.insert(`rect`,`:first-child`),C.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,w??5).attr(`ry`,T??5).attr(`x`,x).attr(`y`,S).attr(`width`,v).attr(`height`,b);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=x+2,r=S+Math.floor((w??0)/2),i=S+b-Math.floor((w??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,dbe(e))}}return Jh(t,C),t.height=b,t.intersect=function(e){return eg.rect(t,e)},o}async function Iye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await Kh(e,t,Yh(t)),l=a.width+10*o,u=a.height+8*o,d=.15*l,{cssStyles:f}=t,p=a.width+20,m=a.height+20,h=Math.max(l,p),g=Math.max(u,m);s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0 459- a${d},${d} 1 0,0 ${h*.25},${-1*g*.1}460- a${d},${d} 1 0,0 ${h*.25},0461- a${d},${d} 1 0,0 ${h*.25},0462- a${d},${d} 1 0,0 ${h*.25},${g*.1}463-464- a${d},${d} 1 0,0 ${h*.15},${g*.33}465- a${d*.8},${d*.8} 1 0,0 0,${g*.34}466- a${d},${d} 1 0,0 ${-1*h*.15},${g*.33}467-468- a${d},${d} 1 0,0 ${-1*h*.25},${g*.15}469- a${d},${d} 1 0,0 ${-1*h*.25},0470- a${d},${d} 1 0,0 ${-1*h*.25},0471- a${d},${d} 1 0,0 ${-1*h*.25},${-1*g*.15}472-473- a${d},${d} 1 0,0 ${-1*h*.1},${-1*g*.33}474- a${d*.8},${d*.8} 1 0,0 0,${-1*g*.34}475- a${d},${d} 1 0,0 ${h*.1},${-1*g*.33}476- H0 V0 Z`;if(t.look===`handDrawn`){let e=wh.svg(i),n=xf(t,{}),r=e.path(v,n);_=i.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,Mp(f))}else _=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,v);return _.attr(`transform`,`translate(${-h/2}, ${-g/2})`),Jh(t,_),t.calcIntersect=function(e,t){return eg.rect(e,t)},t.intersect=function(e){return y.info(`Bang intersect`,t,e),eg.rect(t,e)},i}async function Lye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await Kh(e,t,Yh(t)),l=a.width+2*o,u=a.height+2*o,d=.15*l,f=.25*l,p=.35*l,m=.2*l,{cssStyles:h}=t,g,_=`M0 0 477- a${d},${d} 0 0,1 ${l*.25},${-1*l*.1}478- a${p},${p} 1 0,1 ${l*.4},${-1*l*.1}479- a${f},${f} 1 0,1 ${l*.35},${l*.2}480-481- a${d},${d} 1 0,1 ${l*.15},${u*.35}482- a${m},${m} 1 0,1 ${-1*l*.15},${u*.65}483-484- a${f},${d} 1 0,1 ${-1*l*.25},${l*.15}485- a${p},${p} 1 0,1 ${-1*l*.5},0486- a${d},${d} 1 0,1 ${-1*l*.25},${-1*l*.15}487-488- a${d},${d} 1 0,1 ${-1*l*.1},${-1*u*.35}489- a${m},${m} 1 0,1 ${l*.1},${-1*u*.65}490- H0 V0 Z`;if(t.look===`handDrawn`){let e=wh.svg(i),n=xf(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,Mp(h))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),g.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Jh(t,g),t.calcIntersect=function(e,t){return eg.rect(e,t)},t.intersect=function(e){return y.info(`Cloud intersect`,t,e),eg.rect(t,e)},i}async function Rye(e,t){let{labelStyles:n,nodeStyles:r}=bf(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await Kh(e,t,Yh(t)),l=a.width+8*o,u=a.height+2*o,d=t.look===`neo`?`491- M${-l/2} ${u/2-5}492- v${-u+10}493- q0,-5 5,-5494- h${l-10}495- q5,0 5,5496- v${u-5}497- H${-l/2}498- Z499- `:`500- M${-l/2} ${u/2-5}501- v${-u+10}502- q0,-5 5,-5503- h${l-10}504- q5,0 5,5505- v${u-10}506- q0,5 -5,5507- h${-(l-10)}508- q-5,0 -5,-5509- Z510- `;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let f=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,d);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-l/2).attr(`y1`,u/2).attr(`x2`,l/2).attr(`y2`,u/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),Jh(t,f),t.calcIntersect=function(e,t){return eg.rect(e,t)},t.intersect=function(e){return eg.rect(t,e)},i}async function zye(e,t){return Fh(e,t,{padding:t.padding??0})}function Bye(e){return e in Sg}var Vye,Hye,Gh,Uye,Wye,Kh,qh,Jh,Yh,Xh,Zh,Qh,Gye,$h,Kye,qye,eg,tg,ng,Jye,rg,Yye,ig,Xye,Zye,ag,Qye,og,$ye,ebe,tbe,sg,cg,lg,ug,nbe,rbe,ibe,abe,dg,fg,obe,pg,mg,hg,sbe,cbe,lbe,gg,_g,vg,yg,bg,xg,ube,dbe,fbe,Sg,Cg=o((()=>{Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),hf(),Th(),Vye=1,Hye=3,p(Eh,`configureLabelImages`),p(Dh,`hasTextBesidesImages`),Gh=3,Uye=32,Wye=p(async(e,t,n)=>{let r=Z(),i=e.insert(`g`).attr(`class`,n??`node default`).attr(`id`,t.domId||t.id),a=i.insert(`g`).attr(`class`,`label`).attr(`style`,Mp(t.labelStyle)),o=[{text:typeof t.label==`string`?t.label:t.label?.[0]??``,cssClass:`c4-name`},{text:t.stereotype,cssClass:`c4-type`},...(t.description??[]).map(e=>({text:e,cssClass:`c4-descr`}))].filter(e=>e.text),s=t.width?Math.max(t.width-2*(t.padding??0),Uye):Z().flowchart?.wrappingWidth??200,l=r.wrap?s:1/0,u=await Promise.all(o.map(async e=>{let n=a.append(`g`).attr(`class`,e.cssClass),i=await Km(n,_s(Wp(e.text??``),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},r);return Ac(i).selectAll(`tspan.text-outer-tspan`).attr(`text-anchor`,`middle`),Ac(i).selectAll(`tspan.text-inner-tspan`).attr(`font-weight`,null).attr(`font-style`,null),{el:n,box:n.node().getBBox()}})),d=Math.max(...u.map(({box:e})=>e.width),0),f=0;for(let{el:e,box:t}of u)e.attr(`transform`,`translate(${d/2-t.x-t.width/2}, ${f-t.y})`),f+=t.height+Gh;let p=u.length>0?f-Gh:0;return a.insert(`rect`,`:first-child`),a.attr(`transform`,`translate(${-d/2}, ${-p/2})`),{shapeSvg:i,bbox:a.node().getBBox(),halfPadding:(t.padding??0)/2,label:a}},`c4LabelHelper`),Kh=p(async(e,t,n)=>{if(t.stereotype!==void 0)return Wye(e,t,n);let r,i=t.useHtmlLabels||Ko(Z()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,Mp(t.labelStyle)),s;s=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let l=!!t.icon||!!t.img,u=t.labelType===`markdown`,d=await Km(o,_s(Wp(s),Z()),{useHtmlLabels:i,width:t.width||t.wrappingWidth||Z().flowchart?.wrappingWidth,classes:u?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:l,markdown:u},Z()),f=(t?.padding??0)/2,p;if(i){let e=d.children[0],t=Ac(d);await Eh(e),p=await Wm.measure(()=>e.getBoundingClientRect()),t.attr(`width`,p.width),t.attr(`height`,p.height)}else p=await Wm.measure(()=>d.getBBox());return i?o.attr(`transform`,`translate(`+-p.width/2+`, `+-p.height/2+`)`):o.attr(`transform`,`translate(0, `+-p.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-p.width/2+`, `+-p.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:p,halfPadding:f,label:o}},`labelHelper`),qh=p(async(e,t,n)=>{let r=n.useHtmlLabels??os(Z()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),a=await Km(i,_s(Wp(t),Z()),{useHtmlLabels:r,width:n.width||Z()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),o=n.padding/2,s;if(os(Z())){let e=a.children[0],t=Ac(a);s=await Wm.measure(()=>e.getBoundingClientRect()),t.attr(`width`,s.width),t.attr(`height`,s.height)}else s=await Wm.measure(()=>a.getBBox());return r?i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`):i.attr(`transform`,`translate(0, `+-s.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-s.width/2+`, `+-s.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},`insertLabel`),Jh=p((e,t,n)=>{if(n){e.width=n.width,e.height=n.height;return}let r=t.node().getBBox();e.width=r.width,e.height=r.height},`updateNodeBounds`),Yh=p((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`),p(Oh,`createPathFromPoints`),p(kh,`generateFullSineWavePoints`),p(Ah,`generateCirclePoints`),p(jh,`mergePaths`),Xh=p((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,l,u;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),l=a===0?0:s*i/a,u=s):(i<0&&(o=-o),l=o,u=i===0?0:o*a/i),{x:n+l,y:r+u}},`intersectRect`),Zh=p((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),Qh=p(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=Z(),s=os(o);return await Km(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),p(hve,`intersectNode`),Gye=hve,p(gve,`intersectEllipse`),$h=gve,p(_ve,`intersectCircle`),Kye=_ve,p(vve,`intersectLine`),p(Mh,`sameSign`),qye=vve,p(yve,`intersectPolygon`),eg={node:Gye,circle:Kye,ellipse:$h,polygon:yve,rect:Xh},p(bve,`anchor`),p(Nh,`generateArcPoints`),p(xve,`calculateArcSagitta`),p(Sve,`bowTieRect`),p(Cve,`bucket`),tg=20,ng=8,Jye=80,rg=8,p(wve,`collapsedGroup`),p(Ph,`insertPolygonShape`),Yye=[`right`,`left`,`up`,`down`],ig=`point`,Xye=p(e=>{let t=new Set;for(let n of e)switch(n){case`x`:t.add(`right`),t.add(`left`);break;case`y`:t.add(`up`),t.add(`down`);break;default:t.add(n)}return t},`expandAndDeduplicateDirections`),Zye=p(e=>Yye.filter(t=>e.has(t)).join(`|`)||ig,`getDirectionKey`),ag={"right|left|up|down":p(({height:e,midpoint:t,padding:n,width:r})=>[{x:0,y:0},{x:t,y:0},{x:r/2,y:2*n},{x:r-t,y:0},{x:r,y:0},{x:r,y:-e/3},{x:r+2*n,y:-e/2},{x:r,y:-2*e/3},{x:r,y:-e},{x:r-t,y:-e},{x:r/2,y:-e-2*n},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*n,y:-e/2},{x:0,y:-e/3}],`right|left|up|down`),"right|left|up":p(({height:e,midpoint:t,width:n})=>[{x:t,y:0},{x:n-t,y:0},{x:n,y:-e/2},{x:n-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],`right|left|up`),"right|left|down":p(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:t,y:-e},{x:n-t,y:-e},{x:n,y:0}],`right|left|down`),"right|up|down":p(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:n,y:-e+t},{x:0,y:-e}],`right|up|down`),"left|up|down":p(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:n,y:-e}],`left|up|down`),"right|left":p(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`right|left`),"up|down":p(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`up|down`),"right|up":p(({height:e,midpoint:t,width:n})=>[{x:0,y:0},{x:n,y:-t},{x:0,y:-e}],`right|up`),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],`right|down`),"left|up":p(({height:e,midpoint:t,width:n})=>[{x:n,y:0},{x:0,y:-t},{x:n,y:-e}],`left|up`),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],`left|down`),right:p(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e+n}],`right`),left:p(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:0},{x:t,y:-n},{x:r-t,y:-n},{x:r-t,y:-e+n},{x:t,y:-e+n},{x:t,y:-e},{x:0,y:-e/2}],`left`),up:p(({height:e,midpoint:t,padding:n,width:r})=>[{x:t,y:-n},{x:t,y:-e+n},{x:0,y:-e+n},{x:r/2,y:-e},{x:r,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n}],`up`),down:p(({height:e,midpoint:t,padding:n,width:r})=>[{x:r/2,y:0},{x:0,y:-n},{x:t,y:-n},{x:t,y:-e+n},{x:r-t,y:-e+n},{x:r-t,y:-n},{x:r,y:-n}],`down`),[ig]:()=>[{x:0,y:0}]},Qye=p((e,t,n,r)=>{let i=Xye(e),a=(n.padding??0)/2,o=t.height+4*a,s=o/2,l=r??t.width+2*s+2*a;return(ag[Zye(i)]??ag[ig])({height:o,midpoint:s,padding:a,width:l})},`getArrowPoints`),p(Tve,`block_arrow`),p(Eve,`browser`),og=12,p(Dve,`card`),p(Ove,`choice`),p(Fh,`circle`),p(kve,`composite`),p(Ave,`consoleWindow`),p(jve,`createLine`),p(Mve,`crossedCircle`),p(Ih,`generateCirclePoints`),p(Nve,`curlyBraceLeft`),p(Lh,`generateCirclePoints`),p(Pve,`curlyBraceRight`),p(Rh,`generateCirclePoints`),p(Fve,`curlyBraces`),p(Ive,`curvedTrapezoid`),p(Lve,`person`),$ye=p((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),ebe=p((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),tbe=p((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),sg=8,cg=8,p(Rve,`cylinder`),p(zh,`drawRect`),p(zve,`datastore`),p(Bve,`dividedRectangle`),p(Vve,`doublecircle`),p(Hve,`filledCircle`),lg=10,ug=10,p(Uve,`flippedTriangle`),p(Wve,`folder`),p(Gve,`forkJoin`),p(Kve,`halfRoundedRectangle`),nbe=p((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`),p(qve,`hexagon`),p(Jve,`hourglass`),p(Yve,`icon`),p(Xve,`iconCircle`),p(Zve,`iconRounded`),p(Qve,`iconSquare`),p($ve,`imageSquare`),p(eye,`inv_trapezoid`),p(tye,`labelRect`),p(nye,`lean_left`),p(rye,`lean_right`),p(iye,`lightningBolt`),rbe=p((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),ibe=p((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),abe=p((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),dg=10,fg=10,p(aye,`linedCylinder`),p(oye,`linedWaveEdgedRect`),p(sye,`multiRect`),p(cye,`multiWaveEdgedRectangle`),p(lye,`note`),obe=p((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`),p(uye,`question`),p(dye,`rect_left_inv_arrow`),p(fye,`rectWithTitle`),p(pye,`roundedRect`),pg=8,p(mye,`shadedProcess`),p(hye,`slopedRect`),p(gye,`squareRect`),p(_ye,`stadium`),p(vye,`state`),p(yye,`stateEnd`),p(bye,`stateStart`),mg=8,p(xye,`subroutine`),hg=.2,p(Sye,`taggedRect`),p(Cye,`taggedWaveEdgedRectangle`),p(wye,`text`),sbe=p((e,t,n,r,i,a)=>`M${e},${t}511- a${i},${a} 0,0,1 0,${-r}512- l${n},0513- a${i},${a} 0,0,1 0,${r}514- M${n},${-r}515- a${i},${a} 0,0,0 0,${r}516- l${-n},0`,`createCylinderPathD`),cbe=p((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),lbe=p((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),gg=5,_g=10,p(Tye,`tiltedCylinder`),p(Eye,`trapezoid`),p(Dye,`trapezoidalPentagon`),vg=10,yg=10,p(Oye,`triangle`),p(kye,`waveEdgedRectangle`),p(Aye,`waveRectangle`),bg=10,p(jye,`windowPane`),xg=new Set([`redux-color`,`redux-dark-color`]),ube=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),p(Bh,`erBox`),p(Vh,`addText`),p(Hh,`lineToPolygon`),p(Mye,`textHelper`),p(Uh,`addText`),p(Nye,`classBox`),p(Pye,`requirementBox`),p(Wh,`addText`),dbe=p(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`),p(Fye,`kanbanItem`),p(Iye,`bang`),p(Lye,`cloud`),p(Rye,`defaultMindmapNode`),p(zye,`mindmapCircle`),fbe=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:gye},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:pye},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:_ye},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:xye},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:Rve},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:zve},{semanticName:`Folder`,name:`Folder`,shortName:`folder`,description:`Folder or directory`,aliases:[`directory`],handler:Wve},{semanticName:`Bucket`,name:`Bucket`,shortName:`bucket`,description:`Object storage bucket`,handler:Cve},{semanticName:`Console`,name:`Console (terminal window)`,shortName:`console`,description:`Terminal or console window`,handler:Ave},{semanticName:`Browser`,name:`Browser`,shortName:`browser`,description:`Browser window`,handler:Eve},{semanticName:`Person`,name:`Person`,shortName:`person`,description:`Person (circular head above a rounded body)`,handler:Lve},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:Fh},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:Iye},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:Lye},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:uye},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:qve},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:rye},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:nye},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:Eye},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:eye},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:Vve},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:wye},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:Dve},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:mye},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:bye},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:yye},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Gve},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Jve},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:Nve},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:Pve},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:Fve},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:iye},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:kye},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:Kve},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:Tye},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:aye},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:Ive},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Bve},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:Oye},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:jye},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Hve},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:Dye},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Uve},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:hye},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:cye},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:sye},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:Sve},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:Mve},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:Cye},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:Sye},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:Aye},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:dye},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:oye}],Sg=p(()=>{let e=[...Object.entries({state:vye,choice:Ove,note:lye,composite:kve,rectWithTitle:fye,labelRect:tye,block_arrow:Tve,collapsedGroup:wve,iconSquare:Qve,iconCircle:Xve,icon:Yve,iconRounded:Zve,imageSquare:$ve,anchor:bve,kanbanItem:Fye,mindmapCircle:zye,defaultMindmapNode:Rye,classBox:Nye,erBox:Bh,requirementBox:Pye}),...fbe.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)(),p(Bye,`isValidShape`)}));async function wg(e,t,n){let r,i;t.shape===`rect`&&(t.shape=t.rx&&t.ry?`roundedRect`:`squareRect`);let a=t.shape?Sg[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,Mp(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),Eg.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}var Tg,Eg,pbe,mbe,Dg,Og=o((()=>{Cg(),Kp(),S(),h(),Tg=p(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`),Eg=new Map,p(wg,`insertNode`),pbe=p((e,t)=>{Eg.set(t.id,e)},`setNodeElem`),mbe=p(()=>{Eg.clear()},`clear`),Dg=p(e=>{let t=Eg.get(e.id);y.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`)})),hbe,kg,gbe,Ag,jg,_be,Mg=o((()=>{Og(),Cg(),Sf(),qm(),Zs(),S(),h(),hf(),Th(),hbe=p(async(e,t)=>{let n=Z(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,s=o,{labelStyles:l,nodeStyles:u,borderStyles:d,backgroundStyles:f}=bf(t),p=e.insert(`g`).attr(`class`,`cluster swimlane `+(t.cssClasses||``)).attr(`id`,t.id).attr(`data-id`,t.id).attr(`data-et`,`cluster`).attr(`data-look`,t.look),m=Ko(n.flowchart.htmlLabels),h=t.direction===`LR`,g=p.insert(`g`).attr(`class`,`cluster-label swimlane-label`),_=await Km(g,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}),v=_.getBBox();if(m){let e=_.children[0],t=Ac(_);v=e.getBoundingClientRect(),t.attr(`width`,v.width),t.attr(`height`,v.height)}let b=t.padding??0,x=t.width<=v.width+b?v.width+b:t.width;t.diff=t.width<=v.width+b?(x-t.width)/2-b:-b;let S=t.height,C=t.y-S/2,w=t.y+S/2,T=t.x-x/2,E=t.swimlaneContentTop===void 0?C+S/3:t.swimlaneContentTop,D=h?4:0,O=v.height+2*D,k,A;if(h){let e=Math.max(O,v.height+2*D),n=T+e,r=Math.max(0,x-e);if(t.look===`handDrawn`){let o=wh.svg(p),l=xf(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),u=xf(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),m=o.rectangle(T,C,e,S,l);k=p.insert(()=>m,`:first-child`);let h=o.rectangle(n,C,r,S,u);A=p.insert(()=>h,`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),k.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else k=p.insert(`rect`,`:first-child`),A=p.insert(`rect`,`:first-child`),k.attr(`class`,`swimlane-title`).attr(`style`,u).attr(`x`,T).attr(`y`,C).attr(`width`,e).attr(`height`,S).attr(`fill`,a).attr(`stroke`,s),A.attr(`class`,`swimlane-body`).attr(`style`,u).attr(`x`,n).attr(`y`,C).attr(`width`,r).attr(`height`,S).attr(`fill`,`none`).attr(`stroke`,s);let o=T+e/2,l=t.y;g.attr(`transform`,`translate(${o}, ${l}) rotate(-90) translate(${-v.width/2}, ${-v.height/2})`)}else{let e=Math.max(0,E-C),n=Math.min(O,e),r=C+n,o=Math.max(0,w-r),l=t.x-x/2;if(t.look===`handDrawn`){let e=wh.svg(p),u=xf(t,{roughness:.7,fill:a,stroke:s,fillWeight:3,seed:i}),m=xf(t,{roughness:.7,fill:`none`,stroke:s,seed:i}),h=e.rectangle(l,C,x,n,u);k=p.insert(()=>h,`:first-child`);let g=e.rectangle(l,r,x,o,m);A=p.insert(()=>g,`:first-child`),k.select(`path:nth-child(2)`).attr(`style`,d.join(`;`)),k.select(`path`).attr(`style`,f.join(`;`).replace(`fill`,`stroke`))}else k=p.insert(`rect`,`:first-child`),A=p.insert(`rect`,`:first-child`),k.attr(`class`,`swimlane-title`).attr(`style`,u).attr(`x`,l).attr(`y`,C).attr(`width`,x).attr(`height`,n).attr(`fill`,a).attr(`stroke`,s),A.attr(`class`,`swimlane-body`).attr(`style`,u).attr(`x`,l).attr(`y`,r).attr(`width`,x).attr(`height`,o).attr(`fill`,`none`).attr(`stroke`,s);let m=t.x-v.width/2,h=C+(n-v.height)/2;g.attr(`transform`,`translate(${m}, ${h})`)}if(y.trace(`Swimlane data `,t,JSON.stringify(t)),l){let e=g.select(`span`);e&&e.attr(`style`,l)}return t.offsetX=0,t.width=x,t.height=S,t.offsetY=v.height-b/2,t.intersect=function(e){return Xh(t,e)},{cluster:p,labelBBox:v}},`swimlane`),kg=p(async(e,t)=>{y.info(`Creating subgraph rect for `,t.id,t);let n=Z(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:l,borderStyles:u,backgroundStyles:d}=bf(t),f=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=os(n),m=f.insert(`g`).attr(`class`,`cluster-label `),h;h=t.labelType===`markdown`?await Km(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):await Qh(m,t.label,t.labelStyle||``,!1,!0);let g=h.getBBox();if(os(n)){let e=h.children[0],t=Ac(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.diff=t.width<=g.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height,b=t.x-_/2,x=t.y-v/2;y.trace(`Data `,t,JSON.stringify(t));let S;if(t.look===`handDrawn`){let e=wh.svg(f),n=xf(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),r=e.path(Zh(b,x,_,v,0),n);S=f.insert(()=>(y.debug(`Rough node insert CXC`,r),r),`:first-child`),S.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),S.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else S=f.insert(`rect`,`:first-child`),S.attr(`style`,l).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:C}=Tg(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+C})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let w=S.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return Xh(t,e)},{cluster:f,labelBBox:g}},`rect`),gbe={rect:kg,squareRect:kg,roundedWithTitle:p(async(e,t)=>{let n=Z(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:l}=r,u=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),d=u.insert(`g`,`:first-child`),f=u.insert(`g`).attr(`class`,`cluster-label`),p=u.append(`rect`),m=await Qh(f,t.label,t.labelStyle,void 0,!0),h=m.getBBox();if(os(n)){let e=m.children[0],t=Ac(m);h=e.getBoundingClientRect(),t.attr(`width`,h.width),t.attr(`height`,h.height)}let g=0*t.padding,_=g/2,v=(t.width<=h.width+t.padding?h.width+t.padding:t.width)+g;t.diff=t.width<=h.width+t.padding?(v-t.width)/2-t.padding:-t.padding;let y=t.height+g,b=t.height+g-h.height-6,x=t.x-v/2,S=t.y-y/2;t.width=v;let C=t.y-t.height/2-_+h.height+2,w;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=wh.svg(u),r=t.rx||t.ry?n.path(Zh(x,S,v,y,10),{roughness:.7,fill:s,fillStyle:`solid`,stroke:l,seed:i}):n.rectangle(x,S,v,y,{seed:i});w=u.insert(()=>r,`:first-child`);let d=n.rectangle(x,C,v,b,{fill:e?a:o,fillStyle:e?`hachure`:`solid`,stroke:l,seed:i});w=u.insert(()=>r,`:first-child`),p=u.insert(()=>d)}else w=d.insert(`rect`,`:first-child`),w.attr(`class`,`outer`).attr(`x`,x).attr(`y`,S).attr(`width`,v).attr(`height`,y).attr(`data-look`,t.look),p.attr(`class`,`inner`).attr(`x`,x).attr(`y`,C).attr(`width`,v).attr(`height`,b);return f.attr(`transform`,`translate(${t.x-h.width/2}, ${S+1-(os(n)?0:3)})`),t.height=w.node().getBBox().height,t.offsetX=0,t.offsetY=h.height-t.padding/2,t.labelBBox=h,t.intersect=function(e){return Xh(t,e)},{cluster:u,labelBBox:h}},`roundedWithTitle`),noteGroup:p((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return Xh(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:p((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=Z(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,l=t.width+s;t.diff=-t.padding;let u=t.height+s,d=t.x-l/2,f=t.y-u/2;t.width=l;let p;if(t.look===`handDrawn`){let e=wh.svg(a).rectangle(d,f,l,u,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});p=a.insert(()=>e,`:first-child`)}else{p=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),p.attr(`class`,e).attr(`x`,d).attr(`y`,f).attr(`width`,l).attr(`height`,u).attr(`data-look`,t.look)}return t.height=p.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return Xh(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:p(async(e,t)=>{y.info(`Creating subgraph rect for `,t.id,t);let n=Z(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:l,borderStyles:u,backgroundStyles:d}=bf(t),f=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=os(n),m=f.insert(`g`).attr(`class`,`cluster-label `),h=await Km(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),g=h.getBBox();if(os(n)){let e=h.children[0],t=Ac(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.diff=t.width<=g.width+t.padding?(_-t.width)/2-t.padding:-t.padding;let v=t.height,b=t.x-_/2,x=t.y-v/2;y.trace(`Data `,t,JSON.stringify(t));let S;if(t.look===`handDrawn`){let e=wh.svg(f),n=xf(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),r=e.path(Zh(b,x,_,v,t.rx),n);S=f.insert(()=>(y.debug(`Rough node insert CXC`,r),r),`:first-child`),S.select(`path:nth-child(2)`).attr(`style`,u.join(`;`)),S.select(`path`).attr(`style`,d.join(`;`).replace(`fill`,`stroke`))}else S=f.insert(`rect`,`:first-child`),S.attr(`style`,l).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:C}=Tg(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+C})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let w=S.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return Xh(t,e)},{cluster:f,labelBBox:g}},`kanbanSection`),swimlane:hbe},Ag=new Map,jg=p(async(e,t)=>{let n=await gbe[t.shape||`rect`](e,t);return Ag.set(t.id,n),n},`insertCluster`),_be=p(()=>{Ag=new Map},`clear`)}));function Ng(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=zg(e),t=zg(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}function Pg(e,t){os(Z())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}function vbe(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}function ybe(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],l=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=l.x-o.x,u=l.y-o.y,d=Math.hypot(e,r),f=Math.hypot(a,u);if(d<i||f<i){n+=`L${o.x},${o.y}`;continue}let p=e/d,m=r/d,h=a/f,g=u/f,_=p*h+m*g,v=Math.acos(Math.max(-1,Math.min(1,_)));if(v<i||Math.abs(Math.PI-v)<i){n+=`L${o.x},${o.y}`;continue}let y=Math.min(t/Math.sin(v/2),d/2,f/2),b=o.x-p*y,x=o.y-m*y,S=o.x+h*y,C=o.y+g*y;n+=`L${b},${x}`,n+=`Q${o.x},${o.y} ${S},${C}`}}return n}function Fg(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}function bbe(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&Lg[t.arrowTypeStart]){let r=Lg[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=Fg(i,a),s=r*Math.cos(o),l=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+l}let r=e.length;if(r>=2&&Lg[t.arrowTypeEnd]){let i=Lg[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=Fg(o,a),l=i*Math.cos(s),u=i*Math.sin(s);n[r-1].x=a.x-l,n[r-1].y=a.y-u}return n}var Ig,Lg,Rg,zg,xbe,Sbe,Cbe,wbe,Bg,Tbe,Vg,Hg,Ebe,Ug,Wg,Gg,Kg,Dbe,Obe,kbe,qg,Jg,Abe,jbe,Yg,Mbe,Nbe,Xg,Zg=o((()=>{Og(),Cg(),Sf(),qm(),Kp(),Zs(),S(),h(),hf(),Th(),Ig=p((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),Lg={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Rg={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5},p(Ng,`calculateDeltaAndAngle`),zg=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),xbe=p(e=>({x:p(function(t,n,r){let i=0,a=zg(r[0]).x<zg(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(Lg,e.arrowTypeStart)){let{angle:t,deltaX:n}=Ng(r[0],r[1]);i=Lg[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Lg,e.arrowTypeEnd)){let{angle:t,deltaX:n}=Ng(r[r.length-1],r[r.length-2]);i=Lg[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(zg(t).x-zg(r[r.length-1]).x),s=Math.abs(zg(t).y-zg(r[r.length-1]).y),l=Math.abs(zg(t).x-zg(r[0]).x),u=Math.abs(zg(t).y-zg(r[0]).y),d=Lg[e.arrowTypeStart],f=Lg[e.arrowTypeEnd];if(o<f&&o>0&&s<f){let e=f+1-o;e*=a===`right`?-1:1,i-=e}if(l<d&&l>0&&u<d){let e=d+1-l;e*=a===`right`?-1:1,i+=e}return zg(t).x+i},`x`),y:p(function(t,n,r){let i=0,a=zg(r[0]).y<zg(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(Lg,e.arrowTypeStart)){let{angle:t,deltaY:n}=Ng(r[0],r[1]);i=Lg[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Lg,e.arrowTypeEnd)){let{angle:t,deltaY:n}=Ng(r[r.length-1],r[r.length-2]);i=Lg[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(zg(t).y-zg(r[r.length-1]).y),s=Math.abs(zg(t).x-zg(r[r.length-1]).x),l=Math.abs(zg(t).y-zg(r[0]).y),u=Math.abs(zg(t).x-zg(r[0]).x),d=Lg[e.arrowTypeStart],f=Lg[e.arrowTypeEnd];if(o<f&&o>0&&s<f){let e=f+1-o;e*=a===`up`?-1:1,i-=e}if(l<d&&l>0&&u<d){let e=d+1-l;e*=a===`up`?-1:1,i+=e}return zg(t).y+i},`y`)}),`getLineFunctionsWithOffset`),Sbe=p((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&Bg(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&Bg(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),Cbe={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},wbe=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],Bg=p((e,t,n,r,i,a,o=!1,s)=>{if(!n||n===`none`)return;let l=Cbe[n],u=l&&wbe.includes(l.type);if(!l){y.warn(`Unknown arrow type: ${n}`);return}let d=`${i}_${a}-${l.type}${t===`start`?`Start`:`End`}${o&&u?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${d}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(d);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),l.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${d})`)},`addEdgeMarker`),Tbe=p(e=>typeof e==`string`?e:Z()?.flowchart?.curve,`resolveEdgeCurveType`),Vg=new Map,Hg=new Map,Ebe=p(()=>{Vg.clear(),Hg.clear()},`clear`),Ug=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),`hasEdgeLabel`),Wg=p(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),Gg=p(async(e,t)=>{let n=Z(),r=os(n),{labelStyles:i}=bf(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,l=await Km(e,t.label,{style:Wg(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(l),y.info(`abc82`,t,t.labelType);let u,d;if(r){let e=l.children[0],t=Ac(l);u=await Wm.measure(()=>e.getBoundingClientRect()),d=u,t.attr(`width`,u.width),t.attr(`height`,u.height)}else{let e=Ac(l).select(`text`).node();await Wm.measure(()=>{u=l.getBBox(),d=e&&typeof e.getBBox==`function`?e.getBBox():u})}o.attr(`transform`,Ig(d,r)),Vg.set(t.id,a),t.width=u.width,t.height=u.height;let f;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Qh(i,t.startLabelLeft,Wg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=Ac(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Ig(o,r)),Hg.get(t.id)||Hg.set(t.id,{}),Hg.get(t.id).startLeft=n,Pg(f,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Qh(i,t.startLabelRight,Wg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=Ac(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Ig(o,r)),Hg.get(t.id)||Hg.set(t.id,{}),Hg.get(t.id).startRight=n,Pg(f,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Qh(n,t.endLabelLeft,Wg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=Ac(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Ig(o,r)),Hg.get(t.id)||Hg.set(t.id,{}),Hg.get(t.id).endLeft=n,Pg(f,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Qh(n,t.endLabelRight,Wg(t.labelStyle)||``,!1,!1);f=a;let o=a.getBBox();if(r){let e=a.children[0],t=Ac(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Ig(o,r)),Hg.get(t.id)||Hg.set(t.id,{}),Hg.get(t.id).endRight=n,Pg(f,t.endLabelRight)}return l},`insertEdgeLabel`),p(Pg,`setTerminalWidth`),Kg=p((e,t)=>{y.debug(`Moving label abc88 `,e.id,e.label,Vg.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,r=Z(),{subGraphTitleTotalMargin:i}=Tg(r);if(e.label){let r=Vg.get(e.id),a=e.x,o=e.y;if(n){let r=Up.calcLabelPosition(n);y.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}r.attr(`transform`,`translate(${a}, ${o+i/2})`)}if(e.startLabelLeft){let t=Hg.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=Hg.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=Hg.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=Hg.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),Dbe=p((e,t)=>{if(!e?.isLabelEdge||!e?.id?.endsWith(`-to-label`)||!Array.isArray(t)||t.length!==2)return t;let[n,r]=t,i=Math.abs(r.x-n.x),a=Math.abs(r.y-n.y);return i<.001||a<.001?t:a>=i?[n,{x:n.x,y:r.y},r]:[n,{x:r.x,y:n.y},r]},`orthogonalizeToLabelClippedPoints`),Obe=p((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),kbe=p((e,t,n)=>{y.debug(`intersection calc abc89:517- outsidePoint: ${JSON.stringify(t)}518- insidePoint : ${JSON.stringify(n)}519- node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.x<t.x?o-a:o+a,l=e.height/2,u=Math.abs(t.y-n.y),d=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*o>Math.abs(r-t.x)*l){let e=n.y<t.y?t.y-l-i:i-l-t.y;s=d*e/u;let r={x:n.x<t.x?n.x+s:n.x-d+s,y:n.y<t.y?n.y+u-e:n.y-u+e};return s===0&&(r.x=t.x,r.y=t.y),d===0&&(r.x=t.x),u===0&&(r.y=t.y),y.debug(`abc89 top/bottom calc, Q ${u}, q ${e}, R ${d}, r ${s}`,r),r}{s=n.x<t.x?t.x-o-r:r-o-t.x;let e=u*s/d,i=n.x<t.x?n.x+d-s:n.x-d+s,a=n.y<t.y?n.y+e:n.y-e;return y.debug(`sides calc abc89, Q ${u}, q ${e}, R ${d}, r ${s}`,{_x:i,_y:a}),s===0&&(i=t.x,a=t.y),d===0&&(i=t.x),u===0&&(a=t.y),{x:i,y:a}}},`intersection`),qg=p((e,t)=>{y.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(y.info(`abc88 checking point`,e,t),!Obe(t,e)&&!i){let a=kbe(t,r,e);y.debug(`abc88 inside`,e,r,a),y.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?y.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else y.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),y.debug(`returning points`,n),n},`cutPathAtIntersect`),p(vbe,`extractCornerPoints`),Jg=p(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),Abe=p(function(e){let{cornerPointPositions:t}=vbe(e),n=[];for(let r=0;r<e.length;r++)if(t.includes(r)){let t=e[r-1],i=e[r+1],a=e[r],o=Jg(t,a,5),s=Jg(i,a,5),l=s.x-o.x,u=s.y-o.y;n.push(o);let d=Math.sqrt(2)*2,f={x:a.x,y:a.y};Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10?(y.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),f=a.x===o.x?{x:l<0?o.x-5+d:o.x+5-d,y:u<0?o.y-d:o.y+d}:{x:l<0?o.x-d:o.x+d,y:u<0?o.y-5+d:o.y+5-d}):y.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(f,s)}else n.push(e[r]);return n},`fixCorners`),jbe=p((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(Number.isFinite(i)?Math.max(0,i):0).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),Yg=p(function(e,t,n,r,i,a,o,s=!1){if(!o)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:l,layout:u}=Z(),d=t.points,f=!1,p=i;var m=a;let h=[];for(let e in t.cssCompiledStyles)yf(e)||h.push(t.cssCompiledStyles[e]);if(u===`swimlane`){if(m.intersect&&p.intersect&&Array.isArray(d)&&d.length>=2){if(d.length===2)d=[p.intersect(d[0]),m.intersect(d[1])];else{let e=d.slice(1,-1),t=e[0],n=e[e.length-1],r=.5,i=Math.abs(d[d.length-1].x-n.x)<r&&Math.abs(d[d.length-1].y-n.y)<r,a=p.intersect(t),o=i?n:m.intersect(n),s=Math.abs(o.x-n.x)<r&&Math.abs(o.y-n.y)<r,l=Math.abs(a.x-t.x)<r&&Math.abs(a.y-t.y)<r?[]:[a],u=s?[]:[o];d=[...l,...e,...u]}}d=Dbe(t,d)}else m.intersect&&p.intersect&&!s&&(d=d.slice(1,t.points.length-1),d.unshift(p.intersect(d[0])),d.push(m.intersect(d[d.length-1])));let g=btoa(JSON.stringify(d));t.toCluster&&(y.info(`to cluster abc88`,n.get(t.toCluster)),d=qg(t.points,n.get(t.toCluster).node),f=!0),t.fromCluster&&(y.debug(`from cluster abc88`,n.get(t.fromCluster),JSON.stringify(d,null,2)),d=qg(d.reverse(),n.get(t.fromCluster).node).reverse(),f=!0);let _=d.filter(e=>!Number.isNaN(e.y)),v=Tbe(t.curve);v!==`rounded`&&(_=Abe(_));let b=Kd;switch(v){case`linear`:b=Kd;break;case`basis`:b=$d;break;case`cardinal`:b=rf;break;case`bumpX`:b=Wpe;break;case`bumpY`:b=Gpe;break;case`catmullRom`:b=lf;break;case`monotoneX`:b=xme;break;case`monotoneY`:b=Sme;break;case`natural`:b=Eme;break;case`step`:b=Ome;break;case`stepAfter`:b=Ame;break;case`stepBefore`:b=kme;break;case`rounded`:b=Kd;break;default:b=$d}let{x,y:S}=xbe(t),C=qd().x(x).y(S).curve(b),w;switch(t.thickness){case`normal`:w=`edge-thickness-normal`;break;case`thick`:w=`edge-thickness-thick`;break;case`invisible`:w=`edge-thickness-invisible`;break;default:w=`edge-thickness-normal`}switch(t.pattern){case`solid`:w+=` edge-pattern-solid`;break;case`dotted`:w+=` edge-pattern-dotted`;break;case`dashed`:w+=` edge-pattern-dashed`;break;default:w+=` edge-pattern-solid`}let T,E=v===`rounded`?ybe(bbe(_,t),5):C(_),D=Array.isArray(t.style)?t.style:[t.style],O=D.find(e=>e?.startsWith(`stroke:`)),k=``;t.animate&&(k=`edge-animation-fast`),t.animation&&(k=`edge-animation-`+t.animation);let A=!1;if(t.look===`handDrawn`){let n=wh.svg(e);Object.assign([],_);let r=n.path(E,{roughness:.3,seed:l});w+=` transition`,T=Ac(r).select(`path`).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+w+(t.classes?` `+t.classes:``)+(k?` `+k:``)).attr(`style`,D?D.reduce((e,t)=>e+`;`+t,``):``);let i=T.attr(`d`);T.attr(`d`,i),e.node().appendChild(T.node())}else{let n=h.join(`;`),r=D?D.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(D?D.reduce((e,t)=>e+`;`+t,``):``);T=e.append(`path`).attr(`d`,E).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+w+(t.classes?` `+t.classes:``)+(k?` `+k:``)).attr(`style`,i),O=i.match(/stroke:([^;]+)/)?.[1],A=t.animate===!0||!!t.animation||n.includes(`animation`);let a=T.node(),s=typeof a.getTotalLength==`function`?a.getTotalLength():0,l=Rg[t.arrowTypeStart]||0,u=Rg[t.arrowTypeEnd]||0;if(t.look===`neo`&&!A){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?jbe(s,l,u):`0 ${l} ${s-l-u} ${u}`}; stroke-dashoffset: 0;`;T.attr(`style`,e+T.attr(`style`))}}T.attr(`data-edge`,!0),T.attr(`data-et`,`edge`),T.attr(`data-id`,t.id),T.attr(`data-points`,g),T.attr(`data-look`,Mp(t.look)),t.showPoints&&_.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let j=``;(Z().flowchart.arrowMarkerAbsolute||Z().state.arrowMarkerAbsolute)&&(j=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),y.info(`arrowTypeStart`,t.arrowTypeStart),y.info(`arrowTypeEnd`,t.arrowTypeEnd);let M=!A&&t?.look===`neo`;Sbe(T,t,j,o,r,M,O);let N=Math.floor(d.length/2),P=d[N];Up.isLabelCoordinateInPath(P,T.attr(`d`))||(f=!0);let F={};return f&&(F.updatedPath=d),F.originalPath=t.points,F},`insertEdge`),p(ybe,`generateRoundedPath`),p(Fg,`calculateDeltaAndAngle`),p(bbe,`applyMarkerOffsetsToPoints`),Mbe=p((e,t,n,r)=>{t.forEach(t=>{Nbe[t](e,n,r)})},`insertMarkers`),Nbe={extension:p((e,t,n)=>{y.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+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`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:p((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:p((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+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`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:p((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+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`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:p((e,t,n)=>{let{themeVariables:r}=es(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:p((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:p((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:p((e,t,n)=>{let{themeVariables:r}=es(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:p((e,t,n)=>{let{themeVariables:r}=es(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:p((e,t,n)=>{let{themeVariables:r}=es(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:p((e,t,n)=>{let{themeVariables:r}=es(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:p((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0520- L20,10521- M20,10522- L0,20`)},`requirement_arrow`),requirement_contains:p((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:p((e,t,n)=>{let{themeVariables:r}=es(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0523- L20,10524- M20,10525- L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:p((e,t,n)=>{let{themeVariables:r}=es(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},Xg=Mbe})),Qg,Pbe=o((()=>{Qg=typeof global==`object`&&global&&global.Object===Object&&global})),Fbe,$g,e_=o((()=>{Pbe(),Fbe=typeof self==`object`&&self&&self.Object===Object&&self,$g=Qg||Fbe||Function(`return this`)()})),t_,n_=o((()=>{e_(),t_=$g.Symbol}));function Ibe(e){var t=Lbe.call(e,i_),n=e[i_];try{e[i_]=void 0;var r=!0}catch{}var i=Rbe.call(e);return r&&(t?e[i_]=n:delete e[i_]),i}var r_,Lbe,Rbe,i_,zbe=o((()=>{n_(),r_=Object.prototype,Lbe=r_.hasOwnProperty,Rbe=r_.toString,i_=t_?t_.toStringTag:void 0}));function Bbe(e){return Vbe.call(e)}var Vbe,Hbe=o((()=>{Vbe=Object.prototype.toString}));function a_(e){return e==null?e===void 0?Wbe:Ube:o_&&o_ in Object(e)?Ibe(e):Bbe(e)}var Ube,Wbe,o_,s_=o((()=>{n_(),zbe(),Hbe(),Ube=`[object Null]`,Wbe=`[object Undefined]`,o_=t_?t_.toStringTag:void 0}));function c_(e){return typeof e==`object`&&!!e}var l_=o((()=>{}));function u_(e){return typeof e==`symbol`||c_(e)&&a_(e)==Gbe}var Gbe,d_=o((()=>{s_(),l_(),Gbe=`[object Symbol]`}));function f_(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var p_=o((()=>{})),m_,h_=o((()=>{m_=Array.isArray}));function Kbe(e){if(typeof e==`string`)return e;if(m_(e))return f_(e,Kbe)+``;if(u_(e))return __?__.call(e):``;var t=e+``;return t==`0`&&1/e==-qbe?`-0`:t}var qbe,g_,__,Jbe=o((()=>{n_(),p_(),h_(),d_(),qbe=1/0,g_=t_?t_.prototype:void 0,__=g_?g_.toString:void 0}));function Ybe(e){for(var t=e.length;t--&&Xbe.test(e.charAt(t)););return t}var Xbe,Zbe=o((()=>{Xbe=/\s/}));function Qbe(e){return e&&e.slice(0,Ybe(e)+1).replace($be,``)}var $be,exe=o((()=>{Zbe(),$be=/^\s+/}));function v_(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}var y_=o((()=>{}));function txe(e){if(typeof e==`number`)return e;if(u_(e))return b_;if(v_(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=v_(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=Qbe(e);var n=rxe.test(e);return n||ixe.test(e)?axe(e.slice(2),n?2:8):nxe.test(e)?b_:+e}var b_,nxe,rxe,ixe,axe,oxe=o((()=>{exe(),y_(),d_(),b_=NaN,nxe=/^[-+]0x[0-9a-f]+$/i,rxe=/^0b[01]+$/i,ixe=/^0o[0-7]+$/i,axe=parseInt}));function x_(e){return e?(e=txe(e),e===S_||e===-S_?(e<0?-1:1)*sxe:e===e?e:0):e===0?e:0}var S_,sxe,C_=o((()=>{oxe(),S_=1/0,sxe=17976931348623157e292}));function cxe(e){var t=x_(e),n=t%1;return t===t?n?t-n:t:0}var lxe=o((()=>{C_()}));function w_(e){return e}var T_=o((()=>{}));function E_(e){if(!v_(e))return!1;var t=a_(e);return t==dxe||t==fxe||t==uxe||t==pxe}var uxe,dxe,fxe,pxe,D_=o((()=>{s_(),y_(),uxe=`[object AsyncFunction]`,dxe=`[object Function]`,fxe=`[object GeneratorFunction]`,pxe=`[object Proxy]`})),O_,mxe=o((()=>{e_(),O_=$g[`__core-js_shared__`]}));function hxe(e){return!!k_&&k_ in e}var k_,gxe=o((()=>{mxe(),k_=function(){var e=/[^.]+$/.exec(O_&&O_.keys&&O_.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}()}));function A_(e){if(e!=null){try{return _xe.call(e)}catch{}try{return e+``}catch{}}return``}var _xe,vxe=o((()=>{_xe=Function.prototype.toString}));function yxe(e){return!v_(e)||hxe(e)?!1:(E_(e)?Exe:xxe).test(A_(e))}var bxe,xxe,Sxe,Cxe,wxe,Txe,Exe,j_=o((()=>{D_(),gxe(),y_(),vxe(),bxe=/[\\^$.*+?()[\]{}|]/g,xxe=/^\[object .+?Constructor\]$/,Sxe=Function.prototype,Cxe=Object.prototype,wxe=Sxe.toString,Txe=Cxe.hasOwnProperty,Exe=RegExp(`^`+wxe.call(Txe).replace(bxe,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`)}));function Dxe(e,t){return e?.[t]}var Oxe=o((()=>{}));function M_(e,t){var n=Dxe(e,t);return yxe(n)?n:void 0}var N_=o((()=>{j_(),Oxe()})),P_,kxe=o((()=>{N_(),e_(),P_=M_($g,`WeakMap`)})),F_,Axe,jxe=o((()=>{y_(),F_=Object.create,Axe=function(){function e(){}return function(t){if(!v_(t))return{};if(F_)return F_(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}()}));function Mxe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var Nxe=o((()=>{}));function Pxe(){}var Fxe=o((()=>{}));function Ixe(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}var I_=o((()=>{}));function Lxe(e){var t=0,n=0;return function(){var r=Bxe(),i=zxe-(r-n);if(n=r,i>0){if(++t>=Rxe)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Rxe,zxe,Bxe,Vxe=o((()=>{Rxe=800,zxe=16,Bxe=Date.now}));function L_(e){return function(){return e}}var Hxe=o((()=>{})),R_,Uxe=o((()=>{N_(),R_=function(){try{var e=M_(Object,`defineProperty`);return e({},``,{}),e}catch{}}()})),Wxe,Gxe=o((()=>{Hxe(),Uxe(),T_(),Wxe=R_?function(e,t){return R_(e,`toString`,{configurable:!0,enumerable:!1,value:L_(t),writable:!0})}:w_})),z_,B_=o((()=>{Gxe(),Vxe(),z_=Lxe(Wxe)}));function Kxe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var V_=o((()=>{}));function qxe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}var H_=o((()=>{}));function Jxe(e){return e!==e}var Yxe=o((()=>{}));function Xxe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}var Zxe=o((()=>{}));function Qxe(e,t,n){return t===t?Xxe(e,t,n):qxe(e,Jxe,n)}var $xe=o((()=>{H_(),Yxe(),Zxe()}));function eSe(e,t){return!!(e!=null&&e.length)&&Qxe(e,t,0)>-1}var tSe=o((()=>{$xe()}));function U_(e,t){var n=typeof e;return t??=nSe,!!t&&(n==`number`||n!=`symbol`&&rSe.test(e))&&e>-1&&e%1==0&&e<t}var nSe,rSe,W_=o((()=>{nSe=9007199254740991,rSe=/^(?:0|[1-9]\d*)$/}));function G_(e,t,n){t==`__proto__`&&R_?R_(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var K_=o((()=>{Uxe()}));function q_(e,t){return e===t||e!==e&&t!==t}var J_=o((()=>{}));function Y_(e,t,n){var r=e[t];(!(iSe.call(e,t)&&q_(r,n))||n===void 0&&!(t in e))&&G_(e,t,n)}var iSe,X_=o((()=>{K_(),J_(),iSe=Object.prototype.hasOwnProperty}));function Z_(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?G_(n,s,l):Y_(n,s,l)}return n}var Q_=o((()=>{X_(),K_()}));function aSe(e,t,n){return t=$_(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=$_(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),Mxe(e,this,s)}}var $_,oSe=o((()=>{Nxe(),$_=Math.max}));function ev(e,t){return z_(aSe(e,t,w_),e+``)}var tv=o((()=>{T_(),oSe(),B_()}));function nv(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=sSe}var sSe,rv=o((()=>{sSe=9007199254740991}));function iv(e){return e!=null&&nv(e.length)&&!E_(e)}var av=o((()=>{D_(),rv()}));function ov(e,t,n){if(!v_(n))return!1;var r=typeof t;return(r==`number`?iv(n)&&U_(t,n.length):r==`string`&&t in n)?q_(n[t],e):!1}var sv=o((()=>{J_(),av(),W_(),y_()}));function cSe(e){return ev(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&ov(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}var lSe=o((()=>{tv(),sv()}));function cv(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||uSe)}var uSe,lv=o((()=>{uSe=Object.prototype}));function dSe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var fSe=o((()=>{}));function pSe(e){return c_(e)&&a_(e)==mSe}var mSe,hSe=o((()=>{s_(),l_(),mSe=`[object Arguments]`})),uv,gSe,_Se,dv,fv=o((()=>{hSe(),l_(),uv=Object.prototype,gSe=uv.hasOwnProperty,_Se=uv.propertyIsEnumerable,dv=pSe(function(){return arguments}())?pSe:function(e){return c_(e)&&gSe.call(e,`callee`)&&!_Se.call(e,`callee`)}}));function vSe(){return!1}var ySe=o((()=>{})),pv,mv,hv,gv,_v=o((()=>{e_(),ySe(),pv=typeof exports==`object`&&exports&&!exports.nodeType&&exports,mv=pv&&typeof module==`object`&&module&&!module.nodeType&&module,hv=mv&&mv.exports===pv?$g.Buffer:void 0,gv=(hv?hv.isBuffer:void 0)||vSe}));function bSe(e){return c_(e)&&nv(e.length)&&!!vv[a_(e)]}var xSe,SSe,CSe,wSe,TSe,ESe,DSe,OSe,kSe,ASe,jSe,MSe,NSe,PSe,FSe,ISe,LSe,RSe,zSe,BSe,VSe,HSe,USe,WSe,vv,GSe=o((()=>{s_(),rv(),l_(),xSe=`[object Arguments]`,SSe=`[object Array]`,CSe=`[object Boolean]`,wSe=`[object Date]`,TSe=`[object Error]`,ESe=`[object Function]`,DSe=`[object Map]`,OSe=`[object Number]`,kSe=`[object Object]`,ASe=`[object RegExp]`,jSe=`[object Set]`,MSe=`[object String]`,NSe=`[object WeakMap]`,PSe=`[object ArrayBuffer]`,FSe=`[object DataView]`,ISe=`[object Float32Array]`,LSe=`[object Float64Array]`,RSe=`[object Int8Array]`,zSe=`[object Int16Array]`,BSe=`[object Int32Array]`,VSe=`[object Uint8Array]`,HSe=`[object Uint8ClampedArray]`,USe=`[object Uint16Array]`,WSe=`[object Uint32Array]`,vv={},vv[ISe]=vv[LSe]=vv[RSe]=vv[zSe]=vv[BSe]=vv[VSe]=vv[HSe]=vv[USe]=vv[WSe]=!0,vv[xSe]=vv[SSe]=vv[PSe]=vv[CSe]=vv[FSe]=vv[wSe]=vv[TSe]=vv[ESe]=vv[DSe]=vv[OSe]=vv[kSe]=vv[ASe]=vv[jSe]=vv[MSe]=vv[NSe]=!1}));function yv(e){return function(t){return e(t)}}var bv=o((()=>{})),xv,Sv,Cv,wv,Tv=o((()=>{Pbe(),xv=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Sv=xv&&typeof module==`object`&&module&&!module.nodeType&&module,Cv=Sv&&Sv.exports===xv&&Qg.process,wv=function(){try{return Sv&&Sv.require&&Sv.require(`util`).types||Cv&&Cv.binding&&Cv.binding(`util`)}catch{}}()})),Ev,Dv,Ov=o((()=>{GSe(),bv(),Tv(),Ev=wv&&wv.isTypedArray,Dv=Ev?yv(Ev):bSe}));function KSe(e,t){var n=m_(e),r=!n&&dv(e),i=!n&&!r&&gv(e),a=!n&&!r&&!i&&Dv(e),o=n||r||i||a,s=o?dSe(e.length,String):[],l=s.length;for(var u in e)(t||qSe.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||U_(u,l)))&&s.push(u);return s}var qSe,JSe=o((()=>{fSe(),fv(),h_(),_v(),W_(),Ov(),qSe=Object.prototype.hasOwnProperty}));function YSe(e,t){return function(n){return e(t(n))}}var XSe=o((()=>{})),ZSe,QSe=o((()=>{XSe(),ZSe=YSe(Object.keys,Object)}));function $Se(e){if(!cv(e))return ZSe(e);var t=[];for(var n in Object(e))eCe.call(e,n)&&n!=`constructor`&&t.push(n);return t}var eCe,kv=o((()=>{lv(),QSe(),eCe=Object.prototype.hasOwnProperty}));function Av(e){return iv(e)?KSe(e):$Se(e)}var jv=o((()=>{JSe(),kv(),av()}));function tCe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var nCe=o((()=>{}));function rCe(e){if(!v_(e))return tCe(e);var t=cv(e),n=[];for(var r in e)r==`constructor`&&(t||!iCe.call(e,r))||n.push(r);return n}var iCe,aCe=o((()=>{y_(),lv(),nCe(),iCe=Object.prototype.hasOwnProperty}));function Mv(e){return iv(e)?KSe(e,!0):rCe(e)}var Nv=o((()=>{JSe(),aCe(),av()}));function Pv(e,t){if(m_(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||u_(e)?!0:sCe.test(e)||!oCe.test(e)||t!=null&&e in Object(t)}var oCe,sCe,Fv=o((()=>{h_(),d_(),oCe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sCe=/^\w*$/})),Iv,Lv=o((()=>{N_(),Iv=M_(Object,`create`)}));function cCe(){this.__data__=Iv?Iv(null):{},this.size=0}var lCe=o((()=>{Lv()}));function uCe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}var dCe=o((()=>{}));function fCe(e){var t=this.__data__;if(Iv){var n=t[e];return n===pCe?void 0:n}return mCe.call(t,e)?t[e]:void 0}var pCe,mCe,hCe=o((()=>{Lv(),pCe=`__lodash_hash_undefined__`,mCe=Object.prototype.hasOwnProperty}));function gCe(e){var t=this.__data__;return Iv?t[e]!==void 0:_Ce.call(t,e)}var _Ce,vCe=o((()=>{Lv(),_Ce=Object.prototype.hasOwnProperty}));function yCe(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Iv&&t===void 0?bCe:t,this}var bCe,xCe=o((()=>{Lv(),bCe=`__lodash_hash_undefined__`}));function Rv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var SCe=o((()=>{lCe(),dCe(),hCe(),vCe(),xCe(),Rv.prototype.clear=cCe,Rv.prototype.delete=uCe,Rv.prototype.get=fCe,Rv.prototype.has=gCe,Rv.prototype.set=yCe}));function CCe(){this.__data__=[],this.size=0}var wCe=o((()=>{}));function zv(e,t){for(var n=e.length;n--;)if(q_(e[n][0],t))return n;return-1}var Bv=o((()=>{J_()}));function TCe(e){var t=this.__data__,n=zv(t,e);return n<0?!1:(n==t.length-1?t.pop():ECe.call(t,n,1),--this.size,!0)}var ECe,DCe=o((()=>{Bv(),ECe=Array.prototype.splice}));function OCe(e){var t=this.__data__,n=zv(t,e);return n<0?void 0:t[n][1]}var kCe=o((()=>{Bv()}));function ACe(e){return zv(this.__data__,e)>-1}var jCe=o((()=>{Bv()}));function MCe(e,t){var n=this.__data__,r=zv(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var NCe=o((()=>{Bv()}));function Vv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var Hv=o((()=>{wCe(),DCe(),kCe(),jCe(),NCe(),Vv.prototype.clear=CCe,Vv.prototype.delete=TCe,Vv.prototype.get=OCe,Vv.prototype.has=ACe,Vv.prototype.set=MCe})),Uv,Wv=o((()=>{N_(),e_(),Uv=M_($g,`Map`)}));function PCe(){this.size=0,this.__data__={hash:new Rv,map:new(Uv||Vv),string:new Rv}}var FCe=o((()=>{SCe(),Hv(),Wv()}));function ICe(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}var LCe=o((()=>{}));function Gv(e,t){var n=e.__data__;return ICe(t)?n[typeof t==`string`?`string`:`hash`]:n.map}var Kv=o((()=>{LCe()}));function RCe(e){var t=Gv(this,e).delete(e);return this.size-=+!!t,t}var zCe=o((()=>{Kv()}));function BCe(e){return Gv(this,e).get(e)}var VCe=o((()=>{Kv()}));function HCe(e){return Gv(this,e).has(e)}var UCe=o((()=>{Kv()}));function WCe(e,t){var n=Gv(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var GCe=o((()=>{Kv()}));function qv(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var Jv=o((()=>{FCe(),zCe(),VCe(),UCe(),GCe(),qv.prototype.clear=PCe,qv.prototype.delete=RCe,qv.prototype.get=BCe,qv.prototype.has=HCe,qv.prototype.set=WCe}));function Yv(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(KCe);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Yv.Cache||qv),n}var KCe,qCe=o((()=>{Jv(),KCe=`Expected a function`,Yv.Cache=qv}));function JCe(e){var t=Yv(e,function(e){return n.size===YCe&&n.clear(),e}),n=t.cache;return t}var YCe,XCe=o((()=>{qCe(),YCe=500})),ZCe,QCe,$Ce,ewe=o((()=>{XCe(),ZCe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,QCe=/\\(\\)?/g,$Ce=JCe(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(ZCe,function(e,n,r,i){t.push(r?i.replace(QCe,`$1`):n||e)}),t})}));function twe(e){return e==null?``:Kbe(e)}var Xv=o((()=>{Jbe()}));function Zv(e,t){return m_(e)?e:Pv(e,t)?[e]:$Ce(twe(e))}var Qv=o((()=>{h_(),Fv(),ewe(),Xv()}));function $v(e){if(typeof e==`string`||u_(e))return e;var t=e+``;return t==`0`&&1/e==-nwe?`-0`:t}var nwe,ey=o((()=>{d_(),nwe=1/0}));function ty(e,t){t=Zv(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[$v(t[n++])];return n&&n==r?e:void 0}var ny=o((()=>{Qv(),ey()}));function rwe(e,t,n){var r=e==null?void 0:ty(e,t);return r===void 0?n:r}var ry=o((()=>{ny()}));function iy(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ay=o((()=>{}));function iwe(e){return m_(e)||dv(e)||!!(oy&&e&&e[oy])}var oy,awe=o((()=>{n_(),fv(),h_(),oy=t_?t_.isConcatSpreadable:void 0}));function sy(e,t,n,r,i){var a=-1,o=e.length;for(n||=iwe,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?sy(s,t-1,n,r,i):iy(i,s):r||(i[i.length]=s)}return i}var cy=o((()=>{ay(),awe()}));function ly(e){return e!=null&&e.length?sy(e,1):[]}var owe=o((()=>{cy()}));function swe(e){return z_(aSe(e,void 0,ly),e+``)}var cwe=o((()=>{owe(),oSe(),B_()})),uy,dy=o((()=>{XSe(),uy=YSe(Object.getPrototypeOf,Object)}));function lwe(e){if(!c_(e)||a_(e)!=uwe)return!1;var t=uy(e);if(t===null)return!0;var n=pwe.call(t,`constructor`)&&t.constructor;return typeof n==`function`&&n instanceof n&&fy.call(n)==mwe}var uwe,dwe,fwe,fy,pwe,mwe,hwe=o((()=>{s_(),dy(),l_(),uwe=`[object Object]`,dwe=Function.prototype,fwe=Object.prototype,fy=dwe.toString,pwe=fwe.hasOwnProperty,mwe=fy.call(Object)})),gwe=o((()=>{}));function _we(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}var vwe=o((()=>{}));function ywe(){this.__data__=new Vv,this.size=0}var bwe=o((()=>{Hv()}));function xwe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var Swe=o((()=>{}));function Cwe(e){return this.__data__.get(e)}var wwe=o((()=>{}));function Twe(e){return this.__data__.has(e)}var Ewe=o((()=>{}));function Dwe(e,t){var n=this.__data__;if(n instanceof Vv){var r=n.__data__;if(!Uv||r.length<Owe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qv(r)}return n.set(e,t),this.size=n.size,this}var Owe,kwe=o((()=>{Hv(),Wv(),Jv(),Owe=200}));function py(e){var t=this.__data__=new Vv(e);this.size=t.size}var my=o((()=>{Hv(),bwe(),Swe(),wwe(),Ewe(),kwe(),py.prototype.clear=ywe,py.prototype.delete=xwe,py.prototype.get=Cwe,py.prototype.has=Twe,py.prototype.set=Dwe}));function Awe(e,t){return e&&Z_(t,Av(t),e)}var jwe=o((()=>{Q_(),jv()}));function Mwe(e,t){return e&&Z_(t,Mv(t),e)}var Nwe=o((()=>{Q_(),Nv()}));function Pwe(e,t){if(t)return e.slice();var n=e.length,r=vy?vy(n):new e.constructor(n);return e.copy(r),r}var hy,gy,_y,vy,Fwe=o((()=>{e_(),hy=typeof exports==`object`&&exports&&!exports.nodeType&&exports,gy=hy&&typeof module==`object`&&module&&!module.nodeType&&module,_y=gy&&gy.exports===hy?$g.Buffer:void 0,vy=_y?_y.allocUnsafe:void 0}));function Iwe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var yy=o((()=>{}));function Lwe(){return[]}var by=o((()=>{})),Rwe,xy,Sy,Cy=o((()=>{yy(),by(),Rwe=Object.prototype.propertyIsEnumerable,xy=Object.getOwnPropertySymbols,Sy=xy?function(e){return e==null?[]:(e=Object(e),Iwe(xy(e),function(t){return Rwe.call(e,t)}))}:Lwe}));function zwe(e,t){return Z_(e,Sy(e),t)}var Bwe=o((()=>{Q_(),Cy()})),wy,Vwe=o((()=>{ay(),dy(),Cy(),by(),wy=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)iy(t,Sy(e)),e=uy(e);return t}:Lwe}));function Hwe(e,t){return Z_(e,wy(e),t)}var Uwe=o((()=>{Q_(),Vwe()}));function Wwe(e,t,n){var r=t(e);return m_(e)?r:iy(r,n(e))}var Gwe=o((()=>{ay(),h_()}));function Ty(e){return Wwe(e,Av,Sy)}var Kwe=o((()=>{Gwe(),Cy(),jv()}));function qwe(e){return Wwe(e,Mv,wy)}var Jwe=o((()=>{Gwe(),Vwe(),Nv()})),Ey,Ywe=o((()=>{N_(),e_(),Ey=M_($g,`DataView`)})),Dy,Xwe=o((()=>{N_(),e_(),Dy=M_($g,`Promise`)})),Oy,Zwe=o((()=>{N_(),e_(),Oy=M_($g,`Set`)})),ky,Qwe,Ay,jy,My,Ny,$we,eTe,tTe,nTe,rTe,Py,Fy,Iy=o((()=>{Ywe(),Wv(),Xwe(),Zwe(),kxe(),s_(),vxe(),ky=`[object Map]`,Qwe=`[object Object]`,Ay=`[object Promise]`,jy=`[object Set]`,My=`[object WeakMap]`,Ny=`[object DataView]`,$we=A_(Ey),eTe=A_(Uv),tTe=A_(Dy),nTe=A_(Oy),rTe=A_(P_),Py=a_,(Ey&&Py(new Ey(new ArrayBuffer(1)))!=Ny||Uv&&Py(new Uv)!=ky||Dy&&Py(Dy.resolve())!=Ay||Oy&&Py(new Oy)!=jy||P_&&Py(new P_)!=My)&&(Py=function(e){var t=a_(e),n=t==Qwe?e.constructor:void 0,r=n?A_(n):``;if(r)switch(r){case $we:return Ny;case eTe:return ky;case tTe:return Ay;case nTe:return jy;case rTe:return My}return t}),Fy=Py}));function iTe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&aTe.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}var aTe,oTe=o((()=>{aTe=Object.prototype.hasOwnProperty})),Ly,sTe=o((()=>{e_(),Ly=$g.Uint8Array}));function Ry(e){var t=new e.constructor(e.byteLength);return new Ly(t).set(new Ly(e)),t}var zy=o((()=>{sTe()}));function cTe(e,t){var n=t?Ry(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var lTe=o((()=>{zy()}));function uTe(e){var t=new e.constructor(e.source,dTe.exec(e));return t.lastIndex=e.lastIndex,t}var dTe,fTe=o((()=>{dTe=/\w*$/}));function pTe(e){return Vy?Object(Vy.call(e)):{}}var By,Vy,mTe=o((()=>{n_(),By=t_?t_.prototype:void 0,Vy=By?By.valueOf:void 0}));function hTe(e,t){var n=t?Ry(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var gTe=o((()=>{zy()}));function _Te(e,t,n){var r=e.constructor;switch(t){case ETe:return Ry(e);case vTe:case yTe:return new r(+e);case DTe:return cTe(e,n);case OTe:case kTe:case ATe:case jTe:case MTe:case NTe:case PTe:case FTe:case ITe:return hTe(e,n);case bTe:return new r;case xTe:case wTe:return new r(e);case STe:return uTe(e);case CTe:return new r;case TTe:return pTe(e)}}var vTe,yTe,bTe,xTe,STe,CTe,wTe,TTe,ETe,DTe,OTe,kTe,ATe,jTe,MTe,NTe,PTe,FTe,ITe,LTe=o((()=>{zy(),lTe(),fTe(),mTe(),gTe(),vTe=`[object Boolean]`,yTe=`[object Date]`,bTe=`[object Map]`,xTe=`[object Number]`,STe=`[object RegExp]`,CTe=`[object Set]`,wTe=`[object String]`,TTe=`[object Symbol]`,ETe=`[object ArrayBuffer]`,DTe=`[object DataView]`,OTe=`[object Float32Array]`,kTe=`[object Float64Array]`,ATe=`[object Int8Array]`,jTe=`[object Int16Array]`,MTe=`[object Int32Array]`,NTe=`[object Uint8Array]`,PTe=`[object Uint8ClampedArray]`,FTe=`[object Uint16Array]`,ITe=`[object Uint32Array]`}));function RTe(e){return typeof e.constructor==`function`&&!cv(e)?Axe(uy(e)):{}}var zTe=o((()=>{jxe(),dy(),lv()}));function BTe(e){return c_(e)&&Fy(e)==VTe}var VTe,HTe=o((()=>{Iy(),l_(),VTe=`[object Map]`})),Hy,UTe,WTe=o((()=>{HTe(),bv(),Tv(),Hy=wv&&wv.isMap,UTe=Hy?yv(Hy):BTe}));function GTe(e){return c_(e)&&Fy(e)==KTe}var KTe,qTe=o((()=>{Iy(),l_(),KTe=`[object Set]`})),Uy,JTe,YTe=o((()=>{qTe(),bv(),Tv(),Uy=wv&&wv.isSet,JTe=Uy?yv(Uy):GTe}));function Wy(e,t,n,r,i,a){var o,s=t&XTe,l=t&ZTe,u=t&QTe;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!v_(e))return e;var d=m_(e);if(d){if(o=iTe(e),!s)return Ixe(e,o)}else{var f=Fy(e),p=f==Ky||f==rEe;if(gv(e))return Pwe(e,s);if(f==qy||f==Gy||p&&!i){if(o=l||p?{}:RTe(e),!s)return l?Hwe(e,Mwe(o,e)):zwe(e,Awe(o,e))}else{if(!Jy[f])return i?e:{};o=_Te(e,f,s)}}a||=new py;var m=a.get(e);if(m)return m;a.set(e,o),JTe(e)?e.forEach(function(r){o.add(Wy(r,t,n,r,e,a))}):UTe(e)&&e.forEach(function(r,i){o.set(i,Wy(r,t,n,i,e,a))});var h=d?void 0:(u?l?qwe:Ty:l?Mv:Av)(e);return Kxe(h||e,function(r,i){h&&(i=r,r=e[i]),Y_(o,i,Wy(r,t,n,i,e,a))}),o}var XTe,ZTe,QTe,Gy,$Te,eEe,tEe,nEe,Ky,rEe,iEe,aEe,qy,oEe,sEe,cEe,lEe,uEe,dEe,fEe,pEe,mEe,hEe,gEe,_Ee,vEe,yEe,bEe,xEe,Jy,SEe=o((()=>{my(),V_(),X_(),jwe(),Nwe(),Fwe(),I_(),Bwe(),Uwe(),Kwe(),Jwe(),Iy(),oTe(),LTe(),zTe(),h_(),_v(),WTe(),y_(),YTe(),jv(),Nv(),XTe=1,ZTe=2,QTe=4,Gy=`[object Arguments]`,$Te=`[object Array]`,eEe=`[object Boolean]`,tEe=`[object Date]`,nEe=`[object Error]`,Ky=`[object Function]`,rEe=`[object GeneratorFunction]`,iEe=`[object Map]`,aEe=`[object Number]`,qy=`[object Object]`,oEe=`[object RegExp]`,sEe=`[object Set]`,cEe=`[object String]`,lEe=`[object Symbol]`,uEe=`[object WeakMap]`,dEe=`[object ArrayBuffer]`,fEe=`[object DataView]`,pEe=`[object Float32Array]`,mEe=`[object Float64Array]`,hEe=`[object Int8Array]`,gEe=`[object Int16Array]`,_Ee=`[object Int32Array]`,vEe=`[object Uint8Array]`,yEe=`[object Uint8ClampedArray]`,bEe=`[object Uint16Array]`,xEe=`[object Uint32Array]`,Jy={},Jy[Gy]=Jy[$Te]=Jy[dEe]=Jy[fEe]=Jy[eEe]=Jy[tEe]=Jy[pEe]=Jy[mEe]=Jy[hEe]=Jy[gEe]=Jy[_Ee]=Jy[iEe]=Jy[aEe]=Jy[qy]=Jy[oEe]=Jy[sEe]=Jy[cEe]=Jy[lEe]=Jy[vEe]=Jy[yEe]=Jy[bEe]=Jy[xEe]=!0,Jy[nEe]=Jy[Ky]=Jy[uEe]=!1}));function CEe(e){return Wy(e,wEe|TEe)}var wEe,TEe,EEe=o((()=>{SEe(),wEe=1,TEe=4}));function DEe(e){return this.__data__.set(e,OEe),this}var OEe,kEe=o((()=>{OEe=`__lodash_hash_undefined__`}));function AEe(e){return this.__data__.has(e)}var jEe=o((()=>{}));function Yy(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new qv;++t<n;)this.add(e[t])}var Xy=o((()=>{Jv(),kEe(),jEe(),Yy.prototype.add=Yy.prototype.push=DEe,Yy.prototype.has=AEe}));function MEe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var NEe=o((()=>{}));function PEe(e,t){return e.has(t)}var Zy=o((()=>{}));function FEe(e,t,n,r,i,a){var o=n&IEe,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&LEe?new Yy:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],g=t[f];if(r)var _=o?r(g,h,f,t,e,a):r(h,g,f,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!MEe(t,function(e,t){if(!PEe(m,t)&&(h===e||i(h,e,n,r,a)))return m.push(t)})){p=!1;break}}else if(!(h===g||i(h,g,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}var IEe,LEe,REe=o((()=>{Xy(),NEe(),Zy(),IEe=1,LEe=2}));function zEe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var BEe=o((()=>{}));function Qy(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var $y=o((()=>{}));function VEe(e,t,n,r,i,a,o){switch(n){case eDe:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case $Ee:return!(e.byteLength!=t.byteLength||!a(new Ly(e),new Ly(t)));case WEe:case GEe:case JEe:return q_(+e,+t);case KEe:return e.name==t.name&&e.message==t.message;case YEe:case ZEe:return e==t+``;case qEe:var s=zEe;case XEe:var l=r&HEe;if(s||=Qy,e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=UEe,o.set(e,t);var d=FEe(s(e),s(t),r,i,a,o);return o.delete(e),d;case QEe:if(tb)return tb.call(e)==tb.call(t)}return!1}var HEe,UEe,WEe,GEe,KEe,qEe,JEe,YEe,XEe,ZEe,QEe,$Ee,eDe,eb,tb,tDe=o((()=>{n_(),sTe(),J_(),REe(),BEe(),$y(),HEe=1,UEe=2,WEe=`[object Boolean]`,GEe=`[object Date]`,KEe=`[object Error]`,qEe=`[object Map]`,JEe=`[object Number]`,YEe=`[object RegExp]`,XEe=`[object Set]`,ZEe=`[object String]`,QEe=`[object Symbol]`,$Ee=`[object ArrayBuffer]`,eDe=`[object DataView]`,eb=t_?t_.prototype:void 0,tb=eb?eb.valueOf:void 0}));function nDe(e,t,n,r,i,a){var o=n&rDe,s=Ty(e),l=s.length;if(l!=Ty(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:iDe.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++u<l;){d=s[u];var g=e[d],_=t[d];if(r)var v=o?r(_,g,d,t,e,a):r(g,_,d,e,t,a);if(!(v===void 0?g===_||i(g,_,n,r,a):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(t),m}var rDe,iDe,aDe=o((()=>{Kwe(),rDe=1,iDe=Object.prototype.hasOwnProperty}));function oDe(e,t,n,r,i,a){var o=m_(e),s=m_(t),l=o?rb:Fy(e),u=s?rb:Fy(t);l=l==nb?ib:l,u=u==nb?ib:u;var d=l==ib,f=u==ib,p=l==u;if(p&&gv(e)){if(!gv(t))return!1;o=!0,d=!1}if(p&&!d)return a||=new py,o||Dv(e)?FEe(e,t,n,r,i,a):VEe(e,t,l,n,r,i,a);if(!(n&sDe)){var m=d&&ab.call(e,`__wrapped__`),h=f&&ab.call(t,`__wrapped__`);if(m||h){var g=m?e.value():e,_=h?t.value():t;return a||=new py,i(g,_,n,r,a)}}return p?(a||=new py,nDe(e,t,n,r,i,a)):!1}var sDe,nb,rb,ib,ab,cDe=o((()=>{my(),REe(),tDe(),aDe(),Iy(),h_(),_v(),Ov(),sDe=1,nb=`[object Arguments]`,rb=`[object Array]`,ib=`[object Object]`,ab=Object.prototype.hasOwnProperty}));function ob(e,t,n,r,i){return e===t?!0:e==null||t==null||!c_(e)&&!c_(t)?e!==e&&t!==t:oDe(e,t,n,r,ob,i)}var sb=o((()=>{cDe(),l_()}));function lDe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],d=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new py;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?ob(d,u,uDe|dDe,r,f):p))return!1}}return!0}var uDe,dDe,fDe=o((()=>{my(),sb(),uDe=1,dDe=2}));function pDe(e){return e===e&&!v_(e)}var mDe=o((()=>{y_()}));function hDe(e){for(var t=Av(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pDe(i)]}return t}var gDe=o((()=>{mDe(),jv()}));function _De(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}var vDe=o((()=>{}));function yDe(e){var t=hDe(e);return t.length==1&&t[0][2]?_De(t[0][0],t[0][1]):function(n){return n===e||lDe(n,e,t)}}var bDe=o((()=>{fDe(),gDe(),vDe()}));function xDe(e,t){return e!=null&&t in Object(e)}var SDe=o((()=>{}));function CDe(e,t,n){t=Zv(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=$v(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&nv(i)&&U_(o,i)&&(m_(e)||dv(e)))}var wDe=o((()=>{Qv(),fv(),h_(),W_(),rv(),ey()}));function TDe(e,t){return e!=null&&CDe(e,t,xDe)}var cb=o((()=>{SDe(),wDe()}));function EDe(e,t){return Pv(e)&&pDe(t)?_De($v(e),t):function(n){var r=rwe(n,e);return r===void 0&&r===t?TDe(n,e):ob(t,r,DDe|ODe)}}var DDe,ODe,kDe=o((()=>{sb(),ry(),cb(),Fv(),mDe(),vDe(),ey(),DDe=1,ODe=2}));function ADe(e){return function(t){return t?.[e]}}var lb=o((()=>{}));function jDe(e){return function(t){return ty(t,e)}}var MDe=o((()=>{ny()}));function NDe(e){return Pv(e)?ADe($v(e)):jDe(e)}var PDe=o((()=>{lb(),MDe(),Fv(),ey()}));function ub(e){return typeof e==`function`?e:e==null?w_:typeof e==`object`?m_(e)?EDe(e[0],e[1]):yDe(e):NDe(e)}var db=o((()=>{bDe(),kDe(),T_(),h_(),PDe()}));function FDe(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}var IDe=o((()=>{})),fb,pb=o((()=>{IDe(),fb=FDe()}));function mb(e,t){return e&&fb(e,t,Av)}var hb=o((()=>{pb(),jv()}));function LDe(e,t){return function(n,r){if(n==null)return n;if(!iv(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}var RDe=o((()=>{av()})),gb,_b=o((()=>{hb(),RDe(),gb=LDe(mb)})),vb,zDe=o((()=>{e_(),vb=function(){return $g.Date.now()}})),yb,BDe,VDe,HDe=o((()=>{tv(),J_(),sv(),Nv(),yb=Object.prototype,BDe=yb.hasOwnProperty,VDe=ev(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ov(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=Mv(a),s=-1,l=o.length;++s<l;){var u=o[s],d=e[u];(d===void 0||q_(d,yb[u])&&!BDe.call(e,u))&&(e[u]=a[u])}return e})}));function bb(e,t,n){(n!==void 0&&!q_(e[t],n)||n===void 0&&!(t in e))&&G_(e,t,n)}var UDe=o((()=>{K_(),J_()}));function WDe(e){return c_(e)&&iv(e)}var xb=o((()=>{av(),l_()}));function Sb(e,t){if((t!==`constructor`||typeof e[t]!=`function`)&&t!=`__proto__`)return e[t]}var GDe=o((()=>{}));function KDe(e){return Z_(e,Mv(e))}var qDe=o((()=>{Q_(),Nv()}));function JDe(e,t,n,r,i,a,o){var s=Sb(e,n),l=Sb(t,n),u=o.get(l);if(u){bb(e,n,u);return}var d=a?a(s,l,n+``,e,t,o):void 0,f=d===void 0;if(f){var p=m_(l),m=!p&&gv(l),h=!p&&!m&&Dv(l);d=l,p||m||h?m_(s)?d=s:WDe(s)?d=Ixe(s):m?(f=!1,d=Pwe(l,!0)):h?(f=!1,d=hTe(l,!0)):d=[]:lwe(l)||dv(l)?(d=s,dv(s)?d=KDe(s):(!v_(s)||E_(s))&&(d=RTe(l))):f=!1}f&&(o.set(l,d),i(d,l,r,a,o),o.delete(l)),bb(e,n,d)}var YDe=o((()=>{UDe(),Fwe(),gTe(),I_(),zTe(),fv(),h_(),xb(),_v(),D_(),y_(),hwe(),Ov(),GDe(),qDe()}));function XDe(e,t,n,r,i){e!==t&&fb(t,function(a,o){if(i||=new py,v_(a))JDe(e,t,o,n,XDe,r,i);else{var s=r?r(Sb(e,o),a,o+``,e,t,i):void 0;s===void 0&&(s=a),bb(e,o,s)}},Mv)}var ZDe=o((()=>{my(),UDe(),pb(),YDe(),y_(),Nv(),GDe()}));function QDe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}var $De=o((()=>{}));function Cb(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var eOe=o((()=>{}));function wb(e){return typeof e==`function`?e:w_}var Tb=o((()=>{T_()}));function Eb(e,t){return(m_(e)?Kxe:gb)(e,wb(t))}var tOe=o((()=>{V_(),_b(),Tb(),h_()})),nOe=o((()=>{tOe()}));function rOe(e,t){var n=[];return gb(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}var iOe=o((()=>{_b()}));function Db(e,t){return(m_(e)?Iwe:rOe)(e,ub(t,3))}var aOe=o((()=>{yy(),iOe(),db(),h_()}));function oOe(e){return function(t,n,r){var i=Object(t);if(!iv(t)){var a=ub(n,3);t=Av(t),n=function(e){return a(i[e],e,i)}}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}var sOe=o((()=>{db(),av(),jv()}));function cOe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:cxe(n);return i<0&&(i=lOe(r+i,0)),qxe(e,ub(t,3),i)}var lOe,uOe=o((()=>{H_(),db(),lxe(),lOe=Math.max})),Ob,dOe=o((()=>{sOe(),uOe(),Ob=oOe(cOe)}));function fOe(e,t){var n=-1,r=iv(e)?Array(e.length):[];return gb(e,function(e,i,a){r[++n]=t(e,i,a)}),r}var pOe=o((()=>{_b(),av()}));function kb(e,t){return(m_(e)?f_:fOe)(e,ub(t,3))}var mOe=o((()=>{p_(),db(),pOe(),h_()}));function hOe(e,t){return e==null?e:fb(e,wb(t),Mv)}var gOe=o((()=>{pb(),Tb(),Nv()}));function _Oe(e,t){return e&&mb(e,wb(t))}var vOe=o((()=>{hb(),Tb()}));function yOe(e,t){return e>t}var bOe=o((()=>{}));function xOe(e,t){return e!=null&&SOe.call(e,t)}var SOe,COe=o((()=>{SOe=Object.prototype.hasOwnProperty}));function wOe(e,t){return e!=null&&CDe(e,t,xOe)}var TOe=o((()=>{COe(),wDe()})),EOe=o((()=>{s_(),h_(),l_()}));function DOe(e,t){return f_(t,function(t){return e[t]})}var OOe=o((()=>{p_()}));function Ab(e){return e==null?[]:DOe(e,Av(e))}var kOe=o((()=>{OOe(),jv()}));function AOe(e){if(e==null)return!0;if(iv(e)&&(m_(e)||typeof e==`string`||typeof e.splice==`function`||gv(e)||Dv(e)||dv(e)))return!e.length;var t=Fy(e);if(t==jOe||t==MOe)return!e.size;if(cv(e))return!$Se(e).length;for(var n in e)if(NOe.call(e,n))return!1;return!0}var jOe,MOe,NOe,POe=o((()=>{kv(),Iy(),fv(),h_(),av(),_v(),lv(),Ov(),jOe=`[object Map]`,MOe=`[object Set]`,NOe=Object.prototype.hasOwnProperty}));function jb(e){return e===void 0}var FOe=o((()=>{}));function IOe(e,t){return e<t}var Mb=o((()=>{}));function Nb(e,t){var n={};return t=ub(t,3),mb(e,function(e,r,i){G_(n,r,t(e,r,i))}),n}var LOe=o((()=>{K_(),hb(),db()}));function Pb(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!u_(o):n(o,s)))var s=o,l=a}return l}var Fb=o((()=>{d_()}));function Ib(e){return e&&e.length?Pb(e,w_,yOe):void 0}var ROe=o((()=>{Fb(),bOe(),T_()})),Lb,zOe=o((()=>{ZDe(),lSe(),Lb=cSe(function(e,t,n){XDe(e,t,n)})}));function Rb(e){return e&&e.length?Pb(e,w_,IOe):void 0}var BOe=o((()=>{Fb(),Mb(),T_()}));function zb(e,t){return e&&e.length?Pb(e,ub(t,2),IOe):void 0}var VOe=o((()=>{Fb(),db(),Mb()}));function HOe(e,t,n,r){if(!v_(e))return e;t=Zv(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var l=$v(t[i]),u=n;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(i!=o){var d=s[l];u=r?r(d,l,s):void 0,u===void 0&&(u=v_(d)?d:U_(t[i+1])?[]:{})}Y_(s,l,u),s=s[l]}return e}var UOe=o((()=>{X_(),Qv(),W_(),y_(),ey()}));function WOe(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=ty(e,o);n(s,o)&&HOe(a,Zv(o,e),s)}return a}var GOe=o((()=>{ny(),UOe(),Qv()}));function KOe(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}var qOe=o((()=>{}));function JOe(e,t){if(e!==t){var n=e!==void 0,r=e===null,i=e===e,a=u_(e),o=t!==void 0,s=t===null,l=t===t,u=u_(t);if(!s&&!u&&!a&&e>t||a&&o&&l&&!s&&!u||r&&o&&l||!n&&l||!i)return 1;if(!r&&!a&&!u&&e<t||u&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!l)return-1}return 0}var YOe=o((()=>{d_()}));function XOe(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var l=JOe(i[r],a[r]);if(l)return r>=s?l:l*(n[r]==`desc`?-1:1)}return e.index-t.index}var ZOe=o((()=>{YOe()}));function QOe(e,t,n){t=t.length?f_(t,function(e){return m_(e)?function(t){return ty(t,e.length===1?e[0]:e)}:e}):[w_];var r=-1;return t=f_(t,yv(ub)),KOe(fOe(e,function(e,n,i){return{criteria:f_(t,function(t){return t(e)}),index:++r,value:e}}),function(e,t){return XOe(e,t,n)})}var $Oe=o((()=>{p_(),ny(),db(),pOe(),qOe(),bv(),ZOe(),T_(),h_()})),eke=o((()=>{lb()})),Bb,tke,nke,rke,Vb,Hb,ike,Ub,Wb,Gb,ake,Kb,qb,oke,ske,cke,lke=o((()=>{Bb=`\\ud800-\\udfff`,tke=`\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff`,nke=`\\ufe0e\\ufe0f`,rke=`[`+Bb+`]`,Vb=`[`+tke+`]`,Hb=`\\ud83c[\\udffb-\\udfff]`,ike=`(?:`+Vb+`|`+Hb+`)`,Ub=`[^`+Bb+`]`,Wb=`(?:\\ud83c[\\udde6-\\uddff]){2}`,Gb=`[\\ud800-\\udbff][\\udc00-\\udfff]`,ake=`\\u200d`,Kb=ike+`?`,qb=`[`+nke+`]?`,oke=`(?:`+ake+`(?:`+[Ub,Wb,Gb].join(`|`)+`)`+qb+Kb+`)*`,ske=qb+Kb+oke,cke=`(?:`+[Ub+Vb+`?`,Vb,Wb,Gb,rke].join(`|`)+`)`,RegExp(Hb+`(?=`+Hb+`)|`+cke+ske,`g`)})),uke=o((()=>{eke(),gwe(),lke()}));function dke(e,t){return WOe(e,t,function(t,n){return TDe(e,n)})}var fke=o((()=>{GOe(),cb()})),Jb,pke=o((()=>{fke(),cwe(),Jb=swe(function(e,t){return e==null?{}:dke(e,t)})}));function mke(e,t,n,r){for(var i=-1,a=gke(hke((t-e)/(n||1)),0),o=Array(a);a--;)o[r?a:++i]=e,e+=n;return o}var hke,gke,_ke=o((()=>{hke=Math.ceil,gke=Math.max}));function vke(e){return function(t,n,r){return r&&typeof r!=`number`&&ov(t,n,r)&&(n=r=void 0),t=x_(t),n===void 0?(n=t,t=0):n=x_(n),r=r===void 0?t<n?1:-1:x_(r),mke(t,n,r,e)}}var yke=o((()=>{_ke(),sv(),C_()})),Yb,bke=o((()=>{yke(),Yb=vke()}));function xke(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}var Ske=o((()=>{}));function Xb(e,t,n){var r=m_(e)?_we:xke,i=arguments.length<3;return r(e,ub(t,4),n,i,gb)}var Cke=o((()=>{vwe(),_b(),db(),Ske(),h_()})),wke=o((()=>{kv(),Iy(),av(),EOe(),uke()})),Zb,Tke=o((()=>{cy(),$Oe(),tv(),sv(),Zb=ev(function(e,t){if(e==null)return[];var n=t.length;return n>1&&ov(e,t[0],t[1])?t=[]:n>2&&ov(t[0],t[1],t[2])&&(t=[t[0]]),QOe(e,sy(t,1),[])})})),Eke,Dke=o((()=>{Zwe(),Fxe(),$y(),Eke=Oy&&1/Qy(new Oy([,-0]))[1]==1/0?function(e){return new Oy(e)}:Pxe}));function Oke(e,t,n){var r=-1,i=eSe,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=QDe;else if(a>=kke){var u=t?null:Eke(e);if(u)return Qy(u);o=!1,i=PEe,l=new Yy}else l=t?[]:s;outer:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,o&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),s.push(d)}else i(l,f,n)||(l!==s&&l.push(f),s.push(d))}return s}var kke,Ake=o((()=>{Xy(),tSe(),$De(),Zy(),Dke(),$y(),kke=200})),jke,Mke=o((()=>{cy(),tv(),Ake(),xb(),jke=ev(function(e){return Oke(sy(e,1,WDe,!0))})}));function Qb(e){var t=++Nke;return twe(e)+t}var Nke,Pke=o((()=>{Xv(),Nke=0}));function Fke(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:void 0;n(o,e[r],s)}return o}var Ike=o((()=>{}));function Lke(e,t){return Fke(e||[],t||[],Y_)}var Rke=o((()=>{X_(),Ike()})),$b=o((()=>{d_(),Jbe(),lxe(),T_(),kxe(),jxe(),y_(),e_(),Nxe(),Fxe(),h_(),l_(),I_(),Vxe(),B_(),V_(),tSe(),W_(),X_(),Q_(),lSe(),av(),lv(),jv(),Nv(),ry(),cwe(),tv(),s_(),hwe(),K_(),ey(),Xv(),gwe(),vwe(),oxe(),sv(),SEe(),EEe(),ay(),cy(),p_(),db(),Hxe(),_b(),jwe(),zDe(),HDe(),ZDe(),Xy(),$De(),bv(),Zy(),xb(),eOe(),nOe(),IDe(),RDe(),Tb(),Iy(),BEe(),J_(),aOe(),dOe(),uOe(),hb(),sOe(),H_(),mOe(),owe(),tOe(),gOe(),vOe(),yy(),D_(),bOe(),TOe(),cb(),C_(),$xe(),EOe(),kOe(),Qv(),ny(),fv(),Tv(),_v(),POe(),sb(),rv(),WTe(),fDe(),gDe(),j_(),mxe(),ySe(),YTe(),Ov(),FOe(),Yxe(),Mb(),LOe(),bDe(),kDe(),ROe(),Fb(),qCe(),zOe(),BOe(),VOe(),n_(),$y(),Jwe(),GOe(),$Oe(),NEe(),uke(),pke(),PDe(),YOe(),bke(),yke(),Cke(),Ske(),iOe(),UOe(),wke(),Tke(),by(),OOe(),fSe(),ewe(),qDe(),dy(),exe(),Zbe(),Mke(),Ake(),Pke(),lb(),Rke(),Ike()}));function zke(e,t){e[t]?e[t]++:e[t]=1}function Bke(e,t){--e[t]||delete e[t]}function ex(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}return i+rx+a+rx+(jb(r)?Hke:r)}function Vke(e,t,n,r){var i=``+t,a=``+n;if(!e&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function tx(e,t){return ex(e,t.v,t.w,t.name)}var Hke,nx,rx,ix,Uke=o((()=>{$b(),Hke=`\0`,nx=`\0`,rx=``,ix=class{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,`directed`)||e.directed,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,`compound`)?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=L_(void 0),this._defaultEdgeLabelFn=L_(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[nx]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return E_(e)||(e=L_(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Av(this._nodes)}sources(){var e=this;return Db(this.nodes(),function(t){return AOe(e._in[t])})}sinks(){var e=this;return Db(this.nodes(),function(t){return AOe(e._out[t])})}setNodes(e,t){var n=arguments,r=this;return Eb(e,function(e){n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=nx,this._children[e]={},this._children[nx][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],Eb(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),Eb(Av(this._in[e]),t),delete this._in[e],delete this._preds[e],Eb(Av(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(jb(t))t=nx;else{t+=``;for(var n=t;!jb(n);n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==nx)return t}}children(e){if(jb(e)&&(e=nx),this._isCompound){var t=this._children[e];if(t)return Av(t)}else if(e===nx)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Av(t)}successors(e){var t=this._sucs[e];if(t)return Av(t)}neighbors(e){var t=this.predecessors(e);if(t)return jke(t,this.successors(e))}isLeaf(e){return(this.isDirected()?this.successors(e):this.neighbors(e)).length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;Eb(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),Eb(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var r={};function i(e){var a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&Eb(t.nodes(),function(e){t.setParent(e,i(e))}),t}setDefaultEdgeLabel(e){return E_(e)||(e=L_(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Ab(this._edgeObjs)}setPath(e,t){var n=this,r=arguments;return Xb(e,function(e,i){return r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i}),this}setEdge(){var e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,jb(n)||(n=``+n);var o=ex(this._isDirected,e,t,n);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(!jb(n)&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);var s=Vke(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,zke(this._preds[t],e),zke(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){var r=arguments.length===1?tx(this._isDirected,arguments[0]):ex(this._isDirected,e,t,n);return this._edgeLabels[r]}hasEdge(e,t,n){var r=arguments.length===1?tx(this._isDirected,arguments[0]):ex(this._isDirected,e,t,n);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(e,t,n){var r=arguments.length===1?tx(this._isDirected,arguments[0]):ex(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],Bke(this._preds[t],e),Bke(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){var n=this._in[e];if(n){var r=Ab(n);return t?Db(r,function(e){return e.v===t}):r}}outEdges(e,t){var n=this._out[e];if(n){var r=Ab(n);return t?Db(r,function(e){return e.w===t}):r}}nodeEdges(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},ix.prototype._nodeCount=0,ix.prototype._edgeCount=0})),ax=o((()=>{Uke()})),Wke=l({captureNodeSizes:()=>Jke,shouldCaptureSizes:()=>Gke});function ox(){if(!(typeof globalThis>`u`))return globalThis}function Gke(){return!!ox()?.mermaidCaptureSizes}function Kke(){return typeof location>`u`?`browser-dev`:`${location.pathname}${location.search}`}function qke(e,t){let n=ox();if(!n)return;let r=t.node(),i=((r&&`ownerSVGElement`in r?r.ownerSVGElement:null)??r)?.id??`(unknown)`;n.mermaidCapturedSizes??=[];let a={svgId:i,sizes:e};n.mermaidCapturedSizes.push(a),n.mermaidLastCapturedSizes=a}function Jke(e,t){let n=[];for(let e of t.nodes)e.isGroup||n.push({id:e.id,width:e.width??0,height:e.height??0});n.length!==0&&qke({metadata:{captureVersion:Yke,capturedAt:new Date().toISOString(),capturedFrom:Kke()},nodes:n},e)}var Yke,Xke=o((()=>{h(),Yke=1,p(ox,`getCaptureGlobal`),p(Gke,`shouldCaptureSizes`),p(Kke,`capturedFromLocation`),p(qke,`emitCapturedSizes`),p(Jke,`captureNodeSizes`)}));function sx(e,{edgePathsClass:t=`edges edgePath`}={}){let n=e.insert(`g`).attr(`class`,`root`);return{clusters:n.insert(`g`).attr(`class`,`clusters`),edgePaths:n.insert(`g`).attr(`class`,t),edgeLabels:n.insert(`g`).attr(`class`,`edgeLabels`),nodes:n.insert(`g`).attr(`class`,`nodes`),rootGroups:n}}async function Zke(e,t){if(t.label){let{shapeSvg:n,bbox:r}=await Kh(e,t);t.labelBBox={width:r.width,height:r.height},n.remove()}else t.labelBBox={width:0,height:0}}async function cx(e,t,n){let r=await wg(e,t,n),i=r.node()?.getBBox()??{width:0,height:0};return t.width=i.width,t.height=i.height,r}async function Qke(e,t){let n=new ix({multigraph:!0,compound:!0}),r=[...t.edges],i=Z(),a=sx(e),{edgeLabels:o,nodes:s}=a,l=new Map,u=e.node()!=null;await Promise.all(t.nodes.map(async e=>{if(e.isGroup)u&&await Zke(s,e),n.setNode(e.id,{...e});else{if(u){let t=await cx(s,e,{config:i,dir:e.dir});l.set(e.id,t)}n.setNode(e.id,{...e})}}));for(let e of r)u&&Ug(e)&&await Gg(o,e),n.setEdge(e.start,e.end,{...e},e.id),t.edges.some(t=>t.id===e.id)||t.edges.push(e);if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:n}=await Promise.resolve().then(()=>(Xke(),Wke));n(e,t)}return{graph:n,groups:a,nodeElements:l}}function lx({prepareLayout:e,measureLayout:t,runLayoutCore:n,paintLayout:r,afterPaint:i,paintOptions:a}){let o=t??eAe;return p(async function(t,s,l,u){let d=s.select(`g`);Xg(d,t.markers,t.type,t.diagramId),$ke();let f={element:d,helpers:l,options:u};f.preparedLayout=await e?.(t,f);let p=await o(t,f),m=await n(t,f),h={...f,measure:p};r?await r(t,h,m):await tAe(t,h,a),await i?.(t,h,m)},`render`)}function $ke(){mbe(),Ebe(),_be(),lAe()}async function eAe(e,{element:t}){return await Qke(t,e)}async function tAe(e,t,n={}){let{measure:r}=t,{groups:i}=r;for(let r of n.getNodes?.(e,t)??e.nodes)n.skipNode?.(r,t)||await nAe(i,r,t,n);let a=iAe(e.nodes);for(let r of e.edges)aAe(r,n)||await oAe(i,r,a,e,n,t)}async function nAe(e,t,n,r){t.clusterNode?Dg(t):rAe(t,n,r)?await jg(e.clusters,t):Dg(t)}function rAe(e,t,n){return e.isGroup===!0&&(n.isCluster?.(e,t)??!0)}function iAe(e){let t=new Map;for(let n of e)n?.id&&t.set(n.id,n);return t}function aAe(e,t){return e.isLayoutOnly||!!t.skipEdge?.(e)}async function oAe(e,t,n,r,i,a){let o=Yg(e.edgePaths,{...t},i.clusterDb??new Map,r.type,ux(t.start,t,n,a,i),ux(t.end,t,n,a,i),r.diagramId,sAe(t,i));Ug(t)&&(Vg.has(t.id)||await Gg(e.edgeLabels,t),cAe(t,o))}function ux(e,t,n,r,i){return i.getEdgeNode?.(e,t,r)??(e?n.get(e)??{}:{})}function sAe(e,t){return typeof t.skipIntersect==`function`?t.skipIntersect(e):t.skipIntersect??!1}function cAe(e,t){let n=t?.updatedPath??t?.originalPath,r=es(),{subGraphTitleTotalMargin:i}=Tg({flowchart:r.flowchart??{}});if(e.label){let r=Vg.get(e.id),a=e.x,o=e.y;if(n){let r=Up.calcLabelPosition(n);y.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t?.updatedPath&&(a=r.x,o=r.y)}r.attr(`transform`,`translate(${a}, ${o+i/2})`)}if(e?.startLabelLeft){let t=Hg.get(e.id).startLeft,r=e?.x,i=e?.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=Hg.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=Hg.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=Hg.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=Up.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}}var dx,fx,px,lAe,mx,uAe,hx,gx,dAe,_x,vx,fAe,yx,bx,xx,Sx,pAe,Cx=o((()=>{Mg(),Zg(),Og(),Cg(),Kp(),Zs(),S(),h(),ax(),p(sx,`createLayoutElementGroups`),p(Zke,`measureGroupLabel`),p(cx,`insertMeasuredNode`),p(Qke,`createGraphWithElements`),dx=new Map,fx=new Map,px=new Map,lAe=p(()=>{fx.clear(),px.clear(),dx.clear()},`clear`),mx=p((e,t)=>{let n=fx.get(t)||[];return y.trace(`In isDescendant`,t,` `,e,` = `,n.includes(e)),n.includes(e)},`isDescendant`),uAe=p((e,t)=>{let n=fx.get(t)||[];return y.info(`Descendants of `,t,` is `,n),y.info(`Edge is `,e),e.v===t||e.w===t?!1:n?n.includes(e.v)||mx(e.v,t)||mx(e.w,t)||n.includes(e.w):(y.debug(`Tilt, `,t,`,not in descendants`),!1)},`edgeInCluster`),hx=p((e,t,n,r)=>{y.debug(`Copying children of `,e,`root`,r,`data`,t.node(e),r);let i=t.children(e)||[];e!==r&&i.push(e),y.debug(`Copying (nodes) clusterId`,e,`nodes`,i),i.forEach(i=>{if(t.children(i).length>0)hx(i,t,n,r);else{let a=t.node(i);y.info(`cp `,i,` to `,r,` with parent `,e),n.setNode(i,a),r!==t.parent(i)&&(y.debug(`Setting parent`,i,t.parent(i)),n.setParent(i,t.parent(i))),e!==r&&i!==e?(y.debug(`Setting parent`,i,e),n.setParent(i,e)):(y.info(`In copy `,e,`root`,r,`data`,t.node(e),r),y.debug(`Not Setting parent for node=`,i,`cluster!==rootId`,e!==r,`node!==clusterId`,i!==e));let o=t.edges(i);y.debug(`Copying Edges`,o),o.forEach(i=>{y.info(`Edge`,i);let a=t.edge(i.v,i.w,i.name);y.info(`Edge data`,a,r);try{uAe(i,r)?(y.info(`Copying as `,i.v,i.w,a,i.name),n.setEdge(i.v,i.w,a,i.name),y.info(`newGraph edges `,n.edges(),n.edge(n.edges()[0]))):y.info(`Skipping copy of edge `,i.v,`-->`,i.w,` rootId: `,r,` clusterId:`,e)}catch(e){y.error(e)}})}y.debug(`Removing node`,i),t.removeNode(i)})},`copy`),gx=p((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)px.set(i,e),r=[...r,...gx(i,t)];return r},`extractDescendants`),dAe=p((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),_x=p((e,t,n)=>{let r=t.children(e);if(y.trace(`Searching children of id `,e,r),r.length<1)return e;let i;for(let e of r){let r=_x(e,t,n),a=dAe(t,n,r);if(r){if(a.length>0)i=r;else return r}}return i},`findNonClusterChild`),vx=p(e=>!dx.has(e)||!dx.get(e).externalConnections?e:dx.has(e)?dx.get(e).id:e,`getAnchorId`),fAe=p((e,t)=>{if(!e||t>10){y.debug(`Opting out, no graph `);return}y.debug(`Opting in, graph `),e.nodes().forEach(function(t){e.children(t).length>0&&(y.debug(`Cluster identified`,t,` Replacement id in edges: `,_x(t,e,t)),fx.set(t,gx(t,e)),dx.set(t,{id:_x(t,e,t),clusterData:e.node(t)}))}),e.nodes().forEach(function(t){let n=e.children(t),r=e.edges();n.length>0?(y.debug(`Cluster identified`,t,fx),r.forEach(e=>{mx(e.v,t)^mx(e.w,t)&&(y.debug(`Edge: `,e,` leaves cluster `,t),y.debug(`Descendants of XXX `,t,`: `,fx.get(t)),dx.get(t).externalConnections=!0)})):y.debug(`Not a cluster `,t,fx)});for(let t of dx.keys()){let n=dx.get(t).id,r=e.parent(n);r!==t&&dx.has(r)&&!dx.get(r).externalConnections&&(dx.get(t).id=r);let i=e.edges().some(e=>e.v===t);if(n&&dx.get(t)?.externalConnections&&i&&Sx(e,n,t)){let r=pAe(e,t,e.parent(n));r&&(dx.get(t).id=r)}}e.edges().forEach(function(t){let n=e.edge(t);y.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),y.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(e.edge(t)));let r=t.v,i=t.w;if(y.debug(`Fix XXX`,dx,`ids:`,t.v,t.w,`Translating: `,dx.get(t.v),` --- `,dx.get(t.w)),dx.get(t.v)||dx.get(t.w)){if(y.debug(`Fixing and trying - removing XXX`,t.v,t.w,t.name),r=vx(t.v),i=vx(t.w),e.removeEdge(t.v,t.w,t.name),r!==t.v){let i=e.parent(r);dx.get(i).externalConnections=!0,n.fromCluster=t.v}if(i!==t.w){let r=e.parent(i);dx.get(r).externalConnections=!0,n.toCluster=t.w}y.debug(`Fix Replacing with XXX`,r,i,t.name),e.setEdge(r,i,n,t.name)}}),yx(e,0),y.trace(dx)},`adjustClustersAndEdges`),yx=p((e,t)=>{if(t>10){y.error(`Bailing out`);return}let n=e.nodes(),r=!1;for(let t of n){let n=e.children(t);r||=n.length>0}if(!r){y.debug(`Done, no node has children`,e.nodes());return}y.debug(`Nodes = `,n,t);for(let r of n)if(y.debug(`Extracting node`,r,dx,dx.has(r)&&!dx.get(r).externalConnections,!e.parent(r),e.node(r),e.children(`D`),` Depth `,t),!dx.has(r))y.debug(`Not a cluster`,r,t);else if(!dx.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){y.debug(`Cluster without external connections, without a parent and with children`,r,t);let n=e.graph().rankdir===`TB`?`LR`:`TB`;dx.get(r)?.clusterData?.dir&&(n=dx.get(r).clusterData.dir,y.debug(`Fixing dir`,dx.get(r).clusterData.dir,n));let i=new ix({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});hx(r,e,i,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:dx.get(r).clusterData,label:dx.get(r).label,graph:i})}else y.debug(`Cluster ** `,r,` **not meeting the criteria !externalConnections:`,!dx.get(r).externalConnections,` no parent: `,!e.parent(r),` children `,e.children(r)&&e.children(r).length>0,e.children(`D`),t),y.debug(dx);n=e.nodes(),y.debug(`New list of nodes`,n);for(let r of n){let n=e.node(r);y.debug(` Now next level`,r,n),n?.clusterNode&&yx(n.graph,t+1)}},`extractor`),bx=p((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=bx(e,e.children(t));n=[...n,...r]}),n},`sorter`),xx=p(e=>bx(e,e.children()),`sortNodesByHierarchy`),Sx=p((e,t,n)=>{let r=e.parent(t);for(;r&&r!==n;){let t=dx.get(r);if(t&&!t.externalConnections)return!0;r=e.parent(r)}return!1},`isNodeInExtractableCluster`),pAe=p((e,t,n)=>{let r=e.children(t)??[];for(let i of r){if(i===n||mx(i,n))continue;let r=_x(i,e,t);if(r&&!Sx(e,r,t))return r}return null},`findSafeAnchorNode`),p(lx,`createCommonLayoutRenderer`),p($ke,`clearLayoutRenderState`),p(eAe,`defaultMeasureLayout`),p(tAe,`paintLayoutData`),p(nAe,`paintLayoutNode`),p(rAe,`shouldPaintAsCluster`),p(iAe,`buildNodeLookup`),p(aAe,`shouldSkipPaintEdge`),p(oAe,`paintLayoutEdge`),p(ux,`getRenderedNode`),p(sAe,`shouldSkipIntersect`),p(cAe,`positionRenderedEdgeLabel`)}));function mAe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function wx(){if(yAe)return qx;yAe=1;function e(e){return e==null}p(e,`isNothing`);function t(e){return typeof e==`object`&&!!e}p(t,`isObject`);function n(t){return Array.isArray(t)?t:e(t)?[]:[t]}p(n,`toArray`);function r(e,t){if(t){let n=Object.keys(t);for(let r=0,i=n.length;r<i;r+=1){let i=n[r];e[i]=t[i]}}return e}p(r,`extend`);function i(e,t){let n=``;for(let r=0;r<t;r+=1)n+=e;return n}p(i,`repeat`);function a(e){return e===0&&1/e==-1/0}return p(a,`isNegativeZero`),qx.isNothing=e,qx.isObject=t,qx.toArray=n,qx.repeat=i,qx.isNegativeZero=a,qx.extend=r,qx}function Tx(){if(bAe)return Jx;bAe=1;function e(e,t){let n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`526-527-`+e.mark.snippet),r+` `+n):r}p(e,`formatError`);function t(t,n){Error.call(this),this.name=`YAMLException`,this.reason=t,this.mark=n,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}return p(t,`YAMLException2`),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(t){return this.name+`: `+e(this,t)},`toString`),Jx=t,Jx}function hAe(){if(xAe)return Yx;xAe=1;let e=wx();function t(e,t,n,r,i){let a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}p(t,`getLine`);function n(t,n){return e.repeat(` `,n-t.length)+t}p(n,`padStart`);function r(r,i){if(i=Object.create(i||null),!r.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!=`number`&&(i.indent=1),typeof i.linesBefore!=`number`&&(i.linesBefore=3),typeof i.linesAfter!=`number`&&(i.linesAfter=2);let a=/\r?\n|\r|\0/g,o=[0],s=[],l,u=-1;for(;l=a.exec(r.buffer);)s.push(l.index),o.push(l.index+l[0].length),r.position<=l.index&&u<0&&(u=o.length-2);u<0&&(u=o.length-1);let d=``,f=Math.min(r.line+i.linesAfter,s.length).toString().length,p=i.maxLength-(i.indent+f+3);for(let a=1;a<=i.linesBefore&&!(u-a<0);a++){let l=t(r.buffer,o[u-a],s[u-a],r.position-(o[u]-o[u-a]),p);d=e.repeat(` `,i.indent)+n((r.line-a+1).toString(),f)+` | `+l.str+`528-`+d}let m=t(r.buffer,o[u],s[u],r.position,p);d+=e.repeat(` `,i.indent)+n((r.line+1).toString(),f)+` | `+m.str+`529-`,d+=e.repeat(`-`,i.indent+f+3+m.pos)+`^530-`;for(let a=1;a<=i.linesAfter&&!(u+a>=s.length);a++){let l=t(r.buffer,o[u+a],s[u+a],r.position-(o[u]-o[u+a]),p);d+=e.repeat(` `,i.indent)+n((r.line+a+1).toString(),f)+` | `+l.str+`531-`}return d.replace(/\n$/,``)}return p(r,`makeSnippet`),Yx=r,Yx}function Ex(){if(SAe)return Xx;SAe=1;let e=Tx(),t=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],n=[`scalar`,`sequence`,`mapping`];function r(e){let t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}p(r,`compileStyleAliases`);function i(i,a){if(a||={},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e(`Unknown option "`+n+`" is met in definition of "`+i+`" YAML type.`)}),this.options=a,this.tag=i,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(e){return e},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=r(a.styleAliases||null),n.indexOf(this.kind)===-1)throw new e(`Unknown kind "`+this.kind+`" is specified for "`+i+`" YAML type.`)}return p(i,`Type2`),Xx=i,Xx}function Dx(){if(CAe)return Zx;CAe=1;let e=Tx(),t=Ex();function n(e,t){let n=[];return e[t].forEach(function(e){let t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}p(n,`compileList`);function r(){let e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function t(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}p(t,`collectType`);for(let e=0,n=arguments.length;e<n;e+=1)arguments[e].forEach(t);return e}p(r,`compileMap`);function i(e){return this.extend(e)}return p(i,`Schema2`),i.prototype.extend=p(function(a){let o=[],s=[];if(a instanceof t)s.push(a);else if(Array.isArray(a))s=s.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(o=o.concat(a.implicit)),a.explicit&&(s=s.concat(a.explicit));else throw new e(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);o.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(n.loadKind&&n.loadKind!==`scalar`)throw new e(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(n.multi)throw new e(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),s.forEach(function(n){if(!(n instanceof t))throw new e(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});let l=Object.create(i.prototype);return l.implicit=(this.implicit||[]).concat(o),l.explicit=(this.explicit||[]).concat(s),l.compiledImplicit=n(l,`implicit`),l.compiledExplicit=n(l,`explicit`),l.compiledTypeMap=r(l.compiledImplicit,l.compiledExplicit),l},`extend`),Zx=i,Zx}function Ox(){return wAe?Qx:(wAe=1,Qx=new(Ex())(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:p(function(e){return e===null?``:e},`construct`)}),Qx)}function kx(){return TAe?$x:(TAe=1,$x=new(Ex())(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:p(function(e){return e===null?[]:e},`construct`)}),$x)}function Ax(){return EAe?eS:(EAe=1,eS=new(Ex())(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:p(function(e){return e===null?{}:e},`construct`)}),eS)}function jx(){return DAe?tS:(DAe=1,tS=new(Dx())({explicit:[Ox(),kx(),Ax()]}),tS)}function Mx(){if(OAe)return nS;OAe=1;let e=Ex();function t(e){if(e===null)return!0;let t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}p(t,`resolveYamlNull`);function n(){return null}p(n,`constructYamlNull`);function r(e){return e===null}return p(r,`isNull`),nS=new e(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{canonical:p(function(){return`~`},`canonical`),lowercase:p(function(){return`null`},`lowercase`),uppercase:p(function(){return`NULL`},`uppercase`),camelcase:p(function(){return`Null`},`camelcase`),empty:p(function(){return``},`empty`)},defaultStyle:`lowercase`}),nS}function Nx(){if(kAe)return rS;kAe=1;let e=Ex();function t(e){if(e===null)return!1;let t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}p(t,`resolveYamlBoolean`);function n(e){return e===`true`||e===`True`||e===`TRUE`}p(n,`constructYamlBoolean`);function r(e){return Object.prototype.toString.call(e)===`[object Boolean]`}return p(r,`isBoolean`),rS=new e(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:t,construct:n,predicate:r,represent:{lowercase:p(function(e){return e?`true`:`false`},`lowercase`),uppercase:p(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:p(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`}),rS}function Px(){if(AAe)return iS;AAe=1;let e=wx(),t=Ex();function n(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}p(n,`isHexCode`);function r(e){return e>=48&&e<=55}p(r,`isOctCode`);function i(e){return e>=48&&e<=57}p(i,`isDecCode`);function a(e){if(e===null)return!1;let t=e.length,a=0,s=!1;if(!t)return!1;let l=e[a];if((l===`-`||l===`+`)&&(l=e[++a]),l===`0`){if(a+1===t)return!0;if(l=e[++a],l===`b`){for(a++;a<t;a++){if(l=e[a],l!==`0`&&l!==`1`)return!1;s=!0}return s&&isFinite(o(e))}if(l===`x`){for(a++;a<t;a++){if(!n(e.charCodeAt(a)))return!1;s=!0}return s&&isFinite(o(e))}if(l===`o`){for(a++;a<t;a++){if(!r(e.charCodeAt(a)))return!1;s=!0}return s&&isFinite(o(e))}}for(;a<t;a++){if(!i(e.charCodeAt(a)))return!1;s=!0}return s?isFinite(o(e)):!1}p(a,`resolveYamlInteger`);function o(e){let t=e,n=1,r=t[0];if((r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}p(o,`parseYamlInteger`);function s(e){return o(e)}p(s,`constructYamlInteger`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&t%1==0&&!e.isNegativeZero(t)}return p(l,`isInteger`),iS=new t(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:a,construct:s,predicate:l,represent:{binary:p(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:p(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:p(function(e){return e.toString(10)},`decimal`),hexadecimal:p(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),iS}function Fx(){if(jAe)return aS;jAe=1;let e=wx(),t=Ex(),n=RegExp(`^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`),r=RegExp(`^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function i(e){return e===null||!n.test(e)?!1:isFinite(parseFloat(e,10))?!0:r.test(e)}p(i,`resolveYamlFloat`);function a(e){let t=e.toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}p(a,`constructYamlFloat`);let o=/^[-+]?[0-9]+e/;function s(t,n){if(isNaN(t))switch(n){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(t===1/0)switch(n){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(t===-1/0)switch(n){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(e.isNegativeZero(t))return`-0.0`;let r=t.toString(10);return o.test(r)?r.replace(`e`,`.e`):r}p(s,`representYamlFloat`);function l(t){return Object.prototype.toString.call(t)===`[object Number]`&&(t%1!=0||e.isNegativeZero(t))}return p(l,`isFloat`),aS=new t(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:i,construct:a,predicate:l,represent:s,defaultStyle:`lowercase`}),aS}function Ix(){return MAe?oS:(MAe=1,oS=jx().extend({implicit:[Mx(),Nx(),Px(),Fx()]}),oS)}function Lx(){return NAe?sS:(NAe=1,sS=Ix(),sS)}function Rx(){if(PAe)return cS;PAe=1;let e=Ex(),t=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),n=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function r(e){return e===null?!1:t.exec(e)!==null||n.exec(e)!==null}p(r,`resolveYamlTimestamp`);function i(e){let r=0,i=null,a=t.exec(e);if(a===null&&(a=n.exec(e)),a===null)throw Error(`Date resolve error`);let o=+a[1],s=a[2]-1,l=+a[3];if(!a[4])return new Date(Date.UTC(o,s,l));let u=+a[4],d=+a[5],f=+a[6];if(a[7]){for(r=a[7].slice(0,3);r.length<3;)r+=`0`;r=+r}if(a[9]){let e=+a[10],t=+(a[11]||0);i=(e*60+t)*6e4,a[9]===`-`&&(i=-i)}let p=new Date(Date.UTC(o,s,l,u,d,f,r));return i&&p.setTime(p.getTime()-i),p}p(i,`constructYamlTimestamp`);function a(e){return e.toISOString()}return p(a,`representYamlTimestamp`),cS=new e(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:r,construct:i,instanceOf:Date,represent:a}),cS}function zx(){if(FAe)return lS;FAe=1;let e=Ex();function t(e){return e===`<<`||e===null}return p(t,`resolveYamlMerge`),lS=new e(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:t}),lS}function Bx(){if(IAe)return uS;IAe=1;let e=Ex();function t(e){if(e===null)return!1;let t=0,n=e.length;for(let r=0;r<n;r++){let n=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=532-\r`.indexOf(e.charAt(r));if(!(n>64)){if(n<0)return!1;t+=6}}return t%8==0}p(t,`resolveYamlBinary`);function n(e){let t=e.replace(/[\r\n=]/g,``),n=t.length,r=0,i=[];for(let e=0;e<n;e++)e%4==0&&e&&(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)),r=r<<6|`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=533-\r`.indexOf(t.charAt(e));let a=n%4*6;return a===0?(i.push(r>>16&255),i.push(r>>8&255),i.push(r&255)):a===18?(i.push(r>>10&255),i.push(r>>2&255)):a===12&&i.push(r>>4&255),new Uint8Array(i)}p(n,`constructYamlBinary`);function r(e){let t=``,n=0,r=e.length,i=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=534-\r`;for(let a=0;a<r;a++)a%3==0&&a&&(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]),n=(n<<8)+e[a];let a=r%3;return a===0?(t+=i[n>>18&63],t+=i[n>>12&63],t+=i[n>>6&63],t+=i[n&63]):a===2?(t+=i[n>>10&63],t+=i[n>>4&63],t+=i[n<<2&63],t+=i[64]):a===1&&(t+=i[n>>2&63],t+=i[n<<4&63],t+=i[64],t+=i[64]),t}p(r,`representYamlBinary`);function i(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}return p(i,`isBinary`),uS=new e(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:t,construct:n,predicate:i,represent:r}),uS}function Vx(){if(LAe)return dS;LAe=1;let e=Ex(),t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(e===null)return!0;let r=[],i=e;for(let e=0,a=i.length;e<a;e+=1){let a=i[e],o=!1;if(n.call(a)!==`[object Object]`)return!1;let s;for(s in a)if(t.call(a,s)){if(!o)o=!0;else return!1}if(!o)return!1;if(r.indexOf(s)===-1)r.push(s);else return!1}return!0}p(r,`resolveYamlOmap`);function i(e){return e===null?[]:e}return p(i,`constructYamlOmap`),dS=new e(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:r,construct:i}),dS}function Hx(){if(RAe)return fS;RAe=1;let e=Ex(),t=Object.prototype.toString;function n(e){if(e===null)return!0;let n=e,r=Array(n.length);for(let e=0,i=n.length;e<i;e+=1){let i=n[e];if(t.call(i)!==`[object Object]`)return!1;let a=Object.keys(i);if(a.length!==1)return!1;r[e]=[a[0],i[a[0]]]}return!0}p(n,`resolveYamlPairs`);function r(e){if(e===null)return[];let t=e,n=Array(t.length);for(let e=0,r=t.length;e<r;e+=1){let r=t[e],i=Object.keys(r);n[e]=[i[0],r[i[0]]]}return n}return p(r,`constructYamlPairs`),fS=new e(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:n,construct:r}),fS}function Ux(){if(zAe)return pS;zAe=1;let e=Ex(),t=Object.prototype.hasOwnProperty;function n(e){if(e===null)return!0;let n=e;for(let e in n)if(t.call(n,e)&&n[e]!==null)return!1;return!0}p(n,`resolveYamlSet`);function r(e){return e===null?{}:e}return p(r,`constructYamlSet`),pS=new e(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:n,construct:r}),pS}function Wx(){return BAe?mS:(BAe=1,mS=Lx().extend({implicit:[Rx(),zx()],explicit:[Bx(),Vx(),Hx(),Ux()]}),mS)}function gAe(){if(VAe)return Kx;VAe=1;let e=wx(),t=Tx(),n=hAe(),r=Wx(),i=Object.prototype.hasOwnProperty,a=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o=/[\x85\u2028\u2029]/,s=/[,\[\]{}]/,l=/^(?:!|!!|![0-9A-Za-z-]+!)$/,u=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function d(e){return Object.prototype.toString.call(e)}p(d,`_class`);function f(e){return e===10||e===13}p(f,`isEol`);function m(e){return e===9||e===32}p(m,`isWhiteSpace`);function h(e){return e===9||e===32||e===10||e===13}p(h,`isWsOrEol`);function g(e){return e===44||e===91||e===93||e===123||e===125}p(g,`isFlowIndicator`);function _(e){if(e>=48&&e<=57)return e-48;let t=e|32;return t>=97&&t<=102?t-97+10:-1}p(_,`fromHexCode`);function v(e){return e===120?2:e===117?4:e===85?8:0}p(v,`escapedHexLen`);function y(e){return e>=48&&e<=57?e-48:-1}p(y,`fromDecimalCode`);function b(e){switch(e){case 48:return`\0`;case 97:return`\x07`;case 98:return`\b`;case 116:return` `;case 9:return` `;case 110:return`535-`;case 118:return`\v`;case 102:return`\f`;case 114:return`\r`;case 101:return`\x1B`;case 32:return` `;case 34:return`"`;case 47:return`/`;case 92:return`\\`;case 78:return`…`;case 95:return`\xA0`;case 76:return`\u2028`;case 80:return`\u2029`;default:return``}}p(b,`simpleEscapeSequence`);function x(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}p(x,`charFromCodepoint`);function S(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}p(S,`setProperty`);let C=Array(256),w=Array(256);for(let e=0;e<256;e++)C[e]=+!!b(e),w[e]=b(e);function T(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||r,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.maxDepth=typeof t.maxDepth==`number`?t.maxDepth:100,this.maxTotalMergeKeys=typeof t.maxTotalMergeKeys==`number`?t.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(T,`State`);function E(e,r){let i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=n(i),new t(r,i)}p(E,`generateError`);function D(e,t){throw E(e,t)}p(D,`throwError`);function O(e,t){e.onWarning&&e.onWarning.call(null,E(e,t))}p(O,`throwWarning`);function k(e,t,n){let r=e.anchorMapTransactions;if(r.length!==0){let n=r[r.length-1];i.call(n,t)||(n[t]={existed:i.call(e.anchorMap,t),value:e.anchorMap[t]})}e.anchorMap[t]=n}p(k,`storeAnchor`);function A(e){e.anchorMapTransactions.push(Object.create(null))}p(A,`beginAnchorTransaction`);function j(e){let t=e.anchorMapTransactions.pop(),n=e.anchorMapTransactions;if(n.length===0)return;let r=n[n.length-1],a=Object.keys(t);for(let e=0,n=a.length;e<n;e+=1){let n=a[e];i.call(r,n)||(r[n]=t[n])}}p(j,`commitAnchorTransaction`);function M(e){let t=e.anchorMapTransactions.pop(),n=Object.keys(t);for(let r=n.length-1;r>=0;--r){let i=t[n[r]];i.existed?e.anchorMap[n[r]]=i.value:delete e.anchorMap[n[r]]}}p(M,`rollbackAnchorTransaction`);function N(e){return{position:e.position,line:e.line,lineStart:e.lineStart,lineIndent:e.lineIndent,firstTabInLine:e.firstTabInLine,tag:e.tag,anchor:e.anchor,kind:e.kind,result:e.result}}p(N,`snapshotState`);function P(e,t){e.position=t.position,e.line=t.line,e.lineStart=t.lineStart,e.lineIndent=t.lineIndent,e.firstTabInLine=t.firstTabInLine,e.tag=t.tag,e.anchor=t.anchor,e.kind=t.kind,e.result=t.result}p(P,`restoreState`);let F={YAML:p(function(e,t,n){e.version!==null&&D(e,`duplication of %YAML directive`),n.length!==1&&D(e,`YAML directive accepts exactly one argument`);let r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]);r===null&&D(e,`ill-formed argument of the YAML directive`);let i=parseInt(r[1],10),a=parseInt(r[2],10);i!==1&&D(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&O(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:p(function(e,t,n){let r;n.length!==2&&D(e,`TAG directive accepts exactly two arguments`);let a=n[0];r=n[1],l.test(a)||D(e,`ill-formed tag handle (first argument) of the TAG directive`),i.call(e.tagMap,a)&&D(e,`there is a previously declared suffix for "`+a+`" tag handle`),u.test(r)||D(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{r=decodeURIComponent(r)}catch{D(e,`tag prefix is malformed: `+r)}e.tagMap[a]=r},`handleTagDirective`)};function I(e,t,n,r){if(t<n){let i=e.input.slice(t,n);if(r)for(let t=0,n=i.length;t<n;t+=1){let n=i.charCodeAt(t);n===9||n>=32&&n<=1114111||D(e,`expected valid JSON character`)}else a.test(i)&&D(e,`the stream contains non-printable characters`);e.result+=i}}p(I,`captureSegment`);function L(t,n,r,a){e.isObject(r)||D(t,`cannot merge mappings; the provided source object is unacceptable`);let o=Object.keys(r);for(let e=0,s=o.length;e<s;e+=1){let s=o[e];t.maxTotalMergeKeys!==-1&&++t.totalMergeKeys>t.maxTotalMergeKeys&&D(t,`merge keys exceeded maxTotalMergeKeys (`+t.maxTotalMergeKeys+`)`),i.call(n,s)||(S(n,s,r[s]),a[s]=!0)}}p(L,`mergeMappings`);function R(e,t,n,r,a,o,s,l,u){if(Array.isArray(a)){a=Array.prototype.slice.call(a);for(let t=0,n=a.length;t<n;t+=1)Array.isArray(a[t])&&D(e,`nested arrays are not supported inside keys`),typeof a==`object`&&d(a[t])===`[object Object]`&&(a[t]=`[object Object]`)}if(typeof a==`object`&&d(a)===`[object Object]`&&(a=`[object Object]`),a=String(a),t===null&&(t={}),r===`tag:yaml.org,2002:merge`){if(Array.isArray(o))for(let r=0,i=o.length;r<i;r+=1)L(e,t,o[r],n);else L(e,t,o,n)}else!e.json&&!i.call(n,a)&&i.call(t,a)&&(e.line=s||e.line,e.lineStart=l||e.lineStart,e.position=u||e.position,D(e,`duplicated mapping key`)),S(t,a,o),delete n[a];return t}p(R,`storeMappingPair`);function ee(e){let t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):D(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}p(ee,`readLineBreak`);function z(e,t,n){let r=0,i=e.input.charCodeAt(e.position);for(;i!==0;){for(;m(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(f(i))for(ee(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&O(e,`deficient indentation`),r}p(z,`skipSeparationSpace`);function B(e){let t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||h(n)))}p(B,`testDocumentSeparator`);function te(t,n){n===1?t.result+=` `:n>1&&(t.result+=e.repeat(`536-`,n-1))}p(te,`writeFoldedLines`);function ne(e,t,n){let r,i,a,o,s,l,u=e.kind,d=e.result,p=e.input.charCodeAt(e.position);if(h(p)||g(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96)return!1;if(p===63||p===45){let t=e.input.charCodeAt(e.position+1);if(h(t)||n&&g(t))return!1}for(e.kind=`scalar`,e.result=``,r=i=e.position,a=!1;p!==0;){if(p===58){let t=e.input.charCodeAt(e.position+1);if(h(t)||n&&g(t))break}else if(p===35){if(h(e.input.charCodeAt(e.position-1)))break}else if(e.position===e.lineStart&&B(e)||n&&g(p))break;else if(f(p)){if(o=e.line,s=e.lineStart,l=e.lineIndent,z(e,!1,-1),e.lineIndent>=t){a=!0,p=e.input.charCodeAt(e.position);continue}e.position=i,e.line=o,e.lineStart=s,e.lineIndent=l;break}a&&=(I(e,r,i,!1),te(e,e.line-o),r=i=e.position,!1),m(p)||(i=e.position+1),p=e.input.charCodeAt(++e.position)}return I(e,r,i,!1),e.result?!0:(e.kind=u,e.result=d,!1)}p(ne,`readPlainScalar`);function re(e,t){let n,r,i=e.input.charCodeAt(e.position);if(i!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39){if(I(e,n,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)n=e.position,e.position++,r=e.position;else return!0}else f(i)?(I(e,n,r,!0),te(e,z(e,!1,t)),n=r=e.position):e.position===e.lineStart&&B(e)?D(e,`unexpected end of the document within a single quoted scalar`):(e.position++,m(i)||(r=e.position));D(e,`unexpected end of the stream within a single quoted scalar`)}p(re,`readSingleQuotedScalar`);function ie(e,t){let n,r,i,a=e.input.charCodeAt(e.position);if(a!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(a=e.input.charCodeAt(e.position))!==0;)if(a===34)return I(e,n,e.position,!0),e.position++,!0;else if(a===92){if(I(e,n,e.position,!0),a=e.input.charCodeAt(++e.position),f(a))z(e,!1,t);else if(a<256&&C[a])e.result+=w[a],e.position++;else if((i=v(a))>0){let t=i,n=0;for(;t>0;t--)a=e.input.charCodeAt(++e.position),(i=_(a))>=0?n=(n<<4)+i:D(e,`expected hexadecimal character`);e.result+=x(n),e.position++}else D(e,`unknown escape sequence`);n=r=e.position}else f(a)?(I(e,n,r,!0),te(e,z(e,!1,t)),n=r=e.position):e.position===e.lineStart&&B(e)?D(e,`unexpected end of the document within a double quoted scalar`):(e.position++,m(a)||(r=e.position));D(e,`unexpected end of the stream within a double quoted scalar`)}p(ie,`readDoubleQuotedScalar`);function ae(e,t){let n=!0,r,i,a,o=e.tag,s,l=e.anchor,u,d,f,p,m=Object.create(null),g,_,v,y=e.input.charCodeAt(e.position);if(y===91)u=93,p=!1,s=[];else if(y===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&k(e,e.anchor,s),y=e.input.charCodeAt(++e.position);y!==0;){if(z(e,!0,t),y=e.input.charCodeAt(e.position),y===u)return e.position++,e.tag=o,e.anchor=l,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?y===44&&D(e,`expected the node content, but found ','`):D(e,`missed comma between flow collection entries`),_=g=v=null,d=f=!1,y===63&&h(e.input.charCodeAt(e.position+1))&&(d=f=!0,e.position++,z(e,!0,t)),r=e.line,i=e.lineStart,a=e.position,pe(e,t,1,!1,!0),_=e.tag,g=e.result,z(e,!0,t),y=e.input.charCodeAt(e.position),(f||e.line===r)&&y===58&&(d=!0,y=e.input.charCodeAt(++e.position),z(e,!0,t),pe(e,t,1,!1,!0),v=e.result),p?R(e,s,m,_,g,v,r,i,a):d?s.push(R(e,null,m,_,g,v,r,i,a)):s.push(g),z(e,!0,t),y=e.input.charCodeAt(e.position),y===44?(n=!0,y=e.input.charCodeAt(++e.position)):n=!1}D(e,`unexpected end of the stream within a flow collection`)}p(ae,`readFlowCollection`);function oe(t,n){let r,i=1,a=!1,o=!1,s=n,l=0,u=!1,d,p=t.input.charCodeAt(t.position);if(p===124)r=!1;else if(p===62)r=!0;else return!1;for(t.kind=`scalar`,t.result=``;p!==0;)if(p=t.input.charCodeAt(++t.position),p===43||p===45)i===1?i=p===43?3:2:D(t,`repeat of a chomping mode identifier`);else if((d=y(p))>=0)d===0?D(t,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?D(t,`repeat of an indentation width identifier`):(s=n+d-1,o=!0);else break;if(m(p)){do p=t.input.charCodeAt(++t.position);while(m(p));if(p===35)do p=t.input.charCodeAt(++t.position);while(!f(p)&&p!==0)}for(;p!==0;){for(ee(t),t.lineIndent=0,p=t.input.charCodeAt(t.position);(!o||t.lineIndent<s)&&p===32;)t.lineIndent++,p=t.input.charCodeAt(++t.position);if(!o&&t.lineIndent>s&&(s=t.lineIndent),f(p)){l++;continue}if(!o&&s===0&&D(t,`missing indentation for block scalar`),t.lineIndent<s){i===3?t.result+=e.repeat(`537-`,a?1+l:l):i===1&&a&&(t.result+=`538-`);break}r?m(p)?(u=!0,t.result+=e.repeat(`539-`,a?1+l:l)):u?(u=!1,t.result+=e.repeat(`540-`,l+1)):l===0?a&&(t.result+=` `):t.result+=e.repeat(`541-`,l):t.result+=e.repeat(`542-`,a?1+l:l),a=!0,o=!0,l=0;let n=t.position;for(;!f(p)&&p!==0;)p=t.input.charCodeAt(++t.position);I(t,n,t.position,!1)}return!0}p(oe,`readBlockScalar`);function se(e,t){let n=e.tag,r=e.anchor,i=[],a=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&k(e,e.anchor,i);let o=e.input.charCodeAt(e.position);for(;o!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,`tab characters must not be used in indentation`)),!(o!==45||!h(e.input.charCodeAt(e.position+1))));){if(a=!0,e.position++,z(e,!0,-1)&&e.lineIndent<=t){i.push(null),o=e.input.charCodeAt(e.position);continue}let n=e.line;if(pe(e,t,3,!1,!0),i.push(e.result),z(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&o!==0)D(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return a?(e.tag=n,e.anchor=r,e.kind=`sequence`,e.result=i,!0):!1}p(se,`readBlockSequence`);function ce(e,t,n){let r,i,a,o,s=e.tag,l=e.anchor,u={},d=Object.create(null),f=null,p=null,g=null,_=!1,v=!1;if(e.firstTabInLine!==-1)return!1;e.anchor!==null&&k(e,e.anchor,u);let y=e.input.charCodeAt(e.position);for(;y!==0;){!_&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,D(e,`tab characters must not be used in indentation`));let b=e.input.charCodeAt(e.position+1),x=e.line;if((y===63||y===58)&&h(b))y===63?(_&&(R(e,u,d,f,p,null,i,a,o),f=p=g=null),v=!0,_=!0,r=!0):_?(_=!1,r=!0):D(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,y=b;else{if(i=e.line,a=e.lineStart,o=e.position,!pe(e,n,2,!1,!0))break;if(e.line===x){for(y=e.input.charCodeAt(e.position);m(y);)y=e.input.charCodeAt(++e.position);if(y===58)y=e.input.charCodeAt(++e.position),h(y)||D(e,`a whitespace character is expected after the key-value separator within a block mapping`),_&&(R(e,u,d,f,p,null,i,a,o),f=p=g=null),v=!0,_=!1,r=!1,f=e.tag,p=e.result;else if(v)D(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=s,e.anchor=l,!0}else if(v)D(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=s,e.anchor=l,!0}if((e.line===x||e.lineIndent>t)&&(_&&(i=e.line,a=e.lineStart,o=e.position),pe(e,t,4,!0,r)&&(_?p=e.result:g=e.result),_||(R(e,u,d,f,p,g,i,a,o),f=p=g=null),z(e,!0,-1),y=e.input.charCodeAt(e.position)),(e.line===x||e.lineIndent>t)&&y!==0)D(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return _&&R(e,u,d,f,p,null,i,a,o),v&&(e.tag=s,e.anchor=l,e.kind=`mapping`,e.result=u),v}p(ce,`readBlockMapping`);function le(e){let t=!1,n=!1,r,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;e.tag!==null&&D(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(t=!0,o=e.input.charCodeAt(++e.position)):o===33?(n=!0,r=`!!`,o=e.input.charCodeAt(++e.position)):r=`!`;let d=e.position;if(t){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(d,e.position),o=e.input.charCodeAt(++e.position)):D(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!h(o);)o===33&&(n?D(e,`tag suffix cannot contain exclamation marks`):(r=e.input.slice(d-1,e.position+1),l.test(r)||D(e,`named tag handle cannot contain such characters`),n=!0,d=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(d,e.position),s.test(a)&&D(e,`tag suffix cannot contain flow indicator characters`)}a&&!u.test(a)&&D(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{D(e,`tag name is malformed: `+a)}return t?e.tag=a:i.call(e.tagMap,r)?e.tag=e.tagMap[r]+a:r===`!`?e.tag=`!`+a:r===`!!`?e.tag=`tag:yaml.org,2002:`+a:D(e,`undeclared tag handle "`+r+`"`),!0}p(le,`readTagProperty`);function ue(e){let t=e.input.charCodeAt(e.position);if(t!==38)return!1;e.anchor!==null&&D(e,`duplication of an anchor property`),t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!h(t)&&!g(t);)t=e.input.charCodeAt(++e.position);return e.position===n&&D(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(n,e.position),!0}p(ue,`readAnchorProperty`);function de(e){let t=e.input.charCodeAt(e.position);if(t!==42)return!1;t=e.input.charCodeAt(++e.position);let n=e.position;for(;t!==0&&!h(t)&&!g(t);)t=e.input.charCodeAt(++e.position);e.position===n&&D(e,`name of an alias node must contain at least one character`);let r=e.input.slice(n,e.position);return i.call(e.anchorMap,r)||D(e,`unidentified alias "`+r+`"`),e.result=e.anchorMap[r],z(e,!0,-1),!0}p(de,`readAlias`);function fe(e,t,n,r){let i=N(e);return A(e),P(e,t),e.tag=null,e.anchor=null,e.kind=null,e.result=null,ce(e,n,r)&&e.kind===`mapping`?(j(e),!0):(M(e),P(e,i),!1)}p(fe,`tryReadBlockMappingFromProperty`);function pe(e,t,n,r,a){let o,s,l=1,u=!1,d=!1,f=null,p,m,h;e.depth>=e.maxDepth&&D(e,`nesting exceeded maxDepth (`+e.maxDepth+`)`),e.depth+=1,e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null;let g=o=s=n===4||n===3;if(r&&z(e,!0,-1)&&(u=!0,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)),l===1)for(;;){let n=e.input.charCodeAt(e.position),r=N(e);if(u&&(n===33&&e.tag!==null||n===38&&e.anchor!==null)||!le(e)&&!ue(e))break;f===null&&(f=r),z(e,!0,-1)?(u=!0,s=g,e.lineIndent>t?l=1:e.lineIndent===t?l=0:e.lineIndent<t&&(l=-1)):s=!1}if(s&&=u||a,l===1||n===4){if(m=n===1||n===2?t:t+1,h=e.position-e.lineStart,l===1){if(s&&(se(e,h)||ce(e,h,m))||ae(e,m))d=!0;else{let t=e.input.charCodeAt(e.position);f!==null&&g&&!s&&t!==124&&t!==62&&fe(e,f,f.position-f.lineStart,m)||o&&oe(e,m)||re(e,m)||ie(e,m)?d=!0:de(e)?(d=!0,(e.tag!==null||e.anchor!==null)&&D(e,`alias node should not have any properties`)):ne(e,m,n===1)&&(d=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&k(e,e.anchor,e.result)}}else l===0&&(d=s&&se(e,h))}if(e.tag===null)e.anchor!==null&&k(e,e.anchor,e.result);else if(e.tag===`?`){e.result!==null&&e.kind!==`scalar`&&D(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`);for(let t=0,n=e.implicitTypes.length;t<n;t+=1)if(p=e.implicitTypes[t],p.resolve(e.result)){e.result=p.construct(e.result),e.tag=p.tag,e.anchor!==null&&k(e,e.anchor,e.result);break}}else if(e.tag!==`!`){if(i.call(e.typeMap[e.kind||`fallback`],e.tag))p=e.typeMap[e.kind||`fallback`][e.tag];else{p=null;let t=e.typeMap.multi[e.kind||`fallback`];for(let n=0,r=t.length;n<r;n+=1)if(e.tag.slice(0,t[n].tag.length)===t[n].tag){p=t[n];break}}p||D(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&p.kind!==e.kind&&D(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+p.kind+`", not "`+e.kind+`"`),p.resolve(e.result,e.tag)?(e.result=p.construct(e.result,e.tag),e.anchor!==null&&k(e,e.anchor,e.result)):D(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),--e.depth,e.tag!==null||e.anchor!==null||d}p(pe,`composeNode`);function me(e){let t=e.position,n=!1,r;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(r=e.input.charCodeAt(e.position))!==0&&(z(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||r!==37));){n=!0,r=e.input.charCodeAt(++e.position);let t=e.position;for(;r!==0&&!h(r);)r=e.input.charCodeAt(++e.position);let a=e.input.slice(t,e.position),o=[];for(a.length<1&&D(e,`directive name must not be less than one character in length`);r!==0;){for(;m(r);)r=e.input.charCodeAt(++e.position);if(r===35){do r=e.input.charCodeAt(++e.position);while(r!==0&&!f(r));break}if(f(r))break;for(t=e.position;r!==0&&!h(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}r!==0&&ee(e),i.call(F,a)?F[a](e,a,o):O(e,`unknown document directive "`+a+`"`)}if(z(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,z(e,!0,-1)):n&&D(e,`directives end mark is expected`),pe(e,e.lineIndent-1,4,!1,!0),z(e,!0,-1),e.checkLineBreaks&&o.test(e.input.slice(t,e.position))&&O(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&B(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,z(e,!0,-1));return}e.position<e.length-1&&D(e,`end of the stream or a document separator is expected`)}p(me,`readDocument`);function he(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`543-`),e.charCodeAt(0)===65279&&(e=e.slice(1)));let n=new T(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,D(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)me(n);return n.documents}p(he,`loadDocuments`);function ge(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);let r=he(e,n);if(typeof t!=`function`)return r;for(let e=0,n=r.length;e<n;e+=1)t(r[e])}p(ge,`loadAll2`);function _e(e,n){let r=he(e,n);if(r.length!==0){if(r.length===1)return r[0];throw new t(`expected a single document in the stream, but found more`)}}return p(_e,`load2`),Kx.loadAll=ge,Kx.load=_e,Kx}function _Ae(){if(HAe)return hS;HAe=1;let e=wx(),t=Tx(),n=Wx(),r=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=65279,o={};o[0]=`\\0`,o[7]=`\\a`,o[8]=`\\b`,o[9]=`\\t`,o[10]=`\\n`,o[11]=`\\v`,o[12]=`\\f`,o[13]=`\\r`,o[27]=`\\e`,o[34]=`\\"`,o[92]=`\\\\`,o[133]=`\\N`,o[160]=`\\_`,o[8232]=`\\L`,o[8233]=`\\P`;let s=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],l=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function u(e,t){if(t===null)return{};let n={},r=Object.keys(t);for(let a=0,o=r.length;a<o;a+=1){let o=r[a],s=String(t[o]);o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2));let l=e.compiledTypeMap.fallback[o];l&&i.call(l.styleAliases,s)&&(s=l.styleAliases[s]),n[o]=s}return n}p(u,`compileStyleMap`);function d(n){let r,i,a=n.toString(16).toUpperCase();if(n<=255)r=`x`,i=2;else if(n<=65535)r=`u`,i=4;else if(n<=4294967295)r=`U`,i=8;else throw new t(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+r+e.repeat(`0`,i-a.length)+a}p(d,`encodeHex`);function f(t){this.schema=t.schema||n,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=e.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=u(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType===`"`?2:1,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer==`function`?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}p(f,`State`);function m(t,n){let r=e.repeat(` `,n),i=0,a=``,o=t.length;for(;i<o;){let e,n=t.indexOf(`544-`,i);n===-1?(e=t.slice(i),i=o):(e=t.slice(i,n+1),i=n+1),e.length&&e!==`545-`&&(a+=r),a+=e}return a}p(m,`indentString`);function h(t,n){return`546-`+e.repeat(` `,t.indent*n)}p(h,`generateNextLine`);function g(e,t){for(let n=0,r=e.implicitTypes.length;n<r;n+=1)if(e.implicitTypes[n].resolve(t))return!0;return!1}p(g,`testImplicitResolving`);function _(e){return e===32||e===9}p(_,`isWhitespace`);function v(e){return e>=32&&e<=126||e>=161&&e<=55295&&e!==8232&&e!==8233||e>=57344&&e<=65533&&e!==a||e>=65536&&e<=1114111}p(v,`isPrintable`);function y(e){return v(e)&&e!==a&&e!==13&&e!==10}p(y,`isNsCharOrWhitespace`);function b(e,t,n){let r=y(e),i=r&&!_(e);return(n?r:r&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125)&&e!==35&&!(t===58&&!i)||y(t)&&!_(t)&&e===35||t===58&&i}p(b,`isPlainSafe`);function x(e){return v(e)&&e!==a&&!_(e)&&e!==45&&e!==63&&e!==58&&e!==44&&e!==91&&e!==93&&e!==123&&e!==125&&e!==35&&e!==38&&e!==42&&e!==33&&e!==124&&e!==61&&e!==62&&e!==39&&e!==34&&e!==37&&e!==64&&e!==96}p(x,`isPlainSafeFirst`);function S(e){return!_(e)&&e!==58}p(S,`isPlainSafeLast`);function C(e,t){let n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}p(C,`codePointAt`);function w(e){return/^\n* /.test(e)}p(w,`needIndentIndicator`);function T(e,t,n,r,i,a,o,s){let l,u=0,d=null,f=!1,p=!1,m=r!==-1,h=-1,g=x(C(e,0))&&S(C(e,e.length-1));if(t||o)for(l=0;l<e.length;u>=65536?l+=2:l++){if(u=C(e,l),!v(u))return 5;g&&=b(u,d,s),d=u}else{for(l=0;l<e.length;u>=65536?l+=2:l++){if(u=C(e,l),u===10)f=!0,m&&(p||=l-h-1>r&&e[h+1]!==` `,h=l);else if(!v(u))return 5;g&&=b(u,d,s),d=u}p||=m&&l-h-1>r&&e[h+1]!==` `}return!f&&!p?g&&!o&&!i(e)?1:a===2?5:2:n>9&&w(e)?5:o?a===2?5:2:p?4:3}p(T,`chooseScalarStyle`);function E(e,n,r,i,a){e.dump=(function(){if(n.length===0)return e.quotingType===2?`""`:`''`;if(!e.noCompatMode&&(s.indexOf(n)!==-1||l.test(n)))return e.quotingType===2?`"`+n+`"`:`'`+n+`'`;let o=e.indent*Math.max(1,r),u=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-o),d=i||e.flowLevel>-1&&r>=e.flowLevel;function f(t){return g(e,t)}switch(p(f,`testAmbiguity`),T(n,d,e.indent,u,f,e.quotingType,e.forceQuotes&&!i,a)){case 1:return n;case 2:return`'`+n.replace(/'/g,`''`)+`'`;case 3:return`|`+D(n,e.indent)+O(m(n,o));case 4:return`>`+D(n,e.indent)+O(m(k(n,u),o));case 5:return`"`+j(n)+`"`;default:throw new t(`impossible error: invalid scalar style`)}})()}p(E,`writeScalar`);function D(e,t){let n=w(e)?String(t):``,r=e[e.length-1]===`547-`;return n+(r&&(e[e.length-2]===`548-`||e===`549-`)?`+`:r?``:`-`)+`550-`}p(D,`blockHeader`);function O(e){return e[e.length-1]===`551-`?e.slice(0,-1):e}p(O,`dropEndingNewline`);function k(e,t){let n=/(\n+)([^\n]*)/g,r=(function(){let r=e.indexOf(`552-`);return r=r===-1?e.length:r,n.lastIndex=r,A(e.slice(0,r),t)})(),i=e[0]===`553-`||e[0]===` `,a,o;for(;o=n.exec(e);){let e=o[1],n=o[2];a=n[0]===` `,r+=e+(!i&&!a&&n!==``?`554-`:``)+A(n,t),i=a}return r}p(k,`foldString`);function A(e,t){if(e===``||e[0]===` `)return e;let n=/ [^ ]/g,r,i=0,a,o=0,s=0,l=``;for(;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,l+=`555-`+e.slice(i,a),i=a+1),o=s;return l+=`556-`,e.length-i>t&&o>i?l+=e.slice(i,o)+`557-`+e.slice(o+1):l+=e.slice(i),l.slice(1)}p(A,`foldLine`);function j(e){let t=``,n=0;for(let r=0;r<e.length;n>=65536?r+=2:r++){n=C(e,r);let i=o[n];!i&&v(n)?(t+=e[r],n>=65536&&(t+=e[r+1])):t+=i||d(n)}return t}p(j,`escapeString`);function M(e,t,n){let r=``,i=e.tag;for(let i=0,a=n.length;i<a;i+=1){let a=n[i];e.replacer&&(a=e.replacer.call(n,String(i),a)),(L(e,t,a,!1,!1)||a===void 0&&L(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump)}e.tag=i,e.dump=`[`+r+`]`}p(M,`writeFlowSequence`);function N(e,t,n,r){let i=``,a=e.tag;for(let a=0,o=n.length;a<o;a+=1){let o=n[a];e.replacer&&(o=e.replacer.call(n,String(a),o)),(L(e,t+1,o,!0,!0,!1,!0)||o===void 0&&L(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=h(e,t)),e.dump&&e.dump.charCodeAt(0)===10?i+=`-`:i+=`- `,i+=e.dump)}e.tag=a,e.dump=i||`[]`}p(N,`writeBlockSequence`);function P(e,t,n){let r=``,i=e.tag,a=Object.keys(n);for(let i=0,o=a.length;i<o;i+=1){let o=``;r!==``&&(o+=`, `),e.condenseFlow&&(o+=`"`);let s=a[i],l=n[s];e.replacer&&(l=e.replacer.call(n,s,l)),L(e,t,s,!1,!1)&&(e.dump.length>1024&&(o+=`? `),o+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),L(e,t,l,!1,!1)&&(o+=e.dump,r+=o))}e.tag=i,e.dump=`{`+r+`}`}p(P,`writeFlowMapping`);function F(e,n,r,i){let a=``,o=e.tag,s=Object.keys(r);if(e.sortKeys===!0)s.sort();else if(typeof e.sortKeys==`function`)s.sort(e.sortKeys);else if(e.sortKeys)throw new t(`sortKeys must be a boolean or a function`);for(let t=0,o=s.length;t<o;t+=1){let o=``;(!i||a!==``)&&(o+=h(e,n));let l=s[t],u=r[l];if(e.replacer&&(u=e.replacer.call(r,l,u)),!L(e,n+1,l,!0,!0,!0))continue;let d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024;d&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`?`:o+=`? `),o+=e.dump,d&&(o+=h(e,n)),L(e,n+1,u,!0,d)&&(e.dump&&e.dump.charCodeAt(0)===10?o+=`:`:o+=`: `,o+=e.dump,a+=o)}e.tag=o,e.dump=a||`{}`}p(F,`writeBlockMapping`);function I(e,n,a){let o=a?e.explicitTypes:e.implicitTypes;for(let s=0,l=o.length;s<l;s+=1){let l=o[s];if((l.instanceOf||l.predicate)&&(!l.instanceOf||typeof n==`object`&&n instanceof l.instanceOf)&&(!l.predicate||l.predicate(n))){if(e.tag=a?l.multi&&l.representName?l.representName(n):l.tag:`?`,l.represent){let a=e.styleMap[l.tag]||l.defaultStyle,o;if(r.call(l.represent)===`[object Function]`)o=l.represent(n,a);else if(i.call(l.represent,a))o=l.represent[a](n,a);else throw new t(`!<`+l.tag+`> tag resolver accepts not "`+a+`" style`);e.dump=o}return!0}}return!1}p(I,`detectType`);function L(e,n,i,a,o,s,l){e.tag=null,e.dump=i,I(e,i,!1)||I(e,i,!0);let u=r.call(e.dump),d=a;a&&=e.flowLevel<0||e.flowLevel>n;let f=u===`[object Object]`||u===`[object Array]`,p,m;if(f&&(p=e.duplicates.indexOf(i),m=p!==-1),(e.tag!==null&&e.tag!==`?`||m||e.indent!==2&&n>0)&&(o=!1),m&&e.usedDuplicates[p])e.dump=`*ref_`+p;else{if(f&&m&&!e.usedDuplicates[p]&&(e.usedDuplicates[p]=!0),u===`[object Object]`)a&&Object.keys(e.dump).length!==0?(F(e,n,e.dump,o),m&&(e.dump=`&ref_`+p+e.dump)):(P(e,n,e.dump),m&&(e.dump=`&ref_`+p+` `+e.dump));else if(u===`[object Array]`)a&&e.dump.length!==0?(e.noArrayIndent&&!l&&n>0?N(e,n-1,e.dump,o):N(e,n,e.dump,o),m&&(e.dump=`&ref_`+p+e.dump)):(M(e,n,e.dump),m&&(e.dump=`&ref_`+p+` `+e.dump));else if(u===`[object String]`)e.tag!==`?`&&E(e,e.dump,n,s,d);else if(u===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new t(`unacceptable kind of an object to dump `+u)}if(e.tag!==null&&e.tag!==`?`){let t=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`);t=e.tag[0]===`!`?`!`+t:t.slice(0,18)===`tag:yaml.org,2002:`?`!!`+t.slice(18):`!<`+t+`>`,e.dump=t+` `+e.dump}}return!0}p(L,`writeNode`);function R(e,t){let n=[],r=[];ee(e,n,r);let i=r.length;for(let e=0;e<i;e+=1)t.duplicates.push(n[r[e]]);t.usedDuplicates=Array(i)}p(R,`getDuplicateReferences`);function ee(e,t,n){if(typeof e==`object`&&e){let r=t.indexOf(e);if(r!==-1)n.indexOf(r)===-1&&n.push(r);else if(t.push(e),Array.isArray(e))for(let r=0,i=e.length;r<i;r+=1)ee(e[r],t,n);else{let r=Object.keys(e);for(let i=0,a=r.length;i<a;i+=1)ee(e[r[i]],t,n)}}}p(ee,`inspectNode`);function z(e,t){t||={};let n=new f(t);n.noRefs||R(e,n);let r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),L(n,0,r,!0,!0)?n.dump+`558-`:``}return p(z,`dump2`),hS.dump=z,hS}function vAe(){if(UAe)return Gx;UAe=1;let e=gAe(),t=_Ae();function n(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}return p(n,`renamed`),Gx.Type=Ex(),Gx.Schema=Dx(),Gx.FAILSAFE_SCHEMA=jx(),Gx.JSON_SCHEMA=Ix(),Gx.CORE_SCHEMA=Lx(),Gx.DEFAULT_SCHEMA=Wx(),Gx.load=e.load,Gx.loadAll=e.loadAll,Gx.dump=t.dump,Gx.YAMLException=Tx(),Gx.types={binary:Bx(),float:Fx(),map:Ax(),null:Mx(),pairs:Hx(),set:Ux(),timestamp:Rx(),bool:Nx(),int:Px(),merge:zx(),omap:Vx(),seq:kx(),str:Ox()},Gx.safeLoad=n(`safeLoad`,`load`),Gx.safeLoadAll=n(`safeLoadAll`,`loadAll`),Gx.safeDump=n(`safeDump`,`dump`),Gx}var Gx,Kx,qx,yAe,Jx,bAe,Yx,xAe,Xx,SAe,Zx,CAe,Qx,wAe,$x,TAe,eS,EAe,tS,DAe,nS,OAe,rS,kAe,iS,AAe,aS,jAe,oS,MAe,sS,NAe,cS,PAe,lS,FAe,uS,IAe,dS,LAe,fS,RAe,pS,zAe,mS,BAe,VAe,hS,HAe,UAe,WAe,GAe,KAe,gS,qAe,JAe,_S,YAe,XAe,ZAe,QAe,$Ae,eje,tje,vS=o((()=>{h(),p(mAe,`getDefaultExportFromCjs`),Gx={},Kx={},qx={},p(wx,`requireCommon`),p(Tx,`requireException`),p(hAe,`requireSnippet`),p(Ex,`requireType`),p(Dx,`requireSchema`),p(Ox,`requireStr`),p(kx,`requireSeq`),p(Ax,`requireMap`),p(jx,`requireFailsafe`),p(Mx,`require_null`),p(Nx,`requireBool`),p(Px,`requireInt`),p(Fx,`requireFloat`),p(Ix,`requireJson`),p(Lx,`requireCore`),p(Rx,`requireTimestamp`),p(zx,`requireMerge`),p(Bx,`requireBinary`),p(Vx,`requireOmap`),p(Hx,`requirePairs`),p(Ux,`requireSet`),p(Wx,`require_default`),p(gAe,`requireLoader`),hS={},p(_Ae,`requireDumper`),p(vAe,`requireJsYaml`),{Type:WAe,Schema:GAe,FAILSAFE_SCHEMA:KAe,JSON_SCHEMA:gS,CORE_SCHEMA:qAe,DEFAULT_SCHEMA:JAe,load:_S,loadAll:YAe,dump:XAe,YAMLException:ZAe,types:QAe,safeLoad:$Ae,safeLoadAll:eje,safeDump:tje}=mAe(vAe())}));function nje(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function rje(e,t){if(e!==`_next`&&e!==`_prev`)return t}var ije,aje=o((()=>{ije=class{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,t=e._prev;if(t!==e)return nje(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&nje(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,rje)),n=n._prev;return`[`+e.join(`, `)+`]`}}}));function oje(e,t){if(e.nodeCount()<=1)return[];var n=cje(e,t||lje);return ly(kb(sje(n.graph,n.buckets,n.zeroIdx),function(t){return e.outEdges(t.v,t.w)}))}function sje(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)yS(e,t,n,o);for(;o=i.dequeue();)yS(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(yS(e,t,n,o,!0));break}}}return r}function yS(e,t,n,r,i){var a=i?[]:void 0;return Eb(e.inEdges(r.v),function(r){var o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,bS(t,n,s)}),Eb(e.outEdges(r.v),function(r){var i=e.edge(r),a=r.w,o=e.node(a);o.in-=i,bS(t,n,o)}),e.removeNode(r.v),a}function cje(e,t){var n=new ix,r=0,i=0;Eb(e.nodes(),function(e){n.setNode(e,{v:e,in:0,out:0})}),Eb(e.edges(),function(e){var a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});var a=Yb(i+r+3).map(function(){return new ije}),o=r+1;return Eb(n.nodes(),function(e){bS(a,o,n.node(e))}),{graph:n,buckets:a,zeroIdx:o}}function bS(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var lje,uje=o((()=>{$b(),ax(),aje(),lje=L_(1)}));function dje(e){Eb(e.graph().acyclicer===`greedy`?oje(e,t(e)):fje(e),function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,Qb(`rev`))});function t(e){return function(t){return e.edge(t).weight}}}function fje(e){var t=[],n={},r={};function i(a){Object.prototype.hasOwnProperty.call(r,a)||(r[a]=!0,n[a]=!0,Eb(e.outEdges(a),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return Eb(e.nodes(),i),t}function pje(e){Eb(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var mje=o((()=>{$b(),uje()}));function xS(e,t,n,r){var i;do i=Qb(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function hje(e){var t=new ix().setGraph(e.graph());return Eb(e.nodes(),function(n){t.setNode(n,e.node(n))}),Eb(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function gje(e){var t=new ix({multigraph:e.isMultigraph()}).setGraph(e.graph());return Eb(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),Eb(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function _je(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);var l,u;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),l=s*i/a,u=s):(i<0&&(o=-o),l=o,u=o*a/i),{x:n+l,y:r+u}}function SS(e){var t=kb(Yb(xje(e)+1),function(){return[]});return Eb(e.nodes(),function(n){var r=e.node(n),i=r.rank;jb(i)||(t[i][r.order]=n)}),t}function vje(e){var t=Rb(kb(e.nodes(),function(t){return e.node(t).rank}));Eb(e.nodes(),function(n){var r=e.node(n);wOe(r,`rank`)&&(r.rank-=t)})}function yje(e){var t=Rb(kb(e.nodes(),function(t){return e.node(t).rank})),n=[];Eb(e.nodes(),function(r){var i=e.node(r).rank-t;n[i]||(n[i]=[]),n[i].push(r)});var r=0,i=e.graph().nodeRankFactor;Eb(n,function(t,n){jb(t)&&n%i!==0?--r:r&&Eb(t,function(t){e.node(t).rank+=r})})}function bje(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),xS(e,`border`,i,t)}function xje(e){return Ib(kb(e.nodes(),function(t){var n=e.node(t).rank;if(!jb(n))return n}))}function Sje(e,t){var n={lhs:[],rhs:[]};return Eb(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function Cje(e,t){var n=vb();try{return t()}finally{console.log(e+` time: `+(vb()-n)+`ms`)}}function wje(e,t){return t()}var CS=o((()=>{$b(),ax()}));function Tje(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&Eb(r,t),Object.prototype.hasOwnProperty.call(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)Eje(e,`borderLeft`,`_bl`,n,i,a),Eje(e,`borderRight`,`_br`,n,i,a)}}Eb(e.children(),t)}function Eje(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],l=xS(e,`border`,o,n);i[t][a]=l,e.setParent(l,r),s&&e.setEdge(s,l,{weight:1})}var Dje=o((()=>{$b(),CS()}));function Oje(e){var t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&Aje(e)}function kje(e){var t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Mje(e),(t===`lr`||t===`rl`)&&(Nje(e),Aje(e))}function Aje(e){Eb(e.nodes(),function(t){jje(e.node(t))}),Eb(e.edges(),function(t){jje(e.edge(t))})}function jje(e){var t=e.width;e.width=e.height,e.height=t}function Mje(e){Eb(e.nodes(),function(t){wS(e.node(t))}),Eb(e.edges(),function(t){var n=e.edge(t);Eb(n.points,wS),Object.prototype.hasOwnProperty.call(n,`y`)&&wS(n)})}function wS(e){e.y=-e.y}function Nje(e){Eb(e.nodes(),function(t){TS(e.node(t))}),Eb(e.edges(),function(t){var n=e.edge(t);Eb(n.points,TS),Object.prototype.hasOwnProperty.call(n,`x`)&&TS(n)})}function TS(e){var t=e.x;e.x=e.y,e.y=t}var Pje=o((()=>{$b()}));function Fje(e){e.graph().dummyChains=[],Eb(e.edges(),function(t){Ije(e,t)})}function Ije(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),l=s.labelRank;if(a!==r+1){e.removeEdge(t);var u=void 0,d,f;for(f=0,++r;r<a;++f,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},d=xS(e,`edge`,u,`_d`),r===l&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,d,{weight:s.weight},o),f===0&&e.graph().dummyChains.push(d),n=d;e.setEdge(n,i,{weight:s.weight},o)}}function Lje(e){Eb(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var Rje=o((()=>{$b(),CS()}));function ES(e){var t={};function n(r){var i=e.node(r);if(Object.prototype.hasOwnProperty.call(t,r))return i.rank;t[r]=!0;var a=Rb(kb(e.outEdges(r),function(t){return n(t.w)-e.edge(t).minlen}));return(a===1/0||a==null)&&(a=0),i.rank=a}Eb(e.sources(),n)}function DS(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var OS=o((()=>{$b()}));function zje(e){var t=new ix({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;Bje(t,e)<r;)i=Vje(t,e),a=t.hasNode(i.v)?DS(e,i):-DS(e,i),Hje(t,e,a);return t}function Bje(e,t){function n(r){Eb(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;!e.hasNode(o)&&!DS(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return Eb(e.nodes(),n),e.nodeCount()}function Vje(e,t){return zb(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return DS(t,n)})}function Hje(e,t,n){Eb(e.nodes(),function(e){t.node(e).rank+=n})}var Uje=o((()=>{$b(),ax(),OS()})),Wje=o((()=>{$b()})),Gje=o((()=>{Wje()})),Kje=o((()=>{$b()})),qje=o((()=>{$b()})),Jje=o((()=>{qje()}));function Yje(e,t,n){m_(t)||(t=[t]);var r=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return Eb(t,function(t){if(!e.hasNode(t))throw Error(`Graph does not have node: `+t);Xje(e,t,n===`post`,a,r,i)}),i}function Xje(e,t,n,r,i,a){Object.prototype.hasOwnProperty.call(r,t)||(r[t]=!0,n||a.push(t),Eb(i(t),function(t){Xje(e,t,n,r,i,a)}),n&&a.push(t))}var Zje=o((()=>{$b()}));function Qje(e,t){return Yje(e,t,`post`)}var $je=o((()=>{Zje()}));function eMe(e,t){return Yje(e,t,`pre`)}var tMe=o((()=>{Zje()})),nMe=o((()=>{Uke()})),rMe=o((()=>{Wje(),Gje(),Kje(),Jje(),$je(),tMe(),nMe(),qje()}));function kS(e){e=hje(e),ES(e);var t=zje(e);jS(t),AS(t,e);for(var n,r;n=sMe(t);)r=cMe(t,e,n),lMe(t,e,n,r)}function AS(e,t){var n=Qje(e,e.nodes());n=n.slice(0,n.length-1),Eb(n,function(n){iMe(e,t,n)})}function iMe(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=aMe(e,t,n)}function aMe(e,t,n){var r=e.node(n).parent,i=!0,a=t.edge(n,r),o=0;return a||=(i=!1,t.edge(r,n)),o=a.weight,Eb(t.nodeEdges(n),function(a){var s=a.v===n,l=s?a.w:a.v;if(l!==r){var u=s===i,d=t.edge(a).weight;if(o+=u?d:-d,dMe(e,n,l)){var f=e.edge(n,l).cutvalue;o+=u?-f:f}}}),o}function jS(e,t){arguments.length<2&&(t=e.nodes()[0]),oMe(e,{},1,t)}function oMe(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,Eb(e.neighbors(r),function(i){Object.prototype.hasOwnProperty.call(t,i)||(n=oMe(e,t,n,i,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function sMe(e){return Ob(e.edges(),function(t){return e.edge(t).cutvalue<0})}function cMe(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,l=!1;return a.lim>o.lim&&(s=o,l=!0),zb(Db(t.edges(),function(t){return l===fMe(e,e.node(t.v),s)&&l!==fMe(e,e.node(t.w),s)}),function(e){return DS(t,e)})}function lMe(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),jS(e),AS(e,t),uMe(e,t)}function uMe(e,t){var n=eMe(e,Ob(e.nodes(),function(e){return!t.node(e).parent}));n=n.slice(1),Eb(n,function(n){var r=e.node(n).parent,i=t.edge(n,r),a=!1;i||(i=t.edge(r,n),a=!0),t.node(n).rank=t.node(r).rank+(a?i.minlen:-i.minlen)})}function dMe(e,t,n){return e.hasEdge(t,n)}function fMe(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var pMe=o((()=>{$b(),rMe(),CS(),Uje(),OS(),kS.initLowLimValues=jS,kS.initCutValues=AS,kS.calcCutValue=aMe,kS.leaveEdge=sMe,kS.enterEdge=cMe,kS.exchangeEdges=lMe}));function mMe(e){switch(e.graph().ranker){case`network-simplex`:gMe(e);break;case`tight-tree`:hMe(e);break;case`longest-path`:_Me(e);break;default:gMe(e)}}function hMe(e){ES(e),zje(e)}function gMe(e){kS(e)}var _Me,vMe=o((()=>{Uje(),pMe(),OS(),_Me=ES}));function yMe(e){var t=xS(e,`root`,{},`_root`),n=xMe(e),r=Ib(Ab(n))-1,i=2*r+1;e.graph().nestingRoot=t,Eb(e.edges(),function(t){e.edge(t).minlen*=i});var a=SMe(e)+1;Eb(e.children(),function(o){bMe(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function bMe(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var l=bje(e,`_bt`),u=bje(e,`_bb`),d=e.node(o);e.setParent(l,o),d.borderTop=l,e.setParent(u,o),d.borderBottom=u,Eb(s,function(s){bMe(e,t,n,r,i,a,s);var d=e.node(s),f=d.borderTop?d.borderTop:s,p=d.borderBottom?d.borderBottom:s,m=d.borderTop?r:2*r,h=f===p?i-a[o]+1:1;e.setEdge(l,f,{weight:m,minlen:h,nestingEdge:!0}),e.setEdge(p,u,{weight:m,minlen:h,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,l,{weight:0,minlen:i+a[o]})}function xMe(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&Eb(a,function(e){n(e,i+1)}),t[r]=i}return Eb(e.children(),function(e){n(e,1)}),t}function SMe(e){return Xb(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function CMe(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,Eb(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var wMe=o((()=>{$b(),CS()}));function TMe(e,t,n){var r={},i;Eb(n,function(n){for(var a=e.parent(n),o,s;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}var EMe=o((()=>{$b()}));function DMe(e,t,n){var r=OMe(e),i=new ix({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(t){return e.node(t)});return Eb(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),Eb(e[n](a),function(t){var n=t.v===a?t.w:t.v,r=i.edge(n,a),o=jb(r)?0:r.weight;i.setEdge(n,a,{weight:e.edge(t).weight+o})}),Object.prototype.hasOwnProperty.call(o,`minRank`)&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function OMe(e){for(var t;e.hasNode(t=Qb(`_root`)););return t}var kMe=o((()=>{$b(),ax()}));function AMe(e,t){for(var n=0,r=1;r<t.length;++r)n+=jMe(e,t[r-1],t[r]);return n}function jMe(e,t,n){for(var r=Lke(n,kb(n,function(e,t){return t})),i=ly(kb(t,function(t){return Zb(kb(e.outEdges(t),function(t){return{pos:r[t.w],weight:e.edge(t).weight}}),`pos`)})),a=1;a<n.length;)a<<=1;var o=2*a-1;--a;var s=kb(Array(o),function(){return 0}),l=0;return Eb(i.forEach(function(e){var t=e.pos+a;s[t]+=e.weight;for(var n=0;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;l+=e.weight*n})),l}var MMe=o((()=>{$b()}));function NMe(e){var t={},n=Db(e.nodes(),function(t){return!e.children(t).length}),r=Ib(kb(n,function(t){return e.node(t).rank})),i=kb(Yb(r+1),function(){return[]});function a(n){wOe(t,n)||(t[n]=!0,i[e.node(n).rank].push(n),Eb(e.successors(n),a))}return Eb(Zb(n,function(t){return e.node(t).rank}),a),i}var PMe=o((()=>{$b()}));function FMe(e,t){return kb(t,function(t){var n=e.inEdges(t);if(n.length){var r=Xb(n,function(t,n){var r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}}return{v:t}})}var IMe=o((()=>{$b()}));function LMe(e,t){var n={};return Eb(e,function(e,t){var r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};jb(e.barycenter)||(r.barycenter=e.barycenter,r.weight=e.weight)}),Eb(t.edges(),function(e){var t=n[e.v],r=n[e.w];!jb(t)&&!jb(r)&&(r.indegree++,t.out.push(n[e.w]))}),RMe(Db(n,function(e){return!e.indegree}))}function RMe(e){var t=[];function n(e){return function(t){t.merged||(jb(t.barycenter)||jb(e.barycenter)||t.barycenter>=e.barycenter)&&zMe(e,t)}}function r(t){return function(n){n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),Eb(i.in.reverse(),n(i)),Eb(i.out,r(i))}return kb(Db(t,function(e){return!e.merged}),function(e){return Jb(e,[`vs`,`i`,`barycenter`,`weight`])})}function zMe(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var BMe=o((()=>{$b()}));function VMe(e,t){var n=Sje(e,function(e){return Object.prototype.hasOwnProperty.call(e,`barycenter`)}),r=n.lhs,i=Zb(n.rhs,function(e){return-e.i}),a=[],o=0,s=0,l=0;r.sort(UMe(!!t)),l=HMe(a,i,l),Eb(r,function(e){l+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,l=HMe(a,i,l)});var u={vs:ly(a)};return s&&(u.barycenter=o/s,u.weight=s),u}function HMe(e,t,n){for(var r;t.length&&(r=Cb(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function UMe(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var WMe=o((()=>{$b(),CS()}));function GMe(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,l={};o&&(i=Db(i,function(e){return e!==o&&e!==s}));var u=FMe(e,i);Eb(u,function(t){if(e.children(t.v).length){var i=GMe(e,t.v,n,r);l[t.v]=i,Object.prototype.hasOwnProperty.call(i,`barycenter`)&&qMe(t,i)}});var d=LMe(u,n);KMe(d,l);var f=VMe(d,r);if(o&&(f.vs=ly([o,f.vs,s]),e.predecessors(o).length)){var p=e.node(e.predecessors(o)[0]),m=e.node(e.predecessors(s)[0]);Object.prototype.hasOwnProperty.call(f,`barycenter`)||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+m.order)/(f.weight+2),f.weight+=2}return f}function KMe(e,t){Eb(e,function(e){e.vs=ly(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function qMe(e,t){jb(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var JMe=o((()=>{$b(),IMe(),BMe(),WMe()}));function YMe(e){var t=xje(e),n=XMe(e,Yb(1,t+1),`inEdges`),r=XMe(e,Yb(t-1,-1,-1),`outEdges`),i=NMe(e);QMe(e,i);for(var a=1/0,o,s=0,l=0;l<4;++s,++l){ZMe(s%2?n:r,s%4>=2),i=SS(e);var u=AMe(e,i);u<a&&(l=0,o=CEe(i),a=u)}QMe(e,o)}function XMe(e,t,n){return kb(t,function(t){return DMe(e,t,n)})}function ZMe(e,t){var n=new ix;Eb(e,function(e){var r=e.graph().root,i=GMe(e,r,n,t);Eb(i.vs,function(t,n){e.node(t).order=n}),TMe(e,n,i.vs)})}function QMe(e,t){Eb(t,function(t){Eb(t,function(t,n){e.node(t).order=n})})}var $Me=o((()=>{$b(),ax(),CS(),EMe(),kMe(),MMe(),PMe(),JMe()}));function eNe(e){var t=nNe(e);Eb(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=tNe(e,t,i.v,i.w),o=a.path,s=a.lca,l=0,u=o[l],d=!0;n!==i.w;){if(r=e.node(n),d){for(;(u=o[l])!==s&&e.node(u).maxRank<r.rank;)l++;u===s&&(d=!1)}if(!d){for(;l<o.length-1&&e.node(u=o[l+1]).minRank<=r.rank;)l++;u=o[l]}e.setParent(n,u),n=e.successors(n)[0]}})}function tNe(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),l=n,u;do l=e.parent(l),i.push(l);while(l&&(t[l].low>o||s>t[l].lim));for(u=l,l=r;(l=e.parent(l))!==u;)a.push(l);return{path:i.concat(a.reverse()),lca:u}}function nNe(e){var t={},n=0;function r(i){var a=n;Eb(e.children(i),r),t[i]={low:a,lim:n++}}return Eb(e.children(),r),t}var rNe=o((()=>{$b()}));function iNe(e,t){var n={};function r(t,r){var i=0,a=0,o=t.length,s=Cb(r);return Eb(r,function(t,l){var u=oNe(e,t),d=u?e.node(u).order:o;(u||t===s)&&(Eb(r.slice(a,l+1),function(t){Eb(e.predecessors(t),function(r){var a=e.node(r),o=a.order;(o<i||d<o)&&!(a.dummy&&e.node(t).dummy)&&sNe(n,r,t)})}),a=l+1,i=d)}),r}return Xb(t,r),n}function aNe(e,t){var n={};function r(t,r,i,a,o){var s;Eb(Yb(r,i),function(r){s=t[r],e.node(s).dummy&&Eb(e.predecessors(s),function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&sNe(n,t,s)})})}function i(t,n){var i=-1,a,o=0;return Eb(n,function(s,l){if(e.node(s).dummy===`border`){var u=e.predecessors(s);u.length&&(a=e.node(u[0]).order,r(n,o,l,i,a),o=l,i=a)}r(n,o,n.length,a,t.length)}),n}return Xb(t,i),n}function oNe(e,t){if(e.node(t).dummy)return Ob(e.predecessors(t),function(t){return e.node(t).dummy})}function sNe(e,t,n){if(t>n){var r=t;t=n,n=r}Object.prototype.hasOwnProperty.call(e,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,value:{},writable:!0});var i=e[t];Object.defineProperty(i,n,{enumerable:!0,configurable:!0,value:!0,writable:!0})}function cNe(e,t,n){if(t>n){var r=t;t=n,n=r}return!!e[t]&&Object.prototype.hasOwnProperty.call(e[t],n)}function lNe(e,t,n,r){var i={},a={},o={};return Eb(t,function(e){Eb(e,function(e,t){i[e]=e,a[e]=e,o[e]=t})}),Eb(t,function(e){var t=-1;Eb(e,function(e){var s=r(e);if(s.length){s=Zb(s,function(e){return o[e]});for(var l=(s.length-1)/2,u=Math.floor(l),d=Math.ceil(l);u<=d;++u){var f=s[u];a[e]===e&&t<o[f]&&!cNe(n,e,f)&&(a[f]=e,a[e]=i[e]=i[f],t=o[f])}}})}),{root:i,align:a}}function uNe(e,t,n,r,i){var a={},o=dNe(e,t,n,i),s=i?`borderLeft`:`borderRight`;function l(e,t){for(var n=o.nodes(),r=n.pop(),i={};r;)i[r]?e(r):(i[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}function u(e){a[e]=o.inEdges(e).reduce(function(e,t){return Math.max(e,a[t.v]+o.edge(t))},0)}function d(t){var n=o.outEdges(t).reduce(function(e,t){return Math.min(e,a[t.w]-o.edge(t))},1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return l(u,o.predecessors.bind(o)),l(d,o.successors.bind(o)),Eb(r,function(e){a[e]=a[n[e]]}),a}function dNe(e,t,n,r){var i=new ix,a=e.graph(),o=gNe(a.nodesep,a.edgesep,r);return Eb(t,function(t){var r;Eb(t,function(t){var a=n[t];if(i.setNode(a),r){var s=n[r],l=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),l||0))}r=t})}),i}function fNe(e,t){return zb(Ab(t),function(t){var n=-1/0,r=1/0;return hOe(t,function(t,i){var a=_Ne(e,i)/2;n=Math.max(t+a,n),r=Math.min(t-a,r)}),n-r})}function pNe(e,t){var n=Ab(t),r=Rb(n),i=Ib(n);Eb([`u`,`d`],function(n){Eb([`l`,`r`],function(a){var o=n+a,s=e[o],l;if(s!==t){var u=Ab(s);l=a===`l`?r-Rb(u):i-Ib(u),l&&(e[o]=Nb(s,function(e){return e+l}))}})})}function mNe(e,t){return Nb(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=Zb(kb(e,r));return(i[1]+i[2])/2})}function hNe(e){var t=SS(e),n=Lb(iNe(e,t),aNe(e,t)),r={},i;return Eb([`u`,`d`],function(a){i=a===`u`?t:Ab(t).reverse(),Eb([`l`,`r`],function(t){t===`r`&&(i=kb(i,function(e){return Ab(e).reverse()}));var o=(a===`u`?e.predecessors:e.successors).bind(e),s=lNe(e,i,n,o),l=uNe(e,i,s.root,s.align,t===`r`);t===`r`&&(l=Nb(l,function(e){return-e})),r[a+t]=l})}),pNe(r,fNe(e,r)),mNe(r,e.graph().align)}function gNe(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),l=0,u;if(l+=o.width/2,Object.prototype.hasOwnProperty.call(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:u=-o.width/2;break;case`r`:u=o.width/2}if(u&&(l+=n?u:-u),u=0,l+=(o.dummy?t:e)/2,l+=(s.dummy?t:e)/2,l+=s.width/2,Object.prototype.hasOwnProperty.call(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:u=s.width/2;break;case`r`:u=-s.width/2}return u&&(l+=n?u:-u),u=0,l}}function _Ne(e,t){return e.node(t).width}var vNe=o((()=>{$b(),ax(),CS()}));function yNe(e){e=gje(e),bNe(e),_Oe(hNe(e),function(t,n){e.node(n).x=t})}function bNe(e){var t=SS(e),n=e.graph().ranksep,r=0;Eb(t,function(t){var i=Ib(kb(t,function(t){return e.node(t).height}));Eb(t,function(t){e.node(t).y=r+i/2}),r+=i+n})}var xNe=o((()=>{$b(),CS(),vNe()}));function SNe(e,t){var n=t&&t.debugTiming?Cje:wje;n(`layout`,()=>{var t=n(` buildLayoutGraph`,()=>TNe(e));n(` runLayout`,()=>CNe(t,n)),n(` updateInputGraph`,()=>wNe(e,t))})}function CNe(e,t){t(` makeSpaceForEdgeLabels`,()=>ENe(e)),t(` removeSelfEdges`,()=>FNe(e)),t(` acyclic`,()=>dje(e)),t(` nestingGraph.run`,()=>yMe(e)),t(` rank`,()=>mMe(gje(e))),t(` injectEdgeLabelProxies`,()=>DNe(e)),t(` removeEmptyRanks`,()=>yje(e)),t(` nestingGraph.cleanup`,()=>CMe(e)),t(` normalizeRanks`,()=>vje(e)),t(` assignRankMinMax`,()=>ONe(e)),t(` removeEdgeLabelProxies`,()=>kNe(e)),t(` normalize.run`,()=>Fje(e)),t(` parentDummyChains`,()=>eNe(e)),t(` addBorderSegments`,()=>Tje(e)),t(` order`,()=>YMe(e)),t(` insertSelfEdges`,()=>INe(e)),t(` adjustCoordinateSystem`,()=>Oje(e)),t(` position`,()=>yNe(e)),t(` positionSelfEdges`,()=>LNe(e)),t(` removeBorderNodes`,()=>PNe(e)),t(` normalize.undo`,()=>Lje(e)),t(` fixupEdgeLabelCoords`,()=>MNe(e)),t(` undoCoordinateSystem`,()=>kje(e)),t(` translateGraph`,()=>ANe(e)),t(` assignNodeIntersects`,()=>jNe(e)),t(` reversePoints`,()=>NNe(e)),t(` acyclic.undo`,()=>pje(e))}function wNe(e,t){Eb(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),Eb(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,Object.prototype.hasOwnProperty.call(i,`x`)&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}function TNe(e){var t=new ix({multigraph:!0,compound:!0}),n=NS(e.graph());return t.setGraph(Lb({},zNe,MS(n,RNe),Jb(n,BNe))),Eb(e.nodes(),function(n){var r=NS(e.node(n));t.setNode(n,VDe(MS(r,VNe),HNe)),t.setParent(n,e.parent(n))}),Eb(e.edges(),function(n){var r=NS(e.edge(n));t.setEdge(n,Lb({},WNe,MS(r,UNe),Jb(r,GNe)))}),t}function ENe(e){var t=e.graph();t.ranksep/=2,Eb(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function DNe(e){Eb(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v);xS(e,`edge-proxy`,{rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t},`_ep`)}})}function ONe(e){var t=0;Eb(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Ib(t,r.maxRank))}),e.graph().maxRank=t}function kNe(e){Eb(e.nodes(),function(t){var n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function ANe(e){var t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function l(e){var a=e.x,o=e.y,s=e.width,l=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-l/2),i=Math.max(i,o+l/2)}Eb(e.nodes(),function(t){l(e.node(t))}),Eb(e.edges(),function(t){var n=e.edge(t);Object.prototype.hasOwnProperty.call(n,`x`)&&l(n)}),t-=o,r-=s,Eb(e.nodes(),function(n){var i=e.node(n);i.x-=t,i.y-=r}),Eb(e.edges(),function(n){var i=e.edge(n);Eb(i.points,function(e){e.x-=t,e.y-=r}),Object.prototype.hasOwnProperty.call(i,`x`)&&(i.x-=t),Object.prototype.hasOwnProperty.call(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function jNe(e){Eb(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(_je(r,a)),n.points.push(_je(i,o))})}function MNe(e){Eb(e.edges(),function(t){var n=e.edge(t);if(Object.prototype.hasOwnProperty.call(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function NNe(e){Eb(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function PNe(e){Eb(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(Cb(n.borderLeft)),o=e.node(Cb(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),Eb(e.nodes(),function(t){e.node(t).dummy===`border`&&e.removeNode(t)})}function FNe(e){Eb(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function INe(e){Eb(SS(e),function(t){var n=0;Eb(t,function(t,r){var i=e.node(t);i.order=r+n,Eb(i.selfEdges,function(t){xS(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function LNe(e){Eb(e.nodes(),function(t){var n=e.node(t);if(n.dummy===`selfedge`){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function MS(e,t){return Nb(Jb(e,t),Number)}function NS(e){var t={};return Eb(e,function(e,n){t[n.toLowerCase()]=e}),t}var RNe,zNe,BNe,VNe,HNe,UNe,WNe,GNe,KNe=o((()=>{$b(),ax(),Dje(),Pje(),mje(),Rje(),vMe(),wMe(),$Me(),rNe(),xNe(),CS(),RNe=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],zNe={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},BNe=[`acyclicer`,`ranker`,`rankdir`,`align`],VNe=[`width`,`height`],HNe={width:0,height:0},UNe=[`minlen`,`weight`,`width`,`height`,`labeloffset`],WNe={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},GNe=[`labelpos`]})),qNe=o((()=>{mje(),KNe(),Rje(),vMe()})),JNe=l({applyDagreLayoutResult:()=>BS,getEdgesToRender:()=>IS,measureDagreLayout:()=>HS,prepareLayoutForDagre:()=>VS,render:()=>iPe,runDagreLayoutCore:()=>US}),PS,FS,YNe,XNe,ZNe,QNe,$Ne,IS,LS,RS,ePe,zS,tPe,BS,nPe,rPe,VS,HS,US,iPe,aPe=o((()=>{Cx(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),qNe(),ax(),PS=p((e,t,n)=>Math.max(t,Math.min(n,e)),`clamp`),FS=p((e=`TB`)=>{switch(e){case`BT`:return`bottom`;case`LR`:return`right`;case`RL`:return`left`;default:return`top`}},`getDefaultSelfLoopSide`),YNe=p(e=>e===`flowchart`||e===`flowchart-v2`||e===`stateDiagram`||e===`er`||e===`classDiagram`,`shouldMergeSelfLoopSegments`),XNe=[`x`,`y`,`width`,`height`,`labelBBox`,`intersect`,`calcIntersect`,`diff`,`clusterNode`],ZNe=p((e,t,n,r,i)=>{let a=[],o=new Set;if(n.forEach(({start:e,end:t})=>{e!==r&&o.add(e),t!==r&&o.add(t)}),o.forEach(t=>{let n=e.node(t);typeof n?.x==`number`&&typeof n?.y==`number`&&a.push(n)}),a.length===0&&n.forEach(({edge:e})=>{(e.points??[]).forEach(e=>{typeof e?.x==`number`&&typeof e?.y==`number`&&a.push(e)})}),a.length===0)return FS(i);let s=a.reduce((e,t)=>({x:e.x+t.x/a.length,y:e.y+t.y/a.length}),{x:0,y:0}),l=s.x-t.x,u=s.y-t.y;return Math.abs(l)>Math.abs(u)?l>0?`right`:`left`:Math.abs(u)>0?u>0?`bottom`:`top`:FS(i)},`getSelfLoopSide`),QNe=p((e,t=`top`,n=0,r=0)=>{let i=e.x,a=e.y-n,o=e.width/2,s=e.height/2,l=Math.max(36,Math.min(100,e.width*.8)),u=PS(Math.max(r,e.width*.35),36,l),d=PS(Math.min(e.width,e.height)*.45,24,48);switch(t){case`bottom`:{let e=a+s;return[{x:i-u/2,y:e},{x:i-u/2,y:e+d},{x:i+u/2,y:e+d},{x:i+u/2,y:e}]}case`right`:{let e=i+o;return[{x:e,y:a-u/2},{x:e+d,y:a-u/2},{x:e+d,y:a+u/2},{x:e,y:a+u/2}]}case`left`:{let e=i-o;return[{x:e,y:a-u/2},{x:e-d,y:a-u/2},{x:e-d,y:a+u/2},{x:e,y:a+u/2}]}default:{let e=a-s;return[{x:i-u/2,y:e},{x:i-u/2,y:e-d},{x:i+u/2,y:e-d},{x:i+u/2,y:e}]}}},`getSelfLoopPoints`),$Ne=p((e,t,n=`top`,r=0,i={})=>{let a=e.x,o=e.y-r,s=i.width??0,l=i.height??0;switch(n){case`bottom`:return{x:a,y:Math.max(...t.map(e=>e.y))+l/2+4};case`right`:return{x:Math.max(...t.map(e=>e.x))+s/2+4,y:o};case`left`:return{x:Math.min(...t.map(e=>e.x))-s/2-4,y:o};default:return{x:a,y:Math.min(...t.map(e=>e.y))-l/2-4}}},`getSelfLoopLabelPosition`),IS=p((e,t=0,{mergeSelfLoops:n=!0}={})=>{let r=new Map,i=[],a=e.graph()?.rankdir;return e.edges().forEach(t=>{let a=e.edge(t);if(n&&a.selfLoop){let e=a.selfLoop.id;r.has(e)||r.set(e,[]),r.get(e).push({edge:a,start:t.v,end:t.w})}else i.push({edge:a,start:t.v,end:t.w})}),r.forEach(n=>{if(n.length!==3){n.forEach(e=>i.push(e));return}n.sort((e,t)=>e.edge.selfLoop.order-t.edge.selfLoop.order);let[r,o,s]=n,l=r.edge.originalEdge??o.edge.originalEdge??s.edge.originalEdge??o.edge,u=e.node(l.start);if(!u){n.forEach(e=>i.push(e));return}let d={width:o.edge.width,height:o.edge.height},f=ZNe(e,u,n,l.start,a),p=QNe(u,f,t,d.width??0),m=$Ne(u,p,f,t,d),h={...o.edge,...l,id:l.id,points:p,start:l.start,end:l.end,x:m.x,y:m.y,width:d.width,height:d.height,labelStyle:o.edge.labelStyle,fromCluster:r.edge.fromCluster??o.edge.fromCluster??s.edge.fromCluster,toCluster:r.edge.toCluster??o.edge.toCluster??s.edge.toCluster};delete h.selfLoop,delete h.originalEdge,i.push({edge:h,start:h.start,end:h.end})}),i},`getEdgesToRender`),LS=p(async({element:e,graph:t,diagramType:n,id:r,parentCluster:i,siteConfig:a})=>{let o=t.graph().rankdir;y.trace(`Dir in recursive render - dir:`,o);let{clusters:s,edgePaths:l,edgeLabels:u,nodes:d,rootGroups:f}=sx(e,{edgePathsClass:`edgePaths`});t.nodes()?y.info(`Recursive render XXX`,t.nodes()):y.info(`No nodes found for`,t),t.edges().length>0&&y.info(`Recursive edges`,t.edge(t.edges()[0]));let m=YNe(n);await Promise.all(t.nodes().map(async function(e){let s=t.node(e);if(i!==void 0){let n=JSON.parse(JSON.stringify(i.clusterData));y.trace(`Setting data for parent cluster XXX559- Node.id = `,e,`560- data=`,n.height,`561-Parent cluster`,i.height),t.setNode(i.id,n),t.parent(e)||(y.trace(`Setting parent`,e,i.id),t.setParent(e,i.id,n))}if(y.info(`(Insert) Node XXX`+e+`: `+JSON.stringify(t.node(e))),s?.clusterNode){y.info(`Cluster identified XBX`,e,s.width,t.node(e));let{ranksep:i,nodesep:o}=t.graph();s.graph.setGraph({...s.graph.graph(),ranksep:i+25,nodesep:o});let l=await rPe({element:d,graph:s.graph,diagramType:n,id:r,parentCluster:t.node(e),siteConfig:a}),u=l.elem;Jh(s,u),s.diff=l.diff||0,y.info(`New compound node after recursive render XAX`,e,`width`,s.width,`height`,s.height),pbe(u,s)}else t.children(e).length>0?(y.trace(`Cluster - the non recursive path XBX`,e,s.id,s,s.width,`Graph:`,t),y.trace(_x(s.id,t)),dx.set(s.id,{id:_x(s.id,t),node:s})):(y.trace(`Node - the non recursive path XAX`,e,d,t.node(e),o),await cx(d,t.node(e),{config:a,dir:o}))})),await p(async()=>{let e=t.edges().map(async function(e){let n=t.edge(e.v,e.w,e.name);if(y.info(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(e)),y.info(`Edge `+e.v+` -> `+e.w+`: `,e,` `,JSON.stringify(t.edge(e))),y.info(`Fix`,dx,`ids:`,e.v,e.w,`Translating: `,dx.get(e.v),dx.get(e.w)),m&&n.selfLoop){if(n.selfLoop.order!==1)return;let e={...n.originalEdge,...n,id:n.selfLoop.id,startLabelLeft:n.originalEdge?.startLabelLeft??n.startLabelLeft,startLabelRight:n.originalEdge?.startLabelRight??n.startLabelRight,endLabelLeft:n.originalEdge?.endLabelLeft??n.endLabelLeft,endLabelRight:n.originalEdge?.endLabelRight??n.endLabelRight};await Gg(u,e),n.width=e.width,n.height=e.height,n.labelStyle=e.labelStyle;return}await Gg(u,n)});await Promise.all(e)},`processEdges`)();let{subGraphTitleTotalMargin:h}=Tg(a);return{elem:f,graph:t,groups:{clusters:s,edgePaths:l,edgeLabels:u,nodes:d,rootGroups:f},diagramType:n,id:r,mergeSelfLoops:m,subGraphTitleTotalMargin:h}},`measureDagreGraph`),RS=p(e=>{y.info(`############################################# XXX`),y.info(`### Layout ### XXX`),y.info(`############################################# XXX`),SNe(e)},`runDagreGraphLayout`),ePe=p((e,t,n)=>{let r=e.node(t);if(!r)return;let i={...r};return r?.clusterNode?i.y=(r.y??0)+n:e.children(t).length>0?i.height=(r.height??0)+n:i.y=(r.y??0)+n/2,i},`normalizeDagreNode`),zS=p((e,t)=>{XNe.forEach(n=>{t[n]!==void 0&&(e[n]=t[n])})},`applyDagreNodeLayout`),tPe=p((e,t,n,r)=>({...e,start:e.start??t,end:e.end??n,points:(e.points??[]).map(e=>({...e,y:typeof e.y==`number`?e.y+r:e.y}))}),`normalizeDagreEdge`),BS=p((e,t)=>{let{graph:n,mergeSelfLoops:r,subGraphTitleTotalMargin:i=0}=t,a=new Map(e.nodes.map(e=>[e.id,e]));xx(n).forEach(e=>{let t=ePe(n,e,i);if(!t)return;zS(n.node(e),t);let r=a.get(e);r&&zS(r,t)});let o=i/2;return e.edges=IS(n,o,{mergeSelfLoops:r}).map(({edge:e,start:t,end:n})=>tPe(e,t,n,o)),e},`applyDagreLayoutResult`),nPe=p(async({elem:e,graph:t,groups:{clusters:n,edgePaths:r},diagramType:i,id:a,mergeSelfLoops:o,subGraphTitleTotalMargin:s})=>{let l=0;await Promise.all(xx(t).map(async function(e){let r=t.node(e);if(y.info(`Position XBX => `+e+`: (`+r.x,`,`+r.y,`) width: `,r.width,` height: `,r.height),r?.clusterNode)r.y+=s,y.info(`A tainted cluster node XBX1`,e,r.id,r.width,r.height,r.x,r.y,t.parent(e)),dx.get(r.id).node=r,Dg(r);else if(t.children(e).length>0){y.info(`A pure cluster node XBX1`,e,r.id,r.x,r.y,r.width,r.height,t.parent(e)),r.height+=s,t.node(r.parentId);let i=r?.padding/2||0,a=r?.labelBBox?.height||0,o=a-i||0;y.debug(`OffsetY`,o,`labelHeight`,a,`halfPadding`,i),await jg(n,r),dx.get(r.id).node=r}else{let e=t.node(r.parentId);r.y+=s/2,y.info(`A regular node XBX1 - using the padding`,r.id,`parent`,r.parentId,r.width,r.height,r.x,r.y,`offsetY`,r.offsetY,`parent`,e,e?.offsetY,r),Dg(r)}}));let u=s/2;return IS(t,u,{mergeSelfLoops:o}).forEach(function({edge:e,start:n,end:o}){y.info(`Edge `+n+` -> `+o+`: `+JSON.stringify(e),e),e.points.forEach(e=>e.y+=u);let s=t.node(n),l=t.node(o),d=Yg(r,e,dx,i,s,l,a);Kg(e,d)}),t.nodes().forEach(function(e){let n=t.node(e);y.info(e,n.type,n.diff),n.isGroup&&(l=n.diff)}),y.warn(`Returning from recursive render XAX`,e,l),{elem:e,diff:l}},`paintDagreLayoutCore`),rPe=p(async e=>{let t=await LS(e);return RS(t.graph),await nPe(t)},`renderDagreSubgraph`),VS=p(e=>{let t=new ix({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.nodeSpacing||e.config?.flowchart?.nodeSpacing,ranksep:e.config?.rankSpacing||e.rankSpacing||e.config?.flowchart?.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});return e.nodes.forEach(e=>{t.setNode(e.id,{...e}),e.parentId&&t.setParent(e.id,e.parentId)}),y.debug(`Edges:`,e.edges),e.edges.forEach(e=>{if(e.start===e.end){let n=e.start,r=n+`---`+n+`---1`,i=n+`---`+n+`---2`,a=t.node(n);t.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),t.setParent(r,a.parentId),t.setNode(i,{domId:i,id:i,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),t.setParent(i,a.parentId);let o=structuredClone(e),s=structuredClone(e),l=structuredClone(e),u=structuredClone(e);s.originalEdge=o,s.selfLoop={id:o.id,order:0},l.originalEdge=o,l.selfLoop={id:o.id,order:1},u.originalEdge=o,u.selfLoop={id:o.id,order:2},s.label=``,s.arrowTypeEnd=`none`,s.endLabelLeft=``,s.endLabelRight=``,s.startLabelLeft=``,s.id=n+`-cyclic-special-1`,l.startLabelRight=``,l.startLabelLeft=``,l.endLabelLeft=``,l.endLabelRight=``,l.arrowTypeStart=`none`,l.arrowTypeEnd=`none`,l.id=n+`-cyclic-special-mid`,u.label=``,u.startLabelRight=``,u.startLabelLeft=``,u.arrowTypeStart=`none`,a.isGroup&&(s.fromCluster=n,u.toCluster=n),u.id=n+`-cyclic-special-2`,u.arrowTypeStart=`none`,t.setEdge(n,r,s,n+`-cyclic-special-0`),t.setEdge(r,i,l,n+`-cyclic-special-1`),t.setEdge(i,n,u,n+`-cyclic-special-2`)}else t.setEdge(e.start,e.end,{...e},e.id)}),fAe(t),{graph:t}},`prepareLayoutForDagre`),HS=p(async(e,{element:t,preparedLayout:n})=>{let r=n??VS(e),i=Z(),a=await LS({element:t,graph:r.graph,diagramType:e.type,id:e.diagramId,parentCluster:void 0,siteConfig:i});return r.measuredLayout=a,a},`measureDagreLayout`),US=p((e,t)=>{let n=t.preparedLayout?.measuredLayout;if(!n)throw Error(`runDagreLayoutCore requires measureDagreLayout to run first`);return RS(n.graph),BS(e,n),n},`runDagreLayoutCore`),iPe=lx({prepareLayout:VS,measureLayout:HS,runLayoutCore:US,paintOptions:{clusterDb:dx,getNodes:p((e,{measure:t})=>xx(t.graph).map(e=>t.graph.node(e)).filter(Boolean),`getDagrePaintNodes`),getEdgeNode:p((e,t,{measure:n})=>e?n.graph.node(e):void 0,`getDagreEdgeNode`),skipNode:p((e,{measure:t})=>!t.graph.hasNode(e.id),`skipNode`),isCluster:p((e,{measure:t})=>t.graph.hasNode(e.id)&&(t.graph.children(e.id)??[]).length>0,`isCluster`)}})})),oPe=l({render:()=>JFe});function WS(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}function sPe(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,l=i*s-a*o;if(l===0)return null;let u=n.x-e.x,d=n.y-e.y,f=(u*s-d*o)/l,p=(u*a-d*i)/l;return f<=jw||f>=1-jw||p<=jw||p>=1-jw?null:{point:{x:e.x+f*i,y:e.y+f*a},tA:f,tB:p}}function GS(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function cPe(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=WS(r.points);for(let a=n+1;a<e.length;a++){let n=e[a],o=WS(n.points);for(let[e,a]of i.entries())for(let[i,s]of o.entries()){let o=sPe(a.a,a.b,s.a,s.b);if(!o)continue;let l=GS(a);l!==GS(s)&&l?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:o.tA,point:o.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:o.tB,point:o.point})}}}return t}function KS(e){return`${Math.round(e*1e3)/1e3}`}function qS(e){return`${KS(e.x)},${KS(e.y)}`}function lPe(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}function uPe(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),r=t.arrowTypeStart&&Lg[t.arrowTypeStart];if(r){let t=e[0],i=e[1],a=Math.atan2(i.y-t.y,i.x-t.x);n[0].x=t.x+r*Math.cos(a),n[0].y=t.y+r*Math.sin(a)}let i=t.arrowTypeEnd&&Lg[t.arrowTypeEnd];if(i){let t=e.length,r=e[t-2],a=e[t-1],o=Math.atan2(a.y-r.y,a.x-r.x);n[t-1].x=a.x-i*Math.cos(o),n[t-1].y=a.y-i*Math.sin(o)}return n}function dPe(e,t,n,r,i){let a=e.point.x,o=e.point.y,s={x:a-t*e.r,y:o-n*e.r},l={x:a+t*e.r,y:o+n*e.r},u=[`L${qS(s)}`];return i===`arc`?u.push(`A${KS(e.r)},${KS(e.r)} 0 0 ${r} ${qS(l)}`):u.push(`M${qS(l)}`),u}function JS(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=n.x-t.x,s=n.y-t.y,l=Math.hypot(i,a),u=Math.hypot(o,s);if(l<Aw||u<Aw)return null;let d=i/l,f=a/l,p=o/u,m=s/u,h=d*p+f*m,g=Math.acos(Math.max(-1,Math.min(1,h)));if(g<Aw||Math.abs(Math.PI-g)<Aw)return null;let _=Math.min(r/Math.sin(g/2),l/2,u/2);return{startX:t.x-d*_,startY:t.y-f*_,endX:t.x+p*_,endY:t.y+m*_,ctrlX:t.x,ctrlY:t.y,cutLen:_}}function fPe(e,t,n){let r=e.points;if(r.length<2)return``;let i=uPe(r,e),a=e.curve===`rounded`,o=WS(i),s=new Map;for(let e of t){let t=o[e.segIndex];if(!t)continue;let r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=s.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*r,r:n.jumpRadius}),s.set(e.segIndex,i)}let l=[`M${qS(i[0])}`];for(let e=0;e<o.length;e++){let t=o[e],r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),u=r===0?0:(t.b.x-t.a.x)/r,d=r===0?0:(t.b.y-t.a.y)/r,f=lPe(t),p=0;if(a&&e>0){let t=JS(i[e-1],i[e],i[e+1]??i[e],kw);t&&(p=t.cutLen)}let m=r,h=null;a&&e<o.length-1&&(h=JS(i[e],i[e+1],i[e+2]??i[e+1],kw),h&&(m=r-h.cutLen));let g=[...s.get(e)??[]].sort((e,t)=>e.t-t.t);for(let e of g)e.r=Math.min(e.r,e.d-p,m-e.d);for(let e=0;e<g.length-1;e++){let t=g[e+1].d-g[e].d;if(g[e].r+g[e+1].r>t){let n=t/2;g[e].r=Math.min(g[e].r,n),g[e+1].r=Math.min(g[e+1].r,n)}}for(let e of g)e.r<zFe||l.push(...dPe(e,u,d,f,n.jumpStyle));a&&h?(l.push(`L${KS(h.startX)},${KS(h.startY)}`),l.push(`Q${KS(h.ctrlX)},${KS(h.ctrlY)} ${KS(h.endX)},${KS(h.endY)}`)):l.push(`L${qS(t.b)}`)}return l.join(` `)}function pPe(e){return/^[\d\s+,.LMelm-]*$/.test(e)}function mPe(e){return!e||e===`linear`||e===`rounded`||e===`step`||e===`stepBefore`||e===`stepAfter`}function hPe(e){if(!e)return null;try{let t=typeof atob==`function`?atob(e):Buffer.from(e,`base64`).toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&typeof e.x==`number`&&typeof e.y==`number`&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}function gPe(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let a=[],o=new Map;for(let e of t){let t=typeof CSS<`u`&&CSS.escape?CSS.escape(e.id):e.id,n=r.querySelector(`path[data-id="${t}"]`);if(!n)continue;o.set(e.id,n);let i=hPe(n.getAttribute(`data-points`))??e.points;a.push({...e,points:i})}let s=cPe(a);if(s.length===0)return;let l=new Map;for(let e of s){let t=l.get(e.jumpEdgeId)??[];t.push(e),l.set(e.jumpEdgeId,t)}for(let e of a){let t=l.get(e.id);if(!t||t.length===0)continue;let r=i.get(e.id)?.curve;if(r!==void 0&&!mPe(r))continue;let a=o.get(e.id);if(!a||r===void 0&&!pPe(a.getAttribute(`d`)??``))continue;let s=a.getAttribute(`style`)??``,u=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(s),d=u?Number.parseFloat(u[1]):null,f=u?Number.parseFloat(u[2]):null,p=fPe(e,t,n);if(a.setAttribute(`d`,p),d!==null&&f!==null&&typeof a.getTotalLength==`function`){let e=a.getTotalLength(),t=`0 ${d} ${Math.max(0,e-d-f)} ${f}`,n=s.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,`;`);a.setAttribute(`style`,n)}}}function _Pe(e,{measure:t}){let n=e.config?.swimlane?.lineHops;if(n===!1)return;let r=n===`gap`?`gap`:`arc`,i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));gPe(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:r})}function YS(e){return Math.max(e.padding??Nw,Nw)}function vPe(e){let{x:t,y:n,width:r,height:i}=e,a=e.swimlaneContentTop;if(typeof t!=`number`||typeof n!=`number`||typeof r!=`number`||typeof i!=`number`||typeof a!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||r<=0||i<=0){delete e.groupTitleRect;return}let o=n-i/2,s=Math.min(a,n+i/2),l=o+Math.min(BFe,Math.max(0,s-o));if(l<=o){delete e.groupTitleRect;return}e.groupTitleRect={left:t-r/2,right:t+r/2,top:o,bottom:l}}function yPe(e){let t=e.direction,n=e.nodes??=[];for(let n of e.nodes??[])n.isGroup&&!n.parentId&&(n.shape=`swimlane`,t&&(n.direction=t));let r=n.filter(e=>!e.isGroup&&!e.parentId);if(r.length===0)return;let i=n.find(e=>e.id===Mw);i?i.isGroup&&(i.shape=`swimlane`,t&&(i.direction=t)):(i={id:Mw,label:``,isGroup:!0,shape:`swimlane`,padding:20,...t?{direction:t}:{}},n.push(i));for(let e of r)e.parentId=Mw}function bPe(e){let t=new Map;for(let n of e.nodes??[])t.set(n.id,n);let n=[];for(let t of e.edges??[]){let e=typeof t.start==`string`?t.start:void 0,r=typeof t.end==`string`?t.end:void 0;!e||!r||t.labelNodeId||n.push({id:t.id,src:e,dst:r,ref:t})}let r=e.nodes??[],i=r.filter(e=>e.isGroup),a=r.filter(e=>!e.isGroup);return{nodes:[...[...i].reverse(),...a].map(e=>e.id),edges:n,layout:e,nodeById:t}}function xPe(e,t,n,r){let{layout:i}=e,a=e.nodeById,o=r?.layerGap??100,s=r?.nodeGap??40,l=0;for(let e of t.layers){let t=0;for(let r of e){let e=a.get(r);if(!e){t++;continue}e.layer=l,e.order=t;let i=n.x[r]??t*s,u=n.y[r]??l*o;e.x=i,e.y=u,t++}l++}let u=i.nodes??[],d=new Map,f=[];for(let e of u){if(!e?.isGroup)continue;e.parentId||f.push(e);let t=u.filter(t=>t.parentId===e.id),r=1/0,i=-1/0,a=1/0,o=-1/0;for(let e of t){let t=e.x??n.x[e.id],s=e.y??n.y[e.id],l=e.width??0,u=e.height??0;t!=null&&s!=null&&(r=Math.min(r,t-l/2),i=Math.max(i,t+l/2),a=Math.min(a,s-u/2),o=Math.max(o,s+u/2))}if(r===1/0||a===1/0)e.x=e.x??0,e.y=e.y??0,e.width=e.width??0,e.height=e.height??0;else{let t=e.padding??20,n=e.parentId?t:2*YS(e),s=t,l=Math.max(0,i-r)+n,u=Math.max(0,o-a)+s,f=(r+i)/2,p=(a+o)/2;e.x=f,e.y=p,e.width=l,e.height=u,d.set(e.id,{minX:r,maxX:i,minY:a,maxY:o})}}if(f.length>0&&d.size>0){let e=1/0,t=-1/0,n=0;for(let r of f){let i=r.padding??20;i>n&&(n=i);let a=d.get(r.id);a&&(e=Math.min(e,a.minY),t=Math.max(t,a.maxY))}if(e!==1/0&&t!==-1/0){let r=Math.max(0,t-e)+2*Math.max(n,36),i=(e+t)/2;for(let t of f)t.y=i,t.height=r,t.swimlaneContentTop=e;let a=[...f].sort((e,t)=>(e.x??0)-(t.x??0)),o=[],s=[],l=[];for(let e of a){let t=d.get(e.id);if(!t)continue;let n=Math.max(0,t.maxX-t.minX)+2*YS(e),r=(t.minX+t.maxX)/2;o.push(e.id),s.push(r),l.push(n)}let u=o.length;if(u>0){let e=new Map;if(u===1)e.set(o[0],l[0]);else{let t=[];for(let e=0;e<u-1;e++)t.push(s[e+1]-s[e]);let n=Array(u);n[0]=0;for(let e=0;e<u-1;e++)n[e+1]=2*t[e]-n[e];let r=0,i=1/0;for(let e=0;e<u;e++){let t=l[e];e%2==0?r=Math.max(r,t-n[e]):i=Math.min(i,n[e]-t)}let a=r;a=r<=i?(r+i)/2:r;for(let t=0;t<u;t++){let r=n[t]+(t%2==0?a:-a),i=Math.max(l[t],r);e.set(o[t],i)}}for(let t of f){let n=e.get(t.id);n!=null&&(t.width=n),vPe(t)}}}}}function SPe(e){let t=[],n=[],r=new Map;for(let t of e.nodes)r.set(t.id,t);for(let i of e.edges){if(!i.label||i.label.length===0||i.isLayoutOnly||i.labelNodeId)continue;let e=i.start?r.get(i.start):void 0,a=i.end?r.get(i.end):void 0;if(!e||!a){y.warn(VFe,`Edge ${i.id} has missing source or target node`);continue}let o=`edge-label-${i.start}-${i.end}-${i.id}`,s=e.parentId===a.parentId?e.parentId:a.parentId,l={id:o,label:i.label,edgeStart:i.start??``,edgeEnd:i.end??``,shape:`labelRect`,width:0,height:0,isEdgeLabel:!0,isDummy:!0,parentId:s,isGroup:!1,labelStyle:Array.isArray(i.labelStyle)?i.labelStyle[0]:i.labelStyle??``,...e.dir?{dir:e.dir}:{}};t.push(l),i.labelNodeId=o,i.label=void 0,i.text=void 0;let u={id:`${i.id}-to-label`,start:i.start,end:o,type:`normal`,isLayoutOnly:!0},d={id:`${i.id}-from-label`,start:o,end:i.end,type:`normal`,isLayoutOnly:!0};n.push(u,d)}let i=[...e.nodes,...t],a=[...e.edges,...n];return{...e,nodes:i,edges:a}}function XS(e){let t=e.x??0,n=e.y??0,r=e.width??0,i=e.height??0;return r>0&&i>0?{cx:t,cy:n,rect:pC(t,n,r,i)}:void 0}function ZS(e){if(e.isGroup)return;let t=XS(e);if(t)return{id:String(e.id??``),cx:t.cx,cy:t.cy,rect:t.rect}}function QS(e,t,n=Pw){return Math.abs(e.x-t.x)<n&&Math.abs(e.y-t.y)<n}function $S(e,t,n=Pw){return Math.abs(e.x-t.x)<n}function eC(e,t,n=Pw){return Math.abs(e.y-t.y)<n}function tC(e,t,n=Pw){return eC(e,t,n)&&Math.abs(e.x-t.x)>n}function nC(e,t,n=Pw){return $S(e,t,n)&&Math.abs(e.y-t.y)>n}function rC(e,t,n,r){return Math.max(0,Math.min(Math.max(e,t),Math.max(n,r))-Math.max(Math.min(e,t),Math.min(n,r)))}function iC(e,t,n=Pw){return e.horizontal&&t.horizontal&&eC(e.a,t.a,n)?rC(e.a.x,e.b.x,t.a.x,t.b.x):e.vertical&&t.vertical&&$S(e.a,t.a,n)?rC(e.a.y,e.b.y,t.a.y,t.b.y):0}function aC(e,t=Pw){let n=[];for(let r=0;r<e.length-1;r++){let i=e[r],a=e[r+1],o=tC(i,a,t),s=nC(i,a,t);(o||s)&&n.push({index:r,a:i,b:a,horizontal:o,vertical:s})}return n}function oC(e,t=Pw){let n=aC(e,t),r=0;for(let e=1;e<n.length;e++)n[e-1].horizontal!==n[e].horizontal&&r++;return r}function sC(e,t=Pw){let n=[];for(let r of e){let e=n.length>0?n[n.length-1]:void 0;(!e||!QS(e,r,t))&&n.push({x:r.x,y:r.y})}return n}function cC(e,t=Pw){if(!e||e.length!==4)return;let[n,r,i,a]=e;return tC(n,r,t)&&nC(r,i,t)&&tC(i,a,t)?{kind:`HVH`,p0:n,p1:r,p2:i,p3:a}:nC(n,r,t)&&tC(r,i,t)&&nC(i,a,t)?{kind:`VHV`,p0:n,p1:r,p2:i,p3:a}:void 0}function lC(e,t,n,r=0){let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return a>n.left-r&&i<n.right+r&&s>n.top-r&&o<n.bottom+r}function uC(e,t,n=0){return e.x>t.left+n&&e.x<t.right-n&&e.y>t.top+n&&e.y<t.bottom-n}function CPe(e,t){return e.left<=t.left&&e.right>=t.right&&e.top<=t.top&&e.bottom>=t.bottom}function dC(e,t){return e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top}function fC(e,t){return{left:e.left-t,right:e.right+t,top:e.top-t,bottom:e.bottom+t}}function pC(e,t,n,r){return{left:e-n/2,right:e+n/2,top:t-r/2,bottom:t+r/2}}function mC(e){return XS(e)?.rect}function hC(e,t){switch(t){case`top`:return{x:e.cx,y:e.rect.top};case`bottom`:return{x:e.cx,y:e.rect.bottom};case`left`:return{x:e.rect.left,y:e.cy};case`right`:return{x:e.rect.right,y:e.cy}}}function gC(e,t,n,r,i,a=Pw){let o=t===`left`||t===`right`,s=r===`left`||r===`right`;if(o&&s){if(t===`right`&&r===`left`&&e.x<n.x||t===`left`&&r===`right`&&e.x>n.x){if(eC(e,n,a))return[e,n];let t=(e.x+n.x)/2;return[e,{x:t,y:e.y},{x:t,y:n.y},n]}if(t===r){if(eC(e,n,a))return;let r=t===`left`?Math.min(e.x,n.x)-i:Math.max(e.x,n.x)+i;return[e,{x:r,y:e.y},{x:r,y:n.y},n]}return}if(!o&&!s){if(t===r){if($S(e,n,a))return;let r=t===`top`?Math.min(e.y,n.y)-i:Math.max(e.y,n.y)+i;return[e,{x:e.x,y:r},{x:n.x,y:r},n]}if(!(t===`bottom`&&r===`top`&&e.y<n.y||t===`top`&&r===`bottom`&&e.y>n.y))return;if($S(e,n,a))return[e,n];let o=(e.y+n.y)/2;return[e,{x:e.x,y:o},{x:n.x,y:o},n]}if(o&&!s){let i=t===`right`&&n.x>e.x||t===`left`&&n.x<e.x,a=r===`top`&&e.y<n.y||r===`bottom`&&e.y>n.y;return i&&a?[e,{x:n.x,y:e.y},n]:void 0}let l=t===`bottom`&&n.y>e.y||t===`top`&&n.y<e.y,u=r===`left`&&e.x<n.x||r===`right`&&e.x>n.x;return l&&u?[e,{x:e.x,y:n.y},n]:void 0}function _C(e,t,n,r){return t===`left`||t===`right`?[e,{x:r,y:e.y},{x:r,y:n.y},n]:[e,{x:e.x,y:r},{x:n.x,y:r},n]}function vC(e){let t=new Map,n=[];for(let r of e){if(r.isEdgeLabel)continue;let e=ZS(r);e&&(t.set(e.id,e),n.push({id:e.id,rect:e.rect}))}return{nodeInfoById:t,realNodeRects:n}}function yC(e){let t=[],n=[];for(let r of e){let e=ZS(r);if(!e)continue;let i={id:e.id,rect:e.rect};r.isEdgeLabel?n.push(i):t.push(i)}return{realNodeRects:t,labelNodeRects:n}}function wPe(e,{includeEdgeLabels:t=!0}={}){let n=[];for(let r of e){if(r.isGroup||!t&&r.isEdgeLabel)continue;let e=r.x??0,i=r.y??0,a=r.width??0,o=r.height??0;n.push({nodeId:r.id,...pC(e,i,a,o)})}return n}function bC(e,t,n=Pw){let r=e.start,i=e.end;if(!r||!i)return;let a=t.get(r),o=t.get(i);if(!(!a||!o))return{srcId:r,dstId:i,srcInfo:a,dstInfo:o,collinearX:Math.abs(a.cx-o.cx)<n,collinearY:Math.abs(a.cy-o.cy)<n}}function xC(e,t,n,r=[],i=0){for(let a of n)if(!r.includes(a.id)&&lC(e,t,a.rect,-i))return!0;return!1}function SC(e,t,n,r,i=Pw,a=1e-6){let o=eC(e,t,i),s=$S(e,t,i),l=eC(n,r,i),u=$S(n,r,i);if(o&&l||s&&u||!(o||s)||!(l||u))return!1;let d=o?{a:e,b:t}:{a:n,b:r},f=s?{a:e,b:t}:{a:n,b:r},p=d.a.y,m=Math.min(d.a.x,d.b.x),h=Math.max(d.a.x,d.b.x),g=f.a.x,_=Math.min(f.a.y,f.b.y),v=Math.max(f.a.y,f.b.y);if(g<m||g>h||p<_||p>v)return!1;let y=Math.abs(g-d.a.x)<a&&Math.abs(p-d.a.y)<a||Math.abs(g-d.b.x)<a&&Math.abs(p-d.b.y)<a,b=Math.abs(g-f.a.x)<a&&Math.abs(p-f.a.y)<a||Math.abs(g-f.b.x)<a&&Math.abs(p-f.b.y)<a;return!(y&&b)}function TPe(e,t,n,r,i=Pw){let a=eC(e,t,i),o=$S(e,t,i),s=eC(n,r,i),l=$S(n,r,i);return o&&l&&$S(e,n,i)?rC(e.y,t.y,n.y,r.y)>i:a&&s&&eC(e,n,i)?rC(e.x,t.x,n.x,r.x)>i:!1}function CC(e,t,n,r,{epsilon:i=Pw,skipDegenerateOther:a=!1}={}){for(let o of n){if(o===r||o.isLayoutOnly)continue;let n=o.points;if(!(!n||n.length<2))for(let r=0;r<n.length-1;r++){let o=n[r],s=n[r+1];if(!(a&&QS(o,s,i))&&(SC(e,t,o,s,i)||TPe(e,t,o,s,i)))return!0}}return!1}function wC(e,t,n,r,i=Pw){let a=eC(e,t,i),o=$S(e,t,i),s=eC(n,r,i),l=$S(n,r,i);if(!(a&&l||o&&s))return!1;let u=a?{a:e,b:t}:{a:n,b:r},d=a?{a:n,b:r}:{a:e,b:t},f=u.a.y,p=Math.min(u.a.x,u.b.x),m=Math.max(u.a.x,u.b.x),h=d.a.x,g=Math.min(d.a.y,d.b.y),_=Math.max(d.a.y,d.b.y);return h>p+i&&h<m-i&&f>g+i&&f<_-i}function TC(e,t,n){let r=Math.min(t,n),i=Math.max(t,n);return e>r+Pw&&e<i-Pw}function EPe(e,t,n){return $S(e,t)&&$S(t,n)?TC(t.y,e.y,n.y):eC(e,t)&&eC(t,n)?TC(t.x,e.x,n.x):!1}function DPe(e){let t=!1,n=[];for(let r=0;r<e.length;r++){let i=n[n.length-1],a=e[r],o=r+1<e.length?e[r+1]:void 0;if(i&&o){if(QS(i,o)){r++,t=!0;continue}if(EPe(i,a,o)){t=!0;continue}}n.push(a)}return{points:n,changed:t}}function EC(e){let t=[e[0]];for(let n=1;n<e.length;n++){let r=t[t.length-1],i=e[n];if(!$S(r,i)&&!eC(r,i)){let e=t.length>=2?t[t.length-2]:void 0,n=e&&$S(e,r)?{x:r.x,y:i.y}:{x:i.x,y:r.y};t.push(n)}t.push(i)}let n=[];for(let e of t){let t=n[n.length-1];(!t||!QS(t,e))&&n.push(e)}return n}function DC(e){if(e.length<3)return e;let t=[...e];for(let e=0;e<32;e++){let e=DPe(t);if(t=e.points,!e.changed)break}return t}function OC(e,t,n){let r=e;if(r.isLayoutOnly||!r.points||r.points.length<n)return;let i=r.start?t.get(r.start):void 0,a=r.end?t.get(r.end):void 0;return{edge:r,points:r.points,srcRect:i?mC(i):void 0,dstRect:a?mC(a):void 0}}function OPe(e,t,n){if(eC(e,t,Fw))return{x:e.x<n.left?n.left:n.right,y:e.y};if($S(e,t,Fw)){let t=e.y<n.top?n.top:n.bottom;return{x:e.x,y:t}}return{x:Math.min(n.right,Math.max(n.left,e.x)),y:Math.min(n.bottom,Math.max(n.top,e.y))}}function kC(e,t,n){let r=n?1:-1,i=n?0:e.length-1;for(;i>=0&&i<e.length&&uC(e[i],t,HFe);)i+=r;if(i<0||i>=e.length)return e;let a=i-r;if(a<0||a>=e.length)return e;let o=OPe(e[i],e[a],t);return n?[o,...e.slice(i)]:[...e.slice(0,i+1),o]}function kPe(e,t){for(let n of e){let e=OC(n,t,2);if(!e)continue;let r=[...e.points];e.srcRect&&(r=kC(r,e.srcRect,!0)),e.dstRect&&(r=kC(r,e.dstRect,!1)),r=DC(EC(r)),r=RC(r,e.srcRect,e.dstRect),e.edge.points=DC(EC(r))}}function AC(e,t,n,r=!1){if(eC(e,t,Fw)){if(t.y<n.top-Fw||t.y>n.bottom+Fw)return t;if(r){if(e.x<n.left-Fw)return{x:n.left,y:e.y};if(e.x>n.right+Fw)return{x:n.right,y:e.y}}return{x:Math.abs(t.x-n.left)<=Math.abs(t.x-n.right)?n.left:n.right,y:e.y}}if($S(e,t,Fw)){if(t.x<n.left-Fw||t.x>n.right+Fw)return t;if(r){if(e.y<n.top-Fw)return{x:e.x,y:n.top};if(e.y>n.bottom+Fw)return{x:e.x,y:n.bottom}}let i=Math.abs(t.y-n.top)<=Math.abs(t.y-n.bottom);return{x:e.x,y:i?n.top:n.bottom}}return t}function jC(e,t,n){let r=e[t];for(let i=t+n;i>=0&&i<e.length;i+=n){let t=e[i];if(!QS(t,r,Fw))return t}return e[t+n]}function MC(e,t){let n=e+Iw,r=t-Iw;return n<=r?{lo:n,hi:r}:{lo:(e+t)/2,hi:(e+t)/2}}function NC(e,t,n){let{lo:r,hi:i}=MC(t,n);return Math.min(i,Math.max(r,e))}function APe(e){let t=Math.max(...e.map(e=>e.lo)),n=Math.min(...e.map(e=>e.hi));if(!(t>n))return{lo:t,hi:n}}function PC(e,t){return t===`left`||t===`right`?MC(e.top,e.bottom):MC(e.left,e.right)}function FC(e,t,n){let r=e.y>=n.top-Fw&&e.y<=n.bottom+Fw,i=e.x>=n.left-Fw&&e.x<=n.right+Fw;if(eC(e,t,Fw)&&r){if(Math.abs(e.x-n.left)<Fw)return`left`;if(Math.abs(e.x-n.right)<Fw)return`right`}if($S(e,t,Fw)&&i){if(Math.abs(e.y-n.top)<Fw)return`top`;if(Math.abs(e.y-n.bottom)<Fw)return`bottom`}}function IC(e){return e===`left`||e===`right`}function jPe(e,t,n,r,i){let a=[],o=n?FC(e,t,n):void 0,s=r?FC(t,e,r):void 0;return n&&o&&IC(o)===i&&a.push(PC(n,o)),r&&s&&IC(s)===i&&a.push(PC(r,s)),a.length>0?APe(a):void 0}function LC(e,t,n,r,i){let a=jPe(e,t,n,r,i);if(!a)return;let o=i?e.y:e.x,s=Math.min(a.hi,Math.max(a.lo,o));if(!(Math.abs(s-o)<Fw))return i?[{x:e.x,y:s},{x:t.x,y:s}]:[{x:s,y:e.y},{x:s,y:t.y}]}function RC(e,t,n){if(e.length!==2)return e;let[r,i]=e;return eC(r,i,Fw)?LC(r,i,t,n,!0)??e:$S(r,i,Fw)?LC(r,i,t,n,!1)??e:e}function MPe(e,t,n){return IC(n)?{x:e.x,y:NC(e.y,t.top,t.bottom)}:{x:NC(e.x,t.left,t.right),y:e.y}}function NPe(e,t,n,r,i,a){let o=e.map(e=>({...e}));for(let s=t;s>=0&&s<e.length;s+=n){let t=e[s];if(a&&!eC(t,r,Fw)||!a&&!$S(t,r,Fw))break;a?o[s].y=i.y:o[s].x=i.x}return o}function zC(e,t,n){if(e.length<2)return e;let r=n?0:e.length-1,i=n?1:-1,a=e[r],o=jC(e,r,i);if(!o)return e;let s=FC(a,o,t);if(!s)return e;let l=IC(s),u=MPe(a,t,s);return QS(a,u,Fw)?e:NPe(e,r,i,a,u,l)}function BC(e,t,n){let r=Math.min(e.x,t.x)>=n.left-Fw&&Math.max(e.x,t.x)<=n.right+Fw,i=Math.min(e.y,t.y)>=n.top-Fw&&Math.max(e.y,t.y)<=n.bottom+Fw;if(Math.abs(e.y-n.top)<Fw&&Math.abs(t.y-n.top)<Fw&&r)return`top`;if(Math.abs(e.y-n.bottom)<Fw&&Math.abs(t.y-n.bottom)<Fw&&r)return`bottom`;if(Math.abs(e.x-n.left)<Fw&&Math.abs(t.x-n.left)<Fw&&i)return`left`;if(Math.abs(e.x-n.right)<Fw&&Math.abs(t.x-n.right)<Fw&&i)return`right`}function VC(e,t,n,r){switch(e){case`top`:return $S(t,n,Fw)&&n.y<r.top-Fw;case`bottom`:return $S(t,n,Fw)&&n.y>r.bottom+Fw;case`left`:return eC(t,n,Fw)&&n.x<r.left-Fw;case`right`:return eC(t,n,Fw)&&n.x>r.right+Fw}}function HC(e,t,n){if(e.length<3)return e;if(n){let n=BC(e[0],e[1],t);return n&&VC(n,e[1],e[2],t)?e.slice(1):e}let r=e.length-1,i=BC(e[r-1],e[r],t);return i&&VC(i,e[r-1],e[r-2],t)?e.slice(0,r):e}function PPe(e,t,n){let r=e;if(t){let e=jC(r,0,1);if(e){let n=AC(e,r[0],t);n!==r[0]&&(r=[n,...r.slice(1)])}r=HC(r,t,!0)}if(n){let e=r.length-1,t=jC(r,e,-1);if(t){let i=AC(t,r[e],n,!0);i!==r[e]&&(r=[...r.slice(0,e),i])}r=HC(r,n,!1)}let i=RC(r,t,n);return i!==r||r.length===2?i:(t&&(r=zC(r,t,!0)),n&&(r=zC(r,n,!1)),r)}function UC(e,t){for(let n of e){let e=OC(n,t,2);if(!e)continue;let r=PPe(sC(e.points,Fw),e.srcRect,e.dstRect);if(r.length<3){e.edge.points=r;continue}let i=[r[0],{...r[0]},...r.slice(1,-1),r[r.length-1],{...r[r.length-1]}];e.edge.points=i}}function WC(e){return new Map(e.map(e=>[e.id,e]))}function FPe(e,t){let n=e.parentId,r=null;for(;n;){let e=t.get(n);if(!e?.isGroup)break;r=e.id,n=e.parentId}return r}function GC(e,t){let n=0,r=e.parentId;for(;r;){let e=t.get(r);if(!e?.isGroup)break;n++,r=e.parentId}return n}function KC(e){let t=1/0,n=-1/0,r=1/0,i=-1/0;for(let a of e){let e=a.x,o=a.y;if(typeof e!=`number`||typeof o!=`number`)continue;let s=a.width??0,l=a.height??0;t=Math.min(t,e-s/2),n=Math.max(n,e+s/2),r=Math.min(r,o-l/2),i=Math.max(i,o+l/2)}return t===1/0||r===1/0?null:{minX:t,maxX:n,minY:r,maxY:i}}function IPe(e,t){let n=e.padding??20;e.x=(t.minX+t.maxX)/2,e.y=(t.minY+t.maxY)/2,e.width=Math.max(0,t.maxX-t.minX)+n,e.height=Math.max(0,t.maxY-t.minY)+n}function LPe(e){let t=WC(e),n=e.filter(e=>e.isGroup&&e.parentId).sort((e,n)=>GC(n,t)-GC(e,t));for(let t of n){let n=KC(e.filter(e=>e.parentId===t.id));n&&IPe(t,n)}}function qC(e,t){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=-1/0;for(let e of i){let n=e[t];typeof n==`number`&&(a=Math.min(a,n),o=Math.max(o,n))}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let s=p(e=>a+o-e,`mirror`);for(let e of n){let n=e[t];typeof n==`number`&&(e[t]=s(n));let r=e.groupTitleRect;r&&(e.groupTitleRect=t===`x`?{...r,left:s(r.right),right:s(r.left)}:{...r,top:s(r.bottom),bottom:s(r.top)})}for(let e of r)for(let n of e.points??[])n[t]=s(n[t]);return!0}function RPe(e){return!(e.nodes??[]).some(e=>!e.isGroup)||qC(e,`y`)}function zPe(e,t=`LR`){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup),a=1/0,o=1/0;for(let e of i){let t=e.x??0,n=e.y??0;t<a&&(a=t),n<o&&(o=n)}if(!Number.isFinite(a)||!Number.isFinite(o))return!1;let s=0,l=0;for(let e of i)s+=e.width??0,l+=e.height??0;let u=s/i.length,d=l/i.length,f=d>0?Math.max(1,u/d):1;for(let e of i){let t=e.x??0,n=((e.y??0)-o)*f+36,r=t-a;e.x=n,e.y=r}for(let e of r)if(e.points)for(let t of e.points){let e=t.x,n=(t.y-o)*f+36,r=e-a;t.x=n,t.y=r}LPe(n);let p=n.filter(e=>e.isGroup&&!e.parentId);if(p.length===0)return t===`RL`&&qC(e,`x`),!0;let m=WC(n),h=new Map;for(let e of n){if(e.isGroup)continue;let t=FPe(e,m);if(!t)continue;let n=h.get(t)??[];n.push(e),h.set(t,n)}let g=0;for(let e of p){let t=e.padding??0;t>g&&(g=t)}let _=[],v=1/0,y=-1/0;for(let e of p){let t=KC(h.get(e.id)??[]);t&&(v=Math.min(v,t.minX),y=Math.max(y,t.maxX),_.push({lane:e,contentTop:t.minY,contentBottom:t.maxY,centerY:(t.minY+t.maxY)/2}))}if(v===1/0||y===-1/0)return!0;let b=Math.max(0,y-v)+2*Math.max(g,10),x=36+b,S=(v+y)/2-b/2-36,C=S+x/2,w=Math.max(g,36);_.sort((e,t)=>e.centerY-t.centerY);for(let e=0;e<_.length;e++){let t=_[e],n,r;if(n=e===0?t.contentTop-w:(_[e-1].contentBottom+t.contentTop)/2,e===_.length-1)r=t.contentBottom+w;else{let n=_[e+1];r=(t.contentBottom+n.contentTop)/2}let i=Math.max(0,r-n),a=(n+r)/2;t.lane.x=C,t.lane.y=a,t.lane.width=x,t.lane.height=i,t.lane.swimlaneContentTop=t.contentTop,t.lane.groupTitleRect={left:S,right:S+36,top:n,bottom:r}}return t===`RL`&&qC(e,`x`),!0}function BPe(e,t){let{nodeInfoById:n,realNodeRects:r}=vC(t);for(let t of e){if(t.isLayoutOnly)continue;let i=t.points;if(!i||i.length<4)continue;let a=cC(sC(i,Lw),Lw);if(!a)continue;let{p3:o}=a,s=a.kind===`HVH`,l=bC(t,n,Lw);if(!l)continue;let{srcId:u,dstId:d,srcInfo:f,dstInfo:p,collinearX:m,collinearY:h}=l;if(m||h)continue;let g,_=f.rect;for(let n of UFe){let i,a,l;if(s){let e=p.cy>f.cy?_.bottom:_.top,t=f.cx+n;if(t<=_.left+Lw||t>=_.right-Lw)continue;i={x:t,y:e},a={x:t,y:o.y},l={x:o.x,y:o.y}}else{let e=p.cx>f.cx?_.right:_.left,t=f.cy+n;if(t<=_.top+Lw||t>=_.bottom-Lw)continue;i={x:e,y:t},a={x:o.x,y:t},l={x:o.x,y:o.y}}let m=QS(i,a,Lw),h=QS(a,l,Lw);if(m&&h||!m&&xC(i,a,r,[u],1)||!h&&xC(a,l,r,[d],1))continue;let v=!m&&CC(i,a,e,t,{epsilon:Lw,skipDegenerateOther:!0}),y=!h&&CC(a,l,e,t,{epsilon:Lw,skipDegenerateOther:!0});if(!(v||y)){g=m?[a,l]:h?[i,a]:[i,a,l];break}}g&&(t.points=g)}}function VPe(e,t){let n=.001,{realNodeRects:r,labelNodeRects:i}=yC(t.values());for(let a of e){if(a.isLayoutOnly)continue;let o=a.points;if(!o||o.length<4)continue;let s=sC(o,n);if(s.length<4)continue;let l=s.length-1,u=s[l],d=s[l-1],f=s[l-2],m=u.x-d.x,h=u.y-d.y,g=Math.hypot(m,h);if(g>=10||g<n)continue;let _=d.x-f.x,v=d.y-f.y;if(Math.hypot(_,v)<n)continue;let y=tC(d,u,n),b=nC(d,u,n),x=tC(f,d,n),S=nC(f,d,n);if(!(y&&S||b&&x))continue;let C=a.end,w=a.start,T=C?t.get(C):void 0;if(!T)continue;let E=T.x??0,D=T.y??0,O=mC(T);if(!O)continue;let k,A;if(S){let e=v<0;k={x:E,y:f.y},A={x:E,y:e?O.bottom:O.top}}else{let e=_>0;k={x:f.x,y:D},A={x:e?O.right:O.left,y:D}}if(xC(k,A,r,C?[C]:[],-2)||xC(k,A,i,[],-2))continue;if(w){let e=t.get(w),n=e?mC(e):void 0;if(n&&uC(k,n,2))continue}let j=p((e,t)=>`${e.x.toFixed(3)},${e.y.toFixed(3)}|${t.x.toFixed(3)},${t.y.toFixed(3)}`,`ownSegmentKey`),M=new Set;for(let e=0;e<s.length-1;e++)M.add(j(s[e],s[e+1]));let N=p((t,r)=>{for(let i of e){if(i===a||i.isLayoutOnly)continue;let e=i.points;if(!(!e||e.length<2))for(let i=0;i<e.length-1;i++){let a=e[i],o=e[i+1];if(!M.has(j(a,o))&&wC(t,r,a,o,n))return!0}}return!1},`segmentCrossesOtherEdge`);if(N(k,A))continue;if(l-3>=0){let e=s[l-3],t=[w,C].filter(e=>!!e);if(xC(e,k,r,t,-2)||N(e,k))continue}let P=[...s.slice(0,l-2),k,A];a.points=P;let F=a.labelNodeId;if(F){let e=t.get(F);if(e){let t=e.width??0,r=e.height??0;if(t>0&&r>0){let i,a,o=-1;for(let e=0;e<P.length-1;e++){let s=P[e],l=P[e+1],u=Math.hypot(l.x-s.x,l.y-s.y),d=eC(s,l,n),f=$S(s,l,n);(d&&u>=t+2||f&&u>=r+2)&&u>o&&(o=u,i=(s.x+l.x)/2,a=(s.y+l.y)/2)}i!==void 0&&a!==void 0&&(e.x=i,e.y=a)}}}}}function HPe(e,t){let n=p((e,t)=>{let n=e.x??0,r=e.y??0,i=t.x-n,a=t.y-r,o=(e.width??0)/2,s=(e.height??0)/2;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),{x:n+(a===0?0:s*i/a),y:r+s}):(i<0&&(o=-o),{x:n+o,y:r+(i===0?0:o*a/i)})},`rectIntersect`),r=p((e,r)=>{let i=sC(e.points??[]);if(i.length<2)return;let a=r?e.start:e.end,o=a?t.get(a):void 0,s=o?mC(o):void 0;if(!o||!a||!s)return;let l=r?i[0]:i[i.length-1],u=r?i[1]:i[i.length-2],d=n(o,l),f=l;if(Hw(u,d)&&(f=u),$S(d,f,zw))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:r,orientation:`V`,coord:d.x,min:Math.min(d.y,f.y),max:Math.max(d.y,f.y),boundary:d,railEnd:f,rect:s};if(eC(d,f,zw))return{edge:e,edgeId:String(e.id??``),nodeId:a,atStart:r,orientation:`H`,coord:d.y,min:Math.min(d.x,f.x),max:Math.max(d.x,f.x),boundary:d,railEnd:f,rect:s}},`terminalLaneFor`),i=p((e,t)=>Math.max(0,Math.min(e.max,t.max)-Math.max(e.min,t.min)),`projectedOverlapLength`),a=p((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:e.orientation===`H`?(Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1)&&$S(e.boundary,t.boundary,1):(Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1)&&eC(e.boundary,t.boundary,1),`sameTerminalFace`),o=p((e,t)=>e.nodeId!==t.nodeId||e.orientation!==t.orientation?!1:i(e,t)>=Bw&&Math.abs(e.coord-t.coord)<.5,`exactTerminalLaneConflict`),s=p((e,t)=>{if(e.nodeId!==t.nodeId||e.orientation!==t.orientation||e.orientation!==`H`||e.atStart===t.atStart)return!1;let n=i(e,t);if(n<Bw)return!1;let r=e.rect.bottom-e.rect.top;return n<r||n>2*r?!1:a(e,t)&&Math.abs(e.coord-t.coord)<16},`nearTerminalLaneConflict`),l=p((e,t)=>{let n=sC(e.edge.points??[]);if(n.length<2)return;let r=e.orientation===`V`?{x:e.boundary.x+t,y:e.boundary.y}:{x:e.boundary.x,y:e.boundary.y+t},i=e.orientation===`V`?{x:e.railEnd.x+t,y:e.railEnd.y}:{x:e.railEnd.x,y:e.railEnd.y+t};if(!p(()=>Math.abs(e.boundary.y-e.rect.top)<1||Math.abs(e.boundary.y-e.rect.bottom)<1?eC(r,e.boundary,zw)&&r.x>=e.rect.left+1&&r.x<=e.rect.right-1:Math.abs(e.boundary.x-e.rect.left)<1||Math.abs(e.boundary.x-e.rect.right)<1?$S(r,e.boundary,zw)&&r.y>=e.rect.top+1&&r.y<=e.rect.bottom-1:!1,`boundaryStaysOnSameFace`)())return;if(e.atStart){let t=n.length>1&&QS(n[1],e.railEnd,zw),a=n.slice(t?2:1),o=a[0];return o&&!Hw(o,i)?void 0:[r,i,...a]}let a=n.length>1&&QS(n[n.length-2],e.railEnd,zw),o=n.slice(0,a?-2:-1),s=o[o.length-1];if(!(s&&!Hw(s,i)))return[...o,i,r]},`shiftedCandidate`),u=p(e=>{let n=e.edge,r=sC(n.points??[]);if(r.length!==2)return!1;let i=n.start,a=n.end,o=i?t.get(i):void 0,s=a?t.get(a):void 0;if(!o||!s)return!1;let l=o.x??0,u=o.y??0,d=s.x??0,f=s.y??0,[p,m]=r;return eC(p,m,zw)&&Math.abs(u-f)<1&&Math.abs(l-d)>1||$S(p,m,zw)&&Math.abs(l-d)<1&&Math.abs(u-f)>1},`laneIsStraightCollinearConnector`),d=[-7,7,-14,14,-21,21];for(let t=0;t<8;t++){let t=e.filter(e=>!e.isLayoutOnly).flatMap(e=>[r(e,!0),r(e,!1)]).filter(e=>!!e),n=!1;for(let e=0;e<t.length&&!n;e++)for(let i=e+1;i<t.length&&!n;i++){let a=t[e],f=t[i];if(a.edge===f.edge||!(o(a,f)||s(a,f)))continue;let p=!o(a,f),m=[a,f].sort((e,t)=>{let n=u(e),r=u(t);return n===r?Number(!t.atStart)-Number(!e.atStart):Number(n)-Number(r)});for(let e of m){for(let i of d){let a=l(e,i);if(!a)continue;let u=r({...e.edge,points:a},e.atStart);if(!(!u||t.some(t=>t.edge!==e.edge&&(o(u,t)||p&&s(u,t))))){e.edge.points=a,n=!0;break}}if(n)break}}if(!n)return}}function UPe(e,t){let{realNodeRects:n,labelNodeRects:r}=yC(t.values()),i=p((t,i)=>{let a=t.start,o=t.end,s=Vw(i);if(s.length!==i.length-1)return!1;let l=[a,o].filter(e=>!!e);for(let e of s)if(xC(e.a,e.b,n,l,-2)||xC(e.a,e.b,r,[],-2))return!1;for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.points;if(!(!e||e.length<2)){for(let t of s)for(let n of Vw(sC(e)))if(iC(t,n,.5)>=Bw||wC(t.a,t.b,n.a,n.b,zw))return!1}}return!0},`candidateIsSafe`),a=p((e,t)=>{if(t+4>=e.length)return;let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=e[t+4],s=tC(n,r)&&nC(r,i)&&tC(i,a)&&nC(a,o)&&$S(n,a,zw)&&$S(n,o,zw)&&$S(r,i,zw)&&(r.x-n.x)*(a.x-i.x)<0,l=nC(n,r)&&tC(r,i)&&nC(i,a)&&tC(a,o)&&eC(n,a,zw)&&eC(n,o,zw)&&eC(r,i,zw)&&(r.y-n.y)*(a.y-i.y)<0;if(s||l)return sC([...e.slice(0,t+1),o,...e.slice(t+5)]);if(t+5>=e.length)return;let u=e[t+5],d=nC(n,r)&&tC(r,i)&&nC(i,a)&&tC(a,o)&&nC(o,u)&&$S(n,o,zw)&&$S(n,u,zw)&&$S(i,a,zw)&&(i.x-r.x)*(o.x-a.x)<0,f=tC(n,r)&&nC(r,i)&&tC(i,a)&&nC(a,o)&&tC(o,u)&&eC(n,o,zw)&&eC(n,u,zw)&&eC(i,a,zw)&&(i.y-r.y)*(o.y-a.y)<0;if(!(!d&&!f))return sC([...e.slice(0,t+1),u,...e.slice(t+6)])},`withoutDogleg`);for(let t=0;t<8;t++){let t=!1;for(let n of e){if(n.isLayoutOnly)continue;let e=sC(n.points??[]);for(let r=0;r<=e.length-5;r++){let o=a(e,r);if(!(!o||!i(n,o))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}function JC(e,t){let{realNodeRects:n,labelNodeRects:r}=yC(t.values()),i=e.filter(e=>!e.isLayoutOnly),a=p((e,t,n)=>sC(e===t?n??[]:e.points??[]),`pointsFor`),o=p((e,t)=>{let n=0;for(let r=0;r<i.length;r++){let o=Vw(a(i[r],e,t));for(let s=r+1;s<i.length;s++){let r=Vw(a(i[s],e,t));for(let e of o)for(let t of r)wC(e.a,e.b,t.a,t.b,zw)&&n++}}return n},`strictCrossingCount`),s=p(e=>{let t=Vw(e);if(t.length!==3)return;let n=t[1];if(t[0].horizontal!==n.horizontal&&t[2].horizontal!==n.horizontal)return{index:n.index,horizontal:n.horizontal,vertical:n.vertical,segment:n}},`middleRail`),l=p((e,t)=>{let r=[e.start,e.end].filter(e=>!!e);return n.filter(e=>{if(r.includes(e.id))return!1;let n=e.rect;return t.horizontal?rC(t.a.x,t.b.x,n.left,n.right)>=Bw&&t.a.y>=n.top-2&&t.a.y<=n.bottom+2:rC(t.a.y,t.b.y,n.top,n.bottom)>=Bw&&t.a.x>=n.left-2&&t.a.x<=n.right+2})},`blockingRectsFor`),u=p((e,t,n)=>{let r=e.map(e=>({...e}));if(t.horizontal)r[t.index].y=n,r[t.index+1].y=n;else if(t.vertical)r[t.index].x=n,r[t.index+1].x=n;else return;let i=DC(sC(r));return Vw(i).length===i.length-1?i:void 0},`candidateByMovingRail`),d=p((e,t,s)=>{let l=[e.start,e.end].filter(e=>!!e),u=Vw(t);if(u.length!==t.length-1)return!1;for(let e of u)if(xC(e.a,e.b,n,l,-2)||xC(e.a,e.b,r,[],-2))return!1;for(let t of i)if(t!==e){for(let e of u)for(let n of Vw(a(t)))if(iC(e,n,.5)>=Bw)return!1}return o(e,t)<=s},`candidateIsSafe`);for(let e=0;e<8;e++){let e=o(),t=!1;for(let n of i){let r=a(n),i=s(r);if(!i)continue;let o=l(n,i.segment);if(o.length===0)continue;let f=i.horizontal?[Math.min(...o.map(e=>e.rect.top))-20,Math.max(...o.map(e=>e.rect.bottom))+20]:[Math.min(...o.map(e=>e.rect.left))-20,Math.max(...o.map(e=>e.rect.right))+20];for(let a of f){let o=u(r,i.segment,a);if(!(!o||!d(n,o,e))){n.points=o,t=!0;break}}if(t)break}if(!t)return}}function YC(e,t){let n=p(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),r=p(e=>{if(!e.isGroup||e.parentId)return;let t=e.direction,r=typeof t==`string`?t.toUpperCase():``;if(r===`LR`||r===`RL`||r===`BT`)return;let i=n(e),a=e.y,o=e.height;if(!i||typeof a!=`number`||typeof o!=`number`||!Number.isFinite(a)||!Number.isFinite(o)||o<=0)return;let s=i.right-i.left,l=i.bottom-i.top;if(!(l<=0||s<l))return{node:e,rect:i}},`topLaneTitleFor`),i=p((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+zw||n>=t.bottom-zw?!1:rC(e.a.x,e.b.x,t.left,t.right)>=Bw},`horizontalSegmentIntersectsTitle`),a=[...t.values()].map(r).filter(e=>!!e);if(a.length===0)return;let o=0;for(let t of e){if(t.isLayoutOnly)continue;let e=sC(t.points??[]);for(let t of Vw(e))for(let e of a)i(t,e.rect)&&(o=Math.max(o,e.rect.bottom-t.a.y+4))}if(!(o<=zw))for(let e of a){let t=e.node.y,n=e.node.height;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.y=t-o/2,e.node.height=n+o,e.node.groupTitleRect={...e.rect,top:e.rect.top-o,bottom:e.rect.bottom-o})}}function XC(e,t){let n=p(e=>{let t=e.groupTitleRect;if(!(!t||typeof t.left!=`number`||typeof t.right!=`number`||typeof t.top!=`number`||typeof t.bottom!=`number`||!Number.isFinite(t.left)||!Number.isFinite(t.right)||!Number.isFinite(t.top)||!Number.isFinite(t.bottom)||t.right<=t.left||t.bottom<=t.top))return{left:t.left,right:t.right,top:t.top,bottom:t.bottom}},`validTitleRect`),r=p(e=>{if(!e.isGroup||e.parentId||e.direction!==`LR`)return;let t=n(e),r=e.x,i=e.width;if(!t||typeof r!=`number`||typeof i!=`number`||!Number.isFinite(r)||!Number.isFinite(i)||i<=0)return;let a=t.right-t.left,o=t.bottom-t.top;if(!(a<=0||o<a))return{node:e,rect:t}},`leftLaneTitleFor`),i=p((e,t)=>{if(!e.vertical)return!1;let n=e.a.x;return n<=t.left+zw||n>=t.right-zw?!1:rC(e.a.y,e.b.y,t.top,t.bottom)>=Bw},`verticalSegmentIntersectsTitle`),a=p((e,t)=>{if(!e.horizontal)return!1;let n=e.a.y;return n<=t.top+zw||n>=t.bottom-zw?!1:rC(e.a.x,e.b.x,t.left,t.right)>=Bw},`horizontalSegmentIntersectsTitle`),o=[...t.values()].map(r).filter(e=>!!e);if(o.length===0)return;let s=0;for(let t of e){if(t.isLayoutOnly)continue;let e=sC(t.points??[]);for(let t of Vw(e))for(let e of o)if(i(t,e.rect))s=Math.max(s,e.rect.right-t.a.x+4);else if(a(t,e.rect)){let n=Math.min(t.a.x,t.b.x);s=Math.max(s,e.rect.right-n+4)}}if(!(s<=zw))for(let e of o){let t=e.node.x,n=e.node.width;typeof t!=`number`||typeof n!=`number`||!Number.isFinite(t)||!Number.isFinite(n)||n<=0||(e.node.x=t-s/2,e.node.width=n+s,e.node.groupTitleRect={...e.rect,left:e.rect.left-s,right:e.rect.right-s})}}function WPe(e,t){let{realNodeRects:n}=yC(t.values()),r=e.filter(e=>!e.isLayoutOnly),i=p((e,t=new Map)=>sC(t.get(e)??e.points??[]),`replacementPointsFor`),a=p((e=new Map)=>{let t=0;for(let n=0;n<r.length;n++){let a=Vw(i(r[n],e));for(let o=n+1;o<r.length;o++){let n=Vw(i(r[o],e));for(let e of a)for(let r of n)wC(e.a,e.b,r.a,r.b,zw)&&t++}}return t},`crossingCount`),o=p((e=new Map)=>r.reduce((t,n)=>t+oC(i(n,e)),0),`totalBends`),s=p(e=>{let t=i(e);if(t.length<4)return;let n=t[t.length-2],r=t[t.length-1];if(!(!tC(n,r,zw)&&!nC(n,r,zw)))return{tailStart:n,terminal:r}},`terminalTailFor`),l=p((e,t)=>{let n=i(e);if(n.length<3)return;let r=n[0],a=n[1],o;if(tC(r,a,zw))o={x:a.x,y:t.tailStart.y};else if(nC(r,a,zw))o={x:t.tailStart.x,y:a.y};else return;let s=DC(sC([r,a,o,t.tailStart,t.terminal]));return Vw(s).length===s.length-1?s:void 0},`candidateWithDestinationTail`),u=p((e,t)=>{let r=[e.start,e.end].filter(e=>!!e);for(let e of Vw(t))if(xC(e.a,e.b,n,r,-2))return!0;return!1},`pathHasNodeHit`),d=p((e,t,n)=>{for(let a of r)if(a!==e){for(let e of Vw(t))for(let t of Vw(i(a,n)))if(iC(e,t,.5)>=Bw)return!0}return!1},`pathHasSharedTrack`),f=p((e,t,n)=>!u(e,t)&&!d(e,t,n),`candidateIsSafe`),m=p(()=>{let e=new Map;for(let n of r){let r=n.end;if(!r||!t.has(r)||i(n).length<4)continue;let a=e.get(r)??[];a.push(n),e.set(r,a)}return e},`edgesByDestination`);for(let e=0;e<4;e++){let e=a();if(e===0)return;let t=o(),n,r=e,i=t;for(let t of m().values())for(let u=0;u<t.length;u++)for(let d=u+1;d<t.length;d++){let p=t[u],m=t[d],h=s(p),g=s(m);if(!h||!g)continue;let _=l(p,g),v=l(m,h);if(!_||!v)continue;let y=new Map([[p,_],[m,v]]);if(!f(p,_,y)||!f(m,v,y))continue;let b=a(y),x=o(y);b>=e||b>r||b===r&&x>=i||(n=y,r=b,i=x)}if(!n)return;for(let[e,t]of n)e.points=t}}function GPe(e,t){let{realNodeRects:n,labelNodeRects:r}=yC(t.values()),i=e.filter(e=>!e.isLayoutOnly),a=p((e,t=new Map)=>sC(t.get(e)??e.points??[]),`replacementPointsFor`),o=p((e=new Map)=>{let t=0;for(let n=0;n<i.length;n++){let r=Vw(a(i[n],e));for(let o=n+1;o<i.length;o++){let n=Vw(a(i[o],e));for(let e of r)for(let r of n)wC(e.a,e.b,r.a,r.b,zw)&&t++}}return t},`strictCrossingCount`),s=p((e=new Map)=>i.reduce((t,n)=>t+oC(a(n,e)),0),`totalBends`),l=p(e=>{let n=e.start,r=e.end,i=n?t.get(n):void 0,a=r?t.get(r):void 0,o=i?mC(i):void 0,s=a?mC(a):void 0;return o&&s?{src:o,dst:s}:void 0},`endpointRectsFor`),u=p((e,t,n)=>{if(n.index<=0||n.index+1>=t.length-1)return;let r=l(e);if(r){if(n.vertical){let i=n.a.x,a=Math.min(r.src.left,r.dst.left),o=Math.max(r.src.right,r.dst.right),s=i<a-zw?`left`:i>o+zw?`right`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`vertical`,side:s,coord:i,min:Math.min(n.a.y,n.b.y),max:Math.max(n.a.y,n.b.y)}:void 0}if(n.horizontal){let i=n.a.y,a=Math.min(r.src.top,r.dst.top),o=Math.max(r.src.bottom,r.dst.bottom),s=i<a-zw?`top`:i>o+zw?`bottom`:void 0;return s?{edge:e,points:t,segmentIndex:n.index,axis:`horizontal`,side:s,coord:i,min:Math.min(n.a.x,n.b.x),max:Math.max(n.a.x,n.b.x)}:void 0}}},`externalRailForSegment`),d=p(()=>{let e=[];for(let t of i){let n=a(t);for(let r of Vw(n)){let i=u(t,n,r);i&&e.push(i)}}return e},`collectExternalRails`),f=p((e,t)=>e.edge!==t.edge&&e.axis===t.axis&&e.side===t.side&&rC(e.min,e.max,t.min,t.max)>=Bw,`railsInteract`),m=p(e=>{let t=[],n=new Set;for(let r of e){if(n.has(r))continue;let i=[r],a=[];for(n.add(r);i.length>0;){let t=i.pop();a.push(t);for(let r of e)!n.has(r)&&f(t,r)&&(n.add(r),i.push(r))}a.length>1&&t.push(a)}return t},`connectedComponents`),h=p(e=>{let t=[];for(let n of e)t.some(e=>Math.abs(e-n.coord)<zw)||t.push(n.coord);for(;t.length<e.length;){let n=Math.min(...t),r=Math.max(...t),i=e[0].side;t.push(i===`left`||i===`top`?n-12*(e.length-t.length):r+12*(e.length-t.length))}return t},`uniqueCoordsFor`),g=p(e=>{let t=e.map(e=>e.coord),n=h(e),r=[];if(e.length<=6){let i=Array(n.length).fill(!1),a=[],o=p(()=>{if(a.length===e.length){a.some((e,n)=>Math.abs(e-t[n])>=zw)&&r.push([...a]);return}for(let[e,t]of n.entries())i[e]||(i[e]=!0,a.push(t),o(),a.pop(),i[e]=!1)},`visit`);return o(),r}for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){let i=[...t];[i[e],i[n]]=[i[n],i[e]],r.push(i)}return r},`coordinateAssignmentsFor`),_=p((e,t)=>{let n=new Map;for(let[r,i]of e.entries()){let e=t[r],a=n.get(i.edge)??i.points.map(e=>({x:e.x,y:e.y}));i.axis===`vertical`?(a[i.segmentIndex].x=e,a[i.segmentIndex+1].x=e):(a[i.segmentIndex].y=e,a[i.segmentIndex+1].y=e),n.set(i.edge,a)}let r=new Map;for(let[e,t]of n){let n=DC(sC(t));if(Vw(n).length!==n.length-1)return;r.set(e,n)}return r},`replacementsForAssignment`),v=p(e=>{for(let[t,i]of e){let e=[t.start,t.end].filter(e=>!!e);for(let t of Vw(i))if(xC(t.a,t.b,n,e,-2)||xC(t.a,t.b,r,[],-2))return!1}for(let t=0;t<i.length;t++){let n=i[t],r=e.has(n),o=Vw(a(n,e));for(let n=t+1;n<i.length;n++){let t=i[n];if(!r&&!e.has(t))continue;let s=Vw(a(t,e));for(let e of o)for(let t of s)if(iC(e,t,.5)>=Bw)return!1}}return!0},`candidateIsSafe`);for(let e=0;e<4;e++){let e=o();if(e===0)return;let t,n=e,r=s(),i=1/0;for(let a of m(d()))for(let l of g(a)){let u=_(a,l);if(!u||!v(u))continue;let d=o(u);if(d>=e)continue;let f=s(u),p=a.reduce((e,t,n)=>e+Math.abs(l[n]-t.coord),0);d>n||d===n&&(f>r||f===r&&p>=i)||(t=u,n=d,r=f,i=p)}if(!t)return;for(let[e,n]of t)e.points=n}}function KPe(e,t){let{realNodeRects:n,labelNodeRects:r}=yC(t.values()),i=e.filter(e=>!e.isLayoutOnly),a=p((e,t,n)=>sC(e===t?n??[]:e.points??[]),`pointsFor`),o=p(e=>Vw(e).reduce((e,t)=>{let n=t.a.x-t.b.x,r=t.a.y-t.b.y;return e+Math.hypot(n,r)},0),`pathLength`),s=p((e,t)=>{let n=0;for(let r=0;r<i.length;r++){let o=Vw(a(i[r],e,t));for(let s=r+1;s<i.length;s++){let r=Vw(a(i[s],e,t));for(let e of o)for(let t of r)wC(e.a,e.b,t.a,t.b,zw)&&n++}}return n},`strictCrossingCount`),l=p((e,t)=>{if(e.horizontal){let n=e.a.y;return(Math.abs(n-t.top)<1||Math.abs(n-t.bottom)<1)&&rC(e.a.x,e.b.x,t.left,t.right)>=Bw}if(e.vertical){let n=e.a.x;return(Math.abs(n-t.left)<1||Math.abs(n-t.right)<1)&&rC(e.a.y,e.b.y,t.top,t.bottom)>=Bw}return!1},`segmentRunsAlongRectBorder`),u=p(e=>{let n=[e.start,e.end].filter(e=>!!e),r=[];for(let e of n){let n=t.get(e),i=n?mC(n):void 0;i&&r.push(i)}return r},`endpointRectsFor`),d=p((e,t)=>{if(t+3>=e.length)return[];let n=e[t],r=e[t+1],i=e[t+2],a=e[t+3],o=tC(n,r,zw)&&nC(r,i,zw)&&tC(i,a,zw),s=nC(n,r,zw)&&tC(r,i,zw)&&nC(i,a,zw);if(!o&&!s||!(o?Math.sign(r.x-n.x)!==Math.sign(a.x-i.x):Math.sign(r.y-n.y)!==Math.sign(a.y-i.y)))return[];let l=$S(n,a,zw)||eC(n,a,zw)?[]:[{x:n.x,y:a.y},{x:a.x,y:n.y}],u=l.length===0?[[...e.slice(0,t+1),...e.slice(t+3)]]:l.map(n=>[...e.slice(0,t+1),n,...e.slice(t+3)]),d=new Set;return u.map(e=>DC(sC(e))).filter(e=>{if(Vw(e).length!==e.length-1||!e.some(e=>QS(e,a,zw)))return!1;let t=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return!d.has(t)&&(d.add(t),!0)})},`shortcutCandidatesAt`),f=p((e,t,o)=>{let d=[e.start,e.end].filter(e=>!!e),f=u(e);for(let e of Vw(t))if(xC(e.a,e.b,n,d,-2)||xC(e.a,e.b,r,[],-2)||f.some(t=>l(e,t)))return!1;for(let n of i)if(n!==e){for(let e of Vw(t))for(let t of Vw(a(n)))if(iC(e,t,.5)>=Bw)return!1}return s(e,t)<=o},`candidateIsSafe`);for(let e=0;e<8;e++){let e=s(),t,n,r=e,l=1/0,u=1/0;for(let p of i){let i=a(p),m=oC(i,zw),h=o(i);for(let a=0;a<=i.length-4;a++)for(let g of d(i,a)){let i=oC(g,zw),a=o(g);if(!(i<m||i===m&&a<h-zw)||!f(p,g,e))continue;let d=s(p,g);d>r||d===r&&(i>l||i===l&&a>=u)||(t=p,n=g,r=d,l=i,u=a)}}if(!t||!n)return;t.points=n}}function qPe(e,t){let n=[];for(let e of t.values()){if(e.isGroup||e.isEdgeLabel)continue;let t=e.x??0,r=e.y??0,i=mC(e);i&&n.push({id:String(e.id??``),cx:t,cy:r,rect:i})}if(n.length===0)return;let r=new Map(n.map(e=>[e.id,e])),i=n.map(e=>({id:e.id,rect:e.rect})),a=[`top`,`bottom`,`left`,`right`],o={top:Math.min(...n.map(e=>e.rect.top))-20,bottom:Math.max(...n.map(e=>e.rect.bottom))+20,left:Math.min(...n.map(e=>e.rect.left))-20,right:Math.max(...n.map(e=>e.rect.right))+20},s=e.filter(e=>!e.isLayoutOnly),l=new Map(s.map((e,t)=>[e,t])),u=p(e=>{let t=e===`left`||e===`top`?-1:1,n=[];for(let r=0;r<=2;r++)n.push(o[e]+t*20*r);return n},`outwardTracksForSide`),d=p((e,t=new Map)=>sC(t.get(e)??e.points??[]),`replacementPointsFor`),f=p((e,t)=>{let n=0;for(let r of e)for(let e of t)wC(r.a,r.b,e.a,e.b,zw)&&n++;return n},`crossingCountBetweenSegments`),m=p((e,t)=>f(Vw(e),Vw(t)),`crossingCountBetweenPaths`),h=p((e=new Map)=>{let t=0,n=[],r=new Set,i=[],a=p(e=>{r.has(e)||(r.add(e),i.push(e))},`addEdge`);for(let r=0;r<s.length;r++){let i=s[r],o=d(i,e);for(let l=r+1;l<s.length;l++){let r=s[l],u=m(o,d(r,e));u>0&&(t+=u,n.push({first:i,second:r,count:u}),a(i),a(r))}}return i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),{count:t,pairs:n,edgeSet:r,edges:i}},`crossingSnapshot`),g=p((e,t)=>{let n=new Set(t.keys());if(n.size===0)return e.count;let r=0;for(let t of e.pairs)(n.has(t.first)||n.has(t.second))&&(r+=t.count);let i=0;for(let e=0;e<s.length;e++){let r=s[e],a=n.has(r),o=d(r,t);for(let r=e+1;r<s.length;r++){let e=s[r];!a&&!n.has(e)||(i+=m(o,d(e,t)))}}return e.count-r+i},`crossingCountWithReplacements`),_=p(e=>{let t=new Map;for(let n of e.pairs){let e=t.get(n.first)??new Set;e.add(n.second),t.set(n.first,e);let r=t.get(n.second)??new Set;r.add(n.first),t.set(n.second,r)}let n=[],r=new Set;for(let i of e.edges){if(r.has(i))continue;let e=[i],a=[];for(r.add(i);e.length>0;){let n=e.pop();a.push(n);for(let i of t.get(n)??[])r.has(i)||(r.add(i),e.push(i))}a.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),a.length>1&&n.push(a)}return n},`crossingComponents`),v=p(e=>[e.start,e.end].filter(e=>!!e),`endpointIdsFor`),y=p(e=>{let t=[];for(let n of _(e)){let e=new Set(n),r=new Set(n.flatMap(e=>v(e))),i=[...n];for(let t of s)e.has(t)||v(t).some(e=>r.has(e))&&i.push(t);i.sort((e,t)=>(l.get(e)??0)-(l.get(t)??0)),t.push(i)}return t},`pairSearchGroups`),b=p((e,t,n)=>g(e,new Map([[t,n]])),`crossingCountWithSingleReplacement`),x=p(e=>{let t=new Map;for(let n of e.pairs)t.set(n.first,(t.get(n.first)??0)+n.count),t.set(n.second,(t.get(n.second)??0)+n.count);return t},`currentCrossingsByEdge`),S=p(e=>e.slice(1).reduce((t,n,r)=>{let i=e[r];return t+Math.abs(n.x-i.x)+Math.abs(n.y-i.y)},0),`pathLength`),C=p((e=new Map)=>s.reduce((t,n)=>t+oC(d(n,e)),0),`totalBends`),w=p((e=new Map)=>s.reduce((t,n)=>t+S(d(n,e)),0),`totalLength`),T=p((e,t,n=new Map)=>{let r=Vw(t);for(let t of s)if(t!==e){for(let e of r)for(let r of Vw(d(t,n)))if(iC(e,r,.5)>=Bw)return!0}return!1},`pathHasSegmentConflict`),E=p((e,t)=>{let n=[e.start,e.end].filter(e=>!!e);for(let e of Vw(t))if(xC(e.a,e.b,i,n,-2))return!0;return!1},`pathHitsNode`),D=p((e,t)=>{let n=DC(sC(t));Vw(n).length===n.length-1&&e.push(n)},`pushOrthogonalCandidate`),O=p(e=>e===`left`||e===`right`,`sideIsHorizontal`),k=p((e,t,n)=>{switch(t){case`left`:return Math.min(e.x,n.x)-20;case`right`:return Math.max(e.x,n.x)+20;case`top`:return Math.min(e.y,n.y)-20;case`bottom`:return Math.max(e.y,n.y)+20}},`localTrackForSameSide`),A=p((e,t,n,r)=>{let i=n===`left`||n===`top`?-1:1,a=[k(t,n,r),o[n]];for(let o of a)for(let a=0;a<=2;a++)D(e,_C(t,n,r,o+i*20*a))},`addSameSideCandidates`),j=p((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))D(e,[t,{x:a,y:t.y},{x:a,y:n},{x:r.x,y:n},r])},`addHorizontalToVerticalCandidates`),M=p((e,t,n,r,i)=>{for(let a of u(n))for(let n of u(i))D(e,[t,{x:t.x,y:a},{x:n,y:a},{x:n,y:r.y},r])},`addVerticalToHorizontalCandidates`),N=p((e,t,n,r,i)=>{let a=[...u(`top`),...u(`bottom`)];for(let o of u(n))for(let n of u(i))for(let i of a)D(e,[t,{x:o,y:t.y},{x:o,y:i},{x:n,y:i},{x:n,y:r.y},r])},`addHorizontalPairCandidates`),P=p((e,t,n,r,i)=>{let a=[...u(`left`),...u(`right`)];for(let o of u(n))for(let n of u(i))for(let i of a)D(e,[t,{x:t.x,y:o},{x:i,y:o},{x:i,y:n},{x:r.x,y:n},r])},`addVerticalPairCandidates`),F=p(e=>{let t=new Set;return e.map(e=>sC(e)).filter(e=>{let n=e.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return t.has(n)||e.length<2?!1:(t.add(n),!0)})},`dedupeCandidatePaths`),I=p((e,t,n,r)=>{let i=[],a=gC(e,t,n,r,20,zw);a&&D(i,a),t===r&&A(i,e,t,n);let o=O(t),s=O(r);return o&&!s?j(i,e,t,n,r):!o&&s?M(i,e,t,n,r):o?N(i,e,t,n,r):P(i,e,t,n,r),F(i)},`buildCandidatesForSides`),L=p((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],o=[...u(`top`),...u(`bottom`)];for(let s of a){let a=hC(r,s),l=s===`top`||s===`bottom`?u(s):o;for(let r of i){D(e,[t,n,{x:r,y:n.y},{x:r,y:a.y},a]);for(let i of l)D(e,[t,n,{x:r,y:n.y},{x:r,y:i},{x:a.x,y:i},a])}}},`addVerticalDepartureOuterTrackCandidates`),R=p((e,t,n,r)=>{let i=[...u(`left`),...u(`right`)],o=[...u(`top`),...u(`bottom`)];for(let s of a){let a=hC(r,s),l=s===`left`||s===`right`?u(s):i;for(let r of o){D(e,[t,n,{x:n.x,y:r},{x:a.x,y:r},a]);for(let i of l)D(e,[t,n,{x:n.x,y:r},{x:i,y:r},{x:i,y:a.y},a])}}},`addHorizontalDepartureOuterTrackCandidates`),ee=p(e=>{let t=e.start,n=e.end,i=n?r.get(n):void 0;if(!t||!i)return[];let a=sC(e.points??[]);if(a.length<4)return[];let o=a[0],s=a[1],l=[];return nC(o,s,zw)?L(l,o,s,i):tC(o,s,zw)&&R(l,o,s,i),l},`terminalPreservingOuterTrackCandidates`),z=p(e=>{let t=e.start,n=e.end,i=t?r.get(t):void 0,o=n?r.get(n):void 0;if(!i||!o)return[];let s=[];for(let e of a){let t=hC(i,e);for(let n of a)s.push(...I(t,e,hC(o,n),n))}return s.push(...ee(e)),s},`candidatePathsFor`),B=p(()=>new Map(s.map(e=>[e,Vw(d(e))])),`currentSegmentsByEdge`),te=p((e,t,n)=>{let r=new Set;for(let i of s){if(i===e)continue;let a=n.get(i)??Vw(d(i));t.some(e=>a.some(t=>iC(e,t,.5)>=Bw))&&r.add(i)}return r},`sharedTrackConflictsFor`),ne=p((e,t,n,r)=>{let i=new Set;return z(e).map(e=>DC(sC(e))).filter(t=>{if(E(e,t))return!1;let n=t.map(e=>`${e.x.toFixed(3)},${e.y.toFixed(3)}`).join(`|`);return i.has(n)||t.length<2?!1:(i.add(n),!0)}).map(i=>{let a=Vw(i),o=0;for(let t of s)t!==e&&(o+=f(a,n.get(t)??Vw(d(t))));return{candidate:i,candidateSegments:a,crossings:t.count-(r.get(e)??0)+o,bends:oC(i,zw),totalBends:oC(i),length:S(i)}}).filter(({crossings:e})=>e<=t.count).sort((e,t)=>e.crossings-t.crossings||e.bends-t.bends||e.length-t.length).slice(0,48).map(t=>({path:t.candidate,segments:t.candidateSegments,sharedTrackConflicts:te(e,t.candidateSegments,n),totalBends:t.totalBends,length:t.length}))},`pairCandidatesFor`),re=p((e,t,n,r,i,a)=>{let o=0;for(let n of e.pairs)(n.first===t||n.second===t||n.first===r||n.second===r)&&(o+=n.count);let l=f(n.segments,i.segments);for(let e of s){if(e===t||e===r)continue;let o=a.get(e)??Vw(d(e));l+=f(n.segments,o)+f(i.segments,o)}return e.count-o+l},`pairCrossingCount`),ie=p((e,t)=>{for(let n of e.sharedTrackConflicts)if(n!==t)return!1;return!0},`conflictsOnlyWith`),ae=p((e,t)=>e.segments.some(e=>t.segments.some(t=>iC(e,t,.5)>=Bw)),`candidatesShareTrack`),oe=p((e,t,n,r)=>ie(t,n.edge)&&ie(r,e.edge)&&!ae(t,r),`pairCandidatesAreCompatible`),se=p((e,t,n,r,i)=>{let a=re(e.current,t.edge,n,r.edge,i,e.baseSegments);if(!(a>=e.current.count))return{replacements:new Map([[t.edge,n.path],[r.edge,i.path]]),crossings:a,bends:e.currentBends-(e.baseBendsByEdge.get(t.edge)??0)-(e.baseBendsByEdge.get(r.edge)??0)+n.totalBends+i.totalBends,length:e.currentLength-(e.baseLengthByEdge.get(t.edge)??0)-(e.baseLengthByEdge.get(r.edge)??0)+n.length+i.length}},`scorePairReplacement`),ce=p((e,t)=>e.crossings<t.crossings||e.crossings===t.crossings&&(e.bends<t.bends||e.bends===t.bends&&e.length<t.length),`pairScoreIsBetter`),le=p((e,t,n,r)=>{let i=r;for(let r of t.candidates)for(let a of n.candidates){if(!oe(t,r,n,a))continue;let o=se(e,t,r,n,a);o&&ce(o,i)&&(i=o)}return i},`bestScoreForOptionPair`),ue=p(e=>{let t=C(),n=w(),r=B(),i=x(e),a=new Map(s.map(e=>[e,oC(d(e))])),o=new Map(s.map(e=>[e,S(d(e))])),l=new Map,u=y(e);for(let t of u)for(let n of t){if(l.has(n))continue;let t=ne(n,e,r,i);t.length>0&&l.set(n,{edge:n,candidates:t})}let f={replacements:new Map,crossings:e.count,bends:t,length:n},p={current:e,currentBends:t,currentLength:n,baseBendsByEdge:a,baseLengthByEdge:o,baseSegments:r};for(let t of u){let n=new Set(t.filter(t=>e.edgeSet.has(t))),r=t.map(e=>l.get(e)).filter(e=>!!e);for(let e=0;e<r.length;e++){let t=r[e];for(let i=e+1;i<r.length;i++){let e=r[i];!n.has(t.edge)&&!n.has(e.edge)||(f=le(p,t,e,f))}}}return f.replacements.size>0?f.replacements:void 0},`bestPairedReplacement`);for(let e=0;e<4;e++){let e=h(),t=e.count;if(t===0)return;let n,r,i=t,a=1/0;for(let o of e.edges){let s=oC(d(o),zw);for(let l of z(o)){let u=E(o,l),d=!u&&T(o,l),f=b(e,o,l),p=oC(l,zw);u||d||(f<t||f===t&&p<s)&&(f>i||f===i&&p>=a||(n=o,r=l,i=f,a=p))}}if(n&&r){n.points=r;continue}let o=ue(e);if(!o)return;for(let[e,t]of o)e.points=t}}function JPe(e,t){let{nodeInfoById:n,realNodeRects:r}=vC(t),i=[`top`,`bottom`,`left`,`right`],a={top:Math.min(...r.map(e=>e.rect.top))-20,bottom:Math.max(...r.map(e=>e.rect.bottom))+20,left:Math.min(...r.map(e=>e.rect.left))-20,right:Math.max(...r.map(e=>e.rect.right))+20},o=p((e,t,n,r)=>{let i=[],o=gC(e,t,n,r,20,Uw);return o&&i.push(o),t===r&&i.push(_C(e,t,n,a[t])),i},`buildOrthogonalPathCandidates`),s=p((e,t)=>{for(let n=0;n<e.length-1;n++){let i=e[n],a=e[n+1];if(xC(i,a,r,t,1))return!0}return!1},`pathHitsNode`),l=p((t,n,r=!1)=>{let i=0,a=aC(t,Uw),o=n.start,s=n.end;for(let t of e){if(t===n||t.isLayoutOnly)continue;let e=t.start,l=t.end;if(!r&&o&&s&&(e===o||e===s||l===o||l===s))continue;let u=t.points;if(!(!u||u.length<2))for(let e of a)for(let t of aC(u,Uw)){if(SC(e.a,e.b,t.a,t.b,Uw,Uw)){i++;continue}iC(e,t,Uw)>=WFe&&i++}}return i},`pathConflictCount`),u=p((e,t)=>{let n=Math.abs(e.y-t.rect.top),r=Math.abs(e.y-t.rect.bottom),i=Math.abs(e.x-t.rect.left),a=Math.abs(e.x-t.rect.right),o=`top`,s=n;return r<s&&(o=`bottom`,s=r),i<s&&(o=`left`,s=i),a<s&&(o=`right`,s=a),o},`nearestSideOfRect`),d=new Map,f=p((e,t,n)=>{let r=d.get(e)??[];r.push({side:t,edgeId:n}),d.set(e,r)},`addFaceClaim`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points??[];if(e.length<1)continue;let r=t.id??``,i=t.start,a=t.end;if(i){let t=n.get(i);t&&f(i,u(e[0],t),r)}if(a){let t=n.get(a);t&&f(a,u(e[e.length-1],t),r)}}let m=p((e,t,n)=>d.get(e)?.some(e=>e.edgeId!==n&&e.side===t)??!1,`faceIsClaimed`);for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!e||e.length<2)continue;let r=oC(e,Uw);if(r<4)continue;let a=t.start,p=t.end;if(!a||!p)continue;let h=n.get(a),g=n.get(p);if(!h||!g)continue;let _=t.id??``,v=l(e,t,!0),y=l(e,t),b,x=v,S=r;for(let e of i){if(m(a,e,_))continue;let n=hC(h,e);for(let r of i){if(m(p,r,_))continue;let i=hC(g,r);for(let u of o(n,e,i,r)){if(s(u,[a,p]))continue;let e=oC(u,Uw);if(v>0){let n=l(u,t,!0);if(n>x||n===x&&e>=S)continue;x=n,S=e,b=u;continue}l(u,t)>y||e<S&&(S=e,b=u)}}}if(b){t.points=b;let e=d.get(a);e&&d.set(a,e.filter(e=>e.edgeId!==_));let n=d.get(p);n&&d.set(p,n.filter(e=>e.edgeId!==_)),f(a,u(b[0],h),_),f(p,u(b[b.length-1],g),_)}}}function ZC(e,t){let n=t?0:e.length-1,r=t?1:-1,i=e[n],a=e[n+r];if(!i||!a)return;let o=a.x-i.x,s=a.y-i.y;if(!(Math.abs(o)+Math.abs(s)<Ww)){if(Math.abs(s)<=Ww){let e=i.x+Math.sign(o)*Gw;return{left:Math.min(i.x,e),right:Math.max(i.x,e),top:i.y-Kw,bottom:i.y+Kw}}if(Math.abs(o)<=Ww){let e=i.y+Math.sign(s)*Gw;return{left:i.x-Kw,right:i.x+Kw,top:Math.min(i.y,e),bottom:Math.max(i.y,e)}}return{left:Math.min(i.x,a.x),right:Math.max(i.x,a.x),top:Math.min(i.y,a.y),bottom:Math.max(i.y,a.y)}}}function YPe(e){return{left:Math.min(e.left,e.right),right:Math.max(e.left,e.right),top:Math.min(e.top,e.bottom),bottom:Math.max(e.top,e.bottom)}}function QC(e,t){let n=sC(t);return[ZC(n,!0),ZC(n,!1)].some(t=>t&&dC(e,YPe(t)))}function $C(e,t){let n=[];for(let t of e){if(t.isLayoutOnly)continue;let e=t.points;if(!(!e||e.length<2))for(let r=0;r<e.length-1;r++)n.push({edgeId:t.id,p1:e[r],p2:e[r+1]})}let r=[],i=[];for(let e of t.values()){let t=e.isGroup,n=e.parentId;if(t&&!n){let t=mC(e);t&&i.push({id:e.id,rect:t});continue}if(t||e.isEdgeLabel)continue;let a=mC(e);a&&r.push({nodeId:e.id,rect:a})}let a=p((e,t)=>{let n=fC(t,3);for(let{nodeId:t,rect:i}of r)if(t!==e&&dC(n,i))return!0;return!1},`labelOverlapsForeignNode`),o=p((e,t)=>{let r=fC(t,3);for(let t of n)if(t.edgeId!==e&&lC(t.p1,t.p2,r))return!0;return!1},`labelOverlapsForeignEdge`),s=p((e,t,n)=>a(e,n)||o(t,n),`labelOverlapsAnything`),l=[],u=p(e=>{for(let{id:t,rect:n}of i)if(CPe(n,e))return t},`findContainingLane`),d=p((e,t)=>l.some(n=>n.labelId!==e&&dC(t,n.rect)),`overlapsPlacedLabel`);for(let n of e){if(n.isLayoutOnly)continue;let e=n.labelNodeId;if(!e)continue;let r=t.get(e);if(!r)continue;let f=n.points;if(!f||f.length<2)continue;let m=r.width??0,h=r.height??0;if(m<=0||h<=0)continue;let g=[];for(let e=0;e<f.length-1;e++){let t=f[e],n=f[e+1],r=Math.abs(t.x-n.x),i=Math.abs(t.y-n.y);r<Ww&&i<Ww||r>=Ww&&i>=Ww||g.push({idx:e,length:r+i,orientation:r>=Ww?`horizontal`:`vertical`,midX:(t.x+n.x)/2,midY:(t.y+n.y)/2})}if(g.length===0)continue;let _=g.length>=3?g.filter(e=>e.idx>0&&e.idx<g.length-1):g,v=_.length>0?_:g,y=m>=h?`horizontal`:`vertical`,b=p(e=>[...e].sort((e,t)=>{let n=e.orientation===y;if(n!==(t.orientation===y))return n?-1:1;let r=e.length>=(e.orientation===`horizontal`?m:h)+2;return r===t.length>=(t.orientation===`horizontal`?m:h)+2?t.length-e.length:r?-1:1}),`rankSegments`),x=g[0],S=g[g.length-1],C=[.5,.25,.75,.05,.95,.15,.85,.1,.9],w=p((e,t)=>{let n=f[e.idx],r=f[e.idx+1];return{midX:n.x+(r.x-n.x)*t,midY:n.y+(r.y-n.y)*t}},`anchorAtT`),T=p((e,t,n)=>Math.min(n,Math.max(t,e)),`clamp`),E=p((e,t)=>e.midX>=t.left-Ww&&e.midX<=t.right+Ww&&e.midY>=t.top-Ww&&e.midY<=t.bottom+Ww,`pointInsideRectInclusive`),D=p(e=>{let t=pC(e.midX,e.midY,m,h),n=u(t);if(n)return{laneId:n,anchor:e,rect:t};let r=i.find(({rect:t})=>E(e,t));if(!r)return;let a=r.rect.left+m/2+1,o=r.rect.right-m/2-1,s=r.rect.top+h/2+1,l=r.rect.bottom-h/2-1;if(a>o||s>l)return;let d={midX:T(e.midX,a,o),midY:T(e.midY,s,l)},f=pC(d.midX,d.midY,m,h);return E(e,f)?{laneId:r.id,anchor:d,rect:f}:void 0},`placementForAnchor`),O=p((e,t,n)=>e.orientation===`horizontal`?Math.abs(t.midX-n.x):Math.abs(t.midY-n.y),`distanceAlongSegment`),k=p((e,t)=>{let n=(e.orientation===`horizontal`?m/2:h/2)+12;if(e===x){let r=f[e.idx];if(O(e,t,r)+Ww<n)return!1}if(e===S){let r=f[e.idx+1];if(O(e,t,r)+Ww<n)return!1}return!0},`labelClearsTerminalEndpoints`),A=p(t=>{let r=b(t);for(let t of r)for(let r of C){let i=w(t,r);if(!k(t,i))continue;let a=D(i);if(a&&!QC(a.rect,f)&&!d(e,a.rect)&&!s(e,n.id,a.rect))return{laneId:a.laneId,anchor:a.anchor}}},`tryPool`),j=p((t,r,i=!1)=>{let s=b(t);for(let t of s){let s={midX:t.midX,midY:t.midY};if(r&&!k(t,s))continue;let l=D(s);if(l&&!QC(l.rect,f)&&!d(e,l.rect)&&!a(e,l.rect)&&(i||!o(n.id,l.rect)))return{laneId:l.laneId,anchor:l.anchor}}},`findLaneContainingFallback`),M=A(v)??(v.length<g.length?A(g):void 0)??j(g,!0)??j(g,!1)??j(g,!1,!0);if(M){r.x=M.anchor.midX,r.y=M.anchor.midY,r.parentId=M.laneId;let t=pC(M.anchor.midX,M.anchor.midY,m,h),n=l.findIndex(t=>t.labelId===e);n>=0?l[n]={labelId:e,rect:t}:l.push({labelId:e,rect:t})}}}function ew(e,t){return e<t?`${e}::${t}`:`${t}::${e}`}function XPe(e,t){let{nodeInfoById:n,realNodeRects:r}=vC(t),i=new Map;for(let e of t){let t=e.id;if(!e.isGroup&&e.isEdgeLabel){i.set(t,{w:e.width??0,h:e.height??0});continue}}let a=p((t,n,r,a)=>{let o=ew(n,r),s=0,l=p(e=>{if(!e)return;let t=i.get(e);if(!t)return;let n=a===`x`?t.w/2:t.h/2;n>s&&(s=n)},`consider`);l(t.labelNodeId);for(let n of e){if(n===t||n.isLayoutOnly)continue;let e=n.start,r=n.end;!e||!r||ew(e,r)===o&&l(n.labelNodeId)}return s>0?s+GFe:0},`labelClearanceFor`);for(let t of e){if(t.isLayoutOnly)continue;let i=t.points;if(!cC(i,qw))continue;let o=bC(t,n,qw);if(!o)continue;let{srcId:s,dstId:l,srcInfo:u,dstInfo:d,collinearX:f,collinearY:p}=o;if(f===p)continue;let m,h;if(f){let e=d.cy>u.cy;m={x:u.cx,y:e?u.rect.bottom:u.rect.top},h={x:d.cx,y:e?d.rect.top:d.rect.bottom}}else{let e=d.cx>u.cx;m={x:e?u.rect.right:u.rect.left,y:u.cy},h={x:e?d.rect.left:d.rect.right,y:d.cy}}if(xC(m,h,r,[s,l],1))continue;let g=a(t,s,l,f?`x`:`y`),_=g>Jw?g:Jw,v=[0,_,-_];for(let n of v){let i={...m},a={...h};if(f){if(i.x+=n,a.x+=n,i.x<=u.rect.left||i.x>=u.rect.right||a.x<=d.rect.left||a.x>=d.rect.right)continue}else if(i.y+=n,a.y+=n,i.y<=u.rect.top||i.y>=u.rect.bottom||a.y<=d.rect.top||a.y>=d.rect.bottom)continue;if(!xC(i,a,r,[s,l],1)&&!CC(i,a,e,t,{epsilon:qw})){t.points=[i,a];break}}}}function tw(e,t){let n=.001,{realNodeRects:r,labelNodeRects:i}=yC(t.values()),a=p((e,t)=>aC(t,n).map(n=>({...n,edge:e,interior:n.index>=1&&n.index<=t.length-3})),`segmentsFor`),o=p(()=>{let t=[];for(let n of e){if(n.isLayoutOnly)continue;let e=n.points;!e||e.length<2||t.push(...a(n,sC(e)))}return t},`allSegments`),s=p((e,t)=>e.horizontal&&t.horizontal?rC(e.a.x,e.b.x,t.a.x,t.b.x)>=8&&Math.abs(e.a.y-t.a.y)<7:e.vertical&&t.vertical?rC(e.a.y,e.b.y,t.a.y,t.b.y)>=8&&Math.abs(e.a.x-t.a.x)<7:!1,`hasCrowdedParallelTrack`),l=p((t,o)=>{let l=t.start,u=t.end,d=a(t,o);if(d.length!==o.length-1)return!1;let f=[l,u].filter(e=>!!e),p=t.labelNodeId?[t.labelNodeId]:[];for(let e of d)if(xC(e.a,e.b,r,f,-2)||xC(e.a,e.b,i,p,-2))return!1;for(let r of e){if(r===t||r.isLayoutOnly)continue;let e=r.points;if(!(!e||e.length<2)){for(let t of d)for(let i of a(r,sC(e)))if(s(t,i)||wC(t.a,t.b,i.a,i.b,n))return!1}}return!0},`candidateIsSafe`),u=p((e,t)=>{let n=sC(e.edge.points??[]);if(n.length<4||e.index>=n.length-1)return;let r=n.map(e=>({...e}));if(e.horizontal)r[e.index].y+=t,r[e.index+1].y+=t;else if(e.vertical)r[e.index].x+=t,r[e.index+1].x+=t;else return;return a(e.edge,r).length===r.length-1?r:void 0},`shiftedCandidate`),d=p((e,t)=>({x:e.x??(t.left+t.right)/2,y:e.y??(t.top+t.bottom)/2}),`nodeCenter`),f=p(e=>{let n=e.edge,r=sC(n.points??[]);if(r.length!==4||e.index!==1)return;let i=n.start?t.get(n.start):void 0,a=n.end?t.get(n.end):void 0,o=i?mC(i):void 0,s=a?mC(a):void 0,l=r.slice(e.index+2);if(!(!i||!a||!o||!s||l.length===0))return{sourceCenter:d(i,o),targetCenter:d(a,s),sourceRect:o,tail:l}},`sourceDetourContextFor`),m=p((e,t,r,i,a,o)=>{let s=i.y>=r.y,l=s?a.bottom:a.top,u=l+(s?20:-20);if(s&&e.b.y<=u+n||!s&&e.b.y>=u-n)return;let d=e.a.x+t;return sC([{x:r.x,y:l},{x:r.x,y:u},{x:d,y:u},{x:d,y:e.b.y},...o],n)},`verticalSourceDetour`),h=p((e,t,r,i,a,o)=>{let s=i.x>=r.x,l=s?a.right:a.left,u=l+(s?20:-20);if(s&&e.b.x<=u+n||!s&&e.b.x>=u-n)return;let d=e.a.y+t;return sC([{x:l,y:r.y},{x:u,y:r.y},{x:u,y:d},{x:e.b.x,y:d},...o],n)},`horizontalSourceDetour`),g=p((e,t)=>{let n=f(e);if(n){if(e.vertical)return m(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail);if(e.horizontal)return h(e,t,n.sourceCenter,n.targetCenter,n.sourceRect,n.tail)}},`sourceDetourCandidate`),_=[-7,7,-14,14,-21,21];for(let e=0;e<12;e++){let e=o(),t=!1;for(let n=0;n<e.length&&!t;n++)for(let r=n+1;r<e.length&&!t;r++){let i=e[n],a=e[r];if(i.edge===a.edge||!s(i,a))continue;let o=[i,a].filter(e=>e.interior);for(let e of o){for(let n of _){let r=u(e,n);if(r&&l(e.edge,r)){e.edge.points=r,t=!0;break}let i=g(e,n);if(i&&l(e.edge,i)){e.edge.points=i,t=!0;break}}if(t)break}}if(!t)return}}function ZPe(e,t,n,r){let i=t.x-e.x,a=t.y-e.y,o=r.x-n.x,s=r.y-n.y,l=i*s-a*o;if(Math.abs(l)<1e-10)return!1;let u=n.x-e.x,d=n.y-e.y,f=(u*s-d*o)/l,p=(u*a-d*i)/l,m=.01;return f>m&&f<.99&&p>m&&p<.99}function QPe(e){let t=e.nodes??[],n=e.edges??[],r=[];if(!n.length||!t.length)return r;let i=wPe(t),a=[];for(let e of n){if(e.isLayoutOnly)continue;let t=e.points;if(!t||t.length<2)continue;let n=e.start,o=e.end,s=e.labelNodeId,l=e.id??`${n}->${o}`;for(let e of i)if(e.nodeId!==n&&e.nodeId!==o&&!(s&&e.nodeId===s)){for(let n=0;n<t.length-1;n++)if(lC(t[n],t[n+1],e,-1)){r.push({type:`edge-node-overlap`,edgeId:l,targetId:e.nodeId,detail:`segment ${n} passes through node "${e.nodeId}"`});break}}for(let e=0;e<t.length-1;e++)a.push({edgeId:l,start:n,end:o,p1:t[e],p2:t[e+1]})}let o=new Set;for(let e=0;e<a.length;e++)for(let t=e+1;t<a.length;t++){let n=a[e],i=a[t];if(n.edgeId!==i.edgeId&&n.start!==i.start&&n.start!==i.end&&n.end!==i.start&&n.end!==i.end&&ZPe(n.p1,n.p2,i.p1,i.p2)){let e=n.edgeId<i.edgeId?`${n.edgeId}|${i.edgeId}`:`${i.edgeId}|${n.edgeId}`;o.has(e)||(o.add(e),r.push({type:`edge-edge-crossing`,edgeId:n.edgeId,targetId:i.edgeId,detail:`edges "${n.edgeId}" and "${i.edgeId}" cross`}))}}if(r.length>0){let e=r.filter(e=>e.type===`edge-node-overlap`).length,t=r.filter(e=>e.type===`edge-edge-crossing`).length;y.warn(`[SWIMLANE_VALIDATE] ${r.length} issue(s) detected: ${e} edge-node overlap(s), ${t} edge crossing(s)`);for(let e of r)y.warn(`[SWIMLANE_VALIDATE] ${e.type}: ${e.detail}`)}return r}function $Pe(e,t){let n=e.nodes??[],r=e.edges??[],i=n.filter(e=>!e.isGroup);if((t===`LR`||t===`RL`)&&i.length>0&&!zPe(e,t)||t===`BT`&&i.length>0&&!RPe(e))return;for(let e of r){if(e.isLayoutOnly)continue;let t=e.points;!t||t.length<2||(e.points=DC(EC(t)))}JPe(r,n),XPe(r,n),BPe(r,n);let a=new Map;for(let e of n)a.set(String(e.id),e);$C(r,a),kPe(r,a),VPe(r,a),tw(r,a),HPe(r,a),UPe(r,a),JC(r,a),WPe(r,a);let o=p(()=>{qPe(r,a),GPe(r,a),KPe(r,a),$C(r,a),UC(r,a),JC(r,a),$C(r,a),UC(r,a)},`finalizeRenderedEdges`);o(),tw(r,a),o(),YC(r,a),XC(r,a),YC(r,a),XC(r,a)}function nw(e){let t=new Map(e.nodeById),n=new Set,r=[];for(let i of e.edges){if(!t.has(i.src)||!t.has(i.dst))continue;let e=`${i.id}:${i.src}->${i.dst}`;n.has(e)||(n.add(e),r.push(i))}return{nodes:[...t.keys()],edges:r,layout:e.layout,nodeById:t}}function rw(e,t){return e.edges.filter(e=>e.dst===t)}function eFe(e){let t=new Map;for(let n of e.nodes)t.set(n,[]);for(let n of e.edges)t.get(n.src).push(n.dst);return t}function iw(e){let t=eFe(e);for(let e of t.values())e.sort((e,t)=>e.localeCompare(t));return t}function aw(e){let t=new Map;for(let n of e.nodes)t.set(n,0);for(let n of e.edges)t.set(n.dst,(t.get(n.dst)??0)+1);return t}function ow(e){return[...e.entries()].filter(([,e])=>e===0).map(([e])=>e).sort((e,t)=>e.localeCompare(t))}function sw(e,t=()=>!0){let n=new Map,r=new Map;for(let t of e.nodes)n.set(t,[]),r.set(t,[]);for(let i of e.edges)t(i)&&(r.get(i.src).push(i.dst),n.get(i.dst).push(i.src));return{preds:n,succs:r}}function cw(e,t,n,r){let i=0;for(let t of e.nodes)r?.skipGroups&&e.nodeById.get(t)?.isGroup||(i=Math.max(i,n[t]??0));let a=Array.from({length:i+1},()=>[]);for(let i of t)r?.skipGroups&&e.nodeById.get(i)?.isGroup||a[Math.max(0,n[i]??0)].push(i);return a}function lw(e){let t=aw(e),n=ow(t),r=[],i=iw(e);for(;n.length;){let e=n.shift();r.push(e);for(let r of i.get(e)??[])if(t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0){let e=0;for(;e<n.length&&n[e]<r;)e++;n.splice(e,0,r)}}return r.length===e.nodes.length?r:null}function uw(e){let t=new Map,n=0;for(let r of e)t.set(r,n),n++;return t}function dw(e){let t=Array(e.length),n=p((r,i)=>{if(i-r<=1)return 0;let a=r+i>>1,o=n(r,a)+n(a,i),s=r,l=a,u=r;for(;s<a||l<i;)l>=i||s<a&&e[s]<=e[l]?t[u++]=e[s++]:(t[u++]=e[l++],o+=a-s);for(let n=r;n<i;n++)e[n]=t[n];return o},`count`);return n(0,e.length)}function tFe(e){let t=nw(e),n=new Map;for(let e of t.nodes)n.set(e,[]);for(let e of t.edges)n.get(e.src).push(e);for(let e of n.values())e.sort((e,t)=>e.dst===t.dst?e.id.localeCompare(t.id):e.dst.localeCompare(t.dst));let r=Object.create(null);for(let e of t.nodes)r[e]=0;let i=[],a=p(e=>{r[e]=1;for(let t of n.get(e)??[]){let e=t.dst;r[e]===0?a(e):r[e]===1&&i.push(t)}r[e]=2},`dfs`),o=[...t.nodes].sort((e,t)=>e.localeCompare(t));for(let e of o)r[e]===0&&a(e);let s=new Set(i.map(e=>`${e.id}:${e.src}->${e.dst}`)),l=t.edges.map(e=>s.has(`${e.id}:${e.src}->${e.dst}`)?{id:e.id,src:e.dst,dst:e.src,weight:e.weight,ref:e.ref}:e);return{acyclic:{nodes:[...t.nodes],edges:l,layout:t.layout,nodeById:new Map(t.nodeById)},reversed:i}}function nFe(e){let t=new Map,n=p(r=>{if(t.has(r))return t.get(r);let i=e.nodeById.get(r);if(!i)return t.set(r,null),null;let a=i.parentId;if(!a)return t.set(r,null),null;let o=n(a)??a;return t.set(r,o),o},`resolve`);for(let t of e.nodes)n(t);return t}function fw(e){let t=nFe(e);return e=>t.get(e)??null}function pw(e){let t=[];for(let n of e.layout.nodes??[])n.isGroup&&!n.parentId&&t.push(n.id);return[...new Set(t)].reverse()}function mw(e,t){let n=pw(e);if(!t||t.length===0)return n;let r=new Set(n),i=new Set,a=[];for(let e of t)!r.has(e)||i.has(e)||(i.add(e),a.push(e));for(let e of n)i.has(e)||a.push(e);return a}function rFe(e,t){let n=nw(e),r=t?.laneOf??(()=>null),i=t?.rankHint,{preds:a}=sw(n);for(let e of a.values())e.sort((e,t)=>e.localeCompare(t));let o=lw(n)??[...n.nodes].sort((e,t)=>e.localeCompare(t)),s=new Map;for(let[e,t]of o.entries())s.set(t,e);let l=new Map,u=new Map;for(let e of n.nodes)u.set(e,[]);for(let e of o){let t=(a.get(e)??[]).filter(e=>l.has(e));if(t.length>0){let n=iFe(e,t,{laneOf:r,rankHint:i,topoIndex:s});l.set(e,n),u.get(n).push(e)}else l.has(e)||l.set(e,null)}for(let e of n.nodes)l.has(e)||l.set(e,null);let d=new Set;for(let e of n.nodes)(l.get(e)??null)===null&&d.add(e);let f=[...d].sort((e,t)=>{let n=s.get(e)??0,r=s.get(t)??0;return n===r?e.localeCompare(t):n-r}),m=aFe(n),h=new Map;for(let[e,t]of m.entries())h.set(e,[...t].sort((e,t)=>e.localeCompare(t)));let g=oFe(h),_=sFe(h),v=new Map;for(let e of n.nodes)v.set(e,[]);for(let e of _)for(let t of e.nodes){let n=v.get(t);n?n.push(e.id):v.set(t,[e.id])}let y=[],b=[],x=new Set,S=p(e=>{if(!x.has(e)){x.add(e),y.push(e);for(let t of u.get(e)??[])S(t);b.push(e)}},`walk`);for(let e of f)S(e);for(let e of o)S(e);return{parent:l,children:u,roots:f,componentOf:g,blocks:_,nodeBlocks:v,adjacency:h,preorder:y,postorder:b,topologicalOrder:o}}function iFe(e,t,n){let r=n.laneOf(e);return[...t].sort((e,t)=>{let i=n.laneOf(e),a=n.laneOf(t),o=i!=null&&i===r;if(o!==(a!=null&&a===r))return o?-1:1;let s=n.rankHint?.[e],l=n.rankHint?.[t];if(s!=null&&l!=null&&s!==l)return l-s;let u=n.topoIndex.get(e)??0,d=n.topoIndex.get(t)??0;return u===d?e.localeCompare(t):u-d})[0]}function aFe(e){let t=new Map;for(let n of e.nodes)t.set(n,new Set);for(let n of e.edges)t.get(n.src).add(n.dst),t.get(n.dst).add(n.src);return t}function oFe(e){let t=new Map,n=0;for(let r of e.keys()){if(t.has(r))continue;let i=[r];for(;i.length>0;){let r=i.pop();if(!t.has(r)){t.set(r,n);for(let n of e.get(r)??[])t.has(n)||i.push(n)}}n++}return t}function sFe(e){let t=new Map,n=new Map,r=[],i=[],a=0,o=p((s,l)=>{t.set(s,++a),n.set(s,a);for(let u of e.get(s)??[])u!==l&&(t.has(u)?(t.get(u)??0)<(t.get(s)??0)&&(r.push([s,u]),n.set(s,Math.min(n.get(s)??a,t.get(u)??a))):(r.push([s,u]),o(u,s),n.set(s,Math.min(n.get(s)??a,n.get(u)??a)),(n.get(u)??0)>=(t.get(s)??0)&&i.push(cFe(s,u,r,i.length))))},`visit`);for(let n of e.keys())t.has(n)||o(n,null);return i}function cFe(e,t,n,r){let i=[],a=new Set;for(;n.length>0;){let r=n.pop();if(i.push(r),a.add(r[0]),a.add(r[1]),r[0]===e&&r[1]===t||r[0]===t&&r[1]===e)break}return{id:r,edges:i,nodes:[...a]}}function lFe(e,t,n){let r=[...e.nodes],i=new Map;for(let[e,t]of r.entries())i.set(t,e);let a=r.length,o=Array(a).fill(-1),s=Array(a).fill(0),l=[],u=new Set;for(let e of r){let t=n.parent.get(e)??null,r=i.get(e);r!=null&&(t??(o[r]=-1,s[r]=0,u.has(e)||(u.add(e),l.push(e))))}for(;l.length>0;){let e=l.shift(),t=i.get(e);if(t==null)continue;let r=n.children.get(e)??[];for(let e of r){if(u.has(e))continue;let n=i.get(e);n!=null&&(o[n]=t,s[n]=s[t]+1,u.add(e),l.push(e))}}for(let e of r){if(u.has(e))continue;let t=i.get(e);t!=null&&(o[t]=-1,s[t]=0,u.add(e))}let d=Math.max(1,Math.ceil(Math.log2(Math.max(1,a)))+1),f=Array.from({length:d},()=>Array(a).fill(-1));for(let e=0;e<a;e++)f[0][e]=o[e];for(let e=1;e<d;e++)for(let t=0;t<a;t++){let n=f[e-1][t];f[e][t]=n===-1?-1:f[e-1][n]}let m=p((e,t)=>{if(e===-1||t===-1)return-1;s[e]<s[t]&&([e,t]=[t,e]);let n=s[e]-s[t];for(let t=0;t<d;t++)if(n>>t&1&&(e=f[t][e],e===-1))return-1;if(e===t)return e;for(let n=d-1;n>=0;n--){let r=f[n][e],i=f[n][t];r!==-1&&i!==-1&&r!==i&&(e=r,t=i)}return f[0][e]},`lcaIndex`),h=Array.from({length:a},()=>new Map);for(let n of e.edges){let e=n.src,r=n.dst,a=t[e],o=t[r];if(a==null||o==null||(a>o&&([e,r]=[r,e],[a,o]=[o,a]),a==null||o==null||a===o))continue;let s=i.get(e),l=i.get(r);if(s==null||l==null)continue;let u=m(s,l);if(u===-1)continue;let d=h[u];for(let e=a;e<o;e++)d.set(e,(d.get(e)??0)+1)}let g=new Map,_=p((e,t)=>{if(t.size!==0)for(let[n,r]of t)e.set(n,(e.get(n)??0)+r)},`mergeInto`),v=new Set,y=p(e=>{let r=i.get(e);v.add(e);let a=r==null?void 0:h[r],o=a?new Map(a):new Map,s=n.children.get(e)??[];for(let n of s){let r=y(n),i=t[e];if(i!=null){let a=g.get(e);a||(a=new Map,g.set(e,a));let o=r.get(i)??0,s=t[n];s!=null&&s>i&&(o+=1),a.set(n,o)}_(o,r)}return o},`dfs`);for(let e of n.roots)v.has(e)||y(e);for(let e of r)v.has(e)||y(e);return g}function uFe(e,t,n){let r=new Map,i=p(e=>{let a=n[e]??0,o=[...t.get(e)??[]];o.sort(hw(n));for(let e of o){i(e);let t=r.get(e);t!=null&&(a=Math.min(a,t))}r.set(e,a)},`annotate`);for(let t of e)i(t);return r}function hw(e){return(t,n)=>{let r=e[t]??0,i=e[n]??0;return r===i?t.localeCompare(n):r-i}}function dFe(e,t,n,r){let i=0;for(let e of t){let t=n[e]??0;t>i&&(i=t)}let a=Array.from({length:i+1},()=>[]),o=new Set,s=p(e=>{if(o.has(e))return;o.add(e);let t=n[e]??0;a[t]||(a[t]=[]),a[t].push(e);for(let t of r(e))s(t)},`emit`);for(let t of e)s(t);for(let e of t)if(!o.has(e)){let t=n[e]??0;a[t]||(a[t]=[]),a[t].push(e),o.add(e)}return a}function fFe(e){let t=[];for(let n of e){let e=new Set,r=[];for(let t of n)e.has(t)||(e.add(t),r.push(t));t.push(r)}return t}function pFe(e,t,n,r){return i=>{let a=e.get(i)??[];if(a.length===0)return[];let o=t[i]??0,s=[],l=[],u=n.get(i);for(let e of a){let t=r.get(e)??o;t>o?s.push({child:e,min:t}):l.push(e)}return s.sort((e,t)=>e.min===t.min?e.child.localeCompare(t.child):e.min-t.min),l.sort((e,t)=>{let n=u?.get(e)??0,i=u?.get(t)??0;if(n!==i)return n-i;let a=r.get(e)??o,s=r.get(t)??o;return a===s?e.localeCompare(t):a-s}),[...s.map(e=>e.child),...l]}}function gw(e,t,n){let r=rFe(e,{rankHint:t,laneOf:n}),{children:i,roots:a}=r;for(let t of e.nodes)i.has(t)||i.set(t,[]);let o=lFe(e,t,r),s=[...a].sort(hw(t)),l=pFe(i,t,o,uFe(s,i,t)),u=dFe(s,e.nodes,t,l);return u=fFe(u),u}function mFe(e,t,n){let r=new Set(e),i=new Set(t),a=uw(t),o=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&o.push(a.get(e.dst));return dw(o)}function _w(e,t,n){let r=[];for(let e of t){let t=n[e.src],i=n[e.dst];if(t==null||i==null||t===i)continue;let a=e.src,o=e.dst,s=t,l=i;t>i&&(a=e.dst,o=e.src,s=i,l=t);for(let t=s;t<l;t++)r.push({id:`${e.id}@${t}`,src:a,dst:o,ref:e.ref})}let i=0;for(let t=0;t+1<e.length;t++)i+=mFe(e[t],e[t+1],r);return i}function hFe(e,t){let n={...t},{preds:r}=sw(e),i=fw(e),a=_w(gw(e,n,i),e.edges,n),o=Yw.MAX_CROSSING_OPTIMIZATION_PASSES;for(let t=0;t<o;t++){let t=!1,o=[...e.nodes].sort((e,t)=>(n[t]??0)-(n[e]??0));for(let s of o){let o=n[s]??0;if(o===0)continue;let l=0;for(let e of r.get(s)??[])l=Math.max(l,(n[e]??0)+1);if(l>=o)continue;let u=o;n[s]=l;let d=_w(gw(e,n,i),e.edges,n);d<a?(a=d,t=!0):n[s]=u}if(!t)break}return n}function gFe(e,t){let n=fw(e),r=[...e.nodes].sort((e,n)=>(t[e]??0)-(t[n]??0)||e.localeCompare(n));for(let i of r){let r=n(i);if(!r)continue;let a=e.edges.filter(e=>e.src===i);if(a.length===0)continue;let o=!1,s=0;for(let e of a){let t=n(e.dst);t==null||t===r?o=!0:s++}if(s===0||o)continue;let l=0,u=!1;for(let t of e.edges){if(t.dst!==i)continue;let e=n(t.src);e&&(e===r?u=!0:l++)}if(l>0||!u)continue;let d=t[i]??0,f=d+s,p=0;for(let n of e.edges)n.dst===i&&(p=Math.max(p,(t[n.src]??0)+1));let m=Math.max(d,p,f);m!==d&&(t[i]=m)}}function _Fe(e,t){let n=nw(e),r=lw(n)??[...n.nodes].sort(),i=t?.compactSingleInput??!1,a=fw(n),o=Object.create(null);for(let e of r){let r=rw(n,e),s=t?.ignoreCrossLaneEdges?r.filter(t=>{let n=a(t.src),r=a(e);return!n||!r||n===r}):r;if(s.length===0)o[e]=0;else if(i&&s.length===1){let t=s[0].src;a(t)===a(e)?o[e]=(o[t]??0)+1:o[e]=o[t]??0}else{let t=-1/0;for(let e of s)t=Math.max(t,(o[e.src]??0)+1);o[e]=t===-1/0?0:t}}return(t?.optimizeRanksByCrossings??!1)&&(o=hFe(n,o)),t?.ignoreCrossLaneEdges&&gFe(n,o),{layers:gw(n,o,a),rankOf:o,dummy:new Set}}function vFe(e,t){let n=nw(e),r={..._Fe(n,{compactSingleInput:t?.compactSingleInput,ignoreCrossLaneEdges:t?.ignoreCrossLaneEdges,optimizeRanksByCrossings:t?.optimizeRanksByCrossings}).rankOf},i=fw(n),{preds:a,succs:o}=sw(n,e=>{if(t?.ignoreCrossLaneEdges){let t=i(e.src),n=i(e.dst);if(t&&n&&t!==n)return!1}return!0}),s=lw(n)??[...n.nodes],l=[...s].reverse(),u=p((e,t)=>{let n=0;for(let t of a.get(e)??[])n=Math.max(n,(r[t]??0)+1);let i=1/0,s=o.get(e)??[];return s.length>0&&(i=Math.min(...s.map(e=>(r[e]??0)-1))),Number.isFinite(i)||(i=Math.max(n,t)),Math.min(Math.max(t,n),i)},`clampFeasible`),d=Yw.GRAVITY_ITERATIONS,f=p(e=>{let t=!1;for(let n of e){let e=a.get(n)??[],i=o.get(n)??[];if(e.length===0&&i.length===0)continue;let s=e.length>0?e.reduce((e,t)=>e+(r[t]??0)+1,0)/e.length:r[n]??0,l=i.length>0?i.reduce((e,t)=>e+(r[t]??0)-1,0)/i.length:r[n]??0,d=Math.round((s+l)/2),f=u(n,d);f!==r[n]&&(r[n]=f,t=!0)}return t},`relaxOrder`);for(let e=0;e<d;e++){let e=f(s),t=f(l);if(!e&&!t)break}for(let e of s){let t=0;for(let n of a.get(e)??[])t=Math.max(t,(r[n]??0)+1);(r[e]??0)<t&&(r[e]=t)}for(let e of l){let t=o.get(e)??[];if(t.length>0){let n=Math.min(...t.map(e=>(r[e]??0)-1));(r[e]??0)>n&&(r[e]=n)}}return{layers:cw(n,s,r),rankOf:r,dummy:new Set}}function yFe(e){let t=aw(e),n=iw(e),r=ow(t),i=[];for(;r.length>0;){let e=[];for(let a of r){i.push(a);for(let r of n.get(a)??[])t.set(r,(t.get(r)??0)-1),(t.get(r)??0)===0&&e.push(r)}r=e.sort((e,t)=>e.localeCompare(t))}return i.length===e.nodes.length?i:null}function bFe(e,t){let n=nw(e),r=t?.direction===`LR`?yFe(n)??[...n.nodes].sort():lw(n)??[...n.nodes].sort(),i=fw(n),a=p(e=>i(e)??e,`laneOf`),o=Object.create(null),s=new Map,l=p((e,n)=>t?.ignoreCrossLaneEdges??!0?+(a(e)===a(n)):1,`edgeWeight`);for(let e of r){if(n.nodeById.get(e)?.isGroup)continue;let t=rw(n,e),r=0;if(t.length>0)for(let n of t){let t=n.src,i=o[t]??0;r=Math.max(r,i+l(t,e))}let i=a(e),u=s.get(i)??0,d=Math.max(r,u);o[e]=d,s.set(i,d+1)}return{layers:cw(n,r,o,{skipGroups:!0}),rankOf:o,dummy:new Set}}function xFe(e,t){let n=nw(t),{rankOf:r}=e,i=e.layers.map(e=>[...e]),a=new Set(e.dummy?[...e.dummy]:[]),o=0,s=new Map(n.nodeById),l=p(e=>{let t=`placeholder-${o++}`,n={id:t,isGroup:!1,isDummy:!0,width:0,height:0};for(s.set(t,n),a.add(t);i.length<=e;)i.push([]);return i[e].push(t),r[t]=e,t},`addDummyAt`),u=[...n.edges].sort((e,t)=>e.id===t.id?e.src===t.src?e.dst.localeCompare(t.dst):e.src.localeCompare(t.src):e.id.localeCompare(t.id)),d=[];for(let e of u){let t=r[e.src]??0,n=r[e.dst]??0;if(n-t<=1){d.push(e);continue}let i=e.src;for(let r=t+1,a=0;r<n;r++,a++){let t=l(r);d.push({id:`${e.id}#${a}`,src:i,dst:t,weight:e.weight,ref:e.ref}),i=t}let a=n-t-2;d.push({id:`${e.id}#${Math.max(a+1,0)}`,src:i,dst:e.dst,weight:e.weight,ref:e.ref})}let f={nodes:[...n.nodes,...[...a].filter(e=>!n.nodes.includes(e))],edges:d,layout:n.layout,nodeById:s};return{layering:{layers:i,rankOf:r,dummy:a},graphWithDummies:f}}function vw(e){let t=e.length;if(t===0)return 1/0;let n=[...e].sort((e,t)=>e-t);return t%2==1?n[(t-1)/2]:.5*(n[t/2-1]+n[t/2])}function yw(e){return e.length===0?1/0:e.reduce((e,t)=>e+t,0)/e.length}function SFe(e,t,n,r){let i=new Map;for(let t of e)i.set(t,[]);for(let e of n)r===`down`?t.has(e.src)&&i.has(e.dst)&&i.get(e.dst).push(t.get(e.src)):t.has(e.dst)&&i.has(e.src)&&i.get(e.src).push(t.get(e.dst));return i}function CFe(e,t,n){let r=n.get(e)??0,i=n.get(t)??0;return r===i?e.localeCompare(t):r-i}function bw(e,t,n){let r=new Set(e),i=new Set(t),a=uw(e),o=uw(t),s=[];for(let e of n)r.has(e.src)&&i.has(e.dst)&&s.push({u:a.get(e.src),v:o.get(e.dst)});return s.sort((e,t)=>e.u===t.u?e.v-t.v:e.u-t.u),dw(s.map(e=>e.v))}function xw(e,t,n){return[...e].sort((e,r)=>{let i=vw(t.get(e)??[]),a=vw(t.get(r)??[]);return i===a?CFe(e,r,n):isFinite(i)?isFinite(a)?i-a:-1:1})}function Sw(e,t,n,r,i,a){let o=uw(e),s=uw(t),l=SFe(t,o,n,r);if(!i||!a||a.length===0)return xw(t,l,s);let u=new Map;for(let e of t){let t=i(e),n=u.get(t)??[];n.push(e),u.set(t,n)}let d=[];for(let e of a){let t=u.get(e);if(!t||t.length===0)continue;let n=xw(t,l,s);d.push(...n)}let f=u.get(null);if(f&&f.length>0){let e=xw(f,l,s);for(let t of e){let e=yw(l.get(t)??[]),n=d.length;if(isFinite(e)){for(let[t,r]of d.entries())if(e<yw(l.get(r)??[])){n=t;break}}d.splice(n,0,t)}}return d}function Cw(e,t,n,r,i){let a=[...t],o=new Set(e),s=new Set(t),l=r?new Set(r):null,u=n.filter(e=>o.has(e.src)&&s.has(e.dst)),d=l?n.filter(e=>s.has(e.src)&&l.has(e.dst)):void 0,f=p(t=>{let n=bw(e,t,u);return d&&r&&(n+=bw(t,r,d)),n},`crossingScore`),m=i?new Map:null;if(i&&m)for(let e of t)m.set(e,i(e));let h=!0,g=f(a);for(;h;){h=!1;for(let e=0;e+1<a.length;e++){if(m&&m.get(a[e])!==m.get(a[e+1]))continue;let t=g;[a[e],a[e+1]]=[a[e+1],a[e]];let n=f(a);n<t?(g=n,h=!0):[a[e],a[e+1]]=[a[e+1],a[e]]}}return a}function wFe(e,t,n){let r=e.layers.map(e=>[...e]),i=t.edges,a=fw(t),o=mw(t,n?.laneOrder);for(let e=0;e<3;e++){for(let e=1;e<r.length;e++)r[e]=Sw(r[e-1],r[e],i,`down`,a,o),r[e]=Cw(r[e-1],r[e],i,r[e+1],a);for(let e=r.length-2;e>=0;e--)r[e]=Sw(r[e+1],r[e],i,`up`,a,o),r[e]=Cw(r[e+1],r[e],i,r[e-1],a)}return{layers:r}}function TFe(e,t,n){let r=n?.layerGap??Xw.DEFAULT_LAYER_GAP,i=n?.nodeGap??Xw.DEFAULT_NODE_GAP,a=n?.laneGap??i*2,o=n?.direction??`TB`,s=o===`LR`||o===`RL`,l=e.layers,u=Object.create(null),d=Object.create(null),f=p(e=>t.nodeById.get(e),`getNode`),m=p(e=>f(e)?.width??0,`getWidth`),h=p(e=>f(e)?.height??0,`getHeight`),g=fw(t),_=mw(t,n?.laneOrder),v=l.map(e=>e.reduce((e,t)=>Math.max(e,h(t)),0)),y=[];if(s)for(let e=0;e+1<l.length;e++){let t=l[e].reduce((e,t)=>Math.max(e,m(t)),0),n=l[e+1].reduce((e,t)=>Math.max(e,m(t)),0),i=v[e],a=v[e+1],o=i/2+a/2,s=(t+n)/2,u=Math.max(0,s-o-r);y.push(u)}let b=new Set;for(let e of l)for(let t of e)b.add(g(t));let x=b.has(null),S=_.filter(e=>b.has(e)),C=[...x?[null]:[],...S],w=Object.create(null);for(let e of S)w[e]=0;x&&(w.null=0);for(let e of l){let t=Object.create(null),n=[];for(let r of e){let e=g(r);e===null?n.push(r):(t[e]||=[]).push(r)}for(let[e,n]of Object.entries(t)){let t=n.reduce((e,t)=>e+m(t),0)+i*Math.max(0,n.length-1);w[e]=Math.max(w[e]??0,t)}if(x&&n.length){let e=n.reduce((e,t)=>e+m(t),0)+i*Math.max(0,n.length-1);w.null=Math.max(w.null??0,e)}}let T=new Map;{let e=C.map(e=>(e===null?w.null:w[e])??0),t=-(e.reduce((e,t)=>e+t,0)+a*Math.max(0,C.length-1))/2;for(let n=0;n<C.length;n++){let r=C[n],i=e[n]??0,o=t+i/2;T.set(r,o),t+=i,n<C.length-1&&(t+=a)}}let E=0;for(let[e,t]of l.entries()){let n=v[e]??0,a=new Map;for(let e of t){let t=g(e),n=a.get(t)??[];n.push(e),a.set(t,n)}for(let e of C){let t=a.get(e)??[];if(t.length===0)continue;let r=T.get(e);if(t.length===1){let e=t[0];u[e]=r,d[e]=E+n/2}else{let e=t.map(e=>m(e)),a=r-(e.reduce((e,t)=>e+t,0)+i*(t.length-1))/2;for(let[r,o]of t.entries()){let t=e[r];u[o]=a+t/2,d[o]=E+n/2,a+=t+i}}}let o=y[e]??0;E+=n+r+o}let D=new Map;for(let e of t.edges){let t=e.ref.id;D.has(t)||D.set(t,[]),D.get(t).push(e)}for(let[,e]of D){if(e.length===0)continue;let n=e[0].ref,r=n.start,i=n.end;if(r==null||i==null)continue;let a=Math.round(((u[r]??0)+(u[i]??0))/2),o=new Set;for(let t of e)o.add(t.src),o.add(t.dst);for(let e of o)e!==r&&e!==i&&t.nodeById.get(e)?.isDummy&&(u[e]=a)}return{x:u,y:d}}function EFe(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return t>>>0}function DFe(e){let t=e>>>0;return()=>{t+=1831565813;let e=t;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}}function OFe(e,t){let n=[...e],r=DFe(t);for(let e=n.length-1;e>0;e--){let t=Math.floor(r()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n}function kFe(e,t){let n=0;for(let[r,i]of e.entries())n+=Math.abs(r-(t.get(i)??r));return n}function ww(e,t){let n=new Map;for(let[t,r]of e.entries())n.set(r,t);let r=0;for(let{a:e,b:i,weight:a}of t){let t=n.get(e),o=n.get(i);t!=null&&o!=null&&(r+=a*Math.abs(t-o))}return r}function AFe(e){let t=pw(e);if(t.length<2)return[];let n=new Map(t.map((e,t)=>[e,t])),r=fw(e),i=new Map;for(let t of e.layout.edges??[]){if(t.isLayoutOnly)continue;let a=typeof t.start==`string`?t.start:void 0,o=typeof t.end==`string`?t.end:void 0;if(!a||!o||!e.nodeById.has(a)||!e.nodeById.has(o))continue;let s=r(a),l=r(o);if(!s||!l||s===l)continue;let u=n.get(s),d=n.get(l);if(u==null||d==null)continue;let[f,p]=u<=d?[s,l]:[l,s],m=`${f}\0${p}`,h=i.get(m);h?h.weight++:i.set(m,{a:f,b:p,weight:1})}return[...i.values()]}function Tw(e,t,n){let r=[...e],i=ww(r,t),a=!0,o=0,s=Math.max(1,r.length);for(;a&&o<s;){a=!1,o++;for(let e=0;e+1<r.length;e++){[r[e],r[e+1]]=[r[e+1],r[e]];let n=ww(r,t);n<i?(i=n,a=!0):[r[e],r[e+1]]=[r[e+1],r[e]]}}return{order:r,cost:i,sourceDistance:kFe(r,n)}}function jFe(e,t){return e.cost===t.cost?e.sourceDistance<t.sourceDistance:e.cost<t.cost}function MFe(e,t,n){let r=[...t].sort((e,t)=>e.a===t.a?e.b.localeCompare(t.b):e.a.localeCompare(t.a)).map(({a:e,b:t,weight:n})=>`${e}:${t}:${n}`).join(`|`);return EFe(`${e.join(`|`)}#${r}#${n}`)}function NFe(e,t={}){let n=pw(e);if(n.length<2)return n;let r=AFe(e);if(r.length===0)return n;let i=new Map(n.map((e,t)=>[e,t])),a=Tw(n,r,i),o=Math.max(0,t.restarts??Zw);for(let e=0;e<o;e++){let t=Tw(OFe(n,MFe(n,r,e)),r,i);jFe(t,a)&&(a=t)}return a.order}function PFe(e,t){let n=t?.ignoreCrossLaneEdges??!0,r=t?.optimizeRanksByCrossings??!0,i=nw(e),a=t?.automaticLaneOrdering?NFe(i,{restarts:Zw}):void 0,o=tFe(i),s=o.acyclic,{layering:l,graphWithDummies:u}=xFe(n?bFe(s,{compactSingleInput:t?.compactSingleInput??Yw.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!0,direction:t?.direction}):vFe(s,{compactSingleInput:t?.compactSingleInput??Yw.DEFAULT_COMPACT_SINGLE_INPUT,ignoreCrossLaneEdges:!1,optimizeRanksByCrossings:r}),s),d=wFe(l,u,{laneOrder:a}),f=TFe(d,u,{layerGap:t?.layerGap,nodeGap:t?.nodeGap,direction:t?.direction,laneOrder:a});return{acyclic:s,reversed:o.reversed,layering:l,ordered:d,coordinates:f}}function Ew(e,t,n){let r=e.x??0,i=e.y??0,a=t.x-r,o=t.y-i,s=Math.abs(a),l=Math.abs(o);return s<Qw&&l<Qw?n:l>Qw&&l*3>=s?o>0?`bottom`:`top`:s>Qw?a>0?`right`:`left`:n}function Dw(e,t){return Math.abs(e.to-t.from)<Qw||Math.abs(e.to-t.to)<Qw?e.to:e.from}function Ow(e,t){return e.orient===`vertical`?{x:e.coord,y:t}:{x:t,y:e.coord}}function FFe(e,t){let n=e.nodes??[],r=e.edges??[],i=[];for(let e of r)e.isLayoutOnly||i.push({...e,__originalEdge:e});let a=new Map,o=new Map,s=[],l=t===`LR`;for(let e of n)a.set(e.id,e);let u=n.filter(e=>e.isGroup&&!e.parentId);for(let e of u){let t={id:e.id},r=p(e=>{o.set(e.id,t),n.filter(t=>t.parentId===e.id).forEach(r)},`assignLane`);r(e)}let d=n.filter(e=>!e.isGroup&&!e.isEdgeLabel).map(e=>{let t=e.width??10,n=e.height??10,r=e.x??0,i=e.y??0,a=qFe;return{nodeId:e.id,minX:r-t/2-a,maxX:r+t/2+a,minY:i-n/2-a,maxY:i+n/2+a,visualXHalfExtent:l?n/2+a:t/2+a}}),f=p((e,t,n,r)=>{let i=s.find(n=>n.orientation===e&&Math.abs(n.coord-t)<1);return i||(i={id:`pipe-${e}-${t.toFixed(0)}`,orientation:e,coord:t,spanMin:n,spanMax:r,tracks:[]},s.push(i)),i.spanMin=Math.min(i.spanMin,n),i.spanMax=Math.max(i.spanMax,r),i},`getOrAddPipe`),m=p((e,t)=>{let n=e.width??10,r=e.height??10,i=e.x??0,a=e.y??0;switch(t){case`top`:return{x:i,y:a-r/2};case`bottom`:return{x:i,y:a+r/2};case`left`:return{x:i-n/2,y:a};case`right`:return{x:i+n/2,y:a}}},`portForSide`),h=p((e,t,n)=>m(e,Ew(e,t,n?`bottom`:`top`)),`getOrthogonalPort`),g=[],_=[],v=new Set,y=1e3,b=p((e,t,n)=>{if(g.length===0)return 0;let r=Math.abs(t.y-n.y)<Qw,i=Math.abs(t.x-n.x)<Qw;if(!r&&!i)return 0;let a=0;if(r){let r=t.y,i=Math.min(t.x,n.x)-Qw,o=Math.max(t.x,n.x)+Qw;if(o<=i)return 0;for(let t of g)t.edgeIndex!==e&&t.orientation===`vertical`&&(t.pipe.coord<i||t.pipe.coord>o||t.from-Qw<=r&&t.to+Qw>=r&&(a+=y))}else if(i){let r=t.x,i=Math.min(t.y,n.y)-Qw,o=Math.max(t.y,n.y)+Qw;if(o<=i)return 0;for(let t of g)t.edgeIndex!==e&&t.orientation===`horizontal`&&(t.pipe.coord<i||t.pipe.coord>o||t.from-Qw<=r&&t.to+Qw>=r&&(a+=y))}return a},`crossingPenalty`),x=i.map((e,t)=>{if(!e.start||!e.end)return{idx:t,crossLane:0,dx:0,dy:0};let n=a.get(e.start),r=a.get(e.end),i=o.get(e.start),s=o.get(e.end);return{idx:t,crossLane:i&&s&&i.id!==s.id?1:0,dx:n&&r?Math.abs((r.x??0)-(n.x??0)):0,dy:n&&r?Math.abs((r.y??0)-(n.y??0)):0}}).sort((e,t)=>{if(e.crossLane!==t.crossLane)return t.crossLane-e.crossLane;let n=e.dx+e.dy,r=t.dx+t.dy;return Math.abs(n-r)>1?n-r:e.idx-t.idx}).map(e=>e.idx),S=p((e,t,n,r)=>{let i=Math.min(e.x,t.x),a=Math.max(e.x,t.x),o=Math.min(e.y,t.y),s=Math.max(e.y,t.y);return!!d.find(l=>n&&l.nodeId===n||r&&l.nodeId===r?!1:Math.abs(e.x-t.x)>Qw?l.minY<e.y&&l.maxY>e.y&&l.maxX>i&&l.minX<a:l.minX<e.x&&l.maxX>e.x&&l.maxY>o&&l.minY<s)},`isSegmentBlocked`),C=new Map,w=new Map;for(let e of i)!e.start||!e.end||e.start===e.end||(w.set(e.start,(w.get(e.start)??0)+1),w.set(e.end,(w.get(e.end)??0)+1));let T=p((e,t)=>Ew(e,t,`bottom`),`determineSide`),E=new Map;for(let[e,t]of i.entries()){if(!t.start||!t.end||t.start===t.end||t.points&&t.points.length>0)continue;let n=a.get(t.start),r=a.get(t.end);if(!n||!r)continue;let i=(r.x??0)-(n.x??0),o=(r.y??0)-(n.y??0);E.set(e,{edgeIdx:e,srcId:t.start,dstId:t.end,srcSide:T(n,{x:r.x??0,y:r.y??0}),dstSide:T(r,{x:n.x??0,y:n.y??0}),absDx:Math.abs(i),absDy:Math.abs(o),dxSign:Math.sign(i),dySign:Math.sign(o)})}let D=p(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.absDx===0?1/0:e.absDy/e.absDx:e.absDy===0?1/0:e.absDx/e.absDy,`preferenceStrength`),O=p(e=>e.srcSide===`top`||e.srcSide===`bottom`?e.dxSign>=0?`right`:`left`:e.dySign>=0?`bottom`:`top`,`secondarySide`),k=new Map;for(let e of E.values()){let t=`${e.srcId}:${e.srcSide}`;k.has(t)||k.set(t,[]),k.get(t).push(e)}let A=new Map,j=p((e,t)=>`${e}:${t}`,`loadKey`);for(let e of E.values())A.set(j(e.srcId,e.srcSide),(A.get(j(e.srcId,e.srcSide))??0)+1),A.set(j(e.dstId,e.dstSide),(A.get(j(e.dstId,e.dstSide))??0)+1);for(let e of k.values())if(!(e.length<2)){e.sort((e,t)=>{let n=D(e),r=D(t);return Math.abs(n-r)>1e-9?r-n:e.edgeIdx-t.edgeIdx});for(let t=1;t<e.length;t++){let n=e[t],r=O(n),i=A.get(j(n.srcId,n.srcSide))??0,a=A.get(j(n.srcId,r))??0;a>=i||(A.set(j(n.srcId,n.srcSide),i-1),A.set(j(n.srcId,r),a+1),n.srcSide=r)}}let M=p(e=>{let t=e?.shape;return t===`question`||t===`diamond`},`isDiamondNode`),N=new Map;for(let e of E.values())N.has(e.dstId)||N.set(e.dstId,new Set),N.get(e.dstId).add(e.dstSide);for(let e of E.values()){if(!M(a.get(e.srcId)))continue;let t=N.get(e.srcId);if(!t?.has(e.srcSide))continue;let n=O(e);if(t.has(n)||(A.get(j(e.srcId,n))??0)>0)continue;let r=A.get(j(e.srcId,e.srcSide))??0;A.set(j(e.srcId,e.srcSide),Math.max(0,r-1)),A.set(j(e.srcId,n),1),e.srcSide=n}for(let e of E.values()){let{edgeIdx:t,srcId:n,dstId:r,srcSide:i,dstSide:o}=e,s=a.get(n),l=a.get(r),u=`${n}:${i}:src`,d=i===`top`||i===`bottom`?l.x??0:l.y??0;C.has(u)||C.set(u,[]),C.get(u).push({edgeIdx:t,oppositeCoord:d});let f=`${r}:${o}:dst`,p=o===`top`||o===`bottom`?s.x??0:s.y??0;C.has(f)||C.set(f,[]),C.get(f).push({edgeIdx:t,oppositeCoord:p})}let P=new Map;for(let[e,t]of C){if(t.length<2)continue;t.sort((e,t)=>e.oppositeCoord-t.oppositeCoord);let n=e.split(`:`),r=n.slice(0,-2).join(`:`),i=n[n.length-2],o=n[n.length-1],s=a.get(r);if(!s)continue;let l=i===`left`||i===`right`?s.height??10:s.width??10,u=s.shape,d=u===`question`||u===`diamond`?l*.3:l,f=Math.min(20,Math.max(8,d/(t.length+1))),p=-(f*(t.length-1))/2;for(let[e,n]of t.entries()){let t=p+e*f,r=`${n.edgeIdx}:${o}`;P.set(r,t)}}let F=p(e=>!!i[e]?.labelNodeId,`edgeHasLabelNode`),I=p((e,t)=>e?(C.get(`${e}:${t}:src`)??[]).some(({edgeIdx:e})=>F(e))||(C.get(`${e}:${t}:dst`)??[]).some(({edgeIdx:e})=>F(e)):!1,`faceHasLabelNode`),L=p((e,t,n)=>t===`top`||t===`bottom`?{x:e.x+n,y:e.y}:{x:e.x,y:e.y+n},`applyPortOffset`),R=p((e,t,n)=>{let r=E.get(e),i={x:n.x??0,y:n.y??0},a={x:t.x??0,y:t.y??0},o=r?.srcSide??T(t,i),s=r?.dstSide??T(n,a),l=r?m(t,r.srcSide):h(t,i,!0),u=r?m(n,r.dstSide):h(n,a,!1),d=P.get(`${e}:src`),f=P.get(`${e}:dst`);return d!==void 0&&(l=L(l,o,d)),f!==void 0&&(u=L(u,s,f)),{pSrcPort:l,pDstPort:u,srcSide:o,dstSide:s}},`portsForEdge`);for(let e of x){let t=i[e];if(_[e]=[],!t.start||!t.end||t.points&&t.points.length>0||t.start===t.end)continue;let n=a.get(t.start),r=a.get(t.end);if(!n||!r)continue;let{pSrcPort:o,pDstPort:u,srcSide:m,dstSide:h}=R(e,n,r),y={...o},x={...u},T=m===`top`||m===`bottom`,E=h===`top`||h===`bottom`;T?y.y=o.y>(n.y??0)?o.y+nT:o.y-nT:y.x=o.x>(n.x??0)?o.x+nT:o.x-nT,E?x.y=u.y>(r.y??0)?u.y+nT:u.y-nT:x.x=u.x>(r.x??0)?u.x+nT:u.x-nT;let D=p((e,t)=>{for(let n of d)if(!t.includes(n.nodeId)&&e.x>n.minX&&e.x<n.maxX&&e.y>n.minY&&e.y<n.maxY)return{inside:!0,obstacle:n};return{inside:!1}},`isPointInObstacle`),O=p((e,t,n,r,i)=>{if(i){let i=e.y>(t.y??0);return{x:(n.x??0)>=e.x?r.maxX+$w:r.minX-$w,y:i?r.maxY+eT:r.minY-eT,leavesPositiveSide:i}}let a=e.x>(t.x??0),o=(n.y??0)>=e.y;return{x:a?r.maxX+$w:r.minX-$w,y:o?r.maxY+eT:r.minY-eT,leavesPositiveSide:a}},`obstacleDetour`),k=[],A=[t.start,t.end],j=D(y,A);if(j.inside&&j.obstacle){let e=j.obstacle;if(T){let t=O(o,n,r,e,!0);y.x=t.x,y.y=t.y;let i=t.leavesPositiveSide?Math.min(e.minY-2,o.y+nT):Math.max(e.maxY+2,o.y-nT);k=[{x:o.x,y:i},{x:t.x,y:i},{x:t.x,y:t.y}]}else{let t=O(o,n,r,e,!1),i=t.leavesPositiveSide?Math.min(e.minX-2,o.x+nT):Math.max(e.maxX+2,o.x-nT);y.x=t.x,y.y=t.y,k=[{x:i,y:o.y},{x:i,y:t.y},{x:t.x,y:t.y}]}}let M=[],N=D(x,A);if(N.inside&&N.obstacle){let e=N.obstacle;if(E){let t=O(u,r,n,e,!0);x.x=t.x,x.y=t.y,M=[{x:t.x,y:t.y},{x:u.x,y:t.y}]}else{let t=O(u,r,n,e,!1);x.x=t.x,x.y=t.y,M=[{x:t.x,y:t.y},{x:t.x,y:u.y}]}}if(k.length===0&&M.length===0){let n=$w,r=Math.abs(y.x-x.x)<n,i=Math.abs(y.y-x.y)<n,a=P.get(`${e}:src`)!==void 0||P.get(`${e}:dst`)!==void 0,s=(C.get(`${t.start??``}:${m}:src`)?.length??0)+(C.get(`${t.start??``}:${m}:dst`)?.length??0),l=(C.get(`${t.end??``}:${h}:src`)?.length??0)+(C.get(`${t.end??``}:${h}:dst`)?.length??0),d=s>1||l>1,f=w.get(t.start??``)??0,p=w.get(t.end??``)??0,_=s>1&&I(t.start,m)||l>1&&I(t.end,h);if((r||i)&&!a&&(!d||d&&!_&&(s<=1||f<=2)&&(l<=1||p<=2))&&!S(o,u,t.start,t.end)){t.points=[{...o},{...y},{...x},{...u}],v.add(e);let n=i?`horizontal`:`vertical`,r=i?o.y:o.x,a=i?Math.min(o.x,u.x):Math.min(o.y,u.y),s=i?Math.max(o.x,u.x):Math.max(o.y,u.y),l={id:`fast-path-${n}-${r.toFixed(0)}-${e}`,orientation:n,coord:r,spanMin:a,spanMax:s,tracks:[]};g.push({edgeIndex:e,segmentIndex:0,orientation:n,pipe:l,trackIndex:0,from:a,to:s});continue}}y.x=f(`vertical`,y.x,y.y,y.y).coord,x.x=f(`vertical`,x.x,x.y,x.y).coord;let F=Math.min(y.x,x.x)-50,L=Math.max(y.x,x.x)+50,ee=Math.min(y.y,x.y)-50,z=Math.max(y.y,x.y)+50;for(let e of d){let t=Math.min(y.x,x.x),n=Math.max(y.x,x.x),r=Math.min(y.y,x.y),i=Math.max(y.y,x.y);e.minX<n&&e.maxX>t&&e.minY<i&&e.maxY>r&&(F=Math.min(F,e.minX-tT),L=Math.max(L,e.maxX+tT),ee=Math.min(ee,e.minY-tT),z=Math.max(z,e.maxY+tT))}for(let e of d){if(e.maxX<F||e.minX>L||e.maxY<ee||e.minY>z)continue;let t=$w;f(`horizontal`,e.minY-t,F,L),f(`horizontal`,e.maxY+t,F,L);let n=eT;f(`vertical`,e.minX-n,ee,z),f(`vertical`,e.maxX+n,ee,z)}f(`horizontal`,y.y,F,L),f(`horizontal`,x.y,F,L);let B=s.filter(e=>e.orientation===`horizontal`&&e.coord>=ee&&e.coord<=z),te=s.filter(e=>e.orientation===`vertical`&&e.coord>=F&&e.coord<=L),ne=p((e,t)=>`${e.toFixed(1)},${t.toFixed(1)}`,`getKey`),re=ne(y.x,y.y),ie=ne(x.x,x.y),ae=new Map,oe=new Map,se=new Map,ce=new Set,le=[];ae.set(re,0),se.set(re,`n`),le.push({key:re,f:Math.hypot(x.x-y.x,x.y-y.y),pt:y}),ce.add(re);let ue=[],de=p((e,n)=>S(e,n,t.start,t.end),`checkSegmentBlocked`),fe={x:x.x,y:y.y},pe=de(y,fe),me=de(fe,x),he=pe||me,ge={x:y.x,y:x.y},_e=de(y,ge),ve=de(ge,x);if(he?_e||ve||(ue=Math.abs(y.x-x.x)<Qw?[y,x]:[y,ge,x]):ue=Math.abs(y.y-x.y)<Qw||Math.abs(y.x-x.x)<Qw?[y,x]:[y,fe,x],ue.length===0)for(;le.length>0;){le.sort((e,t)=>e.f-t.f);let n=le.shift();if(ce.delete(n.key),n.key===ie){let e=ie,t=x;for(ue=[t];oe.has(e);){let n=oe.get(e);ue.unshift(n),t=n,e=ne(n.x,n.y)}break}let r=n.pt.x,i=n.pt.y,a=te.sort((e,t)=>e.coord-t.coord),o=a.findIndex(e=>Math.abs(e.coord-r)<1),s=B.sort((e,t)=>e.coord-t.coord),l=s.findIndex(e=>Math.abs(e.coord-i)<1),u=[];o>0&&u.push({x:a[o-1].coord,y:i}),o>=0&&o<a.length-1&&u.push({x:a[o+1].coord,y:i}),l>0&&u.push({x:r,y:s[l-1].coord}),l>=0&&l<s.length-1&&u.push({x:r,y:s[l+1].coord});for(let a of u){let o=Math.min(r,a.x),s=Math.max(r,a.x),l=Math.min(i,a.y),u=Math.max(i,a.y);if(d.some(e=>e.nodeId===t.start||e.nodeId===t.end?!1:o===s?e.minX<r&&e.maxX>r&&e.maxY>l&&e.minY<u:e.minY<i&&e.maxY>i&&e.maxX>o&&e.minX<s))continue;let f=ne(a.x,a.y),p=Math.abs(a.x-r)+Math.abs(a.y-i),m=b(e,n.pt,a),h=0,g=x.x-y.x,_=x.y-y.y,v=a.x-r,S=a.y-i;(_>10&&S<-5||_<-10&&S>5)&&(h=Math.abs(S)*100),(g>10&&v<-5||g<-10&&v>5)&&(h+=Math.abs(v)*50);let C=0,w=se.get(n.key)??`n`,T=Math.abs(v)>Qw?`h`:`v`;w!==`n`&&w!==T&&(C=50);let E=p+m+h+C,D=(ae.get(n.key)??1/0)+E,O=Math.abs(x.x-a.x)+Math.abs(x.y-a.y);if(D<(ae.get(f)??1/0)){if(oe.set(f,n.pt),ae.set(f,D),se.set(f,T),!ce.has(f))le.push({key:f,f:D+O,pt:a}),ce.add(f);else{let e=le.findIndex(e=>e.key===f);e!==-1&&(le[e].f=D+O)}}}}if(ue.length===0&&(ue=[y,{x:y.x,y:x.y},x]),ue.length>4){let e=ue[0],t=ue[ue.length-1],n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),a=Math.max(e.y,t.y);for(let e of ue)n=Math.min(n,e.x),r=Math.max(r,e.x),i=Math.min(i,e.y),a=Math.max(a,e.y);let o=r>Math.max(e.x,t.x),s=n<Math.min(e.x,t.x);if(l){let i=eT;if(o){let n=Math.max(e.x,t.x),a=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=d.filter(e=>e.minX<n&&e.maxX>n&&e.minY<o&&e.maxY>a);if(s.length>0){let n=Math.max(e.x,t.x);for(let e of s){let t=(e.minX+e.maxX)/2;if(e.visualXHalfExtent===void 0||isNaN(e.visualXHalfExtent))continue;let r=t+e.visualXHalfExtent+i;n=Math.max(n,r)}isNaN(n)||(r=n)}}if(s){let r=d.filter(n=>n.minX<Math.min(e.x,t.x)+i&&n.minY<Math.max(e.y,t.y)&&n.maxY>Math.min(e.y,t.y));if(r.length>0){let a=Math.min(e.x,t.x);for(let e of r){let t=(e.minX+e.maxX)/2-e.visualXHalfExtent-i;a=Math.min(a,t)}n=a}}}let u=p(n=>{let r=t.y>e.y,i=d.filter(n=>{let r=Math.min(e.x,t.x)<n.maxX&&Math.max(e.x,t.x)>n.minX,i=Math.min(e.y,t.y)<n.maxY&&Math.max(e.y,t.y)>n.minY;return r&&i}),a=i;if(l&&i.length>0){let e=i.filter(e=>e.minX<n&&e.maxX>n);e.length>0&&(a=e)}if(a.length===0)return t.y;let o=$w;if(r){let e=Math.max(...a.map(e=>e.maxY))+o;if(e<t.y-Qw)return e}else{let e=Math.min(...a.map(e=>e.minY))-o;if(e>t.y+Qw)return e}return t.y},`findBestReturnY`),f=p(n=>{let r=u(n),i={x:n,y:e.y},a={x:n,y:r},o={x:t.x,y:r},s=de(e,i),l=de(i,a),d=de(a,o),f=r!==t.y&&de(o,t);return!s&&!l&&!d&&!f?Math.abs(r-t.y)<Qw?[e,i,a,t]:[e,i,a,o,t]:null},`trySimplifyWithDetourX`),m=o&&!s?f(r):s&&!o?f(n):null;m&&(ue=m)}let ye=[o,...k,...ue,...M.reverse(),u];if(ye.length>=3){let e=ye[ye.length-1],t=ye[ye.length-2],n=ye[ye.length-3],r=Math.abs(n.y-t.y)<Qw&&Math.abs(t.y-e.y)<Qw,i=Math.abs(n.x-t.x)<Qw&&Math.abs(t.x-e.x)<Qw;if(r){let r=Math.sign(t.x-n.x),i=Math.sign(e.x-n.x);r!==0&&r===i&&Math.abs(t.x-n.x)>Math.abs(e.x-n.x)&&ye.splice(-2,1)}else if(i){let r=Math.sign(t.y-n.y),i=Math.sign(e.y-n.y);r!==0&&r===i&&Math.abs(t.y-n.y)>Math.abs(e.y-n.y)&&ye.splice(-2,1)}}let be=[ye[0]];for(let e=1;e<ye.length-1;e++){if(e===1){be.push(ye[e]);continue}let t=be[be.length-1],n=ye[e],r=ye[e+1];if(Math.abs(t.y-n.y)<Qw&&Math.abs(n.y-r.y)<Qw){if(n.x>t.x!=r.x>n.x){be.push(n);continue}continue}if(Math.abs(t.x-n.x)<Qw&&Math.abs(n.x-r.x)<Qw){if(n.y>t.y!=r.y>n.y){be.push(n);continue}continue}be.push(n)}be.push(ye[ye.length-1]);for(let t=0;t<be.length-1;t++){let n=be[t],r=be[t+1],i=Math.abs(n.x-r.x)<Qw?`vertical`:`horizontal`,a=i===`vertical`?n.x:n.y,o=i===`vertical`?Math.min(n.y,r.y):Math.min(n.x,r.x),s=i===`vertical`?Math.max(n.y,r.y):Math.max(n.x,r.x),l=f(i,a,o,s),u={edgeIndex:e,segmentIndex:t,orientation:i,pipe:l,trackIndex:0,from:o,to:s};g.push(u),_[e].push(g.length-1),l.tracks[0]||(l.tracks[0]={index:0,coord:l.coord,segments:[]}),l.tracks[0].segments.push({edgeIndex:e,segmentIndex:t,from:o,to:s})}}let ee=p((e,t)=>e.from<t.to&&t.from<e.to,`segmentsOverlap`),z=p((e,t,n,r)=>{let i=!r.segments.some(n=>(n.edgeIndex!==t.edgeIndex||n.segmentIndex!==t.segmentIndex)&&ee(n,e)),a=!n.segments.some(n=>(n.edgeIndex!==e.edgeIndex||n.segmentIndex!==e.segmentIndex)&&ee(n,t));return i&&a?(e.trackIndex=r.index,t.trackIndex=n.index,n.segments=[...n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),{edgeIndex:t.edgeIndex,segmentIndex:t.segmentIndex,from:t.from,to:t.to}],r.segments=[...r.segments.filter(e=>e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex),{edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to}],!0):!1},`trySwapSegmentsAcrossTracks`),B=p(e=>{let t=e.tracks.length;return e.tracks[t]={index:t,coord:e.coord,segments:[]},t},`createNewTrack`),te=p((e,t)=>{let n=e.pipe.tracks[e.trackIndex];n.segments=n.segments.filter(t=>t.edgeIndex!==e.edgeIndex||t.segmentIndex!==e.segmentIndex),e.trackIndex=t,e.pipe.tracks[t].segments.push({edgeIndex:e.edgeIndex,segmentIndex:e.segmentIndex,from:e.from,to:e.to})},`moveSegmentToTrack`),ne=p((e,t)=>{let n=_[e.edgeIndex];for(let r of n){let n=g[r];n.pipe===e.pipe&&te(n,t)}},`moveSegmentChainToTrack`),re=p(e=>{let t=_[e.edgeIndex],n=t.indexOf(g.indexOf(e)),r=[];return n>0&&r.push(g[t[n-1]]),n<t.length-1&&r.push(g[t[n+1]]),r},`getAdjacentSegmentsAlongEdge`),ie=p((e,t)=>{if(e.orientation===t.orientation)return!1;let n=e.orientation===`horizontal`?e:t,r=e.orientation===`horizontal`?t:e;return r.pipe.coord>n.from&&r.pipe.coord<n.to&&n.pipe.coord>r.from&&n.pipe.coord<r.to},`haveAnyCrossing`),ae=p((e,t)=>{for(let n of e.tracks)if(!n.segments.some(e=>(e.edgeIndex!==t.edgeIndex||e.segmentIndex!==t.segmentIndex)&&ee(e,t)))return n.index;return-1},`findAvailableTrack`),oe=p((e,t)=>{if(e.trackIndex===t.trackIndex)return ee(e,t);let n=re(e),r=re(t);return n.some(e=>r.some(t=>ie(e,t)))},`segmentsConflict`),se=p((e,t,n)=>{if(z(e,t,e.pipe.tracks[e.trackIndex],t.pipe.tracks[t.trackIndex]))return;let r=ae(e.pipe,t);n(t,r===-1?B(e.pipe):r)},`resolveTrackConflict`),ce=p(e=>{let t=0;for(let n=0;n<e.length;n++)for(let r=n+1;r<e.length;r++){let i=e[n],a=e[r];i.pipe===a.pipe&&oe(i,a)&&(t++,se(i,a,ne))}return t},`resolveHandleConflicts`),le=new Map,ue=p(e=>{if(le.has(e))return le.get(e);let t=_[e];if(t.length===0){let t={dest:0,deviation:0,base:0,delta:0};return le.set(e,t),t}let n=g[t[0]].pipe.coord,r=n;for(let e=1;e<t.length;e++){let i=g[t[e]];if(i.orientation===`horizontal`){let e=i.from,t=i.to;r=Math.abs(e-n)>Math.abs(t-n)?e:t;break}}let i=Math.abs(r-n),a={dest:r,deviation:i,base:n,delta:r-n};return le.set(e,a),a},`getDestInfo`),de=p(()=>{let e=0,t=new Map;for(let[e,n]of i.entries())_[e].length!==0&&n.start&&(t.has(n.start)||t.set(n.start,[]),t.get(n.start).push(e));let n=p(e=>{let t=i[e];if(!t.start||!t.end)return 0;let n=a.get(t.start),r=a.get(t.end);if(!n||!r)return 0;let o=(r.x??0)-(n.x??0),s=(r.y??0)-(n.y??0);return Math.abs(o)+Math.abs(s)},`getEdgeDistance`);for(let r of t.values()){r.sort((e,t)=>{let r=ue(e),i=ue(t);if(Math.abs(r.deviation-i.deviation)>1)return r.deviation-i.deviation;if(Math.abs(r.dest-i.dest)>1)return r.dest-i.dest;let a=n(e),o=n(t);if(Math.abs(a-o)>1)return o-a;let s=_[e].length,l=_[t].length;if(s!==l)return s-l;if(s===1){let n=_[e][0],r=_[t][0];if(g[n]&&g[r]){let e=g[n],t=g[r],i=Math.abs(e.to-e.from),a=Math.abs(t.to-t.from);if(Math.abs(i-a)>1)return i-a}}return 0});let t=r.map(e=>g[_[e][0]]);e+=ce(t)}return e},`fixSourceHandleCrossings`),fe=p(()=>{let e=0,t=new Map;for(let[e,n]of i.entries())_[e].length!==0&&n.end&&(t.has(n.end)||t.set(n.end,[]),t.get(n.end).push(e));for(let n of t.values()){n.sort((e,t)=>{let n=p(e=>{let t=_[e];if(t.length<2)return 0;let n=g[t[t.length-2]];return Math.abs(n.to-n.from)},`getDist`),r=n(e),i=n(t);return Math.abs(r-i)>.1?r-i:e-t});let t=n.map(e=>g[_[e][_[e].length-1]]);e+=ce(t)}return e},`fixTargetHandleCrossings`),pe=p(()=>{let e=0;for(let t of s){let n=[];for(let e of t.tracks)for(let t of e.segments){let e=_[t.edgeIndex].find(e=>g[e].segmentIndex===t.segmentIndex);e!==void 0&&n.push(g[e])}n.sort((e,t)=>e.edgeIndex-t.edgeIndex||e.segmentIndex-t.segmentIndex);for(let t=0;t<n.length;t++)for(let r=t+1;r<n.length;r++){let i=n[t],a=n[r];oe(i,a)&&(e++,se(i,a,te))}}return e},`fixPipeCrossings`),me=0;for(;me<10;){let e=0;if(e+=de(),e+=fe(),e+=pe(),e===0)break;me++}let he=new Map;for(let e of s){let t=[];e.tracks.forEach(e=>{e.segments.forEach(n=>{t.push({edgeIndex:n.edgeIndex,segmentIndex:n.segmentIndex,trackIndex:e.index,from:n.from,to:n.to})})}),t.sort((e,t)=>e.from-t.from);let n=[];if(t.length>0){let e=[t[0]],r=t[0].to;for(let i=1;i<t.length;i++){let a=t[i];a.from<r?(e.push(a),r=Math.max(r,a.to)):(n.push(e),e=[a],r=a.to)}n.push(e)}for(let t of n){let n=new Set;t.forEach(e=>n.add(e.trackIndex));let r=new Map;t.forEach(e=>{let t=ue(e.edgeIndex);r.set(e.trackIndex,(r.get(e.trackIndex)??0)+t.delta)});let i=[...n].filter(e=>(r.get(e)??0)<-1),a=[...n].filter(e=>(r.get(e)??0)>1),o=[...n].filter(e=>Math.abs(r.get(e)??0)<=1);i.sort((e,t)=>(r.get(t)??0)-(r.get(e)??0)),a.sort((e,t)=>(r.get(e)??0)-(r.get(t)??0));let s=p((n,r)=>{t.filter(e=>e.trackIndex===n).forEach(t=>{let n=v.has(t.edgeIndex)?e.coord:r;he.set(`${t.edgeIndex}-${t.segmentIndex}`,n)})},`assignCoord`),l=0;for(let t of i)l++,s(t,e.coord-l*rT);if(o.length===0&&n.size>0){let e=[...n].sort((e,t)=>Math.abs(r.get(e)??0)-Math.abs(r.get(t)??0))[0],t=i.indexOf(e);t!==-1&&i.splice(t,1);let s=a.indexOf(e);s!==-1&&a.splice(s,1),o.push(e)}let u=0;for(let t of o){if(u===0)s(t,e.coord);else{let n=u%2==1?1:-1,r=Math.ceil(u/2);s(t,e.coord+n*r*rT*.5)}u++}let d=0;for(let t of a)d++,s(t,e.coord+d*rT)}}for(let[e,t]of i.entries()){let n=_[e]??[];if(n.length===0)continue;let r=[],{pSrcPort:i,pDstPort:o}=R(e,a.get(t.start),a.get(t.end)),s=n.map(e=>{let t=g[e],n=he.get(`${t.edgeIndex}-${t.segmentIndex}`)??t.pipe.coord;return{orient:t.orientation,coord:n,from:t.from,to:t.to}});r.push(i);for(let e=0;e<s.length;e++){let t=s[e],n=r[r.length-1],i=t.orient===`vertical`?n.y:n.x,a=t.orient===`vertical`?n.x:n.y,o=s[e+1],l=e<s.length-1;if(Math.abs(a-t.coord)>Qw&&r.push(Ow(t,i)),l&&o.orient===t.orient){if(Math.abs(t.coord-o.coord)>Qw){let e=t.orient===`vertical`?(i+o.from)/2:Dw(t,o);r.push(Ow(t,e),Ow(o,e))}else(e===0||e===s.length-2)&&r.push(Ow(t,Dw(t,o)))}else if(l)r.push(Ow(t,o.coord));else{let e=Math.abs(t.from-i)<Math.abs(t.to-i)?t.to:t.from;r.push(Ow(t,e))}}let l=r[r.length-1];(Math.abs(l.x-o.x)>Qw||Math.abs(l.y-o.y)>Qw)&&r.push(o);let u=[];r.length>0&&u.push(r[0]);for(let e=1;e<r.length;e++){let t=r[e],n=u[u.length-1];(Math.abs(t.x-n.x)>Qw||Math.abs(t.y-n.y)>Qw)&&u.push(t)}t.points=u}for(let e of i){let t=e.__originalEdge;t&&e.points&&(t.points=e.points)}e.edges=(e.edges??[]).filter(e=>!e.isLayoutOnly);let ge=p((e,t)=>{let n=t.x??0,r=t.y??0,i=t.width??0,a=t.height??0;if(i<=0||a<=0)return e;let o=n-i/2,s=n+i/2,l=r-a/2,u=r+a/2;if(e.x<o||e.x>s||e.y<l||e.y>u)return e;let d=e.x-o,f=s-e.x,p=e.y-l,m=u-e.y,h=Math.min(d,f,p,m);return h===d?{x:o,y:e.y}:h===f?{x:s,y:e.y}:h===p?{x:e.x,y:l}:{x:e.x,y:u}},`nodeBoundaryClamp`);for(let t of e.edges){let e=t.points;if(!e||e.length<2)continue;let n=t.start,r=t.end,i=n?a.get(n):void 0,o=r?a.get(r):void 0;i&&(e[0]=ge(e[0],i)),o&&(e[e.length-1]=ge(e[e.length-1],o))}return e}function IFe(e){return e.direction??`TB`}function LFe(e){let t=bPe(e),n=e.config.flowchart?.nodeSpacing??40,r=e.config.flowchart?.rankSpacing??100,i=e.config.swimlane?.ignoreCrossLaneEdges??!0,a=e.config.swimlane?.optimizeRanksByCrossings??!0,o=e.config.swimlane?.automaticLaneOrdering??!1,s=IFe(e),{ordered:l,coordinates:u}=PFe(t,{nodeGap:n,layerGap:r,ignoreCrossLaneEdges:i,optimizeRanksByCrossings:a,automaticLaneOrdering:o,direction:s});xPe(t,l,u,{nodeGap:n,layerGap:r});for(let t of e.edges??[])delete t.points;FFe(e,s);for(let t of e.edges??[])(!t.curve||t.curve===`basis`)&&(t.curve=`rounded`);return $Pe(e,s),QPe(e),s}function RFe(e){yPe(e);let t=SPe(e);e.nodes=t.nodes,e.edges=t.edges}var kw,Aw,jw,zFe,Mw,BFe,Nw,VFe,Pw,Fw,HFe,Iw,Lw,Rw,UFe,zw,Bw,Vw,Hw,Uw,WFe,Ww,Gw,Kw,qw,Jw,GFe,KFe,Yw,Xw,Zw,Qw,qFe,$w,eT,tT,nT,rT,JFe,YFe=o((()=>{Cx(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),kw=5,Aw=1e-5,jw=1e-6,p(WS,`buildSegmentList`),p(sPe,`segmentIntersection`),p(GS,`isHorizontalSeg`),p(cPe,`findEdgeIntersections`),p(KS,`fmt`),p(qS,`pointToString`),p(lPe,`getArcSweepFlag`),zFe=.001,p(uPe,`applyMarkerOffsets`),p(dPe,`emitJump`),p(JS,`computeRoundedCorner`),p(fPe,`rewriteEdgePath`),p(pPe,`isStraightPath`),p(mPe,`curveSupportsLineHops`),p(hPe,`decodeDataPoints`),p(gPe,`applyLineJumpsToSvg`),p(_Pe,`applySwimlaneLineJumps`),Mw=`__swimlane_default__`,BFe=21,Nw=20,p(YS,`topLaneHorizontalPadding`),p(vPe,`assignTopLaneTitleRect`),p(yPe,`prepareLayoutForSwimlanes`),p(bPe,`toGraphView`),p(xPe,`writeBackToLayoutData`),VFe=`[EdgeLabelNodes]`,p(SPe,`createEdgeLabelNodes`),Pw=.001,p(XS,`measuredNodeRect`),p(ZS,`nodeBoundsInfoFor`),p(QS,`samePoint`),p($S,`sameX`),p(eC,`sameY`),p(tC,`isHorizontalSegment`),p(nC,`isVerticalSegment`),p(rC,`overlapLength`),p(iC,`sameAxisSegmentOverlapLength`),p(aC,`orthogonalSegmentsForPoints`),p(oC,`countOrthogonalBends`),p(sC,`dedupeConsecutivePoints`),p(cC,`classifyThreeSegmentRoute`),p(lC,`segmentBoundsOverlapRect`),p(uC,`pointInsideRect`),p(CPe,`rectContainsRect`),p(dC,`rectsOverlap`),p(fC,`inflateRect`),p(pC,`rectFromCenterSize`),p(mC,`rectOfNodeBounds`),p(hC,`portForRectSide`),p(gC,`buildOrthogonalPortPath`),p(_C,`buildSameSideTrackPath`),p(vC,`collectRealNodeBounds`),p(yC,`collectNodeRectEntries`),p(wPe,`collectLayoutNodeRects`),p(bC,`getNodePairGeometry`),p(xC,`segmentHitsAnyRect`),p(SC,`orthogonalSegmentsCross`),p(TPe,`sameAxisSegmentsOverlap`),p(CC,`segmentConflictsWithAnyEdge`),p(wC,`orthogonalSegmentsStrictlyCross`),p(TC,`strictlyBetween`),p(EPe,`isCollinearIntermediate`),p(DPe,`simplifyPolylineOnce`),p(EC,`orthogonalizePolyline`),p(DC,`simplifyPolyline`),Fw=.001,HFe=.5,Iw=4,p(OC,`endpointContextFor`),p(OPe,`segmentEnterPoint`),p(kC,`clipEndpoint`),p(kPe,`clipEdgeEndpointsToNodeBoundaries`),p(AC,`snapEndpointToBoundary`),p(jC,`firstDistinctAdjacent`),p(MC,`cornerClearanceRange`),p(NC,`clampToCornerClearance`),p(APe,`intersectRanges`),p(PC,`clearanceRangeForSide`),p(FC,`terminalSideForSegment`),p(IC,`isHorizontalSide`),p(jPe,`straightClearanceRange`),p(LC,`clearStraightEndpointCornerAxis`),p(RC,`clearStraightEndpointCornerConnections`),p(MPe,`cornerClearedEndpoint`),p(NPe,`moveCollinearEndpointRun`),p(zC,`clearEndpointCornerConnection`),p(BC,`borderSideForSegment`),p(VC,`leavesOutward`),p(HC,`collapseOwnBorderStub`),p(PPe,`snapAndCollapseEndpoints`),p(UC,`prepareEdgeEndpointsForRenderer`),p(WC,`buildNodeMap`),p(FPe,`resolveTopLevelGroupId`),p(GC,`groupDepth`),p(KC,`boundsForChildren`),p(IPe,`applyGroupBounds`),p(LPe,`recomputeNestedGroupBounds`),p(qC,`mirrorAxis`),p(RPe,`applyBtDirectionTransform`),p(zPe,`applyLrDirectionTransform`),Lw=1e-6,Rw=8,UFe=[0,Rw,-Rw,2*Rw,-2*Rw],p(BPe,`portSwapToLShape`),p(VPe,`collapseShortTerminalStub`),zw=.001,Bw=8,Vw=aC,Hw=p((e,t)=>$S(e,t,zw)||eC(e,t,zw),`orthogonallyAligned`),p(HPe,`separateSharedRenderedTerminalLanes`),p(UPe,`collapseRedundantRectangularDoglegs`),p(JC,`liftObstacleHuggingSameSideRails`),p(YC,`liftTopLaneTitleBandsAboveRails`),p(XC,`shiftLeftLaneTitleBandsLeftOfRails`),p(WPe,`swapDestinationTerminalTailsToReduceCrossings`),p(GPe,`reassignCrossingExternalRailChannels`),p(KPe,`shortcutRedundantOrthogonalJogs`),p(qPe,`resolveRenderedOrthogonalCrossings`),Uw=.001,WFe=8,p(JPe,`simplifyDetouredEdges`),Ww=.001,Gw=10,Kw=7,p(ZC,`markerClearanceRectFor`),p(YPe,`normalizeRect`),p(QC,`labelOverlapsOwnMarker`),p($C,`anchorLabelsToPolyline`),qw=1e-6,Jw=4,GFe=3,p(ew,`pairKey`),p(XPe,`straightenCollinearSiblingDetours`),p(tw,`nudgeSharedInteriorSubpaths`),p(ZPe,`segmentsIntersect`),p(QPe,`validateSwimlanesLayout`),p($Pe,`postProcessSwimlaneLayout`),p(nw,`normalizeGraph`),p(rw,`incoming`),p(eFe,`buildSuccessorMap`),p(iw,`buildSortedSuccessorMap`),p(aw,`buildInDegreeMap`),p(ow,`sortedZeroInDegreeNodes`),p(sw,`buildPredecessorSuccessorMaps`),p(cw,`buildLayersFromRanks`),p(lw,`topoSortIfAcyclic`),p(uw,`buildLayerIndex`),p(dw,`countInversions`),p(tFe,`removeCycles_DFS`),p(nFe,`buildTopLaneMap`),p(fw,`createTopLaneResolver`),p(pw,`buildTopLaneOrder`),p(mw,`resolveTopLaneOrder`),KFe={EPSILON:1e-6},Yw={GRAVITY_ITERATIONS:8,MAX_CROSSING_OPTIMIZATION_PASSES:4,DEFAULT_COMPACT_SINGLE_INPUT:!0},Xw={DEFAULT_LAYER_GAP:100,DEFAULT_NODE_GAP:40},p(rFe,`buildDrivingTree`),p(iFe,`chooseParent`),p(aFe,`buildAdjacency`),p(oFe,`assignComponents`),p(sFe,`computeBlocks`),p(cFe,`popBlock`),p(lFe,`computeSubtreeCrossCounts`),p(uFe,`annotateMinimumLayers`),p(hw,`compareByRankThenId`),p(dFe,`emitNodesInTreeOrder`),p(fFe,`deduplicateLayers`),p(pFe,`createChildOrderer`),p(gw,`buildMultitreeLayerOrder`),p(mFe,`countCrossingsBetweenAdjacent`),p(_w,`totalCrossings`),p(hFe,`optimizeRanksByCrossings`),p(gFe,`adjustCrossLaneSources`),p(_Fe,`assignLayers_LongestPath`),p(vFe,`assignLayers_Gravity`),p(yFe,`topoSortByGenerationIfAcyclic`),p(bFe,`assignLayers_LaneAwareCompact`),p(xFe,`makeProperLayering`),p(vw,`median`),p(yw,`barycenter`),p(SFe,`neighborPositionsFor`),p(CFe,`currentOrderTieBreak`),p(bw,`countCrossingsBetweenAdjacent`),p(xw,`sortByHeuristic`),p(Sw,`reorderLayer`),p(Cw,`transposeImprove`),p(wFe,`orderLayers`),p(TFe,`assignCoordinates`),Zw=8,p(EFe,`hashString`),p(DFe,`mulberry32`),p(OFe,`deterministicShuffle`),p(kFe,`sourceDistance`),p(ww,`laneArrangementCost`),p(AFe,`buildWeightedLaneEdges`),p(Tw,`greedySwitch`),p(jFe,`isBetterCandidate`),p(MFe,`seedForRestart`),p(NFe,`optimizeTopLaneOrder`),p(PFe,`sugiyamaLayout`),Qw=KFe.EPSILON,qFe=8,$w=15,eT=15,tT=25,nT=20,rT=10,p(Ew,`chooseOrthogonalSide`),p(Dw,`sharedLineEndpointCoord`),p(Ow,`pointOnLine`),p(FFe,`routeEdgesOrthogonal`),p(IFe,`getSwimlaneDirection`),p(LFe,`runSwimlaneLayoutCore`),p(RFe,`prepareSwimlaneLayout`),JFe=lx({prepareLayout:RFe,runLayoutCore:LFe,afterPaint:_Pe})}));function iT(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function XFe(e){if(Array.isArray(e))return e}function ZFe(e){if(Array.isArray(e))return iT(e)}function aT(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}function QFe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,aIe(r.key),r)}}function oT(e,t,n){return t&&QFe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function sT(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=dT(e))||t){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.562-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}function $Fe(e,t,n){return(t=aIe(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function eIe(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function tIe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return s}}function nIe(){throw TypeError(`Invalid attempt to destructure non-iterable instance.563-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function rIe(){throw TypeError(`Invalid attempt to spread non-iterable instance.564-In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function cT(e,t){return XFe(e)||tIe(e,t)||dT(e,t)||nIe()}function lT(e){return ZFe(e)||eIe(e)||dT(e)||rIe()}function iIe(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return String(e)}function aIe(e){var t=iIe(e,`string`);return typeof t==`symbol`?t:t+``}function uT(e){"@babel/helpers - typeof";return uT=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},uT(e)}function dT(e,t){if(e){if(typeof e==`string`)return iT(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?iT(e,t):void 0}}function fT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function pT(){if(GRe)return ME;GRe=1;function e(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}return ME=e,ME}function oIe(){return KRe?NE:(KRe=1,NE=typeof jE==`object`&&jE&&jE.Object===Object&&jE,NE)}function mT(){if(qRe)return PE;qRe=1;var e=oIe(),t=typeof self==`object`&&self&&self.Object===Object&&self;return PE=e||t||Function(`return this`)(),PE}function sIe(){if(JRe)return FE;JRe=1;var e=mT();return FE=function(){return e.Date.now()},FE}function cIe(){if(YRe)return IE;YRe=1;var e=/\s/;function t(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}return IE=t,IE}function lIe(){if(XRe)return LE;XRe=1;var e=cIe(),t=/^\s+/;function n(n){return n&&n.slice(0,e(n)+1).replace(t,``)}return LE=n,LE}function hT(){return ZRe?RE:(ZRe=1,RE=mT().Symbol,RE)}function uIe(){if(QRe)return zE;QRe=1;var e=hT(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(e){var t=n.call(e,i),a=e[i];try{e[i]=void 0;var o=!0}catch{}var s=r.call(e);return o&&(t?e[i]=a:delete e[i]),s}return zE=a,zE}function dIe(){if($Re)return BE;$Re=1;var e=Object.prototype.toString;function t(t){return e.call(t)}return BE=t,BE}function fIe(){if(eze)return VE;eze=1;var e=hT(),t=uIe(),n=dIe(),r=`[object Null]`,i=`[object Undefined]`,a=e?e.toStringTag:void 0;function o(e){return e==null?e===void 0?i:r:a&&a in Object(e)?t(e):n(e)}return VE=o,VE}function pIe(){if(tze)return HE;tze=1;function e(e){return typeof e==`object`&&!!e}return HE=e,HE}function gT(){if(nze)return UE;nze=1;var e=fIe(),t=pIe(),n=`[object Symbol]`;function r(r){return typeof r==`symbol`||t(r)&&e(r)==n}return UE=r,UE}function mIe(){if(rze)return WE;rze=1;var e=lIe(),t=pT(),n=gT(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function l(l){if(typeof l==`number`)return l;if(n(l))return r;if(t(l)){var u=typeof l.valueOf==`function`?l.valueOf():l;l=t(u)?u+``:u}if(typeof l!=`string`)return l===0?l:+l;l=e(l);var d=a.test(l);return d||o.test(l)?s(l.slice(2),d?2:8):i.test(l)?r:+l}return WE=l,WE}function hIe(){if(ize)return GE;ize=1;var e=pT(),t=sIe(),n=mIe(),r=`Expected a function`,i=Math.max,a=Math.min;function o(o,s,l){var u,d,f,p,m,h,g=0,_=!1,v=!1,y=!0;if(typeof o!=`function`)throw TypeError(r);s=n(s)||0,e(l)&&(_=!!l.leading,v=`maxWait`in l,f=v?i(n(l.maxWait)||0,s):f,y=`trailing`in l?!!l.trailing:y);function b(e){var t=u,n=d;return u=d=void 0,g=e,p=o.apply(n,t),p}function x(e){return g=e,m=setTimeout(w,s),_?b(e):p}function S(e){var t=e-h,n=e-g,r=s-t;return v?a(r,f-n):r}function C(e){var t=e-h,n=e-g;return h===void 0||t>=s||t<0||v&&n>=f}function w(){var e=t();if(C(e))return T(e);m=setTimeout(w,S(e))}function T(e){return m=void 0,y&&u?b(e):(u=d=void 0,p)}function E(){m!==void 0&&clearTimeout(m),g=0,u=h=d=m=void 0}function D(){return m===void 0?p:T(t())}function O(){var e=t(),n=C(e);if(u=arguments,d=this,h=e,n){if(m===void 0)return x(h);if(v)return clearTimeout(m),m=setTimeout(w,s),b(h)}return m===void 0&&(m=setTimeout(w,s)),p}return O.cancel=E,O.flush=D,O}return GE=o,GE}function gIe(e,t,n,r,i){var a=i*Math.PI/180;return{x:Math.cos(a)*(e-n)-Math.sin(a)*(t-r)+n,y:Math.sin(a)*(e-n)+Math.cos(a)*(t-r)+r}}function _Ie(e,t,n){if(n===0)return e;var r=(t.x1+t.x2)/2,i=(t.y1+t.y2)/2,a=t.w/t.h,o=1/a,s=gIe(e.x,e.y,r,i,n),l=cze(s.x,s.y,r,i,a,o);return{x:l.x,y:l.y}}function vIe(){return vze?AD.exports:(vze=1,(function(e,t){(function(){var t,n,r=Math.floor,i,a,o,s,l,u,d=Math.min,f,p,m,h,g;n=function(e,t){return e<t?-1:+(e>t)},u=function(e,t,i,a,o){var s;if(i??=0,o??=n,i<0)throw Error(`lo must be non-negative`);for(a??=e.length;i<a;)s=r((i+a)/2),o(t,e[s])<0?a=s:i=s+1;return[].splice.apply(e,[i,i-i].concat(t)),t},o=function(e,t,r){return r??=n,e.push(t),h(e,0,e.length-1,r)},a=function(e,t){var r,i;return t??=n,r=e.pop(),e.length?(i=e[0],e[0]=r,g(e,0,t)):i=r,i},l=function(e,t,r){var i;return r??=n,i=e[0],e[0]=t,g(e,0,r),i},s=function(e,t,r){var i;return r??=n,e.length&&r(e[0],t)<0&&(i=[e[0],t],t=i[0],e[0]=i[1],g(e,0,r)),t},i=function(e,t){var i,a,o,s,l,u;for(t??=n,s=(function(){u=[];for(var t=0,n=r(e.length/2);0<=n?t<n:t>n;0<=n?t++:t--)u.push(t);return u}).apply(this).reverse(),l=[],a=0,o=s.length;a<o;a++)i=s[a],l.push(g(e,i,t));return l},m=function(e,t,r){var i;if(r??=n,i=e.indexOf(t),i!==-1)return h(e,0,i,r),g(e,i,r)},f=function(e,t,r){var a,o,l,u,d;if(r??=n,o=e.slice(0,t),!o.length)return o;for(i(o,r),d=e.slice(t),l=0,u=d.length;l<u;l++)a=d[l],s(o,a,r);return o.sort(r).reverse()},p=function(e,t,r){var o,s,l,f,p,m,h,g,_;if(r??=n,t*10<=e.length){if(l=e.slice(0,t).sort(r),!l.length)return l;for(s=l[l.length-1],h=e.slice(t),f=0,m=h.length;f<m;f++)o=h[f],r(o,s)<0&&(u(l,o,0,null,r),l.pop(),s=l[l.length-1]);return l}for(i(e,r),_=[],p=0,g=d(t,e.length);0<=g?p<g:p>g;0<=g?++p:--p)_.push(a(e,r));return _},h=function(e,t,r,i){var a,o,s;for(i??=n,a=e[r];r>t;){if(s=r-1>>1,o=e[s],i(a,o)<0){e[r]=o,r=s;continue}break}return e[r]=a},g=function(e,t,r){var i,a,o,s,l;for(r??=n,a=e.length,l=t,o=e[t],i=2*t+1;i<a;)s=i+1,s<a&&!(r(e[i],e[s])<0)&&(i=s),e[t]=e[i],t=i,i=2*t+1;return e[t]=o,h(e,l,t,r)},t=(function(){e.push=o,e.pop=a,e.replace=l,e.pushpop=s,e.heapify=i,e.updateItem=m,e.nlargest=f,e.nsmallest=p;function e(e){this.cmp=e??n,this.nodes=[]}return e.prototype.push=function(e){return o(this.nodes,e,this.cmp)},e.prototype.pop=function(){return a(this.nodes,this.cmp)},e.prototype.peek=function(){return this.nodes[0]},e.prototype.contains=function(e){return this.nodes.indexOf(e)!==-1},e.prototype.replace=function(e){return l(this.nodes,e,this.cmp)},e.prototype.pushpop=function(e){return s(this.nodes,e,this.cmp)},e.prototype.heapify=function(){return i(this.nodes,this.cmp)},e.prototype.updateItem=function(e){return m(this.nodes,e,this.cmp)},e.prototype.clear=function(){return this.nodes=[]},e.prototype.empty=function(){return this.nodes.length===0},e.prototype.size=function(){return this.nodes.length},e.prototype.clone=function(){var t=new e;return t.nodes=this.nodes.slice(0),t},e.prototype.toArray=function(){return this.nodes.slice(0)},e.prototype.insert=e.prototype.push,e.prototype.top=e.prototype.peek,e.prototype.front=e.prototype.peek,e.prototype.has=e.prototype.contains,e.prototype.copy=e.prototype.clone,e})(),(function(t,n){return e.exports=n()})(this,function(){return t})}).call(_ze)})(AD),AD.exports)}function yIe(){return yze?jD:(yze=1,jD=vIe(),jD)}function bIe(e,t){if(e.length<3)throw Error(`Need at least 3 vertices`);var n=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},r=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},i=function(e,t){return{x:e.x*t,y:e.y*t}},a=function(e,t){return e.x*t.y-e.y*t.x},o=function(e){var t=Wze(e.x,e.y);return t===0?{x:0,y:0}:{x:e.x/t,y:e.y/t}},s=function(e){for(var t=0,n=0;n<e.length;n++){var r=e[n],i=e[(n+1)%e.length];t+=r.x*i.y-i.x*r.y}return t/2},l=function(e,t,o,s){var l=r(t,e),u=r(s,o),d=a(l,u);return Math.abs(d)<1e-9?n(e,i(l,.5)):n(e,i(l,a(r(o,e),u)/d))},u=e.map(function(e){return{x:e.x,y:e.y}});s(u)<0&&u.reverse();for(var d=u.length,f=[],p=0;p<d;p++){var m=u[p],h=u[(p+1)%d],g=r(h,m),_=o({x:g.y,y:-g.x});f.push(_)}for(var v=f.map(function(e,r){return{p1:n(u[r],i(e,t)),p2:n(u[(r+1)%d],i(e,t))}}),y=[],b=0;b<d;b++){var x=v[(b-1+d)%d],S=v[b],C=l(x.p1,x.p2,S.p1,S.p2);y.push(C)}return y}function xIe(e,t,n,r,i,a){var o=bIe($ze(e,t,n,r,i),a),s=KD();return o.forEach(function(e){return qD(s,e.x,e.y)}),s}function _T(e,t){function n(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=e[(n+1)%e.length],a={x:i.x-r.x,y:i.y-r.y},o={x:-a.y,y:a.x},s=Math.sqrt(o.x*o.x+o.y*o.y);t.push({x:o.x/s,y:o.y/s})}return t}function r(e,t){var n=1/0,r=-1/0,i=sT(e),a;try{for(i.s();!(a=i.n()).done;){var o=a.value,s=o.x*t.x+o.y*t.y;n=Math.min(n,s),r=Math.max(r,s)}}catch(e){i.e(e)}finally{i.f()}return{min:n,max:r}}function i(e,t){return!(e.max<t.min||t.max<e.min)}var a=sT([].concat(lT(n(e)),lT(n(t)))),o;try{for(a.s();!(o=a.n()).done;){var s=o.value;if(!i(r(e,s),r(t,s)))return!1}}catch(e){a.e(e)}finally{a.f()}return!0}function vT(e,t,n,r,i,a){var o=sE(e)?e:AO[e]||AO.euclidean;return t===0&&sE(e)?o(i,a):o(t,n,r,i,a)}function yT(){return KBe?sk:(KBe=1,sk=Array.isArray,sk)}function SIe(){if(qBe)return ck;qBe=1;var e=yT(),t=gT(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(i,a){if(e(i))return!1;var o=typeof i;return o==`number`||o==`symbol`||o==`boolean`||i==null||t(i)?!0:r.test(i)||!n.test(i)||a!=null&&i in Object(a)}return ck=i,ck}function CIe(){if(JBe)return lk;JBe=1;var e=fIe(),t=pT(),n=`[object AsyncFunction]`,r=`[object Function]`,i=`[object GeneratorFunction]`,a=`[object Proxy]`;function o(o){if(!t(o))return!1;var s=e(o);return s==r||s==i||s==n||s==a}return lk=o,lk}function wIe(){return YBe?uk:(YBe=1,uk=mT()[`__core-js_shared__`],uk)}function TIe(){if(XBe)return dk;XBe=1;var e=wIe(),t=function(){var t=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||``);return t?`Symbol(src)_1.`+t:``}();function n(e){return!!t&&t in e}return dk=n,dk}function EIe(){if(ZBe)return fk;ZBe=1;var e=Function.prototype.toString;function t(t){if(t!=null){try{return e.call(t)}catch{}try{return t+``}catch{}}return``}return fk=t,fk}function DIe(){if(QBe)return pk;QBe=1;var e=CIe(),t=TIe(),n=pT(),r=EIe(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,l=o.toString,u=s.hasOwnProperty,d=RegExp(`^`+l.call(u).replace(i,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`);function f(i){return!n(i)||t(i)?!1:(e(i)?d:a).test(r(i))}return pk=f,pk}function OIe(){if($Be)return mk;$Be=1;function e(e,t){return e?.[t]}return mk=e,mk}function bT(){if(eVe)return hk;eVe=1;var e=DIe(),t=OIe();function n(n,r){var i=t(n,r);return e(i)?i:void 0}return hk=n,hk}function xT(){return tVe?gk:(tVe=1,gk=bT()(Object,`create`),gk)}function kIe(){if(nVe)return _k;nVe=1;var e=xT();function t(){this.__data__=e?e(null):{},this.size=0}return _k=t,_k}function AIe(){if(rVe)return vk;rVe=1;function e(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}return vk=e,vk}function jIe(){if(iVe)return yk;iVe=1;var e=xT(),t=`__lodash_hash_undefined__`,n=Object.prototype.hasOwnProperty;function r(r){var i=this.__data__;if(e){var a=i[r];return a===t?void 0:a}return n.call(i,r)?i[r]:void 0}return yk=r,yk}function MIe(){if(aVe)return bk;aVe=1;var e=xT(),t=Object.prototype.hasOwnProperty;function n(n){var r=this.__data__;return e?r[n]!==void 0:t.call(r,n)}return bk=n,bk}function NIe(){if(oVe)return xk;oVe=1;var e=xT(),t=`__lodash_hash_undefined__`;function n(n,r){var i=this.__data__;return this.size+=+!this.has(n),i[n]=e&&r===void 0?t:r,this}return xk=n,xk}function PIe(){if(sVe)return Sk;sVe=1;var e=kIe(),t=AIe(),n=jIe(),r=MIe(),i=NIe();function a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Sk=a,Sk}function FIe(){if(cVe)return Ck;cVe=1;function e(){this.__data__=[],this.size=0}return Ck=e,Ck}function IIe(){if(lVe)return wk;lVe=1;function e(e,t){return e===t||e!==e&&t!==t}return wk=e,wk}function ST(){if(uVe)return Tk;uVe=1;var e=IIe();function t(t,n){for(var r=t.length;r--;)if(e(t[r][0],n))return r;return-1}return Tk=t,Tk}function LIe(){if(dVe)return Ek;dVe=1;var e=ST(),t=Array.prototype.splice;function n(n){var r=this.__data__,i=e(r,n);return i<0?!1:(i==r.length-1?r.pop():t.call(r,i,1),--this.size,!0)}return Ek=n,Ek}function RIe(){if(fVe)return Dk;fVe=1;var e=ST();function t(t){var n=this.__data__,r=e(n,t);return r<0?void 0:n[r][1]}return Dk=t,Dk}function zIe(){if(pVe)return Ok;pVe=1;var e=ST();function t(t){return e(this.__data__,t)>-1}return Ok=t,Ok}function BIe(){if(mVe)return kk;mVe=1;var e=ST();function t(t,n){var r=this.__data__,i=e(r,t);return i<0?(++this.size,r.push([t,n])):r[i][1]=n,this}return kk=t,kk}function VIe(){if(hVe)return Ak;hVe=1;var e=FIe(),t=LIe(),n=RIe(),r=zIe(),i=BIe();function a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Ak=a,Ak}function HIe(){return gVe?jk:(gVe=1,jk=bT()(mT(),`Map`),jk)}function UIe(){if(_Ve)return Mk;_Ve=1;var e=PIe(),t=VIe(),n=HIe();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Mk=r,Mk}function WIe(){if(vVe)return Nk;vVe=1;function e(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}return Nk=e,Nk}function CT(){if(yVe)return Pk;yVe=1;var e=WIe();function t(t,n){var r=t.__data__;return e(n)?r[typeof n==`string`?`string`:`hash`]:r.map}return Pk=t,Pk}function GIe(){if(bVe)return Fk;bVe=1;var e=CT();function t(t){var n=e(this,t).delete(t);return this.size-=+!!n,n}return Fk=t,Fk}function KIe(){if(xVe)return Ik;xVe=1;var e=CT();function t(t){return e(this,t).get(t)}return Ik=t,Ik}function qIe(){if(SVe)return Lk;SVe=1;var e=CT();function t(t){return e(this,t).has(t)}return Lk=t,Lk}function JIe(){if(CVe)return Rk;CVe=1;var e=CT();function t(t,n){var r=e(this,t),i=r.size;return r.set(t,n),this.size+=r.size==i?0:1,this}return Rk=t,Rk}function YIe(){if(wVe)return zk;wVe=1;var e=UIe(),t=GIe(),n=KIe(),r=qIe(),i=JIe();function a(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,zk=a,zk}function XIe(){if(TVe)return Bk;TVe=1;var e=YIe(),t=`Expected a function`;function n(r,i){if(typeof r!=`function`||i!=null&&typeof i!=`function`)throw TypeError(t);var a=function(){var e=arguments,t=i?i.apply(this,e):e[0],n=a.cache;if(n.has(t))return n.get(t);var o=r.apply(this,e);return a.cache=n.set(t,o)||n,o};return a.cache=new(n.Cache||e),a}return n.Cache=e,Bk=n,Bk}function ZIe(){if(EVe)return Vk;EVe=1;var e=XIe(),t=500;function n(n){var r=e(n,function(e){return i.size===t&&i.clear(),e}),i=r.cache;return r}return Vk=n,Vk}function QIe(){if(DVe)return Hk;DVe=1;var e=ZIe(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g;return Hk=e(function(e){var r=[];return e.charCodeAt(0)===46&&r.push(``),e.replace(t,function(e,t,i,a){r.push(i?a.replace(n,`$1`):t||e)}),r}),Hk}function $Ie(){if(OVe)return Uk;OVe=1;function e(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}return Uk=e,Uk}function eLe(){if(kVe)return Wk;kVe=1;var e=hT(),t=$Ie(),n=yT(),r=gT(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(e){if(typeof e==`string`)return e;if(n(e))return t(e,o)+``;if(r(e))return a?a.call(e):``;var i=e+``;return i==`0`&&1/e==-1/0?`-0`:i}return Wk=o,Wk}function tLe(){if(AVe)return Gk;AVe=1;var e=eLe();function t(t){return t==null?``:e(t)}return Gk=t,Gk}function nLe(){if(jVe)return Kk;jVe=1;var e=yT(),t=SIe(),n=QIe(),r=tLe();function i(i,a){return e(i)?i:t(i,a)?[i]:n(r(i))}return Kk=i,Kk}function wT(){if(MVe)return qk;MVe=1;var e=gT();function t(t){if(typeof t==`string`||e(t))return t;var n=t+``;return n==`0`&&1/t==-1/0?`-0`:n}return qk=t,qk}function rLe(){if(NVe)return Jk;NVe=1;var e=nLe(),t=wT();function n(n,r){r=e(r,n);for(var i=0,a=r.length;n!=null&&i<a;)n=n[t(r[i++])];return i&&i==a?n:void 0}return Jk=n,Jk}function iLe(){if(PVe)return Yk;PVe=1;var e=rLe();function t(t,n,r){var i=t==null?void 0:e(t,n);return i===void 0?r:i}return Yk=t,Yk}function aLe(){if(IVe)return Xk;IVe=1;var e=bT();return Xk=function(){try{var t=e(Object,`defineProperty`);return t({},``,{}),t}catch{}}(),Xk}function oLe(){if(LVe)return Zk;LVe=1;var e=aLe();function t(t,n,r){n==`__proto__`&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}return Zk=t,Zk}function sLe(){if(RVe)return Qk;RVe=1;var e=oLe(),t=IIe(),n=Object.prototype.hasOwnProperty;function r(r,i,a){var o=r[i];(!(n.call(r,i)&&t(o,a))||a===void 0&&!(i in r))&&e(r,i,a)}return Qk=r,Qk}function cLe(){if(zVe)return $k;zVe=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(n,r){var i=typeof n;return r??=e,!!r&&(i==`number`||i!=`symbol`&&t.test(n))&&n>-1&&n%1==0&&n<r}return $k=n,$k}function lLe(){if(BVe)return eA;BVe=1;var e=sLe(),t=nLe(),n=cLe(),r=pT(),i=wT();function a(a,o,s,l){if(!r(a))return a;o=t(o,a);for(var u=-1,d=o.length,f=d-1,p=a;p!=null&&++u<d;){var m=i(o[u]),h=s;if(m===`__proto__`||m===`constructor`||m===`prototype`)return a;if(u!=f){var g=p[m];h=l?l(g,m,p):void 0,h===void 0&&(h=r(g)?g:n(o[u+1])?[]:{})}e(p,m,h),p=p[m]}return a}return eA=a,eA}function uLe(){if(VVe)return tA;VVe=1;var e=lLe();function t(t,n,r){return t==null?t:e(t,n,r)}return tA=t,tA}function dLe(){if(UVe)return nA;UVe=1;function e(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}return nA=e,nA}function fLe(){if(WVe)return rA;WVe=1;var e=$Ie(),t=dLe(),n=yT(),r=gT(),i=QIe(),a=wT(),o=tLe();function s(s){return n(s)?e(s,a):r(s)?[s]:t(i(o(s)))}return rA=s,rA}function TT(e,t,n,r){for(var i=[],a=new ED,o=e.cy().hasCompoundNodes(),s=0;s<e.length;s++){var l=e[s];n?i.push(l):o&&r(i,a,l)}for(;i.length>0;){var u=i.shift();t(u),a.add(u.id()),o&&r(i,a,u)}return e}function pLe(e,t,n){if(n.isParent())for(var r=n._private.children,i=0;i<r.length;i++){var a=r[i];t.has(a.id())||e.push(a)}}function mLe(e,t,n){if(n.isChild()){var r=n._private.parent;t.has(r.id())||e.push(r)}}function hLe(e,t,n){mLe(e,t,n),pLe(e,t,n)}function ET(e){return function(t){var n=this;if(t===void 0&&(t=!0),n.length!==0&&n.isNode()&&!n.removed()){for(var r=0,i=n[0],a=i._private.edges,o=0;o<a.length;o++){var s=a[o];!t&&s.isLoop()||(r+=e(i,s))}return r}}}function DT(e,t){return function(n){for(var r,i=this.nodes(),a=0;a<i.length;a++){var o=i[a][e](n);o!==void 0&&(r===void 0||t(o,r))&&(r=o)}return r}}function OT(){return!1}function kT(){return!0}function AT(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:bHe,t=arguments.length>1?arguments[1]:void 0,n=0;n<QA.length;n++){var r=QA[n];this[r]=e[r]||ZA[r]}this.context=t||this.context,this.listeners=[],this.emitting=0}function gLe(e,t,n){var r=n._private,i=r.styleCache=r.styleCache||[],a;return(a=i[e])??(a=i[e]=t(n)),a}function jT(e,t){return e=oD(e),function(n){return gLe(e,t,n)}}function MT(e,t){e=oD(e);var n=function(e){return t.call(e)};return function(){var t=this[0];if(t)return gLe(e,n,t)}}function NT(e,t){var n=e._private.data.parent?e.parents():null;if(n)for(var r=0;r<n.length;r++){var i=n[r];if(!t(i))return!1}return!0}function PT(e){var t=e.ok,n=e.edgeOkViaNode||e.ok,r=e.parentOk||e.ok;return function(){var e=this.cy();if(!e.styleEnabled())return!0;var i=this[0],a=e.hasCompoundNodes();if(i){var o=i._private;if(!t(i))return!1;if(i.isNode())return!a||NT(i,r);var s=o.source,l=o.target;return n(s)&&(!a||NT(s,n))&&(s===l||n(l)&&(!a||NT(l,n)))}}}function _Le(e){return function(){var t=arguments,n=[];if(t.length===2){var r=t[0],i=t[1];this.on(e.event,r,i)}else if(t.length===1&&sE(t[0])){var a=t[0];this.on(e.event,a)}else if(t.length===0||t.length===1&&cE(t[0])){for(var o=t.length===1?t[0]:null,s=0;s<this.length;s++){var l=this[s],u=!e.ableField||l._private[e.ableField],d=l._private[e.field]!=e.value;if(e.overrideAble){var f=e.overrideAble(l);if(f!==void 0&&(u=f,!f))return this}u&&(l._private[e.field]=e.value,d&&n.push(l))}var p=this.spawn(n);p.updateStyle(),p.emit(e.event),o&&p.emit(o)}return this}}function FT(e){dj[e.field]=function(){var t=this[0];if(t){if(e.overrideField){var n=e.overrideField(t);if(n!==void 0)return n}return t._private[e.field]}},dj[e.on]=_Le({event:e.on,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!0}),dj[e.off]=_Le({event:e.off,field:e.field,ableField:e.ableField,overrideAble:e.overrideAble,value:!1})}function vLe(e){return function(t){for(var n=[],r=0;r<this.length;r++){var i=this[r]._private[e.attr];i&&n.push(i)}return this.spawn(n,!0).filter(t)}}function yLe(e){return function(t){var n=[],r=this._private.cy,i=e||{};oE(t)&&(t=r.$(t));for(var a=0;a<t.length;a++)for(var o=t[a]._private.edges,s=0;s<o.length;s++){var l=o[s],u=l._private.data,d=this.hasElementWithId(u.source)&&t.hasElementWithId(u.target),f=t.hasElementWithId(u.source)&&this.hasElementWithId(u.target);(d||f)&&((i.thisIsSrc||i.thisIsTgt)&&(i.thisIsSrc&&!d||i.thisIsTgt&&!f)||n.push(l))}return this.spawn(n,!0)}}function bLe(e){return e=DE({},{codirected:!1},e),function(t){for(var n=[],r=this.edges(),i=e,a=0;a<r.length;a++)for(var o=r[a]._private,s=o.source,l=s._private.data.id,u=o.data.target,d=s._private.edges,f=0;f<d.length;f++){var p=d[f],m=p._private.data,h=m.target,g=m.source,_=h===u&&g===l,v=l===h&&u===g;(i.codirected&&_||!i.codirected&&(_||v))&&n.push(p)}return this.spawn(n,!0).filter(t)}}function xLe(e,t,n,r){var i=11,a=1/(i-1),o=typeof Float32Array<`u`;if(arguments.length!==4)return!1;for(var s=0;s<4;++s)if(typeof arguments[s]!=`number`||isNaN(arguments[s])||!isFinite(arguments[s]))return!1;e=Math.min(e,1),n=Math.min(n,1),e=Math.max(e,0),n=Math.max(n,0);var l=o?new Float32Array(i):Array(i);function u(e,t){return 1-3*t+3*e}function d(e,t){return 3*t-6*e}function f(e){return 3*e}function p(e,t,n){return((u(t,n)*e+d(t,n))*e+f(t))*e}function m(e,t,n){return 3*u(t,n)*e*e+2*d(t,n)*e+f(t)}function h(t,r){for(var i=0;i<4;++i){var a=m(r,e,n);if(a===0)return r;var o=p(r,e,n)-t;r-=o/a}return r}function g(){for(var t=0;t<i;++t)l[t]=p(t*a,e,n)}function _(t,r,i){var a,o,s=0;do o=r+(i-r)/2,a=p(o,e,n)-t,a>0?i=o:r=o;while(Math.abs(a)>1e-7&&++s<10);return o}function v(t){for(var r=0,o=1,s=i-1;o!==s&&l[o]<=t;++o)r+=a;--o;var u=(t-l[o])/(l[o+1]-l[o]),d=r+u*a,f=m(d,e,n);return f>=.001?h(t,d):f===0?d:_(t,r,r+a)}var y=!1;function b(){y=!0,(e!==t||n!==r)&&g()}var x=function(i){return y||b(),e===t&&n===r?i:i===0?0:i===1?1:p(v(i),t,r)};x.getControlPoints=function(){return[{x:e,y:t},{x:n,y:r}]};var S=`generateBezier(`+[e,t,n,r]+`)`;return x.toString=function(){return S},x}function SLe(e,t,n,r,i){if(r===1||t===n)return n;var a=i(t,n,r);return e==null?a:((e.roundValue||e.color)&&(a=Math.round(a)),e.min!==void 0&&(a=Math.max(a,e.min)),e.max!==void 0&&(a=Math.min(a,e.max)),a)}function CLe(e,t){return e.pfValue!=null||e.value!=null?e.pfValue!=null&&(t==null||t.type.units!==`%`)?e.pfValue:e.value:e}function IT(e,t,n,r,i){var a=i==null?null:i.type;n<0?n=0:n>1&&(n=1);var o=CLe(e,i),s=CLe(t,i);if(uE(o)&&uE(s))return SLe(a,o,s,n,r);if(cE(o)&&cE(s)){for(var l=[],u=0;u<s.length;u++){var d=o[u],f=s[u];if(d!=null&&f!=null){var p=SLe(a,d,f,n,r);l.push(p)}else l.push(f)}return l}}function wLe(e,t,n,r){var i=!r,a=e._private,o=t._private,s=o.easing,l=o.startTime,u=(r?e:e.cy()).style();if(!o.easingImpl){if(s==null)o.easingImpl=yj.linear;else{var d=oE(s)?u.parse(`transition-timing-function`,s).value:s,f,p;oE(d)?(f=d,p=[]):(f=d[1],p=d.slice(2).map(function(e){return+e})),p.length>0?(f===`spring`&&p.push(o.duration),o.easingImpl=yj[f].apply(null,p)):o.easingImpl=yj[f]}}var m=o.easingImpl,h=o.duration===0?1:(n-l)/o.duration;if(o.applying&&(h=o.progress),h<0?h=0:h>1&&(h=1),o.delay==null){var g=o.startPosition,_=o.position;if(_&&i&&!e.locked()){var v={};LT(g.x,_.x)&&(v.x=IT(g.x,_.x,h,m)),LT(g.y,_.y)&&(v.y=IT(g.y,_.y,h,m)),e.position(v)}var y=o.startPan,b=o.pan,x=a.pan,S=b!=null&&r;S&&(LT(y.x,b.x)&&(x.x=IT(y.x,b.x,h,m)),LT(y.y,b.y)&&(x.y=IT(y.y,b.y,h,m)),e.emit(`pan`));var C=o.startZoom,w=o.zoom,T=w!=null&&r;T&&(LT(C,w)&&(a.zoom=GD(a.minZoom,IT(C,w,h,m),a.maxZoom)),e.emit(`zoom`)),(S||T)&&e.emit(`viewport`);var E=o.style;if(E&&E.length>0&&i){for(var D=0;D<E.length;D++){var O=E[D],k=O.name,A=O,j=o.startStyle[k],M=u.properties[j.name],N=IT(j,A,h,m,M);u.overrideBypass(e,k,N)}e.emit(`style`)}}return o.progress=h,h}function LT(e,t){return e==null||t==null?!1:uE(e)&&uE(t)?!0:!!(e&&t)}function TLe(e,t,n,r){var i=t._private;i.started=!0,i.startTime=n-i.progress*i.duration}function ELe(e,t){var n=t._private.aniEles,r=[];function i(t,n){var i=t._private,a=i.animation.current,o=i.animation.queue,s=!1;if(a.length===0){var l=o.shift();l&&a.push(l)}for(var u=function(e){for(var t=e.length-1;t>=0;t--){var n=e[t];n()}e.splice(0,e.length)},d=a.length-1;d>=0;d--){var f=a[d],p=f._private;if(p.stopped){a.splice(d,1),p.hooked=!1,p.playing=!1,p.started=!1,u(p.frames);continue}!p.playing&&!p.applying||(p.playing&&p.applying&&(p.applying=!1),p.started||TLe(t,f,e),wLe(t,f,e,n),p.applying&&=!1,u(p.frames),p.step!=null&&p.step(e),f.completed()&&(a.splice(d,1),p.hooked=!1,p.playing=!1,p.started=!1,u(p.completes)),s=!0)}return!n&&a.length===0&&o.length===0&&r.push(t),s}for(var a=!1,o=0;o<n.length;o++){var s=n[o],l=i(s);a||=l}var u=i(t,!0);(a||u)&&(n.length>0?t.notify(`draw`,n):t.notify(`draw`)),n.unmerge(r),t.emit(`step`)}function DLe(e){this.options=DE({},PHe,FHe,e)}function OLe(e){this.options=DE({},IHe,e)}function kLe(e){this.options=DE({},LHe,e)}function RT(e){this.options=DE({},zHe,e),this.options.layout=this;var t=this.options.eles.nodes(),n=this.options.eles.edges().filter(function(e){var n=e.source().data(`id`),r=e.target().data(`id`),i=t.some(function(e){return e.data(`id`)===n}),a=t.some(function(e){return e.data(`id`)===r});return!i||!a});this.options.eles=this.options.eles.not(n)}function ALe(e){this.options=DE({},eUe,e)}function zT(e){this.options=DE({},tUe,e)}function jLe(e){this.options=DE({},nUe,e)}function MLe(e){this.options=DE({},rUe,e)}function NLe(e){this.options=e,this.notifications=0}function PLe(e,t){t.radius===0?e.lineTo(t.cx,t.cy):e.arc(t.cx,t.cy,t.radius,t.startAngle,t.endAngle,t.counterClockwise)}function BT(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;return r===0||t.radius===0?{cx:t.x,cy:t.y,radius:0,startX:t.x,startY:t.y,stopX:t.x,stopY:t.y,startAngle:void 0,endAngle:void 0,counterClockwise:void 0}:(dUe(e,t,n,r,i),{cx:eM,cy:tM,radius:cM,startX:sUe,startY:cUe,stopX:fM,stopY:pM,startAngle:nM.ang+Math.PI/2*iM,endAngle:rM.ang-Math.PI/2*iM,counterClockwise:aM})}function FLe(e){var t=[];if(e!=null){for(var n=0;n<e.length;n+=2){var r=e[n],i=e[n+1];t.push({x:r,y:i})}return t}}function ILe(e,t,n){for(var r=function(e,t,n,r){return UD(e,t,n,r)},i=t._private.rstyle.bezierPts,a=0;a<e.bezierProjPcts.length;a++){var o=e.bezierProjPcts[a];i.push({x:r(n[0],n[2],n[4],o),y:r(n[1],n[3],n[5],o)})}}function LLe(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.lineTo(r.x,r.y)}}function RLe(e,t,n){for(var r,i=0;i<t.length;i++){var a=t[i];i===0&&(r=a),e.lineTo(a.x,a.y)}e.quadraticCurveTo(n.x,n.y,r.x,r.y)}function zLe(e,t,n){e.beginPath&&e.beginPath();for(var r=t,i=0;i<r.length;i++){var a=r[i];e.lineTo(a.x,a.y)}var o=n,s=n[0];e.moveTo(s.x,s.y);for(var i=1;i<o.length;i++){var a=o[i];e.lineTo(a.x,a.y)}e.closePath&&e.closePath()}function BLe(e,t,n,r,i){e.beginPath&&e.beginPath(),e.arc(n,r,i,0,Math.PI*2,!1);var a=t,o=a[0];e.moveTo(o.x,o.y);for(var s=0;s<a.length;s++){var l=a[s];e.lineTo(l.x,l.y)}e.closePath&&e.closePath()}function VLe(e,t,n,r){e.arc(t,n,r,0,Math.PI*2,!1)}function HLe(e,t,n,r,i){var a=Math.min(r,i)/2,o=t+r/2,s=n+i/2;e.beginPath(),e.arc(o,s,a,0,Math.PI*2),e.closePath()}function ULe(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:5,o=Math.min(a,r/2,i/2);e.beginPath(),e.moveTo(t+o,n),e.lineTo(t+r-o,n),e.quadraticCurveTo(t+r,n,t+r,n+o),e.lineTo(t+r,n+i-o),e.quadraticCurveTo(t+r,n+i,t+r-o,n+i),e.lineTo(t+o,n+i),e.quadraticCurveTo(t,n+i,t,n+i-o),e.lineTo(t,n+o),e.quadraticCurveTo(t,n,t+o,n),e.closePath()}function WLe(e,t,n){var r=e.createShader(t);if(e.shaderSource(r,n),e.compileShader(r),!e.getShaderParameter(r,e.COMPILE_STATUS))throw Error(e.getShaderInfoLog(r));return r}function GLe(e,t,n){var r=WLe(e,e.VERTEX_SHADER,t),i=WLe(e,e.FRAGMENT_SHADER,n),a=e.createProgram();if(e.attachShader(a,r),e.attachShader(a,i),e.linkProgram(a),!e.getProgramParameter(a,e.LINK_STATUS))throw Error(`Could not initialize shaders`);return a}function KLe(e,t,n){n===void 0&&(n=t);var r=e.makeOffscreenCanvas(t,n),i=r.context=r.getContext(`2d`);return r.clear=function(){return i.clearRect(0,0,r.width,r.height)},r.clear(),r}function VT(e){var t=e.pixelRatio,n=e.cy.zoom(),r=e.cy.pan();return{zoom:n*t,pan:{x:r.x*t,y:r.y*t}}}function qLe(e){var t=e.pixelRatio;return e.cy.zoom()*t}function JLe(e,t,n,r,i){var a=r*n+t.x,o=i*n+t.y;return o=Math.round(e.canvasHeight-o),[a,o]}function YLe(e,t){return t.picking?!0:e.pstyle(`background-fill`).value!==`solid`||e.pstyle(`background-image`).strValue!==`none`?!1:e.pstyle(`border-width`).value===0||e.pstyle(`border-opacity`).value===0||e.pstyle(`border-style`).value===`solid`}function XLe(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function HT(e,t,n){var r=e[0]/255,i=e[1]/255,a=e[2]/255,o=t,s=n||[,,,,];return s[0]=r*o,s[1]=i*o,s[2]=a*o,s[3]=o,s}function UT(e,t){var n=t||[,,,,];return n[0]=(e>>0&255)/255,n[1]=(e>>8&255)/255,n[2]=(e>>16&255)/255,n[3]=(e>>24&255)/255,n}function ZLe(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function QLe(e,t){var n=e.createTexture();return n.buffer=function(t){e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},n.deleteTexture=function(){e.deleteTexture(n)},n}function $Le(e,t){switch(t){case`float`:return[1,e.FLOAT,4];case`vec2`:return[2,e.FLOAT,4];case`vec3`:return[3,e.FLOAT,4];case`vec4`:return[4,e.FLOAT,4];case`int`:return[1,e.INT,4];case`ivec2`:return[2,e.INT,4]}}function eRe(e,t,n){switch(t){case e.FLOAT:return new Float32Array(n);case e.INT:return new Int32Array(n)}}function tRe(e,t,n,r,i,a){switch(t){case e.FLOAT:return new Float32Array(n.buffer,a*r,i);case e.INT:return new Int32Array(n.buffer,a*r,i)}}function nRe(e,t,n,r){var i=cT($Le(e,t),2),a=i[0],o=i[1],s=eRe(e,o,r),l=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,s,e.STATIC_DRAW),o===e.FLOAT?e.vertexAttribPointer(n,a,o,!1,0,0):o===e.INT&&e.vertexAttribIPointer(n,a,o,0,0),e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,null),l}function WT(e,t,n,r){var i=cT($Le(e,n),3),a=i[0],o=i[1],s=i[2],l=eRe(e,o,t*a),u=a*s,d=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,d),e.bufferData(e.ARRAY_BUFFER,t*u,e.DYNAMIC_DRAW),e.enableVertexAttribArray(r),o===e.FLOAT?e.vertexAttribPointer(r,a,o,!1,u,0):o===e.INT&&e.vertexAttribIPointer(r,a,o,u,0),e.vertexAttribDivisor(r,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var f=Array(t),p=0;p<t;p++)f[p]=tRe(e,o,l,u,a,p);return d.dataArray=l,d.stride=u,d.size=a,d.getView=function(e){return f[e]},d.setPoint=function(e,t,n){var r=f[e];r[0]=t,r[1]=n},d.bufferSubData=function(t){e.bindBuffer(e.ARRAY_BUFFER,d),t?e.bufferSubData(e.ARRAY_BUFFER,0,l,0,t*a):e.bufferSubData(e.ARRAY_BUFFER,0,l)},d}function rRe(e,t,n){for(var r=9,i=new Float32Array(t*r),a=Array(t),o=0;o<t;o++){var s=o*r*4;a[o]=new Float32Array(i.buffer,s,r)}var l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,i.byteLength,e.DYNAMIC_DRAW);for(var u=0;u<3;u++){var d=n+u;e.enableVertexAttribArray(d),e.vertexAttribPointer(d,3,e.FLOAT,!1,36,u*12),e.vertexAttribDivisor(d,1)}return e.bindBuffer(e.ARRAY_BUFFER,null),l.getMatrixView=function(e){return a[e]},l.setData=function(e,t){a[t].set(e,0)},l.bufferSubData=function(){e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferSubData(e.ARRAY_BUFFER,0,i)},l}function iRe(e){var t=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,t);var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,n,0),e.bindFramebuffer(e.FRAMEBUFFER,null),t.setFramebufferAttachmentSizes=function(t,r){e.bindTexture(e.TEXTURE_2D,n),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t,r,0,e.RGBA,e.UNSIGNED_BYTE,null)},t}function GT(){var e=new lN(9);return lN!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function KT(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function aRe(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],d=t[7],f=t[8],p=n[0],m=n[1],h=n[2],g=n[3],_=n[4],v=n[5],y=n[6],b=n[7],x=n[8];return e[0]=p*r+m*o+h*u,e[1]=p*i+m*s+h*d,e[2]=p*a+m*l+h*f,e[3]=g*r+_*o+v*u,e[4]=g*i+_*s+v*d,e[5]=g*a+_*l+v*f,e[6]=y*r+b*o+x*u,e[7]=y*i+b*s+x*d,e[8]=y*a+b*l+x*f,e}function qT(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],d=t[7],f=t[8],p=n[0],m=n[1];return e[0]=r,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=p*r+m*o+u,e[7]=p*i+m*s+d,e[8]=p*a+m*l+f,e}function JT(e,t,n){var r=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],u=t[6],d=t[7],f=t[8],p=Math.sin(n),m=Math.cos(n);return e[0]=m*r+p*o,e[1]=m*i+p*s,e[2]=m*a+p*l,e[3]=m*o-p*r,e[4]=m*s-p*i,e[5]=m*l-p*a,e[6]=u,e[7]=d,e[8]=f,e}function YT(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function oRe(e,t,n){return e[0]=2/t,e[1]=0,e[2]=0,e[3]=0,e[4]=-2/n,e[5]=0,e[6]=-1,e[7]=1,e[8]=1,e}function sRe(e,t){return e.intersection?e.intersection(t):new Set(lT(e).filter(function(e){return t.has(e)}))}function cRe(e){var t=e.cy.container();return OE(t&&t.style&&t.style.backgroundColor||`white`)}function XT(e,t){var n=e._private.rscratch;return CD(n,`labelWrapCachedLines`,t)||[]}function lRe(e){var t=e.render;e.render=function(n){n||={};var r=e.cy;e.webgl&&(r.zoom()>VM?(uRe(e),t.call(e,n)):(dRe(e),$T(e,n,uN.SCREEN)))};var n=e.matchCanvasSize;e.matchCanvasSize=function(t){n.call(e,t),e.pickingFrameBuffer.setFramebufferAttachmentSizes(e.canvasWidth,e.canvasHeight),e.pickingFrameBuffer.needsDraw=!0},e.findNearestElements=function(t,n,r,i){return _Re(e,t,n)};var r=e.invalidateCachedZSortedEles;e.invalidateCachedZSortedEles=function(){r.call(e),e.pickingFrameBuffer.needsDraw=!0};var i=e.notify;e.notify=function(t,n){i.call(e,t,n),t===`viewport`||t===`bounds`?e.pickingFrameBuffer.needsDraw=!0:t===`background`&&e.drawing.invalidate(n,{type:`node-body`})}}function uRe(e){var t=e.data.contexts[e.WEBGL];t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT)}function dRe(e){var t=function(t){t.save(),t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,e.canvasWidth,e.canvasHeight),t.restore()};t(e.data.contexts[e.NODE]),t(e.data.contexts[e.DRAG])}function fRe(e){var t=e.canvasWidth,n=e.canvasHeight,r=VT(e),i=r.pan,a=r.zoom,o=GT();qT(o,o,[i.x,i.y]),YT(o,o,[a,a]);var s=GT();oRe(s,t,n);var l=GT();return aRe(l,s,o),l}function ZT(e,t){var n=e.canvasWidth,r=e.canvasHeight,i=VT(e),a=i.pan,o=i.zoom;t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,n,r),t.translate(a.x,a.y),t.scale(o,o)}function pRe(e,t){e.drawSelectionRectangle(t,function(t){return ZT(e,t)})}function mRe(e){var t=e.data.contexts[e.NODE];t.save(),ZT(e,t),t.strokeStyle=`rgba(0, 0, 0, 0.3)`,t.beginPath(),t.moveTo(-1e3,0),t.lineTo(1e3,0),t.stroke(),t.beginPath(),t.moveTo(0,-1e3),t.lineTo(0,1e3),t.stroke(),t.restore()}function hRe(e){var t=function(t,n,r){for(var i=t.atlasManager.getAtlasCollection(n),a=e.data.contexts[e.NODE],o=i.atlases,s=0;s<o.length;s++){var l=o[s].canvas;if(l){var u=l.width,d=l.height,f=u*s,p=l.height*r,m=.4;a.save(),a.scale(m,m),a.drawImage(l,f,p),a.strokeStyle=`black`,a.rect(f,p,u,d),a.stroke(),a.restore()}}},n=0;t(e.drawing,`node`,n++),t(e.drawing,`label`,n++)}function gRe(e,t,n,r,i){var a,o,s,l,u=VT(e),d=u.pan,f=u.zoom,p=cT(JLe(e,d,f,t,n),2),m=p[0],h=p[1],g=6;if(a=m-g/2,o=h-g/2,s=g,l=g,s===0||l===0)return[];var _=e.data.contexts[e.WEBGL];_.bindFramebuffer(_.FRAMEBUFFER,e.pickingFrameBuffer),e.pickingFrameBuffer.needsDraw&&(_.viewport(0,0,_.canvas.width,_.canvas.height),$T(e,null,uN.PICKING),e.pickingFrameBuffer.needsDraw=!1);var v=s*l,y=new Uint8Array(v*4);_.readPixels(a,o,s,l,_.RGBA,_.UNSIGNED_BYTE,y),_.bindFramebuffer(_.FRAMEBUFFER,null);for(var b=new Set,x=0;x<v;x++){var S=ZLe(y.slice(x*4,x*4+4))-1;S>=0&&b.add(S)}return b}function _Re(e,t,n){var r=gRe(e,t,n),i=e.getCachedZSortedEles(),a,o,s=sT(r),l;try{for(s.s();!(l=s.n()).done;){var u=i[l.value];if(!a&&u.isNode()&&(a=u),!o&&u.isEdge()&&(o=u),a&&o)break}}catch(e){s.e(e)}finally{s.f()}return[a,o].filter(Boolean)}function QT(e,t,n){var r=e.drawing;t+=1,n.isNode()?(r.drawNode(n,t,`node-underlay`),r.drawNode(n,t,`node-body`),r.drawTexture(n,t,`label`),r.drawNode(n,t,`node-overlay`)):(r.drawEdgeLine(n,t),r.drawEdgeArrow(n,t,`source`),r.drawEdgeArrow(n,t,`target`),r.drawTexture(n,t,`label`),r.drawTexture(n,t,`edge-source-label`),r.drawTexture(n,t,`edge-target-label`))}function $T(e,t,n){var r;e.webglDebug&&(r=performance.now());var i=e.drawing,a=0;if(n.screen&&e.data.canvasNeedsRedraw[e.SELECT_BOX]&&pRe(e,t),e.data.canvasNeedsRedraw[e.NODE]||n.picking){var o=e.data.contexts[e.WEBGL];n.screen?(o.clearColor(0,0,0,0),o.enable(o.BLEND),o.blendFunc(o.ONE,o.ONE_MINUS_SRC_ALPHA)):o.disable(o.BLEND),o.clear(o.COLOR_BUFFER_BIT|o.DEPTH_BUFFER_BIT),o.viewport(0,0,o.canvas.width,o.canvas.height);var s=fRe(e),l=e.getCachedZSortedEles();if(a=l.length,i.startFrame(s,n),n.screen){for(var u=0;u<l.nondrag.length;u++)QT(e,u,l.nondrag[u]);for(var d=0;d<l.drag.length;d++)QT(e,d,l.drag[d])}else if(n.picking)for(var f=0;f<l.length;f++)QT(e,f,l[f]);i.endFrame(),n.screen&&e.webglDebugShowAtlases&&(mRe(e),hRe(e)),e.data.canvasNeedsRedraw[e.NODE]=!1,e.data.canvasNeedsRedraw[e.DRAG]=!1}if(e.webglDebug){var p=performance.now(),m=Math.ceil(p-r),h=i.getDebugInfo(),g=[`${a} elements`,`${h.totalInstances} instances`,`${h.batchCount} batches`,`${h.totalAtlases} atlases`,`${h.wrappedCount} wrapped textures`,`${h.simpleCount} simple shapes`].join(`, `);console.log(`WebGL (${n.name}) - frame time ${m}ms`),console.log(`Totals:`),console.log(` ${g}`),console.log(`Texture Atlases Used:`);var _=h.atlasInfo,v=sT(_),y;try{for(v.s();!(y=v.n()).done;){var b=y.value;console.log(` ${b.type}: ${b.keyCount} keys, ${b.atlasCount} atlases`)}}catch(e){v.e(e)}finally{v.f()}console.log(``)}e.data.gc&&(console.log(`Garbage Collect!`),e.data.gc=!1,i.gc())}function vRe(e,t){for(var n=atob(e),r=new ArrayBuffer(n.length),i=new Uint8Array(r),a=0;a<n.length;a++)i[a]=n.charCodeAt(a);return new Blob([r],{type:t})}function eE(e){var t=e.indexOf(`,`);return e.substr(t+1)}function tE(e,t,n){var r=function(){return t.toDataURL(n,e.quality)};switch(e.output){case`blob-promise`:return new ik(function(r,i){try{t.toBlob(function(e){e==null?i(Error("`canvas.toBlob()` sent a null value in its callback")):r(e)},n,e.quality)}catch(e){i(e)}});case`blob`:return vRe(eE(r()),n);case`base64`:return eE(r());default:return r()}}function yRe(e){var t=this,n=t.cy.window().document;e.webgl&&(MN.CANVAS_LAYERS=t.CANVAS_LAYERS=4,console.log(`webgl rendering enabled`)),t.data={canvases:Array(MN.CANVAS_LAYERS),contexts:Array(MN.CANVAS_LAYERS),canvasNeedsRedraw:Array(MN.CANVAS_LAYERS),bufferCanvases:Array(MN.BUFFER_COUNT),bufferContexts:Array(MN.CANVAS_LAYERS)};var r=`-webkit-tap-highlight-color`,i=`rgba(0,0,0,0)`;t.data.canvasContainer=n.createElement(`div`);var a=t.data.canvasContainer.style;t.data.canvasContainer.style[r]=i,a.position=`relative`,a.zIndex=`0`,a.overflow=`hidden`;var o=e.cy.container();o.appendChild(t.data.canvasContainer),o.style[r]=i;var s={"-webkit-user-select":`none`,"-moz-user-select":`-moz-none`,"user-select":`none`,"-webkit-tap-highlight-color":`rgba(0,0,0,0)`,"outline-style":`none`};MRe()&&(s[`-ms-touch-action`]=`none`,s[`touch-action`]=`none`);for(var l=0;l<MN.CANVAS_LAYERS;l++){var u=t.data.canvases[l]=n.createElement(`canvas`),d=MN.CANVAS_TYPES[l];t.data.contexts[l]=u.getContext(d),t.data.contexts[l]||mD(`Could not create canvas of type `+d),Object.keys(s).forEach(function(e){u.style[e]=s[e]}),u.style.position=`absolute`,u.setAttribute(`data-id`,`layer`+l),u.style.zIndex=String(MN.CANVAS_LAYERS-l),t.data.canvasContainer.appendChild(u),t.data.canvasNeedsRedraw[l]=!1}t.data.topCanvas=t.data.canvases[0],t.data.canvases[MN.NODE].setAttribute(`data-id`,`layer`+MN.NODE+`-node`),t.data.canvases[MN.SELECT_BOX].setAttribute(`data-id`,`layer`+MN.SELECT_BOX+`-selectbox`),t.data.canvases[MN.DRAG].setAttribute(`data-id`,`layer`+MN.DRAG+`-drag`),t.data.canvases[MN.WEBGL]&&t.data.canvases[MN.WEBGL].setAttribute(`data-id`,`layer`+MN.WEBGL+`-webgl`);for(var l=0;l<MN.BUFFER_COUNT;l++)t.data.bufferCanvases[l]=n.createElement(`canvas`),t.data.bufferContexts[l]=t.data.bufferCanvases[l].getContext(`2d`),t.data.bufferCanvases[l].style.position=`absolute`,t.data.bufferCanvases[l].setAttribute(`data-id`,`buffer`+l),t.data.bufferCanvases[l].style.zIndex=String(-l-1),t.data.bufferCanvases[l].style.visibility=`hidden`;t.pathsEnabled=!0;var f=KD(),p=function(e){return{x:(e.x1+e.x2)/2,y:(e.y1+e.y2)/2}},m=function(e){return{x:-e.w/2,y:-e.h/2}},h=function(e){var t=e[0]._private;return t.oldBackgroundTimestamp!==t.backgroundTimestamp},g=function(e){return e[0]._private.nodeKey},_=function(e){return e[0]._private.labelStyleKey},v=function(e){return e[0]._private.sourceLabelStyleKey},y=function(e){return e[0]._private.targetLabelStyleKey},b=function(e,n,r,i,a){return t.drawElement(e,n,r,!1,!1,a)},x=function(e,n,r,i,a){return t.drawElementText(e,n,r,i,`main`,a)},S=function(e,n,r,i,a){return t.drawElementText(e,n,r,i,`source`,a)},C=function(e,n,r,i,a){return t.drawElementText(e,n,r,i,`target`,a)},w=function(e){return e.boundingBox(),e[0]._private.bodyBounds},T=function(e){return e.boundingBox(),e[0]._private.labelBounds.main||f},E=function(e){return e.boundingBox(),e[0]._private.labelBounds.source||f},D=function(e){return e.boundingBox(),e[0]._private.labelBounds.target||f},O=function(e,t){return t},k=function(e){return p(w(e))},A=function(e,t,n){var r=e?e+`-`:``;return{x:t.x+n.pstyle(r+`text-margin-x`).pfValue,y:t.y+n.pstyle(r+`text-margin-y`).pfValue}},j=function(e,t,n){var r=e[0]._private.rscratch;return{x:r[t],y:r[n]}},M=function(e){return A(``,j(e,`labelX`,`labelY`),e)},N=function(e){return A(`source`,j(e,`sourceLabelX`,`sourceLabelY`),e)},P=function(e){return A(`target`,j(e,`targetLabelX`,`targetLabelY`),e)},F=function(e){return m(w(e))},I=function(e){return m(E(e))},L=function(e){return m(D(e))},R=function(e){var t=T(e),n=m(T(e));if(e.isNode()){switch(DA(e.pstyle(`text-halign`).value)){case`left`:n.x=-t.w-(t.leftPad||0);break;case`right`:n.x=-(t.rightPad||0)}switch(OA(e.pstyle(`text-valign`).value)){case`top`:n.y=-t.h-(t.topPad||0);break;case`bottom`:n.y=-(t.botPad||0)}}return n},ee=t.data.eleTxrCache=new UM(t,{getKey:g,doesEleInvalidateKey:h,drawElement:b,getBoundingBox:w,getRotationPoint:k,getRotationOffset:F,allowEdgeTxrCaching:!1,allowParentTxrCaching:!1}),z=t.data.lblTxrCache=new UM(t,{getKey:_,drawElement:x,getBoundingBox:T,getRotationPoint:M,getRotationOffset:R,isVisible:O}),B=t.data.slbTxrCache=new UM(t,{getKey:v,drawElement:S,getBoundingBox:E,getRotationPoint:N,getRotationOffset:I,isVisible:O}),te=t.data.tlbTxrCache=new UM(t,{getKey:y,drawElement:C,getBoundingBox:D,getRotationPoint:P,getRotationOffset:L,isVisible:O}),ne=t.data.lyrTxrCache=new YM(t);t.onUpdateEleCalcs(function(e,t){ee.invalidateElements(t),z.invalidateElements(t),B.invalidateElements(t),te.invalidateElements(t),ne.invalidateElements(t);for(var n=0;n<t.length;n++){var r=t[n]._private;r.oldBackgroundTimestamp=r.backgroundTimestamp}});var re=function(e){for(var t=0;t<e.length;t++)ne.enqueueElementRefinement(e[t].ele)};ee.onDequeue(re),z.onDequeue(re),B.onDequeue(re),te.onDequeue(re),e.webgl&&t.initWebgl(e,{getStyleKey:g,getLabelKey:_,getSourceLabelKey:v,getTargetLabelKey:y,drawElement:b,drawLabel:x,drawSourceLabel:S,drawTargetLabel:C,getElementBox:w,getLabelBox:T,getSourceLabelBox:E,getTargetLabelBox:D,getElementRotationPoint:k,getElementRotationOffset:F,getLabelRotationPoint:M,getSourceLabelRotationPoint:N,getTargetLabelRotationPoint:P,getLabelRotationOffset:R,getSourceLabelRotationOffset:I,getTargetLabelRotationOffset:L})}function bRe(e,t,n){var r=n,i=function(n){gD("Can not register `"+t+"` for `"+e+"` since `"+n+"` already exists in the prototype and can not be overridden")};if(e===`core`){if(zj.prototype[t])return i(t);zj.prototype[t]=n}else if(e===`collection`){if(gj.prototype[t])return i(t);gj.prototype[t]=n}else if(e===`layout`){for(var a=function(e){this.options=e,n.call(this,e),lE(this._private)||(this._private={}),this._private.cy=e.cy,this._private.listeners=[],this.createEmitter()},o=a.prototype=Object.create(n.prototype),s=[],l=0;l<s.length;l++){var u=s[l];o[u]=o[u]||function(){return this}}o.start&&!o.run?o.run=function(){return this.start(),this}:!o.start&&o.run&&(o.start=function(){return this.run(),this});var d=n.prototype.stop;o.stop=function(){var e=this.options;if(e&&e.animate){var t=this.animations;if(t)for(var n=0;n<t.length;n++)t[n].stop()}return d?d.call(this):this.emit(`layoutstop`),this},o.destroy||=function(){return this},o.cy=function(){return this._private.cy};var f=function(e){return e._private.cy},p={addEventFields:function(e,t){t.layout=e,t.cy=f(e),t.target=e},bubble:function(){return!0},parent:function(e){return f(e)}};DE(o,{createEmitter:function(){return this._private.emitter=new AT(p,this),this},emitter:function(){return this._private.emitter},on:function(e,t){return this.emitter().on(e,t),this},one:function(e,t){return this.emitter().one(e,t),this},once:function(e,t){return this.emitter().one(e,t),this},removeListener:function(e,t){return this.emitter().removeListener(e,t),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},emit:function(e,t){return this.emitter().emit(e,t),this}}),iA.eventAliasesOn(o),r=a}else if(e===`renderer`&&t!==`null`&&t!==`base`){var m=xRe(`renderer`,`base`),h=m.prototype,g=n,_=n.prototype,v=function(){m.apply(this,arguments),g.apply(this,arguments)},y=v.prototype;for(var b in h){var x=h[b];if(_[b]!=null)return i(b);y[b]=x}for(var S in _)y[S]=_[S];h.clientFunctions.forEach(function(e){y[e]=y[e]||function(){mD("Renderer does not implement `renderer."+e+"()` on its prototype")}}),r=v}else if(e===`__proto__`||e===`constructor`||e===`prototype`)return mD(e+` is an illegal type to be registered, possibly lead to prototype pollutions`);return kE({map:NN,keys:[e,t],value:r})}function xRe(e,t){return AE({map:NN,keys:[e,t]})}function SRe(e,t,n,r,i){return kE({map:PN,keys:[e,t,n,r],value:i})}function CRe(e,t,n,r){return AE({map:PN,keys:[e,t,n,r]})}var nE,rE,wRe,iE,TRe,ERe,aE,oE,sE,cE,lE,DRe,uE,dE,fE,pE,mE,hE,gE,_E,ORe,vE,kRe,ARe,jRe,MRe,yE,bE,xE,SE,CE,wE,TE,NRe,PRe,FRe,IRe,LRe,RRe,EE,zRe,DE,BRe,VRe,HRe,URe,OE,WRe,kE,AE,jE,ME,GRe,NE,KRe,PE,qRe,FE,JRe,IE,YRe,LE,XRe,RE,ZRe,zE,QRe,BE,$Re,VE,eze,HE,tze,UE,nze,WE,rze,GE,ize,KE,qE,JE,aze,YE,XE,ZE,QE,$E,eD,tD,nD,oze,rD,iD,aD,oD,sD,sze,cze,cD,lze,uze,lD,uD,dD,fD,pD,mD,hD,gD,dze,_D,fze,vD,pze,yD,bD,xD,SD,mze,CD,wD,TD,hze,gze,ED,DD,OD,kD,AD,_ze,vze,jD,yze,MD,bze,xze,Sze,Cze,wze,Tze,Eze,Dze,Oze,kze,Aze,ND,jze,Mze,PD,FD,ID,Nze,Pze,Fze,Ize,LD,Lze,Rze,RD,zD,BD,VD,HD,zze,UD,WD,Bze,GD,KD,Vze,Hze,Uze,qD,JD,YD,XD,ZD,QD,$D,eO,Wze,tO,Gze,Kze,qze,Jze,Yze,Xze,nO,rO,Zze,iO,aO,Qze,oO,sO,cO,lO,$ze,uO,eBe,dO,fO,pO,mO,hO,gO,_O,tBe,vO,nBe,rBe,yO,bO,xO,SO,iBe,CO,aBe,oBe,sBe,cBe,wO,lBe,uBe,dBe,fBe,pBe,mBe,hBe,TO,gBe,_Be,EO,DO,OO,vBe,yBe,kO,AO,bBe,jO,MO,NO,PO,FO,xBe,SBe,CBe,IO,LO,wBe,TBe,EBe,DBe,OBe,RO,kBe,ABe,jBe,MBe,zO,BO,VO,HO,UO,NBe,PBe,FBe,IBe,LBe,RBe,WO,zBe,GO,BBe,VBe,HBe,KO,UBe,qO,WBe,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,GBe,sk,KBe,ck,qBe,lk,JBe,uk,YBe,dk,XBe,fk,ZBe,pk,QBe,mk,$Be,hk,eVe,gk,tVe,_k,nVe,vk,rVe,yk,iVe,bk,aVe,xk,oVe,Sk,sVe,Ck,cVe,wk,lVe,Tk,uVe,Ek,dVe,Dk,fVe,Ok,pVe,kk,mVe,Ak,hVe,jk,gVe,Mk,_Ve,Nk,vVe,Pk,yVe,Fk,bVe,Ik,xVe,Lk,SVe,Rk,CVe,zk,wVe,Bk,TVe,Vk,EVe,Hk,DVe,Uk,OVe,Wk,kVe,Gk,AVe,Kk,jVe,qk,MVe,Jk,NVe,Yk,PVe,FVe,Xk,IVe,Zk,LVe,Qk,RVe,$k,zVe,eA,BVe,tA,VVe,HVe,nA,UVe,rA,WVe,GVe,KVe,qVe,iA,JVe,aA,oA,sA,cA,lA,YVe,XVe,ZVe,uA,dA,fA,QVe,$Ve,eHe,pA,tHe,nHe,mA,rHe,hA,gA,iHe,_A,vA,yA,bA,xA,SA,aHe,oHe,CA,wA,sHe,TA,EA,cHe,DA,OA,lHe,kA,AA,jA,MA,NA,PA,FA,IA,LA,RA,uHe,dHe,zA,BA,VA,HA,UA,WA,fHe,GA,KA,qA,pHe,mHe,hHe,gHe,JA,_He,vHe,YA,XA,yHe,ZA,QA,bHe,$A,ej,tj,xHe,SHe,nj,rj,ij,aj,CHe,oj,sj,wHe,cj,lj,uj,dj,fj,pj,mj,hj,gj,_j,THe,EHe,vj,yj,DHe,OHe,bj,xj,Sj,Cj,kHe,AHe,wj,Tj,Ej,Dj,jHe,Oj,kj,Aj,jj,Mj,Nj,Pj,Fj,Ij,MHe,NHe,Lj,Rj,zj,Bj,PHe,FHe,Vj,Hj,IHe,LHe,RHe,zHe,BHe,VHe,Uj,HHe,UHe,Wj,WHe,GHe,KHe,Gj,qHe,JHe,Kj,YHe,XHe,ZHe,QHe,$He,qj,Jj,eUe,tUe,nUe,rUe,iUe,Yj,Xj,Zj,Qj,$j,eM,tM,nM,rM,aUe,oUe,iM,aM,oM,sM,cM,lM,uM,dM,sUe,cUe,fM,pM,lUe,mM,uUe,dUe,hM,fUe,gM,_M,vM,yM,bM,xM,pUe,SM,CM,mUe,wM,TM,EM,DM,OM,hUe,gUe,kM,AM,jM,MM,NM,PM,FM,IM,_Ue,LM,RM,zM,BM,VM,vUe,yUe,bUe,xUe,SUe,CUe,wUe,TUe,EUe,DUe,OUe,kUe,AUe,HM,jUe,UM,WM,MUe,GM,KM,NUe,PUe,FUe,IUe,LUe,RUe,zUe,BUe,qM,VUe,JM,HUe,YM,XM,ZM,UUe,QM,WUe,$M,GUe,KUe,qUe,JUe,YUe,eN,tN,nN,rN,iN,aN,oN,sN,XUe,cN,lN,ZUe,QUe,$Ue,eWe,tWe,nWe,rWe,iWe,uN,dN,fN,pN,mN,hN,gN,_N,vN,yN,aWe,bN,xN,SN,CN,wN,TN,EN,DN,ON,kN,AN,jN,oWe,MN,sWe,cWe,NN,PN,FN,IN,LN,lWe,RN,uWe=o((()=>{for(nE=typeof window>`u`?null:window,rE=nE?nE.navigator:null,nE&&nE.document,wRe=uT(``),iE=uT({}),TRe=uT(function(){}),ERe=typeof HTMLElement>`u`?`undefined`:uT(HTMLElement),aE=function(e){return e&&e.instanceString&&sE(e.instanceString)?e.instanceString():null},oE=function(e){return e!=null&&uT(e)==wRe},sE=function(e){return e!=null&&uT(e)===TRe},cE=function(e){return!pE(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},lE=function(e){return e!=null&&uT(e)===iE&&!cE(e)&&e.constructor===Object},DRe=function(e){return e!=null&&uT(e)===iE},uE=function(e){return e!=null&&uT(e)===uT(1)&&!isNaN(e)},dE=function(e){return uE(e)&&Math.floor(e)===e},fE=function(e){if(ERe!==`undefined`)return e!=null&&e instanceof HTMLElement},pE=function(e){return mE(e)||hE(e)},mE=function(e){return aE(e)===`collection`&&e._private.single},hE=function(e){return aE(e)===`collection`&&!e._private.single},gE=function(e){return aE(e)===`core`},_E=function(e){return aE(e)===`stylesheet`},ORe=function(e){return aE(e)===`event`},vE=function(e){return e==null||!!(e===``||e.match(/^\s+$/))},kRe=function(e){return typeof HTMLElement>`u`?!1:e instanceof HTMLElement},ARe=function(e){return lE(e)&&uE(e.x1)&&uE(e.x2)&&uE(e.y1)&&uE(e.y2)},jRe=function(e){return DRe(e)&&sE(e.then)},MRe=function(){return rE&&rE.userAgent.match(/msie|trident|edge/i)},yE=function(e,t){t||=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return`undefined`;for(var e=[],t=0;t<arguments.length;t++)e.push(arguments[t]);return e.join(`$`)};var n=function(){var r=this,i=arguments,a,o=t.apply(r,i),s=n.cache;return(a=s[o])||(a=s[o]=e.apply(r,i)),a};return n.cache={},n},bE=yE(function(e){return e.replace(/([A-Z])/g,function(e){return`-`+e.toLowerCase()})}),xE=yE(function(e){return e.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),SE=yE(function(e,t){return e+t[0].toUpperCase()+t.substring(1)},function(e,t){return e+`$`+t}),CE=function(e){return vE(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},wE=function(e,t){return e.slice(-1*t.length)===t},TE=`(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))`,NRe=`rgb[a]?\\((`+TE+`[%]?)\\s*,\\s*(`+TE+`[%]?)\\s*,\\s*(`+TE+`[%]?)(?:\\s*,\\s*(`+TE+`))?\\)`,PRe=`rgb[a]?\\((?:`+TE+`[%]?)\\s*,\\s*(?:`+TE+`[%]?)\\s*,\\s*(?:`+TE+`[%]?)(?:\\s*,\\s*(?:`+TE+`))?\\)`,FRe=`hsl[a]?\\((`+TE+`)\\s*,\\s*(`+TE+`[%])\\s*,\\s*(`+TE+`[%])(?:\\s*,\\s*(`+TE+`))?\\)`,IRe=`hsl[a]?\\((?:`+TE+`)\\s*,\\s*(?:`+TE+`[%])\\s*,\\s*(?:`+TE+`[%])(?:\\s*,\\s*(?:`+TE+`))?\\)`,LRe=`\\#[0-9a-fA-F]{3}`,RRe=`\\#[0-9a-fA-F]{6}`,EE=function(e,t){return e<t?-1:+(e>t)},zRe=function(e,t){return-1*EE(e,t)},DE=Object.assign==null?function(e){for(var t=arguments,n=1;n<t.length;n++){var r=t[n];if(r!=null)for(var i=Object.keys(r),a=0;a<i.length;a++){var o=i[a];e[o]=r[o]}}return e}:Object.assign.bind(Object),BRe=function(e){if(!(e.length!==4&&e.length!==7||e[0]!==`#`)){var t=e.length===4,n,r,i,a=16;return t?(n=parseInt(e[1]+e[1],a),r=parseInt(e[2]+e[2],a),i=parseInt(e[3]+e[3],a)):(n=parseInt(e[1]+e[2],a),r=parseInt(e[3]+e[4],a),i=parseInt(e[5]+e[6],a)),[n,r,i]}},VRe=function(e){var t,n,r,i,a,o,s,l;function u(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var d=RegExp(`^`+FRe+`$`).exec(e);if(d){if(n=parseInt(d[1]),n<0?n=(360- -1*n%360)%360:n>360&&(n%=360),n/=360,r=parseFloat(d[2]),r<0||r>100||(r/=100,i=parseFloat(d[3]),i<0||i>100)||(i/=100,a=d[4],a!==void 0&&(a=parseFloat(a),a<0||a>1)))return;if(r===0)o=s=l=Math.round(i*255);else{var f=i<.5?i*(1+r):i+r-i*r,p=2*i-f;o=Math.round(255*u(p,f,n+1/3)),s=Math.round(255*u(p,f,n)),l=Math.round(255*u(p,f,n-1/3))}t=[o,s,l,a]}return t},HRe=function(e){var t,n=RegExp(`^`+NRe+`$`).exec(e);if(n){t=[];for(var r=[],i=1;i<=3;i++){var a=n[i];if(a[a.length-1]===`%`&&(r[i]=!0),a=parseFloat(a),r[i]&&(a=a/100*255),a<0||a>255)return;t.push(Math.floor(a))}var o=r[1]||r[2]||r[3],s=r[1]&&r[2]&&r[3];if(o&&!s)return;var l=n[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)return;t.push(l)}}return t},URe=function(e){return WRe[e.toLowerCase()]},OE=function(e){return(cE(e)?e:null)||URe(e)||BRe(e)||HRe(e)||VRe(e)},WRe={transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},kE=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i<r;i++){var a=n[i];if(lE(a))throw Error(`Tried to set map with object key`);i<n.length-1?(t[a]??(t[a]={}),t=t[a]):t[a]=e.value}},AE=function(e){for(var t=e.map,n=e.keys,r=n.length,i=0;i<r;i++){var a=n[i];if(lE(a))throw Error(`Tried to get map with object key`);if(t=t[a],t==null)return t}return t},jE=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},KE=fT(hIe()),qE=nE?nE.performance:null,JE=qE&&qE.now?function(){return qE.now()}:function(){return Date.now()},aze=function(){if(nE){if(nE.requestAnimationFrame)return function(e){nE.requestAnimationFrame(e)};if(nE.mozRequestAnimationFrame)return function(e){nE.mozRequestAnimationFrame(e)};if(nE.webkitRequestAnimationFrame)return function(e){nE.webkitRequestAnimationFrame(e)};if(nE.msRequestAnimationFrame)return function(e){nE.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(JE())},1e3/60)}}(),YE=function(e){return aze(e)},XE=JE,ZE=9261,QE=65599,$E=5381,eD=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ZE,n;n=e.next(),!n.done;)t=t*QE+n.value|0;return t},tD=function(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:ZE)*QE+e|0},nD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$E;return(t<<5)+t+e|0},oze=function(e,t){return e*2097152+t},rD=function(e){return e[0]*2097152+e[1]},iD=function(e,t){return[tD(e[0],t[0]),nD(e[1],t[1])]},aD=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return eD({next:function(){return r<i?n.value=e[r++]:n.done=!0,n}},t)},oD=function(e,t){var n={value:0,done:!1},r=0,i=e.length;return eD({next:function(){return r<i?n.value=e.charCodeAt(r++):n.done=!0,n}},t)},sD=function(){return sze(arguments)},sze=function(e){for(var t,n=0;n<e.length;n++){var r=e[n];t=n===0?oD(r):oD(r,t)}return t},cze=function(e,t,n,r,i,a){return{x:(e-n)*i+n,y:(t-r)*a+r}},cD=!0,lze=console.warn!=null,uze=console.trace!=null,lD=2**53-1||9007199254740991,uD=function(){return!0},dD=function(){return!1},fD=function(){return 0},pD=function(){},mD=function(e){throw Error(e)},hD=function(e){if(e!==void 0)cD=!!e;else return cD},gD=function(e){hD()&&(lze?console.warn(e):(console.log(e),uze&&console.trace()))},dze=function(e){return DE({},e)},_D=function(e){return e==null?e:cE(e)?e.slice():lE(e)?dze(e):e},fze=function(e){return e.slice()},vD=function(e,t){for(t=e=``;e++<36;t+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):`-`);return t},pze={},yD=function(){return pze},bD=function(e){var t=Object.keys(e);return function(n){for(var r={},i=0;i<t.length;i++){var a=t[i],o=n?.[a];r[a]=o===void 0?e[a]:o}return r}},xD=function(e,t,n){for(var r=e.length-1;r>=0;r--)e[r]===t&&e.splice(r,1)},SD=function(e){e.splice(0,e.length)},mze=function(e,t){for(var n=0;n<t.length;n++){var r=t[n];e.push(r)}},CD=function(e,t,n){return n&&(t=SE(n,t)),e[t]},wD=function(e,t,n,r){n&&(t=SE(n,t)),e[t]=r},TD=typeof Map<`u`?Map:function(){function e(){aT(this,e),this._obj={}}return oT(e,[{key:`set`,value:function(e,t){return this._obj[e]=t,this}},{key:`delete`,value:function(e){return this._obj[e]=void 0,this}},{key:`clear`,value:function(){this._obj={}}},{key:`has`,value:function(e){return this._obj[e]!==void 0}},{key:`get`,value:function(e){return this._obj[e]}}])}(),hze=`undefined`,gze=function(){function e(t){if(aT(this,e),this._obj=Object.create(null),this.size=0,t!=null)for(var n=t.instanceString!=null&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r<n.length;r++)this.add(n[r])}return oT(e,[{key:`instanceString`,value:function(){return`set`}},{key:`add`,value:function(e){var t=this._obj;t[e]!==1&&(t[e]=1,this.size++)}},{key:`delete`,value:function(e){var t=this._obj;t[e]===1&&(t[e]=0,this.size--)}},{key:`clear`,value:function(){this._obj=Object.create(null)}},{key:`has`,value:function(e){return this._obj[e]===1}},{key:`toArray`,value:function(){var e=this;return Object.keys(this._obj).filter(function(t){return e.has(t)})}},{key:`forEach`,value:function(e,t){return this.toArray().forEach(e,t)}}])}(),ED=(typeof Set>`u`?`undefined`:uT(Set))===hze?gze:Set,DD=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(e===void 0||t===void 0||!gE(e)){mD(`An element must have a core reference and parameters set`);return}var r=t.group;if(r??=t.data&&t.data.source!=null&&t.data.target!=null?`edges`:`nodes`,r!==`nodes`&&r!==`edges`){mD("An element must be of type `nodes` or `edges`; you specified `"+r+"`");return}this.length=1,this[0]=this;var i=this._private={cy:e,single:!0,data:t.data||{},position:t.position||{x:0,y:0},autoWidth:void 0,autoHeight:void 0,autoPadding:void 0,compoundBoundsClean:!1,listeners:[],group:r,style:{},rstyle:{},styleCxts:[],styleKeys:{},removed:!0,selected:!!t.selected,selectable:t.selectable===void 0||!!t.selectable,locked:!!t.locked,grabbed:!1,grabbable:t.grabbable===void 0||!!t.grabbable,pannable:t.pannable===void 0?r===`edges`:!!t.pannable,active:!1,classes:new ED,animation:{current:[],queue:[]},rscratch:{},scratch:t.scratch||{},edges:[],children:[],parent:t.parent&&t.parent.isNode()?t.parent:null,traversalCache:{},backgrounding:!1,bbCache:null,bbCacheShift:{x:0,y:0},bodyBounds:null,overlayBounds:null,labelBounds:{all:null,source:null,target:null,main:null},arrowBounds:{source:null,target:null,"mid-source":null,"mid-target":null}};if(i.position.x??(i.position.x=0),i.position.y??(i.position.y=0),t.renderedPosition){var a=t.renderedPosition,o=e.pan(),s=e.zoom();i.position={x:(a.x-o.x)/s,y:(a.y-o.y)/s}}var l=[];cE(t.classes)?l=t.classes:oE(t.classes)&&(l=t.classes.split(/\s+/));for(var u=0,d=l.length;u<d;u++){var f=l[u];!f||f===``||i.classes.add(f)}this.createEmitter(),(n===void 0||n)&&this.restore();var p=t.style||t.css;p&&(gD("Setting a `style` bypass at element creation should be done only when absolutely necessary. Try to use the stylesheet instead."),this.style(p))},OD=function(e){return e={bfs:e.bfs||!e.dfs,dfs:e.dfs||!e.bfs},function(t,n,r){var i;lE(t)&&!pE(t)&&(i=t,t=i.roots||i.root,n=i.visit,r=i.directed),r=arguments.length===2&&!sE(n)?n:r,n=sE(n)?n:function(){};for(var a=this._private.cy,o=t=oE(t)?this.filter(t):t,s=[],l=[],u={},d={},f={},p=0,m,h=this.byGroup(),g=h.nodes,_=h.edges,v=0;v<o.length;v++){var y=o[v],b=y.id();y.isNode()&&(s.unshift(y),e.bfs&&(f[b]=!0,l.push(y)),d[b]=0)}for(var x=function(){var t=e.bfs?s.shift():s.pop(),i=t.id();if(e.dfs){if(f[i])return 0;f[i]=!0,l.push(t)}var a=d[i],o=u[i],h=o==null?null:o.source(),v=o==null?null:o.target(),y=o==null?void 0:t.same(h)?v[0]:h[0],b=n(t,o,y,p++,a);if(b===!0)return m=t,1;if(b===!1)return 1;for(var x=t.connectedEdges().filter(function(e){return(!r||e.source().same(t))&&_.has(e)}),S=0;S<x.length;S++){var C=x[S],w=C.connectedNodes().filter(function(e){return!e.same(t)&&g.has(e)}),T=w.id();w.length!==0&&!f[T]&&(w=w[0],s.push(w),e.bfs&&(f[T]=!0,l.push(w)),u[T]=C,d[T]=d[i]+1)}},S;s.length!==0&&(S=x(),S===0||S!==1););for(var C=a.collection(),w=0;w<l.length;w++){var T=l[w],E=u[T.id()];E!=null&&C.push(E),C.push(T)}return{path:a.collection(C),found:a.collection(m)}}},kD={breadthFirstSearch:OD({bfs:!0}),depthFirstSearch:OD({dfs:!0})},kD.bfs=kD.breadthFirstSearch,kD.dfs=kD.depthFirstSearch,AD={exports:{}},_ze=AD.exports,MD=fT(yIe()),bze=bD({root:null,weight:function(e){return 1},directed:!1}),xze={dijkstra:function(e){if(!lE(e)){var t=arguments;e={root:t[0],weight:t[1],directed:t[2]}}var n=bze(e),r=n.root,i=n.weight,a=n.directed,o=this,s=i,l=oE(r)?this.filter(r)[0]:r[0],u={},d={},f={},p=this.byGroup(),m=p.nodes,h=p.edges;h.unmergeBy(function(e){return e.isLoop()});for(var g=function(e){return u[e.id()]},_=function(e,t){u[e.id()]=t,v.updateItem(e)},v=new MD(function(e,t){return g(e)-g(t)}),y=0;y<m.length;y++){var b=m[y];u[b.id()]=b.same(l)?0:1/0,v.push(b)}for(var x=function(e,t){for(var n=(a?e.edgesTo(t):e.edgesWith(t)).intersect(h),r=1/0,i,o=0;o<n.length;o++){var l=n[o],u=s(l);(u<r||!i)&&(r=u,i=l)}return{edge:i,dist:r}};v.size()>0;){var S=v.pop(),C=g(S),w=S.id();if(f[w]=C,C!==1/0)for(var T=S.neighborhood().intersect(m),E=0;E<T.length;E++){var D=T[E],O=D.id(),k=x(S,D),A=C+k.dist;A<g(D)&&(_(D,A),d[O]={node:S,edge:k.edge})}}return{distanceTo:function(e){return f[(oE(e)?m.filter(e)[0]:e[0]).id()]},pathTo:function(e){var t=oE(e)?m.filter(e)[0]:e[0],n=[],r=t,i=r.id();if(t.length>0)for(n.unshift(t);d[i];){var a=d[i];n.unshift(a.edge),n.unshift(a.node),r=a.node,i=r.id()}return o.spawn(n)}}}},Sze={kruskal:function(e){e||=function(e){return 1};for(var t=this.byGroup(),n=t.nodes,r=t.edges,i=n.length,a=Array(i),o=n,s=function(e){for(var t=0;t<a.length;t++)if(a[t].has(e))return t},l=0;l<i;l++)a[l]=this.spawn(n[l]);for(var u=r.sort(function(t,n){return e(t)-e(n)}),d=0;d<u.length;d++){var f=u[d],p=f.source()[0],m=f.target()[0],h=s(p),g=s(m),_=a[h],v=a[g];h!==g&&(o.merge(f),_.merge(v),a.splice(g,1))}return o}},Cze=bD({root:null,goal:null,weight:function(e){return 1},heuristic:function(e){return 0},directed:!1}),wze={aStar:function(e){var t=this.cy(),n=Cze(e),r=n.root,i=n.goal,a=n.heuristic,o=n.directed,s=n.weight;r=t.collection(r)[0],i=t.collection(i)[0];var l=r.id(),u=i.id(),d={},f={},p={},m=new MD(function(e,t){return f[e.id()]-f[t.id()]}),h=new ED,g={},_={},v=function(e,t){m.push(e),h.add(t)},y,b,x=function(){y=m.pop(),b=y.id(),h.delete(b)},S=function(e){return h.has(e)};v(r,l),d[l]=0,f[l]=a(r);for(var C=0;m.size()>0;){if(x(),C++,b===u){for(var w=[],T=i,E=u,D=_[E];w.unshift(T),D!=null&&w.unshift(D),T=g[E],T!=null;)E=T.id(),D=_[E];return{found:!0,distance:d[b],path:this.spawn(w),steps:C}}p[b]=!0;for(var O=y._private.edges,k=0;k<O.length;k++){var A=O[k];if(this.hasElementWithId(A.id())&&!(o&&A.data(`source`)!==b)){var j=A.source(),M=A.target(),N=j.id()===b?M:j,P=N.id();if(this.hasElementWithId(P)&&!p[P]){var F=d[b]+s(A);if(!S(P)){d[P]=F,f[P]=F+a(N),v(N,P),g[P]=y,_[P]=A;continue}F<d[P]&&(d[P]=F,f[P]=F+a(N),m.updateItem(N),g[P]=y,_[P]=A)}}}}return{found:!1,distance:void 0,path:void 0,steps:C}}},Tze=bD({weight:function(e){return 1},directed:!1}),Eze={floydWarshall:function(e){for(var t=this.cy(),n=Tze(e),r=n.weight,i=n.directed,a=r,o=this.byGroup(),s=o.nodes,l=o.edges,u=s.length,d=u*u,f=function(e){return s.indexOf(e)},p=function(e){return s[e]},m=Array(d),h=0;h<d;h++){var g=h%u;(h-g)/u===g?m[h]=0:m[h]=1/0}for(var _=Array(d),v=Array(d),y=0;y<l.length;y++){var b=l[y],x=b.source()[0],S=b.target()[0];if(x!==S){var C=f(x),w=f(S),T=C*u+w,E=a(b);if(m[T]>E&&(m[T]=E,_[T]=w,v[T]=b),!i){var D=w*u+C;!i&&m[D]>E&&(m[D]=E,_[D]=C,v[D]=b)}}}for(var O=0;O<u;O++)for(var k=0;k<u;k++)for(var A=k*u+O,j=0;j<u;j++){var M=k*u+j,N=O*u+j;m[A]+m[N]<m[M]&&(m[M]=m[A]+m[N],_[M]=_[A])}var P=function(e){return(oE(e)?t.filter(e):e)[0]},F=function(e){return f(P(e))};return{distance:function(e,t){var n=F(e),r=F(t);return m[n*u+r]},path:function(e,n){var r=F(e),i=F(n),a=p(r);if(r===i)return a.collection();if(_[r*u+i]==null)return t.collection();var o=t.collection(),s=r,l;for(o.merge(a);r!==i;)s=r,r=_[r*u+i],l=v[s*u+r],o.merge(l),o.merge(p(r));return o}}}},Dze=bD({weight:function(e){return 1},directed:!1,root:null}),Oze={bellmanFord:function(e){var t=this,n=Dze(e),r=n.weight,i=n.directed,a=n.root,o=r,s=this,l=this.cy(),u=this.byGroup(),d=u.edges,f=u.nodes,p=f.length,m=new TD,h=!1,g=[];a=l.collection(a)[0],d.unmergeBy(function(e){return e.isLoop()});for(var _=d.length,v=function(e){var t=m.get(e.id());return t||(t={},m.set(e.id(),t)),t},y=function(e){return(oE(e)?l.$(e):e)[0]},b=function(e){return v(y(e)).dist},x=function(e){for(var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a,r=y(e),i=[],o=r;;){if(o==null)return t.spawn();var l=v(o),u=l.edge,d=l.pred;if(i.unshift(o[0]),o.same(n)&&i.length>0)break;u!=null&&i.unshift(u),o=d}return s.spawn(i)},S=0;S<p;S++){var C=f[S],w=v(C);w.dist=C.same(a)?0:1/0,w.pred=null,w.edge=null}for(var T=!1,E=function(e,t,n,r,i,a){var o=r.dist+a;o<i.dist&&!n.same(r.edge)&&(i.dist=o,i.pred=e,i.edge=n,T=!0)},D=1;D<p;D++){T=!1;for(var O=0;O<_;O++){var k=d[O],A=k.source(),j=k.target(),M=o(k),N=v(A),P=v(j);E(A,j,k,N,P,M),i||E(j,A,k,P,N,M)}if(!T)break}if(T)for(var F=[],I=0;I<_;I++){var L=d[I],R=L.source(),ee=L.target(),z=o(L),B=v(R).dist,te=v(ee).dist;if(B+z<te||!i&&te+z<B){if(h||=(gD(`Graph contains a negative weight cycle for Bellman-Ford`),!0),e.findNegativeWeightCycles!==!1){var ne=[];B+z<te&&ne.push(R),!i&&te+z<B&&ne.push(ee);for(var re=ne.length,ie=0;ie<re;ie++){var ae=ne[ie],oe=[ae];oe.push(v(ae).edge);for(var se=v(ae).pred;oe.indexOf(se)===-1;)oe.push(se),oe.push(v(se).edge),se=v(se).pred;oe=oe.slice(oe.indexOf(se));for(var ce=oe[0].id(),le=0,ue=2;ue<oe.length;ue+=2)oe[ue].id()<ce&&(ce=oe[ue].id(),le=ue);oe=oe.slice(le).concat(oe.slice(0,le)),oe.push(oe[0]);var de=oe.map(function(e){return e.id()}).join(`,`);F.indexOf(de)===-1&&(g.push(s.spawn(oe)),F.push(de))}}else break}}return{distanceTo:b,pathTo:x,hasNegativeWeightCycle:h,negativeWeightCycles:g}}},kze=Math.sqrt(2),Aze=function(e,t,n){n.length===0&&mD(`Karger-Stein must be run on a connected (sub)graph`);for(var r=n[e],i=r[1],a=r[2],o=t[i],s=t[a],l=n,u=l.length-1;u>=0;u--){var d=l[u],f=d[1],p=d[2];(t[f]===o&&t[p]===s||t[f]===s&&t[p]===o)&&l.splice(u,1)}for(var m=0;m<l.length;m++){var h=l[m];h[1]===s?(l[m]=h.slice(),l[m][1]=o):h[2]===s&&(l[m]=h.slice(),l[m][2]=o)}for(var g=0;g<t.length;g++)t[g]===s&&(t[g]=o);return l},ND=function(e,t,n,r){for(;n>r;)t=Aze(Math.floor(Math.random()*t.length),e,t),n--;return t},jze={kargerStein:function(){var e=this,t=this.byGroup(),n=t.nodes,r=t.edges;r.unmergeBy(function(e){return e.isLoop()});var i=n.length,a=r.length,o=Math.ceil((Math.log(i)/Math.LN2)**2),s=Math.floor(i/kze);if(i<2){mD(`At least 2 nodes are required for Karger-Stein algorithm`);return}for(var l=[],u=0;u<a;u++){var d=r[u];l.push([u,n.indexOf(d.source()),n.indexOf(d.target())])}for(var f=1/0,p=[],m=Array(i),h=Array(i),g=Array(i),_=function(e,t){for(var n=0;n<i;n++)t[n]=e[n]},v=0;v<=o;v++){for(var y=0;y<i;y++)h[y]=y;var b=ND(h,l.slice(),i,s),x=b.slice();_(h,g);var S=ND(h,b,s,2),C=ND(g,x,s,2);S.length<=C.length&&S.length<f?(f=S.length,p=S,_(h,m)):C.length<=S.length&&C.length<f&&(f=C.length,p=C,_(g,m))}for(var w=this.spawn(p.map(function(e){return r[e[0]]})),T=this.spawn(),E=this.spawn(),D=m[0],O=0;O<m.length;O++){var k=m[O],A=n[O];k===D?T.merge(A):E.merge(A)}var j=function(t){var n=e.spawn();return t.forEach(function(t){n.merge(t),t.connectedEdges().forEach(function(t){e.contains(t)&&!w.contains(t)&&n.merge(t)})}),n};return{cut:w,components:[j(T),j(E)],partition1:T,partition2:E}}},Mze=function(e){return{x:e.x,y:e.y}},PD=function(e,t,n){return{x:e.x*t+n.x,y:e.y*t+n.y}},FD=function(e,t,n){return{x:(e.x-n.x)/t,y:(e.y-n.y)/t}},ID=function(e){return{x:e[0],y:e[1]}},Nze=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=1/0,i=t;i<n;i++){var a=e[i];isFinite(a)&&(r=Math.min(a,r))}return r},Pze=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=-1/0,i=t;i<n;i++){var a=e[i];isFinite(a)&&(r=Math.max(a,r))}return r},Fze=function(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=0,i=0,a=t;a<n;a++){var o=e[a];isFinite(o)&&(r+=o,i++)}return r/i},Ize=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:e.length,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;r?e=e.slice(t,n):(n<e.length&&e.splice(n,e.length-n),t>0&&e.splice(0,t));for(var o=0,s=e.length-1;s>=0;s--){var l=e[s];a?isFinite(l)||(e[s]=-1/0,o++):e.splice(s,1)}i&&e.sort(function(e,t){return e-t});var u=e.length,d=Math.floor(u/2);return u%2==0?(e[d-1+o]+e[d+o])/2:e[d+1+o]},LD=function(e,t){return t===0?e:LD(t,e%t)},Lze=function(e){for(var t=e[0],n=0;n<e.length;n++)if(dE(e[n]))n>0&&(t=LD(t,e[n]));else return 0;return t},Rze=function(e){return Math.PI*e/180},RD=function(e,t){return Math.atan2(t,e)-Math.PI/2},zD=Math.log2||function(e){return Math.log(e)/Math.log(2)},BD=function(e){return e>0?1:e<0?-1:0},VD=function(e,t){return Math.sqrt(HD(e,t))},HD=function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r},zze=function(e){for(var t=e.length,n=0,r=0;r<t;r++)n+=e[r];for(var i=0;i<t;i++)e[i]=e[i]/n;return e},UD=function(e,t,n,r){return(1-r)*(1-r)*e+2*(1-r)*r*t+r*r*n},WD=function(e,t,n,r){return{x:UD(e.x,t.x,n.x,r),y:UD(e.y,t.y,n.y,r)}},Bze=function(e,t,n,r){var i={x:t.x-e.x,y:t.y-e.y},a=VD(e,t),o={x:i.x/a,y:i.y/a};return n??=0,r??=n*a,{x:e.x+o.x*r,y:e.y+o.y*r}},GD=function(e,t,n){return Math.max(e,Math.min(n,t))},KD=function(e){if(e==null)return{x1:1/0,y1:1/0,x2:-1/0,y2:-1/0,w:0,h:0};if(e.x1!=null&&e.y1!=null){if(e.x2!=null&&e.y2!=null&&e.x2>=e.x1&&e.y2>=e.y1)return{x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2,w:e.x2-e.x1,h:e.y2-e.y1};if(e.w!=null&&e.h!=null&&e.w>=0&&e.h>=0)return{x1:e.x1,y1:e.y1,x2:e.x1+e.w,y2:e.y1+e.h,w:e.w,h:e.h}}},Vze=function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},Hze=function(e){e.x1=1/0,e.y1=1/0,e.x2=-1/0,e.y2=-1/0,e.w=0,e.h=0},Uze=function(e,t){e.x1=Math.min(e.x1,t.x1),e.x2=Math.max(e.x2,t.x2),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,t.y1),e.y2=Math.max(e.y2,t.y2),e.h=e.y2-e.y1},qD=function(e,t,n){e.x1=Math.min(e.x1,t),e.x2=Math.max(e.x2,t),e.w=e.x2-e.x1,e.y1=Math.min(e.y1,n),e.y2=Math.max(e.y2,n),e.h=e.y2-e.y1},JD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return e.x1-=t,e.x2+=t,e.y1-=t,e.y2+=t,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},YD=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0],n,r,i,a;if(t.length===1)n=r=i=a=t[0];else if(t.length===2)n=i=t[0],a=r=t[1];else if(t.length===4){var o=cT(t,4);n=o[0],r=o[1],i=o[2],a=o[3]}return e.x1-=a,e.x2+=r,e.y1-=n,e.y2+=i,e.w=e.x2-e.x1,e.h=e.y2-e.y1,e},XD=function(e,t){e.x1=t.x1,e.y1=t.y1,e.x2=t.x2,e.y2=t.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1},ZD=function(e,t){return!(e.x1>t.x2||t.x1>e.x2||e.x2<t.x1||t.x2<e.x1||e.y2<t.y1||t.y2<e.y1||e.y1>t.y2||t.y1>e.y2)},QD=function(e,t,n){return e.x1<=t&&t<=e.x2&&e.y1<=n&&n<=e.y2},$D=function(e,t){return QD(e,t.x,t.y)},eO=function(e,t){return QD(e,t.x1,t.y1)&&QD(e,t.x2,t.y2)},Wze=Math.hypot??function(e,t){return Math.sqrt(e*e+t*t)},tO=function(e,t,n,r,i,a,o){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:`auto`,l=s===`auto`?hO(i,a):s,u=i/2,d=a/2;l=Math.min(l,u,d);var f=l!==u,p=l!==d,m;if(f){var h=n-u+l-o,g=r-d-o;if(m=lO(e,t,n,r,h,g,n+u-l+o,g,!1),m.length>0)return m}if(p){var _=n+u+o;if(m=lO(e,t,n,r,_,r-d+l-o,_,r+d-l+o,!1),m.length>0)return m}if(f){var v=n-u+l-o,y=r+d+o;if(m=lO(e,t,n,r,v,y,n+u-l+o,y,!1),m.length>0)return m}if(p){var b=n-u-o;if(m=lO(e,t,n,r,b,r-d+l-o,b,r+d-l+o,!1),m.length>0)return m}var x,S=n-u+l,C=r-d+l;if(x=sO(e,t,n,r,S,C,l+o),x.length>0&&x[0]<=S&&x[1]<=C)return[x[0],x[1]];var w=n+u-l,T=r-d+l;if(x=sO(e,t,n,r,w,T,l+o),x.length>0&&x[0]>=w&&x[1]<=T)return[x[0],x[1]];var E=n+u-l,D=r+d-l;if(x=sO(e,t,n,r,E,D,l+o),x.length>0&&x[0]>=E&&x[1]>=D)return[x[0],x[1]];var O=n-u+l,k=r+d-l;return x=sO(e,t,n,r,O,k,l+o),x.length>0&&x[0]<=O&&x[1]>=k?[x[0],x[1]]:[]},Gze=function(e,t,n,r,i,a,o){var s=o,l=Math.min(n,i),u=Math.max(n,i),d=Math.min(r,a),f=Math.max(r,a);return l-s<=e&&e<=u+s&&d-s<=t&&t<=f+s},Kze=function(e,t,n,r,i,a,o,s,l){var u={x1:Math.min(n,o,i)-l,x2:Math.max(n,o,i)+l,y1:Math.min(r,s,a)-l,y2:Math.max(r,s,a)+l};return!(e<u.x1||e>u.x2||t<u.y1||t>u.y2)},qze=function(e,t,n,r){n-=r;var i=t*t-4*e*n;if(i<0)return[];var a=Math.sqrt(i),o=2*e;return[(-t+a)/o,(-t-a)/o]},Jze=function(e,t,n,r,i){e===0&&(e=1e-5),t/=e,n/=e,r/=e;var a,o=(3*n-t*t)/9,s=-(27*r)+t*(9*n-t*t*2),l,u,d,f,p;if(s/=54,a=o*o*o+s*s,i[1]=0,f=t/3,a>0){u=s+Math.sqrt(a),u=u<0?-((-u)**(1/3)):u**(1/3),d=s-Math.sqrt(a),d=d<0?-((-d)**(1/3)):d**(1/3),i[0]=-f+u+d,f+=(u+d)/2,i[4]=i[2]=-f,f=Math.sqrt(3)*(-d+u)/2,i[3]=f,i[5]=-f;return}if(i[5]=i[3]=0,a===0){p=s<0?-((-s)**(1/3)):s**(1/3),i[0]=-f+2*p,i[4]=i[2]=-(p+f);return}o=-o,l=o*o*o,l=Math.acos(s/Math.sqrt(l)),p=2*Math.sqrt(o),i[0]=-f+p*Math.cos(l/3),i[2]=-f+p*Math.cos((l+2*Math.PI)/3),i[4]=-f+p*Math.cos((l+4*Math.PI)/3)},Yze=function(e,t,n,r,i,a,o,s){var l=1*n*n-4*n*i+2*n*o+4*i*i-4*i*o+o*o+r*r-4*r*a+2*r*s+4*a*a-4*a*s+s*s,u=9*n*i-3*n*n-3*n*o-6*i*i+3*i*o+9*r*a-3*r*r-3*r*s-6*a*a+3*a*s,d=3*n*n-6*n*i+n*o-n*e+2*i*i+2*i*e-o*e+3*r*r-6*r*a+r*s-r*t+2*a*a+2*a*t-s*t,f=1*n*i-n*n+n*e-i*e+r*a-r*r+r*t-a*t,p=[];Jze(l,u,d,f,p);for(var m=1e-7,h=[],g=0;g<6;g+=2)Math.abs(p[g+1])<m&&p[g]>=0&&p[g]<=1&&h.push(p[g]);h.push(1),h.push(0);for(var _=-1,v,y,b,x=0;x<h.length;x++)v=(1-h[x])**2*n+2*(1-h[x])*h[x]*i+h[x]*h[x]*o,y=(1-h[x])**2*r+2*(1-h[x])*h[x]*a+h[x]*h[x]*s,b=(v-e)**2+(y-t)**2,_>=0?b<_&&(_=b):_=b;return _},Xze=function(e,t,n,r,i,a){var o=[e-n,t-r],s=[i-n,a-r],l=s[0]*s[0]+s[1]*s[1],u=o[0]*o[0]+o[1]*o[1],d=o[0]*s[0]+o[1]*s[1],f=d*d/l;return d<0?u:f>l?(e-i)*(e-i)+(t-a)*(t-a):u-f},nO=function(e,t,n){for(var r,i,a,o,s,l=0,u=0;u<n.length/2;u++)if(r=n[u*2],i=n[u*2+1],u+1<n.length/2?(a=n[(u+1)*2],o=n[(u+1)*2+1]):(a=n[(u+1-n.length/2)*2],o=n[(u+1-n.length/2)*2+1]),r!=e||a!=e){if(r>=e&&e>=a||r<=e&&e<=a)s=(e-r)/(a-r)*(o-i)+i,s>t&&l++;else continue}return l%2!=0},rO=function(e,t,n,r,i,a,o,s,l){var u=Array(n.length),d;s[0]==null?d=s:(d=Math.atan(s[1]/s[0]),s[0]<0?d+=Math.PI/2:d=-d-Math.PI/2);for(var f=Math.cos(-d),p=Math.sin(-d),m=0;m<u.length/2;m++)u[m*2]=a/2*(n[m*2]*f-n[m*2+1]*p),u[m*2+1]=o/2*(n[m*2+1]*f+n[m*2]*p),u[m*2]+=r,u[m*2+1]+=i;var h=l>0?iO(aO(u,-l)):u;return nO(e,t,h)},Zze=function(e,t,n,r,i,a,o,s){for(var l=Array(n.length*2),u=0;u<s.length;u++){var d=s[u];if(l[u*4+0]=d.startX,l[u*4+1]=d.startY,l[u*4+2]=d.stopX,l[u*4+3]=d.stopY,(d.cx-e)**2+(d.cy-t)**2<=d.radius**2)return!0}return nO(e,t,l)},iO=function(e){for(var t=Array(e.length/2),n,r,i,a,o,s,l,u,d=0;d<e.length/4;d++){n=e[d*4],r=e[d*4+1],i=e[d*4+2],a=e[d*4+3],d<e.length/4-1?(o=e[(d+1)*4],s=e[(d+1)*4+1],l=e[(d+1)*4+2],u=e[(d+1)*4+3]):(o=e[0],s=e[1],l=e[2],u=e[3]);var f=lO(n,r,i,a,o,s,l,u,!0);t[d*2]=f[0],t[d*2+1]=f[1]}return t},aO=function(e,t){for(var n=Array(e.length*2),r,i,a,o,s=0;s<e.length/2;s++){r=e[s*2],i=e[s*2+1],s<e.length/2-1?(a=e[(s+1)*2],o=e[(s+1)*2+1]):(a=e[0],o=e[1]);var l=o-i,u=-(a-r),d=Math.sqrt(l*l+u*u),f=l/d,p=u/d;n[s*4]=r+f*t,n[s*4+1]=i+p*t,n[s*4+2]=a+f*t,n[s*4+3]=o+p*t}return n},Qze=function(e,t,n,r,i,a){var o=n-e,s=r-t;o/=i,s/=a;var l=Math.sqrt(o*o+s*s),u=l-1;if(u<0)return[];var d=u/l;return[(n-e)*d+e,(r-t)*d+t]},oO=function(e,t,n,r,i,a,o){return e-=i,t-=a,e/=n/2+o,t/=r/2+o,e*e+t*t<=1},sO=function(e,t,n,r,i,a,o){var s=[n-e,r-t],l=[e-i,t-a],u=s[0]*s[0]+s[1]*s[1],d=2*(l[0]*s[0]+l[1]*s[1]),f=l[0]*l[0]+l[1]*l[1]-o*o,p=d*d-4*u*f;if(p<0)return[];var m=(-d+Math.sqrt(p))/(2*u),h=(-d-Math.sqrt(p))/(2*u),g=Math.min(m,h),_=Math.max(m,h),v=[];if(g>=0&&g<=1&&v.push(g),_>=0&&_<=1&&v.push(_),v.length===0)return[];var y=v[0]*s[0]+e,b=v[0]*s[1]+t;return v.length>1?v[0]==v[1]?[y,b]:[y,b,v[1]*s[0]+e,v[1]*s[1]+t]:[y,b]},cO=function(e,t,n){return t<=e&&e<=n||n<=e&&e<=t?e:e<=t&&t<=n||n<=t&&t<=e?t:n},lO=function(e,t,n,r,i,a,o,s,l){var u=e-i,d=n-e,f=o-i,p=t-a,m=r-t,h=s-a,g=f*p-h*u,_=d*p-m*u,v=h*d-f*m;if(v!==0){var y=g/v,b=_/v,x=.001,S=0-x,C=1+x;return S<=y&&y<=C&&S<=b&&b<=C||l?[e+y*d,t+y*m]:[]}return g===0||_===0?cO(e,n,o)===o?[o,s]:cO(e,n,i)===i?[i,a]:cO(i,o,n)===n?[n,r]:[]:[]},$ze=function(e,t,n,r,i){var a=[],o=r/2,s=i/2,l=t,u=n;a.push({x:l+o*e[0],y:u+s*e[1]});for(var d=1;d<e.length/2;d++)a.push({x:l+o*e[d*2],y:u+s*e[d*2+1]});return a},uO=function(e,t,n,r,i,a,o,s){var l=[],u,d=Array(n.length),f=!0;a??(f=!1);var p;if(f){for(var m=0;m<d.length/2;m++)d[m*2]=n[m*2]*a+r,d[m*2+1]=n[m*2+1]*o+i;p=s>0?iO(aO(d,-s)):d}else p=n;for(var h,g,_,v,y=0;y<p.length/2;y++)h=p[y*2],g=p[y*2+1],y<p.length/2-1?(_=p[(y+1)*2],v=p[(y+1)*2+1]):(_=p[0],v=p[1]),u=lO(e,t,r,i,h,g,_,v),u.length!==0&&l.push(u[0],u[1]);return l},eBe=function(e,t,n,r,i,a,o,s,l){var u=[],d,f=Array(n.length*2);l.forEach(function(n,a){a===0?(f[f.length-2]=n.startX,f[f.length-1]=n.startY):(f[a*4-2]=n.startX,f[a*4-1]=n.startY),f[a*4]=n.stopX,f[a*4+1]=n.stopY,d=sO(e,t,r,i,n.cx,n.cy,n.radius),d.length!==0&&u.push(d[0],d[1])});for(var p=0;p<f.length/4;p++)d=lO(e,t,r,i,f[p*4],f[p*4+1],f[p*4+2],f[p*4+3],!1),d.length!==0&&u.push(d[0],d[1]);if(u.length>2){for(var m=[u[0],u[1]],h=(m[0]-e)**2+(m[1]-t)**2,g=1;g<u.length/2;g++){var _=(u[g*2]-e)**2+(u[g*2+1]-t)**2;_<=h&&(m[0]=u[g*2],m[1]=u[g*2+1],h=_)}return m}return u},dO=function(e,t,n){var r=[e[0]-t[0],e[1]-t[1]],i=Math.sqrt(r[0]*r[0]+r[1]*r[1]),a=(i-n)/i;return a<0&&(a=1e-5),[t[0]+a*r[0],t[1]+a*r[1]]},fO=function(e,t){var n=mO(e,t);return n=pO(n),n},pO=function(e){for(var t,n,r=e.length/2,i=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<r;l++)t=e[2*l],n=e[2*l+1],i=Math.min(i,t),o=Math.max(o,t),a=Math.min(a,n),s=Math.max(s,n);for(var u=2/(o-i),d=2/(s-a),f=0;f<r;f++)t=e[2*f]=e[2*f]*u,n=e[2*f+1]=e[2*f+1]*d,i=Math.min(i,t),o=Math.max(o,t),a=Math.min(a,n),s=Math.max(s,n);if(a<-1)for(var p=0;p<r;p++)n=e[2*p+1]=e[2*p+1]+(-1-a);return e},mO=function(e,t){var n=1/e*2*Math.PI,r=e%2==0?Math.PI/2+n/2:Math.PI/2;r+=t;for(var i=Array(e*2),a,o=0;o<e;o++)a=o*n+r,i[2*o]=Math.cos(a),i[2*o+1]=Math.sin(-a);return i},hO=function(e,t){return Math.min(e/4,t/4,8)},gO=function(e,t){return Math.min(e/10,t/10,8)},_O=function(){return 8},tBe=function(e,t,n){return[e-2*t+n,2*(t-e),e]},vO=function(e,t){return{heightOffset:Math.min(15,.05*t),widthOffset:Math.min(100,.25*e),ctrlPtOffsetPct:.05}},nBe=bD({dampingFactor:.8,precision:1e-6,iterations:200,weight:function(e){return 1}}),rBe={pageRank:function(e){for(var t=nBe(e),n=t.dampingFactor,r=t.precision,i=t.iterations,a=t.weight,o=this._private.cy,s=this.byGroup(),l=s.nodes,u=s.edges,d=l.length,f=d*d,p=u.length,m=Array(f),h=Array(d),g=(1-n)/d,_=0;_<d;_++){for(var v=0;v<d;v++){var y=_*d+v;m[y]=0}h[_]=0}for(var b=0;b<p;b++){var x=u[b],S=x.data(`source`),C=x.data(`target`);if(S!==C){var w=l.indexOfId(S),T=l.indexOfId(C),E=a(x),D=T*d+w;m[D]+=E,h[w]+=E}}for(var O=1/d+g,k=0;k<d;k++)if(h[k]===0)for(var A=0;A<d;A++){var j=A*d+k;m[j]=O}else for(var M=0;M<d;M++){var N=M*d+k;m[N]=m[N]/h[k]+g}for(var P=Array(d),F=Array(d),I,L=0;L<d;L++)P[L]=1;for(var R=0;R<i;R++){for(var ee=0;ee<d;ee++)F[ee]=0;for(var z=0;z<d;z++)for(var B=0;B<d;B++){var te=z*d+B;F[z]+=m[te]*P[B]}zze(F),I=P,P=F,F=I;for(var ne=0,re=0;re<d;re++){var ie=I[re]-P[re];ne+=ie*ie}if(ne<r)break}return{rank:function(e){return e=o.collection(e)[0],P[l.indexOf(e)]}}}},yO=bD({root:null,weight:function(e){return 1},directed:!1,alpha:0}),bO={degreeCentralityNormalized:function(e){e=yO(e);var t=this.cy(),n=this.nodes(),r=n.length;if(e.directed){for(var i={},a={},o=0,s=0,l=0;l<r;l++){var u=n[l],d=u.id();e.root=u;var f=this.degreeCentrality(e);o<f.indegree&&(o=f.indegree),s<f.outdegree&&(s=f.outdegree),i[d]=f.indegree,a[d]=f.outdegree}return{indegree:function(e){return o==0?0:(oE(e)&&(e=t.filter(e)),i[e.id()]/o)},outdegree:function(e){return s===0?0:(oE(e)&&(e=t.filter(e)),a[e.id()]/s)}}}for(var p={},m=0,h=0;h<r;h++){var g=n[h];e.root=g;var _=this.degreeCentrality(e);m<_.degree&&(m=_.degree),p[g.id()]=_.degree}return{degree:function(e){return m===0?0:(oE(e)&&(e=t.filter(e)),p[e.id()]/m)}}},degreeCentrality:function(e){e=yO(e);var t=this.cy(),n=this,r=e,i=r.root,a=r.weight,o=r.directed,s=r.alpha;if(i=t.collection(i)[0],o){for(var l=i.connectedEdges(),u=l.filter(function(e){return e.target().same(i)&&n.has(e)}),d=l.filter(function(e){return e.source().same(i)&&n.has(e)}),f=u.length,p=d.length,m=0,h=0,g=0;g<u.length;g++)m+=a(u[g]);for(var _=0;_<d.length;_++)h+=a(d[_]);return{indegree:f**(1-s)*m**+s,outdegree:p**(1-s)*h**+s}}for(var v=i.connectedEdges().intersection(n),y=v.length,b=0,x=0;x<v.length;x++)b+=a(v[x]);return{degree:y**(1-s)*b**+s}}},bO.dc=bO.degreeCentrality,bO.dcn=bO.degreeCentralityNormalised=bO.degreeCentralityNormalized,xO=bD({harmonic:!0,weight:function(){return 1},directed:!1,root:null}),SO={closenessCentralityNormalized:function(e){for(var t=xO(e),n=t.harmonic,r=t.weight,i=t.directed,a=this.cy(),o={},s=0,l=this.nodes(),u=this.floydWarshall({weight:r,directed:i}),d=0;d<l.length;d++){for(var f=0,p=l[d],m=0;m<l.length;m++)if(d!==m){var h=u.distance(p,l[m]);f+=n?1/h:h}n||(f=1/f),s<f&&(s=f),o[p.id()]=f}return{closeness:function(e){return s==0?0:(e=oE(e)?a.filter(e)[0].id():e.id(),o[e]/s)}}},closenessCentrality:function(e){var t=xO(e),n=t.root,r=t.weight,i=t.directed,a=t.harmonic;n=this.filter(n)[0];for(var o=this.dijkstra({root:n,weight:r,directed:i}),s=0,l=this.nodes(),u=0;u<l.length;u++){var d=l[u];if(!d.same(n)){var f=o.distanceTo(d);s+=a?1/f:f}}return a?s:1/s}},SO.cc=SO.closenessCentrality,SO.ccn=SO.closenessCentralityNormalised=SO.closenessCentralityNormalized,iBe=bD({weight:null,directed:!1}),CO={betweennessCentrality:function(e){for(var t=iBe(e),n=t.directed,r=t.weight,i=r!=null,a=this.cy(),o=this.nodes(),s={},l={},u=0,d={set:function(e,t){l[e]=t,t>u&&(u=t)},get:function(e){return l[e]}},f=0;f<o.length;f++){var p=o[f],m=p.id();s[m]=n?p.outgoers().nodes():p.openNeighborhood().nodes(),d.set(m,0)}for(var h=function(){for(var e=o[g].id(),t=[],n={},l={},u={},f=new MD(function(e,t){return u[e]-u[t]}),p=0;p<o.length;p++){var m=o[p].id();n[m]=[],l[m]=0,u[m]=1/0}for(l[e]=1,u[e]=0,f.push(e);!f.empty();){var h=f.pop();if(t.push(h),i)for(var _=0;_<s[h].length;_++){var v=s[h][_],y=a.getElementById(h),b=void 0;b=y.edgesTo(v).length>0?y.edgesTo(v)[0]:v.edgesTo(y)[0];var x=r(b);v=v.id(),u[v]>u[h]+x&&(u[v]=u[h]+x,f.nodes.indexOf(v)<0?f.push(v):f.updateItem(v),l[v]=0,n[v]=[]),u[v]==u[h]+x&&(l[v]=l[v]+l[h],n[v].push(h))}else for(var S=0;S<s[h].length;S++){var C=s[h][S].id();u[C]==1/0&&(f.push(C),u[C]=u[h]+1),u[C]==u[h]+1&&(l[C]=l[C]+l[h],n[C].push(h))}}for(var w={},T=0;T<o.length;T++)w[o[T].id()]=0;for(;t.length>0;){for(var E=t.pop(),D=0;D<n[E].length;D++){var O=n[E][D];w[O]=w[O]+l[O]/l[E]*(1+w[E])}E!=o[g].id()&&d.set(E,d.get(E)+w[E])}},g=0;g<o.length;g++)h();var _={betweenness:function(e){var t=a.collection(e).id();return d.get(t)},betweennessNormalized:function(e){if(u==0)return 0;var t=a.collection(e).id();return d.get(t)/u}};return _.betweennessNormalised=_.betweennessNormalized,_}},CO.bc=CO.betweennessCentrality,aBe=bD({expandFactor:2,inflateFactor:2,multFactor:1,maxIterations:20,attributes:[function(e){return 1}]}),oBe=function(e){return aBe(e)},sBe=function(e,t){for(var n=0,r=0;r<t.length;r++)n+=t[r](e);return n},cBe=function(e,t,n){for(var r=0;r<t;r++)e[r*t+r]=n},wO=function(e,t){for(var n,r=0;r<t;r++){n=0;for(var i=0;i<t;i++)n+=e[i*t+r];for(var a=0;a<t;a++)e[a*t+r]=e[a*t+r]/n}},lBe=function(e,t,n){for(var r=Array(n*n),i=0;i<n;i++){for(var a=0;a<n;a++)r[i*n+a]=0;for(var o=0;o<n;o++)for(var s=0;s<n;s++)r[i*n+s]+=e[i*n+o]*t[o*n+s]}return r},uBe=function(e,t,n){for(var r=e.slice(0),i=1;i<n;i++)e=lBe(e,r,t);return e},dBe=function(e,t,n){for(var r=Array(t*t),i=0;i<t*t;i++)r[i]=e[i]**+n;return wO(r,t),r},fBe=function(e,t,n,r){for(var i=0;i<n;i++)if(Math.round(e[i]*10**r)/10**r!=Math.round(t[i]*10**r)/10**r)return!1;return!0},pBe=function(e,t,n,r){for(var i=[],a=0;a<t;a++){for(var o=[],s=0;s<t;s++)Math.round(e[a*t+s]*1e3)/1e3>0&&o.push(n[s]);o.length!==0&&i.push(r.collection(o))}return i},mBe=function(e,t){for(var n=0;n<e.length;n++)if(!t[n]||e[n].id()!==t[n].id())return!1;return!0},hBe=function(e){for(var t=0;t<e.length;t++)for(var n=0;n<e.length;n++)t!=n&&mBe(e[t],e[n])&&e.splice(n,1);return e},TO=function(e){for(var t=this.nodes(),n=this.edges(),r=this.cy(),i=oBe(e),a={},o=0;o<t.length;o++)a[t[o].id()]=o;for(var s=t.length,l=s*s,u=Array(l),d,f=0;f<l;f++)u[f]=0;for(var p=0;p<n.length;p++){var m=n[p],h=a[m.source().id()],g=a[m.target().id()],_=sBe(m,i.attributes);u[h*s+g]+=_,u[g*s+h]+=_}cBe(u,s,i.multFactor),wO(u,s);for(var v=!0,y=0;v&&y<i.maxIterations;)v=!1,d=uBe(u,s,i.expandFactor),u=dBe(d,s,i.inflateFactor),fBe(u,d,l,4)||(v=!0),y++;var b=pBe(u,s,t,r);return b=hBe(b),b},gBe={markovClustering:TO,mcl:TO},_Be=function(e){return e},EO=function(e,t){return Math.abs(t-e)},DO=function(e,t,n){return e+EO(t,n)},OO=function(e,t,n){return e+(n-t)**2},vBe=function(e){return Math.sqrt(e)},yBe=function(e,t,n){return Math.max(e,EO(t,n))},kO=function(e,t,n,r,i){for(var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:_Be,o=r,s,l,u=0;u<e;u++)s=t(u),l=n(u),o=i(o,s,l);return a(o)},AO={euclidean:function(e,t,n){return e>=2?kO(e,t,n,0,OO,vBe):kO(e,t,n,0,DO)},squaredEuclidean:function(e,t,n){return kO(e,t,n,0,OO)},manhattan:function(e,t,n){return kO(e,t,n,0,DO)},max:function(e,t,n){return kO(e,t,n,-1/0,yBe)}},AO[`squared-euclidean`]=AO.squaredEuclidean,AO.squaredeuclidean=AO.squaredEuclidean,bBe=bD({k:2,m:2,sensitivityThreshold:1e-4,distance:`euclidean`,maxIterations:10,attributes:[],testMode:!1,testCentroids:null}),jO=function(e){return bBe(e)},MO=function(e,t,n,r,i){var a=i===`kMedoids`?function(e){return r[e](n)}:function(e){return n[e]},o=function(e){return r[e](t)},s=n,l=t;return vT(e,r.length,a,o,s,l)},NO=function(e,t,n){for(var r=n.length,i=Array(r),a=Array(r),o=Array(t),s=null,l=0;l<r;l++)i[l]=e.min(n[l]).value,a[l]=e.max(n[l]).value;for(var u=0;u<t;u++){s=[];for(var d=0;d<r;d++)s[d]=Math.random()*(a[d]-i[d])+i[d];o[u]=s}return o},PO=function(e,t,n,r,i){for(var a=1/0,o=0,s=0;s<t.length;s++){var l=MO(n,e,t[s],r,i);l<a&&(a=l,o=s)}return o},FO=function(e,t,n){for(var r=[],i=null,a=0;a<t.length;a++)i=t[a],n[i.id()]===e&&r.push(i);return r},xBe=function(e,t,n){return Math.abs(t-e)<=n},SBe=function(e,t,n){for(var r=0;r<e.length;r++)for(var i=0;i<e[r].length;i++)if(Math.abs(e[r][i]-t[r][i])>n)return!1;return!0},CBe=function(e,t,n){for(var r=0;r<n;r++)if(e===t[r])return!0;return!1},IO=function(e,t){var n=Array(t);if(e.length<50)for(var r=0;r<t;r++){for(var i=e[Math.floor(Math.random()*e.length)];CBe(i,n,r);)i=e[Math.floor(Math.random()*e.length)];n[r]=i}else for(var a=0;a<t;a++)n[a]=e[Math.floor(Math.random()*e.length)];return n},LO=function(e,t,n){for(var r=0,i=0;i<t.length;i++)r+=MO(`manhattan`,t[i],e,n,`kMedoids`);return r},wBe=function(e){var t=this.cy(),n=this.nodes(),r=null,i=jO(e),a=Array(i.k),o={},s;i.testMode?typeof i.testCentroids==`number`?(i.testCentroids,s=NO(n,i.k,i.attributes)):s=uT(i.testCentroids)===`object`?i.testCentroids:NO(n,i.k,i.attributes):s=NO(n,i.k,i.attributes);for(var l=!0,u=0;l&&u<i.maxIterations;){for(var d=0;d<n.length;d++)r=n[d],o[r.id()]=PO(r,s,i.distance,i.attributes,`kMeans`);l=!1;for(var f=0;f<i.k;f++){var p=FO(f,n,o);if(p.length!==0){for(var m=i.attributes.length,h=s[f],g=Array(m),_=Array(m),v=0;v<m;v++){_[v]=0;for(var y=0;y<p.length;y++)r=p[y],_[v]+=i.attributes[v](r);g[v]=_[v]/p.length,xBe(g[v],h[v],i.sensitivityThreshold)||(l=!0)}s[f]=g,a[f]=t.collection(p)}}u++}return a},TBe=function(e){var t=this.cy(),n=this.nodes(),r=null,i=jO(e),a=Array(i.k),o,s={},l,u=Array(i.k);i.testMode?typeof i.testCentroids==`number`||(o=uT(i.testCentroids)===`object`?i.testCentroids:IO(n,i.k)):o=IO(n,i.k);for(var d=!0,f=0;d&&f<i.maxIterations;){for(var p=0;p<n.length;p++)r=n[p],s[r.id()]=PO(r,o,i.distance,i.attributes,`kMedoids`);d=!1;for(var m=0;m<o.length;m++){var h=FO(m,n,s);if(h.length!==0){u[m]=LO(o[m],h,i.attributes);for(var g=0;g<h.length;g++)l=LO(h[g],h,i.attributes),l<u[m]&&(u[m]=l,o[m]=h[g],d=!0);a[m]=t.collection(h)}}f++}return a},EBe=function(e,t,n,r,i){for(var a,o,s=0;s<t.length;s++)for(var l=0;l<e.length;l++)r[s][l]=n[s][l]**+i.m;for(var u=0;u<e.length;u++)for(var d=0;d<i.attributes.length;d++){a=0,o=0;for(var f=0;f<t.length;f++)a+=r[f][u]*i.attributes[d](t[f]),o+=r[f][u];e[u][d]=a/o}},DBe=function(e,t,n,r,i){for(var a=0;a<e.length;a++)t[a]=e[a].slice();for(var o,s,l,u=2/(i.m-1),d=0;d<n.length;d++)for(var f=0;f<r.length;f++){o=0;for(var p=0;p<n.length;p++)s=MO(i.distance,r[f],n[d],i.attributes,`cmeans`),l=MO(i.distance,r[f],n[p],i.attributes,`cmeans`),o+=(s/l)**+u;e[f][d]=1/o}},OBe=function(e,t,n,r){for(var i=Array(n.k),a=0;a<i.length;a++)i[a]=[];for(var o,s,l=0;l<t.length;l++){o=-1/0,s=-1;for(var u=0;u<t[0].length;u++)t[l][u]>o&&(o=t[l][u],s=u);i[s].push(e[l])}for(var d=0;d<i.length;d++)i[d]=r.collection(i[d]);return i},RO=function(e){for(var t=this.cy(),n=this.nodes(),r=jO(e),i,a,o,s=Array(n.length),l,u=0;u<n.length;u++)s[u]=Array(r.k);o=Array(n.length);for(var d=0;d<n.length;d++)o[d]=Array(r.k);for(var f=0;f<n.length;f++){for(var p=0,m=0;m<r.k;m++)o[f][m]=Math.random(),p+=o[f][m];for(var h=0;h<r.k;h++)o[f][h]=o[f][h]/p}a=Array(r.k);for(var g=0;g<r.k;g++)a[g]=Array(r.attributes.length);l=Array(n.length);for(var _=0;_<n.length;_++)l[_]=Array(r.k);for(var v=!0,y=0;v&&y<r.maxIterations;)v=!1,EBe(a,n,o,l,r),DBe(o,s,a,n,r),SBe(o,s,r.sensitivityThreshold)||(v=!0),y++;return i=OBe(n,o,r,t),{clusters:i,degreeOfMembership:o}},kBe={kMeans:wBe,kMedoids:TBe,fuzzyCMeans:RO,fcm:RO},ABe=bD({distance:`euclidean`,linkage:`min`,mode:`threshold`,threshold:1/0,addDendrogram:!1,dendrogramDepth:0,attributes:[]}),jBe={single:`min`,complete:`max`},MBe=function(e){var t=ABe(e),n=jBe[t.linkage];return n!=null&&(t.linkage=n),t},zO=function(e,t,n,r,i){for(var a=0,o=1/0,s,l=i.attributes,u=function(e,t){return vT(i.distance,l.length,function(t){return l[t](e)},function(e){return l[e](t)},e,t)},d=0;d<e.length;d++){var f=e[d].key,p=n[f][r[f]];p<o&&(a=f,o=p)}if(i.mode===`threshold`&&o>=i.threshold||i.mode===`dendrogram`&&e.length===1)return!1;var m=t[a],h=t[r[a]],g=i.mode===`dendrogram`?{left:m,right:h,key:m.key}:{value:m.value.concat(h.value),key:m.key};e[m.index]=g,e.splice(h.index,1),t[m.key]=g;for(var _=0;_<e.length;_++){var v=e[_];m.key===v.key?s=1/0:i.linkage===`min`?(s=n[m.key][v.key],n[m.key][v.key]>n[h.key][v.key]&&(s=n[h.key][v.key])):i.linkage===`max`?(s=n[m.key][v.key],n[m.key][v.key]<n[h.key][v.key]&&(s=n[h.key][v.key])):s=i.linkage===`mean`?(n[m.key][v.key]*m.size+n[h.key][v.key]*h.size)/(m.size+h.size):i.mode===`dendrogram`?u(v.value,m.value):u(v.value[0],m.value[0]),n[m.key][v.key]=n[v.key][m.key]=s}for(var y=0;y<e.length;y++){var b=e[y].key;if(r[b]===m.key||r[b]===h.key){for(var x=b,S=0;S<e.length;S++){var C=e[S].key;n[b][C]<n[b][x]&&(x=C)}r[b]=x}e[y].index=y}return m.key=h.key=m.index=h.index=null,!0},BO=function(e,t,n){e&&(e.value?t.push(e.value):(e.left&&BO(e.left,t),e.right&&BO(e.right,t)))},VO=function(e,t){if(!e)return``;if(e.left&&e.right){var n=VO(e.left,t),r=VO(e.right,t),i=t.add({group:`nodes`,data:{id:n+`,`+r}});return t.add({group:`edges`,data:{source:n,target:i.id()}}),t.add({group:`edges`,data:{source:r,target:i.id()}}),i.id()}if(e.value)return e.value.id()},HO=function(e,t,n){if(!e)return[];var r=[],i=[],a=[];return t===0?(e.left&&BO(e.left,r),e.right&&BO(e.right,i),a=r.concat(i),[n.collection(a)]):t===1?e.value?[n.collection(e.value)]:(e.left&&BO(e.left,r),e.right&&BO(e.right,i),[n.collection(r),n.collection(i)]):e.value?[n.collection(e.value)]:(e.left&&(r=HO(e.left,t-1,n)),e.right&&(i=HO(e.right,t-1,n)),r.concat(i))},UO=function(e){for(var t=this.cy(),n=this.nodes(),r=MBe(e),i=r.attributes,a=function(e,t){return vT(r.distance,i.length,function(t){return i[t](e)},function(e){return i[e](t)},e,t)},o=[],s=[],l=[],u=[],d=0;d<n.length;d++){var f={value:r.mode===`dendrogram`?n[d]:[n[d]],key:d,index:d};o[d]=f,u[d]=f,s[d]=[],l[d]=0}for(var p=0;p<o.length;p++)for(var m=0;m<=p;m++){var h=void 0;h=r.mode===`dendrogram`?p===m?1/0:a(o[p].value,o[m].value):p===m?1/0:a(o[p].value[0],o[m].value[0]),s[p][m]=h,s[m][p]=h,h<s[p][l[p]]&&(l[p]=m)}for(var g=zO(o,u,s,l,r);g;)g=zO(o,u,s,l,r);var _;return r.mode===`dendrogram`?(_=HO(o[0],r.dendrogramDepth,t),r.addDendrogram&&VO(o[0],t)):(_=Array(o.length),o.forEach(function(e,n){e.key=e.index=null,_[n]=t.collection(e.value)})),_},NBe={hierarchicalClustering:UO,hca:UO},PBe=bD({distance:`euclidean`,preference:`median`,damping:.8,maxIterations:1e3,minIterations:100,attributes:[]}),FBe=function(e){var t=e.damping,n=e.preference;.5<=t&&t<1||mD(`Damping must range on [0.5, 1). Got: ${t}`);var r=[`median`,`mean`,`min`,`max`];return r.some(function(e){return e===n})||uE(n)||mD(`Preference must be one of [${r.map(function(e){return`'${e}'`}).join(`, `)}] or a number. Got: ${n}`),PBe(e)},IBe=function(e,t,n,r){var i=function(e,t){return r[t](e)};return-vT(e,r.length,function(e){return i(t,e)},function(e){return i(n,e)},t,n)},LBe=function(e,t){var n=null;return n=t===`median`?Ize(e):t===`mean`?Fze(e):t===`min`?Nze(e):t===`max`?Pze(e):t,n},RBe=function(e,t,n){for(var r=[],i=0;i<e;i++)t[i*e+i]+n[i*e+i]>0&&r.push(i);return r},WO=function(e,t,n){for(var r=[],i=0;i<e;i++){for(var a=-1,o=-1/0,s=0;s<n.length;s++){var l=n[s];t[i*e+l]>o&&(a=l,o=t[i*e+l])}a>0&&r.push(a)}for(var u=0;u<n.length;u++)r[n[u]]=n[u];return r},zBe=function(e,t,n){for(var r=WO(e,t,n),i=0;i<n.length;i++){for(var a=[],o=0;o<r.length;o++)r[o]===n[i]&&a.push(o);for(var s=-1,l=-1/0,u=0;u<a.length;u++){for(var d=0,f=0;f<a.length;f++)d+=t[a[f]*e+a[u]];d>l&&(s=u,l=d)}n[i]=a[s]}return r=WO(e,t,n),r},GO=function(e){for(var t=this.cy(),n=this.nodes(),r=FBe(e),i={},a=0;a<n.length;a++)i[n[a].id()]=a;for(var o=n.length,s=o*o,l=Array(s),u,d,f,p=0;p<s;p++)l[p]=-1/0;for(var m=0;m<o;m++)for(var h=0;h<o;h++)m!==h&&(l[m*o+h]=IBe(r.distance,n[m],n[h],r.attributes));u=LBe(l,r.preference);for(var g=0;g<o;g++)l[g*o+g]=u;d=Array(s);for(var _=0;_<s;_++)d[_]=0;f=Array(s);for(var v=0;v<s;v++)f[v]=0;for(var y=Array(o),b=Array(o),x=Array(o),S=0;S<o;S++)y[S]=0,b[S]=0,x[S]=0;for(var C=Array(o*r.minIterations),w=0;w<C.length;w++)C[w]=0;var T;for(T=0;T<r.maxIterations;T++){for(var E=0;E<o;E++){for(var D=-1/0,O=-1/0,k=-1,A=0,j=0;j<o;j++)y[j]=d[E*o+j],A=f[E*o+j]+l[E*o+j],A>=D?(O=D,D=A,k=j):A>O&&(O=A);for(var M=0;M<o;M++)d[E*o+M]=(1-r.damping)*(l[E*o+M]-D)+r.damping*y[M];d[E*o+k]=(1-r.damping)*(l[E*o+k]-O)+r.damping*y[k]}for(var N=0;N<o;N++){for(var P=0,F=0;F<o;F++)y[F]=f[F*o+N],b[F]=Math.max(0,d[F*o+N]),P+=b[F];P-=b[N],b[N]=d[N*o+N],P+=b[N];for(var I=0;I<o;I++)f[I*o+N]=(1-r.damping)*Math.min(0,P-b[I])+r.damping*y[I];f[N*o+N]=(1-r.damping)*(P-b[N])+r.damping*y[N]}for(var L=0,R=0;R<o;R++){var ee=+(f[R*o+R]+d[R*o+R]>0);C[T%r.minIterations*o+R]=ee,L+=ee}if(L>0&&(T>=r.minIterations-1||T==r.maxIterations-1)){for(var z=0,B=0;B<o;B++){x[B]=0;for(var te=0;te<r.minIterations;te++)x[B]+=C[te*o+B];(x[B]===0||x[B]===r.minIterations)&&z++}if(z===o)break}}for(var ne=RBe(o,d,f),re=zBe(o,l,ne),ie={},ae=0;ae<ne.length;ae++)ie[ne[ae]]=[];for(var oe=0;oe<n.length;oe++){var se=re[i[n[oe].id()]];se!=null&&ie[se].push(n[oe])}for(var ce=Array(ne.length),le=0;le<ne.length;le++)ce[le]=t.collection(ie[ne[le]]);return ce},BBe={affinityPropagation:GO,ap:GO},VBe=bD({root:void 0,directed:!1}),HBe={hierholzer:function(e){if(!lE(e)){var t=arguments;e={root:t[0],directed:t[1]}}var n=VBe(e),r=n.root,i=n.directed,a=this,o=!1,s,l,u;r&&(u=oE(r)?this.filter(r)[0].id():r[0].id());var d={},f={};i?a.forEach(function(e){var t=e.id();if(e.isNode()){var n=e.indegree(!0),r=e.outdegree(!0),i=n-r,a=r-n;i==1?s?o=!0:s=t:a==1?l?o=!0:l=t:(a>1||i>1)&&(o=!0),d[t]=[],e.outgoers().forEach(function(e){e.isEdge()&&d[t].push(e.id())})}else f[t]=[void 0,e.target().id()]}):a.forEach(function(e){var t=e.id();e.isNode()?(e.degree(!0)%2&&(s?l?o=!0:l=t:s=t),d[t]=[],e.connectedEdges().forEach(function(e){return d[t].push(e.id())})):f[t]=[e.source().id(),e.target().id()]});var p={found:!1,trail:void 0};if(o)return p;if(l&&s){if(i){if(u&&l!=u)return p;u=l}else if(u&&l!=u&&s!=u)return p;else u||=l}else u||=a[0].id();var m=function(e){for(var t=e,n=[e],r,a,o;d[t].length;)r=d[t].shift(),a=f[r][0],o=f[r][1],t==o?!i&&t!=a&&(d[a]=d[a].filter(function(e){return e!=r}),t=a):(d[o]=d[o].filter(function(e){return e!=r}),t=o),n.unshift(r),n.unshift(t);return n},h=[],g=[];for(g=m(u);g.length!=1;)d[g[0]].length==0?(h.unshift(a.getElementById(g.shift())),h.unshift(a.getElementById(g.shift()))):g=m(g.shift()).concat(g);for(var _ in h.unshift(a.getElementById(g.shift())),d)if(d[_].length)return p;return p.found=!0,p.trail=this.spawn(h,!0),p}},KO=function(){var e=this,t={},n=0,r=0,i=[],a=[],o={},s=function(n,r){for(var o=a.length-1,s=[],l=e.spawn();a[o].x!=n||a[o].y!=r;)s.push(a.pop().edge),o--;s.push(a.pop().edge),s.forEach(function(n){var r=n.connectedNodes().intersection(e);l.merge(n),r.forEach(function(n){var r=n.id(),i=n.connectedEdges().intersection(e);l.merge(n),t[r].cutVertex?l.merge(i.filter(function(e){return e.isLoop()})):l.merge(i)})}),i.push(l)},l=function(u,d,f){u===f&&(r+=1),t[d]={id:n,low:n++,cutVertex:!1};var p=e.getElementById(d).connectedEdges().intersection(e);if(p.size()===0)i.push(e.spawn(e.getElementById(d)));else{var m,h,g,_;p.forEach(function(e){m=e.source().id(),h=e.target().id(),g=m===d?h:m,g!==f&&(_=e.id(),o[_]||(o[_]=!0,a.push({x:d,y:g,edge:e})),g in t?t[d].low=Math.min(t[d].low,t[g].id):(l(u,g,d),t[d].low=Math.min(t[d].low,t[g].low),t[d].id<=t[g].low&&(t[d].cutVertex=!0,s(d,g))))})}};e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||(r=0,l(n,n),t[n].cutVertex=r>1)}});var u=Object.keys(t).filter(function(e){return t[e].cutVertex}).map(function(t){return e.getElementById(t)});return{cut:e.spawn(u),components:i}},UBe={hopcroftTarjanBiconnected:KO,htbc:KO,htb:KO,hopcroftTarjanBiconnectedComponents:KO},qO=function(){var e=this,t={},n=0,r=[],i=[],a=e.spawn(e),o=function(s){if(i.push(s),t[s]={index:n,low:n++,explored:!1},e.getElementById(s).connectedEdges().intersection(e).forEach(function(e){var n=e.target().id();n!==s&&(n in t||o(n),t[n].explored||(t[s].low=Math.min(t[s].low,t[n].low)))}),t[s].index===t[s].low){for(var l=e.spawn();;){var u=i.pop();if(l.merge(e.getElementById(u)),t[u].low=t[s].index,t[u].explored=!0,u===s)break}var d=l.edgesWith(l),f=l.merge(d);r.push(f),a=a.difference(f)}};return e.forEach(function(e){if(e.isNode()){var n=e.id();n in t||o(n)}}),{cut:a,components:r}},WBe={tarjanStronglyConnected:qO,tsc:qO,tscc:qO,tarjanStronglyConnectedComponents:qO},JO={},[kD,xze,Sze,wze,Eze,Oze,jze,rBe,bO,SO,CO,gBe,kBe,NBe,BBe,HBe,UBe,WBe].forEach(function(e){DE(JO,e)}),YO=0,XO=1,ZO=2,QO=function(e){if(!(this instanceof QO))return new QO(e);this.id=`Thenable/1.0.7`,this.state=YO,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e==`function`&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))},QO.prototype={fulfill:function(e){return $O(this,XO,`fulfillValue`,e)},reject:function(e){return $O(this,ZO,`rejectReason`,e)},then:function(e,t){var n=this,r=new QO;return n.onFulfilled.push(nk(e,r,`fulfill`)),n.onRejected.push(nk(t,r,`reject`)),ek(n),r.proxy}},$O=function(e,t,n,r){return e.state===YO&&(e.state=t,e[n]=r,ek(e)),e},ek=function(e){e.state===XO?tk(e,`onFulfilled`,e.fulfillValue):e.state===ZO&&tk(e,`onRejected`,e.rejectReason)},tk=function(e,t,n){if(e[t].length!==0){var r=e[t];e[t]=[];var i=function(){for(var e=0;e<r.length;e++)r[e](n)};typeof setImmediate==`function`?setImmediate(i):setTimeout(i,0)}},nk=function(e,t,n){return function(r){if(typeof e!=`function`)t[n].call(t,r);else{var i;try{i=e(r)}catch(e){t.reject(e);return}rk(t,i)}}},rk=function(e,t){if(e===t||e.proxy===t){e.reject(TypeError(`cannot resolve promise with itself`));return}var n;if(uT(t)===`object`&&t!==null||typeof t==`function`)try{n=t.then}catch(t){e.reject(t);return}if(typeof n==`function`){var r=!1;try{n.call(t,function(n){r||(r=!0,n===t?e.reject(TypeError(`circular thenable chain`)):rk(e,n))},function(t){r||(r=!0,e.reject(t))})}catch(t){r||e.reject(t)}return}e.fulfill(t)},QO.all=function(e){return new QO(function(t,n){for(var r=Array(e.length),i=0,a=function(n,a){r[n]=a,i++,i===e.length&&t(r)},o=0;o<e.length;o++)(function(t){var r=e[t];r!=null&&r.then!=null?r.then(function(e){a(t,e)},function(e){n(e)}):a(t,r)})(o)})},QO.resolve=function(e){return new QO(function(t,n){t(e)})},QO.reject=function(e){return new QO(function(t,n){n(e)})},ik=typeof Promise<`u`?Promise:QO,ak=function(e,t,n){var r=gE(e),i=!r,a=this._private=DE({duration:1e3},t,n);if(a.target=e,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&sE(a.complete)&&a.completes.push(a.complete),i){var o=e.position();a.startPosition=a.startPosition||{x:o.x,y:o.y},a.startStyle=a.startStyle||e.cy().style().getAnimationStartStyle(e,a.style)}if(r){var s=e.pan();a.startPan={x:s.x,y:s.y},a.startZoom=e.zoom()}this.length=1,this[0]=this},ok=ak.prototype,DE(ok,{instanceString:function(){return`animation`},hook:function(){var e=this._private;if(!e.hooked){var t,n=e.target._private.animation;t=e.queue?n.queue:n.current,t.push(this),pE(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var t=this._private;return e===void 0?t.progress*t.duration:this.progress(e/t.duration)},progress:function(e){var t=this._private,n=t.playing;return e===void 0?t.progress:(n&&this.pause(),t.progress=e,t.started=!1,n&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,t=e.playing;t&&this.pause(),e.progress=1-e.progress,e.started=!1;var n=function(t,n){var r=e[t];r!=null&&(e[t]=e[n],e[n]=r)};if(n(`zoom`,`startZoom`),n(`pan`,`startPan`),n(`position`,`startPosition`),e.style)for(var r=0;r<e.style.length;r++){var i=e.style[r],a=i.name,o=e.startStyle[a];e.startStyle[a]=i,e.style[r]=o}return t&&this.play(),this},promise:function(e){var t=this._private,n;switch(e){case`frame`:n=t.frames;break;default:case`complete`:case`completed`:n=t.completes}return new ik(function(e,t){n.push(function(){e()})})}}),ok.complete=ok.completed,ok.run=ok.play,ok.running=ok.playing,GBe={animated:function(){return function(){var e=this,t=e.length===void 0?[e]:e;if(!(this._private.cy||this).styleEnabled())return!1;var n=t[0];if(n)return n._private.animation.current.length>0}},clearQueue:function(){return function(){var e=this,t=e.length===void 0?[e]:e;if(!(this._private.cy||this).styleEnabled())return this;for(var n=0;n<t.length;n++){var r=t[n];r._private.animation.queue=[]}return this}},delay:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animate({delay:e,duration:e,complete:t}):this}},delayAnimation:function(){return function(e,t){return(this._private.cy||this).styleEnabled()?this.animation({delay:e,duration:e,complete:t}):this}},animation:function(){return function(e,t){var n=this,r=n.length!==void 0,i=r?n:[n],a=this._private.cy||this,o=!r,s=!o;if(!a.styleEnabled())return this;var l=a.style();if(e=DE({},e,t),Object.keys(e).length===0)return new ak(i[0],e);switch(e.duration===void 0&&(e.duration=400),e.duration){case`slow`:e.duration=600;break;case`fast`:e.duration=200}if(s&&(e.style=l.getPropsList(e.style||e.css),e.css=void 0),s&&e.renderedPosition!=null){var u=e.renderedPosition,d=a.pan(),f=a.zoom();e.position=FD(u,f,d)}if(o&&e.panBy!=null){var p=e.panBy,m=a.pan();e.pan={x:m.x+p.x,y:m.y+p.y}}var h=e.center||e.centre;if(o&&h!=null){var g=a.getCenterPan(h.eles,e.zoom);g!=null&&(e.pan=g)}if(o&&e.fit!=null){var _=e.fit,v=a.getFitViewport(_.eles||_.boundingBox,_.padding);v!=null&&(e.pan=v.pan,e.zoom=v.zoom)}if(o&&lE(e.zoom)){var y=a.getZoomedViewport(e.zoom);y==null?e.zoom=null:(y.zoomed&&(e.zoom=y.zoom),y.panned&&(e.pan=y.pan))}return new ak(i[0],e)}},animate:function(){return function(e,t){var n=this,r=n.length===void 0?[n]:n;if(!(this._private.cy||this).styleEnabled())return this;t&&(e=DE({},e,t));for(var i=0;i<r.length;i++){var a=r[i],o=a.animated()&&(e.queue===void 0||e.queue);a.animation(e,o?{queue:!0}:void 0).play()}return this}},stop:function(){return function(e,t){var n=this,r=n.length===void 0?[n]:n,i=this._private.cy||this;if(!i.styleEnabled())return this;for(var a=0;a<r.length;a++){for(var o=r[a]._private,s=o.animation.current,l=0;l<s.length;l++){var u=s[l]._private;t&&(u.duration=0)}e&&(o.animation.queue=[]),t||(o.animation.current=[])}return i.notify(`draw`),this}}},FVe=fT(iLe()),HVe=fT(uLe()),GVe=fT(fLe()),KVe={data:function(e){return e=DE({},{field:`data`,bindingEvent:`data`,allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:`data`,settingTriggersEvent:!1,triggerFnName:`trigger`,immutableKeys:{},updateStyle:!1,beforeGet:function(e){},beforeSet:function(e,t){},onSet:function(e){},canSet:function(e){return!0}},e),function(t,n){var r=e,i=this,a=i.length!==void 0,o=a?i:[i],s=a?i[0]:i;if(oE(t)){var l=t.indexOf(`.`)!==-1&&GVe(t);if(r.allowGetting&&n===void 0){var u;return s&&(r.beforeGet(s),u=l&&s._private[r.field][t]===void 0?FVe(s._private[r.field],l):s._private[r.field][t]),u}if(r.allowSetting&&n!==void 0&&!r.immutableKeys[t]){var d=$Fe({},t,n);r.beforeSet(i,d);for(var f=0,p=o.length;f<p;f++){var m=o[f];r.canSet(m)&&(l&&s._private[r.field][t]===void 0?HVe(m._private[r.field],l,n):m._private[r.field][t]=n)}r.updateStyle&&i.updateStyle(),r.onSet(i),r.settingTriggersEvent&&i[r.triggerFnName](r.settingEvent)}}else if(r.allowSetting&&lE(t)){var h=t,g,_,v=Object.keys(h);r.beforeSet(i,h);for(var y=0;y<v.length;y++)if(g=v[y],_=h[g],!r.immutableKeys[g])for(var b=0;b<o.length;b++){var x=o[b];r.canSet(x)&&(x._private[r.field][g]=_)}r.updateStyle&&i.updateStyle(),r.onSet(i),r.settingTriggersEvent&&i[r.triggerFnName](r.settingEvent)}else if(r.allowBinding&&sE(t)){var S=t;i.on(r.bindingEvent,S)}else if(r.allowGetting&&t===void 0){var C;return s&&(r.beforeGet(s),C=s._private[r.field]),C}return i}},removeData:function(e){return e=DE({},{field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!1,immutableKeys:{}},e),function(t){var n=e,r=this,i=r.length===void 0?[r]:r;if(oE(t)){for(var a=t.split(/\s+/),o=a.length,s=0;s<o;s++){var l=a[s];if(!vE(l)&&!n.immutableKeys[l])for(var u=0,d=i.length;u<d;u++)i[u]._private[n.field][l]=void 0}n.triggerEvent&&r[n.triggerFnName](n.event)}else if(t===void 0){for(var f=0,p=i.length;f<p;f++)for(var m=i[f]._private[n.field],h=Object.keys(m),g=0;g<h.length;g++){var _=h[g];n.immutableKeys[_]||(m[_]=void 0)}n.triggerEvent&&r[n.triggerFnName](n.event)}return r}}},qVe={eventAliasesOn:function(e){var t=e;t.addListener=t.listen=t.bind=t.on,t.unlisten=t.unbind=t.off=t.removeListener,t.trigger=t.emit,t.pon=t.promiseOn=function(e,t){var n=this,r=Array.prototype.slice.call(arguments,0);return new ik(function(e,t){var i=r.concat([function(t){n.off.apply(n,a),e(t)}]),a=i.concat([]);n.on.apply(n,i)})}}},iA={},[GBe,KVe,qVe].forEach(function(e){DE(iA,e)}),JVe={animate:iA.animate(),animation:iA.animation(),animated:iA.animated(),clearQueue:iA.clearQueue(),delay:iA.delay(),delayAnimation:iA.delayAnimation(),stop:iA.stop()},aA={classes:function(e){var t=this;if(e===void 0){var n=[];return t[0]._private.classes.forEach(function(e){return n.push(e)}),n}cE(e)||(e=(e||``).match(/\S+/g)||[]);for(var r=[],i=new ED(e),a=0;a<t.length;a++){for(var o=t[a],s=o._private,l=s.classes,u=!1,d=0;d<e.length;d++){var f=e[d];if(!l.has(f)){u=!0;break}}u||=l.size!==e.length,u&&(s.classes=i,r.push(o))}return r.length>0&&this.spawn(r).updateStyle().emit(`class`),t},addClass:function(e){return this.toggleClass(e,!0)},hasClass:function(e){var t=this[0];return t!=null&&t._private.classes.has(e)},toggleClass:function(e,t){cE(e)||(e=e.match(/\S+/g)||[]);for(var n=this,r=t===void 0,i=[],a=0,o=n.length;a<o;a++)for(var s=n[a],l=s._private.classes,u=!1,d=0;d<e.length;d++){var f=e[d],p=l.has(f),m=!1;t||r&&!p?(l.add(f),m=!0):(!t||r&&p)&&(l.delete(f),m=!0),!u&&m&&(i.push(s),u=!0)}return i.length>0&&this.spawn(i).updateStyle().emit(`class`),n},removeClass:function(e){return this.toggleClass(e,!1)},flashClass:function(e,t){var n=this;if(t==null)t=250;else if(t===0)return n;return n.addClass(e),setTimeout(function(){n.removeClass(e)},t),n}},aA.className=aA.classNames=aA.classes,oA={metaChar:`[\\!\\"\\#\\$\\%\\&\\'\\(\\)\\*\\+\\,\\.\\/\\:\\;\\<\\=\\>\\?\\@\\[\\]\\^\\\`\\{\\|\\}\\~]`,comparatorOp:`=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=`,boolOp:`\\?|\\!|\\^`,string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:TE,meta:`degree|indegree|outdegree`,separator:`\\s*,\\s*`,descendant:`\\s+`,child:`\\s+>\\s+`,subject:`\\$`,group:`node|edge|\\*`,directedEdge:`\\s+->\\s+`,undirectedEdge:`\\s+<->\\s+`},oA.variable=`(?:[\\w-.]|(?:\\\\`+oA.metaChar+`))+`,oA.className=`(?:[\\w-]|(?:\\\\`+oA.metaChar+`))+`,oA.value=oA.string+`|`+oA.number,oA.id=oA.variable,(function(){var e=oA.comparatorOp.split(`|`),t,n;for(n=0;n<e.length;n++)t=e[n],oA.comparatorOp+=`|@`+t;for(e=oA.comparatorOp.split(`|`),n=0;n<e.length;n++)t=e[n],!(t.indexOf(`!`)>=0)&&t!==`=`&&(oA.comparatorOp+=`|\\!`+t)})(),sA=function(){return{checks:[]}},cA={GROUP:0,COLLECTION:1,FILTER:2,DATA_COMPARE:3,DATA_EXIST:4,DATA_BOOL:5,META_COMPARE:6,STATE:7,ID:8,CLASS:9,UNDIRECTED_EDGE:10,DIRECTED_EDGE:11,NODE_SOURCE:12,NODE_TARGET:13,NODE_NEIGHBOR:14,CHILD:15,DESCENDANT:16,PARENT:17,ANCESTOR:18,COMPOUND_SPLIT:19,TRUE:20},lA=[{selector:`:selected`,matches:function(e){return e.selected()}},{selector:`:unselected`,matches:function(e){return!e.selected()}},{selector:`:selectable`,matches:function(e){return e.selectable()}},{selector:`:unselectable`,matches:function(e){return!e.selectable()}},{selector:`:locked`,matches:function(e){return e.locked()}},{selector:`:unlocked`,matches:function(e){return!e.locked()}},{selector:`:visible`,matches:function(e){return e.visible()}},{selector:`:hidden`,matches:function(e){return!e.visible()}},{selector:`:transparent`,matches:function(e){return e.transparent()}},{selector:`:grabbed`,matches:function(e){return e.grabbed()}},{selector:`:free`,matches:function(e){return!e.grabbed()}},{selector:`:removed`,matches:function(e){return e.removed()}},{selector:`:inside`,matches:function(e){return!e.removed()}},{selector:`:grabbable`,matches:function(e){return e.grabbable()}},{selector:`:ungrabbable`,matches:function(e){return!e.grabbable()}},{selector:`:animated`,matches:function(e){return e.animated()}},{selector:`:unanimated`,matches:function(e){return!e.animated()}},{selector:`:parent`,matches:function(e){return e.isParent()}},{selector:`:childless`,matches:function(e){return e.isChildless()}},{selector:`:child`,matches:function(e){return e.isChild()}},{selector:`:orphan`,matches:function(e){return e.isOrphan()}},{selector:`:nonorphan`,matches:function(e){return e.isChild()}},{selector:`:compound`,matches:function(e){return e.isNode()?e.isParent():e.source().isParent()||e.target().isParent()}},{selector:`:loop`,matches:function(e){return e.isLoop()}},{selector:`:simple`,matches:function(e){return e.isSimple()}},{selector:`:active`,matches:function(e){return e.active()}},{selector:`:inactive`,matches:function(e){return!e.active()}},{selector:`:backgrounding`,matches:function(e){return e.backgrounding()}},{selector:`:nonbackgrounding`,matches:function(e){return!e.backgrounding()}}].sort(function(e,t){return zRe(e.selector,t.selector)}),YVe=function(){for(var e={},t,n=0;n<lA.length;n++)t=lA[n],e[t.selector]=t.matches;return e}(),XVe=function(e,t){return YVe[e](t)},ZVe=`(`+lA.map(function(e){return e.selector}).join(`|`)+`)`,uA=function(e){return e.replace(RegExp(`\\\\(`+oA.metaChar+`)`,`g`),function(e,t){return t})},dA=function(e,t,n){e[e.length-1]=n},fA=[{name:`group`,query:!0,regex:`(`+oA.group+`)`,populate:function(e,t,n){var r=cT(n,1)[0];t.checks.push({type:cA.GROUP,value:r===`*`?r:r+`s`})}},{name:`state`,query:!0,regex:ZVe,populate:function(e,t,n){var r=cT(n,1)[0];t.checks.push({type:cA.STATE,value:r})}},{name:`id`,query:!0,regex:`\\#(`+oA.id+`)`,populate:function(e,t,n){var r=cT(n,1)[0];t.checks.push({type:cA.ID,value:uA(r)})}},{name:`className`,query:!0,regex:`\\.(`+oA.className+`)`,populate:function(e,t,n){var r=cT(n,1)[0];t.checks.push({type:cA.CLASS,value:uA(r)})}},{name:`dataExists`,query:!0,regex:`\\[\\s*(`+oA.variable+`)\\s*\\]`,populate:function(e,t,n){var r=cT(n,1)[0];t.checks.push({type:cA.DATA_EXIST,field:uA(r)})}},{name:`dataCompare`,query:!0,regex:`\\[\\s*(`+oA.variable+`)\\s*(`+oA.comparatorOp+`)\\s*(`+oA.value+`)\\s*\\]`,populate:function(e,t,n){var r=cT(n,3),i=r[0],a=r[1],o=r[2];o=RegExp(`^`+oA.string+`$`).exec(o)==null?parseFloat(o):o.substring(1,o.length-1),t.checks.push({type:cA.DATA_COMPARE,field:uA(i),operator:a,value:o})}},{name:`dataBool`,query:!0,regex:`\\[\\s*(`+oA.boolOp+`)\\s*(`+oA.variable+`)\\s*\\]`,populate:function(e,t,n){var r=cT(n,2),i=r[0],a=r[1];t.checks.push({type:cA.DATA_BOOL,field:uA(a),operator:i})}},{name:`metaCompare`,query:!0,regex:`\\[\\[\\s*(`+oA.meta+`)\\s*(`+oA.comparatorOp+`)\\s*(`+oA.number+`)\\s*\\]\\]`,populate:function(e,t,n){var r=cT(n,3),i=r[0],a=r[1],o=r[2];t.checks.push({type:cA.META_COMPARE,field:uA(i),operator:a,value:parseFloat(o)})}},{name:`nextQuery`,separator:!0,regex:oA.separator,populate:function(e,t){var n=e.currentSubject,r=e.edgeCount,i=e.compoundCount,a=e[e.length-1];return n!=null&&(a.subject=n,e.currentSubject=null),a.edgeCount=r,a.compoundCount=i,e.edgeCount=0,e.compoundCount=0,e[e.length++]=sA()}},{name:`directedEdge`,separator:!0,regex:oA.directedEdge,populate:function(e,t){if(e.currentSubject==null){var n=sA(),r=t,i=sA();return n.checks.push({type:cA.DIRECTED_EDGE,source:r,target:i}),dA(e,t,n),e.edgeCount++,i}var a=sA(),o=t,s=sA();return a.checks.push({type:cA.NODE_SOURCE,source:o,target:s}),dA(e,t,a),e.edgeCount++,s}},{name:`undirectedEdge`,separator:!0,regex:oA.undirectedEdge,populate:function(e,t){if(e.currentSubject==null){var n=sA(),r=t,i=sA();return n.checks.push({type:cA.UNDIRECTED_EDGE,nodes:[r,i]}),dA(e,t,n),e.edgeCount++,i}var a=sA(),o=t,s=sA();return a.checks.push({type:cA.NODE_NEIGHBOR,node:o,neighbor:s}),dA(e,t,a),s}},{name:`child`,separator:!0,regex:oA.child,populate:function(e,t){if(e.currentSubject==null){var n=sA(),r=sA(),i=e[e.length-1];return n.checks.push({type:cA.CHILD,parent:i,child:r}),dA(e,t,n),e.compoundCount++,r}if(e.currentSubject===t){var a=sA(),o=e[e.length-1],s=sA(),l=sA(),u=sA(),d=sA();return a.checks.push({type:cA.COMPOUND_SPLIT,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:cA.TRUE}],d.checks.push({type:cA.TRUE}),s.checks.push({type:cA.PARENT,parent:d,child:u}),dA(e,o,a),e.currentSubject=l,e.compoundCount++,u}var f=sA(),p=sA(),m=[{type:cA.PARENT,parent:f,child:p}];return f.checks=t.checks,t.checks=m,e.compoundCount++,p}},{name:`descendant`,separator:!0,regex:oA.descendant,populate:function(e,t){if(e.currentSubject==null){var n=sA(),r=sA(),i=e[e.length-1];return n.checks.push({type:cA.DESCENDANT,ancestor:i,descendant:r}),dA(e,t,n),e.compoundCount++,r}if(e.currentSubject===t){var a=sA(),o=e[e.length-1],s=sA(),l=sA(),u=sA(),d=sA();return a.checks.push({type:cA.COMPOUND_SPLIT,left:o,right:s,subject:l}),l.checks=t.checks,t.checks=[{type:cA.TRUE}],d.checks.push({type:cA.TRUE}),s.checks.push({type:cA.ANCESTOR,ancestor:d,descendant:u}),dA(e,o,a),e.currentSubject=l,e.compoundCount++,u}var f=sA(),p=sA(),m=[{type:cA.ANCESTOR,ancestor:f,descendant:p}];return f.checks=t.checks,t.checks=m,e.compoundCount++,p}},{name:`subject`,modifier:!0,regex:oA.subject,populate:function(e,t){if(e.currentSubject!=null&&e.currentSubject!==t)return gD("Redefinition of subject in selector `"+e.toString()+"`"),!1;e.currentSubject=t;var n=e[e.length-1].checks[0],r=n==null?null:n.type;r===cA.DIRECTED_EDGE?n.type=cA.NODE_TARGET:r===cA.UNDIRECTED_EDGE&&(n.type=cA.NODE_NEIGHBOR,n.node=n.nodes[1],n.neighbor=n.nodes[0],n.nodes=null)}}],fA.forEach(function(e){return e.regexObj=RegExp(`^`+e.regex)}),QVe=function(e){for(var t,n,r,i=0;i<fA.length;i++){var a=fA[i],o=a.name,s=e.match(a.regexObj);if(s!=null){n=s,t=a,r=o;var l=s[0];e=e.substring(l.length);break}}return{expr:t,match:n,name:r,remaining:e}},$Ve=function(e){var t=e.match(/^\s+/);if(t){var n=t[0];e=e.substring(n.length)}return e},eHe={parse:function(e){var t=this,n=t.inputText=e,r=t[0]=sA();for(t.length=1,n=$Ve(n);;){var i=QVe(n);if(i.expr==null)return gD("The selector `"+e+"`is invalid"),!1;var a=i.match.slice(1),o=i.expr.populate(t,r,a);if(o===!1)return!1;if(o!=null&&(r=o),n=i.remaining,n.match(/^\s*$/))break}var s=t[t.length-1];t.currentSubject!=null&&(s.subject=t.currentSubject),s.edgeCount=t.edgeCount,s.compoundCount=t.compoundCount;for(var l=0;l<t.length;l++){var u=t[l];if(u.compoundCount>0&&u.edgeCount>0)return gD("The selector `"+e+"` is invalid because it uses both a compound selector and an edge selector"),!1;if(u.edgeCount>1)return gD("The selector `"+e+"` is invalid because it uses multiple edge selectors"),!1;u.edgeCount===1&&gD("The selector `"+e+"` is deprecated. Edge selectors do not take effect on changes to source and target nodes after an edge is added, for performance reasons. Use a class or data selector on edges instead, updating the class or data of an edge when your app detects a change in source or target nodes.")}return!0},toString:function(){if(this.toStringCache!=null)return this.toStringCache;for(var e=function(e){return e??``},t=function(t){return oE(t)?`"`+t+`"`:e(t)},n=function(e){return` `+e+` `},r=function(r,a){var o=r.type,s=r.value;switch(o){case cA.GROUP:var l=e(s);return l.substring(0,l.length-1);case cA.DATA_COMPARE:var u=r.field,d=r.operator;return`[`+u+n(e(d))+t(s)+`]`;case cA.DATA_BOOL:var f=r.operator,p=r.field;return`[`+e(f)+p+`]`;case cA.DATA_EXIST:return`[`+r.field+`]`;case cA.META_COMPARE:var m=r.operator;return`[[`+r.field+n(e(m))+t(s)+`]]`;case cA.STATE:return s;case cA.ID:return`#`+s;case cA.CLASS:return`.`+s;case cA.PARENT:case cA.CHILD:return i(r.parent,a)+n(`>`)+i(r.child,a);case cA.ANCESTOR:case cA.DESCENDANT:return i(r.ancestor,a)+` `+i(r.descendant,a);case cA.COMPOUND_SPLIT:var h=i(r.left,a),g=i(r.subject,a),_=i(r.right,a);return h+(h.length>0?` `:``)+g+_;case cA.TRUE:return``}},i=function(e,t){return e.checks.reduce(function(n,i,a){return n+(t===e&&a===0?`$`:``)+r(i,t)},``)},a=``,o=0;o<this.length;o++){var s=this[o];a+=i(s,s.subject),this.length>1&&o<this.length-1&&(a+=`, `)}return this.toStringCache=a,a}},pA=function(e,t,n){var r,i=oE(e),a=uE(e),o=oE(n),s,l,u=!1,d=!1,f=!1;switch(t.indexOf(`!`)>=0&&(t=t.replace(`!`,``),d=!0),t.indexOf(`@`)>=0&&(t=t.replace(`@`,``),u=!0),(i||o||u)&&(s=!i&&!a?``:``+e,l=``+n),u&&(e=s=s.toLowerCase(),n=l=l.toLowerCase()),t){case`*=`:r=s.indexOf(l)>=0;break;case`$=`:r=s.indexOf(l,s.length-l.length)>=0;break;case`^=`:r=s.indexOf(l)===0;break;case`=`:r=e===n;break;case`>`:f=!0,r=e>n;break;case`>=`:f=!0,r=e>=n;break;case`<`:f=!0,r=e<n;break;case`<=`:f=!0,r=e<=n;break;default:r=!1}return d&&(e!=null||!f)&&(r=!r),r},tHe=function(e,t){switch(t){case`?`:return!!e;case`!`:return!e;case`^`:return e===void 0}},nHe=function(e){return e!==void 0},mA=function(e,t){return e.data(t)},rHe=function(e,t){return e[t]()},hA=[],gA=function(e,t){return e.checks.every(function(e){return hA[e.type](e,t)})},hA[cA.GROUP]=function(e,t){var n=e.value;return n===`*`||n===t.group()},hA[cA.STATE]=function(e,t){var n=e.value;return XVe(n,t)},hA[cA.ID]=function(e,t){var n=e.value;return t.id()===n},hA[cA.CLASS]=function(e,t){var n=e.value;return t.hasClass(n)},hA[cA.META_COMPARE]=function(e,t){var n=e.field,r=e.operator,i=e.value;return pA(rHe(t,n),r,i)},hA[cA.DATA_COMPARE]=function(e,t){var n=e.field,r=e.operator,i=e.value;return pA(mA(t,n),r,i)},hA[cA.DATA_BOOL]=function(e,t){var n=e.field,r=e.operator;return tHe(mA(t,n),r)},hA[cA.DATA_EXIST]=function(e,t){var n=e.field;return e.operator,nHe(mA(t,n))},hA[cA.UNDIRECTED_EDGE]=function(e,t){var n=e.nodes[0],r=e.nodes[1],i=t.source(),a=t.target();return gA(n,i)&&gA(r,a)||gA(r,i)&&gA(n,a)},hA[cA.NODE_NEIGHBOR]=function(e,t){return gA(e.node,t)&&t.neighborhood().some(function(t){return t.isNode()&&gA(e.neighbor,t)})},hA[cA.DIRECTED_EDGE]=function(e,t){return gA(e.source,t.source())&&gA(e.target,t.target())},hA[cA.NODE_SOURCE]=function(e,t){return gA(e.source,t)&&t.outgoers().some(function(t){return t.isNode()&&gA(e.target,t)})},hA[cA.NODE_TARGET]=function(e,t){return gA(e.target,t)&&t.incomers().some(function(t){return t.isNode()&&gA(e.source,t)})},hA[cA.CHILD]=function(e,t){return gA(e.child,t)&&gA(e.parent,t.parent())},hA[cA.PARENT]=function(e,t){return gA(e.parent,t)&&t.children().some(function(t){return gA(e.child,t)})},hA[cA.DESCENDANT]=function(e,t){return gA(e.descendant,t)&&t.ancestors().some(function(t){return gA(e.ancestor,t)})},hA[cA.ANCESTOR]=function(e,t){return gA(e.ancestor,t)&&t.descendants().some(function(t){return gA(e.descendant,t)})},hA[cA.COMPOUND_SPLIT]=function(e,t){return gA(e.subject,t)&&gA(e.left,t)&&gA(e.right,t)},hA[cA.TRUE]=function(){return!0},hA[cA.COLLECTION]=function(e,t){return e.value.has(t)},hA[cA.FILTER]=function(e,t){var n=e.value;return n(t)},iHe={matches:function(e){for(var t=this,n=0;n<t.length;n++){var r=t[n];if(gA(r,e))return!0}return!1},filter:function(e){var t=this;if(t.length===1&&t[0].checks.length===1&&t[0].checks[0].type===cA.ID)return e.getElementById(t[0].checks[0].value).collection();var n=function(e){for(var n=0;n<t.length;n++){var r=t[n];if(gA(r,e))return!0}return!1};return t.text()??(n=function(){return!0}),e.filter(n)}},_A=function(e){this.inputText=e,this.currentSubject=null,this.compoundCount=0,this.edgeCount=0,this.length=0,e==null||oE(e)&&e.match(/^\s*$/)||(pE(e)?this.addQuery({checks:[{type:cA.COLLECTION,value:e.collection()}]}):sE(e)?this.addQuery({checks:[{type:cA.FILTER,value:e}]}):oE(e)?this.parse(e)||(this.invalid=!0):mD(`A selector must be created from a string; found `))},vA=_A.prototype,[eHe,iHe].forEach(function(e){return DE(vA,e)}),vA.text=function(){return this.inputText},vA.size=function(){return this.length},vA.eq=function(e){return this[e]},vA.sameText=function(e){return!this.invalid&&!e.invalid&&this.text()===e.text()},vA.addQuery=function(e){this[this.length++]=e},vA.selector=vA.toString,yA={allAre:function(e){var t=new _A(e);return this.every(function(e){return t.matches(e)})},is:function(e){var t=new _A(e);return this.some(function(e){return t.matches(e)})},some:function(e,t){for(var n=0;n<this.length;n++)if(t?e.apply(t,[this[n],n,this]):e(this[n],n,this))return!0;return!1},every:function(e,t){for(var n=0;n<this.length;n++)if(!(t?e.apply(t,[this[n],n,this]):e(this[n],n,this)))return!1;return!0},same:function(e){if(this===e)return!0;e=this.cy().collection(e);var t=this.length;return t===e.length?t===1?this[0]===e[0]:this.every(function(t){return e.hasElementWithId(t.id())}):!1},anySame:function(e){return e=this.cy().collection(e),this.some(function(t){return e.hasElementWithId(t.id())})},allAreNeighbors:function(e){e=this.cy().collection(e);var t=this.neighborhood();return e.every(function(e){return t.hasElementWithId(e.id())})},contains:function(e){e=this.cy().collection(e);var t=this;return e.every(function(e){return t.hasElementWithId(e.id())})}},yA.allAreNeighbours=yA.allAreNeighbors,yA.has=yA.contains,yA.equal=yA.equals=yA.same,bA=function(e,t){return function(n,r,i,a){var o=n,s=this,l;if(o==null?l=``:pE(o)&&o.length===1&&(l=o.id()),s.length===1&&l){var u=s[0]._private,d=u.traversalCache=u.traversalCache||{},f=d[t]=d[t]||[],p=oD(l);return f[p]||(f[p]=e.call(s,n,r,i,a))}return e.call(s,n,r,i,a)}},xA={parent:function(e){var t=[];if(this.length===1){var n=this[0]._private.parent;if(n)return n}for(var r=0;r<this.length;r++){var i=this[r]._private.parent;i&&t.push(i)}return this.spawn(t,!0).filter(e)},parents:function(e){for(var t=[],n=this.parent();n.nonempty();){for(var r=0;r<n.length;r++){var i=n[r];t.push(i)}n=n.parent()}return this.spawn(t,!0).filter(e)},commonAncestors:function(e){for(var t,n=0;n<this.length;n++){var r=this[n].parents();t||=r,t=t.intersect(r)}return t.filter(e)},orphans:function(e){return this.stdFilter(function(e){return e.isOrphan()}).filter(e)},nonorphans:function(e){return this.stdFilter(function(e){return e.isChild()}).filter(e)},children:bA(function(e){for(var t=[],n=0;n<this.length;n++)for(var r=this[n]._private.children,i=0;i<r.length;i++)t.push(r[i]);return this.spawn(t,!0).filter(e)},`children`),siblings:function(e){return this.parent().children().not(this).filter(e)},isParent:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length!==0},isChildless:function(){var e=this[0];if(e)return e.isNode()&&e._private.children.length===0},isChild:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent!=null},isOrphan:function(){var e=this[0];if(e)return e.isNode()&&e._private.parent==null},descendants:function(e){var t=[];function n(e){for(var r=0;r<e.length;r++){var i=e[r];t.push(i),i.children().nonempty()&&n(i.children())}}return n(this.children()),this.spawn(t,!0).filter(e)}},xA.forEachDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return TT(this,e,t,pLe)},xA.forEachUp=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return TT(this,e,t,mLe)},xA.forEachUpAndDown=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return TT(this,e,t,hLe)},xA.ancestors=xA.parents,SA=aHe={data:iA.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),removeData:iA.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,immutableKeys:{id:!0,source:!0,target:!0,parent:!0},updateStyle:!0}),scratch:iA.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:iA.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),rscratch:iA.data({field:`rscratch`,allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!0}),removeRscratch:iA.removeData({field:`rscratch`,triggerEvent:!1}),id:function(){var e=this[0];if(e)return e._private.data.id}},SA.attr=SA.data,SA.removeAttr=SA.removeData,oHe=aHe,CA={},DE(CA,{degree:ET(function(e,t){return t.source().same(t.target())?2:1}),indegree:ET(function(e,t){return+!!t.target().same(e)}),outdegree:ET(function(e,t){return+!!t.source().same(e)})}),DE(CA,{minDegree:DT(`degree`,function(e,t){return e<t}),maxDegree:DT(`degree`,function(e,t){return e>t}),minIndegree:DT(`indegree`,function(e,t){return e<t}),maxIndegree:DT(`indegree`,function(e,t){return e>t}),minOutdegree:DT(`outdegree`,function(e,t){return e<t}),maxOutdegree:DT(`outdegree`,function(e,t){return e>t})}),DE(CA,{totalDegree:function(e){for(var t=0,n=this.nodes(),r=0;r<n.length;r++)t+=n[r].degree(e);return t}}),TA=function(e,t,n){for(var r=0;r<e.length;r++){var i=e[r];if(!i.locked()){var a=i._private.position,o={x:t.x==null?0:t.x-a.x,y:t.y==null?0:t.y-a.y};i.isParent()&&(o.x!==0||o.y!==0)&&i.children().shift(o,n),i.dirtyBoundingBoxCache()}}},EA={field:`position`,bindingEvent:`position`,allowBinding:!0,allowSetting:!0,settingEvent:`position`,settingTriggersEvent:!0,triggerFnName:`emitAndNotify`,allowGetting:!0,validKeys:[`x`,`y`],beforeGet:function(e){e.updateCompoundBounds()},beforeSet:function(e,t){TA(e,t,!1)},onSet:function(e){e.dirtyCompoundBoundsCache()},canSet:function(e){return!e.locked()}},wA=sHe={position:iA.data(EA),silentPosition:iA.data(DE({},EA,{allowBinding:!1,allowSetting:!0,settingTriggersEvent:!1,allowGetting:!1,beforeSet:function(e,t){TA(e,t,!0)},onSet:function(e){e.dirtyCompoundBoundsCache()}})),positions:function(e,t){if(lE(e))t?this.silentPosition(e):this.position(e);else if(sE(e)){var n=e,r=this.cy();r.startBatch();for(var i=0;i<this.length;i++){var a=this[i],o=void 0;(o=n(a,i))&&(t?a.silentPosition(o):a.position(o))}r.endBatch()}return this},silentPositions:function(e){return this.positions(e,!0)},shift:function(e,t,n){var r;if(lE(e)?(r={x:uE(e.x)?e.x:0,y:uE(e.y)?e.y:0},n=t):oE(e)&&uE(t)&&(r={x:0,y:0},r[e]=t),r!=null){var i=this.cy();i.startBatch();for(var a=0;a<this.length;a++){var o=this[a];if(!(i.hasCompoundNodes()&&o.isChild()&&o.ancestors().anySame(this))){var s=o.position(),l={x:s.x+r.x,y:s.y+r.y};n?o.silentPosition(l):o.position(l)}}i.endBatch()}return this},silentShift:function(e,t){return lE(e)?this.shift(e,!0):oE(e)&&uE(t)&&this.shift(e,t,!0),this},renderedPosition:function(e,t){var n=this[0],r=this.cy(),i=r.zoom(),a=r.pan(),o=lE(e)?e:void 0,s=o!==void 0||t!==void 0&&oE(e);if(n&&n.isNode()){if(s)for(var l=0;l<this.length;l++){var u=this[l];t===void 0?o!==void 0&&u.position(FD(o,i,a)):u.position(e,(t-a[e])/i)}else return o=PD(n.position(),i,a),e===void 0?o:o[e]}else if(!s)return;return this},relativePosition:function(e,t){var n=this[0],r=this.cy(),i=lE(e)?e:void 0,a=i!==void 0||t!==void 0&&oE(e),o=r.hasCompoundNodes();if(n&&n.isNode()){if(a)for(var s=0;s<this.length;s++){var l=this[s],u=o?l.parent():null,d=u&&u.length>0,f=d;d&&(u=u[0]);var p=f?u.position():{x:0,y:0};t===void 0?i!==void 0&&l.position({x:i.x+p.x,y:i.y+p.y}):l.position(e,t+p[e])}else{var m=n.position(),h=o?n.parent():null,g=h&&h.length>0,_=g;g&&(h=h[0]);var v=_?h.position():{x:0,y:0};return i={x:m.x-v.x,y:m.y-v.y},e===void 0?i:i[e]}}else if(!a)return;return this}},wA.modelPosition=wA.point=wA.position,wA.modelPositions=wA.points=wA.positions,wA.renderedPoint=wA.renderedPosition,wA.relativePoint=wA.relativePosition,cHe=sHe,DA=function(e){switch(e){case`left`:case`right-inside`:return`left`;case`right`:case`left-inside`:return`right`;default:return`center`}},OA=function(e){switch(e){case`top`:case`bottom-inside`:return`top`;case`bottom`:case`top-inside`:return`bottom`;default:return`center`}},lHe=function(e){switch(e){case`left`:return`right`;case`right`:return`left`;case`left-inside`:return`left`;case`right-inside`:return`right`;default:return`center`}},kA=AA={},AA.renderedBoundingBox=function(e){var t=this.boundingBox(e),n=this.cy(),r=n.zoom(),i=n.pan(),a=t.x1*r+i.x,o=t.x2*r+i.x,s=t.y1*r+i.y,l=t.y2*r+i.y;return{x1:a,x2:o,y1:s,y2:l,w:o-a,h:l-s}},AA.dirtyCompoundBoundsCache=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();return!t.styleEnabled()||!t.hasCompoundNodes()||this.forEachUp(function(t){if(t.isParent()){var n=t._private;n.compoundBoundsClean=!1,n.bbCache=null,e||t.emitAndNotify(`bounds`)}}),this},AA.updateCompoundBounds=function(){var e=arguments.length>0&&arguments[0]!==void 0&&arguments[0],t=this.cy();if(!t.styleEnabled()||!t.hasCompoundNodes()||!e&&t.batching())return this;function n(e){if(!e.isParent())return;var t=e._private,n=e.children(),r=e.pstyle(`compound-sizing-wrt-labels`).value===`include`,i={width:{val:e.pstyle(`min-width`).pfValue,left:e.pstyle(`min-width-bias-left`),right:e.pstyle(`min-width-bias-right`)},height:{val:e.pstyle(`min-height`).pfValue,top:e.pstyle(`min-height-bias-top`),bottom:e.pstyle(`min-height-bias-bottom`)}},a=n.boundingBox({includeLabels:r,includeOverlays:!1,useCache:!1}),o=t.position;(a.w===0||a.h===0)&&(a={w:e.pstyle(`width`).pfValue,h:e.pstyle(`height`).pfValue},a.x1=o.x-a.w/2,a.x2=o.x+a.w/2,a.y1=o.y-a.h/2,a.y2=o.y+a.h/2);function s(e,t,n){var r=0,i=0,a=t+n;return e>0&&a>0&&(r=t/a*e,i=n/a*e),{biasDiff:r,biasComplementDiff:i}}function l(e,t,n,r){if(n.units===`%`)switch(r){case`width`:return e>0?n.pfValue*e:0;case`height`:return t>0?n.pfValue*t:0;case`average`:return e>0&&t>0?n.pfValue*(e+t)/2:0;case`min`:return e>0&&t>0?e>t?n.pfValue*t:n.pfValue*e:0;case`max`:return e>0&&t>0?e>t?n.pfValue*e:n.pfValue*t:0;default:return 0}else if(n.units===`px`)return n.pfValue;else return 0}var u=i.width.left.value;i.width.left.units===`px`&&i.width.val>0&&(u=u*100/i.width.val);var d=i.width.right.value;i.width.right.units===`px`&&i.width.val>0&&(d=d*100/i.width.val);var f=i.height.top.value;i.height.top.units===`px`&&i.height.val>0&&(f=f*100/i.height.val);var p=i.height.bottom.value;i.height.bottom.units===`px`&&i.height.val>0&&(p=p*100/i.height.val);var m=s(i.width.val-a.w,u,d),h=m.biasDiff,g=m.biasComplementDiff,_=s(i.height.val-a.h,f,p),v=_.biasDiff,y=_.biasComplementDiff;t.autoPadding=l(a.w,a.h,e.pstyle(`padding`),e.pstyle(`padding-relative-to`).value),t.autoWidth=Math.max(a.w,i.width.val),o.x=(-h+a.x1+a.x2+g)/2,t.autoHeight=Math.max(a.h,i.height.val),o.y=(-v+a.y1+a.y2+y)/2}for(var r=0;r<this.length;r++){var i=this[r],a=i._private;(!a.compoundBoundsClean||e)&&(n(i),t.batching()||(a.compoundBoundsClean=!0))}return this},jA=function(e){return e===1/0||e===-1/0?0:e},MA=function(e,t,n,r,i){r-t!==0&&i-n!==0&&t!=null&&n!=null&&r!=null&&i!=null&&(e.x1=t<e.x1?t:e.x1,e.x2=r>e.x2?r:e.x2,e.y1=n<e.y1?n:e.y1,e.y2=i>e.y2?i:e.y2,e.w=e.x2-e.x1,e.h=e.y2-e.y1)},NA=function(e,t){return t==null?e:MA(e,t.x1,t.y1,t.x2,t.y2)},PA=function(e,t,n){return CD(e,t,n)},FA=function(e,t,n){if(!t.cy().headless()){var r=t._private,i=r.rstyle,a=i.arrowWidth/2,o=t.pstyle(n+`-arrow-shape`).value,s,l;if(o!==`none`){n===`source`?(s=i.srcX,l=i.srcY):n===`target`?(s=i.tgtX,l=i.tgtY):(s=i.midX,l=i.midY);var u=r.arrowBounds=r.arrowBounds||{},d=u[n]=u[n]||{};d.x1=s-a,d.y1=l-a,d.x2=s+a,d.y2=l+a,d.w=d.x2-d.x1,d.h=d.y2-d.y1,JD(d,1),MA(e,d.x1,d.y1,d.x2,d.y2)}}},IA=function(e,t,n){if(!t.cy().headless()){var r=n?n+`-`:``,i=t._private,a=i.rstyle;if(t.pstyle(r+`label`).strValue){var o=t.pstyle(`text-halign`),s=t.pstyle(`text-valign`),l=PA(a,`labelWidth`,n),u=PA(a,`labelHeight`,n),d=PA(a,`labelX`,n),f=PA(a,`labelY`,n),p=t.pstyle(r+`text-margin-x`).pfValue,m=t.pstyle(r+`text-margin-y`).pfValue,h=t.isEdge(),g=t.pstyle(r+`text-rotation`),_=t.pstyle(`text-outline-width`).pfValue,v=t.pstyle(`text-border-width`).pfValue/2,y=t.pstyle(`text-background-padding`).pfValue,b=2,x=u,S=l,C=S/2,w=x/2,T,E,D,O;if(h)T=d-C,E=d+C,D=f-w,O=f+w;else{switch(DA(o.value)){case`left`:T=d-S,E=d;break;case`center`:T=d-C,E=d+C;break;case`right`:T=d,E=d+S}switch(OA(s.value)){case`top`:D=f-x,O=f;break;case`center`:D=f-w,O=f+w;break;case`bottom`:D=f,O=f+x}}var k=p-Math.max(_,v)-y-b,A=p+Math.max(_,v)+y+b,j=m-Math.max(_,v)-y-b,M=m+Math.max(_,v)+y+b;T+=k,E+=A,D+=j,O+=M;var N=n||`main`,P=i.labelBounds,F=P[N]=P[N]||{};F.x1=T,F.y1=D,F.x2=E,F.y2=O,F.w=E-T,F.h=O-D,F.leftPad=k,F.rightPad=A,F.topPad=j,F.botPad=M;var I=h&&g.strValue===`autorotate`,L=g.pfValue!=null&&g.pfValue!==0;if(I||L){var R=I?PA(i.rstyle,`labelAngle`,n):g.pfValue,ee=Math.cos(R),z=Math.sin(R),B=(T+E)/2,te=(D+O)/2;if(!h){switch(DA(o.value)){case`left`:B=E;break;case`right`:B=T}switch(OA(s.value)){case`top`:te=O;break;case`bottom`:te=D}}var ne=function(e,t){return e-=B,t-=te,{x:e*ee-t*z+B,y:e*z+t*ee+te}},re=ne(T,D),ie=ne(T,O),ae=ne(E,D),oe=ne(E,O);T=Math.min(re.x,ie.x,ae.x,oe.x),E=Math.max(re.x,ie.x,ae.x,oe.x),D=Math.min(re.y,ie.y,ae.y,oe.y),O=Math.max(re.y,ie.y,ae.y,oe.y)}var se=N+`Rot`,ce=P[se]=P[se]||{};ce.x1=T,ce.y1=D,ce.x2=E,ce.y2=O,ce.w=E-T,ce.h=O-D,MA(e,T,D,E,O),MA(i.labelBounds.all,T,D,E,O)}return e}},LA=function(e,t){if(!t.cy().headless()){var n=t.pstyle(`outline-opacity`).value,r=t.pstyle(`outline-width`).value+t.pstyle(`outline-offset`).value;RA(e,t,n,r,`outside`,r/2)}},RA=function(e,t,n,r,i,a){if(!(n===0||r<=0||i===`inside`)){var o=t.cy().renderer(),s=o.nodeShapes[o.getNodeShape(t)];if(s){var l=t.position(),u=l.x,d=l.y,f=t.width(),p=t.height();s.hasMiterBounds?(i===`center`&&(r/=2),NA(e,s.miterBounds(u,d,f,p,r))):a!=null&&a>0&&YD(e,[a,a,a,a])}}},uHe=function(e,t){if(!t.cy().headless()){var n=t.pstyle(`border-opacity`).value,r=t.pstyle(`border-width`).pfValue,i=t.pstyle(`border-position`).value;RA(e,t,n,r,i)}},dHe=function(e,t){var n=e._private.cy,r=n.styleEnabled(),i=n.headless(),a=KD(),o=e._private,s=e.isNode(),l=e.isEdge(),u,d,f,p,m,h,g=o.rstyle,_=s&&r?e.pstyle(`bounds-expansion`).pfValue:[0],v=function(e){return e.pstyle(`display`).value!==`none`},y=!r||v(e)&&(!l||v(e.source())&&v(e.target()));if(y){var b=0,x=0;r&&t.includeOverlays&&(b=e.pstyle(`overlay-opacity`).value,b!==0&&(x=e.pstyle(`overlay-padding`).value));var S=0,C=0;r&&t.includeUnderlays&&(S=e.pstyle(`underlay-opacity`).value,S!==0&&(C=e.pstyle(`underlay-padding`).value));var w=Math.max(x,C),T=0,E=0;if(r&&(T=e.pstyle(`width`).pfValue,E=T/2),s&&t.includeNodes){var D=e.position();m=D.x,h=D.y;var O=e.outerWidth()/2,k=e.outerHeight()/2;u=m-O,d=m+O,f=h-k,p=h+k,MA(a,u,f,d,p),r&&LA(a,e),r&&t.includeOutlines&&!i&&LA(a,e),r&&uHe(a,e)}else if(l&&t.includeEdges){if(r&&!i){var A=e.pstyle(`curve-style`).strValue;if(u=Math.min(g.srcX,g.midX,g.tgtX),d=Math.max(g.srcX,g.midX,g.tgtX),f=Math.min(g.srcY,g.midY,g.tgtY),p=Math.max(g.srcY,g.midY,g.tgtY),u-=E,d+=E,f-=E,p+=E,MA(a,u,f,d,p),A===`haystack`){var j=g.haystackPts;if(j&&j.length===2){if(u=j[0].x,f=j[0].y,d=j[1].x,p=j[1].y,u>d){var M=u;u=d,d=M}if(f>p){var N=f;f=p,p=N}MA(a,u-E,f-E,d+E,p+E)}}else if(A===`bezier`||A===`unbundled-bezier`||wE(A,`segments`)||wE(A,`taxi`)){var P;switch(A){case`bezier`:case`unbundled-bezier`:P=g.bezierPts;break;case`segments`:case`taxi`:case`round-segments`:case`round-taxi`:P=g.linePts}if(P!=null)for(var F=0;F<P.length;F++){var I=P[F];u=I.x-E,d=I.x+E,f=I.y-E,p=I.y+E,MA(a,u,f,d,p)}}}else{var L=e.source().position(),R=e.target().position();if(u=L.x,d=R.x,f=L.y,p=R.y,u>d){var ee=u;u=d,d=ee}if(f>p){var z=f;f=p,p=z}u-=E,d+=E,f-=E,p+=E,MA(a,u,f,d,p)}}if(r&&t.includeEdges&&l&&(FA(a,e,`mid-source`),FA(a,e,`mid-target`),FA(a,e,`source`),FA(a,e,`target`)),r&&e.pstyle(`ghost`).value===`yes`){var B=e.pstyle(`ghost-offset-x`).pfValue,te=e.pstyle(`ghost-offset-y`).pfValue;MA(a,a.x1+B,a.y1+te,a.x2+B,a.y2+te)}var ne=o.bodyBounds=o.bodyBounds||{};XD(ne,a),YD(ne,_),JD(ne,1),r&&(u=a.x1,d=a.x2,f=a.y1,p=a.y2,MA(a,u-w,f-w,d+w,p+w));var re=o.overlayBounds=o.overlayBounds||{};XD(re,a),YD(re,_),JD(re,1);var ie=o.labelBounds=o.labelBounds||{};ie.all==null?ie.all=KD():Hze(ie.all),r&&t.includeLabels&&(t.includeMainLabels&&IA(a,e,null),l&&(t.includeSourceLabels&&IA(a,e,`source`),t.includeTargetLabels&&IA(a,e,`target`)))}return a.x1=jA(a.x1),a.y1=jA(a.y1),a.x2=jA(a.x2),a.y2=jA(a.y2),a.w=jA(a.x2-a.x1),a.h=jA(a.y2-a.y1),a.w>0&&a.h>0&&y&&(YD(a,_),JD(a,1)),a},zA=function(e){var t=0,n=function(e){return+!!e<<t++},r=0;return r+=n(e.incudeNodes),r+=n(e.includeEdges),r+=n(e.includeLabels),r+=n(e.includeMainLabels),r+=n(e.includeSourceLabels),r+=n(e.includeTargetLabels),r+=n(e.includeOverlays),r+=n(e.includeOutlines),r},BA=function(e){var t=function(e){return Math.round(e)};if(e.isEdge()){var n=e.source().position(),r=e.target().position();return aD([t(n.x),t(n.y),t(r.x),t(r.y)])}var i=e.position();return aD([t(i.x),t(i.y)])},VA=function(e,t){var n=e._private,r,i=e.isEdge(),a=(t==null?UA:zA(t))===UA;if(n.bbCache==null?(r=dHe(e,HA),n.bbCache=r,n.bbCachePosKey=BA(e)):r=n.bbCache,!a){var o=e.isNode();r=KD(),(t.includeNodes&&o||t.includeEdges&&!o)&&(t.includeOverlays?NA(r,n.overlayBounds):NA(r,n.bodyBounds)),t.includeLabels&&(t.includeMainLabels&&(!i||t.includeSourceLabels&&t.includeTargetLabels)?NA(r,n.labelBounds.all):(t.includeMainLabels&&NA(r,n.labelBounds.mainRot),t.includeSourceLabels&&NA(r,n.labelBounds.sourceRot),t.includeTargetLabels&&NA(r,n.labelBounds.targetRot))),r.w=r.x2-r.x1,r.h=r.y2-r.y1}return r},HA={includeNodes:!0,includeEdges:!0,includeLabels:!0,includeMainLabels:!0,includeSourceLabels:!0,includeTargetLabels:!0,includeOverlays:!0,includeUnderlays:!0,includeOutlines:!0,useCache:!0},UA=zA(HA),WA=bD(HA),AA.boundingBox=function(e){var t,n=e===void 0||e.useCache===void 0||e.useCache===!0,r=yE(function(e){var t=e._private;return t.bbCache==null||t.styleDirty||t.bbCachePosKey!==BA(e)},function(e){return e.id()});if(n&&this.length===1&&!r(this[0]))e=e===void 0?HA:WA(e),t=VA(this[0],e);else{t=KD(),e||=HA;var i=WA(e),a=this,o=a.cy().styleEnabled();this.edges().forEach(r),this.nodes().forEach(r),o&&this.recalculateRenderedStyle(n),this.updateCompoundBounds(!n);for(var s=0;s<a.length;s++){var l=a[s];r(l)&&l.dirtyBoundingBoxCache(),NA(t,VA(l,i))}}return t.x1=jA(t.x1),t.y1=jA(t.y1),t.x2=jA(t.x2),t.y2=jA(t.y2),t.w=jA(t.x2-t.x1),t.h=jA(t.y2-t.y1),t},AA.dirtyBoundingBoxCache=function(){for(var e=0;e<this.length;e++){var t=this[e]._private;t.bbCache=null,t.bbCachePosKey=null,t.bodyBounds=null,t.overlayBounds=null,t.labelBounds.all=null,t.labelBounds.source=null,t.labelBounds.target=null,t.labelBounds.main=null,t.labelBounds.sourceRot=null,t.labelBounds.targetRot=null,t.labelBounds.mainRot=null,t.arrowBounds.source=null,t.arrowBounds.target=null,t.arrowBounds[`mid-source`]=null,t.arrowBounds[`mid-target`]=null}return this.emitAndNotify(`bounds`),this},AA.boundingBoxAt=function(e){var t=this.nodes(),n=this.cy(),r=n.hasCompoundNodes(),i=n.collection();if(r&&(i=t.filter(function(e){return e.isParent()}),t=t.not(i)),lE(e)){var a=e;e=function(){return a}}var o=function(t,n){return t._private.bbAtOldPos=e(t,n)},s=function(e){return e._private.bbAtOldPos};n.startBatch(),t.forEach(o).silentPositions(e),r&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0));var l=Vze(this.boundingBox({useCache:!1}));return t.silentPositions(s),r&&(i.dirtyCompoundBoundsCache(),i.dirtyBoundingBoxCache(),i.updateCompoundBounds(!0)),n.endBatch(),l},kA.boundingbox=kA.bb=kA.boundingBox,kA.renderedBoundingbox=kA.renderedBoundingBox,fHe=AA,GA=KA={},qA=function(e){e.uppercaseName=CE(e.name),e.autoName=`auto`+e.uppercaseName,e.labelName=`label`+e.uppercaseName,e.outerName=`outer`+e.uppercaseName,e.uppercaseOuterName=CE(e.outerName),GA[e.name]=function(){var t=this[0],n=t._private,r=n.cy._private.styleEnabled;if(t){if(r){if(t.isParent())return t.updateCompoundBounds(),n[e.autoName]||0;var i=t.pstyle(e.name);switch(i.strValue){case`label`:return t.recalculateRenderedStyle(),n.rstyle[e.labelName]||0;default:return i.pfValue}}else return 1}},GA[`outer`+e.uppercaseName]=function(){var t=this[0],n=t._private.cy._private.styleEnabled;if(t){if(n){var r=t[e.name](),i=t.pstyle(`border-position`).value,a=i===`center`?t.pstyle(`border-width`).pfValue:i===`outside`?2*t.pstyle(`border-width`).pfValue:0,o=2*t.padding();return r+a+o}return 1}},GA[`rendered`+e.uppercaseName]=function(){var t=this[0];if(t)return t[e.name]()*this.cy().zoom()},GA[`rendered`+e.uppercaseOuterName]=function(){var t=this[0];if(t)return t[e.outerName]()*this.cy().zoom()}},qA({name:`width`}),qA({name:`height`}),KA.padding=function(){var e=this[0],t=e._private;return e.isParent()?(e.updateCompoundBounds(),t.autoPadding===void 0?e.pstyle(`padding`).pfValue:t.autoPadding):e.pstyle(`padding`).pfValue},KA.paddedHeight=function(){var e=this[0];return e.height()+2*e.padding()},KA.paddedWidth=function(){var e=this[0];return e.width()+2*e.padding()},pHe=KA,mHe=function(e,t){if(e.isEdge()&&e.takesUpSpace())return t(e)},hHe=function(e,t){if(e.isEdge()&&e.takesUpSpace()){var n=e.cy();return PD(t(e),n.zoom(),n.pan())}},gHe=function(e,t){if(e.isEdge()&&e.takesUpSpace()){var n=e.cy(),r=n.pan(),i=n.zoom();return t(e).map(function(e){return PD(e,i,r)})}},JA={controlPoints:{get:function(e){return e.renderer().getControlPoints(e)},mult:!0},segmentPoints:{get:function(e){return e.renderer().getSegmentPoints(e)},mult:!0},sourceEndpoint:{get:function(e){return e.renderer().getSourceEndpoint(e)}},targetEndpoint:{get:function(e){return e.renderer().getTargetEndpoint(e)}},midpoint:{get:function(e){return e.renderer().getEdgeMidpoint(e)}}},_He=function(e){return`rendered`+e[0].toUpperCase()+e.substr(1)},vHe=DE({},cHe,fHe,pHe,Object.keys(JA).reduce(function(e,t){var n=JA[t],r=_He(t);return e[t]=function(){return mHe(this,n.get)},e[r]=n.mult?function(){return gHe(this,n.get)}:function(){return hHe(this,n.get)},e},{})),YA=function(e,t){this.recycle(e,t)},YA.prototype={instanceString:function(){return`event`},recycle:function(e,t){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=OT,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?kT:OT):e!=null&&e.type?t=e:this.type=e,t!=null&&(this.originalEvent=t.originalEvent,this.type=t.type==null?this.type:t.type,this.cy=t.cy,this.target=t.target,this.position=t.position,this.renderedPosition=t.renderedPosition,this.namespace=t.namespace,this.layout=t.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var n=this.position,r=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:n.x*r+i.x,y:n.y*r+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=kT;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=kT;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=kT,this.stopPropagation()},isDefaultPrevented:OT,isPropagationStopped:OT,isImmediatePropagationStopped:OT},XA=/^([^.]+)(\.(?:[^.]+))?$/,yHe=`.*`,ZA={qualifierCompare:function(e,t){return e===t},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},QA=Object.keys(ZA),bHe={},$A=AT.prototype,ej=function(e,t,n,r,i,a,o){sE(r)&&(i=r,r=null),o&&(a=a==null?o:DE({},a,o));for(var s=cE(n)?n:n.split(/\s+/),l=0;l<s.length;l++){var u=s[l];if(!vE(u)){var d=u.match(XA);if(d){var f=d[1];if(t(e,u,f,d[2]?d[2]:null,r,i,a)===!1)break}}}},tj=function(e,t){return e.addEventFields(e.context,t),new YA(t.type,t)},xHe=function(e,t,n){if(ORe(n)){t(e,n);return}if(lE(n)){t(e,tj(e,n));return}for(var r=cE(n)?n:n.split(/\s+/),i=0;i<r.length;i++){var a=r[i];if(!vE(a)){var o=a.match(XA);if(o){var s=o[1];t(e,tj(e,{type:s,namespace:o[2]?o[2]:null,target:e.context}))}}}},$A.on=$A.addListener=function(e,t,n,r,i){return ej(this,function(e,t,n,r,i,a,o){sE(a)&&e.listeners.push({event:t,callback:a,type:n,namespace:r,qualifier:i,conf:o})},e,t,n,r,i),this},$A.one=function(e,t,n,r){return this.on(e,t,n,r,{one:!0})},$A.removeListener=$A.off=function(e,t,n,r){var i=this;this.emitting!==0&&(this.listeners=fze(this.listeners));for(var a=this.listeners,o=function(o){var s=a[o];ej(i,function(t,n,r,i,l,u){if((s.type===r||e===`*`)&&(!i&&s.namespace!==`.*`||s.namespace===i)&&(!l||t.qualifierCompare(s.qualifier,l))&&(!u||s.callback===u))return a.splice(o,1),!1},e,t,n,r)},s=a.length-1;s>=0;s--)o(s);return this},$A.removeAllListeners=function(){return this.removeListener(`*`)},$A.emit=$A.trigger=function(e,t,n){var r=this.listeners,i=r.length;return this.emitting++,cE(t)||(t=[t]),xHe(this,function(e,a){n!=null&&(r=[{event:a.event,type:a.type,namespace:a.namespace,callback:n}],i=r.length);for(var o=function(){var n=r[s];if(n.type===a.type&&(!n.namespace||n.namespace===a.namespace||n.namespace===yHe)&&e.eventMatches(e.context,n,a)){var i=[a];t!=null&&mze(i,t),e.beforeEmit(e.context,n,a),n.conf&&n.conf.one&&(e.listeners=e.listeners.filter(function(e){return e!==n}));var o=e.callbackContext(e.context,n,a),l=n.callback.apply(o,i);e.afterEmit(e.context,n,a),l===!1&&(a.stopPropagation(),a.preventDefault())}},s=0;s<i;s++)o();e.bubble(e.context)&&!a.isPropagationStopped()&&e.parent(e.context).emit(a,t)},e),this.emitting--,this},SHe={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return r==null||e!==n.target&&mE(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e.cy(),t.target=e},callbackContext:function(e,t,n){return t.qualifier==null?e:n.target},beforeEmit:function(e,t){t.conf&&t.conf.once&&t.conf.onceCollection.removeListener(t.event,t.qualifier,t.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},nj=function(e){return oE(e)?new _A(e):e},rj={createEmitter:function(){for(var e=0;e<this.length;e++){var t=this[e],n=t._private;n.emitter||=new AT(SHe,t)}return this},emitter:function(){return this._private.emitter},on:function(e,t,n){for(var r=nj(t),i=0;i<this.length;i++)this[i].emitter().on(e,r,n);return this},removeListener:function(e,t,n){for(var r=nj(t),i=0;i<this.length;i++)this[i].emitter().removeListener(e,r,n);return this},removeAllListeners:function(){for(var e=0;e<this.length;e++)this[e].emitter().removeAllListeners();return this},one:function(e,t,n){for(var r=nj(t),i=0;i<this.length;i++)this[i].emitter().one(e,r,n);return this},once:function(e,t,n){for(var r=nj(t),i=0;i<this.length;i++)this[i].emitter().on(e,r,n,{once:!0,onceCollection:this})},emit:function(e,t){for(var n=0;n<this.length;n++)this[n].emitter().emit(e,t);return this},emitAndNotify:function(e,t){if(this.length!==0)return this.cy().notify(e,this),this.emit(e,t),this}},iA.eventAliasesOn(rj),ij={nodes:function(e){return this.filter(function(e){return e.isNode()}).filter(e)},edges:function(e){return this.filter(function(e){return e.isEdge()}).filter(e)},byGroup:function(){for(var e=this.spawn(),t=this.spawn(),n=0;n<this.length;n++){var r=this[n];r.isNode()?e.push(r):t.push(r)}return{nodes:e,edges:t}},filter:function(e,t){if(e===void 0)return this;if(oE(e)||pE(e))return new _A(e).filter(this);if(sE(e)){for(var n=this.spawn(),r=this,i=0;i<r.length;i++){var a=r[i];(t?e.apply(t,[a,i,r]):e(a,i,r))&&n.push(a)}return n}return this.spawn()},not:function(e){if(e){oE(e)&&(e=this.filter(e));for(var t=this.spawn(),n=0;n<this.length;n++){var r=this[n];e.has(r)||t.push(r)}return t}return this},absoluteComplement:function(){return this.cy().mutableElements().not(this)},intersect:function(e){if(oE(e)){var t=e;return this.filter(t)}for(var n=this.spawn(),r=this,i=e,a=this.length<e.length,o=a?r:i,s=a?i:r,l=0;l<o.length;l++){var u=o[l];s.has(u)&&n.push(u)}return n},xor:function(e){var t=this._private.cy;oE(e)&&(e=t.$(e));var n=this.spawn(),r=this,i=e,a=function(e,t){for(var r=0;r<e.length;r++){var i=e[r],a=i._private.data.id;t.hasElementWithId(a)||n.push(i)}};return a(r,i),a(i,r),n},diff:function(e){var t=this._private.cy;oE(e)&&(e=t.$(e));var n=this.spawn(),r=this.spawn(),i=this.spawn(),a=this,o=e,s=function(e,t,n){for(var r=0;r<e.length;r++){var a=e[r],o=a._private.data.id;t.hasElementWithId(o)?i.merge(a):n.push(a)}};return s(a,o,n),s(o,a,r),{left:n,right:r,both:i}},add:function(e){var t=this._private.cy;if(!e)return this;if(oE(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=this.spawnSelf(),i=0;i<e.length;i++){var a=e[i];this.has(a)||r.push(a)}return r},merge:function(e){var t=this._private,n=t.cy;if(!e)return this;if(e&&oE(e)){var r=e;e=n.mutableElements().filter(r)}for(var i=t.map,a=0;a<e.length;a++){var o=e[a],s=o._private.data.id;if(!i.has(s)){var l=this.length++;this[l]=o,i.set(s,{ele:o,index:l})}}return this},unmergeAt:function(e){var t=this[e].id(),n=this._private.map;this[e]=void 0,n.delete(t);var r=e===this.length-1;if(this.length>1&&!r){var i=this.length-1,a=this[i],o=a._private.data.id;this[i]=void 0,this[e]=a,n.set(o,{ele:a,index:e})}return this.length--,this},unmergeOne:function(e){e=e[0];var t=this._private,n=e._private.data.id,r=t.map.get(n);if(!r)return this;var i=r.index;return this.unmergeAt(i),this},unmerge:function(e){var t=this._private.cy;if(!e)return this;if(e&&oE(e)){var n=e;e=t.mutableElements().filter(n)}for(var r=0;r<e.length;r++)this.unmergeOne(e[r]);return this},unmergeBy:function(e){for(var t=this.length-1;t>=0;t--){var n=this[t];e(n)&&this.unmergeAt(t)}return this},map:function(e,t){for(var n=[],r=this,i=0;i<r.length;i++){var a=r[i],o=t?e.apply(t,[a,i,r]):e(a,i,r);n.push(o)}return n},reduce:function(e,t){for(var n=t,r=this,i=0;i<r.length;i++)n=e(n,r[i],i,r);return n},max:function(e,t){for(var n=-1/0,r,i=this,a=0;a<i.length;a++){var o=i[a],s=t?e.apply(t,[o,a,i]):e(o,a,i);s>n&&(n=s,r=o)}return{value:n,ele:r}},min:function(e,t){for(var n=1/0,r,i=this,a=0;a<i.length;a++){var o=i[a],s=t?e.apply(t,[o,a,i]):e(o,a,i);s<n&&(n=s,r=o)}return{value:n,ele:r}}},aj=ij,aj.u=aj[`|`]=aj[`+`]=aj.union=aj.or=aj.add,aj[`\\`]=aj[`!`]=aj[`-`]=aj.difference=aj.relativeComplement=aj.subtract=aj.not,aj.n=aj[`&`]=aj[`.`]=aj.and=aj.intersection=aj.intersect,aj[`^`]=aj[`(+)`]=aj[`(-)`]=aj.symmetricDifference=aj.symdiff=aj.xor,aj.fnFilter=aj.filterFn=aj.stdFilter=aj.filter,aj.complement=aj.abscomp=aj.absoluteComplement,CHe={isNode:function(){return this.group()===`nodes`},isEdge:function(){return this.group()===`edges`},isLoop:function(){return this.isEdge()&&this.source()[0]===this.target()[0]},isSimple:function(){return this.isEdge()&&this.source()[0]!==this.target()[0]},group:function(){var e=this[0];if(e)return e._private.group}},oj=function(e,t){var n=e.cy().hasCompoundNodes();function r(e){var t=e.pstyle(`z-compound-depth`);return t.value===`auto`?n?e.zDepth():0:t.value===`bottom`?-1:t.value===`top`?lD:0}var i=r(e)-r(t);if(i!==0)return i;function a(e){return e.pstyle(`z-index-compare`).value===`auto`?+!!e.isNode():0}var o=a(e)-a(t);if(o!==0)return o;var s=e.pstyle(`z-index`).value-t.pstyle(`z-index`).value;return s===0?e.poolIndex()-t.poolIndex():s},sj={forEach:function(e,t){if(sE(e))for(var n=this.length,r=0;r<n;r++){var i=this[r];if((t?e.apply(t,[i,r,this]):e(i,r,this))===!1)break}return this},toArray:function(){for(var e=[],t=0;t<this.length;t++)e.push(this[t]);return e},slice:function(e,t){var n=[],r=this.length;t??=r,e??=0,e<0&&(e=r+e),t<0&&(t=r+t);for(var i=e;i>=0&&i<t&&i<r;i++)n.push(this[i]);return this.spawn(n)},size:function(){return this.length},eq:function(e){return this[e]||this.spawn()},first:function(){return this[0]||this.spawn()},last:function(){return this[this.length-1]||this.spawn()},empty:function(){return this.length===0},nonempty:function(){return!this.empty()},sort:function(e){if(!sE(e))return this;var t=this.toArray().sort(e);return this.spawn(t)},sortByZIndex:function(){return this.sort(oj)},zDepth:function(){var e=this[0];if(e){var t=e._private;if(t.group===`nodes`){var n=t.data.parent?e.parents().size():0;return e.isParent()?n:lD-1}var r=t.source,i=t.target,a=r.zDepth(),o=i.zDepth();return Math.max(a,o,0)}}},sj.each=sj.forEach,(function(){var e=`undefined`;(typeof Symbol>`u`?`undefined`:uT(Symbol))!=e&&uT(Symbol.iterator)!=e&&(sj[Symbol.iterator]=function(){var e=this,t={value:void 0,done:!1},n=0,r=this.length;return $Fe({next:function(){return n<r?t.value=e[n++]:(t.value=void 0,t.done=!0),t}},Symbol.iterator,function(){return this})})})(),wHe=bD({nodeDimensionsIncludeLabels:!1}),cj={layoutDimensions:function(e){e=wHe(e);var t;if(!this.takesUpSpace())t={w:0,h:0};else if(e.nodeDimensionsIncludeLabels){var n=this.boundingBox();t={w:n.w,h:n.h}}else t={w:this.outerWidth(),h:this.outerHeight()};return(t.w===0||t.h===0)&&(t.w=t.h=1),t},layoutPositions:function(e,t,n){var r=this.nodes().filter(function(e){return!e.isParent()}),i=this.cy(),a=t.eles,o=function(e){return e.id()},s=yE(n,o);e.emit({type:`layoutstart`,layout:e}),e.animations=[];var l=function(e,t,n){var r={x:t.x1+t.w/2,y:t.y1+t.h/2},i={x:(n.x-r.x)*e,y:(n.y-r.y)*e};return{x:r.x+i.x,y:r.y+i.y}},u=t.spacingFactor&&t.spacingFactor!==1,d=function(){if(!u)return null;for(var e=KD(),t=0;t<r.length;t++){var n=r[t],i=s(n,t);qD(e,i.x,i.y)}return e}(),f=yE(function(e,n){var r=s(e,n);return u&&(r=l(Math.abs(t.spacingFactor),d,r)),t.transform!=null&&(r=t.transform(e,r)),r},o);if(t.animate){for(var p=0;p<r.length;p++){var m=r[p],h=f(m,p);if(t.animateFilter==null||t.animateFilter(m,p)){var g=m.animation({position:h,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(g)}else m.position(h)}if(t.fit){var _=i.animation({fit:{boundingBox:a.boundingBoxAt(f),padding:t.padding},duration:t.animationDuration,easing:t.animationEasing});e.animations.push(_)}else if(t.zoom!==void 0&&t.pan!==void 0){var v=i.animation({zoom:t.zoom,pan:t.pan,duration:t.animationDuration,easing:t.animationEasing});e.animations.push(v)}e.animations.forEach(function(e){return e.play()}),e.one(`layoutready`,t.ready),e.emit({type:`layoutready`,layout:e}),ik.all(e.animations.map(function(e){return e.promise()})).then(function(){e.one(`layoutstop`,t.stop),e.emit({type:`layoutstop`,layout:e})})}else r.positions(f),t.fit&&i.fit(t.eles,t.padding),t.zoom!=null&&i.zoom(t.zoom),t.pan&&i.pan(t.pan),e.one(`layoutready`,t.ready),e.emit({type:`layoutready`,layout:e}),e.one(`layoutstop`,t.stop),e.emit({type:`layoutstop`,layout:e});return this},layout:function(e){return this.cy().makeLayout(DE({},e,{eles:this}))}},cj.createLayout=cj.makeLayout=cj.layout,lj={recalculateRenderedStyle:function(e){var t=this.cy(),n=t.renderer(),r=t.styleEnabled();return n&&r&&n.recalculateRenderedStyle(this,e),this},dirtyStyleCache:function(){var e=this.cy(),t=function(e){return e._private.styleCache=null};if(e.hasCompoundNodes()){var n=this.spawnSelf().merge(this.descendants()).merge(this.parents());n.merge(n.connectedEdges()),n.forEach(t)}else this.forEach(function(e){t(e),e.connectedEdges().forEach(t)});return this},updateStyle:function(e){var t=this._private.cy;if(!t.styleEnabled())return this;if(t.batching())return t._private.batchStyleEles.merge(this),this;var n=t.hasCompoundNodes(),r=this;e=!!(e||e===void 0),n&&(r=this.spawnSelf().merge(this.descendants()).merge(this.parents()));var i=r;return e?i.emitAndNotify(`style`):i.emit(`style`),r.forEach(function(e){return e._private.styleDirty=!0}),this},cleanStyle:function(){var e=this.cy();if(e.styleEnabled())for(var t=0;t<this.length;t++){var n=this[t];n._private.styleDirty&&(n._private.styleDirty=!1,e.style().apply(n))}},parsedStyle:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this[0],r=n.cy();if(r.styleEnabled()&&n)return n._private.styleDirty&&(n._private.styleDirty=!1,r.style().apply(n)),n._private.style[e]??(t?r.style().getDefaultProperty(e):null)},numericStyle:function(e){var t=this[0];if(t.cy().styleEnabled()&&t){var n=t.pstyle(e);return n.pfValue===void 0?n.value:n.pfValue}},numericStyleUnits:function(e){var t=this[0];if(t.cy().styleEnabled()&&t)return t.pstyle(e).units},renderedStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=this[0];if(n)return t.style().getRenderedStyle(n,e)},style:function(e,t){var n=this.cy();if(!n.styleEnabled())return this;var r=!1,i=n.style();if(lE(e)){var a=e;i.applyBypass(this,a,r),this.emitAndNotify(`style`)}else if(oE(e)){if(t===void 0){var o=this[0];return o?i.getStylePropertyValue(o,e):void 0}i.applyBypass(this,e,t,r),this.emitAndNotify(`style`)}else if(e===void 0){var s=this[0];return s?i.getRawStyle(s):void 0}return this},removeStyle:function(e){var t=this.cy();if(!t.styleEnabled())return this;var n=!1,r=t.style(),i=this;if(e===void 0)for(var a=0;a<i.length;a++){var o=i[a];r.removeAllBypasses(o,n)}else{e=e.split(/\s+/);for(var s=0;s<i.length;s++){var l=i[s];r.removeBypasses(l,e,n)}}return this.emitAndNotify(`style`),this},show:function(){return this.css(`display`,`element`),this},hide:function(){return this.css(`display`,`none`),this},effectiveOpacity:function(){var e=this.cy();if(!e.styleEnabled())return 1;var t=e.hasCompoundNodes(),n=this[0];if(n){var r=n._private,i=n.pstyle(`opacity`).value;if(!t)return i;var a=r.data.parent?n.parents():null;if(a)for(var o=0;o<a.length;o++)i=a[o].pstyle(`opacity`).value*i;return i}},transparent:function(){if(!this.cy().styleEnabled())return!1;var e=this[0],t=e.cy().hasCompoundNodes();if(e)return t?e.effectiveOpacity()===0:e.pstyle(`opacity`).value===0},backgrounding:function(){return this.cy().styleEnabled()?!!this[0]._private.backgrounding:!1}},uj=jT(`eleTakesUpSpace`,function(e){return e.pstyle(`display`).value===`element`&&e.width()!==0&&(!e.isNode()||e.height()!==0)}),lj.takesUpSpace=MT(`takesUpSpace`,PT({ok:uj})),lj.interactive=MT(`interactive`,PT({ok:jT(`eleInteractive`,function(e){return e.pstyle(`events`).value===`yes`&&e.pstyle(`visibility`).value===`visible`&&uj(e)}),parentOk:jT(`parentInteractive`,function(e){return e.pstyle(`visibility`).value===`visible`&&uj(e)}),edgeOkViaNode:uj})),lj.noninteractive=function(){var e=this[0];if(e)return!e.interactive()},lj.visible=MT(`visible`,PT({ok:jT(`eleVisible`,function(e){return e.pstyle(`visibility`).value===`visible`&&e.pstyle(`opacity`).pfValue!==0&&uj(e)}),edgeOkViaNode:uj})),lj.hidden=function(){var e=this[0];if(e)return!e.visible()},lj.isBundledBezier=MT(`isBundledBezier`,function(){return this.cy().styleEnabled()?!this.removed()&&this.pstyle(`curve-style`).value===`bezier`&&this.takesUpSpace():!1}),lj.bypass=lj.css=lj.style,lj.renderedCss=lj.renderedStyle,lj.removeBypass=lj.removeCss=lj.removeStyle,lj.pstyle=lj.parsedStyle,dj={},FT({field:`locked`,overrideField:function(e){return e.cy().autolock()?!0:void 0},on:`lock`,off:`unlock`}),FT({field:`grabbable`,overrideField:function(e){return e.cy().autoungrabify()||e.pannable()?!1:void 0},on:`grabify`,off:`ungrabify`}),FT({field:`selected`,ableField:`selectable`,overrideAble:function(e){return!e.cy().autounselectify()&&void 0},on:`select`,off:`unselect`}),FT({field:`selectable`,overrideField:function(e){return!e.cy().autounselectify()&&void 0},on:`selectify`,off:`unselectify`}),dj.deselect=dj.unselect,dj.grabbed=function(){var e=this[0];if(e)return e._private.grabbed},FT({field:`active`,on:`activate`,off:`unactivate`}),FT({field:`pannable`,on:`panify`,off:`unpanify`}),dj.inactive=function(){var e=this[0];if(e)return!e._private.active},fj={},pj=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var a=n[i];if(a.isNode()){for(var o=!1,s=a.connectedEdges(),l=0;l<s.length;l++){var u=s[l],d=u.source(),f=u.target();if(e.noIncomingEdges&&f===a&&d!==a||e.noOutgoingEdges&&d===a&&f!==a){o=!0;break}}o||r.push(a)}}return this.spawn(r,!0).filter(t)}},mj=function(e){return function(t){for(var n=this,r=[],i=0;i<n.length;i++){var a=n[i];if(a.isNode())for(var o=a.connectedEdges(),s=0;s<o.length;s++){var l=o[s],u=l.source(),d=l.target();e.outgoing&&u===a?(r.push(l),r.push(d)):e.incoming&&d===a&&(r.push(l),r.push(u))}}return this.spawn(r,!0).filter(t)}},hj=function(e){return function(t){for(var n=this,r=[],i={};;){var a=e.outgoing?n.outgoers():n.incomers();if(a.length===0)break;for(var o=!1,s=0;s<a.length;s++){var l=a[s],u=l.id();i[u]||(i[u]=!0,r.push(l),o=!0)}if(!o)break;n=a}return this.spawn(r,!0).filter(t)}},fj.clearTraversalCache=function(){for(var e=0;e<this.length;e++)this[e]._private.traversalCache=null},DE(fj,{roots:pj({noIncomingEdges:!0}),leaves:pj({noOutgoingEdges:!0}),outgoers:bA(mj({outgoing:!0}),`outgoers`),successors:hj({outgoing:!0}),incomers:bA(mj({incoming:!0}),`incomers`),predecessors:hj({})}),DE(fj,{neighborhood:bA(function(e){for(var t=[],n=this.nodes(),r=0;r<n.length;r++)for(var i=n[r],a=i.connectedEdges(),o=0;o<a.length;o++){var s=a[o],l=s.source(),u=s.target(),d=i===l?u:l;d.length>0&&t.push(d[0]),t.push(s[0])}return this.spawn(t,!0).filter(e)},`neighborhood`),closedNeighborhood:function(e){return this.neighborhood().add(this).filter(e)},openNeighborhood:function(e){return this.neighborhood(e)}}),fj.neighbourhood=fj.neighborhood,fj.closedNeighbourhood=fj.closedNeighborhood,fj.openNeighbourhood=fj.openNeighborhood,DE(fj,{source:bA(function(e){var t=this[0],n;return t&&(n=t._private.source||t.cy().collection()),n&&e?n.filter(e):n},`source`),target:bA(function(e){var t=this[0],n;return t&&(n=t._private.target||t.cy().collection()),n&&e?n.filter(e):n},`target`),sources:vLe({attr:`source`}),targets:vLe({attr:`target`})}),DE(fj,{edgesWith:bA(yLe(),`edgesWith`),edgesTo:bA(yLe({thisIsSrc:!0}),`edgesTo`)}),DE(fj,{connectedEdges:bA(function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];if(i.isNode())for(var a=i._private.edges,o=0;o<a.length;o++){var s=a[o];t.push(s)}}return this.spawn(t,!0).filter(e)},`connectedEdges`),connectedNodes:bA(function(e){for(var t=[],n=this,r=0;r<n.length;r++){var i=n[r];i.isEdge()&&(t.push(i.source()[0]),t.push(i.target()[0]))}return this.spawn(t,!0).filter(e)},`connectedNodes`),parallelEdges:bA(bLe(),`parallelEdges`),codirectedEdges:bA(bLe({codirected:!0}),`codirectedEdges`)}),DE(fj,{components:function(e){var t=this,n=t.cy(),r=n.collection(),i=e==null?t.nodes():e.nodes(),a=[];e!=null&&i.empty()&&(i=e.sources());var o=function(e,t){r.merge(e),i.unmerge(e),t.merge(e)};if(i.empty())return t.spawn();var s=function(){var e=n.collection();a.push(e);var r=i[0];o(r,e),t.bfs({directed:!1,roots:r,visit:function(t){return o(t,e)}}),e.forEach(function(n){n.connectedEdges().forEach(function(n){t.has(n)&&e.has(n.source())&&e.has(n.target())&&e.merge(n)})})};do s();while(i.length>0);return a},component:function(){var e=this[0];return e.cy().mutableElements().components(e)[0]}}),fj.componentsOf=fj.components,gj=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(e===void 0){mD(`A collection must have a reference to the core`);return}var i=new TD,a=!1;if(!t)t=[];else if(t.length>0&&lE(t[0])&&!mE(t[0])){a=!0;for(var o=[],s=new ED,l=0,u=t.length;l<u;l++){var d=t[l];d.data??={};var f=d.data;if(f.id==null)f.id=vD();else if(e.hasElementWithId(f.id)||s.has(f.id))continue;var p=new DD(e,d,!1);o.push(p),s.add(f.id)}t=o}this.length=0;for(var m=0,h=t.length;m<h;m++){var g=t[m][0];if(g!=null){var _=g._private.data.id;(!n||!i.has(_))&&(n&&i.set(_,{index:this.length,ele:g}),this[this.length]=g,this.length++)}}this._private={eles:this,cy:e,get map(){return this.lazyMap??this.rebuildMap(),this.lazyMap},set map(e){this.lazyMap=e},rebuildMap:function(){for(var e=this.lazyMap=new TD,t=this.eles,n=0;n<t.length;n++){var r=t[n];e.set(r.id(),{index:n,ele:r})}}},n&&(this._private.map=i),a&&!r&&this.restore()},_j=DD.prototype=gj.prototype=Object.create(Array.prototype),_j.instanceString=function(){return`collection`},_j.spawn=function(e,t){return new gj(this.cy(),e,t)},_j.spawnSelf=function(){return this.spawn(this)},_j.cy=function(){return this._private.cy},_j.renderer=function(){return this._private.cy.renderer()},_j.element=function(){return this[0]},_j.collection=function(){return hE(this)?this:new gj(this._private.cy,[this])},_j.unique=function(){return new gj(this._private.cy,this,!0)},_j.hasElementWithId=function(e){return e=``+e,this._private.map.has(e)},_j.getElementById=function(e){e=``+e;var t=this._private.cy,n=this._private.map.get(e);return n?n.ele:new gj(t)},_j.$id=_j.getElementById,_j.poolIndex=function(){var e=this._private.cy._private.elements,t=this[0]._private.data.id;return e._private.map.get(t).index},_j.indexOf=function(e){var t=e[0]._private.data.id;return this._private.map.get(t).index},_j.indexOfId=function(e){return e=``+e,this._private.map.get(e).index},_j.json=function(e){var t=this.element(),n=this.cy();if(t==null&&e)return this;if(t!=null){var r=t._private;if(lE(e)){if(n.startBatch(),e.data){t.data(e.data);var i=r.data;if(t.isEdge()){var a=!1,o={},s=e.data.source,l=e.data.target;s!=null&&s!=i.source&&(o.source=``+s,a=!0),l!=null&&l!=i.target&&(o.target=``+l,a=!0),a&&(t=t.move(o))}else{var u=(`parent`in e.data),d=e.data.parent;u&&(d!=null||i.parent!=null)&&d!=i.parent&&(d===void 0&&(d=null),d!=null&&(d=``+d),t=t.move({parent:d}))}}e.position&&t.position(e.position);var f=function(n,i,a){var o=e[n];o!=null&&o!==r[n]&&(o?t[i]():t[a]())};return f(`removed`,`remove`,`restore`),f(`selected`,`select`,`unselect`),f(`selectable`,`selectify`,`unselectify`),f(`locked`,`lock`,`unlock`),f(`grabbable`,`grabify`,`ungrabify`),f(`pannable`,`panify`,`unpanify`),e.classes!=null&&t.classes(e.classes),n.endBatch(),this}if(e===void 0){var p={data:_D(r.data),position:_D(r.position),group:r.group,removed:r.removed,selected:r.selected,selectable:r.selectable,locked:r.locked,grabbable:r.grabbable,pannable:r.pannable,classes:null};p.classes=``;var m=0;return r.classes.forEach(function(e){return p.classes+=m++===0?e:` `+e}),p}}},_j.jsons=function(){for(var e=[],t=0;t<this.length;t++){var n=this[t].json();e.push(n)}return e},_j.clone=function(){for(var e=this.cy(),t=[],n=0;n<this.length;n++){var r=new DD(e,this[n].json(),!1);t.push(r)}return new gj(e,t)},_j.copy=_j.clone,_j.restore=function(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this,r=n.cy(),i=r._private,a=[],o=[],s,l=0,u=n.length;l<u;l++){var d=n[l];t&&!d.removed()||(d.isNode()?a.push(d):o.push(d))}s=a.concat(o);var f,p=function(){s.splice(f,1),f--};for(f=0;f<s.length;f++){var m=s[f],h=m._private,g=h.data;if(m.clearTraversalCache(),!(!t&&!h.removed)){if(g.id===void 0)g.id=vD();else if(uE(g.id))g.id=``+g.id;else if(vE(g.id)||!oE(g.id)){mD("Can not create element with invalid string ID `"+g.id+"`"),p();continue}else if(r.hasElementWithId(g.id)){mD("Can not create second element with ID `"+g.id+"`"),p();continue}}var _=g.id;if(m.isNode()){var v=h.position;v.x??=0,v.y??=0}if(m.isEdge()){for(var y=m,b=[`source`,`target`],x=b.length,S=!1,C=0;C<x;C++){var w=b[C],T=g[w];uE(T)&&(T=g[w]=``+g[w]),T==null||T===``?(mD("Can not create edge `"+_+"` with unspecified "+w),S=!0):r.hasElementWithId(T)||(mD("Can not create edge `"+_+"` with nonexistent "+w+" `"+T+"`"),S=!0)}if(S){p();continue}var E=r.getElementById(g.source),D=r.getElementById(g.target);E.same(D)?E._private.edges.push(y):(E._private.edges.push(y),D._private.edges.push(y)),y._private.source=E,y._private.target=D}h.map=new TD,h.map.set(_,{ele:m,index:0}),h.removed=!1,t&&r.addToPool(m)}for(var O=0;O<a.length;O++){var k=a[O],A=k._private.data;uE(A.parent)&&(A.parent=``+A.parent);var j=A.parent;if(j!=null||k._private.parent){var M=k._private.parent?r.collection().merge(k._private.parent):r.getElementById(j);if(M.empty())A.parent=void 0;else if(M[0].removed())gD(`Node added with missing parent, reference to parent removed`),A.parent=void 0,k._private.parent=null;else{for(var N=!1,P=M;!P.empty();){if(k.same(P)){N=!0,A.parent=void 0;break}P=P.parent()}N||(M[0]._private.children.push(k),k._private.parent=M[0],i.hasCompoundNodes=!0)}}}if(s.length>0){for(var F=s.length===n.length?n:new gj(r,s),I=0;I<F.length;I++){var L=F[I];L.isNode()||(L.parallelEdges().clearTraversalCache(),L.source().clearTraversalCache(),L.target().clearTraversalCache())}(i.hasCompoundNodes?r.collection().merge(F).merge(F.connectedNodes()).merge(F.parent()):F).dirtyCompoundBoundsCache().dirtyBoundingBoxCache().updateStyle(e),e?F.emitAndNotify(`add`):t&&F.emit(`add`)}return n},_j.removed=function(){var e=this[0];return e&&e._private.removed},_j.inside=function(){var e=this[0];return e&&!e._private.removed},_j.remove=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this,r=[],i={},a=n._private.cy;function o(e){for(var t=e._private.edges,n=0;n<t.length;n++)l(t[n])}function s(e){for(var t=e._private.children,n=0;n<t.length;n++)l(t[n])}function l(e){var n=i[e.id()];t&&e.removed()||n||(i[e.id()]=!0,e.isNode()?(r.push(e),o(e),s(e)):r.unshift(e))}for(var u=0,d=n.length;u<d;u++){var f=n[u];l(f)}function p(e,t){var n=e._private.edges;xD(n,t),e.clearTraversalCache()}function m(e){e.clearTraversalCache()}var h=[];h.ids={};function g(e,t){t=t[0],e=e[0];var n=e._private.children,r=e.id();xD(n,t),t._private.parent=null,h.ids[r]||(h.ids[r]=!0,h.push(e))}n.dirtyCompoundBoundsCache(),t&&a.removeFromPool(r);for(var _=0;_<r.length;_++){var v=r[_];if(v.isEdge()){var y=v.source()[0],b=v.target()[0];p(y,v),p(b,v);for(var x=v.parallelEdges(),S=0;S<x.length;S++){var C=x[S];m(C),C.isBundledBezier()&&C.dirtyBoundingBoxCache()}}else{var w=v.parent();w.length!==0&&g(w,v)}t&&(v._private.removed=!0)}var T=a._private.elements;a._private.hasCompoundNodes=!1;for(var E=0;E<T.length;E++)if(T[E].isParent()){a._private.hasCompoundNodes=!0;break}var D=new gj(this.cy(),r);D.size()>0&&(e?D.emitAndNotify(`remove`):t&&D.emit(`remove`));for(var O=0;O<h.length;O++){var k=h[O];(!t||!k.removed())&&k.updateStyle()}return D},_j.move=function(e){var t=this._private.cy,n=this,r=!1,i=!1,a=function(e){return e==null?e:``+e};if(e.source!==void 0||e.target!==void 0){var o=a(e.source),s=a(e.target),l=o!=null&&t.hasElementWithId(o),u=s!=null&&t.hasElementWithId(s);(l||u)&&(t.batch(function(){n.remove(r,i),n.emitAndNotify(`moveout`);for(var e=0;e<n.length;e++){var t=n[e],a=t._private.data;t.isEdge()&&(l&&(a.source=o),u&&(a.target=s))}n.restore(r,i)}),n.emitAndNotify(`move`))}else if(e.parent!==void 0){var d=a(e.parent);if(d===null||t.hasElementWithId(d)){var f=d===null?void 0:d;t.batch(function(){var e=n.remove(r,i);e.emitAndNotify(`moveout`);for(var t=0;t<n.length;t++){var a=n[t],o=a._private.data;a.isNode()&&(o.parent=f)}e.restore(r,i)}),n.emitAndNotify(`move`)}}return this},[JO,JVe,aA,yA,xA,oHe,CA,vHe,rj,ij,CHe,sj,cj,lj,dj,fj].forEach(function(e){DE(_j,e)}),THe={add:function(e){var t,n=this;if(pE(e)){var r=e;if(r._private.cy===n)t=r.restore();else{for(var i=[],a=0;a<r.length;a++){var o=r[a];i.push(o.json())}t=new gj(n,i)}}else if(cE(e))t=new gj(n,e);else if(lE(e)&&(cE(e.nodes)||cE(e.edges))){for(var s=e,l=[],u=[`nodes`,`edges`],d=0,f=u.length;d<f;d++){var p=u[d],m=s[p];if(cE(m))for(var h=0,g=m.length;h<g;h++){var _=DE({group:p},m[h]);l.push(_)}}t=new gj(n,l)}else t=new DD(n,e).collection();return t},remove:function(e){if(!pE(e)&&oE(e)){var t=e;e=this.$(t)}return e.remove()}},EHe=function(){function e(e){return-e.tension*e.x-e.friction*e.v}function t(t,n,r){var i={x:t.x+r.dx*n,v:t.v+r.dv*n,tension:t.tension,friction:t.friction};return{dx:i.v,dv:e(i)}}function n(n,r){var i={dx:n.v,dv:e(n)},a=t(n,r*.5,i),o=t(n,r*.5,a),s=t(n,r,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),u=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return n.x+=l*r,n.v+=u*r,n}return function e(t,r,i){var a={x:-1,v:0,tension:null,friction:null},o=[0],s=0,l=1/1e4,u=16/1e3,d,f,p;for(t=parseFloat(t)||500,r=parseFloat(r)||20,i||=null,a.tension=t,a.friction=r,d=i!==null,d?(s=e(t,r),f=s/i*u):f=u;p=n(p||a,f),o.push(1+p.x),s+=16,Math.abs(p.x)>l&&Math.abs(p.v)>l;);return d?function(e){return o[e*(o.length-1)|0]}:s}}(),vj=function(e,t,n,r){var i=xLe(e,t,n,r);return function(e,t,n){return e+(t-e)*i(n)}},yj={linear:function(e,t,n){return e+(t-e)*n},ease:vj(.25,.1,.25,1),"ease-in":vj(.42,0,1,1),"ease-out":vj(0,0,.58,1),"ease-in-out":vj(.42,0,.58,1),"ease-in-sine":vj(.47,0,.745,.715),"ease-out-sine":vj(.39,.575,.565,1),"ease-in-out-sine":vj(.445,.05,.55,.95),"ease-in-quad":vj(.55,.085,.68,.53),"ease-out-quad":vj(.25,.46,.45,.94),"ease-in-out-quad":vj(.455,.03,.515,.955),"ease-in-cubic":vj(.55,.055,.675,.19),"ease-out-cubic":vj(.215,.61,.355,1),"ease-in-out-cubic":vj(.645,.045,.355,1),"ease-in-quart":vj(.895,.03,.685,.22),"ease-out-quart":vj(.165,.84,.44,1),"ease-in-out-quart":vj(.77,0,.175,1),"ease-in-quint":vj(.755,.05,.855,.06),"ease-out-quint":vj(.23,1,.32,1),"ease-in-out-quint":vj(.86,0,.07,1),"ease-in-expo":vj(.95,.05,.795,.035),"ease-out-expo":vj(.19,1,.22,1),"ease-in-out-expo":vj(1,0,0,1),"ease-in-circ":vj(.6,.04,.98,.335),"ease-out-circ":vj(.075,.82,.165,1),"ease-in-out-circ":vj(.785,.135,.15,.86),spring:function(e,t,n){if(n===0)return yj.linear;var r=EHe(e,t,n);return function(e,t,n){return e+(t-e)*r(n)}},"cubic-bezier":vj},DHe={animate:iA.animate(),animation:iA.animation(),animated:iA.animated(),clearQueue:iA.clearQueue(),delay:iA.delay(),delayAnimation:iA.delayAnimation(),stop:iA.stop(),addToAnimationPool:function(e){var t=this;t.styleEnabled()&&t._private.aniEles.merge(e)},stopAnimationLoop:function(){this._private.animationsRunning=!1},startAnimationLoop:function(){var e=this;if(e._private.animationsRunning=!0,!e.styleEnabled())return;function t(){e._private.animationsRunning&&YE(function(n){ELe(n,e),t()})}var n=e.renderer();n&&n.beforeRender?n.beforeRender(function(t,n){ELe(n,e)},n.beforeRenderPriorities.animations):t()}},OHe={qualifierCompare:function(e,t){return e==null||t==null?e==null&&t==null:e.sameText(t)},eventMatches:function(e,t,n){var r=t.qualifier;return r==null||e!==n.target&&mE(n.target)&&r.matches(n.target)},addEventFields:function(e,t){t.cy=e,t.target=e},callbackContext:function(e,t,n){return t.qualifier==null?e:n.target}},bj=function(e){return oE(e)?new _A(e):e},xj={createEmitter:function(){var e=this._private;return e.emitter||=new AT(OHe,this),this},emitter:function(){return this._private.emitter},on:function(e,t,n){return this.emitter().on(e,bj(t),n),this},removeListener:function(e,t,n){return this.emitter().removeListener(e,bj(t),n),this},removeAllListeners:function(){return this.emitter().removeAllListeners(),this},one:function(e,t,n){return this.emitter().one(e,bj(t),n),this},once:function(e,t,n){return this.emitter().one(e,bj(t),n),this},emit:function(e,t){return this.emitter().emit(e,t),this},emitAndNotify:function(e,t){return this.emit(e),this.notify(e,t),this}},iA.eventAliasesOn(xj),Sj={png:function(e){var t=this._private.renderer;return e||={},t.png(e)},jpg:function(e){var t=this._private.renderer;return e||={},e.bg=e.bg||`#fff`,t.jpg(e)}},Sj.jpeg=Sj.jpg,Cj={layout:function(e){var t=this;if(e==null){mD(`Layout options must be specified to make a layout`);return}if(e.name==null){mD("A `name` must be specified to make a layout");return}var n=e.name,r=t.extension(`layout`,n);if(r==null){mD("No such layout `"+n+"` found. Did you forget to import it and `cytoscape.use()` it?");return}var i=oE(e.eles)?t.$(e.eles):e.eles==null?t.$():e.eles;return new r(DE({},e,{cy:t,eles:i}))}},Cj.createLayout=Cj.makeLayout=Cj.layout,kHe={notify:function(e,t){var n=this._private;if(this.batching()){n.batchNotifications=n.batchNotifications||{};var r=n.batchNotifications[e]=n.batchNotifications[e]||this.collection();t!=null&&r.merge(t);return}if(n.notificationsEnabled){var i=this.renderer();this.destroyed()||!i||i.notify(e,t)}},notifications:function(e){var t=this._private;return e===void 0?t.notificationsEnabled:(t.notificationsEnabled=!!e,this)},noNotifications:function(e){this.notifications(!1),e(),this.notifications(!0)},batching:function(){return this._private.batchCount>0},startBatch:function(){var e=this._private;return e.batchCount??=0,e.batchCount===0&&(e.batchStyleEles=this.collection(),e.batchNotifications={}),e.batchCount++,this},endBatch:function(){var e=this._private;if(e.batchCount===0)return this;if(e.batchCount--,e.batchCount===0){e.batchStyleEles.updateStyle();var t=this.renderer();Object.keys(e.batchNotifications).forEach(function(n){var r=e.batchNotifications[n];r.empty()?t.notify(n):t.notify(n,r)})}return this},batch:function(e){return this.startBatch(),e(),this.endBatch(),this},batchData:function(e){var t=this;return this.batch(function(){for(var n=Object.keys(e),r=0;r<n.length;r++){var i=n[r],a=e[i];t.getElementById(i).data(a)}})}},AHe=bD({hideEdgesOnViewport:!1,textureOnViewport:!1,motionBlur:!1,motionBlurOpacity:.05,pixelRatio:void 0,desktopTapThreshold:4,touchTapThreshold:8,wheelSensitivity:1,debug:!1,showFps:!1,webgl:!1,webglDebug:!1,webglDebugShowAtlases:!1,webglTexSize:2048,webglTexRows:36,webglTexRowsNodes:18,webglBatchSize:2048,webglTexPerBatch:14,webglBgColor:[255,255,255]}),wj={renderTo:function(e,t,n,r){return this._private.renderer.renderTo(e,t,n,r),this},renderer:function(){return this._private.renderer},forceRender:function(){return this.notify(`draw`),this},resize:function(){return this.invalidateSize(),this.emitAndNotify(`resize`),this},initRenderer:function(e){var t=this,n=t.extension(`renderer`,e.name);if(n==null){mD(`Can not initialise: No such renderer \`${e.name}\` found. Did you forget to import it and \`cytoscape.use()\` it?`);return}e.wheelSensitivity!==void 0&&gD(`You have set a custom wheel sensitivity. This will make your app zoom unnaturally when using mainstream mice. You should change this value from the default only if you can guarantee that all your users will use the same hardware and OS configuration as your current machine.`);var r=AHe(e);r.cy=t,t._private.renderer=new n(r),this.notify(`init`)},destroyRenderer:function(){var e=this;e.notify(`destroy`);var t=e.container();if(t)for(t._cyreg=null;t.childNodes.length>0;)t.removeChild(t.childNodes[0]);e._private.renderer=null,e.mutableElements().forEach(function(e){var t=e._private;t.rscratch={},t.rstyle={},t.animation.current=[],t.animation.queue=[]})},onRender:function(e){return this.on(`render`,e)},offRender:function(e){return this.off(`render`,e)}},wj.invalidateDimensions=wj.resize,Tj={collection:function(e,t){return oE(e)?this.$(e):pE(e)?e.collection():cE(e)?(t||={},new gj(this,e,t.unique,t.removed)):new gj(this)},nodes:function(e){var t=this.$(function(e){return e.isNode()});return e?t.filter(e):t},edges:function(e){var t=this.$(function(e){return e.isEdge()});return e?t.filter(e):t},$:function(e){var t=this._private.elements;return e?t.filter(e):t.spawnSelf()},mutableElements:function(){return this._private.elements}},Tj.elements=Tj.filter=Tj.$,Ej={},Dj=`t`,jHe=`f`,Ej.apply=function(e){for(var t=this,n=t._private.cy.collection(),r=0;r<e.length;r++){var i=e[r],a=t.getContextMeta(i);if(!a.empty){var o=t.getContextStyle(a),s=t.applyContextStyle(a,o,i);i._private.appliedInitStyle?t.updateTransitions(i,s.diffProps):i._private.appliedInitStyle=!0,t.updateStyleHints(i)&&n.push(i)}}return n},Ej.getPropertiesDiff=function(e,t){var n=this,r=n._private.propDiffs=n._private.propDiffs||{},i=e+`-`+t,a=r[i];if(a)return a;for(var o=[],s={},l=0;l<n.length;l++){var u=n[l],d=e[l]===Dj,f=t[l]===Dj,p=d!==f,m=u.mappedProperties.length>0;if(p||f&&m){var h=void 0;p&&m||p?h=u.properties:m&&(h=u.mappedProperties);for(var g=0;g<h.length;g++){for(var _=h[g],v=_.name,y=!1,b=l+1;b<n.length;b++){var x=n[b];if(t[b]===Dj&&(y=x.properties[_.name]!=null,y))break}!s[v]&&!y&&(s[v]=!0,o.push(v))}}}return r[i]=o,o},Ej.getContextMeta=function(e){for(var t=this,n=``,r,i=e._private.styleCxtKey||``,a=0;a<t.length;a++){var o=t[a];o.selector&&o.selector.matches(e)?n+=Dj:n+=jHe}return r=t.getPropertiesDiff(i,n),e._private.styleCxtKey=n,{key:n,diffPropNames:r,empty:r.length===0}},Ej.getContextStyle=function(e){var t=e.key,n=this,r=this._private.contextStyles=this._private.contextStyles||{};if(r[t])return r[t];for(var i={_private:{key:t}},a=0;a<n.length;a++){var o=n[a];if(t[a]===Dj)for(var s=0;s<o.properties.length;s++){var l=o.properties[s];i[l.name]=l}}return r[t]=i,i},Ej.applyContextStyle=function(e,t,n){for(var r=this,i=e.diffPropNames,a={},o=r.types,s=0;s<i.length;s++){var l=i[s],u=t[l],d=n.pstyle(l);if(!u){if(d)u=d.bypass?{name:l,deleteBypassed:!0}:{name:l,delete:!0};else continue}if(d!==u){if(u.mapped===o.fn&&d!=null&&d.mapping!=null&&d.mapping.value===u.value){var f=d.mapping;if((f.fnValue=u.value(n))===f.prevFnValue)continue}var p=a[l]={prev:d};r.applyParsedProperty(n,u),p.next=n.pstyle(l),p.next&&p.next.bypass&&(p.next=p.next.bypassed)}}return{diffProps:a}},Ej.updateStyleHints=function(e){var t=e._private,n=this,r=n.propertyGroupNames,i=n.propertyGroupKeys,a=function(e,t,r){return n.getPropertiesHash(e,t,r)},o=t.styleKey;if(e.removed())return!1;var s=t.group===`nodes`,l=e._private.style;r=Object.keys(l);for(var u=0;u<i.length;u++){var d=i[u];t.styleKeys[d]=[ZE,$E]}for(var f=function(e,n){return t.styleKeys[n][0]=tD(e,t.styleKeys[n][0])},p=function(e,n){return t.styleKeys[n][1]=nD(e,t.styleKeys[n][1])},m=function(e,t){f(e,t),p(e,t)},h=function(e,t){for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);f(r,t),p(r,t)}},g=2e9,_=function(e){return-128<e&&e<128&&Math.floor(e)!==e?g-(e*1024|0):e},v=0;v<r.length;v++){var y=r[v],b=l[y];if(b!=null){var x=this.properties[y],S=x.type,C=x.groupKey,w=void 0;x.hashOverride==null?b.pfValue!=null&&(w=b.pfValue):w=x.hashOverride(e,b);var T=x.enums==null?b.value:null,E=w!=null,D=E||T!=null,O=b.units;S.number&&D&&!S.multiple?(m(_(E?w:T),C),!E&&O!=null&&h(O,C)):h(b.strValue,C)}}for(var k=[ZE,$E],A=0;A<i.length;A++){var j=i[A],M=t.styleKeys[j];k[0]=tD(M[0],k[0]),k[1]=nD(M[1],k[1])}t.styleKey=oze(k[0],k[1]);var N=t.styleKeys;t.labelDimsKey=rD(N.labelDimensions);var P=a(e,[`label`],N.labelDimensions);if(t.labelKey=rD(P),t.labelStyleKey=rD(iD(N.commonLabel,P)),!s){var F=a(e,[`source-label`],N.labelDimensions);t.sourceLabelKey=rD(F),t.sourceLabelStyleKey=rD(iD(N.commonLabel,F));var I=a(e,[`target-label`],N.labelDimensions);t.targetLabelKey=rD(I),t.targetLabelStyleKey=rD(iD(N.commonLabel,I))}if(s){var L=t.styleKeys,R=L.nodeBody,ee=L.nodeBorder,z=L.nodeOutline,B=L.backgroundImage,te=L.compound,ne=L.pie,re=L.stripe;t.nodeKey=rD([R,ee,z,B,te,ne,re].filter(function(e){return e!=null}).reduce(iD,[ZE,$E])),t.hasPie=ne!=null&&ne[0]!==ZE&&ne[1]!==$E,t.hasStripe=re!=null&&re[0]!==ZE&&re[1]!==$E}return o!==t.styleKey},Ej.clearStyleHints=function(e){var t=e._private;t.styleCxtKey=``,t.styleKeys={},t.styleKey=null,t.labelKey=null,t.labelStyleKey=null,t.sourceLabelKey=null,t.sourceLabelStyleKey=null,t.targetLabelKey=null,t.targetLabelStyleKey=null,t.nodeKey=null,t.hasPie=null,t.hasStripe=null},Ej.applyParsedProperty=function(e,t){var n=this,r=t,i=e._private.style,a,o=n.types,s=n.properties[r.name].type,l=r.bypass,u=i[r.name],d=u&&u.bypass,f=e._private,p=`mapping`,m=function(e){return e==null?null:e.pfValue==null?e.value:e.pfValue},h=function(){var t=m(u),i=m(r);n.checkTriggers(e,r.name,t,i)};if(t.name===`curve-style`&&e.isEdge()&&(t.value!==`bezier`&&e.isLoop()||t.value===`haystack`&&(e.source().isParent()||e.target().isParent()))&&(r=t=this.parse(t.name,`bezier`,l)),r.delete)return i[r.name]=void 0,h(),!0;if(r.deleteBypassed)return u?u.bypass?(u.bypassed=void 0,h(),!0):!1:(h(),!0);if(r.deleteBypass)return u?u.bypass?(i[r.name]=u.bypassed,h(),!0):!1:(h(),!0);var g=function(){gD("Do not assign mappings to elements without corresponding data (i.e. ele `"+e.id()+"` has no mapping for property `"+r.name+"` with data field `"+r.field+"`); try a `["+r.field+"]` selector to limit scope to elements with `"+r.field+"` defined")};switch(r.mapped){case o.mapData:for(var _=r.field.split(`.`),v=f.data,y=0;y<_.length&&v;y++){var b=_[y];v=v[b]}if(v==null)return g(),!1;var x;if(uE(v)){var S=r.fieldMax-r.fieldMin;x=S===0?0:(v-r.fieldMin)/S}else return gD("Do not use continuous mappers without specifying numeric data (i.e. `"+r.field+`: `+v+"` for `"+e.id()+"` is non-numeric)"),!1;if(x<0?x=0:x>1&&(x=1),s.color){var C=r.valueMin[0],w=r.valueMax[0],T=r.valueMin[1],E=r.valueMax[1],D=r.valueMin[2],O=r.valueMax[2],k=r.valueMin[3]==null?1:r.valueMin[3],A=r.valueMax[3]==null?1:r.valueMax[3],j=[Math.round(C+(w-C)*x),Math.round(T+(E-T)*x),Math.round(D+(O-D)*x),Math.round(k+(A-k)*x)];a={bypass:r.bypass,name:r.name,value:j,strValue:`rgb(`+j[0]+`, `+j[1]+`, `+j[2]+`)`}}else if(s.number){var M=r.valueMin+(r.valueMax-r.valueMin)*x;a=this.parse(r.name,M,r.bypass,p)}else return!1;if(!a)return g(),!1;a.mapping=r,r=a;break;case o.data:for(var N=r.field.split(`.`),P=f.data,F=0;F<N.length&&P;F++){var I=N[F];P=P[I]}if(P!=null&&(a=this.parse(r.name,P,r.bypass,p)),!a)return g(),!1;a.mapping=r,r=a;break;case o.fn:var L=r.value,R=r.fnValue==null?L(e):r.fnValue;if(r.prevFnValue=R,R==null)return gD("Custom function mappers may not return null (i.e. `"+r.name+"` for ele `"+e.id()+"` is null)"),!1;if(a=this.parse(r.name,R,r.bypass,p),!a)return gD("Custom function mappers may not return invalid values for the property type (i.e. `"+r.name+"` for ele `"+e.id()+"` is invalid)"),!1;a.mapping=_D(r),r=a;break;case void 0:break;default:return!1}return l?(d?r.bypassed=u.bypassed:r.bypassed=u,i[r.name]=r):d?u.bypassed=r:i[r.name]=r,h(),!0},Ej.cleanElements=function(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(this.clearStyleHints(r),r.dirtyCompoundBoundsCache(),r.dirtyBoundingBoxCache(),!t)r._private.style={};else for(var i=r._private.style,a=Object.keys(i),o=0;o<a.length;o++){var s=a[o],l=i[s];l!=null&&(l.bypass?l.bypassed=null:i[s]=null)}}},Ej.update=function(){this._private.cy.mutableElements().updateStyle()},Ej.updateTransitions=function(e,t){var n=this,r=e._private,i=e.pstyle(`transition-property`).value,a=e.pstyle(`transition-duration`).pfValue,o=e.pstyle(`transition-delay`).pfValue;if(i.length>0&&a>0){for(var s={},l=!1,u=0;u<i.length;u++){var d=i[u],f=e.pstyle(d),p=t[d];if(p){var m=p.prev,h=p.next==null?f:p.next,g=!1,_=void 0,v=1e-6;m&&(uE(m.pfValue)&&uE(h.pfValue)?(g=h.pfValue-m.pfValue,_=m.pfValue+v*g):uE(m.value)&&uE(h.value)?(g=h.value-m.value,_=m.value+v*g):cE(m.value)&&cE(h.value)&&(g=m.value[0]!==h.value[0]||m.value[1]!==h.value[1]||m.value[2]!==h.value[2],_=m.strValue),g&&(s[d]=h.strValue,this.applyBypass(e,d,_),l=!0))}}if(!l)return;r.transitioning=!0,new ik(function(t){o>0?e.delayAnimation(o).play().promise().then(t):t()}).then(function(){return e.animation({style:s,duration:a,easing:e.pstyle(`transition-timing-function`).value,queue:!1}).play().promise()}).then(function(){n.removeBypasses(e,i),e.emitAndNotify(`style`),r.transitioning=!1})}else r.transitioning&&=(this.removeBypasses(e,i),e.emitAndNotify(`style`),!1)},Ej.checkTrigger=function(e,t,n,r,i,a){var o=this.properties[t],s=i(o);e.removed()||s!=null&&s(n,r,e)&&a(o)},Ej.checkZOrderTrigger=function(e,t,n,r){var i=this;this.checkTrigger(e,t,n,r,function(e){return e.triggersZOrder},function(){i._private.cy.notify(`zorder`,e)})},Ej.checkBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBounds},function(t){e.dirtyCompoundBoundsCache(),e.dirtyBoundingBoxCache()})},Ej.checkConnectedEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfConnectedEdges},function(t){e.connectedEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Ej.checkParallelEdgesBoundsTrigger=function(e,t,n,r){this.checkTrigger(e,t,n,r,function(e){return e.triggersBoundsOfParallelEdges},function(t){e.parallelEdges().forEach(function(e){e.dirtyBoundingBoxCache()})})},Ej.checkTriggers=function(e,t,n,r){e.dirtyStyleCache(),this.checkZOrderTrigger(e,t,n,r),this.checkBoundsTrigger(e,t,n,r),this.checkConnectedEdgesBoundsTrigger(e,t,n,r),this.checkParallelEdgesBoundsTrigger(e,t,n,r)},Oj={},Oj.applyBypass=function(e,t,n,r){var i=this,a=[],o=!0;if(t===`*`||t===`**`){if(n!==void 0)for(var s=0;s<i.properties.length;s++){var l=i.properties[s].name,u=this.parse(l,n,!0);u&&a.push(u)}}else if(oE(t)){var d=this.parse(t,n,!0);d&&a.push(d)}else if(lE(t)){var f=t;r=n;for(var p=Object.keys(f),m=0;m<p.length;m++){var h=p[m],g=f[h];if(g===void 0&&(g=f[xE(h)]),g!==void 0){var _=this.parse(h,g,!0);_&&a.push(_)}}}else return!1;if(a.length===0)return!1;for(var v=!1,y=0;y<e.length;y++){for(var b=e[y],x={},S=void 0,C=0;C<a.length;C++){var w=a[C];if(r){var T=b.pstyle(w.name);S=x[w.name]={prev:T}}v=this.applyParsedProperty(b,_D(w))||v,r&&(S.next=b.pstyle(w.name))}v&&this.updateStyleHints(b),r&&this.updateTransitions(b,x,o)}return v},Oj.overrideBypass=function(e,t,n){t=bE(t);for(var r=0;r<e.length;r++){var i=e[r],a=i._private.style[t],o=this.properties[t].type,s=o.color,l=o.mutiple,u=a?a.pfValue==null?a.value:a.pfValue:null;!a||!a.bypass?this.applyBypass(i,t,n):(a.value=n,a.pfValue!=null&&(a.pfValue=n),a.strValue=s?`rgb(`+n.join(`,`)+`)`:l?n.join(` `):``+n,this.updateStyleHints(i)),this.checkTriggers(i,t,u,n)}},Oj.removeAllBypasses=function(e,t){return this.removeBypasses(e,this.propertyNames,t)},Oj.removeBypasses=function(e,t,n){for(var r=!0,i=0;i<e.length;i++){for(var a=e[i],o={},s=0;s<t.length;s++){var l=t[s],u=this.properties[l],d=a.pstyle(u.name);if(!(!d||!d.bypass)){var f=this.parse(l,``,!0),p=o[u.name]={prev:d};this.applyParsedProperty(a,f),p.next=a.pstyle(u.name)}}this.updateStyleHints(a),n&&this.updateTransitions(a,o,r)}},kj={},kj.getEmSizeInPixels=function(){var e=this.containerCss(`font-size`);return e==null?1:parseFloat(e)},kj.containerCss=function(e){var t=this._private.cy,n=t.container(),r=t.window();if(r&&n&&r.getComputedStyle)return r.getComputedStyle(n).getPropertyValue(e)},Aj={},Aj.getRenderedStyle=function(e,t){return t?this.getStylePropertyValue(e,t,!0):this.getRawStyle(e,!0)},Aj.getRawStyle=function(e,t){var n=this;if(e=e[0],e){for(var r={},i=0;i<n.properties.length;i++){var a=n.properties[i],o=n.getStylePropertyValue(e,a.name,t);o!=null&&(r[a.name]=o,r[xE(a.name)]=o)}return r}},Aj.getIndexedStyle=function(e,t,n,r){return e.pstyle(t)[n][r]??e.cy().style().getDefaultProperty(t)[n][0]},Aj.getStylePropertyValue=function(e,t,n){var r=this;if(e=e[0],e){var i=r.properties[t];i.alias&&(i=i.pointsTo);var a=i.type,o=e.pstyle(i.name);if(o){var s=o.value,l=o.units,u=o.strValue;if(n&&a.number&&s!=null&&uE(s)){var d=e.cy().zoom(),f=function(e){return e*d},p=function(e,t){return f(e)+t},m=cE(s);return(m?l.every(function(e){return e!=null}):l!=null)?m?s.map(function(e,t){return p(e,l[t])}).join(` `):p(s,l):m?s.map(function(e){return oE(e)?e:``+f(e)}).join(` `):``+f(s)}if(u!=null)return u}return null}},Aj.getAnimationStartStyle=function(e,t){for(var n={},r=0;r<t.length;r++){var i=t[r].name,a=e.pstyle(i);a!==void 0&&(a=lE(a)?this.parse(i,a.strValue):this.parse(i,a)),a&&(n[i]=a)}return n},Aj.getPropsList=function(e){var t=this,n=[],r=e,i=t.properties;if(r)for(var a=Object.keys(r),o=0;o<a.length;o++){var s=a[o],l=r[s],u=i[s]||i[bE(s)],d=this.parse(u.name,l);d&&n.push(d)}return n},Aj.getNonDefaultPropertiesHash=function(e,t,n){var r=n.slice(),i,a,o,s,l,u;for(l=0;l<t.length;l++)if(i=t[l],a=e.pstyle(i,!1),a!=null){if(a.pfValue!=null)r[0]=tD(s,r[0]),r[1]=nD(s,r[1]);else for(o=a.strValue,u=0;u<o.length;u++)s=o.charCodeAt(u),r[0]=tD(s,r[0]),r[1]=nD(s,r[1])}return r},Aj.getPropertiesHash=Aj.getNonDefaultPropertiesHash,jj={},jj.appendFromJson=function(e){for(var t=this,n=0;n<e.length;n++){var r=e[n],i=r.selector,a=r.style||r.css,o=Object.keys(a);t.selector(i);for(var s=0;s<o.length;s++){var l=o[s],u=a[l];t.css(l,u)}}return t},jj.fromJson=function(e){var t=this;return t.resetToDefault(),t.appendFromJson(e),t},jj.json=function(){for(var e=[],t=this.defaultLength;t<this.length;t++){for(var n=this[t],r=n.selector,i=n.properties,a={},o=0;o<i.length;o++){var s=i[o];a[s.name]=s.strValue}e.push({selector:r?r.toString():`core`,style:a})}return e},Mj={},Mj.appendFromString=function(e){var t=this,n=this,r=``+e,i,a,o;r=r.replace(/[/][*](\s|.)+?[*][/]/g,``);function s(){r=r.length>i.length?r.substr(i.length):``}function l(){a=a.length>o.length?a.substr(o.length):``}for(;!r.match(/^\s*$/);){var u=r.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!u){gD(`Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: `+r);break}i=u[0];var d=u[1];if(d!==`core`&&new _A(d).invalid){gD(`Skipping parsing of block: Invalid selector found in string stylesheet: `+d),s();continue}var f=u[2],p=!1;a=f;for(var m=[];!a.match(/^\s*$/);){var h=a.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/);if(!h){gD(`Skipping parsing of block: Invalid formatting of style property and value definitions found in:`+f),p=!0;break}o=h[0];var g=h[1],_=h[2];if(!t.properties[g]){gD(`Skipping property: Invalid property name in: `+o),l();continue}if(!n.parse(g,_)){gD(`Skipping property: Invalid property definition in: `+o),l();continue}m.push({name:g,val:_}),l()}if(p){s();break}n.selector(d);for(var v=0;v<m.length;v++){var y=m[v];n.css(y.name,y.val)}s()}return n},Mj.fromString=function(e){var t=this;return t.resetToDefault(),t.appendFromString(e),t},Nj={},(function(){var e=TE,t=PRe,n=IRe,r=LRe,i=RRe,a=function(e){return`^`+e+`\\s*\\(\\s*([\\w\\.]+)\\s*\\)$`},o=function(a){var o=e+`|\\w+|`+t+`|`+n+`|`+r+`|`+i;return`^`+a+`\\s*\\(([\\w\\.]+)\\s*\\,\\s*(`+e+`)\\s*\\,\\s*(`+e+`)\\s*,\\s*(`+o+`)\\s*\\,\\s*(`+o+`)\\)$`},s=[`^url\\s*\\(\\s*['"]?(.+?)['"]?\\s*\\)$`,`^(none)$`,`^(.+)$`];Nj.types={time:{number:!0,min:0,units:`s|ms`,implicitUnits:`ms`},percent:{number:!0,min:0,max:100,units:`%`,implicitUnits:`%`},percentages:{number:!0,min:0,max:100,units:`%`,implicitUnits:`%`,multiple:!0},zeroOneNumber:{number:!0,min:0,max:1,unitless:!0},zeroOneNumbers:{number:!0,min:0,max:1,unitless:!0,multiple:!0},nOneOneNumber:{number:!0,min:-1,max:1,unitless:!0},nonNegativeInt:{number:!0,min:0,integer:!0,unitless:!0},nonNegativeNumber:{number:!0,min:0,unitless:!0},position:{enums:[`parent`,`origin`]},nodeSize:{number:!0,min:0,enums:[`label`]},number:{number:!0,unitless:!0},numbers:{number:!0,unitless:!0,multiple:!0},positiveNumber:{number:!0,unitless:!0,min:0,strictMin:!0},size:{number:!0,min:0},bidirectionalSize:{number:!0},bidirectionalSizeMaybePercent:{number:!0,allowPercent:!0},bidirectionalSizes:{number:!0,multiple:!0},sizeMaybePercent:{number:!0,min:0,allowPercent:!0},axisDirection:{enums:[`horizontal`,`leftward`,`rightward`,`vertical`,`upward`,`downward`,`auto`]},axisDirectionExplicit:{enums:[`leftward`,`rightward`,`upward`,`downward`]},axisDirectionPrimary:{enums:[`horizontal`,`vertical`]},paddingRelativeTo:{enums:[`width`,`height`,`average`,`min`,`max`]},bgWH:{number:!0,min:0,allowPercent:!0,enums:[`auto`],multiple:!0},bgPos:{number:!0,allowPercent:!0,multiple:!0},bgRelativeTo:{enums:[`inner`,`include-padding`],multiple:!0},bgRepeat:{enums:[`repeat`,`repeat-x`,`repeat-y`,`no-repeat`],multiple:!0},bgFit:{enums:[`none`,`contain`,`cover`],multiple:!0},bgCrossOrigin:{enums:[`anonymous`,`use-credentials`,`null`],multiple:!0},bgClip:{enums:[`none`,`node`],multiple:!0},bgContainment:{enums:[`inside`,`over`],multiple:!0},boxSelection:{enums:[`contain`,`overlap`,`none`]},color:{color:!0},colors:{color:!0,multiple:!0},fill:{enums:[`solid`,`linear-gradient`,`radial-gradient`]},bool:{enums:[`yes`,`no`]},bools:{enums:[`yes`,`no`],multiple:!0},lineStyle:{enums:[`solid`,`dotted`,`dashed`]},lineCap:{enums:[`butt`,`round`,`square`]},linePosition:{enums:[`center`,`inside`,`outside`]},lineJoin:{enums:[`round`,`bevel`,`miter`]},borderStyle:{enums:[`solid`,`dotted`,`dashed`,`double`]},curveStyle:{enums:[`bezier`,`unbundled-bezier`,`haystack`,`segments`,`straight`,`straight-triangle`,`taxi`,`round-segments`,`round-taxi`]},radiusType:{enums:[`arc-radius`,`influence-radius`],multiple:!0},fontFamily:{regex:`^([\\w- \\"]+(?:\\s*,\\s*[\\w- \\"]+)*)$`},fontStyle:{enums:[`italic`,`normal`,`oblique`]},fontWeight:{enums:[`normal`,`bold`,`bolder`,`lighter`,`100`,`200`,`300`,`400`,`500`,`600`,`800`,`900`,100,200,300,400,500,600,700,800,900]},textDecoration:{enums:[`none`,`underline`,`overline`,`line-through`]},textTransform:{enums:[`none`,`uppercase`,`lowercase`]},textWrap:{enums:[`none`,`wrap`,`ellipsis`]},textOverflowWrap:{enums:[`whitespace`,`anywhere`]},textBackgroundShape:{enums:[`rectangle`,`roundrectangle`,`round-rectangle`,`circle`]},nodeShape:{enums:`rectangle.roundrectangle.round-rectangle.cutrectangle.cut-rectangle.bottomroundrectangle.bottom-round-rectangle.barrel.ellipse.triangle.round-triangle.square.pentagon.round-pentagon.hexagon.round-hexagon.concavehexagon.concave-hexagon.heptagon.round-heptagon.octagon.round-octagon.tag.round-tag.star.diamond.round-diamond.vee.rhomboid.right-rhomboid.polygon`.split(`.`)},overlayShape:{enums:[`roundrectangle`,`round-rectangle`,`ellipse`]},cornerRadius:{number:!0,min:0,units:`px|em`,implicitUnits:`px`,enums:[`auto`]},compoundIncludeLabels:{enums:[`include`,`exclude`]},arrowShape:{enums:[`tee`,`triangle`,`triangle-tee`,`circle-triangle`,`triangle-cross`,`triangle-backcurve`,`vee`,`square`,`circle`,`diamond`,`chevron`,`none`]},arrowFill:{enums:[`filled`,`hollow`]},arrowWidth:{number:!0,units:`%|px|em`,implicitUnits:`px`,enums:[`match-line`]},display:{enums:[`element`,`none`]},visibility:{enums:[`hidden`,`visible`]},zCompoundDepth:{enums:[`bottom`,`orphan`,`auto`,`top`]},zIndexCompare:{enums:[`auto`,`manual`]},valign:{enums:[`top`,`top-inside`,`center`,`bottom`,`bottom-inside`]},halign:{enums:[`left`,`left-inside`,`center`,`right`,`right-inside`]},justification:{enums:[`left`,`center`,`right`,`auto`]},textMetrics:{enums:[`font`,`glyph`]},text:{string:!0},data:{mapping:!0,regex:a(`data`)},layoutData:{mapping:!0,regex:a(`layoutData`)},scratch:{mapping:!0,regex:a(`scratch`)},mapData:{mapping:!0,regex:o(`mapData`)},mapLayoutData:{mapping:!0,regex:o(`mapLayoutData`)},mapScratch:{mapping:!0,regex:o(`mapScratch`)},fn:{mapping:!0,fn:!0},url:{regexes:s,singleRegexMatchValue:!0},urls:{regexes:s,singleRegexMatchValue:!0,multiple:!0},propList:{propList:!0},angle:{number:!0,units:`deg|rad`,implicitUnits:`rad`},textRotation:{number:!0,units:`deg|rad`,implicitUnits:`rad`,enums:[`none`,`autorotate`]},polygonPointList:{number:!0,multiple:!0,evenMultiple:!0,min:-1,max:1,unitless:!0},edgeDistances:{enums:[`intersection`,`node-position`,`endpoints`]},edgeEndpoint:{number:!0,multiple:!0,units:`%|px|em|deg|rad`,implicitUnits:`px`,enums:[`inside-to-node`,`outside-to-node`,`outside-to-node-or-label`,`outside-to-line`,`outside-to-line-or-label`],singleEnum:!0,validate:function(e,t){switch(e.length){case 2:return t[0]!==`deg`&&t[0]!==`rad`&&t[1]!==`deg`&&t[1]!==`rad`;case 1:return oE(e[0])||t[0]===`deg`||t[0]===`rad`;default:return!1}}},easing:{regexes:[`^(spring)\\s*\\(\\s*(`+e+`)\\s*,\\s*(`+e+`)\\s*\\)$`,`^(cubic-bezier)\\s*\\(\\s*(`+e+`)\\s*,\\s*(`+e+`)\\s*,\\s*(`+e+`)\\s*,\\s*(`+e+`)\\s*\\)$`],enums:`linear.ease.ease-in.ease-out.ease-in-out.ease-in-sine.ease-out-sine.ease-in-out-sine.ease-in-quad.ease-out-quad.ease-in-out-quad.ease-in-cubic.ease-out-cubic.ease-in-out-cubic.ease-in-quart.ease-out-quart.ease-in-out-quart.ease-in-quint.ease-out-quint.ease-in-out-quint.ease-in-expo.ease-out-expo.ease-in-out-expo.ease-in-circ.ease-out-circ.ease-in-out-circ`.split(`.`)},gradientDirection:{enums:[`to-bottom`,`to-top`,`to-left`,`to-right`,`to-bottom-right`,`to-bottom-left`,`to-top-right`,`to-top-left`,`to-right-bottom`,`to-left-bottom`,`to-right-top`,`to-left-top`]},boundsExpansion:{number:!0,multiple:!0,min:0,validate:function(e){var t=e.length;return t===1||t===2||t===4}}};var l={zeroNonZero:function(e,t){return(e==null||t==null)&&e!==t||e==0&&t!=0||e!=0&&t==0},any:function(e,t){return e!=t},emptyNonEmpty:function(e,t){var n=vE(e),r=vE(t);return n&&!r||!n&&r}},u=Nj.types,d=[{name:`label`,type:u.text,triggersBounds:l.any,triggersZOrder:l.emptyNonEmpty},{name:`text-rotation`,type:u.textRotation,triggersBounds:l.any},{name:`text-margin-x`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`text-margin-y`,type:u.bidirectionalSize,triggersBounds:l.any}],f=[{name:`source-label`,type:u.text,triggersBounds:l.any},{name:`source-text-rotation`,type:u.textRotation,triggersBounds:l.any},{name:`source-text-margin-x`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`source-text-margin-y`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`source-text-offset`,type:u.size,triggersBounds:l.any}],p=[{name:`target-label`,type:u.text,triggersBounds:l.any},{name:`target-text-rotation`,type:u.textRotation,triggersBounds:l.any},{name:`target-text-margin-x`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`target-text-margin-y`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`target-text-offset`,type:u.size,triggersBounds:l.any}],m=[{name:`font-family`,type:u.fontFamily,triggersBounds:l.any},{name:`font-style`,type:u.fontStyle,triggersBounds:l.any},{name:`font-weight`,type:u.fontWeight,triggersBounds:l.any},{name:`font-size`,type:u.size,triggersBounds:l.any},{name:`text-transform`,type:u.textTransform,triggersBounds:l.any},{name:`text-wrap`,type:u.textWrap,triggersBounds:l.any},{name:`text-overflow-wrap`,type:u.textOverflowWrap,triggersBounds:l.any},{name:`text-max-width`,type:u.size,triggersBounds:l.any},{name:`text-outline-width`,type:u.size,triggersBounds:l.any},{name:`line-height`,type:u.positiveNumber,triggersBounds:l.any}],h=[{name:`text-valign`,type:u.valign,triggersBounds:l.any},{name:`text-halign`,type:u.halign,triggersBounds:l.any},{name:`color`,type:u.color},{name:`text-outline-color`,type:u.color},{name:`text-outline-opacity`,type:u.zeroOneNumber},{name:`text-background-color`,type:u.color},{name:`text-background-opacity`,type:u.zeroOneNumber},{name:`text-background-padding`,type:u.size,triggersBounds:l.any},{name:`text-border-opacity`,type:u.zeroOneNumber},{name:`text-border-color`,type:u.color},{name:`text-border-width`,type:u.size,triggersBounds:l.any},{name:`text-border-style`,type:u.borderStyle,triggersBounds:l.any},{name:`text-background-shape`,type:u.textBackgroundShape,triggersBounds:l.any},{name:`text-justification`,type:u.justification},{name:`text-metrics`,type:u.textMetrics},{name:`box-select-labels`,type:u.bool,triggersBounds:l.any}],g=[{name:`events`,type:u.bool,triggersZOrder:l.any},{name:`text-events`,type:u.bool,triggersZOrder:l.any},{name:`box-selection`,type:u.boxSelection,triggersZOrder:l.any}],_=[{name:`display`,type:u.display,triggersZOrder:l.any,triggersBounds:l.any,triggersBoundsOfConnectedEdges:l.any,triggersBoundsOfParallelEdges:function(e,t,n){return e!==t&&n.pstyle(`curve-style`).value===`bezier`}},{name:`visibility`,type:u.visibility,triggersZOrder:l.any},{name:`opacity`,type:u.zeroOneNumber,triggersZOrder:l.zeroNonZero},{name:`text-opacity`,type:u.zeroOneNumber},{name:`min-zoomed-font-size`,type:u.size},{name:`z-compound-depth`,type:u.zCompoundDepth,triggersZOrder:l.any},{name:`z-index-compare`,type:u.zIndexCompare,triggersZOrder:l.any},{name:`z-index`,type:u.number,triggersZOrder:l.any}],v=[{name:`overlay-padding`,type:u.size,triggersBounds:l.any},{name:`overlay-color`,type:u.color},{name:`overlay-opacity`,type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:`overlay-shape`,type:u.overlayShape,triggersBounds:l.any},{name:`overlay-corner-radius`,type:u.cornerRadius}],y=[{name:`underlay-padding`,type:u.size,triggersBounds:l.any},{name:`underlay-color`,type:u.color},{name:`underlay-opacity`,type:u.zeroOneNumber,triggersBounds:l.zeroNonZero},{name:`underlay-shape`,type:u.overlayShape,triggersBounds:l.any},{name:`underlay-corner-radius`,type:u.cornerRadius}],b=[{name:`transition-property`,type:u.propList},{name:`transition-duration`,type:u.time},{name:`transition-delay`,type:u.time},{name:`transition-timing-function`,type:u.easing}],x=function(e,t){return t.value===`label`?-e.poolIndex():t.pfValue},S=[{name:`height`,type:u.nodeSize,triggersBounds:l.any,hashOverride:x},{name:`width`,type:u.nodeSize,triggersBounds:l.any,hashOverride:x},{name:`shape`,type:u.nodeShape,triggersBounds:l.any},{name:`shape-polygon-points`,type:u.polygonPointList,triggersBounds:l.any},{name:`corner-radius`,type:u.cornerRadius},{name:`background-color`,type:u.color},{name:`background-fill`,type:u.fill},{name:`background-opacity`,type:u.zeroOneNumber},{name:`background-blacken`,type:u.nOneOneNumber},{name:`background-gradient-stop-colors`,type:u.colors},{name:`background-gradient-stop-positions`,type:u.percentages},{name:`background-gradient-direction`,type:u.gradientDirection},{name:`padding`,type:u.sizeMaybePercent,triggersBounds:l.any},{name:`padding-relative-to`,type:u.paddingRelativeTo,triggersBounds:l.any},{name:`bounds-expansion`,type:u.boundsExpansion,triggersBounds:l.any}],C=[{name:`border-color`,type:u.color},{name:`border-opacity`,type:u.zeroOneNumber},{name:`border-width`,type:u.size,triggersBounds:l.any},{name:`border-style`,type:u.borderStyle},{name:`border-cap`,type:u.lineCap},{name:`border-join`,type:u.lineJoin},{name:`border-dash-pattern`,type:u.numbers},{name:`border-dash-offset`,type:u.number},{name:`border-position`,type:u.linePosition}],w=[{name:`outline-color`,type:u.color},{name:`outline-opacity`,type:u.zeroOneNumber},{name:`outline-width`,type:u.size,triggersBounds:l.any},{name:`outline-style`,type:u.borderStyle},{name:`outline-offset`,type:u.size,triggersBounds:l.any}],T=[{name:`background-image`,type:u.urls},{name:`background-image-crossorigin`,type:u.bgCrossOrigin},{name:`background-image-opacity`,type:u.zeroOneNumbers},{name:`background-image-containment`,type:u.bgContainment},{name:`background-image-smoothing`,type:u.bools},{name:`background-position-x`,type:u.bgPos},{name:`background-position-y`,type:u.bgPos},{name:`background-width-relative-to`,type:u.bgRelativeTo},{name:`background-height-relative-to`,type:u.bgRelativeTo},{name:`background-repeat`,type:u.bgRepeat},{name:`background-fit`,type:u.bgFit},{name:`background-clip`,type:u.bgClip},{name:`background-width`,type:u.bgWH},{name:`background-height`,type:u.bgWH},{name:`background-offset-x`,type:u.bgPos},{name:`background-offset-y`,type:u.bgPos}],E=[{name:`position`,type:u.position,triggersBounds:l.any},{name:`compound-sizing-wrt-labels`,type:u.compoundIncludeLabels,triggersBounds:l.any},{name:`min-width`,type:u.size,triggersBounds:l.any},{name:`min-width-bias-left`,type:u.sizeMaybePercent,triggersBounds:l.any},{name:`min-width-bias-right`,type:u.sizeMaybePercent,triggersBounds:l.any},{name:`min-height`,type:u.size,triggersBounds:l.any},{name:`min-height-bias-top`,type:u.sizeMaybePercent,triggersBounds:l.any},{name:`min-height-bias-bottom`,type:u.sizeMaybePercent,triggersBounds:l.any}],D=[{name:`line-style`,type:u.lineStyle},{name:`line-color`,type:u.color},{name:`line-fill`,type:u.fill},{name:`line-cap`,type:u.lineCap},{name:`line-opacity`,type:u.zeroOneNumber},{name:`line-dash-pattern`,type:u.numbers},{name:`line-dash-offset`,type:u.number},{name:`line-outline-width`,type:u.size},{name:`line-outline-color`,type:u.color},{name:`line-gradient-stop-colors`,type:u.colors},{name:`line-gradient-stop-positions`,type:u.percentages},{name:`curve-style`,type:u.curveStyle,triggersBounds:l.any,triggersBoundsOfParallelEdges:function(e,t){return e===t?!1:e===`bezier`||t===`bezier`}},{name:`haystack-radius`,type:u.zeroOneNumber,triggersBounds:l.any},{name:`source-endpoint`,type:u.edgeEndpoint,triggersBounds:l.any},{name:`target-endpoint`,type:u.edgeEndpoint,triggersBounds:l.any},{name:`control-point-step-size`,type:u.size,triggersBounds:l.any},{name:`control-point-distances`,type:u.bidirectionalSizes,triggersBounds:l.any},{name:`control-point-weights`,type:u.numbers,triggersBounds:l.any},{name:`segment-distances`,type:u.bidirectionalSizes,triggersBounds:l.any},{name:`segment-weights`,type:u.numbers,triggersBounds:l.any},{name:`segment-radii`,type:u.numbers,triggersBounds:l.any},{name:`radius-type`,type:u.radiusType,triggersBounds:l.any},{name:`taxi-turn`,type:u.bidirectionalSizeMaybePercent,triggersBounds:l.any},{name:`taxi-turn-min-distance`,type:u.size,triggersBounds:l.any},{name:`taxi-direction`,type:u.axisDirection,triggersBounds:l.any},{name:`taxi-radius`,type:u.number,triggersBounds:l.any},{name:`edge-distances`,type:u.edgeDistances,triggersBounds:l.any},{name:`arrow-scale`,type:u.positiveNumber,triggersBounds:l.any},{name:`loop-direction`,type:u.angle,triggersBounds:l.any},{name:`loop-sweep`,type:u.angle,triggersBounds:l.any},{name:`source-distance-from-node`,type:u.size,triggersBounds:l.any},{name:`target-distance-from-node`,type:u.size,triggersBounds:l.any}],O=[{name:`ghost`,type:u.bool,triggersBounds:l.any},{name:`ghost-offset-x`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`ghost-offset-y`,type:u.bidirectionalSize,triggersBounds:l.any},{name:`ghost-opacity`,type:u.zeroOneNumber}],k=[{name:`selection-box-color`,type:u.color},{name:`selection-box-opacity`,type:u.zeroOneNumber},{name:`selection-box-border-color`,type:u.color},{name:`selection-box-border-width`,type:u.size},{name:`active-bg-color`,type:u.color},{name:`active-bg-opacity`,type:u.zeroOneNumber},{name:`active-bg-size`,type:u.size},{name:`outside-texture-bg-color`,type:u.color},{name:`outside-texture-bg-opacity`,type:u.zeroOneNumber}],A=[];Nj.pieBackgroundN=16,A.push({name:`pie-size`,type:u.sizeMaybePercent}),A.push({name:`pie-hole`,type:u.sizeMaybePercent}),A.push({name:`pie-start-angle`,type:u.angle});for(var j=1;j<=Nj.pieBackgroundN;j++)A.push({name:`pie-`+j+`-background-color`,type:u.color}),A.push({name:`pie-`+j+`-background-size`,type:u.percent}),A.push({name:`pie-`+j+`-background-opacity`,type:u.zeroOneNumber});var M=[];Nj.stripeBackgroundN=16,M.push({name:`stripe-size`,type:u.sizeMaybePercent}),M.push({name:`stripe-direction`,type:u.axisDirectionPrimary});for(var N=1;N<=Nj.stripeBackgroundN;N++)M.push({name:`stripe-`+N+`-background-color`,type:u.color}),M.push({name:`stripe-`+N+`-background-size`,type:u.percent}),M.push({name:`stripe-`+N+`-background-opacity`,type:u.zeroOneNumber});var P=[],F=Nj.arrowPrefixes=[`source`,`mid-source`,`target`,`mid-target`];[{name:`arrow-shape`,type:u.arrowShape,triggersBounds:l.any},{name:`arrow-color`,type:u.color},{name:`arrow-fill`,type:u.arrowFill},{name:`arrow-width`,type:u.arrowWidth}].forEach(function(e){F.forEach(function(t){var n=t+`-`+e.name,r=e.type,i=e.triggersBounds;P.push({name:n,type:r,triggersBounds:i})})},{});var I=Nj.properties=[].concat(g,b,_,v,y,O,h,m,d,f,p,S,C,w,T,A,M,E,D,P,k),L=Nj.propertyGroups={behavior:g,transition:b,visibility:_,overlay:v,underlay:y,ghost:O,commonLabel:h,labelDimensions:m,mainLabel:d,sourceLabel:f,targetLabel:p,nodeBody:S,nodeBorder:C,nodeOutline:w,backgroundImage:T,pie:A,stripe:M,compound:E,edgeLine:D,edgeArrow:P,core:k},R=Nj.propertyGroupNames={};(Nj.propertyGroupKeys=Object.keys(L)).forEach(function(e){R[e]=L[e].map(function(e){return e.name}),L[e].forEach(function(t){return t.groupKey=e})});var ee=Nj.aliases=[{name:`content`,pointsTo:`label`},{name:`control-point-distance`,pointsTo:`control-point-distances`},{name:`control-point-weight`,pointsTo:`control-point-weights`},{name:`segment-distance`,pointsTo:`segment-distances`},{name:`segment-weight`,pointsTo:`segment-weights`},{name:`segment-radius`,pointsTo:`segment-radii`},{name:`edge-text-rotation`,pointsTo:`text-rotation`},{name:`padding-left`,pointsTo:`padding`},{name:`padding-right`,pointsTo:`padding`},{name:`padding-top`,pointsTo:`padding`},{name:`padding-bottom`,pointsTo:`padding`}];Nj.propertyNames=I.map(function(e){return e.name});for(var z=0;z<I.length;z++){var B=I[z];I[B.name]=B}for(var te=0;te<ee.length;te++){var ne=ee[te],re=I[ne.pointsTo],ie={name:ne.name,alias:!0,pointsTo:re};I.push(ie),I[ne.name]=ie}})(),Nj.getDefaultProperty=function(e){return this.getDefaultProperties()[e]},Nj.getDefaultProperties=function(){var e=this._private;if(e.defaultProperties!=null)return e.defaultProperties;for(var t=DE({"selection-box-color":`#ddd`,"selection-box-opacity":.65,"selection-box-border-color":`#aaa`,"selection-box-border-width":1,"active-bg-color":`black`,"active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":`#000`,"outside-texture-bg-opacity":.125,events:`yes`,"text-events":`no`,"text-valign":`top`,"text-halign":`center`,"text-justification":`auto`,"line-height":1,color:`#000`,"box-selection":`contain`,"text-outline-color":`#000`,"text-outline-width":0,"text-outline-opacity":1,"text-opacity":1,"text-decoration":`none`,"text-transform":`none`,"text-wrap":`none`,"text-overflow-wrap":`whitespace`,"text-max-width":9999,"text-background-color":`#000`,"text-background-opacity":0,"text-background-shape":`rectangle`,"text-background-padding":0,"text-border-opacity":0,"text-border-width":0,"text-border-style":`solid`,"text-border-color":`#000`,"font-family":`Helvetica Neue, Helvetica, sans-serif`,"font-style":`normal`,"font-weight":`normal`,"font-size":16,"min-zoomed-font-size":0,"text-rotation":`none`,"source-text-rotation":`none`,"target-text-rotation":`none`,visibility:`visible`,display:`element`,opacity:1,"z-compound-depth":`auto`,"z-index-compare":`auto`,"z-index":0,label:``,"text-margin-x":0,"text-margin-y":0,"source-label":``,"source-text-offset":0,"source-text-margin-x":0,"source-text-margin-y":0,"target-label":``,"target-text-offset":0,"target-text-margin-x":0,"target-text-margin-y":0,"overlay-opacity":0,"overlay-color":`#000`,"overlay-padding":10,"overlay-shape":`round-rectangle`,"overlay-corner-radius":`auto`,"underlay-opacity":0,"underlay-color":`#000`,"underlay-padding":10,"underlay-shape":`round-rectangle`,"underlay-corner-radius":`auto`,"text-metrics":`font`,"transition-property":`none`,"transition-duration":0,"transition-delay":0,"transition-timing-function":`linear`,"box-select-labels":`no`,"background-blacken":0,"background-color":`#999`,"background-fill":`solid`,"background-opacity":1,"background-image":`none`,"background-image-crossorigin":`anonymous`,"background-image-opacity":1,"background-image-containment":`inside`,"background-image-smoothing":`yes`,"background-position-x":`50%`,"background-position-y":`50%`,"background-offset-x":0,"background-offset-y":0,"background-width-relative-to":`include-padding`,"background-height-relative-to":`include-padding`,"background-repeat":`no-repeat`,"background-fit":`none`,"background-clip":`node`,"background-width":`auto`,"background-height":`auto`,"border-color":`#000`,"border-opacity":1,"border-width":0,"border-style":`solid`,"border-dash-pattern":[4,2],"border-dash-offset":0,"border-cap":`butt`,"border-join":`miter`,"border-position":`center`,"outline-color":`#999`,"outline-opacity":1,"outline-width":0,"outline-offset":0,"outline-style":`solid`,height:30,width:30,shape:`ellipse`,"shape-polygon-points":`-1, -1, 1, -1, 1, 1, -1, 1`,"corner-radius":`auto`,"bounds-expansion":0,"background-gradient-direction":`to-bottom`,"background-gradient-stop-colors":`#999`,"background-gradient-stop-positions":`0%`,ghost:`no`,"ghost-offset-y":0,"ghost-offset-x":0,"ghost-opacity":0,padding:0,"padding-relative-to":`width`,position:`origin`,"compound-sizing-wrt-labels":`include`,"min-width":0,"min-width-bias-left":0,"min-width-bias-right":0,"min-height":0,"min-height-bias-top":0,"min-height-bias-bottom":0},{"pie-size":`100%`,"pie-hole":0,"pie-start-angle":`0deg`},[{name:`pie-{{i}}-background-color`,value:`black`},{name:`pie-{{i}}-background-size`,value:`0%`},{name:`pie-{{i}}-background-opacity`,value:1}].reduce(function(e,t){for(var n=1;n<=Nj.pieBackgroundN;n++){var r=t.name.replace(`{{i}}`,n);e[r]=t.value}return e},{}),{"stripe-size":`100%`,"stripe-direction":`horizontal`},[{name:`stripe-{{i}}-background-color`,value:`black`},{name:`stripe-{{i}}-background-size`,value:`0%`},{name:`stripe-{{i}}-background-opacity`,value:1}].reduce(function(e,t){for(var n=1;n<=Nj.stripeBackgroundN;n++){var r=t.name.replace(`{{i}}`,n);e[r]=t.value}return e},{}),{"line-style":`solid`,"line-color":`#999`,"line-fill":`solid`,"line-cap":`butt`,"line-opacity":1,"line-outline-width":0,"line-outline-color":`#000`,"line-gradient-stop-colors":`#999`,"line-gradient-stop-positions":`0%`,"control-point-step-size":40,"control-point-weights":.5,"segment-weights":.5,"segment-distances":20,"segment-radii":15,"radius-type":`arc-radius`,"taxi-turn":`50%`,"taxi-radius":15,"taxi-turn-min-distance":10,"taxi-direction":`auto`,"edge-distances":`intersection`,"curve-style":`haystack`,"haystack-radius":0,"arrow-scale":1,"loop-direction":`-45deg`,"loop-sweep":`-90deg`,"source-distance-from-node":0,"target-distance-from-node":0,"source-endpoint":`outside-to-node`,"target-endpoint":`outside-to-node`,"line-dash-pattern":[6,3],"line-dash-offset":0},[{name:`arrow-shape`,value:`none`},{name:`arrow-color`,value:`#999`},{name:`arrow-fill`,value:`filled`},{name:`arrow-width`,value:1}].reduce(function(e,t){return Nj.arrowPrefixes.forEach(function(n){var r=n+`-`+t.name;e[r]=t.value}),e},{})),n={},r=0;r<this.properties.length;r++){var i=this.properties[r];if(!i.pointsTo){var a=i.name,o=t[a];n[a]=this.parse(a,o)}}return e.defaultProperties=n,e.defaultProperties},Nj.addDefaultStylesheet=function(){this.selector(`:parent`).css({shape:`rectangle`,padding:10,"background-color":`#eee`,"border-color":`#ccc`,"border-width":1}).selector(`edge`).css({width:3}).selector(`:loop`).css({"curve-style":`bezier`}).selector(`edge:compound`).css({"curve-style":`bezier`,"source-endpoint":`outside-to-line`,"target-endpoint":`outside-to-line`}).selector(`:selected`).css({"background-color":`#0169D9`,"line-color":`#0169D9`,"source-arrow-color":`#0169D9`,"target-arrow-color":`#0169D9`,"mid-source-arrow-color":`#0169D9`,"mid-target-arrow-color":`#0169D9`}).selector(`:parent:selected`).css({"background-color":`#CCE1F9`,"border-color":`#aec8e5`}).selector(`:active`).css({"overlay-color":`black`,"overlay-padding":10,"overlay-opacity":.25}),this.defaultLength=this.length},Pj={},Pj.parse=function(e,t,n,r){var i=this;if(sE(t))return i.parseImplWarn(e,t,n,r);var a=r===`mapping`||r===!0||r===!1||r==null?`dontcare`:r,o=n?`t`:`f`,s=sD(e,``+t,o,a),l=i.propCache=i.propCache||[],u;return(u=l[s])||(u=l[s]=i.parseImplWarn(e,t,n,r)),(n||r===`mapping`)&&(u=_D(u),u&&(u.value=_D(u.value))),u},Pj.parseImplWarn=function(e,t,n,r){var i=this.parseImpl(e,t,n,r);return!i&&t!=null&&gD(`The style property \`${e}: ${t}\` is invalid`),i&&(i.name===`width`||i.name===`height`)&&t===`label`&&gD("The style value of `label` is deprecated for `"+i.name+"`"),i},Pj.parseImpl=function(e,t,n,r){var i=this;e=bE(e);var a=i.properties[e],o=t,s=i.types;if(!a||t===void 0)return null;a.alias&&(a=a.pointsTo,e=a.name);var l=oE(t);l&&(t=t.trim());var u=a.type;if(!u)return null;if(n&&(t===``||t===null))return{name:e,value:t,bypass:!0,deleteBypass:!0};if(sE(t))return{name:e,value:t,strValue:`fn`,mapped:s.fn,bypass:n};var d,f;if(!(!l||r||t.length<7||t[1]!==`a`)){if(t.length>=7&&t[0]===`d`&&(d=new RegExp(s.data.regex).exec(t))){if(n)return!1;var p=s.data;return{name:e,value:d,strValue:``+t,mapped:p,field:d[1],bypass:n}}if(t.length>=10&&t[0]===`m`&&(f=new RegExp(s.mapData.regex).exec(t))){if(n||u.multiple)return!1;var m=s.mapData;if(!(u.color||u.number))return!1;var h=this.parse(e,f[4]);if(!h||h.mapped)return!1;var g=this.parse(e,f[5]);if(!g||g.mapped)return!1;if(h.pfValue===g.pfValue||h.strValue===g.strValue)return gD("`"+e+`: `+t+"` is not a valid mapper because the output range is zero; converting to `"+e+`: `+h.strValue+"`"),this.parse(e,h.strValue);if(u.color){var _=h.value,v=g.value;if(_[0]===v[0]&&_[1]===v[1]&&_[2]===v[2]&&(_[3]===v[3]||(_[3]==null||_[3]===1)&&(v[3]==null||v[3]===1)))return!1}return{name:e,value:f,strValue:``+t,mapped:m,field:f[1],fieldMin:parseFloat(f[2]),fieldMax:parseFloat(f[3]),valueMin:h.value,valueMax:g.value,bypass:n}}}if(u.multiple&&r!==`multiple`){var y=l?t.split(/\s+/):cE(t)?t:[t];if(u.evenMultiple&&y.length%2!=0)return null;for(var b=[],x=[],S=[],C=``,w=!1,T=0;T<y.length;T++){var E=i.parse(e,y[T],n,`multiple`);w||=oE(E.value),b.push(E.value),S.push(E.pfValue==null?E.value:E.pfValue),x.push(E.units),C+=(T>0?` `:``)+E.strValue}return u.validate&&!u.validate(b,x)?null:u.singleEnum&&w?b.length===1&&oE(b[0])?{name:e,value:b[0],strValue:b[0],bypass:n}:null:{name:e,value:b,pfValue:S,strValue:C,bypass:n,units:x}}var D=function(){for(var r=0;r<u.enums.length;r++)if(u.enums[r]===t)return{name:e,value:t,strValue:``+t,bypass:n};return null};if(u.number){var O,k=`px`;if(u.units&&(O=u.units),u.implicitUnits&&(k=u.implicitUnits),!u.unitless){if(l){var A=`px|em`+(u.allowPercent?`|\\%`:``);O&&(A=O);var j=t.match(`^(`+TE+`)(`+A+`)?$`);j&&(t=j[1],O=j[2]||k)}else(!O||u.implicitUnits)&&(O=k)}if(t=parseFloat(t),isNaN(t)&&u.enums===void 0)return null;if(isNaN(t)&&u.enums!==void 0)return t=o,D();if(u.integer&&!dE(t)||u.min!==void 0&&(t<u.min||u.strictMin&&t===u.min)||u.max!==void 0&&(t>u.max||u.strictMax&&t===u.max))return null;var M={name:e,value:t,strValue:``+t+(O||``),units:O,bypass:n};return M.pfValue=u.unitless||O!==`px`&&O!==`em`||O===`px`||!O?t:this.getEmSizeInPixels()*t,(O===`ms`||O===`s`)&&(M.pfValue=O===`ms`?t:1e3*t),(O===`deg`||O===`rad`)&&(M.pfValue=O===`rad`?t:Rze(t)),O===`%`&&(M.pfValue=t/100),M}if(u.propList){var N=[],P=``+t;if(P!==`none`){for(var F=P.split(/\s*,\s*|\s+/),I=0;I<F.length;I++){var L=F[I].trim();i.properties[L]?N.push(L):gD("`"+L+"` is not a valid property name")}if(N.length===0)return null}return{name:e,value:N,strValue:N.length===0?`none`:N.join(` `),bypass:n}}if(u.color){var R=OE(t);return R?{name:e,value:R,pfValue:R,strValue:`rgb(`+R[0]+`,`+R[1]+`,`+R[2]+`)`,bypass:n}:null}if(u.regex||u.regexes){if(u.enums){var ee=D();if(ee)return ee}for(var z=u.regexes?u.regexes:[u.regex],B=0;B<z.length;B++){var te=new RegExp(z[B]).exec(t);if(te)return{name:e,value:u.singleRegexMatchValue?te[1]:te,strValue:``+t,bypass:n}}return null}return u.string?{name:e,value:``+t,strValue:``+t,bypass:n}:u.enums?D():null},Fj=function(e){if(!(this instanceof Fj))return new Fj(e);if(!gE(e)){mD(`A style must have a core reference`);return}this._private={cy:e,coreStyle:{}},this.length=0,this.resetToDefault()},Ij=Fj.prototype,Ij.instanceString=function(){return`style`},Ij.clear=function(){for(var e=this._private,t=e.cy.elements(),n=0;n<this.length;n++)this[n]=void 0;return this.length=0,e.contextStyles={},e.propDiffs={},this.cleanElements(t,!0),t.forEach(function(e){var t=e[0]._private;t.styleDirty=!0,t.appliedInitStyle=!1}),this},Ij.resetToDefault=function(){return this.clear(),this.addDefaultStylesheet(),this},Ij.core=function(e){return this._private.coreStyle[e]||this.getDefaultProperty(e)},Ij.selector=function(e){var t=e===`core`?null:new _A(e),n=this.length++;return this[n]={selector:t,properties:[],mappedProperties:[],index:n},this},Ij.css=function(){var e=this,t=arguments;if(t.length===1)for(var n=t[0],r=0;r<e.properties.length;r++){var i=e.properties[r],a=n[i.name];a===void 0&&(a=n[xE(i.name)]),a!==void 0&&this.cssRule(i.name,a)}else t.length===2&&this.cssRule(t[0],t[1]);return this},Ij.style=Ij.css,Ij.cssRule=function(e,t){var n=this.parse(e,t);if(n){var r=this.length-1;this[r].properties.push(n),this[r].properties[n.name]=n,n.name.match(/pie-(\d+)-background-size/)&&n.value&&(this._private.hasPie=!0),n.name.match(/stripe-(\d+)-background-size/)&&n.value&&(this._private.hasStripe=!0),n.mapped&&this[r].mappedProperties.push(n),this[r].selector||(this._private.coreStyle[n.name]=n)}return this},Ij.append=function(e){return _E(e)?e.appendToStyle(this):cE(e)?this.appendFromJson(e):oE(e)&&this.appendFromString(e),this},Fj.fromJson=function(e,t){var n=new Fj(e);return n.fromJson(t),n},Fj.fromString=function(e,t){return new Fj(e).fromString(t)},[Ej,Oj,kj,Aj,jj,Mj,Nj,Pj].forEach(function(e){DE(Ij,e)}),Fj.types=Ij.types,Fj.properties=Ij.properties,Fj.propertyGroups=Ij.propertyGroups,Fj.propertyGroupNames=Ij.propertyGroupNames,Fj.propertyGroupKeys=Ij.propertyGroupKeys,MHe={style:function(e){return e&&this.setStyle(e).update(),this._private.style},setStyle:function(e){var t=this._private;return t.style=_E(e)?e.generateStyle(this):cE(e)?Fj.fromJson(this,e):oE(e)?Fj.fromString(this,e):Fj(this),t.style},updateStyle:function(){this.mutableElements().updateStyle()}},NHe=`single`,Lj={autolock:function(e){if(e!==void 0)this._private.autolock=!!e;else return this._private.autolock;return this},autoungrabify:function(e){if(e!==void 0)this._private.autoungrabify=!!e;else return this._private.autoungrabify;return this},autounselectify:function(e){if(e!==void 0)this._private.autounselectify=!!e;else return this._private.autounselectify;return this},selectionType:function(e){var t=this._private;if(t.selectionType??=NHe,e!==void 0)(e===`additive`||e===`single`)&&(t.selectionType=e);else return t.selectionType;return this},panningEnabled:function(e){if(e!==void 0)this._private.panningEnabled=!!e;else return this._private.panningEnabled;return this},userPanningEnabled:function(e){if(e!==void 0)this._private.userPanningEnabled=!!e;else return this._private.userPanningEnabled;return this},zoomingEnabled:function(e){if(e!==void 0)this._private.zoomingEnabled=!!e;else return this._private.zoomingEnabled;return this},userZoomingEnabled:function(e){if(e!==void 0)this._private.userZoomingEnabled=!!e;else return this._private.userZoomingEnabled;return this},boxSelectionEnabled:function(e){if(e!==void 0)this._private.boxSelectionEnabled=!!e;else return this._private.boxSelectionEnabled;return this},pan:function(){var e=arguments,t=this._private.pan,n,r,i,a,o;switch(e.length){case 0:return t;case 1:if(oE(e[0]))return n=e[0],t[n];if(lE(e[0])){if(!this._private.panningEnabled)return this;i=e[0],a=i.x,o=i.y,uE(a)&&(t.x=a),uE(o)&&(t.y=o),this.emit(`pan viewport`)}break;case 2:if(!this._private.panningEnabled)return this;n=e[0],r=e[1],(n===`x`||n===`y`)&&uE(r)&&(t[n]=r),this.emit(`pan viewport`)}return this.notify(`viewport`),this},panBy:function(e,t){var n=arguments,r=this._private.pan,i,a,o,s,l;if(!this._private.panningEnabled)return this;switch(n.length){case 1:lE(e)&&(o=n[0],s=o.x,l=o.y,uE(s)&&(r.x+=s),uE(l)&&(r.y+=l),this.emit(`pan viewport`));break;case 2:i=e,a=t,(i===`x`||i===`y`)&&uE(a)&&(r[i]+=a),this.emit(`pan viewport`)}return this.notify(`viewport`),this},gc:function(){this.notify(`gc`)},fit:function(e,t){var n=this.getFitViewport(e,t);if(n){var r=this._private;r.zoom=n.zoom,r.pan=n.pan,this.emit(`pan zoom viewport`),this.notify(`viewport`)}return this},getFitViewport:function(e,t){if(uE(e)&&t===void 0&&(t=e,e=void 0),!(!this._private.panningEnabled||!this._private.zoomingEnabled)){var n;if(oE(e)){var r=e;e=this.$(r)}else if(ARe(e)){var i=e;n={x1:i.x1,y1:i.y1,x2:i.x2,y2:i.y2},n.w=n.x2-n.x1,n.h=n.y2-n.y1}else pE(e)||(e=this.mutableElements());if(!(pE(e)&&e.empty())){n||=e.boundingBox();var a=this.width(),o=this.height(),s;if(t=uE(t)?t:0,!isNaN(a)&&!isNaN(o)&&a>0&&o>0&&!isNaN(n.w)&&!isNaN(n.h)&&n.w>0&&n.h>0){s=Math.min((a-2*t)/n.w,(o-2*t)/n.h),s=s>this._private.maxZoom?this._private.maxZoom:s,s=s<this._private.minZoom?this._private.minZoom:s;var l={x:(a-s*(n.x1+n.x2))/2,y:(o-s*(n.y1+n.y2))/2};return{zoom:s,pan:l}}}}},zoomRange:function(e,t){var n=this._private;if(t==null){var r=e;e=r.min,t=r.max}return uE(e)&&uE(t)&&e<=t?(n.minZoom=e,n.maxZoom=t):uE(e)&&t===void 0&&e<=n.maxZoom?n.minZoom=e:uE(t)&&e===void 0&&t>=n.minZoom&&(n.maxZoom=t),this},minZoom:function(e){return e===void 0?this._private.minZoom:this.zoomRange({min:e})},maxZoom:function(e){return e===void 0?this._private.maxZoom:this.zoomRange({max:e})},getZoomedViewport:function(e){var t=this._private,n=t.pan,r=t.zoom,i,a,o=!1;if(t.zoomingEnabled||(o=!0),uE(e)?a=e:lE(e)&&(a=e.level,e.position==null?e.renderedPosition!=null&&(i=e.renderedPosition):i=PD(e.position,r,n),i!=null&&!t.panningEnabled&&(o=!0)),a=a>t.maxZoom?t.maxZoom:a,a=a<t.minZoom?t.minZoom:a,o||!uE(a)||a===r||i!=null&&(!uE(i.x)||!uE(i.y)))return null;if(i!=null){var s=n,l=r,u=a;return{zoomed:!0,panned:!0,zoom:u,pan:{x:-u/l*(i.x-s.x)+i.x,y:-u/l*(i.y-s.y)+i.y}}}return{zoomed:!0,panned:!1,zoom:a,pan:n}},zoom:function(e){if(e===void 0)return this._private.zoom;var t=this.getZoomedViewport(e),n=this._private;return t==null||!t.zoomed?this:(n.zoom=t.zoom,t.panned&&(n.pan.x=t.pan.x,n.pan.y=t.pan.y),this.emit(`zoom`+(t.panned?` pan`:``)+` viewport`),this.notify(`viewport`),this)},viewport:function(e){var t=this._private,n=!0,r=!0,i=[],a=!1,o=!1;if(!e||(uE(e.zoom)||(n=!1),lE(e.pan)||(r=!1),!n&&!r))return this;if(n){var s=e.zoom;s<t.minZoom||s>t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=s,i.push(`zoom`))}if(r&&(!a||!e.cancelOnFailedZoom)&&t.panningEnabled){var l=e.pan;uE(l.x)&&(t.pan.x=l.x,o=!1),uE(l.y)&&(t.pan.y=l.y,o=!1),o||i.push(`pan`)}return i.length>0&&(i.push(`viewport`),this.emit(i.join(` `)),this.notify(`viewport`)),this},center:function(e){var t=this.getCenterPan(e);return t&&(this._private.pan=t,this.emit(`pan viewport`),this.notify(`viewport`)),this},getCenterPan:function(e,t){if(this._private.panningEnabled){if(oE(e)){var n=e;e=this.mutableElements().filter(n)}else pE(e)||(e=this.mutableElements());if(e.length!==0){var r=e.boundingBox(),i=this.width(),a=this.height();return t=t===void 0?this._private.zoom:t,{x:(i-t*(r.x1+r.x2))/2,y:(a-t*(r.y1+r.y2))/2}}}},reset:function(){return!this._private.panningEnabled||!this._private.zoomingEnabled||this.viewport({pan:{x:0,y:0},zoom:1}),this},invalidateSize:function(){this._private.sizeCache=null},size:function(){var e=this._private,t=e.container,n=this;return e.sizeCache=e.sizeCache||(t?function(){var e=n.window().getComputedStyle(t),r=function(t){return parseFloat(e.getPropertyValue(t))};return{width:t.clientWidth-r(`padding-left`)-r(`padding-right`),height:t.clientHeight-r(`padding-top`)-r(`padding-bottom`)}}():{width:1,height:1})},width:function(){return this.size().width},height:function(){return this.size().height},extent:function(){var e=this._private.pan,t=this._private.zoom,n=this.renderedExtent(),r={x1:(n.x1-e.x)/t,x2:(n.x2-e.x)/t,y1:(n.y1-e.y)/t,y2:(n.y2-e.y)/t};return r.w=r.x2-r.x1,r.h=r.y2-r.y1,r},renderedExtent:function(){var e=this.width(),t=this.height();return{x1:0,y1:0,x2:e,y2:t,w:e,h:t}},multiClickDebounceTime:function(e){if(e)this._private.multiClickDebounceTime=e;else return this._private.multiClickDebounceTime;return this}},Lj.centre=Lj.center,Lj.autolockNodes=Lj.autolock,Lj.autoungrabifyNodes=Lj.autoungrabify,Rj={data:iA.data({field:`data`,bindingEvent:`data`,allowBinding:!0,allowSetting:!0,settingEvent:`data`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeData:iA.removeData({field:`data`,event:`data`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0}),scratch:iA.data({field:`scratch`,bindingEvent:`scratch`,allowBinding:!0,allowSetting:!0,settingEvent:`scratch`,settingTriggersEvent:!0,triggerFnName:`trigger`,allowGetting:!0,updateStyle:!0}),removeScratch:iA.removeData({field:`scratch`,event:`scratch`,triggerFnName:`trigger`,triggerEvent:!0,updateStyle:!0})},Rj.attr=Rj.data,Rj.removeAttr=Rj.removeData,zj=function(e){var t=this;e=DE({},e);var n=e.container;n&&!fE(n)&&fE(n[0])&&(n=n[0]);var r=n?n._cyreg:null;r||={},r&&r.cy&&(r.cy.destroy(),r={});var i=r.readies=r.readies||[];n&&(n._cyreg=r),r.cy=t;var a=nE!==void 0&&n!==void 0&&!e.headless,o=e;o.layout=DE({name:a?`grid`:`null`},o.layout),o.renderer=DE({name:a?`canvas`:`null`},o.renderer);var s=function(e,t,n){return t===void 0?n===void 0?e:n:t},l=this._private={container:n,ready:!1,options:o,elements:new gj(this),listeners:[],aniEles:new gj(this),data:o.data||{},scratch:{},layout:null,renderer:null,destroyed:!1,notificationsEnabled:!0,minZoom:1e-50,maxZoom:1e50,zoomingEnabled:s(!0,o.zoomingEnabled),userZoomingEnabled:s(!0,o.userZoomingEnabled),panningEnabled:s(!0,o.panningEnabled),userPanningEnabled:s(!0,o.userPanningEnabled),boxSelectionEnabled:s(!0,o.boxSelectionEnabled),autolock:s(!1,o.autolock,o.autolockNodes),autoungrabify:s(!1,o.autoungrabify,o.autoungrabifyNodes),autounselectify:s(!1,o.autounselectify),styleEnabled:o.styleEnabled===void 0?a:o.styleEnabled,zoom:uE(o.zoom)?o.zoom:1,pan:{x:lE(o.pan)&&uE(o.pan.x)?o.pan.x:0,y:lE(o.pan)&&uE(o.pan.y)?o.pan.y:0},animation:{current:[],queue:[]},hasCompoundNodes:!1,multiClickDebounceTime:s(250,o.multiClickDebounceTime)};this.createEmitter(),this.selectionType(o.selectionType),this.zoomRange({min:o.minZoom,max:o.maxZoom});var u=function(e,t){if(e.some(jRe))return ik.all(e).then(t);t(e)};l.styleEnabled&&t.setStyle([]);var d=DE({},o,o.renderer);t.initRenderer(d);var f=function(e,n,r){t.notifications(!1);var i=t.mutableElements();i.length>0&&i.remove(),e!=null&&(lE(e)||cE(e))&&t.add(e),t.one(`layoutready`,function(e){t.notifications(!0),t.emit(e),t.one(`load`,n),t.emitAndNotify(`load`)}).one(`layoutstop`,function(){t.one(`done`,r),t.emit(`done`)});var a=DE({},t._private.options.layout);a.eles=t.elements(),t.layout(a).run()};u([o.style,o.elements],function(e){var n=e[0],a=e[1];l.styleEnabled&&t.style().append(n),f(a,function(){t.startAnimationLoop(),l.ready=!0,sE(o.ready)&&t.on(`ready`,o.ready);for(var e=0;e<i.length;e++){var n=i[e];t.on(`ready`,n)}r&&(r.readies=[]),t.emit(`ready`)},o.done)})},Bj=zj.prototype,DE(Bj,{instanceString:function(){return`core`},isReady:function(){return this._private.ready},destroyed:function(){return this._private.destroyed},ready:function(e){return this.isReady()?this.emitter().emit(`ready`,[],e):this.on(`ready`,e),this},destroy:function(){var e=this;if(!e.destroyed())return e.stopAnimationLoop(),e.destroyRenderer(),this.emit(`destroy`),e._private.destroyed=!0,e},hasElementWithId:function(e){return this._private.elements.hasElementWithId(e)},getElementById:function(e){return this._private.elements.getElementById(e)},hasCompoundNodes:function(){return this._private.hasCompoundNodes},headless:function(){return this._private.renderer.isHeadless()},styleEnabled:function(){return this._private.styleEnabled},addToPool:function(e){return this._private.elements.merge(e),this},removeFromPool:function(e){return this._private.elements.unmerge(e),this},container:function(){return this._private.container||null},window:function(){if(this._private.container==null)return nE;var e=this._private.container.ownerDocument;return e===void 0||e==null?nE:e.defaultView||nE},mount:function(e){if(e!=null){var t=this,n=t._private,r=n.options;return!fE(e)&&fE(e[0])&&(e=e[0]),t.stopAnimationLoop(),t.destroyRenderer(),n.container=e,n.styleEnabled=!0,t.invalidateSize(),t.initRenderer(DE({},r,r.renderer,{name:r.renderer.name===`null`?`canvas`:r.renderer.name})),t.startAnimationLoop(),t.style(r.style),t.emit(`mount`),t}},unmount:function(){var e=this;return e.stopAnimationLoop(),e.destroyRenderer(),e.initRenderer({name:`null`}),e.emit(`unmount`),e},options:function(){return _D(this._private.options)},json:function(e){var t=this,n=t._private,r=t.mutableElements(),i=function(e){return t.getElementById(e.id())};if(lE(e)){if(t.startBatch(),e.elements){var a={},o=function(e,n){for(var r=[],i=[],o=0;o<e.length;o++){var s=e[o];if(!s.data.id){gD(`cy.json() cannot handle elements without an ID attribute`);continue}var l=``+s.data.id,u=t.getElementById(l);a[l]=!0,u.length===0?(n&&(s.group=n),r.push(s)):i.push({ele:u,json:s})}t.add(r);for(var d=0;d<i.length;d++){var f=i[d],p=f.ele,m=f.json;p.json(m)}};if(cE(e.elements))o(e.elements);else for(var s=[`nodes`,`edges`],l=0;l<s.length;l++){var u=s[l],d=e.elements[u];cE(d)&&o(d,u)}var f=t.collection();r.filter(function(e){return!a[e.id()]}).forEach(function(e){e.isParent()?f.merge(e):e.remove()}),f.forEach(function(e){return e.children().move({parent:null})}),f.forEach(function(e){return i(e).remove()})}e.style&&t.style(e.style),e.zoom!=null&&e.zoom!==n.zoom&&t.zoom(e.zoom),e.pan&&(e.pan.x!==n.pan.x||e.pan.y!==n.pan.y)&&t.pan(e.pan),e.data&&t.data(e.data);for(var p=[`minZoom`,`maxZoom`,`zoomingEnabled`,`userZoomingEnabled`,`panningEnabled`,`userPanningEnabled`,`boxSelectionEnabled`,`autolock`,`autoungrabify`,`autounselectify`,`multiClickDebounceTime`],m=0;m<p.length;m++){var h=p[m];e[h]!=null&&t[h](e[h])}return t.endBatch(),this}var g=!!e,_={};g?_.elements=this.elements().map(function(e){return e.json()}):(_.elements={},r.forEach(function(e){var t=e.group();_.elements[t]||(_.elements[t]=[]),_.elements[t].push(e.json())})),this._private.styleEnabled&&(_.style=t.style().json()),_.data=_D(t.data());var v=n.options;return _.zoomingEnabled=n.zoomingEnabled,_.userZoomingEnabled=n.userZoomingEnabled,_.zoom=n.zoom,_.minZoom=n.minZoom,_.maxZoom=n.maxZoom,_.panningEnabled=n.panningEnabled,_.userPanningEnabled=n.userPanningEnabled,_.pan=_D(n.pan),_.boxSelectionEnabled=n.boxSelectionEnabled,_.renderer=_D(v.renderer),_.hideEdgesOnViewport=v.hideEdgesOnViewport,_.textureOnViewport=v.textureOnViewport,_.wheelSensitivity=v.wheelSensitivity,_.motionBlur=v.motionBlur,_.multiClickDebounceTime=v.multiClickDebounceTime,_}}),Bj.$id=Bj.getElementById,[THe,DHe,xj,Sj,Cj,kHe,wj,Tj,MHe,Lj,Rj].forEach(function(e){DE(Bj,e)}),PHe={fit:!0,directed:!1,direction:`downward`,padding:30,circle:!1,grid:!1,spacingFactor:1.75,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,roots:void 0,depthSort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},FHe={maximal:!1,acyclic:!1},Vj=function(e){return e.scratch(`breadthfirst`)},Hj=function(e,t){return e.scratch(`breadthfirst`,t)},DLe.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,r=n.nodes().filter(function(e){return e.isChildless()}),i=n,a=e.directed,o=e.acyclic||e.maximal||e.maximalAdjustments>0,s=!!e.boundingBox,l=KD(s?e.boundingBox:structuredClone(t.extent())),u;if(pE(e.roots))u=e.roots;else if(cE(e.roots)){for(var d=[],f=0;f<e.roots.length;f++){var p=e.roots[f],m=t.getElementById(p);d.push(m)}u=t.collection(d)}else if(oE(e.roots))u=t.$(e.roots);else if(a)u=r.roots();else{var h=n.components();u=t.collection();for(var g=function(){var e=h[_],t=e.maxDegree(!1),n=e.filter(function(e){return e.degree(!1)===t});u=u.add(n)},_=0;_<h.length;_++)g()}var v=[],y={},b=function(e,t){v[t]??(v[t]=[]);var n=v[t].length;v[t].push(e),Hj(e,{index:n,depth:t})},x=function(e,t){var n=Vj(e),r=n.depth,i=n.index;v[r][i]=null,e.isChildless()&&b(e,t)};i.bfs({roots:u,directed:e.directed,visit:function(e,t,n,r,i){var a=e[0],o=a.id();a.isChildless()&&b(a,i),y[o]=!0}});for(var S=[],C=0;C<r.length;C++){var w=r[C];y[w.id()]||S.push(w)}var T=function(e){for(var t=v[e],n=0;n<t.length;n++){var r=t[n];if(r==null){t.splice(n,1),n--;continue}Hj(r,{depth:e,index:n})}},E=function(t,r){for(var i=Vj(t),a=t.incomers().filter(function(e){return e.isNode()&&n.has(e)}),o=-1,s=t.id(),l=0;l<a.length;l++){var u=a[l],d=Vj(u);o=Math.max(o,d.depth)}if(i.depth<=o){if(!e.acyclic&&r[s])return null;var f=o+1;return x(t,f),r[s]=f,!0}return!1};if(a&&o){var D=[],O={},k=function(e){return D.push(e)},A=function(){return D.shift()};for(r.forEach(function(e){return D.push(e)});D.length>0;){var j=A(),M=E(j,O);if(M)j.outgoers().filter(function(e){return e.isNode()&&n.has(e)}).forEach(k);else if(M===null){gD("Detected double maximal shift for node `"+j.id()+"`. Bailing maximal adjustment due to cycle. Use `options.maximal: true` only on DAGs.");break}}}var N=0;if(e.avoidOverlap)for(var P=0;P<r.length;P++){var F=r[P].layoutDimensions(e),I=F.w,L=F.h;N=Math.max(N,I,L)}var R={},ee=function(e){if(R[e.id()])return R[e.id()];for(var t=Vj(e).depth,n=e.neighborhood(),i=0,a=0,o=0;o<n.length;o++){var s=n[o];if(!(s.isEdge()||s.isParent()||!r.has(s))){var l=Vj(s);if(l!=null){var u=l.index,d=l.depth;if(u!=null&&d!=null){var f=v[d].length;d<t&&(i+=u/f,a++)}}}}return a=Math.max(1,a),i/=a,a===0&&(i=0),R[e.id()]=i,i},z=function(e,t){var n=ee(e)-ee(t);return n===0?EE(e.id(),t.id()):n};e.depthSort!==void 0&&(z=e.depthSort);for(var B=v.length,te=0;te<B;te++)v[te].sort(z),T(te);for(var ne=[],re=0;re<S.length;re++)ne.push(S[re]);ne.length&&(v.unshift(ne),B=v.length,function(){for(var e=0;e<B;e++)T(e)}());for(var ie=0,ae=0;ae<B;ae++)ie=Math.max(v[ae].length,ie);var oe={x:l.x1+l.w/2,y:l.y1+l.h/2},se=r.reduce(function(t,n){return function(e){return{w:t.w===-1?e.w:(t.w+e.w)/2,h:t.h===-1?e.h:(t.h+e.h)/2}}(n.boundingBox({includeLabels:e.nodeDimensionsIncludeLabels}))},{w:-1,h:-1}),ce=Math.max(B===1?0:s?(l.h-e.padding*2-se.h)/(B-1):(l.h-e.padding*2-se.h)/(B+1),N),le=v.reduce(function(e,t){return Math.max(e,t.length)},0),ue=function(t){var n=Vj(t),r=n.depth,i=n.index;if(e.circle){var a=Math.min(l.w/2/B,l.h/2/B);a=Math.max(a,N);var o=a*r+a-(B>0&&v[0].length<=3?a/2:0),u=2*Math.PI/v[r].length*i;return r===0&&v[0].length===1&&(o=1),{x:oe.x+o*Math.cos(u),y:oe.y+o*Math.sin(u)}}var d=v[r].length,f=Math.max(d===1?0:s?(l.w-e.padding*2-se.w)/((e.grid?le:d)-1):(l.w-e.padding*2-se.w)/((e.grid?le:d)+1),N);return{x:oe.x+(i+1-(d+1)/2)*f,y:oe.y+(r+1-(B+1)/2)*ce}},de={downward:0,leftward:90,upward:180,rightward:-90};return Object.keys(de).indexOf(e.direction)===-1&&mD(`Invalid direction '${e.direction}' specified for breadthfirst layout. Valid values are: ${Object.keys(de).join(`, `)}`),n.nodes().layoutPositions(this,e,function(t){return _Ie(ue(t),l,de[e.direction])}),this},IHe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,radius:void 0,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},OLe.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,a=r.nodes().not(`:parent`);t.sort&&(a=a.sort(t.sort));for(var o=KD(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=(t.sweep===void 0?2*Math.PI-2*Math.PI/a.length:t.sweep)/Math.max(1,a.length-1),u,d=0,f=0;f<a.length;f++){var p=a[f].layoutDimensions(t),m=p.w,h=p.h;d=Math.max(d,m,h)}if(u=uE(t.radius)?t.radius:a.length<=1?0:Math.min(o.h,o.w)/2-d,a.length>1&&t.avoidOverlap){d*=1.75;var g=Math.cos(l)-Math.cos(0),_=Math.sin(l)-Math.sin(0),v=Math.sqrt(d*d/(g*g+_*_));u=Math.max(v,u)}return r.nodes().layoutPositions(this,t,function(e,n){var r=t.startAngle+n*l*(i?1:-1),a=u*Math.cos(r),o=u*Math.sin(r);return{x:s.x+a,y:s.y+o}}),this},LHe={fit:!0,padding:30,startAngle:3/2*Math.PI,sweep:void 0,clockwise:!0,equidistant:!1,minNodeSpacing:10,boundingBox:void 0,avoidOverlap:!0,nodeDimensionsIncludeLabels:!1,height:void 0,width:void 0,spacingFactor:void 0,concentric:function(e){return e.degree()},levelWidth:function(e){return e.maxDegree()/4},animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},kLe.prototype.run=function(){for(var e=this.options,t=e,n=t.counterclockwise===void 0?t.clockwise:!t.counterclockwise,r=e.cy,i=t.eles,a=i.nodes().not(`:parent`),o=KD(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:r.width(),h:r.height()}),s={x:o.x1+o.w/2,y:o.y1+o.h/2},l=[],u=0,d=0;d<a.length;d++){var f=a[d],p=void 0;p=t.concentric(f),l.push({value:p,node:f}),f._private.scratch.concentric=p}a.updateStyle();for(var m=0;m<a.length;m++){var h=a[m].layoutDimensions(t);u=Math.max(u,h.w,h.h)}l.sort(function(e,t){return t.value-e.value});for(var g=t.levelWidth(a),_=[[]],v=_[0],y=0;y<l.length;y++){var b=l[y];v.length>0&&Math.abs(v[0].value-b.value)>=g&&(v=[],_.push(v)),v.push(b)}var x=u+t.minNodeSpacing;if(!t.avoidOverlap){var S=_.length>0&&_[0].length>1,C=(Math.min(o.w,o.h)/2-x)/(_.length+S?1:0);x=Math.min(x,C)}for(var w=0,T=0;T<_.length;T++){var E=_[T],D=E.dTheta=(t.sweep===void 0?2*Math.PI-2*Math.PI/E.length:t.sweep)/Math.max(1,E.length-1);if(E.length>1&&t.avoidOverlap){var O=Math.cos(D)-Math.cos(0),k=Math.sin(D)-Math.sin(0),A=Math.sqrt(x*x/(O*O+k*k));w=Math.max(A,w)}E.r=w,w+=x}if(t.equidistant){for(var j=0,M=0,N=0;N<_.length;N++){var P=_[N].r-M;j=Math.max(j,P)}M=0;for(var F=0;F<_.length;F++){var I=_[F];F===0&&(M=I.r),I.r=M,M+=j}}for(var L={},R=0;R<_.length;R++)for(var ee=_[R],z=ee.dTheta,B=ee.r,te=0;te<ee.length;te++){var ne=ee[te],re=t.startAngle+(n?1:-1)*z*te,ie={x:s.x+B*Math.cos(re),y:s.y+B*Math.sin(re)};L[ne.node.id()]=ie}return i.nodes().layoutPositions(this,t,function(e){return L[e.id()]}),this},zHe={ready:function(){},stop:function(){},animate:!0,animationEasing:void 0,animationDuration:void 0,animateFilter:function(e,t){return!0},animationThreshold:250,refresh:20,fit:!0,padding:30,boundingBox:void 0,nodeDimensionsIncludeLabels:!1,randomize:!1,componentSpacing:40,nodeRepulsion:function(e){return 2048},nodeOverlap:4,idealEdgeLength:function(e){return 32},edgeElasticity:function(e){return 32},nestingFactor:1.2,gravity:1,numIter:1e3,initialTemp:1e3,coolingFactor:.99,minTemp:1},RT.prototype.run=function(){var e=this.options,t=e.cy,n=this;n.stopped=!1,(e.animate===!0||e.animate===!1)&&n.emit({type:`layoutstart`,layout:n}),RHe=!0===e.debug;var r=BHe(t,n,e);RHe&&HHe(r),e.randomize&&UHe(r);var i=XE(),a=function(){WHe(r,t,e),!0===e.fit&&t.fit(e.padding)},o=function(t){return!(n.stopped||t>=e.numIter||(GHe(r,e),r.temperature*=e.coolingFactor,r.temperature<e.minTemp))},s=function(){if(e.animate===!0||e.animate===!1)a(),n.one(`layoutstop`,e.stop),n.emit({type:`layoutstop`,layout:n});else{var t=e.eles.nodes(),i=Wj(r,e,t);t.layoutPositions(n,e,i)}},l=0,u=!0;if(e.animate===!0){var d=function(){for(var t=0;u&&t<e.refresh;)u=o(l),l++,t++;u?(XE()-i>=e.animationThreshold&&a(),YE(d)):(Jj(r,e),s())};d()}else{for(;u;)u=o(l),l++;Jj(r,e),s()}return this},RT.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit(`layoutstop`),this},RT.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},BHe=function(e,t,n){for(var r=n.eles.edges(),i=n.eles.nodes(),a=KD(n.boundingBox?n.boundingBox:{x1:0,y1:0,w:e.width(),h:e.height()}),o={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:r.size(),temperature:n.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},s=n.eles.components(),l={},u=0;u<s.length;u++)for(var d=s[u],f=0;f<d.length;f++){var p=d[f];l[p.id()]=u}for(var u=0;u<o.nodeSize;u++){var m=i[u],h=m.layoutDimensions(n),g={};g.isLocked=m.locked(),g.id=m.data(`id`),g.parentId=m.data(`parent`),g.cmptId=l[m.id()],g.children=[],g.positionX=m.position(`x`),g.positionY=m.position(`y`),g.offsetX=0,g.offsetY=0,g.height=h.w,g.width=h.h,g.maxX=g.positionX+g.width/2,g.minX=g.positionX-g.width/2,g.maxY=g.positionY+g.height/2,g.minY=g.positionY-g.height/2,g.padLeft=parseFloat(m.style(`padding`)),g.padRight=parseFloat(m.style(`padding`)),g.padTop=parseFloat(m.style(`padding`)),g.padBottom=parseFloat(m.style(`padding`)),g.nodeRepulsion=sE(n.nodeRepulsion)?n.nodeRepulsion(m):n.nodeRepulsion,o.layoutNodes.push(g),o.idToIndex[g.id]=u}for(var _=[],v=0,y=-1,b=[],u=0;u<o.nodeSize;u++){var m=o.layoutNodes[u],x=m.parentId;x==null?(_[++y]=m.id,b.push(m.id)):o.layoutNodes[o.idToIndex[x]].children.push(m.id)}for(o.graphSet.push(b);v<=y;){var S=_[v++],C=o.idToIndex[S],p=o.layoutNodes[C],w=p.children;if(w.length>0){o.graphSet.push(w);for(var u=0;u<w.length;u++)_[++y]=w[u]}}for(var u=0;u<o.graphSet.length;u++)for(var T=o.graphSet[u],f=0;f<T.length;f++){var E=o.idToIndex[T[f]];o.indexToGraph[E]=u}for(var u=0;u<o.edgeSize;u++){var D=r[u],O={};O.id=D.data(`id`),O.sourceId=D.data(`source`),O.targetId=D.data(`target`);var k=sE(n.idealEdgeLength)?n.idealEdgeLength(D):n.idealEdgeLength,A=sE(n.edgeElasticity)?n.edgeElasticity(D):n.edgeElasticity,j=o.idToIndex[O.sourceId],M=o.idToIndex[O.targetId];if(o.indexToGraph[j]!=o.indexToGraph[M]){for(var N=VHe(O.sourceId,O.targetId,o),P=o.graphSet[N],F=0,g=o.layoutNodes[j];P.indexOf(g.id)===-1;)g=o.layoutNodes[o.idToIndex[g.parentId]],F++;for(g=o.layoutNodes[M];P.indexOf(g.id)===-1;)g=o.layoutNodes[o.idToIndex[g.parentId]],F++;k*=F*n.nestingFactor}O.idealLength=k,O.elasticity=A,o.layoutEdges.push(O)}return o},VHe=function(e,t,n){var r=Uj(e,t,0,n);return 2>r.count?0:r.graph},Uj=function(e,t,n,r){var i=r.graphSet[n];if(-1<i.indexOf(e)&&-1<i.indexOf(t))return{count:2,graph:n};for(var a=0,o=0;o<i.length;o++){var s=i[o],l=r.idToIndex[s],u=r.layoutNodes[l].children;if(u.length!==0){var d=r.indexToGraph[r.idToIndex[u[0]]],f=Uj(e,t,d,r);if(f.count!==0){if(f.count===1){if(a++,a===2)break}else return f}}}return{count:a,graph:n}},UHe=function(e,t){for(var n=e.clientWidth,r=e.clientHeight,i=0;i<e.nodeSize;i++){var a=e.layoutNodes[i];a.children.length===0&&!a.isLocked&&(a.positionX=Math.random()*n,a.positionY=Math.random()*r)}},Wj=function(e,t,n){var r=e.boundingBox,i={x1:1/0,x2:-1/0,y1:1/0,y2:-1/0};return t.boundingBox&&(n.forEach(function(t){var n=e.layoutNodes[e.idToIndex[t.data(`id`)]];i.x1=Math.min(i.x1,n.positionX),i.x2=Math.max(i.x2,n.positionX),i.y1=Math.min(i.y1,n.positionY),i.y2=Math.max(i.y2,n.positionY)}),i.w=i.x2-i.x1,i.h=i.y2-i.y1),function(n,a){var o=e.layoutNodes[e.idToIndex[n.data(`id`)]];if(t.boundingBox){var s=i.w===0?.5:(o.positionX-i.x1)/i.w,l=i.h===0?.5:(o.positionY-i.y1)/i.h;return{x:r.x1+s*r.w,y:r.y1+l*r.h}}return{x:o.positionX,y:o.positionY}}},WHe=function(e,t,n){var r=n.layout,i=n.eles.nodes(),a=Wj(e,n,i);i.positions(a),!0!==e.ready&&(e.ready=!0,r.one(`layoutready`,n.ready),r.emit({type:`layoutready`,layout:this}))},GHe=function(e,t,n){KHe(e,t),YHe(e),XHe(e,t),ZHe(e),QHe(e)},KHe=function(e,t){for(var n=0;n<e.graphSet.length;n++)for(var r=e.graphSet[n],i=r.length,a=0;a<i;a++)for(var o=e.layoutNodes[e.idToIndex[r[a]]],s=a+1;s<i;s++){var l=e.layoutNodes[e.idToIndex[r[s]]];qHe(o,l,e,t)}},Gj=function(e){return-e+2*e*Math.random()},qHe=function(e,t,n,r){if(!(e.cmptId!==t.cmptId&&!n.isCompound)){var i=t.positionX-e.positionX,a=t.positionY-e.positionY,o=1;i===0&&a===0&&(i=Gj(o),a=Gj(o));var s=JHe(e,t,i,a);if(s>0)var l=r.nodeOverlap*s,u=Math.sqrt(i*i+a*a),d=l*i/u,f=l*a/u;else var p=Kj(e,i,a),m=Kj(t,-1*i,-1*a),h=m.x-p.x,g=m.y-p.y,_=h*h+g*g,u=Math.sqrt(_),l=(e.nodeRepulsion+t.nodeRepulsion)/_,d=l*h/u,f=l*g/u;e.isLocked||(e.offsetX-=d,e.offsetY-=f),t.isLocked||(t.offsetX+=d,t.offsetY+=f)}},JHe=function(e,t,n,r){if(n>0)var i=e.maxX-t.minX;else var i=t.maxX-e.minX;if(r>0)var a=e.maxY-t.minY;else var a=t.maxY-e.minY;return i>=0&&a>=0?Math.sqrt(i*i+a*a):0},Kj=function(e,t,n){var r=e.positionX,i=e.positionY,a=e.height||1,o=e.width||1,s=n/t,l=a/o,u={};return t===0&&0<n||t===0&&0>n?(u.x=r,u.y=i+a/2,u):0<t&&-1*l<=s&&s<=l?(u.x=r+o/2,u.y=i+o*n/2/t,u):0>t&&-1*l<=s&&s<=l?(u.x=r-o/2,u.y=i-o*n/2/t,u):0<n&&(s<=-1*l||s>=l)?(u.x=r+a*t/2/n,u.y=i+a/2,u):0>n&&(s<=-1*l||s>=l)?(u.x=r-a*t/2/n,u.y=i-a/2,u):u},YHe=function(e,t){for(var n=0;n<e.edgeSize;n++){var r=e.layoutEdges[n],i=e.idToIndex[r.sourceId],a=e.layoutNodes[i],o=e.idToIndex[r.targetId],s=e.layoutNodes[o],l=s.positionX-a.positionX,u=s.positionY-a.positionY;if(l!==0||u!==0){var d=Kj(a,l,u),f=Kj(s,-1*l,-1*u),p=f.x-d.x,m=f.y-d.y,h=Math.sqrt(p*p+m*m),g=(r.idealLength-h)**2/r.elasticity;if(h!==0)var _=g*p/h,v=g*m/h;else var _=0,v=0;a.isLocked||(a.offsetX+=_,a.offsetY+=v),s.isLocked||(s.offsetX-=_,s.offsetY-=v)}}},XHe=function(e,t){if(t.gravity!==0)for(var n=1,r=0;r<e.graphSet.length;r++){var i=e.graphSet[r],a=i.length;if(r===0)var o=e.clientHeight/2,s=e.clientWidth/2;else var l=e.layoutNodes[e.idToIndex[i[0]]],u=e.layoutNodes[e.idToIndex[l.parentId]],o=u.positionX,s=u.positionY;for(var d=0;d<a;d++){var f=e.layoutNodes[e.idToIndex[i[d]]];if(!f.isLocked){var p=o-f.positionX,m=s-f.positionY,h=Math.sqrt(p*p+m*m);if(h>n){var g=t.gravity*p/h,_=t.gravity*m/h;f.offsetX+=g,f.offsetY+=_}}}}},ZHe=function(e,t){var n=[],r=0,i=-1;for(n.push.apply(n,e.graphSet[0]),i+=e.graphSet[0].length;r<=i;){var a=n[r++],o=e.idToIndex[a],s=e.layoutNodes[o],l=s.children;if(0<l.length&&!s.isLocked){for(var u=s.offsetX,d=s.offsetY,f=0;f<l.length;f++){var p=e.layoutNodes[e.idToIndex[l[f]]];p.offsetX+=u,p.offsetY+=d,n[++i]=l[f]}s.offsetX=0,s.offsetY=0}}},QHe=function(e,t){for(var n=0;n<e.nodeSize;n++){var r=e.layoutNodes[n];0<r.children.length&&(r.maxX=void 0,r.minX=void 0,r.maxY=void 0,r.minY=void 0)}for(var n=0;n<e.nodeSize;n++){var r=e.layoutNodes[n];if(!(0<r.children.length||r.isLocked)){var i=$He(r.offsetX,r.offsetY,e.temperature);r.positionX+=i.x,r.positionY+=i.y,r.offsetX=0,r.offsetY=0,r.minX=r.positionX-r.width,r.maxX=r.positionX+r.width,r.minY=r.positionY-r.height,r.maxY=r.positionY+r.height,qj(r,e)}}for(var n=0;n<e.nodeSize;n++){var r=e.layoutNodes[n];0<r.children.length&&!r.isLocked&&(r.positionX=(r.maxX+r.minX)/2,r.positionY=(r.maxY+r.minY)/2,r.width=r.maxX-r.minX,r.height=r.maxY-r.minY)}},$He=function(e,t,n){var r=Math.sqrt(e*e+t*t);if(r>n)var i={x:n*e/r,y:n*t/r};else var i={x:e,y:t};return i},qj=function(e,t){var n=e.parentId;if(n!=null){var r=t.layoutNodes[t.idToIndex[n]],i=!1;if((r.maxX==null||e.maxX+r.padRight>r.maxX)&&(r.maxX=e.maxX+r.padRight,i=!0),(r.minX==null||e.minX-r.padLeft<r.minX)&&(r.minX=e.minX-r.padLeft,i=!0),(r.maxY==null||e.maxY+r.padBottom>r.maxY)&&(r.maxY=e.maxY+r.padBottom,i=!0),(r.minY==null||e.minY-r.padTop<r.minY)&&(r.minY=e.minY-r.padTop,i=!0),i)return qj(r,t)}},Jj=function(e,t){for(var n=e.layoutNodes,r=[],i=0;i<n.length;i++){var a=n[i],o=a.cmptId;(r[o]=r[o]||[]).push(a)}for(var s=0,i=0;i<r.length;i++){var l=r[i];if(l){l.x1=1/0,l.x2=-1/0,l.y1=1/0,l.y2=-1/0;for(var u=0;u<l.length;u++){var d=l[u];l.x1=Math.min(l.x1,d.positionX-d.width/2),l.x2=Math.max(l.x2,d.positionX+d.width/2),l.y1=Math.min(l.y1,d.positionY-d.height/2),l.y2=Math.max(l.y2,d.positionY+d.height/2)}l.w=l.x2-l.x1,l.h=l.y2-l.y1,s+=l.w*l.h}}r.sort(function(e,t){return t.w*t.h-e.w*e.h});for(var f=0,p=0,m=0,h=0,g=Math.sqrt(s)*e.clientWidth/e.clientHeight,i=0;i<r.length;i++){var l=r[i];if(l){for(var u=0;u<l.length;u++){var d=l[u];d.isLocked||(d.positionX+=f-l.x1,d.positionY+=p-l.y1)}f+=l.w+t.componentSpacing,m+=l.w+t.componentSpacing,h=Math.max(h,l.h),m>g&&(p+=h+t.componentSpacing,f=0,m=0,h=0)}}},eUe={fit:!0,padding:30,boundingBox:void 0,avoidOverlap:!0,avoidOverlapPadding:10,nodeDimensionsIncludeLabels:!1,spacingFactor:void 0,condense:!1,rows:void 0,cols:void 0,position:function(e){},sort:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},ALe.prototype.run=function(){var e=this.options,t=e,n=e.cy,r=t.eles,i=r.nodes().not(`:parent`);t.sort&&(i=i.sort(t.sort));var a=KD(t.boundingBox?t.boundingBox:{x1:0,y1:0,w:n.width(),h:n.height()});if(a.h===0||a.w===0)r.nodes().layoutPositions(this,t,function(e){return{x:a.x1,y:a.y1}});else{var o=i.size(),s=Math.sqrt(o*a.h/a.w),l=Math.round(s),u=Math.round(a.w/a.h*s),d=function(e){if(e==null)return Math.min(l,u);Math.min(l,u)==l?l=e:u=e},f=function(e){if(e==null)return Math.max(l,u);Math.max(l,u)==l?l=e:u=e},p=t.rows,m=t.cols==null?t.columns:t.cols;if(p!=null&&m!=null)l=p,u=m;else if(p!=null&&m==null)l=p,u=Math.ceil(o/l);else if(p==null&&m!=null)u=m,l=Math.ceil(o/u);else if(u*l>o){var h=d(),g=f();(h-1)*g>=o?d(h-1):(g-1)*h>=o&&f(g-1)}else for(;u*l<o;){var _=d(),v=f();(v+1)*_>=o?f(v+1):d(_+1)}var y=a.w/u,b=a.h/l;if(t.condense&&(y=0,b=0),t.avoidOverlap)for(var x=0;x<i.length;x++){var S=i[x],C=S._private.position;(C.x==null||C.y==null)&&(C.x=0,C.y=0);var w=S.layoutDimensions(t),T=t.avoidOverlapPadding,E=w.w+T,D=w.h+T;y=Math.max(y,E),b=Math.max(b,D)}for(var O={},k=function(e,t){return!!O[`c-`+e+`-`+t]},A=function(e,t){O[`c-`+e+`-`+t]=!0},j=0,M=0,N=function(){M++,M>=u&&(M=0,j++)},P={},F=0;F<i.length;F++){var I=i[F],L=t.position(I);if(L&&(L.row!==void 0||L.col!==void 0)){var R={row:L.row,col:L.col};if(R.col===void 0)for(R.col=0;k(R.row,R.col);)R.col++;else if(R.row===void 0)for(R.row=0;k(R.row,R.col);)R.row++;P[I.id()]=R,A(R.row,R.col)}}i.layoutPositions(this,t,function(e,t){var n,r;if(e.locked()||e.isParent())return!1;var i=P[e.id()];if(i)n=i.col*y+y/2+a.x1,r=i.row*b+b/2+a.y1;else{for(;k(j,M);)N();n=M*y+y/2+a.x1,r=j*b+b/2+a.y1,A(j,M),N()}return{x:n,y:r}})}return this},tUe={ready:function(){},stop:function(){}},zT.prototype.run=function(){var e=this.options,t=e.eles,n=this;return e.cy,n.emit(`layoutstart`),t.nodes().positions(function(){return{x:0,y:0}}),n.one(`layoutready`,e.ready),n.emit(`layoutready`),n.one(`layoutstop`,e.stop),n.emit(`layoutstop`),this},zT.prototype.stop=function(){return this},nUe={positions:void 0,zoom:void 0,pan:void 0,fit:!0,padding:30,spacingFactor:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},jLe.prototype.run=function(){var e=this.options,t=e.eles.nodes(),n=sE(e.positions);function r(t){return e.positions==null?Mze(t.position()):n?e.positions(t):e.positions[t._private.data.id]??null}return t.layoutPositions(this,e,function(e,t){var n=r(e);return e.locked()||n==null?!1:n}),this},rUe={fit:!0,padding:30,boundingBox:void 0,animate:!1,animationDuration:500,animationEasing:void 0,animateFilter:function(e,t){return!0},ready:void 0,stop:void 0,transform:function(e,t){return t}},MLe.prototype.run=function(){var e=this.options,t=e.cy,n=e.eles,r=KD(e.boundingBox?e.boundingBox:{x1:0,y1:0,w:t.width(),h:t.height()});return n.nodes().layoutPositions(this,e,function(e,t){return{x:r.x1+Math.round(Math.random()*r.w),y:r.y1+Math.round(Math.random()*r.h)}}),this},iUe=[{name:`breadthfirst`,impl:DLe},{name:`circle`,impl:OLe},{name:`concentric`,impl:kLe},{name:`cose`,impl:RT},{name:`grid`,impl:ALe},{name:`null`,impl:zT},{name:`preset`,impl:jLe},{name:`random`,impl:MLe}],Yj=function(){},Xj=function(){throw Error(`A headless instance can not render images`)},NLe.prototype={recalculateRenderedStyle:Yj,notify:function(){this.notifications++},init:Yj,isHeadless:function(){return!0},png:Xj,jpg:Xj},Zj={},Zj.arrowShapeWidth=.3,Zj.registerArrowShapes=function(){var e=this.arrowShapes={},t=this,n=function(e,t,n,r,i,a,o){var s=i.x-n/2-o,l=i.x+n/2+o,u=i.y-n/2-o,d=i.y+n/2+o;return s<=e&&e<=l&&u<=t&&t<=d},r=function(e,t,n,r,i){var a=e*Math.cos(r)-t*Math.sin(r),o=e*Math.sin(r)+t*Math.cos(r),s=a*n,l=o*n;return{x:s+i.x,y:l+i.y}},i=function(e,t,n,i){for(var a=[],o=0;o<e.length;o+=2){var s=e[o],l=e[o+1];a.push(r(s,l,t,n,i))}return a},a=function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r.x,r.y)}return t},o=function(e){return e.pstyle(`width`).pfValue*e.pstyle(`arrow-scale`).pfValue*2},s=function(r,s){oE(s)&&(s=e[s]),e[r]=DE({name:r,points:[-.15,-.3,.15,-.3,.15,.3,-.15,.3],collide:function(e,t,n,r,o,s){return nO(e,t,a(i(this.points,n+2*s,r,o)))},roughCollide:n,draw:function(e,n,r,a){var o=i(this.points,n,r,a);t.arrowShapeImpl(`polygon`)(e,o)},spacing:function(e){return 0},gap:o},s)};s(`none`,{collide:dD,roughCollide:dD,draw:pD,spacing:fD,gap:fD}),s(`triangle`,{points:[-.15,-.3,0,0,.15,-.3]}),s(`arrow`,`triangle`),s(`triangle-backcurve`,{points:e.triangle.points,controlPoint:[0,-.15],roughCollide:n,draw:function(e,n,a,o,s){var l=i(this.points,n,a,o),u=this.controlPoint,d=r(u[0],u[1],n,a,o);t.arrowShapeImpl(this.name)(e,l,d)},gap:function(e){return o(e)*.8}}),s(`triangle-tee`,{points:[0,0,.15,-.3,-.15,-.3,0,0],pointsTee:[-.15,-.4,-.15,-.5,.15,-.5,.15,-.4],collide:function(e,t,n,r,o,s,l){var u=a(i(this.points,n+2*l,r,o)),d=a(i(this.pointsTee,n+2*l,r,o));return nO(e,t,u)||nO(e,t,d)},draw:function(e,n,r,a,o){var s=i(this.points,n,r,a),l=i(this.pointsTee,n,r,a);t.arrowShapeImpl(this.name)(e,s,l)}}),s(`circle-triangle`,{radius:.15,pointsTr:[0,-.15,.15,-.45,-.15,-.45,0,-.15],collide:function(e,t,n,r,o,s,l){var u=o,d=(u.x-e)**2+(u.y-t)**2<=((n+2*l)*this.radius)**2;return nO(e,t,a(i(this.points,n+2*l,r,o)))||d},draw:function(e,n,r,a,o){var s=i(this.pointsTr,n,r,a);t.arrowShapeImpl(this.name)(e,s,a.x,a.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.radius}}),s(`triangle-cross`,{points:[0,0,.15,-.3,-.15,-.3,0,0],baseCrossLinePts:[-.15,-.4,-.15,-.4,.15,-.4,.15,-.4],crossLinePts:function(e,t){var n=this.baseCrossLinePts.slice(),r=t/e,i=3,a=5;return n[i]=n[i]-r,n[a]=n[a]-r,n},collide:function(e,t,n,r,o,s,l){var u=a(i(this.points,n+2*l,r,o)),d=a(i(this.crossLinePts(n,s),n+2*l,r,o));return nO(e,t,u)||nO(e,t,d)},draw:function(e,n,r,a,o){var s=i(this.points,n,r,a),l=i(this.crossLinePts(n,o),n,r,a);t.arrowShapeImpl(this.name)(e,s,l)}}),s(`vee`,{points:[-.15,-.3,0,0,.15,-.3,0,-.15],gap:function(e){return o(e)*.525}}),s(`circle`,{radius:.15,collide:function(e,t,n,r,i,a,o){var s=i;return(s.x-e)**2+(s.y-t)**2<=((n+2*o)*this.radius)**2},draw:function(e,n,r,i,a){t.arrowShapeImpl(this.name)(e,i.x,i.y,this.radius*n)},spacing:function(e){return t.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.radius}}),s(`tee`,{points:[-.15,0,-.15,-.1,.15,-.1,.15,0],spacing:function(e){return 1},gap:function(e){return 1}}),s(`square`,{points:[-.15,0,.15,0,.15,-.3,-.15,-.3]}),s(`diamond`,{points:[-.15,-.15,0,-.3,.15,-.15,0,0],gap:function(e){return e.pstyle(`width`).pfValue*e.pstyle(`arrow-scale`).value}}),s(`chevron`,{points:[0,0,-.15,-.15,-.1,-.2,0,-.1,.1,-.2,.15,-.15],gap:function(e){return .95*e.pstyle(`width`).pfValue*e.pstyle(`arrow-scale`).value}})},Qj={},Qj.projectIntoViewport=function(e,t){var n=this.cy,r=this.findContainerClientCoords(),i=r[0],a=r[1],o=r[4],s=n.pan(),l=n.zoom();return[((e-i)/o-s.x)/l,((t-a)/o-s.y)/l]},Qj.findContainerClientCoords=function(){if(this.containerBB)return this.containerBB;var e=this.container,t=e.getBoundingClientRect(),n=this.cy.window().getComputedStyle(e),r=function(e){return parseFloat(n.getPropertyValue(e))},i={left:r(`padding-left`),right:r(`padding-right`),top:r(`padding-top`),bottom:r(`padding-bottom`)},a={left:r(`border-left-width`),right:r(`border-right-width`),top:r(`border-top-width`),bottom:r(`border-bottom-width`)},o=e.clientWidth,s=e.clientHeight,l=i.left+i.right,u=i.top+i.bottom,d=a.left+a.right,f=t.width/(o+d),p=o-l,m=s-u,h=t.left+i.left+a.left,g=t.top+i.top+a.top;return this.containerBB=[h,g,p,m,f]},Qj.invalidateContainerClientCoordsCache=function(){this.containerBB=null},Qj.findNearestElement=function(e,t,n,r){return this.findNearestElements(e,t,n,r)[0]},Qj.findNearestElements=function(e,t,n,r){var i=this,a=this,o=a.getCachedZSortedEles(),s=[],l=a.cy.zoom(),u=a.cy.hasCompoundNodes(),d=(r?24:8)/l,f=(r?8:2)/l,p=(r?8:2)/l,m=1/0,h,g;n&&(o=o.interactive);function _(e,t){if(e.isNode()){if(g)return;g=e,s.push(e)}if(e.isEdge()&&(t==null||t<m)){if(h){if(h.pstyle(`z-compound-depth`).value===e.pstyle(`z-compound-depth`).value&&h.pstyle(`z-compound-depth`).value===e.pstyle(`z-compound-depth`).value){for(var n=0;n<s.length;n++)if(s[n].isEdge()){s[n]=e,h=e,m=t??m;break}}}else s.push(e),h=e,m=t??m}}function v(n){var r=n.outerWidth()+2*f,o=n.outerHeight()+2*f,s=r/2,l=o/2,u=n.position(),d=n.pstyle(`corner-radius`).value===`auto`?`auto`:n.pstyle(`corner-radius`).pfValue,p=n._private.rscratch;if(u.x-s<=e&&e<=u.x+s&&u.y-l<=t&&t<=u.y+l&&a.nodeShapes[i.getNodeShape(n)].checkPoint(e,t,0,r,o,u.x,u.y,d,p))return _(n,0),!0}function y(n){var r=n._private,o=r.rscratch,l=n.pstyle(`width`).pfValue,f=n.pstyle(`arrow-scale`).value,p=l/2+d,m=p*p,h=p*2,g=r.source,y=r.target,b;if(o.edgeType===`segments`||o.edgeType===`straight`||o.edgeType===`haystack`){for(var x=o.allpts,S=0;S+3<x.length;S+=2)if(Gze(e,t,x[S],x[S+1],x[S+2],x[S+3],h)&&m>(b=Xze(e,t,x[S],x[S+1],x[S+2],x[S+3])))return _(n,b),!0}else if(o.edgeType===`bezier`||o.edgeType===`multibezier`||o.edgeType===`self`||o.edgeType===`compound`){for(var x=o.allpts,S=0;S+5<o.allpts.length;S+=4)if(Kze(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5],h)&&m>(b=Yze(e,t,x[S],x[S+1],x[S+2],x[S+3],x[S+4],x[S+5])))return _(n,b),!0}for(var g=g||r.source,y=y||r.target,C=i.getArrowWidth(l,f),w=[{name:`source`,x:o.arrowStartX,y:o.arrowStartY,angle:o.srcArrowAngle},{name:`target`,x:o.arrowEndX,y:o.arrowEndY,angle:o.tgtArrowAngle},{name:`mid-source`,x:o.midX,y:o.midY,angle:o.midsrcArrowAngle},{name:`mid-target`,x:o.midX,y:o.midY,angle:o.midtgtArrowAngle}],S=0;S<w.length;S++){var T=w[S],E=a.arrowShapes[n.pstyle(T.name+`-arrow-shape`).value],D=n.pstyle(`width`).pfValue;if(E.roughCollide(e,t,C,T.angle,{x:T.x,y:T.y},D,d)&&E.collide(e,t,C,T.angle,{x:T.x,y:T.y},D,d))return _(n),!0}u&&s.length>0&&(v(g),v(y))}function b(e,t,n){return CD(e,t,n)}function x(n,r){var i=n._private,a=p,o=r?r+`-`:``;n.boundingBox();var s=i.labelBounds[r||`main`],l=n.pstyle(o+`label`).value;if(!(n.pstyle(`text-events`).strValue!==`yes`||!l)){var u=b(i.rscratch,`labelX`,r),d=b(i.rscratch,`labelY`,r),f=b(i.rscratch,`labelAngle`,r),m=n.pstyle(o+`text-margin-x`).pfValue,h=n.pstyle(o+`text-margin-y`).pfValue,g=s.x1-a-m,v=s.x2+a-m,y=s.y1-a-h,x=s.y2+a-h;if(f){var S=Math.cos(f),C=Math.sin(f),w=function(e,t){return e-=u,t-=d,{x:e*S-t*C+u,y:e*C+t*S+d}},T=w(g,y),E=w(g,x),D=w(v,y),O=w(v,x);if(nO(e,t,[T.x+m,T.y+h,D.x+m,D.y+h,O.x+m,O.y+h,E.x+m,E.y+h]))return _(n),!0}else if(QD(s,e,t))return _(n),!0}}for(var S=o.length-1;S>=0;S--){var C=o[S];C.isNode()?v(C)||x(C):y(C)||x(C)||x(C,`source`)||x(C,`target`)}return s},Qj.getAllInBox=function(e,t,n,r){var i=this.getCachedZSortedEles().interactive,a=2/this.cy.zoom(),o=[],s=Math.min(e,n),l=Math.max(e,n),u=Math.min(t,r),d=Math.max(t,r);e=s,n=l,t=u,r=d;var f=KD({x1:e,y1:t,x2:n,y2:r}),p=[{x:f.x1,y:f.y1},{x:f.x2,y:f.y1},{x:f.x2,y:f.y2},{x:f.x1,y:f.y2}],m=[[p[0],p[1]],[p[1],p[2]],[p[2],p[3]],[p[3],p[0]]];function h(e,t,n){return CD(e,t,n)}function g(e,t){var n=e._private,r=a,i=``;e.boundingBox();var o=n.labelBounds.main;if(!o)return null;var s=h(n.rscratch,`labelX`,t),l=h(n.rscratch,`labelY`,t),u=h(n.rscratch,`labelAngle`,t),d=e.pstyle(i+`text-margin-x`).pfValue,f=e.pstyle(i+`text-margin-y`).pfValue,p=o.x1-r-d,m=o.x2+r-d,g=o.y1-r-f,_=o.y2+r-f;if(u){var v=Math.cos(u),y=Math.sin(u),b=function(e,t){return e-=s,t-=l,{x:e*v-t*y+s,y:e*y+t*v+l}};return[b(p,g),b(m,g),b(m,_),b(p,_)]}return[{x:p,y:g},{x:m,y:g},{x:m,y:_},{x:p,y:_}]}function _(e,t,n,r){function i(e,t,n){return(n.y-e.y)*(t.x-e.x)>(t.y-e.y)*(n.x-e.x)}return i(e,n,r)!==i(t,n,r)&&i(e,t,n)!==i(e,t,r)}for(var v=0;v<i.length;v++){var y=i[v];if(y.isNode()){var b=y,x=b.pstyle(`text-events`).strValue===`yes`,S=b.pstyle(`box-selection`).strValue,C=b.pstyle(`box-select-labels`).strValue===`yes`;if(S===`none`)continue;var w=(S===`overlap`||C)&&x,T=b.boundingBox({includeNodes:!0,includeEdges:!1,includeLabels:w});if(S===`contain`){var E=!1;if(C&&x){var D=g(b);D&&_T(D,p)&&(o.push(b),E=!0)}!E&&eO(f,T)&&o.push(b)}else if(S===`overlap`&&ZD(f,T)){var O=b.boundingBox({includeNodes:!0,includeEdges:!0,includeLabels:!1,includeMainLabels:!1,includeSourceLabels:!1,includeTargetLabels:!1});if(_T([{x:O.x1,y:O.y1},{x:O.x2,y:O.y1},{x:O.x2,y:O.y2},{x:O.x1,y:O.y2}],p))o.push(b);else{var k=g(b);k&&_T(k,p)&&o.push(b)}}}else{var A=y,j=A._private,M=j.rscratch,N=A.pstyle(`box-selection`).strValue;if(N===`none`)continue;if(N===`contain`){if(M.startX!=null&&M.startY!=null&&!QD(f,M.startX,M.startY)||M.endX!=null&&M.endY!=null&&!QD(f,M.endX,M.endY))continue;if(M.edgeType===`bezier`||M.edgeType===`multibezier`||M.edgeType===`self`||M.edgeType===`compound`||M.edgeType===`segments`||M.edgeType===`haystack`){for(var P=j.rstyle.bezierPts||j.rstyle.linePts||j.rstyle.haystackPts,F=!0,I=0;I<P.length;I++)if(!$D(f,P[I])){F=!1;break}F&&o.push(A)}else M.edgeType===`straight`&&o.push(A)}else if(N===`overlap`){var L=!1;if(M.startX!=null&&M.startY!=null&&M.endX!=null&&M.endY!=null&&(QD(f,M.startX,M.startY)||QD(f,M.endX,M.endY)))o.push(A),L=!0;else if(!L&&M.edgeType===`haystack`){for(var R=j.rstyle.haystackPts,ee=0;ee<R.length;ee++)if($D(f,R[ee])){o.push(A),L=!0;break}}if(!L){var z=j.rstyle.bezierPts||j.rstyle.linePts||j.rstyle.haystackPts;if((!z||z.length<2)&&M.edgeType===`straight`&&M.startX!=null&&M.startY!=null&&M.endX!=null&&M.endY!=null&&(z=[{x:M.startX,y:M.startY},{x:M.endX,y:M.endY}]),!z||z.length<2)continue;for(var B=0;B<z.length-1;B++){for(var te=z[B],ne=z[B+1],re=0;re<m.length;re++){var ie=cT(m[re],2),ae=ie[0],oe=ie[1];if(_(te,ne,ae,oe)){o.push(A),L=!0;break}}if(L)break}}}}}return o},$j={},$j.calculateArrowAngles=function(e){var t=e._private.rscratch,n=t.edgeType===`haystack`,r=t.edgeType===`bezier`,i=t.edgeType===`multibezier`,a=t.edgeType===`segments`,o=t.edgeType===`compound`,s=t.edgeType===`self`,l,u,d,f,p,m,h,g;if(n?(d=t.haystackPts[0],f=t.haystackPts[1],p=t.haystackPts[2],m=t.haystackPts[3]):(d=t.arrowStartX,f=t.arrowStartY,p=t.arrowEndX,m=t.arrowEndY),h=t.midX,g=t.midY,a)l=d-t.segpts[0],u=f-t.segpts[1];else if(i||o||s||r){var _=t.allpts,v=UD(_[0],_[2],_[4],.1),y=UD(_[1],_[3],_[5],.1);l=d-v,u=f-y}else l=d-h,u=f-g;t.srcArrowAngle=RD(l,u);var h=t.midX,g=t.midY;if(n&&(h=(d+p)/2,g=(f+m)/2),l=p-d,u=m-f,a){var _=t.allpts;if(_.length/2%2==0){var b=_.length/2,x=b-2;l=_[b]-_[x],u=_[b+1]-_[x+1]}else if(t.isRound)l=t.midVector[1],u=-t.midVector[0];else{var b=_.length/2-1,x=b-2;l=_[b]-_[x],u=_[b+1]-_[x+1]}}else if(i||o||s){var _=t.allpts,S=t.ctrlpts,C,w,T,E;if(S.length/2%2==0){var D=_.length/2-1,O=D+2,k=O+2;C=UD(_[D],_[O],_[k],0),w=UD(_[D+1],_[O+1],_[k+1],0),T=UD(_[D],_[O],_[k],1e-4),E=UD(_[D+1],_[O+1],_[k+1],1e-4)}else{var O=_.length/2-1,D=O-2,k=O+2;C=UD(_[D],_[O],_[k],.4999),w=UD(_[D+1],_[O+1],_[k+1],.4999),T=UD(_[D],_[O],_[k],.5),E=UD(_[D+1],_[O+1],_[k+1],.5)}l=T-C,u=E-w}if(t.midtgtArrowAngle=RD(l,u),t.midDispX=l,t.midDispY=u,l*=-1,u*=-1,a){var _=t.allpts;if(_.length/2%2!=0&&!t.isRound){var b=_.length/2-1,A=b+2;l=-(_[A]-_[b]),u=-(_[A+1]-_[b+1])}}if(t.midsrcArrowAngle=RD(l,u),a)l=p-t.segpts[t.segpts.length-2],u=m-t.segpts[t.segpts.length-1];else if(i||o||s||r){var _=t.allpts,j=_.length,v=UD(_[j-6],_[j-4],_[j-2],.9),y=UD(_[j-5],_[j-3],_[j-1],.9);l=p-v,u=m-y}else l=p-h,u=m-g;t.tgtArrowAngle=RD(l,u)},$j.getArrowWidth=$j.getArrowHeight=function(e,t){var n=this.arrowWidthCache=this.arrowWidthCache||{},r=n[e+`, `+t];return r||(r=Math.max((e*13.37)**.9,29)*t,n[e+`, `+t]=r,r)},nM={},rM={},mM=function(e,t,n){n.x=t.x-e.x,n.y=t.y-e.y,n.len=Math.sqrt(n.x*n.x+n.y*n.y),n.nx=n.x/n.len,n.ny=n.y/n.len,n.ang=Math.atan2(n.ny,n.nx)},uUe=function(e,t){t.x=e.x*-1,t.y=e.y*-1,t.nx=e.nx*-1,t.ny=e.ny*-1,t.ang=e.ang>0?-(Math.PI-e.ang):Math.PI+e.ang},dUe=function(e,t,n,r,i){if(e===lUe?uUe(rM,nM):mM(t,e,nM),mM(t,n,rM),aUe=nM.nx*rM.ny-nM.ny*rM.nx,oUe=nM.nx*rM.nx-nM.ny*-rM.ny,oM=Math.asin(Math.max(-1,Math.min(1,aUe))),Math.abs(oM)<1e-6){eM=t.x,tM=t.y,cM=uM=0;return}iM=1,aM=!1,oUe<0?oM<0?oM=Math.PI+oM:(oM=Math.PI-oM,iM=-1,aM=!0):oM>0&&(iM=-1,aM=!0),uM=t.radius===void 0?r:t.radius,sM=oM/2,dM=Math.min(nM.len/2,rM.len/2),i?(lM=Math.abs(Math.cos(sM)*uM/Math.sin(sM)),lM>dM?(lM=dM,cM=Math.abs(lM*Math.sin(sM)/Math.cos(sM))):cM=uM):(lM=Math.min(dM,uM),cM=Math.abs(lM*Math.sin(sM)/Math.cos(sM))),fM=t.x+rM.nx*lM,pM=t.y+rM.ny*lM,eM=fM-rM.ny*cM*iM,tM=pM+rM.nx*cM*iM,sUe=t.x+nM.nx*lM,cUe=t.y+nM.ny*lM,lUe=t},hM=.01,fUe=Math.sqrt(2*hM),gM={},gM.findMidptPtsEtc=function(e,t){var n=t.posPts,r=t.intersectionPts,i=t.vectorNormInverse,a,o=e.pstyle(`source-endpoint`),s=e.pstyle(`target-endpoint`),l=o.units!=null&&s.units!=null,u=function(e,t,n,r){var i=r-t,a=n-e,o=Math.sqrt(a*a+i*i);return{x:-i/o,y:a/o}};switch(e.pstyle(`edge-distances`).value){case`node-position`:a=n;break;case`intersection`:a=r;break;case`endpoints`:if(l){var d=cT(this.manualEndptToPx(e.source()[0],o),2),f=d[0],p=d[1],m=cT(this.manualEndptToPx(e.target()[0],s),2),h=m[0],g=m[1],_={x1:f,y1:p,x2:h,y2:g};i=u(f,p,h,g),a=_}else gD(`Edge ${e.id()} has edge-distances:endpoints specified without manual endpoints specified via source-endpoint and target-endpoint. Falling back on edge-distances:intersection (default).`),a=r}return{midptPts:a,vectorNormInverse:i}},gM.findHaystackPoints=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n._private,i=r.rscratch;if(!i.haystack){var a=Math.random()*2*Math.PI;i.source={x:Math.cos(a),y:Math.sin(a)},a=Math.random()*2*Math.PI,i.target={x:Math.cos(a),y:Math.sin(a)}}var o=r.source,s=r.target,l=o.position(),u=s.position(),d=o.width(),f=s.width(),p=o.height(),m=s.height(),h=n.pstyle(`haystack-radius`).value/2;i.haystackPts=i.allpts=[i.source.x*d*h+l.x,i.source.y*p*h+l.y,i.target.x*f*h+u.x,i.target.y*m*h+u.y],i.midX=(i.allpts[0]+i.allpts[2])/2,i.midY=(i.allpts[1]+i.allpts[3])/2,i.edgeType=`haystack`,i.haystack=!0,this.storeEdgeProjections(n),this.calculateArrowAngles(n),this.recalculateEdgeLabelProjections(n),this.calculateLabelAngles(n)}},gM.findSegmentsPoints=function(e,t){var n=e._private.rscratch,r=e.pstyle(`segment-weights`),i=e.pstyle(`segment-distances`),a=e.pstyle(`segment-radii`),o=e.pstyle(`radius-type`),s=Math.min(r.pfValue.length,i.pfValue.length),l=a.pfValue[a.pfValue.length-1],u=o.pfValue[o.pfValue.length-1];n.edgeType=`segments`,n.segpts=[],n.radii=[],n.isArcRadius=[];for(var d=0;d<s;d++){var f=r.pfValue[d],p=i.pfValue[d],m=1-f,h=f,g=this.findMidptPtsEtc(e,t),_=g.midptPts,v=g.vectorNormInverse,y={x:_.x1*m+_.x2*h,y:_.y1*m+_.y2*h};n.segpts.push(y.x+v.x*p,y.y+v.y*p),n.radii.push(a.pfValue[d]===void 0?l:a.pfValue[d]),n.isArcRadius.push((o.pfValue[d]===void 0?u:o.pfValue[d])===`arc-radius`)}},gM.findLoopPoints=function(e,t,n,r){var i=e._private.rscratch,a=t.dirCounts,o=t.srcPos,s=e.pstyle(`control-point-distances`),l=s?s.pfValue[0]:void 0,u=e.pstyle(`loop-direction`).pfValue,d=e.pstyle(`loop-sweep`).pfValue,f=e.pstyle(`control-point-step-size`).pfValue;i.edgeType=`self`;var p=n,m=f;r&&(p=0,m=l);var h=u-Math.PI/2,g=h-d/2,_=h+d/2,v=String(u+`_`+d);p=a[v]===void 0?a[v]=0:++a[v],i.ctrlpts=[o.x+Math.cos(g)*1.4*m*(p/3+1),o.y+Math.sin(g)*1.4*m*(p/3+1),o.x+Math.cos(_)*1.4*m*(p/3+1),o.y+Math.sin(_)*1.4*m*(p/3+1)]},gM.findCompoundLoopPoints=function(e,t,n,r){var i=e._private.rscratch;i.edgeType=`compound`;var a=t.srcPos,o=t.tgtPos,s=t.srcW,l=t.srcH,u=t.tgtW,d=t.tgtH,f=e.pstyle(`control-point-step-size`).pfValue,p=e.pstyle(`control-point-distances`),m=p?p.pfValue[0]:void 0,h=n,g=f;r&&(h=0,g=m);var _=50,v={x:a.x-s/2,y:a.y-l/2},y={x:o.x-u/2,y:o.y-d/2},b={x:Math.min(v.x,y.x),y:Math.min(v.y,y.y)},x=.5,S=Math.max(x,Math.log(s*hM)),C=Math.max(x,Math.log(u*hM));i.ctrlpts=[b.x,b.y-(1+_**1.12/100)*g*(h/3+1)*S,b.x-(1+_**1.12/100)*g*(h/3+1)*C,b.y]},gM.findStraightEdgePoints=function(e){e._private.rscratch.edgeType=`straight`},gM.findBezierPoints=function(e,t,n,r,i){var a=e._private.rscratch,o=e.pstyle(`control-point-step-size`).pfValue,s=e.pstyle(`control-point-distances`),l=e.pstyle(`control-point-weights`),u=s&&l?Math.min(s.value.length,l.value.length):1,d=s?s.pfValue[0]:void 0,f=l.value[0],p=r;a.edgeType=p?`multibezier`:`bezier`,a.ctrlpts=[];for(var m=0;m<u;m++){var h=(.5-t.eles.length/2+n)*o*(i?-1:1),g=void 0,_=BD(h);p&&(d=s?s.pfValue[m]:o,f=l.value[m]),g=r?d:d===void 0?void 0:_*d;var v=g===void 0?h:g,y=1-f,b=f,x=this.findMidptPtsEtc(e,t),S=x.midptPts,C=x.vectorNormInverse,w={x:S.x1*y+S.x2*b,y:S.y1*y+S.y2*b};a.ctrlpts.push(w.x+C.x*v,w.y+C.y*v)}},gM.findTaxiPoints=function(e,t){var n=e._private.rscratch;n.edgeType=`segments`;var r=`vertical`,i=`horizontal`,a=`leftward`,o=`rightward`,s=`downward`,l=`upward`,u=`auto`,d=t.posPts,f=t.srcW,p=t.srcH,m=t.tgtW,h=t.tgtH,g=e.pstyle(`edge-distances`).value!==`node-position`,_=e.pstyle(`taxi-direction`).value,v=_,y=e.pstyle(`taxi-turn`),b=y.units===`%`,x=y.pfValue,S=x<0,C=e.pstyle(`taxi-turn-min-distance`).pfValue,w=g?(f+m)/2:0,T=g?(p+h)/2:0,E=d.x2-d.x1,D=d.y2-d.y1,O=function(e,t){return e>0?Math.max(e-t,0):Math.min(e+t,0)},k=O(E,w),A=O(D,T),j=!1;v===u?_=Math.abs(k)>Math.abs(A)?i:r:v===l||v===s?(_=r,j=!0):(v===a||v===o)&&(_=i,j=!0);var M=_===r,N=M?A:k,P=M?D:E,F=BD(P),I=!1;!(j&&(b||S))&&(v===s&&P<0||v===l&&P>0||v===a&&P>0||v===o&&P<0)&&(F*=-1,N=F*Math.abs(N),I=!0);var L=b?(x<0?1+x:x)*N:(x<0?N:0)+x*F,R=function(e){return Math.abs(e)<C||Math.abs(e)>=Math.abs(N)},ee=R(L),z=R(Math.abs(N)-Math.abs(L));if((ee||z)&&!I){if(M){var B=Math.abs(P)<=p/2,te=Math.abs(E)<=m/2;if(B){var ne=(d.x1+d.x2)/2;n.segpts=[ne,d.y1,ne,d.y2]}else if(te){var re=(d.y1+d.y2)/2;n.segpts=[d.x1,re,d.x2,re]}else n.segpts=[d.x1,d.y2]}else{var ie=Math.abs(P)<=f/2,ae=Math.abs(D)<=h/2;if(ie){var oe=(d.y1+d.y2)/2;n.segpts=[d.x1,oe,d.x2,oe]}else if(ae){var se=(d.x1+d.x2)/2;n.segpts=[se,d.y1,se,d.y2]}else n.segpts=[d.x2,d.y1]}}else if(M){var ce=d.y1+L+(g?p/2*F:0);n.segpts=[d.x1,ce,d.x2,ce]}else{var le=d.x1+L+(g?f/2*F:0);n.segpts=[le,d.y1,le,d.y2]}if(n.isRound){var ue=e.pstyle(`taxi-radius`).value,de=e.pstyle(`radius-type`).value[0]===`arc-radius`;n.radii=Array(n.segpts.length/2).fill(ue),n.isArcRadius=Array(n.segpts.length/2).fill(de)}},gM.tryToCorrectInvalidPoints=function(e,t){var n=e._private.rscratch;if(n.edgeType===`bezier`){var r=t.srcPos,i=t.tgtPos,a=t.srcW,o=t.srcH,s=t.tgtW,l=t.tgtH,u=t.srcShape,d=t.tgtShape,f=t.srcCornerRadius,p=t.tgtCornerRadius,m=t.srcRs,h=t.tgtRs,g=!uE(n.startX)||!uE(n.startY),_=!uE(n.arrowStartX)||!uE(n.arrowStartY),v=!uE(n.endX)||!uE(n.endY),y=!uE(n.arrowEndX)||!uE(n.arrowEndY),b=3*(this.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.arrowShapeWidth),x=VD({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.startX,y:n.startY}),S=x<b,C=VD({x:n.ctrlpts[0],y:n.ctrlpts[1]},{x:n.endX,y:n.endY}),w=C<b,T=!1;if(g||_||S){T=!0;var E={x:n.ctrlpts[0]-r.x,y:n.ctrlpts[1]-r.y},D=Math.sqrt(E.x*E.x+E.y*E.y),O={x:E.x/D,y:E.y/D},k=Math.max(a,o),A={x:n.ctrlpts[0]+O.x*2*k,y:n.ctrlpts[1]+O.y*2*k},j=u.intersectLine(r.x,r.y,a,o,A.x,A.y,0,f,m);S?(n.ctrlpts[0]=n.ctrlpts[0]+O.x*(b-x),n.ctrlpts[1]=n.ctrlpts[1]+O.y*(b-x)):(n.ctrlpts[0]=j[0]+O.x*b,n.ctrlpts[1]=j[1]+O.y*b)}if(v||y||w){T=!0;var M={x:n.ctrlpts[0]-i.x,y:n.ctrlpts[1]-i.y},N=Math.sqrt(M.x*M.x+M.y*M.y),P={x:M.x/N,y:M.y/N},F=Math.max(a,o),I={x:n.ctrlpts[0]+P.x*2*F,y:n.ctrlpts[1]+P.y*2*F},L=d.intersectLine(i.x,i.y,s,l,I.x,I.y,0,p,h);w?(n.ctrlpts[0]=n.ctrlpts[0]+P.x*(b-C),n.ctrlpts[1]=n.ctrlpts[1]+P.y*(b-C)):(n.ctrlpts[0]=L[0]+P.x*b,n.ctrlpts[1]=L[1]+P.y*b)}T&&this.findEndpoints(e)}},gM.storeAllpts=function(e){var t=e._private.rscratch;if(t.edgeType===`multibezier`||t.edgeType===`bezier`||t.edgeType===`self`||t.edgeType===`compound`){t.allpts=[],t.allpts.push(t.startX,t.startY);for(var n=0;n+1<t.ctrlpts.length;n+=2)t.allpts.push(t.ctrlpts[n],t.ctrlpts[n+1]),n+3<t.ctrlpts.length&&t.allpts.push((t.ctrlpts[n]+t.ctrlpts[n+2])/2,(t.ctrlpts[n+1]+t.ctrlpts[n+3])/2);t.allpts.push(t.endX,t.endY);var r,i;t.ctrlpts.length/2%2==0?(r=t.allpts.length/2-1,t.midX=t.allpts[r],t.midY=t.allpts[r+1]):(r=t.allpts.length/2-3,i=.5,t.midX=UD(t.allpts[r],t.allpts[r+2],t.allpts[r+4],i),t.midY=UD(t.allpts[r+1],t.allpts[r+3],t.allpts[r+5],i))}else if(t.edgeType===`straight`)t.allpts=[t.startX,t.startY,t.endX,t.endY],t.midX=(t.startX+t.endX+t.arrowStartX+t.arrowEndX)/4,t.midY=(t.startY+t.endY+t.arrowStartY+t.arrowEndY)/4;else if(t.edgeType===`segments`){if(t.allpts=[],t.allpts.push(t.startX,t.startY),t.allpts.push.apply(t.allpts,t.segpts),t.allpts.push(t.endX,t.endY),t.isRound){t.roundCorners=[];for(var a=2;a+3<t.allpts.length;a+=2){var o=t.radii[a/2-1],s=t.isArcRadius[a/2-1];t.roundCorners.push(BT({x:t.allpts[a-2],y:t.allpts[a-1]},{x:t.allpts[a],y:t.allpts[a+1],radius:o},{x:t.allpts[a+2],y:t.allpts[a+3]},o,s))}}if(t.segpts.length%4==0){var l=t.segpts.length/2,u=l-2;t.midX=(t.segpts[u]+t.segpts[l])/2,t.midY=(t.segpts[u+1]+t.segpts[l+1])/2}else{var d=t.segpts.length/2-1;if(!t.isRound)t.midX=t.segpts[d],t.midY=t.segpts[d+1];else{var f={x:t.segpts[d],y:t.segpts[d+1]},p=t.roundCorners[d/2];if(p.radius===0){var m={x:t.segpts[d+2],y:t.segpts[d+3]};t.midX=f.x,t.midY=f.y,t.midVector=[f.y-m.y,m.x-f.x]}else{var h=[f.x-p.cx,f.y-p.cy],g=p.radius/Math.sqrt(h[0]**2+h[1]**2);h=h.map(function(e){return e*g}),t.midX=p.cx+h[0],t.midY=p.cy+h[1],t.midVector=h}}}}},gM.checkForInvalidEdgeWarning=function(e){var t=e[0]._private.rscratch;t.nodesOverlap||uE(t.startX)&&uE(t.startY)&&uE(t.endX)&&uE(t.endY)?t.loggedErr=!1:t.loggedErr||(t.loggedErr=!0,gD("Edge `"+e.id()+"` has invalid endpoints and so it is impossible to draw. Adjust your edge style (e.g. control points) accordingly or use an alternative edge type. This is expected behaviour when the source node and the target node overlap."))},gM.findEdgeControlPoints=function(e){var t=this;if(!(!e||e.length===0)){for(var n=this,r=n.cy.hasCompoundNodes(),i=new TD,a=function(e,t){return[].concat(lT(e),[+!!t]).join(`-`)},o=[],s=[],l=0;l<e.length;l++){var u=e[l],d=u._private,f=u.pstyle(`curve-style`).value;if(!(u.removed()||!u.takesUpSpace())){if(f===`haystack`){s.push(u);continue}var p=f===`unbundled-bezier`||wE(f,`segments`)||f===`straight`||f===`straight-triangle`||wE(f,`taxi`),m=f===`unbundled-bezier`||f===`bezier`,h=d.source,g=d.target,_=[h.poolIndex(),g.poolIndex()].sort(),v=a(_,p),y=i.get(v);y??(y={eles:[]},o.push({pairId:_,edgeIsUnbundled:p}),i.set(v,y)),y.eles.push(u),p&&(y.hasUnbundled=!0),m&&(y.hasBezier=!0)}}for(var b=function(){var e=o[x],s=e.pairId,l=e.edgeIsUnbundled,u=a(s,l),d=i.get(u),f;if(!d.hasUnbundled){var p=d.eles[0].parallelEdges().filter(function(e){return e.isBundledBezier()});SD(d.eles),p.forEach(function(e){return d.eles.push(e)}),d.eles.sort(function(e,t){return e.poolIndex()-t.poolIndex()})}var m=d.eles[0],h=m.source(),g=m.target();if(h.poolIndex()>g.poolIndex()){var _=h;h=g,g=_}var v=d.srcPos=h.position(),y=d.tgtPos=g.position(),b=d.srcW=h.outerWidth(),S=d.srcH=h.outerHeight(),C=d.tgtW=g.outerWidth(),w=d.tgtH=g.outerHeight(),T=d.srcShape=n.nodeShapes[t.getNodeShape(h)],E=d.tgtShape=n.nodeShapes[t.getNodeShape(g)],D=d.srcCornerRadius=h.pstyle(`corner-radius`).value===`auto`?`auto`:h.pstyle(`corner-radius`).pfValue,O=d.tgtCornerRadius=g.pstyle(`corner-radius`).value===`auto`?`auto`:g.pstyle(`corner-radius`).pfValue,k=d.tgtRs=g._private.rscratch,A=d.srcRs=h._private.rscratch;d.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var j=0;j<d.eles.length;j++){var M=d.eles[j],N=M[0]._private.rscratch,P=M.pstyle(`curve-style`).value,F=P===`unbundled-bezier`||wE(P,`segments`)||wE(P,`taxi`),I=!h.same(M.source());if(!d.calculatedIntersection&&h!==g&&(d.hasBezier||d.hasUnbundled)){d.calculatedIntersection=!0;var L=T.intersectLine(v.x,v.y,b,S,y.x,y.y,0,D,A),R=d.srcIntn=L,ee=E.intersectLine(y.x,y.y,C,w,v.x,v.y,0,O,k),z=d.tgtIntn=ee,B=d.intersectionPts={x1:L[0],x2:ee[0],y1:L[1],y2:ee[1]},te=d.posPts={x1:v.x,x2:y.x,y1:v.y,y2:y.y},ne=ee[1]-L[1],re=ee[0]-L[0],ie=Math.sqrt(re*re+ne*ne);uE(ie)&&ie>=fUe||(ie=Math.sqrt(Math.max(re*re,hM)+Math.max(ne*ne,hM)));var ae=d.vector={x:re,y:ne},oe=d.vectorNorm={x:ae.x/ie,y:ae.y/ie},se={x:-oe.y,y:oe.x};d.nodesOverlap=!uE(ie)||E.checkPoint(L[0],L[1],0,C,w,y.x,y.y,O,k)||T.checkPoint(ee[0],ee[1],0,b,S,v.x,v.y,D,A),d.vectorNormInverse=se,f={nodesOverlap:d.nodesOverlap,dirCounts:d.dirCounts,calculatedIntersection:!0,hasBezier:d.hasBezier,hasUnbundled:d.hasUnbundled,eles:d.eles,srcPos:y,srcRs:k,tgtPos:v,tgtRs:A,srcW:C,srcH:w,tgtW:b,tgtH:S,srcIntn:z,tgtIntn:R,srcShape:E,tgtShape:T,posPts:{x1:te.x2,y1:te.y2,x2:te.x1,y2:te.y1},intersectionPts:{x1:B.x2,y1:B.y2,x2:B.x1,y2:B.y1},vector:{x:-ae.x,y:-ae.y},vectorNorm:{x:-oe.x,y:-oe.y},vectorNormInverse:{x:-se.x,y:-se.y}}}var ce=I?f:d;N.nodesOverlap=ce.nodesOverlap,N.srcIntn=ce.srcIntn,N.tgtIntn=ce.tgtIntn,N.isRound=P.startsWith(`round`),r&&(h.isParent()||h.isChild()||g.isParent()||g.isChild())&&(h.parents().anySame(g)||g.parents().anySame(h)||h.same(g)&&h.isParent())?t.findCompoundLoopPoints(M,ce,j,F):h===g?t.findLoopPoints(M,ce,j,F):P.endsWith(`segments`)?t.findSegmentsPoints(M,ce):P.endsWith(`taxi`)?t.findTaxiPoints(M,ce):P===`straight`||!F&&d.eles.length%2==1&&j===Math.floor(d.eles.length/2)?t.findStraightEdgePoints(M):t.findBezierPoints(M,ce,j,F,I),t.findEndpoints(M),t.tryToCorrectInvalidPoints(M,ce),t.checkForInvalidEdgeWarning(M),t.storeAllpts(M),t.storeEdgeProjections(M),t.calculateArrowAngles(M),t.recalculateEdgeLabelProjections(M),t.calculateLabelAngles(M)}},x=0;x<o.length;x++)b();this.findHaystackPoints(s)}},gM.getSegmentPoints=function(e){var t=e[0]._private.rscratch;if(this.recalculateRenderedStyle(e),t.edgeType===`segments`)return FLe(t.segpts)},gM.getControlPoints=function(e){var t=e[0]._private.rscratch;this.recalculateRenderedStyle(e);var n=t.edgeType;if(n===`bezier`||n===`multibezier`||n===`self`||n===`compound`)return FLe(t.ctrlpts)},gM.getEdgeMidpoint=function(e){var t=e[0]._private.rscratch;return this.recalculateRenderedStyle(e),{x:t.midX,y:t.midY}},_M={},_M.manualEndptToPx=function(e,t){var n=this,r=e.position(),i=e.outerWidth(),a=e.outerHeight(),o=e._private.rscratch;if(t.value.length===2){var s=[t.pfValue[0],t.pfValue[1]];return t.units[0]===`%`&&(s[0]*=i),t.units[1]===`%`&&(s[1]*=a),s[0]+=r.x,s[1]+=r.y,s}var l=t.pfValue[0];l=-Math.PI/2+l;var u=2*Math.max(i,a),d=[r.x+Math.cos(l)*u,r.y+Math.sin(l)*u];return n.nodeShapes[this.getNodeShape(e)].intersectLine(r.x,r.y,i,a,d[0],d[1],0,e.pstyle(`corner-radius`).value===`auto`?`auto`:e.pstyle(`corner-radius`).pfValue,o)},_M.findEndpoints=function(e){var t,n,r=this,i,a=e.source()[0],o=e.target()[0],s=a.position(),l=o.position(),u=e.pstyle(`target-arrow-shape`).value,d=e.pstyle(`source-arrow-shape`).value,f=e.pstyle(`target-distance-from-node`).pfValue,p=e.pstyle(`source-distance-from-node`).pfValue,m=a._private.rscratch,h=o._private.rscratch,g=e.pstyle(`curve-style`).value,_=e._private.rscratch,v=_.edgeType,y=wE(g,`taxi`),b=v===`self`||v===`compound`,x=v===`bezier`||v===`multibezier`||b,S=v!==`bezier`,C=v===`straight`||v===`segments`,w=v===`segments`,T=x||S||C,E=b||y,D=e.pstyle(`source-endpoint`),O=E?`outside-to-node`:D.value,k=a.pstyle(`corner-radius`).value===`auto`?`auto`:a.pstyle(`corner-radius`).pfValue,A=e.pstyle(`target-endpoint`),j=E?`outside-to-node`:A.value,M=o.pstyle(`corner-radius`).value===`auto`?`auto`:o.pstyle(`corner-radius`).pfValue;_.srcManEndpt=D,_.tgtManEndpt=A;var N,P,F,I,L=((A==null||(t=A.pfValue)==null?void 0:t.length)===2?A.pfValue:null)??[0,0],R=((D==null||(n=D.pfValue)==null?void 0:n.length)===2?D.pfValue:null)??[0,0];if(x){var ee=[_.ctrlpts[0],_.ctrlpts[1]];N=S?[_.ctrlpts[_.ctrlpts.length-2],_.ctrlpts[_.ctrlpts.length-1]]:ee,P=ee}else if(C){var z=w?_.segpts.slice(0,2):[l.x+L[0],l.y+L[1]];N=w?_.segpts.slice(_.segpts.length-2):[s.x+R[0],s.y+R[1]],P=z}if(j===`inside-to-node`)i=[l.x,l.y];else if(A.units)i=this.manualEndptToPx(o,A);else if(j===`outside-to-line`)i=_.tgtIntn;else if(j===`outside-to-node`||j===`outside-to-node-or-label`?F=N:(j===`outside-to-line`||j===`outside-to-line-or-label`)&&(F=[s.x,s.y]),i=r.nodeShapes[this.getNodeShape(o)].intersectLine(l.x,l.y,o.outerWidth(),o.outerHeight(),F[0],F[1],0,M,h),j===`outside-to-node-or-label`||j===`outside-to-line-or-label`){var B=o._private.rscratch,te=B.labelWidth,ne=B.labelHeight,re=B.labelX,ie=B.labelY,ae=te/2,oe=ne/2,se=o.pstyle(`text-valign`).value;se=OA(se),se===`top`?ie-=oe:se===`bottom`&&(ie+=oe);var ce=o.pstyle(`text-halign`).value;ce=DA(ce),ce===`left`?re-=ae:ce===`right`&&(re+=ae);var le=uO(F[0],F[1],[re-ae,ie-oe,re+ae,ie-oe,re+ae,ie+oe,re-ae,ie+oe],l.x,l.y);if(le.length>0){var ue=s,de=HD(ue,ID(i)),fe=HD(ue,ID(le)),pe=de;fe<de&&(i=le,pe=fe),le.length>2&&HD(ue,{x:le[2],y:le[3]})<pe&&(i=[le[2],le[3]])}}var me=dO(i,N,r.arrowShapes[u].spacing(e)+f),he=dO(i,N,r.arrowShapes[u].gap(e)+f);if(_.endX=he[0],_.endY=he[1],_.arrowEndX=me[0],_.arrowEndY=me[1],O===`inside-to-node`)i=[s.x,s.y];else if(D.units)i=this.manualEndptToPx(a,D);else if(O===`outside-to-line`)i=_.srcIntn;else if(O===`outside-to-node`||O===`outside-to-node-or-label`?I=P:(O===`outside-to-line`||O===`outside-to-line-or-label`)&&(I=[l.x,l.y]),i=r.nodeShapes[this.getNodeShape(a)].intersectLine(s.x,s.y,a.outerWidth(),a.outerHeight(),I[0],I[1],0,k,m),O===`outside-to-node-or-label`||O===`outside-to-line-or-label`){var ge=a._private.rscratch,_e=ge.labelWidth,ve=ge.labelHeight,ye=ge.labelX,be=ge.labelY,xe=_e/2,Se=ve/2,V=a.pstyle(`text-valign`).value;V=OA(V),V===`top`?be-=Se:V===`bottom`&&(be+=Se);var Ce=a.pstyle(`text-halign`).value;Ce=DA(Ce),Ce===`left`?ye-=xe:Ce===`right`&&(ye+=xe);var we=uO(I[0],I[1],[ye-xe,be-Se,ye+xe,be-Se,ye+xe,be+Se,ye-xe,be+Se],s.x,s.y);if(we.length>0){var Te=l,Ee=HD(Te,ID(i)),De=HD(Te,ID(we)),H=Ee;De<Ee&&(i=[we[0],we[1]],H=De),we.length>2&&HD(Te,{x:we[2],y:we[3]})<H&&(i=[we[2],we[3]])}}var Oe=dO(i,P,r.arrowShapes[d].spacing(e)+p),ke=dO(i,P,r.arrowShapes[d].gap(e)+p);_.startX=ke[0],_.startY=ke[1],_.arrowStartX=Oe[0],_.arrowStartY=Oe[1],T&&(_.badLine=!uE(_.startX)||!uE(_.startY)||!uE(_.endX)||!uE(_.endY))},_M.getSourceEndpoint=function(e){var t=e[0]._private.rscratch;switch(this.recalculateRenderedStyle(e),t.edgeType){case`haystack`:return{x:t.haystackPts[0],y:t.haystackPts[1]};default:return{x:t.arrowStartX,y:t.arrowStartY}}},_M.getTargetEndpoint=function(e){var t=e[0]._private.rscratch;switch(this.recalculateRenderedStyle(e),t.edgeType){case`haystack`:return{x:t.haystackPts[2],y:t.haystackPts[3]};default:return{x:t.arrowEndX,y:t.arrowEndY}}},vM={},vM.storeEdgeProjections=function(e){var t=e._private,n=t.rscratch,r=n.edgeType;if(t.rstyle.bezierPts=null,t.rstyle.linePts=null,t.rstyle.haystackPts=null,r===`multibezier`||r===`bezier`||r===`self`||r===`compound`){t.rstyle.bezierPts=[];for(var i=0;i+5<n.allpts.length;i+=4)ILe(this,e,n.allpts.slice(i,i+6))}else if(r===`segments`)for(var a=t.rstyle.linePts=[],i=0;i+1<n.allpts.length;i+=2)a.push({x:n.allpts[i],y:n.allpts[i+1]});else if(r===`haystack`){var o=n.haystackPts;t.rstyle.haystackPts=[{x:o[0],y:o[1]},{x:o[2],y:o[3]}]}t.rstyle.arrowWidth=this.getArrowWidth(e.pstyle(`width`).pfValue,e.pstyle(`arrow-scale`).value)*this.arrowShapeWidth},vM.recalculateEdgeProjections=function(e){this.findEdgeControlPoints(e)},yM={},yM.recalculateNodeLabelProjection=function(e){var t=e.pstyle(`label`).strValue;if(!vE(t)){var n,r,i=e._private,a=e.width(),o=e.height(),s=e.padding(),l=e.position(),u=e.pstyle(`text-halign`).strValue,d=e.pstyle(`text-valign`).strValue,f=i.rscratch,p=i.rstyle;switch(u){case`left`:n=l.x-a/2-s;break;case`left-inside`:n=l.x-a/2+s;break;case`right`:n=l.x+a/2+s;break;case`right-inside`:n=l.x+a/2-s;break;default:n=l.x}switch(d){case`top`:r=l.y-o/2-s;break;case`top-inside`:r=l.y-o/2+s;break;case`bottom`:r=l.y+o/2+s;break;case`bottom-inside`:r=l.y+o/2-s;break;default:r=l.y}f.labelX=n,f.labelY=r,p.labelX=n,p.labelY=r,this.calculateLabelAngles(e),this.applyLabelDimensions(e)}},bM=function(e,t){var n=Math.atan(t/e);return e===0&&n<0&&(n*=-1),n},xM=function(e,t){return bM(t.x-e.x,t.y-e.y)},pUe=function(e,t,n,r){var i=GD(0,r-.001,1),a=GD(0,r+.001,1);return xM(WD(e,t,n,i),WD(e,t,n,a))},yM.recalculateEdgeLabelProjections=function(e){var t,n=e._private,r=n.rscratch,i=this,a={mid:e.pstyle(`label`).strValue,source:e.pstyle(`source-label`).strValue,target:e.pstyle(`target-label`).strValue};if(a.mid||a.source||a.target){t={x:r.midX,y:r.midY};var o=function(e,t,r){wD(n.rscratch,e,t,r),wD(n.rstyle,e,t,r)};o(`labelX`,null,t.x),o(`labelY`,null,t.y),o(`labelAutoAngle`,null,bM(r.midDispX,r.midDispY));var s=function(){if(s.cache)return s.cache;for(var e=[],t=0;t+5<r.allpts.length;t+=4){var a={x:r.allpts[t],y:r.allpts[t+1]},o={x:r.allpts[t+2],y:r.allpts[t+3]},l={x:r.allpts[t+4],y:r.allpts[t+5]};e.push({p0:a,p1:o,p2:l,startDist:0,length:0,segments:[]})}var u=n.rstyle.bezierPts,d=i.bezierProjPcts.length;function f(e,t,n,r,i){var a=VD(t,n),o=e.segments[e.segments.length-1],s={p0:t,p1:n,t0:r,t1:i,startDist:o?o.startDist+o.length:0,length:a};e.segments.push(s),e.length+=a}for(var p=0;p<e.length;p++){var m=e[p],h=e[p-1];h&&(m.startDist=h.startDist+h.length),f(m,m.p0,u[p*d],0,i.bezierProjPcts[0]);for(var g=0;g<d-1;g++)f(m,u[p*d+g],u[p*d+g+1],i.bezierProjPcts[g],i.bezierProjPcts[g+1]);f(m,u[p*d+d-1],m.p2,i.bezierProjPcts[d-1],1)}return s.cache=e},l=function(n){var i,l=n===`source`;if(a[n]){var u=e.pstyle(n+`-text-offset`).pfValue;switch(r.edgeType){case`self`:case`compound`:case`bezier`:case`multibezier`:for(var d=s(),f,p=0,m=0,h=0;h<d.length;h++){for(var g=d[l?h:d.length-1-h],_=0;_<g.segments.length;_++){var v=g.segments[l?_:g.segments.length-1-_],y=h===d.length-1&&_===g.segments.length-1;if(p=m,m+=v.length,m>=u||y){f={cp:g,segment:v};break}}if(f)break}var b=f.cp,x=f.segment,S=(u-p)/x.length,C=x.t1-x.t0,w=l?x.t0+C*S:x.t1-C*S;w=GD(0,w,1),t=WD(b.p0,b.p1,b.p2,w),i=pUe(b.p0,b.p1,b.p2,w);break;case`straight`:case`segments`:case`haystack`:for(var T=0,E,D,O,k,A=r.allpts.length,j=0;j+3<A&&(l?(O={x:r.allpts[j],y:r.allpts[j+1]},k={x:r.allpts[j+2],y:r.allpts[j+3]}):(O={x:r.allpts[A-2-j],y:r.allpts[A-1-j]},k={x:r.allpts[A-4-j],y:r.allpts[A-3-j]}),E=VD(O,k),D=T,T+=E,!(T>=u));j+=2);var M=(u-D)/E;M=GD(0,M,1),t=Bze(O,k,M),i=xM(O,k)}o(`labelX`,n,t.x),o(`labelY`,n,t.y),o(`labelAutoAngle`,n,i)}};l(`source`),l(`target`),this.applyLabelDimensions(e)}},yM.applyLabelDimensions=function(e){this.applyPrefixedLabelDimensions(e),e.isEdge()&&(this.applyPrefixedLabelDimensions(e,`source`),this.applyPrefixedLabelDimensions(e,`target`))},yM.applyPrefixedLabelDimensions=function(e,t){var n=e._private,r=this.getLabelText(e,t),i=oD(r,e._private.labelDimsKey);if(CD(n.rscratch,`prefixedLabelDimsKey`,t)!==i){wD(n.rscratch,`prefixedLabelDimsKey`,t,i);var a=this.calculateLabelDimensions(e,r),o=e.pstyle(`line-height`).pfValue,s=e.pstyle(`font-size`).pfValue,l=e.pstyle(`text-wrap`).strValue,u=CD(n.rscratch,`labelWrapCachedLines`,t)||[],d=l===`wrap`?Math.max(u.length,1):1,f=s*o,p=a.width,m=a.height+(d-1)*(o-1)*s;wD(n.rstyle,`labelWidth`,t,p),wD(n.rscratch,`labelWidth`,t,p),wD(n.rstyle,`labelHeight`,t,m),wD(n.rscratch,`labelHeight`,t,m),wD(n.rscratch,`labelLineHeight`,t,f),wD(n.rscratch,`labelActualDescent`,t,a.labelActualDescent)}},yM.getLabelText=function(e,t){var n=e._private,r=t?t+`-`:``,i=e.pstyle(r+`label`).strValue,a=e.pstyle(`text-transform`).value,o=function(e,r){return r?(wD(n.rscratch,e,t,r),r):CD(n.rscratch,e,t)};if(!i)return``;a==`none`||(a==`uppercase`?i=i.toUpperCase():a==`lowercase`&&(i=i.toLowerCase()));var s=e.pstyle(`text-wrap`).value;if(s===`wrap`){var l=o(`labelKey`);if(l!=null&&o(`labelWrapKey`)===l)return o(`labelWrapCachedText`);for(var u=`​`,d=i.split(`565-`),f=e.pstyle(`text-max-width`).pfValue,p=e.pstyle(`text-overflow-wrap`).value===`anywhere`,m=[],h=/[\s\u200b]+|$/g,g=0;g<d.length;g++){var _=d[g],v=this.calculateLabelDimensions(e,_).width;if(p&&(_=_.split(``).join(u)),v>f){var y=_.matchAll(h),b=``,x=0,S=sT(y),C;try{for(S.s();!(C=S.n()).done;){var w=C.value,T=w[0],E=_.substring(x,w.index);x=w.index+T.length;var D=b.length===0?E:b+E+T;this.calculateLabelDimensions(e,D).width<=f?b+=E+T:(b&&m.push(b),b=E+T)}}catch(e){S.e(e)}finally{S.f()}b.match(/^[\s\u200b]+$/)||m.push(b)}else m.push(_)}o(`labelWrapCachedLines`,m),i=o(`labelWrapCachedText`,m.join(`566-`)),o(`labelWrapKey`,l)}else if(s===`ellipsis`){var O=e.pstyle(`text-max-width`).pfValue,k=``,A=`…`,j=!1;if(this.calculateLabelDimensions(e,i).width<O)return i;for(var M=0;M<i.length&&!(this.calculateLabelDimensions(e,k+i[M]+A).width>O);M++)k+=i[M],M===i.length-1&&(j=!0);return j||(k+=A),k}return i},yM.getLabelJustification=function(e){var t=e.pstyle(`text-justification`).strValue,n=e.pstyle(`text-halign`).strValue;return t===`auto`?e.isNode()?lHe(n):`center`:t},yM.calculateLabelDimensions=function(e,t){var n=this.cy.window().document,r=0,i=e.pstyle(`font-style`).strValue,a=e.pstyle(`font-size`).pfValue,o=e.pstyle(`font-family`).strValue,s=e.pstyle(`font-weight`).strValue,l=e.pstyle(`text-metrics`).strValue||`font`,u=this.labelCalcCanvas,d=this.labelCalcCanvasContext;if(!u){u=this.labelCalcCanvas=n.createElement(`canvas`),d=this.labelCalcCanvasContext=u.getContext(`2d`);var f=u.style;f.position=`absolute`,f.left=`-9999px`,f.top=`-9999px`,f.zIndex=`-1`,f.visibility=`hidden`,f.pointerEvents=`none`}d.font=`${i} ${s} ${a}px ${o}`;for(var p=0,m=0,h=t.split(`567-`),g=h.length,_=0,v=0,y=0;y<g;y++){var b=h[y],x=d.measureText(b),S=Math.ceil(x.width),C=a;l===`glyph`&&(y===0&&(v=x.actualBoundingBoxAscent),y===g-1&&(_=x.actualBoundingBoxDescent)),p=Math.max(S,p),m+=C}return l===`glyph`&&(m-=a-v-_),p+=r,m+=r,{width:p,height:m,labelActualAscent:v,labelActualDescent:_}},yM.calculateLabelAngle=function(e,t){var n=e._private.rscratch,r=e.isEdge(),i=t?t+`-`:``,a=e.pstyle(i+`text-rotation`),o=a.strValue;return o===`none`?0:r&&o===`autorotate`?n.labelAutoAngle:o===`autorotate`?0:a.pfValue},yM.calculateLabelAngles=function(e){var t=this,n=e.isEdge(),r=e._private.rscratch;r.labelAngle=t.calculateLabelAngle(e),n&&(r.sourceLabelAngle=t.calculateLabelAngle(e,`source`),r.targetLabelAngle=t.calculateLabelAngle(e,`target`))},SM={},CM=28,mUe=!1,SM.getNodeShape=function(e){var t=this,n=e.pstyle(`shape`).value;if(n===`cutrectangle`&&(e.width()<CM||e.height()<CM))return mUe||=(gD("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),!0),`rectangle`;if(e.isParent())return n===`rectangle`||n===`roundrectangle`||n===`round-rectangle`||n===`cutrectangle`||n===`cut-rectangle`||n===`barrel`?n:`rectangle`;if(n===`polygon`){var r=e.pstyle(`shape-polygon-points`).value;return t.nodeShapes.makePolygon(r).name}return n},wM={},wM.registerCalculationListeners=function(){var e=this.cy,t=e.collection(),n=this,r=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(t.merge(e),n)for(var r=0;r<e.length;r++){var i=e[r]._private.rstyle;i.clean=!1,i.cleanConnected=!1}};n.binder(e).on(`bounds.* dirty.*`,function(e){var t=e.target;r(t)}).on(`style.* background.*`,function(e){var t=e.target;r(t,!1)});var i=function(i){if(i){var a=n.onUpdateEleCalcsFns;t.cleanStyle();for(var o=0;o<t.length;o++){var s=t[o],l=s._private.rstyle;s.isNode()&&!l.cleanConnected&&(r(s.connectedEdges()),l.cleanConnected=!0)}if(a)for(var u=0;u<a.length;u++){var d=a[u];d(i,t)}n.recalculateRenderedStyle(t),t=e.collection()}};n.flushRenderedStyleQueue=function(){i(!0)},n.beforeRender(i,n.beforeRenderPriorities.eleCalcs)},wM.onUpdateEleCalcs=function(e){(this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[]).push(e)},wM.recalculateRenderedStyle=function(e,t){var n=function(e){return e._private.rstyle.cleanConnected};if(e.length!==0){var r=[],i=[];if(!this.destroyed){t===void 0&&(t=!0);for(var a=0;a<e.length;a++){var o=e[a],s=o._private,l=s.rstyle;o.isEdge()&&(!n(o.source())||!n(o.target()))&&(l.clean=!1),o.isEdge()&&o.isBundledBezier()&&o.parallelEdges().some(function(e){return!e._private.rstyle.clean&&e.isBundledBezier()})&&(l.clean=!1),!(t&&l.clean||o.removed())&&o.pstyle(`display`).value!==`none`&&(s.group===`nodes`?i.push(o):r.push(o),l.clean=!0)}for(var u=0;u<i.length;u++){var d=i[u],f=d._private.rstyle,p=d.position();this.recalculateNodeLabelProjection(d),f.nodeX=p.x,f.nodeY=p.y,f.nodeW=d.pstyle(`width`).pfValue,f.nodeH=d.pstyle(`height`).pfValue}this.recalculateEdgeProjections(r);for(var m=0;m<r.length;m++){var h=r[m]._private,g=h.rstyle,_=h.rscratch;g.srcX=_.arrowStartX,g.srcY=_.arrowStartY,g.tgtX=_.arrowEndX,g.tgtY=_.arrowEndY,g.midX=_.midX,g.midY=_.midY,g.labelAngle=_.labelAngle,g.sourceLabelAngle=_.sourceLabelAngle,g.targetLabelAngle=_.targetLabelAngle}}}},TM={},TM.updateCachedGrabbedEles=function(){var e=this.cachedZSortedEles;if(e){e.drag=[],e.nondrag=[];for(var t=[],n=0;n<e.length;n++){var r=e[n],i=r._private.rscratch;r.grabbed()&&!r.isParent()?t.push(r):i.inDragLayer?e.drag.push(r):e.nondrag.push(r)}for(var n=0;n<t.length;n++){var r=t[n];e.drag.push(r)}}},TM.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},TM.getCachedZSortedEles=function(e){if(e||!this.cachedZSortedEles){var t=this.cy.mutableElements().toArray();t.sort(oj),t.interactive=t.filter(function(e){return e.interactive()}),this.cachedZSortedEles=t,this.updateCachedGrabbedEles()}else t=this.cachedZSortedEles;return t},EM={},[Qj,$j,gM,_M,vM,yM,SM,wM,TM].forEach(function(e){DE(EM,e)}),DM={},DM.getCachedImage=function(e,t,n){var r=this,i=r.imageCache=r.imageCache||{},a=i[e];if(a)return a.image.complete||a.image.addEventListener(`load`,n),a.image;a=i[e]=i[e]||{};var o=a.image=new Image;o.addEventListener(`load`,n),o.addEventListener(`error`,function(){o.error=!0});var s=`data:`;return e.substring(0,s.length).toLowerCase()!==s&&(t=t===`null`?null:t,o.crossOrigin=t),o.src=e,o},OM=function(e,t){var n=e[0];!n||n._private.grabbed===t||(n._private.grabbed=t,e.updateStyle(!1))},hUe=function(e){OM(e,!0)},gUe=function(e){OM(e,!1)},kM={},kM.registerBinding=function(e,t,n,r){var i=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(e)){for(var a=[],o=0;o<e.length;o++){var s=e[o];if(s!==void 0){var l=this.binder(s);a.push(l.on.apply(l,i))}}return a}var l=this.binder(e);return l.on.apply(l,i)},kM.binder=function(e){var t=this,n=t.cy.window(),r=e===n||e===n.document||e===n.document.body||kRe(e);if(t.supportsPassiveEvents==null){var i=!1;try{var a=Object.defineProperty({},"passive",{get:function(){return i=!0,!0}});n.addEventListener(`test`,null,a)}catch{}t.supportsPassiveEvents=i}var o=function(n,i,a){var o=Array.prototype.slice.call(arguments);return r&&t.supportsPassiveEvents&&(o[2]={capture:a??!1,passive:!1,once:!1}),t.bindings.push({target:e,args:o}),(e.addEventListener||e.on).apply(e,o),this};return{on:o,addEventListener:o,addListener:o,bind:o}},kM.nodeIsDraggable=function(e){return e&&e.isNode()&&!e.locked()&&e.grabbable()},kM.nodeIsGrabbable=function(e){return this.nodeIsDraggable(e)&&e.interactive()},kM.load=function(){var e=this,t=e.cy.window(),n=function(e){return e.selected()},r=function(e){var t=e.getRootNode();if(t&&t.nodeType===11&&t.host!==void 0)return t},i=function(t,n,r,i){t??=e.cy;for(var a=0;a<n.length;a++){var o=n[a];t.emit({originalEvent:r,type:o,position:i})}},a=function(e){return e.shiftKey||e.metaKey||e.ctrlKey},o=function(t,n){var r=!0;if(e.cy.hasCompoundNodes()&&t&&t.pannable())for(var i=0;n&&i<n.length;i++){var t=n[i];if(t.isNode()&&t.isParent()&&!t.pannable()){r=!1;break}}else r=!0;return r},s=function(e){e[0]._private.rscratch.inDragLayer=!0},l=function(e){e[0]._private.rscratch.inDragLayer=!1},u=function(e){e[0]._private.rscratch.isGrabTarget=!0},d=function(e){e[0]._private.rscratch.isGrabTarget=!1},f=function(e,t){var n=t.addToList;!n.has(e)&&e.grabbable()&&!e.locked()&&(n.merge(e),hUe(e))},p=function(e,t){if(e.cy().hasCompoundNodes()&&(t.inDragLayer!=null||t.addToList!=null)){var n=e.descendants();t.inDragLayer&&(n.forEach(s),n.connectedEdges().forEach(s)),t.addToList&&f(n,t)}},m=function(t,n){n||={};var r=t.cy().hasCompoundNodes();n.inDragLayer&&(t.forEach(s),t.neighborhood().stdFilter(function(e){return!r||e.isEdge()}).forEach(s)),n.addToList&&t.forEach(function(e){f(e,n)}),p(t,n),_(t,{inDragLayer:n.inDragLayer}),e.updateCachedGrabbedEles()},h=m,g=function(t){t&&(e.getCachedZSortedEles().forEach(function(e){gUe(e),l(e),d(e)}),e.updateCachedGrabbedEles())},_=function(e,t){if((t.inDragLayer!=null||t.addToList!=null)&&e.cy().hasCompoundNodes()){var n=e.ancestors().orphans();if(!n.same(e)){var r=n.descendants().spawnSelf().merge(n).unmerge(e).unmerge(e.descendants()),i=r.connectedEdges();t.inDragLayer&&(i.forEach(s),r.forEach(s)),t.addToList&&r.forEach(function(e){f(e,t)})}}},v=function(){document.activeElement!=null&&document.activeElement.blur!=null&&document.activeElement.blur()},y=typeof MutationObserver<`u`,b=typeof ResizeObserver<`u`;y?(e.removeObserver=new MutationObserver(function(t){for(var n=0;n<t.length;n++){var r=t[n].removedNodes;if(r){for(var i=0;i<r.length;i++)if(r[i]===e.container){e.destroy();break}}}}),e.container.parentNode&&e.removeObserver.observe(e.container.parentNode,{childList:!0})):e.registerBinding(e.container,`DOMNodeRemoved`,function(t){e.destroy()});var x=KE(function(){e.cy.resize()},100);y&&(e.styleObserver=new MutationObserver(x),e.styleObserver.observe(e.container,{attributes:!0})),e.registerBinding(t,`resize`,x),b&&(e.resizeObserver=new ResizeObserver(x),e.resizeObserver.observe(e.container));var S=function(e,t){for(;e!=null;)t(e),e=e.parentNode},C=function(){e.invalidateContainerClientCoordsCache()};S(e.container,function(t){e.registerBinding(t,`transitionend`,C),e.registerBinding(t,`animationend`,C),e.registerBinding(t,`scroll`,C)}),e.registerBinding(e.container,`contextmenu`,function(e){e.preventDefault()});var w=function(){return e.selection[4]!==0},T=function(t){for(var n=e.findContainerClientCoords(),r=n[0],i=n[1],a=n[2],o=n[3],s=t.touches?t.touches:[t],l=!1,u=0;u<s.length;u++){var d=s[u];if(r<=d.clientX&&d.clientX<=r+a&&i<=d.clientY&&d.clientY<=i+o){l=!0;break}}if(!l)return!1;for(var f=e.container,p=t.target.parentNode,m=!1;p;){if(p===f){m=!0;break}p=p.parentNode}return!!m};e.registerBinding(e.container,`mousedown`,function(t){if(T(t)&&(e.hoverData.which!==1||t.which===1)){t.preventDefault(),v(),e.hoverData.capture=!0,e.hoverData.which=t.which;var n=e.cy,r=[t.clientX,t.clientY],a=e.projectIntoViewport(r[0],r[1]),o=e.selection,s=e.findNearestElements(a[0],a[1],!0,!1),l=s[0],d=e.dragData.possibleDragElements;e.hoverData.mdownPos=a,e.hoverData.mdownGPos=r;var f=function(e){return{originalEvent:t,type:e,position:{x:a[0],y:a[1]}}},p=function(){e.hoverData.tapholdCancelled=!1,clearTimeout(e.hoverData.tapholdTimeout),e.hoverData.tapholdTimeout=setTimeout(function(){if(!e.hoverData.tapholdCancelled){var t=e.hoverData.down;t?t.emit(f(`taphold`)):n.emit(f(`taphold`))}},e.tapholdDuration)};if(t.which==3){e.hoverData.cxtStarted=!0;var g={originalEvent:t,type:`cxttapstart`,position:{x:a[0],y:a[1]}};l?(l.activate(),l.emit(g),e.hoverData.down=l):n.emit(g),e.hoverData.downTime=new Date().getTime(),e.hoverData.cxtDragged=!1}else if(t.which==1){if(l&&l.activate(),l!=null&&e.nodeIsGrabbable(l)){var _=function(e){e.emit(f(`grab`))};if(u(l),!l.selected())d=e.dragData.possibleDragElements=n.collection(),h(l,{addToList:d}),l.emit(f(`grabon`)).emit(f(`grab`));else{d=e.dragData.possibleDragElements=n.collection();var y=n.$(function(t){return t.isNode()&&t.selected()&&e.nodeIsGrabbable(t)});m(y,{addToList:d}),l.emit(f(`grabon`)),y.forEach(_)}e.redrawHint(`eles`,!0),e.redrawHint(`drag`,!0)}e.hoverData.down=l,e.hoverData.downs=s,e.hoverData.downTime=new Date().getTime(),i(l,[`mousedown`,`tapstart`,`vmousedown`],t,{x:a[0],y:a[1]}),l==null?(o[4]=1,e.data.bgActivePosistion={x:a[0],y:a[1]},e.redrawHint(`select`,!0),e.redraw()):l.pannable()&&(o[4]=1),p()}o[0]=o[2]=a[0],o[1]=o[3]=a[1]}},!1);var E=r(e.container);e.registerBinding([t,E],`mousemove`,function(t){if(!(!e.hoverData.capture&&!T(t))){var n=!1,r=e.cy,s=r.zoom(),l=[t.clientX,t.clientY],u=e.projectIntoViewport(l[0],l[1]),d=e.hoverData.mdownPos,f=e.hoverData.mdownGPos,p=e.selection,h=null;!e.hoverData.draggingEles&&!e.hoverData.dragging&&!e.hoverData.selecting&&(h=e.findNearestElement(u[0],u[1],!0,!1));var _=e.hoverData.last,v=e.hoverData.down,y=[u[0]-p[2],u[1]-p[3]],b=e.dragData.possibleDragElements,x;if(f){var S=l[0]-f[0],C=S*S,w=l[1]-f[1],E=C+w*w;e.hoverData.isOverThresholdDrag=x=E>=e.desktopTapThreshold2}var D=a(t);x&&(e.hoverData.tapholdCancelled=!0);var O=function(){var t=e.hoverData.dragDelta=e.hoverData.dragDelta||[];t.length===0?(t.push(y[0]),t.push(y[1])):(t[0]+=y[0],t[1]+=y[1])};n=!0,i(h,[`mousemove`,`vmousemove`,`tapdrag`],t,{x:u[0],y:u[1]});var k=function(e){return{originalEvent:t,type:e,position:{x:u[0],y:u[1]}}},A=function(){e.data.bgActivePosistion=void 0,e.hoverData.selecting||r.emit(k(`boxstart`)),p[4]=1,e.hoverData.selecting=!0,e.redrawHint(`select`,!0),e.redraw()};if(e.hoverData.which===3){if(x){var j=k(`cxtdrag`);v?v.emit(j):r.emit(j),e.hoverData.cxtDragged=!0,(!e.hoverData.cxtOver||h!==e.hoverData.cxtOver)&&(e.hoverData.cxtOver&&e.hoverData.cxtOver.emit(k(`cxtdragout`)),e.hoverData.cxtOver=h,h&&h.emit(k(`cxtdragover`)))}}else if(e.hoverData.dragging){if(n=!0,r.panningEnabled()&&r.userPanningEnabled()){var M;if(e.hoverData.justStartedPan){var N=e.hoverData.mdownPos;M={x:(u[0]-N[0])*s,y:(u[1]-N[1])*s},e.hoverData.justStartedPan=!1}else M={x:y[0]*s,y:y[1]*s};r.panBy(M),r.emit(k(`dragpan`)),e.hoverData.dragged=!0}u=e.projectIntoViewport(t.clientX,t.clientY)}else if(p[4]==1&&(v==null||v.pannable()))x&&(!e.hoverData.dragging&&r.boxSelectionEnabled()&&(D||!r.panningEnabled()||!r.userPanningEnabled())?A():!e.hoverData.selecting&&r.panningEnabled()&&r.userPanningEnabled()&&o(v,e.hoverData.downs)&&(e.hoverData.dragging=!0,e.hoverData.justStartedPan=!0,p[4]=0,e.data.bgActivePosistion=ID(d),e.redrawHint(`select`,!0),e.redraw()),v&&v.pannable()&&v.active()&&v.unactivate());else{if(v&&v.pannable()&&v.active()&&v.unactivate(),(!v||!v.grabbed())&&h!=_&&(_&&i(_,[`mouseout`,`tapdragout`],t,{x:u[0],y:u[1]}),h&&i(h,[`mouseover`,`tapdragover`],t,{x:u[0],y:u[1]}),e.hoverData.last=h),v){if(x){if(r.boxSelectionEnabled()&&D)v&&v.grabbed()&&(g(b),v.emit(k(`freeon`)),b.emit(k(`free`)),e.dragData.didDrag&&(v.emit(k(`dragfreeon`)),b.emit(k(`dragfree`)))),A();else if(v&&v.grabbed()&&e.nodeIsDraggable(v)){var P=!e.dragData.didDrag;P&&e.redrawHint(`eles`,!0),e.dragData.didDrag=!0,e.hoverData.draggingEles||m(b,{inDragLayer:!0});var F={x:0,y:0};if(uE(y[0])&&uE(y[1])&&(F.x+=y[0],F.y+=y[1],P)){var I=e.hoverData.dragDelta;I&&uE(I[0])&&uE(I[1])&&(F.x+=I[0],F.y+=I[1])}e.hoverData.draggingEles=!0,b.silentShift(F).emit(k(`position`)).emit(k(`drag`)),e.redrawHint(`drag`,!0),e.redraw()}}else O()}n=!0}if(p[2]=u[0],p[3]=u[1],n)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},!1);var D,O,k;e.registerBinding(t,`mouseup`,function(t){if(!(e.hoverData.which===1&&t.which!==1&&e.hoverData.capture)&&e.hoverData.capture){e.hoverData.capture=!1;var r=e.cy,o=e.projectIntoViewport(t.clientX,t.clientY),s=e.selection,l=e.findNearestElement(o[0],o[1],!0,!1),u=e.dragData.possibleDragElements,d=e.hoverData.down,f=a(t);e.data.bgActivePosistion&&(e.redrawHint(`select`,!0),e.redraw()),e.hoverData.tapholdCancelled=!0,e.data.bgActivePosistion=void 0,d&&d.unactivate();var p=function(e){return{originalEvent:t,type:e,position:{x:o[0],y:o[1]}}};if(e.hoverData.which===3){var m=p(`cxttapend`);if(d?d.emit(m):r.emit(m),!e.hoverData.cxtDragged){var h=p(`cxttap`);d?d.emit(h):r.emit(h)}e.hoverData.cxtDragged=!1,e.hoverData.which=null}else if(e.hoverData.which===1){if(i(l,[`mouseup`,`tapend`,`vmouseup`],t,{x:o[0],y:o[1]}),!e.dragData.didDrag&&!e.hoverData.dragged&&!e.hoverData.selecting&&!e.hoverData.isOverThresholdDrag&&(i(d,[`click`,`tap`,`vclick`],t,{x:o[0],y:o[1]}),O=!1,t.timeStamp-k<=r.multiClickDebounceTime()?(D&&clearTimeout(D),O=!0,k=null,i(d,[`dblclick`,`dbltap`,`vdblclick`],t,{x:o[0],y:o[1]})):(D=setTimeout(function(){O||i(d,[`oneclick`,`onetap`,`voneclick`],t,{x:o[0],y:o[1]})},r.multiClickDebounceTime()),k=t.timeStamp)),d==null&&!e.dragData.didDrag&&!e.hoverData.selecting&&!e.hoverData.dragged&&!a(t)&&(r.$(n).unselect([`tapunselect`]),u.length>0&&e.redrawHint(`eles`,!0),e.dragData.possibleDragElements=u=r.collection()),l==d&&!e.dragData.didDrag&&!e.hoverData.selecting&&l!=null&&l._private.selectable&&(e.hoverData.dragging||(r.selectionType()===`additive`||f?l.selected()?l.unselect([`tapunselect`]):l.select([`tapselect`]):f||(r.$(n).unmerge(l).unselect([`tapunselect`]),l.select([`tapselect`]))),e.redrawHint(`eles`,!0)),e.hoverData.selecting){var _=r.collection(e.getAllInBox(s[0],s[1],s[2],s[3]));e.redrawHint(`select`,!0),_.length>0&&e.redrawHint(`eles`,!0),r.emit(p(`boxend`)),r.selectionType()===`additive`||f||r.$(n).unmerge(_).unselect(),_.emit(p(`box`)).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(p(`boxselect`)),e.redraw()}if(e.hoverData.dragging&&(e.hoverData.dragging=!1,e.redrawHint(`select`,!0),e.redrawHint(`eles`,!0),e.redraw()),!s[4]){e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0);var v=d&&d.grabbed();g(u),v&&(d.emit(p(`freeon`)),u.emit(p(`free`)),e.dragData.didDrag&&(d.emit(p(`dragfreeon`)),u.emit(p(`dragfree`))))}}s[4]=0,e.hoverData.down=null,e.hoverData.cxtStarted=!1,e.hoverData.draggingEles=!1,e.hoverData.selecting=!1,e.hoverData.isOverThresholdDrag=!1,e.dragData.didDrag=!1,e.hoverData.dragged=!1,e.hoverData.dragDelta=[],e.hoverData.mdownPos=null,e.hoverData.mdownGPos=null,e.hoverData.which=null}},!1);var A=[],j=4,M,N=1e5,P=function(e){for(var t=Math.abs(e[0]),n=1;n<e.length;n++)if(Math.abs(e[n])!==t)return!1;return!0},F=function(t){var n=!1,r=t.deltaY;if(r??(t.wheelDeltaY==null?t.wheelDelta!=null&&(r=t.wheelDelta/4):r=t.wheelDeltaY/4),r!==0){if(M==null){if(A.length>=j){M=!1;var i=A;if(i[0]>=5){var a=P(i)?i[0]:Lze(i);a>1&&(M=!0,N=a)}}else A.push(Math.abs(r)),n=!0}else M&&(N=Math.min(Math.abs(r),N));if(!e.scrollingPage){var o=e.cy,s=o.zoom(),l=o.pan(),u=e.projectIntoViewport(t.clientX,t.clientY),d=[u[0]*s+l.x,u[1]*s+l.y];if(e.hoverData.draggingEles||e.hoverData.dragging||e.hoverData.cxtStarted||w()){t.preventDefault();return}if(o.panningEnabled()&&o.userPanningEnabled()&&o.zoomingEnabled()&&o.userZoomingEnabled()){t.preventDefault(),e.data.wheelZooming=!0,clearTimeout(e.data.wheelTimeout),e.data.wheelTimeout=setTimeout(function(){e.data.wheelZooming=!1,e.redrawHint(`eles`,!0),e.redraw()},150);var f;n&&Math.abs(r)>5&&(r=BD(r)*5),f=r/-250,M&&(f/=N,f*=3),f*=e.wheelSensitivity,t.deltaMode===1&&(f*=33);var p=o.zoom()*10**f;t.type===`gesturechange`&&(p=e.gestureStartZoom*t.scale),o.zoom({level:p,renderedPosition:{x:d[0],y:d[1]}}),o.emit({type:t.type===`gesturechange`?`pinchzoom`:`scrollzoom`,originalEvent:t,position:{x:u[0],y:u[1]}})}}}};e.registerBinding(e.container,`wheel`,F,!0),e.registerBinding(t,`scroll`,function(t){e.scrollingPage=!0,clearTimeout(e.scrollingPageTimeout),e.scrollingPageTimeout=setTimeout(function(){e.scrollingPage=!1},250)},!0),e.registerBinding(e.container,`gesturestart`,function(t){e.gestureStartZoom=e.cy.zoom(),e.hasTouchStarted||t.preventDefault()},!0),e.registerBinding(e.container,`gesturechange`,function(t){e.hasTouchStarted||F(t)},!0),e.registerBinding(e.container,`mouseout`,function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:`mouseout`,position:{x:n[0],y:n[1]}})},!1),e.registerBinding(e.container,`mouseover`,function(t){var n=e.projectIntoViewport(t.clientX,t.clientY);e.cy.emit({originalEvent:t,type:`mouseover`,position:{x:n[0],y:n[1]}})},!1);var I,L,R,ee,z,B,te,ne,re,ie,ae,oe,se,ce=function(e,t,n,r){return Math.sqrt((n-e)*(n-e)+(r-t)*(r-t))},le=function(e,t,n,r){return(n-e)*(n-e)+(r-t)*(r-t)},ue;e.registerBinding(e.container,`touchstart`,ue=function(t){if(e.hasTouchStarted=!0,T(t)){v(),e.touchData.capture=!0,e.data.bgActivePosistion=void 0;var n=e.cy,r=e.touchData.now,a=e.touchData.earlier;if(t.touches[0]){var o=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);r[0]=o[0],r[1]=o[1]}if(t.touches[1]){var o=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);r[2]=o[0],r[3]=o[1]}if(t.touches[2]){var o=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);r[4]=o[0],r[5]=o[1]}var s=function(e){return{originalEvent:t,type:e,position:{x:r[0],y:r[1]}}};if(t.touches[1]){e.touchData.singleTouchMoved=!0,g(e.dragData.touchDragEles);var l=e.findContainerClientCoords();re=l[0],ie=l[1],ae=l[2],oe=l[3],I=t.touches[0].clientX-re,L=t.touches[0].clientY-ie,R=t.touches[1].clientX-re,ee=t.touches[1].clientY-ie,se=0<=I&&I<=ae&&0<=R&&R<=ae&&0<=L&&L<=oe&&0<=ee&&ee<=oe;var d=n.pan(),f=n.zoom();z=ce(I,L,R,ee),B=le(I,L,R,ee),te=[(I+R)/2,(L+ee)/2],ne=[(te[0]-d.x)/f,(te[1]-d.y)/f];var p=200,_=p*p;if(B<_&&!t.touches[2]){var y=e.findNearestElement(r[0],r[1],!0,!0),b=e.findNearestElement(r[2],r[3],!0,!0);y&&y.isNode()?(y.activate().emit(s(`cxttapstart`)),e.touchData.start=y):b&&b.isNode()?(b.activate().emit(s(`cxttapstart`)),e.touchData.start=b):n.emit(s(`cxttapstart`)),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!0,e.touchData.cxtDragged=!1,e.data.bgActivePosistion=void 0,e.redraw();return}}if(t.touches[2])n.boxSelectionEnabled()&&t.preventDefault();else if(!t.touches[1]&&t.touches[0]){var x=e.findNearestElements(r[0],r[1],!0,!0),S=x[0];if(S!=null&&(S.activate(),e.touchData.start=S,e.touchData.starts=x,e.nodeIsGrabbable(S))){var C=e.dragData.touchDragEles=n.collection(),w=null;e.redrawHint(`eles`,!0),e.redrawHint(`drag`,!0),S.selected()?(w=n.$(function(t){return t.selected()&&e.nodeIsGrabbable(t)}),m(w,{addToList:C})):h(S,{addToList:C}),u(S),S.emit(s(`grabon`)),w?w.forEach(function(e){e.emit(s(`grab`))}):S.emit(s(`grab`))}i(S,[`touchstart`,`tapstart`,`vmousedown`],t,{x:r[0],y:r[1]}),S??(e.data.bgActivePosistion={x:o[0],y:o[1]},e.redrawHint(`select`,!0),e.redraw()),e.touchData.singleTouchMoved=!1,e.touchData.singleTouchStartTime=+new Date,clearTimeout(e.touchData.tapholdTimeout),e.touchData.tapholdTimeout=setTimeout(function(){e.touchData.singleTouchMoved===!1&&!e.pinching&&!e.touchData.selecting&&i(e.touchData.start,[`taphold`],t,{x:r[0],y:r[1]})},e.tapholdDuration)}if(t.touches.length>=1){for(var E=e.touchData.startPosition=[null,null,null,null,null,null],D=0;D<r.length;D++)E[D]=a[D]=r[D];var O=t.touches[0];e.touchData.startGPosition=[O.clientX,O.clientY]}}},!1);var de;e.registerBinding(t,`touchmove`,de=function(t){var n=e.touchData.capture;if(!(!n&&!T(t))){var r=e.selection,a=e.cy,s=e.touchData.now,l=e.touchData.earlier,u=a.zoom();if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=d[0],s[1]=d[1]}if(t.touches[1]){var d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=d[0],s[3]=d[1]}if(t.touches[2]){var d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=d[0],s[5]=d[1]}var f=function(e){return{originalEvent:t,type:e,position:{x:s[0],y:s[1]}}},p=e.touchData.startGPosition,h;if(n&&t.touches[0]&&p){for(var _=[],v=0;v<s.length;v++)_[v]=s[v]-l[v];var y=t.touches[0].clientX-p[0],b=y*y,x=t.touches[0].clientY-p[1];h=b+x*x>=e.touchTapThreshold2}if(n&&e.touchData.cxt){t.preventDefault();var S=t.touches[0].clientX-re,C=t.touches[0].clientY-ie,w=t.touches[1].clientX-re,E=t.touches[1].clientY-ie,D=le(S,C,w,E),O=D/B,k=150,A=k*k,j=1.5;if(O>=j*j||D>=A){e.touchData.cxt=!1,e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var M=f(`cxttapend`);e.touchData.start?(e.touchData.start.unactivate().emit(M),e.touchData.start=null):a.emit(M)}}if(n&&e.touchData.cxt){var M=f(`cxtdrag`);e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0),e.touchData.start?e.touchData.start.emit(M):a.emit(M),e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxtDragged=!0;var N=e.findNearestElement(s[0],s[1],!0,!0);(!e.touchData.cxtOver||N!==e.touchData.cxtOver)&&(e.touchData.cxtOver&&e.touchData.cxtOver.emit(f(`cxtdragout`)),e.touchData.cxtOver=N,N&&N.emit(f(`cxtdragover`)))}else if(n&&t.touches[2]&&a.boxSelectionEnabled())t.preventDefault(),e.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,e.touchData.selecting||a.emit(f(`boxstart`)),e.touchData.selecting=!0,e.touchData.didSelect=!0,r[4]=1,!r||r.length===0||r[0]===void 0?(r[0]=(s[0]+s[2]+s[4])/3,r[1]=(s[1]+s[3]+s[5])/3,r[2]=(s[0]+s[2]+s[4])/3+1,r[3]=(s[1]+s[3]+s[5])/3+1):(r[2]=(s[0]+s[2]+s[4])/3,r[3]=(s[1]+s[3]+s[5])/3),e.redrawHint(`select`,!0),e.redraw();else if(n&&t.touches[1]&&!e.touchData.didSelect&&a.zoomingEnabled()&&a.panningEnabled()&&a.userZoomingEnabled()&&a.userPanningEnabled()){t.preventDefault(),e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var P=e.dragData.touchDragEles;if(P){e.redrawHint(`drag`,!0);for(var F=0;F<P.length;F++){var te=P[F]._private;te.grabbed=!1,te.rscratch.inDragLayer=!1}}var ae=e.touchData.start,S=t.touches[0].clientX-re,C=t.touches[0].clientY-ie,w=t.touches[1].clientX-re,E=t.touches[1].clientY-ie,oe=ce(S,C,w,E),ue=oe/z;if(se){var de=S-I,fe=C-L,pe=w-R,me=E-ee,he=(de+pe)/2,ge=(fe+me)/2,_e=a.zoom(),ve=_e*ue,ye=a.pan(),be=ne[0]*_e+ye.x,xe=ne[1]*_e+ye.y,Se={x:-ve/_e*(be-ye.x-he)+be,y:-ve/_e*(xe-ye.y-ge)+xe};if(ae&&ae.active()){var P=e.dragData.touchDragEles;g(P),e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0),ae.unactivate().emit(f(`freeon`)),P&&P.emit(f(`free`)),e.dragData.didDrag&&(ae.emit(f(`dragfreeon`)),P&&P.emit(f(`dragfree`)))}a.viewport({zoom:ve,pan:Se,cancelOnFailedZoom:!0}),a.emit(f(`pinchzoom`)),z=oe,I=S,L=C,R=w,ee=E,e.pinching=!0}if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=d[0],s[1]=d[1]}if(t.touches[1]){var d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);s[2]=d[0],s[3]=d[1]}if(t.touches[2]){var d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);s[4]=d[0],s[5]=d[1]}}else if(t.touches[0]&&!e.touchData.didSelect){var V=e.touchData.start,Ce=e.touchData.last,N;if(!e.hoverData.draggingEles&&!e.swipePanning&&(N=e.findNearestElement(s[0],s[1],!0,!0)),n&&V!=null&&t.preventDefault(),n&&V!=null&&e.nodeIsDraggable(V)){if(h){var P=e.dragData.touchDragEles,we=!e.dragData.didDrag;we&&m(P,{inDragLayer:!0}),e.dragData.didDrag=!0;var Te={x:0,y:0};if(uE(_[0])&&uE(_[1])&&(Te.x+=_[0],Te.y+=_[1],we)){e.redrawHint(`eles`,!0);var Ee=e.touchData.dragDelta;Ee&&uE(Ee[0])&&uE(Ee[1])&&(Te.x+=Ee[0],Te.y+=Ee[1])}e.hoverData.draggingEles=!0,P.silentShift(Te).emit(f(`position`)).emit(f(`drag`)),e.redrawHint(`drag`,!0),e.touchData.startPosition[0]==l[0]&&e.touchData.startPosition[1]==l[1]&&e.redrawHint(`eles`,!0),e.redraw()}else{var Ee=e.touchData.dragDelta=e.touchData.dragDelta||[];Ee.length===0?(Ee.push(_[0]),Ee.push(_[1])):(Ee[0]+=_[0],Ee[1]+=_[1])}}if(i(V||N,[`touchmove`,`tapdrag`,`vmousemove`],t,{x:s[0],y:s[1]}),(!V||!V.grabbed())&&N!=Ce&&(Ce&&Ce.emit(f(`tapdragout`)),N&&N.emit(f(`tapdragover`))),e.touchData.last=N,n)for(var F=0;F<s.length;F++)s[F]&&e.touchData.startPosition[F]&&h&&(e.touchData.singleTouchMoved=!0);if(n&&(V==null||V.pannable())&&a.panningEnabled()&&a.userPanningEnabled()){o(V,e.touchData.starts)&&(t.preventDefault(),e.data.bgActivePosistion||(e.data.bgActivePosistion=ID(e.touchData.startPosition)),e.swipePanning?(a.panBy({x:_[0]*u,y:_[1]*u}),a.emit(f(`dragpan`))):h&&(e.swipePanning=!0,a.panBy({x:y*u,y:x*u}),a.emit(f(`dragpan`)),V&&(V.unactivate(),e.redrawHint(`select`,!0),e.touchData.start=null)));var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);s[0]=d[0],s[1]=d[1]}}for(var v=0;v<s.length;v++)l[v]=s[v];n&&t.touches.length>0&&!e.hoverData.draggingEles&&!e.swipePanning&&e.data.bgActivePosistion!=null&&(e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0),e.redraw())}},!1);var fe;e.registerBinding(t,`touchcancel`,fe=function(t){var n=e.touchData.start;e.touchData.capture=!1,n&&n.unactivate()});var pe,me,he,ge;if(e.registerBinding(t,`touchend`,pe=function(t){var r=e.touchData.start;if(e.touchData.capture)t.touches.length===0&&(e.touchData.capture=!1),t.preventDefault();else return;var a=e.selection;e.swipePanning=!1,e.hoverData.draggingEles=!1;var o=e.cy,s=o.zoom(),l=e.touchData.now,u=e.touchData.earlier;if(t.touches[0]){var d=e.projectIntoViewport(t.touches[0].clientX,t.touches[0].clientY);l[0]=d[0],l[1]=d[1]}if(t.touches[1]){var d=e.projectIntoViewport(t.touches[1].clientX,t.touches[1].clientY);l[2]=d[0],l[3]=d[1]}if(t.touches[2]){var d=e.projectIntoViewport(t.touches[2].clientX,t.touches[2].clientY);l[4]=d[0],l[5]=d[1]}var f=function(e){return{originalEvent:t,type:e,position:{x:l[0],y:l[1]}}};r&&r.unactivate();var p;if(e.touchData.cxt){if(p=f(`cxttapend`),r?r.emit(p):o.emit(p),!e.touchData.cxtDragged){var m=f(`cxttap`);r?r.emit(m):o.emit(m)}e.touchData.start&&(e.touchData.start._private.grabbed=!1),e.touchData.cxt=!1,e.touchData.start=null,e.redraw();return}if(!t.touches[2]&&o.boxSelectionEnabled()&&e.touchData.selecting){e.touchData.selecting=!1;var h=o.collection(e.getAllInBox(a[0],a[1],a[2],a[3]));a[0]=void 0,a[1]=void 0,a[2]=void 0,a[3]=void 0,a[4]=0,e.redrawHint(`select`,!0),o.emit(f(`boxend`)),h.emit(f(`box`)).stdFilter(function(e){return e.selectable()&&!e.selected()}).select().emit(f(`boxselect`)),h.nonempty()&&e.redrawHint(`eles`,!0),e.redraw()}if(r?.unactivate(),t.touches[2])e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);else if(!t.touches[1]&&!t.touches[0]&&!t.touches[0]){e.data.bgActivePosistion=void 0,e.redrawHint(`select`,!0);var _=e.dragData.touchDragEles;if(r!=null){var v=r._private.grabbed;g(_),e.redrawHint(`drag`,!0),e.redrawHint(`eles`,!0),v&&(r.emit(f(`freeon`)),_.emit(f(`free`)),e.dragData.didDrag&&(r.emit(f(`dragfreeon`)),_.emit(f(`dragfree`)))),i(r,[`touchend`,`tapend`,`vmouseup`,`tapdragout`],t,{x:l[0],y:l[1]}),r.unactivate(),e.touchData.start=null}else i(e.findNearestElement(l[0],l[1],!0,!0),[`touchend`,`tapend`,`vmouseup`,`tapdragout`],t,{x:l[0],y:l[1]});var y=e.touchData.startPosition[0]-l[0],b=y*y,x=e.touchData.startPosition[1]-l[1],S=(b+x*x)*s*s;e.touchData.singleTouchMoved||(r||o.$(`:selected`).unselect([`tapunselect`]),i(r,[`tap`,`vclick`],t,{x:l[0],y:l[1]}),me=!1,t.timeStamp-ge<=o.multiClickDebounceTime()?(he&&clearTimeout(he),me=!0,ge=null,i(r,[`dbltap`,`vdblclick`],t,{x:l[0],y:l[1]})):(he=setTimeout(function(){me||i(r,[`onetap`,`voneclick`],t,{x:l[0],y:l[1]})},o.multiClickDebounceTime()),ge=t.timeStamp)),r!=null&&!e.dragData.didDrag&&r._private.selectable&&S<e.touchTapThreshold2&&!e.pinching&&(o.selectionType()===`single`?(o.$(n).unmerge(r).unselect([`tapunselect`]),r.select([`tapselect`])):r.selected()?r.unselect([`tapunselect`]):r.select([`tapselect`]),e.redrawHint(`eles`,!0)),e.touchData.singleTouchMoved=!0}for(var C=0;C<l.length;C++)u[C]=l[C];e.dragData.didDrag=!1,t.touches.length===0&&(e.touchData.dragDelta=[],e.touchData.startPosition=[null,null,null,null,null,null],e.touchData.startGPosition=null,e.touchData.didSelect=!1),t.touches.length<2&&(t.touches.length===1&&(e.touchData.startGPosition=[t.touches[0].clientX,t.touches[0].clientY]),e.pinching=!1,e.redrawHint(`eles`,!0),e.redraw())},!1),typeof TouchEvent>`u`){var _e=[],ve=function(e){return{clientX:e.clientX,clientY:e.clientY,force:1,identifier:e.pointerId,pageX:e.pageX,pageY:e.pageY,radiusX:e.width/2,radiusY:e.height/2,screenX:e.screenX,screenY:e.screenY,target:e.target}},ye=function(e){return{event:e,touch:ve(e)}},be=function(e){_e.push(ye(e))},xe=function(e){for(var t=0;t<_e.length;t++)if(_e[t].event.pointerId===e.pointerId){_e.splice(t,1);return}},Se=function(e){var t=_e.filter(function(t){return t.event.pointerId===e.pointerId})[0];t.event=e,t.touch=ve(e)},V=function(e){e.touches=_e.map(function(e){return e.touch})},Ce=function(e){return e.pointerType===`mouse`||e.pointerType===4};e.registerBinding(e.container,`pointerdown`,function(e){Ce(e)||(e.preventDefault(),be(e),V(e),ue(e))}),e.registerBinding(e.container,`pointerup`,function(e){Ce(e)||(xe(e),V(e),pe(e))}),e.registerBinding(e.container,`pointercancel`,function(e){Ce(e)||(xe(e),V(e),fe(e))}),e.registerBinding(e.container,`pointermove`,function(e){Ce(e)||(e.preventDefault(),Se(e),V(e),de(e))})}},AM={},AM.generatePolygon=function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,draw:function(e,t,n,r,i,a){this.renderer.nodeShapeImpl(`polygon`,e,t,n,r,i,this.points)},intersectLine:function(e,t,n,r,i,a,o,s){return uO(i,a,this.points,e,t,n/2,r/2,o)},checkPoint:function(e,t,n,r,i,a,o,s){return rO(e,t,this.points,a,o,r,i,[0,-1],n)},hasMiterBounds:e!==`rectangle`,miterBounds:function(e,t,n,r,i,a){return xIe(this.points,e,t,n,r,i)}}},AM.generateEllipse=function(){return this.nodeShapes.ellipse={renderer:this,name:`ellipse`,draw:function(e,t,n,r,i,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,a,o,s){return Qze(i,a,e,t,n/2+o,r/2+o)},checkPoint:function(e,t,n,r,i,a,o,s){return oO(e,t,r,i,a,o,n)}}},AM.generateRoundPolygon=function(e,t){return this.nodeShapes[e]={renderer:this,name:e,points:t,getOrCreateCorners:function(e,n,r,i,a,o,s){if(o[s]!==void 0&&o[s+`-cx`]===e&&o[s+`-cy`]===n&&o[s+`-w`]===r&&o[s+`-h`]===i&&o[s+`-corner-radius`]===a)return o[s];o[s]=Array(t.length/2),o[s+`-cx`]=e,o[s+`-cy`]=n,o[s+`-w`]=r,o[s+`-h`]=i,o[s+`-corner-radius`]=a;var l=r/2,u=i/2;a=a===`auto`?gO(r,i):a;for(var d=Array(t.length/2),f=0;f<t.length/2;f++)d[f]={x:e+l*t[f*2],y:n+u*t[f*2+1]};var p,m,h,g,_=d.length;for(m=d[_-1],p=0;p<_;p++)h=d[p%_],g=d[(p+1)%_],o[s][p]=BT(m,h,g,a),m=h,h=g;return o[s]},draw:function(e,t,n,r,i,a,o){this.renderer.nodeShapeImpl(`round-polygon`,e,t,n,r,i,this.points,this.getOrCreateCorners(t,n,r,i,a,o,`drawCorners`))},intersectLine:function(e,t,n,r,i,a,o,s,l){return eBe(i,a,this.points,e,t,n,r,o,this.getOrCreateCorners(e,t,n,r,s,l,`corners`))},checkPoint:function(e,t,n,r,i,a,o,s,l){return Zze(e,t,this.points,a,o,r,i,this.getOrCreateCorners(a,o,r,i,s,l,`corners`))}}},AM.generateRoundRectangle=function(){return this.nodeShapes[`round-rectangle`]=this.nodeShapes.roundrectangle={renderer:this,name:`round-rectangle`,points:fO(4,0),draw:function(e,t,n,r,i,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i,this.points,a)},intersectLine:function(e,t,n,r,i,a,o,s){return tO(i,a,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,i,a,o,s){var l=r/2,u=i/2;s=s===`auto`?hO(r,i):s,s=Math.min(l,u,s);var d=s*2;return!!(rO(e,t,this.points,a,o,r,i-d,[0,-1],n)||rO(e,t,this.points,a,o,r-d,i,[0,-1],n)||oO(e,t,d,d,a-l+s,o-u+s,n)||oO(e,t,d,d,a+l-s,o-u+s,n)||oO(e,t,d,d,a+l-s,o+u-s,n)||oO(e,t,d,d,a-l+s,o+u-s,n))}}},AM.generateCutRectangle=function(){return this.nodeShapes[`cut-rectangle`]=this.nodeShapes.cutrectangle={renderer:this,name:`cut-rectangle`,cornerLength:_O(),points:fO(4,0),draw:function(e,t,n,r,i,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i,null,a)},generateCutTrianglePts:function(e,t,n,r,i){var a=i===`auto`?this.cornerLength:i,o=t/2,s=e/2,l=n-s,u=n+s,d=r-o,f=r+o;return{topLeft:[l,d+a,l+a,d,l+a,d+a],topRight:[u-a,d,u,d+a,u-a,d+a],bottomRight:[u,f-a,u-a,f,u-a,f-a],bottomLeft:[l+a,f,l,f-a,l+a,f-a]}},intersectLine:function(e,t,n,r,i,a,o,s){var l=this.generateCutTrianglePts(n+2*o,r+2*o,e,t,s);return uO(i,a,[].concat.apply([],[l.topLeft.splice(0,4),l.topRight.splice(0,4),l.bottomRight.splice(0,4),l.bottomLeft.splice(0,4)]),e,t)},checkPoint:function(e,t,n,r,i,a,o,s){var l=s===`auto`?this.cornerLength:s;if(rO(e,t,this.points,a,o,r,i-2*l,[0,-1],n)||rO(e,t,this.points,a,o,r-2*l,i,[0,-1],n))return!0;var u=this.generateCutTrianglePts(r,i,a,o);return nO(e,t,u.topLeft)||nO(e,t,u.topRight)||nO(e,t,u.bottomRight)||nO(e,t,u.bottomLeft)}}},AM.generateBarrel=function(){return this.nodeShapes.barrel={renderer:this,name:`barrel`,points:fO(4,0),draw:function(e,t,n,r,i,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i)},intersectLine:function(e,t,n,r,i,a,o,s){var l=this.generateBarrelBezierPts(n+2*o,r+2*o,e,t),u=function(e){var t=WD({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.15),n=WD({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.5),r=WD({x:e[0],y:e[1]},{x:e[2],y:e[3]},{x:e[4],y:e[5]},.85);return[e[0],e[1],t.x,t.y,n.x,n.y,r.x,r.y,e[4],e[5]]};return uO(i,a,[].concat(u(l.topLeft),u(l.topRight),u(l.bottomRight),u(l.bottomLeft)),e,t)},generateBarrelBezierPts:function(e,t,n,r){var i=t/2,a=e/2,o=n-a,s=n+a,l=r-i,u=r+i,d=vO(e,t),f=d.heightOffset,p=d.widthOffset,m=d.ctrlPtOffsetPct*e,h={topLeft:[o,l+f,o+m,l,o+p,l],topRight:[s-p,l,s-m,l,s,l+f],bottomRight:[s,u-f,s-m,u,s-p,u],bottomLeft:[o+p,u,o+m,u,o,u-f]};return h.topLeft.isTop=!0,h.topRight.isTop=!0,h.bottomLeft.isBottom=!0,h.bottomRight.isBottom=!0,h},checkPoint:function(e,t,n,r,i,a,o,s){var l=vO(r,i),u=l.heightOffset,d=l.widthOffset;if(rO(e,t,this.points,a,o,r,i-2*u,[0,-1],n)||rO(e,t,this.points,a,o,r-2*d,i,[0,-1],n))return!0;for(var f=this.generateBarrelBezierPts(r,i,a,o),p=function(e,t,n){var r=n[4],i=n[2],a=n[0],o=n[5],s=n[1];if(Math.min(r,a)<=e&&e<=Math.max(r,a)&&Math.min(o,s)<=t&&t<=Math.max(o,s)){var l=tBe(r,i,a),u=qze(l[0],l[1],l[2],e).filter(function(e){return 0<=e&&e<=1});if(u.length>0)return u[0]}return null},m=Object.keys(f),h=0;h<m.length;h++){var g=f[m[h]],_=p(e,t,g);if(_!=null){var v=g[5],y=g[3],b=g[1],x=UD(v,y,b,_);if(g.isTop&&x<=t||g.isBottom&&t<=x)return!0}}return!1}}},AM.generateBottomRoundrectangle=function(){return this.nodeShapes[`bottom-round-rectangle`]=this.nodeShapes.bottomroundrectangle={renderer:this,name:`bottom-round-rectangle`,points:fO(4,0),draw:function(e,t,n,r,i,a){this.renderer.nodeShapeImpl(this.name,e,t,n,r,i,this.points,a)},intersectLine:function(e,t,n,r,i,a,o,s){var l=e-(n/2+o),u=t-(r/2+o),d=u,f=lO(i,a,e,t,l,u,e+(n/2+o),d,!1);return f.length>0?f:tO(i,a,e,t,n,r,o,s)},checkPoint:function(e,t,n,r,i,a,o,s){s=s===`auto`?hO(r,i):s;var l=2*s;if(rO(e,t,this.points,a,o,r,i-l,[0,-1],n)||rO(e,t,this.points,a,o,r-l,i,[0,-1],n))return!0;var u=r/2+2*n,d=i/2+2*n;return!!(nO(e,t,[a-u,o-d,a-u,o,a+u,o,a+u,o-d])||oO(e,t,l,l,a+r/2-s,o+i/2-s,n)||oO(e,t,l,l,a-r/2+s,o+i/2-s,n))}}},AM.registerNodeShapes=function(){var e=this.nodeShapes={},t=this;this.generateEllipse(),this.generatePolygon(`triangle`,fO(3,0)),this.generateRoundPolygon(`round-triangle`,fO(3,0)),this.generatePolygon(`rectangle`,fO(4,0)),e.square=e.rectangle,this.generateRoundRectangle(),this.generateCutRectangle(),this.generateBarrel(),this.generateBottomRoundrectangle();var n=[0,1,1,0,0,-1,-1,0];this.generatePolygon(`diamond`,n),this.generateRoundPolygon(`round-diamond`,n),this.generatePolygon(`pentagon`,fO(5,0)),this.generateRoundPolygon(`round-pentagon`,fO(5,0)),this.generatePolygon(`hexagon`,fO(6,0)),this.generateRoundPolygon(`round-hexagon`,fO(6,0)),this.generatePolygon(`heptagon`,fO(7,0)),this.generateRoundPolygon(`round-heptagon`,fO(7,0)),this.generatePolygon(`octagon`,fO(8,0)),this.generateRoundPolygon(`round-octagon`,fO(8,0));var r=Array(20),i=mO(5,0),a=mO(5,Math.PI/5),o=.5*(3-Math.sqrt(5));o*=1.57;for(var s=0;s<a.length/2;s++)a[s*2]*=o,a[s*2+1]*=o;for(var s=0;s<5;s++)r[s*4]=i[s*2],r[s*4+1]=i[s*2+1],r[s*4+2]=a[s*2],r[s*4+3]=a[s*2+1];r=pO(r),this.generatePolygon(`star`,r),this.generatePolygon(`vee`,[-1,-1,0,-.333,1,-1,0,1]),this.generatePolygon(`rhomboid`,[-1,-1,.333,-1,1,1,-.333,1]),this.generatePolygon(`right-rhomboid`,[-.333,-1,1,-1,.333,1,-1,1]),this.nodeShapes.concavehexagon=this.generatePolygon(`concave-hexagon`,[-1,-.95,-.75,0,-1,.95,1,.95,.75,0,1,-.95]);var l=[-1,-1,.25,-1,1,0,.25,1,-1,1];this.generatePolygon(`tag`,l),this.generateRoundPolygon(`round-tag`,l),e.makePolygon=function(e){var n=`polygon-`+e.join(`$`),r;return(r=this[n])?r:t.generatePolygon(n,e)}},jM={},jM.timeToRender=function(){return this.redrawTotalTime/this.redrawCount},jM.redraw=function(e){e||=yD();var t=this;t.averageRedrawTime===void 0&&(t.averageRedrawTime=0),t.lastRedrawTime===void 0&&(t.lastRedrawTime=0),t.lastDrawTime===void 0&&(t.lastDrawTime=0),t.requestedFrame=!0,t.renderOptions=e},jM.beforeRender=function(e,t){if(!this.destroyed){t??mD(`Priority is not optional for beforeRender`);var n=this.beforeRenderCallbacks;n.push({fn:e,priority:t}),n.sort(function(e,t){return t.priority-e.priority})}},MM=function(e,t,n){for(var r=e.beforeRenderCallbacks,i=0;i<r.length;i++)r[i].fn(t,n)},jM.startRenderLoop=function(){var e=this,t=e.cy;if(!e.renderLoopStarted){e.renderLoopStarted=!0;var n=function(r){if(!e.destroyed){if(!t.batching()){if(e.requestedFrame&&!e.skipFrame){MM(e,!0,r);var i=XE();e.render(e.renderOptions);var a=e.lastDrawTime=XE();e.averageRedrawTime===void 0&&(e.averageRedrawTime=a-i),e.redrawCount===void 0&&(e.redrawCount=0),e.redrawCount++,e.redrawTotalTime===void 0&&(e.redrawTotalTime=0);var o=a-i;e.redrawTotalTime+=o,e.lastRedrawTime=o,e.averageRedrawTime=e.averageRedrawTime/2+o/2,e.requestedFrame=!1}else MM(e,!1,r)}e.skipFrame=!1,YE(n)}};YE(n)}},NM=function(e){this.init(e)},PM=NM.prototype,PM.clientFunctions=[`redrawHint`,`render`,`renderTo`,`matchCanvasSize`,`nodeShapeImpl`,`arrowShapeImpl`],PM.init=function(e){var t=this;t.options=e,t.cy=e.cy;var n=t.container=e.cy.container(),r=t.cy.window();if(r){var i=r.document,a=i.head,o=`__________cytoscape_stylesheet`,s=`__________cytoscape_container`,l=i.getElementById(o)!=null;if(n.className.indexOf(s)<0&&(n.className=(n.className||``)+` `+s),!l){var u=i.createElement(`style`);u.id=o,u.textContent=`.`+s+` { position: relative; }`,a.insertBefore(u,a.children[0])}r.getComputedStyle(n).getPropertyValue(`position`)===`static`&&gD(`A Cytoscape container has style position:static and so can not use UI extensions properly`)}t.selection=[void 0,void 0,void 0,void 0,0],t.bezierProjPcts=[.05,.225,.4,.5,.6,.775,.95],t.hoverData={down:null,last:null,downTime:null,triggerMode:null,dragging:!1,initialPan:[null,null],capture:!1},t.dragData={possibleDragElements:[]},t.touchData={start:null,capture:!1,startPosition:[null,null,null,null,null,null],singleTouchStartTime:null,singleTouchMoved:!0,now:[null,null,null,null,null,null],earlier:[null,null,null,null,null,null]},t.redraws=0,t.showFps=e.showFps,t.debug=e.debug,t.webgl=e.webgl,t.hideEdgesOnViewport=e.hideEdgesOnViewport,t.textureOnViewport=e.textureOnViewport,t.wheelSensitivity=e.wheelSensitivity,t.motionBlurEnabled=e.motionBlur,t.forcedPixelRatio=uE(e.pixelRatio)?e.pixelRatio:null,t.motionBlur=e.motionBlur,t.motionBlurOpacity=e.motionBlurOpacity,t.motionBlurTransparency=1-t.motionBlurOpacity,t.motionBlurPxRatio=1,t.mbPxRBlurry=1,t.minMbLowQualFrames=4,t.fullQualityMb=!1,t.clearedForMotionBlur=[],t.desktopTapThreshold=e.desktopTapThreshold,t.desktopTapThreshold2=e.desktopTapThreshold*e.desktopTapThreshold,t.touchTapThreshold=e.touchTapThreshold,t.touchTapThreshold2=e.touchTapThreshold*e.touchTapThreshold,t.tapholdDuration=500,t.bindings=[],t.beforeRenderCallbacks=[],t.beforeRenderPriorities={animations:400,eleCalcs:300,eleTxrDeq:200,lyrTxrDeq:150,lyrTxrSkip:100},t.registerNodeShapes(),t.registerArrowShapes(),t.registerCalculationListeners()},PM.notify=function(e,t){var n=this,r=n.cy;if(!this.destroyed){if(e===`init`){n.load();return}if(e===`destroy`){n.destroy();return}(e===`add`||e===`remove`||e===`move`&&r.hasCompoundNodes()||e===`load`||e===`zorder`||e===`mount`)&&n.invalidateCachedZSortedEles(),e===`viewport`&&n.redrawHint(`select`,!0),e===`gc`&&n.redrawHint(`gc`,!0),(e===`load`||e===`resize`||e===`mount`)&&(n.invalidateContainerClientCoordsCache(),n.matchCanvasSize(n.container)),n.redrawHint(`eles`,!0),n.redrawHint(`drag`,!0),this.startRenderLoop(),this.redraw()}},PM.destroy=function(){var e=this;e.destroyed=!0,e.cy.stopAnimationLoop();for(var t=0;t<e.bindings.length;t++){var n=e.bindings[t],r=n.target;(r.off||r.removeEventListener).apply(r,n.args)}if(e.bindings=[],e.beforeRenderCallbacks=[],e.onUpdateEleCalcsFns=[],e.removeObserver&&e.removeObserver.disconnect(),e.styleObserver&&e.styleObserver.disconnect(),e.resizeObserver&&e.resizeObserver.disconnect(),e.labelCalcDiv)try{document.body.removeChild(e.labelCalcDiv)}catch{}},PM.isHeadless=function(){return!1},[Zj,EM,DM,kM,AM,jM].forEach(function(e){DE(PM,e)}),FM=1e3/60,IM={setupDequeueing:function(e){return function(){var t=this,n=this.renderer;if(!t.dequeueingSetup){t.dequeueingSetup=!0;var r=KE(function(){n.redrawHint(`eles`,!0),n.redrawHint(`drag`,!0),n.redraw()},e.deqRedrawThreshold),i=function(i,a){var o=XE(),s=n.averageRedrawTime,l=n.lastRedrawTime,u=[],d=n.cy.extent(),f=n.getPixelRatio();for(i||n.flushRenderedStyleQueue();;){var p=XE(),m=p-o,h=p-a;if(l<FM){var g=FM-(i?s:0);if(h>=e.deqFastCost*g)break}else if(i){if(m>=e.deqCost*l||m>=e.deqAvgCost*s)break}else if(h>=e.deqNoDrawCost*FM)break;var _=e.deq(t,f,d);if(_.length>0)for(var v=0;v<_.length;v++)u.push(_[v]);else break}u.length>0&&(e.onDeqd(t,u),!i&&e.shouldRedraw(t,u,f,d)&&r())},a=e.priority||pD;n.beforeRender(i,a(t))}}}},_Ue=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:dD;aT(this,e),this.idsByKey=new TD,this.keyForId=new TD,this.cachesByLvl=new TD,this.lvls=[],this.getKey=t,this.doesEleInvalidateKey=n}return oT(e,[{key:`getIdsFor`,value:function(e){e??mD(`Can not get id list for null key`);var t=this.idsByKey,n=this.idsByKey.get(e);return n||(n=new ED,t.set(e,n)),n}},{key:`addIdForKey`,value:function(e,t){e!=null&&this.getIdsFor(e).add(t)}},{key:`deleteIdForKey`,value:function(e,t){e!=null&&this.getIdsFor(e).delete(t)}},{key:`getNumberOfIdsForKey`,value:function(e){return e==null?0:this.getIdsFor(e).size}},{key:`updateKeyMappingFor`,value:function(e){var t=e.id(),n=this.keyForId.get(t),r=this.getKey(e);this.deleteIdForKey(n,t),this.addIdForKey(r,t),this.keyForId.set(t,r)}},{key:`deleteKeyMappingFor`,value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteIdForKey(n,t),this.keyForId.delete(t)}},{key:`keyHasChangedFor`,value:function(e){var t=e.id();return this.keyForId.get(t)!==this.getKey(e)}},{key:`isInvalid`,value:function(e){return this.keyHasChangedFor(e)||this.doesEleInvalidateKey(e)}},{key:`getCachesAt`,value:function(e){var t=this.cachesByLvl,n=this.lvls,r=t.get(e);return r||(r=new TD,t.set(e,r),n.push(e)),r}},{key:`getCache`,value:function(e,t){return this.getCachesAt(t).get(e)}},{key:`get`,value:function(e,t){var n=this.getKey(e),r=this.getCache(n,t);return r!=null&&this.updateKeyMappingFor(e),r}},{key:`getForCachedKey`,value:function(e,t){var n=this.keyForId.get(e.id());return this.getCache(n,t)}},{key:`hasCache`,value:function(e,t){return this.getCachesAt(t).has(e)}},{key:`has`,value:function(e,t){var n=this.getKey(e);return this.hasCache(n,t)}},{key:`setCache`,value:function(e,t,n){n.key=e,this.getCachesAt(t).set(e,n)}},{key:`set`,value:function(e,t,n){var r=this.getKey(e);this.setCache(r,t,n),this.updateKeyMappingFor(e)}},{key:`deleteCache`,value:function(e,t){this.getCachesAt(t).delete(e)}},{key:`delete`,value:function(e,t){var n=this.getKey(e);this.deleteCache(n,t)}},{key:`invalidateKey`,value:function(e){var t=this;this.lvls.forEach(function(n){return t.deleteCache(e,n)})}},{key:`invalidate`,value:function(e){var t=e.id(),n=this.keyForId.get(t);this.deleteKeyMappingFor(e);var r=this.doesEleInvalidateKey(e);return r&&this.invalidateKey(n),r||this.getNumberOfIdsForKey(n)===0}}])}(),LM=25,RM=50,zM=-4,BM=3,VM=7.99,vUe=8,yUe=1024,bUe=1024,xUe=1024,SUe=.2,CUe=.8,wUe=10,TUe=.15,EUe=.1,DUe=.9,OUe=.9,kUe=100,AUe=1,HM={dequeue:`dequeue`,downscale:`downscale`,highQuality:`highQuality`},jUe=bD({getKey:null,doesEleInvalidateKey:dD,drawElement:null,getBoundingBox:null,getRotationPoint:null,getRotationOffset:null,isVisible:uD,allowEdgeTxrCaching:!0,allowParentTxrCaching:!0}),UM=function(e,t){var n=this;n.renderer=e,n.onDequeues=[];var r=jUe(t);DE(n,r),n.lookup=new _Ue(r.getKey,r.doesEleInvalidateKey),n.setupDequeueing()},WM=UM.prototype,WM.reasons=HM,WM.getTextureQueue=function(e){var t=this;return t.eleImgCaches=t.eleImgCaches||{},t.eleImgCaches[e]=t.eleImgCaches[e]||[]},WM.getRetiredTextureQueue=function(e){var t=this,n=t.eleImgCaches.retired=t.eleImgCaches.retired||{};return n[e]=n[e]||[]},WM.getElementQueue=function(){var e=this;return e.eleCacheQueue=e.eleCacheQueue||new MD(function(e,t){return t.reqs-e.reqs})},WM.getElementKeyToQueue=function(){var e=this;return e.eleKeyToCacheQueue=e.eleKeyToCacheQueue||{}},WM.getElement=function(e,t,n,r,i){var a=this,o=this.renderer,s=o.cy.zoom(),l=this.lookup;if(!t||t.w===0||t.h===0||isNaN(t.w)||isNaN(t.h)||!e.visible()||e.removed()||!a.allowEdgeTxrCaching&&e.isEdge()||!a.allowParentTxrCaching&&e.isParent())return null;if(r??=Math.ceil(zD(s*n)),r<zM)r=zM;else if(s>=VM||r>BM)return null;var u=2**r,d=t.h*u,f=t.w*u,p=o.eleTextBiggerThanMin(e,u);if(!this.isVisible(e,p))return null;var m=l.get(e,r);if(m&&m.invalidated&&(m.invalidated=!1,m.texture.invalidatedWidth-=m.width),m)return m;var h=d<=LM?LM:d<=RM?RM:Math.ceil(d/RM)*RM;if(d>xUe||f>bUe)return null;var g=a.getTextureQueue(h),_=g[g.length-2],v=function(){return a.recycleTexture(h,f)||a.addTexture(h,f)};_||=g[g.length-1],_||=v(),_.width-_.usedWidth<f&&(_=v());for(var y=function(e){return e&&e.scaledLabelShown===p},b=i&&i===HM.dequeue,x=i&&i===HM.highQuality,S=i&&i===HM.downscale,C,w=r+1;w<=BM;w++){var T=l.get(e,w);if(T){C=T;break}}var E=C&&C.level===r+1?C:null,D=function(){_.context.drawImage(E.texture.canvas,E.x,0,E.width,E.height,_.usedWidth,0,f,d)};if(_.context.setTransform(1,0,0,1,0,0),_.context.clearRect(_.usedWidth,0,f,h),y(E))D();else if(y(C)){if(x){for(var O=C.level;O>r;O--)E=a.getElement(e,t,n,O,HM.downscale);D()}else return a.queueElement(e,C.level-1),C}else{var k;if(!b&&!x&&!S)for(var A=r-1;A>=zM;A--){var j=l.get(e,A);if(j){k=j;break}}if(y(k))return a.queueElement(e,r),k;_.context.translate(_.usedWidth,0),_.context.scale(u,u),this.drawElement(_.context,e,t,p,!1),_.context.scale(1/u,1/u),_.context.translate(-_.usedWidth,0)}return m={x:_.usedWidth,texture:_,level:r,scale:u,width:f,height:d,scaledLabelShown:p},_.usedWidth+=Math.ceil(f+vUe),_.eleCaches.push(m),l.set(e,r,m),a.checkTextureFullness(_),m},WM.invalidateElements=function(e){for(var t=0;t<e.length;t++)this.invalidateElement(e[t])},WM.invalidateElement=function(e){var t=this,n=t.lookup,r=[];if(n.isInvalid(e)){for(var i=zM;i<=BM;i++){var a=n.getForCachedKey(e,i);a&&r.push(a)}if(n.invalidate(e))for(var o=0;o<r.length;o++){var s=r[o],l=s.texture;l.invalidatedWidth+=s.width,s.invalidated=!0,t.checkTextureUtility(l)}t.removeFromQueue(e)}},WM.checkTextureUtility=function(e){e.invalidatedWidth>=SUe*e.width&&this.retireTexture(e)},WM.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);e.usedWidth/e.width>CUe&&e.fullnessChecks>=wUe?xD(t,e):e.fullnessChecks++},WM.retireTexture=function(e){var t=this,n=e.height,r=t.getTextureQueue(n),i=this.lookup;xD(r,e),e.retired=!0;for(var a=e.eleCaches,o=0;o<a.length;o++){var s=a[o];i.deleteCache(s.key,s.level)}SD(a),t.getRetiredTextureQueue(n).push(e)},WM.addTexture=function(e,t){var n=this,r=n.getTextureQueue(e),i={};return r.push(i),i.eleCaches=[],i.height=e,i.width=Math.max(yUe,t),i.usedWidth=0,i.invalidatedWidth=0,i.fullnessChecks=0,i.canvas=n.renderer.makeOffscreenCanvas(i.width,i.height),i.context=i.canvas.getContext(`2d`),i},WM.recycleTexture=function(e,t){for(var n=this,r=n.getTextureQueue(e),i=n.getRetiredTextureQueue(e),a=0;a<i.length;a++){var o=i[a];if(o.width>=t)return o.retired=!1,o.usedWidth=0,o.invalidatedWidth=0,o.fullnessChecks=0,SD(o.eleCaches),o.context.setTransform(1,0,0,1,0,0),o.context.clearRect(0,0,o.width,o.height),xD(i,o),r.push(o),o}},WM.queueElement=function(e,t){var n=this,r=n.getElementQueue(),i=n.getElementKeyToQueue(),a=this.getKey(e),o=i[a];if(o)o.level=Math.max(o.level,t),o.eles.merge(e),o.reqs++,r.updateItem(o);else{var s={eles:e.spawn().merge(e),level:t,reqs:1,key:a};r.push(s),i[a]=s}},WM.dequeue=function(e){for(var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=[],a=t.lookup,o=0;o<AUe&&n.size()>0;o++){var s=n.pop(),l=s.key,u=s.eles[0],d=a.hasCache(u,s.level);if(r[l]=null,!d){i.push(s);var f=t.getBoundingBox(u);t.getElement(u,f,e,s.level,HM.dequeue)}}return i},WM.removeFromQueue=function(e){var t=this,n=t.getElementQueue(),r=t.getElementKeyToQueue(),i=this.getKey(e),a=r[i];a!=null&&(a.eles.length===1?(a.reqs=lD,n.updateItem(a),n.pop(),r[i]=null):a.eles.unmerge(e))},WM.onDequeue=function(e){this.onDequeues.push(e)},WM.offDequeue=function(e){xD(this.onDequeues,e)},WM.setupDequeueing=IM.setupDequeueing({deqRedrawThreshold:kUe,deqCost:TUe,deqAvgCost:EUe,deqNoDrawCost:DUe,deqFastCost:OUe,deq:function(e,t,n){return e.dequeue(t,n)},onDeqd:function(e,t){for(var n=0;n<e.onDequeues.length;n++){var r=e.onDequeues[n];r(t)}},shouldRedraw:function(e,t,n,r){for(var i=0;i<t.length;i++)for(var a=t[i].eles,o=0;o<a.length;o++)if(ZD(a[o].boundingBox(),r))return!0;return!1},priority:function(e){return e.renderer.beforeRenderPriorities.eleTxrDeq}}),MUe=1,GM=-4,KM=2,NUe=3.99,PUe=50,FUe=50,IUe=.15,LUe=.1,RUe=.9,zUe=.9,BUe=1,qM=250,VUe=16e6,JM=32767,HUe=!0,YM=function(e){var t=this,n=t.renderer=e,r=n.cy;t.layersByLevel={},t.firstGet=!0,t.lastInvalidationTime=XE()-2*qM,t.skipping=!1,t.eleTxrDeqs=r.collection(),t.scheduleElementRefinement=KE(function(){t.refineElementTextures(t.eleTxrDeqs),t.eleTxrDeqs.unmerge(t.eleTxrDeqs)},FUe),n.beforeRender(function(e,n){t.skipping=n-t.lastInvalidationTime<=qM},n.beforeRenderPriorities.lyrTxrSkip),t.layersQueue=new MD(function(e,t){return t.reqs-e.reqs}),t.setupDequeueing()},XM=YM.prototype,ZM=0,UUe=2**53-1,XM.makeLayer=function(e,t){var n=2**t,r=Math.ceil(e.w*n),i=Math.ceil(e.h*n),a=this.renderer.makeOffscreenCanvas(r,i),o={id:ZM=++ZM%UUe,bb:e,level:t,width:r,height:i,canvas:a,context:a.getContext(`2d`),eles:[],elesQueue:[],reqs:0},s=o.context,l=-o.bb.x1,u=-o.bb.y1;return s.scale(n,n),s.translate(l,u),o},XM.getLayers=function(e,t,n){var r=this,i=r.renderer.cy.zoom(),a=r.firstGet;if(r.firstGet=!1,n==null){if(n=Math.ceil(zD(i*t)),n<GM)n=GM;else if(i>=NUe||n>KM)return null}r.validateLayersElesOrdering(n,e);var o=r.layersByLevel,s=2**n,l=o[n]=o[n]||[],u,d=r.levelIsComplete(n,e),f,p=function(){var t=function(t){if(r.validateLayersElesOrdering(t,e),r.levelIsComplete(t,e))return f=o[t],!0},i=function(e){if(!f)for(var r=n+e;GM<=r&&r<=KM&&!t(r);r+=e);};i(1),i(-1);for(var a=l.length-1;a>=0;a--){var s=l[a];s.invalid&&xD(l,s)}};if(!d)p();else return l;var m=function(){if(!u){u=KD();for(var t=0;t<e.length;t++)Uze(u,e[t].boundingBox())}return u},h=function(e){e||={};var t=e.after;m();var i=Math.ceil(u.w*s),a=Math.ceil(u.h*s);if(i>JM||a>JM||i*a>VUe)return null;var o=r.makeLayer(u,n);if(t!=null){var d=l.indexOf(t)+1;l.splice(d,0,o)}else(e.insert===void 0||e.insert)&&l.unshift(o);return o};if(r.skipping&&!a)return null;for(var g=null,_=e.length/MUe,v=!a,y=0;y<e.length;y++){var b=e[y],x=b._private.rscratch,S=x.imgLayerCaches=x.imgLayerCaches||{},C=S[n];if(C){g=C;continue}if((!g||g.eles.length>=_||!eO(g.bb,b.boundingBox()))&&(g=h({insert:!0,after:g}),!g))return null;f||v?r.queueLayer(g,b):r.drawEleInLayer(g,b,n,t),g.eles.push(b),S[n]=g}return f||(v?null:l)},XM.getEleLevelForLayerLevel=function(e,t){return e},XM.drawEleInLayer=function(e,t,n,r){var i=this,a=this.renderer,o=e.context,s=t.boundingBox();s.w===0||s.h===0||!t.visible()||(n=i.getEleLevelForLayerLevel(n,r),a.setImgSmoothing(o,!1),a.drawCachedElement(o,t,null,null,n,HUe),a.setImgSmoothing(o,!0))},XM.levelIsComplete=function(e,t){var n=this.layersByLevel[e];if(!n||n.length===0)return!1;for(var r=0,i=0;i<n.length;i++){var a=n[i];if(a.reqs>0||a.invalid)return!1;r+=a.eles.length}return r===t.length},XM.validateLayersElesOrdering=function(e,t){var n=this.layersByLevel[e];if(n)for(var r=0;r<n.length;r++){for(var i=n[r],a=-1,o=0;o<t.length;o++)if(i.eles[0]===t[o]){a=o;break}if(a<0){this.invalidateLayer(i);continue}for(var s=a,o=0;o<i.eles.length;o++)if(i.eles[o]!==t[s+o]){this.invalidateLayer(i);break}}},XM.updateElementsInLayers=function(e,t){for(var n=this,r=mE(e[0]),i=0;i<e.length;i++)for(var a=r?null:e[i],o=r?e[i]:e[i].ele,s=o._private.rscratch,l=s.imgLayerCaches=s.imgLayerCaches||{},u=GM;u<=KM;u++){var d=l[u];d&&(a&&n.getEleLevelForLayerLevel(d.level)!==a.level||t(d,o,a))}},XM.haveLayers=function(){for(var e=this,t=!1,n=GM;n<=KM;n++){var r=e.layersByLevel[n];if(r&&r.length>0){t=!0;break}}return t},XM.invalidateElements=function(e){var t=this;e.length!==0&&(t.lastInvalidationTime=XE(),!(e.length===0||!t.haveLayers())&&t.updateElementsInLayers(e,function(e,n,r){t.invalidateLayer(e)}))},XM.invalidateLayer=function(e){if(this.lastInvalidationTime=XE(),!e.invalid){var t=e.level,n=e.eles,r=this.layersByLevel[t];xD(r,e),e.elesQueue=[],e.invalid=!0,e.replacement&&(e.replacement.invalid=!0);for(var i=0;i<n.length;i++){var a=n[i]._private.rscratch.imgLayerCaches;a&&(a[t]=null)}}},XM.refineElementTextures=function(e){var t=this;t.updateElementsInLayers(e,function(e,n,r){var i=e.replacement;if(i||(i=e.replacement=t.makeLayer(e.bb,e.level),i.replaces=e,i.eles=e.eles),!i.reqs)for(var a=0;a<i.eles.length;a++)t.queueLayer(i,i.eles[a])})},XM.enqueueElementRefinement=function(e){this.eleTxrDeqs.merge(e),this.scheduleElementRefinement()},XM.queueLayer=function(e,t){var n=this.layersQueue,r=e.elesQueue,i=r.hasId=r.hasId||{};if(!e.replacement){if(t){if(i[t.id()])return;r.push(t),i[t.id()]=!0}e.reqs?(e.reqs++,n.updateItem(e)):(e.reqs=1,n.push(e))}},XM.dequeue=function(e){for(var t=this,n=t.layersQueue,r=[],i=0;i<BUe&&n.size()!==0;){var a=n.peek();if(a.replacement){n.pop();continue}if(a.replaces&&a!==a.replaces.replacement){n.pop();continue}if(a.invalid){n.pop();continue}var o=a.elesQueue.shift();o&&(t.drawEleInLayer(a,o,a.level,e),i++),r.length===0&&r.push(!0),a.elesQueue.length===0&&(n.pop(),a.reqs=0,a.replaces&&t.applyLayerReplacement(a),t.requestRedraw())}return r},XM.applyLayerReplacement=function(e){var t=this,n=t.layersByLevel[e.level],r=e.replaces,i=n.indexOf(r);if(!(i<0||r.invalid)){n[i]=e;for(var a=0;a<e.eles.length;a++){var o=e.eles[a]._private,s=o.imgLayerCaches=o.imgLayerCaches||{};s&&(s[e.level]=e)}t.requestRedraw()}},XM.requestRedraw=KE(function(){var e=this.renderer;e.redrawHint(`eles`,!0),e.redrawHint(`drag`,!0),e.redraw()},100),XM.setupDequeueing=IM.setupDequeueing({deqRedrawThreshold:PUe,deqCost:IUe,deqAvgCost:LUe,deqNoDrawCost:RUe,deqFastCost:zUe,deq:function(e,t){return e.dequeue(t)},onDeqd:pD,shouldRedraw:uD,priority:function(e){return e.renderer.beforeRenderPriorities.lyrTxrDeq}}),QM={},QM.arrowShapeImpl=function(e){return(WUe||={polygon:LLe,"triangle-backcurve":RLe,"triangle-tee":zLe,"circle-triangle":BLe,"triangle-cross":zLe,circle:VLe})[e]},$M={},$M.drawElement=function(e,t,n,r,i,a){var o=this;t.isNode()?o.drawNode(e,t,n,r,i,a):o.drawEdge(e,t,n,r,i,a)},$M.drawElementOverlay=function(e,t){var n=this;t.isNode()?n.drawNodeOverlay(e,t):n.drawEdgeOverlay(e,t)},$M.drawElementUnderlay=function(e,t){var n=this;t.isNode()?n.drawNodeUnderlay(e,t):n.drawEdgeUnderlay(e,t)},$M.drawCachedElementPortion=function(e,t,n,r,i,a,o,s){var l=this,u=n.getBoundingBox(t);if(u.w!==0&&u.h!==0){var d=n.getElement(t,u,r,i,a);if(d!=null){var f=s(l,t);if(f===0)return;var p=o(l,t),m=u.x1,h=u.y1,g=u.w,_=u.h,v,y,b,x,S;if(p!==0){var C=n.getRotationPoint(t);b=C.x,x=C.y,e.translate(b,x),e.rotate(p),S=l.getImgSmoothing(e),S||l.setImgSmoothing(e,!0);var w=n.getRotationOffset(t);v=w.x,y=w.y}else v=m,y=h;var T;f!==1&&(T=e.globalAlpha,e.globalAlpha=T*f),e.drawImage(d.texture.canvas,d.x,0,d.width,d.height,v,y,g,_),f!==1&&(e.globalAlpha=T),p!==0&&(e.rotate(-p),e.translate(-b,-x),S||l.setImgSmoothing(e,!1))}else n.drawElement(e,t)}},GUe=function(){return 0},KUe=function(e,t){return e.getTextAngle(t,null)},qUe=function(e,t){return e.getTextAngle(t,`source`)},JUe=function(e,t){return e.getTextAngle(t,`target`)},YUe=function(e,t){return t.effectiveOpacity()},eN=function(e,t){return t.pstyle(`text-opacity`).pfValue*t.effectiveOpacity()},$M.drawCachedElement=function(e,t,n,r,i,a){var o=this,s=o.data,l=s.eleTxrCache,u=s.lblTxrCache,d=s.slbTxrCache,f=s.tlbTxrCache,p=t.boundingBox(),m=a===!0?l.reasons.highQuality:null;if(!(p.w===0||p.h===0||!t.visible())&&(!r||ZD(p,r))){var h=t.isEdge(),g=t.element()._private.rscratch.badLine;o.drawElementUnderlay(e,t),o.drawCachedElementPortion(e,t,l,n,i,m,GUe,YUe),(!h||!g)&&o.drawCachedElementPortion(e,t,u,n,i,m,KUe,eN),h&&!g&&(o.drawCachedElementPortion(e,t,d,n,i,m,qUe,eN),o.drawCachedElementPortion(e,t,f,n,i,m,JUe,eN)),o.drawElementOverlay(e,t)}},$M.drawElements=function(e,t){for(var n=this,r=0;r<t.length;r++){var i=t[r];n.drawElement(e,i)}},$M.drawCachedElements=function(e,t,n,r){for(var i=this,a=0;a<t.length;a++){var o=t[a];i.drawCachedElement(e,o,n,r)}},$M.drawCachedNodes=function(e,t,n,r){for(var i=this,a=0;a<t.length;a++){var o=t[a];o.isNode()&&i.drawCachedElement(e,o,n,r)}},$M.drawLayeredElements=function(e,t,n,r){var i=this,a=i.data.lyrTxrCache.getLayers(t,n);if(a)for(var o=0;o<a.length;o++){var s=a[o],l=s.bb;l.w!==0&&l.h!==0&&e.drawImage(s.canvas,l.x1,l.y1,l.w,l.h)}else i.drawCachedElements(e,t,n,r)},tN={},tN.drawEdge=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s=t._private.rscratch;if(!(a&&!t.visible())&&!(s.badLine||s.allpts==null||isNaN(s.allpts[0]))){var l;n&&(l=n,e.translate(-l.x1,-l.y1));var u=a?t.pstyle(`opacity`).value:1,d=a?t.pstyle(`line-opacity`).value:1,f=t.pstyle(`curve-style`).value,p=t.pstyle(`line-style`).value,m=t.pstyle(`width`).pfValue,h=t.pstyle(`line-cap`).value,g=t.pstyle(`line-outline-width`).value,_=t.pstyle(`line-outline-color`).value,v=u*d,y=u*d,b=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;f===`straight-triangle`?(o.eleStrokeStyle(e,t,n),o.drawEdgeTrianglePath(t,e,s.allpts)):(e.lineWidth=m,e.lineCap=h,o.eleStrokeStyle(e,t,n),o.drawEdgePath(t,e,s.allpts,p),e.lineCap=`butt`)},x=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:v;if(e.lineWidth=m+g,e.lineCap=h,g>0)o.colorStrokeStyle(e,_[0],_[1],_[2],n);else{e.lineCap=`butt`;return}f===`straight-triangle`?o.drawEdgeTrianglePath(t,e,s.allpts):(o.drawEdgePath(t,e,s.allpts,p),e.lineCap=`butt`)},S=function(){i&&o.drawEdgeOverlay(e,t)},C=function(){i&&o.drawEdgeUnderlay(e,t)},w=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:y;o.drawArrowheads(e,t,n)},T=function(){o.drawElementText(e,t,null,r)};if(e.lineJoin=`round`,t.pstyle(`ghost`).value===`yes`){var E=t.pstyle(`ghost-offset-x`).pfValue,D=t.pstyle(`ghost-offset-y`).pfValue,O=v*t.pstyle(`ghost-opacity`).value;e.translate(E,D),b(O),w(O),e.translate(-E,-D)}else x();C(),b(),w(),S(),T(),n&&e.translate(l.x1,l.y1)}},nN=function(e){if(![`overlay`,`underlay`].includes(e))throw Error(`Invalid state`);return function(t,n){if(n.visible()){var r=n.pstyle(`${e}-opacity`).value;if(r!==0){var i=this,a=i.usePaths(),o=n._private.rscratch,s=2*n.pstyle(`${e}-padding`).pfValue,l=n.pstyle(`${e}-color`).value;t.lineWidth=s,t.lineCap=o.edgeType===`self`&&!a?`butt`:`round`,i.colorStrokeStyle(t,l[0],l[1],l[2],r),i.drawEdgePath(n,t,o.allpts,`solid`)}}}},tN.drawEdgeOverlay=nN(`overlay`),tN.drawEdgeUnderlay=nN(`underlay`),tN.drawEdgePath=function(e,t,n,r){var i=e._private.rscratch,a=t,o,s=!1,l=this.usePaths(),u=e.pstyle(`line-dash-pattern`).pfValue,d=e.pstyle(`line-dash-offset`).pfValue;if(l){var f=n.join(`$`);i.pathCacheKey&&i.pathCacheKey===f?(o=t=i.pathCache,s=!0):(o=t=new Path2D,i.pathCacheKey=f,i.pathCache=o)}if(a.setLineDash)switch(r){case`dotted`:a.setLineDash([1,1]);break;case`dashed`:a.setLineDash(u),a.lineDashOffset=d;break;case`solid`:a.setLineDash([])}if(!s&&!i.badLine)switch(t.beginPath&&t.beginPath(),t.moveTo(n[0],n[1]),i.edgeType){case`bezier`:case`self`:case`compound`:case`multibezier`:for(var p=2;p+3<n.length;p+=4)t.quadraticCurveTo(n[p],n[p+1],n[p+2],n[p+3]);break;case`straight`:case`haystack`:for(var m=2;m+1<n.length;m+=2)t.lineTo(n[m],n[m+1]);break;case`segments`:if(i.isRound){var h=sT(i.roundCorners),g;try{for(h.s();!(g=h.n()).done;){var _=g.value;PLe(t,_)}}catch(e){h.e(e)}finally{h.f()}t.lineTo(n[n.length-2],n[n.length-1])}else for(var v=2;v+1<n.length;v+=2)t.lineTo(n[v],n[v+1])}t=a,l?t.stroke(o):t.stroke(),t.setLineDash&&t.setLineDash([])},tN.drawEdgeTrianglePath=function(e,t,n){t.fillStyle=t.strokeStyle;for(var r=e.pstyle(`width`).pfValue,i=0;i+1<n.length;i+=2){var a=[n[i+2]-n[i],n[i+3]-n[i+1]],o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),s=[a[1]/o,-a[0]/o],l=[s[0]*r/2,s[1]*r/2];t.beginPath(),t.moveTo(n[i]-l[0],n[i+1]-l[1]),t.lineTo(n[i]+l[0],n[i+1]+l[1]),t.lineTo(n[i+2],n[i+3]),t.closePath(),t.fill()}},tN.drawArrowheads=function(e,t,n){var r=t._private.rscratch,i=r.edgeType===`haystack`;i||this.drawArrowhead(e,t,`source`,r.arrowStartX,r.arrowStartY,r.srcArrowAngle,n),this.drawArrowhead(e,t,`mid-target`,r.midX,r.midY,r.midtgtArrowAngle,n),this.drawArrowhead(e,t,`mid-source`,r.midX,r.midY,r.midsrcArrowAngle,n),i||this.drawArrowhead(e,t,`target`,r.arrowEndX,r.arrowEndY,r.tgtArrowAngle,n)},tN.drawArrowhead=function(e,t,n,r,i,a,o){if(!(isNaN(r)||r==null||isNaN(i)||i==null||isNaN(a)||a==null)){var s=this,l=t.pstyle(n+`-arrow-shape`).value;if(l!==`none`){var u=t.pstyle(n+`-arrow-fill`).value===`hollow`?`both`:`filled`,d=t.pstyle(n+`-arrow-fill`).value,f=t.pstyle(`width`).pfValue,p=t.pstyle(n+`-arrow-width`),m=p.value===`match-line`?f:p.pfValue;p.units===`%`&&(m*=f);var h=t.pstyle(`opacity`).value;o===void 0&&(o=h);var g=e.globalCompositeOperation;(o!==1||d===`hollow`)&&(e.globalCompositeOperation=`destination-out`,s.colorFillStyle(e,255,255,255,1),s.colorStrokeStyle(e,255,255,255,1),s.drawArrowShape(t,e,u,f,l,m,r,i,a),e.globalCompositeOperation=g);var _=t.pstyle(n+`-arrow-color`).value;s.colorFillStyle(e,_[0],_[1],_[2],o),s.colorStrokeStyle(e,_[0],_[1],_[2],o),s.drawArrowShape(t,e,d,f,l,m,r,i,a)}}},tN.drawArrowShape=function(e,t,n,r,i,a,o,s,l){var u=this,d=this.usePaths()&&i!==`triangle-cross`,f=!1,p,m=t,h={x:o,y:s},g=e.pstyle(`arrow-scale`).value,_=this.getArrowWidth(r,g),v=u.arrowShapes[i];if(d){var y=u.arrowPathCache=u.arrowPathCache||[],b=oD(i),x=y[b];x==null?(p=t=new Path2D,y[b]=p):(p=t=x,f=!0)}f||(t.beginPath&&t.beginPath(),d?v.draw(t,1,0,{x:0,y:0},1):v.draw(t,_,l,h,r),t.closePath&&t.closePath()),t=m,d&&(t.translate(o,s),t.rotate(l),t.scale(_,_)),(n===`filled`||n===`both`)&&(d?t.fill(p):t.fill()),(n===`hollow`||n===`both`)&&(t.lineWidth=a/(d?_:1),t.lineJoin=`miter`,d?t.stroke(p):t.stroke()),d&&(t.scale(1/_,1/_),t.rotate(-l),t.translate(-o,-s))},rN={},rN.safeDrawImage=function(e,t,n,r,i,a,o,s,l,u){if(!(i<=0||a<=0||l<=0||u<=0))try{e.drawImage(t,n,r,i,a,o,s,l,u)}catch(e){gD(e)}},rN.drawInscribedImage=function(e,t,n,r,i){var a=this,o=n.position(),s=o.x,l=o.y,u=n.cy().style(),d=u.getIndexedStyle.bind(u),f=d(n,`background-fit`,`value`,r),p=d(n,`background-repeat`,`value`,r),m=n.width(),h=n.height(),g=n.padding()*2,_=m+(d(n,`background-width-relative-to`,`value`,r)===`inner`?0:g),v=h+(d(n,`background-height-relative-to`,`value`,r)===`inner`?0:g),y=n._private.rscratch,b=d(n,`background-clip`,`value`,r)===`node`,x=d(n,`background-image-opacity`,`value`,r)*i,S=d(n,`background-image-smoothing`,`value`,r),C=n.pstyle(`corner-radius`).value;C!==`auto`&&(C=n.pstyle(`corner-radius`).pfValue);var w=t.width||t.cachedW,T=t.height||t.cachedH;(w==null||T==null)&&(document.body.appendChild(t),w=t.cachedW=t.width||t.offsetWidth,T=t.cachedH=t.height||t.offsetHeight,document.body.removeChild(t));var E=w,D=T;if(d(n,`background-width`,`value`,r)!==`auto`&&(E=d(n,`background-width`,`units`,r)===`%`?d(n,`background-width`,`pfValue`,r)*_:d(n,`background-width`,`pfValue`,r)),d(n,`background-height`,`value`,r)!==`auto`&&(D=d(n,`background-height`,`units`,r)===`%`?d(n,`background-height`,`pfValue`,r)*v:d(n,`background-height`,`pfValue`,r)),E!==0&&D!==0){if(f===`contain`){var O=Math.min(_/E,v/D);E*=O,D*=O}else if(f===`cover`){var O=Math.max(_/E,v/D);E*=O,D*=O}var k=s-_/2,A=d(n,`background-position-x`,`units`,r),j=d(n,`background-position-x`,`pfValue`,r);k+=A===`%`?(_-E)*j:j;var M=d(n,`background-offset-x`,`units`,r),N=d(n,`background-offset-x`,`pfValue`,r);k+=M===`%`?(_-E)*N:N;var P=l-v/2,F=d(n,`background-position-y`,`units`,r),I=d(n,`background-position-y`,`pfValue`,r);P+=F===`%`?(v-D)*I:I;var L=d(n,`background-offset-y`,`units`,r),R=d(n,`background-offset-y`,`pfValue`,r);P+=L===`%`?(v-D)*R:R,y.pathCache&&(k-=s,P-=l,s=0,l=0);var ee=e.globalAlpha;e.globalAlpha=x;var z=a.getImgSmoothing(e),B=!1;S===`no`&&z?(a.setImgSmoothing(e,!1),B=!0):S===`yes`&&!z&&(a.setImgSmoothing(e,!0),B=!0),p===`no-repeat`?(b&&(e.save(),y.pathCache?e.clip(y.pathCache):(a.nodeShapes[a.getNodeShape(n)].draw(e,s,l,_,v,C,y),e.clip())),a.safeDrawImage(e,t,0,0,w,T,k,P,E,D),b&&e.restore()):(e.fillStyle=e.createPattern(t,p),a.nodeShapes[a.getNodeShape(n)].draw(e,s,l,_,v,C,y),e.translate(k,P),e.fill(),e.translate(-k,-P)),e.globalAlpha=ee,B&&a.setImgSmoothing(e,z)}},iN={},iN.eleTextBiggerThanMin=function(e,t){if(!t){var n=e.cy().zoom(),r=this.getPixelRatio();t=2**Math.ceil(zD(n*r))}return!(e.pstyle(`font-size`).pfValue*t<e.pstyle(`min-zoomed-font-size`).pfValue)},iN.drawElementText=function(e,t,n,r,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this;if(r==null){if(a&&!o.eleTextBiggerThanMin(t))return}else if(r===!1)return;if(t.isNode()){var s=t.pstyle(`label`);if(!s||!s.value)return;var l=o.getLabelJustification(t),u=t.pstyle(`text-metrics`).strValue===`glyph`;e.textAlign=l,e.textBaseline=u?`alphabetic`:`bottom`}else{var d=t.element()._private.rscratch.badLine,f=t.pstyle(`label`),p=t.pstyle(`source-label`),m=t.pstyle(`target-label`);if(d||(!f||!f.value)&&(!p||!p.value)&&(!m||!m.value))return;e.textAlign=`center`,e.textBaseline=`bottom`}var h=!n,g;n&&(g=n,e.translate(-g.x1,-g.y1)),i==null?(o.drawText(e,t,null,h,a),t.isEdge()&&(o.drawText(e,t,`source`,h,a),o.drawText(e,t,`target`,h,a))):o.drawText(e,t,i,h,a),n&&e.translate(g.x1,g.y1)},iN.getFontCache=function(e){var t;this.fontCaches=this.fontCaches||[];for(var n=0;n<this.fontCaches.length;n++)if(t=this.fontCaches[n],t.context===e)return t;return t={context:e},this.fontCaches.push(t),t},iN.setupTextStyle=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=t.pstyle(`font-style`).strValue,i=t.pstyle(`font-size`).pfValue+`px`,a=t.pstyle(`font-family`).strValue,o=t.pstyle(`font-weight`).strValue,s=n?t.effectiveOpacity()*t.pstyle(`text-opacity`).value:1,l=t.pstyle(`text-outline-opacity`).value*s,u=t.pstyle(`color`).value,d=t.pstyle(`text-outline-color`).value;e.font=r+` `+o+` `+i+` `+a,e.lineJoin=`round`,this.colorFillStyle(e,u[0],u[1],u[2],s),this.colorStrokeStyle(e,d[0],d[1],d[2],l)},iN.getTextAngle=function(e,t){var n,r=e._private.rscratch,i=t?t+`-`:``,a=e.pstyle(i+`text-rotation`);if(a.strValue===`autorotate`){var o=CD(r,`labelAngle`,t);n=e.isEdge()?o:0}else n=a.strValue===`none`?0:a.pfValue;return n},iN.drawText=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=t._private.rscratch,o=i?t.effectiveOpacity():1;if(!(i&&(o===0||t.pstyle(`text-opacity`).value===0))){n===`main`&&(n=null);var s=CD(a,`labelX`,n),l=CD(a,`labelY`,n),u,d,f=this.getLabelText(t,n);if(f!=null&&f!==``&&!isNaN(s)&&!isNaN(l)){this.setupTextStyle(e,t,i);var p=n?n+`-`:``,m=CD(a,`labelWidth`,n),h=CD(a,`labelHeight`,n),g=CD(a,`labelActualDescent`,n),_=t.pstyle(p+`text-margin-x`).pfValue,v=t.pstyle(p+`text-margin-y`).pfValue,y=t.isEdge(),b=t.pstyle(`text-halign`).value,x=t.pstyle(`text-valign`).value;y&&(b=`center`,x=`center`),s+=_,l+=v;var S=r?this.getTextAngle(t,n):0;S!==0&&(u=s,d=l,e.translate(u,d),e.rotate(S),s=0,l=0);var C=DA(b),w=OA(x);switch(w){case`top`:break;case`center`:l+=h/2;break;case`bottom`:l+=h}var T=t.pstyle(`text-background-opacity`).value,E=t.pstyle(`text-border-opacity`).value,D=t.pstyle(`text-border-width`).pfValue,O=t.pstyle(`text-background-padding`).pfValue,k=t.pstyle(`text-background-shape`).strValue,A=k===`round-rectangle`||k===`roundrectangle`,j=k===`circle`,M=2;if(T>0||D>0&&E>0){var N=e.fillStyle,P=e.strokeStyle,F=e.lineWidth,I=t.pstyle(`text-background-color`).value,L=t.pstyle(`text-border-color`).value,R=t.pstyle(`text-border-style`).value,ee=T>0,z=D>0&&E>0,B=s-O;switch(C){case`left`:B-=m;break;case`center`:B-=m/2}var te=l-h-O,ne=m+2*O,re=h+2*O;if(ee&&(e.fillStyle=`rgba(${I[0]},${I[1]},${I[2]},${T*o})`),z&&(e.strokeStyle=`rgba(${L[0]},${L[1]},${L[2]},${E*o})`,e.lineWidth=D,e.setLineDash))switch(R){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`double`:e.lineWidth=D/4,e.setLineDash([]);break;default:e.setLineDash([])}if(A?(e.beginPath(),ULe(e,B,te,ne,re,M)):j?(e.beginPath(),HLe(e,B,te,ne,re)):(e.beginPath(),e.rect(B,te,ne,re)),ee&&e.fill(),z&&e.stroke(),z&&R===`double`){var ie=D/2;e.beginPath(),A?ULe(e,B+ie,te+ie,ne-2*ie,re-2*ie,M):e.rect(B+ie,te+ie,ne-2*ie,re-2*ie),e.stroke()}e.fillStyle=N,e.strokeStyle=P,e.lineWidth=F,e.setLineDash&&e.setLineDash([])}var ae=2*t.pstyle(`text-outline-width`).pfValue;if(ae>0&&(e.lineWidth=ae),l-=g,t.pstyle(`text-wrap`).value===`wrap`){var oe=CD(a,`labelWrapCachedLines`,n),se=CD(a,`labelLineHeight`,n),ce=m/2,le=this.getLabelJustification(t);switch(le===`auto`||(C===`left`?le===`left`?s+=-m:le===`center`&&(s+=-ce):C===`center`?le===`left`?s+=-ce:le===`right`&&(s+=ce):C===`right`&&(le===`center`?s+=ce:le===`right`&&(s+=m))),w){case`top`:l-=(oe.length-1)*se;break;case`center`:case`bottom`:l-=(oe.length-1)*se}for(var ue=0;ue<oe.length;ue++)ae>0&&e.strokeText(oe[ue],s,l),e.fillText(oe[ue],s,l),l+=se}else ae>0&&e.strokeText(f,s,l),e.fillText(f,s,l);S!==0&&(e.rotate(-S),e.translate(-u,-d))}}},aN={},aN.drawNode=function(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0,o=this,s,l,u=t._private,d=u.rscratch,f=t.position();if(!(!uE(f.x)||!uE(f.y))&&!(a&&!t.visible())){var p=a?t.effectiveOpacity():1,m=o.usePaths(),h,g=!1,_=t.padding();s=t.width()+2*_,l=t.height()+2*_;var v;n&&(v=n,e.translate(-v.x1,-v.y1));for(var y=t.pstyle(`background-image`).value,b=Array(y.length),x=Array(y.length),S=0,C=0;C<y.length;C++){var w=y[C];if(b[C]=w!=null&&w!==`none`){var T=t.cy().style().getIndexedStyle(t,`background-image-crossorigin`,`value`,C);S++,x[C]=o.getCachedImage(w,T,function(){u.backgroundTimestamp=Date.now(),t.emitAndNotify(`background`)})}}var E=t.pstyle(`background-blacken`).value,D=t.pstyle(`border-width`).pfValue,O=t.pstyle(`background-opacity`).value*p,k=t.pstyle(`border-color`).value,A=t.pstyle(`border-style`).value,j=t.pstyle(`border-join`).value,M=t.pstyle(`border-cap`).value,N=t.pstyle(`border-position`).value,P=t.pstyle(`border-dash-pattern`).pfValue,F=t.pstyle(`border-dash-offset`).pfValue,I=t.pstyle(`border-opacity`).value*p,L=t.pstyle(`outline-width`).pfValue,R=t.pstyle(`outline-color`).value,ee=t.pstyle(`outline-style`).value,z=t.pstyle(`outline-opacity`).value*p,B=t.pstyle(`outline-offset`).value,te=t.pstyle(`corner-radius`).value;te!==`auto`&&(te=t.pstyle(`corner-radius`).pfValue);var ne=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:O;o.eleFillStyle(e,t,n)},re=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:I;o.colorStrokeStyle(e,k[0],k[1],k[2],t)},ie=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:z;o.colorStrokeStyle(e,R[0],R[1],R[2],t)},ae=function(e,t,n,r){var i=o.nodePathCache=o.nodePathCache||[],a=sD(n===`polygon`?n+`,`+r.join(`,`):n,``+t,``+e,``+te),s=i[a],l,u=!1;return s==null?(l=new Path2D,i[a]=d.pathCache=l):(l=s,u=!0,d.pathCache=l),{path:l,cacheHit:u}},oe=t.pstyle(`shape`).strValue,se=t.pstyle(`shape-polygon-points`).pfValue;if(m){e.translate(f.x,f.y);var ce=ae(s,l,oe,se);h=ce.path,g=ce.cacheHit}var le=function(){if(!g){var n=f;m&&(n={x:0,y:0}),o.nodeShapes[o.getNodeShape(t)].draw(h||e,n.x,n.y,s,l,te,d)}m?e.fill(h):e.fill()},ue=function(){for(var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,i=u.backgrounding,a=0,s=0;s<x.length;s++){var l=t.cy().style().getIndexedStyle(t,`background-image-containment`,`value`,s);if(r&&l===`over`||!r&&l===`inside`){a++;continue}b[s]&&x[s].complete&&!x[s].error&&(a++,o.drawInscribedImage(e,x[s],t,s,n))}u.backgrounding=a!==S,i!==u.backgrounding&&t.updateStyle(!1)},de=function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasPie(t)&&(o.drawPie(e,t,r),n&&(m||o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,s,l,te,d)))},fe=function(){var n=arguments.length>0&&arguments[0]!==void 0&&arguments[0],r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p;o.hasStripe(t)&&(e.save(),m?e.clip(d.pathCache):(o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,s,l,te,d),e.clip()),o.drawStripe(e,t,r),e.restore(),n&&(m||o.nodeShapes[o.getNodeShape(t)].draw(e,f.x,f.y,s,l,te,d)))},pe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p,n=(E>0?E:-E)*t,r=E>0?0:255;E!==0&&(o.colorFillStyle(e,r,r,r,n),m?e.fill(h):e.fill())},me=function(){if(D>0){if(e.lineWidth=D,e.lineCap=M,e.lineJoin=j,e.setLineDash)switch(A){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash(P),e.lineDashOffset=F;break;case`solid`:case`double`:e.setLineDash([])}if(N!==`center`){if(e.save(),e.lineWidth*=2,N===`inside`)m?e.clip(h):e.clip();else{var t=new Path2D;t.rect(-s/2-D,-l/2-D,s+2*D,l+2*D),t.addPath(h),e.clip(t,`evenodd`)}m?e.stroke(h):e.stroke(),e.restore()}else m?e.stroke(h):e.stroke();if(A===`double`){e.lineWidth=D/3;var n=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,m?e.stroke(h):e.stroke(),e.globalCompositeOperation=n}e.setLineDash&&e.setLineDash([])}},he=function(){if(L>0){if(e.lineWidth=L,e.lineCap=`butt`,e.setLineDash)switch(ee){case`dotted`:e.setLineDash([1,1]);break;case`dashed`:e.setLineDash([4,2]);break;case`solid`:case`double`:e.setLineDash([])}var n=f;m&&(n={x:0,y:0});var r=o.getNodeShape(t),i=D;N===`inside`&&(i=0),N===`outside`&&(i*=2);var a=(s+i+(L+B))/s,u=(l+i+(L+B))/l,d=s*a,p=l*u,h=o.nodeShapes[r].points,g;if(m&&(g=ae(d,p,r,h).path),r===`ellipse`)o.drawEllipsePath(g||e,n.x,n.y,d,p);else if([`round-diamond`,`round-heptagon`,`round-hexagon`,`round-octagon`,`round-pentagon`,`round-polygon`,`round-triangle`,`round-tag`].includes(r)){var _=0,v=0,y=0;r===`round-diamond`?_=(i+B+L)*1.4:r===`round-heptagon`?(_=(i+B+L)*1.075,y=-(i/2+B+L)/35):r===`round-hexagon`?_=(i+B+L)*1.12:r===`round-pentagon`?(_=(i+B+L)*1.13,y=-(i/2+B+L)/15):r===`round-tag`?(_=(i+B+L)*1.12,v=(i/2+L+B)*.07):r===`round-triangle`&&(_=(i+B+L)*(Math.PI/2),y=-(i+B/2+L)/Math.PI),_!==0&&(a=(s+_)/s,d=s*a,[`round-hexagon`,`round-tag`].includes(r)||(u=(l+_)/l,p=l*u)),te=te===`auto`?gO(d,p):te;for(var b=d/2,x=p/2,S=te+(i+L+B)/2,C=Array(h.length/2),w=Array(h.length/2),T=0;T<h.length/2;T++)C[T]={x:n.x+v+b*h[T*2],y:n.y+y+x*h[T*2+1]};var E,O,k,A,j=C.length;for(O=C[j-1],E=0;E<j;E++)k=C[E%j],A=C[(E+1)%j],w[E]=BT(O,k,A,S),O=k,k=A;o.drawRoundPolygonPath(g||e,n.x+v,n.y+y,s*a,l*u,h,w)}else if([`roundrectangle`,`round-rectangle`].includes(r))te=te===`auto`?hO(d,p):te,o.drawRoundRectanglePath(g||e,n.x,n.y,d,p,te+(i+L+B)/2);else if([`cutrectangle`,`cut-rectangle`].includes(r))te=te===`auto`?_O():te,o.drawCutRectanglePath(g||e,n.x,n.y,d,p,null,te+(i+L+B)/4);else if([`bottomroundrectangle`,`bottom-round-rectangle`].includes(r))te=te===`auto`?hO(d,p):te,o.drawBottomRoundRectanglePath(g||e,n.x,n.y,d,p,te+(i+L+B)/2);else if(r===`barrel`)o.drawBarrelPath(g||e,n.x,n.y,d,p);else if(r.startsWith(`polygon`)||[`rhomboid`,`right-rhomboid`,`round-tag`,`tag`,`vee`].includes(r)){var M=(i+L+B)/s;h=iO(aO(h,M)),o.drawPolygonPath(g||e,n.x,n.y,s,l,h)}else{var P=(i+L+B)/s;h=iO(aO(h,-P)),o.drawPolygonPath(g||e,n.x,n.y,s,l,h)}if(m?e.stroke(g):e.stroke(),ee===`double`){e.lineWidth=i/3;var F=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,m?e.stroke(g):e.stroke(),e.globalCompositeOperation=F}e.setLineDash&&e.setLineDash([])}},ge=function(){i&&o.drawNodeOverlay(e,t,f,s,l)},_e=function(){i&&o.drawNodeUnderlay(e,t,f,s,l)},ve=function(){o.drawElementText(e,t,null,r)};if(t.pstyle(`ghost`).value===`yes`){var ye=t.pstyle(`ghost-offset-x`).pfValue,be=t.pstyle(`ghost-offset-y`).pfValue,xe=t.pstyle(`ghost-opacity`).value,Se=xe*p;e.translate(ye,be),ie(),he(),ne(xe*O),le(),ue(Se,!0),re(xe*I),me(),de(E!==0||D!==0),fe(E!==0||D!==0),ue(Se,!1),pe(Se),e.translate(-ye,-be)}m&&e.translate(-f.x,-f.y),_e(),m&&e.translate(f.x,f.y),ie(),he(),ne(),le(),ue(p,!0),re(),me(),de(E!==0||D!==0),fe(E!==0||D!==0),ue(p,!1),pe(),m&&e.translate(-f.x,-f.y),ve(),ge(),n&&e.translate(v.x1,v.y1)}},oN=function(e){if(![`overlay`,`underlay`].includes(e))throw Error(`Invalid state`);return function(t,n,r,i,a){var o=this;if(n.visible()){var s=n.pstyle(`${e}-padding`).pfValue,l=n.pstyle(`${e}-opacity`).value,u=n.pstyle(`${e}-color`).value,d=n.pstyle(`${e}-shape`).value,f=n.pstyle(`${e}-corner-radius`).value;if(l>0){if(r||=n.position(),i==null||a==null){var p=n.padding();i=n.width()+2*p,a=n.height()+2*p}o.colorFillStyle(t,u[0],u[1],u[2],l),o.nodeShapes[d].draw(t,r.x,r.y,i+s*2,a+s*2,f),t.fill()}}}},aN.drawNodeOverlay=oN(`overlay`),aN.drawNodeUnderlay=oN(`underlay`),aN.hasPie=function(e){return e=e[0],e._private.hasPie},aN.hasStripe=function(e){return e=e[0],e._private.hasStripe},aN.drawPie=function(e,t,n,r){t=t[0],r||=t.position();var i=t.cy().style(),a=t.pstyle(`pie-size`),o=t.pstyle(`pie-hole`),s=t.pstyle(`pie-start-angle`).pfValue,l=r.x,u=r.y,d=t.width(),f=t.height(),p=Math.min(d,f)/2,m,h=0;if(this.usePaths()&&(l=0,u=0),a.units===`%`?p*=a.pfValue:a.pfValue!==void 0&&(p=a.pfValue/2),o.units===`%`?m=p*o.pfValue:o.pfValue!==void 0&&(m=o.pfValue/2),!(m>=p))for(var g=1;g<=i.pieBackgroundN;g++){var _=t.pstyle(`pie-`+g+`-background-size`).value,v=t.pstyle(`pie-`+g+`-background-color`).value,y=t.pstyle(`pie-`+g+`-background-opacity`).value*n,b=_/100;b+h>1&&(b=1-h);var x=1.5*Math.PI+2*Math.PI*h;x+=s;var S=2*Math.PI*b,C=x+S;_===0||h>=1||h+b>1||(m===0?(e.beginPath(),e.moveTo(l,u),e.arc(l,u,p,x,C),e.closePath()):(e.beginPath(),e.arc(l,u,p,x,C),e.arc(l,u,m,C,x,!0),e.closePath()),this.colorFillStyle(e,v[0],v[1],v[2],y),e.fill(),h+=b)}},aN.drawStripe=function(e,t,n,r){t=t[0],r||=t.position();var i=t.cy().style(),a=r.x,o=r.y,s=t.width(),l=t.height(),u=0,d=this.usePaths();e.save();var f=t.pstyle(`stripe-direction`).value,p=t.pstyle(`stripe-size`);switch(f){case`vertical`:break;case`righward`:e.rotate(-Math.PI/2)}var m=s,h=l;p.units===`%`?(m*=p.pfValue,h*=p.pfValue):p.pfValue!==void 0&&(m=p.pfValue,h=p.pfValue),d&&(a=0,o=0),o-=m/2,a-=h/2;for(var g=1;g<=i.stripeBackgroundN;g++){var _=t.pstyle(`stripe-`+g+`-background-size`).value,v=t.pstyle(`stripe-`+g+`-background-color`).value,y=t.pstyle(`stripe-`+g+`-background-opacity`).value*n,b=_/100;b+u>1&&(b=1-u),!(_===0||u>=1||u+b>1)&&(e.beginPath(),e.rect(a,o+h*u,m,h*b),e.closePath(),this.colorFillStyle(e,v[0],v[1],v[2],y),e.fill(),u+=b)}e.restore()},sN={},XUe=100,sN.getPixelRatio=function(){var e=this.data.contexts[0];if(this.forcedPixelRatio!=null)return this.forcedPixelRatio;var t=this.cy.window(),n=e.backingStorePixelRatio||e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return(t.devicePixelRatio||1)/n},sN.paintCache=function(e){for(var t=this.paintCaches=this.paintCaches||[],n=!0,r,i=0;i<t.length;i++)if(r=t[i],r.context===e){n=!1;break}return n&&(r={context:e},t.push(r)),r},sN.createGradientStyleFor=function(e,t,n,r,i){var a,o=this.usePaths(),s=n.pstyle(t+`-gradient-stop-colors`).value,l=n.pstyle(t+`-gradient-stop-positions`).pfValue;if(r===`radial-gradient`){if(n.isEdge()){var u=n.sourceEndpoint(),d=n.targetEndpoint(),f=n.midpoint(),p=VD(u,f),m=VD(d,f);a=e.createRadialGradient(f.x,f.y,0,f.x,f.y,Math.max(p,m))}else{var h=o?{x:0,y:0}:n.position(),g=n.paddedWidth(),_=n.paddedHeight();a=e.createRadialGradient(h.x,h.y,0,h.x,h.y,Math.max(g,_))}}else if(n.isEdge()){var v=n.sourceEndpoint(),y=n.targetEndpoint();a=e.createLinearGradient(v.x,v.y,y.x,y.y)}else{var b=o?{x:0,y:0}:n.position(),x=n.paddedWidth(),S=n.paddedHeight(),C=x/2,w=S/2;switch(n.pstyle(`background-gradient-direction`).value){case`to-bottom`:a=e.createLinearGradient(b.x,b.y-w,b.x,b.y+w);break;case`to-top`:a=e.createLinearGradient(b.x,b.y+w,b.x,b.y-w);break;case`to-left`:a=e.createLinearGradient(b.x+C,b.y,b.x-C,b.y);break;case`to-right`:a=e.createLinearGradient(b.x-C,b.y,b.x+C,b.y);break;case`to-bottom-right`:case`to-right-bottom`:a=e.createLinearGradient(b.x-C,b.y-w,b.x+C,b.y+w);break;case`to-top-right`:case`to-right-top`:a=e.createLinearGradient(b.x-C,b.y+w,b.x+C,b.y-w);break;case`to-bottom-left`:case`to-left-bottom`:a=e.createLinearGradient(b.x+C,b.y-w,b.x-C,b.y+w);break;case`to-top-left`:case`to-left-top`:a=e.createLinearGradient(b.x+C,b.y+w,b.x-C,b.y-w)}}if(!a)return null;for(var T=l.length===s.length,E=s.length,D=0;D<E;D++)a.addColorStop(T?l[D]:D/(E-1),`rgba(`+s[D][0]+`,`+s[D][1]+`,`+s[D][2]+`,`+i+`)`);return a},sN.gradientFillStyle=function(e,t,n,r){var i=this.createGradientStyleFor(e,`background`,t,n,r);if(!i)return null;e.fillStyle=i},sN.colorFillStyle=function(e,t,n,r,i){e.fillStyle=`rgba(`+t+`,`+n+`,`+r+`,`+i+`)`},sN.eleFillStyle=function(e,t,n){var r=t.pstyle(`background-fill`).value;if(r===`linear-gradient`||r===`radial-gradient`)this.gradientFillStyle(e,t,r,n);else{var i=t.pstyle(`background-color`).value;this.colorFillStyle(e,i[0],i[1],i[2],n)}},sN.gradientStrokeStyle=function(e,t,n,r){var i=this.createGradientStyleFor(e,`line`,t,n,r);if(!i)return null;e.strokeStyle=i},sN.colorStrokeStyle=function(e,t,n,r,i){e.strokeStyle=`rgba(`+t+`,`+n+`,`+r+`,`+i+`)`},sN.eleStrokeStyle=function(e,t,n){var r=t.pstyle(`line-fill`).value;if(r===`linear-gradient`||r===`radial-gradient`)this.gradientStrokeStyle(e,t,r,n);else{var i=t.pstyle(`line-color`).value;this.colorStrokeStyle(e,i[0],i[1],i[2],n)}},sN.matchCanvasSize=function(e){var t=this,n=t.data,r=t.findContainerClientCoords(),i=r[2],a=r[3],o=t.getPixelRatio(),s=t.motionBlurPxRatio;(e===t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE]||e===t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG])&&(o=s);var l=i*o,u=a*o,d;if(l!==t.canvasWidth||u!==t.canvasHeight){t.fontCaches=null;var f=n.canvasContainer;f.style.width=i+`px`,f.style.height=a+`px`;for(var p=0;p<t.CANVAS_LAYERS;p++)d=n.canvases[p],d.width=l,d.height=u,d.style.width=i+`px`,d.style.height=a+`px`;for(var p=0;p<t.BUFFER_COUNT;p++)d=n.bufferCanvases[p],d.width=l,d.height=u,d.style.width=i+`px`,d.style.height=a+`px`;t.textureMult=1,o<=1&&(d=n.bufferCanvases[t.TEXTURE_BUFFER],t.textureMult=2,d.width=l*t.textureMult,d.height=u*t.textureMult),t.canvasWidth=l,t.canvasHeight=u,t.pixelRatio=o}},sN.renderTo=function(e,t,n,r){this.render({forcedContext:e,forcedZoom:t,forcedPan:n,drawAllLayers:!0,forcedPxRatio:r})},sN.clearCanvas=function(){var e=this,t=e.data;function n(t){t.clearRect(0,0,e.canvasWidth,e.canvasHeight)}n(t.contexts[e.NODE]),n(t.contexts[e.DRAG])},sN.render=function(e){var t=this;e||=yD();var n=t.cy,r=e.forcedContext,i=e.drawAllLayers,a=e.drawOnlyNodeLayer,o=e.forcedZoom,s=e.forcedPan,l=e.forcedPxRatio===void 0?this.getPixelRatio():e.forcedPxRatio,u=t.data,d=u.canvasNeedsRedraw,f=t.textureOnViewport&&!r&&(t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming),p=e.motionBlur===void 0?t.motionBlur:e.motionBlur,m=t.motionBlurPxRatio,h=n.hasCompoundNodes(),g=t.hoverData.draggingEles,_=!!(t.hoverData.selecting||t.touchData.selecting);p=p&&!r&&t.motionBlurEnabled&&!_;var v=p;r||(t.prevPxRatio!==l&&(t.invalidateContainerClientCoordsCache(),t.matchCanvasSize(t.container),t.redrawHint(`eles`,!0),t.redrawHint(`drag`,!0)),t.prevPxRatio=l),!r&&t.motionBlurTimeout&&clearTimeout(t.motionBlurTimeout),p&&(t.mbFrames??=0,t.mbFrames++,t.mbFrames<3&&(v=!1),t.mbFrames>t.minMbLowQualFrames&&(t.motionBlurPxRatio=t.mbPxRBlurry)),t.clearingMotionBlur&&(t.motionBlurPxRatio=1),t.textureDrawLastFrame&&!f&&(d[t.NODE]=!0,d[t.SELECT_BOX]=!0);var y=n.style(),b=n.zoom(),x=o===void 0?b:o,S=n.pan(),C={x:S.x,y:S.y},w={zoom:b,pan:{x:S.x,y:S.y}},T=t.prevViewport;T!==void 0&&w.zoom===T.zoom&&w.pan.x===T.pan.x&&w.pan.y===T.pan.y&&!(g&&!h)&&(t.motionBlurPxRatio=1),s&&(C=s),x*=l,C.x*=l,C.y*=l;var E=t.getCachedZSortedEles();function D(e,n,r,i,a){var o=e.globalCompositeOperation;e.globalCompositeOperation=`destination-out`,t.colorFillStyle(e,255,255,255,t.motionBlurTransparency),e.fillRect(n,r,i,a),e.globalCompositeOperation=o}function O(e,n){var a,l,d,f;!t.clearingMotionBlur&&(e===u.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]||e===u.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG])?(a={x:S.x*m,y:S.y*m},l=b*m,d=t.canvasWidth*m,f=t.canvasHeight*m):(a=C,l=x,d=t.canvasWidth,f=t.canvasHeight),e.setTransform(1,0,0,1,0,0),n===`motionBlur`?D(e,0,0,d,f):!r&&(n===void 0||n)&&e.clearRect(0,0,d,f),i||(e.translate(a.x,a.y),e.scale(l,l)),s&&e.translate(s.x,s.y),o&&e.scale(o,o)}if(f||(t.textureDrawLastFrame=!1),f){if(t.textureDrawLastFrame=!0,!t.textureCache){t.textureCache={},t.textureCache.bb=n.mutableElements().boundingBox(),t.textureCache.texture=t.data.bufferCanvases[t.TEXTURE_BUFFER];var k=t.data.bufferContexts[t.TEXTURE_BUFFER];k.setTransform(1,0,0,1,0,0),k.clearRect(0,0,t.canvasWidth*t.textureMult,t.canvasHeight*t.textureMult),t.render({forcedContext:k,drawOnlyNodeLayer:!0,forcedPxRatio:l*t.textureMult});var w=t.textureCache.viewport={zoom:n.zoom(),pan:n.pan(),width:t.canvasWidth,height:t.canvasHeight};w.mpan={x:(0-w.pan.x)/w.zoom,y:(0-w.pan.y)/w.zoom}}d[t.DRAG]=!1,d[t.NODE]=!1;var A=u.contexts[t.NODE],j=t.textureCache.texture,w=t.textureCache.viewport;A.setTransform(1,0,0,1,0,0),p?D(A,0,0,w.width,w.height):A.clearRect(0,0,w.width,w.height);var M=y.core(`outside-texture-bg-color`).value,N=y.core(`outside-texture-bg-opacity`).value;t.colorFillStyle(A,M[0],M[1],M[2],N),A.fillRect(0,0,w.width,w.height);var b=n.zoom();O(A,!1),A.clearRect(w.mpan.x,w.mpan.y,w.width/w.zoom/l,w.height/w.zoom/l),A.drawImage(j,w.mpan.x,w.mpan.y,w.width/w.zoom/l,w.height/w.zoom/l)}else t.textureOnViewport&&!r&&(t.textureCache=null);var P=n.extent(),F=t.pinching||t.hoverData.dragging||t.swipePanning||t.data.wheelZooming||t.hoverData.draggingEles||t.cy.animated(),I=t.hideEdgesOnViewport&&F,L=[];if(L[t.NODE]=!d[t.NODE]&&p&&!t.clearedForMotionBlur[t.NODE]||t.clearingMotionBlur,L[t.NODE]&&(t.clearedForMotionBlur[t.NODE]=!0),L[t.DRAG]=!d[t.DRAG]&&p&&!t.clearedForMotionBlur[t.DRAG]||t.clearingMotionBlur,L[t.DRAG]&&(t.clearedForMotionBlur[t.DRAG]=!0),d[t.NODE]||i||a||L[t.NODE]){var R=p&&!L[t.NODE]&&m!==1,A=r||(R?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_NODE]:u.contexts[t.NODE]);O(A,p&&!R?`motionBlur`:void 0),I?t.drawCachedNodes(A,E.nondrag,l,P):t.drawLayeredElements(A,E.nondrag,l,P),t.debug&&t.drawDebugPoints(A,E.nondrag),!i&&!p&&(d[t.NODE]=!1)}if(!a&&(d[t.DRAG]||i||L[t.DRAG])){var R=p&&!L[t.DRAG]&&m!==1,A=r||(R?t.data.bufferContexts[t.MOTIONBLUR_BUFFER_DRAG]:u.contexts[t.DRAG]);O(A,p&&!R?`motionBlur`:void 0),I?t.drawCachedNodes(A,E.drag,l,P):t.drawCachedElements(A,E.drag,l,P),t.debug&&t.drawDebugPoints(A,E.drag),!i&&!p&&(d[t.DRAG]=!1)}if(this.drawSelectionRectangle(e,O),p&&m!==1){var ee=u.contexts[t.NODE],z=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_NODE],B=u.contexts[t.DRAG],te=t.data.bufferCanvases[t.MOTIONBLUR_BUFFER_DRAG],ne=function(e,n,r){e.setTransform(1,0,0,1,0,0),r||!v?e.clearRect(0,0,t.canvasWidth,t.canvasHeight):D(e,0,0,t.canvasWidth,t.canvasHeight);var i=m;e.drawImage(n,0,0,t.canvasWidth*i,t.canvasHeight*i,0,0,t.canvasWidth,t.canvasHeight)};(d[t.NODE]||L[t.NODE])&&(ne(ee,z,L[t.NODE]),d[t.NODE]=!1),(d[t.DRAG]||L[t.DRAG])&&(ne(B,te,L[t.DRAG]),d[t.DRAG]=!1)}t.prevViewport=w,t.clearingMotionBlur&&(t.clearingMotionBlur=!1,t.motionBlurCleared=!0,t.motionBlur=!0),p&&(t.motionBlurTimeout=setTimeout(function(){t.motionBlurTimeout=null,t.clearedForMotionBlur[t.NODE]=!1,t.clearedForMotionBlur[t.DRAG]=!1,t.motionBlur=!1,t.clearingMotionBlur=!f,t.mbFrames=0,d[t.NODE]=!0,d[t.DRAG]=!0,t.redraw()},XUe)),r||n.emit(`render`)},sN.drawSelectionRectangle=function(e,t){var n=this,r=n.cy,i=n.data,a=r.style(),o=e.drawOnlyNodeLayer,s=e.drawAllLayers,l=i.canvasNeedsRedraw,u=e.forcedContext;if(n.showFps||!o&&l[n.SELECT_BOX]&&!s){var d=u||i.contexts[n.SELECT_BOX];if(t(d),n.selection[4]==1&&(n.hoverData.selecting||n.touchData.selecting)){var f=n.cy.zoom(),p=a.core(`selection-box-border-width`).value/f;d.lineWidth=p,d.fillStyle=`rgba(`+a.core(`selection-box-color`).value[0]+`,`+a.core(`selection-box-color`).value[1]+`,`+a.core(`selection-box-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,d.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),p>0&&(d.strokeStyle=`rgba(`+a.core(`selection-box-border-color`).value[0]+`,`+a.core(`selection-box-border-color`).value[1]+`,`+a.core(`selection-box-border-color`).value[2]+`,`+a.core(`selection-box-opacity`).value+`)`,d.strokeRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]))}if(i.bgActivePosistion&&!n.hoverData.selecting){var f=n.cy.zoom(),m=i.bgActivePosistion;d.fillStyle=`rgba(`+a.core(`active-bg-color`).value[0]+`,`+a.core(`active-bg-color`).value[1]+`,`+a.core(`active-bg-color`).value[2]+`,`+a.core(`active-bg-opacity`).value+`)`,d.beginPath(),d.arc(m.x,m.y,a.core(`active-bg-size`).pfValue/f,0,2*Math.PI),d.fill()}var h=n.lastRedrawTime;if(n.showFps&&h){h=Math.round(h);var g=Math.round(1e3/h),_=`1 frame = `+h+` ms = `+g+` fps`;d.setTransform(1,0,0,1,0,0),d.fillStyle=`rgba(255, 0, 0, 0.75)`,d.strokeStyle=`rgba(255, 0, 0, 0.75)`,d.font=`30px Arial`,cN||=d.measureText(_).actualBoundingBoxAscent,d.fillText(_,0,cN),d.strokeRect(0,cN+10,250,20),d.fillRect(0,cN+10,250*Math.min(g/60,1),20)}s||(l[n.SELECT_BOX]=!1)}},lN=typeof Float32Array<`u`?Float32Array:Array,Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),ZUe=function(){function e(t,n,r,i){aT(this,e),this.debugID=Math.floor(Math.random()*1e4),this.r=t,this.texSize=n,this.texRows=r,this.texHeight=Math.floor(n/r),this.enableWrapping=!0,this.locked=!1,this.texture=null,this.needsBuffer=!0,this.freePointer={x:0,row:0},this.keyToLocation=new Map,this.canvas=i(t,n,n),this.scratch=i(t,n,this.texHeight,`scratch`)}return oT(e,[{key:`lock`,value:function(){this.locked=!0}},{key:`getKeys`,value:function(){return new Set(this.keyToLocation.keys())}},{key:`getScale`,value:function(e){var t=e.w,n=e.h,r=this.texHeight,i=this.texSize,a=r/n,o=t*a,s=n*a;return o>i&&(a=i/t,o=t*a,s=n*a),{scale:a,texW:o,texH:s}}},{key:`draw`,value:function(e,t,n){var r=this;if(this.locked)throw Error(`can't draw, atlas is locked`);var i=this.texSize,a=this.texRows,o=this.texHeight,s=this.getScale(t),l=s.scale,u=s.texW,d=s.texH,f=function(e,r){if(n&&r){var i=r.context,a=e.x,s=e.row,u=a,d=o*s;i.save(),i.translate(u,d),i.scale(l,l),n(i,t),i.restore()}},p=[null,null],m=function(){f(r.freePointer,r.canvas),p[0]={x:r.freePointer.x,y:r.freePointer.row*o,w:u,h:d},p[1]={x:r.freePointer.x+u,y:r.freePointer.row*o,w:0,h:d},r.freePointer.x+=u,r.freePointer.x==i&&(r.freePointer.x=0,r.freePointer.row++)},h=function(){var e=r.scratch,t=r.canvas;e.clear(),f({x:0,row:0},e);var n=i-r.freePointer.x,a=u-n,s=o,l=r.freePointer.x,m=r.freePointer.row*o,h=n;t.context.drawImage(e,0,0,h,s,l,m,h,s),p[0]={x:l,y:m,w:h,h:d};var g=n,_=(r.freePointer.row+1)*o,v=a;t&&t.context.drawImage(e,g,0,v,s,0,_,v,s),p[1]={x:0,y:_,w:v,h:d},r.freePointer.x=a,r.freePointer.row++},g=function(){r.freePointer.x=0,r.freePointer.row++};if(this.freePointer.x+u<=i)m();else if(this.freePointer.row>=a-1)return!1;else this.freePointer.x===i?(g(),m()):this.enableWrapping?h():(g(),m());return this.keyToLocation.set(e,p),this.needsBuffer=!0,p}},{key:`getOffsets`,value:function(e){return this.keyToLocation.get(e)}},{key:`isEmpty`,value:function(){return this.freePointer.x===0&&this.freePointer.row===0}},{key:`canFit`,value:function(e){if(this.locked)return!1;var t=this.texSize,n=this.texRows,r=this.getScale(e).texW;return this.freePointer.x+r>t?this.freePointer.row<n-1:!0}},{key:`bufferIfNeeded`,value:function(e){this.texture||=QLe(e,this.debugID),this.needsBuffer&&(this.texture.buffer(this.canvas),this.needsBuffer=!1,this.locked&&(this.canvas=null,this.scratch=null))}},{key:`dispose`,value:function(){this.texture&&=(this.texture.deleteTexture(),null),this.canvas=null,this.scratch=null,this.locked=!0}}])}(),QUe=function(){function e(t,n,r,i){aT(this,e),this.r=t,this.texSize=n,this.texRows=r,this.createTextureCanvas=i,this.atlases=[],this.styleKeyToAtlas=new Map,this.markedKeys=new Set}return oT(e,[{key:`getKeys`,value:function(){return new Set(this.styleKeyToAtlas.keys())}},{key:`_createAtlas`,value:function(){var e=this.r,t=this.texSize,n=this.texRows,r=this.createTextureCanvas;return new ZUe(e,t,n,r)}},{key:`_getScratchCanvas`,value:function(){if(!this.scratch){var e=this.r,t=this.texSize,n=this.texRows,r=this.createTextureCanvas,i=Math.floor(t/n);this.scratch=r(e,t,i,`scratch`)}return this.scratch}},{key:`draw`,value:function(e,t,n){var r=this.styleKeyToAtlas.get(e);return r||(r=this.atlases[this.atlases.length-1],(!r||!r.canFit(t))&&(r&&r.lock(),r=this._createAtlas(),this.atlases.push(r)),r.draw(e,t,n),this.styleKeyToAtlas.set(e,r)),r}},{key:`getAtlas`,value:function(e){return this.styleKeyToAtlas.get(e)}},{key:`hasAtlas`,value:function(e){return this.styleKeyToAtlas.has(e)}},{key:`markKeyForGC`,value:function(e){this.markedKeys.add(e)}},{key:`gc`,value:function(){var e=this,t=this.markedKeys;if(t.size===0){console.log(`nothing to garbage collect`);return}var n=[],r=new Map,i=null,a=sT(this.atlases),o;try{var s=function(){var a=o.value,s=a.getKeys(),l=sRe(t,s);if(l.size===0)return n.push(a),s.forEach(function(e){return r.set(e,a)}),1;i||(i=e._createAtlas(),n.push(i));var u=sT(s),d;try{for(u.s();!(d=u.n()).done;){var f=d.value;if(!l.has(f)){var p=cT(a.getOffsets(f),2),m=p[0],h=p[1];i.canFit({w:m.w+h.w,h:m.h})||(i.lock(),i=e._createAtlas(),n.push(i)),a.canvas&&(e._copyTextureToNewAtlas(f,a,i),r.set(f,i))}}}catch(e){u.e(e)}finally{u.f()}a.dispose()};for(a.s();!(o=a.n()).done;)if(s())continue}catch(e){a.e(e)}finally{a.f()}this.atlases=n,this.styleKeyToAtlas=r,this.markedKeys=new Set}},{key:`_copyTextureToNewAtlas`,value:function(e,t,n){var r=cT(t.getOffsets(e),2),i=r[0],a=r[1];if(a.w===0)n.draw(e,i,function(e){e.drawImage(t.canvas,i.x,i.y,i.w,i.h,0,0,i.w,i.h)});else{var o=this._getScratchCanvas();o.clear(),o.context.drawImage(t.canvas,i.x,i.y,i.w,i.h,0,0,i.w,i.h),o.context.drawImage(t.canvas,a.x,a.y,a.w,a.h,i.w,0,a.w,a.h);var s=i.w+a.w,l=i.h;n.draw(e,{w:s,h:l},function(e){e.drawImage(o,0,0,s,l,0,0,s,l)})}}},{key:`getCounts`,value:function(){return{keyCount:this.styleKeyToAtlas.size,atlasCount:new Set(this.styleKeyToAtlas.values()).size}}}])}(),$Ue=function(){function e(t,n){aT(this,e),this.r=t,this.globalOptions=n,this.atlasSize=n.webglTexSize,this.maxAtlasesPerBatch=n.webglTexPerBatch,this.renderTypes=new Map,this.collections=new Map,this.typeAndIdToKey=new Map}return oT(e,[{key:`getAtlasSize`,value:function(){return this.atlasSize}},{key:`addAtlasCollection`,value:function(e,t){var n=this.globalOptions,r=n.webglTexSize,i=n.createTextureCanvas,a=t.texRows,o=this._cacheScratchCanvas(i),s=new QUe(this.r,r,a,o);this.collections.set(e,s)}},{key:`addRenderType`,value:function(e,t){var n=t.collection;if(!this.collections.has(n))throw Error(`invalid atlas collection name '${n}'`);var r=DE({type:e,atlasCollection:this.collections.get(n)},t);this.renderTypes.set(e,r)}},{key:`getRenderTypeOpts`,value:function(e){return this.renderTypes.get(e)}},{key:`getAtlasCollection`,value:function(e){return this.collections.get(e)}},{key:`_cacheScratchCanvas`,value:function(e){var t=-1,n=-1,r=null;return function(i,a,o,s){return s?((!r||a!=t||o!=n)&&(t=a,n=o,r=e(i,a,o)),r):e(i,a,o)}}},{key:`_key`,value:function(e,t){return`${e}-${t}`}},{key:`invalidate`,value:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=n.forceRedraw,i=r!==void 0&&r,a=n.filterEle,o=a===void 0?function(){return!0}:a,s=n.filterType,l=s===void 0?function(){return!0}:s,u=!1,d=!1,f=sT(e),p;try{for(f.s();!(p=f.n()).done;){var m=p.value;if(o(m)){var h=sT(this.renderTypes.values()),g;try{var _=function(){var e=g.value,n=e.type;if(l(n)){var r=t.collections.get(e.collection),a=e.getKey(m),o=Array.isArray(a)?a:[a];if(i)o.forEach(function(e){return r.markKeyForGC(e)}),d=!0;else{var s=e.getID?e.getID(m):m.id(),f=t._key(n,s),p=t.typeAndIdToKey.get(f);p!==void 0&&!XLe(o,p)&&(u=!0,t.typeAndIdToKey.delete(f),p.forEach(function(e){return r.markKeyForGC(e)}))}}};for(h.s();!(g=h.n()).done;)_()}catch(e){h.e(e)}finally{h.f()}}}}catch(e){f.e(e)}finally{f.f()}return d&&(this.gc(),u=!1),u}},{key:`gc`,value:function(){var e=sT(this.collections.values()),t;try{for(e.s();!(t=e.n()).done;)t.value.gc()}catch(t){e.e(t)}finally{e.f()}}},{key:`getOrCreateAtlas`,value:function(e,t,n,r){var i=this.renderTypes.get(t),a=this.collections.get(i.collection),o=!1,s=a.draw(r,n,function(t){i.drawClipped?(t.save(),t.beginPath(),t.rect(0,0,n.w,n.h),t.clip(),i.drawElement(t,e,n,!0,!0),t.restore()):i.drawElement(t,e,n,!0,!0),o=!0});if(o){var l=i.getID?i.getID(e):e.id(),u=this._key(t,l);this.typeAndIdToKey.has(u)?this.typeAndIdToKey.get(u).push(r):this.typeAndIdToKey.set(u,[r])}return s}},{key:`getAtlasInfo`,value:function(e,t){var n=this,r=this.renderTypes.get(t),i=r.getKey(e);return(Array.isArray(i)?i:[i]).map(function(i){var a=r.getBoundingBox(e,i),o=n.getOrCreateAtlas(e,t,a,i),s=cT(o.getOffsets(i),2),l=s[0];return{atlas:o,tex:l,tex1:l,tex2:s[1],bb:a}})}},{key:`getDebugInfo`,value:function(){var e=[],t=sT(this.collections),n;try{for(t.s();!(n=t.n()).done;){var r=cT(n.value,2),i=r[0],a=r[1].getCounts(),o=a.keyCount,s=a.atlasCount;e.push({type:i,keyCount:o,atlasCount:s})}}catch(e){t.e(e)}finally{t.f()}return e}}])}(),eWe=function(){function e(t){aT(this,e),this.globalOptions=t,this.atlasSize=t.webglTexSize,this.maxAtlasesPerBatch=t.webglTexPerBatch,this.batchAtlases=[]}return oT(e,[{key:`getMaxAtlasesPerBatch`,value:function(){return this.maxAtlasesPerBatch}},{key:`getAtlasSize`,value:function(){return this.atlasSize}},{key:`getIndexArray`,value:function(){return Array.from({length:this.maxAtlasesPerBatch},function(e,t){return t})}},{key:`startBatch`,value:function(){this.batchAtlases=[]}},{key:`getAtlasCount`,value:function(){return this.batchAtlases.length}},{key:`getAtlases`,value:function(){return this.batchAtlases}},{key:`canAddToCurrentBatch`,value:function(e){return this.batchAtlases.length!==this.maxAtlasesPerBatch||this.batchAtlases.includes(e)}},{key:`getAtlasIndexForBatch`,value:function(e){var t=this.batchAtlases.indexOf(e);if(t<0){if(this.batchAtlases.length===this.maxAtlasesPerBatch)throw Error(`cannot add more atlases to batch`);this.batchAtlases.push(e),t=this.batchAtlases.length-1}return t}}])}(),tWe=`568- float circleSD(vec2 p, float r) {569- return distance(vec2(0), p) - r; // signed distance570- }571-`,nWe=`572- float rectangleSD(vec2 p, vec2 b) {573- vec2 d = abs(p)-b;574- return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);575- }576-`,rWe=`577- float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {578- cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;579- cr.x = (p.y > 0.0) ? cr.x : cr.y;580- vec2 q = abs(p) - b + cr.x;581- return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;582- }583-`,iWe=`584- float ellipseSD(vec2 p, vec2 ab) {585- p = abs( p ); // symmetry586-587- // find root with Newton solver588- vec2 q = ab*(p-ab);589- float w = (q.x<q.y)? 1.570796327 : 0.0;590- for( int i=0; i<5; i++ ) {591- vec2 cs = vec2(cos(w),sin(w));592- vec2 u = ab*vec2( cs.x,cs.y);593- vec2 v = ab*vec2(-cs.y,cs.x);594- w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));595- }596- 597- // compute final point and distance598- float d = length(p-ab*vec2(cos(w),sin(w)));599- 600- // return signed distance601- return (dot(p/ab,p/ab)>1.0) ? d : -d;602- }603-`,uN={SCREEN:{name:`screen`,screen:!0},PICKING:{name:`picking`,picking:!0}},dN={IGNORE:1,USE_BB:2},fN=0,pN=1,mN=2,hN=3,gN=4,_N=5,vN=6,yN=7,aWe=function(){function e(t,n,r){aT(this,e),this.r=t,this.gl=n,this.maxInstances=r.webglBatchSize,this.atlasSize=r.webglTexSize,this.bgColor=r.bgColor,this.debug=r.webglDebug,this.batchDebugInfo=[],r.enableWrapping=!0,r.createTextureCanvas=KLe,this.atlasManager=new $Ue(t,r),this.batchManager=new eWe(r),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(uN.SCREEN),this.pickingProgram=this._createShaderProgram(uN.PICKING),this.vao=this._createVAO()}return oT(e,[{key:`addAtlasCollection`,value:function(e,t){this.atlasManager.addAtlasCollection(e,t)}},{key:`addTextureAtlasRenderType`,value:function(e,t){this.atlasManager.addRenderType(e,t)}},{key:`addSimpleShapeRenderType`,value:function(e,t){this.simpleShapeOptions.set(e,t)}},{key:`invalidate`,value:function(e){var t=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{}).type,n=this.atlasManager;return t?n.invalidate(e,{filterType:function(e){return e===t},forceRedraw:!0}):n.invalidate(e)}},{key:`gc`,value:function(){this.atlasManager.gc()}},{key:`_createShaderProgram`,value:function(e){var t=this.gl,n=`#version 300 es604- precision highp float;605-606- uniform mat3 uPanZoomMatrix;607- uniform int uAtlasSize;608- 609- // instanced610- in vec2 aPosition; // a vertex from the unit square611- 612- in mat3 aTransform; // used to transform verticies, eg into a bounding box613- in int aVertType; // the type of thing we are rendering614-615- // the z-index that is output when using picking mode616- in vec4 aIndex;617- 618- // For textures619- in int aAtlasId; // which shader unit/atlas to use620- in vec4 aTex; // x/y/w/h of texture in atlas621-622- // for edges623- in vec4 aPointAPointB;624- in vec4 aPointCPointD;625- in vec2 aLineWidth; // also used for node border width626-627- // simple shapes628- in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]629- in vec4 aColor; // also used for edges630- in vec4 aBorderColor; // aLineWidth is used for border width631-632- // output values passed to the fragment shader633- out vec2 vTexCoord;634- out vec4 vColor;635- out vec2 vPosition;636- // flat values are not interpolated637- flat out int vAtlasId; 638- flat out int vVertType;639- flat out vec2 vTopRight;640- flat out vec2 vBotLeft;641- flat out vec4 vCornerRadius;642- flat out vec4 vBorderColor;643- flat out vec2 vBorderWidth;644- flat out vec4 vIndex;645- 646- void main(void) {647- int vid = gl_VertexID;648- vec2 position = aPosition; // TODO make this a vec3, simplifies some code below649-650- if(aVertType == ${fN}) {651- float texX = aTex.x; // texture coordinates652- float texY = aTex.y;653- float texW = aTex.z;654- float texH = aTex.w;655-656- if(vid == 1 || vid == 2 || vid == 4) {657- texX += texW;658- }659- if(vid == 2 || vid == 4 || vid == 5) {660- texY += texH;661- }662-663- float d = float(uAtlasSize);664- vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1665-666- gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);667- }668- else if(aVertType == ${gN} || aVertType == ${yN} 669- || aVertType == ${_N} || aVertType == ${vN}) { // simple shapes670-671- // the bounding box is needed by the fragment shader672- vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat673- vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat674- vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated675-676- // calculations are done in the fragment shader, just pass these along677- vColor = aColor;678- vCornerRadius = aCornerRadius;679- vBorderColor = aBorderColor;680- vBorderWidth = aLineWidth;681-682- gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);683- }684- else if(aVertType == ${pN}) {685- vec2 source = aPointAPointB.xy;686- vec2 target = aPointAPointB.zw;687-688- // adjust the geometry so that the line is centered on the edge689- position.y = position.y - 0.5;690-691- // stretch the unit square into a long skinny rectangle692- vec2 xBasis = target - source;693- vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));694- vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;695-696- gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);697- vColor = aColor;698- } 699- else if(aVertType == ${mN}) {700- vec2 pointA = aPointAPointB.xy;701- vec2 pointB = aPointAPointB.zw;702- vec2 pointC = aPointCPointD.xy;703- vec2 pointD = aPointCPointD.zw;704-705- // adjust the geometry so that the line is centered on the edge706- position.y = position.y - 0.5;707-708- vec2 p0, p1, p2, pos;709- if(position.x == 0.0) { // The left side of the unit square710- p0 = pointA;711- p1 = pointB;712- p2 = pointC;713- pos = position;714- } else { // The right side of the unit square, use same approach but flip the geometry upside down715- p0 = pointD;716- p1 = pointC;717- p2 = pointB;718- pos = vec2(0.0, -position.y);719- }720-721- vec2 p01 = p1 - p0;722- vec2 p12 = p2 - p1;723- vec2 p21 = p1 - p2;724-725- // Find the normal vector.726- vec2 tangent = normalize(normalize(p12) + normalize(p01));727- vec2 normal = vec2(-tangent.y, tangent.x);728-729- // Find the vector perpendicular to p0 -> p1.730- vec2 p01Norm = normalize(vec2(-p01.y, p01.x));731-732- // Determine the bend direction.733- float sigma = sign(dot(p01 + p21, normal));734- float width = aLineWidth[0];735-736- if(sign(pos.y) == -sigma) {737- // This is an intersecting vertex. Adjust the position so that there's no overlap.738- vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);739- gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);740- } else {741- // This is a non-intersecting vertex. Treat it like a mitre join.742- vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);743- gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);744- }745-746- vColor = aColor;747- } 748- else if(aVertType == ${hN} && vid < 3) {749- // massage the first triangle into an edge arrow750- if(vid == 0)751- position = vec2(-0.15, -0.3);752- if(vid == 1)753- position = vec2( 0.0, 0.0);754- if(vid == 2)755- position = vec2( 0.15, -0.3);756-757- gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);758- vColor = aColor;759- }760- else {761- gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space762- }763-764- vAtlasId = aAtlasId;765- vVertType = aVertType;766- vIndex = aIndex;767- }768- `,r=this.batchManager.getIndexArray(),i=GLe(t,n,`#version 300 es769- precision highp float;770-771- // declare texture unit for each texture atlas in the batch772- ${r.map(function(e){return`uniform sampler2D uTexture${e};`}).join(`773- `)}774-775- uniform vec4 uBGColor;776- uniform float uZoom;777-778- in vec2 vTexCoord;779- in vec4 vColor;780- in vec2 vPosition; // model coordinates781-782- flat in int vAtlasId;783- flat in vec4 vIndex;784- flat in int vVertType;785- flat in vec2 vTopRight;786- flat in vec2 vBotLeft;787- flat in vec4 vCornerRadius;788- flat in vec4 vBorderColor;789- flat in vec2 vBorderWidth;790-791- out vec4 outColor;792-793- ${tWe}794- ${nWe}795- ${rWe}796- ${iWe}797-798- vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha799- return vec4( 800- top.rgb + (bot.rgb * (1.0 - top.a)),801- top.a + (bot.a * (1.0 - top.a)) 802- );803- }804-805- vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance806- // scale to the zoom level so that borders don't look blurry when zoomed in807- // note 1.5 is an aribitrary value chosen because it looks good808- return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d))); 809- }810-811- void main(void) {812- if(vVertType == ${fN}) {813- // look up the texel from the texture unit814- ${r.map(function(e){return`if(vAtlasId == ${e}) outColor = texture(uTexture${e}, vTexCoord);`}).join(`815- else `)}816- } 817- else if(vVertType == ${hN}) {818- // mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';819- outColor = blend(vColor, uBGColor);820- outColor.a = 1.0; // make opaque, masks out line under arrow821- }822- else if(vVertType == ${gN} && vBorderWidth == vec2(0.0)) { // simple rectangle with no border823- outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done824- }825- else if(vVertType == ${gN} || vVertType == ${yN} 826- || vVertType == ${_N} || vVertType == ${vN}) { // use SDF827-828- float outerBorder = vBorderWidth[0];829- float innerBorder = vBorderWidth[1];830- float borderPadding = outerBorder * 2.0;831- float w = vTopRight.x - vBotLeft.x - borderPadding;832- float h = vTopRight.y - vBotLeft.y - borderPadding;833- vec2 b = vec2(w/2.0, h/2.0); // half width, half height834- vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center835-836- float d; // signed distance837- if(vVertType == ${gN}) {838- d = rectangleSD(p, b);839- } else if(vVertType == ${yN} && w == h) {840- d = circleSD(p, b.x); // faster than ellipse841- } else if(vVertType == ${yN}) {842- d = ellipseSD(p, b);843- } else {844- d = roundRectangleSD(p, b, vCornerRadius.wzyx);845- }846-847- // use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling848- // we must smooth colors inwards, because we can't change pixels outside the shape's bounding box849- if(d > 0.0) {850- if(d > outerBorder) {851- discard;852- } else {853- outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);854- }855- } else {856- if(d > innerBorder) {857- vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;858- vec4 innerBorderColor = blend(vBorderColor, vColor);859- outColor = distInterp(innerBorderColor, outerColor, d);860- } 861- else {862- vec4 outerColor;863- if(innerBorder == 0.0 && outerBorder == 0.0) {864- outerColor = vec4(0);865- } else if(innerBorder == 0.0) {866- outerColor = vBorderColor;867- } else {868- outerColor = blend(vBorderColor, vColor);869- }870- outColor = distInterp(vColor, outerColor, d - innerBorder);871- }872- }873- }874- else {875- outColor = vColor;876- }877-878- ${e.picking?`if(outColor.a == 0.0) discard;879- else outColor = vIndex;`:``}880- }881- `);i.aPosition=t.getAttribLocation(i,`aPosition`),i.aIndex=t.getAttribLocation(i,`aIndex`),i.aVertType=t.getAttribLocation(i,`aVertType`),i.aTransform=t.getAttribLocation(i,`aTransform`),i.aAtlasId=t.getAttribLocation(i,`aAtlasId`),i.aTex=t.getAttribLocation(i,`aTex`),i.aPointAPointB=t.getAttribLocation(i,`aPointAPointB`),i.aPointCPointD=t.getAttribLocation(i,`aPointCPointD`),i.aLineWidth=t.getAttribLocation(i,`aLineWidth`),i.aColor=t.getAttribLocation(i,`aColor`),i.aCornerRadius=t.getAttribLocation(i,`aCornerRadius`),i.aBorderColor=t.getAttribLocation(i,`aBorderColor`),i.uPanZoomMatrix=t.getUniformLocation(i,`uPanZoomMatrix`),i.uAtlasSize=t.getUniformLocation(i,`uAtlasSize`),i.uBGColor=t.getUniformLocation(i,`uBGColor`),i.uZoom=t.getUniformLocation(i,`uZoom`),i.uTextures=[];for(var a=0;a<this.batchManager.getMaxAtlasesPerBatch();a++)i.uTextures.push(t.getUniformLocation(i,`uTexture${a}`));return i}},{key:`_createVAO`,value:function(){var e=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=e.length/2;var t=this.maxInstances,n=this.gl,r=this.program,i=n.createVertexArray();return n.bindVertexArray(i),nRe(n,`vec2`,r.aPosition,e),this.transformBuffer=rRe(n,t,r.aTransform),this.indexBuffer=WT(n,t,`vec4`,r.aIndex),this.vertTypeBuffer=WT(n,t,`int`,r.aVertType),this.atlasIdBuffer=WT(n,t,`int`,r.aAtlasId),this.texBuffer=WT(n,t,`vec4`,r.aTex),this.pointAPointBBuffer=WT(n,t,`vec4`,r.aPointAPointB),this.pointCPointDBuffer=WT(n,t,`vec4`,r.aPointCPointD),this.lineWidthBuffer=WT(n,t,`vec2`,r.aLineWidth),this.colorBuffer=WT(n,t,`vec4`,r.aColor),this.cornerRadiusBuffer=WT(n,t,`vec4`,r.aCornerRadius),this.borderColorBuffer=WT(n,t,`vec4`,r.aBorderColor),n.bindVertexArray(null),i}},{key:`buffers`,get:function(){var e=this;return this._buffers||=Object.keys(this).filter(function(e){return wE(e,`Buffer`)}).map(function(t){return e[t]}),this._buffers}},{key:`startFrame`,value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:uN.SCREEN;this.panZoomMatrix=e,this.renderTarget=t,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:`startBatch`,value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:`endFrame`,value:function(){this.endBatch()}},{key:`_isVisible`,value:function(e,t){return e.visible()?t&&t.isVisible?t.isVisible(e):!0:!1}},{key:`drawTexture`,value:function(e,t,n){var r=this.atlasManager,i=this.batchManager,a=r.getRenderTypeOpts(n);if(this._isVisible(e,a)&&!(e.isEdge()&&!this._isValidEdge(e))){if(this.renderTarget.picking&&a.getTexPickingMode){var o=a.getTexPickingMode(e);if(o===dN.IGNORE)return;if(o==dN.USE_BB){this.drawPickingRectangle(e,t,n);return}}var s=sT(r.getAtlasInfo(e,n)),l;try{for(s.s();!(l=s.n()).done;){var u=l.value,d=u.atlas,f=u.tex1,p=u.tex2;i.canAddToCurrentBatch(d)||this.endBatch();for(var m=i.getAtlasIndexForBatch(d),h=0,g=[[f,!0],[p,!1]];h<g.length;h++){var _=cT(g[h],2),v=_[0],y=_[1];if(v.w!=0){var b=this.instanceCount;this.vertTypeBuffer.getView(b)[0]=fN,UT(t,this.indexBuffer.getView(b));var x=this.atlasIdBuffer.getView(b);x[0]=m;var S=this.texBuffer.getView(b);S[0]=v.x,S[1]=v.y,S[2]=v.w,S[3]=v.h;var C=this.transformBuffer.getMatrixView(b);this.setTransformMatrix(e,C,a,u,y),this.instanceCount++,y||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(e){s.e(e)}finally{s.f()}}}},{key:`setTransformMatrix`,value:function(e,t,n,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=0;if(n.shapeProps&&n.shapeProps.padding&&(a=e.pstyle(n.shapeProps.padding).pfValue),r){var o=r.bb,s=r.tex1,l=r.tex2,u=s.w/(s.w+l.w);i||(u=1-u);var d=this._getAdjustedBB(o,a,i,u);this._applyTransformMatrix(t,d,n,e)}else{var f=n.getBoundingBox(e),p=this._getAdjustedBB(f,a,!0,1);this._applyTransformMatrix(t,p,n,e)}}},{key:`_applyTransformMatrix`,value:function(e,t,n,r){var i,a;KT(e);var o=n.getRotation?n.getRotation(r):0;if(o!==0){var s=n.getRotationPoint(r),l=s.x,u=s.y;qT(e,e,[l,u]),JT(e,e,o);var d=n.getRotationOffset(r);i=d.x+(t.xOffset||0),a=d.y+(t.yOffset||0)}else i=t.x1,a=t.y1;qT(e,e,[i,a]),YT(e,e,[t.w,t.h])}},{key:`_getAdjustedBB`,value:function(e,t,n,r){var i=e.x1,a=e.y1,o=e.w,s=e.h,l=e.yOffset;t&&(i-=t,a-=t,o+=2*t,s+=2*t);var u=0,d=o*r;return n&&r<1?o=d:!n&&r<1&&(u=o-d,i+=u,o=d),{x1:i,y1:a,w:o,h:s,xOffset:u,yOffset:l}}},{key:`drawPickingRectangle`,value:function(e,t,n){var r=this.atlasManager.getRenderTypeOpts(n),i=this.instanceCount;this.vertTypeBuffer.getView(i)[0]=gN,UT(t,this.indexBuffer.getView(i)),HT([0,0,0],1,this.colorBuffer.getView(i));var a=this.transformBuffer.getMatrixView(i);this.setTransformMatrix(e,a,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:`drawNode`,value:function(e,t,n){var r=this.simpleShapeOptions.get(n);if(this._isVisible(e,r)){var i=r.shapeProps,a=this._getVertTypeForShape(e,i.shape);if(a===void 0||r.isSimple&&!r.isSimple(e,this.renderTarget)){this.drawTexture(e,t,n);return}var o=this.instanceCount;if(this.vertTypeBuffer.getView(o)[0]=a,a===_N||a===vN){var s=r.getBoundingBox(e),l=this._getCornerRadius(e,i.radius,s),u=this.cornerRadiusBuffer.getView(o);u[0]=l,u[1]=l,u[2]=l,u[3]=l,a===vN&&(u[0]=0,u[2]=0)}UT(t,this.indexBuffer.getView(o));var d=this.renderTarget.picking?1:n===`node-body`?e.effectiveOpacity():1,f=this.renderTarget.picking?1:e.pstyle(i.opacity).value*d,p=e.pstyle(i.color).value;HT(p,f,this.colorBuffer.getView(o));var m=this.lineWidthBuffer.getView(o);if(m[0]=0,m[1]=0,i.border){var h=e.pstyle(`border-width`).value;if(h>0){var g=e.pstyle(`border-color`).value;HT(g,d*e.pstyle(`border-opacity`).value,this.borderColorBuffer.getView(o));var _=e.pstyle(`border-position`).value;if(_===`inside`)m[0]=0,m[1]=-h;else if(_===`outside`)m[0]=h,m[1]=0;else{var v=h/2;m[0]=v,m[1]=-v}}}var y=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(e,y,r),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}},{key:`_getVertTypeForShape`,value:function(e,t){switch(e.pstyle(t).value){case`rectangle`:return gN;case`ellipse`:return yN;case`roundrectangle`:case`round-rectangle`:return _N;case`bottom-round-rectangle`:return vN;default:return}}},{key:`_getCornerRadius`,value:function(e,t,n){var r=n.w,i=n.h;if(e.pstyle(t).value===`auto`)return hO(r,i);var a=e.pstyle(t).pfValue,o=r/2,s=i/2;return Math.min(a,s,o)}},{key:`drawEdgeArrow`,value:function(e,t,n){if(e.visible()){var r=e._private.rscratch,i,a,o;if(n===`source`?(i=r.arrowStartX,a=r.arrowStartY,o=r.srcArrowAngle):(i=r.arrowEndX,a=r.arrowEndY,o=r.tgtArrowAngle),!(isNaN(i)||i==null||isNaN(a)||a==null||isNaN(o)||o==null)&&e.pstyle(n+`-arrow-shape`).value!==`none`){var s=e.pstyle(n+`-arrow-color`).value,l=e.pstyle(`opacity`).value*e.pstyle(`line-opacity`).value,u=e.pstyle(`width`).pfValue,d=e.pstyle(`arrow-scale`).value,f=this.r.getArrowWidth(u,d),p=this.instanceCount,m=this.transformBuffer.getMatrixView(p);KT(m),qT(m,m,[i,a]),YT(m,m,[f,f]),JT(m,m,o),this.vertTypeBuffer.getView(p)[0]=hN,UT(t,this.indexBuffer.getView(p)),HT(s,l,this.colorBuffer.getView(p)),this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}},{key:`drawEdgeLine`,value:function(e,t){if(e.visible()){var n=this._getEdgePoints(e);if(n){var r=e.pstyle(`opacity`).value,i=e.pstyle(`line-opacity`).value,a=e.pstyle(`width`).pfValue,o=e.pstyle(`line-color`).value,s=r*i;if(n.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),n.length==4){var l=this.instanceCount;this.vertTypeBuffer.getView(l)[0]=pN,UT(t,this.indexBuffer.getView(l)),HT(o,s,this.colorBuffer.getView(l));var u=this.lineWidthBuffer.getView(l);u[0]=a;var d=this.pointAPointBBuffer.getView(l);d[0]=n[0],d[1]=n[1],d[2]=n[2],d[3]=n[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}else for(var f=0;f<n.length-2;f+=2){var p=this.instanceCount;this.vertTypeBuffer.getView(p)[0]=mN,UT(t,this.indexBuffer.getView(p)),HT(o,s,this.colorBuffer.getView(p));var m=this.lineWidthBuffer.getView(p);m[0]=a;var h=n[f-2],g=n[f-1],_=n[f],v=n[f+1],y=n[f+2],b=n[f+3],x=n[f+4],S=n[f+5];f==0&&(h=2*_-y+.001,g=2*v-b+.001),f==n.length-4&&(x=2*y-_+.001,S=2*b-v+.001);var C=this.pointAPointBBuffer.getView(p);C[0]=h,C[1]=g,C[2]=_,C[3]=v;var w=this.pointCPointDBuffer.getView(p);w[0]=y,w[1]=b,w[2]=x,w[3]=S,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}},{key:`_isValidEdge`,value:function(e){var t=e._private.rscratch;return!(t.badLine||t.allpts==null||isNaN(t.allpts[0]))}},{key:`_getEdgePoints`,value:function(e){var t=e._private.rscratch;if(this._isValidEdge(e)){var n=t.allpts;if(n.length==4)return n;var r=this._getNumSegments(e);return this._getCurveSegmentPoints(n,r)}}},{key:`_getNumSegments`,value:function(e){return Math.min(15,this.maxInstances)}},{key:`_getCurveSegmentPoints`,value:function(e,t){if(e.length==4)return e;for(var n=Array((t+1)*2),r=0;r<=t;r++)if(r==0)n[0]=e[0],n[1]=e[1];else if(r==t)n[r*2]=e[e.length-2],n[r*2+1]=e[e.length-1];else{var i=r/t;this._setCurvePoint(e,i,n,r*2)}return n}},{key:`_setCurvePoint`,value:function(e,t,n,r){if(e.length<=2)n[r]=e[0],n[r+1]=e[1];else{for(var i=Array(e.length-2),a=0;a<i.length;a+=2){var o=(1-t)*e[a]+t*e[a+2],s=(1-t)*e[a+1]+t*e[a+3];i[a]=o,i[a+1]=s}return this._setCurvePoint(i,t,n,r)}}},{key:`endBatch`,value:function(){var e=this.gl,t=this.vao,n=this.vertexCount,r=this.instanceCount;if(r!==0){var i=this.renderTarget.picking?this.pickingProgram:this.program;e.useProgram(i),e.bindVertexArray(t);var a=sT(this.buffers),o;try{for(a.s();!(o=a.n()).done;)o.value.bufferSubData(r)}catch(e){a.e(e)}finally{a.f()}for(var s=this.batchManager.getAtlases(),l=0;l<s.length;l++)s[l].bufferIfNeeded(e);for(var u=0;u<s.length;u++)e.activeTexture(e.TEXTURE0+u),e.bindTexture(e.TEXTURE_2D,s[u].texture),e.uniform1i(i.uTextures[u],u);e.uniform1f(i.uZoom,qLe(this.r)),e.uniformMatrix3fv(i.uPanZoomMatrix,!1,this.panZoomMatrix),e.uniform1i(i.uAtlasSize,this.batchManager.getAtlasSize());var d=HT(this.bgColor,1);e.uniform4fv(i.uBGColor,d),e.drawArraysInstanced(e.TRIANGLES,0,n,r),e.bindVertexArray(null),e.bindTexture(e.TEXTURE_2D,null),this.debug&&this.batchDebugInfo.push({count:r,atlasCount:s.length}),this.startBatch()}}},{key:`getDebugInfo`,value:function(){var e=this.atlasManager.getDebugInfo(),t=e.reduce(function(e,t){return e+t.atlasCount},0),n=this.batchDebugInfo,r=n.reduce(function(e,t){return e+t.count},0);return{atlasInfo:e,totalAtlases:t,wrappedCount:this.wrappedCount,simpleCount:this.simpleCount,batchCount:n.length,batchInfo:n,totalInstances:r}}}])}(),bN={},bN.initWebgl=function(e,t){var n=this,r=n.data.contexts[n.WEBGL];e.bgColor=cRe(n),e.webglTexSize=Math.min(e.webglTexSize,r.getParameter(r.MAX_TEXTURE_SIZE)),e.webglTexRows=Math.min(e.webglTexRows,54),e.webglTexRowsNodes=Math.min(e.webglTexRowsNodes,54),e.webglBatchSize=Math.min(e.webglBatchSize,16384),e.webglTexPerBatch=Math.min(e.webglTexPerBatch,r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS)),n.webglDebug=e.webglDebug,n.webglDebugShowAtlases=e.webglDebugShowAtlases,n.pickingFrameBuffer=iRe(r),n.pickingFrameBuffer.needsDraw=!0,n.drawing=new aWe(n,r,e);var i=function(e){return function(t){return n.getTextAngle(t,e)}},a=function(e){return function(t){var n=t.pstyle(e);return n&&n.value}},o=function(e){return function(t){return t.pstyle(`${e}-opacity`).value>0}},s=function(e){return e.pstyle(`text-events`).strValue===`yes`?dN.USE_BB:dN.IGNORE},l=function(e){var t=e.position(),n=t.x,r=t.y,i=e.outerWidth(),a=e.outerHeight();return{w:i,h:a,x1:n-i/2,y1:r-a/2}};n.drawing.addAtlasCollection(`node`,{texRows:e.webglTexRowsNodes}),n.drawing.addAtlasCollection(`label`,{texRows:e.webglTexRows}),n.drawing.addTextureAtlasRenderType(`node-body`,{collection:`node`,getKey:t.getStyleKey,getBoundingBox:t.getElementBox,drawElement:t.drawElement}),n.drawing.addSimpleShapeRenderType(`node-body`,{getBoundingBox:l,isSimple:YLe,shapeProps:{shape:`shape`,color:`background-color`,opacity:`background-opacity`,radius:`corner-radius`,border:!0}}),n.drawing.addSimpleShapeRenderType(`node-overlay`,{getBoundingBox:l,isVisible:o(`overlay`),shapeProps:{shape:`overlay-shape`,color:`overlay-color`,opacity:`overlay-opacity`,padding:`overlay-padding`,radius:`overlay-corner-radius`}}),n.drawing.addSimpleShapeRenderType(`node-underlay`,{getBoundingBox:l,isVisible:o(`underlay`),shapeProps:{shape:`underlay-shape`,color:`underlay-color`,opacity:`underlay-opacity`,padding:`underlay-padding`,radius:`underlay-corner-radius`}}),n.drawing.addTextureAtlasRenderType(`label`,{collection:`label`,getTexPickingMode:s,getKey:xN(t.getLabelKey,null),getBoundingBox:SN(t.getLabelBox,null),drawClipped:!0,drawElement:t.drawLabel,getRotation:i(null),getRotationPoint:t.getLabelRotationPoint,getRotationOffset:t.getLabelRotationOffset,isVisible:a(`label`)}),n.drawing.addTextureAtlasRenderType(`edge-source-label`,{collection:`label`,getTexPickingMode:s,getKey:xN(t.getSourceLabelKey,`source`),getBoundingBox:SN(t.getSourceLabelBox,`source`),drawClipped:!0,drawElement:t.drawSourceLabel,getRotation:i(`source`),getRotationPoint:t.getSourceLabelRotationPoint,getRotationOffset:t.getSourceLabelRotationOffset,isVisible:a(`source-label`)}),n.drawing.addTextureAtlasRenderType(`edge-target-label`,{collection:`label`,getTexPickingMode:s,getKey:xN(t.getTargetLabelKey,`target`),getBoundingBox:SN(t.getTargetLabelBox,`target`),drawClipped:!0,drawElement:t.drawTargetLabel,getRotation:i(`target`),getRotationPoint:t.getTargetLabelRotationPoint,getRotationOffset:t.getTargetLabelRotationOffset,isVisible:a(`target-label`)});var u=KE(function(){console.log(`garbage collect flag set`),n.data.gc=!0},1e4);n.onUpdateEleCalcs(function(e,t){var r=!1;t&&t.length>0&&(r|=n.drawing.invalidate(t)),r&&u()}),lRe(n)},xN=function(e,t){return function(n){var r=e(n),i=XT(n,t);return i.length>1?i.map(function(e,t){return`${r}_${t}`}):r}},SN=function(e,t){return function(n,r){var i=e(n);if(typeof r==`string`){var a=r.indexOf(`_`);if(a>0){var o=Number(r.substring(a+1)),s=XT(n,t),l=i.h/s.length,u=l*o,d=i.y1+u;return{x1:i.x1,w:i.w,y1:d,h:l,yOffset:u}}}return i}},CN={},CN.drawPolygonPath=function(e,t,n,r,i,a){var o=r/2,s=i/2;e.beginPath&&e.beginPath(),e.moveTo(t+o*a[0],n+s*a[1]);for(var l=1;l<a.length/2;l++)e.lineTo(t+o*a[l*2],n+s*a[l*2+1]);e.closePath()},CN.drawRoundPolygonPath=function(e,t,n,r,i,a,o){o.forEach(function(t){return PLe(e,t)}),e.closePath()},CN.drawRoundRectanglePath=function(e,t,n,r,i,a){var o=r/2,s=i/2,l=a===`auto`?hO(r,i):Math.min(a,s,o);e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.arcTo(t+o,n-s,t+o,n,l),e.arcTo(t+o,n+s,t,n+s,l),e.arcTo(t-o,n+s,t-o,n,l),e.arcTo(t-o,n-s,t,n-s,l),e.lineTo(t,n-s),e.closePath()},CN.drawBottomRoundRectanglePath=function(e,t,n,r,i,a){var o=r/2,s=i/2,l=a===`auto`?hO(r,i):a;e.beginPath&&e.beginPath(),e.moveTo(t,n-s),e.lineTo(t+o,n-s),e.lineTo(t+o,n),e.arcTo(t+o,n+s,t,n+s,l),e.arcTo(t-o,n+s,t-o,n,l),e.lineTo(t-o,n-s),e.lineTo(t,n-s),e.closePath()},CN.drawCutRectanglePath=function(e,t,n,r,i,a,o){var s=r/2,l=i/2,u=o===`auto`?_O():o;e.beginPath&&e.beginPath(),e.moveTo(t-s+u,n-l),e.lineTo(t+s-u,n-l),e.lineTo(t+s,n-l+u),e.lineTo(t+s,n+l-u),e.lineTo(t+s-u,n+l),e.lineTo(t-s+u,n+l),e.lineTo(t-s,n+l-u),e.lineTo(t-s,n-l+u),e.closePath()},CN.drawBarrelPath=function(e,t,n,r,i){var a=r/2,o=i/2,s=t-a,l=t+a,u=n-o,d=n+o,f=vO(r,i),p=f.widthOffset,m=f.heightOffset,h=f.ctrlPtOffsetPct*p;e.beginPath&&e.beginPath(),e.moveTo(s,u+m),e.lineTo(s,d-m),e.quadraticCurveTo(s+h,d,s+p,d),e.lineTo(l-p,d),e.quadraticCurveTo(l-h,d,l,d-m),e.lineTo(l,u+m),e.quadraticCurveTo(l-h,u,l-p,u),e.lineTo(s+p,u),e.quadraticCurveTo(s+h,u,s,u+m),e.closePath()},wN=Math.sin(0),TN=Math.cos(0),EN={},DN={},ON=Math.PI/40,kN=0*Math.PI;kN<2*Math.PI;kN+=ON)EN[kN]=Math.sin(kN),DN[kN]=Math.cos(kN);CN.drawEllipsePath=function(e,t,n,r,i){if(e.beginPath&&e.beginPath(),e.ellipse)e.ellipse(t,n,r/2,i/2,0,0,2*Math.PI);else for(var a,o,s=r/2,l=i/2,u=0*Math.PI;u<2*Math.PI;u+=ON)a=t-s*EN[u]*wN+s*DN[u]*TN,o=n+l*DN[u]*wN+l*EN[u]*TN,u===0?e.moveTo(a,o):e.lineTo(a,o);e.closePath()},AN={},AN.createBuffer=function(e,t){var n=document.createElement(`canvas`);return n.width=e,n.height=t,[n,n.getContext(`2d`)]},AN.bufferCanvasImage=function(e){var t=this.cy,n=t.mutableElements().boundingBox(),r=this.findContainerClientCoords(),i=e.full?Math.ceil(n.w):r[2],a=e.full?Math.ceil(n.h):r[3],o=uE(e.maxWidth)||uE(e.maxHeight),s=this.getPixelRatio(),l=1;if(e.scale!==void 0)i*=e.scale,a*=e.scale,l=e.scale;else if(o){var u=1/0,d=1/0;uE(e.maxWidth)&&(u=l*e.maxWidth/i),uE(e.maxHeight)&&(d=l*e.maxHeight/a),l=Math.min(u,d),i*=l,a*=l}o||(i*=s,a*=s,l*=s);var f=document.createElement(`canvas`);f.width=i,f.height=a,f.style.width=i+`px`,f.style.height=a+`px`;var p=f.getContext(`2d`);if(i>0&&a>0){p.clearRect(0,0,i,a),p.globalCompositeOperation=`source-over`;var m=this.getCachedZSortedEles();if(e.full)p.translate(-n.x1*l,-n.y1*l),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(n.x1*l,n.y1*l);else{var h=t.pan(),g={x:h.x*l,y:h.y*l};l*=t.zoom(),p.translate(g.x,g.y),p.scale(l,l),this.drawElements(p,m),p.scale(1/l,1/l),p.translate(-g.x,-g.y)}e.bg&&(p.globalCompositeOperation=`destination-over`,p.fillStyle=e.bg,p.rect(0,0,i,a),p.fill())}return f},AN.png=function(e){return tE(e,this.bufferCanvasImage(e),`image/png`)},AN.jpg=function(e){return tE(e,this.bufferCanvasImage(e),`image/jpeg`)},jN={},jN.nodeShapeImpl=function(e,t,n,r,i,a,o,s){switch(e){case`ellipse`:return this.drawEllipsePath(t,n,r,i,a);case`polygon`:return this.drawPolygonPath(t,n,r,i,a,o);case`round-polygon`:return this.drawRoundPolygonPath(t,n,r,i,a,o,s);case`roundrectangle`:case`round-rectangle`:return this.drawRoundRectanglePath(t,n,r,i,a,s);case`cutrectangle`:case`cut-rectangle`:return this.drawCutRectanglePath(t,n,r,i,a,o,s);case`bottomroundrectangle`:case`bottom-round-rectangle`:return this.drawBottomRoundRectanglePath(t,n,r,i,a,s);case`barrel`:return this.drawBarrelPath(t,n,r,i,a)}},oWe=yRe,MN=yRe.prototype,MN.CANVAS_LAYERS=3,MN.SELECT_BOX=0,MN.DRAG=1,MN.NODE=2,MN.WEBGL=3,MN.CANVAS_TYPES=[`2d`,`2d`,`2d`,`webgl2`],MN.BUFFER_COUNT=3,MN.TEXTURE_BUFFER=0,MN.MOTIONBLUR_BUFFER_NODE=1,MN.MOTIONBLUR_BUFFER_DRAG=2,MN.redrawHint=function(e,t){var n=this;switch(e){case`eles`:n.data.canvasNeedsRedraw[MN.NODE]=t;break;case`drag`:n.data.canvasNeedsRedraw[MN.DRAG]=t;break;case`select`:n.data.canvasNeedsRedraw[MN.SELECT_BOX]=t;break;case`gc`:n.data.gc=!0}},sWe=typeof Path2D<`u`,MN.path2dEnabled=function(e){if(e===void 0)return this.pathsEnabled;this.pathsEnabled=!!e},MN.usePaths=function(){return sWe&&this.pathsEnabled},MN.setImgSmoothing=function(e,t){e.imageSmoothingEnabled==null?(e.webkitImageSmoothingEnabled=t,e.mozImageSmoothingEnabled=t,e.msImageSmoothingEnabled=t):e.imageSmoothingEnabled=t},MN.getImgSmoothing=function(e){return e.imageSmoothingEnabled==null?e.webkitImageSmoothingEnabled||e.mozImageSmoothingEnabled||e.msImageSmoothingEnabled:e.imageSmoothingEnabled},MN.makeOffscreenCanvas=function(e,t){var n;return(typeof OffscreenCanvas>`u`?`undefined`:uT(OffscreenCanvas))===`undefined`?(n=this.cy.window().document.createElement(`canvas`),n.width=e,n.height=t):n=new OffscreenCanvas(e,t),n},[QM,$M,tN,rN,iN,aN,sN,bN,CN,AN,jN].forEach(function(e){DE(MN,e)}),cWe=[{type:`layout`,extensions:iUe},{type:`renderer`,extensions:[{name:`null`,impl:NLe},{name:`base`,impl:NM},{name:`canvas`,impl:oWe}]}],NN={},PN={},FN=function(){if(arguments.length===2)return xRe.apply(null,arguments);if(arguments.length===3)return bRe.apply(null,arguments);if(arguments.length===4)return CRe.apply(null,arguments);if(arguments.length===5)return SRe.apply(null,arguments);mD(`Invalid extension access syntax`)},zj.prototype.extension=FN,cWe.forEach(function(e){e.extensions.forEach(function(t){bRe(e.type,t.name,t.impl)})}),IN=function(){if(!(this instanceof IN))return new IN;this.length=0},LN=IN.prototype,LN.instanceString=function(){return`stylesheet`},LN.selector=function(e){var t=this.length++;return this[t]={selector:e,properties:[]},this},LN.css=function(e,t){var n=this.length-1;if(oE(e))this[n].properties.push({name:e,value:t});else if(lE(e))for(var r=e,i=Object.keys(r),a=0;a<i.length;a++){var o=i[a],s=r[o];if(s!=null){var l=Fj.properties[o]||Fj.properties[xE(o)];if(l!=null){var u=l.name,d=s;this[n].properties.push({name:u,value:d})}}}return this},LN.style=LN.css,LN.generateStyle=function(e){var t=new Fj(e);return this.appendToStyle(t)},LN.appendToStyle=function(e){for(var t=0;t<this.length;t++){var n=this[t],r=n.selector,i=n.properties;e.selector(r);for(var a=0;a<i.length;a++){var o=i[a];e.css(o.name,o.value)}}return e},lWe=`3.34.1`,RN=function(e){if(e===void 0&&(e={}),lE(e))return new zj(e);if(oE(e))return FN.apply(FN,arguments)},RN.use=function(e){var t=Array.prototype.slice.call(arguments,1);return t.unshift(RN),e.apply(null,t),this},RN.warnings=function(e){return hD(e)},RN.version=lWe,RN.stylesheet=RN.Stylesheet=IN})),dWe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r():typeof define==`function`&&define.amd?define([],r):typeof e==`object`?e.layoutBase=r():n.layoutBase=r()})(e,function(){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=26)})([(function(e,t,n){"use strict";function r(){}r.QUALITY=1,r.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,r.DEFAULT_INCREMENTAL=!1,r.DEFAULT_ANIMATION_ON_LAYOUT=!0,r.DEFAULT_ANIMATION_DURING_LAYOUT=!1,r.DEFAULT_ANIMATION_PERIOD=50,r.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,r.DEFAULT_GRAPH_MARGIN=15,r.NODE_DIMENSIONS_INCLUDE_LABELS=!1,r.SIMPLE_NODE_SIZE=40,r.SIMPLE_NODE_HALF_SIZE=r.SIMPLE_NODE_SIZE/2,r.EMPTY_COMPOUND_NODE_SIZE=40,r.MIN_EDGE_LENGTH=1,r.WORLD_BOUNDARY=1e6,r.INITIAL_WORLD_BOUNDARY=r.WORLD_BOUNDARY/1e3,r.WORLD_CENTER_X=1200,r.WORLD_CENTER_Y=900,e.exports=r}),(function(e,t,n){"use strict";var r=n(2),i=n(8),a=n(9);function o(e,t,n){r.call(this,n),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=n,this.bendpoints=[],this.source=e,this.target=t}for(var s in o.prototype=Object.create(r.prototype),r)o[s]=r[s];o.prototype.getSource=function(){return this.source},o.prototype.getTarget=function(){return this.target},o.prototype.isInterGraph=function(){return this.isInterGraph},o.prototype.getLength=function(){return this.length},o.prototype.isOverlapingSourceAndTarget=function(){return this.isOverlapingSourceAndTarget},o.prototype.getBendpoints=function(){return this.bendpoints},o.prototype.getLca=function(){return this.lca},o.prototype.getSourceInLca=function(){return this.sourceInLca},o.prototype.getTargetInLca=function(){return this.targetInLca},o.prototype.getOtherEnd=function(e){if(this.source===e)return this.target;if(this.target===e)return this.source;throw`Node is not incident with this edge`},o.prototype.getOtherEndInGraph=function(e,t){for(var n=this.getOtherEnd(e),r=t.getGraphManager().getRoot();;){if(n.getOwner()==t)return n;if(n.getOwner()==r)break;n=n.getOwner().getParent()}return null},o.prototype.updateLength=function(){var e=[,,,,];this.isOverlapingSourceAndTarget=i.getIntersection(this.target.getRect(),this.source.getRect(),e),this.isOverlapingSourceAndTarget||(this.lengthX=e[0]-e[2],this.lengthY=e[1]-e[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))},o.prototype.updateLengthSimple=function(){this.lengthX=this.target.getCenterX()-this.source.getCenterX(),this.lengthY=this.target.getCenterY()-this.source.getCenterY(),Math.abs(this.lengthX)<1&&(this.lengthX=a.sign(this.lengthX)),Math.abs(this.lengthY)<1&&(this.lengthY=a.sign(this.lengthY)),this.length=Math.sqrt(this.lengthX*this.lengthX+this.lengthY*this.lengthY)},e.exports=o}),(function(e,t,n){"use strict";function r(e){this.vGraphObject=e}e.exports=r}),(function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(13),o=n(0),s=n(16),l=n(4);function u(e,t,n,o){n==null&&o==null&&(o=t),r.call(this,o),e.graphManager!=null&&(e=e.graphManager),this.estimatedSize=i.MIN_VALUE,this.inclusionTreeDepth=i.MAX_VALUE,this.vGraphObject=o,this.edges=[],this.graphManager=e,this.rect=n!=null&&t!=null?new a(t.x,t.y,n.width,n.height):new a}for(var d in u.prototype=Object.create(r.prototype),r)u[d]=r[d];u.prototype.getEdges=function(){return this.edges},u.prototype.getChild=function(){return this.child},u.prototype.getOwner=function(){return this.owner},u.prototype.getWidth=function(){return this.rect.width},u.prototype.setWidth=function(e){this.rect.width=e},u.prototype.getHeight=function(){return this.rect.height},u.prototype.setHeight=function(e){this.rect.height=e},u.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2},u.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2},u.prototype.getCenter=function(){return new l(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)},u.prototype.getLocation=function(){return new l(this.rect.x,this.rect.y)},u.prototype.getRect=function(){return this.rect},u.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)},u.prototype.getHalfTheDiagonal=function(){return Math.sqrt(this.rect.height*this.rect.height+this.rect.width*this.rect.width)/2},u.prototype.setRect=function(e,t){this.rect.x=e.x,this.rect.y=e.y,this.rect.width=t.width,this.rect.height=t.height},u.prototype.setCenter=function(e,t){this.rect.x=e-this.rect.width/2,this.rect.y=t-this.rect.height/2},u.prototype.setLocation=function(e,t){this.rect.x=e,this.rect.y=t},u.prototype.moveBy=function(e,t){this.rect.x+=e,this.rect.y+=t},u.prototype.getEdgeListToNode=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.target==e){if(r.source!=n)throw`Incorrect edge source!`;t.push(r)}}),t},u.prototype.getEdgesBetween=function(e){var t=[],n=this;return n.edges.forEach(function(r){if(r.source!=n&&r.target!=n)throw`Incorrect edge source and/or target`;(r.target==e||r.source==e)&&t.push(r)}),t},u.prototype.getNeighborsList=function(){var e=new Set,t=this;return t.edges.forEach(function(n){if(n.source==t)e.add(n.target);else{if(n.target!=t)throw`Incorrect incidency!`;e.add(n.source)}}),e},u.prototype.withChildren=function(){var e=new Set,t,n;if(e.add(this),this.child!=null)for(var r=this.child.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.withChildren(),n.forEach(function(t){e.add(t)});return e},u.prototype.getNoOfChildren=function(){var e=0,t;if(this.child==null)e=1;else for(var n=this.child.getNodes(),r=0;r<n.length;r++)t=n[r],e+=t.getNoOfChildren();return e==0&&(e=1),e},u.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},u.prototype.calcEstimatedSize=function(){return this.child==null?this.estimatedSize=(this.rect.width+this.rect.height)/2:(this.estimatedSize=this.child.calcEstimatedSize(),this.rect.width=this.estimatedSize,this.rect.height=this.estimatedSize,this.estimatedSize)},u.prototype.scatter=function(){var e,t,n=-o.INITIAL_WORLD_BOUNDARY,r=o.INITIAL_WORLD_BOUNDARY;e=o.WORLD_CENTER_X+s.nextDouble()*(r-n)+n;var i=-o.INITIAL_WORLD_BOUNDARY,a=o.INITIAL_WORLD_BOUNDARY;t=o.WORLD_CENTER_Y+s.nextDouble()*(a-i)+i,this.rect.x=e,this.rect.y=t},u.prototype.updateBounds=function(){if(this.getChild()==null)throw`assert failed`;if(this.getChild().getNodes().length!=0){var e=this.getChild();if(e.updateBounds(!0),this.rect.x=e.getLeft(),this.rect.y=e.getTop(),this.setWidth(e.getRight()-e.getLeft()),this.setHeight(e.getBottom()-e.getTop()),o.NODE_DIMENSIONS_INCLUDE_LABELS){var t=e.getRight()-e.getLeft(),n=e.getBottom()-e.getTop();this.labelWidth>t&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>n&&(this.labelPos==`center`?this.rect.y-=(this.labelHeight-n)/2:this.labelPos==`top`&&(this.rect.y-=this.labelHeight-n),this.setHeight(this.labelHeight))}}},u.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==i.MAX_VALUE)throw`assert failed`;return this.inclusionTreeDepth},u.prototype.transform=function(e){var t=this.rect.x;t>o.WORLD_BOUNDARY?t=o.WORLD_BOUNDARY:t<-o.WORLD_BOUNDARY&&(t=-o.WORLD_BOUNDARY);var n=this.rect.y;n>o.WORLD_BOUNDARY?n=o.WORLD_BOUNDARY:n<-o.WORLD_BOUNDARY&&(n=-o.WORLD_BOUNDARY);var r=new l(t,n),i=e.inverseTransformPoint(r);this.setLocation(i.x,i.y)},u.prototype.getLeft=function(){return this.rect.x},u.prototype.getRight=function(){return this.rect.x+this.rect.width},u.prototype.getTop=function(){return this.rect.y},u.prototype.getBottom=function(){return this.rect.y+this.rect.height},u.prototype.getParent=function(){return this.owner==null?null:this.owner.getParent()},e.exports=u}),(function(e,t,n){"use strict";function r(e,t){e==null&&t==null?(this.x=0,this.y=0):(this.x=e,this.y=t)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.setX=function(e){this.x=e},r.prototype.setY=function(e){this.y=e},r.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},r.prototype.getCopy=function(){return new r(this.x,this.y)},r.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=r}),(function(e,t,n){"use strict";var r=n(2),i=n(10),a=n(0),o=n(6),s=n(3),l=n(1),u=n(13),d=n(12),f=n(11);function p(e,t,n){r.call(this,n),this.estimatedSize=i.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=e,t!=null&&t instanceof o?this.graphManager=t:t!=null&&t instanceof Layout&&(this.graphManager=t.graphManager)}for(var m in p.prototype=Object.create(r.prototype),r)p[m]=r[m];p.prototype.getNodes=function(){return this.nodes},p.prototype.getEdges=function(){return this.edges},p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getParent=function(){return this.parent},p.prototype.getLeft=function(){return this.left},p.prototype.getRight=function(){return this.right},p.prototype.getTop=function(){return this.top},p.prototype.getBottom=function(){return this.bottom},p.prototype.isConnected=function(){return this.isConnected},p.prototype.add=function(e,t,n){if(t==null&&n==null){var r=e;if(this.graphManager==null)throw`Graph has no graph mgr!`;if(this.getNodes().indexOf(r)>-1)throw`Node already in graph!`;return r.owner=this,this.getNodes().push(r),r}var i=e;if(!(this.getNodes().indexOf(t)>-1&&this.getNodes().indexOf(n)>-1))throw`Source or target not in graph!`;if(t.owner!=n.owner||t.owner!=this)throw`Both owners must be this graph!`;return t.owner==n.owner?(i.source=t,i.target=n,i.isInterGraph=!1,this.getEdges().push(i),t.edges.push(i),n!=t&&n.edges.push(i),i):null},p.prototype.remove=function(e){var t=e;if(e instanceof s){if(t==null)throw`Node is null!`;if(t.owner==null||t.owner!=this)throw`Owner graph is invalid!`;if(this.graphManager==null)throw`Owner graph manager is invalid!`;for(var n=t.edges.slice(),r,i=n.length,a=0;a<i;a++)r=n[a],r.isInterGraph?this.graphManager.remove(r):r.source.owner.remove(r);var o=this.nodes.indexOf(t);if(o==-1)throw`Node not in owner node list!`;this.nodes.splice(o,1)}else if(e instanceof l){var r=e;if(r==null)throw`Edge is null!`;if(r.source==null||r.target==null)throw`Source and/or target is null!`;if(r.source.owner==null||r.target.owner==null||r.source.owner!=this||r.target.owner!=this)throw`Source and/or target owner is invalid!`;var u=r.source.edges.indexOf(r),d=r.target.edges.indexOf(r);if(!(u>-1&&d>-1))throw`Source and/or target doesn't know this edge!`;r.source.edges.splice(u,1),r.target!=r.source&&r.target.edges.splice(d,1);var o=r.source.owner.getEdges().indexOf(r);if(o==-1)throw`Not in owner's edge list!`;r.source.owner.getEdges().splice(o,1)}},p.prototype.updateLeftTop=function(){for(var e=i.MAX_VALUE,t=i.MAX_VALUE,n,r,a,o=this.getNodes(),s=o.length,l=0;l<s;l++){var u=o[l];n=u.getTop(),r=u.getLeft(),e>n&&(e=n),t>r&&(t=r)}return e==i.MAX_VALUE?null:(a=o[0].getParent().paddingLeft==null?this.margin:o[0].getParent().paddingLeft,this.left=t-a,this.top=e-a,new d(this.left,this.top))},p.prototype.updateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f,p=this.nodes,m=p.length,h=0;h<m;h++){var g=p[h];e&&g.child!=null&&g.updateBounds(),o=g.getLeft(),s=g.getRight(),l=g.getTop(),d=g.getBottom(),t>o&&(t=o),n<s&&(n=s),r>l&&(r=l),a<d&&(a=d)}var _=new u(t,r,n-t,a-r);t==i.MAX_VALUE&&(this.left=this.parent.getLeft(),this.right=this.parent.getRight(),this.top=this.parent.getTop(),this.bottom=this.parent.getBottom()),f=p[0].getParent().paddingLeft==null?this.margin:p[0].getParent().paddingLeft,this.left=_.x-f,this.right=_.x+_.width+f,this.top=_.y-f,this.bottom=_.y+_.height+f},p.calculateBounds=function(e){for(var t=i.MAX_VALUE,n=-i.MAX_VALUE,r=i.MAX_VALUE,a=-i.MAX_VALUE,o,s,l,d,f=e.length,p=0;p<f;p++){var m=e[p];o=m.getLeft(),s=m.getRight(),l=m.getTop(),d=m.getBottom(),t>o&&(t=o),n<s&&(n=s),r>l&&(r=l),a<d&&(a=d)}return new u(t,r,n-t,a-r)},p.prototype.getInclusionTreeDepth=function(){return this==this.graphManager.getRoot()?1:this.parent.getInclusionTreeDepth()},p.prototype.getEstimatedSize=function(){if(this.estimatedSize==i.MIN_VALUE)throw`assert failed`;return this.estimatedSize},p.prototype.calcEstimatedSize=function(){for(var e=0,t=this.nodes,n=t.length,r=0;r<n;r++){var i=t[r];e+=i.calcEstimatedSize()}return this.estimatedSize=e==0?a.EMPTY_COMPOUND_NODE_SIZE:e/Math.sqrt(this.nodes.length),this.estimatedSize},p.prototype.updateConnected=function(){var e=this;if(this.nodes.length==0){this.isConnected=!0;return}var t=new f,n=new Set,r=this.nodes[0],i,a;for(r.withChildren().forEach(function(e){t.push(e),n.add(e)});t.length!==0;){r=t.shift(),i=r.getEdges();for(var o=i.length,s=0;s<o;s++)a=i[s].getOtherEndInGraph(r,this),a!=null&&!n.has(a)&&a.withChildren().forEach(function(e){t.push(e),n.add(e)})}if(this.isConnected=!1,n.size>=this.nodes.length){var l=0;n.forEach(function(t){t.owner==e&&l++}),l==this.nodes.length&&(this.isConnected=!0)}},e.exports=p}),(function(e,t,n){"use strict";var r,i=n(1);function a(e){r=n(5),this.layout=e,this.graphs=[],this.edges=[]}a.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),n=this.add(e,t);return this.setRootGraph(n),this.rootGraph},a.prototype.add=function(e,t,n,r,i){if(n==null&&r==null&&i==null){if(e==null)throw`Graph is null!`;if(t==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(t.child!=null)throw`Already has a child!`;return e.parent=t,t.child=e,e}i=n,r=t,n=e;var a=r.getOwner(),o=i.getOwner();if(a==null||a.getGraphManager()!=this)throw`Source not in this graph mgr!`;if(o==null||o.getGraphManager()!=this)throw`Target not in this graph mgr!`;if(a==o)return n.isInterGraph=!1,a.add(n,r,i);if(n.isInterGraph=!0,n.source=r,n.target=i,this.edges.indexOf(n)>-1)throw`Edge already in inter-graph edge list!`;if(this.edges.push(n),n.source==null||n.target==null)throw`Edge source and/or target is null!`;if(n.source.edges.indexOf(n)!=-1||n.target.edges.indexOf(n)!=-1)throw`Edge already in source and/or target incidency list!`;return n.source.edges.push(n),n.target.edges.push(n),n},a.prototype.remove=function(e){if(e instanceof r){var t=e;if(t.getGraphManager()!=this)throw`Graph not in this graph mgr`;if(!(t==this.rootGraph||t.parent!=null&&t.parent.graphManager==this))throw`Invalid parent node!`;var n=[];n=n.concat(t.getEdges());for(var a,o=n.length,s=0;s<o;s++)a=n[s],t.remove(a);var l=[];l=l.concat(t.getNodes());var u;o=l.length;for(var s=0;s<o;s++)u=l[s],t.remove(u);t==this.rootGraph&&this.setRootGraph(null);var d=this.graphs.indexOf(t);this.graphs.splice(d,1),t.parent=null}else if(e instanceof i){if(a=e,a==null)throw`Edge is null!`;if(!a.isInterGraph)throw`Not an inter-graph edge!`;if(a.source==null||a.target==null)throw`Source and/or target is null!`;if(a.source.edges.indexOf(a)==-1||a.target.edges.indexOf(a)==-1)throw`Source and/or target doesn't know this edge!`;var d=a.source.edges.indexOf(a);if(a.source.edges.splice(d,1),d=a.target.edges.indexOf(a),a.target.edges.splice(d,1),a.source.owner==null||a.source.owner.getGraphManager()==null)throw`Edge owner graph or owner graph manager is null!`;if(a.source.owner.getGraphManager().edges.indexOf(a)==-1)throw`Not in owner graph manager's edge list!`;var d=a.source.owner.getGraphManager().edges.indexOf(a);a.source.owner.getGraphManager().edges.splice(d,1)}},a.prototype.updateBounds=function(){this.rootGraph.updateBounds(!0)},a.prototype.getGraphs=function(){return this.graphs},a.prototype.getAllNodes=function(){if(this.allNodes==null){for(var e=[],t=this.getGraphs(),n=t.length,r=0;r<n;r++)e=e.concat(t[r].getNodes());this.allNodes=e}return this.allNodes},a.prototype.resetAllNodes=function(){this.allNodes=null},a.prototype.resetAllEdges=function(){this.allEdges=null},a.prototype.resetAllNodesToApplyGravitation=function(){this.allNodesToApplyGravitation=null},a.prototype.getAllEdges=function(){if(this.allEdges==null){var e=[],t=this.getGraphs();t.length;for(var n=0;n<t.length;n++)e=e.concat(t[n].getEdges());e=e.concat(this.edges),this.allEdges=e}return this.allEdges},a.prototype.getAllNodesToApplyGravitation=function(){return this.allNodesToApplyGravitation},a.prototype.setAllNodesToApplyGravitation=function(e){if(this.allNodesToApplyGravitation!=null)throw`assert failed`;this.allNodesToApplyGravitation=e},a.prototype.getRoot=function(){return this.rootGraph},a.prototype.setRootGraph=function(e){if(e.getGraphManager()!=this)throw`Root not in this graph mgr!`;this.rootGraph=e,e.parent??=this.layout.newNode(`Root node`)},a.prototype.getLayout=function(){return this.layout},a.prototype.isOneAncestorOfOther=function(e,t){if(e==null||t==null)throw`assert failed`;if(e==t)return!0;var n=e.getOwner(),r;do{if(r=n.getParent(),r==null)break;if(r==t)return!0;if(n=r.getOwner(),n==null)break}while(!0);n=t.getOwner();do{if(r=n.getParent(),r==null)break;if(r==e)return!0;if(n=r.getOwner(),n==null)break}while(!0);return!1},a.prototype.calcLowestCommonAncestors=function(){for(var e,t,n,r,i,a=this.getAllEdges(),o=a.length,s=0;s<o;s++){if(e=a[s],t=e.source,n=e.target,e.lca=null,e.sourceInLca=t,e.targetInLca=n,t==n){e.lca=t.getOwner();continue}for(r=t.getOwner();e.lca==null;){for(e.targetInLca=n,i=n.getOwner();e.lca==null;){if(i==r){e.lca=i;break}if(i==this.rootGraph)break;if(e.lca!=null)throw`assert failed`;e.targetInLca=i.getParent(),i=e.targetInLca.getOwner()}if(r==this.rootGraph)break;e.lca??(e.sourceInLca=r.getParent(),r=e.sourceInLca.getOwner())}if(e.lca==null)throw`assert failed`}},a.prototype.calcLowestCommonAncestor=function(e,t){if(e==t)return e.getOwner();var n=e.getOwner();do{if(n==null)break;var r=t.getOwner();do{if(r==null)break;if(r==n)return r;r=r.getParent().getOwner()}while(!0);n=n.getParent().getOwner()}while(!0);return n},a.prototype.calcInclusionTreeDepths=function(e,t){e==null&&t==null&&(e=this.rootGraph,t=1);for(var n,r=e.getNodes(),i=r.length,a=0;a<i;a++)n=r[a],n.inclusionTreeDepth=t,n.child!=null&&this.calcInclusionTreeDepths(n.child,t+1)},a.prototype.includesInvalidEdge=function(){for(var e,t=this.edges.length,n=0;n<t;n++)if(e=this.edges[n],this.isOneAncestorOfOther(e.source,e.target))return!0;return!1},e.exports=a}),(function(e,t,n){"use strict";var r=n(0);function i(){}for(var a in r)i[a]=r[a];i.MAX_ITERATIONS=2500,i.DEFAULT_EDGE_LENGTH=50,i.DEFAULT_SPRING_STRENGTH=.45,i.DEFAULT_REPULSION_STRENGTH=4500,i.DEFAULT_GRAVITY_STRENGTH=.4,i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=1,i.DEFAULT_GRAVITY_RANGE_FACTOR=3.8,i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=1.5,i.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION=!0,i.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION=!0,i.DEFAULT_COOLING_FACTOR_INCREMENTAL=.3,i.COOLING_ADAPTATION_FACTOR=.33,i.ADAPTATION_LOWER_NODE_LIMIT=1e3,i.ADAPTATION_UPPER_NODE_LIMIT=5e3,i.MAX_NODE_DISPLACEMENT_INCREMENTAL=100,i.MAX_NODE_DISPLACEMENT=i.MAX_NODE_DISPLACEMENT_INCREMENTAL*3,i.MIN_REPULSION_DIST=i.DEFAULT_EDGE_LENGTH/10,i.CONVERGENCE_CHECK_PERIOD=100,i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=.1,i.MIN_EDGE_LENGTH=1,i.GRID_CALCULATION_CHECK_PERIOD=10,e.exports=i}),(function(e,t,n){"use strict";var r=n(12);function i(){}i.calcSeparationAmount=function(e,t,n,r){if(!e.intersects(t))throw`assert failed`;var i=[,,];this.decideDirectionsForOverlappingNodes(e,t,i),n[0]=Math.min(e.getRight(),t.getRight())-Math.max(e.x,t.x),n[1]=Math.min(e.getBottom(),t.getBottom())-Math.max(e.y,t.y),e.getX()<=t.getX()&&e.getRight()>=t.getRight()?n[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight()):t.getX()<=e.getX()&&t.getRight()>=e.getRight()&&(n[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight())),e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()?n[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom()):t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()&&(n[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()));var a=Math.abs((t.getCenterY()-e.getCenterY())/(t.getCenterX()-e.getCenterX()));t.getCenterY()===e.getCenterY()&&t.getCenterX()===e.getCenterX()&&(a=1);var o=a*n[0],s=n[1]/a;n[0]<s?s=n[0]:o=n[1],n[0]=-1*i[0]*(s/2+r),n[1]=-1*i[1]*(o/2+r)},i.decideDirectionsForOverlappingNodes=function(e,t,n){n[0]=e.getCenterX()<t.getCenterX()?-1:1,n[1]=e.getCenterY()<t.getCenterY()?-1:1},i.getIntersection2=function(e,t,n){var r=e.getCenterX(),i=e.getCenterY(),a=t.getCenterX(),o=t.getCenterY();if(e.intersects(t))return n[0]=r,n[1]=i,n[2]=a,n[3]=o,!0;var s=e.getX(),l=e.getY(),u=e.getRight(),d=e.getX(),f=e.getBottom(),p=e.getRight(),m=e.getWidthHalf(),h=e.getHeightHalf(),g=t.getX(),_=t.getY(),v=t.getRight(),y=t.getX(),b=t.getBottom(),x=t.getRight(),S=t.getWidthHalf(),C=t.getHeightHalf(),w=!1,T=!1;if(r===a){if(i>o)return n[0]=r,n[1]=l,n[2]=a,n[3]=b,!1;if(i<o)return n[0]=r,n[1]=f,n[2]=a,n[3]=_,!1}else if(i===o){if(r>a)return n[0]=s,n[1]=i,n[2]=v,n[3]=o,!1;if(r<a)return n[0]=u,n[1]=i,n[2]=g,n[3]=o,!1}else{var E=e.height/e.width,D=t.height/t.width,O=(o-i)/(a-r),k=void 0,A=void 0,j=void 0,M=void 0,N=void 0,P=void 0;if(-E===O?r>a?(n[0]=d,n[1]=f,w=!0):(n[0]=u,n[1]=l,w=!0):E===O&&(r>a?(n[0]=s,n[1]=l,w=!0):(n[0]=p,n[1]=f,w=!0)),-D===O?a>r?(n[2]=y,n[3]=b,T=!0):(n[2]=v,n[3]=_,T=!0):D===O&&(a>r?(n[2]=g,n[3]=_,T=!0):(n[2]=x,n[3]=b,T=!0)),w&&T)return!1;if(r>a?i>o?(k=this.getCardinalDirection(E,O,4),A=this.getCardinalDirection(D,O,2)):(k=this.getCardinalDirection(-E,O,3),A=this.getCardinalDirection(-D,O,1)):i>o?(k=this.getCardinalDirection(-E,O,1),A=this.getCardinalDirection(-D,O,3)):(k=this.getCardinalDirection(E,O,2),A=this.getCardinalDirection(D,O,4)),!w)switch(k){case 1:M=l,j=r+-h/O,n[0]=j,n[1]=M;break;case 2:j=p,M=i+m*O,n[0]=j,n[1]=M;break;case 3:M=f,j=r+h/O,n[0]=j,n[1]=M;break;case 4:j=d,M=i+-m*O,n[0]=j,n[1]=M}if(!T)switch(A){case 1:P=_,N=a+-C/O,n[2]=N,n[3]=P;break;case 2:N=x,P=o+S*O,n[2]=N,n[3]=P;break;case 3:P=b,N=a+C/O,n[2]=N,n[3]=P;break;case 4:N=y,P=o+-S*O,n[2]=N,n[3]=P}}return!1},i.getCardinalDirection=function(e,t,n){return e>t?n:1+n%4},i.getIntersection=function(e,t,n,i){if(i==null)return this.getIntersection2(e,t,n);var a=e.x,o=e.y,s=t.x,l=t.y,u=n.x,d=n.y,f=i.x,p=i.y,m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0;return g=l-o,v=a-s,b=s*o-a*l,_=p-d,y=u-f,x=f*d-u*p,S=g*y-_*v,S===0?null:(m=(v*x-y*b)/S,h=(_*b-g*x)/S,new r(m,h))},i.angleOfVector=function(e,t,n,r){var i=void 0;return e===n?i=r<t?this.ONE_AND_HALF_PI:this.HALF_PI:(i=Math.atan((r-t)/(n-e)),n<e?i+=Math.PI:r<t&&(i+=this.TWO_PI)),i},i.doIntersect=function(e,t,n,r){var i=e.x,a=e.y,o=t.x,s=t.y,l=n.x,u=n.y,d=r.x,f=r.y,p=(o-i)*(f-u)-(d-l)*(s-a);if(p===0)return!1;var m=((f-u)*(d-i)+(l-d)*(f-a))/p,h=((a-s)*(d-i)+(o-i)*(f-a))/p;return 0<m&&m<1&&0<h&&h<1},i.HALF_PI=.5*Math.PI,i.ONE_AND_HALF_PI=1.5*Math.PI,i.TWO_PI=2*Math.PI,i.THREE_PI=3*Math.PI,e.exports=i}),(function(e,t,n){"use strict";function r(){}r.sign=function(e){return e>0?1:e<0?-1:0},r.floor=function(e){return e<0?Math.ceil(e):Math.floor(e)},r.ceil=function(e){return e<0?Math.floor(e):Math.ceil(e)},e.exports=r}),(function(e,t,n){"use strict";function r(){}r.MAX_VALUE=2147483647,r.MIN_VALUE=-2147483648,e.exports=r}),(function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=function(e){return{value:e,next:null,prev:null}},o=function(e,t,n,r){return e===null?r.head=t:e.next=t,n===null?r.tail=t:n.prev=t,t.prev=e,t.next=n,r.length++,t},s=function(e,t){var n=e.prev,r=e.next;return n===null?t.head=r:n.next=r,r===null?t.tail=n:r.prev=n,e.prev=e.next=null,t.length--,e};e.exports=function(){function e(t){var n=this;i(this,e),this.length=0,this.head=null,this.tail=null,t?.forEach(function(e){return n.push(e)})}return r(e,[{key:`size`,value:function(){return this.length}},{key:`insertBefore`,value:function(e,t){return o(t.prev,a(e),t,this)}},{key:`insertAfter`,value:function(e,t){return o(t,a(e),t.next,this)}},{key:`insertNodeBefore`,value:function(e,t){return o(t.prev,e,t,this)}},{key:`insertNodeAfter`,value:function(e,t){return o(t,e,t.next,this)}},{key:`push`,value:function(e){return o(this.tail,a(e),null,this)}},{key:`unshift`,value:function(e){return o(null,a(e),this.head,this)}},{key:`remove`,value:function(e){return s(e,this)}},{key:`pop`,value:function(){return s(this.tail,this).value}},{key:`popNode`,value:function(){return s(this.tail,this)}},{key:`shift`,value:function(){return s(this.head,this).value}},{key:`shiftNode`,value:function(){return s(this.head,this)}},{key:`get_object_at`,value:function(e){if(e<=this.length()){for(var t=1,n=this.head;t<e;)n=n.next,t++;return n.value}}},{key:`set_object_at`,value:function(e,t){if(e<=this.length()){for(var n=1,r=this.head;n<e;)r=r.next,n++;r.value=t}}}]),e}()}),(function(e,t,n){"use strict";function r(e,t,n){this.x=null,this.y=null,e==null&&t==null&&n==null?(this.x=0,this.y=0):typeof e==`number`&&typeof t==`number`&&n==null?(this.x=e,this.y=t):e.constructor.name==`Point`&&t==null&&n==null&&(n=e,this.x=n.x,this.y=n.y)}r.prototype.getX=function(){return this.x},r.prototype.getY=function(){return this.y},r.prototype.getLocation=function(){return new r(this.x,this.y)},r.prototype.setLocation=function(e,t,n){e.constructor.name==`Point`&&t==null&&n==null?(n=e,this.setLocation(n.x,n.y)):typeof e==`number`&&typeof t==`number`&&n==null&&(parseInt(e)==e&&parseInt(t)==t?this.move(e,t):(this.x=Math.floor(e+.5),this.y=Math.floor(t+.5)))},r.prototype.move=function(e,t){this.x=e,this.y=t},r.prototype.translate=function(e,t){this.x+=e,this.y+=t},r.prototype.equals=function(e){if(e.constructor.name==`Point`){var t=e;return this.x==t.x&&this.y==t.y}return this==e},r.prototype.toString=function(){return new r().constructor.name+`[x=`+this.x+`,y=`+this.y+`]`},e.exports=r}),(function(e,t,n){"use strict";function r(e,t,n,r){this.x=0,this.y=0,this.width=0,this.height=0,e!=null&&t!=null&&n!=null&&r!=null&&(this.x=e,this.y=t,this.width=n,this.height=r)}r.prototype.getX=function(){return this.x},r.prototype.setX=function(e){this.x=e},r.prototype.getY=function(){return this.y},r.prototype.setY=function(e){this.y=e},r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},r.prototype.getRight=function(){return this.x+this.width},r.prototype.getBottom=function(){return this.y+this.height},r.prototype.intersects=function(e){return!(this.getRight()<e.x||this.getBottom()<e.y||e.getRight()<this.x||e.getBottom()<this.y)},r.prototype.getCenterX=function(){return this.x+this.width/2},r.prototype.getMinX=function(){return this.getX()},r.prototype.getMaxX=function(){return this.getX()+this.width},r.prototype.getCenterY=function(){return this.y+this.height/2},r.prototype.getMinY=function(){return this.getY()},r.prototype.getMaxY=function(){return this.getY()+this.height},r.prototype.getWidthHalf=function(){return this.width/2},r.prototype.getHeightHalf=function(){return this.height/2},e.exports=r}),(function(e,t,n){"use strict";var r=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e};function i(){}i.lastID=0,i.createID=function(e){return i.isPrimitive(e)?e:e.uniqueID==null?(e.uniqueID=i.getString(),i.lastID++,e.uniqueID):e.uniqueID},i.getString=function(e){return e??=i.lastID,`Object#`+e},i.isPrimitive=function(e){var t=e===void 0?`undefined`:r(e);return e==null||t!=`object`&&t!=`function`},e.exports=i}),(function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(0),a=n(6),o=n(3),s=n(1),l=n(5),u=n(4),d=n(17),f=n(27);function p(e){f.call(this),this.layoutQuality=i.QUALITY,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.incremental=i.DEFAULT_INCREMENTAL,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES,this.edgeToDummyNodes=new Map,this.graphManager=new a(this),this.isLayoutFinished=!1,this.isSubLayout=!1,this.isRemoteUse=!1,e!=null&&(this.isRemoteUse=e)}p.RANDOM_SEED=1,p.prototype=Object.create(f.prototype),p.prototype.getGraphManager=function(){return this.graphManager},p.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()},p.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()},p.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()},p.prototype.newGraphManager=function(){var e=new a(this);return this.graphManager=e,e},p.prototype.newGraph=function(e){return new l(null,this.graphManager,e)},p.prototype.newNode=function(e){return new o(this.graphManager,e)},p.prototype.newEdge=function(e){return new s(null,null,e)},p.prototype.checkLayoutSuccess=function(){return this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()},p.prototype.runLayout=function(){this.isLayoutFinished=!1,this.tilingPreLayout&&this.tilingPreLayout(),this.initParameters();var e=!this.checkLayoutSuccess()&&this.layout();return i.ANIMATE!==`during`&&(e&&(this.isSubLayout||this.doPostLayout()),this.tilingPostLayout&&this.tilingPostLayout(),this.isLayoutFinished=!0,e)},p.prototype.doPostLayout=function(){this.incremental||this.transform(),this.update()},p.prototype.update2=function(){if(this.createBendsAsNeeded&&(this.createBendpointsFromDummyNodes(),this.graphManager.resetAllEdges()),!this.isRemoteUse){for(var e=this.graphManager.getAllEdges(),t=0;t<e.length;t++)e[t];for(var n=this.graphManager.getRoot().getNodes(),t=0;t<n.length;t++)n[t];this.update(this.graphManager.getRoot())}},p.prototype.update=function(e){if(e==null)this.update2();else if(e instanceof o){var t=e;if(t.getChild()!=null)for(var n=t.getChild().getNodes(),r=0;r<n.length;r++)update(n[r]);t.vGraphObject!=null&&t.vGraphObject.update(t)}else if(e instanceof s){var i=e;i.vGraphObject!=null&&i.vGraphObject.update(i)}else if(e instanceof l){var a=e;a.vGraphObject!=null&&a.vGraphObject.update(a)}},p.prototype.initParameters=function(){this.isSubLayout||(this.layoutQuality=i.QUALITY,this.animationDuringLayout=i.DEFAULT_ANIMATION_DURING_LAYOUT,this.animationPeriod=i.DEFAULT_ANIMATION_PERIOD,this.animationOnLayout=i.DEFAULT_ANIMATION_ON_LAYOUT,this.incremental=i.DEFAULT_INCREMENTAL,this.createBendsAsNeeded=i.DEFAULT_CREATE_BENDS_AS_NEEDED,this.uniformLeafNodeSizes=i.DEFAULT_UNIFORM_LEAF_NODE_SIZES),this.animationDuringLayout&&(this.animationOnLayout=!1)},p.prototype.transform=function(e){if(e==null)this.transform(new u(0,0));else{var t=new d,n=this.graphManager.getRoot().updateLeftTop();if(n!=null){t.setWorldOrgX(e.x),t.setWorldOrgY(e.y),t.setDeviceOrgX(n.x),t.setDeviceOrgY(n.y);for(var r=this.getAllNodes(),i,a=0;a<r.length;a++)i=r[a],i.transform(t)}}},p.prototype.positionNodesRandomly=function(e){if(e==null)this.positionNodesRandomly(this.getGraphManager().getRoot()),this.getGraphManager().getRoot().updateBounds(!0);else for(var t,n,r=e.getNodes(),i=0;i<r.length;i++)t=r[i],n=t.getChild(),n==null||n.getNodes().length==0?t.scatter():(this.positionNodesRandomly(n),t.updateBounds())},p.prototype.getFlatForest=function(){for(var e=[],t=!0,n=this.graphManager.getRoot().getNodes(),i=!0,a=0;a<n.length;a++)n[a].getChild()!=null&&(i=!1);if(!i)return e;var o=new Set,s=[],l=new Map,u=[];for(u=u.concat(n);u.length>0&&t;){for(s.push(u[0]);s.length>0&&t;){var d=s[0];s.splice(0,1),o.add(d);for(var f=d.getEdges(),a=0;a<f.length;a++){var p=f[a].getOtherEnd(d);if(l.get(d)!=p){if(!o.has(p))s.push(p),l.set(p,d);else{t=!1;break}}}}if(!t)e=[];else{var m=[].concat(r(o));e.push(m);for(var a=0;a<m.length;a++){var h=m[a],g=u.indexOf(h);g>-1&&u.splice(g,1)}o=new Set,l=new Map}}return e},p.prototype.createDummyNodesForBendpoints=function(e){for(var t=[],n=e.source,r=this.graphManager.calcLowestCommonAncestor(e.source,e.target),i=0;i<e.bendpoints.length;i++){var a=this.newNode(null);a.setRect(new Point(0,0),new Dimension(1,1)),r.add(a);var o=this.newEdge(null);this.graphManager.add(o,n,a),t.add(a),n=a}var o=this.newEdge(null);return this.graphManager.add(o,n,e.target),this.edgeToDummyNodes.set(e,t),e.isInterGraph()?this.graphManager.remove(e):r.remove(e),t},p.prototype.createBendpointsFromDummyNodes=function(){var e=[];e=e.concat(this.graphManager.getAllEdges()),e=[].concat(r(this.edgeToDummyNodes.keys()),e);for(var t=0;t<e.length;t++){var n=e[t];if(n.bendpoints.length>0){for(var i=this.edgeToDummyNodes.get(n),a=0;a<i.length;a++){var o=i[a],s=new u(o.getCenterX(),o.getCenterY()),l=n.bendpoints.get(a);l.x=s.x,l.y=s.y,o.getOwner().remove(o)}this.graphManager.add(n,n.source,n.target)}}},p.transform=function(e,t,n,r){if(n!=null&&r!=null){var i=t;if(e<=50){var a=t/n;i-=(t-a)/50*(50-e)}else{var o=t*r;i+=(o-t)/50*(e-50)}return i}var s,l;return e<=50?(s=9*t/500,l=t/10):(s=9*t/50,l=-8*t),s*e+l},p.findCenterOfTree=function(e){var t=[];t=t.concat(e);var n=[],r=new Map,i=!1,a=null;(t.length==1||t.length==2)&&(i=!0,a=t[0]);for(var o=0;o<t.length;o++){var s=t[o],l=s.getNeighborsList().size;r.set(s,s.getNeighborsList().size),l==1&&n.push(s)}var u=[];for(u=u.concat(n);!i;){var d=[];d=d.concat(u),u=[];for(var o=0;o<t.length;o++){var s=t[o],f=t.indexOf(s);f>=0&&t.splice(f,1),s.getNeighborsList().forEach(function(e){if(n.indexOf(e)<0){var t=r.get(e)-1;t==1&&u.push(e),r.set(e,t)}})}n=n.concat(u),(t.length==1||t.length==2)&&(i=!0,a=t[0])}return a},p.prototype.setGraphManager=function(e){this.graphManager=e},e.exports=p}),(function(e,t,n){"use strict";function r(){}r.seed=1,r.x=0,r.nextDouble=function(){return r.x=Math.sin(r.seed++)*1e4,r.x-Math.floor(r.x)},e.exports=r}),(function(e,t,n){"use strict";var r=n(4);function i(e,t){this.lworldOrgX=0,this.lworldOrgY=0,this.ldeviceOrgX=0,this.ldeviceOrgY=0,this.lworldExtX=1,this.lworldExtY=1,this.ldeviceExtX=1,this.ldeviceExtY=1}i.prototype.getWorldOrgX=function(){return this.lworldOrgX},i.prototype.setWorldOrgX=function(e){this.lworldOrgX=e},i.prototype.getWorldOrgY=function(){return this.lworldOrgY},i.prototype.setWorldOrgY=function(e){this.lworldOrgY=e},i.prototype.getWorldExtX=function(){return this.lworldExtX},i.prototype.setWorldExtX=function(e){this.lworldExtX=e},i.prototype.getWorldExtY=function(){return this.lworldExtY},i.prototype.setWorldExtY=function(e){this.lworldExtY=e},i.prototype.getDeviceOrgX=function(){return this.ldeviceOrgX},i.prototype.setDeviceOrgX=function(e){this.ldeviceOrgX=e},i.prototype.getDeviceOrgY=function(){return this.ldeviceOrgY},i.prototype.setDeviceOrgY=function(e){this.ldeviceOrgY=e},i.prototype.getDeviceExtX=function(){return this.ldeviceExtX},i.prototype.setDeviceExtX=function(e){this.ldeviceExtX=e},i.prototype.getDeviceExtY=function(){return this.ldeviceExtY},i.prototype.setDeviceExtY=function(e){this.ldeviceExtY=e},i.prototype.transformX=function(e){var t=0,n=this.lworldExtX;return n!=0&&(t=this.ldeviceOrgX+(e-this.lworldOrgX)*this.ldeviceExtX/n),t},i.prototype.transformY=function(e){var t=0,n=this.lworldExtY;return n!=0&&(t=this.ldeviceOrgY+(e-this.lworldOrgY)*this.ldeviceExtY/n),t},i.prototype.inverseTransformX=function(e){var t=0,n=this.ldeviceExtX;return n!=0&&(t=this.lworldOrgX+(e-this.ldeviceOrgX)*this.lworldExtX/n),t},i.prototype.inverseTransformY=function(e){var t=0,n=this.ldeviceExtY;return n!=0&&(t=this.lworldOrgY+(e-this.ldeviceOrgY)*this.lworldExtY/n),t},i.prototype.inverseTransformPoint=function(e){return new r(this.inverseTransformX(e.x),this.inverseTransformY(e.y))},e.exports=i}),(function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var i=n(15),a=n(7),o=n(0),s=n(8),l=n(9);function u(){i.call(this),this.useSmartIdealEdgeLengthCalculation=a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.idealEdgeLength=a.DEFAULT_EDGE_LENGTH,this.springConstant=a.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=a.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=a.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=a.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=a.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.displacementThresholdPerNode=3*a.DEFAULT_EDGE_LENGTH/100,this.coolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.initialCoolingFactor=a.DEFAULT_COOLING_FACTOR_INCREMENTAL,this.totalDisplacement=0,this.oldTotalDisplacement=0,this.maxIterations=a.MAX_ITERATIONS}for(var d in u.prototype=Object.create(i.prototype),i)u[d]=i[d];u.prototype.initParameters=function(){i.prototype.initParameters.call(this,arguments),this.totalIterations=0,this.notAnimatedIterations=0,this.useFRGridVariant=a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION,this.grid=[]},u.prototype.calcIdealEdgeLengths=function(){for(var e,t,n,r,i,s,l=this.getGraphManager().getAllEdges(),u=0;u<l.length;u++)e=l[u],e.idealLength=this.idealEdgeLength,e.isInterGraph&&(n=e.getSource(),r=e.getTarget(),i=e.getSourceInLca().getEstimatedSize(),s=e.getTargetInLca().getEstimatedSize(),this.useSmartIdealEdgeLengthCalculation&&(e.idealLength+=i+s-2*o.SIMPLE_NODE_SIZE),t=e.getLca().getInclusionTreeDepth(),e.idealLength+=a.DEFAULT_EDGE_LENGTH*a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR*(n.getInclusionTreeDepth()+r.getInclusionTreeDepth()-2*t))},u.prototype.initSpringEmbedder=function(){var e=this.getAllNodes().length;this.incremental?(e>a.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*a.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(e-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):(this.coolingFactor=e>a.ADAPTATION_LOWER_NODE_LIMIT?Math.max(a.COOLING_ADAPTATION_FACTOR,1-(e-a.ADAPTATION_LOWER_NODE_LIMIT)/(a.ADAPTATION_UPPER_NODE_LIMIT-a.ADAPTATION_LOWER_NODE_LIMIT)*(1-a.COOLING_ADAPTATION_FACTOR)):1,this.initialCoolingFactor=this.coolingFactor,this.maxNodeDisplacement=a.MAX_NODE_DISPLACEMENT),this.maxIterations=Math.max(this.getAllNodes().length*5,this.maxIterations),this.totalDisplacementThreshold=this.displacementThresholdPerNode*this.getAllNodes().length,this.repulsionRange=this.calcRepulsionRange()},u.prototype.calcSpringForces=function(){for(var e=this.getAllEdges(),t,n=0;n<e.length;n++)t=e[n],this.calcSpringForce(t,t.idealLength)},u.prototype.calcRepulsionForces=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,t=arguments.length>1&&arguments[1]!==void 0&&arguments[1],n,r,i,o,s=this.getAllNodes(),l;if(this.useFRGridVariant)for(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&e&&this.updateGrid(),l=new Set,n=0;n<s.length;n++)i=s[n],this.calculateRepulsionForceOfANode(i,l,e,t),l.add(i);else for(n=0;n<s.length;n++)for(i=s[n],r=n+1;r<s.length;r++)o=s[r],i.getOwner()==o.getOwner()&&this.calcRepulsionForce(i,o)},u.prototype.calcGravitationalForces=function(){for(var e,t=this.getAllNodesToApplyGravitation(),n=0;n<t.length;n++)e=t[n],this.calcGravitationalForce(e)},u.prototype.moveNodes=function(){for(var e=this.getAllNodes(),t,n=0;n<e.length;n++)t=e[n],t.move()},u.prototype.calcSpringForce=function(e,t){var n=e.getSource(),r=e.getTarget(),i,a,o,s;if(this.uniformLeafNodeSizes&&n.getChild()==null&&r.getChild()==null)e.updateLengthSimple();else if(e.updateLength(),e.isOverlapingSourceAndTarget)return;i=e.getLength(),i!=0&&(a=this.springConstant*(i-t),o=a*(e.lengthX/i),s=a*(e.lengthY/i),n.springForceX+=o,n.springForceY+=s,r.springForceX-=o,r.springForceY-=s)},u.prototype.calcRepulsionForce=function(e,t){var n=e.getRect(),r=t.getRect(),i=[,,],o=[,,,,],u,d,f,p,m,h,g;if(n.intersects(r)){s.calcSeparationAmount(n,r,i,a.DEFAULT_EDGE_LENGTH/2),h=2*i[0],g=2*i[1];var _=e.noOfChildren*t.noOfChildren/(e.noOfChildren+t.noOfChildren);e.repulsionForceX-=_*h,e.repulsionForceY-=_*g,t.repulsionForceX+=_*h,t.repulsionForceY+=_*g}else this.uniformLeafNodeSizes&&e.getChild()==null&&t.getChild()==null?(u=r.getCenterX()-n.getCenterX(),d=r.getCenterY()-n.getCenterY()):(s.getIntersection(n,r,o),u=o[2]-o[0],d=o[3]-o[1]),Math.abs(u)<a.MIN_REPULSION_DIST&&(u=l.sign(u)*a.MIN_REPULSION_DIST),Math.abs(d)<a.MIN_REPULSION_DIST&&(d=l.sign(d)*a.MIN_REPULSION_DIST),f=u*u+d*d,p=Math.sqrt(f),m=this.repulsionConstant*e.noOfChildren*t.noOfChildren/f,h=m*u/p,g=m*d/p,e.repulsionForceX-=h,e.repulsionForceY-=g,t.repulsionForceX+=h,t.repulsionForceY+=g},u.prototype.calcGravitationalForce=function(e){var t=e.getOwner(),n=(t.getRight()+t.getLeft())/2,r=(t.getTop()+t.getBottom())/2,i=e.getCenterX()-n,a=e.getCenterY()-r,o=Math.abs(i)+e.getWidth()/2,s=Math.abs(a)+e.getHeight()/2,l;e.getOwner()==this.graphManager.getRoot()?(l=t.getEstimatedSize()*this.gravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i,e.gravitationForceY=-this.gravityConstant*a)):(l=t.getEstimatedSize()*this.compoundGravityRangeFactor,(o>l||s>l)&&(e.gravitationForceX=-this.gravityConstant*i*this.compoundGravityConstant,e.gravitationForceY=-this.gravityConstant*a*this.compoundGravityConstant))},u.prototype.isConverged=function(){var e,t=!1;return this.totalIterations>this.maxIterations/3&&(t=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),e=this.totalDisplacement<this.totalDisplacementThreshold,this.oldTotalDisplacement=this.totalDisplacement,e||t},u.prototype.animate=function(){this.animationDuringLayout&&!this.isSubLayout&&(this.notAnimatedIterations==this.animationPeriod?(this.update(),this.notAnimatedIterations=0):this.notAnimatedIterations++)},u.prototype.calcNoOfChildrenForAllNodes=function(){for(var e,t=this.graphManager.getAllNodes(),n=0;n<t.length;n++)e=t[n],e.noOfChildren=e.getNoOfChildren()},u.prototype.calcGrid=function(e){var t=0,n=0;t=parseInt(Math.ceil((e.getRight()-e.getLeft())/this.repulsionRange)),n=parseInt(Math.ceil((e.getBottom()-e.getTop())/this.repulsionRange));for(var r=Array(t),i=0;i<t;i++)r[i]=Array(n);for(var i=0;i<t;i++)for(var a=0;a<n;a++)r[i][a]=[];return r},u.prototype.addNodeToGrid=function(e,t,n){var r=0,i=0,a=0,o=0;r=parseInt(Math.floor((e.getRect().x-t)/this.repulsionRange)),i=parseInt(Math.floor((e.getRect().width+e.getRect().x-t)/this.repulsionRange)),a=parseInt(Math.floor((e.getRect().y-n)/this.repulsionRange)),o=parseInt(Math.floor((e.getRect().height+e.getRect().y-n)/this.repulsionRange));for(var s=r;s<=i;s++)for(var l=a;l<=o;l++)this.grid[s][l].push(e),e.setGridCoordinates(r,i,a,o)},u.prototype.updateGrid=function(){var e,t,n=this.getAllNodes();for(this.grid=this.calcGrid(this.graphManager.getRoot()),e=0;e<n.length;e++)t=n[e],this.addNodeToGrid(t,this.graphManager.getRoot().getLeft(),this.graphManager.getRoot().getTop())},u.prototype.calculateRepulsionForceOfANode=function(e,t,n,i){if(this.totalIterations%a.GRID_CALCULATION_CHECK_PERIOD==1&&n||i){var o=new Set;e.surrounding=[];for(var s,l=this.grid,u=e.startX-1;u<e.finishX+2;u++)for(var d=e.startY-1;d<e.finishY+2;d++)if(!(u<0||d<0||u>=l.length||d>=l[0].length)){for(var f=0;f<l[u][d].length;f++)if(s=l[u][d][f],e.getOwner()==s.getOwner()&&e!=s&&!t.has(s)&&!o.has(s)){var p=Math.abs(e.getCenterX()-s.getCenterX())-(e.getWidth()/2+s.getWidth()/2),m=Math.abs(e.getCenterY()-s.getCenterY())-(e.getHeight()/2+s.getHeight()/2);p<=this.repulsionRange&&m<=this.repulsionRange&&o.add(s)}}e.surrounding=[].concat(r(o))}for(u=0;u<e.surrounding.length;u++)this.calcRepulsionForce(e,e.surrounding[u])},u.prototype.calcRepulsionRange=function(){return 0},e.exports=u}),(function(e,t,n){"use strict";var r=n(1),i=n(7);function a(e,t,n){r.call(this,e,t,n),this.idealLength=i.DEFAULT_EDGE_LENGTH}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];e.exports=a}),(function(e,t,n){"use strict";var r=n(3);function i(e,t,n,i){r.call(this,e,t,n,i),this.springForceX=0,this.springForceY=0,this.repulsionForceX=0,this.repulsionForceY=0,this.gravitationForceX=0,this.gravitationForceY=0,this.displacementX=0,this.displacementY=0,this.startX=0,this.finishX=0,this.startY=0,this.finishY=0,this.surrounding=[]}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];i.prototype.setGridCoordinates=function(e,t,n,r){this.startX=e,this.finishX=t,this.startY=n,this.finishY=r},e.exports=i}),(function(e,t,n){"use strict";function r(e,t){this.width=0,this.height=0,e!==null&&t!==null&&(this.height=t,this.width=e)}r.prototype.getWidth=function(){return this.width},r.prototype.setWidth=function(e){this.width=e},r.prototype.getHeight=function(){return this.height},r.prototype.setHeight=function(e){this.height=e},e.exports=r}),(function(e,t,n){"use strict";var r=n(14);function i(){this.map={},this.keys=[]}i.prototype.put=function(e,t){var n=r.createID(e);this.contains(n)||(this.map[n]=t,this.keys.push(e))},i.prototype.contains=function(e){return r.createID(e),this.map[e]!=null},i.prototype.get=function(e){var t=r.createID(e);return this.map[t]},i.prototype.keySet=function(){return this.keys},e.exports=i}),(function(e,t,n){"use strict";var r=n(14);function i(){this.set={}}i.prototype.add=function(e){var t=r.createID(e);this.contains(t)||(this.set[t]=e)},i.prototype.remove=function(e){delete this.set[r.createID(e)]},i.prototype.clear=function(){this.set={}},i.prototype.contains=function(e){return this.set[r.createID(e)]==e},i.prototype.isEmpty=function(){return this.size()===0},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAllTo=function(e){for(var t=Object.keys(this.set),n=t.length,r=0;r<n;r++)e.push(this.set[t[r]])},i.prototype.size=function(){return Object.keys(this.set).length},i.prototype.addAll=function(e){for(var t=e.length,n=0;n<t;n++){var r=e[n];this.add(r)}},e.exports=i}),(function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}var a=n(11);e.exports=function(){function e(t,n){i(this,e),(n!==null||n!==void 0)&&(this.compareFunction=this._defaultCompareFunction);var r=void 0;r=t instanceof a?t.size():t.length,this._quicksort(t,0,r-1)}return r(e,[{key:`_quicksort`,value:function(e,t,n){if(t<n){var r=this._partition(e,t,n);this._quicksort(e,t,r),this._quicksort(e,r+1,n)}}},{key:`_partition`,value:function(e,t,n){for(var r=this._get(e,t),i=t,a=n;;){for(;this.compareFunction(r,this._get(e,a));)a--;for(;this.compareFunction(this._get(e,i),r);)i++;if(i<a)this._swap(e,i,a),i++,a--;else return a}}},{key:`_get`,value:function(e,t){return e instanceof a?e.get_object_at(t):e[t]}},{key:`_set`,value:function(e,t,n){e instanceof a?e.set_object_at(t,n):e[t]=n}},{key:`_swap`,value:function(e,t,n){var r=this._get(e,t);this._set(e,t,this._get(e,n)),this._set(e,n,r)}},{key:`_defaultCompareFunction`,value:function(e,t){return t>e}}]),e}()}),(function(e,t,n){"use strict";var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,`value`in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();function i(e,t){if(!(e instanceof t))throw TypeError(`Cannot call a class as a function`)}e.exports=function(){function e(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:-1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:-1;i(this,e),this.sequence1=t,this.sequence2=n,this.match_score=r,this.mismatch_penalty=a,this.gap_penalty=o,this.iMax=t.length+1,this.jMax=n.length+1,this.grid=Array(this.iMax);for(var s=0;s<this.iMax;s++){this.grid[s]=Array(this.jMax);for(var l=0;l<this.jMax;l++)this.grid[s][l]=0}this.tracebackGrid=Array(this.iMax);for(var u=0;u<this.iMax;u++){this.tracebackGrid[u]=Array(this.jMax);for(var d=0;d<this.jMax;d++)this.tracebackGrid[u][d]=[null,null,null]}this.alignments=[],this.score=-1,this.computeGrids()}return r(e,[{key:`getScore`,value:function(){return this.score}},{key:`getAlignments`,value:function(){return this.alignments}},{key:`computeGrids`,value:function(){for(var e=1;e<this.jMax;e++)this.grid[0][e]=this.grid[0][e-1]+this.gap_penalty,this.tracebackGrid[0][e]=[!1,!1,!0];for(var t=1;t<this.iMax;t++)this.grid[t][0]=this.grid[t-1][0]+this.gap_penalty,this.tracebackGrid[t][0]=[!1,!0,!1];for(var n=1;n<this.iMax;n++)for(var r=1;r<this.jMax;r++){var i=void 0;i=this.sequence1[n-1]===this.sequence2[r-1]?this.grid[n-1][r-1]+this.match_score:this.grid[n-1][r-1]+this.mismatch_penalty;var a=this.grid[n-1][r]+this.gap_penalty,o=this.grid[n][r-1]+this.gap_penalty,s=[i,a,o],l=this.arrayAllMaxIndexes(s);this.grid[n][r]=s[l[0]],this.tracebackGrid[n][r]=[l.includes(0),l.includes(1),l.includes(2)]}this.score=this.grid[this.iMax-1][this.jMax-1]}},{key:`alignmentTraceback`,value:function(){var e=[];for(e.push({pos:[this.sequence1.length,this.sequence2.length],seq1:``,seq2:``});e[0];){var t=e[0],n=this.tracebackGrid[t.pos[0]][t.pos[1]];n[0]&&e.push({pos:[t.pos[0]-1,t.pos[1]-1],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),n[1]&&e.push({pos:[t.pos[0]-1,t.pos[1]],seq1:this.sequence1[t.pos[0]-1]+t.seq1,seq2:`-`+t.seq2}),n[2]&&e.push({pos:[t.pos[0],t.pos[1]-1],seq1:`-`+t.seq1,seq2:this.sequence2[t.pos[1]-1]+t.seq2}),t.pos[0]===0&&t.pos[1]===0&&this.alignments.push({sequence1:t.seq1,sequence2:t.seq2}),e.shift()}return this.alignments}},{key:`getAllIndexes`,value:function(e,t){for(var n=[],r=-1;(r=e.indexOf(t,r+1))!==-1;)n.push(r);return n}},{key:`arrayAllMaxIndexes`,value:function(e){return this.getAllIndexes(e,Math.max.apply(null,e))}}]),e}()}),(function(e,t,n){"use strict";var r=function(){};r.FDLayout=n(18),r.FDLayoutConstants=n(7),r.FDLayoutEdge=n(19),r.FDLayoutNode=n(20),r.DimensionD=n(21),r.HashMap=n(22),r.HashSet=n(23),r.IGeometry=n(8),r.IMath=n(9),r.Integer=n(10),r.Point=n(12),r.PointD=n(4),r.RandomSeed=n(16),r.RectangleD=n(13),r.Transform=n(17),r.UniqueIDGeneretor=n(14),r.Quicksort=n(24),r.LinkedList=n(11),r.LGraphObject=n(2),r.LGraph=n(5),r.LEdge=n(1),r.LGraphManager=n(6),r.LNode=n(3),r.Layout=n(15),r.LayoutConstants=n(0),r.NeedlemanWunsch=n(25),e.exports=r}),(function(e,t,n){"use strict";function r(){this.listeners=[]}var i=r.prototype;i.addListener=function(e,t){this.listeners.push({event:e,callback:t})},i.removeListener=function(e,t){for(var n=this.listeners.length;n>=0;n--){var r=this.listeners[n];r.event===e&&r.callback===t&&this.listeners.splice(n,1)}},i.emit=function(e,t){for(var n=0;n<this.listeners.length;n++){var r=this.listeners[n];e===r.event&&r.callback(t)}},e.exports=r})])})})),fWe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(dWe()):typeof define==`function`&&define.amd?define([`layout-base`],r):typeof e==`object`?e.coseBase=r(dWe()):n.coseBase=r(n.layoutBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=7)})([(function(t,n){t.exports=e}),(function(e,t,n){"use strict";var r=n(0).FDLayoutConstants;function i(){}for(var a in r)i[a]=r[a];i.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,i.DEFAULT_RADIAL_SEPARATION=r.DEFAULT_EDGE_LENGTH,i.DEFAULT_COMPONENT_SEPERATION=60,i.TILE=!0,i.TILING_PADDING_VERTICAL=10,i.TILING_PADDING_HORIZONTAL=10,i.TREE_REDUCTION_ON_INCREMENTAL=!1,e.exports=i}),(function(e,t,n){"use strict";var r=n(0).FDLayoutEdge;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){"use strict";var r=n(0).LGraph;function i(e,t,n){r.call(this,e,t,n)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){"use strict";var r=n(0).LGraphManager;function i(e){r.call(this,e)}for(var a in i.prototype=Object.create(r.prototype),r)i[a]=r[a];e.exports=i}),(function(e,t,n){"use strict";var r=n(0).FDLayoutNode,i=n(0).IMath;function a(e,t,n,i){r.call(this,e,t,n,i)}for(var o in a.prototype=Object.create(r.prototype),r)a[o]=r[o];a.prototype.move=function(){var e=this.graphManager.getLayout();this.displacementX=e.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=e.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementX=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementX)),Math.abs(this.displacementY)>e.coolingFactor*e.maxNodeDisplacement&&(this.displacementY=e.coolingFactor*e.maxNodeDisplacement*i.sign(this.displacementY)),this.child==null||this.child.getNodes().length==0?this.moveBy(this.displacementX,this.displacementY):this.propogateDisplacementToChildren(this.displacementX,this.displacementY),e.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},a.prototype.propogateDisplacementToChildren=function(e,t){for(var n=this.getChild().getNodes(),r,i=0;i<n.length;i++)r=n[i],r.getChild()==null?(r.moveBy(e,t),r.displacementX+=e,r.displacementY+=t):r.propogateDisplacementToChildren(e,t)},a.prototype.setPred1=function(e){this.pred1=e},a.prototype.getPred1=function(){return pred1},a.prototype.getPred2=function(){return pred2},a.prototype.setNext=function(e){this.next=e},a.prototype.getNext=function(){return next},a.prototype.setProcessed=function(e){this.processed=e},a.prototype.isProcessed=function(){return processed},e.exports=a}),(function(e,t,n){"use strict";var r=n(0).FDLayout,i=n(4),a=n(3),o=n(5),s=n(2),l=n(1),u=n(0).FDLayoutConstants,d=n(0).LayoutConstants,f=n(0).Point,p=n(0).PointD,m=n(0).Layout,h=n(0).Integer,g=n(0).IGeometry,_=n(0).LGraph,v=n(0).Transform;function y(){r.call(this),this.toBeTiled={}}for(var b in y.prototype=Object.create(r.prototype),r)y[b]=r[b];y.prototype.newGraphManager=function(){var e=new i(this);return this.graphManager=e,e},y.prototype.newGraph=function(e){return new a(null,this.graphManager,e)},y.prototype.newNode=function(e){return new o(this.graphManager,e)},y.prototype.newEdge=function(e){return new s(null,null,e)},y.prototype.initParameters=function(){r.prototype.initParameters.call(this,arguments),this.isSubLayout||(this.idealEdgeLength=l.DEFAULT_EDGE_LENGTH<10?10:l.DEFAULT_EDGE_LENGTH,this.useSmartIdealEdgeLengthCalculation=l.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION,this.springConstant=u.DEFAULT_SPRING_STRENGTH,this.repulsionConstant=u.DEFAULT_REPULSION_STRENGTH,this.gravityConstant=u.DEFAULT_GRAVITY_STRENGTH,this.compoundGravityConstant=u.DEFAULT_COMPOUND_GRAVITY_STRENGTH,this.gravityRangeFactor=u.DEFAULT_GRAVITY_RANGE_FACTOR,this.compoundGravityRangeFactor=u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR,this.prunedNodesAll=[],this.growTreeIterations=0,this.afterGrowthIterations=0,this.isTreeGrowing=!1,this.isGrowthFinished=!1,this.coolingCycle=0,this.maxCoolingCycle=this.maxIterations/u.CONVERGENCE_CHECK_PERIOD,this.finalTemperature=u.CONVERGENCE_CHECK_PERIOD/this.maxIterations,this.coolingAdjuster=1)},y.prototype.layout=function(){return d.DEFAULT_CREATE_BENDS_AS_NEEDED&&(this.createBendpoints(),this.graphManager.resetAllEdges()),this.level=0,this.classicLayout()},y.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){var e=this.getFlatForest();if(e.length>0)this.positionNodesRadially(e);else{this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n),this.positionNodesRandomly()}}else if(l.TREE_REDUCTION_ON_INCREMENTAL){this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation();var t=new Set(this.getAllNodes()),n=this.nodesWithGravity.filter(function(e){return t.has(e)});this.graphManager.setAllNodesToApplyGravitation(n)}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%u.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-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 e=new Set(this.getAllNodes()),t=this.nodesWithGravity.filter(function(t){return e.has(t)});this.graphManager.setAllNodesToApplyGravitation(t),this.graphManager.updateBounds(),this.updateGrid(),this.coolingFactor=u.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=u.DEFAULT_COOLING_FACTOR_INCREMENTAL*((100-this.afterGrowthIterations)/100),this.afterGrowthIterations++}var n=!this.isTreeGrowing&&!this.isGrowthFinished,r=this.growTreeIterations%10==1&&this.isTreeGrowing||this.afterGrowthIterations%10==1&&this.isGrowthFinished;return this.totalDisplacement=0,this.graphManager.updateBounds(),this.calcSpringForces(),this.calcRepulsionForces(n,r),this.calcGravitationalForces(),this.moveNodes(),this.animate(),!1},y.prototype.getPositionsData=function(){for(var e=this.graphManager.getAllNodes(),t={},n=0;n<e.length;n++){var r=e[n].rect,i=e[n].id;t[i]={id:i,x:r.getCenterX(),y:r.getCenterY(),w:r.width,h:r.height}}return t},y.prototype.runSpringEmbedder=function(){this.initialAnimationPeriod=25,this.animationPeriod=this.initialAnimationPeriod;var e=!1;if(u.ANIMATE===`during`)this.emit(`layoutstarted`);else{for(;!e;)e=this.tick();this.graphManager.updateBounds()}},y.prototype.calculateNodesToApplyGravitationTo=function(){var e=[],t,n=this.graphManager.getGraphs(),r=n.length,i;for(i=0;i<r;i++)t=n[i],t.updateConnected(),t.isConnected||(e=e.concat(t.getNodes()));return e},y.prototype.createBendpoints=function(){var e=[];e=e.concat(this.graphManager.getAllEdges());var t=new Set,n;for(n=0;n<e.length;n++){var r=e[n];if(!t.has(r)){var i=r.getSource(),a=r.getTarget();if(i==a)r.getBendpoints().push(new p),r.getBendpoints().push(new p),this.createDummyNodesForBendpoints(r),t.add(r);else{var o=[];if(o=o.concat(i.getEdgeListToNode(a)),o=o.concat(a.getEdgeListToNode(i)),!t.has(o[0])){if(o.length>1){var s;for(s=0;s<o.length;s++){var l=o[s];l.getBendpoints().push(new p),this.createDummyNodesForBendpoints(l)}}o.forEach(function(e){t.add(e)})}}}if(t.size==e.length)break}},y.prototype.positionNodesRadially=function(e){for(var t=new f(0,0),n=Math.ceil(Math.sqrt(e.length)),r=0,i=0,a=0,o=new p(0,0),s=0;s<e.length;s++){s%n==0&&(a=0,i=r,s!=0&&(i+=l.DEFAULT_COMPONENT_SEPERATION),r=0);var u=e[s],h=m.findCenterOfTree(u);t.x=a,t.y=i,o=y.radialLayout(u,h,t),o.y>r&&(r=Math.floor(o.y)),a=Math.floor(o.x+l.DEFAULT_COMPONENT_SEPERATION)}this.transform(new p(d.WORLD_CENTER_X-o.x/2,d.WORLD_CENTER_Y-o.y/2))},y.radialLayout=function(e,t,n){var r=Math.max(this.maxDiagonalInTree(e),l.DEFAULT_RADIAL_SEPARATION);y.branchRadialLayout(t,null,0,359,0,r);var i=_.calculateBounds(e),a=new v;a.setDeviceOrgX(i.getMinX()),a.setDeviceOrgY(i.getMinY()),a.setWorldOrgX(n.x),a.setWorldOrgY(n.y);for(var o=0;o<e.length;o++)e[o].transform(a);var s=new p(i.getMaxX(),i.getMaxY());return a.inverseTransformPoint(s)},y.branchRadialLayout=function(e,t,n,r,i,a){var o=(r-n+1)/2;o<0&&(o+=180);var s=(o+n)%360*g.TWO_PI/360,l=i*Math.cos(s),u=i*Math.sin(s);e.setCenter(l,u);var d=[];d=d.concat(e.getEdges());var f=d.length;t!=null&&f--;for(var p=0,m=d.length,h,_=e.getEdgesBetween(t);_.length>1;){var v=_[0];_.splice(0,1);var b=d.indexOf(v);b>=0&&d.splice(b,1),m--,f--}h=t==null?0:(d.indexOf(_[0])+1)%m;for(var x=Math.abs(r-n)/f,S=h;p!=f;S=++S%m){var C=d[S].getOtherEnd(e);if(C!=t){var w=(n+p*x)%360,T=(w+x)%360;y.branchRadialLayout(C,e,w,T,i+a,a),p++}}},y.maxDiagonalInTree=function(e){for(var t=h.MIN_VALUE,n=0;n<e.length;n++){var r=e[n].getDiagonal();r>t&&(t=r)}return t},y.prototype.calcRepulsionRange=function(){return 2*(this.level+1)*this.idealEdgeLength},y.prototype.groupZeroDegreeMembers=function(){var e=this,t={};this.memberGroups={},this.idToDummyNode={};for(var n=[],r=this.graphManager.getAllNodes(),i=0;i<r.length;i++){var a=r[i],s=a.getParent();this.getNodeDegreeWithChildren(a)===0&&(s.id==null||!this.getToBeTiled(s))&&n.push(a)}for(var i=0;i<n.length;i++){var a=n[i],l=a.getParent().id;t[l]===void 0&&(t[l]=[]),t[l]=t[l].concat(a)}Object.keys(t).forEach(function(n){if(t[n].length>1){var r=`DummyCompound_`+n;e.memberGroups[r]=t[n];var i=t[n][0].getParent(),a=new o(e.graphManager);a.id=r,a.paddingLeft=i.paddingLeft||0,a.paddingRight=i.paddingRight||0,a.paddingBottom=i.paddingBottom||0,a.paddingTop=i.paddingTop||0,e.idToDummyNode[r]=a;var s=e.getGraphManager().add(e.newGraph(),a),l=i.getChild();l.add(a);for(var u=0;u<t[n].length;u++){var d=t[n][u];l.remove(d),s.add(d)}}})},y.prototype.clearCompounds=function(){var e={},t={};this.performDFSOnCompounds();for(var n=0;n<this.compoundOrder.length;n++)t[this.compoundOrder[n].id]=this.compoundOrder[n],e[this.compoundOrder[n].id]=[].concat(this.compoundOrder[n].getChild().getNodes()),this.graphManager.remove(this.compoundOrder[n].getChild()),this.compoundOrder[n].child=null;this.graphManager.resetAllNodes(),this.tileCompoundMembers(e,t)},y.prototype.clearZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack=[];Object.keys(this.memberGroups).forEach(function(n){var r=e.idToDummyNode[n];t[n]=e.tileNodes(e.memberGroups[n],r.paddingLeft+r.paddingRight),r.rect.width=t[n].width,r.rect.height=t[n].height})},y.prototype.repopulateCompounds=function(){for(var e=this.compoundOrder.length-1;e>=0;e--){var t=this.compoundOrder[e],n=t.id,r=t.paddingLeft,i=t.paddingTop;this.adjustLocations(this.tiledMemberPack[n],t.rect.x,t.rect.y,r,i)}},y.prototype.repopulateZeroDegreeMembers=function(){var e=this,t=this.tiledZeroDegreePack;Object.keys(t).forEach(function(n){var r=e.idToDummyNode[n],i=r.paddingLeft,a=r.paddingTop;e.adjustLocations(t[n],r.rect.x,r.rect.y,i,a)})},y.prototype.getToBeTiled=function(e){var t=e.id;if(this.toBeTiled[t]!=null)return this.toBeTiled[t];var n=e.getChild();if(n==null)return this.toBeTiled[t]=!1,!1;for(var r=n.getNodes(),i=0;i<r.length;i++){var a=r[i];if(this.getNodeDegree(a)>0)return this.toBeTiled[t]=!1,!1;if(a.getChild()==null){this.toBeTiled[a.id]=!1;continue}if(!this.getToBeTiled(a))return this.toBeTiled[t]=!1,!1}return this.toBeTiled[t]=!0,!0},y.prototype.getNodeDegree=function(e){e.id;for(var t=e.getEdges(),n=0,r=0;r<t.length;r++){var i=t[r];i.getSource().id!==i.getTarget().id&&(n+=1)}return n},y.prototype.getNodeDegreeWithChildren=function(e){var t=this.getNodeDegree(e);if(e.getChild()==null)return t;for(var n=e.getChild().getNodes(),r=0;r<n.length;r++){var i=n[r];t+=this.getNodeDegreeWithChildren(i)}return t},y.prototype.performDFSOnCompounds=function(){this.compoundOrder=[],this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes())},y.prototype.fillCompexOrderByDFS=function(e){for(var t=0;t<e.length;t++){var n=e[t];n.getChild()!=null&&this.fillCompexOrderByDFS(n.getChild().getNodes()),this.getToBeTiled(n)&&this.compoundOrder.push(n)}},y.prototype.adjustLocations=function(e,t,n,r,i){t+=r,n+=i;for(var a=t,o=0;o<e.rows.length;o++){var s=e.rows[o];t=a;for(var l=0,u=0;u<s.length;u++){var d=s[u];d.rect.x=t,d.rect.y=n,t+=d.rect.width+e.horizontalPadding,d.rect.height>l&&(l=d.rect.height)}n+=l+e.verticalPadding}},y.prototype.tileCompoundMembers=function(e,t){var n=this;this.tiledMemberPack=[],Object.keys(e).forEach(function(r){var i=t[r];n.tiledMemberPack[r]=n.tileNodes(e[r],i.paddingLeft+i.paddingRight),i.rect.width=n.tiledMemberPack[r].width,i.rect.height=n.tiledMemberPack[r].height})},y.prototype.tileNodes=function(e,t){var n={rows:[],rowWidth:[],rowHeight:[],width:0,height:t,verticalPadding:l.TILING_PADDING_VERTICAL,horizontalPadding:l.TILING_PADDING_HORIZONTAL};e.sort(function(e,t){return e.rect.width*e.rect.height>t.rect.width*t.rect.height?-1:+(e.rect.width*e.rect.height<t.rect.width*t.rect.height)});for(var r=0;r<e.length;r++){var i=e[r];n.rows.length==0?this.insertNodeToRow(n,i,0,t):this.canAddHorizontal(n,i.rect.width,i.rect.height)?this.insertNodeToRow(n,i,this.getShortestRowIndex(n),t):this.insertNodeToRow(n,i,n.rows.length,t),this.shiftToLastRow(n)}return n},y.prototype.insertNodeToRow=function(e,t,n,r){var i=r;n==e.rows.length&&(e.rows.push([]),e.rowWidth.push(i),e.rowHeight.push(0));var a=e.rowWidth[n]+t.rect.width;e.rows[n].length>0&&(a+=e.horizontalPadding),e.rowWidth[n]=a,e.width<a&&(e.width=a);var o=t.rect.height;n>0&&(o+=e.verticalPadding);var s=0;o>e.rowHeight[n]&&(s=e.rowHeight[n],e.rowHeight[n]=o,s=e.rowHeight[n]-s),e.height+=s,e.rows[n].push(t)},y.prototype.getShortestRowIndex=function(e){for(var t=-1,n=Number.MAX_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]<n&&(t=r,n=e.rowWidth[r]);return t},y.prototype.getLongestRowIndex=function(e){for(var t=-1,n=Number.MIN_VALUE,r=0;r<e.rows.length;r++)e.rowWidth[r]>n&&(t=r,n=e.rowWidth[r]);return t},y.prototype.canAddHorizontal=function(e,t,n){var r=this.getShortestRowIndex(e);if(r<0)return!0;var i=e.rowWidth[r];if(i+e.horizontalPadding+t<=e.width)return!0;var a=0;e.rowHeight[r]<n&&r>0&&(a=n+e.verticalPadding-e.rowHeight[r]);var o=e.width-i>=t+e.horizontalPadding?(e.height+a)/(i+t+e.horizontalPadding):(e.height+a)/e.width;a=n+e.verticalPadding;var s=e.width<t?(e.height+a)/t:(e.height+a)/e.width;return s<1&&(s=1/s),o<1&&(o=1/o),o<s},y.prototype.shiftToLastRow=function(e){var t=this.getLongestRowIndex(e),n=e.rowWidth.length-1,r=e.rows[t],i=r[r.length-1],a=i.width+e.horizontalPadding;if(e.width-e.rowWidth[n]>a&&t!=n){r.splice(-1,1),e.rows[n].push(i),e.rowWidth[t]=e.rowWidth[t]-a,e.rowWidth[n]=e.rowWidth[n]+a,e.width=e.rowWidth[instance.getLongestRowIndex(e)];for(var o=Number.MIN_VALUE,s=0;s<r.length;s++)r[s].height>o&&(o=r[s].height);t>0&&(o+=e.verticalPadding);var l=e.rowHeight[t]+e.rowHeight[n];e.rowHeight[t]=o,e.rowHeight[n]<i.height+e.verticalPadding&&(e.rowHeight[n]=i.height+e.verticalPadding);var u=e.rowHeight[t]+e.rowHeight[n];e.height+=u-l,this.shiftToLastRow(e)}},y.prototype.tilingPreLayout=function(){l.TILE&&(this.groupZeroDegreeMembers(),this.clearCompounds(),this.clearZeroDegreeMembers())},y.prototype.tilingPostLayout=function(){l.TILE&&(this.repopulateZeroDegreeMembers(),this.repopulateCompounds())},y.prototype.reduceTrees=function(){for(var e=[],t=!0,n;t;){var r=this.graphManager.getAllNodes(),i=[];t=!1;for(var a=0;a<r.length;a++)n=r[a],n.getEdges().length==1&&!n.getEdges()[0].isInterGraph&&n.getChild()==null&&(i.push([n,n.getEdges()[0],n.getOwner()]),t=!0);if(t==1){for(var o=[],s=0;s<i.length;s++)i[s][0].getEdges().length==1&&(o.push(i[s]),i[s][0].getOwner().remove(i[s][0]));e.push(o),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()}}this.prunedNodesAll=e},y.prototype.growTree=function(e){for(var t=e[e.length-1],n,r=0;r<t.length;r++)n=t[r],this.findPlaceforPrunedNode(n),n[2].add(n[0]),n[2].add(n[1],n[1].source,n[1].target);e.splice(e.length-1,1),this.graphManager.resetAllNodes(),this.graphManager.resetAllEdges()},y.prototype.findPlaceforPrunedNode=function(e){var t,n,r=e[0];n=r==e[1].source?e[1].target:e[1].source;var i=n.startX,a=n.finishX,o=n.startY,s=n.finishY,l=[0,0,0,0];if(o>0)for(var d=i;d<=a;d++)l[0]+=this.grid[d][o-1].length+this.grid[d][o].length-1;if(a<this.grid.length-1)for(var d=o;d<=s;d++)l[1]+=this.grid[a+1][d].length+this.grid[a][d].length-1;if(s<this.grid[0].length-1)for(var d=i;d<=a;d++)l[2]+=this.grid[d][s+1].length+this.grid[d][s].length-1;if(i>0)for(var d=o;d<=s;d++)l[3]+=this.grid[i-1][d].length+this.grid[i][d].length-1;for(var f=h.MAX_VALUE,p,m,g=0;g<l.length;g++)l[g]<f?(f=l[g],p=1,m=g):l[g]==f&&p++;if(p==3&&f==0)l[0]==0&&l[1]==0&&l[2]==0?t=1:l[0]==0&&l[1]==0&&l[3]==0?t=0:l[0]==0&&l[2]==0&&l[3]==0?t=3:l[1]==0&&l[2]==0&&l[3]==0&&(t=2);else if(p==2&&f==0){var _=Math.floor(Math.random()*2);t=l[0]==0&&l[1]==0?_==0?0:1:l[0]==0&&l[2]==0?_==0?0:2:l[0]==0&&l[3]==0?_==0?0:3:l[1]==0&&l[2]==0?_==0?1:2:l[1]==0&&l[3]==0?_==0?1:3:_==0?2:3}else if(p==4&&f==0){var _=Math.floor(Math.random()*4);t=_}else t=m;t==0?r.setCenter(n.getCenterX(),n.getCenterY()-n.getHeight()/2-u.DEFAULT_EDGE_LENGTH-r.getHeight()/2):t==1?r.setCenter(n.getCenterX()+n.getWidth()/2+u.DEFAULT_EDGE_LENGTH+r.getWidth()/2,n.getCenterY()):t==2?r.setCenter(n.getCenterX(),n.getCenterY()+n.getHeight()/2+u.DEFAULT_EDGE_LENGTH+r.getHeight()/2):r.setCenter(n.getCenterX()-n.getWidth()/2-u.DEFAULT_EDGE_LENGTH-r.getWidth()/2,n.getCenterY())},e.exports=y}),(function(e,t,n){"use strict";var r={};r.layoutBase=n(0),r.CoSEConstants=n(1),r.CoSEEdge=n(2),r.CoSEGraph=n(3),r.CoSEGraphManager=n(4),r.CoSELayout=n(6),r.CoSENode=n(5),e.exports=r})])})})),pWe=s(((e,t)=>{(function(n,r){typeof e==`object`&&typeof t==`object`?t.exports=r(fWe()):typeof define==`function`&&define.amd?define([`cose-base`],r):typeof e==`object`?e.cytoscapeCoseBilkent=r(fWe()):n.cytoscapeCoseBilkent=r(n.coseBase)})(e,function(e){return(function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,`a`,t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p=``,n(n.s=1)})([(function(t,n){t.exports=e}),(function(e,t,n){"use strict";var r=n(0).layoutBase.LayoutConstants,i=n(0).layoutBase.FDLayoutConstants,a=n(0).CoSEConstants,o=n(0).CoSELayout,s=n(0).CoSENode,l=n(0).layoutBase.PointD,u=n(0).layoutBase.DimensionD,d={ready:function(){},stop:function(){},quality:`default`,nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.25,numIter:2500,tile:!0,animate:`end`,animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:.5};function f(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function p(e){this.options=f(d,e),m(this.options)}var m=function(e){e.nodeRepulsion!=null&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),e.idealEdgeLength!=null&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),e.edgeElasticity!=null&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),e.nestingFactor!=null&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),e.gravity!=null&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),e.numIter!=null&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),e.gravityRange!=null&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),e.gravityCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),e.gravityRangeCompound!=null&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),e.initialEnergyOnIncremental!=null&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),r.QUALITY=e.quality==`draft`?0:e.quality==`proof`?2:1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=r.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=r.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=r.ANIMATE=e.animate,a.TILE=e.tile,a.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==`function`?e.tilingPaddingVertical.call():e.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==`function`?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};p.prototype.run=function(){var e,t,n=this.options;this.idToLNode={};var r=this.layout=new o,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:`layoutstart`,layout:this});var a=r.newGraphManager();this.gm=a;var s=this.options.eles.nodes(),l=this.options.eles.edges();this.root=a.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(s),r);for(var u=0;u<l.length;u++){var d=l[u],f=this.idToLNode[d.data(`source`)],p=this.idToLNode[d.data(`target`)];if(f!==p&&f.getEdgesBetween(p).length==0){var m=a.add(r.newEdge(),f,p);m.id=d.id()}}var h=function(e,t){typeof e==`number`&&(e=t);var n=e.data(`id`),r=i.idToLNode[n];return{x:r.getRect().getCenterX(),y:r.getRect().getCenterY()}},g=function a(){for(var o=function(){n.fit&&n.cy.fit(n.eles,n.padding),e||(e=!0,i.cy.one(`layoutready`,n.ready),i.cy.trigger({type:`layoutready`,layout:i}))},s=i.options.refresh,l,u=0;u<s&&!l;u++)l=i.stopped||i.layout.tick();if(l){r.checkLayoutSuccess()&&!r.isSubLayout&&r.doPostLayout(),r.tilingPostLayout&&r.tilingPostLayout(),r.isLayoutFinished=!0,i.options.eles.nodes().positions(h),o(),i.cy.one(`layoutstop`,i.options.stop),i.cy.trigger({type:`layoutstop`,layout:i}),t&&cancelAnimationFrame(t),e=!1;return}var d=i.layout.getPositionsData();n.eles.nodes().positions(function(e,t){if(typeof e==`number`&&(e=t),!e.isParent()){for(var n=e.id(),r=d[n],i=e;r==null&&(r=d[i.data(`parent`)]||d[`DummyCompound_`+i.data(`parent`)],d[n]=r,i=i.parent()[0],i!=null););return r==null?{x:e.position(`x`),y:e.position(`y`)}:{x:r.x,y:r.y}}}),o(),t=requestAnimationFrame(a)};return r.addListener(`layoutstarted`,function(){i.options.animate===`during`&&(t=requestAnimationFrame(g))}),r.runLayout(),this.options.animate!==`during`&&(i.options.eles.nodes().not(`:parent`).layoutPositions(i,i.options,h),e=!1),this},p.prototype.getTopMostNodes=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].id()]=!0;return e.filter(function(e,n){typeof e==`number`&&(e=n);for(var r=e.parent()[0];r!=null;){if(t[r.id()])return!1;r=r.parent()[0]}return!0})},p.prototype.processChildrenList=function(e,t,n){for(var r=t.length,i=0;i<r;i++){var a=t[i],o=a.children(),d,f=a.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(d=a.outerWidth()!=null&&a.outerHeight()!=null?e.add(new s(n.graphManager,new l(a.position(`x`)-f.w/2,a.position(`y`)-f.h/2),new u(parseFloat(f.w),parseFloat(f.h)))):e.add(new s(this.graphManager)),d.id=a.data(`id`),d.paddingLeft=parseInt(a.css(`padding`)),d.paddingTop=parseInt(a.css(`padding`)),d.paddingRight=parseInt(a.css(`padding`)),d.paddingBottom=parseInt(a.css(`padding`)),this.options.nodeDimensionsIncludeLabels&&a.isParent()){var p=a.boundingBox({includeLabels:!0,includeNodes:!1}).w,m=a.boundingBox({includeLabels:!0,includeNodes:!1}).h,h=a.css(`text-halign`);d.labelWidth=p,d.labelHeight=m,d.labelPos=h}if(this.idToLNode[a.data(`id`)]=d,isNaN(d.rect.x)&&(d.rect.x=0),isNaN(d.rect.y)&&(d.rect.y=0),o!=null&&o.length>0){var g=n.getGraphManager().add(n.newGraph(),d);this.processChildrenList(g,o,n)}}},p.prototype.stop=function(){return this.stopped=!0,this};var h=function(e){e(`layout`,`cose-bilkent`,p)};typeof cytoscape<`u`&&h(cytoscape),e.exports=h})])})})),mWe=l({render:()=>CWe});function hWe(e,t){e.forEach(e=>{let n={id:e.id,labelText:e.label,height:e.height,width:e.width,padding:e.padding??0};Object.keys(e).forEach(t=>{[`id`,`label`,`height`,`width`,`padding`,`x`,`y`].includes(t)||(n[t]=e[t])}),t.add({group:`nodes`,data:n,position:{x:e.x??0,y:e.y??0}})})}function gWe(e,t){e.forEach(e=>{let n={id:e.id,source:e.start,target:e.end};Object.keys(e).forEach(t=>{[`id`,`start`,`end`].includes(t)||(n[t]=e[t])}),t.add({group:`edges`,data:n})})}function _We(e){return new Promise(t=>{let n=Ac(`body`).append(`div`).attr(`id`,`cy`).attr(`style`,`display:none`),r=RN({container:document.getElementById(`cy`),style:[{selector:`edge`,style:{"curve-style":`bezier`}}]});n.remove(),hWe(e.nodes,r),gWe(e.edges,r),r.nodes().forEach(function(e){e.layoutDimensions=()=>{let t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:`cose-bilkent`,quality:`proof`,styleEnabled:!1,animate:!1}).run(),r.ready(e=>{y.info(`Cytoscape ready`,e),t(r)})})}function vWe(e){return e.nodes().map(e=>{let t=e.data(),n=e.position(),r={id:t.id,x:n.x,y:n.y};return Object.keys(t).forEach(e=>{e!==`id`&&(r[e]=t[e])}),r})}function yWe(e){return e.edges().map(e=>{let t=e.data(),n=e._private.rscratch,r={id:t.id,source:t.source,target:t.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(t).forEach(e=>{[`id`,`source`,`target`].includes(e)||(r[e]=t[e])}),r})}async function bWe(e,t){y.debug(`Starting cose-bilkent layout algorithm`);try{xWe(e);let t=await _We(e),n=vWe(t),r=yWe(t);return y.debug(`Layout completed: ${n.length} nodes, ${r.length} edges`),{nodes:n,edges:r}}catch(e){throw y.error(`Error in cose-bilkent layout algorithm:`,e),e}}function xWe(e){if(!e)throw Error(`Layout data is required`);if(!e.config)throw Error(`Configuration is required in layout data`);if(!e.rootNode)throw Error(`Root node is required`);if(!e.nodes||!Array.isArray(e.nodes))throw Error(`No nodes found in layout data`);if(!Array.isArray(e.edges))throw Error(`Edges array is required in layout data`);return!0}var SWe,CWe,wWe=o((()=>{S(),h(),uWe(),SWe=d(pWe(),1),hf(),RN.use(SWe.default),p(hWe,`addNodes`),p(gWe,`addEdges`),p(_We,`createCytoscapeInstance`),p(vWe,`extractPositionedNodes`),p(yWe,`extractPositionedEdges`),p(bWe,`executeCoseBilkentLayout`),p(xWe,`validateLayoutData`),CWe=p(async(e,t,{insertCluster:n,insertEdge:r,insertEdgeLabel:i,insertMarkers:a,insertNode:o,log:s,positionEdgeLabel:l},{algorithm:u})=>{let d={},f={},p=t.select(`g`);a(p,e.markers,e.type,e.diagramId);let m=p.insert(`g`).attr(`class`,`subgraphs`),h=p.insert(`g`).attr(`class`,`edgePaths`),g=p.insert(`g`).attr(`class`,`edgeLabels`),_=p.insert(`g`).attr(`class`,`nodes`);s.debug(`Inserting nodes into DOM for dimension calculation`),await Promise.all(e.nodes.map(async t=>{if(t.isGroup){let e={...t};f[t.id]=e,d[t.id]=e,await n(m,t)}else{let n={...t};d[t.id]=n;let r=await o(_,t,{config:e.config,dir:e.direction||`TB`}),i=r.node().getBBox();n.width=i.width,n.height=i.height,n.domId=r,s.debug(`Node ${t.id} dimensions: ${i.width}x${i.height}`)}})),s.debug(`Running cose-bilkent layout algorithm`);let v=await bWe({...e,nodes:e.nodes.map(e=>{let t=d[e.id];return{...e,width:t.width,height:t.height}})},e.config);s.debug(`Positioning nodes based on layout results`),v.nodes.forEach(e=>{let t=d[e.id];t?.domId&&(t.domId.attr(`transform`,`translate(${e.x}, ${e.y})`),t.x=e.x,t.y=e.y,s.debug(`Positioned node ${t.id} at center (${e.x}, ${e.y})`))}),v.edges.forEach(t=>{let n=e.edges.find(e=>e.id===t.id);n&&(n.points=[{x:t.startX,y:t.startY},{x:t.midX,y:t.midY},{x:t.endX,y:t.endY}])}),s.debug(`Inserting and positioning edges`),await Promise.all(e.edges.map(async t=>{await i(g,t);let n=d[t.start??``],a=d[t.end??``];if(n&&a){let i=v.edges.find(e=>e.id===t.id);if(i){s.debug(`APA01 positionedEdge`,i);let o={...t};l(o,r(h,o,f,e.type,n,a,e.diagramId))}else{let i={...t,points:[{x:n.x||0,y:n.y||0},{x:a.x||0,y:a.y||0}]};l(i,r(h,i,f,e.type,n,a,e.diagramId))}}})),s.debug(`Cose-bilkent rendering completed`)},`render`)})),TWe,zN,BN,VN,HN,UN=o((()=>{Mg(),Zg(),Og(),Cg(),Kp(),Zs(),S(),h(),TWe={common:Ds,getConfig:es,insertCluster:jg,insertEdge:Yg,insertEdgeLabel:Gg,insertMarkers:Xg,insertNode:wg,interpolateToCurve:Tp,labelHelper:Kh,log:y,positionEdgeLabel:Kg},zN={},BN=p(e=>{for(let t of e)zN[t.name]=t},`registerLayoutLoaders`),p(()=>{BN([{name:`dagre`,loader:p(async()=>await Promise.resolve().then(()=>(aPe(),JNe)),`loader`)},{name:`swimlane`,loader:p(async()=>await Promise.resolve().then(()=>(YFe(),oPe)),`loader`)},{name:`cose-bilkent`,loader:p(async()=>await Promise.resolve().then(()=>(wWe(),mWe)),`loader`)}])},`registerDefaultLayoutLoaders`)(),VN=p(async(e,t)=>{if(!(e.layoutAlgorithm in zN))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=zN[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:l}=a,u=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${u}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,l).attr(`stop-opacity`,1)}return r.render(e,t,TWe,{algorithm:n.algorithm})},`render`),HN=p((e=``,{fallback:t=`dagre`}={})=>{if(e in zN)return e;if(t in zN)return y.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`)})),WN=`comm`,EWe=`rule`,DWe=`decl`,OWe=`@import`,kWe=`@namespace`,AWe=`@keyframes`,jWe=`@layer`,MWe=Math.abs,GN=String.fromCharCode;function NWe(e){return e.trim()}function KN(e,t,n){return e.replace(t,n)}function qN(e,t){return e.charCodeAt(t)|0}function JN(e,t,n){return e.slice(t,n)}function YN(e){return e.length}function PWe(e){return e.length}function XN(e,t){return t.push(e),e}var ZN=1,QN=1,FWe=0,$N=0,eP=0,tP=``;function nP(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:ZN,column:QN,length:o,return:``,siblings:s}}function IWe(){return eP}function LWe(){return eP=$N>0?qN(tP,--$N):0,QN--,eP===10&&(QN=1,ZN--),eP}function rP(){return eP=$N<FWe?qN(tP,$N++):0,QN++,eP===10&&(QN=1,ZN++),eP}function iP(){return qN(tP,$N)}function aP(){return $N}function oP(e,t){return JN(tP,e,t)}function sP(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function RWe(e){return ZN=QN=1,FWe=YN(tP=e),$N=0,[]}function zWe(e){return tP=``,e}function cP(e){return NWe(oP($N-1,lP(e===91?e+2:e===40?e+1:e)))}function BWe(e){for(;(eP=iP())&&eP<33;)rP();return sP(e)>2||sP(eP)>3?``:` `}function VWe(e,t){for(;--t&&rP()&&!(eP<48||eP>102||eP>57&&eP<65||eP>70&&eP<97););return oP(e,aP()+(t<6&&iP()==32&&rP()==32))}function lP(e){for(;rP();)switch(eP){case e:return $N;case 34:case 39:e!==34&&e!==39&&lP(eP);break;case 40:e===41&&lP(e);break;case 92:rP();break}return $N}function HWe(e,t){for(;rP()&&e+eP!==57&&(e+eP!==84||iP()!==47););return`/*`+oP(t,$N-1)+`*`+GN(e===47?e:rP())}function UWe(e){for(;!sP(iP());)rP();return oP(e,$N)}function WWe(e){return zWe(uP(``,null,null,null,[``],e=RWe(e),0,[0],e))}function uP(e,t,n,r,i,a,o,s,l){for(var u=0,d=0,f=o,p=0,m=0,h=0,g=1,_=1,v=1,y=0,b=0,x=``,S=i,C=a,w=r,T=x;_;)switch(h=b,b=rP()){case 40:h!=108&&qN(T,f-1)==58?(y++,T+=`(`):T+=cP(b);break;case 41:y--,T+=`)`;break;case 34:case 39:case 91:T+=cP(b);break;case 9:case 10:case 13:case 32:if(y>0){T+=GN(b);break}T+=BWe(h);break;case 92:T+=VWe(aP()-1,7);continue;case 47:switch(iP()){case 42:case 47:XN(KWe(HWe(rP(),aP()),t,n,l),l),(sP(h||1)==5||sP(iP()||1)==5)&&YN(T)&&JN(T,-1,void 0)!==` `&&(T+=` `);break;default:T+=`/`}break;case 123*g:s[u++]=YN(T)*v;case 125*g:case 59:case 0:if(y>0&&b){T+=GN(b);break}switch(b){case 0:case 125:_=0;case 59+d:v==-1&&(T=KN(T,/\f/g,``)),m>0&&(YN(T)-f||g===0)&&XN(m>32?qWe(T+`;`,r,n,f-1,l):qWe(KN(T,` `,``)+`;`,r,n,f-2,l),l);break;case 59:T+=`;`;default:if(XN(w=GWe(T,t,n,u,d,i,s,x,S=[],C=[],f,a),a),b===123){if(d===0)uP(T,t,w,w,S,a,f,s,C);else{switch(p){case 99:if(qN(T,3)===110)break;case 108:if(qN(T,2)===97)break;default:d=0;case 100:case 109:case 115:}d?uP(e,w,w,r&&XN(GWe(e,w,w,0,0,i,s,x,i,S=[],f,C),C),i,C,f,s,r?S:C):uP(T,w,w,w,[``],C,0,s,C)}}}u=d=m=0,g=v=1,x=T=``,f=o;break;case 58:f=1+YN(T),m=h;default:if(g<1){if(b==123)--g;else if(b==125&&g++==0&&LWe()==125)continue}switch(T+=GN(b),b*g){case 38:v=d>0?1:(T+=`\f`,-1);break;case 44:if(y>0)break;s[u++]=(YN(T)-1)*v,v=1;break;case 64:iP()===45&&(T+=cP(rP())),p=iP(),d=f=YN(x=T+=UWe(aP())),b++;break;case 45:h===45&&YN(T)==2&&(g=0)}}return a}function GWe(e,t,n,r,i,a,o,s,l,u,d,f){for(var p=i-1,m=i===0?a:[``],h=PWe(m),g=0,_=0,v=0;g<r;++g)for(var y=0,b=JN(e,p+1,p=MWe(_=o[g])),x=e;y<h;++y)(x=NWe(_>0?m[y]+` `+b:KN(b,/&\f/g,m[y])))&&(l[v++]=x);return nP(e,t,n,i===0?EWe:s,l,u,d,f)}function KWe(e,t,n,r){return nP(e,t,n,WN,GN(IWe()),JN(e,2,-2),0,r)}function qWe(e,t,n,r,i){return nP(e,t,n,DWe,JN(e,0,r),JN(e,r+1,-1),r,i)}function dP(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function JWe(e,t,n,r){switch(e.type){case jWe:if(e.children.length)break;case OWe:case kWe:case DWe:return e.return=e.return||e.value;case WN:return``;case AWe:return e.return=e.value+`{`+dP(e.children,r)+`}`;case EWe:if(!YN(e.value=e.props.join(`,`)))return``}return YN(n=dP(e.children,r))?e.return=e.value+`{`+n+`}`:``}function YWe(e){var t=PWe(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var fP,pP,mP,XWe,hP,gP,_P,vP,yP,bP=o((()=>{Zs(),h(),fP=Ff(),hf(),pP=p((e,t)=>{let n=e.append(`rect`);if(n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),t.name&&n.attr(`name`,t.name),t.rx&&n.attr(`rx`,t.rx),t.ry&&n.attr(`ry`,t.ry),t.attrs!==void 0)for(let e in t.attrs)n.attr(e,t.attrs[e]);return t.class&&n.attr(`class`,t.class),n},`drawRect`),mP=p((e,t)=>{pP(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`}).lower()},`drawBackgroundRect`),XWe=p((e,t)=>{let n=t.text.replace(ms,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),hP=p((e,t,n,r)=>{let i=e.append(`image`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,fP.sanitizeUrl)(r);i.attr(`xlink:href`,a)},`drawImage`),gP=p((e,t,n,r)=>{let i=e.append(`use`);i.attr(`x`,t),i.attr(`y`,n);let a=(0,fP.sanitizeUrl)(r);i.attr(`xlink:href`,`#${a}`)},`drawEmbeddedImage`),_P=p(()=>({x:0,y:0,width:100,height:100,fill:`#EDF2AE`,stroke:`#666`,anchor:`start`,rx:0,ry:0}),`getNoteRect`),vP=p(()=>({x:0,y:0,width:100,height:100,"text-anchor":`start`,style:`#666`,textMargin:0,rx:0,ry:0,tspan:!0}),`getTextObj`),yP=p(()=>{let e=Ac(`.mermaidTooltip`);return e.empty()&&(e=Ac(`body`).append(`div`).attr(`class`,`mermaidTooltip`).style(`opacity`,0).style(`position`,`absolute`).style(`text-align`,`center`).style(`max-width`,`200px`).style(`padding`,`2px`).style(`font-size`,`12px`).style(`background`,`#ffffde`).style(`border`,`1px solid #333`).style(`border-radius`,`2px`).style(`pointer-events`,`none`).style(`z-index`,`100`)),e},`createTooltip`)})),ZWe=l({diagram:()=>JGe});function xP(e,t,n,r,i){let a=t[e];if(!a.width){if(n)a.text=zp(a.text,i,r),a.textLines=a.text.split(Ds.lineBreakRegex).length,a.width=i,a.height=Op(a.text,r);else{let e=a.text.split(Ds.lineBreakRegex);a.textLines=e.length;let t=0;a.height=0,a.width=0;for(let n of e)a.width=Math.max(kp(n,r),a.width),t=Op(n,r),a.height+=t}}return a}async function SP(e,t,n,r,i){let a=i.db,o=new $P(i);o.data.widthLimit=n.data.widthLimit/Math.min(ZP,r.length);for(let[s,l]of r.entries()){let r=0;l.image={width:0,height:0,Y:0},l.sprite&&(l.image.width=48,l.image.height=48,l.image.Y=r,r=l.image.Y+l.image.height);let u=l.wrap&&QP.wrap,d=tF(QP);d.fontSize+=2,d.fontWeight=`bold`;let f=xP(`label`,l,u,d,o.data.widthLimit);if(f.Y=r+8,r=f.Y+f.height,l.type&&l.type.text!==``){l.type.text=`[`+l.type.text+`]`;let e=xP(`type`,l,u,tF(QP),o.data.widthLimit);e.Y=r+5,r=e.Y+e.height}if(l.descr&&l.descr.text!==``){let e=tF(QP);e.fontSize-=2;let t=xP(`descr`,l,u,e,o.data.widthLimit);t.Y=r+20,r=t.Y+t.height}if(s==0||s%ZP===0){let e=n.data.startx+QP.diagramMarginX,t=n.data.stopy+QP.diagramMarginY+r;o.setData(e,e,t,t)}else{let e=o.data.stopx===o.data.startx?o.data.startx:o.data.stopx+QP.diagramMarginX,t=o.data.starty;o.setData(e,e,t,t)}o.name=l.alias;let p=a.getC4ShapeArray(l.alias),m=a.getC4ShapeKeys(l.alias);m.length>0&&await rF(o,e,p,m),t=l.alias;let h=a.getBoundaries(t);h.length>0&&await SP(e,t,o,h,i),l.alias!==`global`&&nF(e,l,o),n.data.stopy=Math.max(o.data.stopy+QP.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+QP.c4ShapeMargin,n.data.stopx),JP=Math.max(JP,n.data.stopx),YP=Math.max(YP,n.data.stopy)}}var CP,QWe,wP,TP,EP,DP,OP,kP,AP,jP,MP,NP,PP,FP,IP,$We,eGe,tGe,nGe,rGe,iGe,aGe,oGe,sGe,cGe,lGe,uGe,dGe,fGe,pGe,mGe,hGe,gGe,LP,_Ge,vGe,RP,yGe,bGe,xGe,SGe,zP,BP,VP,CGe,wGe,TGe,EGe,DGe,OGe,kGe,AGe,jGe,HP,UP,MGe,NGe,PGe,FGe,WP,IGe,LGe,RGe,zGe,BGe,GP,VGe,KP,HGe,qP,JP,YP,XP,ZP,QP,$P,eF,tF,UGe,nF,rF,WGe,iF,GGe,KGe,aF,qGe,JGe,YGe=o((()=>{bP(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),hf(),CP=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,24],n=[1,25],r=[1,26],i=[1,27],a=[1,28],o=[1,63],s=[1,64],l=[1,65],u=[1,66],d=[1,67],f=[1,68],m=[1,69],h=[1,29],g=[1,30],_=[1,31],v=[1,32],y=[1,33],b=[1,34],x=[1,35],S=[1,36],C=[1,37],w=[1,38],T=[1,39],E=[1,40],D=[1,41],O=[1,42],k=[1,43],A=[1,44],j=[1,45],M=[1,46],N=[1,47],P=[1,48],F=[1,50],I=[1,51],L=[1,52],R=[1,53],ee=[1,54],z=[1,55],B=[1,56],te=[1,57],ne=[1,58],re=[1,59],ie=[1,60],ae=[14,42],oe=[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],se=[12,14,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],ce=[1,82],le=[1,83],ue=[1,84],de=[1,85],fe=[12,14,42],pe=[12,14,33,42],me=[12,14,33,42,76,77,79,80],he=[12,33],ge=[34,36,37,38,39,40,41,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74],_e={trace:p(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:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:r.setDirection(`TB`);break;case 4:r.setDirection(`BT`);break;case 5:r.setDirection(`RL`);break;case 6:r.setDirection(`LR`);break;case 8:case 9:case 10:case 11:case 12:r.setC4Type(a[s-3]);break;case 19:r.setTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 20:r.setAccDescription(a[s].substring(15)),this.$=a[s].substring(15);break;case 21:this.$=a[s].trim(),r.setTitle(this.$);break;case 22:case 23:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 28:a[s].splice(2,0,`ENTERPRISE`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 29:a[s].splice(2,0,`SYSTEM`),r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 30:r.addPersonOrSystemBoundary(...a[s]),this.$=a[s];break;case 31:a[s].splice(2,0,`CONTAINER`),r.addContainerBoundary(...a[s]),this.$=a[s];break;case 32:r.addDeploymentNode(`node`,...a[s]),this.$=a[s];break;case 33:r.addDeploymentNode(`nodeL`,...a[s]),this.$=a[s];break;case 34:r.addDeploymentNode(`nodeR`,...a[s]),this.$=a[s];break;case 35:r.popBoundaryParseStack();break;case 39:r.addPersonOrSystem(`person`,...a[s]),this.$=a[s];break;case 40:r.addPersonOrSystem(`external_person`,...a[s]),this.$=a[s];break;case 41:r.addPersonOrSystem(`system`,...a[s]),this.$=a[s];break;case 42:r.addPersonOrSystem(`system_db`,...a[s]),this.$=a[s];break;case 43:r.addPersonOrSystem(`system_queue`,...a[s]),this.$=a[s];break;case 44:r.addPersonOrSystem(`external_system`,...a[s]),this.$=a[s];break;case 45:r.addPersonOrSystem(`external_system_db`,...a[s]),this.$=a[s];break;case 46:r.addPersonOrSystem(`external_system_queue`,...a[s]),this.$=a[s];break;case 47:r.addContainer(`container`,...a[s]),this.$=a[s];break;case 48:r.addContainer(`container_db`,...a[s]),this.$=a[s];break;case 49:r.addContainer(`container_queue`,...a[s]),this.$=a[s];break;case 50:r.addContainer(`external_container`,...a[s]),this.$=a[s];break;case 51:r.addContainer(`external_container_db`,...a[s]),this.$=a[s];break;case 52:r.addContainer(`external_container_queue`,...a[s]),this.$=a[s];break;case 53:r.addComponent(`component`,...a[s]),this.$=a[s];break;case 54:r.addComponent(`component_db`,...a[s]),this.$=a[s];break;case 55:r.addComponent(`component_queue`,...a[s]),this.$=a[s];break;case 56:r.addComponent(`external_component`,...a[s]),this.$=a[s];break;case 57:r.addComponent(`external_component_db`,...a[s]),this.$=a[s];break;case 58:r.addComponent(`external_component_queue`,...a[s]),this.$=a[s];break;case 60:r.addRel(`rel`,...a[s]),this.$=a[s];break;case 61:r.addRel(`birel`,...a[s]),this.$=a[s];break;case 62:r.addRel(`rel_u`,...a[s]),this.$=a[s];break;case 63:r.addRel(`rel_d`,...a[s]),this.$=a[s];break;case 64:r.addRel(`rel_l`,...a[s]),this.$=a[s];break;case 65:r.addRel(`rel_r`,...a[s]),this.$=a[s];break;case 66:r.addRel(`rel_b`,...a[s]),this.$=a[s];break;case 67:a[s].splice(0,1),r.addRel(`rel`,...a[s]),this.$=a[s];break;case 68:r.updateElStyle(`update_el_style`,...a[s]),this.$=a[s];break;case 69:r.updateRelStyle(`update_rel_style`,...a[s]),this.$=a[s];break;case 70:r.updateLayoutConfig(`update_layout_config`,...a[s]),this.$=a[s];break;case 71:this.$=[a[s]];break;case 72:a[s].unshift(a[s-1]),this.$=a[s];break;case 73:case 75:this.$=a[s].trim();break;case 74:let e={};e[a[s-1].trim()]=a[s].trim(),this.$=e;break;case 76:this.$=``}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],7:[1,6],8:[1,7],9:[1,8],10:4,11:[1,9],15:[1,10],16:[1,11],17:[1,12],18:[1,13]},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,7]},{1:[2,3]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{12:[1,14]},{12:[1,15]},{12:[1,16]},{12:[1,17]},{12:[1,18]},{13:19,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie},{13:70,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie},{13:71,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie},{13:72,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie},{13:73,19:20,20:21,21:22,22:t,23:n,24:r,26:i,28:a,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie},{14:[1,74]},e(ae,[2,13],{43:23,29:49,30:61,32:62,20:75,34:o,36:s,37:l,38:u,39:d,40:f,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie}),e(ae,[2,14]),e(oe,[2,16],{12:[1,76]}),e(ae,[2,36],{12:[1,77]}),e(se,[2,19]),e(se,[2,20]),{25:[1,78]},{27:[1,79]},e(se,[2,23]),{35:80,75:81,76:ce,77:le,79:ue,80:de},{35:86,75:81,76:ce,77:le,79:ue,80:de},{35:87,75:81,76:ce,77:le,79:ue,80:de},{35:88,75:81,76:ce,77:le,79:ue,80:de},{35:89,75:81,76:ce,77:le,79:ue,80:de},{35:90,75:81,76:ce,77:le,79:ue,80:de},{35:91,75:81,76:ce,77:le,79:ue,80:de},{35:92,75:81,76:ce,77:le,79:ue,80:de},{35:93,75:81,76:ce,77:le,79:ue,80:de},{35:94,75:81,76:ce,77:le,79:ue,80:de},{35:95,75:81,76:ce,77:le,79:ue,80:de},{35:96,75:81,76:ce,77:le,79:ue,80:de},{35:97,75:81,76:ce,77:le,79:ue,80:de},{35:98,75:81,76:ce,77:le,79:ue,80:de},{35:99,75:81,76:ce,77:le,79:ue,80:de},{35:100,75:81,76:ce,77:le,79:ue,80:de},{35:101,75:81,76:ce,77:le,79:ue,80:de},{35:102,75:81,76:ce,77:le,79:ue,80:de},{35:103,75:81,76:ce,77:le,79:ue,80:de},{35:104,75:81,76:ce,77:le,79:ue,80:de},e(fe,[2,59]),{35:105,75:81,76:ce,77:le,79:ue,80:de},{35:106,75:81,76:ce,77:le,79:ue,80:de},{35:107,75:81,76:ce,77:le,79:ue,80:de},{35:108,75:81,76:ce,77:le,79:ue,80:de},{35:109,75:81,76:ce,77:le,79:ue,80:de},{35:110,75:81,76:ce,77:le,79:ue,80:de},{35:111,75:81,76:ce,77:le,79:ue,80:de},{35:112,75:81,76:ce,77:le,79:ue,80:de},{35:113,75:81,76:ce,77:le,79:ue,80:de},{35:114,75:81,76:ce,77:le,79:ue,80:de},{35:115,75:81,76:ce,77:le,79:ue,80:de},{20:116,29:49,30:61,32:62,34:o,36:s,37:l,38:u,39:d,40:f,41:m,43:23,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie},{12:[1,118],33:[1,117]},{35:119,75:81,76:ce,77:le,79:ue,80:de},{35:120,75:81,76:ce,77:le,79:ue,80:de},{35:121,75:81,76:ce,77:le,79:ue,80:de},{35:122,75:81,76:ce,77:le,79:ue,80:de},{35:123,75:81,76:ce,77:le,79:ue,80:de},{35:124,75:81,76:ce,77:le,79:ue,80:de},{35:125,75:81,76:ce,77:le,79:ue,80:de},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},e(ae,[2,15]),e(oe,[2,17],{21:22,19:130,22:t,23:n,24:r,26:i,28:a}),e(ae,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:t,23:n,24:r,26:i,28:a,34:o,36:s,37:l,38:u,39:d,40:f,41:m,44:h,45:g,46:_,47:v,48:y,49:b,50:x,51:S,52:C,53:w,54:T,55:E,56:D,57:O,58:k,59:A,60:j,61:M,62:N,63:P,64:F,65:I,66:L,67:R,68:ee,69:z,70:B,71:te,72:ne,73:re,74:ie}),e(se,[2,21]),e(se,[2,22]),e(fe,[2,39]),e(pe,[2,71],{75:81,35:132,76:ce,77:le,79:ue,80:de}),e(me,[2,73]),{78:[1,133]},e(me,[2,75]),e(me,[2,76]),e(fe,[2,40]),e(fe,[2,41]),e(fe,[2,42]),e(fe,[2,43]),e(fe,[2,44]),e(fe,[2,45]),e(fe,[2,46]),e(fe,[2,47]),e(fe,[2,48]),e(fe,[2,49]),e(fe,[2,50]),e(fe,[2,51]),e(fe,[2,52]),e(fe,[2,53]),e(fe,[2,54]),e(fe,[2,55]),e(fe,[2,56]),e(fe,[2,57]),e(fe,[2,58]),e(fe,[2,60]),e(fe,[2,61]),e(fe,[2,62]),e(fe,[2,63]),e(fe,[2,64]),e(fe,[2,65]),e(fe,[2,66]),e(fe,[2,67]),e(fe,[2,68]),e(fe,[2,69]),e(fe,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},e(he,[2,28]),e(he,[2,29]),e(he,[2,30]),e(he,[2,31]),e(he,[2,32]),e(he,[2,33]),e(he,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},e(oe,[2,18]),e(ae,[2,38]),e(pe,[2,72]),e(me,[2,74]),e(fe,[2,24]),e(fe,[2,35]),e(ge,[2,25]),e(ge,[2,26],{12:[1,138]}),e(ge,[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:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:882-`+g.showPosition()+`883-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};_e.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).884-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`885-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.886-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:p(function(e,t,n,r){switch(n){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}}}})();function ve(){this.yy={}}return p(ve,`Parser`),ve.prototype=_e,_e.Parser=ve,new ve})(),CP.parser=CP,QWe=CP,wP=p(e=>Z()[e],`getRequiredConfig`),TP=p((e,t)=>{for(let[n,r]of Object.entries(t))if(r!==void 0){if(typeof r==`object`){let[t,n]=Object.entries(r)[0];e[t]=n}else e[n]=r}},`assignAttributes`),EP=p(()=>({alias:`global`,label:{text:`global`},type:{text:`global`},tags:null,link:null,parentBoundary:``}),`createGlobalBoundary`),DP=[],OP=[``],kP=`global`,AP=``,jP=[EP()],MP=[],NP=``,PP=!1,FP=4,IP=2,eGe=p(function(){return $We},`getC4Type`),tGe=p(function(e){$We=_s(e,Z())},`setC4Type`),nGe=p(function(e,t,n,r,i,a,o,s,l){if(e==null||t==null||n==null||r==null)return;let u={},d=MP.find(e=>e.from===t&&e.to===n);if(d?u=d:MP.push(u),u.type=e,u.from=t,u.to=n,u.label={text:r},i==null)u.techn={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];u[e]={text:t}}else u.techn={text:i};if(a==null)u.descr={text:``};else if(typeof a==`object`){let[e,t]=Object.entries(a)[0];u[e]={text:t}}else u.descr={text:a};TP(u,{sprite:o,tags:s,link:l}),u.wrap=zP()},`addRel`),rGe=p(function(e,t,n,r,i,a,o){if(t===null||n===null)return;let s={},l=DP.find(e=>e.alias===t);if(l&&t===l.alias?s=l:(s.alias=t,DP.push(s)),n==null?s.label={text:``}:s.label={text:n},r==null)s.descr={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]={text:t}}else s.descr={text:r};TP(s,{sprite:i,tags:a,link:o}),s.typeC4Shape={text:e},s.parentBoundary=kP,s.wrap=zP()},`addPersonOrSystem`),iGe=p(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=DP.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,DP.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};TP(l,{sprite:a,tags:o,link:s}),l.wrap=zP(),l.typeC4Shape={text:e},l.parentBoundary=kP},`addContainer`),aGe=p(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=DP.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,DP.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.techn={text:``};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.techn={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};TP(l,{sprite:a,tags:o,link:s}),l.wrap=zP(),l.typeC4Shape={text:e},l.parentBoundary=kP},`addComponent`),oGe=p(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=jP.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,jP.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`system`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};TP(a,{tags:r,link:i}),a.parentBoundary=kP,a.wrap=zP(),AP=kP,kP=e,OP.push(AP)},`addPersonOrSystemBoundary`),sGe=p(function(e,t,n,r,i){if(e===null||t===null)return;let a={},o=jP.find(t=>t.alias===e);if(o&&e===o.alias?a=o:(a.alias=e,jP.push(a)),t==null?a.label={text:``}:a.label={text:t},n==null)a.type={text:`container`};else if(typeof n==`object`){let[e,t]=Object.entries(n)[0];a[e]={text:t}}else a.type={text:n};TP(a,{tags:r,link:i}),a.parentBoundary=kP,a.wrap=zP(),AP=kP,kP=e,OP.push(AP)},`addContainerBoundary`),cGe=p(function(e,t,n,r,i,a,o,s){if(t===null||n===null)return;let l={},u=jP.find(e=>e.alias===t);if(u&&t===u.alias?l=u:(l.alias=t,jP.push(l)),n==null?l.label={text:``}:l.label={text:n},r==null)l.type={text:`node`};else if(typeof r==`object`){let[e,t]=Object.entries(r)[0];l[e]={text:t}}else l.type={text:r};if(i==null)l.descr={text:``};else if(typeof i==`object`){let[e,t]=Object.entries(i)[0];l[e]={text:t}}else l.descr={text:i};TP(l,{tags:o,link:s}),l.nodeType=e,l.parentBoundary=kP,l.wrap=zP(),AP=kP,kP=t,OP.push(AP)},`addDeploymentNode`),lGe=p(function(){kP=AP,OP.pop(),AP=OP.pop(),OP.push(AP)},`popBoundaryParseStack`),uGe=p(function(e,t,n,r,i,a,o,s,l,u,d){let f=DP.find(e=>e.alias===t);if(!(f===void 0&&(f=jP.find(e=>e.alias===t),f===void 0))){if(n!=null){if(typeof n==`object`){let[e,t]=Object.entries(n)[0];f[e]=t}else f.bgColor=n}if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];f[e]=t}else f.fontColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];f[e]=t}else f.borderColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];f[e]=t}else f.shadowing=a}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];f[e]=t}else f.shape=o}if(s!=null){if(typeof s==`object`){let[e,t]=Object.entries(s)[0];f[e]=t}else f.sprite=s}if(l!=null){if(typeof l==`object`){let[e,t]=Object.entries(l)[0];f[e]=t}else f.techn=l}if(u!=null){if(typeof u==`object`){let[e,t]=Object.entries(u)[0];f[e]=t}else f.legendText=u}if(d!=null){if(typeof d==`object`){let[e,t]=Object.entries(d)[0];f[e]=t}else f.legendSprite=d}}},`updateElStyle`),dGe=p(function(e,t,n,r,i,a,o){let s=MP.find(e=>e.from===t&&e.to===n);if(s!==void 0){if(r!=null){if(typeof r==`object`){let[e,t]=Object.entries(r)[0];s[e]=t}else s.textColor=r}if(i!=null){if(typeof i==`object`){let[e,t]=Object.entries(i)[0];s[e]=t}else s.lineColor=i}if(a!=null){if(typeof a==`object`){let[e,t]=Object.entries(a)[0];s[e]=parseInt(t)}else s.offsetX=parseInt(a)}if(o!=null){if(typeof o==`object`){let[e,t]=Object.entries(o)[0];s[e]=parseInt(t)}else s.offsetY=parseInt(o)}}},`updateRelStyle`),fGe=p(function(e,t,n){let r=FP,i=IP;if(typeof t==`object`){let e=Object.values(t)[0];r=parseInt(e)}else r=parseInt(t);if(typeof n==`object`){let e=Object.values(n)[0];i=parseInt(e)}else i=parseInt(n);r>=1&&(FP=r),i>=1&&(IP=i)},`updateLayoutConfig`),pGe=p(function(){return FP},`getC4ShapeInRow`),mGe=p(function(){return IP},`getC4BoundaryInRow`),hGe=p(function(){return kP},`getCurrentBoundaryParse`),gGe=p(function(){return AP},`getParentBoundaryParse`),LP=p(function(e){return e==null?DP:DP.filter(t=>t.parentBoundary===e)},`getC4ShapeArray`),_Ge=p(function(e){return DP.find(t=>t.alias===e)},`getC4Shape`),vGe=p(function(e){return Object.keys(LP(e))},`getC4ShapeKeys`),RP=p(function(e){return e==null?jP:jP.filter(t=>t.parentBoundary===e)},`getBoundaries`),yGe=RP,bGe=p(function(){return MP},`getRels`),xGe=p(function(){return NP},`getTitle`),SGe=p(function(e){PP=e},`setWrap`),zP=p(function(){return PP},`autoWrap`),BP={addPersonOrSystem:rGe,addPersonOrSystemBoundary:oGe,addContainer:iGe,addContainerBoundary:sGe,addComponent:aGe,addDeploymentNode:cGe,popBoundaryParseStack:lGe,addRel:nGe,updateElStyle:uGe,updateRelStyle:dGe,updateLayoutConfig:fGe,autoWrap:zP,setWrap:SGe,getC4ShapeArray:LP,getC4Shape:_Ge,getC4ShapeKeys:vGe,getBoundaries:RP,getBoundarys:yGe,getCurrentBoundaryParse:hGe,getParentBoundaryParse:gGe,getRels:bGe,getTitle:xGe,getC4Type:eGe,getC4ShapeInRow:pGe,getC4BoundaryInRow:mGe,setAccTitle:Ls,getAccTitle:Rs,getAccDescription:Bs,setAccDescription:zs,getConfig:p(()=>wP(`c4`),`getConfig`),clear:p(function(){DP=[],jP=[EP()],AP=``,kP=`global`,OP=[``],MP=[],OP=[``],NP=``,PP=!1,FP=4,IP=2},`clear`),LINETYPE:{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},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:p(function(e){NP=_s(e,Z())},`setTitle`),setC4Type:tGe},VP=p(function(e,t){return pP(e,t)},`drawRect`),CGe=p((e,t,n,r)=>{let i=e.append(`g`),a=0;for(let e of t){let t=e.textColor?e.textColor:`#444444`,o=e.lineColor?e.lineColor:`#444444`,s=e.offsetX?parseInt(String(e.offsetX)):0,l=e.offsetY?parseInt(String(e.offsetY)):0;if(a===0){let t=i.append(`line`);t.attr(`x1`,e.startPoint.x),t.attr(`y1`,e.startPoint.y),t.attr(`x2`,e.endPoint.x),t.attr(`y2`,e.endPoint.y),t.attr(`stroke-width`,`1`),t.attr(`stroke`,o),t.style(`fill`,`none`),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`),a=-1}else{let t=i.append(`path`);t.attr(`fill`,`none`).attr(`stroke-width`,`1`).attr(`stroke`,o).attr(`d`,`Mstartx,starty Qcontrolx,controly stopx,stopy `.replaceAll(`startx`,e.startPoint.x).replaceAll(`starty`,e.startPoint.y).replaceAll(`controlx`,e.startPoint.x+(e.endPoint.x-e.startPoint.x)/2-(e.endPoint.x-e.startPoint.x)/4).replaceAll(`controly`,e.startPoint.y+(e.endPoint.y-e.startPoint.y)/2).replaceAll(`stopx`,e.endPoint.x).replaceAll(`stopy`,e.endPoint.y)),e.type!==`rel_b`&&t.attr(`marker-end`,`url(#`+r+`-arrowhead)`),(e.type===`birel`||e.type===`rel_b`)&&t.attr(`marker-start`,`url(#`+r+`-arrowend)`)}let u=e.label.width,d=n.messageFont();HP(n)(e.label.text,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+l,u,e.label.height,{fill:t},d),e.techn&&e.techn.text!==``&&(d=n.messageFont(),HP(n)(`[`+e.techn.text+`]`,i,Math.min(e.startPoint.x,e.endPoint.x)+Math.abs(e.endPoint.x-e.startPoint.x)/2+s,Math.min(e.startPoint.y,e.endPoint.y)+Math.abs(e.endPoint.y-e.startPoint.y)/2+n.messageFontSize+5+l,Math.max(u,e.techn.width),e.techn.height,{fill:t,"font-style":`italic`},d))}},`drawRels`),wGe=p(function(e,t,n){let r=e.append(`g`),i=t.bgColor?t.bgColor:`none`,a=t.borderColor?t.borderColor:`#444444`,o=t.fontColor?t.fontColor:`black`,s={"stroke-width":1,"stroke-dasharray":`7.0,7.0`};t.nodeType&&(s={"stroke-width":1}),VP(r,{x:t.x,y:t.y,fill:i,stroke:a,width:t.width,height:t.height,rx:2.5,ry:2.5,attrs:s});let l=n.boundaryFont();l.fontWeight=`bold`,l.fontSize+=2,l.fontColor=o,HP(n)(t.label.text,r,t.x,t.y+t.label.Y,t.width,t.height,{fill:`#444444`},l),t.type&&t.type.text!==``&&(l=n.boundaryFont(),l.fontColor=o,HP(n)(t.type.text,r,t.x,t.y+t.type.Y,t.width,t.height,{fill:`#444444`},l)),t.descr&&t.descr.text!==``&&(l=n.boundaryFont(),l.fontSize-=2,l.fontColor=o,HP(n)(t.descr.text,r,t.x,t.y+t.descr.Y,t.width,t.height,{fill:`#444444`},l))},`drawBoundary`),TGe=p(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`),EGe=p(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`),DGe=p(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`),OGe=p(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`),kGe=p(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`),AGe=p(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`),jGe=p(function(e,t){let n=e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,16).attr(`refY`,4);n.append(`path`).attr(`fill`,`black`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 9,2 V 6 L16,4 Z`),n.append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1px`).attr(`d`,`M 0,1 L 6,7 M 6,1 L 0,7`)},`insertArrowCrossHead`),HP=(function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`text-anchor`,`middle`).text(e),s)}p(e,`byText`);function t(e,t,n,i,a,o,s,l){let{fontSize:u,fontFamily:d,fontWeight:f}=l,p=e.split(Ds.lineBreakRegex);for(let e=0;e<p.length;e++){let o=e*u-u*(p.length-1)/2,l=t.append(`text`).attr(`x`,n+a/2).attr(`y`,i).style(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).style(`font-size`,u).style(`font-weight`,f).style(`font-family`,d);l.append(`tspan`).attr(`dy`,o).text(p[e]).attr(`alignment-baseline`,`mathematical`),r(l,s)}}p(t,`byTspan`);function n(e,n,i,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,i,a,o,s,l,u),r(f,l)}p(n,`byFo`);function r(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return p(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),UP={drawRect:VP,drawBoundary:wGe,drawRels:CGe,insertArrowHead:OGe,insertArrowEnd:kGe,insertArrowFilledHead:AGe,insertArrowCrossHead:jGe,insertDatabaseIcon:TGe,insertComputerIcon:EGe,insertClockIcon:DGe},MGe=p((e,t)=>{if(t===`sandbox`){let t=Ac(`#i`+e).node()?.contentDocument;if(!t)throw Error(`Sandbox iframe #i${e} is missing its content document`);return{root:Ac(t.body),doc:t}}return{root:Ac(`body`),doc:document}},`getDiagramRoot`),NGe=new Set([`system_queue`,`external_system_queue`,`container_queue`,`external_container_queue`,`component_queue`,`external_component_queue`]),PGe=new Set([`system_db`,`external_system_db`,`container_db`,`external_container_db`,`component_db`,`external_component_db`]),FGe={person:`person`,box:`rounded`,rounded:`rounded`,cylinder:`cylinder`,database:`cylinder`,db:`cylinder`,queue:`h-cyl`,pipe:`h-cyl`,component:`fr-rect`},WP=p(e=>e?FGe[e.toLowerCase()]:void 0,`keywordShape`),IGe=p(e=>{let t=WP(e.shape)??WP(e.sprite);if(t)return t;if(e.tags)for(let t of e.tags.split(`,`)){let e=WP(t.trim());if(e)return e}let n=e.typeC4Shape.text;return n===`person`||n===`external_person`?`person`:PGe.has(n)?`cylinder`:NGe.has(n)?`h-cyl`:`rounded`},`resolveNodeShape`),LGe={person:`Person`,system:`Software System`,container:`Container`,component:`Component`},RGe=p(e=>{let t=e.replace(/^external_/,``).replace(/_(db|queue)$/,``);return LGe[t]??t.replace(/_/g,` `)},`stereotypeLabel`),zGe=p(e=>e.startsWith(`external_`),`isExternal`),BGe=p(e=>{let t=RGe(e.typeC4Shape.text);return e.techn?.text?`[${t}: ${e.techn.text}]`:`[${t}]`},`stereotypeText`),GP=[`person`,`system`,`system_db`,`system_queue`,`container`,`container_db`,`container_queue`,`component`,`component_db`,`component_queue`].flatMap(e=>[e,`external_${e}`]),VGe=new Set(GP),KP=p(e=>VGe.has(e),`isC4ElementType`),HGe=p((e,t)=>{let n=e.typeC4Shape.text,r=e.bgColor??(KP(n)&&t[`${n}_bg_color`]),i=e.borderColor??(KP(n)&&t[`${n}_border_color`]),a=[];return r&&a.push(`fill:${r}`),i&&a.push(`stroke:${i}`),a.push(`color:${e.fontColor??`#FFFFFF`}`),a},`elementCssStyles`),qP=p((e,t,n,r,i)=>{let a=e.typeC4Shape.text,o=[`c4-shape`,`c4-${a}`];zGe(a)&&o.push(`c4-external`);let s=IGe(e),l=HGe(e,t);return(s===`rounded`||s===`fr-rect`)&&l.push(`rx:12px`,`ry:12px`),{id:e.alias,label:e.label.text,stereotype:BGe(e),description:e.descr?.text?[e.descr.text]:void 0,labelType:`string`,isGroup:!1,shape:s,cssClasses:o.join(` `),cssStyles:l,padding:n,look:r,useHtmlLabels:!1,width:i}},`buildC4Node`),JP=0,YP=0,XP=4,ZP=2,CP.yy=BP,QP={},$P=class{static{p(this,`Bounds`)}constructor(e){this.name=``,this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,eF(e.db.getConfig())}setData(e,t,n,r){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=t,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=r}updateVal(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let t=this.nextData.stopx,n=this.data.widthLimit,r=this.nextData.startx===this.nextData.stopx?t+e.margin:t+e.margin*2,i=r+e.width,a=this.nextData.starty+e.margin*2,o=a+e.height;(r>=n||i>=n||this.nextData.cnt>XP)&&(r=this.nextData.startx+e.margin+QP.nextLinePaddingX,a=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=o=a+e.height,this.nextData.cnt=1),e.x=r,e.y=a,this.updateVal(this.data,`startx`,r,Math.min),this.updateVal(this.data,`starty`,a,Math.min),this.updateVal(this.data,`stopx`,i,Math.max),this.updateVal(this.data,`stopy`,o,Math.max),this.updateVal(this.nextData,`startx`,r,Math.min),this.updateVal(this.nextData,`starty`,a,Math.min),this.updateVal(this.nextData,`stopx`,i,Math.max),this.updateVal(this.nextData,`stopy`,o,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},eF(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},eF=p(function(e){No(QP,e),e?.fontFamily&&(QP.personFontFamily=QP.systemFontFamily=QP.messageFontFamily=e.fontFamily),e?.fontSize&&(QP.personFontSize=QP.systemFontSize=QP.messageFontSize=e.fontSize),e?.fontWeight&&(QP.personFontWeight=QP.systemFontWeight=QP.messageFontWeight=e.fontWeight)},`setConf`),tF=p(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),`boundaryFont`),UGe=p(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),p(xP,`calcC4ShapeTextWH`),nF=p(function(e,t,n){let r=n.data.startx,i=n.data.starty;t.x=r,t.y=i,t.width=n.data.stopx-r,t.height=n.data.stopy-i,t.label.y=QP.c4ShapeMargin-35;let a=t.wrap&&QP.wrap,o=tF(QP);o.fontSize+=2,o.fontWeight=`bold`,xP(`label`,t,a,o,kp(t.label.text,o)),UP.drawBoundary(e,t,QP)},`drawBoundary`),rF=p(async function(e,t,n,r){let i=Z(),a=i.look??`classic`,o={config:i},s=t.attr(`id`)??``,l=r.map(e=>n[Number(e)]),u=p(e=>{let t=e.shape?Sg[e.shape]:void 0;if(!t)throw Error(`C4: no shape handler for "${e.shape}"`);return t},`shapeHandlerFor`);await Promise.all(l.map(async e=>{let n=qP(e,QP,QP.c4ShapePadding,a,QP.width);n.domId=`${s}-${n.id}`;let r=await u(n)(t,n,o);e.width=n.width??QP.width,e.height=n.height??QP.height,e.margin=QP.c4ShapeMargin,r.remove()}));for(let t of l)e.insert(t);await Promise.all(l.map(async e=>{let n=qP(e,QP,QP.c4ShapePadding,a,QP.width);n.domId=`${s}-${n.id}`,n.x=e.x+e.width/2,n.y=e.y+e.height/2;let r=t.append(`g`).attr(`transform`,`translate(${e.x+e.width/2}, ${e.y+e.height/2})`);await u(n)(r,n,o),e.intersect=n.intersect})),e.bumpLastMargin(QP.c4ShapeMargin)},`drawC4ShapeArray`),WGe=class{static{p(this,`Point`)}constructor(e,t){this.x=e,this.y=t}},iF=p(function(e,t){if(!e.intersect)throw Error(`C4 shape "${e.alias}" has no intersect function. Please report this to https://github.com/mermaid-js/mermaid/issues`);let{x:n,y:r}=e.intersect(t);return new WGe(n,r)},`getIntersectPoint`),GGe=p(function(e,t){let n={x:0,y:0};n.x=t.x+t.width/2,n.y=t.y+t.height/2;let r=iF(e,n);return n.x=e.x+e.width/2,n.y=e.y+e.height/2,{startPoint:r,endPoint:iF(t,n)}},`getIntersectPoints`),KGe=p(function(e,t,n,r,i){let a=r.db.getC4Type(),o=0;for(let e of t){o+=1;let t=e.wrap&&QP.wrap,r=UGe(QP);a===`C4Dynamic`&&(e.label.text=o+`: `+e.label.text);let i=kp(e.label.text,r);xP(`label`,e,t,r,i),e.techn&&e.techn.text!==``&&(i=kp(e.techn.text,r),xP(`techn`,e,t,r,i)),e.descr&&e.descr.text!==``&&(i=kp(e.descr.text,r),xP(`descr`,e,t,r,i));let s=n(e.from),l=n(e.to);if(!s||!l)throw Error(`C4 rel "${e.from}" -> "${e.to}" references an unknown shape`);let u=GGe(s,l);if(!u.startPoint||!u.endPoint)throw Error(`Could not calculate intersection points for rel "${e.from}" -> "${e.to}"`);e.startPoint=u.startPoint,e.endPoint=u.endPoint}UP.drawRels(e,t,QP,i)},`drawRels`),p(SP,`drawInsideBoundary`),aF={drawPersonOrSystemArray:rF,drawBoundary:nF,setConf:eF,draw:p(async function(e,t,n,r){QP=wP(`c4`);let i=Z().securityLevel,{root:a}=MGe(t,i),o=r.db;o.setWrap(QP.wrap),XP=o.getC4ShapeInRow(),ZP=o.getC4BoundaryInRow(),y.debug(`C:${JSON.stringify(QP,null,2)}`);let s=a.select(`[id="${t}"]`);UP.insertComputerIcon(s,t),UP.insertDatabaseIcon(s,t),UP.insertClockIcon(s,t);let l=new $P(r);l.setData(QP.diagramMarginX,QP.diagramMarginX,QP.diagramMarginY,QP.diagramMarginY),l.data.widthLimit=screen.availWidth,JP=QP.diagramMarginX,YP=QP.diagramMarginY;let u=o.getTitle();await SP(s,``,l,o.getBoundaries(``),r),UP.insertArrowHead(s,t),UP.insertArrowEnd(s,t),UP.insertArrowCrossHead(s,t),UP.insertArrowFilledHead(s,t),KGe(s,o.getRels(),o.getC4Shape,r,t),l.data.stopx=JP,l.data.stopy=YP;let d=l.data,f=d.startx,p=d.starty,m=YP-p+2*QP.diagramMarginY,h=JP-f,g=h+2*QP.diagramMarginX;u&&s.append(`text`).text(u).attr(`x`,h/2-4*QP.diagramMarginX).attr(`y`,p+QP.diagramMarginY),Os(s,m,g,QP.useMaxWidth);let _=u?60:0;s.attr(`viewBox`,f-QP.diagramMarginX+` -`+(QP.diagramMarginY+_)+` `+g+` `+(m+_)),y.debug(`models:`,d)},`draw`)},qGe=p(()=>{let e=Z().c4??{},t=new CSSStyleSheet;for(let n of GP){let r=t.cssRules[t.insertRule(`.c4-shape.c4-${n} .label {}`,t.cssRules.length)],i=e[`${n}FontFamily`],a=e[`${n}FontSize`],o=e[`${n}FontWeight`];i&&r.style.setProperty(`font-family`,i),a&&r.style.setProperty(`font-size`,typeof a==`number`?`${a}px`:a),o&&r.style.setProperty(`font-weight`,String(o))}return[...t.cssRules].filter(e=>e.style.length>0).map(e=>` ${e.cssText}`).join(`887-`)},`elementFontStyles`),JGe={parser:QWe,db:BP,renderer:aF,styles:p(e=>`.person {888- stroke: ${e.personBorder};889- fill: ${e.personBkg};890- }891-${qGe()}892-893- /* The element font colour is set inline per element (default white); the894- label text takes it via currentColor. */895- .c4-shape .label,896- .c4-shape .label text {897- color: inherit;898- fill: currentColor;899- }900- /* Structurizr typography: bold name, smaller stereotype/type and description lines. */901- .c4-shape .label .c4-name {902- font-weight: bold;903- }904- .c4-shape .label .c4-type {905- font-size: 0.75em;906- }907- .c4-shape .label .c4-descr {908- font-size: 0.82em;909- }910- .c4-shape .basic,911- .c4-shape rect,912- .c4-shape path,913- .c4-shape circle,914- .c4-shape ellipse,915- .c4-shape line {916- stroke-width: 2px;917- }918-`,`getStyles`),init:p(({c4:e,wrap:t})=>{aF.setConf(e),BP.setWrap(t)},`init`)}})),oF,sF=o((()=>{h(),oF=p(()=>`919- /* Font Awesome icon styling - consolidated */920- .label-icon {921- display: inline-block;922- height: 1em;923- overflow: visible;924- vertical-align: -0.125em;925- }926- 927- .node .label-icon path {928- fill: currentColor;929- stroke: revert;930- stroke-width: revert;931- }932-`,`getIconStyles`)})),cF,lF=o((()=>{h(),hf(),cF=p((e,t)=>{let n;return t===`sandbox`&&(n=Ac(`#i`+e)),Ac(t===`sandbox`?n.nodes()[0].contentDocument.body:`body`).select(`[id="${e}"]`)},`getDiagramElement`)})),uF,XGe,ZGe,dF=o((()=>{Zs(),S(),h(),uF=p((e,t,n,r)=>{e.attr(`class`,n);let{width:i,height:a,x:o,y:s}=XGe(e,t);Os(e,a,i,r);let l=ZGe(o,s,i,a,t);e.attr(`viewBox`,l),y.debug(`viewBox configured: ${l} with padding: ${t}`)},`setupViewPortForSVG`),XGe=p((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+t*2,height:n.height+t*2,x:n.x,y:n.y}},`calculateDimensionsWithPadding`),ZGe=p((e,t,n,r,i)=>`${e-i} ${t-i} ${n} ${r}`,`createViewBox`)})),QGe,$Ge,eKe,fF,pF,mF,tKe,nKe,hF,gF,rKe,iKe=o((()=>{sF(),lF(),dF(),vS(),UN(),bP(),Cg(),Kp(),Zs(),S(),h(),hf(),Ut(),Ne(),QGe=`flowchart-`,$Ge=class{constructor(){this.vertexCounter=0,this.config=Z(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Ls,this.setAccDescription=zs,this.setDiagramTitle=Vs,this.getAccTitle=Rs,this.getAccDescription=Bs,this.getDiagramTitle=Hs,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{p(this,`FlowDB`)}sanitizeText(e){return Ds.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(e,t,n,r,i,a,o={},s){if(!e||e.trim().length===0)return;let l;if(s!==void 0){let e;e=s.includes(`933-`)?s+`934-`:`{935-`+s+`936-}`,l=_S(e,{schema:gS})}let u=this.subGraphLookup.get(e);if(u&&l){u.metadata={...u.metadata,...l};return}let d=this.edges.find(t=>t.id===e);if(d){let e=l;e?.animate!==void 0&&(d.animate=e.animate),e?.animation!==void 0&&(d.animation=e.animation),e?.curve!==void 0&&(d.interpolate=e.curve);return}let f,p=this.vertices.get(e);if(p===void 0&&(t===void 0&&n===void 0&&r!=null&&y.warn(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),p={id:e,labelType:`text`,domId:QGe+e+`-`+this.vertexCounter,styles:[],classes:[]},this.vertices.set(e,p)),this.vertexCounter++,t===void 0?p.text===void 0&&(p.text=e):(this.config=Z(),f=this.sanitizeText(t.text.trim()),p.labelType=t.type,f.startsWith(`"`)&&f.endsWith(`"`)&&(f=f.substring(1,f.length-1)),p.text=f),n!==void 0&&(p.type=n),r?.forEach(e=>{p.styles.push(e)}),i?.forEach(e=>{p.classes.push(e)}),a!==void 0&&(p.dir=a),p.props===void 0?p.props=o:o!==void 0&&Object.assign(p.props,o),l!==void 0){if(l.shape){if(l.shape!==l.shape.toLowerCase()||l.shape.includes(`_`))throw Error(`No such shape: ${l.shape}. Shape names should be lowercase.`);if(!Bye(l.shape))throw Error(`No such shape: ${l.shape}.`);p.type=l?.shape}l?.label&&(p.text=l?.label,p.labelType=this.sanitizeNodeLabelType(l?.labelType)),l?.icon&&(p.icon=l?.icon,!l.label?.trim()&&p.text===e&&(p.text=``)),l?.form&&(p.form=l?.form),l?.pos&&(p.pos=l?.pos),l?.img&&(p.img=l?.img,!l.label?.trim()&&p.text===e&&(p.text=``)),l?.constraint&&(p.constraint=l.constraint),l.w&&(p.assetWidth=Number(l.w)),l.h&&(p.assetHeight=Number(l.h))}}addSingleLink(e,t,n,r){let i={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};y.info(`abc78 Got edge...`,i);let a=n.text;if(a!==void 0&&(i.text=this.sanitizeText(a.text.trim()),i.text.startsWith(`"`)&&i.text.endsWith(`"`)&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=this.sanitizeNodeLabelType(a.type)),n!==void 0&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length>10?10:n.length),r&&!this.edges.some(e=>e.id===r))i.id=r,i.isUserDefinedId=!0;else{let e=this.edges.filter(e=>e.start===i.start&&e.end===i.end);i.id=e.length===0?Gp(i.start,i.end,{counter:0,prefix:`L`}):Gp(i.start,i.end,{counter:e.length+1,prefix:`L`})}if(this.edges.length<(this.config.maxEdges??500))y.info(`Pushing edge...`),this.edges.push(i);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.937-938-Initialize mermaid with maxEdges set to a higher number to allow more edges.939-You cannot set this config via configuration inside the diagram as it is a secure config.940-You have to call mermaid.initialize.`)}isLinkData(e){return typeof e==`object`&&!!e&&`id`in e&&typeof e.id==`string`}addLink(e,t,n){let r=this.isLinkData(n)?n.id.replace(`@`,``):void 0;y.info(`addLink`,e,t,r);for(let i of e)for(let a of t){let o=i===e[e.length-1],s=a===t[0];o&&s?this.addSingleLink(i,a,n,r):this.addSingleLink(i,a,n,void 0)}}updateLinkInterpolate(e,t){e.forEach(e=>{e==="default"?this.edges.defaultInterpolate=t:this.edges[e].interpolate=t})}updateLink(e,t){e.forEach(e=>{if(typeof e==`number`&&e>=this.edges.length)throw Error(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);e==="default"?this.edges.defaultStyle=t:(this.edges[e].style=t,(this.edges[e]?.style?.length??0)>0&&!this.edges[e]?.style?.some(e=>e?.startsWith(`fill`))&&this.edges[e]?.style?.push(`fill:none`))})}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);e.split(`,`).forEach(e=>{let t=this.classes.get(e);t===void 0&&(t={id:e,styles:[],textStyles:[]},this.classes.set(e,t)),n?.forEach(e=>{if(/color/.exec(e)){let n=e.replace(`fill`,`bgFill`);t.textStyles.push(n)}t.styles.push(e)})})}setDirection(e){this.direction=e.trim(),/.*</.exec(this.direction)&&(this.direction=`RL`),/.*\^/.exec(this.direction)&&(this.direction=`BT`),/.*>/.exec(this.direction)&&(this.direction=`LR`),/.*v/.exec(this.direction)&&(this.direction=`TB`),this.direction===`TD`&&(this.direction=`TB`)}setClass(e,t){for(let n of e.split(`,`)){let e=this.vertices.get(n);e&&e.classes.push(t);let r=this.edges.find(e=>e.id===n);r&&r.classes.push(t);let i=this.subGraphLookup.get(n);i&&i.classes.push(t)}}setTooltip(e,t){if(t!==void 0){t=this.sanitizeText(t);for(let n of e.split(`,`))this.tooltips.set(this.version===`gen-1`?this.lookUpDomId(n):n,t)}}setClickFun(e,t,n){if(Z().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith(`"`)&&t.endsWith(`"`)&&(t=t.substr(1,t.length-2)),r[e]=t}}r.length===0&&r.push(e);let i=this.vertices.get(e);i&&(i.haveCallback=!0,this.funs.push(()=>{let n=this.lookUpDomId(e),i=document.querySelector(`[id="${n}"]`);i!==null&&i.addEventListener(`click`,()=>{Up.runFunc(t,...r)},!1)}))}setLink(e,t,n){e.split(`,`).forEach(e=>{let r=this.vertices.get(e);r!==void 0&&(r.link=Up.formatUrl(t,this.config),r.linkTarget=n)}),this.setClass(e,`clickable`)}getTooltip(e){return this.tooltips.get(e)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFun(e,t,n)}),this.setClass(e,`clickable`)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(e){let t=yP();Ac(e).select(`svg`).selectAll(`g.node`).on(`mouseover`,e=>{let n=Ac(e.currentTarget),r=n.attr(`title`);if(r===null)return;let i=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.text(n.attr(`title`)).style(`left`,window.scrollX+i.left+(i.right-i.left)/2+`px`).style(`top`,window.scrollY+i.bottom+`px`),t.html(Ht.sanitize(r)),n.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),Ac(e.currentTarget).classed(`hover`,!1)})}clear(e=`gen-2`){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId=``,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=Z(),Is()}setGen(e){this.version=e||`gen-2`}defaultStyle(){return`fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;`}addSubGraph(e,t,n){let r=e.text.trim(),i=n.text;e===n&&/\s/.exec(n.text)&&(r=void 0);let a=p(e=>{let t={boolean:{},number:{},string:{}},n=[],r;return{nodeList:e.filter(function(e){let i=typeof e;return e.stmt&&e.stmt===`dir`?(r=e.value,!1):e.trim()===``?!1:i in t?t[i].hasOwnProperty(e)?!1:t[i][e]=!0:!n.includes(e)&&n.push(e)}),dir:r}},`uniq`)(t.flat()),o=a.nodeList,s=a.dir,l=Z().flowchart??{};if(s??=l.inheritDir?this.getDirection()??Z().direction??void 0:void 0,this.version===`gen-1`)for(let e=0;e<o.length;e++)o[e]=this.lookUpDomId(o[e]);r??=`subGraph`+this.subCount,i||=``,i=this.sanitizeText(i),this.subCount+=1;let u={id:r,nodes:o,title:i.trim(),classes:[],dir:s,labelType:this.sanitizeNodeLabelType(n?.type)};return y.info(`Adding`,u.id,u.nodes,u.dir),u.nodes=this.makeUniq(u,this.subGraphs).nodes,this.subGraphs.push(u),this.subGraphLookup.set(r,u),r}getPosForId(e){for(let[t,n]of this.subGraphs.entries())if(n.id===e)return t;return-1}indexNodes2(e,t){let n=this.subGraphs[t].nodes;if(this.secCount+=1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=t,this.subGraphs[t].id===e)return{result:!0,count:0};let r=0,i=1;for(;r<n.length;){let t=this.getPosForId(n[r]);if(t>=0){let n=this.indexNodes2(e,t);if(n.result)return{result:!0,count:i+n.count};i+=n.count}r+=1}return{result:!1,count:i}}getDepthFirstPos(e){return this.posCrossRef[e]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2(`none`,this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return this.firstGraphFlag?(this.firstGraphFlag=!1,!0):!1}destructStartLink(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}countChar(e,t){let n=t.length,r=0;for(let i=0;i<n;++i)t[i]===e&&++r;return r}destructEndLink(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`,t.startsWith(`x`)&&(r=`double_`+r,n=n.slice(1));break;case`>`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=this.countChar(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}destructLink(e,t){let n=this.destructEndLink(e),r;if(t){if(r=this.destructStartLink(t),r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}return n}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=[];return e.nodes.forEach((r,i)=>{this.exists(t,r)||n.push(e.nodes[i])}),{nodes:n}}getTypeFromVertex(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;case`ellipse`:return`ellipse`;default:return e.type}}findNode(e,t){return e.find(e=>e.id===t)}destructEdgeType(e){let t=`none`,n=`arrow_point`;switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:n=e;break;case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:t=e.replace(`double_`,``),n=t}return{arrowTypeStart:t,arrowTypeEnd:n}}addNodeFromVertex(e,t,n,r,i,a){let o=n.get(e.id),s=r.get(e.id)??!1,l=this.findNode(t,e.id);if(l)l.cssStyles=e.styles,l.cssCompiledStyles=this.getCompiledStyles(e.classes),l.cssClasses=e.classes.join(` `);else{let n={id:e.id,label:e.text,labelType:e.labelType,labelStyle:``,parentId:o,padding:i.flowchart?.padding||8,cssStyles:e.styles,cssCompiledStyles:this.getCompiledStyles([`default`,`node`,...e.classes]),cssClasses:`default `+e.classes.join(` `),dir:e.dir,domId:e.domId,look:a,link:e.link,linkTarget:e.linkTarget,tooltip:this.getTooltip(e.id),icon:e.icon,pos:e.pos,img:e.img,assetWidth:e.assetWidth,assetHeight:e.assetHeight,constraint:e.constraint};s?t.push({...n,isGroup:!0,shape:`rect`}):t.push({...n,isGroup:!1,shape:this.getTypeFromVertex(e)})}}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}getData(){let e=Z(),t=[],n=[],r=this.getSubGraphs(),i=new Map,a=new Map,o=new Map;for(let e of r)for(let t of e.nodes)this.subGraphLookup.has(t)&&o.set(t,e.id);let s=p(e=>this.subGraphLookup.get(e)?.metadata?.view===`collapsed`,`isCollapsed`),l=p(e=>{let t,n=new Set,r=e;for(;r!==void 0&&!n.has(r);)n.add(r),s(r)&&(t=r),r=o.get(r);return t},`outermostCollapsed`),u=new Set,d=new Map;for(let e of r){let t=l(e.id);if(t!==void 0){e.id!==t&&(u.add(e.id),d.set(e.id,t));for(let n of e.nodes)n!==t&&(u.add(n),d.set(n,t))}}for(let e=r.length-1;e>=0;e--){let t=r[e];if(!u.has(t.id)){t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}}for(let n=r.length-1;n>=0;n--){let a=r[n];u.has(a.id)||(a.metadata?.view===`collapsed`?t.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(` `),shape:`collapsedGroup`,dir:a.dir,isGroup:!1,look:e.look}):t.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir,isGroup:!0,look:e.look}))}this.getVertices().forEach(n=>{u.has(n.id)||this.addNodeFromVertex(n,t,i,a,e,e.look||`classic`)});let f=this.getEdges();return f.forEach((t,r)=>{let{arrowTypeStart:i,arrowTypeEnd:a}=this.destructEdgeType(t.type),o=[...f.defaultStyle??[]],s=d.get(t.start)??t.start,l=d.get(t.end)??t.end;if(s===l&&(d.has(t.start)||d.has(t.end)))return;t.style&&o.push(...t.style);let u={id:Gp(s,l,{counter:r,prefix:`L`},t.id),isUserDefinedId:t.isUserDefinedId,start:s,end:l,type:t.type??`normal`,label:t.text,labelType:t.labelType,labelpos:`c`,thickness:t.stroke,minlen:t.length,classes:t?.stroke===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:i,arrowTypeEnd:t?.stroke===`invisible`||t?.type===`arrow_open`?`none`:a,arrowheadStyle:`fill: #333`,cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:o,style:o,pattern:t.stroke,look:e.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||e.flowchart?.curve};n.push(u)}),{nodes:t,edges:n,other:{},config:e}}defaultConfig(){return Gs.flowchart}},eKe={getClasses:p(function(e,t){return t.db.getClasses()},`getClasses`),draw:p(async function(e,t,n,r){y.info(`REF0:`),y.info(`Drawing state diagram (v2)`,t);let{securityLevel:i,flowchart:a,layout:o}=Z();r.db.setDiagramId(t),y.debug(`Before getData: `);let s=r.db.getData();y.debug(`Data: `,s);let l=cF(t,i),u=r.db.getDirection();s.type=r.type,s.layoutAlgorithm=HN(o),s.layoutAlgorithm===`dagre`&&o===`elk`&&y.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),s.direction=u,s.nodeSpacing=a?.nodeSpacing||50,s.rankSpacing=a?.rankSpacing||50,s.markers=[`point`,`circle`,`cross`],s.diagramId=t,y.debug(`REF1:`,s),await VN(s,l);let d=s.config.flowchart?.diagramPadding??8;Up.insertTitle(l,`flowchartTitleText`,a?.titleTopMargin||0,r.db.getDiagramTitle()),uF(l,d,`flowchart`,a?.useMaxWidth||!1)},`draw`)},fF=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,3],r=[1,5],i=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],o=[1,13],s=[1,14],l=[1,15],u=[1,16],d=[1,23],f=[1,25],m=[1,26],h=[1,27],g=[1,50],_=[1,49],v=[1,29],y=[1,30],b=[1,31],x=[1,32],S=[1,33],C=[1,45],w=[1,47],T=[1,43],E=[1,48],D=[1,44],O=[1,51],k=[1,46],A=[1,52],j=[1,53],M=[1,34],N=[1,35],P=[1,36],F=[1,37],I=[1,38],L=[1,58],R=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],ee=[1,62],z=[1,61],B=[1,63],te=[8,9,11,75,77,78],ne=[1,79],re=[1,92],ie=[1,97],ae=[1,96],oe=[1,93],se=[1,89],ce=[1,95],le=[1,91],ue=[1,98],de=[1,94],fe=[1,99],pe=[1,90],me=[8,9,10,11,40,75,77,78],he=[8,9,10,11,40,46,75,77,78],ge=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],_e=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],ve=[44,60,89,102,105,106,109,111,114,115,116],ye=[1,122],be=[1,123],xe=[1,125],Se=[1,124],V=[44,60,62,74,89,102,105,106,109,111,114,115,116],Ce=[1,134],we=[1,148],Te=[1,149],Ee=[1,150],De=[1,151],H=[1,136],Oe=[1,138],ke=[1,142],Ae=[1,143],U=[1,144],je=[1,145],Me=[1,146],Ne=[1,147],Pe=[1,152],Fe=[1,153],Ie=[1,132],Le=[1,133],Re=[1,140],ze=[1,135],Be=[1,139],Ve=[1,137],He=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],Ue=[1,155],We=[1,157],Ge=[8,9,11],Ke=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],qe=[1,177],Je=[1,173],Ye=[1,174],Xe=[1,178],Ze=[1,175],Qe=[1,176],$e=[77,116,119],et=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],tt=[10,106],nt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],rt=[1,248],it=[1,246],at=[1,250],ot=[1,244],st=[1,245],ct=[1,247],lt=[1,249],ut=[1,251],dt=[1,269],ft=[8,9,11,106],pt=[8,9,10,11,60,84,105,106,109,110,111,112],mt={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:`error`,8:`SEMI`,9:`NEWLINE`,10:`SPACE`,11:`EOF`,12:`GRAPH`,13:`NODIR`,14:`DIR`,27:`subgraph`,29:`SQS`,31:`SQE`,32:`end`,34:`acc_title`,35:`acc_title_value`,36:`acc_descr`,37:`acc_descr_value`,38:`acc_descr_multiline_value`,40:`SHAPE_DATA`,44:`AMP`,46:`STYLE_SEPARATOR`,48:`DOUBLECIRCLESTART`,49:`DOUBLECIRCLEEND`,50:`PS`,51:`PE`,52:`(-`,53:`-)`,54:`STADIUMSTART`,55:`STADIUMEND`,56:`SUBROUTINESTART`,57:`SUBROUTINEEND`,58:`VERTEX_WITH_PROPS_START`,59:`NODE_STRING[field]`,60:`COLON`,61:`NODE_STRING[value]`,62:`PIPE`,63:`CYLINDERSTART`,64:`CYLINDEREND`,65:`DIAMOND_START`,66:`DIAMOND_STOP`,67:`TAGEND`,68:`TRAPSTART`,69:`TRAPEND`,70:`INVTRAPSTART`,71:`INVTRAPEND`,74:`TESTSTR`,75:`START_LINK`,77:`LINK`,78:`LINK_ID`,80:`STR`,81:`MD_STR`,84:`STYLE`,85:`LINKSTYLE`,86:`CLASSDEF`,87:`CLASS`,88:`CLICK`,89:`DOWN`,90:`UP`,93:`idString[vertex]`,94:`idString[class]`,95:`CALLBACKNAME`,96:`CALLBACKARGS`,97:`HREF`,98:`LINK_TARGET`,99:`STR[link]`,100:`STR[tooltip]`,102:`DEFAULT`,104:`INTERPOLATE`,105:`NUM`,106:`COMMA`,109:`NODE_STRING`,110:`UNIT`,111:`BRKT`,112:`PCT`,114:`MINUS`,115:`MULT`,116:`UNICODE_TEXT`,117:`TEXT`,118:`TAGSTART`,119:`EDGE_TEXT`,121:`direction_tb`,122:`direction_bt`,123:`direction_rl`,124:`direction_lr`,125:`direction_td`},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[s])||a[s].length>0)&&a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 183:this.$=a[s];break;case 11:r.setDirection(`TB`),this.$=`TB`;break;case 12:r.setDirection(a[s-1]),this.$=a[s-1];break;case 27:this.$=a[s-1].nodes;break;case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 33:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 34:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 35:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 37:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 38:case 39:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 43:this.$=a[s-1]+a[s];break;case 44:this.$=a[s];break;case 45:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 46:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 47:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 48:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 49:r.addVertex(a[s-1][a[s-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s]),this.$={stmt:a[s-1],nodes:a[s-1],shapeData:a[s]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:r.addVertex(a[s-5][a[s-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[s-4]),this.$=a[s-5].concat(a[s]);break;case 53:this.$=a[s-4].concat(a[s]);break;case 54:this.$=a[s];break;case 55:this.$=a[s-2],r.setClass(a[s-2],a[s]);break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`square`);break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`doublecircle`);break;case 58:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`circle`);break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`ellipse`);break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`stadium`);break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`subroutine`);break;case 62:this.$=a[s-7],r.addVertex(a[s-7],a[s-1],`rect`,void 0,void 0,void 0,Object.fromEntries([[a[s-5],a[s-3]]]));break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`cylinder`);break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`round`);break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`diamond`);break;case 66:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],`hexagon`);break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`odd`);break;case 68:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`trapezoid`);break;case 69:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`inv_trapezoid`);break;case 70:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_right`);break;case 71:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],`lean_left`);break;case 72:this.$=a[s],r.addVertex(a[s]);break;case 73:a[s-1].text=a[s],this.$=a[s-1];break;case 74:case 75:a[s-2].text=a[s-1],this.$=a[s-2];break;case 76:this.$=a[s];break;case 77:var l=r.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1]};break;case 78:var l=r.destructLink(a[s],a[s-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[s-1],id:a[s-3]};break;case 79:this.$={text:a[s],type:`text`};break;case 80:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 81:this.$={text:a[s],type:`string`};break;case 82:this.$={text:a[s],type:`markdown`};break;case 83:var l=r.destructLink(a[s]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:var l=r.destructLink(a[s]);this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[s-1]};break;case 85:this.$=a[s-1];break;case 86:this.$={text:a[s],type:`text`};break;case 87:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 88:this.$={text:a[s],type:`string`};break;case 89:case 104:this.$={text:a[s],type:`markdown`};break;case 101:this.$={text:a[s],type:`text`};break;case 102:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 103:this.$={text:a[s],type:`text`};break;case 105:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 106:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 107:case 115:this.$=a[s-1],r.setClickEvent(a[s-1],a[s]);break;case 108:case 116:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 109:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 110:this.$=a[s-4],r.setClickEvent(a[s-4],a[s-3],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 111:this.$=a[s-2],r.setLink(a[s-2],a[s]);break;case 112:this.$=a[s-4],r.setLink(a[s-4],a[s-2]),r.setTooltip(a[s-4],a[s]);break;case 113:this.$=a[s-4],r.setLink(a[s-4],a[s-2],a[s]);break;case 114:this.$=a[s-6],r.setLink(a[s-6],a[s-4],a[s]),r.setTooltip(a[s-6],a[s-2]);break;case 117:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 118:this.$=a[s-3],r.setLink(a[s-3],a[s-2]),r.setTooltip(a[s-3],a[s]);break;case 119:this.$=a[s-3],r.setLink(a[s-3],a[s-2],a[s]);break;case 120:this.$=a[s-5],r.setLink(a[s-5],a[s-4],a[s]),r.setTooltip(a[s-5],a[s-2]);break;case 121:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 122:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 123:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 124:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 125:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 126:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 127:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 128:case 130:this.$=[a[s]];break;case 129:case 131:a[s-2].push(a[s]),this.$=a[s-2];break;case 133:this.$=a[s-1]+a[s];break;case 181:this.$=a[s];break;case 182:this.$=a[s-1]+``+a[s];break;case 184:this.$=a[s-1]+``+a[s];break;case 185:this.$={stmt:`dir`,value:`TB`};break;case 186:this.$={stmt:`dir`,value:`BT`};break;case 187:this.$={stmt:`dir`,value:`RL`};break;case 188:this.$={stmt:`dir`,value:`LR`};break;case 189:this.$={stmt:`dir`,value:`TD`}}},`anonymous`),table:[{3:1,4:2,9:t,10:n,12:r},{1:[3]},e(i,a,{5:6}),{4:7,9:t,10:n,12:r},{4:8,9:t,10:n,12:r},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,33:24,34:f,36:m,38:h,42:28,43:39,44:g,45:40,47:41,60:_,84:v,85:y,86:b,87:x,88:S,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j,121:M,122:N,123:P,124:F,125:I},e(i,[2,9]),e(i,[2,10]),e(i,[2,11]),{8:[1,55],9:[1,56],10:L,15:54,18:57},e(R,[2,3]),e(R,[2,4]),e(R,[2,5]),e(R,[2,6]),e(R,[2,7]),e(R,[2,8]),{8:ee,9:z,11:B,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:ee,9:z,11:B,21:68},{8:ee,9:z,11:B,21:69},{8:ee,9:z,11:B,21:70},{8:ee,9:z,11:B,21:71},{8:ee,9:z,11:B,21:72},{8:ee,9:z,10:[1,73],11:B,21:74},e(R,[2,36]),{35:[1,75]},{37:[1,76]},e(R,[2,39]),e(te,[2,50],{18:77,39:78,10:L,40:ne}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:re,44:ie,60:ae,80:[1,87],89:oe,95:[1,84],97:[1,85],101:86,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe,120:88},e(R,[2,185]),e(R,[2,186]),e(R,[2,187]),e(R,[2,188]),e(R,[2,189]),e(me,[2,51]),e(me,[2,54],{46:[1,100]}),e(he,[2,72],{113:113,29:[1,101],44:g,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:_,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:C,102:w,105:T,106:E,109:D,111:O,114:k,115:A,116:j}),e(ge,[2,181]),e(ge,[2,142]),e(ge,[2,143]),e(ge,[2,144]),e(ge,[2,145]),e(ge,[2,146]),e(ge,[2,147]),e(ge,[2,148]),e(ge,[2,149]),e(ge,[2,150]),e(ge,[2,151]),e(ge,[2,152]),e(i,[2,12]),e(i,[2,18]),e(i,[2,19]),{9:[1,114]},e(_e,[2,26],{18:115,10:L}),e(R,[2,27]),{42:116,43:39,44:g,45:40,47:41,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},e(R,[2,40]),e(R,[2,41]),e(R,[2,42]),e(ve,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:ye,81:be,116:xe,119:Se},{75:[1,126],77:[1,127]},e(V,[2,83]),e(R,[2,28]),e(R,[2,29]),e(R,[2,30]),e(R,[2,31]),e(R,[2,32]),{10:Ce,12:we,14:Te,27:Ee,28:128,32:De,44:H,60:Oe,75:ke,80:[1,130],81:[1,131],83:141,84:Ae,85:U,86:je,87:Me,88:Ne,89:Pe,90:Fe,91:129,105:Ie,109:Le,111:Re,114:ze,115:Be,116:Ve},e(He,a,{5:154}),e(R,[2,37]),e(R,[2,38]),e(te,[2,48],{44:Ue}),e(te,[2,49],{18:156,10:L,40:We}),e(me,[2,44]),{44:g,47:158,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},{102:[1,159],103:160,105:[1,161]},{44:g,47:162,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},{44:g,47:163,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},e(Ge,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},e(Ge,[2,115],{120:168,10:[1,167],14:re,44:ie,60:ae,89:oe,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe}),e(Ge,[2,117],{10:[1,169]}),e(Ke,[2,183]),e(Ke,[2,170]),e(Ke,[2,171]),e(Ke,[2,172]),e(Ke,[2,173]),e(Ke,[2,174]),e(Ke,[2,175]),e(Ke,[2,176]),e(Ke,[2,177]),e(Ke,[2,178]),e(Ke,[2,179]),e(Ke,[2,180]),{44:g,47:170,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},{30:171,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:179,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:181,50:[1,180],67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:182,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:183,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:184,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{109:[1,185]},{30:186,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:187,65:[1,188],67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:189,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:190,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{30:191,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},e(ge,[2,182]),e(i,[2,20]),e(_e,[2,25]),e(te,[2,46],{39:192,18:193,10:L,40:ne}),e(ve,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{77:[1,197],79:198,116:xe,119:Se},e($e,[2,79]),e($e,[2,81]),e($e,[2,82]),e($e,[2,168]),e($e,[2,169]),{76:199,79:121,80:ye,81:be,116:xe,119:Se},e(V,[2,84]),{8:ee,9:z,10:Ce,11:B,12:we,14:Te,21:201,27:Ee,29:[1,200],32:De,44:H,60:Oe,75:ke,83:141,84:Ae,85:U,86:je,87:Me,88:Ne,89:Pe,90:Fe,91:202,105:Ie,109:Le,111:Re,114:ze,115:Be,116:Ve},e(et,[2,101]),e(et,[2,103]),e(et,[2,104]),e(et,[2,157]),e(et,[2,158]),e(et,[2,159]),e(et,[2,160]),e(et,[2,161]),e(et,[2,162]),e(et,[2,163]),e(et,[2,164]),e(et,[2,165]),e(et,[2,166]),e(et,[2,167]),e(et,[2,90]),e(et,[2,91]),e(et,[2,92]),e(et,[2,93]),e(et,[2,94]),e(et,[2,95]),e(et,[2,96]),e(et,[2,97]),e(et,[2,98]),e(et,[2,99]),e(et,[2,100]),{6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,203],33:24,34:f,36:m,38:h,42:28,43:39,44:g,45:40,47:41,60:_,84:v,85:y,86:b,87:x,88:S,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j,121:M,122:N,123:P,124:F,125:I},{10:L,18:204},{44:[1,205]},e(me,[2,43]),{10:[1,206],44:g,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:113,114:k,115:A,116:j},{10:[1,207]},{10:[1,208],106:[1,209]},e(tt,[2,128]),{10:[1,210],44:g,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:113,114:k,115:A,116:j},{10:[1,211],44:g,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:113,114:k,115:A,116:j},{80:[1,212]},e(Ge,[2,109],{10:[1,213]}),e(Ge,[2,111],{10:[1,214]}),{80:[1,215]},e(Ke,[2,184]),{80:[1,216],98:[1,217]},e(me,[2,55],{113:113,44:g,60:_,89:C,102:w,105:T,106:E,109:D,111:O,114:k,115:A,116:j}),{31:[1,218],67:qe,82:219,116:Xe,117:Ze,118:Qe},e(nt,[2,86]),e(nt,[2,88]),e(nt,[2,89]),e(nt,[2,153]),e(nt,[2,154]),e(nt,[2,155]),e(nt,[2,156]),{49:[1,220],67:qe,82:219,116:Xe,117:Ze,118:Qe},{30:221,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{51:[1,222],67:qe,82:219,116:Xe,117:Ze,118:Qe},{53:[1,223],67:qe,82:219,116:Xe,117:Ze,118:Qe},{55:[1,224],67:qe,82:219,116:Xe,117:Ze,118:Qe},{57:[1,225],67:qe,82:219,116:Xe,117:Ze,118:Qe},{60:[1,226]},{64:[1,227],67:qe,82:219,116:Xe,117:Ze,118:Qe},{66:[1,228],67:qe,82:219,116:Xe,117:Ze,118:Qe},{30:229,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},{31:[1,230],67:qe,82:219,116:Xe,117:Ze,118:Qe},{67:qe,69:[1,231],71:[1,232],82:219,116:Xe,117:Ze,118:Qe},{67:qe,69:[1,234],71:[1,233],82:219,116:Xe,117:Ze,118:Qe},e(te,[2,45],{18:156,10:L,40:We}),e(te,[2,47],{44:Ue}),e(ve,[2,75]),e(ve,[2,74]),{62:[1,235],67:qe,82:219,116:Xe,117:Ze,118:Qe},e(ve,[2,77]),e($e,[2,80]),{77:[1,236],79:198,116:xe,119:Se},{30:237,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},e(He,a,{5:238}),e(et,[2,102]),e(R,[2,35]),{43:239,44:g,45:40,47:41,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},{10:L,18:240},{10:rt,60:it,84:at,92:241,105:ot,107:242,108:243,109:st,110:ct,111:lt,112:ut},{10:rt,60:it,84:at,92:252,104:[1,253],105:ot,107:242,108:243,109:st,110:ct,111:lt,112:ut},{10:rt,60:it,84:at,92:254,104:[1,255],105:ot,107:242,108:243,109:st,110:ct,111:lt,112:ut},{105:[1,256]},{10:rt,60:it,84:at,92:257,105:ot,107:242,108:243,109:st,110:ct,111:lt,112:ut},{44:g,47:258,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},e(Ge,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},e(Ge,[2,116]),e(Ge,[2,118],{10:[1,262]}),e(Ge,[2,119]),e(he,[2,56]),e(nt,[2,87]),e(he,[2,57]),{51:[1,263],67:qe,82:219,116:Xe,117:Ze,118:Qe},e(he,[2,64]),e(he,[2,59]),e(he,[2,60]),e(he,[2,61]),{109:[1,264]},e(he,[2,63]),e(he,[2,65]),{66:[1,265],67:qe,82:219,116:Xe,117:Ze,118:Qe},e(he,[2,67]),e(he,[2,68]),e(he,[2,70]),e(he,[2,69]),e(he,[2,71]),e([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),e(ve,[2,78]),{31:[1,266],67:qe,82:219,116:Xe,117:Ze,118:Qe},{6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,267],33:24,34:f,36:m,38:h,42:28,43:39,44:g,45:40,47:41,60:_,84:v,85:y,86:b,87:x,88:S,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j,121:M,122:N,123:P,124:F,125:I},e(me,[2,53]),{43:268,44:g,45:40,47:41,60:_,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j},e(Ge,[2,121],{106:dt}),e(ft,[2,130],{108:270,10:rt,60:it,84:at,105:ot,109:st,110:ct,111:lt,112:ut}),e(pt,[2,132]),e(pt,[2,134]),e(pt,[2,135]),e(pt,[2,136]),e(pt,[2,137]),e(pt,[2,138]),e(pt,[2,139]),e(pt,[2,140]),e(pt,[2,141]),e(Ge,[2,122],{106:dt}),{10:[1,271]},e(Ge,[2,123],{106:dt}),{10:[1,272]},e(tt,[2,129]),e(Ge,[2,105],{106:dt}),e(Ge,[2,106],{113:113,44:g,60:_,89:C,102:w,105:T,106:E,109:D,111:O,114:k,115:A,116:j}),e(Ge,[2,110]),e(Ge,[2,112],{10:[1,273]}),e(Ge,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:ee,9:z,11:B,21:278},e(R,[2,34]),e(me,[2,52]),{10:rt,60:it,84:at,105:ot,107:279,108:243,109:st,110:ct,111:lt,112:ut},e(pt,[2,133]),{14:re,44:ie,60:ae,89:oe,101:280,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe,120:88},{14:re,44:ie,60:ae,89:oe,101:281,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe,120:88},{98:[1,282]},e(Ge,[2,120]),e(he,[2,58]),{30:283,67:qe,80:Je,81:Ye,82:172,116:Xe,117:Ze,118:Qe},e(he,[2,66]),e(He,a,{5:284}),e(ft,[2,131],{108:270,10:rt,60:it,84:at,105:ot,109:st,110:ct,111:lt,112:ut}),e(Ge,[2,126],{120:168,10:[1,285],14:re,44:ie,60:ae,89:oe,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe}),e(Ge,[2,127],{120:168,10:[1,286],14:re,44:ie,60:ae,89:oe,105:se,106:ce,109:le,111:ue,114:de,115:fe,116:pe}),e(Ge,[2,114]),{31:[1,287],67:qe,82:219,116:Xe,117:Ze,118:Qe},{6:11,7:12,8:o,9:s,10:l,11:u,20:17,22:18,23:19,24:20,25:21,26:22,27:d,32:[1,288],33:24,34:f,36:m,38:h,42:28,43:39,44:g,45:40,47:41,60:_,84:v,85:y,86:b,87:x,88:S,89:C,102:w,105:T,106:E,109:D,111:O,113:42,114:k,115:A,116:j,121:M,122:N,123:P,124:F,125:I},{10:rt,60:it,84:at,92:289,105:ot,107:242,108:243,109:st,110:ct,111:lt,112:ut},{10:rt,60:it,84:at,92:290,105:ot,107:242,108:243,109:st,110:ct,111:lt,112:ut},e(he,[2,62]),e(R,[2,33]),e(Ge,[2,124],{106:dt}),e(Ge,[2,125],{106:dt})],defaultActions:{},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:941-`+g.showPosition()+`942-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};mt.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).943-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`944-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.945-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:p(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),34;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),36;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return this.pushState(`shapeData`),t.yytext=``,40;case 8:return this.pushState(`shapeDataStr`),40;case 9:return this.popState(),40;case 10:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),40;case 11:return 40;case 12:this.popState();break;case 13:this.begin(`callbackname`);break;case 14:this.popState();break;case 15:this.popState(),this.begin(`callbackargs`);break;case 16:return 95;case 17:this.popState();break;case 18:return 96;case 19:return`MD_STR`;case 20:this.popState();break;case 21:this.begin(`md_string`);break;case 22:return`STR`;case 23:this.popState();break;case 24:this.pushState(`string`);break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin(`click`);break;case 33:this.popState();break;case 34:return 88;case 35:return e.lex.firstGraph()&&this.begin(`dir`),12;case 36:return e.lex.firstGraph()&&this.begin(`dir`),12;case 37:return e.lex.firstGraph()&&this.begin(`dir`),12;case 38:return e.lex.firstGraph()&&this.begin(`dir`),12;case 39:return 27;case 40:return 32;case 41:return 98;case 42:return 98;case 43:return 98;case 44:return 98;case 45:return this.popState(),13;case 46:return this.popState(),14;case 47:return this.popState(),14;case 48:return this.popState(),14;case 49:return this.popState(),14;case 50:return this.popState(),14;case 51:return this.popState(),14;case 52:return this.popState(),14;case 53:return this.popState(),14;case 54:return this.popState(),14;case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:return 111;case 64:return 46;case 65:return 60;case 66:return 44;case 67:return 8;case 68:return 106;case 69:return 115;case 70:return this.popState(),77;case 71:return this.pushState(`edgeText`),75;case 72:return 119;case 73:return this.popState(),77;case 74:return this.pushState(`thickEdgeText`),75;case 75:return 119;case 76:return this.popState(),77;case 77:return this.pushState(`dottedEdgeText`),75;case 78:return 119;case 79:return 77;case 80:return this.popState(),53;case 81:return`TEXT`;case 82:return this.pushState(`ellipseText`),52;case 83:return this.popState(),55;case 84:return this.pushState(`text`),54;case 85:return this.popState(),57;case 86:return this.pushState(`text`),56;case 87:return 58;case 88:return this.pushState(`text`),67;case 89:return this.popState(),64;case 90:return this.pushState(`text`),63;case 91:return this.popState(),49;case 92:return this.pushState(`text`),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState(`trapText`),68;case 97:return this.pushState(`trapText`),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return`SEP`;case 102:return 89;case 103:return 115;case 104:return 111;case 105:return 44;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState(`text`),62;case 111:return this.popState(),51;case 112:return this.pushState(`text`),50;case 113:return this.popState(),31;case 114:return this.pushState(`text`),29;case 115:return this.popState(),66;case 116:return this.pushState(`text`),65;case 117:return`TEXT`;case 118:return`QUOTE`;case 119:return 9;case 120:return 10;case 121:return 11}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}}})();function ht(){this.yy={}}return p(ht,`Parser`),ht.prototype=mt,mt.Parser=ht,new ht})(),fF.parser=fF,pF=fF,mF=Object.assign({},pF),mF.parse=e=>{let t=e.replace(/}\s*\n/g,`}946-`);return pF.parse(t)},tKe=mF,nKe=p((e,t)=>{let n=pe,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return de(r,i,a,t)},`fade`),hF=p(e=>`.label {947- font-family: ${e.fontFamily};948- color: ${e.nodeTextColor||e.textColor};949- }950- .cluster-label text {951- fill: ${e.titleColor};952- }953- .cluster-label span {954- color: ${e.titleColor};955- }956- .cluster-label span p {957- background-color: transparent;958- }959-960- .label text,span {961- fill: ${e.nodeTextColor||e.textColor};962- color: ${e.nodeTextColor||e.textColor};963- }964-965- .node rect,966- .node circle,967- .node ellipse,968- .node polygon,969- .node path {970- fill: ${e.mainBkg};971- stroke: ${e.nodeBorder};972- stroke-width: ${e.strokeWidth??1}px;973- }974- .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {975- text-anchor: middle;976- }977-978- .node .katex path {979- fill: #000;980- stroke: #000;981- stroke-width: 1px;982- }983-984- .rough-node .label,.node .label, .image-shape .label, .icon-shape .label {985- text-align: center;986- }987- .node.clickable {988- cursor: pointer;989- }990-991-992- .root .anchor path {993- fill: ${e.lineColor} !important;994- stroke-width: 0;995- stroke: ${e.lineColor};996- }997-998- .arrowheadPath {999- fill: ${e.arrowheadColor};1000- }1001-1002- .edgePath .path {1003- stroke: ${e.lineColor};1004- stroke-width: ${e.strokeWidth??2}px;1005- }1006-1007- .flowchart-link {1008- stroke: ${e.lineColor};1009- fill: none;1010- }1011-1012- .edgeLabel {1013- background-color: ${e.edgeLabelBackground};1014- p {1015- background-color: ${e.edgeLabelBackground};1016- }1017- rect {1018- opacity: 0.5;1019- background-color: ${e.edgeLabelBackground};1020- fill: ${e.edgeLabelBackground};1021- }1022- text-align: center;1023- }1024-1025- /* For html labels only */1026- .labelBkg {1027- background-color: ${nKe(e.edgeLabelBackground,.5)};1028- // background-color:1029- }1030-1031- .cluster rect {1032- fill: ${e.clusterBkg};1033- stroke: ${e.clusterBorder};1034- stroke-width: 1px;1035- }1036-1037- .cluster text {1038- fill: ${e.titleColor};1039- }1040-1041- .cluster span {1042- color: ${e.titleColor};1043- }1044- /* .cluster div {1045- color: ${e.titleColor};1046- } */1047-1048- /* Collapsed subgraph node (@{ view: collapsed }) */1049- .node .collapsed-indicator {1050- fill: ${e.clusterBorder};1051- stroke: none;1052- opacity: 0.6;1053- }1054-1055- .node .collapsed-separator {1056- stroke: ${e.clusterBorder};1057- stroke-width: 0.75px;1058- }1059-1060- div.mermaidTooltip {1061- position: absolute;1062- text-align: center;1063- max-width: 200px;1064- padding: 2px;1065- font-family: ${e.fontFamily};1066- font-size: 12px;1067- background: ${e.tertiaryColor};1068- border: 1px solid ${e.border2};1069- border-radius: 2px;1070- pointer-events: none;1071- z-index: 100;1072- }1073-1074- .flowchartTitleText {1075- text-anchor: middle;1076- font-size: 18px;1077- fill: ${e.textColor};1078- }1079-1080- rect.text {1081- fill: none;1082- stroke-width: 0;1083- }1084-1085- .icon-shape, .image-shape {1086- background-color: ${e.edgeLabelBackground};1087- p {1088- background-color: ${e.edgeLabelBackground};1089- padding: 2px;1090- }1091- .label rect {1092- opacity: 0.5;1093- background-color: ${e.edgeLabelBackground};1094- fill: ${e.edgeLabelBackground};1095- }1096- text-align: center;1097- }1098- ${oF()}1099-`,`getStyles`),gF=p(({defaultLayout:e,styles:t=hF}={})=>({parser:tKe,get db(){return new $Ge},renderer:eKe,styles:t,init:p(t=>{t.flowchart||={};let n=as().layout??e??t.layout;n&&Ws({layout:n}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Ws({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},`init`)}),`createFlowDiagram`),rKe=gF()})),_F=l({createFlowDiagram:()=>gF,diagram:()=>rKe}),vF=o((()=>{iKe(),lF(),dF(),vS(),UN(),bP(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S()})),aKe=l({diagram:()=>oKe}),oKe,sKe=o((()=>{iKe(),lF(),dF(),vS(),UN(),bP(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),oKe=gF({defaultLayout:`swimlane`,styles:p(e=>`${hF(e)}1100- .swimlane.cluster rect {1101- stroke: ${e.clusterBorder} !important;1102- }1103- [data-look="neo"].cluster rect {1104- filter: none;1105- }1106-`,`getStyles`)})})),cKe=l({diagram:()=>pKe}),yF,lKe,uKe,bF,dKe,xF,SF,fKe,pKe,mKe=o((()=>{lF(),dF(),UN(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),hf(),Ne(),yF=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,9,21,23,25,27,34,37,38,39,40,41,43,46,47,51,53,54,55],n=[2,2],r=[1,7],i=[1,9],a=[1,10],o=[1,11],s=[1,12],l=[1,30],u=[1,23],d=[1,24],f=[1,25],m=[1,26],h=[1,27],g=[1,19],_=[1,28],v=[1,29],y=[1,20],b=[1,18],x=[1,21],S=[1,22],C=[2,6],w=[6,9,21,23,25,27,33,34,37,38,39,40,41,43,46,47,51,53,54,55],T=[1,36],E=[1,37],D=[1,38],O=[1,39],k=[1,40],A=[6,9,12,14,16,19,20,21,23,25,27,33,34,37,38,39,40,41,43,46,47,50,51,53,54,55,69,70,71,72,73],j=[1,46],M=[1,47],N=[1,57],P=[43,51,53,54,55,74,75],F=[1,70],I=[1,68],L=[1,65],R=[1,69],ee=[1,71],z=[6,9,12,16,21,23,25,27,33,34,37,38,39,40,41,43,44,45,46,47,51,52,53,54,55,69,70,71,72,73],B=[1,78],te=[1,77],ne=[1,76],re=[69,70,71,72,73],ie=[1,91],ae=[6,9,45,50],oe=[6,9,12,44,45,50,51,52],se=[1,101],ce=[1,100],le=[1,99],ue=[18,61],de=[1,110],fe=[1,109],pe=[20,43,51,53,54,55],me=[18,61,64,66],he={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,statement:8,NEWLINE:9,entityName:10,relSpec:11,COLON:12,role:13,STYLE_SEPARATOR:14,idList:15,BLOCK_START:16,attributes:17,BLOCK_STOP:18,SQS:19,SQE:20,title:21,title_value:22,acc_title:23,acc_title_value:24,acc_descr:25,acc_descr_value:26,acc_descr_multiline_value:27,direction:28,classDefStatement:29,classStatement:30,styleStatement:31,subgraphHeader:32,END:33,SUBGRAPH:34,separator:35,subgraphTitle:36,direction_tb:37,direction_bt:38,direction_rl:39,direction_lr:40,CLASSDEF:41,stylesOpt:42,UNICODE_TEXT:43,STYLE_TEXT:44,COMMA:45,CLASS:46,STYLE:47,style:48,styleComponent:49,SEMI:50,NUM:51,BRKT:52,ENTITY_NAME:53,DECIMAL_NUM:54,ENTITY_ONE:55,attribute:56,attributeType:57,attributeName:58,attributeKeyTypeList:59,attributeComment:60,ATTRIBUTE_WORD:61,"?":62,attributeKeyType:63,",":64,ATTRIBUTE_KEY:65,COMMENT:66,cardinality:67,relType:68,ZERO_OR_ONE:69,ZERO_OR_MORE:70,ONE_OR_MORE:71,ONLY_ONE:72,MD_PARENT:73,NON_IDENTIFYING:74,IDENTIFYING:75,WORD:76,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,9:`NEWLINE`,12:`COLON`,14:`STYLE_SEPARATOR`,16:`BLOCK_START`,18:`BLOCK_STOP`,19:`SQS`,20:`SQE`,21:`title`,22:`title_value`,23:`acc_title`,24:`acc_title_value`,25:`acc_descr`,26:`acc_descr_value`,27:`acc_descr_multiline_value`,33:`END`,34:`SUBGRAPH`,37:`direction_tb`,38:`direction_bt`,39:`direction_rl`,40:`direction_lr`,41:`CLASSDEF`,43:`UNICODE_TEXT`,44:`STYLE_TEXT`,45:`COMMA`,46:`CLASS`,47:`STYLE`,50:`SEMI`,51:`NUM`,52:`BRKT`,53:`ENTITY_NAME`,54:`DECIMAL_NUM`,55:`ENTITY_ONE`,61:`ATTRIBUTE_WORD`,62:`?`,64:`,`,65:`ATTRIBUTE_KEY`,66:`COMMENT`,69:`ZERO_OR_ONE`,70:`ZERO_OR_MORE`,71:`ONE_OR_MORE`,72:`ONLY_ONE`,73:`MD_PARENT`,74:`NON_IDENTIFYING`,75:`IDENTIFYING`,76:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[7,1],[8,5],[8,9],[8,7],[8,7],[8,4],[8,6],[8,3],[8,5],[8,1],[8,3],[8,7],[8,9],[8,6],[8,8],[8,4],[8,6],[8,2],[8,2],[8,2],[8,1],[8,1],[8,1],[8,1],[8,1],[8,3],[32,3],[32,6],[36,1],[36,2],[28,1],[28,1],[28,1],[28,1],[29,4],[15,1],[15,1],[15,3],[15,3],[30,3],[31,4],[42,1],[42,3],[48,1],[48,2],[35,1],[35,1],[35,1],[49,1],[49,1],[49,1],[49,1],[10,1],[10,1],[10,1],[10,1],[10,1],[17,1],[17,2],[56,2],[56,3],[56,3],[56,4],[57,1],[57,2],[58,1],[59,1],[59,3],[63,1],[60,1],[11,3],[67,1],[67,1],[67,1],[67,1],[67,1],[68,1],[68,1],[13,1],[13,1],[13,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:this.$=a[s-1].concat(a[s]);break;case 4:this.$=a[s];break;case 5:case 6:this.$=[];break;case 7:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]),this.$=[a[s-4],a[s-2]];break;case 8:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-8],a[s-4]];break;case 9:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]),this.$=[a[s-6],a[s-2]];break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-6],a[s-4]];break;case 11:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]),this.$=[a[s-3]];break;case 12:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]),this.$=[a[s-5]];break;case 13:r.addEntity(a[s-2]),this.$=[a[s-2]];break;case 14:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]),this.$=[a[s-4]];break;case 15:r.addEntity(a[s]),this.$=[a[s]];break;case 16:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]),this.$=[a[s-2]];break;case 17:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]),this.$=[a[s-6]];break;case 18:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]),this.$=[a[s-8]];break;case 19:r.addEntity(a[s-5],a[s-3]),this.$=[a[s-5]];break;case 20:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]),this.$=[a[s-7]];break;case 21:r.addEntity(a[s-3],a[s-1]);break;case 22:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 23:case 24:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 25:case 26:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 27:r.subgraphDepth?this.$=a[s]:(r.setDirection(a[s].value),this.$=[]);break;case 31:r.subgraphDepth=(r.subgraphDepth||1)-1,this.$=r.addSubGraph({text:a[s-2].id},a[s-1],{text:a[s-2].text});break;case 32:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-1],text:a[s-1]};break;case 33:r.subgraphDepth=(r.subgraphDepth||0)+1,this.$={id:a[s-4],text:a[s-2]};break;case 34:case 59:case 60:case 61:case 62:case 86:this.$=a[s];break;case 35:this.$=a[s-1]+` `+a[s];break;case 36:this.$={stmt:`dir`,value:`TB`};break;case 37:this.$={stmt:`dir`,value:`BT`};break;case 38:this.$={stmt:`dir`,value:`RL`};break;case 39:this.$={stmt:`dir`,value:`LR`};break;case 40:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 41:case 42:case 63:case 72:this.$=[a[s]];break;case 43:case 44:this.$=a[s-2].concat([a[s]]);break;case 45:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 46:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 47:this.$=[a[s]];break;case 48:a[s-2].push(a[s]),this.$=a[s-2];break;case 50:this.$=a[s-1]+a[s];break;case 58:case 84:case 85:this.$=a[s].replace(/"/g,``);break;case 64:a[s].push(a[s-1]),this.$=a[s];break;case 65:this.$={type:a[s-1],name:a[s]};break;case 66:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 67:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 68:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 69:case 71:case 74:this.$=a[s];break;case 70:this.$=a[s-1]+a[s];break;case 73:a[s-2].push(a[s]),this.$=a[s-2];break;case 75:this.$=a[s].replace(/"/g,``);break;case 76:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 77:this.$=r.Cardinality.ZERO_OR_ONE;break;case 78:this.$=r.Cardinality.ZERO_OR_MORE;break;case 79:this.$=r.Cardinality.ONE_OR_MORE;break;case 80:this.$=r.Cardinality.ONLY_ONE;break;case 81:this.$=r.Cardinality.MD_PARENT;break;case 82:this.$=r.Identification.NON_IDENTIFYING;break;case 83:this.$=r.Identification.IDENTIFYING}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,n,{5:3}),{6:[1,4],7:5,8:6,9:r,10:8,21:i,23:a,25:o,27:s,28:13,29:14,30:15,31:16,32:17,34:l,37:u,38:d,39:f,40:m,41:h,43:g,46:_,47:v,51:y,53:b,54:x,55:S},e(t,C,{1:[2,1]}),e(w,[2,3]),e(w,[2,4]),e(w,[2,5]),e(w,[2,15],{11:31,67:35,14:[1,32],16:[1,33],19:[1,34],69:T,70:E,71:D,72:O,73:k}),{22:[1,41]},{24:[1,42]},{26:[1,43]},e(w,[2,26]),e(w,[2,27]),e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),e(w,n,{5:44}),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(w,[2,36]),e(w,[2,37]),e(w,[2,38]),e(w,[2,39]),{15:45,43:j,44:M},{15:48,43:j,44:M},{15:49,43:j,44:M},{10:50,43:g,51:y,53:b,54:x,55:S},{10:51,43:g,51:y,53:b,54:x,55:S},{15:52,43:j,44:M},{17:53,18:[1,54],56:55,57:56,61:N},{10:58,43:g,51:y,53:b,54:x,55:S},{68:59,74:[1,60],75:[1,61]},e(P,[2,77]),e(P,[2,78]),e(P,[2,79]),e(P,[2,80]),e(P,[2,81]),e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),{6:[1,63],7:5,8:6,9:r,10:8,21:i,23:a,25:o,27:s,28:13,29:14,30:15,31:16,32:17,33:[1,62],34:l,37:u,38:d,39:f,40:m,41:h,43:g,46:_,47:v,51:y,53:b,54:x,55:S},{12:F,42:64,44:I,45:L,48:66,49:67,51:R,52:ee},e(z,[2,41]),e(z,[2,42]),{15:72,43:j,44:M,45:L},{12:F,42:73,44:I,45:L,48:66,49:67,51:R,52:ee},{6:B,9:te,19:[1,75],35:74,50:ne},{12:[1,79],14:[1,80]},e(w,[2,16],{67:35,11:81,16:[1,82],45:L,69:T,70:E,71:D,72:O,73:k}),{18:[1,83]},e(w,[2,13]),{17:84,18:[2,63],56:55,57:56,61:N},{58:85,61:[1,86]},{61:[2,69],62:[1,87]},{20:[1,88]},{67:89,69:T,70:E,71:D,72:O,73:k},e(re,[2,82]),e(re,[2,83]),e(w,[2,31]),e(w,C),{6:B,9:te,35:90,45:ie,50:ne},{43:[1,92],44:[1,93]},e(ae,[2,47],{49:94,12:F,44:I,51:R,52:ee}),e(oe,[2,49]),e(oe,[2,54]),e(oe,[2,55]),e(oe,[2,56]),e(oe,[2,57]),e(w,[2,45],{45:L}),{6:B,9:te,35:95,45:ie,50:ne},e(w,[2,32]),{10:97,36:96,43:g,51:y,53:b,54:x,55:S},e(w,[2,51]),e(w,[2,52]),e(w,[2,53]),{13:98,43:se,53:ce,76:le},{15:102,43:j,44:M},{10:103,43:g,51:y,53:b,54:x,55:S},{17:104,18:[1,105],56:55,57:56,61:N},e(w,[2,11]),{18:[2,64]},e(ue,[2,65],{59:106,60:107,63:108,65:de,66:fe}),e([18,61,65,66],[2,71]),{61:[2,70]},e(w,[2,21],{14:[1,112],16:[1,111]}),e([43,51,53,54,55],[2,76]),e(w,[2,40]),{12:F,44:I,48:113,49:67,51:R,52:ee},e(z,[2,43]),e(z,[2,44]),e(oe,[2,50]),e(w,[2,46]),{10:115,20:[1,114],43:g,51:y,53:b,54:x,55:S},e(pe,[2,34]),e(w,[2,7]),e(w,[2,84]),e(w,[2,85]),e(w,[2,86]),{12:[1,116],45:L},{12:[1,118],14:[1,117]},{18:[1,119]},e(w,[2,14]),e(ue,[2,66],{60:120,64:[1,121],66:fe}),e(ue,[2,67]),e(me,[2,72]),e(ue,[2,75]),e(me,[2,74]),{17:122,18:[1,123],56:55,57:56,61:N},{15:124,43:j,44:M},e(ae,[2,48],{49:94,12:F,44:I,51:R,52:ee}),{6:B,9:te,35:125,50:ne},e(pe,[2,35]),{13:126,43:se,53:ce,76:le},{15:127,43:j,44:M},{13:128,43:se,53:ce,76:le},e(w,[2,12]),e(ue,[2,68]),{63:129,65:de},{18:[1,130]},e(w,[2,19]),e(w,[2,22],{16:[1,131],45:L}),e(w,[2,33]),e(w,[2,10]),{12:[1,132],45:L},e(w,[2,9]),e(me,[2,73]),e(w,[2,17]),{17:133,18:[1,134],56:55,57:56,61:N},{13:135,43:se,53:ce,76:le},{18:[1,136]},e(w,[2,20]),e(w,[2,8]),e(w,[2,18])],defaultActions:{84:[2,64],87:[2,70]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:1107-`+g.showPosition()+`1108-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};he.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).1109-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`1110-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.1111-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return this.begin(`acc_title`),23;case 1:return this.popState(),`acc_title_value`;case 2:return this.begin(`acc_descr`),25;case 3:return this.popState(),`acc_descr_value`;case 4:this.begin(`acc_descr_multiline`);break;case 5:this.popState();break;case 6:return`acc_descr_multiline_value`;case 7:return 37;case 8:return 38;case 9:return 39;case 10:return 40;case 11:break;case 12:return 9;case 13:return 53;case 14:return 76;case 15:return 4;case 16:return this.begin(`block`),16;case 17:return 52;case 18:return 52;case 19:return 45;case 20:return 14;case 21:return 12;case 22:break;case 23:return 65;case 24:return 61;case 25:return 61;case 26:this.begin(`block_bq`);break;case 27:return 61;case 28:this.popState();break;case 29:return 66;case 30:break;case 31:return this.popState(),18;case 32:return t.yytext[0];case 33:return 19;case 34:return 20;case 35:return this.begin(`style`),47;case 36:return this.popState(),9;case 37:break;case 38:return 12;case 39:return 45;case 40:return 52;case 41:return this.begin(`style`),41;case 42:return 46;case 43:return 34;case 44:return 33;case 45:return 69;case 46:return 71;case 47:return 71;case 48:return 71;case 49:return 69;case 50:return 69;case 51:return 70;case 52:return 70;case 53:return 70;case 54:return 70;case 55:return 70;case 56:return 71;case 57:return 70;case 58:return 71;case 59:return 72;case 60:return 72;case 61:return 54;case 62:return 72;case 63:return 72;case 64:return 72;case 65:return 55;case 66:return 51;case 67:return 72;case 68:return 69;case 69:return 70;case 70:return 71;case 71:return 73;case 72:return 74;case 73:return 75;case 74:return 75;case 75:return 74;case 76:return 74;case 77:return 74;case 78:return 44;case 79:return 50;case 80:return 43;case 81:return t.yytext[0];case 82:return 6}},`anonymous`),rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[ \t\r]+)/i,/^(?:[\n]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:#)/i,/^(?:#)/i,/^(?:,)/i,/^(?::::)/i,/^(?::)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK)|(?:UK))\b)/i,/^(?:([^\s]*)[~].*[~]([^\s]*))/i,/^(?:([\*A-Za-z_\u00C0-\uFFFF][A-Za-z0-9\-\_\[\]\(\)\.,\u00C0-\uFFFF\*]*))/i,/^(?:[`])/i,/^(?:[^`]+)/i,/^(?:[`])/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:style\b)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?::)/i,/^(?:,)/i,/^(?:#)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:subgraph\b)/i,/^(?:end\b\s*)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:[0-9]+\.[0-9]+)/i,/^(?:1(?=\s+[A-Za-z_"']))/i,/^(?:1(?=\s+[0-9]))/i,/^(?:1(?=(--|\.\.|\.-|-\.)))/i,/^(?:1\b)/i,/^(?:[0-9]+)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:u(?=[\.\-\|]))/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:([^\x00-\x7F]|\w|-|\*)+)/i,/^(?:;)/i,/^(?:([^\x00-\x7F]|\w|-|\*|\.)+)/i,/^(?:.)/i,/^(?:$)/i],conditions:{style:{rules:[36,37,38,39,40,78,79],inclusive:!1},acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},block_bq:{rules:[27,28],inclusive:!1},block:{rules:[22,23,24,25,26,29,30,31,32],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,33,34,35,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,80,81,82],inclusive:!0}}}})();function ge(){this.yy={}}return p(ge,`Parser`),ge.prototype=he,he.Parser=ge,new ge})(),yF.parser=yF,lKe=yF,uKe=class{constructor(){this.entities=new Map,this.relationships=[],this.classes=new Map,this.subgraphDepth=0,this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.direction=`TB`,this.Cardinality={ZERO_OR_ONE:`ZERO_OR_ONE`,ZERO_OR_MORE:`ZERO_OR_MORE`,ONE_OR_MORE:`ONE_OR_MORE`,ONLY_ONE:`ONLY_ONE`,MD_PARENT:`MD_PARENT`},this.Identification={NON_IDENTIFYING:`NON_IDENTIFYING`,IDENTIFYING:`IDENTIFYING`},this.setAccTitle=Ls,this.getAccTitle=Rs,this.setAccDescription=zs,this.getAccDescription=Bs,this.setDiagramTitle=Vs,this.getDiagramTitle=Hs,this.getConfig=p(()=>Z().er,`getConfig`),this.clear(),this.addEntity=this.addEntity.bind(this),this.addAttributes=this.addAttributes.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setDirection=this.setDirection.bind(this),this.addCssStyles=this.addCssStyles.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this),this.addSubGraph=this.addSubGraph.bind(this)}static{p(this,`ErDB`)}addEntity(e,t=``){return this.entities.has(e)?!this.entities.get(e)?.alias&&t&&(this.entities.get(e).alias=t,y.info(`Add alias '${t}' to entity '${e}'`)):(this.entities.set(e,{id:`entity-${e}-${this.entities.size}`,label:e,attributes:[],alias:t,shape:`erBox`,look:Z().look??`default`,cssClasses:`default`,cssStyles:[],labelType:`markdown`}),y.info(`Added new entity :`,e)),this.entities.get(e)}getEntity(e){return this.entities.get(e)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(e,t){let n=this.addEntity(e),r;for(r=t.length-1;r>=0;r--)t[r].keys||(t[r].keys=[]),t[r].comment||(t[r].comment=``),n.attributes.push(t[r]),y.debug(`Added attribute `,t[r].name)}addRelationship(e,t,n,r){let i;if(this.subGraphLookup.has(e))i=e;else{let t=this.addEntity(e);if(!t)return;i=t.id}let a;if(this.subGraphLookup.has(n))a=n;else{let e=this.addEntity(n);if(!e)return;a=e.id}let o={entityA:i,roleA:t,entityB:a,relSpec:r};this.relationships.push(o),y.debug(`Added new relationship :`,o)}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(e){this.direction=e}getCompiledStyles(e){let t=[];for(let n of e){let e=this.classes.get(n);e?.styles&&(t=[...t,...e.styles??[]].map(e=>e.trim())),e?.textStyles&&(t=[...t,...e.textStyles??[]].map(e=>e.trim()))}return t}addCssStyles(e,t){for(let n of e){let e=this.entities.get(n),r=this.subGraphLookup.get(n);if(t){if(e)for(let n of t)e.cssStyles.push(n);if(r){r.cssStyles||=[];for(let e of t)r.cssStyles.push(e)}}}}addClass(e,t){e.forEach(e=>{let n=this.classes.get(e);n===void 0&&(n={id:e,styles:[],textStyles:[]},this.classes.set(e,n)),t&&t.forEach(function(e){if(/color/.exec(e)){let t=e.replace(`fill`,`bgFill`);n.textStyles.push(t)}n.styles.push(e)})})}addSubGraph(e,t,n){let r=e.text.trim(),i=n.text,a=p(e=>{let t=new Set,n;return{nodeList:e.filter(e=>{if(e?.stmt)return e.stmt===`dir`&&(n=e.value),!1;if(typeof e!=`string`)return!1;let r=e.trim();return!r||t.has(r)?!1:(t.add(r),!0)}),dir:n}},`uniq`)(t.flat()),o=a.nodeList,s=a.dir;r??=`subGraph`+this.subCount,i||=``,i=this.sanitizeText(i),this.subCount+=1;let l={id:r,nodes:o,title:i.trim(),classes:[],cssStyles:[],dir:s,labelType:this.sanitizeNodeLabelType(n?.type)};return y.info(`Adding`,l.id,l.nodes,l.dir),l.nodes=this.makeUniq(l,this.subGraphs).nodes,this.subGraphs.push(l),this.subGraphLookup.set(r,l),r}getSubGraphs(){return this.subGraphs}setClass(e,t){for(let n of e){let e=this.entities.get(n);if(e)for(let n of t)e.cssClasses+=` `+n;let r=this.subGraphLookup.get(n);if(r)for(let e of t)r.classes.push(e)}}subgraphNodeCache(e){let t=new Set;for(let n of e)for(let e of n.nodes)t.add(e);return t}makeUniq(e,t){let n=this.subgraphNodeCache(t),r=[];return e.nodes.forEach((t,i)=>{n.has(t)?y.warn(`Entity '${t}' already belongs to another subgraph and will be ignored`):r.push(e.nodes[i])}),{nodes:r}}sanitizeText(e){return Ds.sanitizeText(e,Z())}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.subgraphDepth=0,Is()}getData(){let e=[],t=[],n=Z(),r=this.getSubGraphs(),i=new Map,a=new Map;for(let e=r.length-1;e>=0;e--){let t=r[e];t.nodes.length>0&&a.set(t.id,!0);for(let e of t.nodes)i.set(e,t.id)}for(let t=r.length-1;t>=0;t--){let a=r[t];e.push({id:a.id,label:a.title,labelStyle:``,labelType:a.labelType,parentId:i.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssStyles:a.cssStyles,cssClasses:a.classes.join(` `),shape:`rect`,dir:a.dir,isGroup:!0,look:n.look})}let o=new Set(r.map(e=>e.id)),s=0;for(let t of this.entities.keys()){if(o.has(t))continue;let n=this.entities.get(t);n&&(n.cssCompiledStyles=this.getCompiledStyles(n.cssClasses.split(` `)),n.colorIndex=s++,e.push({...n,parentId:i.get(t),isGroup:!1}))}let l=0;for(let e of this.relationships){let r={id:Gp(e.entityA,e.entityB,{prefix:`id`,counter:l++}),type:`normal`,curve:`basis`,start:e.entityA,end:e.entityB,label:e.roleA,labelpos:`c`,thickness:`normal`,classes:`relationshipLine`,arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:e.relSpec.relType==`IDENTIFYING`?`solid`:`dashed`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.direction}}},bF={},m(bF,{draw:()=>dKe}),dKe=p(async function(e,t,n,r){y.info(`REF0:`),y.info(`Drawing er diagram (unified)`,t);let{securityLevel:i,er:a,layout:o}=Z(),s=r.db.getData(),l=cF(t,i);s.type=r.type,s.layoutAlgorithm=HN(o),s.config.flowchart.nodeSpacing=a?.nodeSpacing||140,s.config.flowchart.rankSpacing=a?.rankSpacing||80,s.direction=r.db.getDirection();let{config:u}=s,{look:d}=u;s.markers=d===`neo`?[`only_one_neo`,`zero_or_one_neo`,`one_or_more_neo`,`zero_or_more_neo`]:[`only_one`,`zero_or_one`,`one_or_more`,`zero_or_more`],s.diagramId=t,await VN(s,l),s.layoutAlgorithm===`elk`&&l.select(`.edges`).lower();let f=l.selectAll(`[id*="-background"]`);Array.from(f).length>0&&f.each(function(){let e=Ac(this),t=e.attr(`id`).replace(`-background`,``),n=l.select(`#${CSS.escape(t)}`);if(!n.empty()){let t=n.attr(`transform`);e.attr(`transform`,t)}}),Up.insertTitle(l,`erDiagramTitleText`,a?.titleTopMargin??25,r.db.getDiagramTitle()),uF(l,8,`erDiagram`,a?.useMaxWidth??!0)},`draw`),xF=p((e,t)=>{let n=pe,r=n(e,`r`),i=n(e,`g`),a=n(e,`b`);return de(r,i,a,t)},`fade`),SF=new Set([`redux-color`,`redux-dark-color`]),fKe=p(e=>{let{theme:t,look:n,bkgColorArray:r,borderColorArray:i}=e;if(!SF.has(t))return``;let a=r?.length>0,o=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)o+=`1112-1113- [data-look="${n}"][data-color-id="color-${t}"].node path {1114- stroke: ${i[t]};1115- ${a?`fill: ${r[t]};`:``}1116- }1117-1118- [data-look="${n}"][data-color-id="color-${t}"].node rect {1119- stroke: ${i[t]};1120- ${a?`fill: ${r[t]};`:``}1121- }1122- `;return o},`genColor`),pKe={parser:lKe,get db(){return new uKe},renderer:bF,styles:p(e=>{let{look:t,theme:n,erEdgeLabelBackground:r,strokeWidth:i}=e;return`1123- ${fKe(e)}1124- .entityBox {1125- fill: ${e.mainBkg};1126- stroke: ${e.nodeBorder};1127- }1128-1129- .relationshipLabelBox {1130- fill: ${e.tertiaryColor};1131- opacity: 0.7;1132- background-color: ${e.tertiaryColor};1133- rect {1134- opacity: 0.5;1135- }1136- }1137-1138- .labelBkg {1139- background-color: ${SF.has(n)&&r?r:xF(e.tertiaryColor,.5)};1140- }1141-1142- .edgeLabel {1143- background-color: ${SF.has(n)&&r?r:e.edgeLabelBackground};1144- }1145- .edgeLabel .label rect {1146- fill: ${SF.has(n)&&r?r:e.edgeLabelBackground};1147- }1148- .edgeLabel .label text {1149- fill: ${e.textColor};1150- }1151-1152- .edgeLabel .label {1153- fill: ${e.nodeBorder};1154- font-size: 14px;1155- }1156-1157- .label {1158- font-family: ${e.fontFamily};1159- color: ${e.nodeTextColor||e.textColor};1160- }1161-1162- .edge-pattern-dashed {1163- stroke-dasharray: 8,8;1164- }1165-1166- .node rect,1167- .node circle,1168- .node ellipse,1169- .node polygon1170- {1171- fill: ${e.mainBkg};1172- stroke: ${e.nodeBorder};1173- stroke-width: ${t===`neo`?i:`1px`};1174- }1175-1176- .relationshipLine {1177- stroke: ${e.lineColor};1178- stroke-width: ${t===`neo`?i:`1px`};1179- fill: none;1180- }1181-1182- .marker {1183- fill: none !important;1184- stroke: ${e.lineColor} !important;1185- stroke-width: 1;1186- }1187- [data-look=neo].labelBkg {1188- background-color: ${xF(e.tertiaryColor,.5)};1189- }1190-1191- .cluster rect {1192- fill: ${e.clusterBkg??e.mainBkg};1193- stroke: ${e.clusterBorder??e.nodeBorder};1194- stroke-width: 1px;1195- }1196-1197- .cluster text {1198- fill: ${e.titleColor??e.textColor};1199- }1200-1201- .cluster-label text {1202- fill: ${e.titleColor??e.textColor};1203- }1204-`},`getStyles`)}})),CF,wF=o((()=>{h(),CF=class{constructor(e){this.init=e,this.records=this.init()}static{p(this,`ImperativeState`)}reset(){this.records=this.init()}}}));function TF(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var EF=o((()=>{h(),p(TF,`populateCommonDb`)}));function DF(e){return typeof e==`object`&&!!e&&typeof e.$type==`string`}function OF(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`ref`in e}function kF(e){return typeof e==`object`&&!!e&&typeof e.$refText==`string`&&`items`in e}function AF(e){return typeof e==`object`&&!!e&&typeof e.name==`string`&&typeof e.type==`string`&&typeof e.path==`string`}function jF(e){return typeof e==`object`&&!!e&&typeof e.info==`object`&&typeof e.message==`string`}function MF(e){return typeof e==`object`&&!!e&&Array.isArray(e.content)}function NF(e){return typeof e==`object`&&!!e&&typeof e.tokenType==`object`}function PF(e){return MF(e)&&typeof e.fullText==`string`}function hKe(e){return typeof e==`string`?e:e===void 0?`undefined`:typeof e.toString==`function`?e.toString():Object.prototype.toString.call(e)}function FF(e){return!!e&&typeof e[Symbol.iterator]==`function`}function IF(...e){if(e.length===1){let t=e[0];if(t instanceof cV)return t;if(FF(t))return new cV(()=>t[Symbol.iterator](),e=>e.next());if(typeof t.length==`number`)return new cV(()=>({index:0}),e=>e.index<t.length?{done:!1,value:t[e.index++]}:uV)}return e.length>1?new cV(()=>({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){let e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex<t.array.length)return{done:!1,value:t.array[t.arrIndex++]};t.array=void 0,t.arrIndex=0}if(t.collIndex<e.length){let n=e[t.collIndex++];FF(n)?t.iterator=n[Symbol.iterator]():n&&typeof n.length==`number`&&(t.array=n)}}while(t.iterator||t.array||t.collIndex<e.length);return uV}):lV}function LF(e,t={}){for(let[n,r]of Object.entries(e))n.startsWith(`$`)||(Array.isArray(r)?r.forEach((r,i)=>{DF(r)&&(r.$container=e,r.$containerProperty=n,r.$containerIndex=i,t.deep&&LF(r,t))}):DF(r)&&(r.$container=e,r.$containerProperty=n,t.deep&&LF(r,t)))}function RF(e,t){let n=e;for(;n;){if(t(n))return n;n=n.$container}}function gKe(e,t){let n=e;for(;n;){if(t(n))return!0;n=n.$container}return!1}function zF(e){let t=BF(e).$document;if(!t)throw Error(`AST node has no document.`);return t}function BF(e){for(;e.$container;)e=e.$container;return e}function VF(e){return OF(e)?e.ref?[e.ref]:[]:kF(e)?e.items.map(e=>e.ref):[]}function HF(e,t){if(!e)throw Error(`Node must be an AstNode.`);let n=t?.range;return new cV(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let r=t.keys[t.keyIndex];if(!r.startsWith(`$`)){let i=e[r];if(DF(i)){if(t.keyIndex++,GF(i,n))return{done:!1,value:i}}else if(Array.isArray(i)){for(;t.arrayIndex<i.length;){let e=i[t.arrayIndex++];if(DF(e)&&GF(e,n))return{done:!1,value:e}}t.arrayIndex=0}}t.keyIndex++}return uV})}function UF(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return new dV(e,e=>HF(e,t))}function WF(e,t){if(!e)throw Error(`Root node must be an AstNode.`);return t?.range&&!GF(e,t.range)?new dV(e,()=>[]):new dV(e,e=>HF(e,t),{includeRoot:!0})}function GF(e,t){if(!t)return!0;let n=e.$cstNode?.range;return n?II(n,t):!1}function KF(e){return new cV(()=>({keys:Object.keys(e),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex<t.keys.length;){let n=t.keys[t.keyIndex];if(!n.startsWith(`$`)){let r=e[n];if(OF(r)||kF(r))return t.keyIndex++,{done:!1,value:{reference:r,container:e,property:n}};if(Array.isArray(r)){for(;t.arrayIndex<r.length;){let i=t.arrayIndex++,a=r[i];if(OF(a)||kF(r))return{done:!1,value:{reference:a,container:e,property:n,index:i}}}t.arrayIndex=0}}t.keyIndex++}return uV})}function qF(e,t){let n=e.getTypeMetaData(t.$type),r=t;for(let e of Object.values(n.properties))e.defaultValue!==void 0&&r[e.name]===void 0&&(r[e.name]=JF(e.defaultValue))}function JF(e){return Array.isArray(e)?[...e.map(JF)]:e}function YF(e,t,n){let r={$type:e.$type};n&&(n.set(e,r),n.set(r,e));for(let[i,a]of Object.entries(e))if(!i.startsWith(`$`)){if(DF(a))r[i]=YF(a,t,n);else if(OF(a))r[i]=t(r,i,a.$refNode,a.$refText,a);else if(Array.isArray(a)){let e=[];for(let o of a)DF(o)?e.push(YF(o,t,n)):OF(o)?e.push(t(r,i,o.$refNode,o.$refText,o)):e.push(o);r[i]=e}else r[i]=a}return LF(r,{deep:!0}),r}function XF(e){return pH.isInstance(e,hV.$type)}function ZF(e){return pH.isInstance(e,gV.$type)}function _Ke(e){return pH.isInstance(e,_V.$type)}function vKe(e){return pH.isInstance(e,vV.$type)}function QF(e){return pH.isInstance(e,yV.$type)}function $F(e){return pH.isInstance(e,bV.$type)}function yKe(e){return pH.isInstance(e,xV.$type)}function eI(e){return pH.isInstance(e,SV.$type)}function tI(e){return pH.isInstance(e,CV.$type)}function nI(e){return pH.isInstance(e,wV.$type)}function rI(e){return pH.isInstance(e,TV.$type)}function bKe(e){return pH.isInstance(e,EV.$type)}function iI(e){return pH.isInstance(e,DV.$type)}function aI(e){return pH.isInstance(e,OV.$type)}function oI(e){return pH.isInstance(e,kV.$type)}function sI(e){return pH.isInstance(e,AV.$type)}function xKe(e){return pH.isInstance(e,jV.$type)}function SKe(e){return pH.isInstance(e,MV.$type)}function cI(e){return pH.isInstance(e,NV.$type)}function lI(e){return pH.isInstance(e,PV.$type)}function uI(e){return pH.isInstance(e,FV.$type)}function CKe(e){return pH.isInstance(e,IV.$type)}function wKe(e){return pH.isInstance(e,LV.$type)}function dI(e){return pH.isInstance(e,RV.$type)}function fI(e){return pH.isInstance(e,zV.$type)}function TKe(e){return pH.isInstance(e,BV.$type)}function pI(e){return pH.isInstance(e,VV.$type)}function mI(e){return pH.isInstance(e,HV.$type)}function EKe(e){return pH.isInstance(e,UV.$type)}function DKe(e){return pH.isInstance(e,WV.$type)}function hI(e){return pH.isInstance(e,GV.$type)}function gI(e){return pH.isInstance(e,KV.$type)}function _I(e){return pH.isInstance(e,qV.$type)}function vI(e){return pH.isInstance(e,JV.$type)}function yI(e){return pH.isInstance(e,YV.$type)}function bI(e){return pH.isInstance(e,XV.$type)}function xI(e){return pH.isInstance(e,ZV.$type)}function OKe(e){return pH.isInstance(e,QV.$type)}function SI(e){return pH.isInstance(e,$V.$type)}function kKe(e){return pH.isInstance(e,eH.$type)}function CI(e){return pH.isInstance(e,tH.$type)}function wI(e){return pH.isInstance(e,nH.$type)}function TI(e){return pH.isInstance(e,rH.$type)}function EI(e){return pH.isInstance(e,iH.$type)}function AKe(e){return pH.isInstance(e,aH.$type)}function jKe(e){return pH.isInstance(e,oH.$type)}function DI(e){return pH.isInstance(e,sH.$type)}function OI(e){return pH.isInstance(e,cH.$type)}function kI(e){return pH.isInstance(e,lH.$type)}function MKe(e){return pH.isInstance(e,uH.$type)}function AI(e){return pH.isInstance(e,dH.$type)}function NKe(e){let t=e,n=!1;for(;t;){let e=RF(t.grammarSource,gI);if(e&&e.dataType)t=t.container,n=!0;else if(n)return t;else return}}function jI(e){return new dV(e,e=>MF(e)?e.content:[],{includeRoot:!0})}function PKe(e){return jI(e).filter(NF)}function MI(e,t){for(;e.container;)if(e=e.container,e===t)return!0;return!1}function NI(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function PI(e){if(!e)return;let{offset:t,end:n,range:r}=e;return{range:r,offset:t,end:n,length:n-t}}function FI(e,t){if(e.end.line<t.start.line||e.end.line===t.start.line&&e.end.character<=t.start.character)return mH.Before;if(e.start.line>t.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character)return mH.After;let n=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,r=e.end.line<t.end.line||e.end.line===t.end.line&&e.end.character<=t.end.character;return n&&r?mH.Inside:n?mH.OverlapBack:r?mH.OverlapFront:mH.Outside}function II(e,t){return FI(e,t)>mH.After}function FKe(e,t,n=hH){if(e){if(t>0){let r=t-e.offset,i=e.text.charAt(r);n.test(i)||t--}return zI(e,t)}}function LI(e,t){if(e){let n=HI(e,!0);if(n&&RI(n,t))return n;if(PF(e)){let n=e.content.findIndex(e=>!e.hidden);for(let r=n-1;r>=0;r--){let n=e.content[r];if(RI(n,t))return n}}}}function RI(e,t){return NF(e)&&t.includes(e.tokenType.name)}function zI(e,t){if(NF(e))return e;if(MF(e)){let n=VI(e,t,!1);if(n)return zI(n,t)}}function BI(e,t){if(NF(e))return e;if(MF(e)){let n=VI(e,t,!0);if(n)return BI(n,t)}}function VI(e,t,n){let r=0,i=e.content.length-1,a;for(;r<=i;){let o=Math.floor((r+i)/2),s=e.content[o];if(s.offset<=t&&s.end>t)return s;s.end<=t?(a=n?s:void 0,r=o+1):i=o-1}return a}function HI(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e);for(;r>0;){r--;let e=n.content[r];if(t||!e.hidden)return e}e=n}}function IKe(e,t=!0){for(;e.container;){let n=e.container,r=n.content.indexOf(e),i=n.content.length-1;for(;r<i;){r++;let e=n.content[r];if(t||!e.hidden)return e}e=n}}function LKe(e){if(e.range.start.character===0)return e;let t=e.range.start.line,n=e,r;for(;e.container;){let i=e.container,a=r??i.content.indexOf(e);if(a===0?(e=i,r=void 0):(r=a-1,e=i.content[r]),e.range.start.line!==t)break;n=e}return n}function RKe(e,t){let n=zKe(e,t);return n?n.parent.content.slice(n.a+1,n.b):[]}function zKe(e,t){let n=UI(e),r=UI(t),i;for(let e=0;e<n.length&&e<r.length;e++){let t=n[e],a=r[e];if(t.parent===a.parent)i={parent:t.parent,a:t.index,b:a.index};else break}return i}function UI(e){let t=[];for(;e.container;){let n=e.container,r=n.content.indexOf(e);t.push({parent:n,index:r}),e=n}return t.reverse()}function WI(e,t=`Error: Got unexpected value.`){throw Error(t)}function GI(e,t=`Error: Condition is violated.`){if(!e)throw Error(t)}function KI(e){return e.charCodeAt(0)}function qI(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function JI(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t],e[t]=!0}function YI(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`);return!0}function XI(){throw Error(`Internal Error - Should never get here!`)}function ZI(e){return e.type===`Character`}function BKe(e){try{typeof e!=`string`&&(e=e.source),e=`/${e}/`;let t=EH.pattern(e),n=[];for(let r of t.value.value)DH.reset(e),DH.visit(r),n.push({start:DH.startRegexp,end:DH.endRegex});return n}catch{return[]}}function QI(e){try{return typeof e==`string`&&(e=new RegExp(e)),e=e.toString(),DH.reset(e),DH.visit(EH.pattern(e)),DH.multiline}catch{return!1}}function $I(e){let t=typeof e==`string`?new RegExp(e):e;return OH.some(e=>t.test(e))}function eL(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function tL(e,t){let n=nL(e),r=t.match(n);return!!r&&r[0].length>0}function nL(e){typeof e==`string`&&(e=new RegExp(e));let t=e,n=e.source,r=0;function i(){let e=``,a;function o(t){e+=n.substr(r,t),r+=t}Q(o,`appendRaw`);function s(t){e+=`(?:`+n.substr(r,t)+`|$)`,r+=t}for(Q(s,`appendOptional`);r<n.length;)switch(n[r]){case`\\`:switch(n[r+1]){case`c`:s(3);break;case`x`:s(4);break;case`u`:t.unicode?n[r+2]===`{`?s(n.indexOf(`}`,r)-r+1):s(6):s(2);break;case`p`:case`P`:t.unicode?s(n.indexOf(`}`,r)-r+1):s(2);break;case`k`:s(n.indexOf(`>`,r)-r+1);break;default:s(2)}break;case`[`:a=/\[(?:\\.|.)*?\]/g,a.lastIndex=r,a=a.exec(n)||[],s(a[0].length);break;case`|`:case`^`:case`$`:case`*`:case`+`:case`?`:o(1);break;case`{`:a=/\{\d+,?\d*\}/g,a.lastIndex=r,a=a.exec(n),a?o(a[0].length):s(1);break;case`(`:if(n[r+1]===`?`)switch(n[r+2]){case`:`:e+=`(?:`,r+=3,e+=i()+`|$)`;break;case`=`:e+=`(?=`,r+=3,e+=i()+`)`;break;case`!`:a=r,r+=3,i(),e+=n.substr(a,r-a);break;case`<`:switch(n[r+3]){case`=`:case`!`:a=r,r+=4,i(),e+=n.substr(a,r-a);break;default:o(n.indexOf(`>`,r)-r+1),e+=i()+`|$)`}}else o(1),e+=i()+`|$)`;break;case`)`:return++r,e;default:s(1)}return e}return Q(i,`process`),new RegExp(i(),e.flags)}function rL(e){return e.rules.find(e=>gI(e)&&e.entry)}function iL(e){return e.rules.filter(e=>wI(e)&&e.hidden)}function aL(e,t){let n=new Set,r=rL(e);if(!r)return new Set(e.rules);let i=[r].concat(iL(e));for(let e of i)oL(e,n,t);let a=new Set;for(let t of e.rules)(n.has(t.name)||wI(t)&&t.hidden)&&a.add(t);return a}function oL(e,t,n){t.add(e.name),UF(e).forEach(e=>{if(bI(e)||n&&TI(e)){let r=e.rule.ref;r&&!t.has(r.name)&&oL(r,t,n)}})}function VKe(e){let t=new Set;return UF(e).forEach(e=>{aI(e)&&(gI(e.type.ref)&&t.add(e.type.ref),lI(e.type.ref)&&gI(e.type.ref.$container)&&t.add(e.type.ref.$container))}),t}function sL(e){if(e.terminal)return e.terminal;if(e.type.ref)return hL(e.type.ref)?.terminal}function cL(e){return e.hidden&&!$I(TL(e))}function lL(e,t){return!e||!t?[]:dL(e,t,e.astNode,!0)}function uL(e,t,n){if(!e||!t)return;let r=dL(e,t,e.astNode,!0);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function dL(e,t,n,r){if(!r){let n=RF(e.grammarSource,tI);if(n&&n.feature===t)return[e]}return MF(e)&&e.astNode===n?e.content.flatMap(e=>dL(e,t,n,!1)):[]}function HKe(e,t){return e?pL(e,t,e?.astNode):[]}function fL(e,t,n){if(!e)return;let r=pL(e,t,e?.astNode);if(r.length!==0)return n=n===void 0?0:Math.max(0,Math.min(n,r.length-1)),r[n]}function pL(e,t,n){if(e.astNode!==n)return[];if(fI(e.grammarSource)&&e.grammarSource.value===t)return[e];let r=jI(e).iterator(),i,a=[];do if(i=r.next(),!i.done){let e=i.value;e.astNode===n?fI(e.grammarSource)&&e.grammarSource.value===t&&a.push(e):r.prune()}while(!i.done);return a}function mL(e){let t=e.astNode;for(;t===e.container?.astNode;){let t=RF(e.grammarSource,tI);if(t)return t;e=e.container}}function hL(e){let t=e;return lI(t)&&(QF(t.$container)?t=t.$container.$container:ZF(t.$container)?t=t.$container:WI(t.$container)),gL(e,t,new Map)}function gL(e,t,n){function r(t,r){let i;return RF(t,tI)||(i=gL(r,r,n)),n.set(e,i),i}if(Q(r,`go`),n.has(e))return n.get(e);n.set(e,void 0);for(let i of UF(t))if(tI(i)&&i.feature.toLowerCase()===`name`)return n.set(e,i),i;else if(bI(i)&&gI(i.rule.ref))return r(i,i.rule.ref);else if(xI(i)&&i.typeRef?.ref)return r(i,i.typeRef.ref)}function _L(e){let t=e.$container;if(cI(t)){let n=t.elements,r=n.indexOf(e);for(let e=r-1;e>=0;e--){let t=n[e];if(QF(t))return t;{let t=UF(n[e]).find(QF);if(t)return t}}}if(XF(t))return _L(t)}function UKe(e,t){return e===`?`||e===`*`||cI(t)&&!!t.guardCondition}function WKe(e){return e===`*`||e===`+`}function GKe(e){return e===`+=`}function vL(e){return yL(e,new Set)}function yL(e,t){if(t.has(e))return!0;t.add(e);for(let n of UF(e))if(bI(n)){if(!n.rule.ref||gI(n.rule.ref)&&!yL(n.rule.ref,t)||uI(n.rule.ref))return!1}else if(tI(n))return!1;else if(QF(n))return!1;return!!e.definition}function KKe(e){return bL(e.type,new Set)}function bL(e,t){if(t.has(e))return!0;if(t.add(e),eI(e)||_I(e))return!1;if(DI(e))return e.types.every(e=>bL(e,t));if(xI(e)){if(e.primitiveType!==void 0||e.stringType!==void 0)return!0;if(e.typeRef!==void 0){let n=e.typeRef.ref;return EI(n)?bL(n.type,t):!1}return!1}return!1}function xL(e){if(!wI(e)){if(e.inferredType)return e.inferredType.name;if(e.dataType)return e.dataType;if(e.returnType){let t=e.returnType.ref;if(t)return t.name}}}function SL(e){if(ZF(e))return gI(e)&&vL(e)?e.name:xL(e)??e.name;if(dI(e)||EI(e)||yI(e))return e.name;if(QF(e)){let t=CL(e);if(t)return t}else if(lI(e))return e.name;throw Error(`Cannot get name of Unknown Type`)}function CL(e){if(e.inferredType)return e.inferredType.name;if(e.type?.ref)return SL(e.type.ref)}function qKe(e){return wI(e)?e.type?.name??`string`:gI(e)&&vL(e)?e.name:xL(e)??e.name}function wL(e){return wI(e)?e.type?.name??`string`:xL(e)??e.name}function TL(e){let t={s:!1,i:!1,u:!1},n=EL(e.definition,t),r=Object.entries(t).filter(([,e])=>e).map(([e])=>e).join(``);return new RegExp(n,r)}function EL(e,t){if(SI(e))return JKe(e);if(CI(e))return YKe(e);if(rI(e))return QKe(e);if(TI(e)){let t=e.rule.ref;if(!t)throw Error(`Missing rule reference.`);return OL(EL(t.definition),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}if(pI(e))return ZKe(e);if(kI(e))return XKe(e);if(vI(e)){let n=e.regex.lastIndexOf(`/`),r=e.regex.substring(1,n),i=e.regex.substring(n+1);return t&&(t.i=i.includes(`i`),t.s=i.includes(`s`),t.u=i.includes(`u`)),OL(r,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}if(AI(e))return OL(kH,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized});throw Error(`Invalid terminal element: ${e?.$type}, ${e?.$cstNode?.text}`)}function JKe(e){return OL(e.elements.map(e=>EL(e)).join(`|`),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function YKe(e){return OL(e.elements.map(e=>EL(e)).join(``),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function XKe(e){return OL(`${kH}*?${EL(e.terminal)}`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function ZKe(e){return OL(`(?!${EL(e.terminal)})${kH}*?`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized})}function QKe(e){return e.right?OL(`[${DL(e.left)}-${DL(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1}):OL(DL(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,parenthesized:e.parenthesized,wrap:!1})}function DL(e){return eL(e.value)}function OL(e,t){return(t.parenthesized||t.lookahead||t.wrap!==!1)&&(e=`(${t.lookahead??(t.parenthesized?``:`?:`)}${e})`),t.cardinality?`${e}${t.cardinality}`:e}function kL(e){let t=[],n=e.Grammar;for(let e of n.rules)wI(e)&&cL(e)&&QI(TL(e))&&t.push(e.name);return{multilineCommentRules:t,nameRegexp:hH}}function $Ke(e){var t=s4e.call(e,PH),n=e[PH];try{e[PH]=void 0;var r=!0}catch{}var i=c4e.call(e);return r&&(t?e[PH]=n:delete e[PH]),i}function eqe(e){return u4e.call(e)}function tqe(e){return e==null?e===void 0?p4e:f4e:FH&&FH in Object(e)?l4e(e):d4e(e)}function nqe(e){return typeof e==`object`&&!!e}function rqe(e){return typeof e==`symbol`||LH(e)&&IH(e)==m4e}function iqe(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function AL(e){if(typeof e==`string`)return e;if(BH(e))return zH(e,AL)+``;if(RH(e))return HH?HH.call(e):``;var t=e+``;return t==`0`&&1/e==-h4e?`-0`:t}function aqe(e){for(var t=e.length;t--&&_4e.test(e.charAt(t)););return t}function oqe(e){return e&&e.slice(0,v4e(e)+1).replace(y4e,``)}function sqe(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function cqe(e){if(typeof e==`number`)return e;if(RH(e))return WH;if(UH(e)){var t=typeof e.valueOf==`function`?e.valueOf():e;e=UH(t)?t+``:t}if(typeof e!=`string`)return e===0?e:+e;e=b4e(e);var n=S4e.test(e);return n||C4e.test(e)?w4e(e.slice(2),n?2:8):x4e.test(e)?WH:+e}function lqe(e){return e?(e=T4e(e),e===GH||e===-GH?(e<0?-1:1)*E4e:e===e?e:0):e===0?e:0}function uqe(e){var t=D4e(e),n=t%1;return t===t?n?t-n:t:0}function dqe(e){return e}function fqe(e){if(!UH(e))return!1;var t=IH(e);return t==k4e||t==A4e||t==O4e||t==j4e}function pqe(e){return!!XH&&XH in e}function mqe(e){if(e!=null){try{return N4e.call(e)}catch{}try{return e+``}catch{}}return``}function hqe(e){return!UH(e)||M4e(e)?!1:(JH(e)?B4e:F4e).test(ZH(e))}function gqe(e,t){return e?.[t]}function _qe(e,t){var n=H4e(e,t);return V4e(n)?n:void 0}function vqe(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function yqe(){}function bqe(e,t){var n=-1,r=e.length;for(t||=Array(r);++n<r;)t[n]=e[n];return t}function xqe(e){var t=0,n=0;return function(){var r=J4e(),i=q4e-(r-n);if(n=r,i>0){if(++t>=K4e)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Sqe(e){return function(){return e}}function Cqe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function wqe(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Tqe(e){return e!==e}function Eqe(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function Dqe(e,t,n){return t===t?$4e(e,t,n):iU(e,Q4e,n)}function Oqe(e,t){return!!(e!=null&&e.length)&&aU(e,t,0)>-1}function kqe(e,t){var n=typeof e;return t??=e3e,!!t&&(n==`number`||n!=`symbol`&&t3e.test(e))&&e>-1&&e%1==0&&e<t}function Aqe(e,t,n){t==`__proto__`&&nU?nU(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function jqe(e,t){return e===t||e!==e&&t!==t}function Mqe(e,t,n){var r=e[t];(!(n3e.call(e,t)&&lU(r,n))||n===void 0&&!(t in e))&&cU(e,t,n)}function Nqe(e,t,n,r){var i=!n;n||={};for(var a=-1,o=t.length;++a<o;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),i?cU(n,s,l):uU(n,s,l)}return n}function Pqe(e,t,n){return t=fU(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,a=fU(r.length-t,0),o=Array(a);++i<a;)o[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(o),W4e(e,this,s)}}function Fqe(e,t){return Z4e(r3e(e,t,qH),e+``)}function Iqe(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=i3e}function Lqe(e){return e!=null&&mU(e.length)&&!JH(e)}function Rqe(e,t,n){if(!UH(n))return!1;var r=typeof t;return(r==`number`?hU(n)&&sU(t,n.length):r==`string`&&t in n)?lU(n[t],e):!1}function zqe(e){return pU(function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:void 0,o=i>2?n[2]:void 0;for(a=e.length>3&&typeof a==`function`?(i--,a):void 0,o&&gU(n[0],n[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,a)}return t})}function Bqe(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||o3e)}function Vqe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Hqe(e){return LH(e)&&IH(e)==c3e}function Uqe(){return!1}function Wqe(e){return LH(e)&&mU(e.length)&&!!TU[IH(e)]}function Gqe(e){return function(t){return e(t)}}function Kqe(e,t){var n=BH(e),r=!n&&bU(e),i=!n&&!r&&wU(e),a=!n&&!r&&!i&&MU(e),o=n||r||i||a,s=o?s3e(e.length,String):[],l=s.length;for(var u in e)(t||L3e.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||sU(u,l)))&&s.push(u);return s}function qqe(e,t){return function(n){return e(t(n))}}function Jqe(e){if(!_U(e))return R3e(e);var t=[];for(var n in Object(e))z3e.call(e,n)&&n!=`constructor`&&t.push(n);return t}function Yqe(e){return hU(e)?NU(e):FU(e)}function Xqe(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}function Zqe(e){if(!UH(e))return V3e(e);var t=_U(e),n=[];for(var r in e)r==`constructor`&&(t||!H3e.call(e,r))||n.push(r);return n}function Qqe(e){return hU(e)?NU(e,!0):U3e(e)}function $qe(e,t){if(BH(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||RH(e)?!0:G3e.test(e)||!W3e.test(e)||t!=null&&e in Object(t)}function eJe(){this.__data__=BU?BU(null):{},this.size=0}function tJe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function nJe(e){var t=this.__data__;if(BU){var n=t[e];return n===J3e?void 0:n}return Y3e.call(t,e)?t[e]:void 0}function rJe(e){var t=this.__data__;return BU?t[e]!==void 0:Z3e.call(t,e)}function iJe(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=BU&&t===void 0?$3e:t,this}function jL(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function aJe(){this.__data__=[],this.size=0}function oJe(e,t){for(var n=e.length;n--;)if(lU(e[n][0],t))return n;return-1}function sJe(e){var t=this.__data__,n=HU(t,e);return n<0?!1:(n==t.length-1?t.pop():n6e.call(t,n,1),--this.size,!0)}function cJe(e){var t=this.__data__,n=HU(t,e);return n<0?void 0:t[n][1]}function lJe(e){return HU(this.__data__,e)>-1}function uJe(e,t){var n=this.__data__,r=HU(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function ML(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function dJe(){this.size=0,this.__data__={hash:new VU,map:new(WU||UU),string:new VU}}function fJe(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function pJe(e,t){var n=e.__data__;return c6e(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function mJe(e){var t=GU(this,e).delete(e);return this.size-=+!!t,t}function hJe(e){return GU(this,e).get(e)}function gJe(e){return GU(this,e).has(e)}function _Je(e,t){var n=GU(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function NL(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function PL(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(p6e);var n=Q(function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o},`memoized`);return n.cache=new(PL.Cache||KU),n}function vJe(e){var t=m6e(e,function(e){return n.size===h6e&&n.clear(),e}),n=t.cache;return t}function yJe(e){return e==null?``:g4e(e)}function bJe(e,t){return BH(e)?e:zU(e,t)?[e]:y6e(b6e(e))}function xJe(e){if(typeof e==`string`||RH(e))return e;var t=e+``;return t==`0`&&1/e==-x6e?`-0`:t}function SJe(e,t){t=qU(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[JU(t[n++])];return n&&n==r?e:void 0}function CJe(e,t,n){var r=e==null?void 0:YU(e,t);return r===void 0?n:r}function wJe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function TJe(e){return BH(e)||bU(e)||!!(ZU&&e&&e[ZU])}function FL(e,t,n,r,i){var a=-1,o=e.length;for(n||=C6e,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?FL(s,t-1,n,r,i):XU(i,s):r||(i[i.length]=s)}return i}function EJe(e){return e!=null&&e.length?QU(e,1):[]}function DJe(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function OJe(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function kJe(){this.__data__=new UU,this.size=0}function AJe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function jJe(e){return this.__data__.get(e)}function MJe(e){return this.__data__.has(e)}function NJe(e,t){var n=this.__data__;if(n instanceof UU){var r=n.__data__;if(!WU||r.length<k6e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new KU(r)}return n.set(e,t),this.size=n.size,this}function IL(e){var t=this.__data__=new UU(e);this.size=t.size}function PJe(e,t){return e&&dU(t,IU(t),e)}function FJe(e,t){return e&&dU(t,RU(t),e)}function IJe(e,t){if(t)return e.slice();var n=e.length,r=oW?oW(n):new e.constructor(n);return e.copy(r),r}function LJe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function RJe(){return[]}function zJe(e,t){return dU(e,uW(e),t)}function BJe(e,t){return dU(e,dW(e),t)}function VJe(e,t,n){var r=t(e);return BH(e)?r:XU(r,n(e))}function HJe(e){return fW(e,IU,uW)}function UJe(e){return fW(e,RU,dW)}function WJe(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]==`string`&&U6e.call(e,`index`)&&(n.index=e.index,n.input=e.input),n}function GJe(e){var t=new e.constructor(e.byteLength);return new TW(t).set(new TW(e)),t}function KJe(e,t){var n=t?EW(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}function qJe(e){var t=new e.constructor(e.source,K6e.exec(e));return t.lastIndex=e.lastIndex,t}function JJe(e){return OW?Object(OW.call(e)):{}}function YJe(e,t){var n=t?EW(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function XJe(e,t,n){var r=e.constructor;switch(t){case i8e:return EW(e);case X6e:case Z6e:return new r(+e);case a8e:return G6e(e,n);case o8e:case s8e:case c8e:case l8e:case u8e:case d8e:case f8e:case p8e:case m8e:return Y6e(e,n);case Q6e:return new r;case $6e:case n8e:return new r(e);case e8e:return q6e(e);case t8e:return new r;case r8e:return J6e(e)}}function ZJe(e){return typeof e.constructor==`function`&&!_U(e)?U4e(eW(e)):{}}function QJe(e){return LH(e)&&wW(e)==_8e}function $Je(e){return LH(e)&&wW(e)==b8e}function LL(e,t,n,r,i,a){var o,s=t&C8e,l=t&w8e,u=t&T8e;if(n&&(o=i?n(e,r,i,a):n(e)),o!==void 0)return o;if(!UH(e))return e;var d=BH(e);if(d){if(o=W6e(e),!s)return G4e(e,o)}else{var f=wW(e),p=f==MW||f==A8e;if(wU(e))return N6e(e,s);if(f==NW||f==jW||p&&!i){if(o=l||p?{}:g8e(e),!s)return l?I6e(e,M6e(o,e)):F6e(e,j6e(o,e))}else{if(!PW[f])return i?e:{};o=h8e(e,f,s)}}a||=new nW;var m=a.get(e);if(m)return m;a.set(e,o),S8e(e)?e.forEach(function(r){o.add(LL(r,t,n,r,e,a))}):y8e(e)&&e.forEach(function(r,i){o.set(i,LL(r,t,n,i,e,a))});var h=d?void 0:(u?l?mW:pW:l?RU:IU)(e);return rU(h||e,function(r,i){h&&(i=r,r=e[i]),uU(o,i,LL(r,t,n,i,e,a))}),o}function eYe(e){return Y8e(e,FW)}function tYe(e){for(var t=-1,n=e==null?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}function nYe(e){return this.__data__.set(e,X8e),this}function rYe(e){return this.__data__.has(e)}function RL(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new KU;++t<n;)this.add(e[t])}function iYe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function aYe(e,t){return e.has(t)}function oYe(e,t,n,r,i,a){var o=n&$8e,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&e5e?new RW:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],g=t[f];if(r)var _=o?r(g,h,f,t,e,a):r(h,g,f,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!zW(t,function(e,t){if(!BW(m,t)&&(h===e||i(h,e,n,r,a)))return m.push(t)})){p=!1;break}}else if(!(h===g||i(h,g,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function sYe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function cYe(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function lYe(e,t,n,r,i,a,o){switch(n){case m5e:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case p5e:return!(e.byteLength!=t.byteLength||!a(new TW(e),new TW(t)));case i5e:case a5e:case c5e:return lU(+e,+t);case o5e:return e.name==t.name&&e.message==t.message;case l5e:case d5e:return e==t+``;case s5e:var s=t5e;case u5e:var l=r&n5e;if(s||=HW,e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=r5e,o.set(e,t);var d=VW(s(e),s(t),r,i,a,o);return o.delete(e),d;case f5e:if(WW)return WW.call(e)==WW.call(t)}return!1}function uYe(e,t,n,r,i,a){var o=n&g5e,s=pW(e),l=s.length;if(l!=pW(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:_5e.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++u<l;){d=s[u];var g=e[d],_=t[d];if(r)var v=o?r(_,g,d,t,e,a):r(g,_,d,e,t,a);if(!(v===void 0?g===_||i(g,_,n,r,a):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(t),m}function dYe(e,t,n,r,i,a){var o=BH(e),s=BH(t),l=o?KW:wW(e),u=s?KW:wW(t);l=l==GW?qW:l,u=u==GW?qW:u;var d=l==qW,f=u==qW,p=l==u;if(p&&wU(e)){if(!wU(t))return!1;o=!0,d=!1}if(p&&!d)return a||=new nW,o||MU(e)?VW(e,t,n,r,i,a):h5e(e,t,l,n,r,i,a);if(!(n&y5e)){var m=d&&JW.call(e,`__wrapped__`),h=f&&JW.call(t,`__wrapped__`);if(m||h){var g=m?e.value():e,_=h?t.value():t;return a||=new nW,i(g,_,n,r,a)}}return p?(a||=new nW,v5e(e,t,n,r,i,a)):!1}function zL(e,t,n,r,i){return e===t?!0:e==null||t==null||!LH(e)&&!LH(t)?e!==e&&t!==t:b5e(e,t,n,r,zL,i)}function fYe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],d=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new nW;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?YW(d,u,x5e|S5e,r,f):p))return!1}}return!0}function pYe(e){return e===e&&!UH(e)}function mYe(e){for(var t=IU(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,XW(i)]}return t}function hYe(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function gYe(e){var t=w5e(e);return t.length==1&&t[0][2]?ZW(t[0][0],t[0][1]):function(n){return n===e||C5e(n,e,t)}}function _Ye(e,t){return e!=null&&t in Object(e)}function vYe(e,t,n){t=qU(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=JU(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&mU(i)&&sU(o,i)&&(BH(e)||bU(e)))}function yYe(e,t){return e!=null&&QW(e,t,E5e)}function bYe(e,t){return zU(e)&&XW(t)?ZW(JU(e),t):function(n){var r=S6e(n,e);return r===void 0&&r===t?D5e(n,e):YW(t,r,O5e|k5e)}}function xYe(e){return function(t){return t?.[e]}}function SYe(e){return function(t){return YU(t,e)}}function CYe(e){return zU(e)?j5e(JU(e)):M5e(e)}function wYe(e){return typeof e==`function`?e:e==null?qH:typeof e==`object`?BH(e)?A5e(e[0],e[1]):T5e(e):N5e(e)}function TYe(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function EYe(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}function DYe(e,t){return e&&F5e(e,t,IU)}function OYe(e,t){return function(n,r){if(n==null)return n;if(!hU(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function kYe(e,t,n,r){return eG(e,function(e,i,a){t(r,e,n(e),a)}),r}function AYe(e,t){return function(n,r){var i=BH(n)?P5e:L5e,a=t?t():{};return i(n,e,$W(r,2),a)}}function jYe(e){return LH(e)&&hU(e)}function MYe(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function NYe(e,t,n,r){var i=-1,a=oU,o=!0,s=e.length,l=[],u=t.length;if(!s)return l;n&&(t=zH(t,EU(n))),r?(a=iG,o=!1):t.length>=B5e&&(a=BW,o=!1,t=new RW(t));outer:for(;++i<s;){var d=e[i],f=n==null?d:n(d);if(d=r||d!==0?d:0,o&&f===f){for(var p=u;p--;)if(t[p]===f)continue outer;l.push(d)}else a(t,f,r)||l.push(d)}return l}function PYe(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function FYe(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===void 0?1:KH(t),tW(e,t<0?0:t,r)):[]}function IYe(e,t,n){var r=e==null?0:e.length;return r?(t=n||t===void 0?1:KH(t),t=r-t,tW(e,0,t<0?0:t)):[]}function LYe(e){return typeof e==`function`?e:qH}function RYe(e,t){return(BH(e)?rU:eG)(e,H5e(t))}function zYe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function BYe(e,t){var n=!0;return eG(e,function(e,r,i){return n=!!t(e,r,i),n}),n}function VYe(e,t,n){var r=BH(e)?U5e:W5e;return n&&gU(e,t,n)&&(t=void 0),r(e,$W(t,3))}function HYe(e,t){var n=[];return eG(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function UYe(e,t){return(BH(e)?sW:dG)(e,$W(t,3))}function WYe(e){return function(t,n,r){var i=Object(t);if(!hU(t)){var a=$W(n,3);t=IU(t),n=Q(function(e){return a(i[e],e,i)},`predicate`)}var o=e(t,n,r);return o>-1?i[a?t[o]:o]:void 0}}function GYe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:KH(n);return i<0&&(i=K5e(r+i,0)),iU(e,$W(t,3),i)}function KYe(e){return e&&e.length?e[0]:void 0}function qYe(e,t){var n=-1,r=hU(e)?Array(e.length):[];return eG(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function JYe(e,t){return(BH(e)?zH:q5e)(e,$W(t,3))}function YYe(e,t){return QU(hG(e,t),1)}function XYe(e,t){return e!=null&&X5e.call(e,t)}function ZYe(e,t){return e!=null&&QW(e,t,Z5e)}function QYe(e){return typeof e==`string`||!BH(e)&&LH(e)&&IH(e)==Q5e}function $Ye(e,t){return zH(t,function(t){return e[t]})}function eXe(e){return e==null?[]:$5e(e,IU(e))}function tXe(e,t,n,r){e=hU(e)?e:yG(e),n=n&&!r?KH(n):0;var i=e.length;return n<0&&(n=e7e(i+n,0)),vG(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&aU(e,t,n)>-1}function nXe(e,t,n){var r=e==null?0:e.length;if(!r)return-1;var i=n==null?0:KH(n);return i<0&&(i=t7e(r+i,0)),aU(e,t,i)}function rXe(e){if(e==null)return!0;if(hU(e)&&(BH(e)||typeof e==`string`||typeof e.splice==`function`||wU(e)||MU(e)||bU(e)))return!e.length;var t=wW(e);if(t==n7e||t==r7e)return!e.size;if(_U(e))return!FU(e).length;for(var n in e)if(i7e.call(e,n))return!1;return!0}function iXe(e){return LH(e)&&IH(e)==a7e}function aXe(e){return e===void 0}function oXe(e){if(typeof e!=`function`)throw TypeError(s7e);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function sXe(e,t,n,r){if(!UH(e))return e;t=qU(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var l=JU(t[i]),u=n;if(l===`__proto__`||l===`constructor`||l===`prototype`)return e;if(i!=o){var d=s[l];u=r?r(d,l,s):void 0,u===void 0&&(u=UH(d)?d:sU(t[i+1])?[]:{})}uU(s,l,u),s=s[l]}return e}function cXe(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=YU(e,o);n(s,o)&&l7e(a,qU(o,e),s)}return a}function lXe(e,t){if(e==null)return{};var n=zH(mW(e),function(e){return[e]});return t=$W(t),u7e(e,n,function(e,n){return t(e,n[0])})}function uXe(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function dXe(e,t,n){var r=BH(e)?w6e:d7e,i=arguments.length<3;return r(e,$W(t,4),n,i,eG)}function fXe(e,t){return(BH(e)?sW:dG)(e,c7e($W(t,3)))}function pXe(e,t){var n;return eG(e,function(e,r,i){return n=t(e,r,i),!n}),!!n}function mXe(e,t,n){var r=BH(e)?zW:f7e;return n&&gU(e,t,n)&&(t=void 0),r(e,$W(t,3))}function hXe(e,t,n){var r=-1,i=oU,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=iG;else if(a>=m7e){var u=t?null:p7e(e);if(u)return HW(u);o=!1,i=BW,l=new RW}else l=t?[]:s;outer:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,o&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),s.push(d)}else i(l,f,n)||(l!==s&&l.push(f),s.push(d))}return s}function gXe(e){return e&&e.length?h7e(e):[]}function BL(e){console&&console.error&&console.error(`Error: ${e}`)}function VL(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function HL(e){let t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}function UL(e){function t(){}Q(t,`FakeConstructor`),t.prototype=e;let n=new t;function r(){return typeof n.bar}return Q(r,`fakeAccess`),r(),r(),e}function _Xe(e){return vXe(e)?e.LABEL:e.name}function vXe(e){return vG(e.LABEL)&&e.LABEL!==``}function yXe(e){return hG(e,WL)}function WL(e){function t(e){return hG(e,WL)}if(Q(t,`convertDefinition`),e instanceof MG){let t={type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};return vG(e.label)&&(t.label=e.label),t}if(e instanceof PG)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof FG)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof IG)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof LG)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:WL(new VG({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof zG)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:WL(new VG({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof RG)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof BG)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof VG){let t={type:`Terminal`,name:e.terminalType.name,label:_Xe(e.terminalType),idx:e.idx};vG(e.label)&&(t.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(t.pattern=wG(n)?n.source:n),t}if(e instanceof NG)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`)}function bXe(e){return e instanceof PG||e instanceof FG||e instanceof RG||e instanceof IG||e instanceof LG||e instanceof zG||e instanceof VG||e instanceof NG}function GL(e,t=[]){return e instanceof FG||e instanceof RG||e instanceof zG?!0:e instanceof BG?kG(e.definition,e=>GL(e,t)):e instanceof MG&&bG(t,e)?!1:e instanceof jG&&(e instanceof MG&&t.push(e),uG(e.definition,e=>GL(e,t)))}function xXe(e){return e instanceof BG}function KL(e){if(e instanceof MG)return`SUBRULE`;if(e instanceof FG)return`OPTION`;if(e instanceof BG)return`OR`;if(e instanceof IG)return`AT_LEAST_ONE`;if(e instanceof LG)return`AT_LEAST_ONE_SEP`;if(e instanceof zG)return`MANY_SEP`;if(e instanceof RG)return`MANY`;if(e instanceof VG)return`CONSUME`;throw Error(`non exhaustive match`)}function qL(e,t,n){return[new FG({definition:[new VG({terminalType:e.separator})].concat(e.definition)})].concat(t,n)}function JL(e){if(e instanceof MG)return JL(e.referencedRule);if(e instanceof VG)return wXe(e);if(bXe(e))return SXe(e);if(xXe(e))return CXe(e);throw Error(`non exhaustive match`)}function SXe(e){let t=[],n=e.definition,r=0,i=n.length>r,a,o=!0;for(;i&&o;)a=n[r],o=GL(a),t=t.concat(JL(a)),r+=1,i=n.length>r;return AG(t)}function CXe(e){return AG($U(hG(e.definition,e=>JL(e))))}function wXe(e){return[e.terminalType]}function TXe(e){let t={};return lG(e,e=>{let n=new g7e(e).startWalking();LU(t,n)}),t}function EXe(e,t){return e.name+t+WG}function YL(e){let t=e.toString();if(GG.hasOwnProperty(t))return GG[t];{let e=_7e.pattern(t);return GG[t]=e,e}}function DXe(){GG={}}function OXe(e,t=!1){try{let t=YL(e);return XL(t.value,{},t.flags.ignoreCase)}catch(n){if(n.message===KG)t&&VL(`${qG} Unable to optimize: < ${e.toString()} >1205- Complement Sets cannot be automatically optimized.1206- This will disable the lexer's first char optimizations.1207- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n=``;t&&(n=`1208- This will disable the lexer's first char optimizations.1209- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),BL(`${qG}1210- Failed parsing: < ${e.toString()} >1211- Using the @chevrotain/regexp-to-ast library1212- Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function XL(e,t,n){switch(e.type){case`Disjunction`:for(let r=0;r<e.value.length;r++)XL(e.value[r],t,n);break;case`Alternative`:let r=e.value;for(let e=0;e<r.length;e++){let i=r[e];switch(i.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`Lookbehind`:case`NegativeLookbehind`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}let a=i;switch(a.type){case`Character`:ZL(a.value,t,n);break;case`Set`:if(a.complement===!0)throw Error(KG);lG(a.value,e=>{if(typeof e==`number`)ZL(e,t,n);else{let r=e;if(n===!0)for(let e=r.from;e<=r.to;e++)ZL(e,t,n);else{for(let e=r.from;e<=r.to&&e<ZG;e++)ZL(e,t,n);if(r.to>=ZG){let e=r.from>=ZG?r.from:ZG,n=r.to,i=oR(e),a=oR(n);for(let e=i;e<=a;e++)t[e]=e}}}});break;case`Group`:XL(a.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}let o=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type===`Group`&&$L(a)===!1||a.type!==`Group`&&o===!1)break}break;default:throw Error(`non exhaustive match!`)}return yG(t)}function ZL(e,t,n){let r=oR(e);t[r]=r,n===!0&&kXe(e,t)}function kXe(e,t){let n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){let e=oR(r.charCodeAt(0));t[e]=e}else{let e=n.toLowerCase();if(e!==n){let n=oR(e.charCodeAt(0));t[n]=n}}}function QL(e,t){return pG(e.value,e=>{if(typeof e==`number`)return bG(t,e);{let n=e;return pG(t,e=>n.from<=e&&e<=n.to)!==void 0}})}function $L(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?BH(e.value)?uG(e.value,$L):$L(e.value):!1}function eR(e,t){if(t instanceof RegExp){let n=YL(t),r=new v7e(e);return r.visit(n),r.found}return pG(t,t=>bG(e,t.charCodeAt(0)))!==void 0}function AXe(e,t){t=nG(t,{debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`1213-`],tracer:Q((e,t)=>t(),`tracer`)});let n=t.tracer;n(`initCharCodeToOptimizedIndexMap`,()=>{ZXe()});let r;n(`Reject Lexer.NA`,()=>{r=OG(e,e=>e[JG]===iK.NA)});let i=!1,a;n(`Transform Patterns`,()=>{i=!1,a=hG(r,e=>{let t=e[JG];if(wG(t)){let e=t.source;return e.length===1&&e!==`^`&&e!==`$`&&e!==`.`&&!t.ignoreCase?e:e.length===2&&e[0]===`\\`&&!bG([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],e[1])?e[1]:tR(t)}if(JH(t))return i=!0,{exec:t};if(typeof t==`object`)return i=!0,t;if(typeof t==`string`){if(t.length===1)return t;{let e=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`);return tR(new RegExp(e))}}throw Error(`non exhaustive match`)})});let o,s,l,u,d;n(`misc mapping`,()=>{o=hG(r,e=>e.tokenTypeIdx),s=hG(r,e=>{let t=e.GROUP;if(t!==iK.SKIPPED){if(vG(t))return t;if(TG(t))return!1;throw Error(`non exhaustive match`)}}),l=hG(r,e=>{let t=e.LONGER_ALT;if(t)return BH(t)?hG(t,e=>xG(r,e)):[xG(r,t)]}),u=hG(r,e=>e.PUSH_MODE),d=hG(r,e=>_G(e,`POP_MODE`))});let f;n(`Line Terminator Handling`,()=>{let e=iR(t.lineTerminatorCharacters);f=hG(r,e=>!1),t.positionTracking!==`onlyOffset`&&(f=hG(r,t=>_G(t,`LINE_BREAKS`)?!!t.LINE_BREAKS:rR(t,e)===!1&&eR(e,t.PATTERN)))});let p,m,h,g;n(`Misc Mapping #2`,()=>{p=hG(r,nR),m=hG(a,YXe),h=DG(r,(e,t)=>{let n=t.GROUP;return vG(n)&&n!==iK.SKIPPED&&(e[n]=[]),e},{}),g=hG(a,(e,t)=>({pattern:a[t],longerAlt:l[t],canLineTerminator:f[t],isCustom:p[t],short:m[t],group:s[t],push:u[t],pop:d[t],tokenTypeIdx:o[t],tokenType:r[t]}))});let _=!0,v=[];return t.safeMode||n(`First Char Optimization`,()=>{v=DG(r,(e,n,r)=>{if(typeof n.PATTERN==`string`)aR(e,oR(n.PATTERN.charCodeAt(0)),g[r]);else if(BH(n.START_CHARS_HINT)){let t;lG(n.START_CHARS_HINT,n=>{let i=oR(typeof n==`string`?n.charCodeAt(0):n);t!==i&&(t=i,aR(e,i,g[r]))})}else if(wG(n.PATTERN)){if(n.PATTERN.unicode)_=!1,t.ensureOptimizations&&BL(`${qG} Unable to analyze < ${n.PATTERN.toString()} > pattern.1214- The regexp unicode flag is not currently supported by the regexp-to-ast library.1215- This will disable the lexer's first char optimizations.1216- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let i=OXe(n.PATTERN,t.ensureOptimizations);SG(i)&&(_=!1),lG(i,t=>{aR(e,t,g[r])})}}else t.ensureOptimizations&&BL(`${qG} TokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.1217- This will disable the lexer's first char optimizations.1218- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),_=!1;return e},[])}),{emptyGroups:h,patternIdxToConfig:g,charCodeToPatternIdxToConfig:v,hasCustom:i,canBeOptimized:_}}function jXe(e,t){let n=[],r=NXe(e);n=n.concat(r.errors);let i=PXe(r.valid),a=i.valid;return n=n.concat(i.errors),n=n.concat(MXe(a)),n=n.concat(BXe(a)),n=n.concat(VXe(a,t)),n=n.concat(HXe(a)),n}function MXe(e){let t=[],n=fG(e,e=>wG(e[JG]));return t=t.concat(FXe(n)),t=t.concat(LXe(n)),t=t.concat(RXe(n)),t=t.concat(zXe(n)),t=t.concat(IXe(n)),t}function NXe(e){let t=fG(e,e=>!_G(e,JG));return{errors:hG(t,e=>({message:`Token Type: ->`+e.name+`<- missing static 'PATTERN' property`,type:nK.MISSING_PATTERN,tokenTypes:[e]})),valid:aG(e,t)}}function PXe(e){let t=fG(e,e=>{let t=e[JG];return!wG(t)&&!JH(t)&&!_G(t,`exec`)&&!vG(t)});return{errors:hG(t,e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.`,type:nK.INVALID_PATTERN,tokenTypes:[e]})),valid:aG(e,t)}}function FXe(e){class t extends wH{static{Q(this,`EndAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return hG(fG(e,e=>{let n=e.PATTERN;try{let e=YL(n),r=new t;return r.visit(e),r.found}catch{return y7e.test(n.source)}}),e=>({message:`Unexpected RegExp Anchor Error:1219- Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain end of input anchor '$'1220- See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:nK.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function IXe(e){return hG(fG(e,e=>e.PATTERN.test(``)),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' must not match an empty string`,type:nK.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function LXe(e){class t extends wH{static{Q(this,`StartAnchorFinder`)}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return hG(fG(e,e=>{let n=e.PATTERN;try{let e=YL(n),r=new t;return r.visit(e),r.found}catch{return b7e.test(n.source)}}),e=>({message:`Unexpected RegExp Anchor Error:1221- Token Type: ->`+e.name+`<- static 'PATTERN' cannot contain start of input anchor '^'1222- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:nK.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function RXe(e){return hG(fG(e,e=>{let t=e[JG];return t instanceof RegExp&&(t.multiline||t.global)}),e=>({message:`Token Type: ->`+e.name+`<- static 'PATTERN' may NOT contain global('g') or multiline('m')`,type:nK.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function zXe(e){let t=[],n=hG(e,n=>DG(e,(e,r)=>n.PATTERN.source===r.PATTERN.source&&!bG(t,r)&&r.PATTERN!==iK.NA?(t.push(r),e.push(r),e):e,[]));return n=LW(n),hG(fG(n,e=>e.length>1),e=>{let t=hG(e,e=>e.name);return{message:`The same RegExp pattern ->${mG(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(`, `)} <-`,type:nK.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function BXe(e){return hG(fG(e,e=>{if(!_G(e,`GROUP`))return!1;let t=e.GROUP;return t!==iK.SKIPPED&&t!==iK.NA&&!vG(t)}),e=>({message:`Token Type: ->`+e.name+`<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String`,type:nK.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function VXe(e,t){return hG(fG(e,e=>e.PUSH_MODE!==void 0&&!bG(t,e.PUSH_MODE)),e=>({message:`Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,type:nK.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function HXe(e){let t=[],n=DG(e,(e,t,n)=>{let r=t.PATTERN;return r===iK.NA||(vG(r)?e.push({str:r,idx:n,tokenType:t}):wG(r)&&WXe(r)&&e.push({str:r.source,idx:n,tokenType:t})),e},[]);return lG(e,(e,r)=>{lG(n,({str:n,idx:i,tokenType:a})=>{if(r<i&&UXe(n,e.PATTERN)){let n=`Token: ->${a.name}<- can never be matched.1223-Because it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.1224-See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:n,type:nK.UNREACHABLE_PATTERN,tokenTypes:[e,a]})}})}),t}function UXe(e,t){if(wG(t)){if(GXe(t))return!1;let n=t.exec(e);return n!==null&&n.index===0}if(JH(t))return t(e,0,[],{});if(_G(t,`exec`))return t.exec(e,0,[],{});if(typeof t==`string`)return t===e;throw Error(`non exhaustive match`)}function WXe(e){return pG([`.`,`\\`,`[`,`]`,`|`,`^`,`$`,`(`,`)`,`?`,`*`,`+`,`{`],t=>e.source.indexOf(t)!==-1)===void 0}function GXe(e){return/(\(\?=)|(\(\?!)|(\(\?<=)|(\(\?<!)/.test(e.source)}function tR(e){let t=e.ignoreCase?`iy`:`y`;return RegExp(`${e.source}`,t)}function KXe(e,t,n){let r=[];return _G(e,YG)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+YG+`> property in its definition1225-`,type:nK.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),_G(e,XG)||r.push({message:`A MultiMode Lexer cannot be initialized without a <`+XG+`> property in its definition1226-`,type:nK.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),_G(e,XG)&&_G(e,YG)&&!_G(e.modes,e.defaultMode)&&r.push({message:`A MultiMode Lexer cannot be initialized with a ${YG}: <${e.defaultMode}>which does not exist1227-`,type:nK.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),_G(e,XG)&&lG(e.modes,(e,t)=>{lG(e,(n,i)=>{TG(n)?r.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${t}> at index: <${i}>1228-`,type:nK.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):_G(n,`LONGER_ALT`)&&lG(BH(n.LONGER_ALT)?n.LONGER_ALT:[n.LONGER_ALT],i=>{!TG(i)&&!bG(e,i)&&r.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${n.name}> outside of mode <${t}>1229-`,type:nK.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})})}),r}function qXe(e,t,n){let r=[],i=!1,a=OG(LW($U(yG(e.modes))),e=>e[JG]===iK.NA),o=iR(n);return t&&lG(a,e=>{let t=rR(e,o);if(t!==!1){let n={message:XXe(e,t),type:t.issue,tokenType:e};r.push(n)}else _G(e,`LINE_BREAKS`)?e.LINE_BREAKS===!0&&(i=!0):eR(o,e.PATTERN)&&(i=!0)}),t&&!i&&r.push({message:`Warning: No LINE_BREAKS Found.1230- This Lexer has been defined to track line and column information,1231- But none of the Token Types can be identified as matching a line terminator.1232- See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS 1233- for details.`,type:nK.NO_LINE_BREAKS_FLAGS}),r}function JXe(e){let t={};return lG(IU(e),n=>{let r=e[n];if(BH(r))t[n]=[];else throw Error(`non exhaustive match`)}),t}function nR(e){let t=e.PATTERN;if(wG(t))return!1;if(JH(t)||_G(t,`exec`))return!0;if(vG(t))return!1;throw Error(`non exhaustive match`)}function YXe(e){return vG(e)&&e.length===1?e.charCodeAt(0):!1}function rR(e,t){if(_G(e,`LINE_BREAKS`))return!1;if(wG(e.PATTERN)){try{eR(t,e.PATTERN)}catch(e){return{issue:nK.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(vG(e.PATTERN))return!1;if(nR(e))return{issue:nK.CUSTOM_LINE_BREAK};throw Error(`non exhaustive match`)}function XXe(e,t){if(t.issue===nK.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.1234- The problem is in the <${e.name}> Token Type1235- Root cause: ${t.errMsg}.1236- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===nK.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.1237- The problem is in the <${e.name}> Token Type1238- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}function iR(e){return hG(e,e=>vG(e)?e.charCodeAt(0):e)}function aR(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}function oR(e){return e<ZG?e:QG[e]}function ZXe(){if(SG(QG)){QG=Array(65536);for(let e=0;e<65536;e++)QG[e]=e>255?255+~~(e/255):e}}function sR(e,t){let n=e.tokenTypeIdx;return n===t.tokenTypeIdx||t.isParent===!0&&t.categoryMatchesMap[n]===!0}function cR(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}function lR(e){let t=QXe(e);$Xe(t),tZe(t),eZe(t),lG(t,e=>{e.isParent=e.categoryMatches.length>0})}function QXe(e){let t=IW(e),n=e,r=!0;for(;r;){n=LW($U(hG(n,e=>e.CATEGORIES)));let e=aG(n,t);t=t.concat(e),SG(e)?r=!1:n=e}return t}function $Xe(e){lG(e,e=>{dR(e)||(eK[$G]=e,e.tokenTypeIdx=$G++),fR(e)&&!BH(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),fR(e)||(e.CATEGORIES=[]),nZe(e)||(e.categoryMatches=[]),rZe(e)||(e.categoryMatchesMap={})})}function eZe(e){lG(e,e=>{e.categoryMatches=[],lG(e.categoryMatchesMap,(t,n)=>{e.categoryMatches.push(eK[n].tokenTypeIdx)})})}function tZe(e){lG(e,e=>{uR([],e)})}function uR(e,t){lG(e,e=>{t.categoryMatchesMap[e.tokenTypeIdx]=!0}),lG(t.CATEGORIES,n=>{let r=e.concat(t);bG(r,n)||uR(r,n)})}function dR(e){return _G(e,`tokenTypeIdx`)}function fR(e){return _G(e,`CATEGORIES`)}function nZe(e){return _G(e,`categoryMatches`)}function rZe(e){return _G(e,`categoryMatchesMap`)}function iZe(e){return _G(e,`tokenTypeIdx`)}function pR(e){return mR(e)?e.LABEL:e.name}function mR(e){return vG(e.LABEL)&&e.LABEL!==``}function hR(e){return aZe(e)}function aZe(e){let t=e.pattern,n={};if(n.name=e.name,TG(t)||(n.PATTERN=t),_G(e,S7e))throw`The parent property is no longer supported.1239-See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return _G(e,aK)&&(n.CATEGORIES=e[aK]),lR([n]),_G(e,oK)&&(n.LABEL=e[oK]),_G(e,sK)&&(n.GROUP=e[sK]),_G(e,lK)&&(n.POP_MODE=e[lK]),_G(e,cK)&&(n.PUSH_MODE=e[cK]),_G(e,uK)&&(n.LONGER_ALT=e[uK]),_G(e,dK)&&(n.LINE_BREAKS=e[dK]),_G(e,fK)&&(n.START_CHARS_HINT=e[fK]),n}function gR(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function _R(e,t){return sR(e,t)}function oZe(e,t){let n=new w7e(e,t);return n.resolveRefs(),n.errors}function vR(e,t,n=[]){n=IW(n);let r=[],i=0;function a(t){return t.concat(sG(e,i+1))}Q(a,`remainingPathWith`);function o(e){let i=vR(a(e),t,n);return r.concat(i)}for(Q(o,`getAlternativesForProd`);n.length<t&&i<e.length;){let t=e[i];if(t instanceof PG||t instanceof MG)return o(t.definition);if(t instanceof FG)r=o(t.definition);else if(t instanceof IG)return o(t.definition.concat([new RG({definition:t.definition})]));else if(t instanceof LG)return o([new PG({definition:t.definition}),new RG({definition:[new VG({terminalType:t.separator})].concat(t.definition)})]);else if(t instanceof zG)r=o(t.definition.concat([new RG({definition:[new VG({terminalType:t.separator})].concat(t.definition)})]));else if(t instanceof RG)r=o(t.definition.concat([new RG({definition:t.definition})]));else if(t instanceof BG)return lG(t.definition,e=>{SG(e.definition)===!1&&(r=o(e.definition))}),r;else if(t instanceof VG)n.push(t.terminalType);else throw Error(`non exhaustive match`);i++}return r.push({partialPath:n,suffixDef:sG(e,i)}),r}function yR(e,t,n,r){let i=`EXIT_NONE_TERMINAL`,a=[i],o=`EXIT_ALTERNATIVE`,s=!1,l=t.length,u=l-r-1,d=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!SG(f);){let e=f.pop();if(e===o){s&&oG(f).idx<=u&&f.pop();continue}let r=e.def,p=e.idx,m=e.ruleStack,h=e.occurrenceStack;if(SG(r))continue;let g=r[0];if(g===i){let e={idx:p,def:sG(r),ruleStack:cG(m),occurrenceStack:cG(h)};f.push(e)}else if(g instanceof VG){if(p<l-1){let e=p+1,i=t[e];if(n(i,g.terminalType)){let t={idx:e,def:sG(r),ruleStack:m,occurrenceStack:h};f.push(t)}}else if(p===l-1)d.push({nextTokenType:g.terminalType,nextTokenOccurrence:g.idx,ruleStack:m,occurrenceStack:h}),s=!0;else throw Error(`non exhaustive match`)}else if(g instanceof MG){let e=IW(m);e.push(g.nonTerminalName);let t=IW(h);t.push(g.idx);let n={idx:p,def:g.definition.concat(a,sG(r)),ruleStack:e,occurrenceStack:t};f.push(n)}else if(g instanceof FG){let e={idx:p,def:sG(r),ruleStack:m,occurrenceStack:h};f.push(e),f.push(o);let t={idx:p,def:g.definition.concat(sG(r)),ruleStack:m,occurrenceStack:h};f.push(t)}else if(g instanceof IG){let e=new RG({definition:g.definition,idx:g.idx}),t={idx:p,def:g.definition.concat([e],sG(r)),ruleStack:m,occurrenceStack:h};f.push(t)}else if(g instanceof LG){let e=new RG({definition:[new VG({terminalType:g.separator})].concat(g.definition),idx:g.idx}),t={idx:p,def:g.definition.concat([e],sG(r)),ruleStack:m,occurrenceStack:h};f.push(t)}else if(g instanceof zG){let e={idx:p,def:sG(r),ruleStack:m,occurrenceStack:h};f.push(e),f.push(o);let t=new RG({definition:[new VG({terminalType:g.separator})].concat(g.definition),idx:g.idx}),n={idx:p,def:g.definition.concat([t],sG(r)),ruleStack:m,occurrenceStack:h};f.push(n)}else if(g instanceof RG){let e={idx:p,def:sG(r),ruleStack:m,occurrenceStack:h};f.push(e),f.push(o);let t=new RG({definition:g.definition,idx:g.idx}),n={idx:p,def:g.definition.concat([t],sG(r)),ruleStack:m,occurrenceStack:h};f.push(n)}else if(g instanceof BG)for(let e=g.definition.length-1;e>=0;e--){let t={idx:p,def:g.definition[e].definition.concat(sG(r)),ruleStack:m,occurrenceStack:h};f.push(t),f.push(o)}else if(g instanceof PG)f.push({idx:p,def:g.definition.concat(sG(r)),ruleStack:m,occurrenceStack:h});else if(g instanceof NG)f.push(sZe(g,p,m,h));else throw Error(`non exhaustive match`)}return d}function sZe(e,t,n,r){let i=IW(n);i.push(e.name);let a=IW(r);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}function bR(e){if(e instanceof FG||e===`Option`)return yK.OPTION;if(e instanceof RG||e===`Repetition`)return yK.REPETITION;if(e instanceof IG||e===`RepetitionMandatory`)return yK.REPETITION_MANDATORY;if(e instanceof LG||e===`RepetitionMandatoryWithSeparator`)return yK.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof zG||e===`RepetitionWithSeparator`)return yK.REPETITION_WITH_SEPARATOR;if(e instanceof BG||e===`Alternation`)return yK.ALTERNATION;throw Error(`non exhaustive match`)}function xR(e){let{occurrence:t,rule:n,prodType:r,maxLookahead:i}=e,a=bR(r);return a===yK.ALTERNATION?TR(t,n,i):ER(t,n,a,i)}function cZe(e,t,n,r,i,a){let o=TR(e,t,n);return a(o,r,OR(o)?cR:sR,i)}function lZe(e,t,n,r,i,a){let o=ER(e,t,i,n),s=OR(o)?cR:sR;return a(o[0],s,r)}function uZe(e,t,n,r){let i=e.length,a=uG(e,e=>uG(e,e=>e.length===1));if(t)return function(t){let r=hG(t,e=>e.GATE);for(let t=0;t<i;t++){let i=e[t],a=i.length,o=r[t];if(o===void 0||o.call(this)!==!1)nextPath:for(let e=0;e<a;e++){let r=i[e],a=r.length;for(let e=0;e<a;e++)if(n(this.LA(e+1),r[e])===!1)continue nextPath;return t}}};if(a&&!r){let t=DG(hG(e,e=>$U(e)),(e,t,n)=>(lG(t,t=>{_G(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=n),lG(t.categoryMatches,t=>{_G(e,t)||(e[t]=n)})}),e),{});return function(){let e=this.LA(1);return t[e.tokenTypeIdx]}}return function(){for(let t=0;t<i;t++){let r=e[t],i=r.length;nextPath:for(let e=0;e<i;e++){let i=r[e],a=i.length;for(let e=0;e<a;e++)if(n(this.LA(e+1),i[e])===!1)continue nextPath;return t}}}}function dZe(e,t,n){let r=uG(e,e=>e.length===1),i=e.length;if(r&&!n){let t=$U(e);if(t.length===1&&SG(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=DG(t,(e,t,n)=>(e[t.tokenTypeIdx]=!0,lG(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){nextPath:for(let n=0;n<i;n++){let r=e[n],i=r.length;for(let e=0;e<i;e++)if(t(this.LA(e+1),r[e])===!1)continue nextPath;return!0}return!1}}function SR(e){let t=Array(e);for(let n=0;n<e;n++)t[n]=[];return t}function CR(e){let t=[``];for(let n=0;n<e.length;n++){let r=e[n],i=[];for(let e=0;e<t.length;e++){let n=t[e];i.push(n+`_`+r.tokenTypeIdx);for(let e=0;e<r.categoryMatches.length;e++){let t=`_`+r.categoryMatches[e];i.push(n+t)}}t=i}return t}function fZe(e,t,n){for(let r=0;r<e.length;r++){if(r===n)continue;let i=e[r];for(let e=0;e<t.length;e++)if(i[t[e]]===!0)return!1}return!0}function wR(e,t){let n=hG(e,e=>vR([e],1)),r=SR(n.length),i=hG(n,e=>{let t={};return lG(e,e=>{lG(CR(e.partialPath),e=>{t[e]=!0})}),t}),a=n;for(let e=1;e<=t;e++){let n=a;a=SR(n.length);for(let o=0;o<n.length;o++){let s=n[o];for(let n=0;n<s.length;n++){let l=s[n].partialPath,u=s[n].suffixDef,d=CR(l);if(fZe(i,d,o)||SG(u)||l.length===t){let e=r[o];if(DR(e,l)===!1){e.push(l);for(let e=0;e<d.length;e++){let t=d[e];i[o][t]=!0}}}else{let t=vR(u,e+1,l);a[o]=a[o].concat(t),lG(t,e=>{lG(CR(e.partialPath),e=>{i[o][e]=!0})})}}}}return r}function TR(e,t,n,r){let i=new bK(e,yK.ALTERNATION,r);return t.accept(i),wR(i.result,n)}function ER(e,t,n,r){let i=new bK(e,n);t.accept(i);let a=i.result,o=new k7e(t,e,n).startWalking();return wR([new PG({definition:a}),new PG({definition:o})],r)}function DR(e,t){compareOtherPath:for(let n=0;n<e.length;n++){let r=e[n];if(r.length===t.length){for(let e=0;e<r.length;e++){let n=t[e],i=r[e];if(n!==i&&i.categoryMatchesMap[n.tokenTypeIdx]===void 0)continue compareOtherPath}return!0}}return!1}function pZe(e,t){return e.length<t.length&&uG(e,(e,n)=>{let r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}function OR(e){return uG(e,e=>uG(e,e=>uG(e,e=>SG(e.categoryMatches))))}function mZe(e){return hG(e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),e=>Object.assign({type:JK.CUSTOM_LOOKAHEAD_VALIDATION},e))}function hZe(e,t,n,r){let i=gG(e,e=>gZe(e,n)),a=EZe(e,t,n),o=gG(e,e=>SZe(e,n)),s=gG(e,t=>vZe(t,e,r,n));return i.concat(a,o,s)}function gZe(e,t){let n=new A7e;e.accept(n);let r=n.allProductions;return hG(yG(EG(Y5e(r,_Ze),e=>e.length>1)),n=>{let r=mG(n),i=t.buildDuplicateFoundError(e,n),a=KL(r),o={message:i,type:JK.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:a,occurrence:r.idx},s=kR(r);return s&&(o.parameter=s),o})}function _Ze(e){return`${KL(e)}_#_${e.idx}_#_${kR(e)}`}function kR(e){return e instanceof VG?e.terminalType.name:e instanceof MG?e.nonTerminalName:``}function vZe(e,t,n,r){let i=[];if(DG(t,(t,n)=>n.name===e.name?t+1:t,0)>1){let t=r.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});i.push({message:t,type:JK.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}function yZe(e,t,n){let r=[],i;return bG(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${n}<-as it is not defined in any of the super grammars `,r.push({message:i,type:JK.INVALID_RULE_OVERRIDE,ruleName:e})),r}function AR(e,t,n,r=[]){let i=[],a=jR(t.definition);if(SG(a))return[];{let t=e.name;bG(a,e)&&i.push({message:n.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:r}),type:JK.LEFT_RECURSION,ruleName:t});let o=gG(aG(a,r.concat([e])),t=>{let i=IW(r);return i.push(t),AR(e,t,n,i)});return i.concat(o)}}function jR(e){let t=[];if(SG(e))return t;let n=mG(e);if(n instanceof MG)t.push(n.referencedRule);else if(n instanceof PG||n instanceof FG||n instanceof IG||n instanceof LG||n instanceof zG||n instanceof RG)t=t.concat(jR(n.definition));else if(n instanceof BG)t=$U(hG(n.definition,e=>jR(e.definition)));else if(!(n instanceof VG))throw Error(`non exhaustive match`);let r=GL(n),i=e.length>1;if(r&&i){let n=sG(e);return t.concat(jR(n))}return t}function bZe(e,t){let n=new xK;e.accept(n);let r=n.alternations;return gG(r,n=>gG(cG(n.definition),(r,i)=>SG(yR([r],[],sR,1))?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:n,emptyChoiceIdx:i}),type:JK.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:n.idx,alternative:i+1}]:[]))}function xZe(e,t,n){let r=new xK;e.accept(r);let i=r.alternations;return i=OG(i,e=>e.ignoreAmbiguities===!0),gG(i,r=>{let i=r.idx,a=TR(i,e,r.maxLookahead||t,r),o=wZe(a,r,e,n),s=TZe(a,r,e,n);return o.concat(s)})}function SZe(e,t){let n=new xK;e.accept(n);let r=n.alternations;return gG(r,n=>n.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:n}),type:JK.TOO_MANY_ALTS,ruleName:e.name,occurrence:n.idx}]:[])}function CZe(e,t,n){let r=[];return lG(e,e=>{let i=new j7e;e.accept(i);let a=i.allProductions;lG(a,i=>{let a=bR(i),o=i.maxLookahead||t,s=i.idx,l=ER(s,e,a,o)[0];if(SG($U(l))){let t=n.buildEmptyRepetitionError({topLevelRule:e,repetition:i});r.push({message:t,type:JK.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),r}function wZe(e,t,n,r){let i=[];return hG(DG(e,(n,r,a)=>(t.definition[a].ignoreAmbiguities===!0||lG(r,r=>{let o=[a];lG(e,(e,n)=>{a!==n&&DR(e,r)&&t.definition[n].ignoreAmbiguities!==!0&&o.push(n)}),o.length>1&&!DR(i,r)&&(i.push(r),n.push({alts:o,path:r}))}),n),[]),e=>{let i=hG(e.alts,e=>e+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:JK.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:t.idx,alternatives:e.alts}})}function TZe(e,t,n,r){let i=DG(e,(e,t,n)=>{let r=hG(t,e=>({idx:n,path:e}));return e.concat(r)},[]);return LW(gG(i,e=>{if(t.definition[e.idx].ignoreAmbiguities===!0)return[];let a=e.idx,o=e.path;return hG(fG(i,e=>t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx<a&&pZe(e.path,o)),e=>{let i=[e.idx+1,a+1],o=t.idx===0?``:t.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:i,prefixPath:e.path}),type:JK.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:i}})}))}function EZe(e,t,n){let r=[],i=hG(t,e=>e.name);return lG(e,e=>{let t=e.name;if(bG(i,t)){let i=n.buildNamespaceConflictError(e);r.push({message:i,type:JK.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),r}function DZe(e){let t=nG(e,{errMsgProvider:C7e}),n={};return lG(e.rules,e=>{n[e.name]=e}),oZe(n,t.errMsgProvider)}function OZe(e){return e=nG(e,{errMsgProvider:hK}),hZe(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}function MR(e){return bG(EK,e.name)}function kZe(e,t,n,r,i,a,o){let s=this.getKeyForAutomaticLookahead(r,i),l=this.firstAfterRepMap[s];if(l===void 0){let e=this.getCurrRuleFullName(),t=this.getGAstProductions()[e];l=new a(t,i).startWalking(),this.firstAfterRepMap[s]=l}let u=l.token,d=l.occurrence,f=l.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=pK,d=1),u!==void 0&&d!==void 0&&this.shouldInRepetitionRecoveryBeTried(u,d,o)&&this.tryInRepetitionRecovery(e,t,n,u)}function NR(e,t,n){return n|t|e}function AZe(e){zK.reset(),e.accept(zK);let t=zK.dslMethods;return zK.reset(),t}function PR(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function FR(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function jZe(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}function MZe(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}function IR(e,t){Object.defineProperty(e,V7e,{enumerable:!1,configurable:!0,writable:!1,value:t})}function NZe(e,t){let n=IU(e),r=n.length;for(let i=0;i<r;i++){let r=e[n[i]],a=r.length;for(let e=0;e<a;e++){let n=r[e];n.tokenTypeIdx===void 0&&this[n.name](n.children,t)}}}function PZe(e,t){let n=Q(function(){},`derivedConstructor`);return IR(n,e+`BaseSemantics`),n.prototype={visit:Q(function(e,t){if(BH(e)&&(e=e[0]),!TG(e))return this[e.name](e.children,t)},`visit`),validateVisitor:Q(function(){let e=IZe(this,t);if(!SG(e)){let t=hG(e,e=>e.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:1240- ${t.join(`1241-1242-`).replace(/\n/g,`1243- `)}`)}},`validateVisitor`)},n.prototype.constructor=n,n._RULE_NAMES=t,n}function FZe(e,t,n){let r=Q(function(){},`derivedConstructor`);IR(r,e+`BaseSemanticsWithDefaults`);let i=Object.create(n.prototype);return lG(t,e=>{i[e]=NZe}),r.prototype=i,r.prototype.constructor=r,r}function IZe(e,t){return LZe(e,t)}function LZe(e,t){return LW(hG(fG(t,t=>JH(e[t])===!1),t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:H7e.MISSING_METHOD,methodName:t})))}function LR(e,t,n,r=!1){zR(n);let i=oG(this.recordingProdStack),a=JH(t)?t:t.DEF,o=new e({definition:[],idx:n});return r&&(o.separator=t.SEP),_G(t,`MAX_LOOKAHEAD`)&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),BK}function RZe(e,t){zR(t);let n=oG(this.recordingProdStack),r=BH(e)===!1,i=r===!1?e:e.DEF,a=new BG({definition:[],idx:t,ignoreAmbiguities:r&&e.IGNORE_AMBIGUITIES===!0});return _G(e,`MAX_LOOKAHEAD`)&&(a.maxLookahead=e.MAX_LOOKAHEAD),a.hasPredicates=kG(i,e=>JH(e.GATE)),n.definition.push(a),lG(i,e=>{let t=new PG({definition:[]});a.definition.push(t),_G(e,`IGNORE_AMBIGUITIES`)?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:_G(e,`GATE`)&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),BK}function RR(e){return e===0?``:`${e}`}function zR(e){if(e<0||e>HK){let t=Error(`Invalid DSL Method idx value: <${e}>1244- Idx value must be a none negative value smaller than ${HK+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}function zZe(e,t){t.forEach(t=>{let n=t.prototype;Object.getOwnPropertyNames(n).forEach(r=>{if(r===`constructor`)return;let i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]})})}function BR(e=void 0){return function(){return e}}function BZe(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function VZe(){this.__data__=[],this.size=0}function HZe(e,t){return e===t||e!==e&&t!==t}function UZe(e,t){for(var n=e.length;n--;)if(ZK(e[n][0],t))return n;return-1}function WZe(e){var t=this.__data__,n=QK(t,e);return n<0?!1:(n==t.length-1?t.pop():e9e.call(t,n,1),--this.size,!0)}function GZe(e){var t=this.__data__,n=QK(t,e);return n<0?void 0:t[n][1]}function KZe(e){return QK(this.__data__,e)>-1}function qZe(e,t){var n=this.__data__,r=QK(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function VR(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function JZe(){this.__data__=new $K,this.size=0}function YZe(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function XZe(e){return this.__data__.get(e)}function ZZe(e){return this.__data__.has(e)}function QZe(e){var t=u9e.call(e,iq),n=e[iq];try{e[iq]=void 0;var r=!0}catch{}var i=d9e.call(e);return r&&(t?e[iq]=n:delete e[iq]),i}function $Ze(e){return p9e.call(e)}function eQe(e){return e==null?e===void 0?g9e:h9e:aq&&aq in Object(e)?f9e(e):m9e(e)}function tQe(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)}function nQe(e){if(!sq(e))return!1;var t=oq(e);return t==v9e||t==y9e||t==_9e||t==b9e}function rQe(e){return!!uq&&uq in e}function iQe(e){if(e!=null){try{return S9e.call(e)}catch{}try{return e+``}catch{}}return``}function aQe(e){return!sq(e)||x9e(e)?!1:(cq(e)?k9e:w9e).test(dq(e))}function oQe(e,t){return e?.[t]}function sQe(e,t){var n=j9e(e,t);return A9e(n)?n:void 0}function cQe(){this.__data__=mq?mq(null):{},this.size=0}function lQe(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t}function uQe(e){var t=this.__data__;if(mq){var n=t[e];return n===P9e?void 0:n}return F9e.call(t,e)?t[e]:void 0}function dQe(e){var t=this.__data__;return mq?t[e]!==void 0:L9e.call(t,e)}function fQe(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=mq&&t===void 0?z9e:t,this}function HR(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function pQe(){this.size=0,this.__data__={hash:new hq,map:new(pq||$K),string:new hq}}function mQe(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null}function hQe(e,t){var n=e.__data__;return H9e(t)?n[typeof t==`string`?`string`:`hash`]:n.map}function gQe(e){var t=gq(this,e).delete(e);return this.size-=+!!t,t}function _Qe(e){return gq(this,e).get(e)}function vQe(e){return gq(this,e).has(e)}function yQe(e,t){var n=gq(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function UR(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function bQe(e,t){var n=this.__data__;if(n instanceof $K){var r=n.__data__;if(!pq||r.length<q9e-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new _q(r)}return n.set(e,t),this.size=n.size,this}function WR(e){var t=this.__data__=new $K(e);this.size=t.size}function xQe(e){return this.__data__.set(e,Y9e),this}function SQe(e){return this.__data__.has(e)}function GR(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new _q;++t<n;)this.add(e[t])}function CQe(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function wQe(e,t){return e.has(t)}function TQe(e,t,n,r,i,a){var o=n&$9e,s=e.length,l=t.length;if(s!=l&&!(o&&l>s))return!1;var u=a.get(e),d=a.get(t);if(u&&d)return u==t&&d==e;var f=-1,p=!0,m=n&eet?new yq:void 0;for(a.set(e,t),a.set(t,e);++f<s;){var h=e[f],g=t[f];if(r)var _=o?r(g,h,f,t,e,a):r(h,g,f,e,t,a);if(_!==void 0){if(_)continue;p=!1;break}if(m){if(!Q9e(t,function(e,t){if(!bq(m,t)&&(h===e||i(h,e,n,r,a)))return m.push(t)})){p=!1;break}}else if(!(h===g||i(h,g,n,r,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function EQe(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}function DQe(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function OQe(e,t,n,r,i,a,o){switch(n){case het:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case met:return!(e.byteLength!=t.byteLength||!a(new Sq(e),new Sq(t)));case iet:case aet:case cet:return ZK(+e,+t);case oet:return e.name==t.name&&e.message==t.message;case uet:case fet:return e==t+``;case set:var s=tet;case det:var l=r&net;if(s||=Cq,e.size!=t.size&&!l)return!1;var u=o.get(e);if(u)return u==t;r|=ret,o.set(e,t);var d=xq(s(e),s(t),r,i,a,o);return o.delete(e),d;case pet:if(Tq)return Tq.call(e)==Tq.call(t)}return!1}function kQe(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function AQe(e,t,n){var r=t(e);return Dq(e)?r:Eq(r,n(e))}function jQe(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function MQe(){return[]}function NQe(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function PQe(e){return typeof e==`object`&&!!e}function FQe(e){return Aq(e)&&oq(e)==Cet}function IQe(){return!1}function LQe(e,t){var n=typeof e;return t??=Det,!!t&&(n==`number`||n!=`symbol`&&Oet.test(e))&&e>-1&&e%1==0&&e<t}function RQe(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=ket}function zQe(e){return Aq(e)&&zq(e.length)&&!!Bq[oq(e)]}function BQe(e){return function(t){return e(t)}}function VQe(e,t){var n=Dq(e),r=!n&&Nq(e),i=!n&&!r&&Lq(e),a=!n&&!r&&!i&&Kq(e),o=n||r||i||a,s=o?xet(e.length,String):[],l=s.length;for(var u in e)(t||ntt.call(e,u))&&!(o&&(u==`length`||i&&(u==`offset`||u==`parent`)||a&&(u==`buffer`||u==`byteLength`||u==`byteOffset`)||Rq(u,l)))&&s.push(u);return s}function HQe(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||itt)}function UQe(e,t){return function(n){return e(t(n))}}function WQe(e){if(!qq(e))return att(e);var t=[];for(var n in Object(e))ott.call(e,n)&&n!=`constructor`&&t.push(n);return t}function GQe(e){return e!=null&&zq(e.length)&&!cq(e)}function KQe(e){return Yq(e)?rtt(e):Jq(e)}function qQe(e){return _et(e,Xq,bet)}function JQe(e,t,n,r,i,a){var o=n&stt,s=Zq(e),l=s.length;if(l!=Zq(t).length&&!o)return!1;for(var u=l;u--;){var d=s[u];if(!(o?d in t:ctt.call(t,d)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var m=!0;a.set(e,t),a.set(t,e);for(var h=o;++u<l;){d=s[u];var g=e[d],_=t[d];if(r)var v=o?r(_,g,d,t,e,a):r(g,_,d,e,t,a);if(!(v===void 0?g===_||i(g,_,n,r,a):v)){m=!1;break}h||=d==`constructor`}if(m&&!h){var y=e.constructor,b=t.constructor;y!=b&&`constructor`in e&&`constructor`in t&&!(typeof y==`function`&&y instanceof y&&typeof b==`function`&&b instanceof b)&&(m=!1)}return a.delete(e),a.delete(t),m}function YQe(e,t,n,r,i,a){var o=Dq(e),s=Dq(t),l=o?uJ:cJ(e),u=s?uJ:cJ(t);l=l==lJ?dJ:l,u=u==lJ?dJ:u;var d=l==dJ,f=u==dJ,p=l==u;if(p&&Lq(e)){if(!Lq(t))return!1;o=!0,d=!1}if(p&&!d)return a||=new vq,o||Kq(e)?xq(e,t,n,r,i,a):get(e,t,l,n,r,i,a);if(!(n&gtt)){var m=d&&fJ.call(e,`__wrapped__`),h=f&&fJ.call(t,`__wrapped__`);if(m||h){var g=m?e.value():e,_=h?t.value():t;return a||=new vq,i(g,_,n,r,a)}}return p?(a||=new vq,ltt(e,t,n,r,i,a)):!1}function KR(e,t,n,r,i){return e===t?!0:e==null||t==null||!Aq(e)&&!Aq(t)?e!==e&&t!==t:_tt(e,t,n,r,KR,i)}function XQe(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var l=s[0],u=e[l],d=s[1];if(o&&s[2]){if(u===void 0&&!(l in e))return!1}else{var f=new vq;if(r)var p=r(u,d,l,e,t,f);if(!(p===void 0?pJ(d,u,vtt|ytt,r,f):p))return!1}}return!0}function ZQe(e){return e===e&&!sq(e)}function QQe(e){for(var t=Xq(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,mJ(i)]}return t}function $Qe(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}}function e$e(e){var t=xtt(e);return t.length==1&&t[0][2]?hJ(t[0][0],t[0][1]):function(n){return n===e||btt(n,e,t)}}function t$e(e){return typeof e==`symbol`||Aq(e)&&oq(e)==Ctt}function n$e(e,t){if(Dq(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||gJ(e)?!0:Ttt.test(e)||!wtt.test(e)||t!=null&&e in Object(t)}function qR(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(Ett);var n=Q(function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o},`memoized`);return n.cache=new(qR.Cache||_q),n}function r$e(e){var t=Dtt(e,function(e){return n.size===Ott&&n.clear(),e}),n=t.cache;return t}function JR(e){if(typeof e==`string`)return e;if(Dq(e))return XK(e,JR)+``;if(gJ(e))return yJ?yJ.call(e):``;var t=e+``;return t==`0`&&1/e==-Ntt?`-0`:t}function i$e(e){return e==null?``:Ptt(e)}function a$e(e,t){return Dq(e)?e:_J(e,t)?[e]:Mtt(Ftt(e))}function o$e(e){if(typeof e==`string`||gJ(e))return e;var t=e+``;return t==`0`&&1/e==-Itt?`-0`:t}function s$e(e,t){t=bJ(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[xJ(t[n++])];return n&&n==r?e:void 0}function c$e(e,t,n){var r=e==null?void 0:SJ(e,t);return r===void 0?n:r}function l$e(e,t){return e!=null&&t in Object(e)}function u$e(e,t,n){t=bJ(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=xJ(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&zq(i)&&Rq(o,i)&&(Dq(e)||Nq(e)))}function d$e(e,t){return e!=null&&ztt(e,t,Rtt)}function f$e(e,t){return _J(e)&&mJ(t)?hJ(xJ(e),t):function(n){var r=Ltt(n,e);return r===void 0&&r===t?Btt(n,e):pJ(t,r,Vtt|Htt)}}function p$e(e){return e}function m$e(e){return function(t){return t?.[e]}}function h$e(e){return function(t){return SJ(t,e)}}function g$e(e){return _J(e)?Wtt(xJ(e)):Gtt(e)}function _$e(e){return typeof e==`function`?e:e==null?CJ:typeof e==`object`?Dq(e)?Utt(e[0],e[1]):Stt(e):Ktt(e)}function v$e(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var l=o[e?s:++i];if(n(a[l],l,a)===!1)break}return t}}function y$e(e,t){return e&&qtt(e,t,Xq)}function b$e(e,t){return function(n,r){if(n==null)return n;if(!Yq(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&r(o[a],a,o)!==!1;);return n}}function x$e(e,t){var n=-1,r=Yq(e)?Array(e.length):[];return TJ(e,function(e,i,a){r[++n]=t(e,i,a)}),r}function S$e(e,t){return(Dq(e)?XK:Ytt)(e,wJ(t,3))}function C$e(e,t){var n=[];return TJ(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}function w$e(e,t){return(Dq(e)?Oq:Xtt)(e,wJ(t,3))}function YR(e,t,n){return`${e.name}_${t}_${n}`}function T$e(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};E$e(t,e);let n=e.length;for(let r=0;r<n;r++){let n=e[r],i=ZR(t,n,n);i!==void 0&&L$e(t,n,i)}return t}function E$e(e,t){let n=t.length;for(let r=0;r<n;r++){let n=t[r],i=iz(e,n,void 0,{type:Qtt}),a=iz(e,n,void 0,{type:AJ});i.stop=a,e.ruleToStartState.set(n,i),e.ruleToStopState.set(n,a)}}function XR(e,t,n){return n instanceof VG?nz(e,t,n.terminalType,n):n instanceof MG?I$e(e,t,n):n instanceof BG?j$e(e,t,n):n instanceof FG?M$e(e,t,n):n instanceof RG?D$e(e,t,n):n instanceof zG?O$e(e,t,n):n instanceof IG?k$e(e,t,n):n instanceof LG?A$e(e,t,n):ZR(e,t,n)}function D$e(e,t,n){let r=iz(e,t,n,{type:kJ});return ez(e,r),$R(e,t,n,tz(e,t,r,n,ZR(e,t,n)))}function O$e(e,t,n){let r=iz(e,t,n,{type:kJ});return ez(e,r),$R(e,t,n,tz(e,t,r,n,ZR(e,t,n)),nz(e,t,n.separator,n))}function k$e(e,t,n){let r=iz(e,t,n,{type:OJ});return ez(e,r),QR(e,t,n,tz(e,t,r,n,ZR(e,t,n)))}function A$e(e,t,n){let r=iz(e,t,n,{type:OJ});return ez(e,r),QR(e,t,n,tz(e,t,r,n,ZR(e,t,n)),nz(e,t,n.separator,n))}function j$e(e,t,n){let r=iz(e,t,n,{type:DJ});return ez(e,r),tz(e,t,r,n,...EJ(n.definition,n=>XR(e,t,n)))}function M$e(e,t,n){let r=iz(e,t,n,{type:DJ});return ez(e,r),N$e(e,t,n,tz(e,t,r,n,ZR(e,t,n)))}function ZR(e,t,n){let r=Ztt(EJ(n.definition,n=>XR(e,t,n)),e=>e!==void 0);return r.length===1?r[0]:r.length===0?void 0:F$e(e,r)}function QR(e,t,n,r,i){let a=r.left,o=r.right,s=iz(e,t,n,{type:nnt});ez(e,s);let l=iz(e,t,n,{type:jJ});return a.loopback=s,l.loopback=s,e.decisionMap[YR(t,i?`RepetitionMandatoryWithSeparator`:`RepetitionMandatory`,n.idx)]=s,rz(o,s),i===void 0?(rz(s,a),rz(s,l)):(rz(s,l),rz(s,i.left),rz(i.right,a)),{left:a,right:l}}function $R(e,t,n,r,i){let a=r.left,o=r.right,s=iz(e,t,n,{type:tnt});ez(e,s);let l=iz(e,t,n,{type:jJ}),u=iz(e,t,n,{type:ent});return s.loopback=u,l.loopback=u,rz(s,a),rz(s,l),rz(o,u),i===void 0?rz(u,s):(rz(u,l),rz(u,i.left),rz(i.right,a)),e.decisionMap[YR(t,i?`RepetitionWithSeparator`:`Repetition`,n.idx)]=s,{left:s,right:l}}function N$e(e,t,n,r){let i=r.left,a=r.right;return rz(i,a),e.decisionMap[YR(t,`Option`,n.idx)]=i,r}function ez(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function tz(e,t,n,r,...i){let a=iz(e,t,r,{type:$tt,start:n});n.end=a;for(let e of i)e===void 0?rz(n,a):(rz(n,e.left),rz(e.right,a));let o={left:n,right:a};return e.decisionMap[YR(t,P$e(r),r.idx)]=n,o}function P$e(e){if(e instanceof BG)return`Alternation`;if(e instanceof FG)return`Option`;if(e instanceof RG)return`Repetition`;if(e instanceof zG)return`RepetitionWithSeparator`;if(e instanceof IG)return`RepetitionMandatory`;if(e instanceof LG)return`RepetitionMandatoryWithSeparator`;throw Error(`Invalid production type encountered`)}function F$e(e,t){let n=t.length;for(let r=0;r<n-1;r++){let n=t[r],i;n.left.transitions.length===1&&(i=n.left.transitions[0]);let a=i instanceof FJ,o=i,s=t[r+1].left;n.left.type===DJ&&n.right.type===DJ&&i!==void 0&&(a&&o.followState===n.right||i.target===n.right)?(a?o.followState=s:i.target=s,R$e(e,n.right)):rz(n.right,s)}let r=t[0],i=t[n-1];return{left:r.left,right:i.right}}function nz(e,t,n,r){let i=iz(e,t,r,{type:DJ}),a=iz(e,t,r,{type:DJ});return az(i,new NJ(a,n)),{left:i,right:a}}function I$e(e,t,n){let r=n.referencedRule,i=e.ruleToStartState.get(r),a=iz(e,t,n,{type:DJ}),o=iz(e,t,n,{type:DJ});return az(a,new FJ(i,r,o)),{left:a,right:o}}function L$e(e,t,n){let r=e.ruleToStartState.get(t);rz(r,n.left);let i=e.ruleToStopState.get(t);return rz(n.right,i),{left:r,right:i}}function rz(e,t){az(e,new PJ(t))}function iz(e,t,n,r){let i=Object.assign({atn:e,production:n,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},r);return e.states.push(i),i}function az(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function R$e(e,t){e.states.splice(e.states.indexOf(t),1)}function oz(e,t=!0){return`${t?`a${e.alt}`:``}s${e.state.stateNumber}:${e.stack.map(e=>e.stateNumber.toString()).join(`_`)}`}function z$e(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(o!=null&&(s===void 0?o===o&&!gJ(o):n(o,s)))var s=o,l=a}return l}function B$e(e,t){return e<t}function V$e(e){return e&&e.length?rnt(e,CJ,int):void 0}function H$e(e){return Dq(e)||Nq(e)||!!(RJ&&e&&e[RJ])}function sz(e,t,n,r,i){var a=-1,o=e.length;for(n||=ont,i||=[];++a<o;){var s=e[a];t>0&&n(s)?t>1?sz(s,t-1,n,r,i):Eq(i,s):r||(i[i.length]=s)}return i}function U$e(e,t){return zJ(EJ(e,t),1)}function W$e(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function G$e(e){return e!==e}function K$e(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}function q$e(e,t,n){return t===t?unt(e,t,n):cnt(e,lnt,n)}function J$e(e,t){return!!(e!=null&&e.length)&&dnt(e,t,0)>-1}function Y$e(e,t,n){for(var r=-1,i=e==null?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function X$e(){}function Z$e(e,t,n){var r=-1,i=fnt,a=e.length,o=!0,s=[],l=s;if(n)o=!1,i=pnt;else if(a>=gnt){var u=t?null:hnt(e);if(u)return Cq(u);o=!1,i=bq,l=new yq}else l=t?[]:s;outer:for(;++r<a;){var d=e[r],f=t?t(d):d;if(d=n||d!==0?d:0,o&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue outer;t&&l.push(f),s.push(d)}else i(l,f,n)||(l!==s&&l.push(f),s.push(d))}return s}function Q$e(e,t){return e&&e.length?_nt(e,wJ(t,2)):[]}function $$e(e){return e!=null&&e.length?zJ(e,1):[]}function e1e(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function t1e(e){return typeof e==`function`?e:CJ}function n1e(e,t){return(Dq(e)?bnt:TJ)(e,xnt(t))}function r1e(e){if(e==null)return!0;if(Yq(e)&&(Dq(e)||typeof e==`string`||typeof e.splice==`function`||Lq(e)||Kq(e)||Nq(e)))return!e.length;var t=cJ(e);if(t==Snt||t==Cnt)return!e.size;if(qq(e))return!Jq(e).length;for(var n in e)if(wnt.call(e,n))return!1;return!0}function i1e(e,t,n,r){var i=-1,a=e==null?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function a1e(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}function o1e(e,t,n){var r=Dq(e)?Ent:Dnt,i=arguments.length<3;return r(e,wJ(t,4),n,i,TJ)}function s1e(e,t){let n={};return r=>{let i=r.toString(),a=n[i];return a===void 0?(a={atnStartState:e,decision:t,states:{}},n[i]=a,a):a}}function cz(e,t=!0){let n=new Set;for(let r of e){let e=new Set;for(let i of r){if(i===void 0){if(t)break;return!1}let r=[i.tokenTypeIdx].concat(i.categoryMatches);for(let t of r)if(n.has(t)){if(!e.has(t))return!1}else n.add(t),e.add(t)}}return!0}function c1e(e){let t=e.decisionStates.length,n=Array(t);for(let r=0;r<t;r++)n[r]=s1e(e.decisionStates[r],r);return n}function lz(e,t,n,r){let i=e[t](n),a=i.start;return a===void 0&&(a=fz(i,uz(y1e(i.atnStartState))),i.start=a),l1e.apply(this,[i,a,n,r])}function l1e(e,t,n,r){let i=t,a=1,o=[],s=this.LA(a++);for(;;){let t=h1e(i,s);if(t===void 0&&(t=u1e.apply(this,[e,i,s,a,n,r])),t===IJ)return m1e(o,i,s);if(t.isAcceptState===!0)return t.prediction;i=t,o.push(s),s=this.LA(a++)}}function u1e(e,t,n,r,i,a){let o=g1e(t.configs,n,i);if(o.size===0)return dz(e,t,n,IJ),IJ;let s=uz(o),l=v1e(o,i);if(l!==void 0)s.isAcceptState=!0,s.prediction=l,s.configs.uniqueAlt=l;else if(C1e(o)){let t=ant(o.alts);s.isAcceptState=!0,s.prediction=t,s.configs.uniqueAlt=t,d1e.apply(this,[e,r,o.alts,a])}return s=dz(e,t,n,s),s}function d1e(e,t,n,r){let i=[];for(let e=1;e<=t;e++)i.push(this.LA(e).tokenType);let a=e.atnStartState,o=a.rule,s=a.production;r(f1e({topLevelRule:o,ambiguityIndices:n,production:s,prefixPath:i}))}function f1e(e){let t=EJ(e.prefixPath,e=>pR(e)).join(`, `),n=e.production.idx===0?``:e.production.idx,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(`, `)}> in <${p1e(e.production)}${n}> inside <${e.topLevelRule.name}> Rule,1245-<${t}> may appears as a prefix path in all these alternatives.1246-`;return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES1247-For Further details.`,r}function p1e(e){if(e instanceof MG)return`SUBRULE`;if(e instanceof FG)return`OPTION`;if(e instanceof BG)return`OR`;if(e instanceof IG)return`AT_LEAST_ONE`;if(e instanceof LG)return`AT_LEAST_ONE_SEP`;if(e instanceof zG)return`MANY_SEP`;if(e instanceof RG)return`MANY`;if(e instanceof VG)return`CONSUME`;throw Error(`non exhaustive match`)}function m1e(e,t,n){return{actualToken:n,possibleTokenTypes:vnt(snt(t.configs.elements,e=>e.state.transitions).filter(e=>e instanceof NJ).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function h1e(e,t){return e.edges[t.tokenTypeIdx]}function g1e(e,t,n){let r=new LJ,i=[];for(let a of e.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===AJ){i.push(a);continue}let e=a.state.transitions.length;for(let n=0;n<e;n++){let e=a.state.transitions[n],i=_1e(e,t);i!==void 0&&r.add({state:i,alt:a.alt,stack:a.stack})}}let a;if(i.length===0&&r.size===1&&(a=r),a===void 0){a=new LJ;for(let e of r.elements)pz(e,a)}if(i.length>0&&!x1e(a))for(let e of i)a.add(e);return a}function _1e(e,t){if(e instanceof NJ&&_R(t,e.tokenType))return e.target}function v1e(e,t){let n;for(let r of e.elements)if(t.is(r.alt)===!0){if(n===void 0)n=r.alt;else if(n!==r.alt)return}return n}function uz(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function dz(e,t,n,r){return r=fz(e,r),t.edges[n.tokenTypeIdx]=r,r}function fz(e,t){if(t===IJ)return t;let n=t.configs.key,r=e.states[n];return r===void 0?(t.configs.finalize(),e.states[n]=t,t):r}function y1e(e){let t=new LJ,n=e.transitions.length;for(let r=0;r<n;r++)pz({state:e.transitions[r].target,alt:r,stack:[]},t);return t}function pz(e,t){let n=e.state;if(n.type===AJ){if(e.stack.length>0){let n=[...e.stack];pz({state:n.pop(),alt:e.alt,stack:n},t)}else t.add(e);return}n.epsilonOnlyTransitions||t.add(e);let r=n.transitions.length;for(let i=0;i<r;i++){let r=n.transitions[i],a=b1e(e,r);a!==void 0&&pz(a,t)}}function b1e(e,t){if(t instanceof PJ)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof FJ){let n=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:n}}}function x1e(e){for(let t of e.elements)if(t.state.type===AJ)return!0;return!1}function S1e(e){for(let t of e.elements)if(t.state.type!==AJ)return!1;return!0}function C1e(e){if(S1e(e))return!0;let t=w1e(e.elements);return T1e(t)&&!E1e(t)}function w1e(e){let t=new Map;for(let n of e){let e=oz(n,!1),r=t.get(e);r===void 0&&(r={},t.set(e,r)),r[n.alt]=!0}return t}function T1e(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function E1e(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function mz(e){return e.$type===YJ}function hz(e,t,n){return D1e({parser:t,tokens:n,ruleNames:new Map},e),t}function D1e(e,t){let n=aL(t,!1),r=IF(t.rules).filter(gI).filter(e=>n.has(e));for(let t of r){let n={...e,consume:1,optional:1,subrule:1,many:1,or:1};e.parser.rule(t,gz(n,t.definition))}let i=IF(t.rules).filter(uI).filter(e=>n.has(e));for(let t of i)e.parser.rule(t,O1e(e,t))}function O1e(e,t){let n=t.call.rule.ref;if(!n)throw Error(`Could not resolve reference to infix operator rule: `+t.call.rule.$refText);if(wI(n))throw Error(`Cannot use terminal rule in infix expression`);let r=t.operators.precedences.flatMap(e=>e.operators),i={$type:`Group`,elements:[]},a={$container:i,$type:`Assignment`,feature:`parts`,operator:`+=`,terminal:t.call},o={$container:i,$type:`Group`,elements:[],cardinality:`*`};i.elements.push(a,o);let s={$container:o,$type:`Assignment`,feature:`operators`,operator:`+=`,terminal:{$type:`Alternatives`,elements:r}},l={...a,$container:o};o.elements.push(s,l);let u=r.map(t=>e.tokens[t.value]).map((t,n)=>({ALT:Q(()=>e.parser.consume(n,t,s),`ALT`)})),d;return t=>{d??=xz(e,n),e.parser.subrule(0,d,!1,a,t),e.parser.many(0,{DEF:Q(()=>{e.parser.alternatives(0,u),e.parser.subrule(1,d,!1,l,t)},`DEF`)})}}function gz(e,t,n=!1){let r;if(fI(t))r=F1e(e,t);else if(QF(t))r=k1e(e,t);else if(tI(t))r=gz(e,t.terminal);else if(aI(t))r=yz(e,t);else if(bI(t))r=A1e(e,t);else if($F(t))r=M1e(e,t);else if(OI(t))r=N1e(e,t);else if(cI(t))r=P1e(e,t);else if(sI(t)){let n=e.consume++;r=Q(()=>e.parser.consume(n,pK,t),`method`)}else throw new _H(t.$cstNode,`Unexpected element type: ${t.$type}`);return bz(e,n?void 0:vz(t),r,t.cardinality)}function k1e(e,t){let n=SL(t);return()=>e.parser.action(n,t)}function A1e(e,t){let n=t.rule.ref;if(ZF(n)){let r=e.subrule++,i=gI(n)&&n.fragment,a=t.arguments.length>0?j1e(n,t.arguments):()=>({}),o;return s=>{o??=xz(e,n),e.parser.subrule(r,o,i,t,a(s))}}if(wI(n)){let r=e.consume++,i=Sz(e,n.name);return()=>e.parser.consume(r,i,t)}if(n)WI(n);else throw new _H(t.$cstNode,`Undefined rule: ${t.rule.$refText}`)}function j1e(e,t){if(t.some(e=>e.calledByName)){let e=t.map(e=>({parameterName:e.parameter?.ref?.name,predicate:_z(e.value)}));return t=>{let n={};for(let{parameterName:r,predicate:i}of e)r&&(n[r]=i(t));return n}}{let n=t.map(e=>_z(e.value));return t=>{let r={};for(let i=0;i<n.length;i++)if(i<e.parameters.length){let a=e.parameters[i].name,o=n[i];r[a]=o(t)}return r}}}function _z(e){if(oI(e)){let t=_z(e.left),n=_z(e.right);return e=>t(e)||n(e)}if(iI(e)){let t=_z(e.left),n=_z(e.right);return e=>t(e)&&n(e)}if(mI(e)){let t=_z(e.value);return e=>!t(e)}if(hI(e)){let t=e.parameter.ref.name;return e=>e!==void 0&&e[t]===!0}if(nI(e)){let t=!!e.true;return()=>t}WI(e)}function M1e(e,t){if(t.elements.length===1)return gz(e,t.elements[0]);{let n=[];for(let r of t.elements){let t={ALT:gz(e,r,!0)},i=vz(r);i&&(t.GATE=_z(i)),n.push(t)}let r=e.or++;return t=>e.parser.alternatives(r,n.map(e=>{let n={ALT:Q(()=>e.ALT(t),`ALT`)},r=e.GATE;return r&&(n.GATE=()=>r(t)),n}))}}function N1e(e,t){if(t.elements.length===1)return gz(e,t.elements[0]);let n=[];for(let r of t.elements){let t={ALT:gz(e,r,!0)},i=vz(r);i&&(t.GATE=_z(i)),n.push(t)}let r=e.or++,i=Q((e,t)=>`uGroup_${e}_${t.getRuleStack().join(`-`)}`,`idFunc`),a=Q(t=>e.parser.alternatives(r,n.map((n,a)=>{let o={ALT:Q(()=>!0,`ALT`)},s=e.parser;o.ALT=()=>{if(n.ALT(t),!s.isRecording()){let e=i(r,s);s.unorderedGroups.get(e)||s.unorderedGroups.set(e,[]);let t=s.unorderedGroups.get(e);t?.[a]===void 0&&(t[a]=!0)}};let l=n.GATE;return o.GATE=l?()=>l(t):()=>!s.unorderedGroups.get(i(r,s))?.[a],o})),`alternatives`),o=bz(e,vz(t),a,`*`);return t=>{o(t),e.parser.isRecording()||e.parser.unorderedGroups.delete(i(r,e.parser))}}function P1e(e,t){let n=t.elements.map(t=>gz(e,t));return e=>n.forEach(t=>t(e))}function vz(e){if(cI(e))return e.guardCondition}function yz(e,t,n=t.terminal){if(!n){if(!t.type.ref)throw Error(`Could not resolve reference to type: `+t.type.$refText);let n=hL(t.type.ref)?.terminal;if(!n)throw Error(`Could not find name assignment for type: `+SL(t.type.ref));return yz(e,t,n)}if(bI(n)&&gI(n.rule.ref)){let r=n.rule.ref,i=e.subrule++,a;return n=>{a??=xz(e,r),e.parser.subrule(i,a,!1,t,n)}}if(bI(n)&&wI(n.rule.ref)){let r=e.consume++,i=Sz(e,n.rule.ref.name);return()=>e.parser.consume(r,i,t)}if(fI(n)){let r=e.consume++,i=Sz(e,n.value);return()=>e.parser.consume(r,i,t)}throw Error(`Could not build cross reference parser`)}function F1e(e,t){let n=e.consume++,r=e.tokens[t.value];if(!r)throw Error(`Could not find token for keyword: `+t.value);return()=>e.parser.consume(n,r,t)}function bz(e,t,n,r){let i=t&&_z(t);if(!r){if(i){let t=e.or++;return r=>e.parser.alternatives(t,[{ALT:Q(()=>n(r),`ALT`),GATE:Q(()=>i(r),`GATE`)},{ALT:BR(),GATE:Q(()=>!i(r),`GATE`)}])}return n}if(r===`*`){let t=e.many++;return r=>e.parser.many(t,{DEF:Q(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}if(r===`+`){let t=e.many++;if(i){let r=e.or++;return a=>e.parser.alternatives(r,[{ALT:Q(()=>e.parser.atLeastOne(t,{DEF:Q(()=>n(a),`DEF`)}),`ALT`),GATE:Q(()=>i(a),`GATE`)},{ALT:BR(),GATE:Q(()=>!i(a),`GATE`)}])}return r=>e.parser.atLeastOne(t,{DEF:Q(()=>n(r),`DEF`)})}if(r===`?`){let t=e.optional++;return r=>e.parser.optional(t,{DEF:Q(()=>n(r),`DEF`),GATE:i?()=>i(r):void 0})}WI(r)}function xz(e,t){let n=I1e(e,t),r=e.parser.getRule(n);if(!r)throw Error(`Rule "${n}" not found."`);return r}function I1e(e,t){if(ZF(t))return t.name;if(e.ruleNames.has(t))return e.ruleNames.get(t);{let n=t,r=n.$container,i=t.$type;for(;!gI(r);)(cI(r)||$F(r)||OI(r))&&(i=r.elements.indexOf(n).toString()+`:`+i),n=r,r=r.$container;return i=r.name+`:`+i,e.ruleNames.set(t,i),i}}function Sz(e,t){let n=e.tokens[t];if(!n)throw Error(`Token "${t}" not found."`);return n}function Cz(e){let t=e.Grammar,n=e.parser.Lexer,r=new nY(e);return hz(t,r,n.definition),r.finalize(),r}function wz(e){let t=Tz(e);return t.finalize(),t}function Tz(e){let t=e.Grammar,n=e.parser.Lexer;return hz(t,new $J(e),n.definition)}function Ez(){return new Promise(e=>{typeof setImmediate>`u`?setTimeout(e,0):setImmediate(e)})}function Dz(){return cY=performance.now(),new sY.CancellationTokenSource}function Oz(e){lY=e}function kz(e){return e===uY}async function Az(e){if(e===sY.CancellationToken.None)return;let t=performance.now();if(t-cY>=lY&&(cY=t,await Ez(),cY=performance.now()),e.isCancellationRequested)throw uY}function jz(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);jz(r,t),jz(i,t);let a=0,o=0,s=0;for(;a<r.length&&o<i.length;)t(r[a],i[o])<=0?e[s++]=r[a++]:e[s++]=i[o++];for(;a<r.length;)e[s++]=r[a++];for(;o<i.length;)e[s++]=i[o++];return e}function Mz(e,t,n=0){let r=t?[n]:[];for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);Nz(i)&&(i===13&&t+1<e.length&&e.charCodeAt(t+1)===10&&t++,r.push(n+t+1))}return r}function Nz(e){return e===13||e===10}function Pz(e){let t=e.start,n=e.end;return t.line>n.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function L1e(e){let t=Pz(e.range);return t===e.range?e:{newText:e.newText,range:t}}function Fz(e){return typeof e.name==`string`}function Iz(e){return typeof e.$comment==`string`}function Lz(e){return typeof e==`object`&&!!e&&(`$ref`in e||`$error`in e)}function Rz(e){return{code:e}}function zz(e){if(e.range)return e.range;let t;return typeof e.property==`string`?t=uL(e.node.$cstNode,e.property,e.index):typeof e.keyword==`string`&&(t=fL(e.node.$cstNode,e.keyword,e.index)),t??=e.node.$cstNode,t?t.range:{start:{line:0,character:0},end:{line:0,character:0}}}function Bz(e){switch(e){case`error`:return 1;case`warning`:return 2;case`info`:return 3;case`hint`:return 4;default:throw Error(`Invalid diagnostic severity: `+e)}}function Vz(e){switch(e){case`error`:return Rz(HY.LexingError);case`warning`:return Rz(HY.LexingWarning);case`info`:return Rz(HY.LexingInfo);case`hint`:return Rz(HY.LexingHint);default:throw Error(`Invalid diagnostic severity: `+e)}}function Hz(e){return Array.isArray(e)&&(e.length===0||`name`in e[0])}function Uz(e){return e&&`modes`in e&&`defaultMode`in e}function Wz(e){return!Hz(e)&&!Uz(e)}function Gz(e,t,n){let r,i;typeof e==`string`?(i=t,r=n):(i=e.range.start,r=t),i||=bB.create(0,0);let a=qz(e),o=Qz(r);return V1e({index:0,tokens:R1e({lines:a,position:i,options:o}),position:i})}function Kz(e,t){let n=Qz(t),r=qz(e);if(r.length===0)return!1;let i=r[0],a=r[r.length-1],o=n.start,s=n.end;return!!o?.exec(i)&&!!s?.exec(a)}function qz(e){let t=``;return t=typeof e==`string`?e:e.text,t.split(TH)}function R1e(e){let t=[],n=e.position.line,r=e.position.character;for(let i=0;i<e.lines.length;i++){let a=i===0,o=i===e.lines.length-1,s=e.lines[i],l=0;if(a&&e.options.start){let t=e.options.start?.exec(s);t&&(l=t.index+t[0].length)}else{let t=e.options.line?.exec(s);t&&(l=t.index+t[0].length)}if(o){let t=e.options.end?.exec(s);t&&(s=s.substring(0,t.index))}if(s=s.substring(0,B1e(s)),Jz(s,l)>=s.length){if(t.length>0){let e=bB.create(n,r);t.push({type:`break`,content:``,range:xB.create(e,e)})}}else{nX.lastIndex=l;let e=nX.exec(s);if(e){let i=e[0],a=e[1],o=bB.create(n,r+l),u=bB.create(n,r+l+i.length);t.push({type:`tag`,content:a,range:xB.create(o,u)}),l+=i.length,l=Jz(s,l)}if(l<s.length){let e=s.substring(l),i=Array.from(e.matchAll(Fnt));t.push(...z1e(i,e,n,r+l))}}n++,r=0}return t.length>0&&t[t.length-1].type===`break`?t.slice(0,-1):t}function z1e(e,t,n,r){let i=[];if(e.length===0){let e=bB.create(n,r),a=bB.create(n,r+t.length);i.push({type:`text`,content:t,range:xB.create(e,a)})}else{let a=0;for(let o of e){let e=o.index,s=t.substring(a,e);s.length>0&&i.push({type:`text`,content:t.substring(a,e),range:xB.create(bB.create(n,a+r),bB.create(n,e+r))});let l=s.length+1,u=o[1];if(i.push({type:`inline-tag`,content:u,range:xB.create(bB.create(n,a+l+r),bB.create(n,a+l+u.length+r))}),l+=u.length,o.length===4){l+=o[2].length;let e=o[3];i.push({type:`text`,content:e,range:xB.create(bB.create(n,a+l+r),bB.create(n,a+l+e.length+r))})}else i.push({type:`text`,content:``,range:xB.create(bB.create(n,a+l+r),bB.create(n,a+l+r))});a=e+o[0].length}let o=t.substring(a);o.length>0&&i.push({type:`text`,content:o,range:xB.create(bB.create(n,a+r),bB.create(n,a+r+o.length))})}return i}function Jz(e,t){let n=e.substring(t).match(Int);return n?t+n.index:e.length}function B1e(e){let t=e.match(Lnt);if(t&&typeof t.index==`number`)return t.index}function V1e(e){let t=bB.create(e.position.line,e.position.character);if(e.tokens.length===0)return new rX([],xB.create(t,t));let n=[];for(;e.index<e.tokens.length;){let t=H1e(e,n[n.length-1]);t&&n.push(t)}let r=n[0]?.range.start??t,i=n[n.length-1]?.range.end??t;return new rX(n,xB.create(r,i))}function H1e(e,t){let n=e.tokens[e.index];if(n.type===`tag`)return Xz(e,!1);if(n.type===`text`||n.type===`inline-tag`)return Yz(e);U1e(n,t),e.index++}function U1e(e,t){if(t){let n=new oX(``,e.range);`inlines`in t?t.inlines.push(n):t.content.inlines.push(n)}}function Yz(e){let t=e.tokens[e.index],n=t,r=t,i=[];for(;t&&t.type!==`break`&&t.type!==`tag`;)i.push(W1e(e)),r=t,t=e.tokens[e.index];return new aX(i,xB.create(n.range.start,r.range.end))}function W1e(e){return e.tokens[e.index].type===`inline-tag`?Xz(e,!0):Zz(e)}function Xz(e,t){let n=e.tokens[e.index++],r=n.content.substring(1);if(e.tokens[e.index]?.type===`text`){if(t){let i=Zz(e);return new iX(r,new aX([i],i.range),t,xB.create(n.range.start,i.range.end))}{let i=Yz(e);return new iX(r,i,t,xB.create(n.range.start,i.range.end))}}{let e=n.range;return new iX(r,new aX([],e),t,e)}}function Zz(e){let t=e.tokens[e.index++];return new oX(t.content,t.range)}function Qz(e){if(!e)return Qz({start:`/**`,end:`*/`,line:`*`});let{start:t,end:n,line:r}=e;return{start:$z(t,!0),end:$z(n,!1),line:$z(r,!0)}}function $z(e,t){if(typeof e==`string`||typeof e==`object`){let n=typeof e==`string`?eL(e):e.source;return RegExp(t?`^\\s*${n}`:`\\s*${n}\\s*$`)}return e}function G1e(e,t,n){if(e===`linkplain`||e===`linkcode`||e===`link`){let r=t.indexOf(` `),i=t;if(r>0){let e=Jz(t,r);i=t.substring(e),t=t.substring(0,r)}return(e===`linkcode`||e===`link`&&n.link===`code`)&&(i=`\`${i}\``),n.renderLink?.(t,i)??K1e(t,i)}}function K1e(e,t){try{return mY.parse(e,!0),`[${t}](${e})`}catch{return e}}function eB(e){return e.endsWith(`1248-`)?`1249-`:`1250-1251-`}function tB(e){return{documentation:{CommentProvider:Q(e=>new cX(e),`CommentProvider`),DocumentationProvider:Q(e=>new sX(e),`DocumentationProvider`)},parser:{AsyncParser:Q(e=>new lX(e),`AsyncParser`),GrammarConfig:Q(e=>kL(e),`GrammarConfig`),LangiumParser:Q(e=>wz(e),`LangiumParser`),CompletionParser:Q(e=>Cz(e),`CompletionParser`),ValueConverter:Q(()=>new aY,`ValueConverter`),TokenBuilder:Q(()=>new iY,`TokenBuilder`),Lexer:Q(e=>new tX(e),`Lexer`),ParserErrorMessageProvider:Q(()=>new tY,`ParserErrorMessageProvider`),LexerErrorMessageProvider:Q(()=>new $Y,`LexerErrorMessageProvider`)},workspace:{AstNodeLocator:Q(()=>new GY,`AstNodeLocator`),AstNodeDescriptionProvider:Q(e=>new UY(e),`AstNodeDescriptionProvider`),ReferenceDescriptionProvider:Q(e=>new WY(e),`ReferenceDescriptionProvider`)},references:{Linker:Q(e=>new SY(e),`Linker`),NameProvider:Q(()=>new CY,`NameProvider`),ScopeProvider:Q(e=>new FY(e),`ScopeProvider`),ScopeComputation:Q(e=>new DY(e),`ScopeComputation`),References:Q(e=>new wY(e),`References`)},serializer:{Hydrator:Q(e=>new dX(e),`Hydrator`),JsonSerializer:Q(e=>new IY(e),`JsonSerializer`)},validation:{DocumentValidator:Q(e=>new VY(e),`DocumentValidator`),ValidationRegistry:Q(e=>new zY(e),`ValidationRegistry`)},shared:Q(()=>e.shared,`shared`)}}function nB(e){return{ServiceRegistry:Q(e=>new LY(e),`ServiceRegistry`),workspace:{LangiumDocuments:Q(e=>new bY(e),`LangiumDocuments`),LangiumDocumentFactory:Q(e=>new yY(e),`LangiumDocumentFactory`),DocumentBuilder:Q(e=>new XY(e),`DocumentBuilder`),IndexManager:Q(e=>new ZY(e),`IndexManager`),WorkspaceManager:Q(e=>new QY(e),`WorkspaceManager`),FileSystemProvider:Q(t=>e.fileSystemProvider(t),`FileSystemProvider`),WorkspaceLock:Q(()=>new uX,`WorkspaceLock`),ConfigurationProvider:Q(e=>new qY(e),`ConfigurationProvider`)},profilers:{}}}function rB(e,t,n,r,i,a,o,s,l){return aB([e,t,n,r,i,a,o,s,l].reduce(sB,{}))}function iB(e){if(e&&e[fX])for(let t of Object.values(e))iB(t);return e}function aB(e,t){let n=new Proxy({},{deleteProperty:Q(()=>!1,`deleteProperty`),set:Q(()=>{throw Error(`Cannot set property on injected service container`)},`set`),get:Q((r,i)=>i===fX||oB(r,i,e,t||n),`get`),getOwnPropertyDescriptor:Q((r,i)=>(oB(r,i,e,t||n),Object.getOwnPropertyDescriptor(r,i)),`getOwnPropertyDescriptor`),has:Q((t,n)=>n in e,`has`),ownKeys:Q(()=>[...Object.getOwnPropertyNames(e)],`ownKeys`)});return n}function oB(e,t,n,r){if(t in e){if(e[t]instanceof Error)throw Error(`Construction failure. Please make sure that your dependencies are constructable. Cause: `+e[t]);if(e[t]===pX)throw Error(`Cycle detected. Please make "`+String(t)+`" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies`);return e[t]}if(t in n){let i=n[t];e[t]=pX;try{e[t]=typeof i==`function`?i(r):aB(i,r)}catch(n){throw e[t]=n instanceof Error?n:void 0,n}return e[t]}}function sB(e,t){if(t){for(let[n,r]of Object.entries(t))if(r!=null){if(typeof r==`object`){let t=e[n];e[n]=sB(typeof t==`object`&&t?t:{},r)}else e[n]=r}}return e}function q1e(){let e=rB(nB(yX),Unt),t=rB(tB({shared:e}),Hnt);return e.ServiceRegistry.register(t),t}function cB(e){let t=q1e(),n=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(n,mY.parse(`memory:/${n.name??`grammar`}.langium`)),n}function J1e(e){return DQ.isInstance(e,IX.$type)}function Y1e(e){return DQ.isInstance(e,RX.$type)}function X1e(e){return DQ.isInstance(e,HX.$type)}function Z1e(e){return DQ.isInstance(e,KX.$type)}function Q1e(e){return DQ.isInstance(e,XX.$type)}function $1e(e){return DQ.isInstance(e,ZX.$type)}function e0e(e){return e===`rmo`||e===`readmodel`||e===`ui`||e===`cmd`||e===`command`||e===`evt`||e===`event`||e===`pcr`||e===`processor`}function t0e(e){return DQ.isInstance(e,xZ.$type)}function n0e(e){return DQ.isInstance(e,OZ.$type)}function r0e(e){return DQ.isInstance(e,AZ.$type)}function i0e(e){return DQ.isInstance(e,IZ.$type)}function a0e(e){return DQ.isInstance(e,zZ.$type)}function o0e(e){return DQ.isInstance(e,BZ.$type)}function s0e(e){return DQ.isInstance(e,ZZ.$type)}function c0e(e){return DQ.isInstance(e,QZ.$type)}function l0e(e){return DQ.isInstance(e,nQ.$type)}function u0e(e){return DQ.isInstance(e,rQ.$type)}function d0e(e){return DQ.isInstance(e,aQ.$type)}function f0e(e){return DQ.isInstance(e,uQ.$type)}function p0e(e){return DQ.isInstance(e,bQ.$type)}function m0e(e){return DQ.isInstance(e,xQ.$type)}function h0e(e){return DQ.isInstance(e,TQ.$type)}var g0e,lB,_0e,uB,v0e,y0e,Q,b0e,dB,fB,pB,mB,hB,gB,_B,x0e,vB,S0e,yB,bB,xB,SB,C0e,CB,w0e,T0e,E0e,D0e,wB,O0e,k0e,A0e,TB,EB,DB,OB,kB,AB,jB,MB,NB,PB,FB,IB,LB,j0e,M0e,N0e,RB,P0e,zB,BB,F0e,I0e,L0e,R0e,z0e,B0e,V0e,H0e,VB,U0e,W0e,G0e,K0e,q0e,J0e,Y0e,X0e,Z0e,Q0e,$0e,HB,e2e,t2e,n2e,r2e,i2e,a2e,o2e,s2e,c2e,l2e,u2e,d2e,f2e,UB,WB,p2e,m2e,h2e,g2e,_2e,v2e,y2e,b2e,x2e,S2e,C2e,GB,KB,qB,JB,YB,XB,ZB,QB,w2e,T2e,$B,E2e,D2e,O2e,k2e,eV,A2e,tV,nV,rV,iV,j2e,M2e,N2e,P2e,F2e,I2e,L2e,R2e,z2e,B2e,V2e,H2e,U2e,W2e,G2e,K2e,q2e,J2e,Y2e,X2e,Z2e,Q2e,$2e,e4e,t4e,aV,oV,sV,cV,lV,uV,dV,fV,pV,mV,n4e,hV,gV,_V,vV,yV,bV,xV,SV,CV,wV,TV,EV,DV,OV,kV,AV,jV,MV,NV,PV,FV,IV,LV,RV,zV,BV,VV,HV,UV,WV,GV,KV,qV,JV,YV,XV,ZV,QV,$V,eH,tH,nH,rH,iH,aH,oH,sH,cH,lH,uH,dH,fH,pH,mH,hH,gH,_H,vH,yH,bH,xH,r4e,SH,i4e,CH,wH,TH,EH,a4e,DH,OH,kH,AH,o4e,jH,MH,NH,s4e,c4e,PH,l4e,u4e,d4e,f4e,p4e,FH,IH,LH,m4e,RH,zH,BH,h4e,VH,HH,g4e,_4e,v4e,y4e,b4e,UH,WH,x4e,S4e,C4e,w4e,T4e,GH,E4e,D4e,KH,qH,O4e,k4e,A4e,j4e,JH,YH,XH,M4e,N4e,ZH,P4e,F4e,I4e,L4e,R4e,z4e,B4e,V4e,H4e,QH,$H,eU,U4e,W4e,tU,G4e,K4e,q4e,J4e,Y4e,X4e,nU,Z4e,rU,iU,Q4e,$4e,aU,oU,e3e,t3e,sU,cU,lU,n3e,uU,dU,fU,r3e,pU,i3e,mU,hU,gU,a3e,o3e,_U,s3e,c3e,vU,yU,l3e,u3e,bU,d3e,xU,SU,CU,wU,f3e,p3e,m3e,h3e,g3e,_3e,v3e,y3e,b3e,x3e,S3e,C3e,w3e,T3e,E3e,D3e,O3e,k3e,A3e,j3e,M3e,N3e,P3e,F3e,TU,I3e,EU,DU,OU,kU,AU,jU,MU,L3e,NU,PU,R3e,z3e,FU,IU,B3e,LU,V3e,H3e,U3e,RU,W3e,G3e,zU,BU,K3e,q3e,J3e,Y3e,X3e,Z3e,Q3e,$3e,e6e,VU,t6e,HU,n6e,r6e,i6e,a6e,o6e,UU,WU,s6e,c6e,GU,l6e,u6e,d6e,f6e,KU,p6e,m6e,h6e,g6e,_6e,v6e,y6e,b6e,qU,x6e,JU,YU,S6e,XU,ZU,C6e,QU,$U,eW,tW,w6e,T6e,E6e,D6e,O6e,k6e,A6e,nW,j6e,M6e,rW,iW,aW,oW,N6e,sW,cW,P6e,lW,uW,F6e,dW,I6e,fW,pW,mW,hW,gW,_W,vW,L6e,yW,bW,xW,SW,R6e,z6e,B6e,V6e,H6e,CW,wW,U6e,W6e,TW,EW,G6e,K6e,q6e,DW,OW,J6e,Y6e,X6e,Z6e,Q6e,$6e,e8e,t8e,n8e,r8e,i8e,a8e,o8e,s8e,c8e,l8e,u8e,d8e,f8e,p8e,m8e,h8e,g8e,_8e,v8e,kW,y8e,b8e,x8e,AW,S8e,C8e,w8e,T8e,jW,E8e,D8e,O8e,k8e,MW,A8e,j8e,M8e,NW,N8e,P8e,F8e,I8e,L8e,R8e,z8e,B8e,V8e,H8e,U8e,W8e,G8e,K8e,q8e,J8e,PW,Y8e,FW,IW,LW,X8e,Z8e,Q8e,RW,zW,BW,$8e,e5e,VW,t5e,HW,n5e,r5e,i5e,a5e,o5e,s5e,c5e,l5e,u5e,d5e,f5e,p5e,m5e,UW,WW,h5e,g5e,_5e,v5e,y5e,GW,KW,qW,JW,b5e,YW,x5e,S5e,C5e,XW,w5e,ZW,T5e,E5e,QW,D5e,O5e,k5e,A5e,j5e,M5e,N5e,$W,P5e,F5e,I5e,eG,L5e,R5e,tG,z5e,nG,rG,iG,B5e,V5e,aG,oG,sG,cG,H5e,lG,U5e,W5e,uG,dG,fG,G5e,K5e,pG,mG,q5e,hG,gG,J5e,Y5e,X5e,Z5e,_G,Q5e,vG,$5e,yG,e7e,bG,t7e,xG,n7e,r7e,i7e,SG,a7e,o7e,CG,wG,TG,s7e,c7e,l7e,u7e,EG,d7e,DG,OG,f7e,kG,p7e,m7e,h7e,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG,VG,HG,UG,WG,g7e,GG,_7e,KG,qG,v7e,JG,YG,XG,y7e,b7e,x7e,ZG,QG,$G,eK,tK,nK,rK,iK,S7e,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,C7e,hK,w7e,T7e,E7e,gK,D7e,_K,O7e,vK,yK,k7e,bK,A7e,xK,j7e,SK,CK,wK,TK,EK,DK,OK,M7e,N7e,P7e,kK,AK,F7e,I7e,L7e,jK,R7e,MK,NK,PK,FK,IK,LK,RK,z7e,B7e,zK,V7e,H7e,U7e,W7e,G7e,K7e,q7e,J7e,BK,VK,HK,UK,WK,Y7e,X7e,Z7e,GK,KK,qK,JK,YK,Q7e,XK,$7e,ZK,QK,e9e,t9e,n9e,r9e,i9e,$K,a9e,o9e,s9e,c9e,eq,l9e,tq,nq,rq,u9e,d9e,iq,f9e,p9e,m9e,h9e,g9e,aq,oq,sq,_9e,v9e,y9e,b9e,cq,lq,uq,x9e,S9e,dq,C9e,w9e,T9e,E9e,D9e,O9e,k9e,A9e,j9e,fq,pq,mq,M9e,N9e,P9e,F9e,I9e,L9e,R9e,z9e,B9e,hq,V9e,H9e,gq,U9e,W9e,G9e,K9e,_q,q9e,J9e,vq,Y9e,X9e,Z9e,yq,Q9e,bq,$9e,eet,xq,Sq,tet,Cq,net,ret,iet,aet,oet,set,cet,uet,det,fet,pet,met,het,wq,Tq,get,Eq,Dq,_et,Oq,vet,yet,kq,bet,xet,Aq,Cet,jq,Mq,wet,Tet,Nq,Eet,Pq,Fq,Iq,Lq,Det,Oet,Rq,ket,zq,Aet,jet,Met,Net,Pet,Fet,Iet,Let,Ret,zet,Bet,Vet,Het,Uet,Wet,Get,Ket,qet,Jet,Yet,Xet,Zet,Qet,$et,Bq,ett,ttt,Vq,Hq,Uq,Wq,Gq,Kq,ntt,rtt,itt,qq,att,ott,Jq,Yq,Xq,Zq,stt,ctt,ltt,Qq,$q,eJ,tJ,nJ,utt,rJ,iJ,aJ,oJ,dtt,ftt,ptt,mtt,htt,sJ,cJ,gtt,lJ,uJ,dJ,fJ,_tt,pJ,vtt,ytt,btt,mJ,xtt,hJ,Stt,Ctt,gJ,wtt,Ttt,_J,Ett,Dtt,Ott,ktt,Att,jtt,Mtt,Ntt,vJ,yJ,Ptt,Ftt,bJ,Itt,xJ,SJ,Ltt,Rtt,ztt,Btt,Vtt,Htt,Utt,CJ,Wtt,Gtt,Ktt,wJ,qtt,Jtt,TJ,Ytt,EJ,Xtt,Ztt,DJ,Qtt,OJ,kJ,AJ,$tt,ent,tnt,nnt,jJ,MJ,NJ,PJ,FJ,IJ,LJ,rnt,int,ant,RJ,ont,zJ,snt,cnt,lnt,unt,dnt,fnt,pnt,mnt,hnt,gnt,_nt,vnt,ynt,bnt,xnt,BJ,Snt,Cnt,wnt,Tnt,Ent,Dnt,VJ,HJ,UJ,Ont,WJ,GJ,KJ,qJ,knt,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,Ant,rY,jnt,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,Mnt,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,Nnt,kY,Pnt,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY,HY,UY,WY,GY,KY,qY,JY,YY,XY,ZY,QY,$Y,eX,tX,nX,Fnt,Int,Lnt,rX,iX,aX,oX,sX,cX,lX,Rnt,znt,uX,dX,Bnt,fX,pX,mX,hX,gX,Vnt,_X,vX,yX,Hnt,Unt,Wnt,bX,Gnt,Knt,qnt,Jnt,Ynt,Xnt,Znt,Qnt,$nt,ert,trt,nrt,rrt,irt,art,xX,SX,CX,wX,TX,EX,DX,OX,kX,AX,jX,MX,NX,PX,FX,IX,LX,RX,zX,BX,VX,HX,UX,WX,GX,KX,qX,JX,YX,XX,ZX,QX,$X,eZ,tZ,nZ,rZ,iZ,aZ,oZ,sZ,cZ,lZ,uZ,dZ,fZ,pZ,mZ,hZ,gZ,_Z,vZ,yZ,bZ,xZ,SZ,CZ,wZ,TZ,EZ,DZ,OZ,kZ,AZ,jZ,MZ,NZ,PZ,FZ,IZ,LZ,RZ,zZ,BZ,VZ,HZ,UZ,WZ,GZ,KZ,qZ,JZ,YZ,XZ,ZZ,QZ,$Z,eQ,tQ,nQ,rQ,iQ,aQ,oQ,sQ,cQ,lQ,uQ,dQ,fQ,pQ,mQ,hQ,gQ,_Q,vQ,yQ,bQ,xQ,SQ,CQ,wQ,TQ,EQ,DQ,ort,srt,crt,lrt,urt,drt,frt,prt,mrt,hrt,grt,_rt,vrt,yrt,brt,xrt,Srt,Crt,wrt,Trt,Ert,Drt,Ort,krt,Art,jrt,Mrt,Nrt,Prt,Frt,Irt,Lrt,Rrt,zrt,Brt,Vrt,Hrt,Urt,Wrt,Grt,Krt,qrt,Jrt,Yrt,Xrt,OQ,Zrt,Qrt,$rt,eit,tit,nit,rit,iit,ait,oit,sit,cit,lit,uit,dit,fit,kQ,AQ,jQ,MQ=o((()=>{g0e=Object.create,lB=Object.defineProperty,_0e=Object.getOwnPropertyDescriptor,uB=Object.getOwnPropertyNames,v0e=Object.getPrototypeOf,y0e=Object.prototype.hasOwnProperty,Q=(e,t)=>lB(e,`name`,{value:t,configurable:!0}),b0e=(e,t)=>function(){return e&&(t=(0,e[uB(e)[0]])(e=0)),t},dB=(e,t)=>function(){return t||(0,e[uB(e)[0]])((t={exports:{}}).exports,t),t.exports},fB=(e,t)=>{for(var n in t)lB(e,n,{get:t[n],enumerable:!0})},pB=(e,t,n,r)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let i of uB(t))!y0e.call(e,i)&&i!==n&&lB(e,i,{get:()=>t[i],enumerable:!(r=_0e(t,i))||r.enumerable});return e},mB=(e,t,n)=>(pB(e,t,`default`),n&&pB(n,t,`default`)),hB=(e,t,n)=>(n=e==null?{}:g0e(v0e(e)),pB(t||!e||!e.__esModule?lB(n,`default`,{value:e,enumerable:!0}):n,e)),gB=e=>pB(lB({},`__esModule`,{value:!0}),e),_B={},fB(_B,{AnnotatedTextEdit:()=>AB,ChangeAnnotation:()=>OB,ChangeAnnotationIdentifier:()=>kB,CodeAction:()=>t2e,CodeActionContext:()=>e2e,CodeActionKind:()=>$0e,CodeActionTriggerKind:()=>HB,CodeDescription:()=>A0e,CodeLens:()=>n2e,Color:()=>CB,ColorInformation:()=>w0e,ColorPresentation:()=>T0e,Command:()=>EB,CompletionItem:()=>V0e,CompletionItemKind:()=>F0e,CompletionItemLabelDetails:()=>B0e,CompletionItemTag:()=>L0e,CompletionList:()=>H0e,CreateFile:()=>MB,DeleteFile:()=>PB,Diagnostic:()=>TB,DiagnosticRelatedInformation:()=>wB,DiagnosticSeverity:()=>O0e,DiagnosticTag:()=>k0e,DocumentHighlight:()=>q0e,DocumentHighlightKind:()=>K0e,DocumentLink:()=>i2e,DocumentSymbol:()=>Q0e,DocumentUri:()=>x0e,EOL:()=>x2e,FoldingRange:()=>D0e,FoldingRangeKind:()=>E0e,FormattingOptions:()=>r2e,Hover:()=>U0e,InlayHint:()=>p2e,InlayHintKind:()=>UB,InlayHintLabelPart:()=>WB,InlineCompletionContext:()=>y2e,InlineCompletionItem:()=>h2e,InlineCompletionList:()=>g2e,InlineCompletionTriggerKind:()=>_2e,InlineValueContext:()=>f2e,InlineValueEvaluatableExpression:()=>d2e,InlineValueText:()=>l2e,InlineValueVariableLookup:()=>u2e,InsertReplaceEdit:()=>R0e,InsertTextFormat:()=>I0e,InsertTextMode:()=>z0e,Location:()=>SB,LocationLink:()=>C0e,MarkedString:()=>VB,MarkupContent:()=>BB,MarkupKind:()=>zB,OptionalVersionedTextDocumentIdentifier:()=>RB,ParameterInformation:()=>W0e,Position:()=>bB,Range:()=>xB,RenameFile:()=>NB,SelectedCompletionInfo:()=>v2e,SelectionRange:()=>a2e,SemanticTokenModifiers:()=>s2e,SemanticTokenTypes:()=>o2e,SemanticTokens:()=>c2e,SignatureInformation:()=>G0e,StringValue:()=>m2e,SymbolInformation:()=>X0e,SymbolKind:()=>J0e,SymbolTag:()=>Y0e,TextDocument:()=>S2e,TextDocumentEdit:()=>jB,TextDocumentIdentifier:()=>M0e,TextDocumentItem:()=>P0e,TextEdit:()=>DB,URI:()=>vB,VersionedTextDocumentIdentifier:()=>N0e,WorkspaceChange:()=>j0e,WorkspaceEdit:()=>FB,WorkspaceFolder:()=>b2e,WorkspaceSymbol:()=>Z0e,integer:()=>S0e,uinteger:()=>yB}),KB=b0e({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){"use strict";(function(e){function t(e){return typeof e==`string`}Q(t,`is`),e.is=t})(x0e||={}),(function(e){function t(e){return typeof e==`string`}Q(t,`is`),e.is=t})(vB||={}),(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}Q(t,`is`),e.is=t})(S0e||={}),(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647;function t(t){return typeof t==`number`&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}Q(t,`is`),e.is=t})(yB||={}),(function(e){function t(e,t){return e===Number.MAX_VALUE&&(e=yB.MAX_VALUE),t===Number.MAX_VALUE&&(t=yB.MAX_VALUE),{line:e,character:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&GB.uinteger(t.line)&&GB.uinteger(t.character)}Q(n,`is`),e.is=n})(bB||={}),(function(e){function t(e,t,n,r){if(GB.uinteger(e)&&GB.uinteger(t)&&GB.uinteger(n)&&GB.uinteger(r))return{start:bB.create(e,t),end:bB.create(n,r)};if(bB.is(e)&&bB.is(t))return{start:e,end:t};throw Error(`Range#create called with invalid arguments[${e}, ${t}, ${n}, ${r}]`)}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&bB.is(t.start)&&bB.is(t.end)}Q(n,`is`),e.is=n})(xB||={}),(function(e){function t(e,t){return{uri:e,range:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&xB.is(t.range)&&(GB.string(t.uri)||GB.undefined(t.uri))}Q(n,`is`),e.is=n})(SB||={}),(function(e){function t(e,t,n,r){return{targetUri:e,targetRange:t,targetSelectionRange:n,originSelectionRange:r}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&xB.is(t.targetRange)&&GB.string(t.targetUri)&&xB.is(t.targetSelectionRange)&&(xB.is(t.originSelectionRange)||GB.undefined(t.originSelectionRange))}Q(n,`is`),e.is=n})(C0e||={}),(function(e){function t(e,t,n,r){return{red:e,green:t,blue:n,alpha:r}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&GB.numberRange(t.red,0,1)&&GB.numberRange(t.green,0,1)&&GB.numberRange(t.blue,0,1)&&GB.numberRange(t.alpha,0,1)}Q(n,`is`),e.is=n})(CB||={}),(function(e){function t(e,t){return{range:e,color:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&xB.is(t.range)&&CB.is(t.color)}Q(n,`is`),e.is=n})(w0e||={}),(function(e){function t(e,t,n){return{label:e,textEdit:t,additionalTextEdits:n}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&GB.string(t.label)&&(GB.undefined(t.textEdit)||DB.is(t))&&(GB.undefined(t.additionalTextEdits)||GB.typedArray(t.additionalTextEdits,DB.is))}Q(n,`is`),e.is=n})(T0e||={}),(function(e){e.Comment=`comment`,e.Imports=`imports`,e.Region=`region`})(E0e||={}),(function(e){function t(e,t,n,r,i,a){let o={startLine:e,endLine:t};return GB.defined(n)&&(o.startCharacter=n),GB.defined(r)&&(o.endCharacter=r),GB.defined(i)&&(o.kind=i),GB.defined(a)&&(o.collapsedText=a),o}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&GB.uinteger(t.startLine)&&GB.uinteger(t.startLine)&&(GB.undefined(t.startCharacter)||GB.uinteger(t.startCharacter))&&(GB.undefined(t.endCharacter)||GB.uinteger(t.endCharacter))&&(GB.undefined(t.kind)||GB.string(t.kind))}Q(n,`is`),e.is=n})(D0e||={}),(function(e){function t(e,t){return{location:e,message:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&SB.is(t.location)&&GB.string(t.message)}Q(n,`is`),e.is=n})(wB||={}),(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(O0e||={}),(function(e){e.Unnecessary=1,e.Deprecated=2})(k0e||={}),(function(e){function t(e){let t=e;return GB.objectLiteral(t)&&GB.string(t.href)}Q(t,`is`),e.is=t})(A0e||={}),(function(e){function t(e,t,n,r,i,a){let o={range:e,message:t};return GB.defined(n)&&(o.severity=n),GB.defined(r)&&(o.code=r),GB.defined(i)&&(o.source=i),GB.defined(a)&&(o.relatedInformation=a),o}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&xB.is(t.range)&&GB.string(t.message)&&(GB.number(t.severity)||GB.undefined(t.severity))&&(GB.integer(t.code)||GB.string(t.code)||GB.undefined(t.code))&&(GB.undefined(t.codeDescription)||GB.string(t.codeDescription?.href))&&(GB.string(t.source)||GB.undefined(t.source))&&(GB.undefined(t.relatedInformation)||GB.typedArray(t.relatedInformation,wB.is))}Q(n,`is`),e.is=n})(TB||={}),(function(e){function t(e,t,...n){let r={title:e,command:t};return GB.defined(n)&&n.length>0&&(r.arguments=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.string(t.title)&&GB.string(t.command)}Q(n,`is`),e.is=n})(EB||={}),(function(e){function t(e,t){return{range:e,newText:t}}Q(t,`replace`),e.replace=t;function n(e,t){return{range:{start:e,end:e},newText:t}}Q(n,`insert`),e.insert=n;function r(e){return{range:e,newText:``}}Q(r,`del`),e.del=r;function i(e){let t=e;return GB.objectLiteral(t)&&GB.string(t.newText)&&xB.is(t.range)}Q(i,`is`),e.is=i})(DB||={}),(function(e){function t(e,t,n){let r={label:e};return t!==void 0&&(r.needsConfirmation=t),n!==void 0&&(r.description=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&GB.string(t.label)&&(GB.boolean(t.needsConfirmation)||t.needsConfirmation===void 0)&&(GB.string(t.description)||t.description===void 0)}Q(n,`is`),e.is=n})(OB||={}),(function(e){function t(e){let t=e;return GB.string(t)}Q(t,`is`),e.is=t})(kB||={}),(function(e){function t(e,t,n){return{range:e,newText:t,annotationId:n}}Q(t,`replace`),e.replace=t;function n(e,t,n){return{range:{start:e,end:e},newText:t,annotationId:n}}Q(n,`insert`),e.insert=n;function r(e,t){return{range:e,newText:``,annotationId:t}}Q(r,`del`),e.del=r;function i(e){let t=e;return DB.is(t)&&(OB.is(t.annotationId)||kB.is(t.annotationId))}Q(i,`is`),e.is=i})(AB||={}),(function(e){function t(e,t){return{textDocument:e,edits:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&RB.is(t.textDocument)&&Array.isArray(t.edits)}Q(n,`is`),e.is=n})(jB||={}),(function(e){function t(e,t,n){let r={kind:`create`,uri:e};return t!==void 0&&(t.overwrite!==void 0||t.ignoreIfExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`create`&&GB.string(t.uri)&&(t.options===void 0||(t.options.overwrite===void 0||GB.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||GB.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||kB.is(t.annotationId))}Q(n,`is`),e.is=n})(MB||={}),(function(e){function t(e,t,n,r){let i={kind:`rename`,oldUri:e,newUri:t};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(i.options=n),r!==void 0&&(i.annotationId=r),i}Q(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`rename`&&GB.string(t.oldUri)&&GB.string(t.newUri)&&(t.options===void 0||(t.options.overwrite===void 0||GB.boolean(t.options.overwrite))&&(t.options.ignoreIfExists===void 0||GB.boolean(t.options.ignoreIfExists)))&&(t.annotationId===void 0||kB.is(t.annotationId))}Q(n,`is`),e.is=n})(NB||={}),(function(e){function t(e,t,n){let r={kind:`delete`,uri:e};return t!==void 0&&(t.recursive!==void 0||t.ignoreIfNotExists!==void 0)&&(r.options=t),n!==void 0&&(r.annotationId=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return t&&t.kind===`delete`&&GB.string(t.uri)&&(t.options===void 0||(t.options.recursive===void 0||GB.boolean(t.options.recursive))&&(t.options.ignoreIfNotExists===void 0||GB.boolean(t.options.ignoreIfNotExists)))&&(t.annotationId===void 0||kB.is(t.annotationId))}Q(n,`is`),e.is=n})(PB||={}),(function(e){function t(e){let t=e;return t&&(t.changes!==void 0||t.documentChanges!==void 0)&&(t.documentChanges===void 0||t.documentChanges.every(e=>GB.string(e.kind)?MB.is(e)||NB.is(e)||PB.is(e):jB.is(e)))}Q(t,`is`),e.is=t})(FB||={}),IB=class{static{Q(this,`TextEditChangeImpl`)}constructor(e,t){this.edits=e,this.changeAnnotations=t}insert(e,t,n){let r,i;if(n===void 0?r=DB.insert(e,t):kB.is(n)?(i=n,r=AB.insert(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=AB.insert(e,t,i)),this.edits.push(r),i!==void 0)return i}replace(e,t,n){let r,i;if(n===void 0?r=DB.replace(e,t):kB.is(n)?(i=n,r=AB.replace(e,t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=AB.replace(e,t,i)),this.edits.push(r),i!==void 0)return i}delete(e,t){let n,r;if(t===void 0?n=DB.del(e):kB.is(t)?(r=t,n=AB.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),r=this.changeAnnotations.manage(t),n=AB.del(e,r)),this.edits.push(n),r!==void 0)return r}add(e){this.edits.push(e)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(e){if(e===void 0)throw Error(`Text edit change is not configured to manage change annotations.`)}},LB=class{static{Q(this,`ChangeAnnotations`)}constructor(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(e,t){let n;if(kB.is(e)?n=e:(n=this.nextId(),t=e),this._annotations[n]!==void 0)throw Error(`Id ${n} is already in use.`);if(t===void 0)throw Error(`No annotation provided for id ${n}`);return this._annotations[n]=t,this._size++,n}nextId(){return this._counter++,this._counter.toString()}},j0e=class{static{Q(this,`WorkspaceChange`)}constructor(e){this._textEditChanges=Object.create(null),e===void 0?this._workspaceEdit={}:(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new LB(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(e=>{if(jB.is(e)){let t=new IB(e.edits,this._changeAnnotations);this._textEditChanges[e.textDocument.uri]=t}})):e.changes&&Object.keys(e.changes).forEach(t=>{let n=new IB(e.changes[t]);this._textEditChanges[t]=n}))}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(e){if(RB.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let t={uri:e.uri,version:e.version},n=this._textEditChanges[t.uri];if(!n){let e=[],r={textDocument:t,edits:e};this._workspaceEdit.documentChanges.push(r),n=new IB(e,this._changeAnnotations),this._textEditChanges[t.uri]=n}return n}{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw Error(`Workspace edit is not configured for normal text edit changes.`);let t=this._textEditChanges[e];if(!t){let n=[];this._workspaceEdit.changes[e]=n,t=new IB(n),this._textEditChanges[e]=t}return t}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new LB,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;OB.is(t)||kB.is(t)?r=t:n=t;let i,a;if(r===void 0?i=MB.create(e,n):(a=kB.is(r)?r:this._changeAnnotations.manage(r),i=MB.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}renameFile(e,t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let i;OB.is(n)||kB.is(n)?i=n:r=n;let a,o;if(i===void 0?a=NB.create(e,t,r):(o=kB.is(i)?i:this._changeAnnotations.manage(i),a=NB.create(e,t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o}deleteFile(e,t,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw Error(`Workspace edit is not configured for document changes.`);let r;OB.is(t)||kB.is(t)?r=t:n=t;let i,a;if(r===void 0?i=PB.create(e,n):(a=kB.is(r)?r:this._changeAnnotations.manage(r),i=PB.create(e,n,a)),this._workspaceEdit.documentChanges.push(i),a!==void 0)return a}},(function(e){function t(e){return{uri:e}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.string(t.uri)}Q(n,`is`),e.is=n})(M0e||={}),(function(e){function t(e,t){return{uri:e,version:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.string(t.uri)&&GB.integer(t.version)}Q(n,`is`),e.is=n})(N0e||={}),(function(e){function t(e,t){return{uri:e,version:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.string(t.uri)&&(t.version===null||GB.integer(t.version))}Q(n,`is`),e.is=n})(RB||={}),(function(e){function t(e,t,n,r){return{uri:e,languageId:t,version:n,text:r}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.string(t.uri)&&GB.string(t.languageId)&&GB.integer(t.version)&&GB.string(t.text)}Q(n,`is`),e.is=n})(P0e||={}),(function(e){e.PlainText=`plaintext`,e.Markdown=`markdown`;function t(t){let n=t;return n===e.PlainText||n===e.Markdown}Q(t,`is`),e.is=t})(zB||={}),(function(e){function t(e){let t=e;return GB.objectLiteral(e)&&zB.is(t.kind)&&GB.string(t.value)}Q(t,`is`),e.is=t})(BB||={}),(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(F0e||={}),(function(e){e.PlainText=1,e.Snippet=2})(I0e||={}),(function(e){e.Deprecated=1})(L0e||={}),(function(e){function t(e,t,n){return{newText:e,insert:t,replace:n}}Q(t,`create`),e.create=t;function n(e){let t=e;return t&&GB.string(t.newText)&&xB.is(t.insert)&&xB.is(t.replace)}Q(n,`is`),e.is=n})(R0e||={}),(function(e){e.asIs=1,e.adjustIndentation=2})(z0e||={}),(function(e){function t(e){let t=e;return t&&(GB.string(t.detail)||t.detail===void 0)&&(GB.string(t.description)||t.description===void 0)}Q(t,`is`),e.is=t})(B0e||={}),(function(e){function t(e){return{label:e}}Q(t,`create`),e.create=t})(V0e||={}),(function(e){function t(e,t){return{items:e||[],isIncomplete:!!t}}Q(t,`create`),e.create=t})(H0e||={}),(function(e){function t(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,`\\$&`)}Q(t,`fromPlainText`),e.fromPlainText=t;function n(e){let t=e;return GB.string(t)||GB.objectLiteral(t)&&GB.string(t.language)&&GB.string(t.value)}Q(n,`is`),e.is=n})(VB||={}),(function(e){function t(e){let t=e;return!!t&&GB.objectLiteral(t)&&(BB.is(t.contents)||VB.is(t.contents)||GB.typedArray(t.contents,VB.is))&&(e.range===void 0||xB.is(e.range))}Q(t,`is`),e.is=t})(U0e||={}),(function(e){function t(e,t){return t?{label:e,documentation:t}:{label:e}}Q(t,`create`),e.create=t})(W0e||={}),(function(e){function t(e,t,...n){let r={label:e};return GB.defined(t)&&(r.documentation=t),r.parameters=GB.defined(n)?n:[],r}Q(t,`create`),e.create=t})(G0e||={}),(function(e){e.Text=1,e.Read=2,e.Write=3})(K0e||={}),(function(e){function t(e,t){let n={range:e};return GB.number(t)&&(n.kind=t),n}Q(t,`create`),e.create=t})(q0e||={}),(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(J0e||={}),(function(e){e.Deprecated=1})(Y0e||={}),(function(e){function t(e,t,n,r,i){let a={name:e,kind:t,location:{uri:r,range:n}};return i&&(a.containerName=i),a}Q(t,`create`),e.create=t})(X0e||={}),(function(e){function t(e,t,n,r){return r===void 0?{name:e,kind:t,location:{uri:n}}:{name:e,kind:t,location:{uri:n,range:r}}}Q(t,`create`),e.create=t})(Z0e||={}),(function(e){function t(e,t,n,r,i,a){let o={name:e,detail:t,kind:n,range:r,selectionRange:i};return a!==void 0&&(o.children=a),o}Q(t,`create`),e.create=t;function n(e){let t=e;return t&&GB.string(t.name)&&GB.number(t.kind)&&xB.is(t.range)&&xB.is(t.selectionRange)&&(t.detail===void 0||GB.string(t.detail))&&(t.deprecated===void 0||GB.boolean(t.deprecated))&&(t.children===void 0||Array.isArray(t.children))&&(t.tags===void 0||Array.isArray(t.tags))}Q(n,`is`),e.is=n})(Q0e||={}),(function(e){e.Empty=``,e.QuickFix=`quickfix`,e.Refactor=`refactor`,e.RefactorExtract=`refactor.extract`,e.RefactorInline=`refactor.inline`,e.RefactorRewrite=`refactor.rewrite`,e.Source=`source`,e.SourceOrganizeImports=`source.organizeImports`,e.SourceFixAll=`source.fixAll`})($0e||={}),(function(e){e.Invoked=1,e.Automatic=2})(HB||={}),(function(e){function t(e,t,n){let r={diagnostics:e};return t!=null&&(r.only=t),n!=null&&(r.triggerKind=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.typedArray(t.diagnostics,TB.is)&&(t.only===void 0||GB.typedArray(t.only,GB.string))&&(t.triggerKind===void 0||t.triggerKind===HB.Invoked||t.triggerKind===HB.Automatic)}Q(n,`is`),e.is=n})(e2e||={}),(function(e){function t(e,t,n){let r={title:e},i=!0;return typeof t==`string`?(i=!1,r.kind=t):EB.is(t)?r.command=t:r.edit=t,i&&n!==void 0&&(r.kind=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return t&&GB.string(t.title)&&(t.diagnostics===void 0||GB.typedArray(t.diagnostics,TB.is))&&(t.kind===void 0||GB.string(t.kind))&&(t.edit!==void 0||t.command!==void 0)&&(t.command===void 0||EB.is(t.command))&&(t.isPreferred===void 0||GB.boolean(t.isPreferred))&&(t.edit===void 0||FB.is(t.edit))}Q(n,`is`),e.is=n})(t2e||={}),(function(e){function t(e,t){let n={range:e};return GB.defined(t)&&(n.data=t),n}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&xB.is(t.range)&&(GB.undefined(t.command)||EB.is(t.command))}Q(n,`is`),e.is=n})(n2e||={}),(function(e){function t(e,t){return{tabSize:e,insertSpaces:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&GB.uinteger(t.tabSize)&&GB.boolean(t.insertSpaces)}Q(n,`is`),e.is=n})(r2e||={}),(function(e){function t(e,t,n){return{range:e,target:t,data:n}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&xB.is(t.range)&&(GB.undefined(t.target)||GB.string(t.target))}Q(n,`is`),e.is=n})(i2e||={}),(function(e){function t(e,t){return{range:e,parent:t}}Q(t,`create`),e.create=t;function n(t){let n=t;return GB.objectLiteral(n)&&xB.is(n.range)&&(n.parent===void 0||e.is(n.parent))}Q(n,`is`),e.is=n})(a2e||={}),(function(e){e.namespace=`namespace`,e.type=`type`,e.class=`class`,e.enum=`enum`,e.interface=`interface`,e.struct=`struct`,e.typeParameter=`typeParameter`,e.parameter=`parameter`,e.variable=`variable`,e.property=`property`,e.enumMember=`enumMember`,e.event=`event`,e.function=`function`,e.method=`method`,e.macro=`macro`,e.keyword=`keyword`,e.modifier=`modifier`,e.comment=`comment`,e.string=`string`,e.number=`number`,e.regexp=`regexp`,e.operator=`operator`,e.decorator=`decorator`})(o2e||={}),(function(e){e.declaration=`declaration`,e.definition=`definition`,e.readonly=`readonly`,e.static=`static`,e.deprecated=`deprecated`,e.abstract=`abstract`,e.async=`async`,e.modification=`modification`,e.documentation=`documentation`,e.defaultLibrary=`defaultLibrary`})(s2e||={}),(function(e){function t(e){let t=e;return GB.objectLiteral(t)&&(t.resultId===void 0||typeof t.resultId==`string`)&&Array.isArray(t.data)&&(t.data.length===0||typeof t.data[0]==`number`)}Q(t,`is`),e.is=t})(c2e||={}),(function(e){function t(e,t){return{range:e,text:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&xB.is(t.range)&&GB.string(t.text)}Q(n,`is`),e.is=n})(l2e||={}),(function(e){function t(e,t,n){return{range:e,variableName:t,caseSensitiveLookup:n}}Q(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&xB.is(t.range)&&GB.boolean(t.caseSensitiveLookup)&&(GB.string(t.variableName)||t.variableName===void 0)}Q(n,`is`),e.is=n})(u2e||={}),(function(e){function t(e,t){return{range:e,expression:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return t!=null&&xB.is(t.range)&&(GB.string(t.expression)||t.expression===void 0)}Q(n,`is`),e.is=n})(d2e||={}),(function(e){function t(e,t){return{frameId:e,stoppedLocation:t}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.defined(t)&&xB.is(e.stoppedLocation)}Q(n,`is`),e.is=n})(f2e||={}),(function(e){e.Type=1,e.Parameter=2;function t(e){return e===1||e===2}Q(t,`is`),e.is=t})(UB||={}),(function(e){function t(e){return{value:e}}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&(t.tooltip===void 0||GB.string(t.tooltip)||BB.is(t.tooltip))&&(t.location===void 0||SB.is(t.location))&&(t.command===void 0||EB.is(t.command))}Q(n,`is`),e.is=n})(WB||={}),(function(e){function t(e,t,n){let r={position:e,label:t};return n!==void 0&&(r.kind=n),r}Q(t,`create`),e.create=t;function n(e){let t=e;return GB.objectLiteral(t)&&bB.is(t.position)&&(GB.string(t.label)||GB.typedArray(t.label,WB.is))&&(t.kind===void 0||UB.is(t.kind))&&t.textEdits===void 0||GB.typedArray(t.textEdits,DB.is)&&(t.tooltip===void 0||GB.string(t.tooltip)||BB.is(t.tooltip))&&(t.paddingLeft===void 0||GB.boolean(t.paddingLeft))&&(t.paddingRight===void 0||GB.boolean(t.paddingRight))}Q(n,`is`),e.is=n})(p2e||={}),(function(e){function t(e){return{kind:`snippet`,value:e}}Q(t,`createSnippet`),e.createSnippet=t})(m2e||={}),(function(e){function t(e,t,n,r){return{insertText:e,filterText:t,range:n,command:r}}Q(t,`create`),e.create=t})(h2e||={}),(function(e){function t(e){return{items:e}}Q(t,`create`),e.create=t})(g2e||={}),(function(e){e.Invoked=0,e.Automatic=1})(_2e||={}),(function(e){function t(e,t){return{range:e,text:t}}Q(t,`create`),e.create=t})(v2e||={}),(function(e){function t(e,t){return{triggerKind:e,selectedCompletionInfo:t}}Q(t,`create`),e.create=t})(y2e||={}),(function(e){function t(e){let t=e;return GB.objectLiteral(t)&&vB.is(t.uri)&&GB.string(t.name)}Q(t,`is`),e.is=t})(b2e||={}),x2e=[`1252-`,`\r1253-`,`\r`],(function(e){function t(e,t,n,r){return new C2e(e,t,n,r)}Q(t,`create`),e.create=t;function n(e){let t=e;return!!(GB.defined(t)&&GB.string(t.uri)&&(GB.undefined(t.languageId)||GB.string(t.languageId))&&GB.uinteger(t.lineCount)&&GB.func(t.getText)&&GB.func(t.positionAt)&&GB.func(t.offsetAt))}Q(n,`is`),e.is=n;function r(e,t){let n=e.getText(),r=i(t,(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),a=n.length;for(let t=r.length-1;t>=0;t--){let i=r[t],o=e.offsetAt(i.range.start),s=e.offsetAt(i.range.end);if(s<=a)n=n.substring(0,o)+i.newText+n.substring(s,n.length);else throw Error(`Overlapping edit`);a=o}return n}Q(r,`applyEdits`),e.applyEdits=r;function i(e,t){if(e.length<=1)return e;let n=e.length/2|0,r=e.slice(0,n),a=e.slice(n);i(r,t),i(a,t);let o=0,s=0,l=0;for(;o<r.length&&s<a.length;)t(r[o],a[s])<=0?e[l++]=r[o++]:e[l++]=a[s++];for(;o<r.length;)e[l++]=r[o++];for(;s<a.length;)e[l++]=a[s++];return e}Q(i,`mergeSort`)})(S2e||={}),C2e=class{static{Q(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let e=[],t=this._content,n=!0;for(let r=0;r<t.length;r++){n&&=(e.push(r),!1);let i=t.charAt(r);n=i===`\r`||i===`1254-`,i===`\r`&&r+1<t.length&&t.charAt(r+1)===`1255-`&&r++}n&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return bB.create(0,e);for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return bB.create(i,e-t[i])}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line],r=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(n+e.character,r),n)}get lineCount(){return this.getLineOffsets().length}},(function(e){let t=Object.prototype.toString;function n(e){return e!==void 0}Q(n,`defined`),e.defined=n;function r(e){return e===void 0}Q(r,`undefined`),e.undefined=r;function i(e){return e===!0||e===!1}Q(i,`boolean`),e.boolean=i;function a(e){return t.call(e)===`[object String]`}Q(a,`string`),e.string=a;function o(e){return t.call(e)===`[object Number]`}Q(o,`number`),e.number=o;function s(e,n,r){return t.call(e)===`[object Number]`&&n<=e&&e<=r}Q(s,`numberRange`),e.numberRange=s;function l(e){return t.call(e)===`[object Number]`&&-2147483648<=e&&e<=2147483647}Q(l,`integer`),e.integer=l;function u(e){return t.call(e)===`[object Number]`&&0<=e&&e<=2147483647}Q(u,`uinteger`),e.uinteger=u;function d(e){return t.call(e)===`[object Function]`}Q(d,`func`),e.func=d;function f(e){return typeof e==`object`&&!!e}Q(f,`objectLiteral`),e.objectLiteral=f;function p(e,t){return Array.isArray(e)&&e.every(t)}Q(p,`typedArray`),e.typedArray=p})(GB||={})}}),qB=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/ral.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t;function n(){if(t===void 0)throw Error(`No runtime abstraction layer installed`);return t}Q(n,`RAL`),(function(e){function n(e){if(e===void 0)throw Error(`No runtime abstraction layer provided`);t=e}Q(n,`install`),e.install=n})(n||={}),e.default=n}}),JB=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}Q(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}Q(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}Q(r,`number`),e.number=r;function i(e){return e instanceof Error}Q(i,`error`),e.error=i;function a(e){return typeof e==`function`}Q(a,`func`),e.func=a;function o(e){return Array.isArray(e)}Q(o,`array`),e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}Q(s,`stringArray`),e.stringArray=s}}),YB=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/events.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var t=qB(),n;(function(e){let t={dispose(){}};e.None=function(){return t}})(n||(e.Event=n={}));var r=class{static{Q(this,`CallbackList`)}add(e,t=null,n){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(e),this._contexts.push(t),Array.isArray(n)&&n.push({dispose:Q(()=>this.remove(e,t),`dispose`)})}remove(e,t=null){if(!this._callbacks)return;let n=!1;for(let r=0,i=this._callbacks.length;r<i;r++)if(this._callbacks[r]===e){if(this._contexts[r]===t){this._callbacks.splice(r,1),this._contexts.splice(r,1);return}n=!0}if(n)throw Error(`When adding a listener with a context, you should remove it with the same context`)}invoke(...e){if(!this._callbacks)return[];let n=[],r=this._callbacks.slice(0),i=this._contexts.slice(0);for(let a=0,o=r.length;a<o;a++)try{n.push(r[a].apply(i[a],e))}catch(e){(0,t.default)().console.error(e)}return n}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}},i=class e{static{Q(this,`Emitter`)}constructor(e){this._options=e}get event(){return this._event||=(t,n,i)=>{this._callbacks||=new r,this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,n);let a={dispose:Q(()=>{this._callbacks&&(this._callbacks.remove(t,n),a.dispose=e._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))},`dispose`)};return Array.isArray(i)&&i.push(a),a},this._event}fire(e){this._callbacks&&this._callbacks.invoke.call(this._callbacks,e)}dispose(){this._callbacks&&=(this._callbacks.dispose(),void 0)}};e.Emitter=i,i._noop=function(){}}}),XB=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/cancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t=qB(),n=JB(),r=YB(),i;(function(e){e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:r.Event.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:r.Event.None});function t(t){let r=t;return r&&(r===e.None||r===e.Cancelled||n.boolean(r.isCancellationRequested)&&!!r.onCancellationRequested)}Q(t,`is`),e.is=t})(i||(e.CancellationToken=i={}));var a=Object.freeze(function(e,n){let r=(0,t.default)().timer.setTimeout(e.bind(n),0);return{dispose(){r.dispose()}}}),o=class{static{Q(this,`MutableToken`)}constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||=new r.Emitter,this._emitter.event)}dispose(){this._emitter&&=(this._emitter.dispose(),void 0)}};e.CancellationTokenSource=class{static{Q(this,`CancellationTokenSource`)}get token(){return this._token||=new o,this._token}cancel(){this._token?this._token.cancel():this._token=i.Cancelled}dispose(){this._token?this._token instanceof o&&this._token.dispose():this._token=i.None}}}}),ZB=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Message=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType=e.RequestType0=e.AbstractMessageSignature=e.ParameterStructures=e.ResponseError=e.ErrorCodes=void 0;var t=JB(),n;(function(e){e.ParseError=-32700,e.InvalidRequest=-32600,e.MethodNotFound=-32601,e.InvalidParams=-32602,e.InternalError=-32603,e.jsonrpcReservedErrorRangeStart=-32099,e.serverErrorStart=-32099,e.MessageWriteError=-32099,e.MessageReadError=-32098,e.PendingResponseRejected=-32097,e.ConnectionInactive=-32096,e.ServerNotInitialized=-32002,e.UnknownErrorCode=-32001,e.jsonrpcReservedErrorRangeEnd=-32e3,e.serverErrorEnd=-32e3})(n||(e.ErrorCodes=n={})),e.ResponseError=class e extends Error{static{Q(this,`ResponseError`)}constructor(r,i,a){super(i),this.code=t.number(r)?r:n.UnknownErrorCode,this.data=a,Object.setPrototypeOf(this,e.prototype)}toJson(){let e={code:this.code,message:this.message};return this.data!==void 0&&(e.data=this.data),e}};var r=class e{static{Q(this,`ParameterStructures`)}constructor(e){this.kind=e}static is(t){return t===e.auto||t===e.byName||t===e.byPosition}toString(){return this.kind}};e.ParameterStructures=r,r.auto=new r(`auto`),r.byPosition=new r(`byPosition`),r.byName=new r(`byName`);var i=class{static{Q(this,`AbstractMessageSignature`)}constructor(e,t){this.method=e,this.numberOfParams=t}get parameterStructures(){return r.auto}};e.AbstractMessageSignature=i,e.RequestType0=class extends i{static{Q(this,`RequestType0`)}constructor(e){super(e,0)}},e.RequestType=class extends i{static{Q(this,`RequestType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType1=class extends i{static{Q(this,`RequestType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.RequestType2=class extends i{static{Q(this,`RequestType2`)}constructor(e){super(e,2)}},e.RequestType3=class extends i{static{Q(this,`RequestType3`)}constructor(e){super(e,3)}},e.RequestType4=class extends i{static{Q(this,`RequestType4`)}constructor(e){super(e,4)}},e.RequestType5=class extends i{static{Q(this,`RequestType5`)}constructor(e){super(e,5)}},e.RequestType6=class extends i{static{Q(this,`RequestType6`)}constructor(e){super(e,6)}},e.RequestType7=class extends i{static{Q(this,`RequestType7`)}constructor(e){super(e,7)}},e.RequestType8=class extends i{static{Q(this,`RequestType8`)}constructor(e){super(e,8)}},e.RequestType9=class extends i{static{Q(this,`RequestType9`)}constructor(e){super(e,9)}},e.NotificationType=class extends i{static{Q(this,`NotificationType`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType0=class extends i{static{Q(this,`NotificationType0`)}constructor(e){super(e,0)}},e.NotificationType1=class extends i{static{Q(this,`NotificationType1`)}constructor(e,t=r.auto){super(e,1),this._parameterStructures=t}get parameterStructures(){return this._parameterStructures}},e.NotificationType2=class extends i{static{Q(this,`NotificationType2`)}constructor(e){super(e,2)}},e.NotificationType3=class extends i{static{Q(this,`NotificationType3`)}constructor(e){super(e,3)}},e.NotificationType4=class extends i{static{Q(this,`NotificationType4`)}constructor(e){super(e,4)}},e.NotificationType5=class extends i{static{Q(this,`NotificationType5`)}constructor(e){super(e,5)}},e.NotificationType6=class extends i{static{Q(this,`NotificationType6`)}constructor(e){super(e,6)}},e.NotificationType7=class extends i{static{Q(this,`NotificationType7`)}constructor(e){super(e,7)}},e.NotificationType8=class extends i{static{Q(this,`NotificationType8`)}constructor(e){super(e,8)}},e.NotificationType9=class extends i{static{Q(this,`NotificationType9`)}constructor(e){super(e,9)}};var a;(function(e){function n(e){let n=e;return n&&t.string(n.method)&&(t.string(n.id)||t.number(n.id))}Q(n,`isRequest`),e.isRequest=n;function r(e){let n=e;return n&&t.string(n.method)&&e.id===void 0}Q(r,`isNotification`),e.isNotification=r;function i(e){let n=e;return n&&(n.result!==void 0||!!n.error)&&(t.string(n.id)||t.number(n.id)||n.id===null)}Q(i,`isResponse`),e.isResponse=i})(a||(e.Message=a={}))}}),QB=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/linkedMap.js"(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.LRUCache=e.LinkedMap=e.Touch=void 0;var n;(function(e){e.None=0,e.First=1,e.AsOld=e.First,e.Last=2,e.AsNew=e.Last})(n||(e.Touch=n={}));var r=class{static{Q(this,`LinkedMap`)}constructor(){this[t]=`LinkedMap`,this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(e){return this._map.has(e)}get(e,t=n.None){let r=this._map.get(e);if(r)return t!==n.None&&this.touch(r,t),r.value}set(e,t,r=n.None){let i=this._map.get(e);if(i)i.value=t,r!==n.None&&this.touch(i,r);else{switch(i={key:e,value:t,next:void 0,previous:void 0},r){case n.None:this.addItemLast(i);break;case n.First:this.addItemFirst(i);break;case n.Last:this.addItemLast(i);break;default:this.addItemLast(i)}this._map.set(e,i),this._size++}return this}delete(e){return!!this.remove(e)}remove(e){let t=this._map.get(e);if(t)return this._map.delete(e),this.removeItem(t),this._size--,t.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw Error(`Invalid list`);let e=this._head;return this._map.delete(e.key),this.removeItem(e),this._size--,e.value}forEach(e,t){let n=this._state,r=this._head;for(;r;){if(t?e.bind(t)(r.value,r.key,this):e(r.value,r.key,this),this._state!==n)throw Error(`LinkedMap got modified during iteration.`);r=r.next}}keys(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:Q(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.key,done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}values(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:Q(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:t.value,done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}entries(){let e=this._state,t=this._head,n={[Symbol.iterator]:()=>n,next:Q(()=>{if(this._state!==e)throw Error(`LinkedMap got modified during iteration.`);if(t){let e={value:[t.key,t.value],done:!1};return t=t.next,e}return{value:void 0,done:!0}},`next`)};return n}[(t=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}let t=this._head,n=this.size;for(;t&&n>e;)this._map.delete(t.key),t=t.next,n--;this._head=t,this._size=n,t&&(t.previous=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 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 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 Error(`Invalid list`);e.next.previous=void 0,this._head=e.next}else if(e===this._tail){if(!e.previous)throw Error(`Invalid list`);e.previous.next=void 0,this._tail=e.previous}else{let t=e.next,n=e.previous;if(!t||!n)throw Error(`Invalid list`);t.previous=n,n.next=t}e.next=void 0,e.previous=void 0,this._state++}touch(e,t){if(!this._head||!this._tail)throw Error(`Invalid list`);if(t===n.First||t===n.Last){if(t===n.First){if(e===this._head)return;let t=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(t.previous=n,n.next=t),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===n.Last){if(e===this._tail)return;let t=e.next,n=e.previous;e===this._head?(t.previous=void 0,this._head=t):(t.previous=n,n.next=t),e.next=void 0,e.previous=this._tail,this._tail.next=e,this._tail=e,this._state++}}}toJSON(){let e=[];return this.forEach((t,n)=>{e.push([n,t])}),e}fromJSON(e){this.clear();for(let[t,n]of e)this.set(t,n)}};e.LinkedMap=r,e.LRUCache=class extends r{static{Q(this,`LRUCache`)}constructor(e,t=1){super(),this._limit=e,this._ratio=Math.min(Math.max(0,t),1)}get limit(){return this._limit}set limit(e){this._limit=e,this.checkTrim()}get ratio(){return this._ratio}set ratio(e){this._ratio=Math.min(Math.max(0,e),1),this.checkTrim()}get(e,t=n.AsNew){return super.get(e,t)}peek(e){return super.get(e,n.None)}set(e,t){return super.set(e,t,n.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}}}),w2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/disposable.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Disposable=void 0;var t;(function(e){function t(e){return{dispose:e}}Q(t,`create`),e.create=t})(t||(e.Disposable=t={}))}}),T2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/sharedArrayCancellation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=void 0;var t=XB(),n;(function(e){e.Continue=0,e.Cancelled=1})(n||={}),e.SharedArraySenderStrategy=class{static{Q(this,`SharedArraySenderStrategy`)}constructor(){this.buffers=new Map}enableCancellation(e){if(e.id===null)return;let t=new SharedArrayBuffer(4),r=new Int32Array(t,0,1);r[0]=n.Continue,this.buffers.set(e.id,t),e.$cancellationData=t}async sendCancellation(e,t){let r=this.buffers.get(t);if(r===void 0)return;let i=new Int32Array(r,0,1);Atomics.store(i,0,n.Cancelled)}cleanup(e){this.buffers.delete(e)}dispose(){this.buffers.clear()}};var r=class{static{Q(this,`SharedArrayBufferCancellationToken`)}constructor(e){this.data=new Int32Array(e,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===n.Cancelled}get onCancellationRequested(){throw Error(`Cancellation over SharedArrayBuffer doesn't support cancellation events`)}},i=class{static{Q(this,`SharedArrayBufferCancellationTokenSource`)}constructor(e){this.token=new r(e)}cancel(){}dispose(){}};e.SharedArrayReceiverStrategy=class{static{Q(this,`SharedArrayReceiverStrategy`)}constructor(){this.kind=`request`}createCancellationTokenSource(e){let n=e.$cancellationData;return n===void 0?new t.CancellationTokenSource:new i(n)}}}}),$B=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/semaphore.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Semaphore=void 0;var t=qB();e.Semaphore=class{static{Q(this,`Semaphore`)}constructor(e=1){if(e<=0)throw Error(`Capacity must be greater than 0`);this._capacity=e,this._active=0,this._waiting=[]}lock(e){return new Promise((t,n)=>{this._waiting.push({thunk:e,resolve:t,reject:n}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length!==0&&this._active!==this._capacity&&(0,t.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;let e=this._waiting.shift();if(this._active++,this._active>this._capacity)throw Error(`To many thunks active`);try{let t=e.thunk();t instanceof Promise?t.then(t=>{this._active--,e.resolve(t),this.runNext()},t=>{this._active--,e.reject(t),this.runNext()}):(this._active--,e.resolve(t),this.runNext())}catch(t){this._active--,e.reject(t),this.runNext()}}}}}),E2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageReader.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=void 0;var t=qB(),n=JB(),r=YB(),i=$B(),a;(function(e){function t(e){let t=e;return t&&n.func(t.listen)&&n.func(t.dispose)&&n.func(t.onError)&&n.func(t.onClose)&&n.func(t.onPartialMessage)}Q(t,`is`),e.is=t})(a||(e.MessageReader=a={}));var o=class{static{Q(this,`AbstractMessageReader`)}constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter,this.partialMessageEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e){this.errorEmitter.fire(this.asError(e))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(e){this.partialMessageEmitter.fire(e)}asError(e){return e instanceof Error?e:Error(`Reader received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageReader=o;var s;(function(e){function n(e){let n,r,i=new Map,a,o=new Map;if(e===void 0||typeof e==`string`)n=e??`utf-8`;else{if(n=e.charset??`utf-8`,e.contentDecoder!==void 0&&(r=e.contentDecoder,i.set(r.name,r)),e.contentDecoders!==void 0)for(let t of e.contentDecoders)i.set(t.name,t);if(e.contentTypeDecoder!==void 0&&(a=e.contentTypeDecoder,o.set(a.name,a)),e.contentTypeDecoders!==void 0)for(let t of e.contentTypeDecoders)o.set(t.name,t)}return a===void 0&&(a=(0,t.default)().applicationJson.decoder,o.set(a.name,a)),{charset:n,contentDecoder:r,contentDecoders:i,contentTypeDecoder:a,contentTypeDecoders:o}}Q(n,`fromOptions`),e.fromOptions=n})(s||={}),e.ReadableStreamMessageReader=class extends o{static{Q(this,`ReadableStreamMessageReader`)}constructor(e,n){super(),this.readable=e,this.options=s.fromOptions(n),this.buffer=(0,t.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new i.Semaphore(1)}set partialMessageTimeout(e){this._partialMessageTimeout=e}get partialMessageTimeout(){return this._partialMessageTimeout}listen(e){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=e;let t=this.readable.onData(e=>{this.onData(e)});return this.readable.onError(e=>this.fireError(e)),this.readable.onClose(()=>this.fireClose()),t}onData(e){try{for(this.buffer.append(e);;){if(this.nextMessageLength===-1){let e=this.buffer.tryReadHeaders(!0);if(!e)return;let t=e.get(`content-length`);if(!t){this.fireError(Error(`Header must provide a Content-Length property.1256-${JSON.stringify(Object.fromEntries(e))}`));return}let n=parseInt(t);if(isNaN(n)){this.fireError(Error(`Content-Length value must be a number. Got ${t}`));return}this.nextMessageLength=n}let e=this.buffer.tryReadBody(this.nextMessageLength);if(e===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{let t=this.options.contentDecoder===void 0?e:await this.options.contentDecoder.decode(e),n=await this.options.contentTypeDecoder.decode(t,this.options);this.callback(n)}).catch(e=>{this.fireError(e)})}}catch(e){this.fireError(e)}}clearPartialMessageTimer(){this.partialMessageTimer&&=(this.partialMessageTimer.dispose(),void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((e,t)=>{this.partialMessageTimer=void 0,e===this.messageToken&&(this.firePartialMessage({messageToken:e,waitingTime:t}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}}}),D2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageWriter.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=void 0;var t=qB(),n=JB(),r=$B(),i=YB(),a=`Content-Length: `,o=`\r1257-`,s;(function(e){function t(e){let t=e;return t&&n.func(t.dispose)&&n.func(t.onClose)&&n.func(t.onError)&&n.func(t.write)}Q(t,`is`),e.is=t})(s||(e.MessageWriter=s={}));var l=class{static{Q(this,`AbstractMessageWriter`)}constructor(){this.errorEmitter=new i.Emitter,this.closeEmitter=new i.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(e,t,n){this.errorEmitter.fire([this.asError(e),t,n])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(e){return e instanceof Error?e:Error(`Writer received error. Reason: ${n.string(e.message)?e.message:`unknown`}`)}};e.AbstractMessageWriter=l;var u;(function(e){function n(e){return e===void 0||typeof e==`string`?{charset:e??`utf-8`,contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:e.charset??`utf-8`,contentEncoder:e.contentEncoder,contentTypeEncoder:e.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}Q(n,`fromOptions`),e.fromOptions=n})(u||={}),e.WriteableStreamMessageWriter=class extends l{static{Q(this,`WriteableStreamMessageWriter`)}constructor(e,t){super(),this.writable=e,this.options=u.fromOptions(t),this.errorCount=0,this.writeSemaphore=new r.Semaphore(1),this.writable.onError(e=>this.fireError(e)),this.writable.onClose(()=>this.fireClose())}async write(e){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(e,this.options).then(e=>this.options.contentEncoder===void 0?e:this.options.contentEncoder.encode(e)).then(t=>{let n=[];return n.push(a,t.byteLength.toString(),o),n.push(o),this.doWrite(e,n,t)},e=>{throw this.fireError(e),e}))}async doWrite(e,t,n){try{return await this.writable.write(t.join(``),`ascii`),this.writable.write(n)}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){this.writable.end()}}}}),O2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/messageBuffer.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.AbstractMessageBuffer=void 0;var t=13,n=10,r=`\r1258-`;e.AbstractMessageBuffer=class{static{Q(this,`AbstractMessageBuffer`)}constructor(e=`utf-8`){this._encoding=e,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(e){let t=typeof e==`string`?this.fromString(e,this._encoding):e;this._chunks.push(t),this._totalLength+=t.byteLength}tryReadHeaders(e=!1){if(this._chunks.length===0)return;let i=0,a=0,o=0,s=0;row:for(;a<this._chunks.length;){let e=this._chunks[a];o=0;column:for(;o<e.length;){switch(e[o]){case t:switch(i){case 0:i=1;break;case 2:i=3;break;default:i=0}break;case n:switch(i){case 1:i=2;break;case 3:i=4,o++;break row;default:i=0}break;default:i=0}o++}s+=e.byteLength,a++}if(i!==4)return;let l=this._read(s+o),u=new Map,d=this.toString(l,`ascii`).split(r);if(d.length<2)return u;for(let t=0;t<d.length-2;t++){let n=d[t],r=n.indexOf(`:`);if(r===-1)throw Error(`Message header must separate key and value using ':'1259-${n}`);let i=n.substr(0,r),a=n.substr(r+1).trim();u.set(e?i.toLowerCase():i,a)}return u}tryReadBody(e){if(!(this._totalLength<e))return this._read(e)}get numberOfBytes(){return this._totalLength}_read(e){if(e===0)return this.emptyBuffer();if(e>this._totalLength)throw Error(`Cannot read so many bytes!`);if(this._chunks[0].byteLength===e){let t=this._chunks[0];return this._chunks.shift(),this._totalLength-=e,this.asNative(t)}if(this._chunks[0].byteLength>e){let t=this._chunks[0],n=this.asNative(t,e);return this._chunks[0]=t.slice(e),this._totalLength-=e,n}let t=this.allocNative(e),n=0;for(;e>0;){let r=this._chunks[0];if(r.byteLength>e){let i=r.slice(0,e);t.set(i,n),n+=e,this._chunks[0]=r.slice(e),this._totalLength-=e,e-=e}else t.set(r,n),n+=r.byteLength,this._chunks.shift(),this._totalLength-=r.byteLength,e-=r.byteLength}return t}}}}),k2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.ConnectionOptions=e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.RequestCancellationReceiverStrategy=e.IdCancellationReceiverStrategy=e.ConnectionStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=e.NullLogger=e.ProgressType=e.ProgressToken=void 0;var t=qB(),n=JB(),r=ZB(),i=QB(),a=YB(),o=XB(),s;(function(e){e.type=new r.NotificationType(`$/cancelRequest`)})(s||={});var l;(function(e){function t(e){return typeof e==`string`||typeof e==`number`}Q(t,`is`),e.is=t})(l||(e.ProgressToken=l={}));var u;(function(e){e.type=new r.NotificationType(`$/progress`)})(u||={}),e.ProgressType=class{static{Q(this,`ProgressType`)}constructor(){}};var d;(function(e){function t(e){return n.func(e)}Q(t,`is`),e.is=t})(d||={}),e.NullLogger=Object.freeze({error:Q(()=>{},`error`),warn:Q(()=>{},`warn`),info:Q(()=>{},`info`),log:Q(()=>{},`log`)});var f;(function(e){e[e.Off=0]=`Off`,e[e.Messages=1]=`Messages`,e[e.Compact=2]=`Compact`,e[e.Verbose=3]=`Verbose`})(f||(e.Trace=f={}));var p;(function(e){e.Off=`off`,e.Messages=`messages`,e.Compact=`compact`,e.Verbose=`verbose`})(p||(e.TraceValues=p={})),(function(e){function t(t){if(!n.string(t))return e.Off;switch(t=t.toLowerCase(),t){case`off`:return e.Off;case`messages`:return e.Messages;case`compact`:return e.Compact;case`verbose`:return e.Verbose;default:return e.Off}}Q(t,`fromString`),e.fromString=t;function r(t){switch(t){case e.Off:return`off`;case e.Messages:return`messages`;case e.Compact:return`compact`;case e.Verbose:return`verbose`;default:return`off`}}Q(r,`toString`),e.toString=r})(f||(e.Trace=f={}));var m;(function(e){e.Text=`text`,e.JSON=`json`})(m||(e.TraceFormat=m={})),(function(e){function t(t){return n.string(t)?(t=t.toLowerCase(),t===`json`?e.JSON:e.Text):e.Text}Q(t,`fromString`),e.fromString=t})(m||(e.TraceFormat=m={}));var h;(function(e){e.type=new r.NotificationType(`$/setTrace`)})(h||(e.SetTraceNotification=h={}));var g;(function(e){e.type=new r.NotificationType(`$/logTrace`)})(g||(e.LogTraceNotification=g={}));var _;(function(e){e[e.Closed=1]=`Closed`,e[e.Disposed=2]=`Disposed`,e[e.AlreadyListening=3]=`AlreadyListening`})(_||(e.ConnectionErrors=_={}));var v=class e extends Error{static{Q(this,`ConnectionError`)}constructor(t,n){super(n),this.code=t,Object.setPrototypeOf(this,e.prototype)}};e.ConnectionError=v;var y;(function(e){function t(e){let t=e;return t&&n.func(t.cancelUndispatched)}Q(t,`is`),e.is=t})(y||(e.ConnectionStrategy=y={}));var b;(function(e){function t(e){let t=e;return t&&(t.kind===void 0||t.kind===`id`)&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}Q(t,`is`),e.is=t})(b||(e.IdCancellationReceiverStrategy=b={}));var x;(function(e){function t(e){let t=e;return t&&t.kind===`request`&&n.func(t.createCancellationTokenSource)&&(t.dispose===void 0||n.func(t.dispose))}Q(t,`is`),e.is=t})(x||(e.RequestCancellationReceiverStrategy=x={}));var S;(function(e){e.Message=Object.freeze({createCancellationTokenSource(e){return new o.CancellationTokenSource}});function t(e){return b.is(e)||x.is(e)}Q(t,`is`),e.is=t})(S||(e.CancellationReceiverStrategy=S={}));var C;(function(e){e.Message=Object.freeze({sendCancellation(e,t){return e.sendNotification(s.type,{id:t})},cleanup(e){}});function t(e){let t=e;return t&&n.func(t.sendCancellation)&&n.func(t.cleanup)}Q(t,`is`),e.is=t})(C||(e.CancellationSenderStrategy=C={}));var w;(function(e){e.Message=Object.freeze({receiver:S.Message,sender:C.Message});function t(e){let t=e;return t&&S.is(t.receiver)&&C.is(t.sender)}Q(t,`is`),e.is=t})(w||(e.CancellationStrategy=w={}));var T;(function(e){function t(e){let t=e;return t&&n.func(t.handleMessage)}Q(t,`is`),e.is=t})(T||(e.MessageStrategy=T={}));var E;(function(e){function t(e){let t=e;return t&&(w.is(t.cancellationStrategy)||y.is(t.connectionStrategy)||T.is(t.messageStrategy))}Q(t,`is`),e.is=t})(E||(e.ConnectionOptions=E={}));var D;(function(e){e[e.New=1]=`New`,e[e.Listening=2]=`Listening`,e[e.Closed=3]=`Closed`,e[e.Disposed=4]=`Disposed`})(D||={});function O(p,y,x,S){let C=x===void 0?e.NullLogger:x,E=0,O=0,k=0,A,j=new Map,M,N=new Map,P=new Map,F,I=new i.LinkedMap,L=new Map,R=new Set,ee=new Map,z=f.Off,B=m.Text,te,ne=D.New,re=new a.Emitter,ie=new a.Emitter,ae=new a.Emitter,oe=new a.Emitter,se=new a.Emitter,ce=S&&S.cancellationStrategy?S.cancellationStrategy:w.Message;function le(e){if(e===null)throw Error(`Can't send requests with id null since the response can't be correlated.`);return`req-`+e.toString()}Q(le,`createRequestQueueKey`);function ue(e){return e===null?`res-unknown-`+(++k).toString():`res-`+e.toString()}Q(ue,`createResponseQueueKey`);function de(){return`not-`+(++O).toString()}Q(de,`createNotificationQueueKey`);function fe(e,t){r.Message.isRequest(t)?e.set(le(t.id),t):r.Message.isResponse(t)?e.set(ue(t.id),t):e.set(de(),t)}Q(fe,`addMessageToQueue`);function pe(e){}Q(pe,`cancelUndispatched`);function me(){return ne===D.Listening}Q(me,`isListening`);function he(){return ne===D.Closed}Q(he,`isClosed`);function ge(){return ne===D.Disposed}Q(ge,`isDisposed`);function _e(){(ne===D.New||ne===D.Listening)&&(ne=D.Closed,ie.fire(void 0))}Q(_e,`closeHandler`);function ve(e){re.fire([e,void 0,void 0])}Q(ve,`readErrorHandler`);function ye(e){re.fire(e)}Q(ye,`writeErrorHandler`),p.onClose(_e),p.onError(ve),y.onClose(_e),y.onError(ye);function be(){F||I.size===0||(F=(0,t.default)().timer.setImmediate(()=>{F=void 0,Se()}))}Q(be,`triggerMessageQueue`);function xe(e){r.Message.isRequest(e)?Ce(e):r.Message.isNotification(e)?Te(e):r.Message.isResponse(e)?we(e):Ee(e)}Q(xe,`handleMessage`);function Se(){if(I.size===0)return;let e=I.shift();try{let t=S?.messageStrategy;T.is(t)?t.handleMessage(e,xe):xe(e)}finally{be()}}Q(Se,`processMessageQueue`);let V=Q(e=>{try{if(r.Message.isNotification(e)&&e.method===s.type.method){let t=e.params.id,n=le(t),i=I.get(n);if(r.Message.isRequest(i)){let r=S?.connectionStrategy,a=r&&r.cancelUndispatched?r.cancelUndispatched(i,pe):void 0;if(a&&(a.error!==void 0||a.result!==void 0)){I.delete(n),ee.delete(t),a.id=i.id,ke(a,e.method,Date.now()),y.write(a).catch(()=>C.error(`Sending response for canceled message failed.`));return}}let a=ee.get(t);if(a!==void 0){a.cancel(),U(e);return}R.add(t)}fe(I,e)}finally{be()}},`callback`);function Ce(e){if(ge())return;function t(t,n,i){let a={jsonrpc:`2.0`,id:e.id};t instanceof r.ResponseError?a.error=t.toJson():a.result=t===void 0?null:t,ke(a,n,i),y.write(a).catch(()=>C.error(`Sending response failed.`))}Q(t,`reply`);function i(t,n,r){let i={jsonrpc:`2.0`,id:e.id,error:t.toJson()};ke(i,n,r),y.write(i).catch(()=>C.error(`Sending response failed.`))}Q(i,`replyError`);function a(t,n,r){t===void 0&&(t=null);let i={jsonrpc:`2.0`,id:e.id,result:t};ke(i,n,r),y.write(i).catch(()=>C.error(`Sending response failed.`))}Q(a,`replySuccess`),Ae(e);let o=j.get(e.method),s,l;o&&(s=o.type,l=o.handler);let u=Date.now();if(l||A){let o=e.id??String(Date.now()),d=b.is(ce.receiver)?ce.receiver.createCancellationTokenSource(o):ce.receiver.createCancellationTokenSource(e);e.id!==null&&R.has(e.id)&&d.cancel(),e.id!==null&&ee.set(o,d);try{let f;if(l){if(e.params===void 0){if(s!==void 0&&s.numberOfParams!==0){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines ${s.numberOfParams} params but received none.`),e.method,u);return}f=l(d.token)}else if(Array.isArray(e.params)){if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byName){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by name but received parameters by position`),e.method,u);return}f=l(...e.params,d.token)}else{if(s!==void 0&&s.parameterStructures===r.ParameterStructures.byPosition){i(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${e.method} defines parameters by position but received parameters by name`),e.method,u);return}f=l(e.params,d.token)}}else A&&(f=A(e.method,e.params,d.token));let p=f;f?p.then?p.then(n=>{ee.delete(o),t(n,e.method,u)},t=>{ee.delete(o),t instanceof r.ResponseError?i(t,e.method,u):t&&n.string(t.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${t.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}):(ee.delete(o),t(f,e.method,u)):(ee.delete(o),a(f,e.method,u))}catch(a){ee.delete(o),a instanceof r.ResponseError?t(a,e.method,u):a&&n.string(a.message)?i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed with message: ${a.message}`),e.method,u):i(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${e.method} failed unexpectedly without providing any details.`),e.method,u)}}else i(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${e.method}`),e.method,u)}Q(Ce,`handleRequest`);function we(e){if(!ge()){if(e.id===null)e.error?C.error(`Received response message without id: Error is: 1260-${JSON.stringify(e.error,void 0,4)}`):C.error(`Received response message without id. No further error information provided.`);else{let t=e.id,n=L.get(t);if(je(e,n),n!==void 0){L.delete(t);try{if(e.error){let t=e.error;n.reject(new r.ResponseError(t.code,t.message,t.data))}else if(e.result!==void 0)n.resolve(e.result);else throw Error(`Should never happen.`)}catch(e){e.message?C.error(`Response handler '${n.method}' failed with message: ${e.message}`):C.error(`Response handler '${n.method}' failed unexpectedly.`)}}}}}Q(we,`handleResponse`);function Te(e){if(ge())return;let t,n;if(e.method===s.type.method){let t=e.params.id;R.delete(t),U(e);return}{let r=N.get(e.method);r&&(n=r.handler,t=r.type)}if(n||M)try{if(U(e),n){if(e.params===void 0)t!==void 0&&t.numberOfParams!==0&&t.parameterStructures!==r.ParameterStructures.byName&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received none.`),n();else if(Array.isArray(e.params)){let i=e.params;e.method===u.type.method&&i.length===2&&l.is(i[0])?n({token:i[0],value:i[1]}):(t!==void 0&&(t.parameterStructures===r.ParameterStructures.byName&&C.error(`Notification ${e.method} defines parameters by name but received parameters by position`),t.numberOfParams!==e.params.length&&C.error(`Notification ${e.method} defines ${t.numberOfParams} params but received ${i.length} arguments`)),n(...i))}else t!==void 0&&t.parameterStructures===r.ParameterStructures.byPosition&&C.error(`Notification ${e.method} defines parameters by position but received parameters by name`),n(e.params)}else M&&M(e.method,e.params)}catch(t){t.message?C.error(`Notification handler '${e.method}' failed with message: ${t.message}`):C.error(`Notification handler '${e.method}' failed unexpectedly.`)}else ae.fire(e)}Q(Te,`handleNotification`);function Ee(e){if(!e){C.error(`Received empty message.`);return}C.error(`Received message which is neither a response nor a notification message:1261-${JSON.stringify(e,null,4)}`);let t=e;if(n.string(t.id)||n.number(t.id)){let e=t.id,n=L.get(e);n&&n.reject(Error(`The received response has neither a result nor an error property.`))}}Q(Ee,`handleInvalidMessage`);function De(e){if(e!=null)switch(z){case f.Verbose:return JSON.stringify(e,null,4);case f.Compact:return JSON.stringify(e);default:return}}Q(De,`stringifyTrace`);function H(e){if(!(z===f.Off||!te)){if(B===m.Text){let t;(z===f.Verbose||z===f.Compact)&&e.params&&(t=`Params: ${De(e.params)}1262-1263-`),te.log(`Sending request '${e.method} - (${e.id})'.`,t)}else Me(`send-request`,e)}}Q(H,`traceSendingRequest`);function Oe(e){if(!(z===f.Off||!te)){if(B===m.Text){let t;(z===f.Verbose||z===f.Compact)&&(t=e.params?`Params: ${De(e.params)}1264-1265-`:`No parameters provided.1266-1267-`),te.log(`Sending notification '${e.method}'.`,t)}else Me(`send-notification`,e)}}Q(Oe,`traceSendingNotification`);function ke(e,t,n){if(!(z===f.Off||!te)){if(B===m.Text){let r;(z===f.Verbose||z===f.Compact)&&(e.error&&e.error.data?r=`Error data: ${De(e.error.data)}1268-1269-`:e.result?r=`Result: ${De(e.result)}1270-1271-`:e.error===void 0&&(r=`No result returned.1272-1273-`)),te.log(`Sending response '${t} - (${e.id})'. Processing request took ${Date.now()-n}ms`,r)}else Me(`send-response`,e)}}Q(ke,`traceSendingResponse`);function Ae(e){if(!(z===f.Off||!te)){if(B===m.Text){let t;(z===f.Verbose||z===f.Compact)&&e.params&&(t=`Params: ${De(e.params)}1274-1275-`),te.log(`Received request '${e.method} - (${e.id})'.`,t)}else Me(`receive-request`,e)}}Q(Ae,`traceReceivedRequest`);function U(e){if(!(z===f.Off||!te||e.method===g.type.method)){if(B===m.Text){let t;(z===f.Verbose||z===f.Compact)&&(t=e.params?`Params: ${De(e.params)}1276-1277-`:`No parameters provided.1278-1279-`),te.log(`Received notification '${e.method}'.`,t)}else Me(`receive-notification`,e)}}Q(U,`traceReceivedNotification`);function je(e,t){if(!(z===f.Off||!te)){if(B===m.Text){let n;if((z===f.Verbose||z===f.Compact)&&(e.error&&e.error.data?n=`Error data: ${De(e.error.data)}1280-1281-`:e.result?n=`Result: ${De(e.result)}1282-1283-`:e.error===void 0&&(n=`No result returned.1284-1285-`)),t){let r=e.error?` Request failed: ${e.error.message} (${e.error.code}).`:``;te.log(`Received response '${t.method} - (${e.id})' in ${Date.now()-t.timerStart}ms.${r}`,n)}else te.log(`Received response ${e.id} without active response promise.`,n)}else Me(`receive-response`,e)}}Q(je,`traceReceivedResponse`);function Me(e,t){if(!te||z===f.Off)return;let n={isLSPMessage:!0,type:e,message:t,timestamp:Date.now()};te.log(n)}Q(Me,`logLSPMessage`);function Ne(){if(he())throw new v(_.Closed,`Connection is closed.`);if(ge())throw new v(_.Disposed,`Connection is disposed.`)}Q(Ne,`throwIfClosedOrDisposed`);function Pe(){if(me())throw new v(_.AlreadyListening,`Connection is already listening`)}Q(Pe,`throwIfListening`);function Fe(){if(!me())throw Error(`Call listen() first.`)}Q(Fe,`throwIfNotListening`);function Ie(e){return e===void 0?null:e}Q(Ie,`undefinedToNull`);function Le(e){if(e!==null)return e}Q(Le,`nullToUndefined`);function Re(e){return e!=null&&!Array.isArray(e)&&typeof e==`object`}Q(Re,`isNamedParam`);function ze(e,t){switch(e){case r.ParameterStructures.auto:return Re(t)?Le(t):[Ie(t)];case r.ParameterStructures.byName:if(!Re(t))throw Error(`Received parameters by name but param is not an object literal.`);return Le(t);case r.ParameterStructures.byPosition:return[Ie(t)];default:throw Error(`Unknown parameter structure ${e.toString()}`)}}Q(ze,`computeSingleParam`);function Be(e,t){let n,r=e.numberOfParams;switch(r){case 0:n=void 0;break;case 1:n=ze(e.parameterStructures,t[0]);break;default:n=[];for(let e=0;e<t.length&&e<r;e++)n.push(Ie(t[e]));if(t.length<r)for(let e=t.length;e<r;e++)n.push(null)}return n}Q(Be,`computeMessageParams`);let Ve={sendNotification:Q((e,...t)=>{Ne();let i,a;if(n.string(e)){i=e;let n=t[0],o=0,s=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(o=1,s=n);let l=t.length,u=l-o;switch(u){case 0:a=void 0;break;case 1:a=ze(s,t[o]);break;default:if(s===r.ParameterStructures.byName)throw Error(`Received ${u} parameters for 'by Name' notification parameter structure.`);a=t.slice(o,l).map(e=>Ie(e))}}else{let n=t;i=e.method,a=Be(e,n)}let o={jsonrpc:`2.0`,method:i,params:a};return Oe(o),y.write(o).catch(e=>{throw C.error(`Sending notification failed.`),e})},`sendNotification`),onNotification:Q((e,t)=>{Ne();let r;return n.func(e)?M=e:t&&(n.string(e)?(r=e,N.set(e,{type:void 0,handler:t})):(r=e.method,N.set(e.method,{type:e,handler:t}))),{dispose:Q(()=>{r===void 0?M=void 0:N.delete(r)},`dispose`)}},`onNotification`),onProgress:Q((e,t,n)=>{if(P.has(t))throw Error(`Progress handler for token ${t} already registered`);return P.set(t,n),{dispose:Q(()=>{P.delete(t)},`dispose`)}},`onProgress`),sendProgress:Q((e,t,n)=>Ve.sendNotification(u.type,{token:t,value:n}),`sendProgress`),onUnhandledProgress:oe.event,sendRequest:Q((e,...t)=>{Ne(),Fe();let i,a,s;if(n.string(e)){i=e;let n=t[0],l=t[t.length-1],u=0,d=r.ParameterStructures.auto;r.ParameterStructures.is(n)&&(u=1,d=n);let f=t.length;o.CancellationToken.is(l)&&(--f,s=l);let p=f-u;switch(p){case 0:a=void 0;break;case 1:a=ze(d,t[u]);break;default:if(d===r.ParameterStructures.byName)throw Error(`Received ${p} parameters for 'by Name' request parameter structure.`);a=t.slice(u,f).map(e=>Ie(e))}}else{let n=t;i=e.method,a=Be(e,n);let r=e.numberOfParams;s=o.CancellationToken.is(n[r])?n[r]:void 0}let l=E++,u;s&&(u=s.onCancellationRequested(()=>{let e=ce.sender.sendCancellation(Ve,l);return e===void 0?(C.log(`Received no promise from cancellation strategy when cancelling id ${l}`),Promise.resolve()):e.catch(()=>{C.log(`Sending cancellation messages for id ${l} failed`)})}));let d={jsonrpc:`2.0`,id:l,method:i,params:a};return H(d),typeof ce.sender.enableCancellation==`function`&&ce.sender.enableCancellation(d),new Promise(async(e,t)=>{let n=Q(t=>{e(t),ce.sender.cleanup(l),u?.dispose()},`resolveWithCleanup`),a=Q(e=>{t(e),ce.sender.cleanup(l),u?.dispose()},`rejectWithCleanup`),o={method:i,timerStart:Date.now(),resolve:n,reject:a};try{await y.write(d),L.set(l,o)}catch(e){throw C.error(`Sending request failed.`),o.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,e.message?e.message:`Unknown reason`)),e}})},`sendRequest`),onRequest:Q((e,t)=>{Ne();let r=null;return d.is(e)?(r=void 0,A=e):n.string(e)?(r=null,t!==void 0&&(r=e,j.set(e,{handler:t,type:void 0}))):t!==void 0&&(r=e.method,j.set(e.method,{type:e,handler:t})),{dispose:Q(()=>{r!==null&&(r===void 0?A=void 0:j.delete(r))},`dispose`)}},`onRequest`),hasPendingResponse:Q(()=>L.size>0,`hasPendingResponse`),trace:Q(async(e,t,r)=>{let i=!1,a=m.Text;r!==void 0&&(n.boolean(r)?i=r:(i=r.sendNotification||!1,a=r.traceFormat||m.Text)),z=e,B=a,te=z===f.Off?void 0:t,i&&!he()&&!ge()&&await Ve.sendNotification(h.type,{value:f.toString(e)})},`trace`),onError:re.event,onClose:ie.event,onUnhandledNotification:ae.event,onDispose:se.event,end:Q(()=>{y.end()},`end`),dispose:Q(()=>{if(ge())return;ne=D.Disposed,se.fire(void 0);let e=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,`Pending response rejected since connection got disposed`);for(let t of L.values())t.reject(e);L=new Map,ee=new Map,R=new Set,I=new i.LinkedMap,n.func(y.dispose)&&y.dispose(),n.func(p.dispose)&&p.dispose()},`dispose`),listen:Q(()=>{Ne(),Pe(),ne=D.Listening,p.listen(V)},`listen`),inspect:Q(()=>{(0,t.default)().console.log(`inspect`)},`inspect`)};return Ve.onNotification(g.type,e=>{if(z===f.Off||!te)return;let t=z===f.Verbose||z===f.Compact;te.log(e.message,t?e.verbose:void 0)}),Ve.onNotification(u.type,e=>{let t=P.get(e.token);t?t(e.value):oe.fire(e)}),Ve}Q(O,`createMessageConnection`),e.createMessageConnection=O}}),eV=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/common/api.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProgressType=e.ProgressToken=e.createMessageConnection=e.NullLogger=e.ConnectionOptions=e.ConnectionStrategy=e.AbstractMessageBuffer=e.WriteableStreamMessageWriter=e.AbstractMessageWriter=e.MessageWriter=e.ReadableStreamMessageReader=e.AbstractMessageReader=e.MessageReader=e.SharedArrayReceiverStrategy=e.SharedArraySenderStrategy=e.CancellationToken=e.CancellationTokenSource=e.Emitter=e.Event=e.Disposable=e.LRUCache=e.Touch=e.LinkedMap=e.ParameterStructures=e.NotificationType9=e.NotificationType8=e.NotificationType7=e.NotificationType6=e.NotificationType5=e.NotificationType4=e.NotificationType3=e.NotificationType2=e.NotificationType1=e.NotificationType0=e.NotificationType=e.ErrorCodes=e.ResponseError=e.RequestType9=e.RequestType8=e.RequestType7=e.RequestType6=e.RequestType5=e.RequestType4=e.RequestType3=e.RequestType2=e.RequestType1=e.RequestType0=e.RequestType=e.Message=e.RAL=void 0,e.MessageStrategy=e.CancellationStrategy=e.CancellationSenderStrategy=e.CancellationReceiverStrategy=e.ConnectionError=e.ConnectionErrors=e.LogTraceNotification=e.SetTraceNotification=e.TraceFormat=e.TraceValues=e.Trace=void 0;var t=ZB();Object.defineProperty(e,"Message",{enumerable:!0,get:Q(function(){return t.Message},`get`)}),Object.defineProperty(e,"RequestType",{enumerable:!0,get:Q(function(){return t.RequestType},`get`)}),Object.defineProperty(e,"RequestType0",{enumerable:!0,get:Q(function(){return t.RequestType0},`get`)}),Object.defineProperty(e,"RequestType1",{enumerable:!0,get:Q(function(){return t.RequestType1},`get`)}),Object.defineProperty(e,"RequestType2",{enumerable:!0,get:Q(function(){return t.RequestType2},`get`)}),Object.defineProperty(e,"RequestType3",{enumerable:!0,get:Q(function(){return t.RequestType3},`get`)}),Object.defineProperty(e,"RequestType4",{enumerable:!0,get:Q(function(){return t.RequestType4},`get`)}),Object.defineProperty(e,"RequestType5",{enumerable:!0,get:Q(function(){return t.RequestType5},`get`)}),Object.defineProperty(e,"RequestType6",{enumerable:!0,get:Q(function(){return t.RequestType6},`get`)}),Object.defineProperty(e,"RequestType7",{enumerable:!0,get:Q(function(){return t.RequestType7},`get`)}),Object.defineProperty(e,"RequestType8",{enumerable:!0,get:Q(function(){return t.RequestType8},`get`)}),Object.defineProperty(e,"RequestType9",{enumerable:!0,get:Q(function(){return t.RequestType9},`get`)}),Object.defineProperty(e,"ResponseError",{enumerable:!0,get:Q(function(){return t.ResponseError},`get`)}),Object.defineProperty(e,"ErrorCodes",{enumerable:!0,get:Q(function(){return t.ErrorCodes},`get`)}),Object.defineProperty(e,"NotificationType",{enumerable:!0,get:Q(function(){return t.NotificationType},`get`)}),Object.defineProperty(e,"NotificationType0",{enumerable:!0,get:Q(function(){return t.NotificationType0},`get`)}),Object.defineProperty(e,"NotificationType1",{enumerable:!0,get:Q(function(){return t.NotificationType1},`get`)}),Object.defineProperty(e,"NotificationType2",{enumerable:!0,get:Q(function(){return t.NotificationType2},`get`)}),Object.defineProperty(e,"NotificationType3",{enumerable:!0,get:Q(function(){return t.NotificationType3},`get`)}),Object.defineProperty(e,"NotificationType4",{enumerable:!0,get:Q(function(){return t.NotificationType4},`get`)}),Object.defineProperty(e,"NotificationType5",{enumerable:!0,get:Q(function(){return t.NotificationType5},`get`)}),Object.defineProperty(e,"NotificationType6",{enumerable:!0,get:Q(function(){return t.NotificationType6},`get`)}),Object.defineProperty(e,"NotificationType7",{enumerable:!0,get:Q(function(){return t.NotificationType7},`get`)}),Object.defineProperty(e,"NotificationType8",{enumerable:!0,get:Q(function(){return t.NotificationType8},`get`)}),Object.defineProperty(e,"NotificationType9",{enumerable:!0,get:Q(function(){return t.NotificationType9},`get`)}),Object.defineProperty(e,"ParameterStructures",{enumerable:!0,get:Q(function(){return t.ParameterStructures},`get`)});var n=QB();Object.defineProperty(e,"LinkedMap",{enumerable:!0,get:Q(function(){return n.LinkedMap},`get`)}),Object.defineProperty(e,"LRUCache",{enumerable:!0,get:Q(function(){return n.LRUCache},`get`)}),Object.defineProperty(e,"Touch",{enumerable:!0,get:Q(function(){return n.Touch},`get`)});var r=w2e();Object.defineProperty(e,"Disposable",{enumerable:!0,get:Q(function(){return r.Disposable},`get`)});var i=YB();Object.defineProperty(e,"Event",{enumerable:!0,get:Q(function(){return i.Event},`get`)}),Object.defineProperty(e,"Emitter",{enumerable:!0,get:Q(function(){return i.Emitter},`get`)});var a=XB();Object.defineProperty(e,"CancellationTokenSource",{enumerable:!0,get:Q(function(){return a.CancellationTokenSource},`get`)}),Object.defineProperty(e,"CancellationToken",{enumerable:!0,get:Q(function(){return a.CancellationToken},`get`)});var o=T2e();Object.defineProperty(e,"SharedArraySenderStrategy",{enumerable:!0,get:Q(function(){return o.SharedArraySenderStrategy},`get`)}),Object.defineProperty(e,"SharedArrayReceiverStrategy",{enumerable:!0,get:Q(function(){return o.SharedArrayReceiverStrategy},`get`)});var s=E2e();Object.defineProperty(e,"MessageReader",{enumerable:!0,get:Q(function(){return s.MessageReader},`get`)}),Object.defineProperty(e,"AbstractMessageReader",{enumerable:!0,get:Q(function(){return s.AbstractMessageReader},`get`)}),Object.defineProperty(e,"ReadableStreamMessageReader",{enumerable:!0,get:Q(function(){return s.ReadableStreamMessageReader},`get`)});var l=D2e();Object.defineProperty(e,"MessageWriter",{enumerable:!0,get:Q(function(){return l.MessageWriter},`get`)}),Object.defineProperty(e,"AbstractMessageWriter",{enumerable:!0,get:Q(function(){return l.AbstractMessageWriter},`get`)}),Object.defineProperty(e,"WriteableStreamMessageWriter",{enumerable:!0,get:Q(function(){return l.WriteableStreamMessageWriter},`get`)});var u=O2e();Object.defineProperty(e,"AbstractMessageBuffer",{enumerable:!0,get:Q(function(){return u.AbstractMessageBuffer},`get`)});var d=k2e();Object.defineProperty(e,"ConnectionStrategy",{enumerable:!0,get:Q(function(){return d.ConnectionStrategy},`get`)}),Object.defineProperty(e,"ConnectionOptions",{enumerable:!0,get:Q(function(){return d.ConnectionOptions},`get`)}),Object.defineProperty(e,"NullLogger",{enumerable:!0,get:Q(function(){return d.NullLogger},`get`)}),Object.defineProperty(e,"createMessageConnection",{enumerable:!0,get:Q(function(){return d.createMessageConnection},`get`)}),Object.defineProperty(e,"ProgressToken",{enumerable:!0,get:Q(function(){return d.ProgressToken},`get`)}),Object.defineProperty(e,"ProgressType",{enumerable:!0,get:Q(function(){return d.ProgressType},`get`)}),Object.defineProperty(e,"Trace",{enumerable:!0,get:Q(function(){return d.Trace},`get`)}),Object.defineProperty(e,"TraceValues",{enumerable:!0,get:Q(function(){return d.TraceValues},`get`)}),Object.defineProperty(e,"TraceFormat",{enumerable:!0,get:Q(function(){return d.TraceFormat},`get`)}),Object.defineProperty(e,"SetTraceNotification",{enumerable:!0,get:Q(function(){return d.SetTraceNotification},`get`)}),Object.defineProperty(e,"LogTraceNotification",{enumerable:!0,get:Q(function(){return d.LogTraceNotification},`get`)}),Object.defineProperty(e,"ConnectionErrors",{enumerable:!0,get:Q(function(){return d.ConnectionErrors},`get`)}),Object.defineProperty(e,"ConnectionError",{enumerable:!0,get:Q(function(){return d.ConnectionError},`get`)}),Object.defineProperty(e,"CancellationReceiverStrategy",{enumerable:!0,get:Q(function(){return d.CancellationReceiverStrategy},`get`)}),Object.defineProperty(e,"CancellationSenderStrategy",{enumerable:!0,get:Q(function(){return d.CancellationSenderStrategy},`get`)}),Object.defineProperty(e,"CancellationStrategy",{enumerable:!0,get:Q(function(){return d.CancellationStrategy},`get`)}),Object.defineProperty(e,"MessageStrategy",{enumerable:!0,get:Q(function(){return d.MessageStrategy},`get`)}),e.RAL=qB().default}}),A2e=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/ril.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var t=eV(),n=class e extends t.AbstractMessageBuffer{static{Q(this,`MessageBuffer`)}constructor(e=`utf-8`){super(e),this.asciiDecoder=new TextDecoder(`ascii`)}emptyBuffer(){return e.emptyBuffer}fromString(e,t){return new TextEncoder().encode(e)}toString(e,t){return t===`ascii`?this.asciiDecoder.decode(e):new TextDecoder(t).decode(e)}asNative(e,t){return t===void 0?e:e.slice(0,t)}allocNative(e){return new Uint8Array(e)}};n.emptyBuffer=new Uint8Array;var r=class{static{Q(this,`ReadableStreamWrapper`)}constructor(e){this.socket=e,this._onData=new t.Emitter,this._messageListener=e=>{e.data.arrayBuffer().then(e=>{this._onData.fire(new Uint8Array(e))},()=>{(0,t.RAL)().console.error(`Converting blob to array buffer failed.`)})},this.socket.addEventListener(`message`,this._messageListener)}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}onData(e){return this._onData.event(e)}},i=class{static{Q(this,`WritableStreamWrapper`)}constructor(e){this.socket=e}onClose(e){return this.socket.addEventListener(`close`,e),t.Disposable.create(()=>this.socket.removeEventListener(`close`,e))}onError(e){return this.socket.addEventListener(`error`,e),t.Disposable.create(()=>this.socket.removeEventListener(`error`,e))}onEnd(e){return this.socket.addEventListener(`end`,e),t.Disposable.create(()=>this.socket.removeEventListener(`end`,e))}write(e,t){if(typeof e==`string`){if(t!==void 0&&t!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t}`);this.socket.send(e)}else this.socket.send(e);return Promise.resolve()}end(){this.socket.close()}},a=new TextEncoder,o=Object.freeze({messageBuffer:Object.freeze({create:Q(e=>new n(e),`create`)}),applicationJson:Object.freeze({encoder:Object.freeze({name:`application/json`,encode:Q((e,t)=>{if(t.charset!==`utf-8`)throw Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${t.charset}`);return Promise.resolve(a.encode(JSON.stringify(e,void 0,0)))},`encode`)}),decoder:Object.freeze({name:`application/json`,decode:Q((e,t)=>{if(!(e instanceof Uint8Array))throw Error(`In a Browser environments only Uint8Arrays are supported.`);return Promise.resolve(JSON.parse(new TextDecoder(t.charset).decode(e)))},`decode`)})}),stream:Object.freeze({asReadableStream:Q(e=>new r(e),`asReadableStream`),asWritableStream:Q(e=>new i(e),`asWritableStream`)}),console,timer:Object.freeze({setTimeout(e,t,...n){let r=setTimeout(e,t,...n);return{dispose:Q(()=>clearTimeout(r),`dispose`)}},setImmediate(e,...t){let n=setTimeout(e,0,...t);return{dispose:Q(()=>clearTimeout(n),`dispose`)}},setInterval(e,t,...n){let r=setInterval(e,t,...n);return{dispose:Q(()=>clearInterval(r),`dispose`)}}})});function s(){return o}Q(s,`RIL`),(function(e){function n(){t.RAL.install(o)}Q(n,`install`),e.install=n})(s||={}),e.default=s}}),tV=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:Q(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createMessageConnection=e.BrowserMessageWriter=e.BrowserMessageReader=void 0,A2e().default.install();var r=eV();n(eV(),e),e.BrowserMessageReader=class extends r.AbstractMessageReader{static{Q(this,`BrowserMessageReader`)}constructor(e){super(),this._onData=new r.Emitter,this._messageListener=e=>{this._onData.fire(e.data)},e.addEventListener(`error`,e=>this.fireError(e)),e.onmessage=this._messageListener}listen(e){return this._onData.event(e)}},e.BrowserMessageWriter=class extends r.AbstractMessageWriter{static{Q(this,`BrowserMessageWriter`)}constructor(e){super(),this.port=e,this.errorCount=0,e.addEventListener(`error`,e=>this.fireError(e))}write(e){try{return this.port.postMessage(e),Promise.resolve()}catch(t){return this.handleError(t,e),Promise.reject(t)}}handleError(e,t){this.errorCount++,this.fireError(e,t,this.errorCount)}end(){}};function i(e,t,n,i){return n===void 0&&(n=r.NullLogger),r.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,r.createMessageConnection)(e,t,n,i)}Q(i,`createMessageConnection`),e.createMessageConnection=i}}),nV=dB({"../../node_modules/.pnpm/vscode-jsonrpc@8.2.0/node_modules/vscode-jsonrpc/browser.js"(e,t){"use strict";t.exports=tV()}}),rV=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/messages.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ProtocolNotificationType=e.ProtocolNotificationType0=e.ProtocolRequestType=e.ProtocolRequestType0=e.RegistrationType=e.MessageDirection=void 0;var t=tV(),n;(function(e){e.clientToServer=`clientToServer`,e.serverToClient=`serverToClient`,e.both=`both`})(n||(e.MessageDirection=n={})),e.RegistrationType=class{static{Q(this,`RegistrationType`)}constructor(e){this.method=e}},e.ProtocolRequestType0=class extends t.RequestType0{static{Q(this,`ProtocolRequestType0`)}constructor(e){super(e)}},e.ProtocolRequestType=class extends t.RequestType{static{Q(this,`ProtocolRequestType`)}constructor(e){super(e,t.ParameterStructures.byName)}},e.ProtocolNotificationType0=class extends t.NotificationType0{static{Q(this,`ProtocolNotificationType0`)}constructor(e){super(e)}},e.ProtocolNotificationType=class extends t.NotificationType{static{Q(this,`ProtocolNotificationType`)}constructor(e){super(e,t.ParameterStructures.byName)}}}}),iV=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/utils/is.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.objectLiteral=e.typedArray=e.stringArray=e.array=e.func=e.error=e.number=e.string=e.boolean=void 0;function t(e){return e===!0||e===!1}Q(t,`boolean`),e.boolean=t;function n(e){return typeof e==`string`||e instanceof String}Q(n,`string`),e.string=n;function r(e){return typeof e==`number`||e instanceof Number}Q(r,`number`),e.number=r;function i(e){return e instanceof Error}Q(i,`error`),e.error=i;function a(e){return typeof e==`function`}Q(a,`func`),e.func=a;function o(e){return Array.isArray(e)}Q(o,`array`),e.array=o;function s(e){return o(e)&&e.every(e=>n(e))}Q(s,`stringArray`),e.stringArray=s;function l(e,t){return Array.isArray(e)&&e.every(t)}Q(l,`typedArray`),e.typedArray=l;function u(e){return typeof e==`object`&&!!e}Q(u,`objectLiteral`),e.objectLiteral=u}}),j2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.implementation.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ImplementationRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/implementation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ImplementationRequest=n={}))}}),M2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeDefinition.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeDefinitionRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/typeDefinition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeDefinitionRequest=n={}))}}),N2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.workspaceFolder.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=void 0;var t=rV(),n;(function(e){e.method=`workspace/workspaceFolders`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(n||(e.WorkspaceFoldersRequest=n={}));var r;(function(e){e.method=`workspace/didChangeWorkspaceFolders`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(r||(e.DidChangeWorkspaceFoldersNotification=r={}))}}),P2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.configuration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ConfigurationRequest=void 0;var t=rV(),n;(function(e){e.method=`workspace/configuration`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ConfigurationRequest=n={}))}}),F2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.colorProvider.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ColorPresentationRequest=e.DocumentColorRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/documentColor`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DocumentColorRequest=n={}));var r;(function(e){e.method=`textDocument/colorPresentation`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.ColorPresentationRequest=r={}))}}),I2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.foldingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/foldingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.FoldingRangeRequest=n={}));var r;(function(e){e.method=`workspace/foldingRange/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.FoldingRangeRefreshRequest=r={}))}}),L2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.declaration.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DeclarationRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/declaration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.DeclarationRequest=n={}))}}),R2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.selectionRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SelectionRangeRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/selectionRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.SelectionRangeRequest=n={}))}}),z2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.progress.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=void 0;var t=tV(),n=rV(),r;(function(e){e.type=new t.ProgressType;function n(t){return t===e.type}Q(n,`is`),e.is=n})(r||(e.WorkDoneProgress=r={}));var i;(function(e){e.method=`window/workDoneProgress/create`,e.messageDirection=n.MessageDirection.serverToClient,e.type=new n.ProtocolRequestType(e.method)})(i||(e.WorkDoneProgressCreateRequest=i={}));var a;(function(e){e.method=`window/workDoneProgress/cancel`,e.messageDirection=n.MessageDirection.clientToServer,e.type=new n.ProtocolNotificationType(e.method)})(a||(e.WorkDoneProgressCancelNotification=a={}))}}),B2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.callHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.CallHierarchyPrepareRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/prepareCallHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.CallHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`callHierarchy/incomingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.CallHierarchyIncomingCallsRequest=r={}));var i;(function(e){e.method=`callHierarchy/outgoingCalls`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.CallHierarchyOutgoingCallsRequest=i={}))}}),V2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.semanticTokens.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.SemanticTokensRegistrationType=e.TokenFormat=void 0;var t=rV(),n;(function(e){e.Relative=`relative`})(n||(e.TokenFormat=n={}));var r;(function(e){e.method=`textDocument/semanticTokens`,e.type=new t.RegistrationType(e.method)})(r||(e.SemanticTokensRegistrationType=r={}));var i;(function(e){e.method=`textDocument/semanticTokens/full`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(i||(e.SemanticTokensRequest=i={}));var a;(function(e){e.method=`textDocument/semanticTokens/full/delta`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(a||(e.SemanticTokensDeltaRequest=a={}));var o;(function(e){e.method=`textDocument/semanticTokens/range`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method),e.registrationMethod=r.method})(o||(e.SemanticTokensRangeRequest=o={}));var s;(function(e){e.method=`workspace/semanticTokens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(s||(e.SemanticTokensRefreshRequest=s={}))}}),H2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.showDocument.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ShowDocumentRequest=void 0;var t=rV(),n;(function(e){e.method=`window/showDocument`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(n||(e.ShowDocumentRequest=n={}))}}),U2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.linkedEditingRange.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.LinkedEditingRangeRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/linkedEditingRange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.LinkedEditingRangeRequest=n={}))}}),W2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.fileOperations.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.DidRenameFilesNotification=e.WillRenameFilesRequest=e.DidCreateFilesNotification=e.WillCreateFilesRequest=e.FileOperationPatternKind=void 0;var t=rV(),n;(function(e){e.file=`file`,e.folder=`folder`})(n||(e.FileOperationPatternKind=n={}));var r;(function(e){e.method=`workspace/willCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.WillCreateFilesRequest=r={}));var i;(function(e){e.method=`workspace/didCreateFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(i||(e.DidCreateFilesNotification=i={}));var a;(function(e){e.method=`workspace/willRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(a||(e.WillRenameFilesRequest=a={}));var o;(function(e){e.method=`workspace/didRenameFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(o||(e.DidRenameFilesNotification=o={}));var s;(function(e){e.method=`workspace/didDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(s||(e.DidDeleteFilesNotification=s={}));var l;(function(e){e.method=`workspace/willDeleteFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(l||(e.WillDeleteFilesRequest=l={}))}}),G2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.moniker.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=void 0;var t=rV(),n;(function(e){e.document=`document`,e.project=`project`,e.group=`group`,e.scheme=`scheme`,e.global=`global`})(n||(e.UniquenessLevel=n={}));var r;(function(e){e.$import=`import`,e.$export=`export`,e.local=`local`})(r||(e.MonikerKind=r={}));var i;(function(e){e.method=`textDocument/moniker`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.MonikerRequest=i={}))}}),K2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.typeHierarchy.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TypeHierarchySubtypesRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/prepareTypeHierarchy`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.TypeHierarchyPrepareRequest=n={}));var r;(function(e){e.method=`typeHierarchy/supertypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.TypeHierarchySupertypesRequest=r={}));var i;(function(e){e.method=`typeHierarchy/subtypes`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(i||(e.TypeHierarchySubtypesRequest=i={}))}}),q2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineValue.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineValueRefreshRequest=e.InlineValueRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/inlineValue`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineValueRequest=n={}));var r;(function(e){e.method=`workspace/inlineValue/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(r||(e.InlineValueRefreshRequest=r={}))}}),J2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlayHint.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/inlayHint`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlayHintRequest=n={}));var r;(function(e){e.method=`inlayHint/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(r||(e.InlayHintResolveRequest=r={}));var i;(function(e){e.method=`workspace/inlayHint/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(i||(e.InlayHintRefreshRequest=i={}))}}),Y2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.diagnostic.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=void 0;var t=tV(),n=iV(),r=rV(),i;(function(e){function t(e){let t=e;return t&&n.boolean(t.retriggerRequest)}Q(t,`is`),e.is=t})(i||(e.DiagnosticServerCancellationData=i={}));var a;(function(e){e.Full=`full`,e.Unchanged=`unchanged`})(a||(e.DocumentDiagnosticReportKind=a={}));var o;(function(e){e.method=`textDocument/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(o||(e.DocumentDiagnosticRequest=o={}));var s;(function(e){e.method=`workspace/diagnostic`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolRequestType(e.method),e.partialResult=new t.ProgressType})(s||(e.WorkspaceDiagnosticRequest=s={}));var l;(function(e){e.method=`workspace/diagnostic/refresh`,e.messageDirection=r.MessageDirection.serverToClient,e.type=new r.ProtocolRequestType0(e.method)})(l||(e.DiagnosticRefreshRequest=l={}))}}),X2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.notebook.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=void 0;var t=(KB(),gB(_B)),n=iV(),r=rV(),i;(function(e){e.Markup=1,e.Code=2;function t(e){return e===1||e===2}Q(t,`is`),e.is=t})(i||(e.NotebookCellKind=i={}));var a;(function(e){function r(e,t){let n={executionOrder:e};return(t===!0||t===!1)&&(n.success=t),n}Q(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.executionOrder)&&(r.success===void 0||n.boolean(r.success))}Q(i,`is`),e.is=i;function a(e,t){return e===t?!0:e==null||t==null?!1:e.executionOrder===t.executionOrder&&e.success===t.success}Q(a,`equals`),e.equals=a})(a||(e.ExecutionSummary=a={}));var o;(function(e){function r(e,t){return{kind:e,document:t}}Q(r,`create`),e.create=r;function o(e){let r=e;return n.objectLiteral(r)&&i.is(r.kind)&&t.DocumentUri.is(r.document)&&(r.metadata===void 0||n.objectLiteral(r.metadata))}Q(o,`is`),e.is=o;function s(e,t){let n=new Set;return e.document!==t.document&&n.add(`document`),e.kind!==t.kind&&n.add(`kind`),e.executionSummary!==t.executionSummary&&n.add(`executionSummary`),(e.metadata!==void 0||t.metadata!==void 0)&&!l(e.metadata,t.metadata)&&n.add(`metadata`),(e.executionSummary!==void 0||t.executionSummary!==void 0)&&!a.equals(e.executionSummary,t.executionSummary)&&n.add(`executionSummary`),n}Q(s,`diff`),e.diff=s;function l(e,t){if(e===t)return!0;if(e==null||t==null||typeof e!=typeof t||typeof e!=`object`)return!1;let r=Array.isArray(e),i=Array.isArray(t);if(r!==i)return!1;if(r&&i){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!l(e[n],t[n]))return!1}if(n.objectLiteral(e)&&n.objectLiteral(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length||(n.sort(),r.sort(),!l(n,r)))return!1;for(let r=0;r<n.length;r++){let i=n[r];if(!l(e[i],t[i]))return!1}}return!0}Q(l,`equalsMetadata`)})(o||(e.NotebookCell=o={}));var s;(function(e){function r(e,t,n,r){return{uri:e,notebookType:t,version:n,cells:r}}Q(r,`create`),e.create=r;function i(e){let r=e;return n.objectLiteral(r)&&n.string(r.uri)&&t.integer.is(r.version)&&n.typedArray(r.cells,o.is)}Q(i,`is`),e.is=i})(s||(e.NotebookDocument=s={}));var l;(function(e){e.method=`notebookDocument/sync`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.RegistrationType(e.method)})(l||(e.NotebookDocumentSyncRegistrationType=l={}));var u;(function(e){e.method=`notebookDocument/didOpen`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(u||(e.DidOpenNotebookDocumentNotification=u={}));var d;(function(e){function r(e){let r=e;return n.objectLiteral(r)&&t.uinteger.is(r.start)&&t.uinteger.is(r.deleteCount)&&(r.cells===void 0||n.typedArray(r.cells,o.is))}Q(r,`is`),e.is=r;function i(e,t,n){let r={start:e,deleteCount:t};return n!==void 0&&(r.cells=n),r}Q(i,`create`),e.create=i})(d||(e.NotebookCellArrayChange=d={}));var f;(function(e){e.method=`notebookDocument/didChange`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(f||(e.DidChangeNotebookDocumentNotification=f={}));var p;(function(e){e.method=`notebookDocument/didSave`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(p||(e.DidSaveNotebookDocumentNotification=p={}));var m;(function(e){e.method=`notebookDocument/didClose`,e.messageDirection=r.MessageDirection.clientToServer,e.type=new r.ProtocolNotificationType(e.method),e.registrationMethod=l.method})(m||(e.DidCloseNotebookDocumentNotification=m={}))}}),Z2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.inlineCompletion.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.InlineCompletionRequest=void 0;var t=rV(),n;(function(e){e.method=`textDocument/inlineCompletion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(n||(e.InlineCompletionRequest=n={}))}}),Q2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/protocol.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WorkspaceSymbolRequest=e.CodeActionResolveRequest=e.CodeActionRequest=e.DocumentSymbolRequest=e.DocumentHighlightRequest=e.ReferencesRequest=e.DefinitionRequest=e.SignatureHelpRequest=e.SignatureHelpTriggerKind=e.HoverRequest=e.CompletionResolveRequest=e.CompletionRequest=e.CompletionTriggerKind=e.PublishDiagnosticsNotification=e.WatchKind=e.RelativePattern=e.FileChangeType=e.DidChangeWatchedFilesNotification=e.WillSaveTextDocumentWaitUntilRequest=e.WillSaveTextDocumentNotification=e.TextDocumentSaveReason=e.DidSaveTextDocumentNotification=e.DidCloseTextDocumentNotification=e.DidChangeTextDocumentNotification=e.TextDocumentContentChangeEvent=e.DidOpenTextDocumentNotification=e.TextDocumentSyncKind=e.TelemetryEventNotification=e.LogMessageNotification=e.ShowMessageRequest=e.ShowMessageNotification=e.MessageType=e.DidChangeConfigurationNotification=e.ExitNotification=e.ShutdownRequest=e.InitializedNotification=e.InitializeErrorCodes=e.InitializeRequest=e.WorkDoneProgressOptions=e.TextDocumentRegistrationOptions=e.StaticRegistrationOptions=e.PositionEncodingKind=e.FailureHandlingKind=e.ResourceOperationKind=e.UnregistrationRequest=e.RegistrationRequest=e.DocumentSelector=e.NotebookCellTextDocumentFilter=e.NotebookDocumentFilter=e.TextDocumentFilter=void 0,e.MonikerRequest=e.MonikerKind=e.UniquenessLevel=e.WillDeleteFilesRequest=e.DidDeleteFilesNotification=e.WillRenameFilesRequest=e.DidRenameFilesNotification=e.WillCreateFilesRequest=e.DidCreateFilesNotification=e.FileOperationPatternKind=e.LinkedEditingRangeRequest=e.ShowDocumentRequest=e.SemanticTokensRegistrationType=e.SemanticTokensRefreshRequest=e.SemanticTokensRangeRequest=e.SemanticTokensDeltaRequest=e.SemanticTokensRequest=e.TokenFormat=e.CallHierarchyPrepareRequest=e.CallHierarchyOutgoingCallsRequest=e.CallHierarchyIncomingCallsRequest=e.WorkDoneProgressCancelNotification=e.WorkDoneProgressCreateRequest=e.WorkDoneProgress=e.SelectionRangeRequest=e.DeclarationRequest=e.FoldingRangeRefreshRequest=e.FoldingRangeRequest=e.ColorPresentationRequest=e.DocumentColorRequest=e.ConfigurationRequest=e.DidChangeWorkspaceFoldersNotification=e.WorkspaceFoldersRequest=e.TypeDefinitionRequest=e.ImplementationRequest=e.ApplyWorkspaceEditRequest=e.ExecuteCommandRequest=e.PrepareRenameRequest=e.RenameRequest=e.PrepareSupportDefaultBehavior=e.DocumentOnTypeFormattingRequest=e.DocumentRangesFormattingRequest=e.DocumentRangeFormattingRequest=e.DocumentFormattingRequest=e.DocumentLinkResolveRequest=e.DocumentLinkRequest=e.CodeLensRefreshRequest=e.CodeLensResolveRequest=e.CodeLensRequest=e.WorkspaceSymbolResolveRequest=void 0,e.InlineCompletionRequest=e.DidCloseNotebookDocumentNotification=e.DidSaveNotebookDocumentNotification=e.DidChangeNotebookDocumentNotification=e.NotebookCellArrayChange=e.DidOpenNotebookDocumentNotification=e.NotebookDocumentSyncRegistrationType=e.NotebookDocument=e.NotebookCell=e.ExecutionSummary=e.NotebookCellKind=e.DiagnosticRefreshRequest=e.WorkspaceDiagnosticRequest=e.DocumentDiagnosticRequest=e.DocumentDiagnosticReportKind=e.DiagnosticServerCancellationData=e.InlayHintRefreshRequest=e.InlayHintResolveRequest=e.InlayHintRequest=e.InlineValueRefreshRequest=e.InlineValueRequest=e.TypeHierarchySupertypesRequest=e.TypeHierarchySubtypesRequest=e.TypeHierarchyPrepareRequest=void 0;var t=rV(),n=(KB(),gB(_B)),r=iV(),i=j2e();Object.defineProperty(e,"ImplementationRequest",{enumerable:!0,get:Q(function(){return i.ImplementationRequest},`get`)});var a=M2e();Object.defineProperty(e,"TypeDefinitionRequest",{enumerable:!0,get:Q(function(){return a.TypeDefinitionRequest},`get`)});var o=N2e();Object.defineProperty(e,"WorkspaceFoldersRequest",{enumerable:!0,get:Q(function(){return o.WorkspaceFoldersRequest},`get`)}),Object.defineProperty(e,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:Q(function(){return o.DidChangeWorkspaceFoldersNotification},`get`)});var s=P2e();Object.defineProperty(e,"ConfigurationRequest",{enumerable:!0,get:Q(function(){return s.ConfigurationRequest},`get`)});var l=F2e();Object.defineProperty(e,"DocumentColorRequest",{enumerable:!0,get:Q(function(){return l.DocumentColorRequest},`get`)}),Object.defineProperty(e,"ColorPresentationRequest",{enumerable:!0,get:Q(function(){return l.ColorPresentationRequest},`get`)});var u=I2e();Object.defineProperty(e,"FoldingRangeRequest",{enumerable:!0,get:Q(function(){return u.FoldingRangeRequest},`get`)}),Object.defineProperty(e,"FoldingRangeRefreshRequest",{enumerable:!0,get:Q(function(){return u.FoldingRangeRefreshRequest},`get`)});var d=L2e();Object.defineProperty(e,"DeclarationRequest",{enumerable:!0,get:Q(function(){return d.DeclarationRequest},`get`)});var f=R2e();Object.defineProperty(e,"SelectionRangeRequest",{enumerable:!0,get:Q(function(){return f.SelectionRangeRequest},`get`)});var p=z2e();Object.defineProperty(e,"WorkDoneProgress",{enumerable:!0,get:Q(function(){return p.WorkDoneProgress},`get`)}),Object.defineProperty(e,"WorkDoneProgressCreateRequest",{enumerable:!0,get:Q(function(){return p.WorkDoneProgressCreateRequest},`get`)}),Object.defineProperty(e,"WorkDoneProgressCancelNotification",{enumerable:!0,get:Q(function(){return p.WorkDoneProgressCancelNotification},`get`)});var m=B2e();Object.defineProperty(e,"CallHierarchyIncomingCallsRequest",{enumerable:!0,get:Q(function(){return m.CallHierarchyIncomingCallsRequest},`get`)}),Object.defineProperty(e,"CallHierarchyOutgoingCallsRequest",{enumerable:!0,get:Q(function(){return m.CallHierarchyOutgoingCallsRequest},`get`)}),Object.defineProperty(e,"CallHierarchyPrepareRequest",{enumerable:!0,get:Q(function(){return m.CallHierarchyPrepareRequest},`get`)});var h=V2e();Object.defineProperty(e,"TokenFormat",{enumerable:!0,get:Q(function(){return h.TokenFormat},`get`)}),Object.defineProperty(e,"SemanticTokensRequest",{enumerable:!0,get:Q(function(){return h.SemanticTokensRequest},`get`)}),Object.defineProperty(e,"SemanticTokensDeltaRequest",{enumerable:!0,get:Q(function(){return h.SemanticTokensDeltaRequest},`get`)}),Object.defineProperty(e,"SemanticTokensRangeRequest",{enumerable:!0,get:Q(function(){return h.SemanticTokensRangeRequest},`get`)}),Object.defineProperty(e,"SemanticTokensRefreshRequest",{enumerable:!0,get:Q(function(){return h.SemanticTokensRefreshRequest},`get`)}),Object.defineProperty(e,"SemanticTokensRegistrationType",{enumerable:!0,get:Q(function(){return h.SemanticTokensRegistrationType},`get`)});var g=H2e();Object.defineProperty(e,"ShowDocumentRequest",{enumerable:!0,get:Q(function(){return g.ShowDocumentRequest},`get`)});var _=U2e();Object.defineProperty(e,"LinkedEditingRangeRequest",{enumerable:!0,get:Q(function(){return _.LinkedEditingRangeRequest},`get`)});var v=W2e();Object.defineProperty(e,"FileOperationPatternKind",{enumerable:!0,get:Q(function(){return v.FileOperationPatternKind},`get`)}),Object.defineProperty(e,"DidCreateFilesNotification",{enumerable:!0,get:Q(function(){return v.DidCreateFilesNotification},`get`)}),Object.defineProperty(e,"WillCreateFilesRequest",{enumerable:!0,get:Q(function(){return v.WillCreateFilesRequest},`get`)}),Object.defineProperty(e,"DidRenameFilesNotification",{enumerable:!0,get:Q(function(){return v.DidRenameFilesNotification},`get`)}),Object.defineProperty(e,"WillRenameFilesRequest",{enumerable:!0,get:Q(function(){return v.WillRenameFilesRequest},`get`)}),Object.defineProperty(e,"DidDeleteFilesNotification",{enumerable:!0,get:Q(function(){return v.DidDeleteFilesNotification},`get`)}),Object.defineProperty(e,"WillDeleteFilesRequest",{enumerable:!0,get:Q(function(){return v.WillDeleteFilesRequest},`get`)});var y=G2e();Object.defineProperty(e,"UniquenessLevel",{enumerable:!0,get:Q(function(){return y.UniquenessLevel},`get`)}),Object.defineProperty(e,"MonikerKind",{enumerable:!0,get:Q(function(){return y.MonikerKind},`get`)}),Object.defineProperty(e,"MonikerRequest",{enumerable:!0,get:Q(function(){return y.MonikerRequest},`get`)});var b=K2e();Object.defineProperty(e,"TypeHierarchyPrepareRequest",{enumerable:!0,get:Q(function(){return b.TypeHierarchyPrepareRequest},`get`)}),Object.defineProperty(e,"TypeHierarchySubtypesRequest",{enumerable:!0,get:Q(function(){return b.TypeHierarchySubtypesRequest},`get`)}),Object.defineProperty(e,"TypeHierarchySupertypesRequest",{enumerable:!0,get:Q(function(){return b.TypeHierarchySupertypesRequest},`get`)});var x=q2e();Object.defineProperty(e,"InlineValueRequest",{enumerable:!0,get:Q(function(){return x.InlineValueRequest},`get`)}),Object.defineProperty(e,"InlineValueRefreshRequest",{enumerable:!0,get:Q(function(){return x.InlineValueRefreshRequest},`get`)});var S=J2e();Object.defineProperty(e,"InlayHintRequest",{enumerable:!0,get:Q(function(){return S.InlayHintRequest},`get`)}),Object.defineProperty(e,"InlayHintResolveRequest",{enumerable:!0,get:Q(function(){return S.InlayHintResolveRequest},`get`)}),Object.defineProperty(e,"InlayHintRefreshRequest",{enumerable:!0,get:Q(function(){return S.InlayHintRefreshRequest},`get`)});var C=Y2e();Object.defineProperty(e,"DiagnosticServerCancellationData",{enumerable:!0,get:Q(function(){return C.DiagnosticServerCancellationData},`get`)}),Object.defineProperty(e,"DocumentDiagnosticReportKind",{enumerable:!0,get:Q(function(){return C.DocumentDiagnosticReportKind},`get`)}),Object.defineProperty(e,"DocumentDiagnosticRequest",{enumerable:!0,get:Q(function(){return C.DocumentDiagnosticRequest},`get`)}),Object.defineProperty(e,"WorkspaceDiagnosticRequest",{enumerable:!0,get:Q(function(){return C.WorkspaceDiagnosticRequest},`get`)}),Object.defineProperty(e,"DiagnosticRefreshRequest",{enumerable:!0,get:Q(function(){return C.DiagnosticRefreshRequest},`get`)});var w=X2e();Object.defineProperty(e,"NotebookCellKind",{enumerable:!0,get:Q(function(){return w.NotebookCellKind},`get`)}),Object.defineProperty(e,"ExecutionSummary",{enumerable:!0,get:Q(function(){return w.ExecutionSummary},`get`)}),Object.defineProperty(e,"NotebookCell",{enumerable:!0,get:Q(function(){return w.NotebookCell},`get`)}),Object.defineProperty(e,"NotebookDocument",{enumerable:!0,get:Q(function(){return w.NotebookDocument},`get`)}),Object.defineProperty(e,"NotebookDocumentSyncRegistrationType",{enumerable:!0,get:Q(function(){return w.NotebookDocumentSyncRegistrationType},`get`)}),Object.defineProperty(e,"DidOpenNotebookDocumentNotification",{enumerable:!0,get:Q(function(){return w.DidOpenNotebookDocumentNotification},`get`)}),Object.defineProperty(e,"NotebookCellArrayChange",{enumerable:!0,get:Q(function(){return w.NotebookCellArrayChange},`get`)}),Object.defineProperty(e,"DidChangeNotebookDocumentNotification",{enumerable:!0,get:Q(function(){return w.DidChangeNotebookDocumentNotification},`get`)}),Object.defineProperty(e,"DidSaveNotebookDocumentNotification",{enumerable:!0,get:Q(function(){return w.DidSaveNotebookDocumentNotification},`get`)}),Object.defineProperty(e,"DidCloseNotebookDocumentNotification",{enumerable:!0,get:Q(function(){return w.DidCloseNotebookDocumentNotification},`get`)});var T=Z2e();Object.defineProperty(e,"InlineCompletionRequest",{enumerable:!0,get:Q(function(){return T.InlineCompletionRequest},`get`)});var E;(function(e){function t(e){let t=e;return r.string(t)||r.string(t.language)||r.string(t.scheme)||r.string(t.pattern)}Q(t,`is`),e.is=t})(E||(e.TextDocumentFilter=E={}));var D;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebookType)||r.string(t.scheme)||r.string(t.pattern))}Q(t,`is`),e.is=t})(D||(e.NotebookDocumentFilter=D={}));var O;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(r.string(t.notebook)||D.is(t.notebook))&&(t.language===void 0||r.string(t.language))}Q(t,`is`),e.is=t})(O||(e.NotebookCellTextDocumentFilter=O={}));var k;(function(e){function t(e){if(!Array.isArray(e))return!1;for(let t of e)if(!r.string(t)&&!E.is(t)&&!O.is(t))return!1;return!0}Q(t,`is`),e.is=t})(k||(e.DocumentSelector=k={}));var A;(function(e){e.method=`client/registerCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(A||(e.RegistrationRequest=A={}));var j;(function(e){e.method=`client/unregisterCapability`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(j||(e.UnregistrationRequest=j={}));var M;(function(e){e.Create=`create`,e.Rename=`rename`,e.Delete=`delete`})(M||(e.ResourceOperationKind=M={}));var N;(function(e){e.Abort=`abort`,e.Transactional=`transactional`,e.TextOnlyTransactional=`textOnlyTransactional`,e.Undo=`undo`})(N||(e.FailureHandlingKind=N={}));var P;(function(e){e.UTF8=`utf-8`,e.UTF16=`utf-16`,e.UTF32=`utf-32`})(P||(e.PositionEncodingKind=P={}));var F;(function(e){function t(e){let t=e;return t&&r.string(t.id)&&t.id.length>0}Q(t,`hasId`),e.hasId=t})(F||(e.StaticRegistrationOptions=F={}));var I;(function(e){function t(e){let t=e;return t&&(t.documentSelector===null||k.is(t.documentSelector))}Q(t,`is`),e.is=t})(I||(e.TextDocumentRegistrationOptions=I={}));var L;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(t.workDoneProgress===void 0||r.boolean(t.workDoneProgress))}Q(t,`is`),e.is=t;function n(e){let t=e;return t&&r.boolean(t.workDoneProgress)}Q(n,`hasWorkDoneProgress`),e.hasWorkDoneProgress=n})(L||(e.WorkDoneProgressOptions=L={}));var R;(function(e){e.method=`initialize`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(R||(e.InitializeRequest=R={}));var ee;(function(e){e.unknownProtocolVersion=1})(ee||(e.InitializeErrorCodes=ee={}));var z;(function(e){e.method=`initialized`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(z||(e.InitializedNotification=z={}));var B;(function(e){e.method=`shutdown`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType0(e.method)})(B||(e.ShutdownRequest=B={}));var te;(function(e){e.method=`exit`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType0(e.method)})(te||(e.ExitNotification=te={}));var ne;(function(e){e.method=`workspace/didChangeConfiguration`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(ne||(e.DidChangeConfigurationNotification=ne={}));var re;(function(e){e.Error=1,e.Warning=2,e.Info=3,e.Log=4,e.Debug=5})(re||(e.MessageType=re={}));var ie;(function(e){e.method=`window/showMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(ie||(e.ShowMessageNotification=ie={}));var ae;(function(e){e.method=`window/showMessageRequest`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(e.method)})(ae||(e.ShowMessageRequest=ae={}));var oe;(function(e){e.method=`window/logMessage`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(oe||(e.LogMessageNotification=oe={}));var se;(function(e){e.method=`telemetry/event`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(se||(e.TelemetryEventNotification=se={}));var ce;(function(e){e.None=0,e.Full=1,e.Incremental=2})(ce||(e.TextDocumentSyncKind=ce={}));var le;(function(e){e.method=`textDocument/didOpen`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(le||(e.DidOpenTextDocumentNotification=le={}));var ue;(function(e){function t(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}Q(t,`isIncremental`),e.isIncremental=t;function n(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}Q(n,`isFull`),e.isFull=n})(ue||(e.TextDocumentContentChangeEvent=ue={}));var de;(function(e){e.method=`textDocument/didChange`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(de||(e.DidChangeTextDocumentNotification=de={}));var fe;(function(e){e.method=`textDocument/didClose`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(fe||(e.DidCloseTextDocumentNotification=fe={}));var pe;(function(e){e.method=`textDocument/didSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(pe||(e.DidSaveTextDocumentNotification=pe={}));var me;(function(e){e.Manual=1,e.AfterDelay=2,e.FocusOut=3})(me||(e.TextDocumentSaveReason=me={}));var he;(function(e){e.method=`textDocument/willSave`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(he||(e.WillSaveTextDocumentNotification=he={}));var ge;(function(e){e.method=`textDocument/willSaveWaitUntil`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ge||(e.WillSaveTextDocumentWaitUntilRequest=ge={}));var _e;(function(e){e.method=`workspace/didChangeWatchedFiles`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolNotificationType(e.method)})(_e||(e.DidChangeWatchedFilesNotification=_e={}));var ve;(function(e){e.Created=1,e.Changed=2,e.Deleted=3})(ve||(e.FileChangeType=ve={}));var ye;(function(e){function t(e){let t=e;return r.objectLiteral(t)&&(n.URI.is(t.baseUri)||n.WorkspaceFolder.is(t.baseUri))&&r.string(t.pattern)}Q(t,`is`),e.is=t})(ye||(e.RelativePattern=ye={}));var be;(function(e){e.Create=1,e.Change=2,e.Delete=4})(be||(e.WatchKind=be={}));var xe;(function(e){e.method=`textDocument/publishDiagnostics`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolNotificationType(e.method)})(xe||(e.PublishDiagnosticsNotification=xe={}));var Se;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.TriggerForIncompleteCompletions=3})(Se||(e.CompletionTriggerKind=Se={}));var V;(function(e){e.method=`textDocument/completion`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(V||(e.CompletionRequest=V={}));var Ce;(function(e){e.method=`completionItem/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ce||(e.CompletionResolveRequest=Ce={}));var we;(function(e){e.method=`textDocument/hover`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(we||(e.HoverRequest=we={}));var Te;(function(e){e.Invoked=1,e.TriggerCharacter=2,e.ContentChange=3})(Te||(e.SignatureHelpTriggerKind=Te={}));var Ee;(function(e){e.method=`textDocument/signatureHelp`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ee||(e.SignatureHelpRequest=Ee={}));var De;(function(e){e.method=`textDocument/definition`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(De||(e.DefinitionRequest=De={}));var H;(function(e){e.method=`textDocument/references`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(H||(e.ReferencesRequest=H={}));var Oe;(function(e){e.method=`textDocument/documentHighlight`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Oe||(e.DocumentHighlightRequest=Oe={}));var ke;(function(e){e.method=`textDocument/documentSymbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ke||(e.DocumentSymbolRequest=ke={}));var Ae;(function(e){e.method=`textDocument/codeAction`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ae||(e.CodeActionRequest=Ae={}));var U;(function(e){e.method=`codeAction/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(U||(e.CodeActionResolveRequest=U={}));var je;(function(e){e.method=`workspace/symbol`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(je||(e.WorkspaceSymbolRequest=je={}));var Me;(function(e){e.method=`workspaceSymbol/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Me||(e.WorkspaceSymbolResolveRequest=Me={}));var Ne;(function(e){e.method=`textDocument/codeLens`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ne||(e.CodeLensRequest=Ne={}));var Pe;(function(e){e.method=`codeLens/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Pe||(e.CodeLensResolveRequest=Pe={}));var Fe;(function(e){e.method=`workspace/codeLens/refresh`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType0(e.method)})(Fe||(e.CodeLensRefreshRequest=Fe={}));var Ie;(function(e){e.method=`textDocument/documentLink`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ie||(e.DocumentLinkRequest=Ie={}));var Le;(function(e){e.method=`documentLink/resolve`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Le||(e.DocumentLinkResolveRequest=Le={}));var Re;(function(e){e.method=`textDocument/formatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Re||(e.DocumentFormattingRequest=Re={}));var ze;(function(e){e.method=`textDocument/rangeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(ze||(e.DocumentRangeFormattingRequest=ze={}));var Be;(function(e){e.method=`textDocument/rangesFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Be||(e.DocumentRangesFormattingRequest=Be={}));var Ve;(function(e){e.method=`textDocument/onTypeFormatting`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ve||(e.DocumentOnTypeFormattingRequest=Ve={}));var He;(function(e){e.Identifier=1})(He||(e.PrepareSupportDefaultBehavior=He={}));var Ue;(function(e){e.method=`textDocument/rename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ue||(e.RenameRequest=Ue={}));var We;(function(e){e.method=`textDocument/prepareRename`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(We||(e.PrepareRenameRequest=We={}));var Ge;(function(e){e.method=`workspace/executeCommand`,e.messageDirection=t.MessageDirection.clientToServer,e.type=new t.ProtocolRequestType(e.method)})(Ge||(e.ExecuteCommandRequest=Ge={}));var Ke;(function(e){e.method=`workspace/applyEdit`,e.messageDirection=t.MessageDirection.serverToClient,e.type=new t.ProtocolRequestType(`workspace/applyEdit`)})(Ke||(e.ApplyWorkspaceEditRequest=Ke={}))}}),$2e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/connection.js"(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var t=tV();function n(e,n,r,i){return t.ConnectionStrategy.is(i)&&(i={connectionStrategy:i}),(0,t.createMessageConnection)(e,n,r,i)}Q(n,`createProtocolConnection`),e.createProtocolConnection=n}}),e4e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/common/api.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:Q(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.LSPErrorCodes=e.createProtocolConnection=void 0,n(tV(),e),n((KB(),gB(_B)),e),n(rV(),e),n(Q2e(),e);var r=$2e();Object.defineProperty(e,"createProtocolConnection",{enumerable:!0,get:Q(function(){return r.createProtocolConnection},`get`)});var i;(function(e){e.lspReservedErrorRangeStart=-32899,e.RequestFailed=-32803,e.ServerCancelled=-32802,e.ContentModified=-32801,e.RequestCancelled=-32800,e.lspReservedErrorRangeEnd=-32800})(i||(e.LSPErrorCodes=i={}))}}),t4e=dB({"../../node_modules/.pnpm/vscode-languageserver-protocol@3.17.5/node_modules/vscode-languageserver-protocol/lib/browser/main.js"(e){"use strict";var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:Q(function(){return t[n]},`get`)}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.createProtocolConnection=void 0;var r=nV();n(nV(),e),n(e4e(),e);function i(e,t,n,i){return(0,r.createMessageConnection)(e,t,n,i)}Q(i,`createProtocolConnection`),e.createProtocolConnection=i}}),aV={},fB(aV,{AbstractAstReflection:()=>sV,AbstractCstNode:()=>GJ,AbstractLangiumParser:()=>QJ,AbstractParserErrorMessageProvider:()=>eY,AbstractThreadedAsyncParser:()=>Rnt,AstUtils:()=>pV,BiMap:()=>EY,Cancellation:()=>sY,CompositeCstNodeImpl:()=>qJ,ContextCache:()=>MY,CstNodeBuilder:()=>WJ,CstUtils:()=>oV,DEFAULT_TOKENIZE_OPTIONS:()=>eX,DONE_RESULT:()=>uV,DatatypeSymbol:()=>YJ,DefaultAstNodeDescriptionProvider:()=>UY,DefaultAstNodeLocator:()=>GY,DefaultAsyncParser:()=>lX,DefaultCommentProvider:()=>cX,DefaultConfigurationProvider:()=>qY,DefaultDocumentBuilder:()=>XY,DefaultDocumentValidator:()=>VY,DefaultHydrator:()=>dX,DefaultIndexManager:()=>ZY,DefaultJsonSerializer:()=>IY,DefaultLangiumDocumentFactory:()=>yY,DefaultLangiumDocuments:()=>bY,DefaultLangiumProfiler:()=>Wnt,DefaultLexer:()=>tX,DefaultLexerErrorMessageProvider:()=>$Y,DefaultLinker:()=>SY,DefaultNameProvider:()=>CY,DefaultReferenceDescriptionProvider:()=>WY,DefaultReferences:()=>wY,DefaultScopeComputation:()=>DY,DefaultScopeProvider:()=>FY,DefaultServiceRegistry:()=>LY,DefaultTokenBuilder:()=>iY,DefaultValueConverter:()=>aY,DefaultWorkspaceLock:()=>uX,DefaultWorkspaceManager:()=>QY,Deferred:()=>dY,Disposable:()=>YY,DisposableCache:()=>AY,DocumentCache:()=>NY,DocumentState:()=>vY,DocumentValidator:()=>HY,EMPTY_SCOPE:()=>Pnt,EMPTY_STREAM:()=>lV,EmptyFileSystem:()=>yX,EmptyFileSystemProvider:()=>vX,ErrorWithLocation:()=>_H,GrammarAST:()=>mV,GrammarUtils:()=>gH,IndentationAwareLexer:()=>Vnt,IndentationAwareTokenBuilder:()=>gX,JSDocDocumentationProvider:()=>sX,LangiumCompletionParser:()=>nY,LangiumParser:()=>$J,LangiumParserErrorMessageProvider:()=>tY,LeafCstNodeImpl:()=>KJ,LexingMode:()=>hX,MapScope:()=>Nnt,Module:()=>Bnt,MultiMap:()=>TY,MultiMapScope:()=>kY,OperationCancelled:()=>uY,ParserWorker:()=>znt,ProfilingTask:()=>bX,Reduction:()=>fV,RefResolving:()=>xY,RegExpUtils:()=>vH,RootCstNodeImpl:()=>JJ,SimpleCache:()=>jY,StreamImpl:()=>cV,StreamScope:()=>OY,TextDocument:()=>pY,TreeStreamImpl:()=>dV,URI:()=>mY,UriTrie:()=>_Y,UriUtils:()=>gY,VALIDATE_EACH_NODE:()=>BY,ValidationCategory:()=>RY,ValidationRegistry:()=>zY,ValueConverter:()=>oY,WorkspaceCache:()=>PY,assertCondition:()=>GI,assertUnreachable:()=>WI,createCompletionParser:()=>Cz,createDefaultCoreModule:()=>tB,createDefaultSharedCoreModule:()=>nB,createGrammarConfig:()=>kL,createLangiumParser:()=>wz,createParser:()=>hz,delayNextTick:()=>Ez,diagnosticData:()=>Rz,eagerLoad:()=>iB,getDiagnosticRange:()=>zz,indentationBuilderDefaultOptions:()=>mX,inject:()=>rB,interruptAndCheck:()=>Az,isAstNode:()=>DF,isAstNodeDescription:()=>AF,isAstNodeWithComment:()=>Iz,isCompositeCstNode:()=>MF,isIMultiModeLexerDefinition:()=>Uz,isJSDoc:()=>Kz,isLeafCstNode:()=>NF,isLinkingError:()=>jF,isMultiReference:()=>kF,isNamed:()=>Fz,isOperationCancelled:()=>kz,isReference:()=>OF,isRootCstNode:()=>PF,isTokenTypeArray:()=>Hz,isTokenTypeDictionary:()=>Wz,loadGrammarFromJson:()=>cB,parseJSDoc:()=>Gz,prepareLangiumParser:()=>Tz,setInterruptionPeriod:()=>Oz,startCancelableOperation:()=>Dz,stream:()=>IF,toDiagnosticData:()=>Vz,toDiagnosticSeverity:()=>Bz}),oV={},fB(oV,{DefaultNameRegexp:()=>hH,RangeComparison:()=>mH,compareRange:()=>FI,findCommentNode:()=>LI,findDeclarationNodeAtOffset:()=>FKe,findLeafNodeAtOffset:()=>zI,findLeafNodeBeforeOffset:()=>BI,flattenCst:()=>PKe,getDatatypeNode:()=>NKe,getInteriorNodes:()=>RKe,getNextNode:()=>IKe,getPreviousNode:()=>HI,getStartlineNode:()=>LKe,inRange:()=>II,isChildNode:()=>MI,isCommentNode:()=>RI,streamCst:()=>jI,toDocumentSegment:()=>PI,tokenToRange:()=>NI}),Q(DF,`isAstNode`),Q(OF,`isReference`),Q(kF,`isMultiReference`),Q(AF,`isAstNodeDescription`),Q(jF,`isLinkingError`),sV=class{static{Q(this,`AbstractAstReflection`)}constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){let t=this.types[e.container.$type];if(!t)throw Error(`Type ${e.container.$type||`undefined`} not found.`);let n=t.properties[e.property]?.referenceType;if(!n)throw Error(`Property ${e.property||`undefined`} of type ${e.container.$type} is not a reference.`);return n}getTypeMetaData(e){return this.types[e]||{name:e,properties:{},superTypes:[]}}isInstance(e,t){return DF(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){if(e===t)return!0;let n=this.subtypes[e];n||=this.subtypes[e]={};let r=n[t];if(r!==void 0)return r;{let r=this.types[e],i=r?r.superTypes.some(e=>this.isSubtype(e,t)):!1;return n[t]=i,i}}getAllSubTypes(e){let t=this.allSubtypes[e];if(t)return t;{let t=this.getAllTypes(),n=[];for(let r of t)this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n,n}}},Q(MF,`isCompositeCstNode`),Q(NF,`isLeafCstNode`),Q(PF,`isRootCstNode`),cV=class e{static{Q(this,`StreamImpl`)}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:Q(()=>this.nextFn(e.state),`next`),[Symbol.iterator]:()=>e};return e}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let e=this.iterator(),t=0,n=e.next();for(;!n.done;)t++,n=e.next();return t}toArray(){let e=[],t=this.iterator(),n;do n=t.next(),n.value!==void 0&&e.push(n.value);while(!n.done);return e}toSet(){return new Set(this)}toMap(e,t){let n=this.map(n=>[e?e(n):n,t?t(n):n]);return new Map(n)}toString(){return this.join()}concat(t){return new e(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),e=>{let t;if(!e.firstDone){do if(t=this.nextFn(e.first),!t.done)return t;while(!t.done);e.firstDone=!0}do if(t=e.iterator.next(),!t.done)return t;while(!t.done);return uV})}join(e=`,`){let t=this.iterator(),n=``,r,i=!1;do r=t.next(),r.done||(i&&(n+=e),n+=hKe(r.value)),i=!0;while(!r.done);return n}indexOf(e,t=0){let n=this.iterator(),r=0,i=n.next();for(;!i.done;){if(r>=t&&i.value===e)return r;i=n.next(),r++}return-1}every(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(!e(n.value))return!1;n=t.next()}return!0}some(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return!0;n=t.next()}return!1}forEach(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;)e(r.value,n),r=t.next(),n++}map(t){return new e(this.startFn,e=>{let{done:n,value:r}=this.nextFn(e);return n?uV:{done:!1,value:t(r)}})}filter(t){return new e(this.startFn,e=>{let n;do if(n=this.nextFn(e),!n.done&&t(n.value))return n;while(!n.done);return uV})}nonNullable(){return this.filter(e=>e!=null)}reduce(e,t){let n=this.iterator(),r=t,i=n.next();for(;!i.done;)r=r===void 0?i.value:e(r,i.value),i=n.next();return r}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,n){let r=e.next();if(r.done)return n;let i=this.recursiveReduce(e,t,n);return i===void 0?r.value:t(i,r.value)}find(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(e(n.value))return n.value;n=t.next()}}findIndex(e){let t=this.iterator(),n=0,r=t.next();for(;!r.done;){if(e(r.value))return n;r=t.next(),n++}return-1}includes(e){let t=this.iterator(),n=t.next();for(;!n.done;){if(n.value===e)return!0;n=t.next()}return!1}flatMap(t){return new e(()=>({this:this.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:n,value:r}=this.nextFn(e.this);if(!n){let n=t(r);if(FF(n))e.iterator=n[Symbol.iterator]();else return{done:!1,value:n}}}while(e.iterator);return uV})}flat(t){if(t===void 0&&(t=1),t<=0)return this;let n=t>1?this.flat(t-1):this;return new e(()=>({this:n.startFn()}),e=>{do{if(e.iterator){let t=e.iterator.next();if(t.done)e.iterator=void 0;else return t}let{done:t,value:r}=n.nextFn(e.this);if(!t){if(FF(r))e.iterator=r[Symbol.iterator]();else return{done:!1,value:r}}}while(e.iterator);return uV})}head(){let e=this.iterator().next();if(!e.done)return e.value}tail(t=1){return new e(()=>{let e=this.startFn();for(let n=0;n<t;n++)if(this.nextFn(e).done)return e;return e},this.nextFn)}limit(t){return new e(()=>({size:0,state:this.startFn()}),e=>(e.size++,e.size>t?uV:this.nextFn(e.state)))}distinct(t){return new e(()=>({set:new Set,internalState:this.startFn()}),e=>{let n;do if(n=this.nextFn(e.internalState),!n.done){let r=t?t(n.value):n.value;if(!e.set.has(r))return e.set.add(r),n}while(!n.done);return uV})}exclude(e,t){let n=new Set;for(let r of e){let e=t?t(r):r;n.add(e)}return this.filter(e=>{let r=t?t(e):e;return!n.has(r)})}},Q(hKe,`toString`),Q(FF,`isIterable`),lV=new cV(()=>void 0,()=>uV),uV=Object.freeze({done:!0,value:void 0}),Q(IF,`stream`),dV=class extends cV{static{Q(this,`TreeStreamImpl`)}constructor(e,t,n){super(()=>({iterators:n?.includeRoot?[[e][Symbol.iterator]()]:[t(e)[Symbol.iterator]()],pruned:!1}),e=>{for(e.pruned&&=(e.iterators.pop(),!1);e.iterators.length>0;){let n=e.iterators[e.iterators.length-1].next();if(n.done)e.iterators.pop();else return e.iterators.push(t(n.value)[Symbol.iterator]()),n}return uV})}iterator(){let e={state:this.startFn(),next:Q(()=>this.nextFn(e.state),`next`),prune:Q(()=>{e.state.pruned=!0},`prune`),[Symbol.iterator]:()=>e};return e}},(function(e){function t(e){return e.reduce((e,t)=>e+t,0)}Q(t,`sum`),e.sum=t;function n(e){return e.reduce((e,t)=>e*t,0)}Q(n,`product`),e.product=n;function r(e){return e.reduce((e,t)=>Math.min(e,t))}Q(r,`min`),e.min=r;function i(e){return e.reduce((e,t)=>Math.max(e,t))}Q(i,`max`),e.max=i})(fV||={}),pV={},fB(pV,{assignMandatoryProperties:()=>qF,copyAstNode:()=>YF,findRootNode:()=>BF,getContainerOfType:()=>RF,getDocument:()=>zF,getReferenceNodes:()=>VF,hasContainerOfType:()=>gKe,linkContentToContainer:()=>LF,streamAllContents:()=>UF,streamAst:()=>WF,streamContents:()=>HF,streamReferences:()=>KF}),Q(LF,`linkContentToContainer`),Q(RF,`getContainerOfType`),Q(gKe,`hasContainerOfType`),Q(zF,`getDocument`),Q(BF,`findRootNode`),Q(VF,`getReferenceNodes`),Q(HF,`streamContents`),Q(UF,`streamAllContents`),Q(WF,`streamAst`),Q(GF,`isAstNodeInRange`),Q(KF,`streamReferences`),Q(qF,`assignMandatoryProperties`),Q(JF,`copyDefaultValue`),Q(YF,`copyAstNode`),mV={},fB(mV,{AbstractElement:()=>hV,AbstractParserRule:()=>gV,AbstractRule:()=>_V,AbstractType:()=>vV,Action:()=>yV,Alternatives:()=>bV,ArrayLiteral:()=>xV,ArrayType:()=>SV,Assignment:()=>CV,BooleanLiteral:()=>wV,CharacterRange:()=>TV,Condition:()=>EV,Conjunction:()=>DV,CrossReference:()=>OV,Disjunction:()=>kV,EndOfFile:()=>AV,Grammar:()=>jV,GrammarImport:()=>MV,Group:()=>NV,InferredType:()=>PV,InfixRule:()=>FV,InfixRuleOperatorList:()=>IV,InfixRuleOperators:()=>LV,Interface:()=>RV,Keyword:()=>zV,LangiumGrammarAstReflection:()=>fH,LangiumGrammarTerminals:()=>n4e,NamedArgument:()=>BV,NegatedToken:()=>VV,Negation:()=>HV,NumberLiteral:()=>UV,Parameter:()=>WV,ParameterReference:()=>GV,ParserRule:()=>KV,ReferenceType:()=>qV,RegexToken:()=>JV,ReturnType:()=>YV,RuleCall:()=>XV,SimpleType:()=>ZV,StringLiteral:()=>QV,TerminalAlternatives:()=>$V,TerminalElement:()=>eH,TerminalGroup:()=>tH,TerminalRule:()=>nH,TerminalRuleCall:()=>rH,Type:()=>iH,TypeAttribute:()=>aH,TypeDefinition:()=>oH,UnionType:()=>sH,UnorderedGroup:()=>cH,UntilToken:()=>lH,ValueLiteral:()=>uH,Wildcard:()=>dH,isAbstractElement:()=>XF,isAbstractParserRule:()=>ZF,isAbstractRule:()=>_Ke,isAbstractType:()=>vKe,isAction:()=>QF,isAlternatives:()=>$F,isArrayLiteral:()=>yKe,isArrayType:()=>eI,isAssignment:()=>tI,isBooleanLiteral:()=>nI,isCharacterRange:()=>rI,isCondition:()=>bKe,isConjunction:()=>iI,isCrossReference:()=>aI,isDisjunction:()=>oI,isEndOfFile:()=>sI,isGrammar:()=>xKe,isGrammarImport:()=>SKe,isGroup:()=>cI,isInferredType:()=>lI,isInfixRule:()=>uI,isInfixRuleOperatorList:()=>CKe,isInfixRuleOperators:()=>wKe,isInterface:()=>dI,isKeyword:()=>fI,isNamedArgument:()=>TKe,isNegatedToken:()=>pI,isNegation:()=>mI,isNumberLiteral:()=>EKe,isParameter:()=>DKe,isParameterReference:()=>hI,isParserRule:()=>gI,isReferenceType:()=>_I,isRegexToken:()=>vI,isReturnType:()=>yI,isRuleCall:()=>bI,isSimpleType:()=>xI,isStringLiteral:()=>OKe,isTerminalAlternatives:()=>SI,isTerminalElement:()=>kKe,isTerminalGroup:()=>CI,isTerminalRule:()=>wI,isTerminalRuleCall:()=>TI,isType:()=>EI,isTypeAttribute:()=>AKe,isTypeDefinition:()=>jKe,isUnionType:()=>DI,isUnorderedGroup:()=>OI,isUntilToken:()=>kI,isValueLiteral:()=>MKe,isWildcard:()=>AI,reflection:()=>pH}),n4e={ID:/\^?[_a-zA-Z][\w_]*/,STRING:/"(\\.|[^"\\])*"|'(\\.|[^'\\])*'/,NUMBER:/NaN|-?((\d*\.\d+|\d+)([Ee][+-]?\d+)?|Infinity)/,RegexLiteral:/\/(?![*+?])(?:[^\r\n\[/\\]|\\.|\[(?:[^\r\n\]\\]|\\.)*\])+\/[a-z]*/,WS:/\s+/,ML_COMMENT:/\/\*[\s\S]*?\*\//,SL_COMMENT:/\/\/[^\n\r]*/},hV={$type:`AbstractElement`,cardinality:`cardinality`},Q(XF,`isAbstractElement`),gV={$type:`AbstractParserRule`},Q(ZF,`isAbstractParserRule`),_V={$type:`AbstractRule`},Q(_Ke,`isAbstractRule`),vV={$type:`AbstractType`},Q(vKe,`isAbstractType`),yV={$type:`Action`,cardinality:`cardinality`,feature:`feature`,inferredType:`inferredType`,operator:`operator`,type:`type`},Q(QF,`isAction`),bV={$type:`Alternatives`,cardinality:`cardinality`,elements:`elements`},Q($F,`isAlternatives`),xV={$type:`ArrayLiteral`,elements:`elements`},Q(yKe,`isArrayLiteral`),SV={$type:`ArrayType`,elementType:`elementType`},Q(eI,`isArrayType`),CV={$type:`Assignment`,cardinality:`cardinality`,feature:`feature`,operator:`operator`,predicate:`predicate`,terminal:`terminal`},Q(tI,`isAssignment`),wV={$type:`BooleanLiteral`,true:`true`},Q(nI,`isBooleanLiteral`),TV={$type:`CharacterRange`,cardinality:`cardinality`,left:`left`,lookahead:`lookahead`,parenthesized:`parenthesized`,right:`right`},Q(rI,`isCharacterRange`),EV={$type:`Condition`},Q(bKe,`isCondition`),DV={$type:`Conjunction`,left:`left`,right:`right`},Q(iI,`isConjunction`),OV={$type:`CrossReference`,cardinality:`cardinality`,deprecatedSyntax:`deprecatedSyntax`,isMulti:`isMulti`,terminal:`terminal`,type:`type`},Q(aI,`isCrossReference`),kV={$type:`Disjunction`,left:`left`,right:`right`},Q(oI,`isDisjunction`),AV={$type:`EndOfFile`,cardinality:`cardinality`},Q(sI,`isEndOfFile`),jV={$type:`Grammar`,imports:`imports`,interfaces:`interfaces`,isDeclared:`isDeclared`,name:`name`,rules:`rules`,types:`types`},Q(xKe,`isGrammar`),MV={$type:`GrammarImport`,path:`path`},Q(SKe,`isGrammarImport`),NV={$type:`Group`,cardinality:`cardinality`,elements:`elements`,guardCondition:`guardCondition`,predicate:`predicate`},Q(cI,`isGroup`),PV={$type:`InferredType`,name:`name`},Q(lI,`isInferredType`),FV={$type:`InfixRule`,call:`call`,dataType:`dataType`,inferredType:`inferredType`,name:`name`,operators:`operators`,parameters:`parameters`,returnType:`returnType`},Q(uI,`isInfixRule`),IV={$type:`InfixRuleOperatorList`,associativity:`associativity`,operators:`operators`},Q(CKe,`isInfixRuleOperatorList`),LV={$type:`InfixRuleOperators`,precedences:`precedences`},Q(wKe,`isInfixRuleOperators`),RV={$type:`Interface`,attributes:`attributes`,name:`name`,superTypes:`superTypes`},Q(dI,`isInterface`),zV={$type:`Keyword`,cardinality:`cardinality`,predicate:`predicate`,value:`value`},Q(fI,`isKeyword`),BV={$type:`NamedArgument`,calledByName:`calledByName`,parameter:`parameter`,value:`value`},Q(TKe,`isNamedArgument`),VV={$type:`NegatedToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`},Q(pI,`isNegatedToken`),HV={$type:`Negation`,value:`value`},Q(mI,`isNegation`),UV={$type:`NumberLiteral`,value:`value`},Q(EKe,`isNumberLiteral`),WV={$type:`Parameter`,name:`name`},Q(DKe,`isParameter`),GV={$type:`ParameterReference`,parameter:`parameter`},Q(hI,`isParameterReference`),KV={$type:`ParserRule`,dataType:`dataType`,definition:`definition`,entry:`entry`,fragment:`fragment`,inferredType:`inferredType`,name:`name`,parameters:`parameters`,returnType:`returnType`},Q(gI,`isParserRule`),qV={$type:`ReferenceType`,isMulti:`isMulti`,referenceType:`referenceType`},Q(_I,`isReferenceType`),JV={$type:`RegexToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,regex:`regex`},Q(vI,`isRegexToken`),YV={$type:`ReturnType`,name:`name`},Q(yI,`isReturnType`),XV={$type:`RuleCall`,arguments:`arguments`,cardinality:`cardinality`,predicate:`predicate`,rule:`rule`},Q(bI,`isRuleCall`),ZV={$type:`SimpleType`,primitiveType:`primitiveType`,stringType:`stringType`,typeRef:`typeRef`},Q(xI,`isSimpleType`),QV={$type:`StringLiteral`,value:`value`},Q(OKe,`isStringLiteral`),$V={$type:`TerminalAlternatives`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`},Q(SI,`isTerminalAlternatives`),eH={$type:`TerminalElement`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},Q(kKe,`isTerminalElement`),tH={$type:`TerminalGroup`,cardinality:`cardinality`,elements:`elements`,lookahead:`lookahead`,parenthesized:`parenthesized`},Q(CI,`isTerminalGroup`),nH={$type:`TerminalRule`,definition:`definition`,fragment:`fragment`,hidden:`hidden`,name:`name`,type:`type`},Q(wI,`isTerminalRule`),rH={$type:`TerminalRuleCall`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,rule:`rule`},Q(TI,`isTerminalRuleCall`),iH={$type:`Type`,name:`name`,type:`type`},Q(EI,`isType`),aH={$type:`TypeAttribute`,defaultValue:`defaultValue`,isOptional:`isOptional`,name:`name`,type:`type`},Q(AKe,`isTypeAttribute`),oH={$type:`TypeDefinition`},Q(jKe,`isTypeDefinition`),sH={$type:`UnionType`,types:`types`},Q(DI,`isUnionType`),cH={$type:`UnorderedGroup`,cardinality:`cardinality`,elements:`elements`},Q(OI,`isUnorderedGroup`),lH={$type:`UntilToken`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`,terminal:`terminal`},Q(kI,`isUntilToken`),uH={$type:`ValueLiteral`},Q(MKe,`isValueLiteral`),dH={$type:`Wildcard`,cardinality:`cardinality`,lookahead:`lookahead`,parenthesized:`parenthesized`},Q(AI,`isWildcard`),fH=class extends sV{static{Q(this,`LangiumGrammarAstReflection`)}constructor(){super(...arguments),this.types={AbstractElement:{name:hV.$type,properties:{cardinality:{name:hV.cardinality}},superTypes:[]},AbstractParserRule:{name:gV.$type,properties:{},superTypes:[_V.$type,vV.$type]},AbstractRule:{name:_V.$type,properties:{},superTypes:[]},AbstractType:{name:vV.$type,properties:{},superTypes:[]},Action:{name:yV.$type,properties:{cardinality:{name:yV.cardinality},feature:{name:yV.feature},inferredType:{name:yV.inferredType},operator:{name:yV.operator},type:{name:yV.type,referenceType:vV.$type}},superTypes:[hV.$type]},Alternatives:{name:bV.$type,properties:{cardinality:{name:bV.cardinality},elements:{name:bV.elements,defaultValue:[]}},superTypes:[hV.$type]},ArrayLiteral:{name:xV.$type,properties:{elements:{name:xV.elements,defaultValue:[]}},superTypes:[uH.$type]},ArrayType:{name:SV.$type,properties:{elementType:{name:SV.elementType}},superTypes:[oH.$type]},Assignment:{name:CV.$type,properties:{cardinality:{name:CV.cardinality},feature:{name:CV.feature},operator:{name:CV.operator},predicate:{name:CV.predicate},terminal:{name:CV.terminal}},superTypes:[hV.$type]},BooleanLiteral:{name:wV.$type,properties:{true:{name:wV.true,defaultValue:!1}},superTypes:[EV.$type,uH.$type]},CharacterRange:{name:TV.$type,properties:{cardinality:{name:TV.cardinality},left:{name:TV.left},lookahead:{name:TV.lookahead},parenthesized:{name:TV.parenthesized,defaultValue:!1},right:{name:TV.right}},superTypes:[eH.$type]},Condition:{name:EV.$type,properties:{},superTypes:[]},Conjunction:{name:DV.$type,properties:{left:{name:DV.left},right:{name:DV.right}},superTypes:[EV.$type]},CrossReference:{name:OV.$type,properties:{cardinality:{name:OV.cardinality},deprecatedSyntax:{name:OV.deprecatedSyntax,defaultValue:!1},isMulti:{name:OV.isMulti,defaultValue:!1},terminal:{name:OV.terminal},type:{name:OV.type,referenceType:vV.$type}},superTypes:[hV.$type]},Disjunction:{name:kV.$type,properties:{left:{name:kV.left},right:{name:kV.right}},superTypes:[EV.$type]},EndOfFile:{name:AV.$type,properties:{cardinality:{name:AV.cardinality}},superTypes:[hV.$type]},Grammar:{name:jV.$type,properties:{imports:{name:jV.imports,defaultValue:[]},interfaces:{name:jV.interfaces,defaultValue:[]},isDeclared:{name:jV.isDeclared,defaultValue:!1},name:{name:jV.name},rules:{name:jV.rules,defaultValue:[]},types:{name:jV.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:MV.$type,properties:{path:{name:MV.path}},superTypes:[]},Group:{name:NV.$type,properties:{cardinality:{name:NV.cardinality},elements:{name:NV.elements,defaultValue:[]},guardCondition:{name:NV.guardCondition},predicate:{name:NV.predicate}},superTypes:[hV.$type]},InferredType:{name:PV.$type,properties:{name:{name:PV.name}},superTypes:[vV.$type]},InfixRule:{name:FV.$type,properties:{call:{name:FV.call},dataType:{name:FV.dataType},inferredType:{name:FV.inferredType},name:{name:FV.name},operators:{name:FV.operators},parameters:{name:FV.parameters,defaultValue:[]},returnType:{name:FV.returnType,referenceType:vV.$type}},superTypes:[gV.$type]},InfixRuleOperatorList:{name:IV.$type,properties:{associativity:{name:IV.associativity},operators:{name:IV.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:LV.$type,properties:{precedences:{name:LV.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:RV.$type,properties:{attributes:{name:RV.attributes,defaultValue:[]},name:{name:RV.name},superTypes:{name:RV.superTypes,defaultValue:[],referenceType:vV.$type}},superTypes:[vV.$type]},Keyword:{name:zV.$type,properties:{cardinality:{name:zV.cardinality},predicate:{name:zV.predicate},value:{name:zV.value}},superTypes:[hV.$type]},NamedArgument:{name:BV.$type,properties:{calledByName:{name:BV.calledByName,defaultValue:!1},parameter:{name:BV.parameter,referenceType:WV.$type},value:{name:BV.value}},superTypes:[]},NegatedToken:{name:VV.$type,properties:{cardinality:{name:VV.cardinality},lookahead:{name:VV.lookahead},parenthesized:{name:VV.parenthesized,defaultValue:!1},terminal:{name:VV.terminal}},superTypes:[eH.$type]},Negation:{name:HV.$type,properties:{value:{name:HV.value}},superTypes:[EV.$type]},NumberLiteral:{name:UV.$type,properties:{value:{name:UV.value}},superTypes:[uH.$type]},Parameter:{name:WV.$type,properties:{name:{name:WV.name}},superTypes:[]},ParameterReference:{name:GV.$type,properties:{parameter:{name:GV.parameter,referenceType:WV.$type}},superTypes:[EV.$type]},ParserRule:{name:KV.$type,properties:{dataType:{name:KV.dataType},definition:{name:KV.definition},entry:{name:KV.entry,defaultValue:!1},fragment:{name:KV.fragment,defaultValue:!1},inferredType:{name:KV.inferredType},name:{name:KV.name},parameters:{name:KV.parameters,defaultValue:[]},returnType:{name:KV.returnType,referenceType:vV.$type}},superTypes:[gV.$type]},ReferenceType:{name:qV.$type,properties:{isMulti:{name:qV.isMulti,defaultValue:!1},referenceType:{name:qV.referenceType}},superTypes:[oH.$type]},RegexToken:{name:JV.$type,properties:{cardinality:{name:JV.cardinality},lookahead:{name:JV.lookahead},parenthesized:{name:JV.parenthesized,defaultValue:!1},regex:{name:JV.regex}},superTypes:[eH.$type]},ReturnType:{name:YV.$type,properties:{name:{name:YV.name}},superTypes:[]},RuleCall:{name:XV.$type,properties:{arguments:{name:XV.arguments,defaultValue:[]},cardinality:{name:XV.cardinality},predicate:{name:XV.predicate},rule:{name:XV.rule,referenceType:_V.$type}},superTypes:[hV.$type]},SimpleType:{name:ZV.$type,properties:{primitiveType:{name:ZV.primitiveType},stringType:{name:ZV.stringType},typeRef:{name:ZV.typeRef,referenceType:vV.$type}},superTypes:[oH.$type]},StringLiteral:{name:QV.$type,properties:{value:{name:QV.value}},superTypes:[uH.$type]},TerminalAlternatives:{name:$V.$type,properties:{cardinality:{name:$V.cardinality},elements:{name:$V.elements,defaultValue:[]},lookahead:{name:$V.lookahead},parenthesized:{name:$V.parenthesized,defaultValue:!1}},superTypes:[eH.$type]},TerminalElement:{name:eH.$type,properties:{cardinality:{name:eH.cardinality},lookahead:{name:eH.lookahead},parenthesized:{name:eH.parenthesized,defaultValue:!1}},superTypes:[hV.$type]},TerminalGroup:{name:tH.$type,properties:{cardinality:{name:tH.cardinality},elements:{name:tH.elements,defaultValue:[]},lookahead:{name:tH.lookahead},parenthesized:{name:tH.parenthesized,defaultValue:!1}},superTypes:[eH.$type]},TerminalRule:{name:nH.$type,properties:{definition:{name:nH.definition},fragment:{name:nH.fragment,defaultValue:!1},hidden:{name:nH.hidden,defaultValue:!1},name:{name:nH.name},type:{name:nH.type}},superTypes:[_V.$type]},TerminalRuleCall:{name:rH.$type,properties:{cardinality:{name:rH.cardinality},lookahead:{name:rH.lookahead},parenthesized:{name:rH.parenthesized,defaultValue:!1},rule:{name:rH.rule,referenceType:nH.$type}},superTypes:[eH.$type]},Type:{name:iH.$type,properties:{name:{name:iH.name},type:{name:iH.type}},superTypes:[vV.$type]},TypeAttribute:{name:aH.$type,properties:{defaultValue:{name:aH.defaultValue},isOptional:{name:aH.isOptional,defaultValue:!1},name:{name:aH.name},type:{name:aH.type}},superTypes:[]},TypeDefinition:{name:oH.$type,properties:{},superTypes:[]},UnionType:{name:sH.$type,properties:{types:{name:sH.types,defaultValue:[]}},superTypes:[oH.$type]},UnorderedGroup:{name:cH.$type,properties:{cardinality:{name:cH.cardinality},elements:{name:cH.elements,defaultValue:[]}},superTypes:[hV.$type]},UntilToken:{name:lH.$type,properties:{cardinality:{name:lH.cardinality},lookahead:{name:lH.lookahead},parenthesized:{name:lH.parenthesized,defaultValue:!1},terminal:{name:lH.terminal}},superTypes:[eH.$type]},ValueLiteral:{name:uH.$type,properties:{},superTypes:[]},Wildcard:{name:dH.$type,properties:{cardinality:{name:dH.cardinality},lookahead:{name:dH.lookahead},parenthesized:{name:dH.parenthesized,defaultValue:!1}},superTypes:[eH.$type]}}}},pH=new fH,Q(NKe,`getDatatypeNode`),Q(jI,`streamCst`),Q(PKe,`flattenCst`),Q(MI,`isChildNode`),Q(NI,`tokenToRange`),Q(PI,`toDocumentSegment`),(function(e){e[e.Before=0]=`Before`,e[e.After=1]=`After`,e[e.OverlapFront=2]=`OverlapFront`,e[e.OverlapBack=3]=`OverlapBack`,e[e.Inside=4]=`Inside`,e[e.Outside=5]=`Outside`})(mH||={}),Q(FI,`compareRange`),Q(II,`inRange`),hH=/^[\w\p{L}]$/u,Q(FKe,`findDeclarationNodeAtOffset`),Q(LI,`findCommentNode`),Q(RI,`isCommentNode`),Q(zI,`findLeafNodeAtOffset`),Q(BI,`findLeafNodeBeforeOffset`),Q(VI,`binarySearch`),Q(HI,`getPreviousNode`),Q(IKe,`getNextNode`),Q(LKe,`getStartlineNode`),Q(RKe,`getInteriorNodes`),Q(zKe,`getCommonParent`),Q(UI,`getParentChain`),gH={},fB(gH,{findAssignment:()=>mL,findNameAssignment:()=>hL,findNodeForKeyword:()=>fL,findNodeForProperty:()=>uL,findNodesForKeyword:()=>HKe,findNodesForKeywordInternal:()=>pL,findNodesForProperty:()=>lL,getActionAtElement:()=>_L,getActionType:()=>CL,getAllReachableRules:()=>aL,getAllRulesUsedForCrossReferences:()=>VKe,getCrossReferenceTerminal:()=>sL,getEntryRule:()=>rL,getExplicitRuleType:()=>xL,getHiddenRules:()=>iL,getRuleType:()=>wL,getRuleTypeName:()=>qKe,getTypeName:()=>SL,isArrayCardinality:()=>WKe,isArrayOperator:()=>GKe,isCommentTerminal:()=>cL,isDataType:()=>KKe,isDataTypeRule:()=>vL,isOptionalCardinality:()=>UKe,terminalRegex:()=>TL}),_H=class extends Error{static{Q(this,`ErrorWithLocation`)}constructor(e,t){super(e?`${t} at ${e.range.start.line}:${e.range.start.character}`:t)}},Q(WI,`assertUnreachable`),Q(GI,`assertCondition`),vH={},fB(vH,{NEWLINE_REGEXP:()=>TH,escapeRegExp:()=>eL,getTerminalParts:()=>BKe,isMultilineComment:()=>QI,isWhitespace:()=>$I,partialMatches:()=>tL,partialRegExp:()=>nL,whitespaceCharacters:()=>OH}),Q(KI,`cc`),Q(qI,`insertToSet`),Q(JI,`addFlag`),Q(YI,`ASSERT_EXISTS`),Q(XI,`ASSERT_NEVER_REACH_HERE`),Q(ZI,`isCharacter`),yH=[];for(let e=KI(`0`);e<=KI(`9`);e++)yH.push(e);bH=[KI(`_`)].concat(yH);for(let e=KI(`a`);e<=KI(`z`);e++)bH.push(e);for(let e=KI(`A`);e<=KI(`Z`);e++)bH.push(e);xH=[KI(` `),KI(`\f`),KI(`1286-`),KI(`\r`),KI(` `),KI(`\v`),KI(` `),KI(`\xA0`),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(` `),KI(`\u2028`),KI(`\u2029`),KI(` `),KI(` `),KI(` `),KI(``)],r4e=/[0-9a-fA-F]/,SH=/[0-9]/,i4e=/[1-9]/,CH=class{static{Q(this,`RegExpParser`)}constructor(){this.idx=0,this.input=``,this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx}pattern(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);let t=this.disjunction();this.consumeChar(`/`);let n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case`g`:JI(n,`global`);break;case`i`:JI(n,`ignoreCase`);break;case`m`:JI(n,`multiLine`);break;case`u`:JI(n,`unicode`);break;case`y`:JI(n,`sticky`)}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}}disjunction(){let e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}}alternative(){let e=[],t=this.idx;for(;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let e=this.idx;switch(this.popChar()){case`^`:return{type:`StartAnchor`,loc:this.loc(e)};case`$`:return{type:`EndAnchor`,loc:this.loc(e)};case`\\`:switch(this.popChar()){case`b`:return{type:`WordBoundary`,loc:this.loc(e)};case`B`:return{type:`NonWordBoundary`,loc:this.loc(e)}}throw Error(`Invalid Assertion Escape`);case`(`:this.consumeChar(`?`);let t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break;case`<`:switch(this.popChar()){case`=`:t=`Lookbehind`;break;case`!`:t=`NegativeLookbehind`}}YI(t);let n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}return XI()}quantifier(e=!1){let t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:let n=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:n,atMost:n};break;case`,`:let e;this.isDigit()?(e=this.integerIncludingZero(),t={atLeast:n,atMost:e}):t={atLeast:n,atMost:1/0},this.consumeChar(`}`)}if(e===!0&&t===void 0)return;YI(t)}if((e!==!0||t!==void 0)&&YI(t))return this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t}atom(){let e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group()}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),YI(e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):XI()}dotAll(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[KI(`1287-`),KI(`\r`),KI(`\u2028`),KI(`\u2029`)]}}atomEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:return this.decimalEscapeAtom();case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:`GroupBackReference`,value:this.positiveInteger()}}characterClassEscape(){let e,t=!1;switch(this.popChar()){case`d`:e=yH;break;case`D`:e=yH,t=!0;break;case`s`:e=xH;break;case`S`:e=xH,t=!0;break;case`w`:e=bH;break;case`W`:e=bH,t=!0}return YI(e)?{type:`Set`,value:e,complement:t}:XI()}controlEscapeAtom(){let e;switch(this.popChar()){case`f`:e=KI(`\f`);break;case`n`:e=KI(`1288-`);break;case`r`:e=KI(`\r`);break;case`t`:e=KI(` `);break;case`v`:e=KI(`\v`)}return YI(e)?{type:`Character`,value:e}:XI()}controlLetterEscapeAtom(){this.consumeChar(`c`);let e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar(`0`),{type:`Character`,value:KI(`\0`)}}hexEscapeSequenceAtom(){return this.consumeChar(`x`),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar(`u`),this.parseHexDigits(4)}identityEscapeAtom(){return{type:`Character`,value:KI(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case`1289-`:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:KI(this.popChar())}}}characterClass(){let e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){let t=this.classAtom();if(t.type,ZI(t)&&this.isRangeDash()){this.consumeChar(`-`);let n=this.classAtom();if(n.type,ZI(n)){if(n.value<t.value)throw Error(`Range out of order in character class`);e.push({from:t.value,to:n.value})}else qI(t.value,e),e.push(KI(`-`)),qI(n.value,e)}else qI(t.value,e)}return this.consumeChar(`]`),{type:`Set`,complement:t,value:e}}classAtom(){switch(this.peekChar()){case`]`:case`1290-`:case`\r`:case`\u2028`:case`\u2029`:throw Error(`TBD`);case`\\`:return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar(`\\`),this.peekChar()){case`b`:return this.consumeChar(`b`),{type:`Character`,value:KI(`\b`)};case`d`:case`D`:case`s`:case`S`:case`w`:case`W`:return this.characterClassEscape();case`f`:case`n`:case`r`:case`t`:case`v`:return this.controlEscapeAtom();case`c`:return this.controlLetterEscapeAtom();case`0`:return this.nulCharacterAtom();case`x`:return this.hexEscapeSequenceAtom();case`u`:return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let e=!0;switch(this.consumeChar(`(`),this.peekChar(0)){case`?`:this.consumeChar(`?`),this.consumeChar(`:`),e=!1;break;default:this.groupIdx++}let t=this.disjunction();this.consumeChar(`)`);let n={type:`Group`,capturing:e,value:t};return e&&(n.idx=this.groupIdx),n}positiveInteger(){let e=this.popChar();if(i4e.test(e)===!1)throw Error(`Expecting a positive integer`);for(;SH.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(SH.test(e)===!1)throw Error(`Expecting an integer`);for(;SH.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){let e=this.popChar();switch(e){case`1291-`:case`\r`:case`\u2028`:case`\u2029`:case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:throw Error(`TBD`);default:return{type:`Character`,value:KI(e)}}}isRegExpFlag(){switch(this.peekChar(0)){case`g`:case`i`:case`m`:case`u`:case`y`:return!0;default:return!1}}isRangeDash(){return this.peekChar()===`-`&&this.isClassAtom(1)}isDigit(){return SH.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case`]`:case`1292-`:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case`.`:case`\\`:case`[`:case`(`:return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case`^`:case`$`:return!0;case`\\`:switch(this.peekChar(1)){case`b`:case`B`:return!0;default:return!1}case`(`:return this.peekChar(1)===`?`&&(this.peekChar(2)===`=`||this.peekChar(2)===`!`||this.peekChar(2)===`<`&&(this.peekChar(3)===`=`||this.peekChar(3)===`!`));default:return!1}}isQuantifier(){let e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}}isPatternCharacter(){switch(this.peekChar()){case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:case`/`:case`1293-`:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}}parseHexDigits(e){let t=``;for(let n=0;n<e;n++){let e=this.popChar();if(r4e.test(e)===!1)throw Error(`Expecting a HexDecimal digits`);t+=e}return{type:`Character`,value:parseInt(t,16)}}peekChar(e=0){return this.input[this.idx+e]}popChar(){let e=this.peekChar(0);return this.consumeChar(void 0),e}consumeChar(e){if(e!==void 0&&this.input[this.idx]!==e)throw Error(`Expected: '`+e+`' but found: '`+this.input[this.idx]+`' at offset: `+this.idx);if(this.idx>=this.input.length)throw Error(`Unexpected end of input`);this.idx++}loc(e){return{begin:e,end:this.idx}}},wH=class{static{Q(this,`BaseRegExpVisitor`)}visitChildren(e){for(let t in e){let n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(e=>{this.visit(e)},this):this.visit(n))}}visit(e){switch(e.type){case`Pattern`:this.visitPattern(e);break;case`Flags`:this.visitFlags(e);break;case`Disjunction`:this.visitDisjunction(e);break;case`Alternative`:this.visitAlternative(e);break;case`StartAnchor`:this.visitStartAnchor(e);break;case`EndAnchor`:this.visitEndAnchor(e);break;case`WordBoundary`:this.visitWordBoundary(e);break;case`NonWordBoundary`:this.visitNonWordBoundary(e);break;case`Lookahead`:this.visitLookahead(e);break;case`NegativeLookahead`:this.visitNegativeLookahead(e);break;case`Lookbehind`:this.visitLookbehind(e);break;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);break;case`Character`:this.visitCharacter(e);break;case`Set`:this.visitSet(e);break;case`Group`:this.visitGroup(e);break;case`GroupBackReference`:this.visitGroupBackReference(e);break;case`Quantifier`:this.visitQuantifier(e)}this.visitChildren(e)}visitPattern(e){}visitFlags(e){}visitDisjunction(e){}visitAlternative(e){}visitStartAnchor(e){}visitEndAnchor(e){}visitWordBoundary(e){}visitNonWordBoundary(e){}visitLookahead(e){}visitNegativeLookahead(e){}visitLookbehind(e){}visitNegativeLookbehind(e){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}},TH=/\r?\n/gm,EH=new CH,a4e=class extends wH{static{Q(this,`TerminalRegExpVisitor`)}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join(``)}reset(e){this.multiline=!1,this.regex=e,this.startRegexp=``,this.isStarting=!0,this.endRegexpStack=[]}visitGroup(e){e.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(e){let t=String.fromCharCode(e.value);if(!this.multiline&&t===`1294-`&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let e=eL(t);this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e)}}visitSet(e){if(!this.multiline){let t=this.regex.substring(e.loc.begin,e.loc.end),n=new RegExp(t);this.multiline=!!`1295-`.match(n)}if(e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{let t=this.regex.substring(e.loc.begin,e.loc.end);this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t)}}visitChildren(e){e.type===`Group`&&e.quantifier||super.visitChildren(e)}},DH=new a4e,Q(BKe,`getTerminalParts`),Q(QI,`isMultilineComment`),OH=`\f1296-\r \v \xA0            \u2028\u2029   `.split(``),Q($I,`isWhitespace`),Q(eL,`escapeRegExp`),Q(tL,`partialMatches`),Q(nL,`partialRegExp`),Q(rL,`getEntryRule`),Q(iL,`getHiddenRules`),Q(aL,`getAllReachableRules`),Q(oL,`ruleDfs`),Q(VKe,`getAllRulesUsedForCrossReferences`),Q(sL,`getCrossReferenceTerminal`),Q(cL,`isCommentTerminal`),Q(lL,`findNodesForProperty`),Q(uL,`findNodeForProperty`),Q(dL,`findNodesForPropertyInternal`),Q(HKe,`findNodesForKeyword`),Q(fL,`findNodeForKeyword`),Q(pL,`findNodesForKeywordInternal`),Q(mL,`findAssignment`),Q(hL,`findNameAssignment`),Q(gL,`findNameAssignmentInternal`),Q(_L,`getActionAtElement`),Q(UKe,`isOptionalCardinality`),Q(WKe,`isArrayCardinality`),Q(GKe,`isArrayOperator`),Q(vL,`isDataTypeRule`),Q(yL,`isDataTypeRuleInternal`),Q(KKe,`isDataType`),Q(bL,`isDataTypeInternal`),Q(xL,`getExplicitRuleType`),Q(SL,`getTypeName`),Q(CL,`getActionType`),Q(qKe,`getRuleTypeName`),Q(wL,`getRuleType`),Q(TL,`terminalRegex`),kH=`[\\s\\S]`,Q(EL,`abstractElementToRegex`),Q(JKe,`terminalAlternativesToRegex`),Q(YKe,`terminalGroupToRegex`),Q(XKe,`untilTokenToRegex`),Q(ZKe,`negateTokenToRegex`),Q(QKe,`characterRangeToRegex`),Q(DL,`keywordToRegex`),Q(OL,`withCardinality`),Q(kL,`createGrammarConfig`),AH=typeof global==`object`&&global&&global.Object===Object&&global,o4e=typeof self==`object`&&self&&self.Object===Object&&self,jH=AH||o4e||Function(`return this`)(),MH=jH.Symbol,NH=Object.prototype,s4e=NH.hasOwnProperty,c4e=NH.toString,PH=MH?MH.toStringTag:void 0,Q($Ke,`getRawTag`),l4e=$Ke,u4e=Object.prototype.toString,Q(eqe,`objectToString`),d4e=eqe,f4e=`[object Null]`,p4e=`[object Undefined]`,FH=MH?MH.toStringTag:void 0,Q(tqe,`baseGetTag`),IH=tqe,Q(nqe,`isObjectLike`),LH=nqe,m4e=`[object Symbol]`,Q(rqe,`isSymbol`),RH=rqe,Q(iqe,`arrayMap`),zH=iqe,BH=Array.isArray,h4e=1/0,VH=MH?MH.prototype:void 0,HH=VH?VH.toString:void 0,Q(AL,`baseToString`),g4e=AL,_4e=/\s/,Q(aqe,`trimmedEndIndex`),v4e=aqe,y4e=/^\s+/,Q(oqe,`baseTrim`),b4e=oqe,Q(sqe,`isObject`),UH=sqe,WH=NaN,x4e=/^[-+]0x[0-9a-f]+$/i,S4e=/^0b[01]+$/i,C4e=/^0o[0-7]+$/i,w4e=parseInt,Q(cqe,`toNumber`),T4e=cqe,GH=1/0,E4e=17976931348623157e292,Q(lqe,`toFinite`),D4e=lqe,Q(uqe,`toInteger`),KH=uqe,Q(dqe,`identity`),qH=dqe,O4e=`[object AsyncFunction]`,k4e=`[object Function]`,A4e=`[object GeneratorFunction]`,j4e=`[object Proxy]`,Q(fqe,`isFunction`),JH=fqe,YH=jH[`__core-js_shared__`],XH=(function(){var e=/[^.]+$/.exec(YH&&YH.keys&&YH.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})(),Q(pqe,`isMasked`),M4e=pqe,N4e=Function.prototype.toString,Q(mqe,`toSource`),ZH=mqe,P4e=/[\\^$.*+?()[\]{}|]/g,F4e=/^\[object .+?Constructor\]$/,I4e=Function.prototype,L4e=Object.prototype,R4e=I4e.toString,z4e=L4e.hasOwnProperty,B4e=RegExp(`^`+R4e.call(z4e).replace(P4e,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Q(hqe,`baseIsNative`),V4e=hqe,Q(gqe,`getValue`),H4e=gqe,Q(_qe,`getNative`),QH=_qe,$H=QH(jH,`WeakMap`),eU=Object.create,U4e=(function(){function e(){}return Q(e,`object`),function(t){if(!UH(t))return{};if(eU)return eU(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}})(),Q(vqe,`apply`),W4e=vqe,Q(yqe,`noop`),tU=yqe,Q(bqe,`copyArray`),G4e=bqe,K4e=800,q4e=16,J4e=Date.now,Q(xqe,`shortOut`),Y4e=xqe,Q(Sqe,`constant`),X4e=Sqe,nU=(function(){try{var e=QH(Object,`defineProperty`);return e({},``,{}),e}catch{}})(),Z4e=Y4e(nU?function(e,t){return nU(e,`toString`,{configurable:!0,enumerable:!1,value:X4e(t),writable:!0})}:qH),Q(Cqe,`arrayEach`),rU=Cqe,Q(wqe,`baseFindIndex`),iU=wqe,Q(Tqe,`baseIsNaN`),Q4e=Tqe,Q(Eqe,`strictIndexOf`),$4e=Eqe,Q(Dqe,`baseIndexOf`),aU=Dqe,Q(Oqe,`arrayIncludes`),oU=Oqe,e3e=9007199254740991,t3e=/^(?:0|[1-9]\d*)$/,Q(kqe,`isIndex`),sU=kqe,Q(Aqe,`baseAssignValue`),cU=Aqe,Q(jqe,`eq`),lU=jqe,n3e=Object.prototype.hasOwnProperty,Q(Mqe,`assignValue`),uU=Mqe,Q(Nqe,`copyObject`),dU=Nqe,fU=Math.max,Q(Pqe,`overRest`),r3e=Pqe,Q(Fqe,`baseRest`),pU=Fqe,i3e=9007199254740991,Q(Iqe,`isLength`),mU=Iqe,Q(Lqe,`isArrayLike`),hU=Lqe,Q(Rqe,`isIterateeCall`),gU=Rqe,Q(zqe,`createAssigner`),a3e=zqe,o3e=Object.prototype,Q(Bqe,`isPrototype`),_U=Bqe,Q(Vqe,`baseTimes`),s3e=Vqe,c3e=`[object Arguments]`,Q(Hqe,`baseIsArguments`),vU=Hqe,yU=Object.prototype,l3e=yU.hasOwnProperty,u3e=yU.propertyIsEnumerable,bU=vU((function(){return arguments})())?vU:function(e){return LH(e)&&l3e.call(e,`callee`)&&!u3e.call(e,`callee`)},Q(Uqe,`stubFalse`),d3e=Uqe,xU=typeof exports==`object`&&exports&&!exports.nodeType&&exports,SU=xU&&typeof module==`object`&&module&&!module.nodeType&&module,CU=SU&&SU.exports===xU?jH.Buffer:void 0,wU=(CU?CU.isBuffer:void 0)||d3e,f3e=`[object Arguments]`,p3e=`[object Array]`,m3e=`[object Boolean]`,h3e=`[object Date]`,g3e=`[object Error]`,_3e=`[object Function]`,v3e=`[object Map]`,y3e=`[object Number]`,b3e=`[object Object]`,x3e=`[object RegExp]`,S3e=`[object Set]`,C3e=`[object String]`,w3e=`[object WeakMap]`,T3e=`[object ArrayBuffer]`,E3e=`[object DataView]`,D3e=`[object Float32Array]`,O3e=`[object Float64Array]`,k3e=`[object Int8Array]`,A3e=`[object Int16Array]`,j3e=`[object Int32Array]`,M3e=`[object Uint8Array]`,N3e=`[object Uint8ClampedArray]`,P3e=`[object Uint16Array]`,F3e=`[object Uint32Array]`,TU={},TU[D3e]=TU[O3e]=TU[k3e]=TU[A3e]=TU[j3e]=TU[M3e]=TU[N3e]=TU[P3e]=TU[F3e]=!0,TU[f3e]=TU[p3e]=TU[T3e]=TU[m3e]=TU[E3e]=TU[h3e]=TU[g3e]=TU[_3e]=TU[v3e]=TU[y3e]=TU[b3e]=TU[x3e]=TU[S3e]=TU[C3e]=TU[w3e]=!1,Q(Wqe,`baseIsTypedArray`),I3e=Wqe,Q(Gqe,`baseUnary`),EU=Gqe,DU=typeof exports==`object`&&exports&&!exports.nodeType&&exports,OU=DU&&typeof module==`object`&&module&&!module.nodeType&&module,kU=OU&&OU.exports===DU&&AH.process,AU=(function(){try{return OU&&OU.require&&OU.require(`util`).types||kU&&kU.binding&&kU.binding(`util`)}catch{}})(),jU=AU&&AU.isTypedArray,MU=jU?EU(jU):I3e,L3e=Object.prototype.hasOwnProperty,Q(Kqe,`arrayLikeKeys`),NU=Kqe,Q(qqe,`overArg`),PU=qqe,R3e=PU(Object.keys,Object),z3e=Object.prototype.hasOwnProperty,Q(Jqe,`baseKeys`),FU=Jqe,Q(Yqe,`keys`),IU=Yqe,B3e=Object.prototype.hasOwnProperty,LU=a3e(function(e,t){if(_U(t)||hU(t)){dU(t,IU(t),e);return}for(var n in t)B3e.call(t,n)&&uU(e,n,t[n])}),Q(Xqe,`nativeKeysIn`),V3e=Xqe,H3e=Object.prototype.hasOwnProperty,Q(Zqe,`baseKeysIn`),U3e=Zqe,Q(Qqe,`keysIn`),RU=Qqe,W3e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G3e=/^\w*$/,Q($qe,`isKey`),zU=$qe,BU=QH(Object,`create`),Q(eJe,`hashClear`),K3e=eJe,Q(tJe,`hashDelete`),q3e=tJe,J3e=`__lodash_hash_undefined__`,Y3e=Object.prototype.hasOwnProperty,Q(nJe,`hashGet`),X3e=nJe,Z3e=Object.prototype.hasOwnProperty,Q(rJe,`hashHas`),Q3e=rJe,$3e=`__lodash_hash_undefined__`,Q(iJe,`hashSet`),e6e=iJe,Q(jL,`Hash`),jL.prototype.clear=K3e,jL.prototype.delete=q3e,jL.prototype.get=X3e,jL.prototype.has=Q3e,jL.prototype.set=e6e,VU=jL,Q(aJe,`listCacheClear`),t6e=aJe,Q(oJe,`assocIndexOf`),HU=oJe,n6e=Array.prototype.splice,Q(sJe,`listCacheDelete`),r6e=sJe,Q(cJe,`listCacheGet`),i6e=cJe,Q(lJe,`listCacheHas`),a6e=lJe,Q(uJe,`listCacheSet`),o6e=uJe,Q(ML,`ListCache`),ML.prototype.clear=t6e,ML.prototype.delete=r6e,ML.prototype.get=i6e,ML.prototype.has=a6e,ML.prototype.set=o6e,UU=ML,WU=QH(jH,`Map`),Q(dJe,`mapCacheClear`),s6e=dJe,Q(fJe,`isKeyable`),c6e=fJe,Q(pJe,`getMapData`),GU=pJe,Q(mJe,`mapCacheDelete`),l6e=mJe,Q(hJe,`mapCacheGet`),u6e=hJe,Q(gJe,`mapCacheHas`),d6e=gJe,Q(_Je,`mapCacheSet`),f6e=_Je,Q(NL,`MapCache`),NL.prototype.clear=s6e,NL.prototype.delete=l6e,NL.prototype.get=u6e,NL.prototype.has=d6e,NL.prototype.set=f6e,KU=NL,p6e=`Expected a function`,Q(PL,`memoize`),PL.Cache=KU,m6e=PL,h6e=500,Q(vJe,`memoizeCapped`),g6e=vJe,_6e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,v6e=/\\(\\)?/g,y6e=g6e(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(_6e,function(e,n,r,i){t.push(r?i.replace(v6e,`$1`):n||e)}),t}),Q(yJe,`toString`),b6e=yJe,Q(bJe,`castPath`),qU=bJe,x6e=1/0,Q(xJe,`toKey`),JU=xJe,Q(SJe,`baseGet`),YU=SJe,Q(CJe,`get`),S6e=CJe,Q(wJe,`arrayPush`),XU=wJe,ZU=MH?MH.isConcatSpreadable:void 0,Q(TJe,`isFlattenable`),C6e=TJe,Q(FL,`baseFlatten`),QU=FL,Q(EJe,`flatten`),$U=EJe,eW=PU(Object.getPrototypeOf,Object),Q(DJe,`baseSlice`),tW=DJe,Q(OJe,`arrayReduce`),w6e=OJe,Q(kJe,`stackClear`),T6e=kJe,Q(AJe,`stackDelete`),E6e=AJe,Q(jJe,`stackGet`),D6e=jJe,Q(MJe,`stackHas`),O6e=MJe,k6e=200,Q(NJe,`stackSet`),A6e=NJe,Q(IL,`Stack`),IL.prototype.clear=T6e,IL.prototype.delete=E6e,IL.prototype.get=D6e,IL.prototype.has=O6e,IL.prototype.set=A6e,nW=IL,Q(PJe,`baseAssign`),j6e=PJe,Q(FJe,`baseAssignIn`),M6e=FJe,rW=typeof exports==`object`&&exports&&!exports.nodeType&&exports,iW=rW&&typeof module==`object`&&module&&!module.nodeType&&module,aW=iW&&iW.exports===rW?jH.Buffer:void 0,oW=aW?aW.allocUnsafe:void 0,Q(IJe,`cloneBuffer`),N6e=IJe,Q(LJe,`arrayFilter`),sW=LJe,Q(RJe,`stubArray`),cW=RJe,P6e=Object.prototype.propertyIsEnumerable,lW=Object.getOwnPropertySymbols,uW=lW?function(e){return e==null?[]:(e=Object(e),sW(lW(e),function(t){return P6e.call(e,t)}))}:cW,Q(zJe,`copySymbols`),F6e=zJe,dW=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)XU(t,uW(e)),e=eW(e);return t}:cW,Q(BJe,`copySymbolsIn`),I6e=BJe,Q(VJe,`baseGetAllKeys`),fW=VJe,Q(HJe,`getAllKeys`),pW=HJe,Q(UJe,`getAllKeysIn`),mW=UJe,hW=QH(jH,`DataView`),gW=QH(jH,`Promise`),_W=QH(jH,`Set`),vW=`[object Map]`,L6e=`[object Object]`,yW=`[object Promise]`,bW=`[object Set]`,xW=`[object WeakMap]`,SW=`[object DataView]`,R6e=ZH(hW),z6e=ZH(WU),B6e=ZH(gW),V6e=ZH(_W),H6e=ZH($H),CW=IH,(hW&&CW(new hW(new ArrayBuffer(1)))!=SW||WU&&CW(new WU)!=vW||gW&&CW(gW.resolve())!=yW||_W&&CW(new _W)!=bW||$H&&CW(new $H)!=xW)&&(CW=Q(function(e){var t=IH(e),n=t==L6e?e.constructor:void 0,r=n?ZH(n):``;if(r)switch(r){case R6e:return SW;case z6e:return vW;case B6e:return yW;case V6e:return bW;case H6e:return xW}return t},`getTag`)),wW=CW,U6e=Object.prototype.hasOwnProperty,Q(WJe,`initCloneArray`),W6e=WJe,TW=jH.Uint8Array,Q(GJe,`cloneArrayBuffer`),EW=GJe,Q(KJe,`cloneDataView`),G6e=KJe,K6e=/\w*$/,Q(qJe,`cloneRegExp`),q6e=qJe,DW=MH?MH.prototype:void 0,OW=DW?DW.valueOf:void 0,Q(JJe,`cloneSymbol`),J6e=JJe,Q(YJe,`cloneTypedArray`),Y6e=YJe,X6e=`[object Boolean]`,Z6e=`[object Date]`,Q6e=`[object Map]`,$6e=`[object Number]`,e8e=`[object RegExp]`,t8e=`[object Set]`,n8e=`[object String]`,r8e=`[object Symbol]`,i8e=`[object ArrayBuffer]`,a8e=`[object DataView]`,o8e=`[object Float32Array]`,s8e=`[object Float64Array]`,c8e=`[object Int8Array]`,l8e=`[object Int16Array]`,u8e=`[object Int32Array]`,d8e=`[object Uint8Array]`,f8e=`[object Uint8ClampedArray]`,p8e=`[object Uint16Array]`,m8e=`[object Uint32Array]`,Q(XJe,`initCloneByTag`),h8e=XJe,Q(ZJe,`initCloneObject`),g8e=ZJe,_8e=`[object Map]`,Q(QJe,`baseIsMap`),v8e=QJe,kW=AU&&AU.isMap,y8e=kW?EU(kW):v8e,b8e=`[object Set]`,Q($Je,`baseIsSet`),x8e=$Je,AW=AU&&AU.isSet,S8e=AW?EU(AW):x8e,C8e=1,w8e=2,T8e=4,jW=`[object Arguments]`,E8e=`[object Array]`,D8e=`[object Boolean]`,O8e=`[object Date]`,k8e=`[object Error]`,MW=`[object Function]`,A8e=`[object GeneratorFunction]`,j8e=`[object Map]`,M8e=`[object Number]`,NW=`[object Object]`,N8e=`[object RegExp]`,P8e=`[object Set]`,F8e=`[object String]`,I8e=`[object Symbol]`,L8e=`[object WeakMap]`,R8e=`[object ArrayBuffer]`,z8e=`[object DataView]`,B8e=`[object Float32Array]`,V8e=`[object Float64Array]`,H8e=`[object Int8Array]`,U8e=`[object Int16Array]`,W8e=`[object Int32Array]`,G8e=`[object Uint8Array]`,K8e=`[object Uint8ClampedArray]`,q8e=`[object Uint16Array]`,J8e=`[object Uint32Array]`,PW={},PW[jW]=PW[E8e]=PW[R8e]=PW[z8e]=PW[D8e]=PW[O8e]=PW[B8e]=PW[V8e]=PW[H8e]=PW[U8e]=PW[W8e]=PW[j8e]=PW[M8e]=PW[NW]=PW[N8e]=PW[P8e]=PW[F8e]=PW[I8e]=PW[G8e]=PW[K8e]=PW[q8e]=PW[J8e]=!0,PW[k8e]=PW[MW]=PW[L8e]=!1,Q(LL,`baseClone`),Y8e=LL,FW=4,Q(eYe,`clone`),IW=eYe,Q(tYe,`compact`),LW=tYe,X8e=`__lodash_hash_undefined__`,Q(nYe,`setCacheAdd`),Z8e=nYe,Q(rYe,`setCacheHas`),Q8e=rYe,Q(RL,`SetCache`),RL.prototype.add=RL.prototype.push=Z8e,RL.prototype.has=Q8e,RW=RL,Q(iYe,`arraySome`),zW=iYe,Q(aYe,`cacheHas`),BW=aYe,$8e=1,e5e=2,Q(oYe,`equalArrays`),VW=oYe,Q(sYe,`mapToArray`),t5e=sYe,Q(cYe,`setToArray`),HW=cYe,n5e=1,r5e=2,i5e=`[object Boolean]`,a5e=`[object Date]`,o5e=`[object Error]`,s5e=`[object Map]`,c5e=`[object Number]`,l5e=`[object RegExp]`,u5e=`[object Set]`,d5e=`[object String]`,f5e=`[object Symbol]`,p5e=`[object ArrayBuffer]`,m5e=`[object DataView]`,UW=MH?MH.prototype:void 0,WW=UW?UW.valueOf:void 0,Q(lYe,`equalByTag`),h5e=lYe,g5e=1,_5e=Object.prototype.hasOwnProperty,Q(uYe,`equalObjects`),v5e=uYe,y5e=1,GW=`[object Arguments]`,KW=`[object Array]`,qW=`[object Object]`,JW=Object.prototype.hasOwnProperty,Q(dYe,`baseIsEqualDeep`),b5e=dYe,Q(zL,`baseIsEqual`),YW=zL,x5e=1,S5e=2,Q(fYe,`baseIsMatch`),C5e=fYe,Q(pYe,`isStrictComparable`),XW=pYe,Q(mYe,`getMatchData`),w5e=mYe,Q(hYe,`matchesStrictComparable`),ZW=hYe,Q(gYe,`baseMatches`),T5e=gYe,Q(_Ye,`baseHasIn`),E5e=_Ye,Q(vYe,`hasPath`),QW=vYe,Q(yYe,`hasIn`),D5e=yYe,O5e=1,k5e=2,Q(bYe,`baseMatchesProperty`),A5e=bYe,Q(xYe,`baseProperty`),j5e=xYe,Q(SYe,`basePropertyDeep`),M5e=SYe,Q(CYe,`property`),N5e=CYe,Q(wYe,`baseIteratee`),$W=wYe,Q(TYe,`arrayAggregator`),P5e=TYe,Q(EYe,`createBaseFor`),F5e=EYe(),Q(DYe,`baseForOwn`),I5e=DYe,Q(OYe,`createBaseEach`),eG=OYe(I5e),Q(kYe,`baseAggregator`),L5e=kYe,Q(AYe,`createAggregator`),R5e=AYe,tG=Object.prototype,z5e=tG.hasOwnProperty,nG=pU(function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&gU(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=RU(a),s=-1,l=o.length;++s<l;){var u=o[s],d=e[u];(d===void 0||lU(d,tG[u])&&!z5e.call(e,u))&&(e[u]=a[u])}return e}),Q(jYe,`isArrayLikeObject`),rG=jYe,Q(MYe,`arrayIncludesWith`),iG=MYe,B5e=200,Q(NYe,`baseDifference`),V5e=NYe,aG=pU(function(e,t){return rG(e)?V5e(e,QU(t,1,rG,!0)):[]}),Q(PYe,`last`),oG=PYe,Q(FYe,`drop`),sG=FYe,Q(IYe,`dropRight`),cG=IYe,Q(LYe,`castFunction`),H5e=LYe,Q(RYe,`forEach`),lG=RYe,Q(zYe,`arrayEvery`),U5e=zYe,Q(BYe,`baseEvery`),W5e=BYe,Q(VYe,`every`),uG=VYe,Q(HYe,`baseFilter`),dG=HYe,Q(UYe,`filter`),fG=UYe,Q(WYe,`createFind`),G5e=WYe,K5e=Math.max,Q(GYe,`findIndex`),pG=G5e(GYe),Q(KYe,`head`),mG=KYe,Q(qYe,`baseMap`),q5e=qYe,Q(JYe,`map`),hG=JYe,Q(YYe,`flatMap`),gG=YYe,J5e=Object.prototype.hasOwnProperty,Y5e=R5e(function(e,t,n){J5e.call(e,n)?e[n].push(t):cU(e,n,[t])}),X5e=Object.prototype.hasOwnProperty,Q(XYe,`baseHas`),Z5e=XYe,Q(ZYe,`has`),_G=ZYe,Q5e=`[object String]`,Q(QYe,`isString`),vG=QYe,Q($Ye,`baseValues`),$5e=$Ye,Q(eXe,`values`),yG=eXe,e7e=Math.max,Q(tXe,`includes`),bG=tXe,t7e=Math.max,Q(nXe,`indexOf`),xG=nXe,n7e=`[object Map]`,r7e=`[object Set]`,i7e=Object.prototype.hasOwnProperty,Q(rXe,`isEmpty`),SG=rXe,a7e=`[object RegExp]`,Q(iXe,`baseIsRegExp`),o7e=iXe,CG=AU&&AU.isRegExp,wG=CG?EU(CG):o7e,Q(aXe,`isUndefined`),TG=aXe,s7e=`Expected a function`,Q(oXe,`negate`),c7e=oXe,Q(sXe,`baseSet`),l7e=sXe,Q(cXe,`basePickBy`),u7e=cXe,Q(lXe,`pickBy`),EG=lXe,Q(uXe,`baseReduce`),d7e=uXe,Q(dXe,`reduce`),DG=dXe,Q(fXe,`reject`),OG=fXe,Q(pXe,`baseSome`),f7e=pXe,Q(mXe,`some`),kG=mXe,p7e=_W&&1/HW(new _W([,-0]))[1]==1/0?function(e){return new _W(e)}:tU,m7e=200,Q(hXe,`baseUniq`),h7e=hXe,Q(gXe,`uniq`),AG=gXe,Q(BL,`PRINT_ERROR`),Q(VL,`PRINT_WARNING`),Q(HL,`timer`),Q(UL,`toFastProperties`),Q(_Xe,`tokenLabel`),Q(vXe,`hasTokenLabel`),jG=class{static{Q(this,`AbstractProduction`)}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),lG(this.definition,t=>{t.accept(e)})}},MG=class extends jG{static{Q(this,`NonTerminal`)}constructor(e){super([]),this.idx=1,LU(this,EG(e,e=>e!==void 0))}set definition(e){}get definition(){return this.referencedRule===void 0?[]:this.referencedRule.definition}accept(e){e.visit(this)}},NG=class extends jG{static{Q(this,`Rule`)}constructor(e){super(e.definition),this.orgText=``,LU(this,EG(e,e=>e!==void 0))}},PG=class extends jG{static{Q(this,`Alternative`)}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,LU(this,EG(e,e=>e!==void 0))}},FG=class extends jG{static{Q(this,`Option`)}constructor(e){super(e.definition),this.idx=1,LU(this,EG(e,e=>e!==void 0))}},IG=class extends jG{static{Q(this,`RepetitionMandatory`)}constructor(e){super(e.definition),this.idx=1,LU(this,EG(e,e=>e!==void 0))}},LG=class extends jG{static{Q(this,`RepetitionMandatoryWithSeparator`)}constructor(e){super(e.definition),this.idx=1,LU(this,EG(e,e=>e!==void 0))}},RG=class extends jG{static{Q(this,`Repetition`)}constructor(e){super(e.definition),this.idx=1,LU(this,EG(e,e=>e!==void 0))}},zG=class extends jG{static{Q(this,`RepetitionWithSeparator`)}constructor(e){super(e.definition),this.idx=1,LU(this,EG(e,e=>e!==void 0))}},BG=class extends jG{static{Q(this,`Alternation`)}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){super(e.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,LU(this,EG(e,e=>e!==void 0))}},VG=class{static{Q(this,`Terminal`)}constructor(e){this.idx=1,LU(this,EG(e,e=>e!==void 0))}accept(e){e.visit(this)}},Q(yXe,`serializeGrammar`),Q(WL,`serializeProduction`),HG=class{static{Q(this,`GAstVisitor`)}visit(e){let t=e;switch(t.constructor){case MG:return this.visitNonTerminal(t);case PG:return this.visitAlternative(t);case FG:return this.visitOption(t);case IG:return this.visitRepetitionMandatory(t);case LG:return this.visitRepetitionMandatoryWithSeparator(t);case zG:return this.visitRepetitionWithSeparator(t);case RG:return this.visitRepetition(t);case BG:return this.visitAlternation(t);case VG:return this.visitTerminal(t);case NG:return this.visitRule(t);default:throw Error(`non exhaustive match`)}}visitNonTerminal(e){}visitAlternative(e){}visitOption(e){}visitRepetition(e){}visitRepetitionMandatory(e){}visitRepetitionMandatoryWithSeparator(e){}visitRepetitionWithSeparator(e){}visitAlternation(e){}visitTerminal(e){}visitRule(e){}},Q(bXe,`isSequenceProd`),Q(GL,`isOptionalProd`),Q(xXe,`isBranchingProd`),Q(KL,`getProductionDslName`),UG=class{static{Q(this,`RestWalker`)}walk(e,t=[]){lG(e.definition,(n,r)=>{let i=sG(e.definition,r+1);if(n instanceof MG)this.walkProdRef(n,i,t);else if(n instanceof VG)this.walkTerminal(n,i,t);else if(n instanceof PG)this.walkFlat(n,i,t);else if(n instanceof FG)this.walkOption(n,i,t);else if(n instanceof IG)this.walkAtLeastOne(n,i,t);else if(n instanceof LG)this.walkAtLeastOneSep(n,i,t);else if(n instanceof zG)this.walkManySep(n,i,t);else if(n instanceof RG)this.walkMany(n,i,t);else if(n instanceof BG)this.walkOr(n,i,t);else throw Error(`non exhaustive match`)})}walkTerminal(e,t,n){}walkProdRef(e,t,n){}walkFlat(e,t,n){let r=t.concat(n);this.walk(e,r)}walkOption(e,t,n){let r=t.concat(n);this.walk(e,r)}walkAtLeastOne(e,t,n){let r=[new FG({definition:e.definition})].concat(t,n);this.walk(e,r)}walkAtLeastOneSep(e,t,n){let r=qL(e,t,n);this.walk(e,r)}walkMany(e,t,n){let r=[new FG({definition:e.definition})].concat(t,n);this.walk(e,r)}walkManySep(e,t,n){let r=qL(e,t,n);this.walk(e,r)}walkOr(e,t,n){let r=t.concat(n);lG(e.definition,e=>{let t=new PG({definition:[e]});this.walk(t,r)})}},Q(qL,`restForRepetitionWithSeparator`),Q(JL,`first`),Q(SXe,`firstForSequence`),Q(CXe,`firstForBranching`),Q(wXe,`firstForTerminal`),WG=`_~IN~_`,g7e=class extends UG{static{Q(this,`ResyncFollowsWalker`)}constructor(e){super(),this.topProd=e,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(e,t,n){}walkProdRef(e,t,n){let r=EXe(e.referencedRule,e.idx)+this.topProd.name,i=JL(new PG({definition:t.concat(n)}));this.follows[r]=i}},Q(TXe,`computeAllProdsFollows`),Q(EXe,`buildBetweenProdsFollowPrefix`),GG={},_7e=new CH,Q(YL,`getRegExpAst`),Q(DXe,`clearRegExpParserCache`),KG=`Complement Sets are not supported for first char optimization`,qG=`Unable to use "first char" lexer optimizations:1297-`,Q(OXe,`getOptimizedStartCodesIndices`),Q(XL,`firstCharOptimizedIndices`),Q(ZL,`addOptimizedIdxToResult`),Q(kXe,`handleIgnoreCase`),Q(QL,`findCode`),Q($L,`isWholeOptional`),v7e=class extends wH{static{Q(this,`CharCodeFinder`)}constructor(e){super(),this.targetCharCodes=e,this.found=!1}visitChildren(e){if(this.found!==!0){switch(e.type){case`Lookahead`:this.visitLookahead(e);return;case`NegativeLookahead`:this.visitNegativeLookahead(e);return;case`Lookbehind`:this.visitLookbehind(e);return;case`NegativeLookbehind`:this.visitNegativeLookbehind(e);return}super.visitChildren(e)}}visitCharacter(e){bG(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?QL(e,this.targetCharCodes)===void 0&&(this.found=!0):QL(e,this.targetCharCodes)!==void 0&&(this.found=!0)}},Q(eR,`canMatchCharCode`),JG=`PATTERN`,YG=`defaultMode`,XG=`modes`,Q(AXe,`analyzeTokenTypes`),Q(jXe,`validatePatterns`),Q(MXe,`validateRegExpPattern`),Q(NXe,`findMissingPatterns`),Q(PXe,`findInvalidPatterns`),y7e=/[^\\][$]/,Q(FXe,`findEndOfInputAnchor`),Q(IXe,`findEmptyMatchRegExps`),b7e=/[^\\[][\^]|^\^/,Q(LXe,`findStartOfInputAnchor`),Q(RXe,`findUnsupportedFlags`),Q(zXe,`findDuplicatePatterns`),Q(BXe,`findInvalidGroupType`),Q(VXe,`findModesThatDoNotExist`),Q(HXe,`findUnreachablePatterns`),Q(UXe,`tryToMatchStrToPattern`),Q(WXe,`noMetaChar`),Q(GXe,`usesLookAheadOrBehind`),Q(tR,`addStickyFlag`),Q(KXe,`performRuntimeChecks`),Q(qXe,`performWarningRuntimeChecks`),Q(JXe,`cloneEmptyGroups`),Q(nR,`isCustomPattern`),Q(YXe,`isShortPattern`),x7e={test:Q(function(e){let t=e.length;for(let n=this.lastIndex;n<t;n++){let t=e.charCodeAt(n);if(t===10)return this.lastIndex=n+1,!0;if(t===13)return this.lastIndex=e.charCodeAt(n+1)===10?n+2:n+1,!0}return!1},`test`),lastIndex:0},Q(rR,`checkLineBreaksIssues`),Q(XXe,`buildLineBreakIssueMessage`),Q(iR,`getCharCodes`),Q(aR,`addToMapOfArrays`),ZG=256,QG=[],Q(oR,`charCodeToOptimizedIndex`),Q(ZXe,`initCharCodeToOptimizedIndexMap`),Q(sR,`tokenStructuredMatcher`),Q(cR,`tokenStructuredMatcherNoCategories`),$G=1,eK={},Q(lR,`augmentTokenTypes`),Q(QXe,`expandCategories`),Q($Xe,`assignTokenDefaultProps`),Q(eZe,`assignCategoriesTokensProp`),Q(tZe,`assignCategoriesMapProp`),Q(uR,`singleAssignCategoriesToksMap`),Q(dR,`hasShortKeyProperty`),Q(fR,`hasCategoriesProperty`),Q(nZe,`hasExtendingTokensTypesProperty`),Q(rZe,`hasExtendingTokensTypesMapProperty`),Q(iZe,`isTokenType`),tK={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,n,r,i,a){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`}},(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`,e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]=`MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE`})(nK||={}),rK={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`1298-`,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:tK,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(rK),iK=class{static{Q(this,`Lexer`)}constructor(e,t=rK){if(this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(e,t)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=HL(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}return t()},typeof t==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.1299-a boolean 2nd argument is no longer supported`);this.config=LU({},rK,t);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n==`number`&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,()=>{let n,r=!0;this.TRACE_INIT(`Lexer Config handling`,()=>{if(this.config.lineTerminatorsPattern===rK.lineTerminatorsPattern)this.config.lineTerminatorsPattern=x7e;else if(this.config.lineTerminatorCharacters===rK.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.1300- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(t.safeMode&&t.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),BH(e)?n={modes:{defaultMode:IW(e)},defaultMode:YG}:(r=!1,n=IW(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT(`performRuntimeChecks`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(KXe(n,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT(`performWarningRuntimeChecks`,()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(qXe(n,this.trackStartLines,this.config.lineTerminatorCharacters))})),n.modes=n.modes?n.modes:{},lG(n.modes,(e,t)=>{n.modes[t]=OG(e,e=>TG(e))});let i=IU(n.modes);if(lG(n.modes,(e,n)=>{this.TRACE_INIT(`Mode: <${n}> processing`,()=>{if(this.modes.push(n),this.config.skipValidations===!1&&this.TRACE_INIT(`validatePatterns`,()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jXe(e,i))}),SG(this.lexerDefinitionErrors)){lR(e);let r;this.TRACE_INIT(`analyzeTokenTypes`,()=>{r=AXe(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:t.positionTracking,ensureOptimizations:t.ensureOptimizations,safeMode:t.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[n]=r.patternIdxToConfig,this.charCodeToPatternIdxToConfig[n]=r.charCodeToPatternIdxToConfig,this.emptyGroups=LU({},this.emptyGroups,r.emptyGroups),this.hasCustom=r.hasCustom||this.hasCustom,this.canModeBeOptimized[n]=r.canBeOptimized}})}),this.defaultMode=n.defaultMode,!SG(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let e=hG(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------1301-`);throw Error(`Errors detected in definition of Lexer:1302-`+e)}lG(this.lexerDefinitionWarning,e=>{VL(e.message)}),this.TRACE_INIT(`Choosing sub-methods implementations`,()=>{if(r&&(this.handleModes=tU),this.trackStartLines===!1&&(this.computeNewColumn=qH),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=tU),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT(`Failed Optimization Warnings`,()=>{let e=DG(this.canModeBeOptimized,(e,t,n)=>(t===!1&&e.push(n),e),[]);if(t.ensureOptimizations&&!SG(e))throw Error(`Lexer Modes: < ${e.join(`, `)} > cannot be optimized.1303- Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.1304- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT(`clearRegExpParserCache`,()=>{DXe()}),this.TRACE_INIT(`toFastProperties`,()=>{UL(this)})})}tokenize(e,t=this.defaultMode){if(!SG(this.lexerDefinitionErrors)){let e=hG(this.lexerDefinitionErrors,e=>e.message).join(`-----------------------1305-`);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:1306-`+e)}return this.tokenizeInternal(e,t)}tokenizeInternal(e,t){let n,r,i,a,o,s,l,u,d,f,p,m,h,g,_,v=e,y=v.length,b=0,x=0,S=this.hasCustom?0:Math.floor(e.length/10),C=Array(S),w=[],T=this.trackStartLines?1:void 0,E=this.trackStartLines?1:void 0,D=JXe(this.emptyGroups),O=this.trackStartLines,k=this.config.lineTerminatorsPattern,A=0,j=[],M=[],N=[],P=[];Object.freeze(P);let F=!1,I=Q(e=>{if(N.length===1&&e.tokenType.PUSH_MODE===void 0){let t=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);w.push({offset:e.startOffset,line:e.startLine,column:e.startColumn,length:e.image.length,message:t})}else{N.pop();let e=oG(N);j=this.patternIdxToConfig[e],M=this.charCodeToPatternIdxToConfig[e],A=j.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;F=!!(M&&t)}},`pop_mode`);function L(e){N.push(e),M=this.charCodeToPatternIdxToConfig[e],j=this.patternIdxToConfig[e],A=j.length,A=j.length;let t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;F=!!(M&&t)}Q(L,`push_mode`),L.call(this,t);let R,ee=this.config.recoveryEnabled;for(;b<y;){s=null,d=-1;let t=v.charCodeAt(b),S;if(F){let e=oR(t),n=M[e];S=n===void 0?P:n}else S=j;let z=S.length;for(n=0;n<z;n++){R=S[n];let r=R.pattern;l=null;let f=R.short;if(f===!1?R.isCustom===!0?(_=r.exec(v,b,C,D),_===null?s=null:(s=_[0],d=s.length,_.payload!==void 0&&(l=_.payload))):(r.lastIndex=b,d=this.matchLength(r,e,b)):t===f&&(d=1,s=r),d!==-1){if(o=R.longerAlt,o!==void 0){s=e.substring(b,b+d);let t=o.length;for(i=0;i<t;i++){let t=j[o[i]],n=t.pattern;if(u=null,t.isCustom===!0?(_=n.exec(v,b,C,D),_===null?a=null:(a=_[0],_.payload!==void 0&&(u=_.payload))):(n.lastIndex=b,a=this.match(n,e,b)),a&&a.length>s.length){s=a,d=a.length,l=u,R=t;break}}}break}}if(d!==-1){if(f=R.group,f!==void 0&&(s=s===null?e.substring(b,b+d):s,p=R.tokenTypeIdx,m=this.createTokenInstance(s,b,p,R.tokenType,T,E,d),this.handlePayload(m,l),f===!1?x=this.addToken(C,x,m):D[f].push(m)),O===!0&&R.canLineTerminator===!0){let t=0,n,r;k.lastIndex=0;do s=s===null?e.substring(b,b+d):s,n=k.test(s),n===!0&&(r=k.lastIndex-1,t++);while(n===!0);t===0?E=this.computeNewColumn(E,d):(T+=t,E=d-r,this.updateTokenEndLineColumnLocation(m,f,r,t,T,E,d))}else E=this.computeNewColumn(E,d);b+=d,this.handleModes(R,I,L,m)}else{let t=b,n=T,i=E,a=ee===!1;for(;a===!1&&b<y;)for(b++,r=0;r<A;r++){let t=j[r],n=t.pattern,i=t.short;if(i===!1?t.isCustom===!0?a=n.exec(v,b,C,D)!==null:(n.lastIndex=b,a=n.exec(e)!==null):v.charCodeAt(b)===i&&(a=!0),a===!0)break}if(h=b-t,E=this.computeNewColumn(E,h),g=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(v,t,h,n,i,oG(N)),w.push({offset:t,line:n,column:i,length:h,message:g}),ee===!1)break}}return this.hasCustom||(C.length=x),{tokens:C,groups:D,errors:w}}handleModes(e,t,n,r){if(e.pop===!0){let i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)}updateTokenEndLineColumnLocation(e,t,n,r,i,a,o){let s,l;t!==void 0&&(s=n===o-1,l=s?-1:0,(r!==1||s!==!0)&&(e.endLine=i+l,e.endColumn=a-1+-l))}computeNewColumn(e,t){return e+t}createOffsetOnlyToken(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}}createStartOnlyToken(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}}createFullToken(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}}addTokenUsingPush(e,t,n){return e.push(n),t}addTokenUsingMemberAccess(e,t,n){return e[t]=n,t++,t}handlePayloadNoCustom(e,t){}handlePayloadWithCustom(e,t){t!==null&&(e.payload=t)}match(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null}matchLength(e,t,n){return e.test(t)===!0?e.lastIndex-n:-1}},iK.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,iK.NA=/NOT_APPLICABLE/,Q(pR,`tokenLabel`),Q(mR,`hasTokenLabel`),S7e=`parent`,aK=`categories`,oK=`label`,sK=`group`,cK=`push_mode`,lK=`pop_mode`,uK=`longer_alt`,dK=`line_breaks`,fK=`start_chars_hint`,Q(hR,`createToken`),Q(aZe,`createTokenInternal`),pK=hR({name:`EOF`,pattern:iK.NA}),lR([pK]),Q(gR,`createTokenInstance`),Q(_R,`tokenMatcher`),mK={buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:r}){return`Expecting ${mR(e)?`--> ${pR(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return`Redundant input, expecting EOF but found: `+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:n,customUserDescription:r,ruleName:i}){let a=`1307-but found: '`+mG(t).image+`'`;return r?`Expecting: `+r+a:`Expecting: one of these possible Token sequences:1308-${hG(hG(DG(e,(e,t)=>e.concat(t),[]),e=>`[${hG(e,e=>pR(e)).join(`, `)}]`),(e,t)=>` ${t+1}. ${e}`).join(`1309-`)}`+a},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:n,ruleName:r}){let i=`1310-but found: '`+mG(t).image+`'`;return n?`Expecting: `+n+i:`Expecting: expecting at least one iteration which starts with one of these possible Token sequences::1311- <${hG(e,e=>`[${hG(e,e=>pR(e)).join(`,`)}]`).join(` ,`)}>`+i}},Object.freeze(mK),C7e={buildRuleNotFoundError(e,t){return`Invalid grammar, reference to a rule which is not defined: ->`+t.nonTerminalName+`<-1312-inside top level rule: ->`+e.name+`<-`}},hK={buildDuplicateFoundError(e,t){function n(e){return e instanceof VG?e.terminalType.name:e instanceof MG?e.nonTerminalName:``}Q(n,`getExtraProductionArgument`);let r=e.name,i=mG(t),a=i.idx,o=KL(i),s=n(i),l=`->${o}${a>0?a:``}<- ${s?`with argument: ->${s}<-`:``}1313- appears more than once (${t.length} times) in the top level rule: ->${r}<-. 1314- For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES 1315- `;return l=l.replace(/[ \t]+/g,` `),l=l.replace(/\s\s+/g,`1316-`),l},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.1317-The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.1318-To resolve this make sure each Terminal and Non-Terminal names are unique1319-This is easy to accomplish by using the convention that Terminal names start with an uppercase letter1320-and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=hG(e.prefixPath,e=>pR(e)).join(`, `),n=e.alternation.idx===0?``:e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(` ,`)}> due to common lookahead prefix1321-in <OR${n}> inside <${e.topLevelRule.name}> Rule,1322-<${t}> may appears as a prefix path in all these alternatives.1323-See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX1324-For Further details.`},buildAlternationAmbiguityError(e){let t=e.alternation.idx===0?``:e.alternation.idx,n=e.prefixPath.length===0,r=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(` ,`)}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,1325-`;if(n)r+=`These alternatives are all empty (match no tokens), making them indistinguishable.1326-Only the last alternative may be empty.1327-`;else{let t=hG(e.prefixPath,e=>pR(e)).join(`, `);r+=`<${t}> may appears as a prefix path in all these alternatives.1328-`}return r+=`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES1329-For Further details.`,r},buildEmptyRepetitionError(e){let t=KL(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.1330-This could lead to an infinite loop.`},buildTokenNameError(e){return`deprecated`},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.1331-Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:1332-<OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.1333- has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name;return`Left Recursion found in grammar.1334-rule: <${t}> can be invoked from itself (directly or indirectly)1335-without consuming any Tokens. The grammar path that causes this is: 1336- ${`${t} --> ${hG(e.leftRecursionPath,e=>e.name).concat([t]).join(` --> `)}`}1337- To fix this refactor your grammar to remove the left recursion.1338-see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return`deprecated`},buildDuplicateRuleNameError(e){let t;return t=e.topLevelRule instanceof NG?e.topLevelRule.name:e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}},Q(oZe,`resolveGrammar`),w7e=class extends HG{static{Q(this,`GastRefResolverVisitor`)}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){lG(yG(this.nameToTopRule),e=>{this.currTopLevel=e,e.accept(this)})}visitNonTerminal(e){let t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{let t=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:t,type:JK.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}},T7e=class extends UG{static{Q(this,`AbstractNextPossibleTokensWalker`)}constructor(e,t){super(),this.topProd=e,this.path=t,this.possibleTokTypes=[],this.nextProductionName=``,this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error(`The path does not start with the walker's top Rule!`);return this.ruleStack=IW(this.path.ruleStack).reverse(),this.occurrenceStack=IW(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(e,t=[]){this.found||super.walk(e,t)}walkProdRef(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){let r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}}updateExpectedNext(){SG(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},E7e=class extends T7e{static{Q(this,`NextAfterTokenWalker`)}constructor(e,t){super(e,t),this.path=t,this.nextTerminalName=``,this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){let e=new PG({definition:t.concat(n)});this.possibleTokTypes=JL(e),this.found=!0}}},gK=class extends UG{static{Q(this,`AbstractNextTerminalAfterProductionWalker`)}constructor(e,t){super(),this.topRule=e,this.occurrence=t,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},D7e=class extends gK{static{Q(this,`NextTerminalAfterManyWalker`)}walkMany(e,t,n){if(e.idx===this.occurrence){let e=mG(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof VG&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkMany(e,t,n)}},_K=class extends gK{static{Q(this,`NextTerminalAfterManySepWalker`)}walkManySep(e,t,n){if(e.idx===this.occurrence){let e=mG(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof VG&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkManySep(e,t,n)}},O7e=class extends gK{static{Q(this,`NextTerminalAfterAtLeastOneWalker`)}walkAtLeastOne(e,t,n){if(e.idx===this.occurrence){let e=mG(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof VG&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOne(e,t,n)}},vK=class extends gK{static{Q(this,`NextTerminalAfterAtLeastOneSepWalker`)}walkAtLeastOneSep(e,t,n){if(e.idx===this.occurrence){let e=mG(t.concat(n));this.result.isEndOfRule=e===void 0,e instanceof VG&&(this.result.token=e.terminalType,this.result.occurrence=e.idx)}else super.walkAtLeastOneSep(e,t,n)}},Q(vR,`possiblePathsFrom`),Q(yR,`nextPossibleTokensAfter`),Q(sZe,`expandTopLevelRule`),(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(yK||={}),Q(bR,`getProdType`),Q(xR,`getLookaheadPaths`),Q(cZe,`buildLookaheadFuncForOr`),Q(lZe,`buildLookaheadFuncForOptionalProd`),Q(uZe,`buildAlternativesLookAheadFunc`),Q(dZe,`buildSingleAlternativeLookaheadFunction`),k7e=class extends UG{static{Q(this,`RestDefinitionFinderWalker`)}constructor(e,t,n){super(),this.topProd=e,this.targetOccurrence=t,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=n.concat(r),!0)}walkOption(e,t,n){this.checkIsTarget(e,yK.OPTION,t,n)||super.walkOption(e,t,n)}walkAtLeastOne(e,t,n){this.checkIsTarget(e,yK.REPETITION_MANDATORY,t,n)||super.walkOption(e,t,n)}walkAtLeastOneSep(e,t,n){this.checkIsTarget(e,yK.REPETITION_MANDATORY_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}walkMany(e,t,n){this.checkIsTarget(e,yK.REPETITION,t,n)||super.walkOption(e,t,n)}walkManySep(e,t,n){this.checkIsTarget(e,yK.REPETITION_WITH_SEPARATOR,t,n)||super.walkOption(e,t,n)}},bK=class extends HG{static{Q(this,`InsideDefinitionFinderVisitor`)}constructor(e,t,n){super(),this.targetOccurrence=e,this.targetProdType=t,this.targetRef=n,this.result=[]}checkIsTarget(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)}visitOption(e){this.checkIsTarget(e,yK.OPTION)}visitRepetition(e){this.checkIsTarget(e,yK.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,yK.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,yK.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,yK.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,yK.ALTERNATION)}},Q(SR,`initializeArrayOfArrays`),Q(CR,`pathToHashKeys`),Q(fZe,`isUniquePrefixHash`),Q(wR,`lookAheadSequenceFromAlternatives`),Q(TR,`getLookaheadPathsForOr`),Q(ER,`getLookaheadPathsForOptionalProd`),Q(DR,`containsPath`),Q(pZe,`isStrictPrefixOfPath`),Q(OR,`areTokenCategoriesNotUsed`),Q(mZe,`validateLookahead`),Q(hZe,`validateGrammar`),Q(gZe,`validateDuplicateProductions`),Q(_Ze,`identifyProductionForDuplicates`),Q(kR,`getExtraProductionArgument`),A7e=class extends HG{static{Q(this,`OccurrenceValidationCollector`)}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(e){this.allProductions.push(e)}visitOption(e){this.allProductions.push(e)}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}visitAlternation(e){this.allProductions.push(e)}visitTerminal(e){this.allProductions.push(e)}},Q(vZe,`validateRuleDoesNotAlreadyExist`),Q(yZe,`validateRuleIsOverridden`),Q(AR,`validateNoLeftRecursion`),Q(jR,`getFirstNoneTerminal`),xK=class extends HG{static{Q(this,`OrCollector`)}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},Q(bZe,`validateEmptyOrAlternative`),Q(xZe,`validateAmbiguousAlternationAlternatives`),j7e=class extends HG{static{Q(this,`RepetitionCollector`)}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(e){this.allProductions.push(e)}visitRepetitionMandatory(e){this.allProductions.push(e)}visitRepetitionMandatoryWithSeparator(e){this.allProductions.push(e)}visitRepetition(e){this.allProductions.push(e)}},Q(SZe,`validateTooManyAlts`),Q(CZe,`validateSomeNonEmptyLookaheadPath`),Q(wZe,`checkAlternativesAmbiguities`),Q(TZe,`checkPrefixAlternativesAmbiguities`),Q(EZe,`checkTerminalAndNoneTerminalsNameSpace`),Q(DZe,`resolveGrammar`),Q(OZe,`validateGrammar`),SK=`MismatchedTokenException`,CK=`NoViableAltException`,wK=`EarlyExitException`,TK=`NotAllInputParsedException`,EK=[SK,CK,wK,TK],Object.freeze(EK),Q(MR,`isRecognitionException`),DK=class extends Error{static{Q(this,`RecognitionException`)}constructor(e,t){super(e),this.token=t,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},OK=class extends DK{static{Q(this,`MismatchedTokenException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=SK}},M7e=class extends DK{static{Q(this,`NoViableAltException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=CK}},N7e=class extends DK{static{Q(this,`NotAllInputParsedException`)}constructor(e,t){super(e,t),this.name=TK}},P7e=class extends DK{static{Q(this,`EarlyExitException`)}constructor(e,t,n){super(e,t),this.previousToken=n,this.name=wK}},kK={},AK=`InRuleRecoveryException`,F7e=class extends Error{static{Q(this,`InRuleRecoveryException`)}constructor(e){super(e),this.name=AK}},I7e=class{static{Q(this,`Recoverable`)}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=_G(e,`recoveryEnabled`)?e.recoveryEnabled:KK.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=kZe)}getTokenToInsert(e){let t=gR(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return t.isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,n,r){let i=this.findReSyncTokenType(),a=this.exportLexerState(),o=[],s=!1,l=this.LA(1),u=this.LA(1),d=Q(()=>{let e=this.LA(0),t=new OK(this.errorMessageProvider.buildMismatchTokenMessage({expected:r,actual:l,previous:e,ruleName:this.getCurrRuleFullName()}),l,this.LA(0));t.resyncedTokens=cG(o),this.SAVE_ERROR(t)},`generateErrorMessage`);for(;!s;)if(this.tokenMatcher(u,r)){d();return}else if(n.call(this)){d(),e.apply(this,t);return}else this.tokenMatcher(u,i)?s=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,o));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(e,t,n){return!(n===!1||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))}getFollowsForInRuleRecovery(e,t){let n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){let e=this.SKIP_TOKEN();return this.consumeToken(),e}throw new F7e(`sad sad panda`)}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||SG(t))return!1;let n=this.LA(1);return pG(t,e=>this.tokenMatcher(n,e))!==void 0}canRecoverWithSingleTokenDeletion(e){return this.canTokenTypeBeDeletedInRecovery(e)?this.tokenMatcher(this.LA(2),e):!1}isInCurrentRuleReSyncSet(e){let t=this.getCurrFollowKey();return bG(this.getFollowSetFromFollowKey(t),e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),n=2;for(;;){let r=pG(e,e=>_R(t,e));if(r!==void 0)return r;t=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return kK;let e=this.getLastExplicitRuleShortName(),t=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:t,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let e=this.RULE_STACK,t=this.RULE_OCCURRENCE_STACK;return hG(e,(n,r)=>r===0?kK:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:t[r],inRule:this.shortRuleNameToFullName(e[r-1])})}flattenFollowSet(){return $U(hG(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e)))}getFollowSetFromFollowKey(e){if(e===kK)return[pK];let t=e.ruleName+e.idxInCallingRule+WG+e.inRule;return this.resyncFollows[t]}addToResyncTokens(e,t){return this.tokenMatcher(e,pK)||t.push(e),t}reSyncTo(e){let t=[],n=this.LA(1);for(;this.tokenMatcher(n,e)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,t);return cG(t)}attemptInRepetitionRecovery(e,t,n,r,i,a,o){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:IW(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return hG(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},Q(kZe,`attemptInRepetitionRecovery`),L7e=4,jK=8,R7e=8,MK=1<<jK,NK=2<<jK,PK=3<<jK,FK=4<<jK,IK=5<<jK,LK=6<<jK,Q(NR,`getKeyForAutomaticLookahead`),32-R7e,RK=class{static{Q(this,`LLkLookaheadStrategy`)}constructor(e){this.maxLookahead=e?.maxLookahead??KK.maxLookahead}validate(e){let t=this.validateNoLeftRecursion(e.rules);if(SG(t)){let n=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead);return[...t,...n,...r,...i]}return t}validateNoLeftRecursion(e){return gG(e,e=>AR(e,e,hK))}validateEmptyOrAlternatives(e){return gG(e,e=>bZe(e,hK))}validateAmbiguousAlternationAlternatives(e,t){return gG(e,e=>xZe(e,t,hK))}validateSomeNonEmptyLookaheadPath(e,t){return CZe(e,t,hK)}buildLookaheadForAlternation(e){return cZe(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,uZe)}buildLookaheadForOptional(e){return lZe(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,bR(e.prodType),dZe)}},z7e=class{static{Q(this,`LooksAhead`)}initLooksAhead(e){this.dynamicTokensEnabled=_G(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:KK.dynamicTokensEnabled,this.maxLookahead=_G(e,`maxLookahead`)?e.maxLookahead:KK.maxLookahead,this.lookaheadStrategy=_G(e,`lookaheadStrategy`)?e.lookaheadStrategy:new RK({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){lG(e,e=>{this.TRACE_INIT(`${e.name} Rule Lookahead`,()=>{let{alternation:t,repetition:n,option:r,repetitionMandatory:i,repetitionMandatoryWithSeparator:a,repetitionWithSeparator:o}=AZe(e);lG(t,t=>{let n=t.idx===0?``:t.idx;this.TRACE_INIT(`${KL(t)}${n}`,()=>{let n=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:t.idx,rule:e,maxLookahead:t.maxLookahead||this.maxLookahead,hasPredicates:t.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),r=NR(this.fullRuleNameToShort[e.name],MK,t.idx);this.setLaFuncCache(r,n)})}),lG(n,t=>{this.computeLookaheadFunc(e,t.idx,PK,`Repetition`,t.maxLookahead,KL(t))}),lG(r,t=>{this.computeLookaheadFunc(e,t.idx,NK,`Option`,t.maxLookahead,KL(t))}),lG(i,t=>{this.computeLookaheadFunc(e,t.idx,FK,`RepetitionMandatory`,t.maxLookahead,KL(t))}),lG(a,t=>{this.computeLookaheadFunc(e,t.idx,LK,`RepetitionMandatoryWithSeparator`,t.maxLookahead,KL(t))}),lG(o,t=>{this.computeLookaheadFunc(e,t.idx,IK,`RepetitionWithSeparator`,t.maxLookahead,KL(t))})})})}computeLookaheadFunc(e,t,n,r,i,a){this.TRACE_INIT(`${a}${t===0?``:t}`,()=>{let a=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:t,rule:e,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:r}),o=NR(this.fullRuleNameToShort[e.name],n,t);this.setLaFuncCache(o,a)})}getKeyForAutomaticLookahead(e,t){return NR(this.getLastExplicitRuleShortName(),e,t)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,t){this.lookAheadFuncsCache.set(e,t)}},B7e=class extends HG{static{Q(this,`DslMethodsCollectorVisitor`)}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(e){this.dslMethods.option.push(e)}visitRepetitionWithSeparator(e){this.dslMethods.repetitionWithSeparator.push(e)}visitRepetitionMandatory(e){this.dslMethods.repetitionMandatory.push(e)}visitRepetitionMandatoryWithSeparator(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)}visitRepetition(e){this.dslMethods.repetition.push(e)}visitAlternation(e){this.dslMethods.alternation.push(e)}},zK=new B7e,Q(AZe,`collectMethods`),Q(PR,`setNodeLocationOnlyOffset`),Q(FR,`setNodeLocationFull`),Q(jZe,`addTerminalToCst`),Q(MZe,`addNoneTerminalToCst`),V7e=`name`,Q(IR,`defineNameProp`),Q(NZe,`defaultVisit`),Q(PZe,`createBaseSemanticVisitorConstructor`),Q(FZe,`createBaseVisitorConstructorWithDefaults`),(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(H7e||={}),Q(IZe,`validateVisitor`),Q(LZe,`validateMissingCstMethods`),U7e=class{static{Q(this,`TreeBuilder`)}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=_G(e,`nodeLocationTracking`)?e.nodeLocationTracking:KK.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=tU,this.cstFinallyStateUpdate=tU,this.cstPostTerminal=tU,this.cstPostNonTerminal=tU,this.cstPostRule=tU;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=FR,this.setNodeLocationFromNode=FR,this.cstPostRule=tU,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=tU,this.setNodeLocationFromNode=tU,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=PR,this.setNodeLocationFromNode=PR,this.cstPostRule=tU,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=tU,this.setNodeLocationFromNode=tU,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=tU,this.setNodeLocationFromNode=tU,this.cstPostRule=tU,this.setInitialNodeLocation=tU;else throw Error(`Invalid <nodeLocationTracking> config option: "${e.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(e){e.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(e){let t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(e){let t={name:e,children:Object.create(null)};this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(e){let t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN}cstPostTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];jZe(n,t,e),this.setNodeLocationFromToken(n.location,t)}cstPostNonTerminal(e,t){let n=this.CST_STACK[this.CST_STACK.length-1];MZe(n,t,e),this.setNodeLocationFromNode(n.location,e.location)}getBaseCstVisitorConstructor(){if(TG(this.baseCstVisitorConstructor)){let e=PZe(this.className,IU(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(TG(this.baseCstVisitorWithDefaultsConstructor)){let e=FZe(this.className,IU(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-1]}getPreviousExplicitRuleShortName(){let e=this.RULE_STACK;return e[e.length-2]}getLastExplicitRuleOccurrenceIndex(){let e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]}},W7e=class{static{Q(this,`LexerAdapter`)}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(e){if(this.selfAnalysisDone!==!0)throw Error(`Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.`);this.reset(),this.tokVector=e,this.tokVectorLength=e.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):GK}LA(e){let t=this.currIdx+e;return t<0||this.tokVectorLength<=t?GK:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(e){this.currIdx=e}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}},G7e=class{static{Q(this,`RecognizerApi`)}ACTION(e){return e.call(this)}consume(e,t,n){return this.consumeInternal(t,e,n)}subrule(e,t,n){return this.subruleInternal(t,e,n)}option(e,t){return this.optionInternal(t,e)}or(e,t){return this.orInternal(t,e)}many(e,t){return this.manyInternal(e,t)}atLeastOne(e,t){return this.atLeastOneInternal(e,t)}CONSUME(e,t){return this.consumeInternal(e,0,t)}CONSUME1(e,t){return this.consumeInternal(e,1,t)}CONSUME2(e,t){return this.consumeInternal(e,2,t)}CONSUME3(e,t){return this.consumeInternal(e,3,t)}CONSUME4(e,t){return this.consumeInternal(e,4,t)}CONSUME5(e,t){return this.consumeInternal(e,5,t)}CONSUME6(e,t){return this.consumeInternal(e,6,t)}CONSUME7(e,t){return this.consumeInternal(e,7,t)}CONSUME8(e,t){return this.consumeInternal(e,8,t)}CONSUME9(e,t){return this.consumeInternal(e,9,t)}SUBRULE(e,t){return this.subruleInternal(e,0,t)}SUBRULE1(e,t){return this.subruleInternal(e,1,t)}SUBRULE2(e,t){return this.subruleInternal(e,2,t)}SUBRULE3(e,t){return this.subruleInternal(e,3,t)}SUBRULE4(e,t){return this.subruleInternal(e,4,t)}SUBRULE5(e,t){return this.subruleInternal(e,5,t)}SUBRULE6(e,t){return this.subruleInternal(e,6,t)}SUBRULE7(e,t){return this.subruleInternal(e,7,t)}SUBRULE8(e,t){return this.subruleInternal(e,8,t)}SUBRULE9(e,t){return this.subruleInternal(e,9,t)}OPTION(e){return this.optionInternal(e,0)}OPTION1(e){return this.optionInternal(e,1)}OPTION2(e){return this.optionInternal(e,2)}OPTION3(e){return this.optionInternal(e,3)}OPTION4(e){return this.optionInternal(e,4)}OPTION5(e){return this.optionInternal(e,5)}OPTION6(e){return this.optionInternal(e,6)}OPTION7(e){return this.optionInternal(e,7)}OPTION8(e){return this.optionInternal(e,8)}OPTION9(e){return this.optionInternal(e,9)}OR(e){return this.orInternal(e,0)}OR1(e){return this.orInternal(e,1)}OR2(e){return this.orInternal(e,2)}OR3(e){return this.orInternal(e,3)}OR4(e){return this.orInternal(e,4)}OR5(e){return this.orInternal(e,5)}OR6(e){return this.orInternal(e,6)}OR7(e){return this.orInternal(e,7)}OR8(e){return this.orInternal(e,8)}OR9(e){return this.orInternal(e,9)}MANY(e){this.manyInternal(0,e)}MANY1(e){this.manyInternal(1,e)}MANY2(e){this.manyInternal(2,e)}MANY3(e){this.manyInternal(3,e)}MANY4(e){this.manyInternal(4,e)}MANY5(e){this.manyInternal(5,e)}MANY6(e){this.manyInternal(6,e)}MANY7(e){this.manyInternal(7,e)}MANY8(e){this.manyInternal(8,e)}MANY9(e){this.manyInternal(9,e)}MANY_SEP(e){this.manySepFirstInternal(0,e)}MANY_SEP1(e){this.manySepFirstInternal(1,e)}MANY_SEP2(e){this.manySepFirstInternal(2,e)}MANY_SEP3(e){this.manySepFirstInternal(3,e)}MANY_SEP4(e){this.manySepFirstInternal(4,e)}MANY_SEP5(e){this.manySepFirstInternal(5,e)}MANY_SEP6(e){this.manySepFirstInternal(6,e)}MANY_SEP7(e){this.manySepFirstInternal(7,e)}MANY_SEP8(e){this.manySepFirstInternal(8,e)}MANY_SEP9(e){this.manySepFirstInternal(9,e)}AT_LEAST_ONE(e){this.atLeastOneInternal(0,e)}AT_LEAST_ONE1(e){return this.atLeastOneInternal(1,e)}AT_LEAST_ONE2(e){this.atLeastOneInternal(2,e)}AT_LEAST_ONE3(e){this.atLeastOneInternal(3,e)}AT_LEAST_ONE4(e){this.atLeastOneInternal(4,e)}AT_LEAST_ONE5(e){this.atLeastOneInternal(5,e)}AT_LEAST_ONE6(e){this.atLeastOneInternal(6,e)}AT_LEAST_ONE7(e){this.atLeastOneInternal(7,e)}AT_LEAST_ONE8(e){this.atLeastOneInternal(8,e)}AT_LEAST_ONE9(e){this.atLeastOneInternal(9,e)}AT_LEAST_ONE_SEP(e){this.atLeastOneSepFirstInternal(0,e)}AT_LEAST_ONE_SEP1(e){this.atLeastOneSepFirstInternal(1,e)}AT_LEAST_ONE_SEP2(e){this.atLeastOneSepFirstInternal(2,e)}AT_LEAST_ONE_SEP3(e){this.atLeastOneSepFirstInternal(3,e)}AT_LEAST_ONE_SEP4(e){this.atLeastOneSepFirstInternal(4,e)}AT_LEAST_ONE_SEP5(e){this.atLeastOneSepFirstInternal(5,e)}AT_LEAST_ONE_SEP6(e){this.atLeastOneSepFirstInternal(6,e)}AT_LEAST_ONE_SEP7(e){this.atLeastOneSepFirstInternal(7,e)}AT_LEAST_ONE_SEP8(e){this.atLeastOneSepFirstInternal(8,e)}AT_LEAST_ONE_SEP9(e){this.atLeastOneSepFirstInternal(9,e)}RULE(e,t,n=qK){if(bG(this.definedRulesNames,e)){let t={message:hK.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:JK.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(t)}this.definedRulesNames.push(e);let r=this.defineRule(e,t,n);return this[e]=r,r}OVERRIDE_RULE(e,t,n=qK){let r=yZe(e,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(r);let i=this.defineRule(e,t,n);return this[e]=i,i}BACKTRACK(e,t){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(MR(e))return!1;throw e}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return yXe(yG(this.gastProductionsCache))}},K7e=class{static{Q(this,`RecognizerEngine`)}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=cR,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},_G(t,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.1339- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-01340- For Further details.`);if(BH(e)){if(SG(e))throw Error(`A Token Vocabulary cannot be empty.1341- Note that the first argument for the parser constructor1342- is no longer a Token vector (since v4.0).`);if(typeof e[0].startOffset==`number`)throw Error(`The Parser constructor no longer accepts a token vector as the first argument.1343- See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-01344- For Further details.`)}if(BH(e))this.tokensMap=DG(e,(e,t)=>(e[t.name]=t,e),{});else if(_G(e,`modes`)&&uG($U(yG(e.modes)),iZe)){let t=AG($U(yG(e.modes)));this.tokensMap=DG(t,(e,t)=>(e[t.name]=t,e),{})}else if(UH(e))this.tokensMap=IW(e);else throw Error(`<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=pK;let n=uG(_G(e,`modes`)?$U(yG(e.modes)):yG(e),e=>SG(e.categoryMatches));this.tokenMatcher=n?cR:sR,lR(yG(this.tokensMap))}defineRule(e,t,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'1345-Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let r=_G(n,`resyncEnabled`)?n.resyncEnabled:qK.resyncEnabled,i=_G(n,`recoveryValueFunc`)?n.recoveryValueFunc:qK.recoveryValueFunc,a=this.ruleShortNameIdx<<L7e+jK;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return o=this.outputCst===!0?Q(function(...n){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n);let r=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(r),r}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},`invokeRuleWithTry`):Q(function(...n){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),t.apply(this,n)}catch(e){return this.invokeRuleCatch(e,r,i)}finally{this.ruleFinallyStateUpdate()}},`invokeRuleWithTryCst`),Object.assign(o,{ruleName:e,originalGrammarAction:t})}invokeRuleCatch(e,t,n){let r=this.RULE_STACK.length===1,i=t&&!this.isBackTracking()&&this.recoveryEnabled;if(MR(e)){let t=e;if(i){let r=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(r)){if(t.resyncedTokens=this.reSyncTo(r),this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];return e.recoveredNode=!0,e}return n(e)}if(this.outputCst){let e=this.CST_STACK[this.CST_STACK.length-1];e.recoveredNode=!0,t.partialCstResult=e}throw t}if(r)return this.moveToTerminatedState(),n(e);throw t}throw e}optionInternal(e,t){let n=this.getKeyForAutomaticLookahead(NK,t);return this.optionInternalLogic(e,t,n)}optionInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof e!=`function`){i=e.DEF;let t=e.GATE;if(t!==void 0){let e=r;r=Q(()=>t.call(this)&&e.call(this),`lookAheadFunc`)}}else i=e;if(r.call(this)===!0)return i.call(this)}atLeastOneInternal(e,t){let n=this.getKeyForAutomaticLookahead(FK,e);return this.atLeastOneInternalLogic(e,t,n)}atLeastOneInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=Q(()=>e.call(this)&&t.call(this),`lookAheadFunc`)}}else i=t;if(r.call(this)===!0){let e=this.doSingleRepetition(i);for(;r.call(this)===!0&&e===!0;)e=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(e,yK.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],r,FK,e,O7e)}atLeastOneSepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(LK,e);this.atLeastOneSepFirstInternalLogic(e,t,n)}atLeastOneSepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=Q(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,vK],t,LK,e,vK)}else throw this.raiseEarlyExitException(e,yK.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)}manyInternal(e,t){let n=this.getKeyForAutomaticLookahead(PK,e);return this.manyInternalLogic(e,t,n)}manyInternalLogic(e,t,n){let r=this.getLaFuncFromCache(n),i;if(typeof t!=`function`){i=t.DEF;let e=t.GATE;if(e!==void 0){let t=r;r=Q(()=>e.call(this)&&t.call(this),`lookaheadFunction`)}}else i=t;let a=!0;for(;r.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],r,PK,e,D7e,a)}manySepFirstInternal(e,t){let n=this.getKeyForAutomaticLookahead(IK,e);this.manySepFirstInternalLogic(e,t,n)}manySepFirstInternalLogic(e,t,n){let r=t.DEF,i=t.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){r.call(this);let t=Q(()=>this.tokenMatcher(this.LA(1),i),`separatorLookAheadFunc`);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,r,_K],t,IK,e,_K)}}repetitionSepSecondInternal(e,t,n,r,i){for(;n();)this.CONSUME(t),r.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,n,r,i],n,LK,e,i)}doSingleRepetition(e){let t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){let n=this.getKeyForAutomaticLookahead(MK,t),r=BH(e)?e:e.DEF,i=this.getLaFuncFromCache(n).call(this,r);if(i!==void 0)return r[i].ALT.call(this);this.raiseNoAltException(t,e.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new N7e(t,e))}}subruleInternal(e,t,n){let r;try{let i=n===void 0?void 0:n.ARGS;return this.subruleIdx=t,r=e.apply(this,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){throw this.subruleInternalError(t,n,e.ruleName)}}subruleInternalError(e,t,n){throw MR(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e}consumeInternal(e,t,n){let r;try{let t=this.LA(1);this.tokenMatcher(t,e)===!0?(this.consumeToken(),r=t):this.consumeInternalError(e,t,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r}consumeInternalError(e,t,n){let r,i=this.LA(0);throw r=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new OK(r,t,i))}consumeInternalRecovery(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){let r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===AK?n:e}}throw n}saveRecogState(){let e=this.errors,t=IW(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:t,CST_STACK:this.CST_STACK}}reloadRecogState(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK}ruleInvocationStateUpdate(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]}shortRuleNameToFullName(e){return this.shortRuleNameToFull[e]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),pK)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}},q7e=class{static{Q(this,`ErrorHandler`)}initErrorHandler(e){this._errors=[],this.errorMessageProvider=_G(e,`errorMessageProvider`)?e.errorMessageProvider:KK.errorMessageProvider}SAVE_ERROR(e){if(MR(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:IW(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)}get errors(){return IW(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,n){let r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],a=ER(e,i,t,this.maxLookahead)[0],o=[];for(let e=1;e<=this.maxLookahead;e++)o.push(this.LA(e));let s=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:a,actual:o,previous:this.LA(0),customUserDescription:n,ruleName:r});throw this.SAVE_ERROR(new P7e(s,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){let n=this.getCurrRuleFullName(),r=this.getGAstProductions()[n],i=TR(e,r,this.maxLookahead),a=[];for(let e=1;e<=this.maxLookahead;e++)a.push(this.LA(e));let o=this.LA(0),s=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:o,customUserDescription:t,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new M7e(s,this.LA(1),o))}},J7e=class{static{Q(this,`ContentAssist`)}initContentAssist(){}computeContentAssist(e,t){let n=this.gastProductionsCache[e];if(TG(n))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return yR([n],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){let t=mG(e.ruleStack),n=this.getGAstProductions()[t];return new E7e(n,e).startWalking()}},BK={description:`This Object indicates the Parser is during Recording Phase`},Object.freeze(BK),VK=!0,HK=2**jK-1,UK=hR({name:`RECORDING_PHASE_TOKEN`,pattern:iK.NA}),lR([UK]),WK=gR(UK,`This IToken indicates the Parser is in Recording Phase1346- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1),Object.freeze(WK),Y7e={name:`This CSTNode indicates the Parser is in Recording Phase1347- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},X7e=class{static{Q(this,`GastRecorder`)}initGastRecorder(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,()=>{for(let e=0;e<10;e++){let t=e>0?e:``;this[`CONSUME${t}`]=function(t,n){return this.consumeInternalRecord(t,e,n)},this[`SUBRULE${t}`]=function(t,n){return this.subruleInternalRecord(t,e,n)},this[`OPTION${t}`]=function(t){return this.optionInternalRecord(t,e)},this[`OR${t}`]=function(t){return this.orInternalRecord(t,e)},this[`MANY${t}`]=function(t){this.manyInternalRecord(e,t)},this[`MANY_SEP${t}`]=function(t){this.manySepFirstInternalRecord(e,t)},this[`AT_LEAST_ONE${t}`]=function(t){this.atLeastOneInternalRecord(e,t)},this[`AT_LEAST_ONE_SEP${t}`]=function(t){this.atLeastOneSepFirstInternalRecord(e,t)}}this.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},this.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},this.option=function(e,t){return this.optionInternalRecord(t,e)},this.or=function(e,t){return this.orInternalRecord(t,e)},this.many=function(e,t){this.manyInternalRecord(e,t)},this.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,()=>{let e=this;for(let t=0;t<10;t++){let n=t>0?t:``;delete e[`CONSUME${n}`],delete e[`SUBRULE${n}`],delete e[`OPTION${n}`],delete e[`OR${n}`],delete e[`MANY${n}`],delete e[`MANY_SEP${n}`],delete e[`AT_LEAST_ONE${n}`],delete e[`AT_LEAST_ONE_SEP${n}`]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})}ACTION_RECORD(e){}BACKTRACK_RECORD(e,t){return()=>!0}LA_RECORD(e){return GK}topLevelRuleRecord(e,t){try{let n=new NG({definition:[],name:e});return n.name=e,this.recordingProdStack.push(n),t.call(this),this.recordingProdStack.pop(),n}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=`1348- This error was thrown during the "grammar recording phase" For more info see:1349- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}}optionInternalRecord(e,t){return LR.call(this,FG,e,t)}atLeastOneInternalRecord(e,t){LR.call(this,IG,t,e)}atLeastOneSepFirstInternalRecord(e,t){LR.call(this,LG,t,e,VK)}manyInternalRecord(e,t){LR.call(this,RG,t,e)}manySepFirstInternalRecord(e,t){LR.call(this,zG,t,e,VK)}orInternalRecord(e,t){return RZe.call(this,e,t)}subruleInternalRecord(e,t,n){if(zR(t),!e||_G(e,`ruleName`)===!1){let n=Error(`<SUBRULE${RR(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>1350- inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=oG(this.recordingProdStack),i=e.ruleName,a=new MG({idx:t,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return r.definition.push(a),this.outputCst?Y7e:BK}consumeInternalRecord(e,t,n){if(zR(t),!dR(e)){let n=Error(`<CONSUME${RR(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>1351- inside top level rule: <${this.recordingProdStack[0].name}>`);throw n.KNOWN_RECORDER_ERROR=!0,n}let r=oG(this.recordingProdStack),i=new VG({idx:t,terminalType:e,label:n?.LABEL});return r.definition.push(i),WK}},Q(LR,`recordProd`),Q(RZe,`recordOrProd`),Q(RR,`getIdxSuffix`),Q(zR,`assertMethodIdxIsValid`),Z7e=class{static{Q(this,`PerformanceTracer`)}initPerformanceTracer(e){if(_G(e,`traceInitPerf`)){let t=e.traceInitPerf,n=typeof t==`number`;this.traceInitMaxIdent=n?t:1/0,this.traceInitPerf=n?t>0:t}else this.traceInitMaxIdent=0,this.traceInitPerf=KK.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${e}>`);let{time:r,value:i}=HL(t),a=r>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${e}> time: ${r}ms`),this.traceInitIndent--,i}return t()}},Q(zZe,`applyMixins`),GK=gR(pK,``,NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(GK),KK=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:mK,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),qK=Object.freeze({recoveryValueFunc:Q(()=>void 0,`recoveryValueFunc`),resyncEnabled:!0}),(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`,e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]=`CUSTOM_LOOKAHEAD_VALIDATION`})(JK||={}),Q(BR,`EMPTY_ALT`),YK=class e{static{Q(this,`Parser`)}static performSelfAnalysis(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT(`performSelfAnalysis`,()=>{let t;this.selfAnalysisDone=!0;let n=this.className;this.TRACE_INIT(`toFastProps`,()=>{UL(this)}),this.TRACE_INIT(`Grammar Recording`,()=>{try{this.enableRecording(),lG(this.definedRulesNames,e=>{let t=this[e].originalGrammarAction,n;this.TRACE_INIT(`${e} Rule`,()=>{n=this.topLevelRuleRecord(e,t)}),this.gastProductionsCache[e]=n})}finally{this.disableRecording()}});let r=[];if(this.TRACE_INIT(`Grammar Resolving`,()=>{r=DZe({rules:yG(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT(`Grammar Validations`,()=>{if(SG(r)&&this.skipValidations===!1){let e=OZe({rules:yG(this.gastProductionsCache),tokenTypes:yG(this.tokensMap),errMsgProvider:hK,grammarName:n}),t=mZe({lookaheadStrategy:this.lookaheadStrategy,rules:yG(this.gastProductionsCache),tokenTypes:yG(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(e,t)}}),SG(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT(`computeAllProdsFollows`,()=>{let e=TXe(yG(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT(`ComputeLookaheadFunctions`,()=>{var e,t;(t=(e=this.lookaheadStrategy).initialize)==null||t.call(e,{rules:yG(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(yG(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!SG(this.definitionErrors))throw t=hG(this.definitionErrors,e=>e.message),Error(`Parser Definition Errors detected:1352- ${t.join(`1353--------------------------------1354-`)}`)})}constructor(e,t){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(t),n.initLexerAdapter(),n.initLooksAhead(t),n.initRecognizerEngine(e,t),n.initRecoverable(t),n.initTreeBuilder(t),n.initContentAssist(),n.initGastRecorder(t),n.initPerformanceTracer(t),_G(t,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.1355- Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.1356- See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES1357- For further details.`);this.skipValidations=_G(t,`skipValidations`)?t.skipValidations:KK.skipValidations}},YK.DEFER_DEFINITION_ERRORS_HANDLING=!1,zZe(YK,[I7e,z7e,U7e,W7e,K7e,G7e,q7e,J7e,X7e,Z7e]),Q7e=class extends YK{static{Q(this,`EmbeddedActionsParser`)}constructor(e,t=KK){let n=IW(t);n.outputCst=!1,super(e,n)}},Q(BZe,`arrayMap`),XK=BZe,Q(VZe,`listCacheClear`),$7e=VZe,Q(HZe,`eq`),ZK=HZe,Q(UZe,`assocIndexOf`),QK=UZe,e9e=Array.prototype.splice,Q(WZe,`listCacheDelete`),t9e=WZe,Q(GZe,`listCacheGet`),n9e=GZe,Q(KZe,`listCacheHas`),r9e=KZe,Q(qZe,`listCacheSet`),i9e=qZe,Q(VR,`ListCache`),VR.prototype.clear=$7e,VR.prototype.delete=t9e,VR.prototype.get=n9e,VR.prototype.has=r9e,VR.prototype.set=i9e,$K=VR,Q(JZe,`stackClear`),a9e=JZe,Q(YZe,`stackDelete`),o9e=YZe,Q(XZe,`stackGet`),s9e=XZe,Q(ZZe,`stackHas`),c9e=ZZe,eq=typeof global==`object`&&global&&global.Object===Object&&global,l9e=typeof self==`object`&&self&&self.Object===Object&&self,tq=eq||l9e||Function(`return this`)(),nq=tq.Symbol,rq=Object.prototype,u9e=rq.hasOwnProperty,d9e=rq.toString,iq=nq?nq.toStringTag:void 0,Q(QZe,`getRawTag`),f9e=QZe,p9e=Object.prototype.toString,Q($Ze,`objectToString`),m9e=$Ze,h9e=`[object Null]`,g9e=`[object Undefined]`,aq=nq?nq.toStringTag:void 0,Q(eQe,`baseGetTag`),oq=eQe,Q(tQe,`isObject`),sq=tQe,_9e=`[object AsyncFunction]`,v9e=`[object Function]`,y9e=`[object GeneratorFunction]`,b9e=`[object Proxy]`,Q(nQe,`isFunction`),cq=nQe,lq=tq[`__core-js_shared__`],uq=(function(){var e=/[^.]+$/.exec(lq&&lq.keys&&lq.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``})(),Q(rQe,`isMasked`),x9e=rQe,S9e=Function.prototype.toString,Q(iQe,`toSource`),dq=iQe,C9e=/[\\^$.*+?()[\]{}|]/g,w9e=/^\[object .+?Constructor\]$/,T9e=Function.prototype,E9e=Object.prototype,D9e=T9e.toString,O9e=E9e.hasOwnProperty,k9e=RegExp(`^`+D9e.call(O9e).replace(C9e,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Q(aQe,`baseIsNative`),A9e=aQe,Q(oQe,`getValue`),j9e=oQe,Q(sQe,`getNative`),fq=sQe,pq=fq(tq,`Map`),mq=fq(Object,`create`),Q(cQe,`hashClear`),M9e=cQe,Q(lQe,`hashDelete`),N9e=lQe,P9e=`__lodash_hash_undefined__`,F9e=Object.prototype.hasOwnProperty,Q(uQe,`hashGet`),I9e=uQe,L9e=Object.prototype.hasOwnProperty,Q(dQe,`hashHas`),R9e=dQe,z9e=`__lodash_hash_undefined__`,Q(fQe,`hashSet`),B9e=fQe,Q(HR,`Hash`),HR.prototype.clear=M9e,HR.prototype.delete=N9e,HR.prototype.get=I9e,HR.prototype.has=R9e,HR.prototype.set=B9e,hq=HR,Q(pQe,`mapCacheClear`),V9e=pQe,Q(mQe,`isKeyable`),H9e=mQe,Q(hQe,`getMapData`),gq=hQe,Q(gQe,`mapCacheDelete`),U9e=gQe,Q(_Qe,`mapCacheGet`),W9e=_Qe,Q(vQe,`mapCacheHas`),G9e=vQe,Q(yQe,`mapCacheSet`),K9e=yQe,Q(UR,`MapCache`),UR.prototype.clear=V9e,UR.prototype.delete=U9e,UR.prototype.get=W9e,UR.prototype.has=G9e,UR.prototype.set=K9e,_q=UR,q9e=200,Q(bQe,`stackSet`),J9e=bQe,Q(WR,`Stack`),WR.prototype.clear=a9e,WR.prototype.delete=o9e,WR.prototype.get=s9e,WR.prototype.has=c9e,WR.prototype.set=J9e,vq=WR,Y9e=`__lodash_hash_undefined__`,Q(xQe,`setCacheAdd`),X9e=xQe,Q(SQe,`setCacheHas`),Z9e=SQe,Q(GR,`SetCache`),GR.prototype.add=GR.prototype.push=X9e,GR.prototype.has=Z9e,yq=GR,Q(CQe,`arraySome`),Q9e=CQe,Q(wQe,`cacheHas`),bq=wQe,$9e=1,eet=2,Q(TQe,`equalArrays`),xq=TQe,Sq=tq.Uint8Array,Q(EQe,`mapToArray`),tet=EQe,Q(DQe,`setToArray`),Cq=DQe,net=1,ret=2,iet=`[object Boolean]`,aet=`[object Date]`,oet=`[object Error]`,set=`[object Map]`,cet=`[object Number]`,uet=`[object RegExp]`,det=`[object Set]`,fet=`[object String]`,pet=`[object Symbol]`,met=`[object ArrayBuffer]`,het=`[object DataView]`,wq=nq?nq.prototype:void 0,Tq=wq?wq.valueOf:void 0,Q(OQe,`equalByTag`),get=OQe,Q(kQe,`arrayPush`),Eq=kQe,Dq=Array.isArray,Q(AQe,`baseGetAllKeys`),_et=AQe,Q(jQe,`arrayFilter`),Oq=jQe,Q(MQe,`stubArray`),vet=MQe,yet=Object.prototype.propertyIsEnumerable,kq=Object.getOwnPropertySymbols,bet=kq?function(e){return e==null?[]:(e=Object(e),Oq(kq(e),function(t){return yet.call(e,t)}))}:vet,Q(NQe,`baseTimes`),xet=NQe,Q(PQe,`isObjectLike`),Aq=PQe,Cet=`[object Arguments]`,Q(FQe,`baseIsArguments`),jq=FQe,Mq=Object.prototype,wet=Mq.hasOwnProperty,Tet=Mq.propertyIsEnumerable,Nq=jq((function(){return arguments})())?jq:function(e){return Aq(e)&&wet.call(e,`callee`)&&!Tet.call(e,`callee`)},Q(IQe,`stubFalse`),Eet=IQe,Pq=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Fq=Pq&&typeof module==`object`&&module&&!module.nodeType&&module,Iq=Fq&&Fq.exports===Pq?tq.Buffer:void 0,Lq=(Iq?Iq.isBuffer:void 0)||Eet,Det=9007199254740991,Oet=/^(?:0|[1-9]\d*)$/,Q(LQe,`isIndex`),Rq=LQe,ket=9007199254740991,Q(RQe,`isLength`),zq=RQe,Aet=`[object Arguments]`,jet=`[object Array]`,Met=`[object Boolean]`,Net=`[object Date]`,Pet=`[object Error]`,Fet=`[object Function]`,Iet=`[object Map]`,Let=`[object Number]`,Ret=`[object Object]`,zet=`[object RegExp]`,Bet=`[object Set]`,Vet=`[object String]`,Het=`[object WeakMap]`,Uet=`[object ArrayBuffer]`,Wet=`[object DataView]`,Get=`[object Float32Array]`,Ket=`[object Float64Array]`,qet=`[object Int8Array]`,Jet=`[object Int16Array]`,Yet=`[object Int32Array]`,Xet=`[object Uint8Array]`,Zet=`[object Uint8ClampedArray]`,Qet=`[object Uint16Array]`,$et=`[object Uint32Array]`,Bq={},Bq[Get]=Bq[Ket]=Bq[qet]=Bq[Jet]=Bq[Yet]=Bq[Xet]=Bq[Zet]=Bq[Qet]=Bq[$et]=!0,Bq[Aet]=Bq[jet]=Bq[Uet]=Bq[Met]=Bq[Wet]=Bq[Net]=Bq[Pet]=Bq[Fet]=Bq[Iet]=Bq[Let]=Bq[Ret]=Bq[zet]=Bq[Bet]=Bq[Vet]=Bq[Het]=!1,Q(zQe,`baseIsTypedArray`),ett=zQe,Q(BQe,`baseUnary`),ttt=BQe,Vq=typeof exports==`object`&&exports&&!exports.nodeType&&exports,Hq=Vq&&typeof module==`object`&&module&&!module.nodeType&&module,Uq=Hq&&Hq.exports===Vq&&eq.process,Wq=(function(){try{return Hq&&Hq.require&&Hq.require(`util`).types||Uq&&Uq.binding&&Uq.binding(`util`)}catch{}})(),Gq=Wq&&Wq.isTypedArray,Kq=Gq?ttt(Gq):ett,ntt=Object.prototype.hasOwnProperty,Q(VQe,`arrayLikeKeys`),rtt=VQe,itt=Object.prototype,Q(HQe,`isPrototype`),qq=HQe,Q(UQe,`overArg`),att=UQe(Object.keys,Object),ott=Object.prototype.hasOwnProperty,Q(WQe,`baseKeys`),Jq=WQe,Q(GQe,`isArrayLike`),Yq=GQe,Q(KQe,`keys`),Xq=KQe,Q(qQe,`getAllKeys`),Zq=qQe,stt=1,ctt=Object.prototype.hasOwnProperty,Q(JQe,`equalObjects`),ltt=JQe,Qq=fq(tq,`DataView`),$q=fq(tq,`Promise`),eJ=fq(tq,`Set`),tJ=fq(tq,`WeakMap`),nJ=`[object Map]`,utt=`[object Object]`,rJ=`[object Promise]`,iJ=`[object Set]`,aJ=`[object WeakMap]`,oJ=`[object DataView]`,dtt=dq(Qq),ftt=dq(pq),ptt=dq($q),mtt=dq(eJ),htt=dq(tJ),sJ=oq,(Qq&&sJ(new Qq(new ArrayBuffer(1)))!=oJ||pq&&sJ(new pq)!=nJ||$q&&sJ($q.resolve())!=rJ||eJ&&sJ(new eJ)!=iJ||tJ&&sJ(new tJ)!=aJ)&&(sJ=Q(function(e){var t=oq(e),n=t==utt?e.constructor:void 0,r=n?dq(n):``;if(r)switch(r){case dtt:return oJ;case ftt:return nJ;case ptt:return rJ;case mtt:return iJ;case htt:return aJ}return t},`getTag`)),cJ=sJ,gtt=1,lJ=`[object Arguments]`,uJ=`[object Array]`,dJ=`[object Object]`,fJ=Object.prototype.hasOwnProperty,Q(YQe,`baseIsEqualDeep`),_tt=YQe,Q(KR,`baseIsEqual`),pJ=KR,vtt=1,ytt=2,Q(XQe,`baseIsMatch`),btt=XQe,Q(ZQe,`isStrictComparable`),mJ=ZQe,Q(QQe,`getMatchData`),xtt=QQe,Q($Qe,`matchesStrictComparable`),hJ=$Qe,Q(e$e,`baseMatches`),Stt=e$e,Ctt=`[object Symbol]`,Q(t$e,`isSymbol`),gJ=t$e,wtt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ttt=/^\w*$/,Q(n$e,`isKey`),_J=n$e,Ett=`Expected a function`,Q(qR,`memoize`),qR.Cache=_q,Dtt=qR,Ott=500,Q(r$e,`memoizeCapped`),ktt=r$e,Att=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,jtt=/\\(\\)?/g,Mtt=ktt(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Att,function(e,n,r,i){t.push(r?i.replace(jtt,`$1`):n||e)}),t}),Ntt=1/0,vJ=nq?nq.prototype:void 0,yJ=vJ?vJ.toString:void 0,Q(JR,`baseToString`),Ptt=JR,Q(i$e,`toString`),Ftt=i$e,Q(a$e,`castPath`),bJ=a$e,Itt=1/0,Q(o$e,`toKey`),xJ=o$e,Q(s$e,`baseGet`),SJ=s$e,Q(c$e,`get`),Ltt=c$e,Q(l$e,`baseHasIn`),Rtt=l$e,Q(u$e,`hasPath`),ztt=u$e,Q(d$e,`hasIn`),Btt=d$e,Vtt=1,Htt=2,Q(f$e,`baseMatchesProperty`),Utt=f$e,Q(p$e,`identity`),CJ=p$e,Q(m$e,`baseProperty`),Wtt=m$e,Q(h$e,`basePropertyDeep`),Gtt=h$e,Q(g$e,`property`),Ktt=g$e,Q(_$e,`baseIteratee`),wJ=_$e,Q(v$e,`createBaseFor`),qtt=v$e(),Q(y$e,`baseForOwn`),Jtt=y$e,Q(b$e,`createBaseEach`),TJ=b$e(Jtt),Q(x$e,`baseMap`),Ytt=x$e,Q(S$e,`map`),EJ=S$e,Q(C$e,`baseFilter`),Xtt=C$e,Q(w$e,`filter`),Ztt=w$e,Q(YR,`buildATNKey`),DJ=1,Qtt=2,OJ=4,kJ=5,AJ=7,$tt=8,ent=9,tnt=10,nnt=11,jJ=12,MJ=class{static{Q(this,`AbstractTransition`)}constructor(e){this.target=e}isEpsilon(){return!1}},NJ=class extends MJ{static{Q(this,`AtomTransition`)}constructor(e,t){super(e),this.tokenType=t}},PJ=class extends MJ{static{Q(this,`EpsilonTransition`)}constructor(e){super(e)}isEpsilon(){return!0}},FJ=class extends MJ{static{Q(this,`RuleTransition`)}constructor(e,t,n){super(e),this.rule=t,this.followState=n}isEpsilon(){return!0}},Q(T$e,`createATN`),Q(E$e,`createRuleStartAndStopATNStates`),Q(XR,`atom`),Q(D$e,`repetition`),Q(O$e,`repetitionSep`),Q(k$e,`repetitionMandatory`),Q(A$e,`repetitionMandatorySep`),Q(j$e,`alternation`),Q(M$e,`option`),Q(ZR,`block`),Q(QR,`plus`),Q($R,`star`),Q(N$e,`optional`),Q(ez,`defineDecisionState`),Q(tz,`makeAlts`),Q(P$e,`getProdType`),Q(F$e,`makeBlock`),Q(nz,`tokenRef`),Q(I$e,`ruleRef`),Q(L$e,`buildRuleHandle`),Q(rz,`epsilon`),Q(iz,`newState`),Q(az,`addTransition`),Q(R$e,`removeState`),IJ={},LJ=class{static{Q(this,`ATNConfigSet`)}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){let t=oz(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return EJ(this.configs,e=>e.alt)}get key(){let e=``;for(let t in this.map)e+=t+`:`;return e}},Q(oz,`getATNConfigKey`),Q(z$e,`baseExtremum`),rnt=z$e,Q(B$e,`baseLt`),int=B$e,Q(V$e,`min`),ant=V$e,RJ=nq?nq.isConcatSpreadable:void 0,Q(H$e,`isFlattenable`),ont=H$e,Q(sz,`baseFlatten`),zJ=sz,Q(U$e,`flatMap`),snt=U$e,Q(W$e,`baseFindIndex`),cnt=W$e,Q(G$e,`baseIsNaN`),lnt=G$e,Q(K$e,`strictIndexOf`),unt=K$e,Q(q$e,`baseIndexOf`),dnt=q$e,Q(J$e,`arrayIncludes`),fnt=J$e,Q(Y$e,`arrayIncludesWith`),pnt=Y$e,Q(X$e,`noop`),mnt=X$e,hnt=eJ&&1/Cq(new eJ([,-0]))[1]==1/0?function(e){return new eJ(e)}:mnt,gnt=200,Q(Z$e,`baseUniq`),_nt=Z$e,Q(Q$e,`uniqBy`),vnt=Q$e,Q($$e,`flatten`),ynt=$$e,Q(e1e,`arrayEach`),bnt=e1e,Q(t1e,`castFunction`),xnt=t1e,Q(n1e,`forEach`),BJ=n1e,Snt=`[object Map]`,Cnt=`[object Set]`,wnt=Object.prototype.hasOwnProperty,Q(r1e,`isEmpty`),Tnt=r1e,Q(i1e,`arrayReduce`),Ent=i1e,Q(a1e,`baseReduce`),Dnt=a1e,Q(o1e,`reduce`),VJ=o1e,Q(s1e,`createDFACache`),HJ=class{static{Q(this,`PredicateSet`)}constructor(){this.predicates=[]}is(e){return e>=this.predicates.length||this.predicates[e]}set(e,t){this.predicates[e]=t}toString(){let e=``,t=this.predicates.length;for(let n=0;n<t;n++)e+=this.predicates[n]===!0?`1`:`0`;return e}},UJ=new HJ,Ont=class extends RK{static{Q(this,`LLStarLookaheadStrategy`)}constructor(e){super(),this.logging=e?.logging??(e=>console.log(e))}initialize(e){this.atn=T$e(e.rules),this.dfas=c1e(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:n,hasPredicates:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=YR(n,`Alternation`,t),l=this.atn.decisionMap[s].decision,u=EJ(xR({maxLookahead:1,occurrence:t,prodType:`Alternation`,rule:n}),e=>EJ(e,e=>e[0]));if(cz(u,!1)&&!i){let e=VJ(u,(e,t,n)=>(BJ(t,t=>{t&&(e[t.tokenTypeIdx]=n,BJ(t.categoryMatches,t=>{e[t]=n}))}),e),{});return r?function(t){let n=this.LA(1),r=e[n.tokenTypeIdx];if(t!==void 0&&r!==void 0){let e=t[r]?.GATE;if(e!==void 0&&e.call(this)===!1)return}return r}:function(){let t=this.LA(1);return e[t.tokenTypeIdx]}}return r?function(e){let t=new HJ,n=e===void 0?0:e.length;for(let r=0;r<n;r++){let n=e?.[r].GATE;t.set(r,n===void 0||n.call(this))}let r=lz.call(this,a,l,t,o);return typeof r==`number`?r:void 0}:function(){let e=lz.call(this,a,l,UJ,o);return typeof e==`number`?e:void 0}}buildLookaheadForOptional(e){let{prodOccurrence:t,rule:n,prodType:r,dynamicTokensEnabled:i}=e,a=this.dfas,o=this.logging,s=YR(n,r,t),l=this.atn.decisionMap[s].decision,u=EJ(xR({maxLookahead:1,occurrence:t,prodType:r,rule:n}),e=>EJ(e,e=>e[0]));if(cz(u)&&u[0][0]&&!i){let e=u[0],t=ynt(e);if(t.length===1&&Tnt(t[0].categoryMatches)){let e=t[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let e=VJ(t,(e,t)=>(t!==void 0&&(e[t.tokenTypeIdx]=!0,BJ(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){let t=this.LA(1);return e[t.tokenTypeIdx]===!0}}}return function(){let e=lz.call(this,a,l,UJ,o);return typeof e!=`object`&&e===0}}},Q(cz,`isLL1Sequence`),Q(c1e,`initATNSimulator`),Q(lz,`adaptivePredict`),Q(l1e,`performLookahead`),Q(u1e,`computeLookaheadTarget`),Q(d1e,`reportLookaheadAmbiguity`),Q(f1e,`buildAmbiguityError`),Q(p1e,`getProductionDslName`),Q(m1e,`buildAdaptivePredictError`),Q(h1e,`getExistingTargetState`),Q(g1e,`computeReachSet`),Q(_1e,`getReachableTarget`),Q(v1e,`getUniqueAlt`),Q(uz,`newDFAState`),Q(dz,`addDFAEdge`),Q(fz,`addDFAState`),Q(y1e,`computeStartState`),Q(pz,`closure`),Q(b1e,`getEpsilonTarget`),Q(x1e,`hasConfigInRuleStopState`),Q(S1e,`allConfigsInRuleStopStates`),Q(C1e,`hasConflictTerminatingPrediction`),Q(w1e,`getConflictingAltSets`),Q(T1e,`hasConflictingAltSet`),Q(E1e,`hasStateAssociatedWithOneAlt`),KB(),WJ=class{static{Q(this,`CstNodeBuilder`)}constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new JJ(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){let t=new qJ;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){let n=new KJ(e.startOffset,e.image.length,NI(e),e.tokenType,!t);return n.grammarSource=t,n.root=this.rootNode,this.current.content.push(n),n}removeNode(e){let t=e.container;if(t){let n=t.content.indexOf(e);n>=0&&t.content.splice(n,1)}}addHiddenNodes(e){let t=[];for(let n of e){let e=new KJ(n.startOffset,n.image.length,NI(n),n.tokenType,!0);e.root=this.rootNode,t.push(e)}let n=this.current,r=!1;if(n.content.length>0){n.content.push(...t);return}for(;n.container;){let e=n.container.content.indexOf(n);if(e>0){n.container.content.splice(e,0,...t),r=!0;break}n=n.container}r||this.rootNode.content.unshift(...t)}construct(e){let t=this.current;typeof e.$type==`string`&&!e.$infixName&&(this.current.astNode=e),e.$cstNode=t;let n=this.nodeStack.pop();n?.content.length===0&&this.removeNode(n)}},GJ=class{static{Q(this,`AbstractCstNode`)}get hidden(){return!1}get astNode(){let e=typeof this._astNode?.$type==`string`?this._astNode:this.container?.astNode;if(!e)throw Error(`This node has no associated AST element`);return e}set astNode(e){this._astNode=e}get text(){return this.root.fullText.substring(this.offset,this.end)}},KJ=class extends GJ{static{Q(this,`LeafCstNodeImpl`)}get offset(){return this._offset}get length(){return this._length}get end(){return this._offset+this._length}get hidden(){return this._hidden}get tokenType(){return this._tokenType}get range(){return this._range}constructor(e,t,n,r,i=!1){super(),this._hidden=i,this._offset=e,this._tokenType=r,this._length=t,this._range=n}},qJ=class extends GJ{static{Q(this,`CompositeCstNodeImpl`)}constructor(){super(...arguments),this.content=new knt(this)}get offset(){return this.firstNonHiddenNode?.offset??0}get length(){return this.end-this.offset}get end(){return this.lastNonHiddenNode?.end??0}get range(){let e=this.firstNonHiddenNode,t=this.lastNonHiddenNode;if(e&&t){if(this._rangeCache===void 0){let{range:n}=e,{range:r}=t;this._rangeCache={start:n.start,end:r.end.line<n.start.line?n.start:r.end}}return this._rangeCache}return{start:bB.create(0,0),end:bB.create(0,0)}}get firstNonHiddenNode(){for(let e of this.content)if(!e.hidden)return e;return this.content[0]}get lastNonHiddenNode(){for(let e=this.content.length-1;e>=0;e--){let t=this.content[e];if(!t.hidden)return t}return this.content[this.content.length-1]}},knt=class e extends Array{static{Q(this,`CstNodeContainer`)}constructor(t){super(),this.parent=t,Object.setPrototypeOf(this,e.prototype)}push(...e){return this.addParents(e),super.push(...e)}unshift(...e){return this.addParents(e),super.unshift(...e)}splice(e,t,...n){return this.addParents(n),super.splice(e,t,...n)}addParents(e){for(let t of e)t.container=this.parent}},JJ=class extends qJ{static{Q(this,`RootCstNodeImpl`)}get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text=``,this._text=e??``}},YJ=Symbol(`Datatype`),Q(mz,`isDataTypeNode`),XJ=`​`,ZJ=Q(e=>e.endsWith(XJ)?e:e+XJ,`withRuleSuffix`),QJ=class{static{Q(this,`AbstractLangiumParser`)}constructor(e){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;let t=this.lexer.definition,n=e.LanguageMetaData.mode===`production`;this.wrapper=e.shared.profilers.LangiumProfiler?.isActive(`parsing`)?new jnt(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask(`parsing`,e.LanguageMetaData.languageId)):new rY(t,{...e.parser.ParserConfig,skipValidations:n,errorMessageProvider:e.parser.ParserErrorMessageProvider})}alternatives(e,t){this.wrapper.wrapOr(e,t)}optional(e,t){this.wrapper.wrapOption(e,t)}many(e,t){this.wrapper.wrapMany(e,t)}atLeastOne(e,t){this.wrapper.wrapAtLeastOne(e,t)}getRule(e){return this.allRules.get(e)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},$J=class extends QJ{static{Q(this,`LangiumParser`)}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new WJ,this.stack=[],this.assignmentMap=new Map,this.operatorPrecedence=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){let n=this.computeRuleType(e),r;uI(e)&&(r=e.name,this.registerPrecedenceMap(e));let i=this.wrapper.DEFINE_RULE(ZJ(e.name),this.startImplementation(n,r,t).bind(this));return this.allRules.set(e.name,i),gI(e)&&e.entry&&(this.mainRule=i),i}registerPrecedenceMap(e){let t=e.name,n=new Map;for(let t=0;t<e.operators.precedences.length;t++){let r=e.operators.precedences[t];for(let e of r.operators)n.set(e.value,{precedence:t,rightAssoc:r.associativity===`right`})}this.operatorPrecedence.set(t,n)}computeRuleType(e){return uI(e)?SL(e):e.fragment?void 0:vL(e)?YJ:SL(e)}parse(e,t={}){this.nodeBuilder.buildRootNode(e);let n=this.lexerResult=this.lexer.tokenize(e);this.wrapper.input=n.tokens;let r=t.rule?this.allRules.get(t.rule):this.mainRule;if(!r)throw Error(t.rule?`No rule found with name '${t.rule}'`:`No main rule available.`);let i=this.doParse(r);return this.nodeBuilder.addHiddenNodes(n.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,LF(i,{deep:!0}),{value:i,lexerErrors:n.errors,lexerReport:n.report,parserErrors:this.wrapper.errors}}doParse(e){let t=this.wrapper.rule(e);if(this.stack.length>0&&(t=this.construct()),t===void 0)throw Error(`No result from parser`);if(this.stack.length>0)throw Error(`Parser stack is not empty after parsing`);return t}startImplementation(e,t,n){return r=>{let i=!this.isRecording()&&e!==void 0;if(i){let n={$type:e};this.stack.push(n),e===YJ?n.value=``:t!==void 0&&(n.$infixName=t)}return n(r),i?this.construct():void 0}}extractHiddenTokens(e){let t=this.lexerResult.hidden;if(!t.length)return[];let n=e.startOffset;for(let e=0;e<t.length;e++)if(t[e].startOffset>n)return t.splice(0,e);return t.splice(0,t.length)}consume(e,t,n){let r=this.wrapper.wrapConsume(e,t);if(!this.isRecording()&&this.isValidToken(r)){let e=this.extractHiddenTokens(r);this.nodeBuilder.addHiddenNodes(e);let t=this.nodeBuilder.buildLeafNode(r,n),{assignment:i,crossRef:a}=this.getAssignment(n),o=this.current;if(i){let e=fI(n)?r.image:this.converter.convert(r.image,t);this.assign(i.operator,i.feature,e,t,a)}else if(mz(o)){let e=r.image;fI(n)||(e=this.converter.convert(e,t).toString()),o.value+=e}}}isValidToken(e){return!e.isInsertedInRecovery&&!isNaN(e.startOffset)&&typeof e.endOffset==`number`&&!isNaN(e.endOffset)}subrule(e,t,n,r,i){let a;!this.isRecording()&&!n&&(a=this.nodeBuilder.buildCompositeNode(r));let o;try{o=this.wrapper.wrapSubrule(e,t,i)}finally{this.isRecording()||(o===void 0&&!n&&(o=this.construct()),o!==void 0&&a&&a.length>0&&this.performSubruleAssignment(o,r,a))}}performSubruleAssignment(e,t,n){let{assignment:r,crossRef:i}=this.getAssignment(t);if(r)this.assign(r.operator,r.feature,e,n,i);else if(!r){let t=this.current;if(mz(t))t.value+=e.toString();else if(typeof e==`object`&&e){let n=this.assignWithoutOverride(e,t);this.stack.pop(),this.stack.push(n)}}}action(e,t){if(!this.isRecording()){let n=this.current;if(t.feature&&t.operator){n=this.construct(),this.nodeBuilder.removeNode(n.$cstNode),this.nodeBuilder.buildCompositeNode(t).content.push(n.$cstNode);let r={$type:e};this.stack.push(r),this.assign(t.operator,t.feature,n,n.$cstNode)}else n.$type=e}}construct(){if(this.isRecording())return;let e=this.stack.pop();return this.nodeBuilder.construct(e),`$infixName`in e?this.constructInfix(e,this.operatorPrecedence.get(e.$infixName)):mz(e)?this.converter.convert(e.value,e.$cstNode):(qF(this.astReflection,e),e)}constructInfix(e,t){let n=e.parts;if(!Array.isArray(n)||n.length===0)return;let r=e.operators;if(!Array.isArray(r)||n.length<2)return n[0];let i=0,a=-1;for(let e=0;e<r.length;e++){let n=r[e],o=t.get(n)??{precedence:1/0,rightAssoc:!1};o.precedence>a?(a=o.precedence,i=e):o.precedence===a&&(o.rightAssoc||(i=e))}let o=r.slice(0,i),s=r.slice(i+1),l=n.slice(0,i+1),u=n.slice(i+1),d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:o},f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:s},p=this.constructInfix(d,t),m=this.constructInfix(f,t);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:r[i],right:m}}getAssignment(e){if(!this.assignmentMap.has(e)){let t=RF(e,tI);this.assignmentMap.set(e,{assignment:t,crossRef:t&&aI(t.terminal)?t.terminal.isMulti?`multi`:`single`:void 0})}return this.assignmentMap.get(e)}assign(e,t,n,r,i){let a=this.current,o;switch(o=i===`single`&&typeof n==`string`?this.linker.buildReference(a,t,r,n):i===`multi`&&typeof n==`string`?this.linker.buildMultiReference(a,t,r,n):n,e){case`=`:a[t]=o;break;case`?=`:a[t]=!0;break;case`+=`:Array.isArray(a[t])||(a[t]=[]),a[t].push(o)}}assignWithoutOverride(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];t===void 0?e[n]=r:Array.isArray(t)&&Array.isArray(r)&&(r.push(...t),e[n]=r)}let n=e.$cstNode;return n&&(n.astNode=void 0,e.$cstNode=void 0),e}get definitionErrors(){return this.wrapper.definitionErrors}},eY=class{static{Q(this,`AbstractParserErrorMessageProvider`)}buildMismatchTokenMessage(e){return mK.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return mK.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return mK.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return mK.buildEarlyExitMessage(e)}},tY=class extends eY{static{Q(this,`LangiumParserErrorMessageProvider`)}buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${e.LABEL?"`"+e.LABEL+"`":e.name.endsWith(`:KW`)?`keyword '${e.name.substring(0,e.name.length-3)}'`:`token of type '${e.name}'`} but found \`${t.image}\`.`}buildNotAllInputParsedMessage({firstRedundant:e}){return`Expecting end of file but found \`${e.image}\`.`}},nY=class extends QJ{static{Q(this,`LangiumCompletionParser`)}constructor(){super(...arguments),this.tokens=[],this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}action(){}construct(){}parse(e){this.resetState();let t=this.lexer.tokenize(e,{mode:`partial`});return this.tokens=t.tokens,this.wrapper.input=[...this.tokens],this.mainRule.call(this.wrapper,{}),this.unorderedGroups.clear(),{tokens:this.tokens,elementStack:[...this.lastElementStack],tokenIndex:this.nextTokenIndex}}rule(e,t){let n=this.wrapper.DEFINE_RULE(ZJ(e.name),this.startImplementation(t).bind(this));return this.allRules.set(e.name,n),e.entry&&(this.mainRule=n),n}resetState(){this.elementStack=[],this.lastElementStack=[],this.nextTokenIndex=0,this.stackSize=0}startImplementation(e){return t=>{let n=this.keepStackSize();try{e(t)}finally{this.resetStackSize(n)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){let e=this.elementStack.length;return this.stackSize=e,e}resetStackSize(e){this.removeUnexpectedElements(),this.stackSize=e}consume(e,t,n){this.wrapper.wrapConsume(e,t),this.isRecording()||(this.lastElementStack=[...this.elementStack,n],this.nextTokenIndex=this.currIdx+1)}subrule(e,t,n,r,i){this.before(r),this.wrapper.wrapSubrule(e,t,i),this.after(r)}before(e){this.isRecording()||this.elementStack.push(e)}after(e){if(!this.isRecording()){let t=this.elementStack.lastIndexOf(e);t>=0&&this.elementStack.splice(t)}}get currIdx(){return this.wrapper.currIdx}},Ant={recoveryEnabled:!0,nodeLocationTracking:`full`,skipValidations:!0,errorMessageProvider:new tY},rY=class extends Q7e{static{Q(this,`ChevrotainWrapper`)}constructor(e,t){let n=t&&`maxLookahead`in t;super(e,{...Ant,lookaheadStrategy:n?new RK({maxLookahead:t.maxLookahead}):new Ont({logging:t.skipValidations?()=>{}:void 0}),...t})}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t,n){return this.RULE(e,t,n)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t,void 0)}wrapSubrule(e,t,n){return this.subrule(e,t,{ARGS:[n]})}wrapOr(e,t){this.or(e,t)}wrapOption(e,t){this.option(e,t)}wrapMany(e,t){this.many(e,t)}wrapAtLeastOne(e,t){this.atLeastOne(e,t)}rule(e){return e.call(this,{})}},jnt=class extends rY{static{Q(this,`ProfilerWrapper`)}constructor(e,t,n){super(e,t),this.task=n}rule(e){this.task.start(),this.task.startSubTask(this.ruleName(e));try{return super.rule(e)}finally{this.task.stopSubTask(this.ruleName(e)),this.task.stop()}}ruleName(e){return e.ruleName}subrule(e,t,n){this.task.startSubTask(this.ruleName(t));try{return super.subrule(e,t,n)}finally{this.task.stopSubTask(this.ruleName(t))}}},Q(hz,`createParser`),Q(D1e,`buildRules`),Q(O1e,`buildInfixRule`),Q(gz,`buildElement`),Q(k1e,`buildAction`),Q(A1e,`buildRuleCall`),Q(j1e,`buildRuleCallPredicate`),Q(_z,`buildPredicate`),Q(M1e,`buildAlternatives`),Q(N1e,`buildUnorderedGroup`),Q(P1e,`buildGroup`),Q(vz,`getGuardCondition`),Q(yz,`buildCrossReference`),Q(F1e,`buildKeyword`),Q(bz,`wrap`),Q(xz,`getRule`),Q(I1e,`getRuleName`),Q(Sz,`getToken`),Q(Cz,`createCompletionParser`),Q(wz,`createLangiumParser`),Q(Tz,`prepareLangiumParser`),iY=class{static{Q(this,`DefaultTokenBuilder`)}constructor(){this.diagnostics=[]}buildTokens(e,t){let n=IF(aL(e,!1)),r=this.buildTerminalTokens(n),i=this.buildKeywordTokens(n,r,t);return i.push(...r),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){let e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(wI).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){let t=TL(e),n=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,r={name:e.name,PATTERN:n};return typeof n==`function`&&(r.LINE_BREAKS=!0),e.hidden&&(r.GROUP=$I(t)?iK.SKIPPED:`hidden`),r}requiresCustomPattern(e){return!!(e.flags.includes(`u`)||e.flags.includes(`s`))}regexPatternFunction(e){let t=new RegExp(e,e.flags+`y`);return(e,n)=>(t.lastIndex=n,t.exec(e))}buildKeywordTokens(e,t,n){return e.filter(ZF).flatMap(e=>UF(e).filter(fI)).distinct(e=>e.value).toArray().sort((e,t)=>t.value.length-e.value.length).map(e=>this.buildKeywordToken(e,t,!!n?.caseInsensitive))}buildKeywordToken(e,t,n){let r=this.buildKeywordPattern(e,n),i={name:e.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(e,t)};return typeof r==`function`&&(i.LINE_BREAKS=!0),i}buildKeywordPattern(e,t){return t?new RegExp(eL(e.value),`i`):e.value}findLongerAlt(e,t){return t.reduce((t,n)=>{let r=n?.PATTERN;return r?.source&&tL(`^`+r.source+`$`,e.value)&&t.push(n),t},[])}},aY=class{static{Q(this,`DefaultValueConverter`)}convert(e,t){let n=t.grammarSource;if(aI(n)&&(n=sL(n)),bI(n)){let r=n.rule.ref;if(!r)throw Error(`This cst node was not parsed by a rule.`);return this.runConverter(r,e,t)}return e}runConverter(e,t,n){switch(e.name.toUpperCase()){case`INT`:return oY.convertInt(t);case`STRING`:return oY.convertString(t);case`ID`:return oY.convertID(t)}switch(wL(e)?.toLowerCase()){case`number`:return oY.convertNumber(t);case`boolean`:return oY.convertBoolean(t);case`bigint`:return oY.convertBigint(t);case`date`:return oY.convertDate(t);default:return t}}},(function(e){function t(e){let t=``;for(let r=1;r<e.length-1;r++){let i=e.charAt(r);if(i===`\\`){let i=e.charAt(++r);t+=n(i)}else t+=i}return t}Q(t,`convertString`),e.convertString=t;function n(e){switch(e){case`b`:return`\b`;case`f`:return`\f`;case`n`:return`1358-`;case`r`:return`\r`;case`t`:return` `;case`v`:return`\v`;case`0`:return`\0`;default:return e}}Q(n,`convertEscapeCharacter`);function r(e){return e.charAt(0)===`^`?e.substring(1):e}Q(r,`convertID`),e.convertID=r;function i(e){return parseInt(e)}Q(i,`convertInt`),e.convertInt=i;function a(e){return BigInt(e)}Q(a,`convertBigint`),e.convertBigint=a;function o(e){return new Date(e)}Q(o,`convertDate`),e.convertDate=o;function s(e){return Number(e)}Q(s,`convertNumber`),e.convertNumber=s;function l(e){return e.toLowerCase()===`true`}Q(l,`convertBoolean`),e.convertBoolean=l})(oY||={}),sY={},mB(sY,hB(XB(),1)),Q(Ez,`delayNextTick`),cY=0,lY=10,Q(Dz,`startCancelableOperation`),Q(Oz,`setInterruptionPeriod`),uY=Symbol(`OperationCancelled`),Q(kz,`isOperationCancelled`),Q(Az,`interruptAndCheck`),dY=class{static{Q(this,`Deferred`)}constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>(e(t),this),this.reject=e=>(t(e),this)})}},fY=class e{static{Q(this,`FullTextDocument`)}constructor(e,t,n,r){this._uri=e,this._languageId=t,this._version=n,this._content=r,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(e){if(e){let t=this.offsetAt(e.start),n=this.offsetAt(e.end);return this._content.substring(t,n)}return this._content}update(t,n){for(let n of t)if(e.isIncremental(n)){let e=Pz(n.range),t=this.offsetAt(e.start),r=this.offsetAt(e.end);this._content=this._content.substring(0,t)+n.text+this._content.substring(r,this._content.length);let i=Math.max(e.start.line,0),a=Math.max(e.end.line,0),o=this._lineOffsets,s=Mz(n.text,!1,t);if(a-i===s.length)for(let e=0,t=s.length;e<t;e++)o[e+i+1]=s[e];else s.length<1e4?o.splice(i+1,a-i,...s):this._lineOffsets=o=o.slice(0,i+1).concat(s,o.slice(a+1));let l=n.text.length-(r-t);if(l!==0)for(let e=i+1+s.length,t=o.length;e<t;e++)o[e]=o[e]+l}else if(e.isFull(n))this._content=n.text,this._lineOffsets=void 0;else throw Error(`Unknown change event received`);this._version=n}getLineOffsets(){return this._lineOffsets===void 0&&(this._lineOffsets=Mz(this._content,!0)),this._lineOffsets}positionAt(e){e=Math.max(Math.min(e,this._content.length),0);let t=this.getLineOffsets(),n=0,r=t.length;if(r===0)return{line:0,character:e};for(;n<r;){let i=Math.floor((n+r)/2);t[i]>e?r=i:n=i+1}let i=n-1;return e=this.ensureBeforeEOL(e,t[i]),{line:i,character:e-t[i]}}offsetAt(e){let t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;let n=t[e.line];if(e.character<=0)return n;let r=e.line+1<t.length?t[e.line+1]:this._content.length,i=Math.min(n+e.character,r);return this.ensureBeforeEOL(i,n)}ensureBeforeEOL(e,t){for(;e>t&&Nz(this._content.charCodeAt(e-1));)e--;return e}get lineCount(){return this.getLineOffsets().length}static isIncremental(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength==`number`)}static isFull(e){let t=e;return t!=null&&typeof t.text==`string`&&t.range===void 0&&t.rangeLength===void 0}},(function(e){function t(e,t,n,r){return new fY(e,t,n,r)}Q(t,`create`),e.create=t;function n(e,t,n){if(e instanceof fY)return e.update(t,n),e;throw Error(`TextDocument.update: document must be created by TextDocument.create`)}Q(n,`update`),e.update=n;function r(e,t){let n=e.getText(),r=jz(t.map(L1e),(e,t)=>{let n=e.range.start.line-t.range.start.line;return n===0?e.range.start.character-t.range.start.character:n}),i=0,a=[];for(let t of r){let r=e.offsetAt(t.range.start);if(r<i)throw Error(`Overlapping edit`);r>i&&a.push(n.substring(i,r)),t.newText.length&&a.push(t.newText),i=e.offsetAt(t.range.end)}return a.push(n.substr(i)),a.join(``)}Q(r,`applyEdits`),e.applyEdits=r})(pY||={}),Q(jz,`mergeSort`),Q(Mz,`computeLineOffsets`),Q(Nz,`isEOL`),Q(Pz,`getWellformedRange`),Q(L1e,`getWellformedEdit`),(()=>{"use strict";var e={975:e=>{function t(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}Q(t,`e`);function n(e,t){for(var n,r=``,i=0,a=-1,o=0,s=0;s<=e.length;++s){if(s<e.length)n=e.charCodeAt(s);else{if(n===47)break;n=47}if(n===47){if(a!==s-1&&o!==1){if(a!==s-1&&o===2){if(r.length<2||i!==2||r.charCodeAt(r.length-1)!==46||r.charCodeAt(r.length-2)!==46){if(r.length>2){var l=r.lastIndexOf(`/`);if(l!==r.length-1){l===-1?(r=``,i=0):i=(r=r.slice(0,l)).length-1-r.lastIndexOf(`/`),a=s,o=0;continue}}else if(r.length===2||r.length===1){r=``,i=0,a=s,o=0;continue}}t&&(r.length>0?r+=`/..`:r=`..`,i=2)}else r.length>0?r+=`/`+e.slice(a+1,s):r=e.slice(a+1,s),i=s-a-1}a=s,o=0}else n===46&&o!==-1?++o:o=-1}return r}Q(n,`r`);var r={resolve:Q(function(){for(var e,r=``,i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o;a>=0?o=arguments[a]:(e===void 0&&(e=process.cwd()),o=e),t(o),o.length!==0&&(r=o+`/`+r,i=o.charCodeAt(0)===47)}return r=n(r,!i),i?r.length>0?`/`+r:`/`:r.length>0?r:`.`},`resolve`),normalize:Q(function(e){if(t(e),e.length===0)return`.`;var r=e.charCodeAt(0)===47,i=e.charCodeAt(e.length-1)===47;return(e=n(e,!r)).length!==0||r||(e=`.`),e.length>0&&i&&(e+=`/`),r?`/`+e:e},`normalize`),isAbsolute:Q(function(e){return t(e),e.length>0&&e.charCodeAt(0)===47},`isAbsolute`),join:Q(function(){if(arguments.length===0)return`.`;for(var e,n=0;n<arguments.length;++n){var i=arguments[n];t(i),i.length>0&&(e===void 0?e=i:e+=`/`+i)}return e===void 0?`.`:r.normalize(e)},`join`),relative:Q(function(e,n){if(t(e),t(n),e===n||(e=r.resolve(e))===(n=r.resolve(n)))return``;for(var i=1;i<e.length&&e.charCodeAt(i)===47;++i);for(var a=e.length,o=a-i,s=1;s<n.length&&n.charCodeAt(s)===47;++s);for(var l=n.length-s,u=o<l?o:l,d=-1,f=0;f<=u;++f){if(f===u){if(l>u){if(n.charCodeAt(s+f)===47)return n.slice(s+f+1);if(f===0)return n.slice(s+f)}else o>u&&(e.charCodeAt(i+f)===47?d=f:f===0&&(d=0));break}var p=e.charCodeAt(i+f);if(p!==n.charCodeAt(s+f))break;p===47&&(d=f)}var m=``;for(f=i+d+1;f<=a;++f)f!==a&&e.charCodeAt(f)!==47||(m.length===0?m+=`..`:m+=`/..`);return m.length>0?m+n.slice(s+d):(s+=d,n.charCodeAt(s)===47&&++s,n.slice(s))},`relative`),_makeLong:Q(function(e){return e},`_makeLong`),dirname:Q(function(e){if(t(e),e.length===0)return`.`;for(var n=e.charCodeAt(0),r=n===47,i=-1,a=!0,o=e.length-1;o>=1;--o)if((n=e.charCodeAt(o))===47){if(!a){i=o;break}}else a=!1;return i===-1?r?`/`:`.`:r&&i===1?`//`:e.slice(0,i)},`dirname`),basename:Q(function(e,n){if(n!==void 0&&typeof n!=`string`)throw TypeError(`"ext" argument must be a string`);t(e);var r,i=0,a=-1,o=!0;if(n!==void 0&&n.length>0&&n.length<=e.length){if(n.length===e.length&&n===e)return``;var s=n.length-1,l=-1;for(r=e.length-1;r>=0;--r){var u=e.charCodeAt(r);if(u===47){if(!o){i=r+1;break}}else l===-1&&(o=!1,l=r+1),s>=0&&(u===n.charCodeAt(s)?--s==-1&&(a=r):(s=-1,a=l))}return i===a?a=l:a===-1&&(a=e.length),e.slice(i,a)}for(r=e.length-1;r>=0;--r)if(e.charCodeAt(r)===47){if(!o){i=r+1;break}}else a===-1&&(o=!1,a=r+1);return a===-1?``:e.slice(i,a)},`basename`),extname:Q(function(e){t(e);for(var n=-1,r=0,i=-1,a=!0,o=0,s=e.length-1;s>=0;--s){var l=e.charCodeAt(s);if(l!==47)i===-1&&(a=!1,i=s+1),l===46?n===-1?n=s:o!==1&&(o=1):n!==-1&&(o=-1);else if(!a){r=s+1;break}}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?``:e.slice(n,i)},`extname`),format:Q(function(e){if(typeof e!=`object`||!e)throw TypeError(`The "pathObject" argument must be of type Object. Received type `+typeof e);return(function(e,t){var n=t.dir||t.root,r=t.base||(t.name||``)+(t.ext||``);return n?n===t.root?n+r:n+`/`+r:r})(0,e)},`format`),parse:Q(function(e){t(e);var n={root:``,dir:``,base:``,ext:``,name:``};if(e.length===0)return n;var r,i=e.charCodeAt(0),a=i===47;a?(n.root=`/`,r=1):r=0;for(var o=-1,s=0,l=-1,u=!0,d=e.length-1,f=0;d>=r;--d)if((i=e.charCodeAt(d))!==47)l===-1&&(u=!1,l=d+1),i===46?o===-1?o=d:f!==1&&(f=1):o!==-1&&(f=-1);else if(!u){s=d+1;break}return o===-1||l===-1||f===0||f===1&&o===l-1&&o===s+1?l!==-1&&(n.base=n.name=s===0&&a?e.slice(1,l):e.slice(s,l)):(s===0&&a?(n.name=e.slice(1,o),n.base=e.slice(1,l)):(n.name=e.slice(s,o),n.base=e.slice(s,l)),n.ext=e.slice(o,l)),s>0?n.dir=e.slice(0,s-1):a&&(n.dir=`/`),n},`parse`),sep:`/`,delimiter:`:`,win32:null,posix:null};r.posix=r,e.exports=r}},t={};function n(r){var i=t[r];if(i!==void 0)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}Q(n,`r`),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{typeof Symbol<`u`&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:`Module`}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:Q(()=>d,`URI`),Utils:Q(()=>w,`Utils`)}),typeof process==`object`?i=process.platform===`win32`:typeof navigator==`object`&&(i=navigator.userAgent.indexOf(`Windows`)>=0);let a=/^\w[\w\d+.-]*$/,o=/^\//,s=/^\/\//;function l(e,t){if(!e.scheme&&t)throw Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${e.authority}", path: "${e.path}", query: "${e.query}", fragment: "${e.fragment}"}`);if(e.scheme&&!a.test(e.scheme))throw Error(`[UriError]: Scheme contains illegal characters.`);if(e.path){if(e.authority){if(!o.test(e.path))throw 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(s.test(e.path))throw Error(`[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")`)}}Q(l,`a`);let u=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{static{Q(this,`l`)}static isUri(e){return e instanceof d||!!e&&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`}scheme;authority;path;query;fragment;constructor(e,t,n,r,i,a=!1){typeof e==`object`?(this.scheme=e.scheme||``,this.authority=e.authority||``,this.path=e.path||``,this.query=e.query||``,this.fragment=e.fragment||``):(this.scheme=(function(e,t){return e||t?e:`file`})(e,a),this.authority=t||``,this.path=(function(e,t){switch(e){case`https`:case`http`:case`file`:t?t[0]!==`/`&&(t=`/`+t):t=`/`}return t})(this.scheme,n||``),this.query=r||``,this.fragment=i||``,l(this,a))}get fsPath(){return _(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:n,path:r,query:i,fragment:a}=e;return t===void 0?t=this.scheme:t===null&&(t=``),n===void 0?n=this.authority:n===null&&(n=``),r===void 0?r=this.path:r===null&&(r=``),i===void 0?i=this.query:i===null&&(i=``),a===void 0?a=this.fragment:a===null&&(a=``),t===this.scheme&&n===this.authority&&r===this.path&&i===this.query&&a===this.fragment?this:new p(t,n,r,i,a)}static parse(e,t=!1){let n=u.exec(e);return n?new p(n[2]||``,x(n[4]||``),x(n[5]||``),x(n[7]||``),x(n[9]||``),t):new p(``,``,``,``,``)}static file(e){let t=``;if(i&&(e=e.replace(/\\/g,`/`)),e[0]===`/`&&e[1]===`/`){let n=e.indexOf(`/`,2);n===-1?(t=e.substring(2),e=`/`):(t=e.substring(2,n),e=e.substring(n)||`/`)}return new p(`file`,t,e,``,``)}static from(e){let t=new p(e.scheme,e.authority,e.path,e.query,e.fragment);return l(t,!0),t}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof d)return e;{let t=new p(e);return t._formatted=e.external,t._fsPath=e._sep===f?e.fsPath:null,t}}return e}}let f=i?1:void 0;class p extends d{static{Q(this,`d`)}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||=_(this,!1),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||=v(this,!1),this._formatted)}toJSON(){let e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=f),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}}let m={58:`%3A`,47:`%2F`,63:`%3F`,35:`%23`,91:`%5B`,93:`%5D`,64:`%40`,33:`%21`,36:`%24`,38:`%26`,39:`%27`,40:`%28`,41:`%29`,42:`%2A`,43:`%2B`,44:`%2C`,59:`%3B`,61:`%3D`,32:`%20`};function h(e,t,n){let r,i=-1;for(let a=0;a<e.length;a++){let o=e.charCodeAt(a);if(o>=97&&o<=122||o>=65&&o<=90||o>=48&&o<=57||o===45||o===46||o===95||o===126||t&&o===47||n&&o===91||n&&o===93||n&&o===58)i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r!==void 0&&(r+=e.charAt(a));else{r===void 0&&(r=e.substr(0,a));let t=m[o];t===void 0?i===-1&&(i=a):(i!==-1&&(r+=encodeURIComponent(e.substring(i,a)),i=-1),r+=t)}}return i!==-1&&(r+=encodeURIComponent(e.substring(i))),r===void 0?e:r}Q(h,`m`);function g(e){let t;for(let n=0;n<e.length;n++){let r=e.charCodeAt(n);r===35||r===63?(t===void 0&&(t=e.substr(0,n)),t+=m[r]):t!==void 0&&(t+=e[n])}return t===void 0?e:t}Q(g,`y`);function _(e,t){let n;return n=e.authority&&e.path.length>1&&e.scheme===`file`?`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?e.path.substr(1):e.path[1].toLowerCase()+e.path.substr(2):e.path,i&&(n=n.replace(/\//g,`\\`)),n}Q(_,`v`);function v(e,t){let n=t?g:h,r=``,{scheme:i,authority:a,path:o,query:s,fragment:l}=e;if(i&&(r+=i,r+=`:`),(a||i===`file`)&&(r+=`/`,r+=`/`),a){let e=a.indexOf(`@`);if(e!==-1){let t=a.substr(0,e);a=a.substr(e+1),e=t.lastIndexOf(`:`),e===-1?r+=n(t,!1,!1):(r+=n(t.substr(0,e),!1,!1),r+=`:`,r+=n(t.substr(e+1),!1,!0)),r+=`@`}a=a.toLowerCase(),e=a.lastIndexOf(`:`),e===-1?r+=n(a,!1,!0):(r+=n(a.substr(0,e),!1,!0),r+=a.substr(e))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){let e=o.charCodeAt(1);e>=65&&e<=90&&(o=`/${String.fromCharCode(e+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){let e=o.charCodeAt(0);e>=65&&e<=90&&(o=`${String.fromCharCode(e+32)}:${o.substr(2)}`)}r+=n(o,!0,!1)}return s&&(r+=`?`,r+=n(s,!1,!1)),l&&(r+=`#`,r+=t?l:h(l,!1,!1)),r}Q(v,`b`);function y(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+y(e.substr(3)):e}}Q(y,`C`);let b=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function x(e){return e.match(b)?e.replace(b,(e=>y(e))):e}Q(x,`w`);var S=n(975);let C=S.posix||S;var w;(function(e){e.joinPath=function(e,...t){return e.with({path:C.join(e.path,...t)})},e.resolvePath=function(e,...t){let n=e.path,r=!1;n[0]!==`/`&&(n=`/`+n,r=!0);let i=C.resolve(n,...t);return r&&i[0]===`/`&&!e.authority&&(i=i.substring(1)),e.with({path:i})},e.dirname=function(e){if(e.path.length===0||e.path===`/`)return e;let t=C.dirname(e.path);return t.length===1&&t.charCodeAt(0)===46&&(t=``),e.with({path:t})},e.basename=function(e){return C.basename(e.path)},e.extname=function(e){return C.extname(e.path)}})(w||={}),Mnt=r})(),{URI:mY,Utils:hY}=Mnt,(function(e){e.basename=hY.basename,e.dirname=hY.dirname,e.extname=hY.extname,e.joinPath=hY.joinPath,e.resolvePath=hY.resolvePath;let t=typeof process==`object`&&process?.platform===`win32`;function n(e,t){return e?.toString()===t?.toString()}Q(n,`equals`),e.equals=n;function r(e,n){let r=typeof e==`string`?mY.parse(e).path:e.path,i=typeof n==`string`?mY.parse(n).path:n.path,a=r.split(`/`).filter(e=>e.length>0),o=i.split(`/`).filter(e=>e.length>0);if(t){let e=/^[A-Z]:$/;if(a[0]&&e.test(a[0])&&(a[0]=a[0].toLowerCase()),o[0]&&e.test(o[0])&&(o[0]=o[0].toLowerCase()),a[0]!==o[0])return i.substring(1)}let s=0;for(;s<a.length&&a[s]===o[s];s++);return`../`.repeat(a.length-s)+o.slice(s).join(`/`)}Q(r,`relative`),e.relative=r;function i(e){return mY.parse(e.toString()).toString()}Q(i,`normalize`),e.normalize=i;function a(e,t){let n=typeof e==`string`?e:e.path,r=typeof t==`string`?t:t.path;return r.charAt(r.length-1)===`/`&&(r=r.slice(0,-1)),n.charAt(n.length-1)===`/`&&(n=n.slice(0,-1)),r===n?!0:r.length<n.length||r.charAt(n.length)!==`/`?!1:r.startsWith(n)}Q(a,`contains`),e.contains=a})(gY||={}),_Y=class{static{Q(this,`UriTrie`)}constructor(){this.root={name:``,children:new Map}}normalizeUri(e){return gY.normalize(e)}clear(){this.root.children.clear()}insert(e,t){let n=this.getNode(this.normalizeUri(e),!0);n.element=t}delete(e){let t=this.getNode(this.normalizeUri(e),!1);t?.parent&&t.parent.children.delete(t.name)}has(e){return this.getNode(this.normalizeUri(e),!1)?.element!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){return this.getNode(this.normalizeUri(e),!1)?.element}findNode(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);if(n)return{name:n.name,uri:gY.joinPath(mY.parse(t),n.name).toString(),element:n.element}}findChildren(e){let t=this.normalizeUri(e),n=this.getNode(t,!1);return n?Array.from(n.children.values()).map(e=>({name:e.name,uri:gY.joinPath(mY.parse(t),e.name).toString(),element:e.element})):[]}all(){return this.collectValues(this.root)}findAll(e){let t=this.getNode(gY.normalize(e),!1);return t?this.collectValues(t):[]}getNode(e,t){let n=e.split(`/`);e.charAt(e.length-1)===`/`&&n.pop();let r=this.root;for(let e of n){let n=r.children.get(e);if(!n){if(t)n={name:e,children:new Map,parent:r},r.children.set(e,n);else return}r=n}return r}collectValues(e){let t=[];e.element&&t.push(e.element);for(let n of e.children.values())t.push(...this.collectValues(n));return t}},(function(e){e[e.Changed=0]=`Changed`,e[e.Parsed=1]=`Parsed`,e[e.IndexedContent=2]=`IndexedContent`,e[e.ComputedScopes=3]=`ComputedScopes`,e[e.Linked=4]=`Linked`,e[e.IndexedReferences=5]=`IndexedReferences`,e[e.Validated=6]=`Validated`})(vY||={}),yY=class{static{Q(this,`DefaultLangiumDocumentFactory`)}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=sY.CancellationToken.None){let n=await this.fileSystemProvider.readFile(e);return this.createAsync(e,n,t)}fromTextDocument(e,t,n){return t??=mY.parse(e.uri),sY.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromString(e,t,n){return sY.CancellationToken.is(n)?this.createAsync(t,e,n):this.create(t,e,n)}fromModel(e,t){return this.create(t,{$model:e})}create(e,t,n){if(typeof t==`string`){let r=this.parse(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}if(`$model`in t){let n={value:t.$model,parserErrors:[],lexerErrors:[]};return this.createLangiumDocument(n,e)}{let r=this.parse(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}async createAsync(e,t,n){if(typeof t==`string`){let r=await this.parseAsync(e,t,n);return this.createLangiumDocument(r,e,void 0,t)}{let r=await this.parseAsync(e,t.getText(),n);return this.createLangiumDocument(r,e,t)}}createLangiumDocument(e,t,n,r){let i;if(n)i={parseResult:e,uri:t,state:vY.Parsed,references:[],textDocument:n};else{let n=this.createTextDocumentGetter(t,r);i={parseResult:e,uri:t,state:vY.Parsed,references:[],get textDocument(){return n()}}}return e.value.$document=i,i}async update(e,t){let n=e.parseResult.value.$cstNode?.root.fullText,r=this.textDocuments?.get(e.uri.toString()),i=r?r.getText():await this.fileSystemProvider.readFile(e.uri);if(r)Object.defineProperty(e,"textDocument",{value:r});else{let t=this.createTextDocumentGetter(e.uri,i);Object.defineProperty(e,"textDocument",{get:t})}return n!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=vY.Parsed,e}parse(e,t,n){return this.serviceRegistry.getServices(e).parser.LangiumParser.parse(t,n)}parseAsync(e,t,n){return this.serviceRegistry.getServices(e).parser.AsyncParser.parse(t,n)}createTextDocumentGetter(e,t){let n=this.serviceRegistry,r;return()=>r??=pY.create(e.toString(),n.getServices(e).LanguageMetaData.languageId,0,t??``)}},bY=class{static{Q(this,`DefaultLangiumDocuments`)}constructor(e){this.documentTrie=new _Y,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return IF(this.documentTrie.all())}addDocument(e){let t=e.uri.toString();if(this.documentTrie.has(t))throw Error(`A document with the URI '${t}' is already present.`);this.documentTrie.insert(t,e)}getDocument(e){let t=e.toString();return this.documentTrie.find(t)}getDocuments(e){let t=e.toString();return this.documentTrie.findAll(t)}async getOrCreateDocument(e,t){let n=this.getDocument(e);return n||(n=await this.langiumDocumentFactory.fromUri(e,t),this.addDocument(n),n)}createDocument(e,t,n){if(n)return this.langiumDocumentFactory.fromString(t,e,n).then(e=>(this.addDocument(e),e));{let n=this.langiumDocumentFactory.fromString(t,e);return this.addDocument(n),n}}hasDocument(e){return this.documentTrie.has(e.toString())}invalidateDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&this.documentBuilder().resetToState(n,vY.Changed),n}deleteDocument(e){let t=e.toString(),n=this.documentTrie.find(t);return n&&(n.state=vY.Changed,this.documentTrie.delete(t)),n}deleteDocuments(e){let t=e.toString(),n=this.documentTrie.findAll(t);for(let e of n)e.state=vY.Changed;return this.documentTrie.delete(t),n}},xY=Symbol(`RefResolving`),SY=class{static{Q(this,`DefaultLinker`)}constructor(e){this.reflection=e.shared.AstReflection,this.langiumDocuments=()=>e.shared.workspace.LangiumDocuments,this.scopeProvider=e.references.ScopeProvider,this.astNodeLocator=e.workspace.AstNodeLocator,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async link(e,t=sY.CancellationToken.None){if(this.profiler?.isActive(`linking`)){let n=this.profiler.createTask(`linking`,this.languageId);n.start();try{for(let r of WF(e.parseResult.value))await Az(t),KF(r).forEach(t=>{let i=`${r.$type}:${t.property}`;n.startSubTask(i);try{this.doLink(t,e)}finally{n.stopSubTask(i)}})}finally{n.stop()}}else for(let n of WF(e.parseResult.value))await Az(t),KF(n).forEach(t=>this.doLink(t,e))}doLink(e,t){let n=e.reference;if(`_ref`in n&&n._ref===void 0){n._ref=xY;try{let t=this.getCandidate(e);jF(t)?n._ref=t:(n._nodeDescription=t,n._ref=this.loadAstNode(t)??this.createLinkingError(e,t))}catch(t){console.error(`An error occurred while resolving reference to '${n.$refText}':`,t);let r=t.message??String(t);n._ref={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${r}`}}t.references.push(n)}else if(`_items`in n&&n._items===void 0){n._items=xY;try{let t=this.getCandidates(e),r=[];if(jF(t))n._linkingError=t;else for(let e of t){let t=this.loadAstNode(e);t&&r.push({ref:t,$nodeDescription:e})}n._items=r}catch(t){n._linkingError={info:e,message:`An error occurred while resolving reference to '${n.$refText}': ${t}`},n._items=[]}t.references.push(n)}}unlink(e){for(let t of e.references)`_ref`in t?(t._ref=void 0,delete t._nodeDescription):`_items`in t&&(t._items=void 0,delete t._linkingError);e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}getCandidates(e){let t=this.scopeProvider.getScope(e).getElements(e.reference.$refText).distinct(e=>`${e.documentUri}#${e.path}`).toArray();return t.length>0?t:this.createLinkingError(e)}buildReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_ref:void 0,get ref(){if(DF(this._ref))return this._ref;if(AF(this._nodeDescription)){let n=i.loadAstNode(this._nodeDescription);this._ref=n??i.createLinkingError({reference:a,container:e,property:t},this._nodeDescription)}else if(this._ref===void 0){this._ref=xY;let n=BF(e).$document,r=i.getLinkedNode({reference:a,container:e,property:t});if(r.error&&n&&n.state<vY.ComputedScopes){this._ref=void 0;return}this._ref=r.node??r.error,this._nodeDescription=r.descr,n?.references.push(this)}else this._ref===xY&&i.throwCyclicReferenceError(e,t,r);return DF(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return jF(this._ref)?this._ref:void 0}};return a}buildMultiReference(e,t,n,r){let i=this,a={$refNode:n,$refText:r,_items:void 0,get items(){if(Array.isArray(this._items))return this._items;if(this._items===void 0){this._items=xY;let n=BF(e).$document,r=i.getCandidates({reference:a,container:e,property:t}),o=[];if(jF(r))this._linkingError=r;else for(let e of r){let t=i.loadAstNode(e);t&&o.push({ref:t,$nodeDescription:e})}this._items=o,n?.references.push(this)}else this._items===xY&&i.throwCyclicReferenceError(e,t,r);return Array.isArray(this._items)?this._items:[]},get error(){if(this._linkingError)return this._linkingError;if(!(this.items.length>0))return this._linkingError=i.createLinkingError({reference:a,container:e,property:t})}};return a}throwCyclicReferenceError(e,t,n){throw Error(`Cyclic reference resolution detected: ${this.astNodeLocator.getAstNodePath(e)}/${t} (symbol '${n}')`)}getLinkedNode(e){try{let t=this.getCandidate(e);if(jF(t))return{error:t};let n=this.loadAstNode(t);return n?{node:n,descr:t}:{descr:t,error:this.createLinkingError(e,t)}}catch(t){console.error(`An error occurred while resolving reference to '${e.reference.$refText}':`,t);let n=t.message??String(t);return{error:{info:e,message:`An error occurred while resolving reference to '${e.reference.$refText}': ${n}`}}}}loadAstNode(e){if(e.node)return e.node;let t=this.langiumDocuments().getDocument(e.documentUri);if(t)return this.astNodeLocator.getAstNode(t.parseResult.value,e.path)}createLinkingError(e,t){let n=BF(e.container).$document;return n&&n.state<vY.ComputedScopes&&console.warn(`Attempted reference resolution before document reached ComputedScopes state (${n.uri}).`),{info:e,message:`Could not resolve reference to ${this.reflection.getReferenceType(e)} named '${e.reference.$refText}'.`,targetDescription:t}}},Q(Fz,`isNamed`),CY=class{static{Q(this,`DefaultNameProvider`)}getName(e){if(Fz(e))return e.name}getNameNode(e){return uL(e.$cstNode,`name`)}},wY=class{static{Q(this,`DefaultReferences`)}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator,this.documents=e.shared.workspace.LangiumDocuments,this.hasMultiReference=WF(e.Grammar).some(e=>aI(e)&&e.isMulti)}findDeclarations(e){if(e){let t=mL(e),n=e.astNode;if(t&&n){let r=n[t.feature];if(OF(r)||kF(r))return VF(r);if(Array.isArray(r)){for(let t of r)if((OF(t)||kF(t))&&t.$refNode&&t.$refNode.offset<=e.offset&&t.$refNode.end>=e.end)return VF(t)}}if(n){let t=this.nameProvider.getNameNode(n);if(t&&(t===e||MI(e,t)))return this.getSelfNodes(n)}}return[]}getSelfNodes(e){if(this.hasMultiReference){let t=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e)),n=this.getNodeFromReferenceDescription(t.head());if(n){for(let t of KF(n))if(kF(t.reference)&&t.reference.items.some(t=>t.ref===e))return t.reference.items.map(e=>e.ref)}return[e]}return[e]}getNodeFromReferenceDescription(e){if(!e)return;let t=this.documents.getDocument(e.sourceUri);if(t)return this.nodeLocator.getAstNode(t.parseResult.value,e.sourcePath)}findDeclarationNodes(e){let t=this.findDeclarations(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e)??e.$cstNode;t&&n.push(t)}return n}findReferences(e,t){let n=[];t.includeDeclaration&&n.push(...this.getSelfReferences(e));let r=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(r=r.filter(e=>gY.equals(e.sourceUri,t.documentUri))),n.push(...r),IF(n)}getSelfReferences(e){let t=this.getSelfNodes(e),n=[];for(let e of t){let t=this.nameProvider.getNameNode(e);if(t){let r=zF(e),i=this.nodeLocator.getAstNodePath(e);n.push({sourceUri:r.uri,sourcePath:i,targetUri:r.uri,targetPath:i,segment:PI(t),local:!0})}}return n}},TY=class{static{Q(this,`MultiMap`)}constructor(e){if(this.map=new Map,e)for(let[t,n]of e)this.add(t,n)}get size(){return fV.sum(IF(this.map.values()).map(e=>e.length))}clear(){this.map.clear()}delete(e,t){if(t===void 0)return this.map.delete(e);{let n=this.map.get(e);if(n){let r=n.indexOf(t);if(r>=0)return n.length===1?this.map.delete(e):n.splice(r,1),!0}return!1}}get(e){return this.map.get(e)??[]}getStream(e){let t=this.map.get(e);return t?IF(t):lV}has(e,t){if(t===void 0)return this.map.has(e);{let n=this.map.get(e);return n?n.indexOf(t)>=0:!1}}add(e,t){return this.map.has(e)?this.map.get(e).push(t):this.map.set(e,[t]),this}addAll(e,t){return this.map.has(e)?this.map.get(e).push(...t):this.map.set(e,Array.from(t)),this}forEach(e){this.map.forEach((t,n)=>t.forEach(t=>e(t,n,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return IF(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return IF(this.map.keys())}values(){return IF(this.map.values()).flat()}entriesGroupedByKey(){return IF(this.map.entries())}},EY=class{static{Q(this,`BiMap`)}get size(){return this.map.size}constructor(e){if(this.map=new Map,this.inverse=new Map,e)for(let[t,n]of e)this.set(t,n)}clear(){this.map.clear(),this.inverse.clear()}set(e,t){return this.map.set(e,t),this.inverse.set(t,e),this}get(e){return this.map.get(e)}getKey(e){return this.inverse.get(e)}delete(e){let t=this.map.get(e);return t!==void 0&&(this.map.delete(e),this.inverse.delete(t),!0)}},DY=class{static{Q(this,`DefaultScopeComputation`)}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,t=sY.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,t)}async collectExportedSymbolsForNode(e,t,n=HF,r=sY.CancellationToken.None){let i=[];this.addExportedSymbol(e,i,t);for(let a of n(e))await Az(r),this.addExportedSymbol(a,i,t);return i}addExportedSymbol(e,t,n){let r=this.nameProvider.getName(e);r&&t.push(this.descriptions.createDescription(e,r,n))}async collectLocalSymbols(e,t=sY.CancellationToken.None){let n=e.parseResult.value,r=new TY;for(let i of UF(n))await Az(t),this.addLocalSymbol(i,e,r);return r}addLocalSymbol(e,t,n){let r=e.$container;if(r){let i=this.nameProvider.getName(e);i&&n.add(r,this.descriptions.createDescription(e,i,t))}}},OY=class{static{Q(this,`StreamScope`)}constructor(e,t,n){this.elements=e,this.outerScope=t,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t):this.elements.find(t=>t.name===e);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.caseInsensitive?this.elements.filter(e=>e.name.toLowerCase()===t):this.elements.filter(t=>t.name===e);return(this.concatOuterScope||n.isEmpty())&&this.outerScope?n.concat(this.outerScope.getElements(e)):n}},Nnt=class{static{Q(this,`MapScope`)}constructor(e,t,n){this.elements=new Map,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.set(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t),r=n?[n]:[];return(this.concatOuterScope||r.length>0)&&this.outerScope?IF(r).concat(this.outerScope.getElements(e)):IF(r)}getAllElements(){let e=IF(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},kY=class{static{Q(this,`MultiMapScope`)}constructor(e,t,n){this.elements=new TY,this.caseInsensitive=n?.caseInsensitive??!1,this.concatOuterScope=n?.concatOuterScope??!0;for(let t of e){let e=this.caseInsensitive?t.name.toLowerCase():t.name;this.elements.add(e,t)}this.outerScope=t}getElement(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t)[0];if(n)return n;if(this.outerScope)return this.outerScope.getElement(e)}getElements(e){let t=this.caseInsensitive?e.toLowerCase():e,n=this.elements.get(t);return(this.concatOuterScope||n.length===0)&&this.outerScope?IF(n).concat(this.outerScope.getElements(e)):IF(n)}getAllElements(){let e=IF(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}},Pnt={getElement(){},getElements(){return lV},getAllElements(){return lV}},AY=class{static{Q(this,`DisposableCache`)}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw Error(`This cache has already been disposed`)}},jY=class extends AY{static{Q(this,`SimpleCache`)}constructor(){super(...arguments),this.cache=new Map}has(e){return this.throwIfDisposed(),this.cache.has(e)}set(e,t){this.throwIfDisposed(),this.cache.set(e,t)}get(e,t){if(this.throwIfDisposed(),this.cache.has(e))return this.cache.get(e);if(t){let n=t();return this.cache.set(e,n),n}}delete(e){return this.throwIfDisposed(),this.cache.delete(e)}clear(){this.throwIfDisposed(),this.cache.clear()}},MY=class extends AY{static{Q(this,`ContextCache`)}constructor(e){super(),this.cache=new Map,this.converter=e??(e=>e)}has(e,t){return this.throwIfDisposed(),this.cacheForContext(e).has(t)}set(e,t,n){this.throwIfDisposed(),this.cacheForContext(e).set(t,n)}get(e,t,n){this.throwIfDisposed();let r=this.cacheForContext(e);if(r.has(t))return r.get(t);if(n){let e=n();return r.set(t,e),e}}delete(e,t){return this.throwIfDisposed(),this.cacheForContext(e).delete(t)}clear(e){if(this.throwIfDisposed(),e){let t=this.converter(e);this.cache.delete(t)}else this.cache.clear()}cacheForContext(e){let t=this.converter(e),n=this.cache.get(t);return n||(n=new Map,this.cache.set(t,n)),n}},NY=class extends MY{static{Q(this,`DocumentCache`)}constructor(e,t){super(e=>e.toString()),t?(this.toDispose.push(e.workspace.DocumentBuilder.onDocumentPhase(t,e=>{this.clear(e.uri.toString())})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{for(let e of t)this.clear(e)}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{let n=e.concat(t);for(let e of n)this.clear(e)}))}},PY=class extends jY{static{Q(this,`WorkspaceCache`)}constructor(e,t){super(),t?(this.toDispose.push(e.workspace.DocumentBuilder.onBuildPhase(t,()=>{this.clear()})),this.toDispose.push(e.workspace.DocumentBuilder.onUpdate((e,t)=>{t.length>0&&this.clear()}))):this.toDispose.push(e.workspace.DocumentBuilder.onUpdate(()=>{this.clear()}))}},FY=class{static{Q(this,`DefaultScopeProvider`)}constructor(e){this.reflection=e.shared.AstReflection,this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider,this.indexManager=e.shared.workspace.IndexManager,this.globalScopeCache=new PY(e.shared)}getScope(e){let t=[],n=this.reflection.getReferenceType(e),r=zF(e.container).localSymbols;if(r){let i=e.container;do r.has(i)&&t.push(r.getStream(i).filter(e=>this.reflection.isSubtype(e.type,n))),i=i.$container;while(i)}let i=this.getGlobalScope(n,e);for(let e=t.length-1;e>=0;e--)i=this.createScope(t[e],i);return i}createScope(e,t,n){return new OY(IF(e),t,n)}createScopeForNodes(e,t,n){return new OY(IF(e).map(e=>{let t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),t,n)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new kY(this.indexManager.allElements(e)))}},Q(Iz,`isAstNodeWithComment`),Q(Lz,`isIntermediateReference`),IY=class{static{Q(this,`DefaultJsonSerializer`)}constructor(e){this.ignoreProperties=new Set([`$container`,`$containerProperty`,`$containerIndex`,`$document`,`$cstNode`]),this.langiumDocuments=e.shared.workspace.LangiumDocuments,this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider,this.commentProvider=e.documentation.CommentProvider}serialize(e,t){let n=t??{},r=t?.replacer,i=Q((e,t)=>this.replacer(e,t,n),`defaultReplacer`),a=r?(e,t)=>r(e,t,i):i;try{return this.currentDocument=zF(e),JSON.stringify(e,a,t?.space)}finally{this.currentDocument=void 0}}deserialize(e,t){let n=t??{},r=JSON.parse(e);return this.linkNode(r,r,n),r}replacer(e,t,{refText:n,sourceText:r,textRegions:i,comments:a,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(OF(t)){let e=t.ref,r=n?t.$refText:void 0;if(e){let t=zF(e),n=``;this.currentDocument&&this.currentDocument!==t&&(n=o?o(t.uri,e):t.uri.toString());let i=this.astNodeLocator.getAstNodePath(e);return{$ref:`${n}#${i}`,$refText:r}}return{$error:t.error?.message??`Could not resolve reference`,$refText:r}}if(kF(t)){let e=n?t.$refText:void 0,r=[];for(let e of t.items){let t=e.ref,n=zF(e.ref),i=``;this.currentDocument&&this.currentDocument!==n&&(i=o?o(n.uri,t):n.uri.toString());let a=this.astNodeLocator.getAstNodePath(t);r.push(`${i}#${a}`)}return{$refs:r,$refText:e}}if(DF(t)){let n;if(i&&(n=this.addAstNodeRegionWithAssignmentsTo({...t}),(!e||t.$document)&&n?.$textRegion&&(n.$textRegion.documentURI=this.currentDocument?.uri.toString())),r&&!e&&(n??={...t},n.$sourceText=t.$cstNode?.text),a){n??={...t};let e=this.commentProvider.getComment(t);e&&(n.$comment=e.replace(/\r/g,``))}return n??t}return t}}addAstNodeRegionWithAssignmentsTo(e){let t=Q(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),`createDocumentSegment`);if(e.$cstNode){let n=e.$textRegion=t(e.$cstNode),r=n.assignments={};return Object.keys(e).filter(e=>!e.startsWith(`$`)).forEach(n=>{let i=lL(e.$cstNode,n).map(t);i.length!==0&&(r[n]=i)}),e}}linkNode(e,t,n,r,i,a){for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let a=0;a<i.length;a++){let o=i[a];Lz(o)?i[a]=this.reviveReference(e,r,t,o,n):DF(o)&&this.linkNode(o,t,n,e,r,a)}else Lz(i)?e[r]=this.reviveReference(e,r,t,i,n):DF(i)&&this.linkNode(i,t,n,e,r);let o=e;o.$container=r,o.$containerProperty=i,o.$containerIndex=a}reviveReference(e,t,n,r,i){let a=r.$refText,o=r.$error,s;if(r.$ref){let e=this.getRefNode(n,r.$ref,i.uriConverter);if(DF(e))return a||=this.nameProvider.getName(e),{$refText:a??``,ref:e};o=e}else if(r.$refs){let e=[];for(let t of r.$refs){let r=this.getRefNode(n,t,i.uriConverter);DF(r)&&e.push({ref:r})}if(e.length===0)s={$refText:a??``,items:e},o??=`Could not resolve multi-reference`;else return{$refText:a??``,items:e}}if(o)return s??={$refText:a??``,ref:void 0},s.error={info:{container:e,property:t,reference:s},message:o},s}getRefNode(e,t,n){try{let r=t.indexOf(`#`);if(r===0)return this.astNodeLocator.getAstNode(e,t.substring(1))||`Could not resolve path: `+t;if(r<0){let e=n?n(t):mY.parse(t),r=this.langiumDocuments.getDocument(e);return r?r.parseResult.value:`Could not find document for URI: `+t}let i=n?n(t.substring(0,r)):mY.parse(t.substring(0,r)),a=this.langiumDocuments.getDocument(i);return a?r===t.length-1?a.parseResult.value:this.astNodeLocator.getAstNode(a.parseResult.value,t.substring(r+1))||`Could not resolve URI: `+t:`Could not find document for URI: `+t}catch(e){return String(e)}}},LY=class{static{Q(this,`DefaultServiceRegistry`)}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){let t=e.LanguageMetaData;for(let n of t.fileExtensions)this.fileExtensionMap.has(n)&&console.warn(`The file extension ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileExtensionMap.set(n,e);if(t.fileNames)for(let n of t.fileNames)this.fileNameMap.has(n)&&console.warn(`The file name ${n} is used by multiple languages. It is now assigned to '${t.languageId}'.`),this.fileNameMap.set(n,e);this.languageIdMap.set(t.languageId,e)}getServices(e){if(this.languageIdMap.size===0)throw Error("The service registry is empty. Use `register` to register the services of a language.");let t=this.textDocuments?.get(e)?.languageId;if(t!==void 0){let e=this.languageIdMap.get(t);if(e)return e}let n=gY.extname(e),r=gY.basename(e),i=this.fileNameMap.get(r)??this.fileExtensionMap.get(n);if(!i)throw Error(t?`The service registry contains no services for the extension '${n}' for language '${t}'.`:`The service registry contains no services for the extension '${n}'.`);return i}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}},Q(Rz,`diagnosticData`),(function(e){e.defaults=[`fast`,`slow`,`built-in`],e.all=e.defaults})(RY||={}),zY=class{static{Q(this,`ValidationRegistry`)}constructor(e){this.entries=new TY,this.knownCategories=new Set(RY.defaults),this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,n=`fast`){if(n===`built-in`)throw Error(`The 'built-in' category is reserved for lexer, parser, and linker errors.`);this.knownCategories.add(n);for(let[r,i]of Object.entries(e)){let e=i;if(Array.isArray(e))for(let i of e){let e={check:this.wrapValidationException(i,t),category:n};this.addEntry(r,e)}else if(typeof e==`function`){let i={check:this.wrapValidationException(e,t),category:n};this.addEntry(r,i)}else WI(e)}}wrapValidationException(e,t){return async(n,r,i)=>{await this.handleException(()=>e.call(t,n,r,i),`An error occurred during validation`,r,n)}}async handleException(e,t,n,r){try{await e()}catch(e){if(kz(e))throw e;console.error(`${t}:`,e),e instanceof Error&&e.stack&&console.error(e.stack),n(`error`,`${t}: ${e instanceof Error?e.message:String(e)}`,{node:r})}}addEntry(e,t){if(e===`AstNode`){this.entries.add(`AstNode`,t);return}for(let n of this.reflection.getAllSubTypes(e))this.entries.add(n,t)}getChecks(e,t){let n=IF(this.entries.get(e)).concat(this.entries.get(`AstNode`));return t&&(n=n.filter(e=>t.includes(e.category))),n.map(e=>e.check)}registerBeforeDocument(e,t=this){this.entriesBefore.push(this.wrapPreparationException(e,`An error occurred during set-up of the validation`,t))}registerAfterDocument(e,t=this){this.entriesAfter.push(this.wrapPreparationException(e,`An error occurred during tear-down of the validation`,t))}wrapPreparationException(e,t,n){return async(r,i,a,o)=>{await this.handleException(()=>e.call(n,r,i,a,o),t,i,r)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}getAllValidationCategories(e){return this.knownCategories}},BY=Object.freeze({validateNode:!0,validateChildren:!0}),VY=class{static{Q(this,`DefaultDocumentValidator`)}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData,this.profiler=e.shared.profilers.LangiumProfiler,this.languageId=e.LanguageMetaData.languageId}async validateDocument(e,t={},n=sY.CancellationToken.None){let r=e.parseResult,i=[];if(await Az(n),(!t.categories||t.categories.includes(`built-in`))&&(this.processLexingErrors(r,i,t),t.stopAfterLexingErrors&&i.some(e=>e.data?.code===HY.LexingError)||(this.processParsingErrors(r,i,t),t.stopAfterParsingErrors&&i.some(e=>e.data?.code===HY.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>e.data?.code===HY.LinkingError))))return i;try{i.push(...await this.validateAst(r.value,t,n))}catch(e){if(kz(e))throw e;console.error(`An error occurred during validation:`,e)}return await Az(n),i}processLexingErrors(e,t,n){let r=[...e.lexerErrors,...e.lexerReport?.diagnostics??[]];for(let e of r){let n=e.severity??`error`,r={severity:Bz(n),range:{start:{line:e.line-1,character:e.column-1},end:{line:e.line-1,character:e.column+e.length-1}},message:e.message,data:Vz(n),source:this.getSource()};t.push(r)}}processParsingErrors(e,t,n){for(let n of e.parserErrors){let e;if(isNaN(n.token.startOffset)){if(`previousToken`in n){let t=n.previousToken;if(isNaN(t.startOffset)){let t={line:0,character:0};e={start:t,end:t}}else{let n={line:t.endLine-1,character:t.endColumn};e={start:n,end:n}}}}else e=NI(n.token);if(e){let r={severity:Bz(`error`),range:e,message:n.message,data:Rz(HY.ParsingError),source:this.getSource()};t.push(r)}}}processLinkingErrors(e,t,n){for(let n of e.references){let e=n.error;if(e){let r={node:e.info.container,range:n.$refNode?.range,property:e.info.property,index:e.info.index,data:{code:HY.LinkingError,containerType:e.info.container.$type,property:e.info.property,refText:e.info.reference.$refText}};t.push(this.toDiagnostic(`error`,e.message,r))}}}async validateAst(e,t,n=sY.CancellationToken.None){let r=[],i=Q((e,t,n)=>{r.push(this.toDiagnostic(e,t,n))},`acceptor`);return await this.validateAstBefore(e,t,i,n),await this.validateAstNodes(e,t,i,n),await this.validateAstAfter(e,t,i,n),r}async validateAstBefore(e,t,n,r=sY.CancellationToken.None){let i=this.validationRegistry.checksBefore;for(let a of i)await Az(r),await a(e,n,t.categories??[],r)}async validateAstNodes(e,t,n,r=sY.CancellationToken.None){if(this.profiler?.isActive(`validating`)){let i=this.profiler.createTask(`validating`,this.languageId);i.start();try{let a=WF(e).iterator();for(let e of a){i.startSubTask(e.$type);let o=this.validateSingleNodeOptions(e,t);if(o.validateNode)try{let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}finally{i.stopSubTask(e.$type)}o.validateChildren||a.prune()}}finally{i.stop()}}else{let i=WF(e).iterator();for(let e of i){await Az(r);let a=this.validateSingleNodeOptions(e,t);if(a.validateNode){let i=this.validationRegistry.getChecks(e.$type,t.categories);for(let t of i)await t(e,n,r)}a.validateChildren||i.prune()}}}validateSingleNodeOptions(e,t){return BY}async validateAstAfter(e,t,n,r=sY.CancellationToken.None){let i=this.validationRegistry.checksAfter;for(let a of i)await Az(r),await a(e,n,t.categories??[],r)}toDiagnostic(e,t,n){return{message:t,range:zz(n),severity:Bz(e),code:n.code,codeDescription:n.codeDescription,tags:n.tags,relatedInformation:n.relatedInformation,data:n.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},Q(zz,`getDiagnosticRange`),Q(Bz,`toDiagnosticSeverity`),Q(Vz,`toDiagnosticData`),(function(e){e.LexingError=`lexing-error`,e.LexingWarning=`lexing-warning`,e.LexingInfo=`lexing-info`,e.LexingHint=`lexing-hint`,e.ParsingError=`parsing-error`,e.LinkingError=`linking-error`})(HY||={}),UY=class{static{Q(this,`DefaultAstNodeDescriptionProvider`)}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,t,n){let r=n??zF(e);t??=this.nameProvider.getName(e);let i=this.astNodeLocator.getAstNodePath(e);if(!t)throw Error(`Node at path ${i} has no name.`);let a,o=Q(()=>a??=PI(this.nameProvider.getNameNode(e)??e.$cstNode),`nameSegmentGetter`);return{node:e,name:t,get nameSegment(){return o()},selectionSegment:PI(e.$cstNode),type:e.$type,documentUri:r.uri,path:i}}},WY=class{static{Q(this,`DefaultReferenceDescriptionProvider`)}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=sY.CancellationToken.None){let n=[],r=e.parseResult.value;for(let e of WF(r))await Az(t),KF(e).forEach(e=>{e.reference.error||n.push(...this.createInfoDescriptions(e))});return n}createInfoDescriptions(e){let t=e.reference;if(t.error||!t.$refNode)return[];let n=[];OF(t)&&t.$nodeDescription?n=[t.$nodeDescription]:kF(t)&&(n=t.items.map(e=>e.$nodeDescription).filter(e=>e!==void 0));let r=zF(e.container).uri,i=this.nodeLocator.getAstNodePath(e.container),a=[],o=PI(t.$refNode);for(let e of n)a.push({sourceUri:r,sourcePath:i,targetUri:e.documentUri,targetPath:e.path,segment:o,local:gY.equals(e.documentUri,r)});return a}},GY=class{static{Q(this,`DefaultAstNodeLocator`)}constructor(){this.segmentSeparator=`/`,this.indexSeparator=`@`}getAstNodePath(e){if(e.$container){let t=this.getAstNodePath(e.$container),n=this.getPathSegment(e);return t+this.segmentSeparator+n}return``}getPathSegment({$containerProperty:e,$containerIndex:t}){if(!e)throw Error(`Missing '$containerProperty' in AST node.`);return t===void 0?e:e+this.indexSeparator+t}getAstNode(e,t){return t.split(this.segmentSeparator).reduce((e,t)=>{if(!e||t.length===0)return e;let n=t.indexOf(this.indexSeparator);if(n>0){let r=t.substring(0,n),i=parseInt(t.substring(n+1));return e[r]?.[i]}return e[t]},e)}},KY={},mB(KY,hB(YB(),1)),qY=class{static{Q(this,`DefaultConfigurationProvider`)}constructor(e){this._ready=new dY,this.onConfigurationSectionUpdateEmitter=new KY.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=e.capabilities.workspace?.configuration??!1}async initialized(e){if(this.workspaceConfig){if(e.register){let t=this.serviceRegistry.all;e.register({section:t.map(e=>this.toSectionName(e.LanguageMetaData.languageId))})}if(e.fetchConfiguration){let t=this.serviceRegistry.all.map(e=>({section:this.toSectionName(e.LanguageMetaData.languageId)})),n=await e.fetchConfiguration(t);t.forEach((e,t)=>{this.updateSectionConfiguration(e.section,n[t])})}}this._ready.resolve()}updateConfiguration(e){typeof e.settings==`object`&&e.settings!==null&&Object.entries(e.settings).forEach(([e,t])=>{this.updateSectionConfiguration(e,t),this.onConfigurationSectionUpdateEmitter.fire({section:e,configuration:t})})}updateSectionConfiguration(e,t){this.settings[e]=t}async getConfiguration(e,t){await this.ready;let n=this.toSectionName(e);if(this.settings[n])return this.settings[n][t]}toSectionName(e){return`${e}`}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}},JY=hB(t4e(),1),(function(e){function t(e){return{dispose:Q(async()=>await e(),`dispose`)}}Q(t,`create`),e.create=t})(YY||={}),XY=class{static{Q(this,`DefaultDocumentBuilder`)}constructor(e){this.updateBuildOptions={validation:{categories:[`built-in`,`fast`]}},this.updateListeners=[],this.buildPhaseListeners=new TY,this.documentPhaseListeners=new TY,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=vY.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.fileSystemProvider=e.workspace.FileSystemProvider,this.workspaceManager=()=>e.workspace.WorkspaceManager,this.serviceRegistry=e.ServiceRegistry}async build(e,t={},n=sY.CancellationToken.None){for(let n of e){let e=n.uri.toString();if(n.state===vY.Validated){if(typeof t.validation==`boolean`&&t.validation)this.resetToState(n,vY.IndexedReferences);else if(typeof t.validation==`object`){let r=this.findMissingValidationCategories(n,t);r.length>0&&(this.buildState.set(e,{completed:!1,options:{validation:{categories:r}},result:this.buildState.get(e)?.result}),n.state=vY.IndexedReferences)}}else this.buildState.delete(e)}this.currentState=vY.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,t,n)}async update(e,t,n=sY.CancellationToken.None){this.currentState=vY.Changed;let r=[];for(let e of t){let t=this.langiumDocuments.deleteDocuments(e);for(let e of t)r.push(e.uri),this.cleanUpDeleted(e)}let i=(await Promise.all(e.map(e=>this.findChangedUris(e)))).flat();for(let e of i){let t=this.langiumDocuments.getDocument(e);t===void 0&&(t=this.langiumDocumentFactory.fromModel({$type:`INVALID`},e),t.state=vY.Changed,this.langiumDocuments.addDocument(t)),this.resetToState(t,vY.Changed)}let a=IF(i).concat(r).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!a.has(e.uri.toString())&&this.shouldRelink(e,a)).forEach(e=>this.resetToState(e,vY.ComputedScopes)),await this.emitUpdate(i,r),await Az(n);let o=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.state<vY.Validated||!this.buildState.get(e.uri.toString())?.completed||this.resultsAreIncomplete(e,this.updateBuildOptions)).toArray());await this.buildDocuments(o,this.updateBuildOptions,n)}resultsAreIncomplete(e,t){return this.findMissingValidationCategories(e,t).length>=1}findMissingValidationCategories(e,t){let n=this.buildState.get(e.uri.toString()),r=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),i=n?.result?.validationChecks?new Set(n?.result?.validationChecks):n?.completed?r:new Set;return IF(t===void 0||t.validation===!0?r:typeof t.validation==`object`?t.validation.categories??r:[]).filter(e=>!i.has(e)).toArray()}async findChangedUris(e){if(this.langiumDocuments.getDocument(e)??this.textDocuments?.get(e))return[e];try{let t=await this.fileSystemProvider.stat(e);if(t.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(t))return[e]}catch{}return[]}async emitUpdate(e,t){await Promise.all(this.updateListeners.map(n=>n(e,t)))}sortDocuments(e){let t=0,n=e.length-1;for(;t<n;){for(;t<e.length&&this.hasTextDocument(e[t]);)t++;for(;n>=0&&!this.hasTextDocument(e[n]);)n--;t<n&&([e[t],e[n]]=[e[n],e[t]])}return e}hasTextDocument(e){return!!this.textDocuments?.get(e.uri)}shouldRelink(e,t){return e.references.some(e=>e.error!==void 0)?!0:this.indexManager.isAffected(e,t)}onUpdate(e){return this.updateListeners.push(e),YY.create(()=>{let t=this.updateListeners.indexOf(e);t>=0&&this.updateListeners.splice(t,1)})}resetToState(e,t){switch(t){case vY.Changed:case vY.Parsed:this.indexManager.removeContent(e.uri);case vY.IndexedContent:e.localSymbols=void 0;case vY.ComputedScopes:this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e);case vY.Linked:this.indexManager.removeReferences(e.uri);case vY.IndexedReferences:e.diagnostics=void 0,this.buildState.delete(e.uri.toString());case vY.Validated:}e.state>t&&(e.state=t)}cleanUpDeleted(e){this.buildState.delete(e.uri.toString()),this.indexManager.remove(e.uri),e.state=vY.Changed}async buildDocuments(e,t,n){this.prepareBuild(e,t),await this.runCancelable(e,vY.Parsed,n,e=>this.langiumDocumentFactory.update(e,n)),await this.runCancelable(e,vY.IndexedContent,n,e=>this.indexManager.updateContent(e,n)),await this.runCancelable(e,vY.ComputedScopes,n,async e=>{e.localSymbols=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectLocalSymbols(e,n)});let r=e.filter(e=>this.shouldLink(e));await this.runCancelable(r,vY.Linked,n,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,n)),await this.runCancelable(r,vY.IndexedReferences,n,e=>this.indexManager.updateReferences(e,n));let i=e.filter(e=>this.shouldValidate(e)?!0:(this.markAsCompleted(e),!1));await this.runCancelable(i,vY.Validated,n,async e=>{await this.validate(e,n),this.markAsCompleted(e)})}markAsCompleted(e){let t=this.buildState.get(e.uri.toString());t&&(t.completed=!0)}prepareBuild(e,t){for(let n of e){let e=n.uri.toString(),r=this.buildState.get(e);(!r||r.completed)&&this.buildState.set(e,{completed:!1,options:t,result:r?.result})}}async runCancelable(e,t,n,r){for(let i of e)i.state<t&&(await Az(n),await r(i),i.state=t,await this.notifyDocumentPhase(i,t,n));let i=e.filter(e=>e.state===t);await this.notifyBuildPhase(i,t,n),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),YY.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),YY.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(e,t,n){let r;return t&&`path`in t?r=t:n=t,n??=sY.CancellationToken.None,r?this.awaitDocumentState(e,r,n):this.awaitBuilderState(e,n)}awaitDocumentState(e,t,n){let r=this.langiumDocuments.getDocument(t);return r?r.state>=e?Promise.resolve(t):n.isCancellationRequested?Promise.reject(uY):this.currentState>=e&&e>r.state?Promise.reject(new JY.ResponseError(JY.LSPErrorCodes.RequestFailed,`Document state of ${t.toString()} is ${vY[r.state]}, requiring ${vY[e]}, but workspace state is already ${vY[this.currentState]}. Returning undefined.`)):new Promise((r,i)=>{let a=this.onDocumentPhase(e,e=>{gY.equals(e.uri,t)&&(a.dispose(),o.dispose(),r(e.uri))}),o=n.onCancellationRequested(()=>{a.dispose(),o.dispose(),i(uY)})}):Promise.reject(new JY.ResponseError(JY.LSPErrorCodes.ServerCancelled,`No document found for URI: ${t.toString()}`))}awaitBuilderState(e,t){return this.currentState>=e?Promise.resolve():t.isCancellationRequested?Promise.reject(uY):new Promise((n,r)=>{let i=this.onBuildPhase(e,()=>{i.dispose(),a.dispose(),n()}),a=t.onCancellationRequested(()=>{i.dispose(),a.dispose(),r(uY)})})}async notifyDocumentPhase(e,t,n){let r=this.documentPhaseListeners.get(t).slice();for(let t of r)try{await Az(n),await t(e,n)}catch(e){if(!kz(e))throw e}}async notifyBuildPhase(e,t,n){if(e.length===0)return;let r=this.buildPhaseListeners.get(t).slice();for(let t of r)await Az(n),await t(e,n)}shouldLink(e){return this.getBuildOptions(e).eagerLinking??!0}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){let n=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,r=this.getBuildOptions(e),i=typeof r.validation==`object`?{...r.validation}:{};i.categories=this.findMissingValidationCategories(e,r);let a=await n.validateDocument(e,i,t);e.diagnostics?e.diagnostics.push(...a):e.diagnostics=a;let o=this.buildState.get(e.uri.toString());o&&(o.result??={},o.result.validationChecks?o.result.validationChecks=IF(o.result.validationChecks).concat(i.categories).distinct().toArray():o.result.validationChecks=[...i.categories])}getBuildOptions(e){return this.buildState.get(e.uri.toString())?.options??{}}},ZY=class{static{Q(this,`DefaultIndexManager`)}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new MY,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let n=zF(e).uri,r=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{gY.equals(e.targetUri,n)&&e.targetPath===t&&r.push(e)})}),IF(r)}allElements(e,t){let n=IF(this.symbolIndex.keys());return t&&(n=n.filter(e=>!t||t.has(e))),n.map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,t){return t?this.symbolByTypeIndex.get(e,t,()=>(this.symbolIndex.get(e)??[]).filter(e=>this.astReflection.isSubtype(e.type,t))):this.symbolIndex.get(e)??[]}remove(e){this.removeContent(e),this.removeReferences(e)}removeContent(e){let t=e.toString();this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t)}removeReferences(e){let t=e.toString();this.referenceIndex.delete(t)}async updateContent(e,t=sY.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.collectExportedSymbols(e,t),r=e.uri.toString();this.symbolIndex.set(r,n),this.symbolByTypeIndex.clear(r)}async updateReferences(e,t=sY.CancellationToken.None){let n=await this.serviceRegistry.getServices(e.uri).workspace.ReferenceDescriptionProvider.createDescriptions(e,t);this.referenceIndex.set(e.uri.toString(),n)}isAffected(e,t){let n=this.referenceIndex.get(e.uri.toString());return n?n.some(e=>!e.local&&t.has(e.targetUri.toString())):!1}},QY=class{static{Q(this,`DefaultWorkspaceManager`)}constructor(e){this.initialBuildOptions={},this._ready=new dY,this.serviceRegistry=e.ServiceRegistry,this.langiumDocuments=e.workspace.LangiumDocuments,this.documentBuilder=e.workspace.DocumentBuilder,this.fileSystemProvider=e.workspace.FileSystemProvider,this.mutex=e.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(e){this.folders=e.workspaceFolders??void 0}initialized(e){return this.mutex.write(e=>this.initializeWorkspace(this.folders??[],e))}async initializeWorkspace(e,t=sY.CancellationToken.None){let n=await this.performStartup(e);await Az(t),await this.documentBuilder.build(n,this.initialBuildOptions,t)}async performStartup(e){let t=[],n=Q(e=>{t.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},`collector`);await this.loadAdditionalDocuments(e,n);let r=[];await Promise.all(e.map(e=>this.getRootFolder(e)).map(async e=>this.traverseFolder(e,r)));let i=IF(r).distinct(e=>e.toString()).filter(e=>!this.langiumDocuments.hasDocument(e));return await this.loadWorkspaceDocuments(i,n),this._ready.resolve(),t}async loadWorkspaceDocuments(e,t){await Promise.all(e.map(async e=>{t(await this.langiumDocuments.getOrCreateDocument(e))}))}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return mY.parse(e.uri)}async traverseFolder(e,t){try{let n=await this.fileSystemProvider.readDirectory(e);await Promise.all(n.map(async e=>{this.shouldIncludeEntry(e)&&(e.isDirectory?await this.traverseFolder(e.uri,t):e.isFile&&t.push(e.uri))}))}catch(t){console.error(`Failure to read directory content of `+e.toString(!0),t)}}async searchFolder(e){let t=[];return await this.traverseFolder(e,t),t}shouldIncludeEntry(e){let t=gY.basename(e.uri);return t.startsWith(`.`)?!1:e.isDirectory?t!==`node_modules`&&t!==`out`:e.isFile?this.serviceRegistry.hasServices(e.uri):!1}},$Y=class{static{Q(this,`DefaultLexerErrorMessageProvider`)}buildUnexpectedCharactersMessage(e,t,n,r,i){return tK.buildUnexpectedCharactersMessage(e,t,n,r,i)}buildUnableToPopLexerModeMessage(e){return tK.buildUnableToPopLexerModeMessage(e)}},eX={mode:`full`},tX=class{static{Q(this,`DefaultLexer`)}constructor(e){this.errorMessageProvider=e.parser.LexerErrorMessageProvider,this.tokenBuilder=e.parser.TokenBuilder;let t=this.tokenBuilder.buildTokens(e.Grammar,{caseInsensitive:e.LanguageMetaData.caseInsensitive});this.tokenTypes=this.toTokenTypeDictionary(t);let n=Wz(t)?Object.values(t):t,r=e.LanguageMetaData.mode===`production`;this.chevrotainLexer=new iK(n,{positionTracking:`full`,skipValidations:r,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=eX){let n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:n.groups.hidden??[],report:this.tokenBuilder.flushLexingReport?.(e)}}toTokenTypeDictionary(e){if(Wz(e))return e;let t=Uz(e)?Object.values(e.modes).flat():e,n={};return t.forEach(e=>n[e.name]=e),n}},Q(Hz,`isTokenTypeArray`),Q(Uz,`isIMultiModeLexerDefinition`),Q(Wz,`isTokenTypeDictionary`),KB(),Q(Gz,`parseJSDoc`),Q(Kz,`isJSDoc`),Q(qz,`getLines`),nX=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Fnt=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,Q(R1e,`tokenize`),Q(z1e,`buildInlineTokens`),Int=/\S/,Lnt=/\s*$/,Q(Jz,`skipWhitespace`),Q(B1e,`lastCharacter`),Q(V1e,`parseJSDocComment`),Q(H1e,`parseJSDocElement`),Q(U1e,`appendEmptyLine`),Q(Yz,`parseJSDocText`),Q(W1e,`parseJSDocInline`),Q(Xz,`parseJSDocTag`),Q(Zz,`parseJSDocLine`),Q(Qz,`normalizeOptions`),Q($z,`normalizeOption`),rX=class{static{Q(this,`JSDocCommentImpl`)}constructor(e,t){this.elements=e,this.range=t}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(e=>`name`in e)}toString(){let e=``;for(let t of this.elements)if(e.length===0)e=t.toString();else{let n=t.toString();e+=eB(e)+n}return e.trim()}toMarkdown(e){let t=``;for(let n of this.elements)if(t.length===0)t=n.toMarkdown(e);else{let r=n.toMarkdown(e);t+=eB(t)+r}return t.trim()}},iX=class{static{Q(this,`JSDocTagImpl`)}constructor(e,t,n,r){this.name=e,this.content=t,this.inline=n,this.range=r}toString(){let e=`@${this.name}`,t=this.content.toString();return this.content.inlines.length===1?e=`${e} ${t}`:this.content.inlines.length>1&&(e=`${e}1359-${t}`),this.inline?`{${e}}`:e}toMarkdown(e){return e?.renderTag?.(this)??this.toMarkdownDefault(e)}toMarkdownDefault(e){let t=this.content.toMarkdown(e);if(this.inline){let n=G1e(this.name,t,e??{});if(typeof n==`string`)return n}let n=``;e?.tag===`italic`||e?.tag===void 0?n=`*`:e?.tag===`bold`?n=`**`:e?.tag===`bold-italic`&&(n=`***`);let r=`${n}@${this.name}${n}`;return this.content.inlines.length===1?r=`${r} \u2014 ${t}`:this.content.inlines.length>1&&(r=`${r}1360-${t}`),this.inline?`{${r}}`:r}},Q(G1e,`renderInlineTag`),Q(K1e,`renderLinkDefault`),aX=class{static{Q(this,`JSDocTextImpl`)}constructor(e,t){this.inlines=e,this.range=t}toString(){let e=``;for(let t=0;t<this.inlines.length;t++){let n=this.inlines[t],r=this.inlines[t+1];e+=n.toString(),r&&r.range.start.line>n.range.start.line&&(e+=`1361-`)}return e}toMarkdown(e){let t=``;for(let n=0;n<this.inlines.length;n++){let r=this.inlines[n],i=this.inlines[n+1];t+=r.toMarkdown(e),i&&i.range.start.line>r.range.start.line&&(t+=`1362-`)}return t}},oX=class{static{Q(this,`JSDocLineImpl`)}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},Q(eB,`fillNewlines`),sX=class{static{Q(this,`JSDocDocumentationProvider`)}constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){let t=this.commentProvider.getComment(e);if(t&&Kz(t))return Gz(t).toMarkdown({renderLink:Q((t,n)=>this.documentationLinkRenderer(e,t,n),`renderLink`),renderTag:Q(t=>this.documentationTagRenderer(e,t),`renderTag`)})}documentationLinkRenderer(e,t,n){let r=this.findNameInLocalSymbols(e,t)??this.findNameInGlobalScope(e,t);if(r&&r.nameSegment){let e=r.nameSegment.range.start.line+1,t=r.nameSegment.range.start.character+1;return`[${n}](${r.documentUri.with({fragment:`L${e},${t}`}).toString()})`}}documentationTagRenderer(e,t){}findNameInLocalSymbols(e,t){let n=zF(e).localSymbols;if(!n)return;let r=e;do{let e=n.getStream(r).find(e=>e.name===t);if(e)return e;r=r.$container}while(r)}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}},cX=class{static{Q(this,`DefaultCommentProvider`)}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Iz(e)?e.$comment:LI(e.$cstNode,this.grammarConfig().multilineCommentRules)?.text}},lX=class{static{Q(this,`DefaultAsyncParser`)}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},Rnt=class{static{Q(this,`AbstractThreadedAsyncParser`)}constructor(e){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=e.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length<this.threadCount;){let e=this.createWorker();e.onReady(()=>{if(this.queue.length>0){let t=this.queue.shift();t&&(e.lock(),t.resolve(e))}}),this.workerPool.push(e)}}async parse(e,t){let n=await this.acquireParserWorker(t),r=new dY,i,a=t.onCancellationRequested(()=>{i=setTimeout(()=>{this.terminateWorker(n)},this.terminationDelay)});return n.parse(e).then(e=>{let t=this.hydrator.hydrate(e);r.resolve(t)}).catch(e=>{r.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),r.promise}terminateWorker(e){e.terminate();let t=this.workerPool.indexOf(e);t>=0&&this.workerPool.splice(t,1)}async acquireParserWorker(e){this.initializeWorkers();for(let e of this.workerPool)if(e.ready)return e.lock(),e;let t=new dY;return e.onCancellationRequested(()=>{let e=this.queue.indexOf(t);e>=0&&this.queue.splice(e,1),t.reject(uY)}),this.queue.push(t),t.promise}},znt=class{static{Q(this,`ParserWorker`)}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,n,r){this.onReadyEmitter=new KY.Emitter,this.deferred=new dY,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=r,t(e=>{let t=e;this.deferred.resolve(t),this.unlock()}),n(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(uY),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(e){if(this._parsing)throw Error(`Parser worker is busy`);return this._parsing=!0,this.deferred=new dY,this.sendMessage(e),this.deferred.promise}},uX=class{static{Q(this,`DefaultWorkspaceLock`)}constructor(){this.previousTokenSource=new sY.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();let t=Dz();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,n=sY.CancellationToken.None){let r=new dY,i={action:t,deferred:r,cancellationToken:n};return e.push(i),this.performNextOperation(),r.promise}async performNextOperation(){if(!this.done)return;let e=[];if(this.writeQueue.length>0)e.push(this.writeQueue.shift());else if(this.readQueue.length>0)e.push(...this.readQueue.splice(0,this.readQueue.length));else return;this.done=!1,await Promise.all(e.map(async({action:e,deferred:t,cancellationToken:n})=>{try{let r=await Promise.resolve().then(()=>e(n));t.resolve(r)}catch(e){kz(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}},dX=class{static{Q(this,`DefaultHydrator`)}constructor(e){this.grammarElementIdMap=new EY,this.tokenTypeIdMap=new EY,this.grammar=e.Grammar,this.lexer=e.parser.Lexer,this.linker=e.references.Linker}dehydrate(e){return{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport?this.dehydrateLexerReport(e.lexerReport):void 0,parserErrors:e.parserErrors.map(e=>({...e,message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){let t=new Map,n=new Map;for(let n of WF(e))t.set(n,{});if(e.$cstNode)for(let t of jI(e.$cstNode))n.set(t,{});return{astNodes:t,cstNodes:n}}dehydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode!==void 0&&(n.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`)){if(Array.isArray(i)){let e=[];n[r]=e;for(let n of i)DF(n)?e.push(this.dehydrateAstNode(n,t)):OF(n)?e.push(this.dehydrateReference(n,t)):e.push(n)}else DF(i)?n[r]=this.dehydrateAstNode(i,t):OF(i)?n[r]=this.dehydrateReference(i,t):i!==void 0&&(n[r]=i)}return n}dehydrateReference(e,t){let n={};return n.$refText=e.$refText,e.$refNode&&(n.$refNode=t.cstNodes.get(e.$refNode)),n}dehydrateCstNode(e,t){let n=t.cstNodes.get(e);return PF(e)?n.fullText=e.fullText:n.grammarSource=this.getGrammarElementId(e.grammarSource),n.hidden=e.hidden,n.astNode=t.astNodes.get(e.astNode),MF(e)?n.content=e.content.map(e=>this.dehydrateCstNode(e,t)):NF(e)&&(n.tokenType=e.tokenType.name,n.offset=e.offset,n.length=e.length,n.startLine=e.range.start.line,n.startColumn=e.range.start.character,n.endLine=e.range.end.line,n.endColumn=e.range.end.character),n}hydrate(e){let t=e.value,n=this.createHydrationContext(t);return`$cstNode`in t&&this.hydrateCstNode(t.$cstNode,n),{lexerErrors:e.lexerErrors,lexerReport:e.lexerReport,parserErrors:e.parserErrors,value:this.hydrateAstNode(t,n)}}createHydrationContext(e){let t=new Map,n=new Map;for(let n of WF(e))t.set(n,{});let r;if(e.$cstNode)for(let t of jI(e.$cstNode)){let e;`fullText`in t?(e=new JJ(t.fullText),r=e):`content`in t?e=new qJ:`tokenType`in t&&(e=this.hydrateCstLeafNode(t)),e&&(n.set(t,e),e.root=r)}return{astNodes:t,cstNodes:n}}hydrateAstNode(e,t){let n=t.astNodes.get(e);n.$type=e.$type,n.$containerIndex=e.$containerIndex,n.$containerProperty=e.$containerProperty,e.$cstNode&&(n.$cstNode=t.cstNodes.get(e.$cstNode));for(let[r,i]of Object.entries(e))if(!r.startsWith(`$`)){if(Array.isArray(i)){let e=[];n[r]=e;for(let a of i)DF(a)?e.push(this.setParent(this.hydrateAstNode(a,t),n)):OF(a)?e.push(this.hydrateReference(a,n,r,t)):e.push(a)}else DF(i)?n[r]=this.setParent(this.hydrateAstNode(i,t),n):OF(i)?n[r]=this.hydrateReference(i,n,r,t):i!==void 0&&(n[r]=i)}return n}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,n,r){return this.linker.buildReference(t,n,r.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,n=0){let r=t.cstNodes.get(e);if(typeof e.grammarSource==`number`&&(r.grammarSource=this.getGrammarElement(e.grammarSource)),r.astNode=t.astNodes.get(e.astNode),MF(r))for(let i of e.content){let e=this.hydrateCstNode(i,t,n++);r.content.push(e)}return r}hydrateCstLeafNode(e){let t=this.getTokenType(e.tokenType),n=e.offset,r=e.length,i=e.startLine,a=e.startColumn,o=e.endLine,s=e.endColumn,l=e.hidden;return new KJ(n,r,{start:{line:i,character:a},end:{line:o,character:s}},t,l)}getTokenType(e){return this.lexer.definition[e]}getGrammarElementId(e){if(e)return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(e)}getGrammarElement(e){return this.grammarElementIdMap.size===0&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(e)}createGrammarElementIdMap(){let e=0;for(let t of WF(this.grammar))XF(t)&&this.grammarElementIdMap.set(t,e++)}},Q(tB,`createDefaultCoreModule`),Q(nB,`createDefaultSharedCoreModule`),(function(e){e.merge=(e,t)=>sB(sB({},e),t)})(Bnt||={}),Q(rB,`inject`),fX=Symbol(`isProxy`),Q(iB,`eagerLoad`),Q(aB,`_inject`),pX=Symbol(),Q(oB,`_resolve`),Q(sB,`_merge`),mX={indentTokenName:`INDENT`,dedentTokenName:`DEDENT`,whitespaceTokenName:`WS`,ignoreIndentationDelimiters:[]},(function(e){e.REGULAR=`indentation-sensitive`,e.IGNORE_INDENTATION=`ignore-indentation`})(hX||={}),gX=class extends iY{static{Q(this,`IndentationAwareTokenBuilder`)}constructor(e=mX){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options={...mX,...e},this.indentTokenType=hR({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=hR({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){let n=super.buildTokens(e,t);if(!Hz(n))throw Error(`Invalid tokens built by default builder`);let{indentTokenName:r,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:o}=this.options,s,l,u,d=[];for(let e of n){for(let[t,n]of o)e.name===t?e.PUSH_MODE=hX.IGNORE_INDENTATION:e.name===n&&(e.POP_MODE=!0);e.name===i?s=e:e.name===r?l=e:e.name===a?u=e:d.push(e)}if(!s||!l||!u)throw Error(`Some indentation/whitespace tokens not found!`);return o.length>0?{modes:{[hX.REGULAR]:[s,l,...d,u],[hX.IGNORE_INDENTATION]:[...d,u]},defaultMode:hX.REGULAR}:[s,l,u,...d]}flushLexingReport(e){return{...super.flushLexingReport(e),remainingDedents:this.flushRemainingDedents(e)}}isStartOfLine(e,t){return t===0||`\r1363-`.includes(e[t-1])}matchWhitespace(e,t,n,r){this.whitespaceRegExp.lastIndex=t;let i=this.whitespaceRegExp.exec(e);return{currIndentLevel:i?.[0].length??0,prevIndentLevel:this.indentationStack.at(-1),match:i}}createIndentationTokenInstance(e,t,n,r){let i=this.getLineNumber(t,r);return gR(e,n,r,r+n.length,i,i,1,n.length)}getLineNumber(e,t){return e.substring(0,t).split(/\r\n|\r|\n/).length}indentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);return i<=a?null:(this.indentationStack.push(i),o)}dedentMatcher(e,t,n,r){if(!this.isStartOfLine(e,t))return null;let{currIndentLevel:i,prevIndentLevel:a,match:o}=this.matchWhitespace(e,t,n,r);if(i>=a)return null;let s=this.indentationStack.lastIndexOf(i);if(s===-1)return this.diagnostics.push({severity:`error`,message:`Invalid dedent level ${i} at offset: ${t}. Current indentation stack: ${this.indentationStack}`,offset:t,length:o?.[0]?.length??0,line:this.getLineNumber(e,t),column:1}),null;let l=this.indentationStack.length-s-1,u=e.substring(0,t).match(/[\r\n]+$/)?.[0].length??1;for(let r=0;r<l;r++){let r=this.createIndentationTokenInstance(this.dedentTokenType,e,``,t-(u-1));n.push(r),this.indentationStack.pop()}return null}buildTerminalToken(e){let t=super.buildTerminalToken(e),{indentTokenName:n,dedentTokenName:r,whitespaceTokenName:i}=this.options;return t.name===n?this.indentTokenType:t.name===r?this.dedentTokenType:t.name===i?hR({name:i,pattern:this.whitespaceRegExp,group:iK.SKIPPED}):t}flushRemainingDedents(e){let t=[];for(;this.indentationStack.length>1;)t.push(this.createIndentationTokenInstance(this.dedentTokenType,e,``,e.length)),this.indentationStack.pop();return this.indentationStack=[0],t}},Vnt=class extends tX{static{Q(this,`IndentationAwareLexer`)}constructor(e){if(super(e),e.parser.TokenBuilder instanceof gX)this.indentationTokenBuilder=e.parser.TokenBuilder;else throw Error(`IndentationAwareLexer requires an accompanying IndentationAwareTokenBuilder`)}tokenize(e,t=eX){let n=super.tokenize(e),r=n.report;t?.mode===`full`&&n.tokens.push(...r.remainingDedents),r.remainingDedents=[];let{indentTokenType:i,dedentTokenType:a}=this.indentationTokenBuilder,o=i.tokenTypeIdx,s=a.tokenTypeIdx,l=[],u=n.tokens.length-1;for(let e=0;e<u;e++){let t=n.tokens[e],r=n.tokens[e+1];if(t.tokenTypeIdx===o&&r.tokenTypeIdx===s){e++;continue}l.push(t)}return u>=0&&l.push(n.tokens[u]),n.tokens=l,n}},_X={},fB(_X,{AstUtils:()=>pV,BiMap:()=>EY,Cancellation:()=>sY,ContextCache:()=>MY,CstUtils:()=>oV,DONE_RESULT:()=>uV,Deferred:()=>dY,Disposable:()=>YY,DisposableCache:()=>AY,DocumentCache:()=>NY,EMPTY_STREAM:()=>lV,ErrorWithLocation:()=>_H,GrammarUtils:()=>gH,MultiMap:()=>TY,OperationCancelled:()=>uY,Reduction:()=>fV,RegExpUtils:()=>vH,SimpleCache:()=>jY,StreamImpl:()=>cV,TreeStreamImpl:()=>dV,URI:()=>mY,UriTrie:()=>_Y,UriUtils:()=>gY,WorkspaceCache:()=>PY,assertCondition:()=>GI,assertUnreachable:()=>WI,delayNextTick:()=>Ez,interruptAndCheck:()=>Az,isOperationCancelled:()=>kz,loadGrammarFromJson:()=>cB,setInterruptionPeriod:()=>Oz,startCancelableOperation:()=>Dz,stream:()=>IF}),mB(_X,KY),vX=class{static{Q(this,`EmptyFileSystemProvider`)}stat(e){throw Error(`No file system is available.`)}statSync(e){throw Error(`No file system is available.`)}async exists(){return!1}existsSync(){return!1}readBinary(){throw Error(`No file system is available.`)}readBinarySync(){throw Error(`No file system is available.`)}readFile(){throw Error(`No file system is available.`)}readFileSync(){throw Error(`No file system is available.`)}async readDirectory(){return[]}readDirectorySync(){return[]}},yX={fileSystemProvider:Q(()=>new vX,`fileSystemProvider`)},Hnt={Grammar:Q(()=>void 0,`Grammar`),LanguageMetaData:Q(()=>({caseInsensitive:!1,fileExtensions:[`.langium`],languageId:`langium`}),`LanguageMetaData`)},Unt={AstReflection:Q(()=>new fH,`AstReflection`)},Q(q1e,`createMinimalGrammarServices`),Q(cB,`loadGrammarFromJson`),mB(aV,_X),Wnt=class{static{Q(this,`DefaultLangiumProfiler`)}constructor(e){this.activeCategories=new Set,this.allCategories=new Set([`validating`,`parsing`,`linking`]),this.activeCategories=e??new Set(this.allCategories),this.records=new TY}isActive(e){return this.activeCategories.has(e)}start(...e){e?e.forEach(e=>this.activeCategories.add(e)):this.activeCategories=new Set(this.allCategories)}stop(...e){e?e.forEach(e=>this.activeCategories.delete(e)):this.activeCategories.clear()}createTask(e,t){if(!this.isActive(e))throw Error(`Category "${e}" is not active.`);return console.log(`Creating profiling task for '${e}.${t}'.`),new bX(t=>this.records.add(e,this.dumpRecord(e,t)),t)}dumpRecord(e,t){console.info(`Task ${e}.${t.identifier} executed in ${t.duration.toFixed(2)}ms and ended at ${t.date.toISOString()}`);let n=[];for(let e of t.entries.keys()){let r=t.entries.get(e),i=r.reduce((e,t)=>e+t);n.push({name:`${t.identifier}.${e}`,count:r.length,duration:i})}let r=t.duration-n.map(e=>e.duration).reduce((e,t)=>e+t,0);n.push({name:t.identifier,count:1,duration:r}),n.sort((e,t)=>t.duration-e.duration);function i(e){return Math.round(100*e)/100}return Q(i,`Round`),console.table(n.map(e=>({Element:e.name,Count:e.count,"Self %":i(100*e.duration/t.duration),"Time (ms)":i(e.duration)}))),t}getRecords(...e){return e.length===0?this.records.values():this.records.entries().filter(t=>e.some(e=>e===t[0])).flatMap(e=>e[1])}},bX=class{static{Q(this,`ProfilingTask`)}constructor(e,t){this.stack=[],this.entries=new TY,this.addRecord=e,this.identifier=t}start(){if(this.startTime!==void 0)throw Error(`Task "${this.identifier}" is already started.`);this.startTime=performance.now()}stop(){if(this.startTime===void 0)throw Error(`Task "${this.identifier}" was not started.`);if(this.stack.length!==0)throw Error(`Task "${this.identifier}" cannot be stopped before sub-task(s): ${this.stack.map(e=>e.id).join(`, `)}.`);let e={identifier:this.identifier,date:new Date,duration:performance.now()-this.startTime,entries:this.entries};this.addRecord(e),this.startTime=void 0,this.entries.clear()}startSubTask(e){this.stack.push({id:e,start:performance.now(),content:0})}stopSubTask(e){let t=this.stack.pop();if(!t)throw Error(`Task "${this.identifier}.${e}" was not started.`);if(t.id!==e)throw Error(`Sub-Task "${t.id}" is not already stopped.`);let n=performance.now()-t.start;this.stack.at(-1)!==void 0&&(this.stack[this.stack.length-1].content+=n);let r=n-t.content;this.entries.add(e,r)}},(e=>{e.Terminals={ARROW_DIRECTION:/L|R|T|B/,ARROW_GROUP:/\{group\}/,ARROW_INTO:/<|>/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ARCH_ICON:/\([\w-:]+\)/,ARCH_TITLE:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/}})(Gnt||={}),(e=>{e.Terminals={DOMAIN_NAME:/complex|complicated|clear|chaotic|confusion/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Knt||={}),(e=>{e.Terminals={EM_ID:/[_a-zA-Z][\w_]*/,EM_FID:/\d{1,3}/,EM_DATA_INLINE:/\{(.*)\}|"(.*)"|'(.*)'/,EM_DATA_BLOCK:/\{[\t ]*\r?\n(?:[\S\s]*?\r?\n)?\}(?:\r?\n|(?!\S))/,EM_ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EM_ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,EM_TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,EM_WS:/\s+/,EM_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EM_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EM_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EM_ML_COMMENT:/\/\*[\s\S]*?\*\//,EM_SL_COMMENT:/\/\/[^\n\r]*/}})(qnt||={}),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,REFERENCE:/\w([-\./\w]*[-\w])?/}})(Jnt||={}),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Ynt||={}),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Xnt||={}),(e=>{e.Terminals={NUMBER_PIE:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Znt||={}),(e=>{e.Terminals={GRATICULE:/circle|polygon/,BOOLEAN:/true|false/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,NUMBER:/(?:[0-9]+\.[0-9]+(?!\.))|(?:0|[1-9][0-9]*(?!\.))/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(Qnt||={}),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ABNF_RULENAME:/[A-Za-z][A-Za-z0-9-]*/,ABNF_STRING:/"[^"]*"/,ABNF_NUMVAL:/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\.[0-9A-Fa-f]+)*/,ABNF_REPEAT:/[0-9]*\*[0-9]*/,ABNF_EXACT_REPEAT:/[0-9]+/,ABNF_WHITESPACE:/[\t \r\n]+/,ABNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,ABNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,ABNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,ABNF_COMMENT:/;[^\n\r]*/}})($nt||={}),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,EBNF_ID:/[A-Z_a-z][\w-]*/,EBNF_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,EBNF_SPECIAL_SEQUENCE:/\?(?=[^?;]*[^?\s;][^?;]*\?)[^?;]*\?/,EBNF_WHITESPACE:/[\t \r\n]+/,EBNF_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,EBNF_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,EBNF_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,EBNF_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//,EBNF_ISO_COMMENT:/\(\*[\s\S]*?\*\)/}})(ert||={}),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,RR_ID:/[A-Z_a-z][\w-]*/,RR_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,RR_WHITESPACE:/[\t \r\n]+/,RR_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,RR_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,RR_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,RR_BLOCK_COMMENT:/\/\*[\s\S]*?\*\//}})(trt||={}),(e=>{e.Terminals={TITLE:/title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,ACC_TITLE:/accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,PEG_ID:/[A-Z_a-z][\w-]*/,PEG_STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,PEG_WHITESPACE:/[\t \r\n]+/,PEG_YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,PEG_DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,PEG_SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/,PEG_LINE_COMMENT:/#[^\n\r]*/}})(nrt||={}),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,TREEMAP_KEYWORD:/treemap-beta|treemap/,CLASS_DEF:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/,STYLE_SEPARATOR:/:::/,SEPARATOR:/:/,COMMA:/,/,INDENTATION:/[ \t]{1,}/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,ID2:/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER2:/[0-9_\.\,]+/,STRING2:/"[^"]*"|'[^']*'/}})(rrt||={}),(e=>{e.Terminals={ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,CLASS_ANNOTATION:/[ \t]+:::[ \t]*[A-Za-z_][\w-]*/,ICON_ANNOTATION:/[ \t]+icon\([\w-]*(?::[\w-]+)?\)/,DESC_ANNOTATION:/[ \t]+##[^\n\r]*/,INDENTATION:/[ \t]{1,}/,QUOTED_NAME:/"[^"]*"|'[^']*'/,WS:/[ \t]+/,ML_COMMENT:/\%\%[^\n]*/,NL:/\r?\n/,BARE_NAME:/(?!:::|icon\(|##)[^ \t\n\r"'](?:(?![ \t]+:::[ \t]*[A-Za-z_]|[ \t]+icon\(|[ \t]+##)[^\n\r])*/}})(irt||={}),(e=>{e.Terminals={WARDLEY_NUMBER:/[0-9]+\.[0-9]+/,ARROW:/->/,LINK_PORT:/\+<>|\+>|\+</,LINK_ARROW:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/,LINK_LABEL:/;[^\n\r]+/,STRATEGY:/build|buy|outsource|market/,KW_WARDLEY:/wardley-beta/,KW_SIZE:/size/,KW_EVOLUTION:/evolution/,KW_ANCHOR:/anchor/,KW_COMPONENT:/component/,KW_LABEL:/label/,KW_INERTIA:/inertia/,KW_EVOLVE:/evolve/,KW_PIPELINE:/pipeline/,KW_NOTE:/note/,KW_ANNOTATIONS:/annotations/,KW_ANNOTATION:/annotation/,KW_ACCELERATOR:/accelerator/,KW_DEACCELERATOR:/deaccelerator/,NAME_WITH_SPACES:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/,WS:/[ \t]+/,ACC_DESCR:/[\t ]*accDescr(?:[\t ]*:([^\n\r]*?(?=%%)|[^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/[\t ]*accTitle[\t ]*:(?:[^\n\r]*?(?=%%)|[^\n\r]*)/,TITLE:/[\t ]*title(?:[\t ][^\n\r]*?(?=%%)|[\t ][^\n\r]*|)/,INT:/0|[1-9][0-9]*(?!\.)/,STRING:/"([^"\\]|\\.)*"|'([^'\\]|\\.)*'/,ID:/[\w]([-\w]*\w)?/,NEWLINE:/\r?\n/,WHITESPACE:/[\t ]+/,YAML:/---[\t ]*\r?\n(?:[\S\s]*?\r?\n)?---(?:\r?\n|(?!\S))/,DIRECTIVE:/[\t ]*%%{[\S\s]*?}%%(?:\r?\n|(?!\S))/,SINGLE_LINE_COMMENT:/[\t ]*%%[^\n\r]*/}})(art||={}),{...Gnt.Terminals,...Knt.Terminals,...qnt.Terminals,...Jnt.Terminals,...Ynt.Terminals,...Xnt.Terminals,...Znt.Terminals,...Qnt.Terminals,...$nt.Terminals,...ert.Terminals,...trt.Terminals,...nrt.Terminals,...irt.Terminals,...rrt.Terminals,...art.Terminals},xX={$type:`AbnfAlternation`,alternatives:`alternatives`},SX={$type:`AbnfConcatenation`,elements:`elements`},CX={$type:`AbnfElement`,primary:`primary`,repeat:`repeat`},wX={$type:`AbnfGroup`,element:`element`},TX={$type:`AbnfNumVal`,value:`value`},EX={$type:`AbnfOptionalGroup`,element:`element`},DX={$type:`AbnfPrimary`},OX={$type:`AbnfRule`,definition:`definition`,name:`name`},kX={$type:`AbnfRuleName`,name:`name`},AX={$type:`AbnfStringLiteral`,value:`value`},jX={$type:`Accelerator`,name:`name`,x:`x`,y:`y`},MX={$type:`Alignment`,direction:`direction`,members:`members`},NX={$type:`Anchor`,evolution:`evolution`,name:`name`,visibility:`visibility`},PX={$type:`Annotation`,number:`number`,text:`text`,x:`x`,y:`y`},FX={$type:`Annotations`,x:`x`,y:`y`},IX={$type:`Architecture`,accDescr:`accDescr`,accTitle:`accTitle`,alignments:`alignments`,edges:`edges`,groups:`groups`,junctions:`junctions`,services:`services`,title:`title`},Q(J1e,`isArchitecture`),LX={$type:`Axis`,label:`label`,name:`name`},RX={$type:`Branch`,name:`name`,order:`order`},Q(Y1e,`isBranch`),zX={$type:`Checkout`,branch:`branch`},BX={$type:`CherryPicking`,id:`id`,parent:`parent`,tags:`tags`},VX={$type:`ClassDefStatement`,className:`className`,styleText:`styleText`},HX={$type:`Commit`,id:`id`,message:`message`,tags:`tags`,type:`type`},Q(X1e,`isCommit`),UX={$type:`Common`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`},WX={$type:`Component`,decorator:`decorator`,evolution:`evolution`,inertia:`inertia`,label:`label`,name:`name`,visibility:`visibility`},GX={$type:`Curve`,entries:`entries`,label:`label`,name:`name`},KX={$type:`Cynefin`,accDescr:`accDescr`,accTitle:`accTitle`,domains:`domains`,title:`title`,transitions:`transitions`},Q(Z1e,`isCynefin`),qX={$type:`Deaccelerator`,name:`name`,x:`x`,y:`y`},JX={$type:`Decorator`,strategy:`strategy`},YX={$type:`Direction`,accDescr:`accDescr`,accTitle:`accTitle`,dir:`dir`,statements:`statements`,title:`title`},XX={$type:`DomainBlock`,domain:`domain`,items:`items`},Q(Q1e,`isDomainBlock`),ZX={$type:`DomainItem`,label:`label`},Q($1e,`isDomainItem`),QX={$type:`EbnfChoice`,alternatives:`alternatives`},$X={$type:`EbnfExceptionPostfix`,except:`except`},eZ={$type:`EbnfGroup`,element:`element`},tZ={$type:`EbnfNonTerminal`,name:`name`},nZ={$type:`EbnfOneOrMorePostfix`,operator:`operator`},rZ={$type:`EbnfOptional`,element:`element`},iZ={$type:`EbnfOptionalPostfix`,operator:`operator`},aZ={$type:`EbnfPostfix`},oZ={$type:`EbnfPrimary`},sZ={$type:`EbnfRepetition`,element:`element`},cZ={$type:`EbnfRule`,definition:`definition`,name:`name`},lZ={$type:`EbnfSequence`,elements:`elements`},uZ={$type:`EbnfSpecial`,text:`text`},dZ={$type:`EbnfTerm`,base:`base`,postfixes:`postfixes`},fZ={$type:`EbnfTerminal`,value:`value`},pZ={$type:`EbnfZeroOrMorePostfix`,operator:`operator`},mZ={$type:`Edge`,lhsDir:`lhsDir`,lhsGroup:`lhsGroup`,lhsId:`lhsId`,lhsInto:`lhsInto`,rhsDir:`rhsDir`,rhsGroup:`rhsGroup`,rhsId:`rhsId`,rhsInto:`rhsInto`,title:`title`},hZ={$type:`EmDataEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,name:`name`},gZ={$type:`EmFrame`},_Z={$type:`EmGwt`,givenStatements:`givenStatements`,sourceFrame:`sourceFrame`,thenStatements:`thenStatements`,whenStatements:`whenStatements`},vZ={$type:`EmGwtStatement`,entityIdentifier:`entityIdentifier`},yZ={$type:`EmModelEntity`,name:`name`},Q(e0e,`isEmModelEntityType`),bZ={$type:`EmNoteEntity`,dataBlockValue:`dataBlockValue`,dataType:`dataType`,sourceFrame:`sourceFrame`},xZ={$type:`EmResetFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`},Q(t0e,`isEmResetFrame`),SZ={$type:`EmTimeFrame`,dataInlineValue:`dataInlineValue`,dataReference:`dataReference`,dataType:`dataType`,entityIdentifier:`entityIdentifier`,modelEntityType:`modelEntityType`,name:`name`,sourceFrames:`sourceFrames`},CZ={$type:`Entry`,axis:`axis`,value:`value`},wZ={$type:`EventModel`,accDescr:`accDescr`,accTitle:`accTitle`,dataEntities:`dataEntities`,frames:`frames`,gwtEntities:`gwtEntities`,modelEntities:`modelEntities`,noteEntities:`noteEntities`,title:`title`},TZ={$type:`Evolution`,stages:`stages`},EZ={$type:`EvolutionStage`,boundary:`boundary`,name:`name`,secondName:`secondName`},DZ={$type:`Evolve`,component:`component`,target:`target`},OZ={$type:`GitGraph`,accDescr:`accDescr`,accTitle:`accTitle`,statements:`statements`,title:`title`},Q(n0e,`isGitGraph`),kZ={$type:`Group`,icon:`icon`,id:`id`,in:`in`,title:`title`},AZ={$type:`Info`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`},Q(r0e,`isInfo`),jZ={$type:`Item`,classSelector:`classSelector`,name:`name`},MZ={$type:`Junction`,id:`id`,in:`in`},NZ={$type:`Label`,negX:`negX`,negY:`negY`,offsetX:`offsetX`,offsetY:`offsetY`},PZ={$type:`Leaf`,classSelector:`classSelector`,name:`name`,value:`value`},FZ={$type:`Link`,arrow:`arrow`,from:`from`,fromPort:`fromPort`,linkLabel:`linkLabel`,to:`to`,toPort:`toPort`},IZ={$type:`Merge`,branch:`branch`,id:`id`,tags:`tags`,type:`type`},Q(i0e,`isMerge`),LZ={$type:`Note`,evolution:`evolution`,text:`text`,visibility:`visibility`},RZ={$type:`Option`,name:`name`,value:`value`},zZ={$type:`Packet`,accDescr:`accDescr`,accTitle:`accTitle`,blocks:`blocks`,title:`title`},Q(a0e,`isPacket`),BZ={$type:`PacketBlock`,bits:`bits`,end:`end`,label:`label`,start:`start`},Q(o0e,`isPacketBlock`),VZ={$type:`PegAny`,dot:`dot`},HZ={$type:`PegGroup`,element:`element`},UZ={$type:`PegIdentifier`,name:`name`},WZ={$type:`PegLiteral`,value:`value`},GZ={$type:`PegOrderedChoice`,alternatives:`alternatives`},KZ={$type:`PegPrefix`,operator:`operator`,suffix:`suffix`},qZ={$type:`PegPrimary`},JZ={$type:`PegRule`,definition:`definition`,name:`name`},YZ={$type:`PegSequence`,elements:`elements`},XZ={$type:`PegSuffix`,operator:`operator`,primary:`primary`},ZZ={$type:`Pie`,accDescr:`accDescr`,accTitle:`accTitle`,sections:`sections`,showData:`showData`,title:`title`},Q(s0e,`isPie`),QZ={$type:`PieSection`,label:`label`,value:`value`},Q(c0e,`isPieSection`),$Z={$type:`Pipeline`,components:`components`,parent:`parent`},eQ={$type:`PipelineComponent`,evolution:`evolution`,label:`label`,name:`name`},tQ={$type:`Radar`,accDescr:`accDescr`,accTitle:`accTitle`,axes:`axes`,curves:`curves`,options:`options`,title:`title`},nQ={$type:`Railroad`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},Q(l0e,`isRailroad`),rQ={$type:`RailroadAbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},Q(u0e,`isRailroadAbnf`),iQ={$type:`RailroadChoiceExpr`,alternatives:`alternatives`},aQ={$type:`RailroadEbnf`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},Q(d0e,`isRailroadEbnf`),oQ={$type:`RailroadExpression`},sQ={$type:`RailroadNonTerminalExpr`,name:`name`},cQ={$type:`RailroadOneOrMoreExpr`,element:`element`},lQ={$type:`RailroadOptionalExpr`,element:`element`},uQ={$type:`RailroadPeg`,accDescr:`accDescr`,accTitle:`accTitle`,rules:`rules`,title:`title`},Q(f0e,`isRailroadPeg`),dQ={$type:`RailroadRule`,definition:`definition`,name:`name`},fQ={$type:`RailroadSequenceExpr`,elements:`elements`},pQ={$type:`RailroadSpecialExpr`,text:`text`},mQ={$type:`RailroadTerminalExpr`,value:`value`},hQ={$type:`RailroadZeroOrMoreExpr`,element:`element`},gQ={$type:`Section`,classSelector:`classSelector`,name:`name`},_Q={$type:`Service`,icon:`icon`,iconText:`iconText`,id:`id`,in:`in`,title:`title`},vQ={$type:`Size`,height:`height`,width:`width`},yQ={$type:`Statement`},bQ={$type:`Transition`,from:`from`,label:`label`,to:`to`},Q(p0e,`isTransition`),xQ={$type:`Treemap`,accDescr:`accDescr`,accTitle:`accTitle`,title:`title`,TreemapRows:`TreemapRows`},Q(m0e,`isTreemap`),SQ={$type:`TreemapRow`,indent:`indent`,item:`item`},CQ={$type:`TreeNode`,classAnnotation:`classAnnotation`,descAnnotation:`descAnnotation`,iconAnnotation:`iconAnnotation`,indent:`indent`,name:`name`},wQ={$type:`TreeView`,accDescr:`accDescr`,accTitle:`accTitle`,nodes:`nodes`,title:`title`},TQ={$type:`Wardley`,accDescr:`accDescr`,accelerators:`accelerators`,accTitle:`accTitle`,anchors:`anchors`,annotation:`annotation`,annotations:`annotations`,components:`components`,deaccelerators:`deaccelerators`,evolution:`evolution`,evolves:`evolves`,links:`links`,notes:`notes`,pipelines:`pipelines`,size:`size`,title:`title`},Q(h0e,`isWardley`),EQ=class extends sV{constructor(){super(...arguments),this.types={AbnfAlternation:{name:xX.$type,properties:{alternatives:{name:xX.alternatives,defaultValue:[]}},superTypes:[]},AbnfConcatenation:{name:SX.$type,properties:{elements:{name:SX.elements,defaultValue:[]}},superTypes:[]},AbnfElement:{name:CX.$type,properties:{primary:{name:CX.primary},repeat:{name:CX.repeat}},superTypes:[]},AbnfGroup:{name:wX.$type,properties:{element:{name:wX.element}},superTypes:[DX.$type]},AbnfNumVal:{name:TX.$type,properties:{value:{name:TX.value}},superTypes:[DX.$type]},AbnfOptionalGroup:{name:EX.$type,properties:{element:{name:EX.element}},superTypes:[DX.$type]},AbnfPrimary:{name:DX.$type,properties:{},superTypes:[]},AbnfRule:{name:OX.$type,properties:{definition:{name:OX.definition},name:{name:OX.name}},superTypes:[]},AbnfRuleName:{name:kX.$type,properties:{name:{name:kX.name}},superTypes:[DX.$type]},AbnfStringLiteral:{name:AX.$type,properties:{value:{name:AX.value}},superTypes:[DX.$type]},Accelerator:{name:jX.$type,properties:{name:{name:jX.name},x:{name:jX.x},y:{name:jX.y}},superTypes:[]},Alignment:{name:MX.$type,properties:{direction:{name:MX.direction},members:{name:MX.members,defaultValue:[]}},superTypes:[]},Anchor:{name:NX.$type,properties:{evolution:{name:NX.evolution},name:{name:NX.name},visibility:{name:NX.visibility}},superTypes:[]},Annotation:{name:PX.$type,properties:{number:{name:PX.number},text:{name:PX.text},x:{name:PX.x},y:{name:PX.y}},superTypes:[]},Annotations:{name:FX.$type,properties:{x:{name:FX.x},y:{name:FX.y}},superTypes:[]},Architecture:{name:IX.$type,properties:{accDescr:{name:IX.accDescr},accTitle:{name:IX.accTitle},alignments:{name:IX.alignments,defaultValue:[]},edges:{name:IX.edges,defaultValue:[]},groups:{name:IX.groups,defaultValue:[]},junctions:{name:IX.junctions,defaultValue:[]},services:{name:IX.services,defaultValue:[]},title:{name:IX.title}},superTypes:[]},Axis:{name:LX.$type,properties:{label:{name:LX.label},name:{name:LX.name}},superTypes:[]},Branch:{name:RX.$type,properties:{name:{name:RX.name},order:{name:RX.order}},superTypes:[yQ.$type]},Checkout:{name:zX.$type,properties:{branch:{name:zX.branch}},superTypes:[yQ.$type]},CherryPicking:{name:BX.$type,properties:{id:{name:BX.id},parent:{name:BX.parent},tags:{name:BX.tags,defaultValue:[]}},superTypes:[yQ.$type]},ClassDefStatement:{name:VX.$type,properties:{className:{name:VX.className},styleText:{name:VX.styleText}},superTypes:[]},Commit:{name:HX.$type,properties:{id:{name:HX.id},message:{name:HX.message},tags:{name:HX.tags,defaultValue:[]},type:{name:HX.type}},superTypes:[yQ.$type]},Common:{name:UX.$type,properties:{accDescr:{name:UX.accDescr},accTitle:{name:UX.accTitle},title:{name:UX.title}},superTypes:[]},Component:{name:WX.$type,properties:{decorator:{name:WX.decorator},evolution:{name:WX.evolution},inertia:{name:WX.inertia,defaultValue:!1},label:{name:WX.label},name:{name:WX.name},visibility:{name:WX.visibility}},superTypes:[]},Curve:{name:GX.$type,properties:{entries:{name:GX.entries,defaultValue:[]},label:{name:GX.label},name:{name:GX.name}},superTypes:[]},Cynefin:{name:KX.$type,properties:{accDescr:{name:KX.accDescr},accTitle:{name:KX.accTitle},domains:{name:KX.domains,defaultValue:[]},title:{name:KX.title},transitions:{name:KX.transitions,defaultValue:[]}},superTypes:[]},Deaccelerator:{name:qX.$type,properties:{name:{name:qX.name},x:{name:qX.x},y:{name:qX.y}},superTypes:[]},Decorator:{name:JX.$type,properties:{strategy:{name:JX.strategy}},superTypes:[]},Direction:{name:YX.$type,properties:{accDescr:{name:YX.accDescr},accTitle:{name:YX.accTitle},dir:{name:YX.dir},statements:{name:YX.statements,defaultValue:[]},title:{name:YX.title}},superTypes:[OZ.$type]},DomainBlock:{name:XX.$type,properties:{domain:{name:XX.domain},items:{name:XX.items,defaultValue:[]}},superTypes:[]},DomainItem:{name:ZX.$type,properties:{label:{name:ZX.label}},superTypes:[]},EbnfChoice:{name:QX.$type,properties:{alternatives:{name:QX.alternatives,defaultValue:[]}},superTypes:[]},EbnfExceptionPostfix:{name:$X.$type,properties:{except:{name:$X.except}},superTypes:[aZ.$type]},EbnfGroup:{name:eZ.$type,properties:{element:{name:eZ.element}},superTypes:[oZ.$type]},EbnfNonTerminal:{name:tZ.$type,properties:{name:{name:tZ.name}},superTypes:[oZ.$type]},EbnfOneOrMorePostfix:{name:nZ.$type,properties:{operator:{name:nZ.operator}},superTypes:[aZ.$type]},EbnfOptional:{name:rZ.$type,properties:{element:{name:rZ.element}},superTypes:[oZ.$type]},EbnfOptionalPostfix:{name:iZ.$type,properties:{operator:{name:iZ.operator}},superTypes:[aZ.$type]},EbnfPostfix:{name:aZ.$type,properties:{},superTypes:[]},EbnfPrimary:{name:oZ.$type,properties:{},superTypes:[]},EbnfRepetition:{name:sZ.$type,properties:{element:{name:sZ.element}},superTypes:[oZ.$type]},EbnfRule:{name:cZ.$type,properties:{definition:{name:cZ.definition},name:{name:cZ.name}},superTypes:[]},EbnfSequence:{name:lZ.$type,properties:{elements:{name:lZ.elements,defaultValue:[]}},superTypes:[]},EbnfSpecial:{name:uZ.$type,properties:{text:{name:uZ.text}},superTypes:[oZ.$type]},EbnfTerm:{name:dZ.$type,properties:{base:{name:dZ.base},postfixes:{name:dZ.postfixes,defaultValue:[]}},superTypes:[]},EbnfTerminal:{name:fZ.$type,properties:{value:{name:fZ.value}},superTypes:[oZ.$type]},EbnfZeroOrMorePostfix:{name:pZ.$type,properties:{operator:{name:pZ.operator}},superTypes:[aZ.$type]},Edge:{name:mZ.$type,properties:{lhsDir:{name:mZ.lhsDir},lhsGroup:{name:mZ.lhsGroup,defaultValue:!1},lhsId:{name:mZ.lhsId},lhsInto:{name:mZ.lhsInto,defaultValue:!1},rhsDir:{name:mZ.rhsDir},rhsGroup:{name:mZ.rhsGroup,defaultValue:!1},rhsId:{name:mZ.rhsId},rhsInto:{name:mZ.rhsInto,defaultValue:!1},title:{name:mZ.title}},superTypes:[]},EmDataEntity:{name:hZ.$type,properties:{dataBlockValue:{name:hZ.dataBlockValue},dataType:{name:hZ.dataType},name:{name:hZ.name}},superTypes:[]},EmFrame:{name:gZ.$type,properties:{},superTypes:[]},EmGwt:{name:_Z.$type,properties:{givenStatements:{name:_Z.givenStatements,defaultValue:[]},sourceFrame:{name:_Z.sourceFrame,referenceType:gZ.$type},thenStatements:{name:_Z.thenStatements,defaultValue:[]},whenStatements:{name:_Z.whenStatements,defaultValue:[]}},superTypes:[]},EmGwtStatement:{name:vZ.$type,properties:{entityIdentifier:{name:vZ.entityIdentifier,referenceType:yZ.$type}},superTypes:[]},EmModelEntity:{name:yZ.$type,properties:{name:{name:yZ.name}},superTypes:[]},EmNoteEntity:{name:bZ.$type,properties:{dataBlockValue:{name:bZ.dataBlockValue},dataType:{name:bZ.dataType},sourceFrame:{name:bZ.sourceFrame,referenceType:gZ.$type}},superTypes:[]},EmResetFrame:{name:xZ.$type,properties:{dataInlineValue:{name:xZ.dataInlineValue},dataReference:{name:xZ.dataReference,referenceType:hZ.$type},dataType:{name:xZ.dataType},entityIdentifier:{name:xZ.entityIdentifier},modelEntityType:{name:xZ.modelEntityType},name:{name:xZ.name},sourceFrames:{name:xZ.sourceFrames,defaultValue:[],referenceType:gZ.$type}},superTypes:[gZ.$type]},EmTimeFrame:{name:SZ.$type,properties:{dataInlineValue:{name:SZ.dataInlineValue},dataReference:{name:SZ.dataReference,referenceType:hZ.$type},dataType:{name:SZ.dataType},entityIdentifier:{name:SZ.entityIdentifier},modelEntityType:{name:SZ.modelEntityType},name:{name:SZ.name},sourceFrames:{name:SZ.sourceFrames,defaultValue:[],referenceType:gZ.$type}},superTypes:[gZ.$type]},Entry:{name:CZ.$type,properties:{axis:{name:CZ.axis,referenceType:LX.$type},value:{name:CZ.value}},superTypes:[]},EventModel:{name:wZ.$type,properties:{accDescr:{name:wZ.accDescr},accTitle:{name:wZ.accTitle},dataEntities:{name:wZ.dataEntities,defaultValue:[]},frames:{name:wZ.frames,defaultValue:[]},gwtEntities:{name:wZ.gwtEntities,defaultValue:[]},modelEntities:{name:wZ.modelEntities,defaultValue:[]},noteEntities:{name:wZ.noteEntities,defaultValue:[]},title:{name:wZ.title}},superTypes:[]},Evolution:{name:TZ.$type,properties:{stages:{name:TZ.stages,defaultValue:[]}},superTypes:[]},EvolutionStage:{name:EZ.$type,properties:{boundary:{name:EZ.boundary},name:{name:EZ.name},secondName:{name:EZ.secondName}},superTypes:[]},Evolve:{name:DZ.$type,properties:{component:{name:DZ.component},target:{name:DZ.target}},superTypes:[]},GitGraph:{name:OZ.$type,properties:{accDescr:{name:OZ.accDescr},accTitle:{name:OZ.accTitle},statements:{name:OZ.statements,defaultValue:[]},title:{name:OZ.title}},superTypes:[]},Group:{name:kZ.$type,properties:{icon:{name:kZ.icon},id:{name:kZ.id},in:{name:kZ.in},title:{name:kZ.title}},superTypes:[]},Info:{name:AZ.$type,properties:{accDescr:{name:AZ.accDescr},accTitle:{name:AZ.accTitle},title:{name:AZ.title}},superTypes:[]},Item:{name:jZ.$type,properties:{classSelector:{name:jZ.classSelector},name:{name:jZ.name}},superTypes:[]},Junction:{name:MZ.$type,properties:{id:{name:MZ.id},in:{name:MZ.in}},superTypes:[]},Label:{name:NZ.$type,properties:{negX:{name:NZ.negX,defaultValue:!1},negY:{name:NZ.negY,defaultValue:!1},offsetX:{name:NZ.offsetX},offsetY:{name:NZ.offsetY}},superTypes:[]},Leaf:{name:PZ.$type,properties:{classSelector:{name:PZ.classSelector},name:{name:PZ.name},value:{name:PZ.value}},superTypes:[jZ.$type]},Link:{name:FZ.$type,properties:{arrow:{name:FZ.arrow},from:{name:FZ.from},fromPort:{name:FZ.fromPort},linkLabel:{name:FZ.linkLabel},to:{name:FZ.to},toPort:{name:FZ.toPort}},superTypes:[]},Merge:{name:IZ.$type,properties:{branch:{name:IZ.branch},id:{name:IZ.id},tags:{name:IZ.tags,defaultValue:[]},type:{name:IZ.type}},superTypes:[yQ.$type]},Note:{name:LZ.$type,properties:{evolution:{name:LZ.evolution},text:{name:LZ.text},visibility:{name:LZ.visibility}},superTypes:[]},Option:{name:RZ.$type,properties:{name:{name:RZ.name},value:{name:RZ.value,defaultValue:!1}},superTypes:[]},Packet:{name:zZ.$type,properties:{accDescr:{name:zZ.accDescr},accTitle:{name:zZ.accTitle},blocks:{name:zZ.blocks,defaultValue:[]},title:{name:zZ.title}},superTypes:[]},PacketBlock:{name:BZ.$type,properties:{bits:{name:BZ.bits},end:{name:BZ.end},label:{name:BZ.label},start:{name:BZ.start}},superTypes:[]},PegAny:{name:VZ.$type,properties:{dot:{name:VZ.dot}},superTypes:[qZ.$type]},PegGroup:{name:HZ.$type,properties:{element:{name:HZ.element}},superTypes:[qZ.$type]},PegIdentifier:{name:UZ.$type,properties:{name:{name:UZ.name}},superTypes:[qZ.$type]},PegLiteral:{name:WZ.$type,properties:{value:{name:WZ.value}},superTypes:[qZ.$type]},PegOrderedChoice:{name:GZ.$type,properties:{alternatives:{name:GZ.alternatives,defaultValue:[]}},superTypes:[]},PegPrefix:{name:KZ.$type,properties:{operator:{name:KZ.operator},suffix:{name:KZ.suffix}},superTypes:[]},PegPrimary:{name:qZ.$type,properties:{},superTypes:[]},PegRule:{name:JZ.$type,properties:{definition:{name:JZ.definition},name:{name:JZ.name}},superTypes:[]},PegSequence:{name:YZ.$type,properties:{elements:{name:YZ.elements,defaultValue:[]}},superTypes:[]},PegSuffix:{name:XZ.$type,properties:{operator:{name:XZ.operator},primary:{name:XZ.primary}},superTypes:[]},Pie:{name:ZZ.$type,properties:{accDescr:{name:ZZ.accDescr},accTitle:{name:ZZ.accTitle},sections:{name:ZZ.sections,defaultValue:[]},showData:{name:ZZ.showData,defaultValue:!1},title:{name:ZZ.title}},superTypes:[]},PieSection:{name:QZ.$type,properties:{label:{name:QZ.label},value:{name:QZ.value}},superTypes:[]},Pipeline:{name:$Z.$type,properties:{components:{name:$Z.components,defaultValue:[]},parent:{name:$Z.parent}},superTypes:[]},PipelineComponent:{name:eQ.$type,properties:{evolution:{name:eQ.evolution},label:{name:eQ.label},name:{name:eQ.name}},superTypes:[]},Radar:{name:tQ.$type,properties:{accDescr:{name:tQ.accDescr},accTitle:{name:tQ.accTitle},axes:{name:tQ.axes,defaultValue:[]},curves:{name:tQ.curves,defaultValue:[]},options:{name:tQ.options,defaultValue:[]},title:{name:tQ.title}},superTypes:[]},Railroad:{name:nQ.$type,properties:{accDescr:{name:nQ.accDescr},accTitle:{name:nQ.accTitle},rules:{name:nQ.rules,defaultValue:[]},title:{name:nQ.title}},superTypes:[]},RailroadAbnf:{name:rQ.$type,properties:{accDescr:{name:rQ.accDescr},accTitle:{name:rQ.accTitle},rules:{name:rQ.rules,defaultValue:[]},title:{name:rQ.title}},superTypes:[]},RailroadChoiceExpr:{name:iQ.$type,properties:{alternatives:{name:iQ.alternatives,defaultValue:[]}},superTypes:[oQ.$type]},RailroadEbnf:{name:aQ.$type,properties:{accDescr:{name:aQ.accDescr},accTitle:{name:aQ.accTitle},rules:{name:aQ.rules,defaultValue:[]},title:{name:aQ.title}},superTypes:[]},RailroadExpression:{name:oQ.$type,properties:{},superTypes:[]},RailroadNonTerminalExpr:{name:sQ.$type,properties:{name:{name:sQ.name}},superTypes:[oQ.$type]},RailroadOneOrMoreExpr:{name:cQ.$type,properties:{element:{name:cQ.element}},superTypes:[oQ.$type]},RailroadOptionalExpr:{name:lQ.$type,properties:{element:{name:lQ.element}},superTypes:[oQ.$type]},RailroadPeg:{name:uQ.$type,properties:{accDescr:{name:uQ.accDescr},accTitle:{name:uQ.accTitle},rules:{name:uQ.rules,defaultValue:[]},title:{name:uQ.title}},superTypes:[]},RailroadRule:{name:dQ.$type,properties:{definition:{name:dQ.definition},name:{name:dQ.name}},superTypes:[]},RailroadSequenceExpr:{name:fQ.$type,properties:{elements:{name:fQ.elements,defaultValue:[]}},superTypes:[oQ.$type]},RailroadSpecialExpr:{name:pQ.$type,properties:{text:{name:pQ.text}},superTypes:[oQ.$type]},RailroadTerminalExpr:{name:mQ.$type,properties:{value:{name:mQ.value}},superTypes:[oQ.$type]},RailroadZeroOrMoreExpr:{name:hQ.$type,properties:{element:{name:hQ.element}},superTypes:[oQ.$type]},Section:{name:gQ.$type,properties:{classSelector:{name:gQ.classSelector},name:{name:gQ.name}},superTypes:[jZ.$type]},Service:{name:_Q.$type,properties:{icon:{name:_Q.icon},iconText:{name:_Q.iconText},id:{name:_Q.id},in:{name:_Q.in},title:{name:_Q.title}},superTypes:[]},Size:{name:vQ.$type,properties:{height:{name:vQ.height},width:{name:vQ.width}},superTypes:[]},Statement:{name:yQ.$type,properties:{},superTypes:[]},Transition:{name:bQ.$type,properties:{from:{name:bQ.from},label:{name:bQ.label},to:{name:bQ.to}},superTypes:[]},TreeNode:{name:CQ.$type,properties:{classAnnotation:{name:CQ.classAnnotation},descAnnotation:{name:CQ.descAnnotation},iconAnnotation:{name:CQ.iconAnnotation},indent:{name:CQ.indent},name:{name:CQ.name}},superTypes:[]},TreeView:{name:wQ.$type,properties:{accDescr:{name:wQ.accDescr},accTitle:{name:wQ.accTitle},nodes:{name:wQ.nodes,defaultValue:[]},title:{name:wQ.title}},superTypes:[]},Treemap:{name:xQ.$type,properties:{accDescr:{name:xQ.accDescr},accTitle:{name:xQ.accTitle},title:{name:xQ.title},TreemapRows:{name:xQ.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:SQ.$type,properties:{indent:{name:SQ.indent},item:{name:SQ.item}},superTypes:[]},Wardley:{name:TQ.$type,properties:{accDescr:{name:TQ.accDescr},accelerators:{name:TQ.accelerators,defaultValue:[]},accTitle:{name:TQ.accTitle},anchors:{name:TQ.anchors,defaultValue:[]},annotation:{name:TQ.annotation,defaultValue:[]},annotations:{name:TQ.annotations,defaultValue:[]},components:{name:TQ.components,defaultValue:[]},deaccelerators:{name:TQ.deaccelerators,defaultValue:[]},evolution:{name:TQ.evolution},evolves:{name:TQ.evolves,defaultValue:[]},links:{name:TQ.links,defaultValue:[]},notes:{name:TQ.notes,defaultValue:[]},pipelines:{name:TQ.pipelines,defaultValue:[]},size:{name:TQ.size},title:{name:TQ.title}},superTypes:[]}}}static{Q(this,`MermaidAstReflection`)}},DQ=new EQ,srt=Q(()=>ort??=cB(`{"$type":"Grammar","isDeclared":true,"name":"ArchitectureGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Architecture","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"architecture-beta"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"groups","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"services","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"junctions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Assignment","feature":"edges","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"alignments","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"LeftPort","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"lhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"RightPort","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"rhsDir","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Keyword","value":":"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Arrow","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Assignment","feature":"lhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"--"},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]}},{"$type":"Keyword","value":"-"}]}]},{"$type":"Assignment","feature":"rhsInto","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Group","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"group"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Service","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"service"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"iconText","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"icon","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Junction","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"junction"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"in"},{"$type":"Assignment","feature":"in","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Edge","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"lhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"lhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Assignment","feature":"rhsId","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"rhsGroup","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Alignment","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"align"},{"$type":"Assignment","feature":"direction","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"row"},{"$type":"Keyword","value":"column"}]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Assignment","feature":"members","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@20"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[(?:\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'|[^\\\\[\\\\]\\\\r\\\\n]+)\\\\]/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`ArchitectureGrammarGrammar`),lrt=Q(()=>crt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"CynefinGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Cynefin","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"cynefin-beta"},{"$type":"Keyword","value":"cynefin-beta:"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"domains","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"transitions","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainBlock","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"domain","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Assignment","feature":"items","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"DomainItem","definition":{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Transition","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":"-->"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"DOMAIN_NAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complex"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"complicated"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"clear"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"chaotic"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"confusion"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`CynefinGrammarGrammar`),drt=Q(()=>urt??=cB('{"$type":"Grammar","isDeclared":true,"name":"EventModeling","interfaces":[{"$type":"Interface","name":"Common","attributes":[{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"rules":[{"$type":"ParserRule","entry":true,"name":"EventModel","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"eventmodeling"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"frames","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"dataEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"noteEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"gwtEntities","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntityType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rmo"},{"$type":"Keyword","value":"readmodel"},{"$type":"Keyword","value":"ui"},{"$type":"Keyword","value":"cmd"},{"$type":"Keyword","value":"command"},{"$type":"Keyword","value":"evt"},{"$type":"Keyword","value":"event"},{"$type":"Keyword","value":"pcr"},{"$type":"Keyword","value":"processor"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataType","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"json"},{"$type":"Keyword","value":"jsobj"},{"$type":"Keyword","value":"figma"},{"$type":"Keyword","value":"salt"},{"$type":"Keyword","value":"uri"},{"$type":"Keyword","value":"md"},{"$type":"Keyword","value":"html"},{"$type":"Keyword","value":"text"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataInline","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataInlineValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"EmDataBlock","definition":{"$type":"Group","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"`"},{"$type":"Assignment","feature":"dataType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Keyword","value":"`"}],"cardinality":"?"},{"$type":"Assignment","feature":"dataBlockValue","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"QualifiedName","dataType":"string","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"."},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmTimeFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"tf"},{"$type":"Keyword","value":"timeframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmResetFrame","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"rf"},{"$type":"Keyword","value":"resetframe"}]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"modelEntityType","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"->>"},{"$type":"Assignment","feature":"sourceFrames","operator":"+=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"[["},{"$type":"Assignment","feature":"dataReference","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@10"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"]]"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmFrame","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmModelEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"entity"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmDataEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"data"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmNoteEntity","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"note"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwt","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"gwt"},{"$type":"Assignment","feature":"sourceFrame","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@8"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":"given"},{"$type":"Assignment","feature":"givenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"},{"$type":"Group","elements":[{"$type":"Keyword","value":"when"},{"$type":"Assignment","feature":"whenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}],"cardinality":"?"},{"$type":"Keyword","value":"then"},{"$type":"Assignment","feature":"thenStatements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"+"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EmGwtStatement","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]},{"$type":"Assignment","feature":"entityIdentifier","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@9"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_EID","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EM_FI","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"EM_ID","definition":{"$type":"RegexToken","regex":"/[_a-zA-Z][\\\\w_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_FID","definition":{"$type":"RegexToken","regex":"/\\\\d{1,3}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_INLINE","definition":{"$type":"RegexToken","regex":"/\\\\{(.*)\\\\}|\\"(.*)\\"|\'(.*)\'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_DATA_BLOCK","definition":{"$type":"RegexToken","regex":"/\\\\{[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?\\\\}(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EM_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EM_WS","definition":{"$type":"RegexToken","regex":"/\\\\s+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EM_SL_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\/[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"imports":[],"types":[]}'),`EventModelingGrammar`),prt=Q(()=>frt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"GitGraphGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"GitGraph","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"Keyword","value":":"}]},{"$type":"Keyword","value":"gitGraph:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"gitGraph"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]},{"$type":"Keyword","value":":"}]}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"Assignment","feature":"statements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Direction","definition":{"$type":"Assignment","feature":"dir","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"LR"},{"$type":"Keyword","value":"TB"},{"$type":"Keyword","value":"BT"}]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Commit","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"commit"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"msg:","cardinality":"?"},{"$type":"Assignment","feature":"message","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Branch","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"branch"},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"order:"},{"$type":"Assignment","feature":"order","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Merge","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"merge"},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"type:"},{"$type":"Assignment","feature":"type","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"NORMAL"},{"$type":"Keyword","value":"REVERSE"},{"$type":"Keyword","value":"HIGHLIGHT"}]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Checkout","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"checkout"},{"$type":"Keyword","value":"switch"}]},{"$type":"Assignment","feature":"branch","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CherryPicking","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"cherry-pick"},{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Keyword","value":"id:"},{"$type":"Assignment","feature":"id","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"tag:"},{"$type":"Assignment","feature":"tags","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"parent:"},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[],"types":[]}`),`GitGraphGrammarGrammar`),hrt=Q(()=>mrt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"InfoGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Info","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"info"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"},{"$type":"Group","elements":[{"$type":"Keyword","value":"showInfo"},{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"*"}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[],"cardinality":"?"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`InfoGrammarGrammar`),_rt=Q(()=>grt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"PacketGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"packet"},{"$type":"Keyword","value":"packet-beta"}]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]},{"$type":"Assignment","feature":"blocks","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PacketBlock","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"start","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"end","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}],"cardinality":"?"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"+"},{"$type":"Assignment","feature":"bits","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}}]}]},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PacketGrammarGrammar`),yrt=Q(()=>vrt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"PieGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"*"},{"$type":"Keyword","value":"pie"},{"$type":"Assignment","feature":"showData","operator":"?=","terminal":{"$type":"Keyword","value":"showData"},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"FLOAT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/-?(0|[1-9][0-9]*)(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER_PIE","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@2"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@3"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@11"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@12"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`PieGrammarGrammar`),xrt=Q(()=>brt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"RadarGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Radar","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":"radar-beta:"},{"$type":"Group","elements":[{"$type":"Keyword","value":"radar-beta"},{"$type":"Keyword","value":":"}]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]},{"$type":"Group","elements":[{"$type":"Keyword","value":"axis"},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"axes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Keyword","value":"curve"},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"curves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"options","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Label","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Axis","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Curve","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[],"cardinality":"?"},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Entries","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"},{"$type":"Assignment","feature":"entries","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}}],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"*"}]}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"DetailedEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"axis","operator":"=","terminal":{"$type":"CrossReference","type":{"$ref":"#/rules@2"},"terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"deprecatedSyntax":false,"isMulti":false}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Option","definition":{"$type":"Alternatives","elements":[{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"showLegend"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"ticks"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"max"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"min"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Keyword","value":"graticule"}},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]}}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}},"isMulti":false}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"types":[]}`),`RadarGrammarGrammar`),Crt=Q(()=>Srt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"RailroadAbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_RULENAME","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Za-z][A-Za-z0-9-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_NUMVAL","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/%[xXdDbB][0-9A-Fa-f]+(?:-[0-9A-Fa-f]+|\\\\.[0-9A-Fa-f]+)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]*\\\\*[0-9]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ABNF_EXACT_REPEAT","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ABNF_COMMENT","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadAbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-abnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfAlternation","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfConcatenation","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfElement","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"repeat","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"?"},{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfStringLiteral","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfNumVal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfRuleName","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"AbnfOptionalGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadAbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfAlternation","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfConcatenation","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfElement","attributes":[{"$type":"TypeAttribute","name":"repeat","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"AbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"AbnfStringLiteral","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfNumVal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfRuleName","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"AbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"AbnfOptionalGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadAbnfGrammarGrammar`),Trt=Q(()=>wrt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"RailroadEbnfGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"EBNF_SPECIAL_SEQUENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\?(?=[^?;]*[^?\\\\s;][^?;]*\\\\?)[^?;]*\\\\?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"EBNF_ISO_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\(\\\\*[\\\\s\\\\S]*?\\\\*\\\\)/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadEbnf","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-ebnf-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Keyword","value":"="},{"$type":"Keyword","value":"::="}]},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"|"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":",","cardinality":"?"},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerm","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"base","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"postfixes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]},"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPrimary","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfTerminal","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfNonTerminal","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfSpecial","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfGroup","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptional","returnType":{"$ref":"#/interfaces@11"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfRepetition","returnType":{"$ref":"#/interfaces@12"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"{"},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Keyword","value":"}"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfPostfix","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOptionalPostfix","returnType":{"$ref":"#/interfaces@13"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfZeroOrMorePostfix","returnType":{"$ref":"#/interfaces@14"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfOneOrMorePostfix","returnType":{"$ref":"#/interfaces@15"},"definition":{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EbnfExceptionPostfix","returnType":{"$ref":"#/interfaces@16"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"-"},{"$type":"Assignment","feature":"except","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadEbnf","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfTerm","attributes":[{"$type":"TypeAttribute","name":"base","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false},{"$type":"TypeAttribute","name":"postfixes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"EbnfPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfPostfix","attributes":[],"superTypes":[]},{"$type":"Interface","name":"EbnfTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfNonTerminal","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfSpecial","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfGroup","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptional","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfRepetition","superTypes":[{"$ref":"#/interfaces@5"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"EbnfOptionalPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfZeroOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfOneOrMorePostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"operator","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"EbnfExceptionPostfix","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"except","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadEbnfGrammarGrammar`),Drt=Q(()=>Ert??=cB(`{"$type":"Grammar","isDeclared":true,"name":"RailroadGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"RR_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"RR_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"RR_BLOCK_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\/\\\\*[\\\\s\\\\S]*?\\\\*\\\\//","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"Railroad","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"="},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadExpression","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSequenceExpr","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"sequence"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadChoiceExpr","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"choice"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}}],"cardinality":"*"},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOptionalExpr","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"optional"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadOneOrMoreExpr","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"oneOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadZeroOrMoreExpr","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"zeroOrMore"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadTerminalExpr","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"terminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadNonTerminalExpr","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"nonterminal"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"RailroadSpecialExpr","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"special"},{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"Railroad","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"RailroadExpression","attributes":[],"superTypes":[]},{"$type":"Interface","name":"RailroadSequenceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadChoiceExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOptionalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadOneOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadZeroOrMoreExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"RailroadTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadNonTerminalExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"RailroadSpecialExpr","superTypes":[{"$ref":"#/interfaces@2"}],"attributes":[{"$type":"TypeAttribute","name":"text","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadGrammarGrammar`),krt=Q(()=>Ort??=cB(`{"$type":"Grammar","isDeclared":true,"name":"RailroadPegGrammar","rules":[{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[A-Z_a-z][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"PEG_STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t \\\\r\\\\n]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"PEG_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/#[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false},{"$type":"ParserRule","entry":true,"name":"RailroadPeg","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"railroad-peg-beta"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"*"},{"$type":"Assignment","feature":"rules","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegRule","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Keyword","value":"<-"},{"$type":"Assignment","feature":"definition","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":";"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegOrderedChoice","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"alternatives","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSequence","returnType":{"$ref":"#/interfaces@3"},"definition":{"$type":"Assignment","feature":"elements","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"+"},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrefix","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"&"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"!"}}],"cardinality":"?"},{"$type":"Assignment","feature":"suffix","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegSuffix","returnType":{"$ref":"#/interfaces@5"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"primary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"?"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"*"}},{"$type":"Assignment","feature":"operator","operator":"=","terminal":{"$type":"Keyword","value":"+"}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegPrimary","returnType":{"$ref":"#/interfaces@6"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegLiteral","returnType":{"$ref":"#/interfaces@7"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegIdentifier","returnType":{"$ref":"#/interfaces@8"},"definition":{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegGroup","returnType":{"$ref":"#/interfaces@9"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"element","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PegAny","returnType":{"$ref":"#/interfaces@10"},"definition":{"$type":"Assignment","feature":"dot","operator":"=","terminal":{"$type":"Keyword","value":"."}},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"RailroadPeg","attributes":[{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"rules","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@1"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegRule","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"definition","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegOrderedChoice","attributes":[{"$type":"TypeAttribute","name":"alternatives","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@3"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSequence","attributes":[{"$type":"TypeAttribute","name":"elements","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@4"}}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegPrefix","attributes":[{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"suffix","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@5"}},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"PegSuffix","attributes":[{"$type":"TypeAttribute","name":"primary","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@6"}},"isOptional":false},{"$type":"TypeAttribute","name":"operator","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"PegPrimary","attributes":[],"superTypes":[]},{"$type":"Interface","name":"PegLiteral","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegIdentifier","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]},{"$type":"Interface","name":"PegGroup","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"element","type":{"$type":"SimpleType","typeRef":{"$ref":"#/interfaces@2"}},"isOptional":false}]},{"$type":"Interface","name":"PegAny","superTypes":[{"$ref":"#/interfaces@6"}],"attributes":[{"$type":"TypeAttribute","name":"dot","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}]}],"imports":[],"types":[]}`),`RailroadPegGrammarGrammar`),jrt=Q(()=>Art??=cB(`{"$type":"Grammar","isDeclared":true,"name":"TreemapGrammar","rules":[{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"Treemap","returnType":{"$ref":"#/interfaces@4"},"definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]},{"$type":"Assignment","feature":"TreemapRows","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"CLASS_DEF","definition":{"$type":"RegexToken","regex":"/classDef\\\\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\\\\s+([^;\\\\r\\\\n]*))?(?:;)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Section","returnType":{"$ref":"#/interfaces@1"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Leaf","returnType":{"$ref":"#/interfaces@2"},"definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},{"$type":"Assignment","feature":"classSelector","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false}],"interfaces":[{"$type":"Interface","name":"Item","attributes":[{"$type":"TypeAttribute","name":"name","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"classSelector","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]},{"$type":"Interface","name":"Section","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[]},{"$type":"Interface","name":"Leaf","superTypes":[{"$ref":"#/interfaces@0"}],"attributes":[{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}]},{"$type":"Interface","name":"ClassDefStatement","attributes":[{"$type":"TypeAttribute","name":"className","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false},{"$type":"TypeAttribute","name":"styleText","type":{"$type":"SimpleType","primitiveType":"string"},"isOptional":false}],"superTypes":[]},{"$type":"Interface","name":"Treemap","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@15"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * Treemap grammar for Langium\\n * Converted from mindmap grammar\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treemap keyword, allowing for empty lines and comments before the\\n * treemap declaration.\\n */"}`),`TreemapGrammarGrammar`),Nrt=Q(()=>Mrt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"TreeViewGrammar","rules":[{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreeView","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"treeView-beta"},{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[],"cardinality":"?"},{"$type":"Assignment","feature":"nodes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]},"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@0"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"CLASS_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+:::[ \\\\t]*[A-Za-z_][\\\\w-]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ICON_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+icon\\\\([\\\\w-]*(?::[\\\\w-]+)?\\\\)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"DESC_ANNOTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+##[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"QUOTED_NAME","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","name":"BARE_NAME","definition":{"$type":"RegexToken","regex":"/(?!:::|icon\\\\(|##)[^ \\\\t\\\\n\\\\r\\"'](?:(?![ \\\\t]+:::[ \\\\t]*[A-Za-z_]|[ \\\\t]+icon\\\\(|[ \\\\t]+##)[^\\\\n\\\\r])*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"TreeNode","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}}]},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"classAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"iconAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"descAnnotation","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]}}],"cardinality":"*"}]},"entry":false,"fragment":false,"parameters":[]}],"interfaces":[{"$type":"Interface","name":"TreeView","attributes":[{"$type":"TypeAttribute","name":"nodes","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"isOptional":false},{"$type":"TypeAttribute","name":"title","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accTitle","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}},{"$type":"TypeAttribute","name":"accDescr","isOptional":true,"type":{"$type":"SimpleType","primitiveType":"string"}}],"superTypes":[]}],"imports":[],"types":[],"$comment":"/**\\n * TreeView grammar for Langium\\n *\\n * Supports both quoted labels (\\"my file\\") and bare labels (index.js).\\n * Annotations (:::class, icon(), ## description) are parsed directly into\\n * AST fields by the grammar. Value conversion for stripping quotes, extracting\\n * class names, icon names, and description text happens in valueConverter.ts.\\n *\\n * The ML_COMMENT and NL hidden terminals handle whitespace, comments, and newlines\\n * before the treeView keyword, allowing for empty lines and comments before the\\n * treeView declaration.\\n */"}`),`TreeViewGrammarGrammar`),Frt=Q(()=>Prt??=cB(`{"$type":"Grammar","isDeclared":true,"name":"WardleyGrammar","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Wardley","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"*"},{"$type":"RuleCall","rule":{"$ref":"#/rules@25"},"arguments":[]},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@42"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}],"cardinality":"*"}]},"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"Statement","definition":{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"size","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@3"},"arguments":[]}},{"$type":"Assignment","feature":"anchors","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@5"},"arguments":[]}},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@6"},"arguments":[]}},{"$type":"Assignment","feature":"links","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]}},{"$type":"Assignment","feature":"evolves","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"Assignment","feature":"pipelines","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Assignment","feature":"notes","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}},{"$type":"Assignment","feature":"annotations","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@14"},"arguments":[]}},{"$type":"Assignment","feature":"annotation","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}},{"$type":"Assignment","feature":"accelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},{"$type":"Assignment","feature":"deaccelerators","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]}}]},"entry":false,"parameters":[]},{"$type":"ParserRule","name":"Size","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@26"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"width","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"height","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolution","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@27"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]},{"$type":"Assignment","feature":"stages","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@4"},"arguments":[]}}],"cardinality":"+"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"EvolutionStage","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"@"},{"$type":"Assignment","feature":"boundary","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}}],"cardinality":"?"},{"$type":"Group","elements":[{"$type":"Keyword","value":"/"},{"$type":"Assignment","feature":"secondName","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}}],"cardinality":"?"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Anchor","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@28"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Component","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"decorator","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@8"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"inertia","operator":"?=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@31"},"arguments":[]}},{"$type":"Keyword","value":")"}]}],"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Label","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@30"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"negX","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetX","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"negY","operator":"?=","terminal":{"$type":"Keyword","value":"-"},"cardinality":"?"},{"$type":"Assignment","feature":"offsetY","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":"]"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Decorator","definition":{"$type":"Group","elements":[{"$type":"Keyword","value":"("},{"$type":"Assignment","feature":"strategy","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@24"},"arguments":[]}},{"$type":"Keyword","value":")"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Link","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"from","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"fromPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"arrow","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@22"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[]}]},"cardinality":"?"},{"$type":"Assignment","feature":"to","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"toPort","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"cardinality":"?"},{"$type":"Assignment","feature":"linkLabel","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Evolve","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@32"},"arguments":[]},{"$type":"Assignment","feature":"component","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Assignment","feature":"target","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Pipeline","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@33"},"arguments":[]},{"$type":"Assignment","feature":"parent","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"{"},{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"Assignment","feature":"components","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[]},"cardinality":"+"},{"$type":"Keyword","value":"}"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"PipelineComponent","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@29"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"cardinality":"?"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Note","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@34"},"arguments":[]},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"visibility","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"evolution","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotations","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@35"},"arguments":[]},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Annotation","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@36"},"arguments":[]},{"$type":"Assignment","feature":"number","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"Assignment","feature":"text","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"CoordinateValue","dataType":"number","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@48"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Accelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@37"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","name":"Deaccelerator","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@38"},"arguments":[]},{"$type":"Assignment","feature":"name","operator":"=","terminal":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@50"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@51"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@39"},"arguments":[]}]}},{"$type":"Keyword","value":"["},{"$type":"Assignment","feature":"x","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":","},{"$type":"Assignment","feature":"y","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]}},{"$type":"Keyword","value":"]"},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"TerminalRule","name":"WARDLEY_NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"->"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_PORT","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<>"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+>"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"+<"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_ARROW","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-->"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"-.->"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":">"},"parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'<>/","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'</","parenthesized":false}],"parenthesized":false},{"$type":"RegexToken","regex":"/\\\\+'[^']*'>/","parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"LINK_LABEL","definition":{"$type":"RegexToken","regex":"/;[^\\\\n\\\\r]+/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRATEGY","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"build"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"buy"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"outsource"},"parenthesized":false}],"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"market"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_WARDLEY","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"wardley-beta"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_SIZE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"size"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLUTION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolution"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANCHOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"anchor"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_COMPONENT","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"component"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_LABEL","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"label"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_INERTIA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"inertia"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_EVOLVE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"evolve"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_PIPELINE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"pipeline"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_NOTE","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"note"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATIONS","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotations"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ANNOTATION","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"annotation"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_ACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"accelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"KW_DEACCELERATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":"deaccelerator"},"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NAME_WITH_SPACES","definition":{"$type":"RegexToken","regex":"/(?!title\\\\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \\\\t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/","parenthesized":false},"fragment":false},{"$type":"ParserRule","name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@52"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"entry":false,"fragment":false,"parameters":[]},{"$type":"ParserRule","fragment":true,"name":"TitleAndAccessibilities","definition":{"$type":"Group","elements":[{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"accDescr","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@44"},"arguments":[]}},{"$type":"Assignment","feature":"accTitle","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@45"},"arguments":[]}},{"$type":"Assignment","feature":"title","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@46"},"arguments":[]}}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@41"},"arguments":[]}],"cardinality":"+"},"entry":false,"parameters":[]},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"},"parenthesized":false},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@47"},"parenthesized":false},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@48"},"parenthesized":false}],"parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/","parenthesized":false},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/","parenthesized":false},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/","parenthesized":false},"fragment":false}],"interfaces":[],"types":[]}`),`WardleyGrammarGrammar`),Irt={languageId:`architecture`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Lrt={languageId:`cynefin`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Rrt={languageId:`eventmodeling`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},zrt={languageId:`gitGraph`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Brt={languageId:`info`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Vrt={languageId:`packet`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Hrt={languageId:`pie`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Urt={languageId:`radar`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Wrt={languageId:`railroadAbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Grt={languageId:`railroadEbnf`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Krt={languageId:`railroad`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},qrt={languageId:`railroadPeg`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Jrt={languageId:`treemap`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Yrt={languageId:`treeView`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},Xrt={languageId:`wardley`,fileExtensions:[`.mmd`,`.mermaid`],caseInsensitive:!1,mode:`production`},OQ={AstReflection:Q(()=>new EQ,`AstReflection`)},Zrt={Grammar:Q(()=>srt(),`Grammar`),LanguageMetaData:Q(()=>Irt,`LanguageMetaData`),parser:{}},Qrt={Grammar:Q(()=>lrt(),`Grammar`),LanguageMetaData:Q(()=>Lrt,`LanguageMetaData`),parser:{}},$rt={Grammar:Q(()=>drt(),`Grammar`),LanguageMetaData:Q(()=>Rrt,`LanguageMetaData`),parser:{}},eit={Grammar:Q(()=>prt(),`Grammar`),LanguageMetaData:Q(()=>zrt,`LanguageMetaData`),parser:{}},tit={Grammar:Q(()=>hrt(),`Grammar`),LanguageMetaData:Q(()=>Brt,`LanguageMetaData`),parser:{}},nit={Grammar:Q(()=>_rt(),`Grammar`),LanguageMetaData:Q(()=>Vrt,`LanguageMetaData`),parser:{}},rit={Grammar:Q(()=>yrt(),`Grammar`),LanguageMetaData:Q(()=>Hrt,`LanguageMetaData`),parser:{}},iit={Grammar:Q(()=>xrt(),`Grammar`),LanguageMetaData:Q(()=>Urt,`LanguageMetaData`),parser:{}},ait={Grammar:Q(()=>Crt(),`Grammar`),LanguageMetaData:Q(()=>Wrt,`LanguageMetaData`),parser:{}},oit={Grammar:Q(()=>Trt(),`Grammar`),LanguageMetaData:Q(()=>Grt,`LanguageMetaData`),parser:{}},sit={Grammar:Q(()=>Drt(),`Grammar`),LanguageMetaData:Q(()=>Krt,`LanguageMetaData`),parser:{}},cit={Grammar:Q(()=>krt(),`Grammar`),LanguageMetaData:Q(()=>qrt,`LanguageMetaData`),parser:{}},lit={Grammar:Q(()=>jrt(),`Grammar`),LanguageMetaData:Q(()=>Jrt,`LanguageMetaData`),parser:{}},uit={Grammar:Q(()=>Nrt(),`Grammar`),LanguageMetaData:Q(()=>Yrt,`LanguageMetaData`),parser:{}},dit={Grammar:Q(()=>Frt(),`Grammar`),LanguageMetaData:Q(()=>Xrt,`LanguageMetaData`),parser:{}},fit={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},kQ=class extends aY{static{Q(this,`AbstractMermaidValueConverter`)}runConverter(e,t,n){let r=this.runCommonConverter(e,t,n);return r===void 0&&(r=this.runCustomConverter(e,t,n)),r===void 0?super.runConverter(e,t,n):r}runCommonConverter(e,t,n){let r=fit[e.name];if(r===void 0)return;let i=r.exec(t);if(i!==null){if(i[1]!==void 0)return i[1].trim().replace(/[\t ]{2,}/gm,` `);if(i[2]!==void 0)return i[2].replace(/^\s*/gm,``).replace(/\s+$/gm,``).replace(/[\t ]{2,}/gm,` `).replace(/[\n\r]{2,}/gm,`1364-`)}}},AQ=class extends kQ{static{Q(this,`CommonValueConverter`)}runCustomConverter(e,t,n){}},jQ=class extends iY{static{Q(this,`AbstractMermaidTokenBuilder`)}constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,t,n){let r=super.buildKeywordTokens(e,t,n);return r.forEach(e=>{this.keywords.has(e.name)&&e.PATTERN!==void 0&&(e.PATTERN=RegExp(e.PATTERN.toString()+`(?:(?=%%)|(?!\\S))`))}),r}},class extends jQ{static{Q(this,`CommonTokenBuilder`)}}}));function pit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),iit,NQ);return t.ServiceRegistry.register(n),{shared:t,Radar:n}}var mit,NQ,hit=o((()=>{MQ(),mit=class extends jQ{static{Q(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},NQ={parser:{TokenBuilder:Q(()=>new mit,`TokenBuilder`),ValueConverter:Q(()=>new AQ,`ValueConverter`)}},Q(pit,`createRadarServices`)}));function PQ(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),sit,IQ);return t.ServiceRegistry.register(n),{shared:t,Railroad:n}}var git,FQ,_it,IQ,vit=o((()=>{MQ(),git=class extends jQ{static{Q(this,`RailroadTokenBuilder`)}constructor(){super([`railroad-beta`])}},FQ=Q(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`1365-`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),_it=class extends kQ{static{Q(this,`RailroadValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return FQ(e)}return r}runCustomConverter(e,t,n){if(e.name===`RR_STRING`)return FQ(t)}},IQ={parser:{TokenBuilder:Q(()=>new git,`TokenBuilder`),ValueConverter:Q(()=>new _it,`ValueConverter`)}},Q(PQ,`createRailroadServices`)}));function LQ(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),oit,zQ);return t.ServiceRegistry.register(n),{shared:t,RailroadEbnf:n}}var yit,RQ,bit,zQ,xit=o((()=>{MQ(),yit=class extends jQ{static{Q(this,`RailroadEbnfTokenBuilder`)}constructor(){super([`railroad-ebnf-beta`])}},RQ=Q(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`1366-`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),bit=class extends kQ{static{Q(this,`RailroadEbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return RQ(e)}return r}runCustomConverter(e,t,n){if(e.name===`EBNF_STRING`)return RQ(t);if(e.name===`EBNF_SPECIAL_SEQUENCE`)return t.slice(1,-1).trim()}},zQ={parser:{TokenBuilder:Q(()=>new yit,`TokenBuilder`),ValueConverter:Q(()=>new bit,`ValueConverter`)}},Q(LQ,`createRailroadEbnfServices`)}));function BQ(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),ait,VQ);return t.ServiceRegistry.register(n),{shared:t,RailroadAbnf:n}}var Sit,Cit,VQ,wit=o((()=>{MQ(),Sit=class extends jQ{static{Q(this,`RailroadAbnfTokenBuilder`)}constructor(){super([`railroad-abnf-beta`])}},Cit=class extends kQ{static{Q(this,`RailroadAbnfValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return e.slice(1,-1)}return r}runCustomConverter(e,t,n){if(e.name===`ABNF_STRING`)return t.slice(1,-1)}},VQ={parser:{TokenBuilder:Q(()=>new Sit,`TokenBuilder`),ValueConverter:Q(()=>new Cit,`ValueConverter`)}},Q(BQ,`createRailroadAbnfServices`)}));function HQ(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),cit,WQ);return t.ServiceRegistry.register(n),{shared:t,RailroadPeg:n}}var Tit,UQ,Eit,WQ,Dit=o((()=>{MQ(),Tit=class extends jQ{static{Q(this,`RailroadPegTokenBuilder`)}constructor(){super([`railroad-peg-beta`])}},UQ=Q(e=>{let t=e.slice(1,-1),n=``;for(let e=0;e<t.length;e++){let r=t[e];if(r===`\\`&&e+1<t.length){e++;let r=t[e];switch(r){case`n`:n+=`1367-`;break;case`r`:n+=`\r`;break;case`t`:n+=` `;break;default:n+=r}continue}n+=r}return n},`decodeEscapedString`),Eit=class extends kQ{static{Q(this,`RailroadPegValueConverter`)}runConverter(e,t,n){let r=super.runConverter(e,t,n);if(e.name===`TITLE`&&typeof r==`string`){let e=r.trim();if(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))return UQ(e)}return r}runCustomConverter(e,t,n){if(e.name===`PEG_STRING`)return UQ(t)}},WQ={parser:{TokenBuilder:Q(()=>new Tit,`TokenBuilder`),ValueConverter:Q(()=>new Eit,`ValueConverter`)}},Q(HQ,`createRailroadPegServices`)}));function Oit(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}function kit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),lit,GQ);return t.ServiceRegistry.register(n),Oit(n),{shared:t,Treemap:n}}var Ait,jit,Mit,Nit,GQ,Pit=o((()=>{MQ(),Ait=class extends jQ{static{Q(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},jit=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,Mit=class extends kQ{static{Q(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=jit.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}},Q(Oit,`registerValidationChecks`),Nit=class{static{Q(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},GQ={parser:{TokenBuilder:Q(()=>new Ait,`TokenBuilder`),ValueConverter:Q(()=>new Mit,`ValueConverter`)},validation:{TreemapValidator:Q(()=>new Nit,`TreemapValidator`)}},Q(kit,`createTreemapServices`)}));function Fit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),dit,KQ);return t.ServiceRegistry.register(n),{shared:t,Wardley:n}}var Iit,KQ,Lit=o((()=>{MQ(),Iit=class extends kQ{static{Q(this,`WardleyValueConverter`)}runCustomConverter(e,t,n){switch(e.name.toUpperCase()){case`LINK_LABEL`:return t.substring(1).trim();default:return}}},KQ={parser:{ValueConverter:Q(()=>new Iit,`ValueConverter`)}},Q(Fit,`createWardleyServices`)}));function Rit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),Qrt,qQ);return t.ServiceRegistry.register(n),{shared:t,Cynefin:n}}var zit,qQ,Bit=o((()=>{MQ(),zit=class extends jQ{static{Q(this,`CynefinTokenBuilder`)}constructor(){super([`cynefin-beta`])}},qQ={parser:{TokenBuilder:Q(()=>new zit,`TokenBuilder`),ValueConverter:Q(()=>new AQ,`ValueConverter`)}},Q(Rit,`createCynefinServices`)}));function Vit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),eit,JQ);return t.ServiceRegistry.register(n),{shared:t,GitGraph:n}}var Hit,JQ,Uit=o((()=>{MQ(),Hit=class extends jQ{static{Q(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},JQ={parser:{TokenBuilder:Q(()=>new Hit,`TokenBuilder`),ValueConverter:Q(()=>new AQ,`ValueConverter`)}},Q(Vit,`createGitGraphServices`)}));function Wit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),tit,YQ);return t.ServiceRegistry.register(n),{shared:t,Info:n}}var Git,YQ,Kit=o((()=>{MQ(),Git=class extends jQ{static{Q(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},YQ={parser:{TokenBuilder:Q(()=>new Git,`TokenBuilder`),ValueConverter:Q(()=>new AQ,`ValueConverter`)}},Q(Wit,`createInfoServices`)}));function qit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),nit,XQ);return t.ServiceRegistry.register(n),{shared:t,Packet:n}}var Jit,XQ,Yit=o((()=>{MQ(),Jit=class extends jQ{static{Q(this,`PacketTokenBuilder`)}constructor(){super([`packet`])}},XQ={parser:{TokenBuilder:Q(()=>new Jit,`TokenBuilder`),ValueConverter:Q(()=>new AQ,`ValueConverter`)}},Q(qit,`createPacketServices`)}));function Xit(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),rit,ZQ);return t.ServiceRegistry.register(n),{shared:t,Pie:n}}var Zit,Qit,ZQ,$it=o((()=>{MQ(),Zit=class extends jQ{static{Q(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},Qit=class extends kQ{static{Q(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},ZQ={parser:{TokenBuilder:Q(()=>new Zit,`TokenBuilder`),ValueConverter:Q(()=>new Qit,`ValueConverter`)}},Q(Xit,`createPieServices`)}));function eat(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),uit,QQ);return t.ServiceRegistry.register(n),{shared:t,TreeView:n}}var tat,nat,QQ,rat=o((()=>{MQ(),tat=class extends kQ{static{Q(this,`TreeViewValueConverter`)}runCustomConverter(e,t,n){if(e.name===`INDENTATION`)return t?.length||0;if(e.name===`QUOTED_NAME`)return t.substring(1,t.length-1);if(e.name===`BARE_NAME`)return t.replace(/[\t ]+$/,``);if(e.name===`CLASS_ANNOTATION`)return t.trim().substring(3).trim();if(e.name===`ICON_ANNOTATION`){let e=t.trim();return e.substring(5,e.length-1)}if(e.name===`DESC_ANNOTATION`)return t.trim().substring(2).trim()}},nat=class extends jQ{static{Q(this,`TreeViewTokenBuilder`)}constructor(){super([`treeView-beta`])}},QQ={parser:{TokenBuilder:Q(()=>new nat,`TokenBuilder`),ValueConverter:Q(()=>new tat,`ValueConverter`)}},Q(eat,`createTreeViewServices`)}));function iat(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),Zrt,$Q);return t.ServiceRegistry.register(n),{shared:t,Architecture:n}}var aat,oat,$Q,sat=o((()=>{MQ(),aat=class extends jQ{static{Q(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},oat=class extends kQ{static{Q(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`){let e=t.replace(/^\[|]$/g,``).trim();return(e.startsWith(`"`)&&e.endsWith(`"`)||e.startsWith(`'`)&&e.endsWith(`'`))&&(e=e.slice(1,-1),e=e.replace(/\\"/g,`"`).replace(/\\'/g,`'`)),e.trim()}}},$Q={parser:{TokenBuilder:Q(()=>new aat,`TokenBuilder`),ValueConverter:Q(()=>new oat,`ValueConverter`)}},Q(iat,`createArchitectureServices`)}));function cat(e){let t=e.validation.EventModelingValidator,n=e.validation.ValidationRegistry;if(n){let e={EmTimeFrame:t.checkSourceFrameTypes.bind(t),EmResetFrame:t.checkSourceFrameTypes.bind(t)};n.register(e,t)}}function lat(e=yX){let t=rB(nB(e),OQ),n=rB(tB({shared:t}),$rt,a$);return t.ServiceRegistry.register(n),cat(n),{shared:t,EventModel:n}}var uat,e$,t$,n$,r$,i$,dat,a$,fat=o((()=>{MQ(),uat=class extends jQ{static{Q(this,`EventModelingTokenBuilder`)}constructor(){super([`eventmodeling`])}},e$=new Set([`cmd`,`command`]),t$=new Set([`evt`,`event`]),n$=new Set([`rmo`,`readmodel`]),r$=new Set([`pcr`,`processor`]),i$=new Set([`ui`]),Q(cat,`registerValidationChecks`),dat=class{static{Q(this,`EventModelingValidator`)}checkSourceFrameTypes(e,t){e.sourceFrames.length!==0&&(e$.has(e.modelEntityType)?this.validateSources(e,new Set([...i$,...r$]),`command`,`ui or processor`,t):t$.has(e.modelEntityType)?this.validateSources(e,e$,`event`,`command`,t):n$.has(e.modelEntityType)?this.validateSources(e,t$,`read model`,`event`,t):r$.has(e.modelEntityType)?this.validateSources(e,n$,`processor`,`read model`,t):i$.has(e.modelEntityType)&&this.validateSources(e,n$,`ui`,`read model`,t))}validateSources(e,t,n,r,i){for(let a of e.sourceFrames){let o=a.ref;o!==void 0&&!t.has(o.modelEntityType)&&i(`error`,`A ${n} can only receive input from a ${r}, not from '${o.modelEntityType}'.`,{node:e,property:`sourceFrames`})}}},a$={parser:{TokenBuilder:Q(()=>new uat,`TokenBuilder`),ValueConverter:Q(()=>new AQ,`ValueConverter`)},validation:{EventModelingValidator:Q(()=>new dat,`EventModelingValidator`)}},Q(lat,`createEventModelingServices`)})),pat=l({InfoModule:()=>YQ,createInfoServices:()=>Wit}),mat=o((()=>{Kit(),MQ()})),hat=l({PacketModule:()=>XQ,createPacketServices:()=>qit}),gat=o((()=>{Yit(),MQ()})),_at=l({PieModule:()=>ZQ,createPieServices:()=>Xit}),vat=o((()=>{$it(),MQ()})),yat=l({TreeViewModule:()=>QQ,createTreeViewServices:()=>eat}),bat=o((()=>{rat(),MQ()})),xat=l({ArchitectureModule:()=>$Q,createArchitectureServices:()=>iat}),Sat=o((()=>{sat(),MQ()})),Cat=l({GitGraphModule:()=>JQ,createGitGraphServices:()=>Vit}),wat=o((()=>{Uit(),MQ()})),Tat=l({EventModelingModule:()=>a$,createEventModelingServices:()=>lat}),Eat=o((()=>{fat(),MQ()})),Dat=l({RadarModule:()=>NQ,createRadarServices:()=>pit}),Oat=o((()=>{hit(),MQ()})),kat=l({RailroadModule:()=>IQ,createRailroadServices:()=>PQ}),Aat=o((()=>{vit(),MQ()})),jat=l({RailroadEbnfModule:()=>zQ,createRailroadEbnfServices:()=>LQ}),Mat=o((()=>{xit(),MQ()})),Nat=l({RailroadAbnfModule:()=>VQ,createRailroadAbnfServices:()=>BQ}),Pat=o((()=>{wit(),MQ()})),Fat=l({RailroadPegModule:()=>WQ,createRailroadPegServices:()=>HQ}),Iat=o((()=>{Dit(),MQ()})),Lat=l({TreemapModule:()=>GQ,createTreemapServices:()=>kit}),Rat=o((()=>{Pit(),MQ()})),zat=l({WardleyModule:()=>KQ,createWardleyServices:()=>Fit}),Bat=o((()=>{Lit(),MQ()})),Vat=l({CynefinModule:()=>qQ,createCynefinServices:()=>Rit}),Hat=o((()=>{Bit(),MQ()}));async function o$(e,t){let n=Uat[e];if(!n)throw Error(`Unknown diagram type: ${e}`);s$[e]||await n();let r=s$[e].parse(t);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c$(r);return r.value}var s$,Uat,c$,l$=o((()=>{hit(),vit(),xit(),wit(),Dit(),Pit(),Lit(),Bit(),Uit(),Kit(),Yit(),$it(),rat(),sat(),fat(),MQ(),s$={},Uat={info:Q(async()=>{let{createInfoServices:e}=await Promise.resolve().then(()=>(mat(),pat));s$.info=e().Info.parser.LangiumParser},`info`),packet:Q(async()=>{let{createPacketServices:e}=await Promise.resolve().then(()=>(gat(),hat));s$.packet=e().Packet.parser.LangiumParser},`packet`),pie:Q(async()=>{let{createPieServices:e}=await Promise.resolve().then(()=>(vat(),_at));s$.pie=e().Pie.parser.LangiumParser},`pie`),treeView:Q(async()=>{let{createTreeViewServices:e}=await Promise.resolve().then(()=>(bat(),yat));s$.treeView=e().TreeView.parser.LangiumParser},`treeView`),architecture:Q(async()=>{let{createArchitectureServices:e}=await Promise.resolve().then(()=>(Sat(),xat));s$.architecture=e().Architecture.parser.LangiumParser},`architecture`),gitGraph:Q(async()=>{let{createGitGraphServices:e}=await Promise.resolve().then(()=>(wat(),Cat));s$.gitGraph=e().GitGraph.parser.LangiumParser},`gitGraph`),eventmodeling:Q(async()=>{let{createEventModelingServices:e}=await Promise.resolve().then(()=>(Eat(),Tat));s$.eventmodeling=e().EventModel.parser.LangiumParser},`eventmodeling`),radar:Q(async()=>{let{createRadarServices:e}=await Promise.resolve().then(()=>(Oat(),Dat));s$.radar=e().Radar.parser.LangiumParser},`radar`),railroad:Q(async()=>{let{createRailroadServices:e}=await Promise.resolve().then(()=>(Aat(),kat));s$.railroad=e().Railroad.parser.LangiumParser},`railroad`),railroadEbnf:Q(async()=>{let{createRailroadEbnfServices:e}=await Promise.resolve().then(()=>(Mat(),jat));s$.railroadEbnf=e().RailroadEbnf.parser.LangiumParser},`railroadEbnf`),railroadAbnf:Q(async()=>{let{createRailroadAbnfServices:e}=await Promise.resolve().then(()=>(Pat(),Nat));s$.railroadAbnf=e().RailroadAbnf.parser.LangiumParser},`railroadAbnf`),railroadPeg:Q(async()=>{let{createRailroadPegServices:e}=await Promise.resolve().then(()=>(Iat(),Fat));s$.railroadPeg=e().RailroadPeg.parser.LangiumParser},`railroadPeg`),treemap:Q(async()=>{let{createTreemapServices:e}=await Promise.resolve().then(()=>(Rat(),Lat));s$.treemap=e().Treemap.parser.LangiumParser},`treemap`),wardley:Q(async()=>{let{createWardleyServices:e}=await Promise.resolve().then(()=>(Bat(),zat));s$.wardley=e().Wardley.parser.LangiumParser},`wardley`),cynefin:Q(async()=>{let{createCynefinServices:e}=await Promise.resolve().then(()=>(Hat(),Vat));s$.cynefin=e().Cynefin.parser.LangiumParser},`cynefin`)},Q(o$,`parse`),c$=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(`1368-`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(`1369-`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{Q(this,`MermaidParseError`)}}})),Wat=l({diagram:()=>Bot});function u$(){return Rp({length:7})}function Gat(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}function d$(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}function f$(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let r=[n,t.id,t.seq];for(let e in h$.records.branches)h$.records.branches.get(e)===t.id&&r.push(e);if(y.debug(r.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=h$.records.commits.get(t.parents[0]);d$(e,t,n),t.parents[1]&&e.push(h$.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=h$.records.commits.get(t.parents[0]);d$(e,t,n)}e=Gat(e,e=>e.id),f$(e)}var p$,Kat,m$,h$,qat,Jat,Yat,Xat,Zat,Qat,$at,g$,eot,tot,not,rot,iot,_$,v$,aot,oot,sot,cot,lot,uot,dot,fot,y$,b$,x$,S$,C$,w$,T$,E$,pot,D$,O$,k$,A$,j$,M$,N$,P$,mot,F$,I$,hot,got,_ot,vot,yot,bot,xot,Sot,Cot,wot,Tot,Eot,L$,Dot,R$,Oot,kot,Aot,jot,Mot,z$,B$,Not,Pot,Fot,Iot,Lot,Rot,zot,Bot,Vot=o((()=>{wF(),EF(),Kp(),Zs(),S(),h(),l$(),hf(),p$={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Kat=Ho.gitGraph,m$=p(()=>jp({...Kat,...es().gitGraph}),`getConfig`),h$=new CF(()=>{let e=m$(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}}),p(u$,`getID`),p(Gat,`uniqBy`),qat=p(function(e){h$.records.direction=e},`setDirection`),Jat=p(function(e){y.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{h$.records.options=JSON.parse(e)}catch(e){y.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),Yat=p(function(){return h$.records.options},`getOptions`),Xat=p(function(e){let t=e.msg,n=e.id,r=e.type,i=e.tags;y.info(`commit`,t,n,r,i),y.debug(`Entering commit:`,t,n,r,i);let a=m$();n=Ds.sanitizeText(n,a),t=Ds.sanitizeText(t,a),i=i?.map(e=>Ds.sanitizeText(e,a));let o={id:n||h$.records.seq+`-`+u$(),message:t,seq:h$.records.seq++,type:r??p$.NORMAL,tags:i??[],parents:h$.records.head==null?[]:[h$.records.head.id],branch:h$.records.currBranch};h$.records.head=o,y.info(`main branch`,a.mainBranchName),h$.records.commits.has(o.id)&&y.warn(`Commit ID ${o.id} already exists`),h$.records.commits.set(o.id,o),h$.records.branches.set(h$.records.currBranch,o.id),y.debug(`in pushCommit `+o.id)},`commit`),Zat=p(function(e){let t=e.name,n=e.order;if(t=Ds.sanitizeText(t,m$()),h$.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);h$.records.branches.set(t,h$.records.head==null?null:h$.records.head.id),h$.records.branchConfig.set(t,{name:t,order:n}),g$(t),y.debug(`in createBranch`)},`branch`),Qat=p(e=>{let t=e.branch,n=e.id,r=e.type,i=e.tags,a=m$();t=Ds.sanitizeText(t,a),n&&=Ds.sanitizeText(n,a);let o=h$.records.branches.get(h$.records.currBranch),s=h$.records.branches.get(t),l=o?h$.records.commits.get(o):void 0,u=s?h$.records.commits.get(s):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(h$.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${h$.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!h$.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&h$.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${r} ${i?.join(` `)}`,token:`merge ${t} ${n} ${r} ${i?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${r} ${i?.join(` `)}`]},e}let d=s||``,f={id:n||`${h$.records.seq}-${u$()}`,message:`merged branch ${t} into ${h$.records.currBranch}`,seq:h$.records.seq++,parents:h$.records.head==null?[]:[h$.records.head.id,d],branch:h$.records.currBranch,type:p$.MERGE,customType:r,customId:!!n,tags:i??[]};h$.records.head=f,h$.records.commits.set(f.id,f),h$.records.branches.set(h$.records.currBranch,f.id),y.debug(h$.records.branches),y.debug(`in mergeBranch`)},`merge`),$at=p(function(e){let t=e.id,n=e.targetId,r=e.tags,i=e.parent;y.debug(`Entering cherryPick:`,t,n,r);let a=m$();if(t=Ds.sanitizeText(t,a),n=Ds.sanitizeText(n,a),r=r?.map(e=>Ds.sanitizeText(e,a)),i=Ds.sanitizeText(i,a),!t||!h$.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=h$.records.commits.get(t);if(o===void 0||!o)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(i&&!(Array.isArray(o.parents)&&o.parents.includes(i)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let s=o.branch;if(o.type===p$.MERGE&&!i)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!h$.records.commits.has(n)){if(s===h$.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=h$.records.branches.get(h$.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${h$.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let a=h$.records.commits.get(e);if(a===void 0||!a){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${h$.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:h$.records.seq+`-`+u$(),message:`cherry-picked ${o?.message} into ${h$.records.currBranch}`,seq:h$.records.seq++,parents:h$.records.head==null?[]:[h$.records.head.id,o.id],branch:h$.records.currBranch,type:p$.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${o.id}${o.type===p$.MERGE?`|parent:${i}`:``}`]};h$.records.head=l,h$.records.commits.set(l.id,l),h$.records.branches.set(h$.records.currBranch,l.id),y.debug(h$.records.branches),y.debug(`in cherryPick`)}},`cherryPick`),g$=p(function(e){if(e=Ds.sanitizeText(e,m$()),h$.records.branches.has(e)){h$.records.currBranch=e;let t=h$.records.branches.get(h$.records.currBranch);t===void 0||!t?h$.records.head=null:h$.records.head=h$.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`),p(d$,`upsert`),p(f$,`prettyPrintCommitHistory`),eot=p(function(){y.debug(h$.records.commits);let e=_$()[0];f$([e])},`prettyPrint`),tot=p(function(){h$.reset(),Is()},`clear`),not=p(function(){return[...h$.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),rot=p(function(){return h$.records.branches},`getBranches`),iot=p(function(){return h$.records.commits},`getCommits`),_$=p(function(){let e=[...h$.records.commits.values()];return e.forEach(function(e){y.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),v$={commitType:p$,getConfig:m$,setDirection:qat,setOptions:Jat,getOptions:Yat,commit:Xat,branch:Zat,merge:Qat,cherryPick:$at,checkout:g$,prettyPrint:eot,clear:tot,getBranchesAsObjArray:not,getBranches:rot,getCommits:iot,getCommitsArray:_$,getCurrentBranch:p(function(){return h$.records.currBranch},`getCurrentBranch`),getDirection:p(function(){return h$.records.direction},`getDirection`),getHead:p(function(){return h$.records.head},`getHead`),setAccTitle:Ls,getAccTitle:Rs,getAccDescription:Bs,setAccDescription:zs,setDiagramTitle:Vs,getDiagramTitle:Hs},aot=p((e,t)=>{TF(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)oot(n,t)},`populate`),oot=p((e,t)=>{let n={Commit:p(e=>t.commit(sot(e)),`Commit`),Branch:p(e=>t.branch(cot(e)),`Branch`),Merge:p(e=>t.merge(lot(e)),`Merge`),Checkout:p(e=>t.checkout(uot(e)),`Checkout`),CherryPicking:p(e=>t.cherryPick(dot(e)),`CherryPicking`)}[e.$type];n?n(e):y.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),sot=p(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?p$.NORMAL:p$[e.type],tags:e.tags??void 0}),`parseCommit`),cot=p(e=>({name:e.name,order:e.order??0}),`parseBranch`),lot=p(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:p$[e.type],tags:e.tags??void 0}),`parseMerge`),uot=p(e=>e.branch,`parseCheckout`),dot=p(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),fot={parse:p(async e=>{let t=await o$(`gitGraph`,e);y.debug(t),aot(t,v$)},`parse`)},y$=10,b$=40,x$=4,S$=2,C$=8,w$=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),T$=12,E$=new Set([`redux-color`,`redux-dark-color`]),pot=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),D$=p((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),O$=new Map,k$=new Map,A$=30,j$=new Map,M$=[],N$=0,P$=`LR`,mot=p(()=>{O$.clear(),k$.clear(),j$.clear(),N$=0,M$=[],P$=`LR`},`clear`),F$=p(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),I$=p(e=>{let t,n,r;return P$===`BT`?(n=p((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=p((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=P$===`TB`||P$==`BT`?k$.get(e)?.y:k$.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),hot=p(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=k$.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),got=p((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=vot(n),i=Math.max(r,i)):a.push(n),yot(n,r)}),r=i,a.forEach(e=>{bot(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=hot(n.parents);r=k$.get(e).y-b$,r<=i&&(i=r);let t=O$.get(n.branch).pos,a=r-y$;k$.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),_ot=p(e=>{let t=I$(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=k$.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),vot=p(e=>_ot(e)+b$,`calculateCommitPosition`),yot=p((e,t)=>{let n=O$.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+y$;return k$.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),bot=p((e,t,n)=>{let r=O$.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;k$.set(e.id,{x:a,y:i})},`setRootPosition`),xot=p((e,t,n,r,i,a)=>{let{theme:o}=Z(),s=w$.has(o??``),l=E$.has(o??``),u=pot.has(o??``);if(a===p$.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${D$(i,C$,l)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${D$(i,C$,l)} ${r}-inner`);else if(a===p$.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,u?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${D$(i,C$,l)}`),a===p$.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${D$(i,C$,l)}`)}if(a===p$.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${D$(i,C$,l)}`)}}},`drawCommitBullet`),Sot=p((e,t,n,r,i)=>{if(t.type!==p$.CHERRY_PICK&&(t.customId&&t.type===p$.MERGE||t.type!==p$.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),l=s.node()?.getBBox();if(l&&(o.attr(`x`,n.posWithOffset-l.width/2-S$).attr(`y`,n.y+13.5).attr(`width`,l.width+2*S$).attr(`height`,l.height+2*S$),P$===`TB`||P$===`BT`?(o.attr(`x`,n.x-(l.width+4*x$+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(l.width+4*x$)).attr(`y`,n.y+l.height-12)):s.attr(`x`,n.posWithOffset-l.width/2),i.rotateCommitLabel)){if(P$===`TB`||P$===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(l.width+10)/25*9.5,t=10+l.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),Cot=p((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),l=e.append(`circle`),u=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),d=u.node()?.getBBox();if(!d)throw Error(`Tag bbox not found`);a=Math.max(a,d.width),o=Math.max(o,d.height),u.attr(`x`,n.posWithOffset-d.width/2),s.push({tag:u,hole:l,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:l}of s){let s=o/2,u=n.y-19.2-l;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`1370- ${r-a/2-x$/2},${u+S$} 1371- ${r-a/2-x$/2},${u-S$}1372- ${n.posWithOffset-a/2-x$},${u-s-S$}1373- ${n.posWithOffset+a/2+x$},${u-s-S$}1374- ${n.posWithOffset+a/2+x$},${u+s+S$}1375- ${n.posWithOffset-a/2-x$},${u+s+S$}`),t.attr(`cy`,u).attr(`cx`,r-a/2+x$/2).attr(`r`,1.5).attr(`class`,`tag-hole`),P$===`TB`||P$===`BT`){let o=r+l;i.attr(`class`,`tag-label-bkg`).attr(`points`,`1376- ${n.x},${o+2}1377- ${n.x},${o-2}1378- ${n.x+y$},${o-s-2}1379- ${n.x+y$+a+4},${o-s-2}1380- ${n.x+y$+a+4},${o+s+2}1381- ${n.x+y$},${o+s+2}`).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),t.attr(`cx`,n.x+x$/2).attr(`cy`,o).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),e.attr(`x`,n.x+5).attr(`y`,o+3).attr(`transform`,`translate(14,14) rotate(45, `+n.x+`,`+r+`)`)}}}},`drawCommitTags`),wot=p(e=>{switch(e.customType??e.type){case p$.NORMAL:return`commit-normal`;case p$.REVERSE:return`commit-reverse`;case p$.HIGHLIGHT:return`commit-highlight`;case p$.MERGE:return`commit-merge`;case p$.CHERRY_PICK:return`commit-cherry-pick`;default:return`commit-normal`}},`getCommitClassType`),Tot=p((e,t,n,r)=>{let i={x:0,y:0};if(e.parents.length>0){let n=I$(e.parents);if(n){let a=r.get(n)??i;return t===`TB`?a.y+b$:t===`BT`?(r.get(e.id)??i).y-b$:a.x+b$}}else if(t===`TB`)return A$;else if(t===`BT`)return(r.get(e.id)??i).y-b$;else return 0;return 0},`calculatePosition`),Eot=p((e,t,n)=>{let r=P$===`BT`&&n?t:t+y$,i=O$.get(e.branch)?.pos,a=P$===`TB`||P$===`BT`?O$.get(e.branch)?.pos:r;if(a===void 0||i===void 0)throw Error(`Position were undefined for commit ${e.id}`);let o=w$.has(Z().theme??``);return{x:a,y:P$===`TB`||P$===`BT`?r:i+(o?T$/2+1:-2),posWithOffset:r}},`getCommitPosition`),L$=p((e,t,n,r)=>{let i=e.append(`g`).attr(`class`,`commit-bullets`),a=e.append(`g`).attr(`class`,`commit-labels`),o=P$===`TB`||P$===`BT`?A$:0,s=[...t.keys()],l=r.parallelCommits??!1,u=p((e,n)=>{let r=t.get(e)?.seq,i=t.get(n)?.seq;return r!==void 0&&i!==void 0?r-i:0},`sortKeys`),d=s.sort(u);P$===`BT`&&(l&&got(d,t,o),d=d.reverse()),d.forEach(e=>{let s=t.get(e);if(!s)throw Error(`Commit not found for key ${e}`);l&&(o=Tot(s,P$,o,k$));let u=Eot(s,o,l);if(n){let e=wot(s),t=s.customType??s.type,n=O$.get(s.branch)?.index??0;xot(i,s,u,e,n,t),Sot(a,s,u,o,r),Cot(a,s,u,o)}P$===`TB`||P$===`BT`?k$.set(s.id,{x:u.x,y:u.posWithOffset}):k$.set(s.id,{x:u.posWithOffset,y:u.y}),o=P$===`BT`&&l?o+b$:o+b$+y$,o>N$&&(N$=o)})},`drawCommits`),Dot=p((e,t,n,r,i)=>{let a=(P$===`TB`||P$===`BT`?n.x<r.x:n.y<r.y)?t.branch:e.branch,o=p(e=>e.branch===a,`isOnBranchToGetCurve`),s=p(n=>n.seq>e.seq&&n.seq<t.seq,`isBetweenCommits`);return[...i.values()].some(e=>s(e)&&o(e))},`shouldRerouteArrow`),R$=p((e,t,n=0)=>{let r=e+Math.abs(e-t)/2;return n>5?r:M$.every(e=>Math.abs(e-r)>=10)?(M$.push(r),r):R$(e,t-Math.abs(e-t)/5,n+1)},`findLane`),Oot=p((e,t,n,r)=>{let{theme:i}=Z(),a=E$.has(i??``),o=k$.get(t.id),s=k$.get(n.id);if(o===void 0||s===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);let l=Dot(t,n,o,s,r),u=``,d=``,f=0,p=0,m=O$.get(n.branch)?.index;n.type===p$.MERGE&&t.id!==n.parents[0]&&(m=O$.get(t.branch)?.index);let h;if(l){u=`A 10 10, 0, 0, 0,`,d=`A 10 10, 0, 0, 1,`,f=10,p=10;let e=o.y<s.y?R$(o.y,s.y):R$(s.y,o.y),n=o.x<s.x?R$(o.x,s.x):R$(s.x,o.x);P$===`TB`?o.x<s.x?h=`M ${o.x} ${o.y} L ${n-f} ${o.y} ${d} ${n} ${o.y+p} L ${n} ${s.y-f} ${u} ${n+p} ${s.y} L ${s.x} ${s.y}`:(m=O$.get(t.branch)?.index,h=`M ${o.x} ${o.y} L ${n+f} ${o.y} ${u} ${n} ${o.y+p} L ${n} ${s.y-f} ${d} ${n-p} ${s.y} L ${s.x} ${s.y}`):P$===`BT`?o.x<s.x?h=`M ${o.x} ${o.y} L ${n-f} ${o.y} ${u} ${n} ${o.y-p} L ${n} ${s.y+f} ${d} ${n+p} ${s.y} L ${s.x} ${s.y}`:(m=O$.get(t.branch)?.index,h=`M ${o.x} ${o.y} L ${n+f} ${o.y} ${d} ${n} ${o.y-p} L ${n} ${s.y+f} ${u} ${n-p} ${s.y} L ${s.x} ${s.y}`):o.y<s.y?h=`M ${o.x} ${o.y} L ${o.x} ${e-f} ${u} ${o.x+p} ${e} L ${s.x-f} ${e} ${d} ${s.x} ${e+p} L ${s.x} ${s.y}`:(m=O$.get(t.branch)?.index,h=`M ${o.x} ${o.y} L ${o.x} ${e+f} ${d} ${o.x+p} ${e} L ${s.x-f} ${e} ${u} ${s.x} ${e-p} L ${s.x} ${s.y}`)}else u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,P$===`TB`?(o.x<s.x&&(h=n.type===p$.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${s.y-f} ${u} ${o.x+p} ${s.y} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${s.x-f} ${o.y} ${d} ${s.x} ${o.y+p} L ${s.x} ${s.y}`),o.x>s.x&&(u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,h=n.type===p$.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${s.y-f} ${d} ${o.x-p} ${s.y} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${s.x+f} ${o.y} ${u} ${s.x} ${o.y+p} L ${s.x} ${s.y}`),o.x===s.x&&(h=`M ${o.x} ${o.y} L ${s.x} ${s.y}`)):P$===`BT`?(o.x<s.x&&(h=n.type===p$.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${s.y+f} ${d} ${o.x+p} ${s.y} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${s.x-f} ${o.y} ${u} ${s.x} ${o.y-p} L ${s.x} ${s.y}`),o.x>s.x&&(u=`A 20 20, 0, 0, 0,`,d=`A 20 20, 0, 0, 1,`,f=20,p=20,h=n.type===p$.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${o.x} ${s.y+f} ${u} ${o.x-p} ${s.y} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${s.x+f} ${o.y} ${d} ${s.x} ${o.y-p} L ${s.x} ${s.y}`),o.x===s.x&&(h=`M ${o.x} ${o.y} L ${s.x} ${s.y}`)):(o.y<s.y&&(h=n.type===p$.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${s.x-f} ${o.y} ${d} ${s.x} ${o.y+p} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${o.x} ${s.y-f} ${u} ${o.x+p} ${s.y} L ${s.x} ${s.y}`),o.y>s.y&&(h=n.type===p$.MERGE&&t.id!==n.parents[0]?`M ${o.x} ${o.y} L ${s.x-f} ${o.y} ${u} ${s.x} ${o.y-p} L ${s.x} ${s.y}`:`M ${o.x} ${o.y} L ${o.x} ${s.y+f} ${d} ${o.x+p} ${s.y} L ${s.x} ${s.y}`),o.y===s.y&&(h=`M ${o.x} ${o.y} L ${s.x} ${s.y}`));if(h===void 0)throw Error(`Line definition not found`);e.append(`path`).attr(`d`,h).attr(`class`,`arrow arrow`+D$(m,C$,a))},`drawArrow`),kot=p((e,t)=>{let n=e.append(`g`).attr(`class`,`commit-arrows`);[...t.keys()].forEach(e=>{let r=t.get(e);r.parents&&r.parents.length>0&&r.parents.forEach(e=>{Oot(n,t.get(e),r,t)})})},`drawArrows`),Aot=p((e,t,n,r)=>{let{look:i,theme:a,themeVariables:o}=Z(),{dropShadow:s,THEME_COLOR_LIMIT:l}=o,u=w$.has(a??``),d=E$.has(a??``),f=e.append(`g`);t.forEach((e,t)=>{let a=D$(t,u?l:C$,d),o=O$.get(e.name)?.pos;if(o===void 0)throw Error(`Position not found for branch ${e.name}`);let p=P$===`TB`||P$===`BT`?o:u?o+T$/2+1:o-2,m=f.append(`line`);m.attr(`x1`,0),m.attr(`y1`,p),m.attr(`x2`,N$),m.attr(`y2`,p),m.attr(`class`,`branch branch`+a),P$===`TB`?(m.attr(`y1`,A$),m.attr(`x1`,o),m.attr(`y2`,N$),m.attr(`x2`,o)):P$===`BT`&&(m.attr(`y1`,N$),m.attr(`x1`,o),m.attr(`y2`,A$),m.attr(`x2`,o)),M$.push(p);let h=e.name,g=F$(h),_=f.insert(`rect`),v=f.insert(`g`).attr(`class`,`branchLabel`).insert(`g`).attr(`class`,`label branch-label`+a);v.node().appendChild(g);let y=g.getBBox(),b=u?0:4,x=u?16:0,S=u?T$:0;i===`neo`&&_.attr(`data-look`,`neo`),_.attr(`class`,`branchLabelBkg label`+a).attr(`style`,i===`neo`?`filter:${u?`url(#${r}-drop-shadow)`:s}`:``).attr(`rx`,b).attr(`ry`,b).attr(`x`,-y.width-4-(n.rotateCommitLabel===!0?30:0)).attr(`y`,-y.height/2+10).attr(`width`,y.width+18+x).attr(`height`,y.height+4+S),v.attr(`transform`,`translate(`+(-y.width-14-(n.rotateCommitLabel===!0?30:0)+x/2)+`, `+(p-y.height/2-2)+`)`),P$===`TB`?(_.attr(`x`,o-y.width/2-10).attr(`y`,0),v.attr(`transform`,`translate(`+(o-y.width/2-5)+`, 0)`),u&&(_.attr(`transform`,`translate(${-x/2-3}, ${-S-10})`),v.attr(`transform`,`translate(`+(o-y.width/2-5)+`, `+(-S*2+7)+`)`))):P$===`BT`?(_.attr(`x`,o-y.width/2-10).attr(`y`,N$),v.attr(`transform`,`translate(`+(o-y.width/2-5)+`, `+N$+`)`),u&&(_.attr(`transform`,`translate(${-x/2-3}, ${S+10})`),v.attr(`transform`,`translate(`+(o-y.width/2-5)+`, `+(N$+S*2+4)+`)`))):_.attr(`transform`,`translate(-19, `+(p-12-S/2)+`)`)})},`drawBranches`),jot=p(function(e,t,n,r,i){return O$.set(e,{pos:t,index:n}),t+=50+(i?40:0)+(P$===`TB`||P$===`BT`?r.width/2:0),t},`setBranchPosition`),Mot={draw:p(function(e,t,n,r){mot(),y.debug(`in gitgraph renderer`,e+`1382-`,`id:`,t,n);let i=r.db;if(!i.getConfig){y.error(`getConfig method is not available on db`);return}let a=i.getConfig(),o=a.rotateCommitLabel??!1;j$=i.getCommits();let s=i.getBranchesAsObjArray();P$=i.getDirection();let l=Ac(`[id="${t}"]`),{look:u,theme:d,themeVariables:f}=Z(),{useGradient:p,gradientStart:m,gradientStop:h,filterColor:g}=f;if(p){let e=l.append(`defs`).append(`linearGradient`).attr(`id`,t+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,m).attr(`stop-opacity`,1),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,h).attr(`stop-opacity`,1)}u===`neo`&&w$.has(d??``)&&l.append(`defs`).append(`filter`).attr(`id`,t+`-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,g);let _=0;s.forEach((e,t)=>{let n=F$(e.name),r=l.append(`g`),i=r.insert(`g`).attr(`class`,`branchLabel`),a=i.insert(`g`).attr(`class`,`label branch-label`);a.node()?.appendChild(n);let s=n.getBBox();_=jot(e.name,_,t,s,o),a.remove(),i.remove(),r.remove()}),L$(l,j$,!1,a),a.showBranches&&Aot(l,s,a,t),kot(l,j$),L$(l,j$,!0,a),Up.insertTitle(l,`gitTitleText`,a.titleTopMargin??0,i.getDiagramTitle()),qs(void 0,l,a.diagramPadding,a.useMaxWidth)},`draw`)},z$=8,B$=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),Not=new Set([`redux-color`,`redux-dark-color`]),Pot=new Set([`neo`,`neo-dark`]),Fot=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),Iot=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`,`neo`,`neo-dark`]),Lot=p(e=>{let{svgId:t}=e,n=``;if(e.useGradient&&t)for(let r=0;r<e.THEME_COLOR_LIMIT;r++)n+=`1383- .label${r} { fill: ${e.mainBkg}; stroke: url(${t}-gradient); stroke-width: ${e.strokeWidth};}1384- `;return n},`genGitGraphGradient`),Rot=p(e=>{let{theme:t,themeVariables:n}=es(),{borderColorArray:r}=n,i=B$.has(t);if(Pot.has(t)){let t=``;for(let n=0;n<e.THEME_COLOR_LIMIT;n++)if(n===0)t+=`1385- .branch-label${n} { fill: ${e.nodeBorder};}1386- .commit${n} { stroke: ${e.nodeBorder}; }1387- .commit-highlight${n} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }1388- .arrow${n} { stroke: ${e.nodeBorder}; }1389- .commit-bullets { fill: ${e.nodeBorder}; }1390- .commit-cherry-pick${n} { stroke: ${e.nodeBorder}; }1391- ${Lot(e)}`;else{let r=n%z$;t+=`1392- .branch-label${n} { fill: ${e[`gitBranchLabel`+r]}; }1393- .commit${n} { stroke: ${e[`git`+r]}; fill: ${e[`git`+r]}; }1394- .commit-highlight${n} { stroke: ${e[`gitInv`+r]}; fill: ${e[`gitInv`+r]}; }1395- .arrow${n} { stroke: ${e[`git`+r]}; }1396- `}return t}if(Not.has(t)){let n=``;for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`1397- .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:``} }1398- .commit${a} { stroke: ${e.nodeBorder}; }1399- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }1400- .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:``} }1401- .arrow${a} { stroke: ${e.nodeBorder}; }1402- .commit-bullets { fill: ${e.nodeBorder}; }1403- `;else{let o=a%r.length;n+=`1404- .branch-label${a} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:``} }1405- .commit${a} { stroke: ${r[o]}; fill: ${r[o]}; }1406- .commit-highlight${a} { stroke: ${r[o]}; fill: ${r[o]}; }1407- .label${a} { fill: ${Fot.has(t)?e.mainBkg:r[o]}; stroke: ${r[o]}; stroke-width: ${e.strokeWidth}; }1408- .arrow${a} { stroke: ${r[o]}; }1409- `}return n}{let t=``;for(let n=0;n<e.THEME_COLOR_LIMIT;n++)t+=`1410- .branch-label${n} { fill: ${e.nodeBorder}; ${i?`font-weight:${e.noteFontWeight}`:``} }1411- .commit${n} { stroke: ${e.nodeBorder}; }1412- .commit-highlight${n} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }1413- .label${n} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${i?`font-weight:${e.noteFontWeight}`:``}}1414- .arrow${n} { stroke: ${e.nodeBorder}; }1415- .commit-bullets { fill: ${e.nodeBorder}; }1416- .commit-cherry-pick${n} { stroke: ${e.nodeBorder}; }1417- `;return t}},`genColor`),zot=p(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(e,t)=>t).map(t=>{let n=t%z$;return`1418- .branch-label${t} { fill: ${e[`gitBranchLabel`+n]}; }1419- .commit${t} { stroke: ${e[`git`+n]}; fill: ${e[`git`+n]}; }1420- .commit-highlight${t} { stroke: ${e[`gitInv`+n]}; fill: ${e[`gitInv`+n]}; }1421- .label${t} { fill: ${e[`git`+n]}; }1422- .arrow${t} { stroke: ${e[`git`+n]}; }1423- `}).join(`1424-`)}`,`normalTheme`),Bot={parser:fot,db:v$,renderer:Mot,styles:p(e=>{let{theme:t}=es(),n=Iot.has(t);return`1425- .commit-id,1426- .commit-msg,1427- .branch-label {1428- fill: lightgrey;1429- color: lightgrey;1430- font-family: 'trebuchet ms', verdana, arial, sans-serif;1431- font-family: var(--mermaid-font-family);1432- }1433- 1434- ${n?Rot(e):zot(e)}1435-1436- .branch {1437- stroke-width: ${e.strokeWidth};1438- stroke: ${e.commitLineColor??e.lineColor};1439- stroke-dasharray: ${n?`4 2`:`2`};1440- }1441- .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${n?e.nodeBorder:e.commitLabelColor}; ${n?`font-weight:${e.noteFontWeight};`:``}}1442- .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${n?`transparent`:e.commitLabelBackground}; opacity: ${n?``:.5}; }1443- .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}1444- .tag-label-bkg { fill: ${n?e.mainBkg:e.tagLabelBackground}; stroke: ${n?e.nodeBorder:e.tagLabelBorder}; ${n?`filter:${e.dropShadow}`:``} }1445- .tag-hole { fill: ${e.textColor}; }1446-1447- .commit-merge {1448- stroke: ${n?e.mainBkg:e.primaryColor};1449- fill: ${n?e.mainBkg:e.primaryColor};1450- }1451- .commit-reverse {1452- stroke: ${n?e.mainBkg:e.primaryColor};1453- fill: ${n?e.mainBkg:e.primaryColor};1454- stroke-width: ${n?e.strokeWidth:3};1455- }1456- .commit-highlight-outer {1457- }1458- .commit-highlight-inner {1459- stroke: ${n?e.mainBkg:e.primaryColor};1460- fill: ${n?e.mainBkg:e.primaryColor};1461- }1462-1463- .arrow {1464- /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */1465- stroke-width: ${B$.has(t)?e.strokeWidth:8};1466- stroke-linecap: round;1467- fill: none1468- }1469- .gitTitleText {1470- text-anchor: middle;1471- font-size: 18px;1472- fill: ${e.textColor};1473- }1474-`},`getStyles`)}})),Hot=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_isoWeek=r()})(e,(function(){"use strict";return function(e,t,n){var r=function(e){return e.add(4-e.isoWeekday(),`day`)},i=t.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(e){if(!this.$utils().u(e))return this.add(7*(e-this.isoWeek()),`day`);var t,i,a,o,s=r(this),l=(t=this.isoWeekYear(),i=this.$u,a=(i?n.utc:n)().year(t).startOf(`year`),o=4-a.isoWeekday(),a.isoWeekday()>4&&(o+=7),a.add(o,`day`));return s.diff(l,`week`)+1},i.isoWeekday=function(e){return this.$utils().u(e)?this.day()||7:this.day(this.day()%7?e:e-7)};var a=i.startOf;i.startOf=function(e,t){var n=this.$utils(),r=!!n.u(t)||t;return n.p(e)===`isoweek`?r?this.date(this.date()-(this.isoWeekday()-1)).startOf(`day`):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf(`day`):a.bind(this)(e,t)}}}))})),Uot=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_customParseFormat=r()})(e,(function(){"use strict";var e={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`},t=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\d/,r=/\d\d/,i=/\d\d?/,a=/\d*[^-_:/,()\s\d]+/,o={},s=function(e){return(e=+e)+(e>68?1900:2e3)},l=function(e){return function(t){this[e]=+t}},u=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||={}).offset=function(e){if(!e||e===`Z`)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return n===0?0:t[0]===`+`?-n:n}(e)}],d=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},f=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?`pm`:`PM`);return n},p={A:[a,function(e){this.afternoon=f(e,!1)}],a:[a,function(e){this.afternoon=f(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*e}],SS:[r,function(e){this.milliseconds=10*e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[i,l(`seconds`)],ss:[i,l(`seconds`)],m:[i,l(`minutes`)],mm:[i,l(`minutes`)],H:[i,l(`hours`)],h:[i,l(`hours`)],HH:[i,l(`hours`)],hh:[i,l(`hours`)],D:[i,l(`day`)],DD:[r,l(`day`)],Do:[a,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,``)===e&&(this.day=r)}],w:[i,l(`week`)],ww:[r,l(`week`)],M:[i,l(`month`)],MM:[r,l(`month`)],MMM:[a,function(e){var t=d(`months`),n=(d(`monthsShort`)||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw Error();this.month=n%12||n}],MMMM:[a,function(e){var t=d(`months`).indexOf(e)+1;if(t<1)throw Error();this.month=t%12||t}],Y:[/[+-]?\d+/,l(`year`)],YY:[r,function(e){this.year=s(e)}],YYYY:[/\d{4}/,l(`year`)],Z:u,ZZ:u};function m(n){for(var r=n,i=o&&o.formats,a=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var a=r&&r.toUpperCase();return n||i[r]||e[r]||i[a].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),s=a.length,l=0;l<s;l+=1){var u=a[l],d=p[u],f=d&&d[0],m=d&&d[1];a[l]=m?{regex:f,parser:m}:u.replace(/^\[|\]$/g,``)}return function(e){for(var t={},n=0,r=0;n<s;n+=1){var i=a[n];if(typeof i==`string`)r+=i.length;else{var o=i.regex,l=i.parser,u=e.slice(r),d=o.exec(u)[0];l.call(t,d),e=e.replace(d,``)}}return function(e){var t=e.afternoon;if(t!==void 0){var n=e.hours;t?n<12&&(e.hours+=12):n===12&&(e.hours=0),delete e.afternoon}}(t),t}}return function(e,t,n){n.p.customParseFormat=!0,e&&e.parseTwoDigitYear&&(s=e.parseTwoDigitYear);var r=t.prototype,i=r.parse;r.parse=function(e){var t=e.date,r=e.utc,a=e.args;this.$u=r;var s=a[1];if(typeof s==`string`){var l=!0===a[2],u=!0===a[3],d=l||u,f=a[2];u&&(f=a[2]),o=this.$locale(),!l&&f&&(o=n.Ls[f]),this.$d=function(e,t,n,r){try{if([`x`,`X`].indexOf(t)>-1)return new Date((t===`X`?1e3:1)*e);var i=m(t)(e),a=i.year,o=i.month,s=i.day,l=i.hours,u=i.minutes,d=i.seconds,f=i.milliseconds,p=i.zone,h=i.week,g=new Date,_=s||(a||o?1:g.getDate()),v=a||g.getFullYear(),y=0;a&&!o||(y=o>0?o-1:g.getMonth());var b,x=l||0,S=u||0,C=d||0,w=f||0;return p?new Date(Date.UTC(v,y,_,x,S,C,w+60*p.offset*1e3)):n?new Date(Date.UTC(v,y,_,x,S,C,w)):(b=new Date(v,y,_,x,S,C,w),h&&(b=r(b).week(h).toDate()),b)}catch{return new Date(``)}}(t,s,r,n),this.init(),f&&!0!==f&&(this.$L=this.locale(f).$L),d&&t!=this.format(s)&&(this.$d=new Date(``)),o={}}else if(s instanceof Array)for(var p=s.length,h=1;h<=p;h+=1){a[1]=s[h-1];var g=n.apply(this,a);if(g.isValid()){this.$d=g.$d,this.$L=g.$L,this.init();break}h===p&&(this.$d=new Date(``))}else i.call(this,e)}}}))})),Wot=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_advancedFormat=r()})(e,(function(){"use strict";return function(e,t){var n=t.prototype,r=n.format;n.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return r.bind(this)(e);var i=this.$utils(),a=(e||`YYYY-MM-DDTHH:mm:ssZ`).replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case`Q`:return Math.ceil((t.$M+1)/3);case`Do`:return n.ordinal(t.$D);case`gggg`:return t.weekYear();case`GGGG`:return t.isoWeekYear();case`wo`:return n.ordinal(t.week(),`W`);case`w`:case`ww`:return i.s(t.week(),e===`w`?1:2,`0`);case`W`:case`WW`:return i.s(t.isoWeek(),e===`W`?1:2,`0`);case`k`:case`kk`:return i.s(String(t.$H===0?24:t.$H),e===`k`?1:2,`0`);case`X`:return Math.floor(t.$d.getTime()/1e3);case`x`:return t.$d.getTime();case`z`:return`[`+t.offsetName()+`]`;case`zzz`:return`[`+t.offsetName(`long`)+`]`;default:return e}}));return r.bind(this)(a)}}}))})),Got=s(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_duration=r()})(e,(function(){"use strict";var e,t,n=1e3,r=6e4,i=36e5,a=864e5,o=31536e6,s=2628e6,l=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,u=/\[([^\]]+)]|YYYY|YY|Y|M{1,2}|D{1,2}|H{1,2}|m{1,2}|s{1,2}|SSS/g,d={years:o,months:s,days:a,hours:i,minutes:r,seconds:n,milliseconds:1,weeks:6048e5},f=function(e){return e instanceof y},p=function(e,t,n){return new y(e,n,t.$l)},m=function(e){return t.p(e)+`s`},h=function(e){return e<0},g=function(e){return h(e)?Math.ceil(e):Math.floor(e)},_=function(e){return Math.abs(e)},v=function(e,t){return e?h(e)?{negative:!0,format:``+_(e)+t}:{negative:!1,format:``+e+t}:{negative:!1,format:``}},y=function(){function h(e,t,n){var r=this;if(this.$d={},this.$l=n,e===void 0&&(this.$ms=0,this.parseFromMilliseconds()),t)return p(e*d[m(t)],this);if(typeof e==`number`)return this.$ms=e,this.parseFromMilliseconds(),this;if(typeof e==`object`)return Object.keys(e).forEach((function(t){r.$d[m(t)]=e[t]})),this.calMilliseconds(),this;if(typeof e==`string`){var i=e.match(l);if(i){var a=i.slice(2).map((function(e){return e==null?0:Number(e)}));return this.$d.years=a[0],this.$d.months=a[1],this.$d.weeks=a[2],this.$d.days=a[3],this.$d.hours=a[4],this.$d.minutes=a[5],this.$d.seconds=a[6],this.calMilliseconds(),this}}return this}var _=h.prototype;return _.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(t,n){return t+(e.$d[n]||0)*d[n]}),0)},_.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=g(e/o),e%=o,this.$d.months=g(e/s),e%=s,this.$d.days=g(e/a),e%=a,this.$d.hours=g(e/i),e%=i,this.$d.minutes=g(e/r),e%=r,this.$d.seconds=g(e/n),e%=n,this.$d.milliseconds=e},_.toISOString=function(){var e=v(this.$d.years,`Y`),t=v(this.$d.months,`M`),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var r=v(n,`D`),i=v(this.$d.hours,`H`),a=v(this.$d.minutes,`M`),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var s=v(o,`S`),l=e.negative||t.negative||r.negative||i.negative||a.negative||s.negative,u=i.format||a.format||s.format?`T`:``,d=(l?`-`:``)+`P`+e.format+t.format+r.format+u+i.format+a.format+s.format;return d===`P`||d===`-P`?`P0D`:d},_.toJSON=function(){return this.toISOString()},_.format=function(e){var n=e||`YYYY-MM-DDTHH:mm:ss`,r={Y:this.$d.years,YY:t.s(this.$d.years,2,`0`),YYYY:t.s(this.$d.years,4,`0`),M:this.$d.months,MM:t.s(this.$d.months,2,`0`),D:this.$d.days,DD:t.s(this.$d.days,2,`0`),H:this.$d.hours,HH:t.s(this.$d.hours,2,`0`),m:this.$d.minutes,mm:t.s(this.$d.minutes,2,`0`),s:this.$d.seconds,ss:t.s(this.$d.seconds,2,`0`),SSS:t.s(this.$d.milliseconds,3,`0`)};return n.replace(u,(function(e,t){return t||String(r[e])}))},_.as=function(e){return this.$ms/d[m(e)]},_.get=function(e){var t=this.$ms,n=m(e);return n===`milliseconds`?t%=1e3:t=n===`weeks`?g(t/d[n]):this.$d[n],t||0},_.add=function(e,t,n){var r;return r=t?e*d[m(t)]:f(e)?e.$ms:p(e,this).$ms,p(this.$ms+r*(n?-1:1),this)},_.subtract=function(e,t){return this.add(e,t,!0)},_.locale=function(e){var t=this.clone();return t.$l=e,t},_.clone=function(){return p(this.$ms,this)},_.humanize=function(t){return e().add(this.$ms,`ms`).locale(this.$l).fromNow(!t)},_.valueOf=function(){return this.asMilliseconds()},_.milliseconds=function(){return this.get(`milliseconds`)},_.asMilliseconds=function(){return this.as(`milliseconds`)},_.seconds=function(){return this.get(`seconds`)},_.asSeconds=function(){return this.as(`seconds`)},_.minutes=function(){return this.get(`minutes`)},_.asMinutes=function(){return this.as(`minutes`)},_.hours=function(){return this.get(`hours`)},_.asHours=function(){return this.as(`hours`)},_.days=function(){return this.get(`days`)},_.asDays=function(){return this.as(`days`)},_.weeks=function(){return this.get(`weeks`)},_.asWeeks=function(){return this.as(`weeks`)},_.months=function(){return this.get(`months`)},_.asMonths=function(){return this.as(`months`)},_.years=function(){return this.get(`years`)},_.asYears=function(){return this.as(`years`)},h}(),b=function(e,t,n){return e.add(t.years()*n,`y`).add(t.months()*n,`M`).add(t.days()*n,`d`).add(t.hours()*n,`h`).add(t.minutes()*n,`m`).add(t.seconds()*n,`s`).add(t.milliseconds()*n,`ms`)};return function(n,r,i){e=i,t=i().$utils(),i.duration=function(e,t){return p(e,{$l:i.locale()},t)},i.isDuration=f;var a=r.prototype.add,o=r.prototype.subtract;r.prototype.add=function(e,t){return f(e)?b(this,e,1):a.bind(this)(e,t)},r.prototype.subtract=function(e,t){return f(e)?b(this,e,-1):o.bind(this)(e,t)}}}))})),Kot=l({diagram:()=>Ist});function V$(e,t,n){let r=!0;for(;r;)r=!1,n.forEach(function(n){let i=`^\\s*`+n+`\\s*$`,a=new RegExp(i);e[0].match(a)&&(t[n]=!0,e.shift(1),r=!0)})}var qot,H$,Jot,Yot,Xot,U$,Zot,W$,Qot,G$,K$,q$,J$,Y$,X$,Z$,Q$,$$,e1,t1,n1,r1,i1,a1,o1,s1,c1,l1,u1,$ot,est,tst,nst,rst,ist,ast,ost,sst,cst,lst,ust,dst,fst,pst,mst,d1,hst,gst,_st,vst,yst,bst,xst,Sst,f1,Cst,wst,Tst,p1,Est,m1,h1,g1,_1,v1,Dst,Ost,y1,b1,x1,S1,kst,C1,Ast,w1,jst,T1,Mst,E1,Nst,Pst,D1,Fst,O1,k1,Ist,Lst=o((()=>{Kp(),Zs(),S(),h(),qot=Ff(),H$=d(g(),1),Jot=d(Hot(),1),Yot=d(Uot(),1),Xot=d(Wot(),1),U$=d(g(),1),Zot=d(Got(),1),hf(),W$=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],n=[1,26],r=[1,27],i=[1,28],a=[1,29],o=[1,30],s=[1,31],l=[1,32],u=[1,33],d=[1,34],f=[1,9],m=[1,10],h=[1,11],g=[1,12],_=[1,13],v=[1,14],y=[1,15],b=[1,16],x=[1,19],S=[1,20],C=[1,21],w=[1,22],T=[1,23],E=[1,25],D=[1,35],O={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:`error`,4:`gantt`,6:`EOF`,8:`SPACE`,10:`NL`,12:`weekday_monday`,13:`weekday_tuesday`,14:`weekday_wednesday`,15:`weekday_thursday`,16:`weekday_friday`,17:`weekday_saturday`,18:`weekday_sunday`,20:`weekend_friday`,21:`weekend_saturday`,22:`dateFormat`,23:`inclusiveEndDates`,24:`topAxis`,25:`axisFormat`,26:`tickInterval`,27:`excludes`,28:`includes`,29:`todayMarker`,30:`title`,31:`acc_title`,32:`acc_title_value`,33:`acc_descr`,34:`acc_descr_value`,35:`acc_descr_multiline_value`,36:`section`,38:`taskTxt`,39:`taskData`,40:`click`,41:`callbackname`,42:`callbackargs`,43:`href`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setWeekday(`monday`);break;case 9:r.setWeekday(`tuesday`);break;case 10:r.setWeekday(`wednesday`);break;case 11:r.setWeekday(`thursday`);break;case 12:r.setWeekday(`friday`);break;case 13:r.setWeekday(`saturday`);break;case 14:r.setWeekday(`sunday`);break;case 15:r.setWeekend(`friday`);break;case 16:r.setWeekend(`saturday`);break;case 17:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 18:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 19:r.TopAxis(),this.$=a[s].substr(8);break;case 20:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 21:r.setTickInterval(a[s].substr(13)),this.$=a[s].substr(13);break;case 22:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 23:r.setIncludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 24:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 27:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 28:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 29:case 30:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 31:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 33:r.addTask(a[s-1],a[s]),this.$=`task`;break;case 34:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 35:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 36:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 37:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 38:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 39:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 40:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 41:case 47:this.$=a[s-1]+` `+a[s];break;case 42:case 43:case 45:this.$=a[s-2]+` `+a[s-1]+` `+a[s];break;case 44:case 46:this.$=a[s-3]+` `+a[s-2]+` `+a[s-1]+` `+a[s]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:m,24:h,25:g,26:_,27:v,28:y,29:b,30:x,31:S,33:C,35:w,36:T,37:24,38:E,40:D},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:36,11:17,12:n,13:r,14:i,15:a,16:o,17:s,18:l,19:18,20:u,21:d,22:f,23:m,24:h,25:g,26:_,27:v,28:y,29:b,30:x,31:S,33:C,35:w,36:T,37:24,38:E,40:D},e(t,[2,5]),e(t,[2,6]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,20]),e(t,[2,21]),e(t,[2,22]),e(t,[2,23]),e(t,[2,24]),e(t,[2,25]),e(t,[2,26]),e(t,[2,27]),{32:[1,37]},{34:[1,38]},e(t,[2,30]),e(t,[2,31]),e(t,[2,32]),{39:[1,39]},e(t,[2,8]),e(t,[2,9]),e(t,[2,10]),e(t,[2,11]),e(t,[2,12]),e(t,[2,13]),e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),{41:[1,40],43:[1,41]},e(t,[2,4]),e(t,[2,28]),e(t,[2,29]),e(t,[2,33]),e(t,[2,34],{42:[1,42],43:[1,43]}),e(t,[2,40],{41:[1,44]}),e(t,[2,35],{43:[1,45]}),e(t,[2,36]),e(t,[2,38],{42:[1,46]}),e(t,[2,37]),e(t,[2,39])],defaultActions:{},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:1475-`+g.showPosition()+`1476-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};O.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).1477-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`1478-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.1479-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return this.begin(`open_directive`),`open_directive`;case 1:return this.begin(`acc_title`),31;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),33;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:break;case 9:break;case 10:break;case 11:return 10;case 12:break;case 13:break;case 14:this.begin(`href`);break;case 15:this.popState();break;case 16:return 43;case 17:this.begin(`callbackname`);break;case 18:this.popState();break;case 19:this.popState(),this.begin(`callbackargs`);break;case 20:return 41;case 21:this.popState();break;case 22:return 42;case 23:this.begin(`click`);break;case 24:this.popState();break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return`date`;case 45:return 30;case 46:return`accDescription`;case 47:return 36;case 48:return 38;case 49:return 39;case 50:return`:`;case 51:return 6;case 52:return`INVALID`}},`anonymous`),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function k(){this.yy={}}return p(k,`Parser`),k.prototype=O,O.Parser=k,new k})(),W$.parser=W$,Qot=W$,H$.default.extend(Jot.default),H$.default.extend(Yot.default),H$.default.extend(Xot.default),G$={friday:5,saturday:6},K$=``,q$=``,J$=void 0,Y$=``,X$=[],Z$=[],Q$=new Map,$$=[],e1=[],t1=``,n1=``,r1=[`active`,`done`,`crit`,`milestone`,`vert`],i1=[],a1=``,o1=!1,s1=!1,c1=`sunday`,l1=`saturday`,u1=0,$ot=p(function(){$$=[],e1=[],t1=``,i1=[],_1=0,y1=void 0,b1=void 0,x1=[],K$=``,q$=``,n1=``,J$=void 0,Y$=``,X$=[],Z$=[],o1=!1,s1=!1,u1=0,Q$=new Map,a1=``,Is(),c1=`sunday`,l1=`saturday`},`clear`),est=p(function(e){a1=e},`setDiagramId`),tst=p(function(e){q$=e},`setAxisFormat`),nst=p(function(){return q$},`getAxisFormat`),rst=p(function(e){J$=e},`setTickInterval`),ist=p(function(){return J$},`getTickInterval`),ast=p(function(e){Y$=e},`setTodayMarker`),ost=p(function(){return Y$},`getTodayMarker`),sst=p(function(e){K$=e},`setDateFormat`),cst=p(function(){o1=!0},`enableInclusiveEndDates`),lst=p(function(){return o1},`endDatesAreInclusive`),ust=p(function(){s1=!0},`enableTopAxis`),dst=p(function(){return s1},`topAxisEnabled`),fst=p(function(e){n1=e},`setDisplayMode`),pst=p(function(){return n1},`getDisplayMode`),mst=p(function(){return K$},`getDateFormat`),d1=p((e,t)=>{let n=t.toLowerCase().split(/[\s,]+/).filter(e=>e!==``);return[...new Set([...e,...n])]},`mergeTokens`),hst=p(function(e){X$=d1(X$,e)},`setIncludes`),gst=p(function(){return X$},`getIncludes`),_st=p(function(e){Z$=d1(Z$,e)},`setExcludes`),vst=p(function(){return Z$},`getExcludes`),yst=p(function(){return Q$},`getLinks`),bst=p(function(e){t1=e,$$.push(e)},`addSection`),xst=p(function(){return $$},`getSections`),Sst=p(function(){let e=w1(),t=0;for(;!e&&t<10;)e=w1(),t++;return e1=x1,e1},`getTasks`),f1=p(function(e,t,n,r){let i=e.format(t.trim()),a=e.format(`YYYY-MM-DD`);return r.includes(i)||r.includes(a)?!1:n.includes(`weekends`)&&(e.isoWeekday()===G$[l1]||e.isoWeekday()===G$[l1]+1)||n.includes(e.format(`dddd`).toLowerCase())?!0:n.includes(i)||n.includes(a)},`isInvalidDate`),Cst=p(function(e){c1=e},`setWeekday`),wst=p(function(){return c1},`getWeekday`),Tst=p(function(e){l1=e},`setWeekend`),p1=p(function(e,t,n,r){if(!n.length||e.manualEndTime)return;let i;i=e.startTime instanceof Date?(0,H$.default)(e.startTime):(0,H$.default)(e.startTime,t,!0),i=i.add(1,`d`);let a;a=e.endTime instanceof Date?(0,H$.default)(e.endTime):(0,H$.default)(e.endTime,t,!0);let[o,s]=Est(i,a,t,n,r);e.endTime=o.toDate(),e.renderEndTime=s},`checkTaskDates`),Est=p(function(e,t,n,r,i){let a=!1,o=null,s=t.add(1e4,`d`);for(;e<=t;){if(a||(o=t.toDate()),a=f1(e,n,r,i),a&&(t=t.add(1,`d`),t>s))throw Error("Failed to find a valid date that was not excluded by `excludes` after 10,000 iterations.");e=e.add(1,`d`)}return[t,o]},`fixTaskDates`),m1=p(function(e,t,n){if(n=n.trim(),p(e=>{let t=e.trim();return t===`x`||t===`X`},`isTimestampFormat`)(t)&&/^\d+$/.test(n))return new Date(Number(n));let r=/^after\s+(?<ids>[\d\w- ]+)/.exec(n);if(r!==null){let e=null;for(let t of r.groups.ids.split(` `)){let n=C1(t);n!==void 0&&(!e||n.endTime>e.endTime)&&(e=n)}if(e)return e.endTime;let t=new Date;return t.setHours(0,0,0,0),t}let i=(0,H$.default)(n,t.trim(),!0);if(i.isValid())return i.toDate();{y.debug(`Invalid date:`+n),y.debug(`With date format:`+t.trim());let e=new Date(n);if(e===void 0||isNaN(e.getTime())||e.getFullYear()<-1e4||e.getFullYear()>1e4)throw Error(`Invalid date:`+n);return e}},`getStartDate`),h1=p(function(e){let t=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return t===null?[NaN,`ms`]:[Number.parseFloat(t[1]),t[2]]},`parseDuration`),g1=p(function(e,t,n,r=!1){n=n.trim();let i=/^until\s+(?<ids>[\d\w- ]+)/.exec(n);if(i!==null){let e=null;for(let t of i.groups.ids.split(` `)){let n=C1(t);n!==void 0&&(!e||n.startTime<e.startTime)&&(e=n)}if(e)return e.startTime;let t=new Date;return t.setHours(0,0,0,0),t}let a=(0,H$.default)(n,t.trim(),!0);if(a.isValid())return r&&(a=a.add(1,`d`)),a.toDate();let o=(0,H$.default)(e),[s,l]=h1(n);if(!Number.isNaN(s)){let e=o.add(s,l);e.isValid()&&(o=e)}return o.toDate()},`getEndDate`),_1=0,v1=p(function(e){return e===void 0?(_1+=1,`task`+_1):e},`parseId`),Dst=p(function(e,t){let n;n=t.substr(0,1)===`:`?t.substr(1,t.length):t;let r=n.split(`,`),i={};V$(r,i,r1);for(let e=0;e<r.length;e++)r[e]=r[e].trim();let a=``;switch(r.length){case 1:i.id=v1(),i.startTime=e.endTime,a=r[0];break;case 2:i.id=v1(),i.startTime=m1(void 0,K$,r[0]),a=r[1];break;case 3:i.id=v1(r[0]),i.startTime=m1(void 0,K$,r[1]),a=r[2]}return a&&(i.endTime=g1(i.startTime,K$,a,o1),i.manualEndTime=(0,H$.default)(a,`YYYY-MM-DD`,!0).isValid(),p1(i,K$,Z$,X$)),i},`compileData`),Ost=p(function(e,t){let n;n=t.substr(0,1)===`:`?t.substr(1,t.length):t;let r=n.split(`,`),i={};V$(r,i,r1);for(let e=0;e<r.length;e++)r[e]=r[e].trim();switch(r.length){case 1:i.id=v1(),i.startTime={type:`prevTaskEnd`,id:e},i.endTime={data:r[0]};break;case 2:i.id=v1(),i.startTime={type:`getStartDate`,startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=v1(r[0]),i.startTime={type:`getStartDate`,startData:r[1]},i.endTime={data:r[2]}}return i},`parseData`),x1=[],S1={},kst=p(function(e,t){let n={section:t1,type:t1,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:t},task:e,classes:[]},r=Ost(b1,t);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=b1,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,n.vert?n.order=-1:(n.order=u1,u1++);let i=x1.push(n);b1=n.id,S1[n.id]=i-1},`addTask`),C1=p(function(e){let t=S1[e];return x1[t]},`findTaskById`),Ast=p(function(e,t){let n={section:t1,type:t1,description:e,task:e,classes:[]},r=Dst(y1,t);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.vert=r.vert,y1=n,e1.push(n)},`addTaskOrg`),w1=p(function(){let e=p(function(e){let t=x1[e],n=``;switch(x1[e].raw.startTime.type){case`prevTaskEnd`:t.startTime=C1(t.prevTaskId).endTime;break;case`getStartDate`:n=m1(void 0,K$,x1[e].raw.startTime.startData),n&&(x1[e].startTime=n)}return x1[e].startTime&&(x1[e].endTime=g1(x1[e].startTime,K$,x1[e].raw.endTime.data,o1),x1[e].endTime&&(x1[e].processed=!0,x1[e].manualEndTime=(0,H$.default)(x1[e].raw.endTime.data,`YYYY-MM-DD`,!0).isValid(),p1(x1[e],K$,Z$,X$))),x1[e].processed},`compileTask`),t=!0;for(let[n,r]of x1.entries())e(n),t&&=r.processed;return t},`compileTasks`),jst=p(function(e,t){let n=t;Z().securityLevel!==`loose`&&(n=(0,qot.sanitizeUrl)(t)),e.split(`,`).forEach(function(e){C1(e)!==void 0&&(E1(e,()=>{window.open(n,`_self`)}),Q$.set(e,n))}),T1(e,`clickable`)},`setLink`),T1=p(function(e,t){e.split(`,`).forEach(function(e){let n=C1(e);n!==void 0&&n.classes.push(t)})},`setClass`),Mst=p(function(e,t,n){if(Z().securityLevel!==`loose`||t===void 0)return;let r=[];if(typeof n==`string`){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e<r.length;e++){let t=r[e].trim();t.startsWith(`"`)&&t.endsWith(`"`)&&(t=t.substr(1,t.length-2)),r[e]=t}}r.length===0&&r.push(e),C1(e)!==void 0&&E1(e,()=>{Up.runFunc(t,...r)})},`setClickFun`),E1=p(function(e,t){i1.push(function(){let n=a1?`${a1}-${e}`:e,r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,function(){t()})},function(){let n=a1?`${a1}-${e}`:e,r=document.querySelector(`[id="${n}-text"]`);r!==null&&r.addEventListener(`click`,function(){t()})})},`pushFun`),Nst={getConfig:p(()=>Z().gantt,`getConfig`),clear:$ot,setDateFormat:sst,getDateFormat:mst,enableInclusiveEndDates:cst,endDatesAreInclusive:lst,enableTopAxis:ust,topAxisEnabled:dst,setAxisFormat:tst,getAxisFormat:nst,setTickInterval:rst,getTickInterval:ist,setTodayMarker:ast,getTodayMarker:ost,setAccTitle:Ls,getAccTitle:Rs,setDiagramTitle:Vs,getDiagramTitle:Hs,setDiagramId:est,setDisplayMode:fst,getDisplayMode:pst,setAccDescription:zs,getAccDescription:Bs,addSection:bst,getSections:xst,getTasks:Sst,addTask:kst,findTaskById:C1,addTaskOrg:Ast,setIncludes:hst,getIncludes:gst,setExcludes:_st,getExcludes:vst,setClickEvent:p(function(e,t,n){e.split(`,`).forEach(function(e){Mst(e,t,n)}),T1(e,`clickable`)},`setClickEvent`),setLink:jst,getLinks:yst,bindFunctions:p(function(e){i1.forEach(function(t){t(e)})},`bindFunctions`),parseDuration:h1,isInvalidDate:f1,setWeekday:Cst,getWeekday:wst,setWeekend:Tst},p(V$,`getTaskTags`),U$.default.extend(Zot.default),Pst=p(function(){y.debug(`Something is calling, setConf, remove the call`)},`setConf`),D1={monday:ad,tuesday:od,wednesday:sd,thursday:cd,friday:ld,saturday:ud,sunday:id},Fst=p((e,t)=>{let n=[...e].map(()=>-1/0),r=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(let e of r)for(let r=0;r<n.length;r++)if(e.startTime>=n[r]){n[r]=e.endTime,e.order=r+t,r>i&&(i=r);break}return i},`getMaxIntersections`),k1=1e4,Ist={parser:Qot,db:Nst,renderer:{setConf:Pst,draw:p(function(e,t,n,r){let i=Z().gantt;r.db.setDiagramId(t);let a=Z().securityLevel,o;a===`sandbox`&&(o=Ac(`#i`+t));let s=Ac(a===`sandbox`?o.nodes()[0].contentDocument.body:`body`),l=a===`sandbox`?o.nodes()[0].contentDocument:document,u=l.getElementById(t);O1=u.parentElement.offsetWidth,O1===void 0&&(O1=1200),i.useWidth!==void 0&&(O1=i.useWidth);let d=r.db.getTasks(),f=d.filter(e=>!e.vert),m=[];for(let e of f)m.push(e.type);m=O(m);let h={},g=2*i.topPadding;if(r.db.getDisplayMode()===`compact`||i.displayMode===`compact`){let e={};for(let t of f)e[t.section]===void 0?e[t.section]=[t]:e[t.section].push(t);let t=0;for(let n of Object.keys(e)){let r=Fst(e[n],t)+1;t+=r,g+=r*(i.barHeight+i.barGap),h[n]=r}}else{g+=f.length*(i.barHeight+i.barGap);for(let e of m)h[e]=f.filter(t=>t.type===e).length}u.setAttribute(`viewBox`,`0 0 `+O1+` `+g);let _=s.select(`[id="${t}"]`),v=fpe().domain([Sre(d,function(e){return e.startTime}),bre(d,function(e){return e.endTime})]).rangeRound([0,O1-i.leftPadding-i.rightPadding]);function b(e,t){let n=e.startTime,r=t.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i}p(b,`taskCompare`),d.sort(b),x(d,O1,g),Os(_,g,O1,i.useMaxWidth),_.append(`text`).text(r.db.getDiagramTitle()).attr(`x`,O1/2).attr(`y`,i.titleTopMargin).attr(`class`,`titleText`);function x(e,t,n){let a=i.barHeight,o=a+i.barGap,s=i.topPadding,l=i.leftPadding,u=Pu().domain([0,m.length]).range([`#00B9FA`,`#F95002`]).interpolate(Ese);C(o,s,l,t,n,e,r.db.getExcludes(),r.db.getIncludes()),T(l,s,t,n),S(e,o,s,l,a,u,t,n),E(o,s,l,a,u),D(l,s,t,n)}p(x,`makeGantt`);function S(e,n,a,o,s,l,u){e.sort((e,t)=>e.vert===t.vert?0:e.vert?1:-1);let d=e.filter(e=>!e.vert),f=[...new Set(d.map(e=>e.order))].map(e=>d.find(t=>t.order===e));_.append(`g`).selectAll(`rect`).data(f).enter().append(`rect`).attr(`x`,0).attr(`y`,function(e,t){return t=e.order,t*n+a-2}).attr(`width`,function(){return u-i.rightPadding/2}).attr(`height`,n).attr(`class`,function(e){for(let[t,n]of m.entries())if(e.type===n)return`section section`+t%i.numberSectionStyles;return`section section0`}).enter();let p=_.append(`g`).selectAll(`rect`).data(e).enter(),h=r.db.getLinks();if(p.append(`rect`).attr(`id`,function(e){return t+`-`+e.id}).attr(`rx`,3).attr(`ry`,3).attr(`x`,function(e){return e.milestone?v(e.startTime)+o+.5*(v(e.endTime)-v(e.startTime))-.5*s:v(e.startTime)+o}).attr(`y`,function(e,t){return t=e.order,e.vert?i.gridLineStartPadding:t*n+a}).attr(`width`,function(e){return e.milestone?s:e.vert?.08*s:v(e.renderEndTime||e.endTime)-v(e.startTime)}).attr(`height`,function(e){return e.vert?d.length*(i.barHeight+i.barGap)+i.barHeight*2:s}).attr(`transform-origin`,function(e,t){return t=e.order,(v(e.startTime)+o+.5*(v(e.endTime)-v(e.startTime))).toString()+`px `+(t*n+a+.5*s).toString()+`px`}).attr(`class`,function(e){let t=``;e.classes.length>0&&(t=e.classes.join(` `));let n=0;for(let[t,r]of m.entries())e.type===r&&(n=t%i.numberSectionStyles);let r=``;return e.active?e.crit?r+=` activeCrit`:r=` active`:e.done?r=e.crit?` doneCrit`:` done`:e.crit&&(r+=` crit`),r.length===0&&(r=` task`),e.milestone&&(r=` milestone `+r),e.vert&&(r=` vert `+r),r+=n,r+=` `+t,`task`+r}),p.append(`text`).attr(`id`,function(e){return t+`-`+e.id+`-text`}).text(function(e){return e.task}).attr(`font-size`,i.fontSize).attr(`x`,function(e){let t=v(e.startTime),n=v(e.renderEndTime||e.endTime);if(e.milestone&&(t+=.5*(v(e.endTime)-v(e.startTime))-.5*s,n=t+s),e.vert)return v(e.startTime)+o;let r=this.getBBox().width;return r>n-t?n+r+1.5*i.leftPadding>u?t+o-5:n+o+5:(n-t)/2+t+o}).attr(`y`,function(e,t){return e.vert?i.gridLineStartPadding+d.length*(i.barHeight+i.barGap)+60:(t=e.order,t*n+i.barHeight/2+(i.fontSize/2-2)+a)}).attr(`text-height`,s).attr(`class`,function(e){let t=v(e.startTime),n=v(e.endTime);e.milestone&&(n=t+s);let r=this.getBBox().width,a=``;e.classes.length>0&&(a=e.classes.join(` `));let o=0;for(let[t,n]of m.entries())e.type===n&&(o=t%i.numberSectionStyles);let l=``;return e.active&&(l=e.crit?`activeCritText`+o:`activeText`+o),e.done?l=e.crit?l+` doneCritText`+o:l+` doneText`+o:e.crit&&(l=l+` critText`+o),e.milestone&&(l+=` milestoneText`),e.vert&&(l+=` vertText`),r>n-t?n+r+1.5*i.leftPadding>u?a+` taskTextOutsideLeft taskTextOutside`+o+` `+l:a+` taskTextOutsideRight taskTextOutside`+o+` `+l+` width-`+r:a+` taskText taskText`+o+` `+l+` width-`+r}),Z().securityLevel===`sandbox`){let e;e=Ac(`#i`+t);let n=e.nodes()[0].contentDocument;p.filter(function(e){return h.has(e.id)}).each(function(e){var r=n.querySelector(`#`+CSS.escape(t+`-`+e.id)),i=n.querySelector(`#`+CSS.escape(t+`-`+e.id+`-text`));let a=r.parentNode;var o=n.createElement(`a`);o.setAttribute(`xlink:href`,h.get(e.id)),o.setAttribute(`target`,`_top`),a.appendChild(o),o.appendChild(r),o.appendChild(i)})}}p(S,`drawRects`);function C(e,n,a,o,s,l,u,d){if(u.length===0&&d.length===0)return;let f,p;for(let{startTime:e,endTime:t}of l)(f===void 0||e<f)&&(f=e),(p===void 0||t>p)&&(p=t);if(!f||!p)return;if((0,U$.default)(p).diff((0,U$.default)(f),`year`)>5){y.warn(`The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.`);return}let m=r.db.getDateFormat(),h=[],g=null,b=(0,U$.default)(f);for(;b.valueOf()<=p;)r.db.isInvalidDate(b,m,u,d)?g?g.end=b:g={start:b,end:b}:g&&=(h.push(g),null),b=b.add(1,`d`);_.append(`g`).selectAll(`rect`).data(h).enter().append(`rect`).attr(`id`,e=>t+`-exclude-`+e.start.format(`YYYY-MM-DD`)).attr(`x`,e=>v(e.start.startOf(`day`))+a).attr(`y`,i.gridLineStartPadding).attr(`width`,e=>v(e.end.endOf(`day`))-v(e.start.startOf(`day`))).attr(`height`,s-n-i.gridLineStartPadding).attr(`transform-origin`,function(t,n){return(v(t.start)+a+.5*(v(t.end)-v(t.start))).toString()+`px `+(n*e+.5*s).toString()+`px`}).attr(`class`,`exclude-range`)}p(C,`drawExcludeDays`);function w(e,t,n,r){if(n<=0||e>t)return 1/0;let i=t-e,a=U$.default.duration({[r??`day`]:n}).asMilliseconds();return a<=0?1/0:Math.ceil(i/a)}p(w,`getEstimatedTickCount`);function T(e,t,n,a){let o=r.db.getDateFormat(),s=r.db.getAxisFormat(),l;l=s||(o===`D`?`%d`:i.axisFormat??`%Y-%m-%d`);let u=Fre(v).tickSize(-a+t+i.gridLineStartPadding).tickFormat(Od(l)),d=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(d!==null){let e=parseInt(d[1],10);if(isNaN(e)||e<=0)y.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);else{let t=d[2],n=r.db.getWeekday()||i.weekday,a=v.domain(),o=a[0],s=a[1],l=w(o,s,e,t);if(l>k1)y.warn(`The tick interval "${e}${t}" would generate ${l} ticks, which exceeds the maximum allowed (${k1}). This may indicate an invalid date or time range. Skipping custom tick interval.`);else switch(t){case`millisecond`:u.ticks(zu.every(e));break;case`second`:u.ticks(Ju.every(e));break;case`minute`:u.ticks(Yu.every(e));break;case`hour`:u.ticks(Zu.every(e));break;case`day`:u.ticks($u.every(e));break;case`week`:u.ticks(D1[n].every(e));break;case`month`:u.ticks(md.every(e))}}}if(_.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+(a-50)+`)`).call(u).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10).attr(`dy`,`1em`),r.db.topAxisEnabled()||i.topAxis){let n=Pre(v).tickSize(-a+t+i.gridLineStartPadding).tickFormat(Od(l));if(d!==null){let e=parseInt(d[1],10);if(isNaN(e)||e<=0)y.warn(`Invalid tick interval value: "${d[1]}". Skipping custom tick interval.`);else{let t=d[2],a=r.db.getWeekday()||i.weekday,o=v.domain(),s=o[0],l=o[1];if(w(s,l,e,t)<=k1)switch(t){case`millisecond`:n.ticks(zu.every(e));break;case`second`:n.ticks(Ju.every(e));break;case`minute`:n.ticks(Yu.every(e));break;case`hour`:n.ticks(Zu.every(e));break;case`day`:n.ticks($u.every(e));break;case`week`:n.ticks(D1[a].every(e));break;case`month`:n.ticks(md.every(e))}}}_.append(`g`).attr(`class`,`grid`).attr(`transform`,`translate(`+e+`, `+t+`)`).call(n).selectAll(`text`).style(`text-anchor`,`middle`).attr(`fill`,`#000`).attr(`stroke`,`none`).attr(`font-size`,10)}}p(T,`makeGrid`);function E(e,t){let n=0,r=Object.keys(h).map(e=>[e,h[e]]);_.append(`g`).selectAll(`text`).data(r).enter().append(function(e){let t=e[0].split(Ds.lineBreakRegex),n=-(t.length-1)/2,r=l.createElementNS(`http://www.w3.org/2000/svg`,`text`);r.setAttribute(`dy`,n+`em`);for(let[e,n]of t.entries()){let t=l.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);t.setAttribute(`alignment-baseline`,`central`),t.setAttribute(`x`,`10`),e>0&&t.setAttribute(`dy`,`1em`),t.textContent=n,r.appendChild(t)}return r}).attr(`x`,10).attr(`y`,function(i,a){if(a>0)for(let o=0;o<a;o++)return n+=r[a-1][1],i[1]*e/2+n*e+t;else return i[1]*e/2+t}).attr(`font-size`,i.sectionFontSize).attr(`class`,function(e){for(let[t,n]of m.entries())if(e[0]===n)return`sectionTitle sectionTitle`+t%i.numberSectionStyles;return`sectionTitle`})}p(E,`vertLabels`);function D(e,t,n,a){let o=r.db.getTodayMarker();if(o===`off`)return;let s=_.append(`g`).attr(`class`,`today`),l=new Date,u=s.append(`line`);u.attr(`x1`,v(l)+e).attr(`x2`,v(l)+e).attr(`y1`,i.titleTopMargin).attr(`y2`,a-i.titleTopMargin).attr(`class`,`today`),o!==``&&u.attr(`style`,o.replace(/,/g,`;`))}p(D,`drawToday`);function O(e){let t={},n=[];for(let r=0,i=e.length;r<i;++r)Object.prototype.hasOwnProperty.call(t,e[r])||(t[e[r]]=!0,n.push(e[r]));return n}p(O,`checkUnique`)},`draw`)},styles:p(e=>`1480- .mermaid-main-font {1481- font-family: ${e.fontFamily};1482- }1483-1484- .exclude-range {1485- fill: ${e.excludeBkgColor};1486- }1487-1488- .section {1489- stroke: none;1490- opacity: 0.2;1491- }1492-1493- .section0 {1494- fill: ${e.sectionBkgColor};1495- }1496-1497- .section2 {1498- fill: ${e.sectionBkgColor2};1499- }1500-1501- .section1,1502- .section3 {1503- fill: ${e.altSectionBkgColor};1504- opacity: 0.2;1505- }1506-1507- .sectionTitle0 {1508- fill: ${e.titleColor};1509- }1510-1511- .sectionTitle1 {1512- fill: ${e.titleColor};1513- }1514-1515- .sectionTitle2 {1516- fill: ${e.titleColor};1517- }1518-1519- .sectionTitle3 {1520- fill: ${e.titleColor};1521- }1522-1523- .sectionTitle {1524- text-anchor: start;1525- font-family: ${e.fontFamily};1526- }1527-1528-1529- /* Grid and axis */1530-1531- .grid .tick {1532- stroke: ${e.gridColor};1533- opacity: 0.8;1534- shape-rendering: crispEdges;1535- }1536-1537- .grid .tick text {1538- font-family: ${e.fontFamily};1539- fill: ${e.textColor};1540- }1541-1542- .grid path {1543- stroke-width: 0;1544- }1545-1546-1547- /* Today line */1548-1549- .today {1550- fill: none;1551- stroke: ${e.todayLineColor};1552- stroke-width: 2px;1553- }1554-1555-1556- /* Task styling */1557-1558- /* Default task */1559-1560- .task {1561- stroke-width: 2;1562- }1563-1564- .taskText {1565- text-anchor: middle;1566- font-family: ${e.fontFamily};1567- }1568-1569- .taskTextOutsideRight {1570- fill: ${e.taskTextDarkColor};1571- text-anchor: start;1572- font-family: ${e.fontFamily};1573- }1574-1575- .taskTextOutsideLeft {1576- fill: ${e.taskTextDarkColor};1577- text-anchor: end;1578- }1579-1580-1581- /* Special case clickable */1582-1583- .task.clickable {1584- cursor: pointer;1585- }1586-1587- .taskText.clickable {1588- cursor: pointer;1589- fill: ${e.taskTextClickableColor} !important;1590- font-weight: bold;1591- }1592-1593- .taskTextOutsideLeft.clickable {1594- cursor: pointer;1595- fill: ${e.taskTextClickableColor} !important;1596- font-weight: bold;1597- }1598-1599- .taskTextOutsideRight.clickable {1600- cursor: pointer;1601- fill: ${e.taskTextClickableColor} !important;1602- font-weight: bold;1603- }1604-1605-1606- /* Specific task settings for the sections*/1607-1608- .taskText0,1609- .taskText1,1610- .taskText2,1611- .taskText3 {1612- fill: ${e.taskTextColor};1613- }1614-1615- .task0,1616- .task1,1617- .task2,1618- .task3 {1619- fill: ${e.taskBkgColor};1620- stroke: ${e.taskBorderColor};1621- }1622-1623- .taskTextOutside0,1624- .taskTextOutside21625- {1626- fill: ${e.taskTextOutsideColor};1627- }1628-1629- .taskTextOutside1,1630- .taskTextOutside3 {1631- fill: ${e.taskTextOutsideColor};1632- }1633-1634-1635- /* Active task */1636-1637- .active0,1638- .active1,1639- .active2,1640- .active3 {1641- fill: ${e.activeTaskBkgColor};1642- stroke: ${e.activeTaskBorderColor};1643- }1644-1645- .activeText0,1646- .activeText1,1647- .activeText2,1648- .activeText3 {1649- fill: ${e.taskTextDarkColor} !important;1650- }1651-1652-1653- /* Completed task */1654-1655- .done0,1656- .done1,1657- .done2,1658- .done3 {1659- stroke: ${e.doneTaskBorderColor};1660- fill: ${e.doneTaskBkgColor};1661- stroke-width: 2;1662- }1663-1664- .doneText0,1665- .doneText1,1666- .doneText2,1667- .doneText3 {1668- fill: ${e.taskTextDarkColor} !important;1669- }1670-1671- /* Done task text displayed outside the bar sits against the diagram background,1672- not against the done-task bar, so it must use the outside/contrast color. */1673- .doneText0.taskTextOutsideLeft,1674- .doneText0.taskTextOutsideRight,1675- .doneText1.taskTextOutsideLeft,1676- .doneText1.taskTextOutsideRight,1677- .doneText2.taskTextOutsideLeft,1678- .doneText2.taskTextOutsideRight,1679- .doneText3.taskTextOutsideLeft,1680- .doneText3.taskTextOutsideRight {1681- fill: ${e.taskTextOutsideColor} !important;1682- }1683-1684-1685- /* Tasks on the critical line */1686-1687- .crit0,1688- .crit1,1689- .crit2,1690- .crit3 {1691- stroke: ${e.critBorderColor};1692- fill: ${e.critBkgColor};1693- stroke-width: 2;1694- }1695-1696- .activeCrit0,1697- .activeCrit1,1698- .activeCrit2,1699- .activeCrit3 {1700- stroke: ${e.critBorderColor};1701- fill: ${e.activeTaskBkgColor};1702- stroke-width: 2;1703- }1704-1705- .doneCrit0,1706- .doneCrit1,1707- .doneCrit2,1708- .doneCrit3 {1709- stroke: ${e.critBorderColor};1710- fill: ${e.doneTaskBkgColor};1711- stroke-width: 2;1712- cursor: pointer;1713- shape-rendering: crispEdges;1714- }1715-1716- .milestone {1717- transform: rotate(45deg) scale(0.8,0.8);1718- }1719-1720- .milestoneText {1721- font-style: italic;1722- }1723- .doneCritText0,1724- .doneCritText1,1725- .doneCritText2,1726- .doneCritText3 {1727- fill: ${e.taskTextDarkColor} !important;1728- }1729-1730- /* Done-crit task text outside the bar \u2014 same reasoning as doneText above. */1731- .doneCritText0.taskTextOutsideLeft,1732- .doneCritText0.taskTextOutsideRight,1733- .doneCritText1.taskTextOutsideLeft,1734- .doneCritText1.taskTextOutsideRight,1735- .doneCritText2.taskTextOutsideLeft,1736- .doneCritText2.taskTextOutsideRight,1737- .doneCritText3.taskTextOutsideLeft,1738- .doneCritText3.taskTextOutsideRight {1739- fill: ${e.taskTextOutsideColor} !important;1740- }1741-1742- .vert {1743- stroke: ${e.vertLineColor};1744- }1745-1746- .vertText {1747- font-size: 15px;1748- text-anchor: middle;1749- fill: ${e.vertLineColor} !important;1750- }1751-1752- .activeCritText0,1753- .activeCritText1,1754- .activeCritText2,1755- .activeCritText3 {1756- fill: ${e.taskTextDarkColor} !important;1757- }1758-1759- .titleText {1760- text-anchor: middle;1761- font-size: 18px;1762- fill: ${e.titleColor||e.textColor};1763- font-family: ${e.fontFamily};1764- }1765-`,`getStyles`)}})),Rst=l({diagram:()=>Vst}),zst,Bst,Vst,Hst=o((()=>{_f(),Zs(),S(),h(),l$(),zst={parse:p(async e=>{let t=await o$(`info`,e);y.debug(t)},`parse`)},Bst={version:`11.17.0`},Vst={parser:zst,db:{getVersion:p(()=>Bst.version,`getVersion`)},renderer:{draw:p((e,t,n)=>{y.debug(`rendering info diagram1766-`+e);let r=gf(t);Os(r,100,400,!0),r.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${n}`)},`draw`)}}})),Ust=l({diagram:()=>Yst}),A1,j1,M1,N1,Wst,P1,Gst,Kst,qst,Jst,Yst,Xst=o((()=>{EF(),_f(),Kp(),Zs(),S(),h(),l$(),hf(),A1=Ho.pie,j1={sections:new Map,showData:!1,config:A1},M1=j1.sections,N1=j1.showData,Wst=structuredClone(A1),P1={getConfig:p(()=>structuredClone(Wst),`getConfig`),clear:p(()=>{M1=new Map,N1=j1.showData,Is()},`clear`),setDiagramTitle:Vs,getDiagramTitle:Hs,setAccTitle:Ls,getAccTitle:Rs,setAccDescription:zs,getAccDescription:Bs,addSection:p(({label:e,value:t})=>{if(t<0)throw Error(`"${e}" has invalid value: ${t}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);M1.has(e)||(M1.set(e,t),y.debug(`added new section: ${e}, with value: ${t}`))},`addSection`),getSections:p(()=>M1,`getSections`),setShowData:p(e=>{N1=e},`setShowData`),getShowData:p(()=>N1,`getShowData`)},Gst=p((e,t)=>{TF(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},`populateDb`),Kst={parse:p(async e=>{let t=await o$(`pie`,e);y.debug(t),Gst(t,P1)},`parse`)},qst=p(e=>`1767- .pieCircle{1768- stroke: ${e.pieStrokeColor};1769- stroke-width : ${e.pieStrokeWidth};1770- opacity : ${e.pieOpacity};1771- }1772- .pieCircle.highlighted{1773- scale: 1.05;1774- opacity: 1;1775- }1776- .pieCircle.highlightedOnHover:hover{1777- transition-duration: 250ms;1778- scale: 1.05;1779- opacity: 1;1780- }1781- .pieOuterCircle{1782- stroke: ${e.pieOuterStrokeColor};1783- stroke-width: ${e.pieOuterStrokeWidth};1784- fill: none;1785- }1786- .pieTitleText {1787- text-anchor: middle;1788- font-size: ${e.pieTitleTextSize};1789- fill: ${e.pieTitleTextColor};1790- font-family: ${e.fontFamily};1791- }1792- .slice {1793- font-family: ${e.fontFamily};1794- fill: ${e.pieSectionTextColor};1795- font-size:${e.pieSectionTextSize};1796- // fill: white;1797- }1798- .legend text {1799- fill: ${e.pieLegendTextColor};1800- font-family: ${e.fontFamily};1801- font-size: ${e.pieLegendTextSize};1802- }1803-`,`getStyles`),Jst=p(e=>{let t=[...e.values()].reduce((e,t)=>e+t,0),n=[...e.entries()].map(([e,t])=>({label:e,value:t})).filter(e=>e.value/t*100>=1);return Hpe().value(e=>e.value).sort(null)(n)},`createPieArcs`),Yst={parser:Kst,db:P1,renderer:{draw:p((e,t,n,r)=>{y.debug(`rendering pie chart1804-`+e);let i=r.db,a=Z(),o=jp(i.getConfig(),a.pie),s=gf(t),l=s.append(`g`);l.attr(`transform`,`translate(225,225)`);let{themeVariables:u}=a,[d]=Hp(u.pieOuterStrokeWidth);d??=2;let f=o.legendPosition,p=o.textPosition,m=o.donutHole>0&&o.donutHole<=.9?o.donutHole:0,h=Wd().innerRadius(m*185).outerRadius(185),g=Wd().innerRadius(185*p).outerRadius(185*p),_=l.append(`g`);_.append(`circle`).attr(`cx`,0).attr(`cy`,0).attr(`r`,185+d/2).attr(`class`,`pieOuterCircle`);let v=i.getSections(),b=Jst(v),x=[u.pie1,u.pie2,u.pie3,u.pie4,u.pie5,u.pie6,u.pie7,u.pie8,u.pie9,u.pie10,u.pie11,u.pie12],S=0;v.forEach(e=>{S+=e});let C=b.filter(e=>(e.data.value/S*100).toFixed(0)!==`0`),w=Du(x).domain([...v.keys()]);_.selectAll(`mySlices`).data(C).enter().append(`path`).attr(`d`,h).attr(`fill`,e=>w(e.data.label)).attr(`class`,e=>{let t=`pieCircle`;return o.highlightSlice===`hover`?t+=` highlightedOnHover`:o.highlightSlice===e.data.label&&(t+=` highlighted`),t}),_.selectAll(`mySlices`).data(C).enter().append(`text`).text(e=>(e.data.value/S*100).toFixed(0)+`%`).attr(`transform`,e=>`translate(`+g.centroid(e)+`)`).style(`text-anchor`,`middle`).attr(`class`,`slice`);let T=l.append(`text`).text(i.getDiagramTitle()).attr(`x`,0).attr(`y`,-200).attr(`class`,`pieTitleText`),E=[...v.entries()].map(([e,t])=>({label:e,value:t})),D=l.selectAll(`.legend`).data(E).enter().append(`g`).attr(`class`,`legend`);D.append(`rect`).attr(`width`,18).attr(`height`,18).style(`fill`,e=>w(e.label)).style(`stroke`,e=>w(e.label)),D.append(`text`).attr(`x`,22).attr(`y`,14).text(e=>i.getShowData()?`${e.label} [${e.value}]`:e.label);let O=Math.max(...D.selectAll(`text`).nodes().map(e=>e?.getBoundingClientRect().width??0)),k=450,A=490,j=E.length*22;switch(f){case`center`:D.attr(`transform`,(e,t)=>{let n=22*E.length/2,r=-O/2-22,i=t*22-n;return`translate(`+r+`,`+i+`)`});break;case`top`:k+=j,D.attr(`transform`,(e,t)=>`translate(${-O/2-22}, ${t*22-185})`),_.attr(`transform`,()=>`translate(0, ${j+22})`);break;case`bottom`:k+=j,D.attr(`transform`,(e,t)=>{let n=-O/2-22,r=t*22- -207;return`translate(`+n+`,`+r+`)`});break;case`left`:A+=22+O,D.attr(`transform`,(e,t)=>{let n=22*E.length/2;return`translate(-207,`+(t*22-n)+`)`}),_.attr(`transform`,()=>`translate(${O+18+4}, 0)`);break;default:A+=22+O,D.attr(`transform`,(e,t)=>{let n=22*E.length/2;return`translate(216,`+(t*22-n)+`)`})}let M=T.node()?.getBoundingClientRect().width??0,N=225-M/2,P=225+M/2,F=Math.min(0,N),I=Math.max(A,P)-F;s.attr(`viewBox`,`${F} 0 ${I} ${k}`),Os(s,k,I,o.useMaxWidth)},`draw`)},styles:qst}})),Zst=l({diagram:()=>gct});function F1(e){return!/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/.test(e)}function Qst(e){return!/^\d+$/.test(e)}function $st(e){return!/^\d+px$/.test(e)}function I1(e){return _s(e.trim(),Z())}function ect(e){V1.setData({quadrant1Text:I1(e.text)})}function tct(e){V1.setData({quadrant2Text:I1(e.text)})}function nct(e){V1.setData({quadrant3Text:I1(e.text)})}function rct(e){V1.setData({quadrant4Text:I1(e.text)})}function ict(e){V1.setData({xAxisLeftText:I1(e.text)})}function act(e){V1.setData({xAxisRightText:I1(e.text)})}function oct(e){V1.setData({yAxisTopText:I1(e.text)})}function sct(e){V1.setData({yAxisBottomText:I1(e.text)})}function L1(e){let t={};for(let n of e){let[e,r]=n.trim().split(/\s*:\s*/);if(e===`radius`){if(Qst(r))throw new B1(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(F1(r))throw new B1(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(F1(r))throw new B1(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if($st(r))throw new B1(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw Error(`style named ${e} is not supported.`)}return t}function cct(e,t,n,r,i){let a=L1(i);V1.addPoints([{x:n,y:r,text:I1(e.text),className:t,...a}])}function lct(e,t){V1.addClass(e,L1(t))}function uct(e){V1.setConfig({chartWidth:e})}function dct(e){V1.setConfig({chartHeight:e})}function fct(){let{themeVariables:e,quadrantChart:t}=Z();return t&&V1.setConfig(t),V1.setThemeConfig({quadrant1Fill:e.quadrant1Fill,quadrant2Fill:e.quadrant2Fill,quadrant3Fill:e.quadrant3Fill,quadrant4Fill:e.quadrant4Fill,quadrant1TextFill:e.quadrant1TextFill,quadrant2TextFill:e.quadrant2TextFill,quadrant3TextFill:e.quadrant3TextFill,quadrant4TextFill:e.quadrant4TextFill,quadrantPointFill:e.quadrantPointFill,quadrantPointTextFill:e.quadrantPointTextFill,quadrantXAxisTextFill:e.quadrantXAxisTextFill,quadrantYAxisTextFill:e.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:e.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:e.quadrantInternalBorderStrokeFill,quadrantTitleFill:e.quadrantTitleFill}),V1.setData({titleText:Hs()}),V1.build()}var R1,pct,z1,mct,B1,V1,hct,gct,_ct=o((()=>{Zs(),S(),h(),hf(),R1=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[1,7],o=[1,4,5,10,12,13,14,15,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],s=[1,4,5,10,12,13,14,15,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],l=[55,56,57],u=[2,36],d=[1,37],f=[1,36],m=[1,38],h=[1,35],g=[1,43],_=[1,41],v=[1,45],y=[1,14],b=[1,23],x=[1,18],S=[1,19],C=[1,20],w=[1,21],T=[1,22],E=[1,24],D=[1,25],O=[1,26],k=[1,27],A=[1,28],j=[1,29],M=[1,32],N=[1,33],P=[1,34],F=[1,39],I=[1,40],L=[1,42],R=[1,44],ee=[1,63],z=[1,62],B=[4,5,8,10,12,13,14,15,18,44,47,49,55,56,57,63,64,65,66,67],te=[1,66],ne=[1,67],re=[1,68],ie=[1,69],ae=[1,70],oe=[1,71],se=[1,72],ce=[1,73],le=[1,74],ue=[1,75],de=[1,76],fe=[1,77],pe=[4,5,6,7,8,9,10,11,12,13,14,15,18],me=[1,91],he=[1,92],ge=[1,93],_e=[1,100],ve=[1,94],ye=[1,97],be=[1,95],xe=[1,96],Se=[1,98],V=[1,99],Ce=[1,103],we=[10,55,56,57],Te=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],Ee={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,idStringToken:3,ALPHA:4,NUM:5,NODE_STRING:6,DOWN:7,MINUS:8,DEFAULT:9,COMMA:10,COLON:11,AMP:12,BRKT:13,MULT:14,UNICODE_TEXT:15,styleComponent:16,UNIT:17,SPACE:18,STYLE:19,PCT:20,idString:21,style:22,stylesOpt:23,classDefStatement:24,CLASSDEF:25,start:26,eol:27,QUADRANT:28,document:29,line:30,statement:31,axisDetails:32,quadrantDetails:33,points:34,title:35,title_value:36,acc_title:37,acc_title_value:38,acc_descr:39,acc_descr_value:40,acc_descr_multiline_value:41,section:42,text:43,point_start:44,point_x:45,point_y:46,class_name:47,"X-AXIS":48,"AXIS-TEXT-DELIMITER":49,"Y-AXIS":50,QUADRANT_1:51,QUADRANT_2:52,QUADRANT_3:53,QUADRANT_4:54,NEWLINE:55,SEMI:56,EOF:57,alphaNumToken:58,textNoTagsToken:59,STR:60,MD_STR:61,alphaNum:62,PUNCTUATION:63,PLUS:64,EQUALS:65,DOT:66,UNDERSCORE:67,$accept:0,$end:1},terminals_:{2:`error`,4:`ALPHA`,5:`NUM`,6:`NODE_STRING`,7:`DOWN`,8:`MINUS`,9:`DEFAULT`,10:`COMMA`,11:`COLON`,12:`AMP`,13:`BRKT`,14:`MULT`,15:`UNICODE_TEXT`,17:`UNIT`,18:`SPACE`,19:`STYLE`,20:`PCT`,25:`CLASSDEF`,28:`QUADRANT`,35:`title`,36:`title_value`,37:`acc_title`,38:`acc_title_value`,39:`acc_descr`,40:`acc_descr_value`,41:`acc_descr_multiline_value`,42:`section`,44:`point_start`,45:`point_x`,46:`point_y`,47:`class_name`,48:`X-AXIS`,49:`AXIS-TEXT-DELIMITER`,50:`Y-AXIS`,51:`QUADRANT_1`,52:`QUADRANT_2`,53:`QUADRANT_3`,54:`QUADRANT_4`,55:`NEWLINE`,56:`SEMI`,57:`EOF`,60:`STR`,61:`MD_STR`,63:`PUNCTUATION`,64:`PLUS`,65:`EQUALS`,66:`DOT`,67:`UNDERSCORE`},productions_:[0,[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[16,1],[21,1],[21,2],[22,1],[22,2],[23,1],[23,3],[24,5],[26,2],[26,2],[26,2],[29,0],[29,2],[30,2],[31,0],[31,1],[31,2],[31,1],[31,1],[31,1],[31,2],[31,2],[31,2],[31,1],[31,1],[34,4],[34,5],[34,5],[34,6],[32,4],[32,3],[32,2],[32,4],[32,3],[32,2],[33,2],[33,2],[33,2],[33,2],[27,1],[27,1],[27,1],[43,1],[43,2],[43,1],[43,1],[62,1],[62,2],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[59,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 23:this.$=a[s];break;case 24:this.$=a[s-1]+``+a[s];break;case 26:this.$=a[s-1]+a[s];break;case 27:this.$=[a[s].trim()];break;case 28:a[s-2].push(a[s].trim()),this.$=a[s-2];break;case 29:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 37:this.$=[];break;case 42:this.$=a[s].trim(),r.setDiagramTitle(this.$);break;case 43:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 44:case 45:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 46:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 47:r.addPoint(a[s-3],``,a[s-1],a[s],[]);break;case 48:r.addPoint(a[s-4],a[s-3],a[s-1],a[s],[]);break;case 49:r.addPoint(a[s-4],``,a[s-2],a[s-1],a[s]);break;case 50:r.addPoint(a[s-5],a[s-4],a[s-2],a[s-1],a[s]);break;case 51:r.setXAxisLeftText(a[s-2]),r.setXAxisRightText(a[s]);break;case 52:a[s-1].text+=` ⟶ `,r.setXAxisLeftText(a[s-1]);break;case 53:r.setXAxisLeftText(a[s]);break;case 54:r.setYAxisBottomText(a[s-2]),r.setYAxisTopText(a[s]);break;case 55:a[s-1].text+=` ⟶ `,r.setYAxisBottomText(a[s-1]);break;case 56:r.setYAxisBottomText(a[s]);break;case 57:r.setQuadrant1Text(a[s]);break;case 58:r.setQuadrant2Text(a[s]);break;case 59:r.setQuadrant3Text(a[s]);break;case 60:r.setQuadrant4Text(a[s]);break;case 64:this.$={text:a[s],type:`text`};break;case 65:this.$={text:a[s-1].text+``+a[s],type:a[s-1].type};break;case 66:this.$={text:a[s],type:`text`};break;case 67:this.$={text:a[s],type:`markdown`};break;case 68:this.$=a[s];break;case 69:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[{18:t,26:1,27:2,28:n,55:r,56:i,57:a},{1:[3]},{18:t,26:8,27:2,28:n,55:r,56:i,57:a},{18:t,26:9,27:2,28:n,55:r,56:i,57:a},e(o,[2,33],{29:10}),e(s,[2,61]),e(s,[2,62]),e(s,[2,63]),{1:[2,30]},{1:[2,31]},e(l,u,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:d,5:f,10:m,12:h,13:g,14:_,15:v,18:y,25:b,35:x,37:S,39:C,41:w,42:T,48:E,50:D,51:O,52:k,53:A,54:j,60:M,61:N,63:P,64:F,65:I,66:L,67:R}),e(o,[2,34]),{27:46,55:r,56:i,57:a},e(l,[2,37]),e(l,u,{24:13,32:15,33:16,34:17,43:30,58:31,31:47,4:d,5:f,10:m,12:h,13:g,14:_,15:v,18:y,25:b,35:x,37:S,39:C,41:w,42:T,48:E,50:D,51:O,52:k,53:A,54:j,60:M,61:N,63:P,64:F,65:I,66:L,67:R}),e(l,[2,39]),e(l,[2,40]),e(l,[2,41]),{36:[1,48]},{38:[1,49]},{40:[1,50]},e(l,[2,45]),e(l,[2,46]),{18:[1,51]},{4:d,5:f,10:m,12:h,13:g,14:_,15:v,43:52,58:31,60:M,61:N,63:P,64:F,65:I,66:L,67:R},{4:d,5:f,10:m,12:h,13:g,14:_,15:v,43:53,58:31,60:M,61:N,63:P,64:F,65:I,66:L,67:R},{4:d,5:f,10:m,12:h,13:g,14:_,15:v,43:54,58:31,60:M,61:N,63:P,64:F,65:I,66:L,67:R},{4:d,5:f,10:m,12:h,13:g,14:_,15:v,43:55,58:31,60:M,61:N,63:P,64:F,65:I,66:L,67:R},{4:d,5:f,10:m,12:h,13:g,14:_,15:v,43:56,58:31,60:M,61:N,63:P,64:F,65:I,66:L,67:R},{4:d,5:f,10:m,12:h,13:g,14:_,15:v,43:57,58:31,60:M,61:N,63:P,64:F,65:I,66:L,67:R},{4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,44:[1,58],47:[1,59],58:61,59:60,63:P,64:F,65:I,66:L,67:R},e(B,[2,64]),e(B,[2,66]),e(B,[2,67]),e(B,[2,70]),e(B,[2,71]),e(B,[2,72]),e(B,[2,73]),e(B,[2,74]),e(B,[2,75]),e(B,[2,76]),e(B,[2,77]),e(B,[2,78]),e(B,[2,79]),e(B,[2,80]),e(B,[2,81]),e(o,[2,35]),e(l,[2,38]),e(l,[2,42]),e(l,[2,43]),e(l,[2,44]),{3:65,4:te,5:ne,6:re,7:ie,8:ae,9:oe,10:se,11:ce,12:le,13:ue,14:de,15:fe,21:64},e(l,[2,53],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,49:[1,78],63:P,64:F,65:I,66:L,67:R}),e(l,[2,56],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,49:[1,79],63:P,64:F,65:I,66:L,67:R}),e(l,[2,57],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,63:P,64:F,65:I,66:L,67:R}),e(l,[2,58],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,63:P,64:F,65:I,66:L,67:R}),e(l,[2,59],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,63:P,64:F,65:I,66:L,67:R}),e(l,[2,60],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,63:P,64:F,65:I,66:L,67:R}),{45:[1,80]},{44:[1,81]},e(B,[2,65]),e(B,[2,82]),e(B,[2,83]),e(B,[2,84]),{3:83,4:te,5:ne,6:re,7:ie,8:ae,9:oe,10:se,11:ce,12:le,13:ue,14:de,15:fe,18:[1,82]},e(pe,[2,23]),e(pe,[2,1]),e(pe,[2,2]),e(pe,[2,3]),e(pe,[2,4]),e(pe,[2,5]),e(pe,[2,6]),e(pe,[2,7]),e(pe,[2,8]),e(pe,[2,9]),e(pe,[2,10]),e(pe,[2,11]),e(pe,[2,12]),e(l,[2,52],{58:31,43:84,4:d,5:f,10:m,12:h,13:g,14:_,15:v,60:M,61:N,63:P,64:F,65:I,66:L,67:R}),e(l,[2,55],{58:31,43:85,4:d,5:f,10:m,12:h,13:g,14:_,15:v,60:M,61:N,63:P,64:F,65:I,66:L,67:R}),{46:[1,86]},{45:[1,87]},{4:me,5:he,6:ge,8:_e,11:ve,13:ye,16:90,17:be,18:xe,19:Se,20:V,22:89,23:88},e(pe,[2,24]),e(l,[2,51],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,63:P,64:F,65:I,66:L,67:R}),e(l,[2,54],{59:60,58:61,4:d,5:f,8:ee,10:m,12:h,13:g,14:_,15:v,18:z,63:P,64:F,65:I,66:L,67:R}),e(l,[2,47],{22:89,16:90,23:101,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:V}),{46:[1,102]},e(l,[2,29],{10:Ce}),e(we,[2,27],{16:104,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:V}),e(Te,[2,25]),e(Te,[2,13]),e(Te,[2,14]),e(Te,[2,15]),e(Te,[2,16]),e(Te,[2,17]),e(Te,[2,18]),e(Te,[2,19]),e(Te,[2,20]),e(Te,[2,21]),e(Te,[2,22]),e(l,[2,49],{10:Ce}),e(l,[2,48],{22:89,16:90,23:105,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:V}),{4:me,5:he,6:ge,8:_e,11:ve,13:ye,16:90,17:be,18:xe,19:Se,20:V,22:106},e(Te,[2,26]),e(l,[2,50],{10:Ce}),e(we,[2,28],{16:104,4:me,5:he,6:ge,8:_e,11:ve,13:ye,17:be,18:xe,19:Se,20:V})],defaultActions:{8:[2,30],9:[2,31]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:1805-`+g.showPosition()+`1806-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};Ee.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).1807-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`1808-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.1809-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 55;case 3:break;case 4:return this.begin(`title`),35;case 5:return this.popState(),`title_value`;case 6:return this.begin(`acc_title`),37;case 7:return this.popState(),`acc_title_value`;case 8:return this.begin(`acc_descr`),39;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 48;case 14:return 50;case 15:return 49;case 16:return 51;case 17:return 52;case 18:return 53;case 19:return 54;case 20:return 25;case 21:this.begin(`md_string`);break;case 22:return`MD_STR`;case 23:this.popState();break;case 24:this.begin(`string`);break;case 25:this.popState();break;case 26:return`STR`;case 27:this.begin(`class_name`);break;case 28:return this.popState(),47;case 29:return this.begin(`point_start`),44;case 30:return this.begin(`point_x`),45;case 31:this.popState();break;case 32:this.popState(),this.begin(`point_y`);break;case 33:return this.popState(),46;case 34:return 28;case 35:return 4;case 36:return 15;case 37:return 11;case 38:return 64;case 39:return 10;case 40:return 65;case 41:return 65;case 42:return 14;case 43:return 13;case 44:return 67;case 45:return 66;case 46:return 12;case 47:return 8;case 48:return 5;case 49:return 18;case 50:return 56;case 51:return 63;case 52:return 57}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?: *x-axis *)/i,/^(?: *y-axis *)/i,/^(?: *--+> *)/i,/^(?: *quadrant-1 *)/i,/^(?: *quadrant-2 *)/i,/^(?: *quadrant-3 *)/i,/^(?: *quadrant-4 *)/i,/^(?:classDef\b)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?::::)/i,/^(?:^\w+)/i,/^(?:\s*:\s*\[\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?:\s*\] *)/i,/^(?:\s*,\s*)/i,/^(?:(1)|(0(.\d+)?))/i,/^(?: *quadrantChart *)/i,/^(?:[A-Za-z]+)/i,/^(?:[^\x00-\x7F]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function De(){this.yy={}}return p(De,`Parser`),De.prototype=Ee,Ee.Parser=De,new De})(),R1.parser=R1,pct=R1,z1=Lo(),mct=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{p(this,`QuadrantBuilder`)}getDefaultData(){return{titleText:``,quadrant1Text:``,quadrant2Text:``,quadrant3Text:``,quadrant4Text:``,xAxisLeftText:``,xAxisRightText:``,yAxisBottomText:``,yAxisTopText:``,points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:Ho.quadrantChart?.chartWidth||500,chartWidth:Ho.quadrantChart?.chartHeight||500,titlePadding:Ho.quadrantChart?.titlePadding||10,titleFontSize:Ho.quadrantChart?.titleFontSize||20,quadrantPadding:Ho.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:Ho.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:Ho.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:Ho.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:Ho.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:Ho.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:Ho.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:Ho.quadrantChart?.pointTextPadding||5,pointLabelFontSize:Ho.quadrantChart?.pointLabelFontSize||12,pointRadius:Ho.quadrantChart?.pointRadius||5,xAxisPosition:Ho.quadrantChart?.xAxisPosition||`top`,yAxisPosition:Ho.quadrantChart?.yAxisPosition||`left`,quadrantInternalBorderStrokeWidth:Ho.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:Ho.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:z1.quadrant1Fill,quadrant2Fill:z1.quadrant2Fill,quadrant3Fill:z1.quadrant3Fill,quadrant4Fill:z1.quadrant4Fill,quadrant1TextFill:z1.quadrant1TextFill,quadrant2TextFill:z1.quadrant2TextFill,quadrant3TextFill:z1.quadrant3TextFill,quadrant4TextFill:z1.quadrant4TextFill,quadrantPointFill:z1.quadrantPointFill,quadrantPointTextFill:z1.quadrantPointTextFill,quadrantXAxisTextFill:z1.quadrantXAxisTextFill,quadrantYAxisTextFill:z1.quadrantYAxisTextFill,quadrantTitleFill:z1.quadrantTitleFill,quadrantInternalBorderStrokeFill:z1.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:z1.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,y.info(`clear called`)}setData(e){this.data={...this.data,...e}}addPoints(e){this.data.points=[...e,...this.data.points]}addClass(e,t){this.classes.set(e,t)}setConfig(e){y.trace(`setConfig called with: `,e),this.config={...this.config,...e}}setThemeConfig(e){y.trace(`setThemeConfig called with: `,e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,n,r){let i=this.config.xAxisLabelPadding*2+this.config.xAxisLabelFontSize,a={top:e===`top`&&t?i:0,bottom:e===`bottom`&&t?i:0},o=this.config.yAxisLabelPadding*2+this.config.yAxisLabelFontSize,s={left:this.config.yAxisPosition===`left`&&n?o:0,right:this.config.yAxisPosition===`right`&&n?o:0},l=this.config.titleFontSize+this.config.titlePadding*2,u={top:r?l:0},d=this.config.quadrantPadding+s.left,f=this.config.quadrantPadding+a.top+u.top,p=this.config.chartWidth-this.config.quadrantPadding*2-s.left-s.right,m=this.config.chartHeight-this.config.quadrantPadding*2-a.top-a.bottom-u.top;return{xAxisSpace:a,yAxisSpace:s,titleSpace:u,quadrantSpace:{quadrantLeft:d,quadrantTop:f,quadrantWidth:p,quadrantHalfWidth:p/2,quadrantHeight:m,quadrantHalfHeight:m/2}}}getAxisLabels(e,t,n,r){let{quadrantSpace:i,titleSpace:a}=r,{quadrantHalfHeight:o,quadrantHeight:s,quadrantLeft:l,quadrantHalfWidth:u,quadrantTop:d,quadrantWidth:f}=i,p=!!this.data.xAxisRightText,m=!!this.data.yAxisTopText,h=[];return this.data.xAxisLeftText&&t&&h.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+(p?u/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+d+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.xAxisRightText&&t&&h.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:l+u+(p?u/2:0),y:e===`top`?this.config.xAxisLabelPadding+a.top:this.config.xAxisLabelPadding+d+s+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:p?`center`:`left`,horizontalPos:`top`,rotation:0}),this.data.yAxisBottomText&&n&&h.push({text:this.data.yAxisBottomText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:d+s-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?`center`:`left`,horizontalPos:`top`,rotation:-90}),this.data.yAxisTopText&&n&&h.push({text:this.data.yAxisTopText,fill:this.themeConfig.quadrantYAxisTextFill,x:this.config.yAxisPosition===`left`?this.config.yAxisLabelPadding:this.config.yAxisLabelPadding+l+f+this.config.quadrantPadding,y:d+o-(m?o/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:m?`center`:`left`,horizontalPos:`top`,rotation:-90}),h}getQuadrants(e){let{quadrantSpace:t}=e,{quadrantHalfHeight:n,quadrantLeft:r,quadrantHalfWidth:i,quadrantTop:a}=t,o=[{text:{text:this.data.quadrant1Text,fill:this.themeConfig.quadrant1TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a,width:i,height:n,fill:this.themeConfig.quadrant1Fill},{text:{text:this.data.quadrant2Text,fill:this.themeConfig.quadrant2TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a,width:i,height:n,fill:this.themeConfig.quadrant2Fill},{text:{text:this.data.quadrant3Text,fill:this.themeConfig.quadrant3TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant3Fill},{text:{text:this.data.quadrant4Text,fill:this.themeConfig.quadrant4TextFill,x:0,y:0,fontSize:this.config.quadrantLabelFontSize,verticalPos:`center`,horizontalPos:`middle`,rotation:0},x:r+i,y:a+n,width:i,height:n,fill:this.themeConfig.quadrant4Fill}];for(let e of o)e.text.x=e.x+e.width/2,this.data.points.length===0?(e.text.y=e.y+e.height/2,e.text.horizontalPos=`middle`):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos=`top`);return o}getQuadrantPoints(e){let{quadrantSpace:t}=e,{quadrantHeight:n,quadrantLeft:r,quadrantTop:i,quadrantWidth:a}=t,o=Pu().domain([0,1]).range([r,a+r]),s=Pu().domain([0,1]).range([n+i,i]);return this.data.points.map(e=>{let t=this.classes.get(e.className);return t&&(e={...t,...e}),{x:o(e.x),y:s(e.y),fill:e.color??this.themeConfig.quadrantPointFill,radius:e.radius??this.config.pointRadius,text:{text:e.text,fill:this.themeConfig.quadrantPointTextFill,x:o(e.x),y:s(e.y)+this.config.pointTextPadding,verticalPos:`center`,horizontalPos:`top`,fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:e.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:e.strokeWidth??`0px`}})}getBorders(e){let t=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantSpace:n}=e,{quadrantHalfHeight:r,quadrantHeight:i,quadrantLeft:a,quadrantHalfWidth:o,quadrantTop:s,quadrantWidth:l}=n;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s,x2:a+l+t,y2:s},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a+l,y1:s+t,x2:a+l,y2:s+i-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a-t,y1:s+i,x2:a+l+t,y2:s+i},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:a,y1:s+t,x2:a,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+o,y1:s+t,x2:a+o,y2:s+i-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:a+t,y1:s+r,x2:a+l-t,y2:s+r}]}getTitle(e){if(e)return{text:this.data.titleText,fill:this.themeConfig.quadrantTitleFill,fontSize:this.config.titleFontSize,horizontalPos:`top`,verticalPos:`center`,rotation:0,y:this.config.titlePadding,x:this.config.chartWidth/2}}build(){let e=this.config.showXAxis&&!!(this.data.xAxisLeftText||this.data.xAxisRightText),t=this.config.showYAxis&&!!(this.data.yAxisTopText||this.data.yAxisBottomText),n=this.config.showTitle&&!!this.data.titleText,r=this.data.points.length>0?`bottom`:this.config.xAxisPosition,i=this.calculateSpace(r,e,t,n);return{points:this.getQuadrantPoints(i),quadrants:this.getQuadrants(i),axisLabels:this.getAxisLabels(r,e,t,i),borderLines:this.getBorders(i),title:this.getTitle(n)}}},B1=class extends Error{static{p(this,`InvalidStyleError`)}constructor(e,t,n){super(`value for ${e} ${t} is invalid, please use a valid ${n}`),this.name=`InvalidStyleError`}},p(F1,`validateHexCode`),p(Qst,`validateNumber`),p($st,`validateSizeInPixels`),p(I1,`textSanitizer`),V1=new mct,p(ect,`setQuadrant1Text`),p(tct,`setQuadrant2Text`),p(nct,`setQuadrant3Text`),p(rct,`setQuadrant4Text`),p(ict,`setXAxisLeftText`),p(act,`setXAxisRightText`),p(oct,`setYAxisTopText`),p(sct,`setYAxisBottomText`),p(L1,`parseStyles`),p(cct,`addPoint`),p(lct,`addClass`),p(uct,`setWidth`),p(dct,`setHeight`),p(fct,`getQuadrantData`),hct={setWidth:uct,setHeight:dct,setQuadrant1Text:ect,setQuadrant2Text:tct,setQuadrant3Text:nct,setQuadrant4Text:rct,setXAxisLeftText:ict,setXAxisRightText:act,setYAxisTopText:oct,setYAxisBottomText:sct,parseStyles:L1,addPoint:cct,addClass:lct,getQuadrantData:fct,clear:p(function(){V1.clear(),Is()},`clear`),setAccTitle:Ls,getAccTitle:Rs,setDiagramTitle:Vs,getDiagramTitle:Hs,getAccDescription:Bs,setAccDescription:zs},gct={parser:pct,db:hct,renderer:{draw:p((e,t,n,r)=>{function i(e){return e===`top`?`hanging`:`middle`}p(i,`getDominantBaseLine`);function a(e){return e===`left`?`start`:`middle`}p(a,`getTextAnchor`);function o(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}p(o,`getTransformation`);let s=Z();y.debug(`Rendering quadrant chart1810-`+e);let l=s.securityLevel,u;l===`sandbox`&&(u=Ac(`#i`+t));let d=Ac(l===`sandbox`?u.nodes()[0].contentDocument.body:`body`).select(`[id="${t}"]`),f=d.append(`g`).attr(`class`,`main`),m=s.quadrantChart?.chartWidth??500,h=s.quadrantChart?.chartHeight??500;Os(d,h,m,s.quadrantChart?.useMaxWidth??!0),d.attr(`viewBox`,`0 0 `+m+` `+h),r.db.setHeight(h),r.db.setWidth(m);let g=r.db.getQuadrantData(),_=f.append(`g`).attr(`class`,`quadrants`),v=f.append(`g`).attr(`class`,`border`),b=f.append(`g`).attr(`class`,`data-points`),x=f.append(`g`).attr(`class`,`labels`),S=f.append(`g`).attr(`class`,`title`);g.title&&S.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,g.title.fill).attr(`font-size`,g.title.fontSize).attr(`dominant-baseline`,i(g.title.horizontalPos)).attr(`text-anchor`,a(g.title.verticalPos)).attr(`transform`,o(g.title)).text(g.title.text),g.borderLines&&v.selectAll(`line`).data(g.borderLines).enter().append(`line`).attr(`x1`,e=>e.x1).attr(`y1`,e=>e.y1).attr(`x2`,e=>e.x2).attr(`y2`,e=>e.y2).style(`stroke`,e=>e.strokeFill).style(`stroke-width`,e=>e.strokeWidth);let C=_.selectAll(`g.quadrant`).data(g.quadrants).enter().append(`g`).attr(`class`,`quadrant`);C.append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill),C.append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>i(e.text.horizontalPos)).attr(`text-anchor`,e=>a(e.text.verticalPos)).attr(`transform`,e=>o(e.text)).text(e=>e.text.text),x.selectAll(`g.label`).data(g.axisLabels).enter().append(`g`).attr(`class`,`label`).append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>i(e.horizontalPos)).attr(`text-anchor`,e=>a(e.verticalPos)).attr(`transform`,e=>o(e));let w=b.selectAll(`g.data-point`).data(g.points).enter().append(`g`).attr(`class`,`data-point`);w.append(`circle`).attr(`cx`,e=>e.x).attr(`cy`,e=>e.y).attr(`r`,e=>e.radius).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeColor).attr(`stroke-width`,e=>e.strokeWidth),w.append(`text`).attr(`x`,0).attr(`y`,0).text(e=>e.text.text).attr(`fill`,e=>e.text.fill).attr(`font-size`,e=>e.text.fontSize).attr(`dominant-baseline`,e=>i(e.text.horizontalPos)).attr(`text-anchor`,e=>a(e.text.verticalPos)).attr(`transform`,e=>o(e.text))},`draw`)},styles:p(()=>``,`styles`)}})),vct=l({diagram:()=>Yct});function H1(e){return e.type===`bar`}function U1(e){return e.type===`band`}function W1(e){return e.type===`linear`}function G1(e,t,n,r){let i=new t0(r);return U1(e)?new Ict(t,n,e.categories,e.title,i):new Lct(t,n,[e.min,e.max],e.title,i)}function yct(e,t,n,r){return new Rct(new t0(r),e,t,n)}function K1(e){return{fontSize:e,markerSize:e*zct,markerSpacing:e*Vct,itemSpacing:e*Bct}}function bct(e,t,n,r){return new Hct(new t0(r),e,t,n)}function xct(e,t,n){return new Gct(e,t,n)}function q1(){let e=Lo(),t=es();return jp(e.xyChart,t.themeVariables.xyChart)}function J1(){let e=es();return jp(Ho.xyChart,e.xyChart)}function Y1(){return{yAxis:{type:`linear`,title:``,min:1/0,max:-1/0},xAxis:{type:`band`,title:``,categories:[]},title:``,plots:[]}}function X1(e){let t=es();return _s(e.trim(),t)}function Sct(e){Jct=e}function Cct(e){e===`horizontal`?o0.chartOrientation=`horizontal`:o0.chartOrientation=`vertical`}function wct(e){c0.xAxis.title=X1(e.text)}function Z1(e,t){c0.xAxis={type:`linear`,title:c0.xAxis.title,min:e,max:t},u0=!0}function Tct(e){c0.xAxis={type:`band`,title:c0.xAxis.title,categories:e.map(e=>X1(e.text))},u0=!0}function Ect(e){c0.yAxis.title=X1(e.text)}function Dct(e,t){c0.yAxis={type:`linear`,title:c0.yAxis.title,min:e,max:t},d0=!0}function Oct(e){let t=Math.min(...e),n=Math.max(...e),r=W1(c0.yAxis)?c0.yAxis.min:1/0,i=W1(c0.yAxis)?c0.yAxis.max:-1/0;c0.yAxis={type:`linear`,title:c0.yAxis.title,min:Math.min(r,t),max:Math.max(i,n)}}function Q1(e){let t=[];if(e.length===0)return t;if(!u0){let t=W1(c0.xAxis)?c0.xAxis.min:1/0,n=W1(c0.xAxis)?c0.xAxis.max:-1/0;Z1(Math.min(t,1),Math.max(n,e.length))}if(U1(c0.xAxis)&&e.length>c0.xAxis.categories.length&&(e=e.slice(0,c0.xAxis.categories.length)),d0||Oct(e),U1(c0.xAxis)&&(t=c0.xAxis.categories.map((t,n)=>[t,e[n]])),W1(c0.xAxis)){let n=c0.xAxis.min,r=c0.xAxis.max;if(e.length===1)t=[[`${n}`,e[0]]];else{let i=(r-n)/(e.length-1);t=e.map((e,t)=>[`${n+t*i}`,e])}}return t}function $1(e){return l0[e===0?0:e%l0.length]}function kct(e,t){let n=t.map(e=>e.value),r=t.map(e=>e.label?X1(e.label):``),i=Q1(n),a=r.some(e=>e!==``);c0.plots.push({type:`line`,title:X1(e.text),strokeFill:$1(a0),strokeWidth:2,data:i,...a?{pointLabels:r}:{}}),a0++}function Act(e,t){let n=Q1(t.map(e=>e.value));c0.plots.push({type:`bar`,title:X1(e.text),fill:$1(a0),data:n}),a0++}function jct(){if(c0.plots.length===0)throw Error(`No Plot to render, please provide a plot with some data`);return c0.title=Hs(),qct.build(o0,c0,s0,Jct)}function Mct(){return s0}function Nct(){return o0}function Pct(){return c0}var e0,Fct,t0,n0,r0,i0,Ict,Lct,Rct,zct,Bct,Vct,Hct,Uct,Wct,Gct,Kct,qct,a0,Jct,o0,s0,c0,l0,u0,d0,Yct,Xct=o((()=>{_f(),qm(),Pf(),Kp(),Zs(),S(),h(),hf(),e0=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,10,12,14,16,18,19,21,23],n=[2,6],r=[1,3],i=[1,5],a=[1,6],o=[1,7],s=[1,5,10,12,14,16,18,19,21,23,36,37,38],l=[1,25],u=[1,26],d=[1,28],f=[1,29],m=[1,30],h=[1,31],g=[1,32],_=[1,33],v=[1,34],y=[1,35],b=[1,36],x=[1,37],S=[1,43],C=[1,42],w=[1,47],T=[1,50],E=[1,10,12,14,16,18,19,21,23,36,37,38],D=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38],O=[1,10,12,14,16,18,19,21,23,24,26,28,29,36,37,38,42,43,44,45,46,47,48,49,50,51],k=[1,65],A=[26,28],j={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,dataPoints:25,SQUARE_BRACES_END:26,dataPoint:27,COMMA:28,NUMBER_WITH_DECIMAL:29,STR:30,xAxisData:31,bandData:32,ARROW_DELIMITER:33,commaSeparatedTexts:34,yAxisData:35,NEWLINE:36,SEMI:37,EOF:38,alphaNum:39,MD_STR:40,alphaNumToken:41,AMP:42,NUM:43,ALPHA:44,PLUS:45,EQUALS:46,MULT:47,DOT:48,BRKT:49,MINUS:50,UNDERSCORE:51,$accept:0,$end:1},terminals_:{2:`error`,5:`XYCHART`,8:`CHART_ORIENTATION`,10:`title`,12:`X_AXIS`,14:`Y_AXIS`,16:`LINE`,18:`BAR`,19:`acc_title`,20:`acc_title_value`,21:`acc_descr`,22:`acc_descr_value`,23:`acc_descr_multiline_value`,24:`SQUARE_BRACES_START`,26:`SQUARE_BRACES_END`,28:`COMMA`,29:`NUMBER_WITH_DECIMAL`,30:`STR`,33:`ARROW_DELIMITER`,36:`NEWLINE`,37:`SEMI`,38:`EOF`,40:`MD_STR`,42:`AMP`,43:`NUM`,44:`ALPHA`,45:`PLUS`,46:`EQUALS`,47:`MULT`,48:`DOT`,49:`BRKT`,50:`MINUS`,51:`UNDERSCORE`},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[27,2],[27,1],[13,1],[13,2],[13,1],[31,1],[31,3],[32,3],[34,3],[34,1],[15,1],[15,2],[15,1],[35,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[39,1],[39,2],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1],[41,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.setOrientation(a[s]);break;case 9:r.setDiagramTitle(a[s].text.trim());break;case 12:r.setLineData({text:``,type:`text`},a[s]);break;case 13:r.setLineData(a[s-1],a[s]);break;case 14:r.setBarData({text:``,type:`text`},a[s]);break;case 15:r.setBarData(a[s-1],a[s]);break;case 16:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 19:this.$=a[s-1];break;case 20:case 30:this.$=[a[s-2],...a[s]];break;case 21:case 31:this.$=[a[s]];break;case 22:this.$={value:Number(a[s-1]),label:a[s]};break;case 23:this.$={value:Number(a[s]),label:``};break;case 24:r.setXAxisTitle(a[s]);break;case 25:r.setXAxisTitle(a[s-1]);break;case 26:r.setXAxisTitle({type:`text`,text:``});break;case 27:r.setXAxisBand(a[s]);break;case 28:r.setXAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 29:this.$=a[s-1];break;case 32:r.setYAxisTitle(a[s]);break;case 33:r.setYAxisTitle(a[s-1]);break;case 34:r.setYAxisTitle({type:`text`,text:``});break;case 35:r.setYAxisRangeData(Number(a[s-2]),Number(a[s]));break;case 39:this.$={text:a[s],type:`text`};break;case 40:this.$={text:a[s],type:`text`};break;case 41:this.$={text:a[s],type:`markdown`};break;case 42:this.$=a[s];break;case 43:this.$=a[s-1]+``+a[s]}},`anonymous`),table:[e(t,n,{3:1,4:2,7:4,5:r,36:i,37:a,38:o}),{1:[3]},e(t,n,{4:2,7:4,3:8,5:r,36:i,37:a,38:o}),e(t,n,{4:2,7:4,6:9,3:10,5:r,8:[1,11],36:i,37:a,38:o}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(s,[2,36]),e(s,[2,37]),e(s,[2,38]),{1:[2,1]},e(t,n,{4:2,7:4,3:21,5:r,36:i,37:a,38:o}),{1:[2,3]},e(s,[2,5]),e(t,[2,7],{4:22,36:i,37:a,38:o}),{11:23,30:l,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},{11:39,13:38,24:S,29:C,30:l,31:40,32:41,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},{11:45,15:44,29:w,30:l,35:46,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},{11:49,17:48,24:T,30:l,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},{11:52,17:51,24:T,30:l,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},{20:[1,53]},{22:[1,54]},e(E,[2,18]),{1:[2,2]},e(E,[2,8]),e(E,[2,9]),e(D,[2,39],{41:55,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x}),e(D,[2,40]),e(D,[2,41]),e(O,[2,42]),e(O,[2,44]),e(O,[2,45]),e(O,[2,46]),e(O,[2,47]),e(O,[2,48]),e(O,[2,49]),e(O,[2,50]),e(O,[2,51]),e(O,[2,52]),e(O,[2,53]),e(E,[2,10]),e(E,[2,24],{32:41,31:56,24:S,29:C}),e(E,[2,26]),e(E,[2,27]),{33:[1,57]},{11:59,30:l,34:58,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},e(E,[2,11]),e(E,[2,32],{35:60,29:w}),e(E,[2,34]),{33:[1,61]},e(E,[2,12]),{17:62,24:T},{25:63,27:64,29:k},e(E,[2,14]),{17:66,24:T},e(E,[2,16]),e(E,[2,17]),e(O,[2,43]),e(E,[2,25]),{29:[1,67]},{26:[1,68]},{26:[2,31],28:[1,69]},e(E,[2,33]),{29:[1,70]},e(E,[2,13]),{26:[1,71]},{26:[2,21],28:[1,72]},e(A,[2,23],{30:[1,73]}),e(E,[2,15]),e(E,[2,28]),e(E,[2,29]),{11:59,30:l,34:74,39:24,40:u,41:27,42:d,43:f,44:m,45:h,46:g,47:_,48:v,49:y,50:b,51:x},e(E,[2,35]),e(E,[2,19]),{25:75,27:64,29:k},e(A,[2,22]),{26:[2,30]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],74:[2,30],75:[2,20]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:1811-`+g.showPosition()+`1812-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};j.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).1813-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`1814-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.1815-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return this.popState(),36;case 3:return this.popState(),36;case 4:return 36;case 5:break;case 6:return 10;case 7:return this.pushState(`acc_title`),19;case 8:return this.popState(),`acc_title_value`;case 9:return this.pushState(`acc_descr`),21;case 10:return this.popState(),`acc_descr_value`;case 11:this.pushState(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState(`axis_data`),`X_AXIS`;case 18:return this.pushState(`axis_data`),`Y_AXIS`;case 19:return this.pushState(`axis_band_data`),24;case 20:return 33;case 21:return this.pushState(`data`),16;case 22:return this.pushState(`data`),18;case 23:return this.pushState(`data_inner`),24;case 24:return 29;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState(`string`);break;case 28:this.popState();break;case 29:return`STR`;case 30:return 24;case 31:return 26;case 32:return 44;case 33:return`COLON`;case 34:return 45;case 35:return 28;case 36:return 46;case 37:return 47;case 38:return 49;case 39:return 51;case 40:return 48;case 41:return 42;case 42:return 50;case 43:return 43;case 44:break;case 45:return 37;case 46:return 38}},`anonymous`),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}}})();function M(){this.yy={}}return p(M,`Parser`),M.prototype=j,j.Parser=M,new M})(),e0.parser=e0,Fct=e0,p(H1,`isBarPlot`),p(U1,`isBandAxisData`),p(W1,`isLinearAxisData`),t0=class{constructor(e){this.parentGroup=e}static{p(this,`TextDimensionCalculatorWithFont`)}getMaxDimension(e,t){if(!this.parentGroup)return{width:e.reduce((e,t)=>Math.max(t.length,e),0)*t,height:t};let n={width:0,height:0},r=this.parentGroup.append(`g`).attr(`visibility`,`hidden`).attr(`font-size`,t);for(let i of e){let e=M_e(r,1,i),a=e?e.width:i.length*t,o=e?e.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,o)}return r.remove(),n}},n0=.7,r0=.2,i0=class{constructor(e,t,n,r){this.axisConfig=e,this.title=t,this.textDimensionCalculator=n,this.axisThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.normalizedLabelRotationInRad=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition=`left`,this.normalizedLabelRotationInRad=this.axisConfig.labelRotation>=-90&&this.axisConfig.labelRotation<=90?this.axisConfig.labelRotation*Math.PI/180:0}static{p(this,`BaseAxis`)}setRange(e){this.range=e,this.axisPosition===`left`||this.axisPosition===`right`?this.boundingRect.height=e[1]-e[0]:this.boundingRect.width=e[1]-e[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(e){this.axisPosition=e,this.setRange(this.range)}getTickDistance(){let e=this.getRange();return Math.abs(e[0]-e[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(e=>e.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){n0*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(n0*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(e){let t=e.height;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=r0*e.width;this.outerPadding=Math.min(n.width/2,r);let i=n.height;this.axisPosition===`bottom`&&this.normalizedLabelRotationInRad!==0&&(i=Math.max(i,Math.abs(Math.sin(this.normalizedLabelRotationInRad)*n.width)+Math.abs(Math.cos(this.normalizedLabelRotationInRad)*n.height))),i+=this.axisConfig.labelPadding*2,this.labelTextHeight=n.height,i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;if(this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){let n=this.getLabelDimension(),r=r0*e.height;this.outerPadding=Math.min(n.height/2,r);let i=n.width+this.axisConfig.labelPadding*2;i<=t&&(t-=i,this.showLabel=!0)}if(this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){let e=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=e.height+this.axisConfig.titlePadding*2;this.titleTextHeight=e.height,n<=t&&(t-=n,this.showTitle=!0)}this.boundingRect.width=e.width-t,this.boundingRect.height=e.height}calculateSpace(e){return this.axisPosition===`left`||this.axisPosition===`right`?this.calculateSpaceIfDrawnVertical(e):this.calculateSpaceIfDrawnHorizontally(e),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateOffsetByRotation(e){let t=this.normalizedLabelRotationInRad;return t===0?0:Math.sin(t)*this.getLabelDimension()[e]/2}getDrawableElementsForLeftAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`left-axis`,`axisl-line`],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`left-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(e),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`middle`,horizontalPos:`right`}))}),this.showTick){let t=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`left-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${t},${this.getScaleValue(e)} L ${t-this.axisConfig.tickLength},${this.getScaleValue(e)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`left-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForBottomAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`bottom-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`bottom-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e)+this.calculateOffsetByRotation(`height`),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0)+Math.abs(this.calculateOffsetByRotation(`width`)),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:this.normalizedLabelRotationInRad*180/Math.PI,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);e.push({type:`path`,groupTexts:[`bottom-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t} L ${this.getScaleValue(e)},${t+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`bottom-axis`,`title`],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElementsForTopAxis(){let e=[];if(this.showAxisLine){let t=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;e.push({type:`path`,groupTexts:[`top-axis`,`axis-line`],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},${t}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&e.push({type:`text`,groupTexts:[`top-axis`,`label`],data:this.getTickValues().map(e=>({text:e.toString(),x:this.getScaleValue(e),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}))}),this.showTick){let t=this.boundingRect.y;e.push({type:`path`,groupTexts:[`top-axis`,`ticks`],data:this.getTickValues().map(e=>({path:`M ${this.getScaleValue(e)},${t+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(e)},${t+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&e.push({type:`text`,groupTexts:[`top-axis`,`title`],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:`top`,horizontalPos:`center`}]}),e}getDrawableElements(){if(this.axisPosition===`left`)return this.getDrawableElementsForLeftAxis();if(this.axisPosition===`right`)throw Error(`Drawing of right axis is not implemented`);return this.axisPosition===`bottom`?this.getDrawableElementsForBottomAxis():this.axisPosition===`top`?this.getDrawableElementsForTopAxis():[]}},Ict=class extends i0{static{p(this,`BandAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.categories=n,this.scale=ku().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=ku().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),y.trace(`BandAxis axis final categories, range: `,this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}},Lct=class extends i0{static{p(this,`LinearAxis`)}constructor(e,t,n,r,i){super(e,r,i,t),this.domain=n,this.scale=Pu().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){let e=[...this.domain];this.axisPosition===`left`&&e.reverse(),this.scale=Pu().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}},p(G1,`getAxis`),Rct=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{p(this,`ChartTitle`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){let t=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),n=Math.max(t.width,e.width),r=t.height+2*this.chartConfig.titlePadding;return t.width<=n&&t.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=n,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){let e=[];return this.showChartTitle&&e.push({groupTexts:[`chart-title`],type:`text`,data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:`middle`,horizontalPos:`center`,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),e}},p(yct,`getChartTitleComponent`),zct=.75,Bct=.5,Vct=.35,p(K1,`getLegendLayout`),Hct=class{constructor(e,t,n,r){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=n,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0},this.visiblePlots=[]}static{p(this,`ChartLegend`)}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){if(this.visiblePlots=this.chartConfig.showLegend?this.chartData.plots.filter(e=>e.title):[],this.visiblePlots.length===0)return this.boundingRect.width=0,this.boundingRect.height=0,{width:0,height:0};let{fontSize:t,markerSize:n,markerSpacing:r,itemSpacing:i}=K1(this.chartConfig.legendFontSize),a=this.textDimensionCalculator.getMaxDimension(this.visiblePlots.map(e=>e.title),t),o=this.chartConfig.legendPadding*2+n+r+a.width,s=this.chartConfig.legendPadding*2+this.visiblePlots.length*t+(this.visiblePlots.length-1)*i;return o<=e.width&&s<=e.height?(this.boundingRect.width=o,this.boundingRect.height=s):(this.visiblePlots=[],this.boundingRect.width=0,this.boundingRect.height=0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(this.visiblePlots.length===0)return[];let{fontSize:e,markerSize:t,markerSpacing:n,itemSpacing:r}=K1(this.chartConfig.legendFontSize),i=e+r,a=this.boundingRect.x+this.chartConfig.legendPadding,o=this.boundingRect.y+this.chartConfig.legendPadding,s=[],l=[];for(let[e,n]of this.visiblePlots.entries())if(H1(n))s.push({x:a,y:o+e*i,width:t,height:t,fill:n.fill,strokeFill:n.fill,strokeWidth:0});else{let r=o+e*i+t/2;l.push({path:`M ${a},${r} L ${a+t},${r}`,strokeFill:n.strokeFill,strokeWidth:n.strokeWidth})}return[{groupTexts:[`legend`,`markers`],type:`rect`,data:s},{groupTexts:[`legend`,`markers`],type:`path`,data:l},{groupTexts:[`legend`,`label`],type:`text`,data:this.visiblePlots.map((r,s)=>({text:r.title,x:a+t+n,y:o+s*i+t/2,fill:this.chartThemeConfig.legendTextColor,fontSize:e,rotation:0,verticalPos:`middle`,horizontalPos:`left`}))}]}},p(bct,`getChartLegendComponent`),Uct=class{constructor(e,t,n,r,i){this.plotData=e,this.xAxis=t,this.yAxis=n,this.orientation=r,this.plotIndex=i}static{p(this,`LinePlot`)}getDrawableElement(){let e=this.plotData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t;if(t=this.orientation===`horizontal`?qd().y(e=>e[0]).x(e=>e[1])(e):qd().x(e=>e[0]).y(e=>e[1])(e),!t)return[];let n=[{groupTexts:[`plot`,`line-plot-${this.plotIndex}`],type:`path`,data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}];if(this.plotData.pointLabels&&this.plotData.pointLabels.length>0){let t=[];for(let[n,[r,i]]of e.entries()){let e=this.plotData.pointLabels[n];e&&(this.orientation===`horizontal`?t.push({x:i+10,y:r,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`left`,fontSize:12,rotation:0}):t.push({x:r,y:i-10,text:e,fill:this.plotData.strokeFill,verticalPos:`middle`,horizontalPos:`center`,fontSize:12,rotation:0}))}t.length>0&&n.push({groupTexts:[`plot`,`line-plot-${this.plotIndex}`,`labels`],type:`text`,data:t})}return n}},Wct=class{constructor(e,t,n,r,i,a){this.barData=e,this.boundingRect=t,this.xAxis=n,this.yAxis=r,this.orientation=i,this.plotIndex=a}static{p(this,`BarPlot`)}getDrawableElement(){let e=this.barData.data.map(e=>[this.xAxis.getScaleValue(e[0]),this.yAxis.getScaleValue(e[1])]),t=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*.95,n=t/2;return this.orientation===`horizontal`?[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:this.boundingRect.x,y:e[0]-n,height:t,width:e[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:[`plot`,`bar-plot-${this.plotIndex}`],type:`rect`,data:e.map(e=>({x:e[0]-n,y:e[1],width:t,height:this.boundingRect.y+this.boundingRect.height-e[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},Gct=class{constructor(e,t,n){this.chartConfig=e,this.chartData=t,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0}}static{p(this,`BasePlot`)}setAxes(e,t){this.xAxis=e,this.yAxis=t}setBoundingBoxXY(e){this.boundingRect.x=e.x,this.boundingRect.y=e.y}calculateSpace(e){return this.boundingRect.width=e.width,this.boundingRect.height=e.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error(`Axes must be passed to render Plots`);let e=[];for(let[t,n]of this.chartData.plots.entries())switch(n.type){case`line`:{let r=new Uct(n,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}break;case`bar`:{let r=new Wct(n,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);e.push(...r.getDrawableElement())}}return e}},p(xct,`getPlotComponent`),Kct=class{constructor(e,t,n,r){this.chartConfig=e,this.chartData=t,this.componentStore={title:yct(e,t,n,r),plot:xct(e,t,n),legend:bct(e,t,n,r),xAxis:G1(t.xAxis,e.xAxis,{titleColor:n.xAxisTitleColor,labelColor:n.xAxisLabelColor,tickColor:n.xAxisTickColor,axisLineColor:n.xAxisLineColor},r),yAxis:G1(t.yAxis,e.yAxis,{titleColor:n.yAxisTitleColor,labelColor:n.yAxisLabelColor,tickColor:n.yAxisTickColor,axisLineColor:n.yAxisLineColor},r)}}static{p(this,`Orchestrator`)}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i={width:0,height:0},a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:a,height:o});e-=s.width,t-=s.height,s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),r=s.height,t-=s.height,this.componentStore.xAxis.setAxisPosition(`bottom`),s=this.componentStore.xAxis.calculateSpace({width:e,height:t}),t-=s.height,this.componentStore.yAxis.setAxisPosition(`left`),s=this.componentStore.yAxis.calculateSpace({width:e,height:t}),n=s.width,e-=s.width,i=this.componentStore.legend.calculateSpace({width:e,height:o}),e-=i.width,e>0&&(a+=e,e=0),t>0&&(o+=t,t=0),this.componentStore.plot.calculateSpace({width:a,height:o}),this.componentStore.plot.setBoundingBoxXY({x:n,y:r}),this.componentStore.legend.setBoundingBoxXY({x:n+a,y:r+Math.max((o-i.height)/2,0)}),this.componentStore.xAxis.setRange([n,n+a]),this.componentStore.xAxis.setBoundingBoxXY({x:n,y:r+o}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:r}),this.chartData.plots.some(e=>H1(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,n=0,r=0,i=0,a={width:0,height:0},o=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),l=this.componentStore.plot.calculateSpace({width:o,height:s});e-=l.width,t-=l.height,l=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:t}),n=l.height,t-=l.height,this.componentStore.xAxis.setAxisPosition(`left`),l=this.componentStore.xAxis.calculateSpace({width:e,height:t}),e-=l.width,r=l.width,this.componentStore.yAxis.setAxisPosition(`top`),l=this.componentStore.yAxis.calculateSpace({width:e,height:t}),t-=l.height,i=n+l.height,a=this.componentStore.legend.calculateSpace({width:e,height:s}),e-=a.width,e>0&&(o+=e,e=0),t>0&&(s+=t,t=0),this.componentStore.plot.calculateSpace({width:o,height:s}),this.componentStore.plot.setBoundingBoxXY({x:r,y:i}),this.componentStore.legend.setBoundingBoxXY({x:r+o,y:i+Math.max((s-a.height)/2,0)}),this.componentStore.yAxis.setRange([r,r+o]),this.componentStore.yAxis.setBoundingBoxXY({x:r,y:n}),this.componentStore.xAxis.setRange([i,i+s]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:i}),this.chartData.plots.some(e=>H1(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation===`horizontal`?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();let e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(let t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}},qct=class{static{p(this,`XYChartBuilder`)}static build(e,t,n,r){return new Kct(e,t,n,r).getDrawableElement()}},a0=0,o0=J1(),s0=q1(),c0=Y1(),l0=s0.plotColorPalette.split(`,`).map(e=>e.trim()),u0=!1,d0=!1,p(q1,`getChartDefaultThemeConfig`),p(J1,`getChartDefaultConfig`),p(Y1,`getChartDefaultData`),p(X1,`textSanitizer`),p(Sct,`setTmpSVGG`),p(Cct,`setOrientation`),p(wct,`setXAxisTitle`),p(Z1,`setXAxisRangeData`),p(Tct,`setXAxisBand`),p(Ect,`setYAxisTitle`),p(Dct,`setYAxisRangeData`),p(Oct,`setYAxisRangeFromPlotData`),p(Q1,`transformDataWithoutCategory`),p($1,`getPlotColorFromPalette`),p(kct,`setLineData`),p(Act,`setBarData`),p(jct,`getDrawableElem`),p(Mct,`getChartThemeConfig`),p(Nct,`getChartConfig`),p(Pct,`getXYChartData`),Yct={parser:Fct,db:{getDrawableElem:jct,clear:p(function(){Is(),a0=0,o0=J1(),c0=Y1(),s0=q1(),l0=s0.plotColorPalette.split(`,`).map(e=>e.trim()),u0=!1,d0=!1},`clear`),setAccTitle:Ls,getAccTitle:Rs,setDiagramTitle:Vs,getDiagramTitle:Hs,getAccDescription:Bs,setAccDescription:zs,setOrientation:Cct,setXAxisTitle:wct,setXAxisRangeData:Z1,setXAxisBand:Tct,setYAxisTitle:Ect,setYAxisRangeData:Dct,setLineData:kct,setBarData:Act,setTmpSVGG:Sct,getChartThemeConfig:Mct,getChartConfig:Nct,getXYChartData:Pct},renderer:{draw:p((e,t,n,r)=>{let i=r.db,a=i.getChartThemeConfig(),o=i.getChartConfig(),s=i.getXYChartData().plots[0].data.map(e=>e[1]);function l(e){return e===`top`?`text-before-edge`:`middle`}p(l,`getDominantBaseLine`);function u(e){return e===`left`?`start`:e===`right`?`end`:`middle`}p(u,`getTextAnchor`);function d(e){return`translate(${e.x}, ${e.y}) rotate(${e.rotation||0})`}p(d,`getTextTransformation`),y.debug(`Rendering xychart chart1816-`+e);let f=gf(t),m=f.append(`g`).attr(`class`,`main`),h=m.append(`rect`).attr(`width`,o.width).attr(`height`,o.height).attr(`class`,`background`);Os(f,o.height,o.width,!0),f.attr(`viewBox`,`0 0 ${o.width} ${o.height}`),h.attr(`fill`,a.backgroundColor),i.setTmpSVGG(f.append(`g`).attr(`class`,`mermaid-tmp-group`));let g=i.getDrawableElem(),_={};function v(e){let t=m,n=``;for(let[r]of e.entries()){let i=m;r>0&&_[n]&&(i=_[n]),n+=e[r],t=_[n],t||=_[n]=i.append(`g`).attr(`class`,e[r])}return t}p(v,`getGroup`);for(let e of g){if(e.data.length===0)continue;let t=v(e.groupTexts);switch(e.type){case`rect`:if(t.selectAll(`rect`).data(e.data).enter().append(`rect`).attr(`x`,e=>e.x).attr(`y`,e=>e.y).attr(`width`,e=>e.width).attr(`height`,e=>e.height).attr(`fill`,e=>e.fill).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth),o.showDataLabel){let n=o.showDataLabelOutsideBar;if(o.chartOrientation===`horizontal`){let r=function(e,t){let{data:n,label:r}=e;return t*r.length*i<=n.width-o};p(r,`fitsHorizontally`);let i=.7,o=10,l=e.data.map((e,t)=>({data:e,label:s[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),u=l.map(e=>{let{data:t}=e,n=t.height*.7;for(;!r(e,n)&&n>0;)--n;return n}),d=Math.floor(Math.min(...u)),f=p(e=>n?e.data.x+e.data.width+10:e.data.x+e.data.width-10,`determineLabelXPosition`);t.selectAll(`text`).data(l).enter().append(`text`).attr(`x`,f).attr(`y`,e=>e.data.y+e.data.height/2).attr(`text-anchor`,n?`start`:`end`).attr(`dominant-baseline`,`middle`).attr(`fill`,a.dataLabelColor).attr(`font-size`,`${d}px`).text(e=>e.label)}else{let r=function(e,t,n){let{data:r,label:i}=e,a=t*i.length*.7,o=r.x+r.width/2,s=o-a/2,l=o+a/2,u=s>=r.x&&l<=r.x+r.width,d=r.y+n+t<=r.y+r.height;return u&&d};p(r,`fitsInBar`);let i=e.data.map((e,t)=>({data:e,label:s[t].toString()})).filter(e=>e.data.width>0&&e.data.height>0),o=i.map(e=>{let{data:t,label:n}=e,i=t.width/(n.length*.7);for(;!r(e,i,10)&&i>0;)--i;return i}),l=Math.floor(Math.min(...o)),u=p(e=>n?e.data.y-10:e.data.y+10,`determineLabelYPosition`);t.selectAll(`text`).data(i).enter().append(`text`).attr(`x`,e=>e.data.x+e.data.width/2).attr(`y`,u).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,n?`auto`:`hanging`).attr(`fill`,a.dataLabelColor).attr(`font-size`,`${l}px`).text(e=>e.label)}}break;case`text`:t.selectAll(`text`).data(e.data).enter().append(`text`).attr(`x`,0).attr(`y`,0).attr(`fill`,e=>e.fill).attr(`font-size`,e=>e.fontSize).attr(`dominant-baseline`,e=>l(e.verticalPos)).attr(`text-anchor`,e=>u(e.horizontalPos)).attr(`transform`,e=>d(e)).text(e=>e.text);break;case`path`:t.selectAll(`path`).data(e.data).enter().append(`path`).attr(`d`,e=>e.path).attr(`fill`,e=>e.fill?e.fill:`none`).attr(`stroke`,e=>e.strokeFill).attr(`stroke-width`,e=>e.strokeWidth)}}},`draw`)}}})),Zct=l({diagram:()=>rlt}),f0,Qct,$ct,elt,tlt,p0,nlt,rlt,ilt=o((()=>{lF(),dF(),UN(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),f0=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,3],n=[1,4],r=[1,5],i=[1,6],a=[5,6,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],o=[1,22],s=[2,7],l=[1,26],u=[1,27],d=[1,28],f=[1,29],m=[1,33],h=[1,34],g=[1,35],_=[1,36],v=[1,37],y=[1,38],b=[1,24],x=[1,31],S=[1,32],C=[1,30],w=[1,39],T=[1,40],E=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],D=[1,61],O=[89,90],k=[5,8,9,11,13,21,22,23,24,27,29,41,42,43,44,45,46,54,61,63,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],A=[27,29],j=[1,70],M=[1,71],N=[1,72],P=[1,73],F=[1,74],I=[1,75],L=[1,76],R=[1,83],ee=[1,80],z=[1,84],B=[1,85],te=[1,86],ne=[1,87],re=[1,88],ie=[1,89],ae=[1,90],oe=[1,91],se=[1,92],ce=[5,8,9,11,13,21,22,23,24,27,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],le=[63,64],ue=[1,101],de=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],fe=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,75,76,77,80,81,82,83,84,85,86,87,88,89,90],pe=[1,110],me=[1,106],he=[1,107],ge=[1,108],_e=[1,109],ve=[1,111],ye=[1,116],be=[1,117],xe=[1,114],Se=[1,115],V={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,acc_title:9,acc_title_value:10,acc_descr:11,acc_descr_value:12,acc_descr_multiline_value:13,requirementDef:14,elementDef:15,relationshipDef:16,direction:17,styleStatement:18,classDefStatement:19,classStatement:20,direction_tb:21,direction_bt:22,direction_rl:23,direction_lr:24,requirementType:25,requirementName:26,STRUCT_START:27,requirementBody:28,STYLE_SEPARATOR:29,idList:30,ID:31,COLONSEP:32,id:33,TEXT:34,text:35,RISK:36,riskLevel:37,VERIFYMTHD:38,verifyType:39,STRUCT_STOP:40,REQUIREMENT:41,FUNCTIONAL_REQUIREMENT:42,INTERFACE_REQUIREMENT:43,PERFORMANCE_REQUIREMENT:44,PHYSICAL_REQUIREMENT:45,DESIGN_CONSTRAINT:46,LOW_RISK:47,MED_RISK:48,HIGH_RISK:49,VERIFY_ANALYSIS:50,VERIFY_DEMONSTRATION:51,VERIFY_INSPECTION:52,VERIFY_TEST:53,ELEMENT:54,elementName:55,elementBody:56,TYPE:57,type:58,DOCREF:59,ref:60,END_ARROW_L:61,relationship:62,LINE:63,END_ARROW_R:64,CONTAINS:65,COPIES:66,DERIVES:67,SATISFIES:68,VERIFIES:69,REFINES:70,TRACES:71,CLASSDEF:72,stylesOpt:73,CLASS:74,ALPHA:75,COMMA:76,STYLE:77,style:78,styleComponent:79,NUM:80,COLON:81,UNIT:82,SPACE:83,BRKT:84,PCT:85,MINUS:86,LABEL:87,SEMICOLON:88,unqString:89,qString:90,$accept:0,$end:1},terminals_:{2:`error`,5:`NEWLINE`,6:`RD`,8:`EOF`,9:`acc_title`,10:`acc_title_value`,11:`acc_descr`,12:`acc_descr_value`,13:`acc_descr_multiline_value`,21:`direction_tb`,22:`direction_bt`,23:`direction_rl`,24:`direction_lr`,27:`STRUCT_START`,29:`STYLE_SEPARATOR`,31:`ID`,32:`COLONSEP`,34:`TEXT`,36:`RISK`,38:`VERIFYMTHD`,40:`STRUCT_STOP`,41:`REQUIREMENT`,42:`FUNCTIONAL_REQUIREMENT`,43:`INTERFACE_REQUIREMENT`,44:`PERFORMANCE_REQUIREMENT`,45:`PHYSICAL_REQUIREMENT`,46:`DESIGN_CONSTRAINT`,47:`LOW_RISK`,48:`MED_RISK`,49:`HIGH_RISK`,50:`VERIFY_ANALYSIS`,51:`VERIFY_DEMONSTRATION`,52:`VERIFY_INSPECTION`,53:`VERIFY_TEST`,54:`ELEMENT`,57:`TYPE`,59:`DOCREF`,61:`END_ARROW_L`,63:`LINE`,64:`END_ARROW_R`,65:`CONTAINS`,66:`COPIES`,67:`DERIVES`,68:`SATISFIES`,69:`VERIFIES`,70:`REFINES`,71:`TRACES`,72:`CLASSDEF`,74:`CLASS`,75:`ALPHA`,76:`COMMA`,77:`STYLE`,80:`NUM`,81:`COLON`,82:`UNIT`,83:`SPACE`,84:`BRKT`,85:`PCT`,86:`MINUS`,87:`LABEL`,88:`SEMICOLON`,89:`unqString`,90:`qString`},productions_:[0,[3,3],[3,2],[3,4],[4,2],[4,2],[4,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[17,1],[17,1],[17,1],[17,1],[14,5],[14,7],[28,5],[28,5],[28,5],[28,5],[28,2],[28,1],[25,1],[25,1],[25,1],[25,1],[25,1],[25,1],[37,1],[37,1],[37,1],[39,1],[39,1],[39,1],[39,1],[15,5],[15,7],[56,5],[56,5],[56,2],[56,1],[16,5],[16,5],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[62,1],[19,3],[20,3],[20,3],[30,1],[30,3],[30,1],[30,3],[18,3],[73,1],[73,3],[78,1],[78,2],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[79,1],[26,1],[26,1],[33,1],[33,1],[35,1],[35,1],[55,1],[55,1],[58,1],[58,1],[60,1],[60,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 4:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 5:case 6:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:r.setDirection(`TB`);break;case 18:r.setDirection(`BT`);break;case 19:r.setDirection(`RL`);break;case 20:r.setDirection(`LR`);break;case 21:r.addRequirement(a[s-3],a[s-4]);break;case 22:r.addRequirement(a[s-5],a[s-6]),r.setClass([a[s-5]],a[s-3]);break;case 23:r.setNewReqId(a[s-2]);break;case 24:r.setNewReqText(a[s-2]);break;case 25:r.setNewReqRisk(a[s-2]);break;case 26:r.setNewReqVerifyMethod(a[s-2]);break;case 29:this.$=r.RequirementType.REQUIREMENT;break;case 30:this.$=r.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=r.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=r.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=r.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=r.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=r.RiskLevel.LOW_RISK;break;case 36:this.$=r.RiskLevel.MED_RISK;break;case 37:this.$=r.RiskLevel.HIGH_RISK;break;case 38:this.$=r.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=r.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=r.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=r.VerifyType.VERIFY_TEST;break;case 42:r.addElement(a[s-3]);break;case 43:r.addElement(a[s-5]),r.setClass([a[s-5]],a[s-3]);break;case 44:r.setNewElementType(a[s-2]);break;case 45:r.setNewElementDocRef(a[s-2]);break;case 48:r.addRelationship(a[s-2],a[s],a[s-4]);break;case 49:r.addRelationship(a[s-2],a[s-4],a[s]);break;case 50:this.$=r.Relationships.CONTAINS;break;case 51:this.$=r.Relationships.COPIES;break;case 52:this.$=r.Relationships.DERIVES;break;case 53:this.$=r.Relationships.SATISFIES;break;case 54:this.$=r.Relationships.VERIFIES;break;case 55:this.$=r.Relationships.REFINES;break;case 56:this.$=r.Relationships.TRACES;break;case 57:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 58:r.setClass(a[s-1],a[s]);break;case 59:r.setClass([a[s-2]],a[s]);break;case 60:case 62:this.$=[a[s]];break;case 61:case 63:this.$=a[s-2].concat([a[s]]);break;case 64:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 65:this.$=[a[s]];break;case 66:a[s-2].push(a[s]),this.$=a[s-2];break;case 68:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,6:t,9:n,11:r,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:n,11:r,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(a,[2,6]),{3:12,4:2,6:t,9:n,11:r,13:i},{1:[2,2]},{4:17,5:o,7:13,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},e(a,[2,4]),e(a,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:o,7:42,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:43,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:44,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:45,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:46,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:47,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:48,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:49,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{4:17,5:o,7:50,8:s,9:n,11:r,13:i,14:14,15:15,16:16,17:18,18:19,19:20,20:21,21:l,22:u,23:d,24:f,25:23,33:25,41:m,42:h,43:g,44:_,45:v,46:y,54:b,72:x,74:S,77:C,89:w,90:T},{26:51,89:[1,52],90:[1,53]},{55:54,89:[1,55],90:[1,56]},{29:[1,59],61:[1,57],63:[1,58]},e(E,[2,17]),e(E,[2,18]),e(E,[2,19]),e(E,[2,20]),{30:60,33:62,75:D,89:w,90:T},{30:63,33:62,75:D,89:w,90:T},{30:64,33:62,75:D,89:w,90:T},e(O,[2,29]),e(O,[2,30]),e(O,[2,31]),e(O,[2,32]),e(O,[2,33]),e(O,[2,34]),e(k,[2,81]),e(k,[2,82]),{1:[2,3]},{8:[2,8]},{8:[2,9]},{8:[2,10]},{8:[2,11]},{8:[2,12]},{8:[2,13]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{27:[1,65],29:[1,66]},e(A,[2,79]),e(A,[2,80]),{27:[1,67],29:[1,68]},e(A,[2,85]),e(A,[2,86]),{62:69,65:j,66:M,67:N,68:P,69:F,70:I,71:L},{62:77,65:j,66:M,67:N,68:P,69:F,70:I,71:L},{30:78,33:62,75:D,89:w,90:T},{73:79,75:R,76:ee,78:81,79:82,80:z,81:B,82:te,83:ne,84:re,85:ie,86:ae,87:oe,88:se},e(ce,[2,60]),e(ce,[2,62]),{73:93,75:R,76:ee,78:81,79:82,80:z,81:B,82:te,83:ne,84:re,85:ie,86:ae,87:oe,88:se},{30:94,33:62,75:D,76:ee,89:w,90:T},{5:[1,95]},{30:96,33:62,75:D,89:w,90:T},{5:[1,97]},{30:98,33:62,75:D,89:w,90:T},{63:[1,99]},e(le,[2,50]),e(le,[2,51]),e(le,[2,52]),e(le,[2,53]),e(le,[2,54]),e(le,[2,55]),e(le,[2,56]),{64:[1,100]},e(E,[2,59],{76:ee}),e(E,[2,64],{76:ue}),{33:103,75:[1,102],89:w,90:T},e(de,[2,65],{79:104,75:R,80:z,81:B,82:te,83:ne,84:re,85:ie,86:ae,87:oe,88:se}),e(fe,[2,67]),e(fe,[2,69]),e(fe,[2,70]),e(fe,[2,71]),e(fe,[2,72]),e(fe,[2,73]),e(fe,[2,74]),e(fe,[2,75]),e(fe,[2,76]),e(fe,[2,77]),e(fe,[2,78]),e(E,[2,57],{76:ue}),e(E,[2,58],{76:ee}),{5:pe,28:105,31:me,34:he,36:ge,38:_e,40:ve},{27:[1,112],76:ee},{5:ye,40:be,56:113,57:xe,59:Se},{27:[1,118],76:ee},{33:119,89:w,90:T},{33:120,89:w,90:T},{75:R,78:121,79:82,80:z,81:B,82:te,83:ne,84:re,85:ie,86:ae,87:oe,88:se},e(ce,[2,61]),e(ce,[2,63]),e(fe,[2,68]),e(E,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:pe,28:126,31:me,34:he,36:ge,38:_e,40:ve},e(E,[2,28]),{5:[1,127]},e(E,[2,42]),{32:[1,128]},{32:[1,129]},{5:ye,40:be,56:130,57:xe,59:Se},e(E,[2,47]),{5:[1,131]},e(E,[2,48]),e(E,[2,49]),e(de,[2,66],{79:104,75:R,80:z,81:B,82:te,83:ne,84:re,85:ie,86:ae,87:oe,88:se}),{33:132,89:w,90:T},{35:133,89:[1,134],90:[1,135]},{37:136,47:[1,137],48:[1,138],49:[1,139]},{39:140,50:[1,141],51:[1,142],52:[1,143],53:[1,144]},e(E,[2,27]),{5:pe,28:145,31:me,34:he,36:ge,38:_e,40:ve},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(E,[2,46]),{5:ye,40:be,56:152,57:xe,59:Se},{5:[1,153]},{5:[1,154]},{5:[2,83]},{5:[2,84]},{5:[1,155]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[1,156]},{5:[2,38]},{5:[2,39]},{5:[2,40]},{5:[2,41]},e(E,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(E,[2,43]),{5:pe,28:159,31:me,34:he,36:ge,38:_e,40:ve},{5:pe,28:160,31:me,34:he,36:ge,38:_e,40:ve},{5:pe,28:161,31:me,34:he,36:ge,38:_e,40:ve},{5:pe,28:162,31:me,34:he,36:ge,38:_e,40:ve},{5:ye,40:be,56:163,57:xe,59:Se},{5:ye,40:be,56:164,57:xe,59:Se},e(E,[2,23]),e(E,[2,24]),e(E,[2,25]),e(E,[2,26]),e(E,[2,44]),e(E,[2,45])],defaultActions:{8:[2,2],12:[2,1],41:[2,3],42:[2,8],43:[2,9],44:[2,10],45:[2,11],46:[2,12],47:[2,13],48:[2,14],49:[2,15],50:[2,16],134:[2,83],135:[2,84],137:[2,35],138:[2,36],139:[2,37],141:[2,38],142:[2,39],143:[2,40],144:[2,41],147:[2,87],148:[2,88],150:[2,89],151:[2,90]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:1817-`+g.showPosition()+`1818-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};V.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).1819-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`1820-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.1821-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return`title`;case 1:return this.begin(`acc_title`),9;case 2:return this.popState(),`acc_title_value`;case 3:return this.begin(`acc_descr`),11;case 4:return this.popState(),`acc_descr_value`;case 5:this.begin(`acc_descr_multiline`);break;case 6:this.popState();break;case 7:return`acc_descr_multiline_value`;case 8:return 21;case 9:return 22;case 10:return 23;case 11:return 24;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:return 8;case 17:return 6;case 18:return 27;case 19:return 40;case 20:return 29;case 21:return 32;case 22:return 31;case 23:return 34;case 24:return 36;case 25:return 38;case 26:return 41;case 27:return 42;case 28:return 43;case 29:return 44;case 30:return 45;case 31:return 46;case 32:return 47;case 33:return 48;case 34:return 49;case 35:return 50;case 36:return 51;case 37:return 52;case 38:return 53;case 39:return 54;case 40:return 65;case 41:return 66;case 42:return 67;case 43:return 68;case 44:return 69;case 45:return 70;case 46:return 71;case 47:return 57;case 48:return 59;case 49:return this.begin(`style`),77;case 50:return 75;case 51:return 81;case 52:return 88;case 53:return`PERCENT`;case 54:return 86;case 55:return 84;case 56:break;case 57:this.begin(`string`);break;case 58:this.popState();break;case 59:return this.begin(`style`),72;case 60:return this.begin(`style`),74;case 61:return 61;case 62:return 64;case 63:return 63;case 64:this.begin(`string`);break;case 65:this.popState();break;case 66:return`qString`;case 67:return t.yytext=t.yytext.trim(),89;case 68:return 75;case 69:return 80;case 70:return 76}},`anonymous`),rules:[/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::{3})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:style\b)/i,/^(?:\w+)/i,/^(?::)/i,/^(?:;)/i,/^(?:%)/i,/^(?:-)/i,/^(?:#)/i,/^(?: )/i,/^(?:["])/i,/^(?:\n)/i,/^(?:classDef\b)/i,/^(?:class\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^:,\r\n\{\<\>\-\=]*)/i,/^(?:\w+)/i,/^(?:[0-9]+)/i,/^(?:,)/i],conditions:{acc_descr_multiline:{rules:[6,7,68,69,70],inclusive:!1},acc_descr:{rules:[4,68,69,70],inclusive:!1},acc_title:{rules:[2,68,69,70],inclusive:!1},style:{rules:[50,51,52,53,54,55,56,57,58,68,69,70],inclusive:!1},unqString:{rules:[68,69,70],inclusive:!1},token:{rules:[68,69,70],inclusive:!1},string:{rules:[65,66,68,69,70],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,59,60,61,62,63,64,67,68,69,70],inclusive:!0}}}})();function Ce(){this.yy={}}return p(Ce,`Parser`),Ce.prototype=V,V.Parser=Ce,new Ce})(),f0.parser=f0,Qct=f0,$ct=class{constructor(){this.relations=[],this.latestRequirement=this.getInitialRequirement(),this.requirements=new Map,this.latestElement=this.getInitialElement(),this.elements=new Map,this.classes=new Map,this.direction=`TB`,this.RequirementType={REQUIREMENT:`Requirement`,FUNCTIONAL_REQUIREMENT:`Functional Requirement`,INTERFACE_REQUIREMENT:`Interface Requirement`,PERFORMANCE_REQUIREMENT:`Performance Requirement`,PHYSICAL_REQUIREMENT:`Physical Requirement`,DESIGN_CONSTRAINT:`Design Constraint`},this.RiskLevel={LOW_RISK:`Low`,MED_RISK:`Medium`,HIGH_RISK:`High`},this.VerifyType={VERIFY_ANALYSIS:`Analysis`,VERIFY_DEMONSTRATION:`Demonstration`,VERIFY_INSPECTION:`Inspection`,VERIFY_TEST:`Test`},this.Relationships={CONTAINS:`contains`,COPIES:`copies`,DERIVES:`derives`,SATISFIES:`satisfies`,VERIFIES:`verifies`,REFINES:`refines`,TRACES:`traces`},this.setAccTitle=Ls,this.getAccTitle=Rs,this.setAccDescription=zs,this.getAccDescription=Bs,this.setDiagramTitle=Vs,this.getDiagramTitle=Hs,this.getConfig=p(()=>Z().requirement,`getConfig`),this.clear(),this.setDirection=this.setDirection.bind(this),this.addRequirement=this.addRequirement.bind(this),this.setNewReqId=this.setNewReqId.bind(this),this.setNewReqRisk=this.setNewReqRisk.bind(this),this.setNewReqText=this.setNewReqText.bind(this),this.setNewReqVerifyMethod=this.setNewReqVerifyMethod.bind(this),this.addElement=this.addElement.bind(this),this.setNewElementType=this.setNewElementType.bind(this),this.setNewElementDocRef=this.setNewElementDocRef.bind(this),this.addRelationship=this.addRelationship.bind(this),this.setCssStyle=this.setCssStyle.bind(this),this.setClass=this.setClass.bind(this),this.defineClass=this.defineClass.bind(this),this.setAccTitle=this.setAccTitle.bind(this),this.setAccDescription=this.setAccDescription.bind(this)}static{p(this,`RequirementDB`)}getDirection(){return this.direction}setDirection(e){this.direction=e}resetLatestRequirement(){this.latestRequirement=this.getInitialRequirement()}resetLatestElement(){this.latestElement=this.getInitialElement()}getInitialRequirement(){return{requirementId:``,text:``,risk:``,verifyMethod:``,name:``,type:``,cssStyles:[],classes:[`default`]}}getInitialElement(){return{name:``,type:``,docRef:``,cssStyles:[],classes:[`default`]}}addRequirement(e,t){return this.requirements.has(e)||this.requirements.set(e,{name:e,type:t,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:[`default`]}),this.resetLatestRequirement(),this.requirements.get(e)}getRequirements(){return this.requirements}setNewReqId(e){this.latestRequirement!==void 0&&(this.latestRequirement.requirementId=e)}setNewReqText(e){this.latestRequirement!==void 0&&(this.latestRequirement.text=e)}setNewReqRisk(e){this.latestRequirement!==void 0&&(this.latestRequirement.risk=e)}setNewReqVerifyMethod(e){this.latestRequirement!==void 0&&(this.latestRequirement.verifyMethod=e)}addElement(e){return this.elements.has(e)||(this.elements.set(e,{name:e,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:[`default`]}),y.info(`Added new element: `,e)),this.resetLatestElement(),this.elements.get(e)}getElements(){return this.elements}setNewElementType(e){this.latestElement!==void 0&&(this.latestElement.type=e)}setNewElementDocRef(e){this.latestElement!==void 0&&(this.latestElement.docRef=e)}addRelationship(e,t,n){this.relations.push({type:e,src:t,dst:n})}getRelationships(){return this.relations}clear(){this.relations=[],this.resetLatestRequirement(),this.requirements=new Map,this.resetLatestElement(),this.elements=new Map,this.classes=new Map,Is()}setCssStyle(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(!t||!e)return;for(let n of t)n.includes(`,`)?e.cssStyles.push(...n.split(`,`)):e.cssStyles.push(n)}}setClass(e,t){for(let n of e){let e=this.requirements.get(n)??this.elements.get(n);if(e)for(let n of t){e.classes.push(n);let t=this.classes.get(n)?.styles;t&&e.cssStyles.push(...t)}}}defineClass(e,t){for(let n of e){let e=this.classes.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.classes.set(n,e)),t&&t.forEach(function(t){if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.requirements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))}),this.elements.forEach(e=>{e.classes.includes(n)&&e.cssStyles.push(...t.flatMap(e=>e.split(`,`)))})}}getClasses(){return this.classes}getData(){let e=Z(),t=[],n=[];for(let n of this.requirements.values()){let r=n;r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.shape=`requirementBox`,r.look=e.look,r.colorIndex=t.length,t.push(r)}for(let n of this.elements.values()){let r=n;r.shape=`requirementBox`,r.look=e.look,r.id=n.name,r.cssStyles=n.cssStyles,r.cssClasses=n.classes.join(` `),r.colorIndex=t.length,t.push(r)}let r=0;for(let t of this.relations){let i=t.type===this.Relationships.CONTAINS,a={id:`${t.src}-${t.dst}-${r++}`,start:this.requirements.get(t.src)?.name??this.elements.get(t.src)?.name,end:this.requirements.get(t.dst)?.name??this.elements.get(t.dst)?.name,label:`&lt;&lt;${t.type}&gt;&gt;`,classes:`relationshipLine`,style:[`fill:none`,i?``:`stroke-dasharray: 10,7`],labelpos:`c`,thickness:`normal`,type:`normal`,pattern:i?`normal`:`dashed`,arrowTypeStart:i?`requirement_contains`:``,arrowTypeEnd:i?``:`requirement_arrow`,look:e.look,labelType:`markdown`};n.push(a)}return{nodes:t,edges:n,other:{},config:e,direction:this.getDirection()}}},elt=p(e=>{let{themeVariables:t,look:n}=es(),{bkgColorArray:r,borderColorArray:i}=t;if(!i?.length)return``;let a=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)a+=`1822-1823- [data-look="${n}"][data-color-id="color-${t}"].node path {1824- stroke: ${i[t]};1825- fill: ${r?.length?r[t]:``};1826- }1827-1828- [data-look="${n}"][data-color-id="color-${t}"].node rect {1829- stroke: ${i[t]};1830- fill: ${r?.length?r[t]:``};1831- }1832- `;return a},`genColor`),tlt=p(e=>{let{look:t,themeVariables:n}=es(),{requirementEdgeLabelBackground:r}=n;return`1833- ${elt(e)}1834- marker {1835- fill: ${e.relationColor};1836- stroke: ${e.relationColor};1837- }1838-1839- marker.cross {1840- stroke: ${e.lineColor};1841- }1842-1843- svg {1844- font-family: ${e.fontFamily};1845- font-size: ${e.fontSize};1846- }1847-1848- .reqBox {1849- fill: ${e.requirementBackground};1850- fill-opacity: 1.0;1851- stroke: ${e.requirementBorderColor};1852- stroke-width: ${e.requirementBorderSize};1853- }1854- 1855- .reqTitle, .reqLabel{1856- fill: ${e.requirementTextColor};1857- }1858- .reqLabelBox {1859- fill: ${e.relationLabelBackground};1860- fill-opacity: 1.0;1861- }1862-1863- .req-title-line {1864- stroke: ${e.requirementBorderColor};1865- stroke-width: ${e.requirementBorderSize};1866- }1867- .relationshipLine {1868- stroke: ${e.relationColor};1869- stroke-width: ${t===`neo`?e.strokeWidth:`1px`};1870- }1871- .relationshipLabel {1872- fill: ${e.relationLabelColor};1873- }1874- .edgeLabel {1875- background-color: ${e.edgeLabelBackground};1876- }1877- .edgeLabel .label rect {1878- fill: ${e.edgeLabelBackground};1879- }1880- .edgeLabel .label text {1881- fill: ${e.relationLabelColor};1882- }1883- .divider {1884- stroke: ${e.nodeBorder};1885- stroke-width: 1;1886- }1887- .label {1888- font-family: ${e.fontFamily};1889- color: ${e.nodeTextColor||e.textColor};1890- }1891- .label text,span {1892- fill: ${e.nodeTextColor||e.textColor};1893- color: ${e.nodeTextColor||e.textColor};1894- }1895- .labelBkg {1896- background-color: ${r??e.edgeLabelBackground};1897- }1898-1899-`},`getStyles`),p0={},m(p0,{draw:()=>nlt}),nlt=p(async function(e,t,n,r){y.info(`REF0:`),y.info(`Drawing requirement diagram (unified)`,t);let{securityLevel:i,state:a,layout:o,look:s}=Z(),l=r.db.getData(),u=cF(t,i);l.type=r.type,l.layoutAlgorithm=HN(o),l.nodeSpacing=a?.nodeSpacing??50,l.rankSpacing=a?.rankSpacing??50,l.markers=s===`neo`?[`requirement_contains_neo`,`requirement_arrow_neo`]:[`requirement_contains`,`requirement_arrow`],l.diagramId=t,await VN(l,u),Up.insertTitle(u,`requirementDiagramTitleText`,a?.titleTopMargin??25,r.db.getDiagramTitle()),uF(u,8,`requirementDiagram`,a?.useMaxWidth??!0)},`draw`),rlt={parser:Qct,get db(){return new $ct},renderer:p0,styles:tlt}})),alt=l({diagram:()=>Qlt});async function olt(e,t){F0.bumpVerticalPos(10);let{startx:n,stopx:r,message:i}=t,a=Ds.splitBreaks(i).length,o=ws(i),s=o?await Ts(i,Z()):Up.calculateTextDimensions(i,L0($));if(!o){let e=s.height/a;t.height+=e,F0.bumpVerticalPos(e)}let l,u=s.height-10,d=s.width;if(n===r){l=F0.getVerticalPos()+u,$.rightAngles||(u+=$.boxMargin,l=F0.getVerticalPos()+u),u+=30;let e=Ds.getMax(d/2,$.width/2);F0.insert(n-e,F0.getVerticalPos()-10+u,r+e,F0.getVerticalPos()+30+u)}else u+=$.boxMargin,l=F0.getVerticalPos()+u,F0.insert(n,l-10,r,l);return F0.bumpVerticalPos(u),t.height+=u,t.stopy=t.starty+t.height,F0.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),l}function m0(e,t,n,r,i){F0.bumpVerticalPos(n);let a=r;if(t.id&&t.message&&e[t.id]){let n=e[t.id].width,i=L0($);t.message=Up.wrapLabel(`[${t.message}]`,n-2*$.wrapPadding,i),t.width=n,t.wrap=!0;let o=Up.calculateTextDimensions(t.message,i),s=Ds.getMax(o.height,$.labelBoxHeight);a=r+s,y.debug(`${s} - ${t.message}`)}i(t),F0.bumpVerticalPos(a)}function slt(e,t,n,r,i,a,o){function s(n,r){n.x<i.get(e.from).x?(F0.insert(t.stopx-r,t.starty,t.startx,t.stopy+n.height/2+$.noteMargin),t.stopx+=r):(F0.insert(t.startx,t.starty,t.stopx+r,t.stopy+n.height/2+$.noteMargin),t.stopx-=r)}p(s,`receiverAdjustment`);function l(n,r){n.x<i.get(e.to).x?(F0.insert(t.startx-r,t.starty,t.stopx,t.stopy+n.height/2+$.noteMargin),t.startx+=r):(F0.insert(t.stopx,t.starty,t.startx+r,t.stopy+n.height/2+$.noteMargin),t.startx-=r)}p(l,`senderAdjustment`);let u=[_0.ACTOR,_0.CONTROL,_0.ENTITY,_0.DATABASE];if(a.get(e.to)==r){let t=i.get(e.to);s(t,u.includes(t.type)?v0/2+3:t.width/2+3),t.starty=n-t.height/2,F0.bumpVerticalPos(t.height/2)}else if(o.get(e.from)==r){let t=i.get(e.from);$.mirrorActors&&l(t,u.includes(t.type)?v0/2:t.width/2),t.stopy=n-t.height/2,F0.bumpVerticalPos(t.height/2)}else if(o.get(e.to)==r){let t=i.get(e.to);$.mirrorActors&&s(t,u.includes(t.type)?v0/2+3:t.width/2+3),t.stopy=n-t.height/2,F0.bumpVerticalPos(t.height/2)}}async function clt(e,t,n){let r={};for(let i of t)if(e.get(i.to)&&e.get(i.from)){let t=e.get(i.to);if(i.placement===n.db.PLACEMENT.LEFTOF&&!t.prevActor||i.placement===n.db.PLACEMENT.RIGHTOF&&!t.nextActor)continue;let a=i.placement!==void 0,o=!a,s=a?R0($):L0($),l=i.wrap?Up.wrapLabel(i.message,$.width-2*$.wrapPadding,s):i.message,u=(ws(l)?await Ts(i.message,Z()):Up.calculateTextDimensions(l,s)).width+2*$.wrapPadding;o&&i.from===t.nextActor?r[i.to]=Ds.getMax(r[i.to]||0,u):o&&i.from===t.prevActor?r[i.from]=Ds.getMax(r[i.from]||0,u):o&&i.from===i.to?(r[i.from]=Ds.getMax(r[i.from]||0,u/2),r[i.to]=Ds.getMax(r[i.to]||0,u/2)):i.placement===n.db.PLACEMENT.RIGHTOF?r[i.from]=Ds.getMax(r[i.from]||0,u):i.placement===n.db.PLACEMENT.LEFTOF?r[t.prevActor]=Ds.getMax(r[t.prevActor]||0,u):i.placement===n.db.PLACEMENT.OVER&&(t.prevActor&&(r[t.prevActor]=Ds.getMax(r[t.prevActor]||0,u/2)),t.nextActor&&(r[i.from]=Ds.getMax(r[i.from]||0,u/2)))}return y.debug(`maxMessageWidthPerActor:`,r),r}async function llt(e,t,n){let r=0;for(let t of e.keys()){let n=e.get(t);n.wrap&&(n.description=Up.wrapLabel(n.description,$.width-2*$.wrapPadding,z0($)));let i=ws(n.description)?await Ts(n.description,Z()):Up.calculateTextDimensions(n.description,z0($));n.width=n.wrap?$.width:Ds.getMax($.width,i.width+2*$.wrapPadding),n.height=n.wrap?Ds.getMax(i.height,$.height):$.height,r=Ds.getMax(r,n.height)}for(let n in t){let r=e.get(n);if(!r)continue;let i=e.get(r.nextActor);if(!i){let e=t[n]+$.actorMargin-r.width/2;r.margin=Ds.getMax(e,$.actorMargin);continue}let a=t[n]+$.actorMargin-r.width/2-i.width/2;r.margin=Ds.getMax(a,$.actorMargin)}let i=0;return n.forEach(t=>{let n=L0($),r=t.actorKeys.reduce((t,n)=>t+=e.get(n).width+(e.get(n).margin||0),0),a=$.boxMargin*8;r+=a,r-=2*$.boxTextMargin,t.wrap&&(t.name=Up.wrapLabel(t.name,r-2*$.wrapPadding,n));let o=Up.calculateTextDimensions(t.name,n);i=Ds.getMax(o.height,i);let s=Ds.getMax(r,o.width+2*$.wrapPadding);if(t.margin=$.boxTextMargin,r<s){let e=(s-r)/2;t.margin+=e}}),n.forEach(e=>e.textMaxHeight=i),Ds.getMax(r,$.height)}var h0,g0,ult,dlt,flt,plt,_0,mlt,hlt,v0,y0,b0,x0,S0,C0,w0,glt,T0,E0,D0,O0,k0,A0,_lt,vlt,ylt,blt,xlt,Slt,Clt,wlt,Tlt,Elt,Dlt,Olt,klt,j0,Alt,jlt,Mlt,Nlt,Plt,Flt,Ilt,Llt,M0,Rlt,N0,zlt,P0,$,F0,Blt,I0,L0,R0,z0,Vlt,Hlt,B0,V0,H0,U0,W0,Ult,Wlt,Glt,Klt,qlt,G0,Jlt,K0,Ylt,Xlt,Zlt,Qlt,$lt=o((()=>{wF(),vS(),bP(),Kp(),Zs(),S(),h(),hf(),h0=Ff(),g0=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,12],l=[1,14],u=[1,15],d=[1,17],f=[1,18],m=[1,19],h=[1,25],g=[1,26],_=[1,27],v=[1,28],y=[1,29],b=[1,30],x=[1,31],S=[1,32],C=[1,33],w=[1,34],T=[1,35],E=[1,36],D=[1,37],O=[1,38],k=[1,39],A=[1,40],j=[1,42],M=[1,43],N=[1,44],P=[1,45],F=[1,46],I=[1,47],L=[1,4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,49,50,51,53,54,56,61,62,63,64,73],R=[1,74],ee=[1,80],z=[1,81],B=[1,82],te=[1,83],ne=[1,84],re=[1,85],ie=[1,86],ae=[1,87],oe=[1,88],se=[1,89],ce=[1,90],le=[1,91],ue=[1,92],de=[1,93],fe=[1,94],pe=[1,95],me=[1,96],he=[1,97],ge=[1,98],_e=[1,99],ve=[1,100],ye=[1,101],be=[1,102],xe=[1,103],Se=[1,104],V=[1,105],Ce=[2,78],we=[4,5,17,51,53,54],Te=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],Ee=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,50,51,53,54,56,61,62,63,64,73],De=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,49,51,53,54,56,61,62,63,64,73],H=[4,5,10,14,15,17,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,48,51,53,54,56,61,62,63,64,73],Oe=[5,52],ke=[70,71,72,73],Ae=[1,151],U={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,INVALID:10,box_section:11,box_line:12,participant_statement:13,create:14,box:15,restOfLine:16,end:17,signal:18,autonumber:19,NUM:20,off:21,activate:22,actor:23,deactivate:24,note_statement:25,links_statement:26,link_statement:27,properties_statement:28,details_statement:29,title:30,legacy_title:31,acc_title:32,acc_title_value:33,acc_descr:34,acc_descr_value:35,acc_descr_multiline_value:36,loop:37,rect:38,opt:39,alt:40,else_sections:41,par:42,par_sections:43,par_over:44,critical:45,option_sections:46,break:47,option:48,and:49,else:50,participant:51,AS:52,participant_actor:53,destroy:54,actor_with_config:55,note:56,placement:57,text2:58,over:59,actor_pair:60,links:61,link:62,properties:63,details:64,spaceList:65,",":66,left_of:67,right_of:68,signaltype:69,"+":70,"-":71,"()":72,ACTOR:73,config_object:74,CONFIG_START:75,CONFIG_CONTENT:76,CONFIG_END:77,SOLID_OPEN_ARROW:78,DOTTED_OPEN_ARROW:79,SOLID_ARROW:80,SOLID_ARROW_TOP:81,SOLID_ARROW_BOTTOM:82,STICK_ARROW_TOP:83,STICK_ARROW_BOTTOM:84,SOLID_ARROW_TOP_DOTTED:85,SOLID_ARROW_BOTTOM_DOTTED:86,STICK_ARROW_TOP_DOTTED:87,STICK_ARROW_BOTTOM_DOTTED:88,SOLID_ARROW_TOP_REVERSE:89,SOLID_ARROW_BOTTOM_REVERSE:90,STICK_ARROW_TOP_REVERSE:91,STICK_ARROW_BOTTOM_REVERSE:92,SOLID_ARROW_TOP_REVERSE_DOTTED:93,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:94,STICK_ARROW_TOP_REVERSE_DOTTED:95,STICK_ARROW_BOTTOM_REVERSE_DOTTED:96,BIDIRECTIONAL_SOLID_ARROW:97,DOTTED_ARROW:98,BIDIRECTIONAL_DOTTED_ARROW:99,SOLID_CROSS:100,DOTTED_CROSS:101,SOLID_POINT:102,DOTTED_POINT:103,TXT:104,$accept:0,$end:1},terminals_:{2:`error`,4:`SPACE`,5:`NEWLINE`,6:`SD`,10:`INVALID`,14:`create`,15:`box`,16:`restOfLine`,17:`end`,19:`autonumber`,20:`NUM`,21:`off`,22:`activate`,24:`deactivate`,30:`title`,31:`legacy_title`,32:`acc_title`,33:`acc_title_value`,34:`acc_descr`,35:`acc_descr_value`,36:`acc_descr_multiline_value`,37:`loop`,38:`rect`,39:`opt`,40:`alt`,42:`par`,44:`par_over`,45:`critical`,47:`break`,48:`option`,49:`and`,50:`else`,51:`participant`,52:`AS`,53:`participant_actor`,54:`destroy`,56:`note`,59:`over`,61:`links`,62:`link`,63:`properties`,64:`details`,66:`,`,67:`left_of`,68:`right_of`,70:`+`,71:`-`,72:`()`,73:`ACTOR`,75:`CONFIG_START`,76:`CONFIG_CONTENT`,77:`CONFIG_END`,78:`SOLID_OPEN_ARROW`,79:`DOTTED_OPEN_ARROW`,80:`SOLID_ARROW`,81:`SOLID_ARROW_TOP`,82:`SOLID_ARROW_BOTTOM`,83:`STICK_ARROW_TOP`,84:`STICK_ARROW_BOTTOM`,85:`SOLID_ARROW_TOP_DOTTED`,86:`SOLID_ARROW_BOTTOM_DOTTED`,87:`STICK_ARROW_TOP_DOTTED`,88:`STICK_ARROW_BOTTOM_DOTTED`,89:`SOLID_ARROW_TOP_REVERSE`,90:`SOLID_ARROW_BOTTOM_REVERSE`,91:`STICK_ARROW_TOP_REVERSE`,92:`STICK_ARROW_BOTTOM_REVERSE`,93:`SOLID_ARROW_TOP_REVERSE_DOTTED`,94:`SOLID_ARROW_BOTTOM_REVERSE_DOTTED`,95:`STICK_ARROW_TOP_REVERSE_DOTTED`,96:`STICK_ARROW_BOTTOM_REVERSE_DOTTED`,97:`BIDIRECTIONAL_SOLID_ARROW`,98:`DOTTED_ARROW`,99:`BIDIRECTIONAL_DOTTED_ARROW`,100:`SOLID_CROSS`,101:`DOTTED_CROSS`,102:`SOLID_POINT`,103:`DOTTED_POINT`,104:`TXT`},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[8,1],[11,0],[11,2],[12,2],[12,1],[12,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[46,1],[46,4],[43,1],[43,4],[41,1],[41,4],[13,5],[13,3],[13,5],[13,3],[13,3],[13,5],[13,3],[13,5],[13,3],[25,4],[25,4],[26,3],[27,3],[28,3],[29,3],[65,2],[65,1],[60,3],[60,1],[57,1],[57,1],[18,5],[18,5],[18,5],[18,5],[18,6],[18,4],[55,2],[74,3],[23,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[69,1],[58,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.apply(a[s]),a[s];case 4:case 10:this.$=[];break;case 5:case 11:a[s-1].push(a[s]),this.$=a[s-1];break;case 6:case 7:case 12:case 13:this.$=a[s];break;case 8:case 9:case 14:this.$=[];break;case 16:a[s].type=`createParticipant`,this.$=a[s];break;case 17:a[s-1].unshift({type:`boxStart`,boxData:r.parseBoxData(a[s-2])}),a[s-1].push({type:`boxEnd`,boxText:a[s-2]}),this.$=a[s-1];break;case 19:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-2]),sequenceIndexStep:Number(a[s-1]),sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 20:this.$={type:`sequenceIndex`,sequenceIndex:Number(a[s-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 21:this.$={type:`sequenceIndex`,sequenceVisible:!1,signalType:r.LINETYPE.AUTONUMBER};break;case 22:this.$={type:`sequenceIndex`,sequenceVisible:!0,signalType:r.LINETYPE.AUTONUMBER};break;case 23:this.$={type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor};break;case 24:this.$={type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1].actor};break;case 30:r.setDiagramTitle(a[s].substring(6)),this.$=a[s].substring(6);break;case 31:r.setDiagramTitle(a[s].substring(7)),this.$=a[s].substring(7);break;case 32:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 33:case 34:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 35:a[s-1].unshift({type:`loopStart`,loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:`loopEnd`,loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 36:a[s-1].unshift({type:`rectStart`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:`rectEnd`,color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 37:a[s-1].unshift({type:`optStart`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:`optEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 38:a[s-1].unshift({type:`altStart`,altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:`altEnd`,signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 39:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 40:a[s-1].unshift({type:`parStart`,parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_OVER_START}),a[s-1].push({type:`parEnd`,signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 41:a[s-1].unshift({type:`criticalStart`,criticalText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.CRITICAL_START}),a[s-1].push({type:`criticalEnd`,signalType:r.LINETYPE.CRITICAL_END}),this.$=a[s-1];break;case 42:a[s-1].unshift({type:`breakStart`,breakText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_START}),a[s-1].push({type:`breakEnd`,optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.BREAK_END}),this.$=a[s-1];break;case 44:this.$=a[s-3].concat([{type:`option`,optionText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.CRITICAL_OPTION},a[s]]);break;case 46:this.$=a[s-3].concat([{type:`and`,parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 48:this.$=a[s-3].concat([{type:`else`,altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 49:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 50:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 51:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 52:case 57:a[s-1].draw=`actor`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 53:a[s-1].type=`destroyParticipant`,this.$=a[s-1];break;case 54:a[s-3].draw=`participant`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 55:a[s-1].draw=`participant`,a[s-1].type=`addParticipant`,this.$=a[s-1];break;case 56:a[s-3].draw=`actor`,a[s-3].type=`addParticipant`,a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 58:this.$=[a[s-1],{type:`addNote`,placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 59:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:`addNote`,placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 60:this.$=[a[s-1],{type:`addLinks`,actor:a[s-1].actor,text:a[s]}];break;case 61:this.$=[a[s-1],{type:`addALink`,actor:a[s-1].actor,text:a[s]}];break;case 62:this.$=[a[s-1],{type:`addProperties`,actor:a[s-1].actor,text:a[s]}];break;case 63:this.$=[a[s-1],{type:`addDetails`,actor:a[s-1].actor,text:a[s]}];break;case 66:this.$=[a[s-2],a[s]];break;case 67:this.$=a[s];break;case 68:this.$=r.PLACEMENT.LEFTOF;break;case 69:this.$=r.PLACEMENT.RIGHTOF;break;case 70:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0},{type:`activeStart`,signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1].actor}];break;case 71:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:`activeEnd`,signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4].actor}];break;case 72:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor}];break;case 73:this.$=[a[s-4],a[s-1],{type:`addMessage`,from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s],activate:!1,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_REVERSE},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-4].actor}];break;case 74:this.$=[a[s-5],a[s-1],{type:`addMessage`,from:a[s-5].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s],activate:!0,centralConnection:r.LINETYPE.CENTRAL_CONNECTION_DUAL},{type:`centralConnection`,signalType:r.LINETYPE.CENTRAL_CONNECTION,actor:a[s-1].actor},{type:`centralConnectionReverse`,signalType:r.LINETYPE.CENTRAL_CONNECTION_REVERSE,actor:a[s-5].actor}];break;case 75:this.$=[a[s-3],a[s-1],{type:`addMessage`,from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 76:this.$={type:`addParticipant`,actor:a[s-1],config:a[s]};break;case 77:this.$=a[s-1].trim();break;case 78:this.$={type:`addParticipant`,actor:a[s]};break;case 79:this.$=r.LINETYPE.SOLID_OPEN;break;case 80:this.$=r.LINETYPE.DOTTED_OPEN;break;case 81:this.$=r.LINETYPE.SOLID;break;case 82:this.$=r.LINETYPE.SOLID_TOP;break;case 83:this.$=r.LINETYPE.SOLID_BOTTOM;break;case 84:this.$=r.LINETYPE.STICK_TOP;break;case 85:this.$=r.LINETYPE.STICK_BOTTOM;break;case 86:this.$=r.LINETYPE.SOLID_TOP_DOTTED;break;case 87:this.$=r.LINETYPE.SOLID_BOTTOM_DOTTED;break;case 88:this.$=r.LINETYPE.STICK_TOP_DOTTED;break;case 89:this.$=r.LINETYPE.STICK_BOTTOM_DOTTED;break;case 90:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE;break;case 91:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE;break;case 92:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE;break;case 93:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE;break;case 94:this.$=r.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED;break;case 95:this.$=r.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED;break;case 96:this.$=r.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED;break;case 97:this.$=r.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED;break;case 98:this.$=r.LINETYPE.BIDIRECTIONAL_SOLID;break;case 99:this.$=r.LINETYPE.DOTTED;break;case 100:this.$=r.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 101:this.$=r.LINETYPE.SOLID_CROSS;break;case 102:this.$=r.LINETYPE.DOTTED_CROSS;break;case 103:this.$=r.LINETYPE.SOLID_POINT;break;case 104:this.$=r.LINETYPE.DOTTED_POINT;break;case 105:this.$=r.parseMessage(a[s].trim().substring(1))}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,10,14,15,19,22,24,30,31,32,34,36,37,38,39,40,42,44,45,47,51,53,54,56,61,62,63,64,73],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},e(L,[2,5]),{9:48,13:13,14:l,15:u,18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},e(L,[2,7]),e(L,[2,8]),e(L,[2,9]),e(L,[2,15]),{13:49,51:O,53:k,54:A},{16:[1,50]},{5:[1,51]},{5:[1,54],20:[1,52],21:[1,53]},{23:55,73:I},{23:56,73:I},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},{5:[1,61]},e(L,[2,30]),e(L,[2,31]),{33:[1,62]},{35:[1,63]},e(L,[2,34]),{16:[1,64]},{16:[1,65]},{16:[1,66]},{16:[1,67]},{16:[1,68]},{16:[1,69]},{16:[1,70]},{16:[1,71]},{23:72,55:73,73:R},{23:75,55:76,73:R},{23:77,73:I},{69:78,72:[1,79],78:ee,79:z,80:B,81:te,82:ne,83:re,84:ie,85:ae,86:oe,87:se,88:ce,89:le,90:ue,91:de,92:fe,93:pe,94:me,95:he,96:ge,97:_e,98:ve,99:ye,100:be,101:xe,102:Se,103:V},{57:106,59:[1,107],67:[1,108],68:[1,109]},{23:110,73:I},{23:111,73:I},{23:112,73:I},{23:113,73:I},e([5,66,72,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104],Ce),e(L,[2,6]),e(L,[2,16]),e(we,[2,10],{11:114}),e(L,[2,18]),{5:[1,116],20:[1,115]},{5:[1,117]},e(L,[2,22]),{5:[1,118]},{5:[1,119]},e(L,[2,25]),e(L,[2,26]),e(L,[2,27]),e(L,[2,28]),e(L,[2,29]),e(L,[2,32]),e(L,[2,33]),e(Te,i,{7:120}),e(Te,i,{7:121}),e(Te,i,{7:122}),e(Ee,i,{41:123,7:124}),e(De,i,{43:125,7:126}),e(De,i,{7:126,43:127}),e(H,i,{46:128,7:129}),e(Te,i,{7:130}),{5:[1,132],52:[1,131]},{5:[1,134],52:[1,133]},e(Oe,Ce,{74:135,75:[1,136]}),{5:[1,138],52:[1,137]},{5:[1,140],52:[1,139]},{5:[1,141]},{23:145,70:[1,142],71:[1,143],72:[1,144],73:I},{69:146,78:ee,79:z,80:B,81:te,82:ne,83:re,84:ie,85:ae,86:oe,87:se,88:ce,89:le,90:ue,91:de,92:fe,93:pe,94:me,95:he,96:ge,97:_e,98:ve,99:ye,100:be,101:xe,102:Se,103:V},e(ke,[2,79]),e(ke,[2,80]),e(ke,[2,81]),e(ke,[2,82]),e(ke,[2,83]),e(ke,[2,84]),e(ke,[2,85]),e(ke,[2,86]),e(ke,[2,87]),e(ke,[2,88]),e(ke,[2,89]),e(ke,[2,90]),e(ke,[2,91]),e(ke,[2,92]),e(ke,[2,93]),e(ke,[2,94]),e(ke,[2,95]),e(ke,[2,96]),e(ke,[2,97]),e(ke,[2,98]),e(ke,[2,99]),e(ke,[2,100]),e(ke,[2,101]),e(ke,[2,102]),e(ke,[2,103]),e(ke,[2,104]),{23:147,73:I},{23:149,60:148,73:I},{73:[2,68]},{73:[2,69]},{58:150,104:Ae},{58:152,104:Ae},{58:153,104:Ae},{58:154,104:Ae},{4:[1,157],5:[1,159],12:156,13:158,17:[1,155],51:O,53:k,54:A},{5:[1,160]},e(L,[2,20]),e(L,[2,21]),e(L,[2,23]),e(L,[2,24]),{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,161],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,162],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,163],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{17:[1,164]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,47],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,50:[1,165],51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{17:[1,166]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,45],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,49:[1,167],51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{17:[1,168]},{17:[1,169]},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[2,43],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,48:[1,170],51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{4:a,5:o,8:8,9:10,10:s,13:13,14:l,15:u,17:[1,171],18:16,19:d,22:f,23:41,24:m,25:20,26:21,27:22,28:23,29:24,30:h,31:g,32:_,34:v,36:y,37:b,38:x,39:S,40:C,42:w,44:T,45:E,47:D,51:O,53:k,54:A,56:j,61:M,62:N,63:P,64:F,73:I},{16:[1,172]},e(L,[2,50]),{16:[1,173]},e(L,[2,55]),e(Oe,[2,76]),{76:[1,174]},{16:[1,175]},e(L,[2,52]),{16:[1,176]},e(L,[2,57]),e(L,[2,53]),{23:177,73:I},{23:178,73:I},{23:179,73:I},{58:180,104:Ae},{23:181,72:[1,182],73:I},{58:183,104:Ae},{58:184,104:Ae},{66:[1,185],104:[2,67]},{5:[2,60]},{5:[2,105]},{5:[2,61]},{5:[2,62]},{5:[2,63]},e(L,[2,17]),e(we,[2,11]),{13:186,51:O,53:k,54:A},e(we,[2,13]),e(we,[2,14]),e(L,[2,19]),e(L,[2,35]),e(L,[2,36]),e(L,[2,37]),e(L,[2,38]),{16:[1,187]},e(L,[2,39]),{16:[1,188]},e(L,[2,40]),e(L,[2,41]),{16:[1,189]},e(L,[2,42]),{5:[1,190]},{5:[1,191]},{77:[1,192]},{5:[1,193]},{5:[1,194]},{58:195,104:Ae},{58:196,104:Ae},{58:197,104:Ae},{5:[2,75]},{58:198,104:Ae},{23:199,73:I},{5:[2,58]},{5:[2,59]},{23:200,73:I},e(we,[2,12]),e(Ee,i,{7:124,41:201}),e(De,i,{7:126,43:202}),e(H,i,{7:129,46:203}),e(L,[2,49]),e(L,[2,54]),e(Oe,[2,77]),e(L,[2,51]),e(L,[2,56]),{5:[2,70]},{5:[2,71]},{5:[2,72]},{5:[2,73]},{58:204,104:Ae},{104:[2,66]},{17:[2,48]},{17:[2,46]},{17:[2,44]},{5:[2,74]}],defaultActions:{5:[2,1],6:[2,2],108:[2,68],109:[2,69],150:[2,60],151:[2,105],152:[2,61],153:[2,62],154:[2,63],180:[2,75],183:[2,58],184:[2,59],195:[2,70],196:[2,71],197:[2,72],198:[2,73],200:[2,66],201:[2,48],202:[2,46],203:[2,44],204:[2,74]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:1900-`+g.showPosition()+`1901-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};U.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).1902-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`1903-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.1904-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:break;case 6:return 20;case 7:return this.begin(`CONFIG`),75;case 8:return 76;case 9:return this.popState(),this.begin(`ALIAS`),77;case 10:return this.popState(),this.popState(),77;case 11:return t.yytext=t.yytext.trim(),73;case 12:return t.yytext=t.yytext.trim(),this.begin(`ALIAS`),73;case 13:return t.yytext=t.yytext.trim(),this.popState(),73;case 14:return this.popState(),10;case 15:return t.yytext=t.yytext.trim(),this.popState(),10;case 16:return this.begin(`LINE`),15;case 17:return this.begin(`ID`),51;case 18:return this.begin(`ID`),53;case 19:return 14;case 20:return this.begin(`ID`),54;case 21:return this.popState(),this.popState(),this.begin(`LINE`),52;case 22:return this.popState(),this.popState(),5;case 23:return this.begin(`LINE`),37;case 24:return this.begin(`LINE`),38;case 25:return this.begin(`LINE`),39;case 26:return this.begin(`LINE`),40;case 27:return this.begin(`LINE`),50;case 28:return this.begin(`LINE`),42;case 29:return this.begin(`LINE`),44;case 30:return this.begin(`LINE`),49;case 31:return this.begin(`LINE`),45;case 32:return this.begin(`LINE`),48;case 33:return this.begin(`LINE`),47;case 34:return this.popState(),16;case 35:return 17;case 36:return 67;case 37:return 68;case 38:return 61;case 39:return 62;case 40:return 63;case 41:return 64;case 42:return 59;case 43:return 56;case 44:return this.begin(`ID`),22;case 45:return this.begin(`ID`),24;case 46:return 30;case 47:return 31;case 48:return this.begin(`acc_title`),32;case 49:return this.popState(),`acc_title_value`;case 50:return this.begin(`acc_descr`),34;case 51:return this.popState(),`acc_descr_value`;case 52:this.begin(`acc_descr_multiline`);break;case 53:this.popState();break;case 54:return`acc_descr_multiline_value`;case 55:return 6;case 56:return 19;case 57:return 21;case 58:return 66;case 59:return 5;case 60:return t.yytext=t.yytext.trim(),73;case 61:return 80;case 62:return 97;case 63:return 98;case 64:return 99;case 65:return 78;case 66:return 79;case 67:return 100;case 68:return 101;case 69:return 102;case 70:return 103;case 71:return 85;case 72:return 86;case 73:return 87;case 74:return 88;case 75:return 93;case 76:return 94;case 77:return 95;case 78:return 96;case 79:return 81;case 80:return 82;case 81:return 83;case 82:return 84;case 83:return 89;case 84:return 90;case 85:return 91;case 86:return 92;case 87:return 104;case 88:return 104;case 89:return 70;case 90:return 71;case 91:return 72;case 92:return 5;case 93:return 10}},`anonymous`),rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:([0-9]+(\.[0-9]{1,2})?|\.[0-9]{1,2})(?=[ \n]+))/i,/^(?:@\{)/i,/^(?:[^\}]+)/i,/^(?:\}(?=\s+as\s))/i,/^(?:\})/i,/^(?:[^\<->\->:\n,;@\s]+(?=@\{))/i,/^(?:[^<>:\n,;@\s]+(?=\s+as\s))/i,/^(?:[^<>:\n,;@]+(?=\s*[\n;#]|$))/i,/^(?:[^<>:\n,;@]*<[^\n]*)/i,/^(?:[^\n]+)/i,/^(?:box\b)/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:create\b)/i,/^(?:destroy\b)/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\/\\\+\()\+<\->\->:\n,;]+((?!(-x|--x|-\)|--\)|-\|\\|-\\|-\/|-\/\/|-\|\/|\/\|-|\\\|-|\/\/-|\\\\-|\/\|-|--\|\\|--|\(\)))[\-]*[^\+<\->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?:--\|\\)/i,/^(?:--\|\/)/i,/^(?:--\\\\)/i,/^(?:--\/\/)/i,/^(?:\/\|--)/i,/^(?:\\\|--)/i,/^(?:\/\/--)/i,/^(?:\\\\--)/i,/^(?:-\|\\)/i,/^(?:-\|\/)/i,/^(?:-\\\\)/i,/^(?:-\/\/)/i,/^(?:\/\|-)/i,/^(?:\\\|-)/i,/^(?:\/\/-)/i,/^(?:\\\\-)/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:\(\))/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[53,54],inclusive:!1},acc_descr:{rules:[51],inclusive:!1},acc_title:{rules:[49],inclusive:!1},ID:{rules:[2,3,7,11,12,13,14,15],inclusive:!1},ALIAS:{rules:[2,3,21,22],inclusive:!1},LINE:{rules:[2,3,34],inclusive:!1},CONFIG:{rules:[8,9,10],inclusive:!1},CONFIG_DATA:{rules:[],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,16,17,18,19,20,23,24,25,26,27,28,29,30,31,32,33,35,36,37,38,39,40,41,42,43,44,45,46,47,48,50,52,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93],inclusive:!0}}}})();function je(){this.yy={}}return p(je,`Parser`),je.prototype=U,U.Parser=je,new je})(),g0.parser=g0,ult=g0,dlt={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31,PAR_OVER_START:32,BIDIRECTIONAL_SOLID:33,BIDIRECTIONAL_DOTTED:34,SOLID_TOP:41,SOLID_BOTTOM:42,STICK_TOP:43,STICK_BOTTOM:44,SOLID_ARROW_TOP_REVERSE:45,SOLID_ARROW_BOTTOM_REVERSE:46,STICK_ARROW_TOP_REVERSE:47,STICK_ARROW_BOTTOM_REVERSE:48,SOLID_TOP_DOTTED:51,SOLID_BOTTOM_DOTTED:52,STICK_TOP_DOTTED:53,STICK_BOTTOM_DOTTED:54,SOLID_ARROW_TOP_REVERSE_DOTTED:55,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:56,STICK_ARROW_TOP_REVERSE_DOTTED:57,STICK_ARROW_BOTTOM_REVERSE_DOTTED:58,CENTRAL_CONNECTION:59,CENTRAL_CONNECTION_REVERSE:60,CENTRAL_CONNECTION_DUAL:61},flt={FILLED:0,OPEN:1},plt={LEFTOF:0,RIGHTOF:1,OVER:2},_0={ACTOR:`actor`,BOUNDARY:`boundary`,COLLECTIONS:`collections`,CONTROL:`control`,DATABASE:`database`,ENTITY:`entity`,PARTICIPANT:`participant`,QUEUE:`queue`},mlt=class{constructor(){this.state=new CF(()=>({prevActor:void 0,actors:new Map,createdActors:new Map,destroyedActors:new Map,boxes:[],messages:[],notes:[],sequenceNumbersEnabled:!1,wrapEnabled:void 0,currentBox:void 0,lastCreated:void 0,lastDestroyed:void 0})),this.setAccTitle=Ls,this.setAccDescription=zs,this.setDiagramTitle=Vs,this.getAccTitle=Rs,this.getAccDescription=Bs,this.getDiagramTitle=Hs,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(Z().wrap),this.LINETYPE=dlt,this.ARROWTYPE=flt,this.PLACEMENT=plt}static{p(this,`SequenceDB`)}addBox(e){this.state.records.boxes.push({name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(e,t,n,r,i){let a=this.state.records.currentBox,o;if(i!==void 0){let e;e=i.includes(`1905-`)?i+`1906-`:`{1907-`+i+`1908-}`,o=_S(e,{schema:gS})}r=o?.type??r,o?.alias&&(!n||n.text===t)&&(n={text:o.alias,wrap:n?.wrap,type:r});let s=this.state.records.actors.get(e);if(s){if(this.state.records.currentBox&&s.box&&this.state.records.currentBox!==s.box)throw Error(`A same participant should only be defined in one Box: ${s.name} can't be in '${s.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(a=s.box?s.box:this.state.records.currentBox,s.box=a,s&&t===s.name&&n==null)return}if(n?.text??(n={text:t,type:r}),(r==null||n.text==null)&&(n={text:t,type:r}),this.state.records.actors.set(e,{box:a,name:t,description:n.text,wrap:n.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:r??`participant`}),this.state.records.prevActor){let t=this.state.records.actors.get(this.state.records.prevActor);t&&(t.nextActor=e)}this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(e),this.state.records.prevActor=e}activationCount(e){let t,n=0;if(!e)return 0;for(t=0;t<this.state.records.messages.length;t++)this.state.records.messages[t].type===this.LINETYPE.ACTIVE_START&&this.state.records.messages[t].from===e&&n++,this.state.records.messages[t].type===this.LINETYPE.ACTIVE_END&&this.state.records.messages[t].from===e&&n--;return n}addMessage(e,t,n,r){this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n.text,wrap:n.wrap??this.autoWrap(),answer:r})}addSignal(e,t,n,r,i=!1,a){if(r===this.LINETYPE.ACTIVE_END&&this.activationCount(e??``)<1){let t=Error(`Trying to inactivate an inactive participant (`+e+`)`);throw t.hash={text:`->>-`,token:`->>-`,line:`1`,loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:[`'ACTIVE_PARTICIPANT'`]},t}return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:e,to:t,message:n?.text??``,wrap:n?.wrap??this.autoWrap(),type:r,activate:i,centralConnection:a??0}),!0}hasAtLeastOneBox(){return this.state.records.boxes.length>0}hasAtLeastOneBoxWithTitle(){return this.state.records.boxes.some(e=>e.name)}getMessages(){return this.state.records.messages}getBoxes(){return this.state.records.boxes}getActors(){return this.state.records.actors}getCreatedActors(){return this.state.records.createdActors}getDestroyedActors(){return this.state.records.destroyedActors}getActor(e){return this.state.records.actors.get(e)}getActorKeys(){return[...this.state.records.actors.keys()]}enableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!0}disableSequenceNumbers(){this.state.records.sequenceNumbersEnabled=!1}showSequenceNumbers(){return this.state.records.sequenceNumbersEnabled}setWrap(e){this.state.records.wrapEnabled=e}extractWrap(e){if(e===void 0)return{};e=e.trim();let t=/^:?wrap:/.exec(e)!==null||/^:?nowrap:/.exec(e)===null&&void 0;return{cleanedText:(t===void 0?e:e.replace(/^:?(?:no)?wrap:/,``)).trim(),wrap:t}}autoWrap(){return this.state.records.wrapEnabled===void 0?Z().sequence?.wrap??!1:this.state.records.wrapEnabled}clear(){this.state.reset(),Is()}parseMessage(e){let t=e.trim(),{wrap:n,cleanedText:r}=this.extractWrap(t),i={text:r,wrap:n};return y.debug(`parseMessage: ${JSON.stringify(i)}`),i}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),n=t?.[1]?t[1].trim():`transparent`,r=t?.[2]?t[2].trim():void 0;if(window?.CSS)window.CSS.supports(`color`,n)||(n=`transparent`,r=e.trim());else{let t=new Option().style;t.color=n,t.color!==n&&(n=`transparent`,r=e.trim())}let{wrap:i,cleanedText:a}=this.extractWrap(r);return{text:a?_s(a,Z()):void 0,color:n,wrap:i}}addNote(e,t,n){let r={actor:e,placement:t,message:n.text,wrap:n.wrap??this.autoWrap()},i=[].concat(e,e);this.state.records.notes.push(r),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:i[0],to:i[1],message:n.text,wrap:n.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:t})}addLinks(e,t){let n=this.getActor(e);try{let e=_s(t.text,Z());e=e.replace(/&equals;/g,`=`),e=e.replace(/&amp;/g,`&`);let r=JSON.parse(e);this.insertLinks(n,r)}catch(e){y.error(`error while parsing actor link text`,e)}}addALink(e,t){let n=this.getActor(e);try{let e={},r=_s(t.text,Z()),i=r.indexOf(`@`);r=r.replace(/&equals;/g,`=`),r=r.replace(/&amp;/g,`&`);let a=r.slice(0,i-1).trim();e[a]=r.slice(i+1).trim(),this.insertLinks(n,e)}catch(e){y.error(`error while parsing actor link text`,e)}}insertLinks(e,t){if(e.links==null)e.links=t;else for(let n in t)e.links[n]=t[n]}addProperties(e,t){let n=this.getActor(e);try{let e=_s(t.text,Z()),r=JSON.parse(e);this.insertProperties(n,r)}catch(e){y.error(`error while parsing actor properties text`,e)}}insertProperties(e,t){if(e.properties==null)e.properties=t;else for(let n in t)e.properties[n]=t[n]}boxEnd(){this.state.records.currentBox=void 0}addDetails(e,t){let n=this.getActor(e),r=document.getElementById(t.text);try{let e=r.innerHTML,t=JSON.parse(e);t.properties&&this.insertProperties(n,t.properties),t.links&&this.insertLinks(n,t.links)}catch(e){y.error(`error while parsing actor details text`,e)}}getActorProperty(e,t){if(e?.properties!==void 0)return e.properties[t]}apply(e){if(Array.isArray(e))e.forEach(e=>{this.apply(e)});else switch(e.type){case`sequenceIndex`:this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:e.sequenceIndex,step:e.sequenceIndexStep,visible:e.sequenceVisible},wrap:!1,type:e.signalType});break;case`addParticipant`:this.addActor(e.actor,e.actor,e.description,e.draw,e.config);break;case`createParticipant`:if(this.state.records.actors.has(e.actor))throw Error(`It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior`);this.state.records.lastCreated=e.actor,this.addActor(e.actor,e.actor,e.description,e.draw,e.config),this.state.records.createdActors.set(e.actor,this.state.records.messages.length);break;case`destroyParticipant`:this.state.records.lastDestroyed=e.actor,this.state.records.destroyedActors.set(e.actor,this.state.records.messages.length);break;case`activeStart`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnection`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`centralConnectionReverse`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`activeEnd`:this.addSignal(e.actor,void 0,void 0,e.signalType);break;case`addNote`:this.addNote(e.actor,e.placement,e.text);break;case`addLinks`:this.addLinks(e.actor,e.text);break;case`addALink`:this.addALink(e.actor,e.text);break;case`addProperties`:this.addProperties(e.actor,e.text);break;case`addDetails`:this.addDetails(e.actor,e.text);break;case`addMessage`:if(this.state.records.lastCreated){if(e.to!==this.state.records.lastCreated)throw Error(`The created participant `+this.state.records.lastCreated.name+` does not have an associated creating message after its declaration. Please check the sequence diagram.`);this.state.records.lastCreated=void 0}else if(this.state.records.lastDestroyed){if(e.to!==this.state.records.lastDestroyed&&e.from!==this.state.records.lastDestroyed)throw Error(`The destroyed participant `+this.state.records.lastDestroyed.name+` does not have an associated destroying message after its declaration. Please check the sequence diagram.`);this.state.records.lastDestroyed=void 0}this.addSignal(e.from,e.to,e.msg,e.signalType,e.activate,e.centralConnection);break;case`boxStart`:this.addBox(e.boxData);break;case`boxEnd`:this.boxEnd();break;case`loopStart`:this.addSignal(void 0,void 0,e.loopText,e.signalType);break;case`loopEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`rectStart`:this.addSignal(void 0,void 0,e.color,e.signalType);break;case`rectEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`optStart`:this.addSignal(void 0,void 0,e.optText,e.signalType);break;case`optEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`altStart`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`else`:this.addSignal(void 0,void 0,e.altText,e.signalType);break;case`altEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`setAccTitle`:Ls(e.text);break;case`parStart`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`and`:this.addSignal(void 0,void 0,e.parText,e.signalType);break;case`parEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`criticalStart`:this.addSignal(void 0,void 0,e.criticalText,e.signalType);break;case`option`:this.addSignal(void 0,void 0,e.optionText,e.signalType);break;case`criticalEnd`:this.addSignal(void 0,void 0,void 0,e.signalType);break;case`breakStart`:this.addSignal(void 0,void 0,e.breakText,e.signalType);break;case`breakEnd`:this.addSignal(void 0,void 0,void 0,e.signalType)}}getConfig(){return Z().sequence}},hlt=p(e=>{let t=e.dropShadow??`none`,{look:n}=Z();return`.actor {1909- stroke: ${e.actorBorder};1910- fill: ${e.actorBkg};1911- stroke-width: ${e.strokeWidth??1};1912- }1913-1914- rect.actor.outer-path[data-look="neo"] {1915- filter: ${t};1916- }1917-1918- rect.note[data-look="neo"] {1919- stroke:${e.noteBorderColor};1920- fill:${e.noteBkgColor};1921- filter: ${t};1922- }1923-1924- text.actor > tspan {1925- fill: ${e.actorTextColor};1926- stroke: none;1927- }1928-1929- .actor-line {1930- stroke: ${e.actorLineColor};1931- }1932-1933- .innerArc {1934- stroke-width: 1.5;1935- stroke-dasharray: none;1936- }1937-1938- .messageLine0 {1939- stroke-width: 1.5;1940- stroke-dasharray: none;1941- stroke: ${e.signalColor};1942- }1943-1944- .messageLine1 {1945- stroke-width: 1.5;1946- stroke-dasharray: 2, 2;1947- stroke: ${e.signalColor};1948- }1949-1950- [id$="-arrowhead"] path {1951- fill: ${e.signalColor};1952- stroke: ${e.signalColor};1953- }1954-1955- .sequenceNumber {1956- fill: ${e.sequenceNumberColor};1957- }1958-1959- [id$="-sequencenumber"] {1960- fill: ${e.signalColor};1961- }1962-1963- [id$="-crosshead"] path {1964- fill: ${e.signalColor};1965- stroke: ${e.signalColor};1966- }1967-1968- .messageText {1969- fill: ${e.signalTextColor};1970- stroke: none;1971- }1972-1973- .labelBox {1974- stroke: ${e.labelBoxBorderColor};1975- fill: ${e.labelBoxBkgColor};1976- filter: ${n===`neo`?t:`none`};1977- }1978-1979- .labelText, .labelText > tspan {1980- fill: ${e.labelTextColor};1981- stroke: none;1982- }1983-1984- .loopText, .loopText > tspan {1985- fill: ${e.loopTextColor};1986- stroke: none;1987- }1988-1989- .sectionTitle, .sectionTitle > tspan {1990- fill: ${e.loopTextColor};1991- stroke: none;1992- }1993-1994- .loopLine {1995- stroke-width: 2px;1996- stroke-dasharray: 2, 2;1997- stroke: ${e.labelBoxBorderColor};1998- fill: ${e.labelBoxBorderColor};1999- }2000-2001- .note {2002- //stroke: #decc93;2003- stroke: ${e.noteBorderColor};2004- fill: ${e.noteBkgColor};2005- }2006-2007- .noteText, .noteText > tspan {2008- fill: ${e.noteTextColor};2009- stroke: none;2010- ${e.noteFontWeight?`font-weight: ${e.noteFontWeight};`:``}2011- }2012-2013- .activation0 {2014- fill: ${e.activationBkgColor};2015- stroke: ${e.activationBorderColor};2016- }2017-2018- .activation1 {2019- fill: ${e.activationBkgColor};2020- stroke: ${e.activationBorderColor};2021- }2022-2023- .activation2 {2024- fill: ${e.activationBkgColor};2025- stroke: ${e.activationBorderColor};2026- }2027-2028- .actorPopupMenu {2029- position: absolute;2030- }2031-2032- .actorPopupMenuPanel {2033- position: absolute;2034- fill: ${e.actorBkg};2035- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);2036- filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));2037-}2038- .actor-man circle, line {2039- fill: ${e.actorBkg};2040- stroke-width: 2px;2041- }2042-2043- g rect.rect {2044- filter: ${t};2045- stroke: ${e.nodeBorder};2046- }2047-`},`getStyles`),v0=36,y0=`actor-top`,b0=`actor-bottom`,x0=`actor-box`,S0=`actor-man`,C0=new Set([`redux-color`,`redux-dark-color`]),w0=p(function(e,t){let n=pP(e,t);return es().look===`neo`&&n.attr(`data-look`,`neo`),n},`drawRect`),glt=p(function(e,t,n,r,i){if(t.links===void 0||t.links===null||Object.keys(t.links).length===0)return{height:0,width:0};let a=t.links,o=t.actorCnt,s=t.rectData;var l=`none`;i&&(l=`block !important`);let u=e.append(`g`);u.attr(`id`,`actor`+o+`_popup`),u.attr(`class`,`actorPopupMenu`),u.attr(`display`,l);var d=``;s.class!==void 0&&(d=` `+s.class);let f=s.width>n?s.width:n,p=u.append(`rect`);if(p.attr(`class`,`actorPopupMenuPanel`+d),p.attr(`x`,s.x),p.attr(`y`,s.height),p.attr(`fill`,s.fill),p.attr(`stroke`,s.stroke),p.attr(`width`,f),p.attr(`height`,s.height),p.attr(`rx`,s.rx),p.attr(`ry`,s.ry),a!=null){var m=20;for(let e in a){var h=u.append(`a`),g=(0,h0.sanitizeUrl)(a[e]);h.attr(`xlink:href`,g),h.attr(`target`,`_blank`),zlt(r)(e,h,s.x+10,s.height+m,f,20,{class:`actor`},r),m+=30}}return p.attr(`height`,m),{height:s.height+m,width:f}},`drawPopup`),T0=p(function(e){return`var pu = document.getElementById('`+e+`'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }`},`popupMenuToggle`),E0=p(async function(e,t,n=null){let r=e.append(`foreignObject`),i=await Es(t.text,es()),a=r.append(`xhtml:div`).attr(`style`,`width: fit-content;`).attr(`xmlns`,`http://www.w3.org/1999/xhtml`).html(i).node().getBoundingClientRect();if(r.attr(`height`,Math.round(a.height)).attr(`width`,Math.round(a.width)),t.class===`noteText`){let n=e.node().firstChild;n.setAttribute(`height`,a.height+2*t.textMargin);let i=n.getBBox();r.attr(`x`,Math.round(i.x+i.width/2-a.width/2)).attr(`y`,Math.round(i.y+i.height/2-a.height/2))}else if(n){let{startx:e,stopx:i,starty:o}=n;if(e>i){let t=e;e=i,i=t}r.attr(`x`,Math.round(e+Math.abs(e-i)/2-a.width/2)),t.class===`loopText`?r.attr(`y`,Math.round(o)):r.attr(`y`,Math.round(o-a.height))}return[r]},`drawKatex`),D0=p(function(e,t){let n=0,r=0,i=t.text.split(Ds.lineBreakRegex),[a,o]=Hp(t.fontSize),s=[],l=0,u=p(()=>t.y,`yfunc`);if(t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0)switch(t.valign){case`top`:case`start`:u=p(()=>Math.round(t.y+t.textMargin),`yfunc`);break;case`middle`:case`center`:u=p(()=>Math.round(t.y+(n+r+t.textMargin)/2),`yfunc`);break;case`bottom`:case`end`:u=p(()=>Math.round(t.y+(n+r+2*t.textMargin)-t.textMargin),`yfunc`)}if(t.anchor!==void 0&&t.textMargin!==void 0&&t.width!==void 0)switch(t.anchor){case`left`:case`start`:t.x=Math.round(t.x+t.textMargin),t.anchor=`start`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`middle`:case`center`:t.x=Math.round(t.x+t.width/2),t.anchor=`middle`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`;break;case`right`:case`end`:t.x=Math.round(t.x+t.width-t.textMargin),t.anchor=`end`,t.dominantBaseline=`middle`,t.alignmentBaseline=`middle`}for(let[d,f]of i.entries()){t.textMargin!==void 0&&t.textMargin===0&&a!==void 0&&(l=d*a);let i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,u()),t.anchor!==void 0&&i.attr(`text-anchor`,t.anchor).attr(`dominant-baseline`,t.dominantBaseline).attr(`alignment-baseline`,t.alignmentBaseline),t.fontFamily!==void 0&&i.style(`font-family`,t.fontFamily),o!==void 0&&i.style(`font-size`,o),t.fontWeight!==void 0&&i.style(`font-weight`,t.fontWeight),t.fill!==void 0&&i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class),t.dy===void 0?l!==0&&i.attr(`dy`,l):i.attr(`dy`,t.dy);let p=f||`​`;if(t.tspan){let e=i.append(`tspan`);e.attr(`x`,t.x),t.fill!==void 0&&e.attr(`fill`,t.fill),e.text(p)}else i.text(p);t.valign!==void 0&&t.textMargin!==void 0&&t.textMargin>0&&(r+=(i._groups||i)[0][0].getBBox().height,n=r),s.push(i)}return s},`drawText`),O0=p(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}p(n,`genPoints`);let r=e.append(`polygon`);return r.attr(`points`,n(t.x,t.y,t.width,t.height,7)),r.attr(`class`,`labelBox`),t.y+=t.height/2,D0(e,t),r},`drawLabel`),k0=-1,A0=p((e,t,n,r)=>{e.select&&n.forEach(n=>{let i=t.get(n),a=e.select(`#actor`+i.actorCnt);!r.mirrorActors&&i.stopy?a.attr(`y2`,i.stopy+i.height/2):r.mirrorActors&&a.attr(`y2`,i.stopy)})},`fixLifeLineHeights`),_lt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;r||(k0++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,T0(`actor${k0}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=k0,t.links!=null&&h.attr(`id`,`root-`+k0),l===`neo`&&h.attr(`data-look`,`neo`));let g=_P();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,_+=r?` ${b0}`:` ${y0}`,g.x=t.x,g.y=a,g.width=t.width,g.height=t.height,g.class=_,g.rx=3,g.ry=3,g.name=t.name,l===`neo`&&(g.rx=6,g.ry=6);let v=w0(h,g),y=i.get(t.name)??0;if(C0.has(u)&&(v.style(`stroke`,p[y%p.length]),v.style(`fill`,f[y%p.length])),l===`neo`&&v.attr(`filter`,`url(#drop-shadow)`),t.rectData=g,t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?gP(h,g.x+g.width-20,g.y+10,e.substr(1)):hP(h,g.x+g.width-20,g.y+10,e)}r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`participant`),h.attr(`data-id`,t.name)),N0(n,ws(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${x0}`},n);let b=t.height;if(v.node){let e=v.node().getBBox();t.height=e.height,b=e.height}return b},`drawActorTypeParticipant`),vlt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower();var h=m;r||(k0++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,T0(`actor${k0}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=k0,t.links!=null&&h.attr(`id`,`root-`+k0),l===`neo`&&h.attr(`data-look`,`neo`));let g=_P();var _=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,_+=r?` ${b0}`:` ${y0}`,g.x=t.x,g.y=a,g.width=t.width,g.height=t.height,g.class=_,g.name=t.name;let v={...g,x:g.x+-6,y:g.y+6,class:`actor`},y=w0(h,g),b=w0(h,v);t.rectData=g,l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let x=i.get(t.name)??0;if(C0.has(u)&&(y.style(`stroke`,p[x%p.length]),y.style(`fill`,f[x%p.length]),b.style(`stroke`,p[x%p.length]),b.style(`fill`,f[x%p.length])),t.properties?.icon){let e=t.properties.icon.trim();e.charAt(0)===`@`?gP(h,g.x+g.width-20,g.y+10,e.substr(1)):hP(h,g.x+g.width-20,g.y+10,e)}N0(n,ws(t.description))(t.description,h,g.x-6,g.y+6,g.width,g.height,{class:`actor ${x0}`},n);let S=t.height;if(y.node){let e=y.node().getBBox();t.height=e.height,S=e.height}return r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`collections`),h.attr(`data-id`,t.name)),S},`drawActorTypeCollections`),ylt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=m;r||(k0++,Object.keys(t.links||{}).length&&!n.forceMenus&&h.attr(`onclick`,T0(`actor${k0}_popup`)).attr(`cursor`,`pointer`),h.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),h=m.append(`g`),t.actorCnt=k0,t.links!=null&&h.attr(`id`,`root-`+k0),l===`neo`&&h.attr(`data-look`,`neo`));let g=_P(),_=`actor`;t.properties?.class?_=t.properties.class:g.fill=`#eaeaea`,_+=r?` ${b0}`:` ${y0}`,h.attr(`class`,_),g.x=t.x,g.y=a,g.width=t.width,g.height=t.height,g.name=t.name;let v=g.height/2,y=v/(2.5+g.height/50),b=h.append(`g`),x=h.append(`g`),S=`M ${g.x},${g.y+v}2048- a ${y},${v} 0 0 0 0,${g.height}2049- h ${g.width-2*y}2050- a ${y},${v} 0 0 0 0,-${g.height}2051- Z2052- `;b.append(`path`).attr(`d`,S),x.append(`path`).attr(`d`,`M ${g.x},${g.y+v}2053- a ${y},${v} 0 0 0 0,${g.height}`),b.attr(`transform`,`translate(${y}, ${-(g.height/2)})`),x.attr(`transform`,`translate(${g.width-y}, ${-g.height/2})`),t.rectData=g,l===`neo`&&b.attr(`filter`,`url(#drop-shadow)`);let C=i.get(t.name)??0;if(C0.has(u)&&(b.style(`stroke`,p[C%p.length]),b.style(`fill`,f[C%p.length]),x.style(`stroke`,p[C%p.length]),x.style(`fill`,f[C%p.length])),t.properties?.icon){let e=t.properties.icon.trim(),n=g.x+g.width-20,r=g.y+10;e.charAt(0)===`@`?gP(h,n,r,e.substr(1)):hP(h,n,r,e)}N0(n,ws(t.description))(t.description,h,g.x,g.y,g.width,g.height,{class:`actor ${x0}`},n);let w=t.height,T=b.select(`path:last-child`);if(T.node()){let e=T.node().getBBox();t.height=e.height,w=e.height}return r||(h.attr(`data-et`,`participant`),h.attr(`data-type`,`queue`),h.attr(`data-id`,t.name)),w},`drawActorTypeQueue`),blt=p(function(e,t,n,r,i,a){let o=r?t.stopy:t.starty,s=t.x+t.width/2,l=o+75,{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h,actorBkg:g}=f,_=e.append(`g`).lower();r||(k0++,_.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,s).attr(`y1`,l).attr(`x2`,s).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=k0);let v=e.append(`g`),y=S0;y+=r?` ${b0}`:` ${y0}`,v.attr(`class`,y),v.attr(`name`,t.name);let b=_P();b.x=t.x,b.y=o,b.fill=`#eaeaea`,b.width=t.width,b.height=t.height,b.class=`actor`;let x=t.x+t.width/2,S=o+32;v.append(`defs`).append(`marker`).attr(`id`,i+`-filled-head-control`).attr(`refX`,11).attr(`refY`,5.8).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`172.5`).attr(`stroke-width`,1.2).append(`path`).attr(`d`,`M 14.4 5.6 L 7.2 10.4 L 8.8 5.6 L 7.2 0.8 Z`),v.append(`circle`).attr(`cx`,x).attr(`cy`,S).attr(`r`,22).attr(`filter`,`${u===`neo`?`url(#drop-shadow)`:``}`),v.append(`line`).attr(`marker-end`,`url(#`+i+`-filled-head-control)`).attr(`transform`,`translate(${x}, ${S-22})`);let C=a.get(t.name)??0;return C0.has(d)?(v.style(`stroke`,m[C%m.length]),v.style(`fill`,p[C%m.length])):(v.style(`stroke`,h),v.style(`fill`,g)),t.height=v.node().getBBox().height+2*(n?.sequence?.labelBoxHeight??0),N0(n,ws(t.description))(t.description,v,b.x,b.y+22+(r?5:12),b.width,b.height,{class:`actor ${S0}`},n),r||(v.attr(`data-et`,`participant`),v.attr(`data-type`,`control`),v.attr(`data-id`,t.name)),t.height},`drawActorTypeControl`),xlt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+75,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p}=d,m=e.append(`g`).lower(),h=e.append(`g`),g=`actor`;g+=r?` ${b0}`:` ${y0}`,h.attr(`class`,g),h.attr(`name`,t.name);let _=_P();_.x=t.x,_.y=a,_.fill=`#eaeaea`,_.width=t.width,_.height=t.height,_.class=`actor`;let v=t.x+t.width/2,y=a+(r?10:25);h.append(`circle`).attr(`cx`,v).attr(`cy`,y).attr(`r`,22).attr(`width`,t.width).attr(`height`,t.height),h.append(`line`).attr(`x1`,v-22).attr(`x2`,v+22).attr(`y1`,y+22).attr(`y2`,y+22).attr(`stroke-width`,2),l===`neo`&&h.attr(`filter`,`url(#drop-shadow)`);let b=i.get(t.name)??0;return C0.has(u)&&(h.style(`stroke`,p[b%p.length]),h.style(`fill`,f[b%p.length])),t.height=h.node().getBBox().height+(n?.sequence?.labelBoxHeight??0),r||(k0++,m.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=k0),N0(n,ws(t.description))(t.description,h,_.x,_.y+(r?15:30),_.width,_.height,{class:`actor ${S0}`},n),r?h.attr(`transform`,`translate(0, 22)`):(h.attr(`transform`,`translate(0, 6)`),h.attr(`data-et`,`participant`),h.attr(`data-type`,`entity`),h.attr(`data-id`,t.name)),t.height},`drawActorTypeEntity`),Slt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+t.height+2*n.boxTextMargin,{theme:l,themeVariables:u,look:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=u,h=e.append(`g`).lower(),g=h;r||(k0++,Object.keys(t.links||{}).length&&!n.forceMenus&&g.attr(`onclick`,T0(`actor${k0}_popup`)).attr(`cursor`,`pointer`),g.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),g=h.append(`g`),t.actorCnt=k0,t.links!=null&&g.attr(`id`,`root-`+k0),d===`neo`&&g.attr(`data-look`,`neo`));let _=_P(),v=`actor`;t.properties?.class?v=t.properties.class:_.fill=`#eaeaea`,v+=r?` ${b0}`:` ${y0}`,_.x=t.x,_.y=a,_.width=t.width,_.height=t.height,_.class=v,_.name=t.name,_.x=t.x,_.y=a;let y=_.width/3,b=_.width/3,x=y/2,S=x/(2.5+y/50),C=g.append(`g`);C.attr(`class`,v);let w=`2054- M ${_.x},${_.y+S}2055- a ${x},${S} 0 0 0 ${y},02056- a ${x},${S} 0 0 0 -${y},02057- l 0,${b-2*S}2058- a ${x},${S} 0 0 0 ${y},02059- l 0,-${b-2*S}2060-`;C.append(`path`).attr(`d`,w),d===`neo`&&C.attr(`filter`,`url(#drop-shadow)`);let T=i.get(t.name)??0;C0.has(l)?(C.style(`stroke`,p[T%p.length]),C.style(`fill`,f[T%p.length])):C.style(`stroke`,m),C.attr(`transform`,`translate(${y}, ${S})`),t.rectData=_,N0(n,ws(t.description))(t.description,g,_.x,_.y+35,_.width,_.height,{class:`actor ${x0}`},n);let E=C.select(`path:last-child`);return E.node()&&(t.height=E.node().getBBox().height+(n.sequence.labelBoxHeight??0)),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`database`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeDatabase`),Clt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,l=e.append(`g`).lower(),{look:u,theme:d,themeVariables:f}=n,{bkgColorArray:p,borderColorArray:m,actorBorder:h}=f;r||(k0++,l.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=k0);let g=e.append(`g`),_=S0;_+=r?` ${b0}`:` ${y0}`,g.attr(`class`,_),g.attr(`name`,t.name);let v=_P();v.x=t.x,v.y=a,v.fill=`#eaeaea`,v.width=t.width,v.height=t.height,v.class=`actor`,g.append(`line`).attr(`id`,`actor-man-torso`+k0).attr(`x1`,t.x+t.width/2-55).attr(`y1`,a+12).attr(`x2`,t.x+t.width/2-15).attr(`y2`,a+12),g.append(`line`).attr(`id`,`actor-man-arms`+k0).attr(`x1`,t.x+t.width/2-55).attr(`y1`,a+2).attr(`x2`,t.x+t.width/2-55).attr(`y2`,a+22),g.append(`circle`).attr(`cx`,t.x+t.width/2).attr(`cy`,a+12).attr(`r`,22),u===`neo`&&g.attr(`filter`,`url(#drop-shadow)`);let y=i.get(t.name)??0;return C0.has(d)?(g.style(`stroke`,m[y%m.length]),g.style(`fill`,p[y%m.length])):g.style(`stroke`,h),t.height=g.node().getBBox().height+(n.sequence.labelBoxHeight??0),N0(n,ws(t.description))(t.description,g,v.x,v.y+15,v.width,v.height,{class:`actor ${S0}`},n),g.attr(`transform`,`translate(0,21)`),r||(g.attr(`data-et`,`participant`),g.attr(`data-type`,`boundary`),g.attr(`data-id`,t.name)),t.height},`drawActorTypeBoundary`),wlt=p(function(e,t,n,r,i){let a=r?t.stopy:t.starty,o=t.x+t.width/2,s=a+80,{look:l,theme:u,themeVariables:d}=n,{bkgColorArray:f,borderColorArray:p,actorBorder:m}=d,h=e.append(`g`).lower();r||(k0++,h.append(`line`).attr(`id`,`actor`+k0).attr(`x1`,o).attr(`y1`,s).attr(`x2`,o).attr(`y2`,2e3).attr(`class`,`actor-line 200`).attr(`stroke-width`,`0.5px`).attr(`stroke`,`#999`).attr(`name`,t.name).attr(`data-et`,`life-line`).attr(`data-id`,t.name),t.actorCnt=k0);let g=e.append(`g`),_=S0;_+=r?` ${b0}`:` ${y0}`,g.attr(`class`,_),g.attr(`name`,t.name),r||g.attr(`data-et`,`participant`).attr(`data-type`,`actor`).attr(`data-id`,t.name);let v=l===`neo`?.5:1,y=l===`neo`?a+(1-v)*30:a;g.append(`line`).attr(`id`,`actor-man-torso`+k0).attr(`x1`,o).attr(`y1`,y+25*v).attr(`x2`,o).attr(`y2`,y+45*v),g.append(`line`).attr(`id`,`actor-man-arms`+k0).attr(`x1`,o-v0/2*v).attr(`y1`,y+33*v).attr(`x2`,o+v0/2*v).attr(`y2`,y+33*v),g.append(`line`).attr(`x1`,o-v0/2*v).attr(`y1`,y+60*v).attr(`x2`,o).attr(`y2`,y+45*v),g.append(`line`).attr(`x1`,o).attr(`y1`,y+45*v).attr(`x2`,o+(v0/2-2)*v).attr(`y2`,y+60*v);let b=g.append(`circle`);b.attr(`cx`,t.x+t.width/2),b.attr(`cy`,y+10*v),b.attr(`r`,15*v),b.attr(`width`,t.width*v),b.attr(`height`,t.height*v),t.height=g.node().getBBox().height;let x=_P();x.x=t.x,x.y=y,x.fill=`#eaeaea`,x.width=t.width,x.height=t.height/v,x.class=`actor`,x.rx=3,x.ry=3;let S=i.get(t.name)??0;return C0.has(u)?(g.style(`stroke`,p[S%p.length]),g.style(`fill`,f[S%p.length])):g.style(`stroke`,m),N0(n,ws(t.description))(t.description,g,x.x,y+35*v-(l===`neo`?10:0),x.width,x.height,{class:`actor ${S0}`},n),t.height},`drawActorTypeActor`),Tlt=p(async function(e,t,n,r,i,a,o){let s=o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]));switch(t.type){case`actor`:return await wlt(e,t,n,r,s);case`participant`:return await _lt(e,t,n,r,s);case`boundary`:return await Clt(e,t,n,r,s);case`control`:return await blt(e,t,n,r,i,s);case`entity`:return await xlt(e,t,n,r,s);case`database`:return await Slt(e,t,n,r,s);case`collections`:return await vlt(e,t,n,r,s);case`queue`:return await ylt(e,t,n,r,s)}},`drawActor`),Elt=p(function(e,t,n){let r=e.append(`g`);j0(r,t),t.name&&N0(n)(t.name,r,t.x,t.y+n.boxTextMargin+(t.textMaxHeight||0)/2,t.width,0,{class:`text`},n),r.lower()},`drawBox`),Dlt=p(function(e){return e.append(`g`)},`anchorElement`),Olt=p(function(e,t,n,r,i,a,o){let{theme:s,themeVariables:l}=r,{bkgColorArray:u,borderColorArray:d,mainBkg:f}=l,p=_P(),m=t.anchored,h=t.actor;p.x=t.startx,p.y=t.starty,p.class=`activation`+i%3,p.width=t.stopx-t.startx,p.height=n-t.starty;let g=w0(m,p),_=(o??new Map([...a.db.getActors().values()].map((e,t)=>[e.name,t]))).get(h)??0;C0.has(s)&&(g.style(`stroke`,d[_%d.length]),g.style(`fill`,u[_%d.length]??f))},`drawActivation`),klt=p(async function(e,t,n,r,i){let{boxMargin:a,boxTextMargin:o,labelBoxHeight:s,labelBoxWidth:l,messageFontFamily:u,messageFontSize:d,messageFontWeight:f}=r,m=e.append(`g`).attr(`data-et`,`control-structure`).attr(`data-id`,`i`+i.id),h=p(function(e,t,n,r){return m.append(`line`).attr(`x1`,e).attr(`y1`,t).attr(`x2`,n).attr(`y2`,r).attr(`class`,`loopLine`)},`drawLoopLine`);h(t.startx,t.starty,t.stopx,t.starty),h(t.stopx,t.starty,t.stopx,t.stopy),h(t.startx,t.stopy,t.stopx,t.stopy),h(t.startx,t.starty,t.startx,t.stopy),t.sections!==void 0&&t.sections.forEach(function(e){h(t.startx,e.y,t.stopx,e.y).style(`stroke-dasharray`,`3, 3`)});let g=vP();g.text=n,g.x=t.startx,g.y=t.starty,g.fontFamily=u,g.fontSize=d,g.fontWeight=f,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.width=Math.max(l??0,50),g.height=s+(r.look===`neo`?15:0)||20,g.textMargin=o,g.class=`labelText`,O0(m,g),g=M0(),g.text=t.title,g.x=t.startx+l/2+(t.stopx-t.startx)/2,g.y=t.starty+a+o,g.anchor=`middle`,g.valign=`middle`,g.textMargin=o,g.class=`loopText`,g.fontFamily=u,g.fontSize=d,g.fontWeight=f,g.wrap=!0;let _=ws(g.text)?await E0(m,g,t):D0(m,g);if(t.sectionTitles!==void 0){for(let[e,n]of Object.entries(t.sectionTitles))if(n.message){g.text=n.message,g.x=t.startx+(t.stopx-t.startx)/2,g.y=t.sections[e].y+a+o,g.class=`sectionTitle`,g.anchor=`middle`,g.valign=`middle`,g.tspan=!1,g.fontFamily=u,g.fontSize=d,g.fontWeight=f,g.wrap=t.wrap,ws(g.text)?(t.starty=t.sections[e].y,await E0(m,g,t)):D0(m,g);let r=Math.round(_.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));t.sections[e].height+=r-(a+o)}}return t.height=Math.round(t.stopy-t.starty),m},`drawLoop`),j0=p(function(e,t){mP(e,t)},`drawBackgroundRect`),Alt=p(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`),jlt=p(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`),Mlt=p(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`),Nlt=p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,7.9).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M -1 0 L 10 5 L 0 10 z`)},`insertArrowHead`),Plt=p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-filled-head`).attr(`refX`,15.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`insertArrowFilledHead`),Flt=p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-sequencenumber`).attr(`refX`,15).attr(`refY`,15).attr(`markerWidth`,60).attr(`markerHeight`,40).attr(`orient`,`auto`).append(`circle`).attr(`cx`,15).attr(`cy`,15).attr(`r`,6)},`insertSequenceNumber`),Ilt=p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-crosshead`).attr(`markerWidth`,15).attr(`markerHeight`,8).attr(`orient`,`auto`).attr(`refX`,4).attr(`refY`,4.5).append(`path`).attr(`fill`,`none`).attr(`stroke`,`#000000`).style(`stroke-dasharray`,`0, 0`).attr(`stroke-width`,`1pt`).attr(`d`,`M 1,2 L 6,7 M 6,2 L 1,7`)},`insertArrowCrossHead`),Llt=p(function(e,t){let{theme:n}=t;e.append(`defs`).append(`filter`).attr(`id`,`drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${n===`redux`||n===`redux-color`?`#000000`:`#FFFFFF`}`)},`insertDropShadow`),M0=p(function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:`#666`,width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},`getTextObj`),Rlt=p(function(){return{x:0,y:0,fill:`#EDF2AE`,stroke:`#666`,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),N0=(function(){function e(e,t,n,r,a,o,s){i(t.append(`text`).attr(`x`,n+a/2).attr(`y`,r+o/2+5).style(`text-anchor`,`middle`).text(e),s)}p(e,`byText`);function t(e,t,n,r,a,o,s,l){let{actorFontSize:u,actorFontFamily:d,actorFontWeight:f}=l,[p,m]=Hp(u),h=e.split(Ds.lineBreakRegex);for(let e=0;e<h.length;e++){let l=e*p-p*(h.length-1)/2,u=t.append(`text`).attr(`x`,n+a/2).attr(`y`,r).style(`text-anchor`,`middle`).style(`font-size`,m).style(`font-weight`,f).style(`font-family`,d);u.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,l).text(h[e]),u.attr(`y`,r+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),i(u,s)}}p(t,`byTspan`);function n(e,n,r,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,r).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,r,a,o,s,l,u),i(f,l)}p(n,`byFo`);async function r(e,n,r,a,o,s,l,u){let d=await Ts(e,es()),f=n.append(`switch`),p=f.append(`foreignObject`).attr(`x`,r+o/2-d.width/2).attr(`y`,a+s/2-d.height/2).attr(`width`,d.width).attr(`height`,d.height).append(`xhtml:div`).style(`height`,`100%`).style(`width`,`100%`);p.append(`div`).style(`text-align`,`center`).style(`vertical-align`,`middle`).html(await Es(e,es())),t(e,f,r,a,o,s,l,u),i(p,l)}p(r,`byKatex`);function i(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return p(i,`_setTextAttrs`),function(i,a=!1){return a?r:i.textPlacement===`fo`?n:i.textPlacement===`old`?e:t}})(),zlt=(function(){function e(e,t,n,i,a,o,s){r(t.append(`text`).attr(`x`,n).attr(`y`,i).style(`text-anchor`,`start`).text(e),s)}p(e,`byText`);function t(e,t,n,i,a,o,s,l){let{actorFontSize:u,actorFontFamily:d,actorFontWeight:f}=l,p=e.split(Ds.lineBreakRegex);for(let e=0;e<p.length;e++){let a=e*u-u*(p.length-1)/2,l=t.append(`text`).attr(`x`,n).attr(`y`,i).style(`text-anchor`,`start`).style(`font-size`,u).style(`font-weight`,f).style(`font-family`,d);l.append(`tspan`).attr(`x`,n).attr(`dy`,a).text(p[e]),l.attr(`y`,i+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),r(l,s)}}p(t,`byTspan`);function n(e,n,i,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,i,a,o,s,l,u),r(f,l)}p(n,`byFo`);function r(e,t){for(let n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}return p(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),P0={drawRect:w0,drawText:D0,drawLabel:O0,drawActor:Tlt,drawBox:Elt,drawPopup:glt,anchorElement:Dlt,drawActivation:Olt,drawLoop:klt,drawBackgroundRect:j0,insertArrowHead:Nlt,insertArrowFilledHead:Plt,insertSequenceNumber:Flt,insertArrowCrossHead:Ilt,insertDatabaseIcon:Alt,insertComputerIcon:jlt,insertClockIcon:Mlt,getTextObj:M0,getNoteRect:Rlt,fixLifeLineHeights:A0,sanitizeUrl:h0.sanitizeUrl,insertDropShadow:Llt,insertSolidTopArrowHead:p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidTopArrowHead`).attr(`refX`,7.9).attr(`refY`,7.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 8 L 0 8 z`)},`insertSolidTopArrowHead`),insertSolidBottomArrowHead:p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-solidBottomArrowHead`).attr(`refX`,7.9).attr(`refY`,.75).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 10 0 L 0 8 z`)},`insertSolidBottomArrowHead`),insertStickTopArrowHead:p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickTopArrowHead`).attr(`refX`,7.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 0 L 7 7`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickTopArrowHead`),insertStickBottomArrowHead:p(function(e,t){e.append(`defs`).append(`marker`).attr(`id`,t+`-stickBottomArrowHead`).attr(`refX`,7.5).attr(`refY`,0).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto-start-reverse`).append(`path`).attr(`d`,`M 0 7 L 7 0`).attr(`stroke`,`black`).attr(`stroke-width`,1.5).attr(`fill`,`none`)},`insertStickBottomArrowHead`)},$={},F0={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:p(function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(e=>e.height||0))+(this.loops.length===0?0:this.loops.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.messages.length===0?0:this.messages.map(e=>e.height||0).reduce((e,t)=>e+t))+(this.notes.length===0?0:this.notes.map(e=>e.height||0).reduce((e,t)=>e+t))},`getHeight`),clear:p(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},`clear`),addBox:p(function(e){this.boxes.push(e)},`addBox`),addActor:p(function(e){this.actors.push(e)},`addActor`),addLoop:p(function(e){this.loops.push(e)},`addLoop`),addMessage:p(function(e){this.messages.push(e)},`addMessage`),addNote:p(function(e){this.notes.push(e)},`addNote`),lastActor:p(function(){return this.actors[this.actors.length-1]},`lastActor`),lastLoop:p(function(){return this.loops[this.loops.length-1]},`lastLoop`),lastMessage:p(function(){return this.messages[this.messages.length-1]},`lastMessage`),lastNote:p(function(){return this.notes[this.notes.length-1]},`lastNote`),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:p(function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,H0(Z())},`init`),updateVal:p(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:p(function(e,t,n,r){let i=this,a=0;function o(o){return p(function(s){a++;let l=i.sequenceItems.length-a+1;i.updateVal(s,`starty`,t-l*$.boxMargin,Math.min),i.updateVal(s,`stopy`,r+l*$.boxMargin,Math.max),i.updateVal(F0.data,`startx`,e-l*$.boxMargin,Math.min),i.updateVal(F0.data,`stopx`,n+l*$.boxMargin,Math.max),o!==`activation`&&(i.updateVal(s,`startx`,e-l*$.boxMargin,Math.min),i.updateVal(s,`stopx`,n+l*$.boxMargin,Math.max),i.updateVal(F0.data,`starty`,t-l*$.boxMargin,Math.min),i.updateVal(F0.data,`stopy`,r+l*$.boxMargin,Math.max))},`updateItemBounds`)}p(o,`updateFn`),this.sequenceItems.forEach(o()),this.activations.forEach(o(`activation`))},`updateBounds`),insert:p(function(e,t,n,r){let i=Ds.getMin(e,n),a=Ds.getMax(e,n),o=Ds.getMin(t,r),s=Ds.getMax(t,r);this.updateVal(F0.data,`startx`,i,Math.min),this.updateVal(F0.data,`starty`,o,Math.min),this.updateVal(F0.data,`stopx`,a,Math.max),this.updateVal(F0.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),newActivation:p(function(e,t,n){let r=n.get(e.from),i=U0(e.from).length||0,a=r.x+r.width/2+(i-1)*$.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+$.activationWidth,stopy:void 0,actor:e.from,anchored:P0.anchorElement(t)})},`newActivation`),endActivation:p(function(e){let t=this.activations.map(function(e){return e.actor}).lastIndexOf(e.from);return this.activations.splice(t,1)[0]},`endActivation`),createLoop:p(function(e={message:void 0,wrap:!1,width:void 0},t){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:e.message,wrap:e.wrap,width:e.width,height:0,fill:t}},`createLoop`),newLoop:p(function(e={message:void 0,wrap:!1,width:void 0},t){this.sequenceItems.push(this.createLoop(e,t))},`newLoop`),endLoop:p(function(){return this.sequenceItems.pop()},`endLoop`),isLoopOverlap:p(function(){return this.sequenceItems.length?this.sequenceItems[this.sequenceItems.length-1].overlap:!1},`isLoopOverlap`),addSectionToLoop:p(function(e){let t=this.sequenceItems.pop();t.sections=t.sections||[],t.sectionTitles=t.sectionTitles||[],t.sections.push({y:F0.getVerticalPos(),height:0}),t.sectionTitles.push(e),this.sequenceItems.push(t)},`addSectionToLoop`),saveVerticalPos:p(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},`saveVerticalPos`),resetVerticalPos:p(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},`resetVerticalPos`),bumpVerticalPos:p(function(e){this.verticalPos+=e,this.data.stopy=Ds.getMax(this.data.stopy,this.verticalPos)},`bumpVerticalPos`),getVerticalPos:p(function(){return this.verticalPos},`getVerticalPos`),getBounds:p(function(){return{bounds:this.data,models:this.models}},`getBounds`)},Blt=p(async function(e,t,n){F0.bumpVerticalPos($.boxMargin),t.height=$.boxMargin,t.starty=F0.getVerticalPos();let r=_P();r.x=t.startx,r.y=t.starty,r.width=t.width||$.width,r.class=`note`;let i=e.append(`g`);i.attr(`data-et`,`note`),i.attr(`data-id`,`i`+n);let a=P0.drawRect(i,r),o=vP();o.x=t.startx,o.y=t.starty,o.width=r.width,o.dy=`1em`,o.text=t.message,o.class=`noteText`,o.fontFamily=$.noteFontFamily,o.fontSize=$.noteFontSize,o.fontWeight=$.noteFontWeight,o.anchor=$.noteAlign,o.textMargin=$.noteMargin,o.valign=`center`;let s=ws(o.text)?await E0(i,o):D0(i,o),l=Math.round(s.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));a.attr(`height`,l+2*$.noteMargin),t.height+=l+2*$.noteMargin,F0.bumpVerticalPos(l+2*$.noteMargin),t.stopy=t.starty+l+2*$.noteMargin,t.stopx=t.startx+r.width,F0.insert(t.startx,t.starty,t.stopx,t.stopy),F0.models.addNote(t)},`drawNote`),I0=p(function(e,t,n,r,i,a,o){let s=r.db.getActors(),l=s.get(t.from),u=s.get(t.to),d=n.sequenceVisible,f=l.x+l.width/2,m=u.x+u.width/2,h=f<=m,g=K0(t,r),_=e.append(`g`),v=p((e,t)=>{let n=e?16.5:-16.5;return t?-n:n},`getCircleOffset`),y=p(e=>{_.append(`circle`).attr(`cx`,e).attr(`cy`,o).attr(`r`,5).attr(`width`,10).attr(`height`,10)},`drawCircle`),{CENTRAL_CONNECTION:b,CENTRAL_CONNECTION_REVERSE:x,CENTRAL_CONNECTION_DUAL:S}=r.db.LINETYPE;if(d)switch(t.centralConnection){case b:g&&(m+=v(h,!0));break;case x:g||(f+=v(h,!1));break;case S:g?m+=v(h,!0):f+=v(h,!1)}switch(t.centralConnection){case b:y(m);break;case x:y(f);break;case S:y(f),y(m)}},`drawCentralConnection`),L0=p(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),`messageFont`),R0=p(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),`noteFont`),z0=p(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),`actorFont`),p(olt,`boundMessage`),Vlt=p(async function(e,t,n,r,i,a){let{startx:o,stopx:s,starty:l,message:u,type:d,sequenceIndex:f,sequenceVisible:p}=t,m=Up.calculateTextDimensions(u,L0($)),h=vP();h.x=Math.min(o,s),h.y=l+10,h.width=Math.abs(s-o),h.class=`messageText`,h.dy=`1em`,h.text=u,h.fontFamily=$.messageFontFamily,h.fontSize=$.messageFontSize,h.fontWeight=$.messageFontWeight,h.anchor=$.messageAlign,h.valign=`center`,h.textMargin=$.wrapPadding,h.tspan=!1,ws(h.text)?await E0(e,h,{startx:o,stopx:s,starty:n}):D0(e,h);let g=m.width,_;if(o===s){let a=p||$.showSequenceNumbers,l=K0(i,r),u=Ylt(i,r),d=o+(a&&(l||u)?10:0);_=$.rightAngles?e.append(`path`).attr(`d`,`M ${d},${n} H ${o+Ds.getMax($.width/2,g/2)} V ${n+25} H ${o}`):e.append(`path`).attr(`d`,`M `+d+`,`+n+` C `+(d+60)+`,`+(n-10)+` `+(o+60)+`,`+(n+30)+` `+o+`,`+(n+20)),G0(i,r)&&I0(e,i,t,r,o,s,n)}else _=e.append(`line`),_.attr(`x1`,o),_.attr(`y1`,n),_.attr(`x2`,s),_.attr(`y2`,n),G0(i,r)&&I0(e,i,t,r,o,s,n);d===r.db.LINETYPE.DOTTED||d===r.db.LINETYPE.DOTTED_CROSS||d===r.db.LINETYPE.DOTTED_POINT||d===r.db.LINETYPE.DOTTED_OPEN||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED||d===r.db.LINETYPE.SOLID_TOP_DOTTED||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED||d===r.db.LINETYPE.STICK_TOP_DOTTED||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED?(_.style(`stroke-dasharray`,`3, 3`),_.attr(`class`,`messageLine1`)):_.attr(`class`,`messageLine0`),_.attr(`data-et`,`message`),_.attr(`data-id`,`i`+t.id),_.attr(`data-from`,t.from),_.attr(`data-to`,t.to);let v=``;if($.arrowMarkerAbsolute&&(v=ys(!0)),_.attr(`stroke-width`,2),_.attr(`stroke`,`none`),_.style(`fill`,`none`),(d===r.db.LINETYPE.SOLID_TOP||d===r.db.LINETYPE.SOLID_TOP_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-solidTopArrowHead)`),(d===r.db.LINETYPE.SOLID_BOTTOM||d===r.db.LINETYPE.SOLID_BOTTOM_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-solidBottomArrowHead)`),(d===r.db.LINETYPE.STICK_TOP||d===r.db.LINETYPE.STICK_TOP_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-stickTopArrowHead)`),(d===r.db.LINETYPE.STICK_BOTTOM||d===r.db.LINETYPE.STICK_BOTTOM_DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-stickBottomArrowHead)`),(d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-solidBottomArrowHead)`),(d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-solidTopArrowHead)`),(d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-stickBottomArrowHead)`),(d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED)&&_.attr(`marker-start`,`url(`+v+`#`+a+`-stickTopArrowHead)`),(d===r.db.LINETYPE.SOLID||d===r.db.LINETYPE.DOTTED)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-arrowhead)`),(d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(_.attr(`marker-start`,`url(`+v+`#`+a+`-arrowhead)`),_.attr(`marker-end`,`url(`+v+`#`+a+`-arrowhead)`)),(d===r.db.LINETYPE.SOLID_POINT||d===r.db.LINETYPE.DOTTED_POINT)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-filled-head)`),(d===r.db.LINETYPE.SOLID_CROSS||d===r.db.LINETYPE.DOTTED_CROSS)&&_.attr(`marker-end`,`url(`+v+`#`+a+`-crosshead)`),p||$.showSequenceNumbers){let l=d===r.db.LINETYPE.BIDIRECTIONAL_SOLID||d===r.db.LINETYPE.BIDIRECTIONAL_DOTTED,u=d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE||d===r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE||d===r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,p=G0(i,r),m=o,h=s;l?(o<s?m=o+12:(m=o-6+(p?-5:0),m+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),_.attr(`x1`,m)):u?(s>o?h=s-12:(h=s-6,m+=i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_DUAL||i?.centralConnection===r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE?-7.5:0),h+=p?15:0,_.attr(`x2`,h),_.attr(`x1`,m)):_.attr(`x1`,o+6);let g=0,y=o===s,b=o<=s;g=y?t.fromBounds+1:u?b?t.toBounds-1:t.fromBounds+1:b?t.fromBounds+1:t.toBounds-1;let x=`12px`,S=f.toString().length;S>5?x=`7px`:S>3&&(x=`9px`),e.append(`line`).attr(`x1`,g).attr(`y1`,n).attr(`x2`,g).attr(`y2`,n).attr(`stroke-width`,0).attr(`marker-start`,`url(`+v+`#`+a+`-sequencenumber)`),e.append(`text`).attr(`x`,g).attr(`y`,n+4).attr(`font-family`,`sans-serif`).attr(`font-size`,x).attr(`text-anchor`,`middle`).attr(`class`,`sequenceNumber`).text(f)}},`drawMessage`),Hlt=p(function(e,t,n,r,i,a,o){let s=0,l=0,u,d=0;for(let e of r){let r=t.get(e),a=r.box;u&&u!=a&&(o||F0.models.addBox(u),l+=$.boxMargin+u.margin),a&&a!=u&&(o||(a.x=s+l,a.y=i),l+=a.margin),r.width=Ds.getMax(r.width||$.width,$.width),r.height=Ds.getMax(r.height||$.height,$.height),r.margin=r.margin||$.actorMargin,d=Ds.getMax(d,r.height),n.get(r.name)&&(l+=r.width/2),r.x=s+l,r.starty=F0.getVerticalPos(),F0.insert(r.x,i,r.x+r.width,r.height),s+=r.width+l,r.box&&(r.box.width=s+a.margin-r.box.x),l=r.margin,u=r.box,F0.models.addActor(r)}u&&!o&&F0.models.addBox(u),F0.bumpVerticalPos(d)},`addActorRenderingData`),B0=p(async function(e,t,n,r,i,a,o){if(r){let r=0;F0.bumpVerticalPos($.boxMargin*2);for(let s of n){let n=t.get(s);n.stopy||=F0.getVerticalPos();let l=await P0.drawActor(e,n,$,!0,i,a,o);r=Ds.getMax(r,l)}F0.bumpVerticalPos(r+$.boxMargin)}else for(let r of n){let n=t.get(r);await P0.drawActor(e,n,$,!1,i,a,o)}},`drawActors`),V0=p(function(e,t,n,r){let i=0,a=0;for(let o of n){let n=t.get(o),s=Wlt(n),l=P0.drawPopup(e,n,s,$,$.forceMenus,r);l.height>i&&(i=l.height),l.width+n.x>a&&(a=l.width+n.x)}return{maxHeight:i,maxWidth:a}},`drawActorsPopup`),H0=p(function(e){No($,e),e.fontFamily&&($.actorFontFamily=$.noteFontFamily=$.messageFontFamily=e.fontFamily),e.fontSize&&($.actorFontSize=$.noteFontSize=$.messageFontSize=e.fontSize),e.fontWeight&&($.actorFontWeight=$.noteFontWeight=$.messageFontWeight=e.fontWeight)},`setConf`),U0=p(function(e){return F0.activations.filter(function(t){return t.actor===e})},`actorActivations`),W0=p(function(e,t){let n=t.get(e),r=U0(e);return[r.reduce(function(e,t){return Ds.getMin(e,t.startx)},n.x+n.width/2-1),r.reduce(function(e,t){return Ds.getMax(e,t.stopx)},n.x+n.width/2+1)]},`activationBounds`),p(m0,`adjustLoopHeightForWrap`),p(slt,`adjustCreatedDestroyedData`),Ult=p(async function(e,t,n,r){let{securityLevel:i,sequence:a,look:o,themeVariables:s}=Z();$=a;let l;i===`sandbox`&&(l=Ac(`#i`+t));let u=Ac(i===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=i===`sandbox`?l.nodes()[0].contentDocument:document;F0.init(),y.debug(r.db);let f=i===`sandbox`?u.select(`[id="${t}"]`):Ac(`[id="${t}"]`),m=r.db.getActors(),h=r.db.getCreatedActors(),g=r.db.getDestroyedActors(),_=r.db.getBoxes(),v=r.db.getActorKeys(),b=r.db.getMessages(),x=r.db.getDiagramTitle(),S=r.db.hasAtLeastOneBox(),C=r.db.hasAtLeastOneBoxWithTitle(),w=await clt(m,b,r);if($.height=await llt(m,w,_),P0.insertComputerIcon(f,t),P0.insertDatabaseIcon(f,t),P0.insertClockIcon(f,t),S&&(F0.bumpVerticalPos($.boxMargin),C&&F0.bumpVerticalPos(_[0].textMaxHeight)),$.hideUnusedParticipants===!0){let e=new Set;b.forEach(t=>{e.add(t.from),e.add(t.to)}),v=v.filter(t=>e.has(t))}let T=new Map(v.map((e,t)=>[m.get(e)?.name??e,t]));Hlt(f,m,h,v,0,b,!1);let E=await Zlt(b,m,w,r);P0.insertArrowHead(f,t),P0.insertArrowCrossHead(f,t),P0.insertArrowFilledHead(f,t),P0.insertSequenceNumber(f,t),P0.insertSolidTopArrowHead(f,t),P0.insertSolidBottomArrowHead(f,t),P0.insertStickTopArrowHead(f,t),P0.insertStickBottomArrowHead(f,t),o===`neo`&&P0.insertDropShadow(f,$);function D(e,t){let n=F0.endActivation(e);n.starty+18>t&&(n.starty=t-6,t+=12),P0.drawActivation(f,n,t,$,U0(e.from).length,r,T),F0.insert(n.startx,t-10,n.stopx,t)}p(D,`activeEnd`);let O=1,k=1,A=[],j=[],M=0;for(let e of b){let t,n,i;switch(e.type){case r.db.LINETYPE.NOTE:F0.resetVerticalPos(),n=e.noteModel,await Blt(f,n,e.id);break;case r.db.LINETYPE.ACTIVE_START:F0.newActivation(e,f,m);break;case r.db.LINETYPE.CENTRAL_CONNECTION:F0.newActivation(e,f,m);break;case r.db.LINETYPE.CENTRAL_CONNECTION_REVERSE:F0.newActivation(e,f,m);break;case r.db.LINETYPE.ACTIVE_END:D(e,F0.getVerticalPos());break;case r.db.LINETYPE.LOOP_START:m0(E,e,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F0.newLoop(e));break;case r.db.LINETYPE.LOOP_END:t=F0.endLoop(),await P0.drawLoop(f,t,`loop`,$,e),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos()),F0.models.addLoop(t);break;case r.db.LINETYPE.RECT_START:m0(E,e,$.boxMargin,$.boxMargin,e=>{let t=e.message;t||=s?.rectBkgColor||s?.actorBkg||`rgba(128, 128, 128, 0.5)`,F0.newLoop(void 0,t)});break;case r.db.LINETYPE.RECT_END:t=F0.endLoop(),j.push(t),F0.models.addLoop(t),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos());break;case r.db.LINETYPE.OPT_START:m0(E,e,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F0.newLoop(e));break;case r.db.LINETYPE.OPT_END:t=F0.endLoop(),await P0.drawLoop(f,t,`opt`,$,e),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos()),F0.models.addLoop(t);break;case r.db.LINETYPE.ALT_START:m0(E,e,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F0.newLoop(e));break;case r.db.LINETYPE.ALT_ELSE:m0(E,e,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>F0.addSectionToLoop(e));break;case r.db.LINETYPE.ALT_END:t=F0.endLoop(),await P0.drawLoop(f,t,`alt`,$,e),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos()),F0.models.addLoop(t);break;case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:m0(E,e,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F0.newLoop(e)),F0.saveVerticalPos();break;case r.db.LINETYPE.PAR_AND:m0(E,e,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>F0.addSectionToLoop(e));break;case r.db.LINETYPE.PAR_END:t=F0.endLoop(),await P0.drawLoop(f,t,`par`,$,e),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos()),F0.models.addLoop(t);break;case r.db.LINETYPE.AUTONUMBER:O=e.message.start||O,k=e.message.step||k,e.message.visible?r.db.enableSequenceNumbers():r.db.disableSequenceNumbers();break;case r.db.LINETYPE.CRITICAL_START:m0(E,e,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F0.newLoop(e));break;case r.db.LINETYPE.CRITICAL_OPTION:m0(E,e,$.boxMargin+$.boxTextMargin,$.boxMargin,e=>F0.addSectionToLoop(e));break;case r.db.LINETYPE.CRITICAL_END:t=F0.endLoop(),await P0.drawLoop(f,t,`critical`,$,e),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos()),F0.models.addLoop(t);break;case r.db.LINETYPE.BREAK_START:m0(E,e,$.boxMargin,$.boxMargin+$.boxTextMargin,e=>F0.newLoop(e));break;case r.db.LINETYPE.BREAK_END:t=F0.endLoop(),await P0.drawLoop(f,t,`break`,$,e),F0.bumpVerticalPos(t.stopy-F0.getVerticalPos()),F0.models.addLoop(t);break;default:try{i=e.msgModel,i.starty=F0.getVerticalPos(),i.sequenceIndex=O,i.sequenceVisible=r.db.showSequenceNumbers(),i.id=e.id,i.from=e.from,i.to=e.to;let t=await olt(f,i);slt(e,i,t,M,m,h,g),A.push({messageModel:i,lineStartY:t,msg:e}),F0.models.addMessage(i)}catch(e){y.error(`error while drawing message`,e)}}[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.SOLID_TOP,r.db.LINETYPE.SOLID_BOTTOM,r.db.LINETYPE.STICK_TOP,r.db.LINETYPE.STICK_BOTTOM,r.db.LINETYPE.SOLID_TOP_DOTTED,r.db.LINETYPE.SOLID_BOTTOM_DOTTED,r.db.LINETYPE.STICK_TOP_DOTTED,r.db.LINETYPE.STICK_BOTTOM_DOTTED,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,r.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,r.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT,r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(O=Math.round((O+k)*100)/100),M++}y.debug(`createdActors`,h),y.debug(`destroyedActors`,g),await B0(f,m,v,!1,t,r,T);for(let e of A)await Vlt(f,e.messageModel,e.lineStartY,r,e.msg,t);$.mirrorActors&&await B0(f,m,v,!0,t,r,T),j.forEach(e=>P0.drawBackgroundRect(f,e)),A0(f,m,v,$);for(let e of F0.models.boxes){e.height=F0.getVerticalPos()-e.y,F0.insert(e.x,e.y,e.x+e.width,e.height);let t=$.boxMargin*2;e.startx=e.x-t,e.starty=e.y-t*.25,e.stopx=e.startx+e.width+2*t,e.stopy=e.starty+e.height+t*.75,e.stroke=`rgb(0,0,0, 0.5)`,P0.drawBox(f,e,$)}S&&F0.bumpVerticalPos($.boxMargin);let N=V0(f,m,v,d),{bounds:P}=F0.getBounds();P.startx===void 0&&(P.startx=0),P.starty===void 0&&(P.starty=0),P.stopx===void 0&&(P.stopx=0),P.stopy===void 0&&(P.stopy=0);let F=P.stopy-P.starty;F<N.maxHeight&&(F=N.maxHeight);let I=F+2*$.diagramMarginY;$.mirrorActors&&(I=I-$.boxMargin+$.bottomMarginAdj);let L=P.stopx-P.startx;L<N.maxWidth&&(L=N.maxWidth);let R=L+2*$.diagramMarginX;x&&f.append(`text`).text(x).attr(`x`,(P.stopx-P.startx)/2-2*$.diagramMarginX).attr(`y`,-25),Os(f,I,R,$.useMaxWidth);let ee=x?40:0,z=m.size&&o===`neo`?30:0;f.attr(`viewBox`,P.startx-$.diagramMarginX+` -`+($.diagramMarginY+ee)+` `+R+` `+(I+ee+z)),y.debug(`models:`,F0.models)},`draw`),p(clt,`getMaxMessageWidthPerActor`),Wlt=p(function(e){let t=0,n=z0($);for(let r in e.links){let e=Up.calculateTextDimensions(r,n).width+2*$.wrapPadding+2*$.boxMargin;t<e&&(t=e)}return t},`getRequiredPopupWidth`),p(llt,`calculateActorMargins`),Glt=p(async function(e,t,n){let r=t.get(e.from),i=t.get(e.to),a=r.x,o=i.x,s=e.wrap&&e.message,l=ws(e.message)?await Ts(e.message,Z()):Up.calculateTextDimensions(s?Up.wrapLabel(e.message,$.width,R0($)):e.message,R0($)),u={width:s?$.width:Ds.getMax($.width,l.width+2*$.noteMargin),height:0,startx:r.x,stopx:0,starty:0,stopy:0,message:e.message};return e.placement===n.db.PLACEMENT.RIGHTOF?(u.width=s?Ds.getMax($.width,l.width):Ds.getMax(r.width/2+i.width/2,l.width+2*$.noteMargin),u.startx=a+(r.width+$.actorMargin)/2):e.placement===n.db.PLACEMENT.LEFTOF?(u.width=s?Ds.getMax($.width,l.width+2*$.noteMargin):Ds.getMax(r.width/2+i.width/2,l.width+2*$.noteMargin),u.startx=a-u.width+(r.width-$.actorMargin)/2):e.to===e.from?(l=Up.calculateTextDimensions(s?Up.wrapLabel(e.message,Ds.getMax($.width,r.width),R0($)):e.message,R0($)),u.width=s?Ds.getMax($.width,r.width):Ds.getMax(r.width,$.width,l.width+2*$.noteMargin),u.startx=a+(r.width-u.width)/2):(u.width=Math.abs(a+r.width/2-(o+i.width/2))+$.actorMargin,u.startx=a<o?a+r.width/2-$.actorMargin/2:o+i.width/2-$.actorMargin/2),s&&(u.message=Up.wrapLabel(e.message,u.width-2*$.wrapPadding,R0($))),y.debug(`NM:[${u.startx},${u.stopx},${u.starty},${u.stopy}:${u.width},${u.height}=${e.message}]`),u},`buildNoteModel`),Klt=4,qlt=6,G0=p(function(e,t){let{CENTRAL_CONNECTION:n,CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i}=t.db.LINETYPE;return[n,r,i].includes(e.centralConnection)},`hasCentralConnection`),Jlt=p(function(e,t,n){let{CENTRAL_CONNECTION_REVERSE:r,CENTRAL_CONNECTION_DUAL:i,BIDIRECTIONAL_SOLID:a,BIDIRECTIONAL_DOTTED:o}=t.db.LINETYPE,s=0;return(e.centralConnection===r||e.centralConnection===i)&&(s+=Klt),(e.centralConnection===r||e.centralConnection===i)&&(e.type===a||e.type===o)&&(s+=n?0:-qlt),s},`calculateCentralConnectionOffset`),K0=p(function(e,t){let{SOLID_ARROW_TOP_REVERSE:n,SOLID_ARROW_TOP_REVERSE_DOTTED:r,SOLID_ARROW_BOTTOM_REVERSE:i,SOLID_ARROW_BOTTOM_REVERSE_DOTTED:a,STICK_ARROW_TOP_REVERSE:o,STICK_ARROW_TOP_REVERSE_DOTTED:s,STICK_ARROW_BOTTOM_REVERSE:l,STICK_ARROW_BOTTOM_REVERSE_DOTTED:u}=t.db.LINETYPE;return[n,r,i,a,o,s,l,u].includes(e.type)},`isReverseArrowType`),Ylt=p(function(e,t){let{BIDIRECTIONAL_SOLID:n,BIDIRECTIONAL_DOTTED:r}=t.db.LINETYPE;return[n,r].includes(e.type)},`isBidirectionalArrowType`),Xlt=p(function(e,t,n){let{look:r}=Z();if(![n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.SOLID_TOP,n.db.LINETYPE.SOLID_BOTTOM,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.SOLID_TOP_DOTTED,n.db.LINETYPE.SOLID_BOTTOM_DOTTED,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT,n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type))return{};let[i,a]=W0(e.from,t),[o,s]=W0(e.to,t),l=i<=o,u=l?a:i,d=l?o:s;r===`neo`&&(e.type!==n.db.LINETYPE.SOLID_OPEN&&(d+=l?-3:3),(e.type===n.db.LINETYPE.BIDIRECTIONAL_SOLID||e.type===n.db.LINETYPE.BIDIRECTIONAL_DOTTED)&&(u+=l?3:-3)),u+=Jlt(e,n,l);let f=Math.abs(o-s)>2,m=p(e=>l?-e:e,`adjustValue`);e.from===e.to?d=u:(e.activate&&!f&&(d+=m($.activationWidth/2-1)),[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.STICK_TOP,n.db.LINETYPE.STICK_BOTTOM,n.db.LINETYPE.STICK_TOP_DOTTED,n.db.LINETYPE.STICK_BOTTOM_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE,n.db.LINETYPE.STICK_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.STICK_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)||(d+=m(3)),[n.db.LINETYPE.BIDIRECTIONAL_SOLID,n.db.LINETYPE.BIDIRECTIONAL_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE_DOTTED,n.db.LINETYPE.SOLID_ARROW_TOP_REVERSE,n.db.LINETYPE.SOLID_ARROW_BOTTOM_REVERSE].includes(e.type)&&(u-=m(3)));let h=[i,a,o,s],g=Math.abs(u-d);e.wrap&&e.message&&(e.message=Up.wrapLabel(e.message,Ds.getMax(g+2*$.wrapPadding,$.width),L0($)));let _=Up.calculateTextDimensions(e.message,L0($));return{width:Ds.getMax(e.wrap?0:_.width+2*$.wrapPadding,g+2*$.wrapPadding,$.width),height:0,startx:u,stopx:d,starty:0,stopy:0,message:e.message,type:e.type,wrap:e.wrap,fromBounds:Math.min.apply(null,h),toBounds:Math.max.apply(null,h)}},`buildMessageModel`),Zlt=p(async function(e,t,n,r){let i={},a=[],o,s,l;for(let n of e){switch(n.type){case r.db.LINETYPE.LOOP_START:case r.db.LINETYPE.ALT_START:case r.db.LINETYPE.OPT_START:case r.db.LINETYPE.PAR_START:case r.db.LINETYPE.PAR_OVER_START:case r.db.LINETYPE.CRITICAL_START:case r.db.LINETYPE.BREAK_START:a.push({id:n.id,msg:n.message,from:2**53-1,to:-(2**53-1),width:0});break;case r.db.LINETYPE.ALT_ELSE:case r.db.LINETYPE.PAR_AND:case r.db.LINETYPE.CRITICAL_OPTION:n.message&&(o=a.pop(),i[o.id]=o,i[n.id]=o,a.push(o));break;case r.db.LINETYPE.LOOP_END:case r.db.LINETYPE.ALT_END:case r.db.LINETYPE.OPT_END:case r.db.LINETYPE.PAR_END:case r.db.LINETYPE.CRITICAL_END:case r.db.LINETYPE.BREAK_END:o=a.pop(),i[o.id]=o;break;case r.db.LINETYPE.ACTIVE_START:{let e=t.get(n.from?n.from:n.to.actor),r=U0(n.from?n.from:n.to.actor).length,i=e.x+e.width/2+(r-1)*$.activationWidth/2,a={startx:i,stopx:i+$.activationWidth,actor:n.from,enabled:!0};F0.activations.push(a)}break;case r.db.LINETYPE.ACTIVE_END:{let e=F0.activations.map(e=>e.actor).lastIndexOf(n.from);F0.activations.splice(e,1).splice(0,1)}}n.placement===void 0?(l=Xlt(n,t,r),n.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(e=>{if(o=e,l.startx===l.stopx){let e=t.get(n.from),r=t.get(n.to);o.from=Ds.getMin(e.x-l.width/2,e.x-e.width/2,o.from),o.to=Ds.getMax(r.x+l.width/2,r.x+e.width/2,o.to),o.width=Ds.getMax(o.width,Math.abs(o.to-o.from))-$.labelBoxWidth}else o.from=Ds.getMin(l.startx,o.from),o.to=Ds.getMax(l.stopx,o.to),o.width=Ds.getMax(o.width,l.width)-$.labelBoxWidth})):(s=await Glt(n,t,r),n.noteModel=s,a.forEach(e=>{o=e,o.from=Ds.getMin(o.from,s.startx),o.to=Ds.getMax(o.to,s.startx+s.width),o.width=Ds.getMax(o.width,Math.abs(o.from-o.to))-$.labelBoxWidth}))}return F0.activations=[],y.debug(`Loop type widths:`,i),i},`calculateLoopBounds`),Qlt={parser:ult,get db(){return new mlt},renderer:{bounds:F0,drawActors:B0,drawActorsPopup:V0,setConf:H0,draw:Ult},styles:hlt,init:p(e=>{e.sequence||={},e.wrap&&(e.sequence.wrap=e.wrap,Ws({sequence:{wrap:e.wrap}}))},`init`)}})),q0,J0,Y0,X0,Z0,Q0,$0,e2,t2,n2,eut=o((()=>{sF(),lF(),dF(),UN(),bP(),Kp(),Zs(),S(),h(),hf(),Ut(),q0=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,18],n=[1,19],r=[1,20],i=[1,41],a=[1,26],o=[1,42],s=[1,24],l=[1,25],u=[1,32],d=[1,33],f=[1,34],m=[1,45],h=[1,35],g=[1,36],_=[1,37],v=[1,38],y=[1,27],b=[1,28],x=[1,29],S=[1,30],C=[1,31],w=[1,44],T=[1,46],E=[1,43],D=[1,47],O=[1,9],k=[1,8,9],A=[1,58],j=[1,59],M=[1,60],N=[1,61],P=[1,62],F=[1,63],I=[1,64],L=[1,8,9,41],R=[1,77],ee=[1,8,9,12,13,22,39,41,44,46,68,69,70,71,72,73,74,79,81],z=[1,8,9,12,13,18,20,22,39,41,44,46,47,60,68,69,70,71,72,73,74,79,81,86,100,102,103],B=[13,60,86,100,102,103],te=[13,60,73,74,86,100,102,103],ne=[13,60,68,69,70,71,72,86,100,102,103],re=[1,103],ie=[1,121],ae=[1,117],oe=[1,113],se=[1,119],ce=[1,114],le=[1,115],ue=[1,116],de=[1,118],fe=[1,120],pe=[22,50,60,61,82,86,87,88,89,90],me=[1,128],he=[12,39],ge=[1,8,9,39,41,44,46],_e=[1,8,9,22],ve=[1,153],ye=[1,8,9,61],be=[1,8,9,22,50,60,61,82,86,87,88,89,90],xe={trace:p(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:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 8:this.$=a[s-1];break;case 9:case 10:case 13:case 15:this.$=a[s];break;case 11:case 14:this.$=a[s-2]+`.`+a[s];break;case 12:case 16:this.$=a[s-1]+a[s];break;case 17:case 18:this.$=a[s-1]+`~`+a[s]+`~`;break;case 19:r.addRelation(a[s]);break;case 20:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 31:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 32:case 33:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 34:r.addClassesToNamespace(a[s-3],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 35:r.addClassesToNamespace(a[s-4],a[s-1][0],a[s-1][1]),r.popNamespace();break;case 36:this.$=r.addNamespace(a[s]);break;case 37:this.$=r.addNamespace(a[s-1],a[s]);break;case 38:this.$=[[a[s]],[]];break;case 39:this.$=[[a[s-1]],[]];break;case 40:a[s][0].unshift(a[s-2]),this.$=a[s];break;case 41:this.$=[[],[a[s]]];break;case 42:this.$=[[],[a[s-1]]];break;case 43:a[s][1].unshift(a[s-2]),this.$=a[s];break;case 44:case 45:this.$=[[],[]];break;case 46:this.$=a[s];break;case 48:r.setCssClass(a[s-2],a[s]);break;case 49:r.addMembers(a[s-3],a[s-1]);break;case 51:r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 52:r.addAnnotation(a[s-3],a[s-1]);break;case 53:r.addAnnotation(a[s-6],a[s-4]),r.addMembers(a[s-6],a[s-1]);break;case 54:r.addAnnotation(a[s-5],a[s-3]);break;case 55:this.$=a[s],r.addClass(a[s]);break;case 56:this.$=a[s-1],r.addClass(a[s-1]),r.setClassLabel(a[s-1],a[s]);break;case 60:r.addAnnotation(a[s],a[s-2]);break;case 61:case 74:this.$=[a[s]];break;case 62:a[s].push(a[s-1]),this.$=a[s];break;case 63:break;case 64:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 65:break;case 66:break;case 67:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:`none`,relationTitle2:`none`};break;case 68:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:`none`};break;case 69:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:`none`,relationTitle2:a[s-1]};break;case 70:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 71:this.$=r.addNote(a[s],a[s-1]);break;case 72:this.$=r.addNote(a[s]);break;case 73:this.$=a[s-2],r.defineClass(a[s-1],a[s]);break;case 75:this.$=a[s-2].concat([a[s]]);break;case 76:r.setDirection(`TB`);break;case 77:r.setDirection(`BT`);break;case 78:r.setDirection(`RL`);break;case 79:r.setDirection(`LR`);break;case 80:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 81:this.$={type1:`none`,type2:a[s],lineType:a[s-1]};break;case 82:this.$={type1:a[s-1],type2:`none`,lineType:a[s]};break;case 83:this.$={type1:`none`,type2:`none`,lineType:a[s]};break;case 84:this.$=r.relationType.AGGREGATION;break;case 85:this.$=r.relationType.EXTENSION;break;case 86:this.$=r.relationType.COMPOSITION;break;case 87:this.$=r.relationType.DEPENDENCY;break;case 88:this.$=r.relationType.LOLLIPOP;break;case 89:this.$=r.lineType.LINE;break;case 90:this.$=r.lineType.DOTTED_LINE;break;case 91:case 97:this.$=a[s-2],r.setClickEvent(a[s-1],a[s]);break;case 92:case 98:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 93:this.$=a[s-2],r.setLink(a[s-1],a[s]);break;case 94:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 95:this.$=a[s-3],r.setLink(a[s-2],a[s-1]),r.setTooltip(a[s-2],a[s]);break;case 96:this.$=a[s-4],r.setLink(a[s-3],a[s-2],a[s]),r.setTooltip(a[s-3],a[s-1]);break;case 99:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 100:this.$=a[s-4],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 101:this.$=a[s-3],r.setLink(a[s-2],a[s]);break;case 102:this.$=a[s-4],r.setLink(a[s-3],a[s-1],a[s]);break;case 103:this.$=a[s-4],r.setLink(a[s-3],a[s-1]),r.setTooltip(a[s-3],a[s]);break;case 104:this.$=a[s-5],r.setLink(a[s-4],a[s-2],a[s]),r.setTooltip(a[s-4],a[s-1]);break;case 105:this.$=a[s-2],r.setCssStyle(a[s-1],a[s]);break;case 106:r.setCssClass(a[s-1],a[s]);break;case 107:this.$=[a[s]];break;case 108:a[s-2].push(a[s]),this.$=a[s-2];break;case 110:this.$=a[s-1]+a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:n,37:r,38:22,42:i,43:23,46:a,48:o,51:s,52:l,54:u,56:d,57:f,60:m,62:h,63:g,64:_,65:v,75:y,76:b,78:x,82:S,83:C,86:w,100:T,102:E,103:D},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(O,[2,5],{8:[1,48]}),{8:[1,49]},e(k,[2,19],{22:[1,50]}),e(k,[2,21]),e(k,[2,22]),e(k,[2,23]),e(k,[2,24]),e(k,[2,25]),e(k,[2,26]),e(k,[2,27]),e(k,[2,28]),e(k,[2,29]),e(k,[2,30]),{34:[1,51]},{36:[1,52]},e(k,[2,33]),e(k,[2,63],{53:53,66:56,67:57,13:[1,54],22:[1,55],68:A,69:j,70:M,71:N,72:P,73:F,74:I}),{39:[1,65]},e(L,[2,47],{39:[1,67],44:[1,66],46:[1,68]}),e(k,[2,65]),e(k,[2,66]),{16:69,60:m,86:w,100:T,102:E},{16:39,17:40,19:70,60:m,86:w,100:T,102:E,103:D},{16:39,17:40,19:71,60:m,86:w,100:T,102:E,103:D},{16:39,17:40,19:72,60:m,86:w,100:T,102:E,103:D},{60:[1,73]},{13:[1,74]},{16:39,17:40,19:75,60:m,86:w,100:T,102:E,103:D},{13:R,55:76},{58:78,60:[1,79]},e(k,[2,76]),e(k,[2,77]),e(k,[2,78]),e(k,[2,79]),e(ee,[2,13],{16:39,17:40,19:81,18:[1,80],20:[1,82],60:m,86:w,100:T,102:E,103:D}),e(ee,[2,15],{20:[1,83]}),{15:84,16:85,17:86,60:m,86:w,100:T,102:E,103:D},{16:39,17:40,19:87,60:m,86:w,100:T,102:E,103:D},e(z,[2,133]),e(z,[2,134]),e(z,[2,135]),e(z,[2,136]),e([1,8,9,12,13,20,22,39,41,44,46,68,69,70,71,72,73,74,79,81],[2,137]),e(O,[2,6],{10:5,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,19:21,38:22,43:23,16:39,17:40,5:88,33:t,35:n,37:r,42:i,46:a,48:o,51:s,52:l,54:u,56:d,57:f,60:m,62:h,63:g,64:_,65:v,75:y,76:b,78:x,82:S,83:C,86:w,100:T,102:E,103:D}),{5:89,10:5,16:39,17:40,19:21,21:7,23:8,24:9,25:10,26:11,27:12,28:13,29:14,30:15,31:16,32:17,33:t,35:n,37:r,38:22,42:i,43:23,46:a,48:o,51:s,52:l,54:u,56:d,57:f,60:m,62:h,63:g,64:_,65:v,75:y,76:b,78:x,82:S,83:C,86:w,100:T,102:E,103:D},e(k,[2,20]),e(k,[2,31]),e(k,[2,32]),{13:[1,91],16:39,17:40,19:90,60:m,86:w,100:T,102:E,103:D},{53:92,66:56,67:57,68:A,69:j,70:M,71:N,72:P,73:F,74:I},e(k,[2,64]),{67:93,73:F,74:I},e(B,[2,83],{66:94,68:A,69:j,70:M,71:N,72:P}),e(te,[2,84]),e(te,[2,85]),e(te,[2,86]),e(te,[2,87]),e(te,[2,88]),e(ne,[2,89]),e(ne,[2,90]),{8:[1,96],23:99,24:97,30:98,38:22,40:95,42:i,43:23,48:o,54:u,56:d},{16:100,60:m,86:w,100:T,102:E},{41:[1,102],45:101,51:re},{16:104,60:m,86:w,100:T,102:E},{47:[1,105]},{13:[1,106]},{13:[1,107]},{79:[1,108],81:[1,109]},{22:ie,50:ae,59:110,60:oe,82:se,84:111,85:112,86:ce,87:le,88:ue,89:de,90:fe},{60:[1,122]},{13:R,55:123},e(L,[2,72]),e(L,[2,138]),{22:ie,50:ae,59:124,60:oe,61:[1,125],82:se,84:111,85:112,86:ce,87:le,88:ue,89:de,90:fe},e(pe,[2,74]),{16:39,17:40,19:126,60:m,86:w,100:T,102:E,103:D},e(ee,[2,16]),e(ee,[2,17]),e(ee,[2,18]),{11:127,12:me,39:[2,36]},e(he,[2,9],{16:85,17:86,15:130,18:[1,129],60:m,86:w,100:T,102:E,103:D}),e(he,[2,10]),e(ge,[2,55],{11:131,12:me}),e(O,[2,7]),{9:[1,132]},e(_e,[2,67]),{16:39,17:40,19:133,60:m,86:w,100:T,102:E,103:D},{13:[1,135],16:39,17:40,19:134,60:m,86:w,100:T,102:E,103:D},e(B,[2,82],{66:136,68:A,69:j,70:M,71:N,72:P}),e(B,[2,81]),{41:[1,137]},{23:99,24:97,30:98,38:22,40:138,42:i,43:23,48:o,54:u,56:d},{8:[1,139],41:[2,38]},{8:[1,140],41:[2,41]},{8:[1,141],41:[2,44]},e(L,[2,48],{39:[1,142]}),{41:[1,143]},e(L,[2,50]),{41:[2,61],45:144,51:re},{47:[1,145]},{16:39,17:40,19:146,60:m,86:w,100:T,102:E,103:D},e(k,[2,91],{13:[1,147]}),e(k,[2,93],{13:[1,149],77:[1,148]}),e(k,[2,97],{13:[1,150],80:[1,151]}),{13:[1,152]},e(k,[2,105],{61:ve}),e(ye,[2,107],{85:154,22:ie,50:ae,60:oe,82:se,86:ce,87:le,88:ue,89:de,90:fe}),e(be,[2,109]),e(be,[2,111]),e(be,[2,112]),e(be,[2,113]),e(be,[2,114]),e(be,[2,115]),e(be,[2,116]),e(be,[2,117]),e(be,[2,118]),e(be,[2,119]),e(k,[2,106]),e(L,[2,71]),e(k,[2,73],{61:ve}),{60:[1,155]},e(ee,[2,14]),{39:[2,37]},{13:[1,156]},{15:157,16:85,17:86,60:m,86:w,100:T,102:E,103:D},e(he,[2,12]),e(ge,[2,56]),{1:[2,4]},e(_e,[2,69]),e(_e,[2,68]),{16:39,17:40,19:158,60:m,86:w,100:T,102:E,103:D},e(B,[2,80]),e(L,[2,34]),{41:[1,159]},{23:99,24:97,30:98,38:22,40:160,41:[2,39],42:i,43:23,48:o,54:u,56:d},{23:99,24:97,30:98,38:22,40:161,41:[2,42],42:i,43:23,48:o,54:u,56:d},{23:99,24:97,30:98,38:22,40:162,41:[2,45],42:i,43:23,48:o,54:u,56:d},{45:163,51:re},e(L,[2,49]),{41:[2,62]},e(L,[2,52],{39:[1,164]}),e(k,[2,60]),e(k,[2,92]),e(k,[2,94]),e(k,[2,95],{77:[1,165]}),e(k,[2,98]),e(k,[2,99],{13:[1,166]}),e(k,[2,101],{13:[1,168],77:[1,167]}),{22:ie,50:ae,60:oe,82:se,84:169,85:112,86:ce,87:le,88:ue,89:de,90:fe},e(be,[2,110]),e(pe,[2,75]),{14:[1,170]},e(he,[2,11]),e(_e,[2,70]),e(L,[2,35]),{41:[2,40]},{41:[2,43]},{41:[2,46]},{41:[1,171]},{41:[1,173],45:172,51:re},e(k,[2,96]),e(k,[2,100]),e(k,[2,102]),e(k,[2,103],{77:[1,174]}),e(ye,[2,108],{85:154,22:ie,50:ae,60:oe,82:se,86:ce,87:le,88:ue,89:de,90:fe}),e(ge,[2,8]),e(L,[2,51]),{41:[1,175]},e(L,[2,54]),e(k,[2,104]),e(L,[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:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2061-`+g.showPosition()+`2062-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};xe.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2063-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2064-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2065-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{},performAction:p(function(e,t,n,r){switch(n){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}}}})();function Se(){this.yy={}}return p(Se,`Parser`),Se.prototype=xe,xe.Parser=Se,new Se})(),q0.parser=q0,J0=q0,Y0=[`#`,`+`,`~`,`-`,``],X0=class{static{p(this,`ClassMember`)}constructor(e,t){this.memberType=t,this.visibility=``,this.classifier=``,this.text=``;let n=_s(e,Z());this.parseMember(n)}getDisplayDetails(){let e=this.visibility+bs(this.id);this.memberType===`method`&&(e+=`(${bs(this.parameters.trim())})`,this.returnType&&(e+=` : `+bs(this.returnType))),e=e.trim();let t=this.parseClassifier();return{displayText:e,cssStyle:t}}parseMember(e){let t=``;if(this.memberType===`method`){let n=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(e);if(n){let e=n[1]?n[1].trim():``;if(Y0.includes(e)&&(this.visibility=e),this.id=n[2],this.parameters=n[3]?n[3].trim():``,t=n[4]?n[4].trim():``,this.returnType=n[5]?n[5].trim():``,t===``){let e=this.returnType.substring(this.returnType.length-1);/[$*]/.exec(e)&&(t=e,this.returnType=this.returnType.substring(0,this.returnType.length-1))}}}else{let n=e.length,r=e.substring(0,1),i=e.substring(n-1);Y0.includes(r)&&(this.visibility=r),/[$*]/.exec(i)&&(t=i),this.id=e.substring(this.visibility===``?0:1,t===``?n:n-1)}this.classifier=t,this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim();let n=`${this.visibility?`\\`+this.visibility:``}${bs(this.id)}${this.memberType===`method`?`(${bs(this.parameters)})${this.returnType?` : `+bs(this.returnType):``}`:``}`;this.text=n.replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`),this.text.startsWith(`\\&lt;`)&&(this.text=this.text.replace(`\\&lt;`,`~`))}parseClassifier(){switch(this.classifier){case`*`:return`font-style:italic;`;case`$`:return`text-decoration:underline;`;default:return``}}},Z0=`classId-`,Q0=0,$0=p(e=>Ds.sanitizeText(e,Z()),`sanitizeText`),e2=class e{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=p(e=>{let t=yP();Ac(e).select(`svg`).selectAll(`g`).filter(function(){return Ac(this).attr(`title`)!==null}).on(`mouseover`,e=>{let n=Ac(e.currentTarget),r=n.attr(`title`);if(!r)return;let i=e.currentTarget.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.html(Ht.sanitize(r)).style(`left`,`${window.scrollX+i.left+i.width/2}px`).style(`top`,`${window.scrollY+i.bottom+4}px`),n.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),Ac(e.currentTarget).classed(`hover`,!1)})},`setupToolTips`),this.direction=`TB`,this.setAccTitle=Ls,this.getAccTitle=Rs,this.setAccDescription=zs,this.getAccDescription=Bs,this.setDiagramTitle=Vs,this.getDiagramTitle=Hs,this.getConfig=p(()=>Z().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{p(this,`ClassDB`)}splitClassNameAndType(e){let t=Ds.sanitizeText(e,Z()),n=``,r=t;if(t.indexOf(`~`)>0){let e=t.split(`~`);r=$0(e[0]),n=$0(e[1])}return{className:r,type:n}}setClassLabel(e,t){let n=Ds.sanitizeText(e,Z());t&&=$0(t);let{className:r}=this.splitClassNameAndType(n);this.classes.get(r).label=t,this.classes.get(r).text=`${t}${this.classes.get(r).type?`<${this.classes.get(r).type}>`:``}`}addClass(e){let t=Ds.sanitizeText(e,Z()),{className:n,type:r}=this.splitClassNameAndType(t);if(this.classes.has(n))return;let i=Ds.sanitizeText(n,Z());this.classes.set(i,{id:i,type:r,label:i,text:`${i}${r?`&lt;${r}&gt;`:``}`,shape:`classBox`,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[],domId:Z0+i+`-`+Q0}),Q0++}addInterface(e,t){let n={id:`interface${this.interfaces.length}`,label:e,classId:t};this.interfaces.push(n)}setDiagramId(e){this.diagramId=e}lookUpDomId(e){let t=Ds.sanitizeText(e,Z());if(this.classes.has(t)){let e=this.classes.get(t).domId;return this.diagramId?`${this.diagramId}-${e}`:e}throw Error(`Class not found: `+t)}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`,Is()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNote(e){let t=typeof e==`number`?`note${e}`:e;return this.notes.get(t)}getNotes(){return this.notes}addRelation(e){y.debug(`Adding relation: `+JSON.stringify(e));let t=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];e.relation.type1===this.relationType.LOLLIPOP&&!t.includes(e.relation.type2)?(this.addClass(e.id2),this.addInterface(e.id1,e.id2),e.id1=`interface${this.interfaces.length-1}`):e.relation.type2===this.relationType.LOLLIPOP&&!t.includes(e.relation.type1)?(this.addClass(e.id1),this.addInterface(e.id2,e.id1),e.id2=`interface${this.interfaces.length-1}`):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=this.splitClassNameAndType(e.id1).className,e.id2=this.splitClassNameAndType(e.id2).className,e.relationTitle1=Ds.sanitizeText(e.relationTitle1.trim(),Z()),e.relationTitle2=Ds.sanitizeText(e.relationTitle2.trim(),Z()),this.relations.push(e)}addAnnotation(e,t){let n=this.splitClassNameAndType(e).className;this.classes.get(n).annotations.push(t)}addMember(e,t){this.addClass(e);let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);if(typeof t==`string`){let e=t.trim();e.startsWith(`<<`)&&e.endsWith(`>>`)?r.annotations.push($0(e.substring(2,e.length-2))):e.indexOf(`)`)>0?r.methods.push(new X0(e,`method`)):e&&r.members.push(new X0(e,`attribute`))}}addMembers(e,t){Array.isArray(t)&&(t.reverse(),t.forEach(t=>this.addMember(e,t)))}addNote(e,t){let n=this.notes.size,r={id:`note${n}`,class:t,text:e,index:n};return this.notes.set(r.id,r),r.id}cleanupLabel(e){return e.startsWith(`:`)&&(e=e.substring(1)),$0(e.trim())}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=e;/\d/.exec(e[0])&&(n=Z0+n),n=this.splitClassNameAndType(n).className;let r=this.classes.get(n);r&&(r.cssClasses+=` `+t)})}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),t&&t.forEach(t=>{if(/color/.exec(t)){let n=t.replace(`fill`,`bgFill`);e.textStyles.push(n)}e.styles.push(t)}),this.classes.forEach(e=>{e.cssClasses.includes(n)&&e.styles.push(...t.flatMap(e=>e.split(`,`)))})}}setTooltip(e,t){e.split(`,`).forEach(e=>{if(t!==void 0){let n=this.splitClassNameAndType(e).className,r=this.classes.get(n);r&&(r.tooltip=$0(t))}})}getTooltip(e,t){return t&&this.namespaces.has(t)?this.namespaces.get(t).classes.get(e).tooltip:this.classes.get(e).tooltip}setLink(e,t,n){let r=Z();e.split(`,`).forEach(e=>{let i=e;/\d/.exec(e[0])&&(i=Z0+i),i=this.splitClassNameAndType(i).className;let a=this.classes.get(i);a&&(a.link=Up.formatUrl(t,r),a.linkTarget=r.securityLevel===`sandbox`?`_top`:typeof n==`string`?$0(n):`_blank`)}),this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){e.split(`,`).forEach(e=>{this.setClickFunc(e,t,n);let r=this.splitClassNameAndType(e).className,i=this.classes.get(r);i&&(i.haveCallback=!0)}),this.setCssClass(e,`clickable`)}setClickFunc(e,t,n){let r=Ds.sanitizeText(e,Z());if(Z().securityLevel!==`loose`||t===void 0)return;let i=this.splitClassNameAndType(r).className;if(this.classes.has(i)){let e=[];if(typeof n==`string`){e=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<e.length;t++){let n=e[t].trim();n.startsWith(`"`)&&n.endsWith(`"`)&&(n=n.substr(1,n.length-2)),e[t]=n}}e.length===0&&e.push(i),this.functions.push(()=>{let n=this.lookUpDomId(i),r=document.querySelector(`[id="${n}"]`);r!==null&&r.addEventListener(`click`,()=>{Up.runFunc(t,...e)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}escapeHtml(e){return e.replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`).replace(/"/g,`&quot;`).replace(/'/g,`&#39;`)}getDirection(){return this.direction}setDirection(e){this.direction=e}static resolveQualifiedId(e,t){let n=t.at(-1);return n?`${n}.${e}`:e}static getAncestorIds(e){let t=e.split(`.`),n=Array(t.length);n[0]=t[0];for(let e=1;e<t.length;e++)n[e]=`${n[e-1]}.${t[e]}`;return n}createNamespaceNode(e,t,n,r=!1){return{id:e,label:t,classes:new Map,notes:new Map,children:new Map,domId:Z0+e+`-`+this.namespaceCounter++,parent:n,explicit:r}}linkParentChild(e,t){let n=this.namespaces.get(e),r=this.namespaces.get(t);!n||!r||(n.children.has(t)||n.children.set(t,r),r.parent??=e)}addNamespace(t,n){let r=e.resolveQualifiedId(t,this.namespaceStack);if(this.namespaceStack.push(r),this.namespaces.has(r)){let e=this.namespaces.get(r);return e.explicit=!0,n&&(e.label=n),r}let i=r.split(`.`),a=e.getAncestorIds(r);for(let e=0;e<a.length;e++){let t=a[e],r=e>0?a[e-1]:void 0,o=e===a.length-1,s=o&&n?n:i[e];this.namespaces.has(t)?o&&(this.namespaces.get(t).explicit=!0):this.namespaces.set(t,this.createNamespaceNode(t,s,r,o)),r&&this.linkParentChild(r,t)}return r}popNamespace(){this.namespaceStack.pop()}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t,n){if(this.namespaces.has(e)){for(let n of t){let{className:t}=this.splitClassNameAndType(n),r=this.getClass(t);r.parent=e,this.namespaces.get(e).classes.set(t,r)}for(let t of n){let n=this.getNote(t);n.parent=e,this.namespaces.get(e).notes.set(t,n)}}}setCssStyle(e,t){let n=this.classes.get(e);if(!(!t||!n))for(let e of t)e.includes(`,`)?n.styles.push(...e.split(`,`)):n.styles.push(e)}getArrowMarker(e){let t;switch(e){case 0:t=`aggregation`;break;case 1:t=`extension`;break;case 2:t=`composition`;break;case 3:t=`dependency`;break;case 4:t=`lollipop`;break;default:t=`none`}return t}resolveExplicitAncestor(e){let t=e;for(;t;){let e=this.namespaces.get(t);if(!e)return;if(e.explicit)return t;t=e.parent}}getData(){let e=[],t=[],n=Z(),r=n.class?.hierarchicalNamespaces??!0;for(let t of this.namespaces.values()){if(!r&&!t.explicit)continue;let i={id:t.id,label:r?t.label:t.id,isGroup:!0,padding:n.class.padding??16,shape:`rect`,cssStyles:[],look:n.look,parentId:r?t.parent:void 0};e.push(i)}for(let t of this.classes.values()){let i=r?t.parent:this.resolveExplicitAncestor(t.parent),a={...t,type:void 0,isGroup:!1,parentId:i,look:n.look};e.push(a)}for(let i of this.notes.values()){let a=r?i.parent:this.resolveExplicitAncestor(i.parent),o={id:i.id,label:i.text,isGroup:!1,shape:`note`,padding:n.class.padding??6,cssStyles:[`text-align: left`,`white-space: nowrap`,`fill: ${n.themeVariables.noteBkgColor}`,`stroke: ${n.themeVariables.noteBorderColor}`],look:n.look,parentId:a,labelType:`markdown`};e.push(o);let s=this.classes.get(i.class)?.id;if(s){let e={id:`edgeNote${i.index}`,start:i.id,end:s,type:`normal`,thickness:`normal`,classes:`relation`,arrowTypeStart:`none`,arrowTypeEnd:`none`,arrowheadStyle:``,labelStyle:[``],style:[`fill: none`],pattern:`dotted`,look:n.look};t.push(e)}}for(let t of this.interfaces){let r={id:t.id,label:t.label,isGroup:!1,shape:`rect`,cssStyles:[`opacity: 0;`],look:n.look};e.push(r)}let i=0;for(let e of this.relations){i++;let r={id:Gp(e.id1,e.id2,{prefix:`id`,counter:i}),start:e.id1,end:e.id2,type:`normal`,label:e.title,labelpos:`c`,thickness:`normal`,classes:`relation`,arrowTypeStart:this.getArrowMarker(e.relation.type1),arrowTypeEnd:this.getArrowMarker(e.relation.type2),startLabelRight:e.relationTitle1===`none`?``:e.relationTitle1,endLabelLeft:e.relationTitle2===`none`?``:e.relationTitle2,arrowheadStyle:``,labelStyle:[`display: inline-block`],style:e.style||``,pattern:e.relation.lineType==1?`dashed`:`solid`,look:n.look,labelType:`markdown`};t.push(r)}return{nodes:e,edges:t,other:{},config:n,direction:this.getDirection()}}},t2=p(e=>`g.classGroup text {2066- fill: ${e.nodeBorder||e.classText};2067- stroke: none;2068- font-family: ${e.fontFamily};2069- font-size: 10px;2070-2071- .title {2072- font-weight: bolder;2073- }2074-2075-}2076-2077- .cluster-label text {2078- fill: ${e.titleColor};2079- }2080- .cluster-label span {2081- color: ${e.titleColor};2082- }2083- .cluster-label span p {2084- background-color: transparent;2085- }2086-2087- .cluster rect {2088- fill: ${e.clusterBkg};2089- stroke: ${e.clusterBorder};2090- stroke-width: 1px;2091- }2092-2093- .cluster text {2094- fill: ${e.titleColor};2095- }2096-2097- .cluster span {2098- color: ${e.titleColor};2099- }2100-2101-.nodeLabel, .edgeLabel {2102- color: ${e.classText};2103-}2104-2105-.noteLabel .nodeLabel, .noteLabel .edgeLabel {2106- color: ${e.noteTextColor};2107-}2108-.edgeLabel .label rect {2109- fill: ${e.mainBkg};2110-}2111-.label text {2112- fill: ${e.classText};2113-}2114-2115-.labelBkg {2116- background: ${e.mainBkg};2117-}2118-.edgeLabel .label span {2119- background: ${e.mainBkg};2120-}2121-2122-.classTitle {2123- font-weight: bolder;2124-}2125-.node rect,2126- .node circle,2127- .node ellipse,2128- .node polygon,2129- .node path {2130- fill: ${e.mainBkg};2131- stroke: ${e.nodeBorder};2132- stroke-width: ${e.strokeWidth};2133- }2134-2135-2136-.divider {2137- stroke: ${e.nodeBorder};2138- stroke-width: 1;2139-}2140-2141-g.clickable {2142- cursor: pointer;2143-}2144-2145-g.classGroup rect {2146- fill: ${e.mainBkg};2147- stroke: ${e.nodeBorder};2148-}2149-2150-g.classGroup line {2151- stroke: ${e.nodeBorder};2152- stroke-width: 1;2153-}2154-2155-.classLabel .box {2156- stroke: none;2157- stroke-width: 0;2158- fill: ${e.mainBkg};2159- opacity: 0.5;2160-}2161-2162-.classLabel .label {2163- fill: ${e.nodeBorder};2164- font-size: 10px;2165-}2166-2167-.relation {2168- stroke: ${e.lineColor};2169- stroke-width: ${e.strokeWidth};2170- fill: none;2171-}2172-2173-.dashed-line{2174- stroke-dasharray: 3;2175-}2176-2177-.dotted-line{2178- stroke-dasharray: 1 2;2179-}2180-2181-[id$="-compositionStart"], .composition {2182- fill: ${e.lineColor} !important;2183- stroke: ${e.lineColor} !important;2184- stroke-width: 1;2185-}2186-2187-[id$="-compositionEnd"], .composition {2188- fill: ${e.lineColor} !important;2189- stroke: ${e.lineColor} !important;2190- stroke-width: 1;2191-}2192-2193-[id$="-dependencyStart"], .dependency {2194- fill: ${e.lineColor} !important;2195- stroke: ${e.lineColor} !important;2196- stroke-width: 1;2197-}2198-2199-[id$="-dependencyEnd"], .dependency {2200- fill: ${e.lineColor} !important;2201- stroke: ${e.lineColor} !important;2202- stroke-width: 1;2203-}2204-2205-[id$="-extensionStart"], .extension {2206- fill: transparent !important;2207- stroke: ${e.lineColor} !important;2208- stroke-width: 1;2209-}2210-2211-[id$="-extensionEnd"], .extension {2212- fill: transparent !important;2213- stroke: ${e.lineColor} !important;2214- stroke-width: 1;2215-}2216-2217-[id$="-aggregationStart"], .aggregation {2218- fill: transparent !important;2219- stroke: ${e.lineColor} !important;2220- stroke-width: 1;2221-}2222-2223-[id$="-aggregationEnd"], .aggregation {2224- fill: transparent !important;2225- stroke: ${e.lineColor} !important;2226- stroke-width: 1;2227-}2228-2229-[id$="-lollipopStart"], .lollipop {2230- fill: ${e.mainBkg} !important;2231- stroke: ${e.lineColor} !important;2232- stroke-width: 1;2233-}2234-2235-[id$="-lollipopEnd"], .lollipop {2236- fill: ${e.mainBkg} !important;2237- stroke: ${e.lineColor} !important;2238- stroke-width: 1;2239-}2240-2241-.edgeTerminals {2242- font-size: 11px;2243- line-height: initial;2244-}2245-2246-.classTitleText {2247- text-anchor: middle;2248- font-size: 18px;2249- fill: ${e.textColor};2250-}2251-2252-.edgeLabel[data-look="neo"] {2253- background-color: ${e.edgeLabelBackground};2254- p {2255- background-color: ${e.edgeLabelBackground};2256- }2257- rect {2258- opacity: 0.5;2259- background-color: ${e.edgeLabelBackground};2260- fill: ${e.edgeLabelBackground};2261- }2262- text-align: center;2263-}2264- ${oF()}2265-`,`getStyles`),n2={getClasses:p(function(e,t){return t.db.getClasses()},`getClasses`),draw:p(async function(e,t,n,r){y.info(`REF0:`),y.info(`Drawing class diagram (v3)`,t);let{securityLevel:i,state:a,layout:o}=Z();r.db.setDiagramId(t);let s=r.db.getData(),l=cF(t,i);s.type=r.type,s.layoutAlgorithm=HN(o),s.nodeSpacing=a?.nodeSpacing||50,s.rankSpacing=a?.rankSpacing||50,s.markers=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`],s.diagramId=t,await VN(s,l),Up.insertTitle(l,`classDiagramTitleText`,a?.titleTopMargin??25,r.db.getDiagramTitle()),uF(l,8,`classDiagram`,a?.useMaxWidth??!0)},`draw`),getDir:p((e,t=`TB`)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`)}})),tut=l({diagram:()=>nut}),nut,rut=o((()=>{eut(),lF(),dF(),UN(),bP(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),nut={parser:J0,get db(){return new e2},renderer:n2,styles:t2,init:p(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}})),iut=l({diagram:()=>aut}),aut,out=o((()=>{eut(),lF(),dF(),UN(),bP(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),aut={parser:J0,get db(){return new e2},renderer:n2,styles:t2,init:p(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}}));function r2(e=``,t=0,n=``,r=D2){return`${Cut}-${e}${n!==null&&n.length>0?`${r}${n}`:``}-${t}`}function i2(e,t,n){if(!t.id||t.id===`</join></fork>`||t.id===`</choice>`)return;t.cssClasses&&(Array.isArray(t.cssCompiledStyles)||(t.cssCompiledStyles=[]),t.cssClasses.split(` `).forEach(e=>{let r=n.get(e);r&&(t.cssCompiledStyles=[...t.cssCompiledStyles??[],...r.styles])}));let r=e.find(e=>e.id===t.id);r?Object.assign(r,t):e.push(t)}function sut(e){return e?.classes?.join(` `)??``}function cut(e){return e?.styles??[]}var a2,o2,lut,s2,c2,l2,u2,d2,uut,dut,fut,f2,p2,m2,h2,g2,_2,v2,y2,b2,put,mut,x2,S2,hut,gut,C2,_ut,w2,vut,yut,but,xut,Sut,T2,E2,Cut,D2,wut,O2,k2,Tut,A2,j2,Eut,M2,N2,Dut,P2,F2,I2,L2,R2,z2,Out=o((()=>{lF(),dF(),UN(),bP(),Kp(),Zs(),S(),h(),hf(),Ut(),a2=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,2],n=[1,3],r=[1,4],i=[2,4],a=[1,9],o=[1,11],s=[1,16],l=[1,17],u=[1,18],d=[1,19],f=[1,33],m=[1,20],h=[1,21],g=[1,22],_=[1,23],v=[1,24],y=[1,26],b=[1,27],x=[1,28],S=[1,29],C=[1,30],w=[1,31],T=[1,32],E=[1,35],D=[1,36],O=[1,37],k=[1,38],A=[1,34],j=[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],M=[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],N=[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],P={trace:p(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:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 3:return r.setRootDoc(a[s]),a[s];case 4:this.$=[];break;case 5:a[s]!=`nl`&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 6:case 7:this.$=a[s];break;case 8:this.$=`nl`;break;case 12:this.$=a[s];break;case 13:let e=a[s-1];e.description=r.trimColon(a[s]),this.$=e;break;case 14:this.$={stmt:`relation`,state1:a[s-2],state2:a[s]};break;case 15:let t=r.trimColon(a[s]);this.$={stmt:`relation`,state1:a[s-3],state2:a[s-1],description:t};break;case 19:this.$={stmt:`state`,id:a[s-3],type:`default`,description:``,doc:a[s-1]};break;case 20:var l=a[s],u=a[s-2].trim();if(a[s].match(`:`)){var d=a[s].split(`:`);l=d[0],u=[u,d[1]]}this.$={stmt:`state`,id:l,type:`default`,description:u};break;case 21:this.$={stmt:`state`,id:a[s-3],type:`default`,description:a[s-5],doc:a[s-1]};break;case 22:this.$={stmt:`state`,id:a[s],type:`fork`};break;case 23:this.$={stmt:`state`,id:a[s],type:`join`};break;case 24:this.$={stmt:`state`,id:a[s],type:`choice`};break;case 25:this.$={stmt:`state`,id:r.getDividerId(),type:`divider`};break;case 26:this.$={stmt:`state`,id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 29:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 30:case 31:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:this.$={stmt:`click`,id:a[s-3],url:a[s-2],tooltip:a[s-1]};break;case 33:this.$={stmt:`click`,id:a[s-3],url:a[s-1],tooltip:``};break;case 34:case 35:this.$={stmt:`classDef`,id:a[s-1].trim(),classes:a[s].trim()};break;case 36:this.$={stmt:`style`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 37:this.$={stmt:`applyClass`,id:a[s-1].trim(),styleClass:a[s].trim()};break;case 38:r.setDirection(`TB`),this.$={stmt:`dir`,value:`TB`};break;case 39:r.setDirection(`BT`),this.$={stmt:`dir`,value:`BT`};break;case 40:r.setDirection(`RL`),this.$={stmt:`dir`,value:`RL`};break;case 41:r.setDirection(`LR`),this.$={stmt:`dir`,value:`LR`};break;case 44:case 45:this.$={stmt:`state`,id:a[s].trim(),type:`default`,description:``};break;case 46:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``};break;case 47:this.$={stmt:`state`,id:a[s-2].trim(),classes:[a[s].trim()],type:`default`,description:``}}},`anonymous`),table:[{3:1,4:t,5:n,6:r},{1:[3]},{3:5,4:t,5:n,6:r},{3:6,4:t,5:n,6:r},e([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],i,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:l,19:u,22:d,24:f,25:m,26:h,27:g,28:_,29:v,32:25,33:y,35:b,37:x,38:S,41:C,45:w,48:T,51:E,52:D,53:O,54:k,57:A},e(j,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:s,17:l,19:u,22:d,24:f,25:m,26:h,27:g,28:_,29:v,32:25,33:y,35:b,37:x,38:S,41:C,45:w,48:T,51:E,52:D,53:O,54:k,57:A},e(j,[2,7]),e(j,[2,8]),e(j,[2,9]),e(j,[2,10]),e(j,[2,11]),e(j,[2,12],{14:[1,40],15:[1,41]}),e(j,[2,16]),{18:[1,42]},e(j,[2,18],{20:[1,43]}),{23:[1,44]},e(j,[2,22]),e(j,[2,23]),e(j,[2,24]),e(j,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(j,[2,28]),{34:[1,49]},{36:[1,50]},e(j,[2,31]),{13:51,24:f,57:A},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(M,[2,44],{58:[1,56]}),e(M,[2,45],{58:[1,57]}),e(j,[2,38]),e(j,[2,39]),e(j,[2,40]),e(j,[2,41]),e(j,[2,6]),e(j,[2,13]),{13:58,24:f,57:A},e(j,[2,17]),e(N,i,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(j,[2,29]),e(j,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},e(j,[2,14],{14:[1,71]}),{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:l,19:u,21:[1,72],22:d,24:f,25:m,26:h,27:g,28:_,29:v,32:25,33:y,35:b,37:x,38:S,41:C,45:w,48:T,51:E,52:D,53:O,54:k,57:A},e(j,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(j,[2,34]),e(j,[2,35]),e(j,[2,36]),e(j,[2,37]),e(M,[2,46]),e(M,[2,47]),e(j,[2,15]),e(j,[2,19]),e(N,i,{7:78}),e(j,[2,26]),e(j,[2,27]),{5:[1,79]},{5:[1,80]},{4:a,5:o,8:8,9:10,10:12,11:13,12:14,13:15,16:s,17:l,19:u,21:[1,81],22:d,24:f,25:m,26:h,27:g,28:_,29:v,32:25,33:y,35:b,37:x,38:S,41:C,45:w,48:T,51:E,52:D,53:O,54:k,57:A},e(j,[2,32]),e(j,[2,33]),e(j,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2266-`+g.showPosition()+`2267-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};P.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2268-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2269-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2270-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){function i(){let n=t.yytext.indexOf(`%%`);if(n===0)return!1;if(n>0){let r=t.yytext.slice(0,n),i=t.yytext.slice(n);i&&e.lexer.unput(i),t.yytext=r}return!0}switch(p(i,`processId`),n){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(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 38:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 39:return this.popState(),t.yytext=t.yytext.slice(0,-10).trim(),27;case 40:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),25;case 41:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),26;case 42:return this.popState(),t.yytext=t.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:throw Error(`Error: State name must be a single word. Found: "`+t.yytext.trim()+`"`);case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState(`struct`),20;case 56:return this.popState(),21;case 57:break;case 58:return this.begin(`NOTE`),29;case 59:return this.popState(),this.pushState(`NOTE_ID`),59;case 60:return this.popState(),this.pushState(`NOTE_ID`),60;case 61:this.popState(),this.pushState(`FLOATING_NOTE`);break;case 62:return this.popState(),this.pushState(`FLOATING_NOTE_ID`),`AS`;case 63:break;case 64:return`NOTE_TEXT`;case 65:return i()?(this.popState(),`ID`):void 0;case 66:return i()?(this.popState(),this.pushState(`NOTE_TEXT`),24):void 0;case 67:return this.popState(),t.yytext=t.yytext.substr(2).trim(),31;case 68:return this.popState(),t.yytext=t.yytext.slice(0,-8).trim(),31;case 69:return 6;case 70:return 6;case 71:return 16;case 72:return 57;case 73:return i()?24:void 0;case 74:return t.yytext=t.yytext.trim(),14;case 75:return 15;case 76:return 28;case 77:return 58;case 78:return 5;case 79:return`INVALID`}},`anonymous`),rules:[/^(?:click\b)/i,/^(?:href\b)/i,/^(?:"[^"]*")/i,/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:style\s+)/i,/^(?:[\w,]+\s+)/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\w+\s+\w+.*?\{)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?\n\s*end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:(?:[^:\n;]|:[^:\n;])+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[10,11,12],inclusive:!1},struct:{rules:[10,11,12,23,27,30,36,43,44,45,46,56,57,58,72,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[65],inclusive:!1},FLOATING_NOTE:{rules:[62,63,64],inclusive:!1},NOTE_TEXT:{rules:[67,68],inclusive:!1},NOTE_ID:{rules:[66],inclusive:!1},NOTE:{rules:[59,60,61],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[32],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[31],inclusive:!1},CLASS_STYLE:{rules:[29],inclusive:!1},CLASS:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[26],inclusive:!1},CLASSDEF:{rules:[24,25],inclusive:!1},acc_descr_multiline:{rules:[21,22],inclusive:!1},acc_descr:{rules:[19],inclusive:!1},acc_title:{rules:[17],inclusive:!1},SCALE:{rules:[14,15,34,35],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[49],inclusive:!1},STATE_STRING:{rules:[50,51],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[10,11,12,37,38,39,40,41,42,47,48,52,53,54,55],inclusive:!1},ID:{rules:[10,11,12],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,12,13,16,18,20,23,27,30,33,36,55,58,69,70,71,72,73,74,75,77,78,79],inclusive:!0}}}})();function F(){this.yy={}}return p(F,`Parser`),F.prototype=P,P.Parser=F,new F})(),a2.parser=a2,o2=a2,lut=`TB`,s2=`TB`,c2=`dir`,l2=`state`,u2=`root`,d2=`relation`,uut=`classDef`,dut=`style`,fut=`applyClass`,f2=`default`,p2=`divider`,m2=`fill:none`,h2=`fill: #333`,g2=`c`,_2=`markdown`,v2=`normal`,y2=`rect`,b2=`rectWithTitle`,put=`stateStart`,mut=`stateEnd`,x2=`divider`,S2=`roundedWithTitle`,hut=`note`,gut=`noteGroup`,C2=`statediagram`,_ut=`${C2}-state`,w2=`transition`,vut=`note`,yut=`${w2} note-edge`,but=`${C2}-${vut}`,xut=`${C2}-cluster`,Sut=`${C2}-cluster-alt`,T2=`parent`,E2=`note`,Cut=`state`,D2=`----`,wut=`${D2}${E2}`,O2=`${D2}${T2}`,k2=p((e,t=s2)=>{if(!e.doc)return t;let n=t;for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),Tut={getClasses:p(function(e,t){return t.db.getClasses()},`getClasses`),draw:p(async function(e,t,n,r){y.info(`REF0:`),y.info(`Drawing state diagram (v2)`,t);let{securityLevel:i,state:a,layout:o}=Z();r.db.extract(r.db.getRootDocV2());let s=r.db.getData(),l=cF(t,i);s.type=r.type,s.layoutAlgorithm=o,s.nodeSpacing=a?.nodeSpacing||50,s.rankSpacing=a?.rankSpacing||50,s.markers=Z().look===`neo`?[`barbNeo`]:[`barb`],s.diagramId=t,await VN(s,l);try{(typeof r.db.getLinks==`function`?r.db.getLinks():new Map).forEach((e,t)=>{let n=typeof t==`string`?t:typeof t?.id==`string`?t.id:``,r=s.nodes.find(e=>e.id===n);if(!n){y.warn(`⚠️ Invalid or missing stateId from key:`,JSON.stringify(t));return}let i=l.node()?.querySelectorAll(`g.node, g.rough-node`),a;if(i?.forEach(e=>{let t=e.textContent?.trim();(e.id===r?.domId||t===n)&&(a=e)}),!a){y.warn(`⚠️ Could not find node matching text:`,n);return}let o=a.parentNode;if(!o){y.warn(`⚠️ Node has no parent, cannot wrap:`,n);return}let u=document.createElementNS(`http://www.w3.org/2000/svg`,`a`),d=e.url.replace(/^"+|"+$/g,``);if(u.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,d),u.setAttribute(`target`,`_blank`),e.tooltip){let t=e.tooltip.replace(/^"+|"+$/g,``);u.setAttribute(`title`,t),a.setAttribute(`title`,t)}o.replaceChild(u,a),u.appendChild(a),y.info(`🔗 Wrapped node in <a> tag for:`,n,e.url)})}catch(e){y.error(`❌ Error injecting clickable links:`,e)}Up.insertTitle(l,`statediagramTitleText`,a?.titleTopMargin??25,r.db.getDiagramTitle()),uF(l,8,C2,a?.useMaxWidth??!0)},`draw`),getDir:k2},A2=new Map,j2=0,p(r2,`stateDomId`),Eut=p((e,t,n,r,i,a,o,s)=>{y.trace(`items`,t),t.forEach(t=>{switch(t.stmt){case l2:N2(e,t,n,r,i,a,o,s);break;case f2:N2(e,t,n,r,i,a,o,s);break;case d2:{N2(e,t.state1,n,r,i,a,o,s),N2(e,t.state2,n,r,i,a,o,s);let l=o===`neo`,u={id:`edge`+j2,start:t.state1.id,end:t.state2.id,arrowhead:`normal`,arrowTypeEnd:l?`arrow_barb_neo`:`arrow_barb`,style:m2,labelStyle:``,label:Ds.sanitizeText(t.description??``,Z()),arrowheadStyle:h2,labelpos:g2,labelType:_2,thickness:v2,classes:w2,look:o};i.push(u),j2++}}})},`setupDoc`),M2=p((e,t=s2)=>{let n=t;if(e.doc)for(let t of e.doc)t.stmt===`dir`&&(n=t.value);return n},`getDir`),p(i2,`insertOrUpdateNode`),p(sut,`getClassesFromDbInfo`),p(cut,`getStylesFromDbInfo`),N2=p((e,t,n,r,i,a,o,s)=>{let l=t.id,u=n.get(l),d=sut(u),f=cut(u),p=Z();if(y.info(`dataFetcher parsedItem`,t,u,f),l!==`root`){let n=y2;t.start===!0?n=put:t.start===!1&&(n=mut),t.type!==f2&&(n=t.type),A2.get(l)||A2.set(l,{id:l,shape:n,description:Ds.sanitizeText(l,p),cssClasses:`${d} ${_ut}`,cssStyles:f});let u=A2.get(l);t.description&&(Array.isArray(u.description)?(u.shape=b2,u.description.push(t.description)):u.description?.length&&u.description.length>0?(u.shape=b2,u.description=u.description===l?[t.description]:[u.description,t.description]):(u.shape=y2,u.description=t.description),u.description=Ds.sanitizeTextOrArray(u.description,p)),u.description?.length===1&&u.shape===b2&&(u.shape=u.type===`group`?S2:y2),!u.type&&t.doc&&(y.info(`Setting cluster for XCX`,l,M2(t)),u.type=`group`,u.isGroup=!0,u.dir=M2(t),u.shape=t.type===p2?x2:S2,u.cssClasses=`${u.cssClasses} ${xut} ${a?Sut:``}`);let m={labelStyle:``,shape:u.shape,label:u.description,cssClasses:u.cssClasses,cssCompiledStyles:[],cssStyles:u.cssStyles,id:l,dir:u.dir,domId:r2(l,j2),type:u.type,isGroup:u.type===`group`,padding:8,rx:10,ry:10,look:o,labelType:`markdown`};if(m.shape===x2&&(m.label=``),e&&e.id!==`root`&&(y.trace(`Setting node `,l,` to be child of its parent `,e.id),m.parentId=e.id),m.centerLabel=!0,t.note){let e={labelStyle:``,shape:hut,label:t.note.text,labelType:`markdown`,cssClasses:but,cssStyles:[],cssCompiledStyles:[],id:l+wut+`-`+j2,domId:r2(l,j2,E2),type:u.type,isGroup:u.type===`group`,padding:p.flowchart?.padding,look:o,position:t.note.position},n=l+O2,a={labelStyle:``,shape:gut,label:t.note.text,cssClasses:u.cssClasses,cssStyles:[],id:l+O2,domId:r2(l,j2,T2),type:`group`,isGroup:!0,padding:16,look:o,position:t.note.position};j2++,a.id=n,e.parentId=n,i2(r,a,s),i2(r,e,s),i2(r,m,s);let d=l,f=e.id;t.note.position===`left of`&&(d=e.id,f=l),i.push({id:d+`-`+f,start:d,end:f,arrowhead:`none`,arrowTypeEnd:``,style:m2,labelStyle:``,classes:yut,arrowheadStyle:h2,labelpos:g2,labelType:_2,thickness:v2,look:o})}else i2(r,m,s)}t.doc&&(y.trace(`Adding nodes children `),Eut(t,t.doc,n,r,i,!a,o,s))},`dataFetcher`),Dut=p(()=>{A2.clear(),j2=0},`reset`),P2={START_NODE:`[*]`,START_TYPE:`start`,END_NODE:`[*]`,END_TYPE:`end`,COLOR_KEYWORD:`color`,FILL_KEYWORD:`fill`,BG_FILL:`bgFill`,STYLECLASS_SEP:`,`},F2=p(()=>new Map,`newClassesList`),I2=p(()=>({relations:[],states:new Map,documents:{}}),`newDoc`),L2=p(e=>JSON.parse(JSON.stringify(e)),`clone`),R2=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=F2(),this.documents={root:I2()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.funs=[],this.getAccTitle=Rs,this.setAccTitle=Ls,this.getAccDescription=Bs,this.setAccDescription=zs,this.setDiagramTitle=Vs,this.getDiagramTitle=Hs,this.clear(),this.setRootDoc=this.setRootDoc.bind(this),this.getDividerId=this.getDividerId.bind(this),this.setDirection=this.setDirection.bind(this),this.trimColon=this.trimColon.bind(this),this.bindFunctions=this.bindFunctions.bind(this)}static{p(this,`StateDB`)}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(e){this.clear(!0);for(let t of Array.isArray(e)?e:e.doc)switch(t.stmt){case l2:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case d2:this.addRelation(t.state1,t.state2,t.description);break;case uut:this.addStyleClass(t.id.trim(),t.classes);break;case dut:this.handleStyleDef(t);break;case fut:this.setCssClass(t.id.trim(),t.styleClass);break;case`click`:this.addLink(t.id,t.url,t.tooltip)}let t=this.getStates(),n=Z();Dut(),N2(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(let e of this.nodes)if(Array.isArray(e.label)){if(e.description=e.label.slice(1),e.isGroup&&e.description.length>0)throw Error(`Group nodes can only have label. Remove the additional description for node [${e.id}]`);e.label=e.label[0]}}handleStyleDef(e){let t=e.id.trim().split(`,`),n=e.styleClass.split(`,`);for(let e of t){let t=this.getState(e);if(!t){let n=e.trim();this.addState(n),t=this.getState(n)}t&&(t.styles=n.map(e=>e.replace(/;/g,``)?.trim()))}}setRootDoc(e){y.info(`Setting root doc`,e),this.rootDoc=e,this.version===1?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(e,t,n){if(t.stmt===d2){this.docTranslator(e,t.state1,!0),this.docTranslator(e,t.state2,!1);return}if(t.stmt===l2&&(t.id===P2.START_NODE?(t.id=e.id+(n?`_start`:`_end`),t.start=n):t.id=t.id.trim()),t.stmt!==u2&&t.stmt!==l2||!t.doc)return;let r=[],i=[];for(let e of t.doc)if(e.type===p2){let t=L2(e);t.doc=L2(i),r.push(t),i=[]}else i.push(e);if(r.length>0&&i.length>0){let e={stmt:l2,id:Lp(),type:`divider`,doc:L2(i)};r.push(L2(e)),t.doc=r}t.doc.forEach(e=>this.docTranslator(t,e,!0))}getRootDocV2(){return this.docTranslator({id:u2,stmt:u2},{id:u2,stmt:u2,doc:this.rootDoc},!0),{id:u2,doc:this.rootDoc}}addState(e,t=f2,n=void 0,r=void 0,i=void 0,a=void 0,o=void 0,s=void 0){let l=e?.trim();if(!this.currentDocument.states.has(l))y.info(`Adding state `,l,r),this.currentDocument.states.set(l,{stmt:l2,id:l,descriptions:[],type:t,doc:n,note:i,classes:[],styles:[],textStyles:[]});else{let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.doc||=n,e.type||=t}if(r&&(y.info(`Setting state description`,l,r),(Array.isArray(r)?r:[r]).forEach(e=>this.addDescription(l,e.trim()))),i){let e=this.currentDocument.states.get(l);if(!e)throw Error(`State not found: ${l}`);e.note=i,e.note.text=Ds.sanitizeText(e.note.text,Z())}a&&(y.info(`Setting state classes`,l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),o&&(y.info(`Setting state styles`,l,o),(Array.isArray(o)?o:[o]).forEach(e=>this.setStyle(l,e.trim()))),s&&(y.info(`Setting state styles`,l,o),(Array.isArray(s)?s:[s]).forEach(e=>this.setTextStyle(l,e.trim())))}clear(e){this.nodes=[],this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.documents={root:I2()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=F2(),e||(this.links=new Map,Is())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){y.info(`Documents = `,this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,n){this.links.set(e,{url:t,tooltip:n}),y.warn(`Adding link`,e,t,n)}getLinks(){return this.links}startIdIfNeeded(e=``){return e===P2.START_NODE?(this.startEndCount++,`${P2.START_TYPE}${this.startEndCount}`):e}startTypeIfNeeded(e=``,t=f2){return e===P2.START_NODE?P2.START_TYPE:t}endIdIfNeeded(e=``){return e===P2.END_NODE?(this.startEndCount++,`${P2.END_TYPE}${this.startEndCount}`):e}endTypeIfNeeded(e=``,t=f2){return e===P2.END_NODE?P2.END_TYPE:t}addRelationObjs(e,t,n=``){let r=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),o=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(r,i,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.addState(a,o,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:Ds.sanitizeText(n,Z())})}addRelation(e,t,n){if(typeof e==`object`&&typeof t==`object`)this.addRelationObjs(e,t,n);else if(typeof e==`string`&&typeof t==`string`){let r=this.startIdIfNeeded(e.trim()),i=this.startTypeIfNeeded(e),a=this.endIdIfNeeded(t.trim()),o=this.endTypeIfNeeded(t);this.addState(r,i),this.addState(a,o),this.currentDocument.relations.push({id1:r,id2:a,relationTitle:n?Ds.sanitizeText(n,Z()):void 0})}}addDescription(e,t){let n=this.currentDocument.states.get(e),r=t.startsWith(`:`)?t.replace(`:`,``).trim():t;n?.descriptions?.push(Ds.sanitizeText(r,Z()))}cleanupLabel(e){return e.startsWith(`:`)?e.slice(2).trim():e.trim()}getDividerId(){return this.dividerCnt++,`divider-id-${this.dividerCnt}`}addStyleClass(e,t=``){this.classes.has(e)||this.classes.set(e,{id:e,styles:[],textStyles:[]});let n=this.classes.get(e);t&&n&&t.split(P2.STYLECLASS_SEP).forEach(e=>{let t=e.replace(/([^;]*);/,`$1`).trim();if(RegExp(P2.COLOR_KEYWORD).exec(e)){let e=t.replace(P2.FILL_KEYWORD,P2.BG_FILL).replace(P2.COLOR_KEYWORD,P2.FILL_KEYWORD);n.textStyles.push(e)}n.styles.push(t)})}getClasses(){return this.classes}setupToolTips(e){let t=yP();Ac(e).select(`svg`).selectAll(`g.node, g.rough-node`).on(`mouseover`,e=>{let n=Ac(e.currentTarget),r=n.attr(`title`);if(r===null)return;let i=e.currentTarget?.getBoundingClientRect();t.transition().duration(200).style(`opacity`,`.9`),t.style(`left`,window.scrollX+i.left+(i.right-i.left)/2+`px`).style(`top`,window.scrollY+i.bottom+`px`),t.html(Ht.sanitize(r)),n.classed(`hover`,!0)}).on(`mouseout`,e=>{t.transition().duration(500).style(`opacity`,0),Ac(e.currentTarget).classed(`hover`,!1)})}setCssClass(e,t){e.split(`,`).forEach(e=>{let n=this.getState(e);if(!n){let t=e.trim();this.addState(t),n=this.getState(t)}n?.classes?.push(t)})}setStyle(e,t){this.getState(e)?.styles?.push(t)}setTextStyle(e,t){this.getState(e)?.textStyles?.push(t)}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirectionStatement(){return this.rootDoc.find(e=>e.stmt===c2)}getDirection(){return this.getDirectionStatement()?.value??lut}setDirection(e){let t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:c2,value:e})}trimColon(e){return e.startsWith(`:`)?e.slice(1).trim():e.trim()}getData(){let e=Z();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:k2(this.getRootDocV2())}}getConfig(){return Z().state}},z2=p(e=>`2271-defs [id$="-barbEnd"] {2272- fill: ${e.transitionColor};2273- stroke: ${e.transitionColor};2274- }2275-g.stateGroup text {2276- fill: ${e.nodeBorder};2277- stroke: none;2278- font-size: 10px;2279-}2280-g.stateGroup text {2281- fill: ${e.textColor};2282- stroke: none;2283- font-size: 10px;2284-2285-}2286-g.stateGroup .state-title {2287- font-weight: bolder;2288- fill: ${e.stateLabelColor};2289-}2290-2291-g.stateGroup rect {2292- fill: ${e.mainBkg};2293- stroke: ${e.nodeBorder};2294-}2295-2296-g.stateGroup line {2297- stroke: ${e.lineColor};2298- stroke-width: ${e.strokeWidth||1};2299-}2300-2301-.transition {2302- stroke: ${e.transitionColor};2303- stroke-width: ${e.strokeWidth||1};2304- fill: none;2305-}2306-2307-.stateGroup .composit {2308- fill: ${e.background};2309- border-bottom: 1px2310-}2311-2312-.stateGroup .alt-composit {2313- fill: #e0e0e0;2314- border-bottom: 1px2315-}2316-2317-.state-note {2318- stroke: ${e.noteBorderColor};2319- fill: ${e.noteBkgColor};2320-2321- text {2322- fill: ${e.noteTextColor};2323- stroke: none;2324- font-size: 10px;2325- }2326-}2327-2328-.stateLabel .box {2329- stroke: none;2330- stroke-width: 0;2331- fill: ${e.mainBkg};2332- opacity: 0.5;2333-}2334-2335-.edgeLabel .label rect {2336- fill: ${e.labelBackgroundColor};2337- opacity: 0.5;2338-}2339-.edgeLabel {2340- background-color: ${e.edgeLabelBackground};2341- p {2342- background-color: ${e.edgeLabelBackground};2343- }2344- rect {2345- opacity: 0.5;2346- background-color: ${e.edgeLabelBackground};2347- fill: ${e.edgeLabelBackground};2348- }2349- text-align: center;2350-}2351-.edgeLabel .label text {2352- fill: ${e.transitionLabelColor||e.tertiaryTextColor};2353-}2354-.label div .edgeLabel {2355- color: ${e.transitionLabelColor||e.tertiaryTextColor};2356-}2357-2358-.stateLabel text {2359- fill: ${e.stateLabelColor};2360- font-size: 10px;2361- font-weight: bold;2362-}2363-2364-.node circle.state-start {2365- fill: ${e.specialStateColor};2366- stroke: ${e.specialStateColor};2367-}2368-2369-.node .fork-join {2370- fill: ${e.specialStateColor};2371- stroke: ${e.specialStateColor};2372-}2373-2374-.node circle.state-end {2375- fill: ${e.innerEndBackground};2376- stroke: ${e.background};2377- stroke-width: 1.52378-}2379-.end-state-inner {2380- fill: ${e.compositeBackground||e.background};2381- // stroke: ${e.background};2382- stroke-width: 1.52383-}2384-2385-.node rect {2386- fill: ${e.stateBkg||e.mainBkg};2387- stroke: ${e.stateBorder||e.nodeBorder};2388- stroke-width: ${e.strokeWidth||1}px;2389-}2390-.node polygon {2391- fill: ${e.mainBkg};2392- stroke: ${e.stateBorder||e.nodeBorder};;2393- stroke-width: ${e.strokeWidth||1}px;2394-}2395-[id$="-barbEnd"] {2396- fill: ${e.lineColor};2397-}2398-2399-.statediagram-cluster rect {2400- fill: ${e.compositeTitleBackground};2401- stroke: ${e.stateBorder||e.nodeBorder};2402- stroke-width: ${e.strokeWidth||1}px;2403-}2404-2405-.cluster-label, .nodeLabel {2406- color: ${e.stateLabelColor};2407- // line-height: 1;2408-}2409-2410-.statediagram-cluster rect.outer {2411- rx: 5px;2412- ry: 5px;2413-}2414-.statediagram-state .divider {2415- stroke: ${e.stateBorder||e.nodeBorder};2416-}2417-2418-.statediagram-state .title-state {2419- rx: 5px;2420- ry: 5px;2421-}2422-.statediagram-cluster.statediagram-cluster .inner {2423- fill: ${e.compositeBackground||e.background};2424-}2425-.statediagram-cluster.statediagram-cluster-alt .inner {2426- fill: ${e.altBackground?e.altBackground:`#efefef`};2427-}2428-2429-.statediagram-cluster .inner {2430- rx:0;2431- ry:0;2432-}2433-2434-.statediagram-state rect.basic {2435- rx: 5px;2436- ry: 5px;2437-}2438-.statediagram-state rect.divider {2439- stroke-dasharray: 10,10;2440- fill: ${e.altBackground?e.altBackground:`#efefef`};2441-}2442-2443-.note-edge {2444- stroke-dasharray: 5;2445-}2446-2447-.statediagram-note rect {2448- fill: ${e.noteBkgColor};2449- stroke: ${e.noteBorderColor};2450- stroke-width: 1px;2451- rx: 0;2452- ry: 0;2453-}2454-.statediagram-note rect {2455- fill: ${e.noteBkgColor};2456- stroke: ${e.noteBorderColor};2457- stroke-width: 1px;2458- rx: 0;2459- ry: 0;2460-}2461-2462-.statediagram-note text {2463- fill: ${e.noteTextColor};2464-}2465-2466-.statediagram-note .nodeLabel {2467- color: ${e.noteTextColor};2468-}2469-.statediagram .edgeLabel {2470- color: red; // ${e.noteTextColor};2471-}2472-2473-[id$="-dependencyStart"], [id$="-dependencyEnd"] {2474- fill: ${e.lineColor};2475- stroke: ${e.lineColor};2476- stroke-width: ${e.strokeWidth||1};2477-}2478-2479-.statediagramTitleText {2480- text-anchor: middle;2481- font-size: 18px;2482- fill: ${e.textColor};2483-}2484-2485-[data-look="neo"].statediagram-cluster rect {2486- fill: ${e.mainBkg};2487- stroke: ${e.useGradient?`url(`+e.svgId+`-gradient)`:e.stateBorder||e.nodeBorder};2488- stroke-width: ${e.strokeWidth??1};2489-}2490-[data-look="neo"].statediagram-cluster rect.outer {2491- rx: ${e.radius}px;2492- ry: ${e.radius}px;2493- filter: ${e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${e.svgId}-drop-shadow)`):`none`}2494-}2495-`,`getStyles`)})),kut=l({diagram:()=>Wut}),Aut,jut,Mut,Nut,Put,Fut,Iut,Lut,Rut,B2,V2,zut,H2,U2,But,Vut,Hut,Uut,W2,Wut,Gut=o((()=>{Out(),lF(),dF(),UN(),bP(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),hf(),qNe(),ax(),Aut=p(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,Z().state.sizeUnit).attr(`cx`,Z().state.padding+Z().state.sizeUnit).attr(`cy`,Z().state.padding+Z().state.sizeUnit),`drawStartState`),jut=p(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,Z().state.textHeight).attr(`class`,`divider`).attr(`x2`,Z().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),Mut=p((e,t)=>{let n=e.append(`text`).attr(`x`,2*Z().state.padding).attr(`y`,Z().state.textHeight+2*Z().state.padding).attr(`font-size`,Z().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,Z().state.padding).attr(`y`,Z().state.padding).attr(`width`,r.width+2*Z().state.padding).attr(`height`,r.height+2*Z().state.padding).attr(`rx`,Z().state.radius),n},`drawSimpleState`),Nut=p((e,t)=>{let n=p(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*Z().state.padding).text(t);n||r.attr(`dy`,Z().state.textHeight)},`addTspan`),r=e.append(`text`).attr(`x`,2*Z().state.padding).attr(`y`,Z().state.textHeight+1.3*Z().state.padding).attr(`font-size`,Z().state.fontSize).attr(`class`,`state-title`).text(t.descriptions[0]).node().getBBox(),i=r.height,a=e.append(`text`).attr(`x`,Z().state.padding).attr(`y`,i+Z().state.padding*.4+Z().state.dividerMargin+Z().state.textHeight).attr(`class`,`state-description`),o=!0,s=!0;t.descriptions.forEach(function(e){o||(n(a,e,s),s=!1),o=!1});let l=e.append(`line`).attr(`x1`,Z().state.padding).attr(`y1`,Z().state.padding+i+Z().state.dividerMargin/2).attr(`y2`,Z().state.padding+i+Z().state.dividerMargin/2).attr(`class`,`descr-divider`),u=a.node().getBBox(),d=Math.max(u.width,r.width);return l.attr(`x2`,d+3*Z().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,Z().state.padding).attr(`y`,Z().state.padding).attr(`width`,d+2*Z().state.padding).attr(`height`,u.height+i+2*Z().state.padding).attr(`rx`,Z().state.radius),e},`drawDescrState`),Put=p((e,t,n)=>{let r=Z().state.padding,i=2*Z().state.padding,a=e.node().getBBox(),o=a.width,s=a.x,l=e.append(`text`).attr(`x`,0).attr(`y`,Z().state.titleShift).attr(`font-size`,Z().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+i,d=Math.max(u,o);d===o&&(d+=i);let f,p=e.node().getBBox();t.doc,f=s-r,u>o&&(f=(o-d)/2+r),Math.abs(s-p.x)<r&&u>o&&(f=s-(u-o)/2);let m=1-Z().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+Z().state.textHeight+Z().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=o&&l.attr(`x`,s+(d-i)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,Z().state.titleShift-Z().state.textHeight-Z().state.padding).attr(`width`,d).attr(`height`,Z().state.textHeight*3).attr(`rx`,Z().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,Z().state.titleShift-Z().state.textHeight-Z().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*Z().state.textHeight).attr(`rx`,Z().state.radius),e},`addTitleAndBox`),Fut=p(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,Z().state.sizeUnit+Z().state.miniPadding).attr(`cx`,Z().state.padding+Z().state.sizeUnit+Z().state.miniPadding).attr(`cy`,Z().state.padding+Z().state.sizeUnit+Z().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,Z().state.sizeUnit).attr(`cx`,Z().state.padding+Z().state.sizeUnit+2).attr(`cy`,Z().state.padding+Z().state.sizeUnit+2)),`drawEndState`),Iut=p((e,t)=>{let n=Z().state.forkWidth,r=Z().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,Z().state.padding).attr(`y`,Z().state.padding)},`drawForkJoinState`),Lut=p((e,t,n,r)=>{let i=0,a=r.append(`text`);a.style(`text-anchor`,`start`),a.attr(`class`,`noteText`);let o=e.replace(/\r\n/g,`<br/>`);o=o.replace(/\n/g,`<br/>`);let s=o.split(Ds.lineBreakRegex),l=1.25*Z().state.noteMargin;for(let e of s){let r=e.trim();if(r.length>0){let e=a.append(`tspan`);if(e.text(r),l===0){let t=e.node().getBBox();l+=t.height}i+=l,e.attr(`x`,t+Z().state.noteMargin),e.attr(`y`,n+i+1.25*Z().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},`_drawLongText`),Rut=p((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,Z().state.padding),{textWidth:r,textHeight:i}=Lut(e,0,0,t.append(`g`));return n.attr(`height`,i+2*Z().state.noteMargin),n.attr(`width`,r+Z().state.noteMargin*2),n},`drawNote`),B2=p(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},i=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&Aut(i),t.type===`end`&&Fut(i),(t.type===`fork`||t.type===`join`)&&Iut(i,t),t.type===`note`&&Rut(t.note.text,i),t.type===`divider`&&jut(i),t.type==="default"&&t.descriptions.length===0&&Mut(i,t),t.type==="default"&&t.descriptions.length>0&&Nut(i,t);let a=i.node().getBBox();return r.width=a.width+2*Z().state.padding,r.height=a.height+2*Z().state.padding,r},`drawState`),V2=0,zut=p(function(e,t,n){let r=p(function(e){switch(e){case R2.relationType.AGGREGATION:return`aggregation`;case R2.relationType.EXTENSION:return`extension`;case R2.relationType.COMPOSITION:return`composition`;case R2.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);t.points=t.points.filter(e=>!Number.isNaN(e.y));let i=t.points,a=qd().x(function(e){return e.x}).y(function(e){return e.y}).curve($d),o=e.append(`path`).attr(`d`,a(i)).attr(`id`,`edge`+V2).attr(`class`,`transition`),s=``;if(Z().state.arrowMarkerAbsolute&&(s=ys(!0)),o.attr(`marker-end`,`url(`+s+`#`+r(R2.relationType.DEPENDENCY)+`End)`),n.title!==void 0){let r=e.append(`g`).attr(`class`,`stateLabel`),{x:i,y:a}=Up.calcLabelPosition(t.points),o=Ds.getRows(n.title),s=0,l=[],u=0,d=0;for(let e=0;e<=o.length;e++){let t=r.append(`text`).attr(`text-anchor`,`middle`).text(o[e]).attr(`x`,i).attr(`y`,a+s),n=t.node().getBBox();u=Math.max(u,n.width),d=Math.min(d,n.x),y.info(n.x,i,a+s),s===0&&(s=t.node().getBBox().height,y.info(`Title height`,s,a)),l.push(t)}let f=s*o.length;if(o.length>1){let e=(o.length-1)*s*.5;l.forEach((t,n)=>t.attr(`y`,a+n*s-e)),f=s*o.length}let p=r.node().getBBox();r.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,i-u/2-Z().state.padding/2).attr(`y`,a-f/2-Z().state.padding/2-3.5).attr(`width`,u+Z().state.padding).attr(`height`,f+Z().state.padding),y.info(p)}V2++},`drawEdge`),U2={},But=p(function(){},`setConf`),Vut=p(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),Hut=p(function(e,t,n,r){H2=Z().state;let i=Z().securityLevel,a;i===`sandbox`&&(a=Ac(`#i`+t));let o=Ac(i===`sandbox`?a.nodes()[0].contentDocument.body:`body`),s=i===`sandbox`?a.nodes()[0].contentDocument:document;y.debug(`Rendering diagram `+e);let l=o.select(`[id='${t}']`);Vut(l),W2(r.db.getRootDoc(),l.append(`g`).attr(`id`,t+`-root`),void 0,!1,o,s,r);let u=H2.padding,d=l.node().getBBox(),f=d.width+u*2,p=d.height+u*2,m=f*1.75;Os(l,p,m,H2.useMaxWidth),l.attr(`viewBox`,`${d.x-H2.padding} ${d.y-H2.padding} `+f+` `+p)},`draw`),Uut=p(e=>e?e.length*H2.fontSizeFactor:1,`getLabelWidth`),W2=p((e,t,n,r,i,a,o)=>{let s=new ix({compound:!0,multigraph:!0}),l,u=!0;for(l=0;l<e.length;l++)if(e[l].stmt===`relation`){u=!1;break}n?s.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:u?1:H2.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):s.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:u?1:H2.edgeLengthFactor,nodeSep:u?1:50,ranker:`tight-tree`,isMultiGraph:!0}),s.setDefaultEdgeLabel(function(){return{}});let d=o.db.getStates(),f=o.db.getRelations(),p=Object.keys(d);for(let e of p){let l=d[e];n&&(l.parentId=n);let u;if(l.doc){let e=t.append(`g`).attr(`id`,l.id).attr(`class`,`stateGroup`);u=W2(l.doc,e,l.id,!r,i,a,o);{e=Put(e,l,r);let t=e.node().getBBox();u.width=t.width,u.height=t.height+H2.padding/2,U2[l.id]={y:H2.compositTitleSize}}}else u=B2(t,l,s);if(l.note){let e=B2(t,{descriptions:[],id:l.id+`-note`,note:l.note,type:`note`},s);l.note.position===`left of`?(s.setNode(u.id+`-note`,e),s.setNode(u.id,u)):(s.setNode(u.id,u),s.setNode(u.id+`-note`,e)),s.setParent(u.id,u.id+`-group`),s.setParent(u.id+`-note`,u.id+`-group`)}else s.setNode(u.id,u)}y.debug(`Count=`,s.nodeCount(),s);let m=0;f.forEach(function(e){m++,y.debug(`Setting edge`,e),s.setEdge(e.id1,e.id2,{relation:e,width:Uut(e.title),height:H2.labelHeight*Ds.getRows(e.title).length,labelpos:`c`},`id`+m)}),SNe(s),y.debug(`Graph after layout`,s.nodes());let h=t.node();s.nodes().forEach(function(e){e!==void 0&&s.node(e)!==void 0?(y.warn(`Node `+e+`: `+JSON.stringify(s.node(e))),i.select(`#`+h.id+` #`+e).attr(`transform`,`translate(`+(s.node(e).x-s.node(e).width/2)+`,`+(s.node(e).y+(U2[e]?U2[e].y:0)-s.node(e).height/2)+` )`),i.select(`#`+h.id+` #`+e).attr(`data-x-shift`,s.node(e).x-s.node(e).width/2),a.querySelectorAll(`#`+h.id+` #`+e+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):y.debug(`No Node `+e+`: `+JSON.stringify(s.node(e)))});let g=h.getBBox();s.edges().forEach(function(e){e!==void 0&&s.edge(e)!==void 0&&(y.debug(`Edge `+e.v+` -> `+e.w+`: `+JSON.stringify(s.edge(e))),zut(t,s.edge(e),s.edge(e).relation))}),g=h.getBBox();let _={id:n||`root`,label:n||`root`,width:0,height:0};return _.width=g.width+2*H2.padding,_.height=g.height+2*H2.padding,y.debug(`Doc rendered`,_,s),_},`renderDoc`),Wut={parser:o2,get db(){return new R2(1)},renderer:{setConf:But,draw:Hut},styles:z2,init:p(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}})),Kut=l({diagram:()=>qut}),qut,Jut=o((()=>{Out(),lF(),dF(),UN(),bP(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),qut={parser:o2,get db(){return new R2(2)},renderer:Tut,styles:z2,init:p(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)}})),Yut=l({diagram:()=>mdt});function Xut(e){let t=Z().journey,n=t.maxLabelWidth;a4=0;let r=60;Object.keys(i4).forEach(i=>{let a=i4[i].color,o={cx:20,cy:r,r:7,fill:a,stroke:`#000`,pos:i4[i].position};r4.drawCircle(e,o);let s=e.append(`text`).attr(`visibility`,`hidden`).text(i),l=s.node().getBoundingClientRect().width;s.remove();let u=[];if(l<=n)u=[i];else{let t=i.split(` `),r=``;s=e.append(`text`).attr(`visibility`,`hidden`),t.forEach(e=>{let t=r?`${r} ${e}`:e;if(s.text(t),s.node().getBoundingClientRect().width>n){if(r&&u.push(r),r=e,s.text(e),s.node().getBoundingClientRect().width>n){let t=``;for(let r of e)t+=r,s.text(t+`-`),s.node().getBoundingClientRect().width>n&&(u.push(t.slice(0,-1)+`-`),t=r);r=t}}else r=t}),r&&u.push(r),s.remove()}u.forEach((n,i)=>{let a={x:40,y:r+7+i*20,fill:`#666`,text:n,textMargin:t.boxTextMargin??5},o=r4.drawText(e,a).node().getBoundingClientRect().width;o>a4&&o>t.leftMargin-o&&(a4=o)}),r+=Math.max(20,u.length*20)})}var G2,Zut,K2,q2,J2,Y2,Qut,$ut,edt,tdt,ndt,rdt,idt,X2,Z2,adt,Q2,odt,$2,e4,sdt,cdt,t4,ldt,udt,n4,r4,ddt,i4,a4,o4,s4,fdt,c4,l4,u4,pdt,d4,mdt,hdt=o((()=>{sF(),bP(),Zs(),S(),h(),hf(),G2=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,8,10,11,12,14,16,17,18],n=[1,9],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,14],l={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:`error`,4:`journey`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,11:`title`,12:`acc_title`,13:`acc_title_value`,14:`acc_descr`,15:`acc_descr_value`,16:`acc_descr_multiline_value`,17:`section`,18:`taskName`,19:`taskData`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 9:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 10:case 11:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$=`task`}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:r,14:i,16:a,17:o,18:s},e(t,[2,7],{1:[2,1]}),e(t,[2,3]),{9:15,11:n,12:r,14:i,16:a,17:o,18:s},e(t,[2,5]),e(t,[2,6]),e(t,[2,8]),{13:[1,16]},{15:[1,17]},e(t,[2,11]),e(t,[2,12]),{19:[1,18]},e(t,[2,4]),e(t,[2,9]),e(t,[2,10]),e(t,[2,13])],defaultActions:{},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2496-`+g.showPosition()+`2497-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};l.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2498-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2499-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2500-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 10;case 3:break;case 4:break;case 5:return 4;case 6:return 11;case 7:return this.begin(`acc_title`),12;case 8:return this.popState(),`acc_title_value`;case 9:return this.begin(`acc_descr`),14;case 10:return this.popState(),`acc_descr_value`;case 11:this.begin(`acc_descr_multiline`);break;case 12:this.popState();break;case 13:return`acc_descr_multiline_value`;case 14:return 17;case 15:return 18;case 16:return 19;case 17:return`:`;case 18:return 6;case 19:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18,19],inclusive:!0}}}})();function u(){this.yy={}}return p(u,`Parser`),u.prototype=l,l.Parser=u,new u})(),G2.parser=G2,Zut=G2,K2=``,q2=[],J2=[],Y2=[],Qut=p(function(){q2.length=0,J2.length=0,K2=``,Y2.length=0,Is()},`clear`),$ut=p(function(e){K2=e,q2.push(e)},`addSection`),edt=p(function(){return q2},`getSections`),tdt=p(function(){let e=X2(),t=0;for(;!e&&t<100;)e=X2(),t++;return J2.push(...Y2),J2},`getTasks`),ndt=p(function(){let e=[];return J2.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},`updateActors`),rdt=p(function(e,t){let n=t.substr(1).split(`:`),r=0,i=[];n.length===1?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(`,`));let a=i.map(e=>e.trim()),o={section:K2,type:K2,people:a,task:e,score:r};Y2.push(o)},`addTask`),idt=p(function(e){let t={section:K2,type:K2,description:e,task:e,classes:[]};J2.push(t)},`addTaskOrg`),X2=p(function(){let e=p(function(e){return Y2[e].processed},`compileTask`),t=!0;for(let[n,r]of Y2.entries())e(n),t&&=r.processed;return t},`compileTasks`),Z2={getConfig:p(()=>Z().journey,`getConfig`),clear:Qut,setDiagramTitle:Vs,getDiagramTitle:Hs,setAccTitle:Ls,getAccTitle:Rs,setAccDescription:zs,getAccDescription:Bs,addSection:$ut,getSections:edt,getTasks:tdt,addTask:rdt,addTaskOrg:idt,getActors:p(function(){return ndt()},`getActors`)},adt=p(e=>`.label {2501- font-family: ${e.fontFamily};2502- color: ${e.textColor};2503- }2504- .mouth {2505- stroke: #666;2506- }2507-2508- line {2509- stroke: ${e.textColor}2510- }2511-2512- .legend {2513- fill: ${e.textColor};2514- font-family: ${e.fontFamily};2515- }2516-2517- .label text {2518- fill: #333;2519- }2520- .label {2521- color: ${e.textColor}2522- }2523-2524- .face {2525- ${e.faceColor?`fill: ${e.faceColor}`:`fill: #FFF8DC`};2526- stroke: #999;2527- }2528-2529- .node rect,2530- .node circle,2531- .node ellipse,2532- .node polygon,2533- .node path {2534- fill: ${e.mainBkg};2535- stroke: ${e.nodeBorder};2536- stroke-width: 1px;2537- }2538-2539- .node .label {2540- text-align: center;2541- }2542- .node.clickable {2543- cursor: pointer;2544- }2545-2546- .arrowheadPath {2547- fill: ${e.arrowheadColor};2548- }2549-2550- .edgePath .path {2551- stroke: ${e.lineColor};2552- stroke-width: 1.5px;2553- }2554-2555- .flowchart-link {2556- stroke: ${e.lineColor};2557- fill: none;2558- }2559-2560- .edgeLabel {2561- background-color: ${e.edgeLabelBackground};2562- rect {2563- opacity: 0.5;2564- }2565- text-align: center;2566- }2567-2568- .cluster rect {2569- }2570-2571- .cluster text {2572- fill: ${e.titleColor};2573- }2574-2575- div.mermaidTooltip {2576- position: absolute;2577- text-align: center;2578- max-width: 200px;2579- padding: 2px;2580- font-family: ${e.fontFamily};2581- font-size: 12px;2582- background: ${e.tertiaryColor};2583- border: 1px solid ${e.border2};2584- border-radius: 2px;2585- pointer-events: none;2586- z-index: 100;2587- }2588-2589- .task-type-0, .section-type-0 {2590- ${e.fillType0?`fill: ${e.fillType0}`:``};2591- }2592- .task-type-1, .section-type-1 {2593- ${e.fillType0?`fill: ${e.fillType1}`:``};2594- }2595- .task-type-2, .section-type-2 {2596- ${e.fillType0?`fill: ${e.fillType2}`:``};2597- }2598- .task-type-3, .section-type-3 {2599- ${e.fillType0?`fill: ${e.fillType3}`:``};2600- }2601- .task-type-4, .section-type-4 {2602- ${e.fillType0?`fill: ${e.fillType4}`:``};2603- }2604- .task-type-5, .section-type-5 {2605- ${e.fillType0?`fill: ${e.fillType5}`:``};2606- }2607- .task-type-6, .section-type-6 {2608- ${e.fillType0?`fill: ${e.fillType6}`:``};2609- }2610- .task-type-7, .section-type-7 {2611- ${e.fillType0?`fill: ${e.fillType7}`:``};2612- }2613-2614- .actor-0 {2615- ${e.actor0?`fill: ${e.actor0}`:``};2616- }2617- .actor-1 {2618- ${e.actor1?`fill: ${e.actor1}`:``};2619- }2620- .actor-2 {2621- ${e.actor2?`fill: ${e.actor2}`:``};2622- }2623- .actor-3 {2624- ${e.actor3?`fill: ${e.actor3}`:``};2625- }2626- .actor-4 {2627- ${e.actor4?`fill: ${e.actor4}`:``};2628- }2629- .actor-5 {2630- ${e.actor5?`fill: ${e.actor5}`:``};2631- }2632- ${oF()}2633-`,`getStyles`),Q2=p(function(e,t){return pP(e,t)},`drawRect`),odt=p(function(e,t){let n=e.append(`circle`).attr(`cx`,t.cx).attr(`cy`,t.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),r=e.append(`g`);r.append(`circle`).attr(`cx`,t.cx-5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),r.append(`circle`).attr(`cx`,t.cx+5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function i(e){let n=Wd().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+2)+`)`)}p(i,`smile`);function a(e){let n=Wd().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+7)+`)`)}p(a,`sad`);function o(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,t.cx-5).attr(`y1`,t.cy+7).attr(`x2`,t.cx+5).attr(`y2`,t.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return p(o,`ambivalent`),t.score>3?i(r):t.score<3?a(r):o(r),n},`drawFace`),$2=p(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),e4=p(function(e,t){return XWe(e,t)},`drawText`),sdt=p(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}p(n,`genPoints`);let r=e.append(`polygon`);r.attr(`points`,n(t.x,t.y,50,20,7)),r.attr(`class`,`labelBox`),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,e4(e,t)},`drawLabel`),cdt=p(function(e,t,n){let r=e.append(`g`),i=_P();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width*t.taskCount+n.diagramMarginX*(t.taskCount-1),i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,Q2(r,i),n4(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),t4=-1,ldt=p(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);t4++,a.append(`line`).attr(`id`,r+`-task`+t4).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),odt(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=_P();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,Q2(a,o);let s=t.x+14;t.people.forEach(e=>{let n=t.actors[e].color,r={cx:s,cy:t.y,r:7,fill:n,stroke:`#000`,title:e,pos:t.actors[e].position};$2(a,r),s+=10}),n4(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),udt=p(function(e,t){mP(e,t)},`drawBackgroundRect`),n4=(function(){function e(e,t,n,i,a,o,s,l){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`font-color`,l).style(`text-anchor`,`middle`).text(e),s)}p(e,`byText`);function t(e,t,n,i,a,o,s,l,u){let{taskFontSize:d,taskFontFamily:f}=l,p=e.split(/<br\s*\/?>/gi);for(let e=0;e<p.length;e++){let l=e*d-d*(p.length-1)/2,m=t.append(`text`).attr(`x`,n+a/2).attr(`y`,i).attr(`fill`,u).style(`text-anchor`,`middle`).style(`font-size`,d).style(`font-family`,f);m.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,l).text(p[e]),m.attr(`y`,i+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),r(m,s)}}p(t,`byTspan`);function n(e,n,i,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,i,a,o,s,l,u),r(f,l)}p(n,`byFo`);function r(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return p(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),r4={drawRect:Q2,drawCircle:$2,drawSection:cdt,drawText:e4,drawLabel:sdt,drawTask:ldt,drawBackgroundRect:udt,initGraphics:p(function(e,t){t4=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`)},ddt=p(function(e){Object.keys(e).forEach(function(t){o4[t]=e[t]})},`setConf`),i4={},a4=0,p(Xut,`drawActorLegend`),o4=Z().journey,s4=0,fdt=p(function(e,t,n,r){let i=Z(),a=i.journey.titleColor,o=i.journey.titleFontSize,s=i.journey.titleFontFamily,l=i.securityLevel,u;l===`sandbox`&&(u=Ac(`#i`+t));let d=Ac(l===`sandbox`?u.nodes()[0].contentDocument.body:`body`);c4.init();let f=d.select(`#`+t);r4.initGraphics(f,t);let p=r.db.getTasks(),m=r.db.getDiagramTitle(),h=r.db.getActors();for(let e in i4)delete i4[e];let g=0;h.forEach(e=>{i4[e]={color:o4.actorColours[g%o4.actorColours.length],position:g},g++}),Xut(f),s4=o4.leftMargin+a4,c4.insert(0,0,s4,Object.keys(i4).length*50),pdt(f,p,0,t);let _=c4.getBounds();m&&f.append(`text`).text(m).attr(`x`,s4).attr(`font-size`,o).attr(`font-weight`,`bold`).attr(`y`,25).attr(`fill`,a).attr(`font-family`,s);let v=_.stopy-_.starty+2*o4.diagramMarginY,y=s4+_.stopx+2*o4.diagramMarginX;Os(f,v,y,o4.useMaxWidth),f.append(`line`).attr(`x1`,s4).attr(`y1`,o4.height*4).attr(`x2`,y-s4-4).attr(`y2`,o4.height*4).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#`+t+`-arrowhead)`);let b=m?70:0;f.attr(`viewBox`,`${_.startx} -25 ${y} ${v+b}`),f.attr(`preserveAspectRatio`,`xMinYMin meet`),f.attr(`height`,v+b+25)},`draw`),c4={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:p(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},`init`),updateVal:p(function(e,t,n,r){e[t]=e[t]===void 0?n:r(n,e[t])},`updateVal`),updateBounds:p(function(e,t,n,r){let i=Z().journey,a=this,o=0;function s(s){return p(function(l){o++;let u=a.sequenceItems.length-o+1;a.updateVal(l,`starty`,t-u*i.boxMargin,Math.min),a.updateVal(l,`stopy`,r+u*i.boxMargin,Math.max),a.updateVal(c4.data,`startx`,e-u*i.boxMargin,Math.min),a.updateVal(c4.data,`stopx`,n+u*i.boxMargin,Math.max),s!==`activation`&&(a.updateVal(l,`startx`,e-u*i.boxMargin,Math.min),a.updateVal(l,`stopx`,n+u*i.boxMargin,Math.max),a.updateVal(c4.data,`starty`,t-u*i.boxMargin,Math.min),a.updateVal(c4.data,`stopy`,r+u*i.boxMargin,Math.max))},`updateItemBounds`)}p(s,`updateFn`),this.sequenceItems.forEach(s())},`updateBounds`),insert:p(function(e,t,n,r){let i=Math.min(e,n),a=Math.max(e,n),o=Math.min(t,r),s=Math.max(t,r);this.updateVal(c4.data,`startx`,i,Math.min),this.updateVal(c4.data,`starty`,o,Math.min),this.updateVal(c4.data,`stopx`,a,Math.max),this.updateVal(c4.data,`stopy`,s,Math.max),this.updateBounds(i,o,a,s)},`insert`),bumpVerticalPos:p(function(e){this.verticalPos+=e,this.data.stopy=this.verticalPos},`bumpVerticalPos`),getVerticalPos:p(function(){return this.verticalPos},`getVerticalPos`),getBounds:p(function(){return this.data},`getBounds`)},l4=o4.sectionFills,u4=o4.sectionColours,pdt=p(function(e,t,n,r){let i=Z().journey,a=``,o=n+(i.height*2+i.diagramMarginY),s=0,l=`#CCC`,u=`black`,d=0;for(let[n,f]of t.entries()){if(a!==f.section){l=l4[s%l4.length],d=s%l4.length,u=u4[s%u4.length];let r=0,o=f.section;for(let e=n;e<t.length&&t[e].section==o;e++)r+=1;let p={x:n*i.taskMargin+n*i.width+s4,y:50,text:f.section,fill:l,num:d,colour:u,taskCount:r};r4.drawSection(e,p,i),a=f.section,s++}let p=f.people.reduce((e,t)=>(i4[t]&&(e[t]=i4[t]),e),{});f.x=n*i.taskMargin+n*i.width+s4,f.y=o,f.width=i.diagramMarginX,f.height=i.diagramMarginY,f.colour=u,f.fill=l,f.num=d,f.actors=p,r4.drawTask(e,f,i,r),c4.insert(f.x,f.y,f.x+f.width+i.taskMargin,450)}},`drawTasks`),d4={setConf:ddt,draw:fdt},mdt={parser:Zut,db:Z2,renderer:d4,styles:adt,init:p(e=>{d4.setConf(e.journey),Z2.clear()},`init`)}})),gdt=l({diagram:()=>Vdt});function f4(e,t){e.each(function(){var e=Ac(this),n=e.text().split(/(\s+|<br>)/).reverse(),r,i=[],a=1.1,o=e.attr(`y`),s=parseFloat(e.attr(`dy`)),l=e.text(null).append(`tspan`).attr(`x`,0).attr(`y`,o).attr(`dy`,s+`em`);for(let s=0;s<n.length;s++)r=n[n.length-1-s],i.push(r),l.text(i.join(` `).trim()),(l.node().getComputedTextLength()>t||r===`<br>`)&&(i.pop(),l.text(i.join(` `).trim()),i=r===`<br>`?[``]:[r],l=e.append(`tspan`).attr(`x`,0).attr(`y`,o).attr(`dy`,a+`em`).text(r))})}var p4,_dt,m4,h4,g4,_4,v4,y4,b4,x4,S4,C4,w4,T4,E4,D4,O4,k4,A4,j4,vdt,M4,N4,ydt,bdt,P4,xdt,Sdt,F4,Cdt,wdt,Tdt,I4,L4,Edt,Ddt,Odt,kdt,R4,Adt,z4,jdt,Mdt,B4,V4,Ndt,H4,Pdt,U4,Fdt,W4,G4,K4,q4,Idt,J4,Ldt,Rdt,zdt,Bdt,Vdt,Hdt=o((()=>{_f(),Kp(),Zs(),S(),h(),hf(),Ne(),p4=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],r=[1,13],i=[1,14],a=[1,15],o=[1,16],s=[1,19],l=[1,20],u={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:`error`,6:`EOF`,7:`timeline`,8:`timeline_lr`,9:`timeline_td`,11:`SPACE`,13:`NEWLINE`,14:`title`,15:`acc_title`,16:`acc_title_value`,17:`acc_descr`,18:`acc_descr_value`,19:`acc_descr_multiline_value`,20:`section`,23:`period`,24:`event`},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:r.setDirection(`LR`);break;case 4:r.setDirection(`TD`);break;case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:case 10:this.$=[];break;case 11:r.getCommonDb().setDiagramTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:this.$=a[s].trim(),r.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=a[s].trim(),r.getCommonDb().setAccDescription(this.$);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 18:r.addTask(a[s],0,``),this.$=a[s];break;case 19:r.addEvent(a[s].substr(2)),this.$=a[s]}},`anonymous`),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:r,17:i,19:a,20:o,21:17,22:18,23:s,24:l},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:r,17:i,19:a,20:o,21:17,22:18,23:s,24:l},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2634-`+g.showPosition()+`2635-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};u.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2636-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2637-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2638-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:break;case 1:break;case 2:return 13;case 3:break;case 4:break;case 5:return 8;case 6:return 9;case 7:return 7;case 8:return 14;case 9:return this.begin(`acc_title`),15;case 10:return this.popState(),`acc_title_value`;case 11:return this.begin(`acc_descr`),17;case 12:return this.popState(),`acc_descr_value`;case 13:this.begin(`acc_descr_multiline`);break;case 14:this.popState();break;case 15:return`acc_descr_multiline_value`;case 16:return 20;case 17:return 24;case 18:return 23;case 19:return 6;case 20:return`INVALID`}},`anonymous`),rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline[ \t]+LR\b)/i,/^(?:timeline[ \t]+TD\b)/i,/^(?:timeline\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^:\n]+)/i,/^(?::\s(?:[^:\n]|:(?!\s))+)/i,/^(?:[^#:\n]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[14,15],inclusive:!1},acc_descr:{rules:[12],inclusive:!1},acc_title:{rules:[10],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,11,13,16,17,18,19,20],inclusive:!0}}}})();function d(){this.yy={}}return p(d,`Parser`),d.prototype=u,u.Parser=d,new d})(),p4.parser=p4,_dt=p4,m4={},m(m4,{addEvent:()=>k4,addSection:()=>T4,addTask:()=>O4,addTaskOrg:()=>A4,clear:()=>S4,default:()=>vdt,getCommonDb:()=>x4,getDirection:()=>w4,getSections:()=>E4,getTasks:()=>D4,setDirection:()=>C4}),h4=``,g4=0,_4=`LR`,v4=[],y4=[],b4=[],x4=p(()=>js,`getCommonDb`),S4=p(function(){v4.length=0,y4.length=0,h4=``,b4.length=0,_4=`LR`,Is()},`clear`),C4=p(function(e){_4=e},`setDirection`),w4=p(function(){return _4},`getDirection`),T4=p(function(e){h4=e,v4.push(e)},`addSection`),E4=p(function(){return v4},`getSections`),D4=p(function(){let e=j4(),t=0;for(;!e&&t<100;)e=j4(),t++;return y4.push(...b4),y4},`getTasks`),O4=p(function(e,t,n){let r={id:g4++,section:h4,type:h4,task:e,score:t||0,events:n?[n]:[]};b4.push(r)},`addTask`),k4=p(function(e){b4.find(e=>e.id===g4-1).events.push(e)},`addEvent`),A4=p(function(e){let t={section:h4,type:h4,description:e,task:e,classes:[]};y4.push(t)},`addTaskOrg`),j4=p(function(){let e=p(function(e){return b4[e].processed},`compileTask`),t=!0;for(let[n,r]of b4.entries())e(n),t&&=r.processed;return t},`compileTasks`),vdt={clear:S4,getCommonDb:x4,getDirection:w4,setDirection:C4,addSection:T4,getSections:E4,getTasks:D4,addTask:O4,addTaskOrg:A4,addEvent:k4},M4=0,N4=p(function(e,t){let n=e.append(`rect`);return n.attr(`x`,t.x),n.attr(`y`,t.y),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`width`,t.width),n.attr(`height`,t.height),n.attr(`rx`,t.rx),n.attr(`ry`,t.ry),t.class!==void 0&&n.attr(`class`,t.class),n},`drawRect`),ydt=p(function(e,t){let n=e.append(`circle`).attr(`cx`,t.cx).attr(`cy`,t.cy).attr(`class`,`face`).attr(`r`,15).attr(`stroke-width`,2).attr(`overflow`,`visible`),r=e.append(`g`);r.append(`circle`).attr(`cx`,t.cx-5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`),r.append(`circle`).attr(`cx`,t.cx+5).attr(`cy`,t.cy-5).attr(`r`,1.5).attr(`stroke-width`,2).attr(`fill`,`#666`).attr(`stroke`,`#666`);function i(e){let n=Wd().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+2)+`)`)}p(i,`smile`);function a(e){let n=Wd().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(15/2).outerRadius(15/2.2);e.append(`path`).attr(`class`,`mouth`).attr(`d`,n).attr(`transform`,`translate(`+t.cx+`,`+(t.cy+7)+`)`)}p(a,`sad`);function o(e){e.append(`line`).attr(`class`,`mouth`).attr(`stroke`,2).attr(`x1`,t.cx-5).attr(`y1`,t.cy+7).attr(`x2`,t.cx+5).attr(`y2`,t.cy+7).attr(`class`,`mouth`).attr(`stroke-width`,`1px`).attr(`stroke`,`#666`)}return p(o,`ambivalent`),t.score>3?i(r):t.score<3?a(r):o(r),n},`drawFace`),bdt=p(function(e,t){let n=e.append(`circle`);return n.attr(`cx`,t.cx),n.attr(`cy`,t.cy),n.attr(`class`,`actor-`+t.pos),n.attr(`fill`,t.fill),n.attr(`stroke`,t.stroke),n.attr(`r`,t.r),n.class!==void 0&&n.attr(`class`,n.class),t.title!==void 0&&n.append(`title`).text(t.title),n},`drawCircle`),P4=p(function(e,t){let n=t.text.replace(/<br\s*\/?>/gi,` `),r=e.append(`text`);r.attr(`x`,t.x),r.attr(`y`,t.y),r.attr(`class`,`legend`),r.style(`text-anchor`,t.anchor),t.class!==void 0&&r.attr(`class`,t.class);let i=r.append(`tspan`);return i.attr(`x`,t.x+t.textMargin*2),i.text(n),r},`drawText`),xdt=p(function(e,t){function n(e,t,n,r,i){return e+`,`+t+` `+(e+n)+`,`+t+` `+(e+n)+`,`+(t+r-i)+` `+(e+n-i*1.2)+`,`+(t+r)+` `+e+`,`+(t+r)}p(n,`genPoints`);let r=e.append(`polygon`);r.attr(`points`,n(t.x,t.y,50,20,7)),r.attr(`class`,`labelBox`),t.y+=t.labelMargin,t.x+=.5*t.labelMargin,P4(e,t)},`drawLabel`),Sdt=p(function(e,t,n){let r=e.append(`g`),i=I4();i.x=t.x,i.y=t.y,i.fill=t.fill,i.width=n.width,i.height=n.height,i.class=`journey-section section-type-`+t.num,i.rx=3,i.ry=3,N4(r,i),L4(n)(t.text,r,i.x,i.y,i.width,i.height,{class:`journey-section section-type-`+t.num},n,t.colour)},`drawSection`),F4=-1,Cdt=p(function(e,t,n,r){let i=t.x+n.width/2,a=e.append(`g`);F4++,a.append(`line`).attr(`id`,r+`-task`+F4).attr(`x1`,i).attr(`y1`,t.y).attr(`x2`,i).attr(`y2`,450).attr(`class`,`task-line`).attr(`stroke-width`,`1px`).attr(`stroke-dasharray`,`4 2`).attr(`stroke`,`#666`),ydt(a,{cx:i,cy:300+(5-t.score)*30,score:t.score});let o=I4();o.x=t.x,o.y=t.y,o.fill=t.fill,o.width=n.width,o.height=n.height,o.class=`task task-type-`+t.num,o.rx=3,o.ry=3,N4(a,o),L4(n)(t.task,a,o.x,o.y,o.width,o.height,{class:`task`},n,t.colour)},`drawTask`),wdt=p(function(e,t){N4(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:`rect`}).lower()},`drawBackgroundRect`),Tdt=p(function(){return{x:0,y:0,fill:void 0,"text-anchor":`start`,width:100,height:100,textMargin:0,rx:0,ry:0}},`getTextObj`),I4=p(function(){return{x:0,y:0,width:100,anchor:`start`,height:100,rx:0,ry:0}},`getNoteRect`),L4=(function(){function e(e,t,n,i,a,o,s,l){r(t.append(`text`).attr(`x`,n+a/2).attr(`y`,i+o/2+5).style(`font-color`,l).style(`text-anchor`,`middle`).text(e),s)}p(e,`byText`);function t(e,t,n,i,a,o,s,l,u){let{taskFontSize:d,taskFontFamily:f}=l,p=e.split(/<br\s*\/?>/gi);for(let e=0;e<p.length;e++){let l=e*d-d*(p.length-1)/2,m=t.append(`text`).attr(`x`,n+a/2).attr(`y`,i).attr(`fill`,u).style(`text-anchor`,`middle`).style(`font-size`,d).style(`font-family`,f);m.append(`tspan`).attr(`x`,n+a/2).attr(`dy`,l).text(p[e]),m.attr(`y`,i+o/2).attr(`dominant-baseline`,`central`).attr(`alignment-baseline`,`central`),r(m,s)}}p(t,`byTspan`);function n(e,n,i,a,o,s,l,u){let d=n.append(`switch`),f=d.append(`foreignObject`).attr(`x`,i).attr(`y`,a).attr(`width`,o).attr(`height`,s).attr(`position`,`fixed`).append(`xhtml:div`).style(`display`,`table`).style(`height`,`100%`).style(`width`,`100%`);f.append(`div`).attr(`class`,`label`).style(`display`,`table-cell`).style(`text-align`,`center`).style(`vertical-align`,`middle`).text(e),t(e,d,i,a,o,s,l,u),r(f,l)}p(n,`byFo`);function r(e,t){for(let n in t)n in t&&e.attr(n,t[n])}return p(r,`_setTextAttrs`),function(r){return r.textPlacement===`fo`?n:r.textPlacement===`old`?e:t}})(),Edt=p(function(e,t){M4=0,F4=-1,e.append(`defs`).append(`marker`).attr(`id`,t+`-arrowhead`).attr(`refX`,5).attr(`refY`,2).attr(`markerWidth`,6).attr(`markerHeight`,4).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0,0 V 4 L6,2 Z`)},`initGraphics`),p(f4,`wrap`),Ddt=p(function(e,t,n,r,i,a=!1){let{theme:o,look:s}=r,l=o?.includes(`redux`),u=n%(r?.themeVariables?.THEME_COLOR_LIMIT??12)-1,d=e.append(`g`);t.section=u,d.attr(`class`,(t.class?t.class+` `:``)+`timeline-node `+(`section-`+u));let f=d.append(`g`),p=d.append(`g`),m=p.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(f4,t.width).node().getBBox(),h=r.fontSize?.replace?r.fontSize.replace(`px`,``):r.fontSize;if(t.height=m.height+h*1.1*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width+=2*t.padding,p.attr(`transform`,`translate(`+t.width/2+`, `+t.padding/2+`)`),l&&p.attr(`transform`,`translate(${t.width/2}, ${a?t.padding/2+3:t.padding})`),kdt(f,t,u,i,r),s===`neo`&&(d.attr(`data-look`,`neo`),l)){let t=o.includes(`dark`),n=Ac(e.node()?.ownerSVGElement??e.node()),r=n.attr(`id`)??``,i=r?`${r}-drop-shadow`:`drop-shadow`;if(n.select(`#${i}`).empty()){let e=n.select(`defs`);(e.empty()?n.append(`defs`):e).append(`filter`).attr(`id`,i).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,t?`0.2`:`0.06`).attr(`flood-color`,t?`#FFFFFF`:`#000000`)}}return t},`drawNode`),Odt=p(function(e,t,n){let r=e.append(`g`),i=r.append(`text`).text(t.descr).attr(`dy`,`1em`).attr(`alignment-baseline`,`middle`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).call(f4,t.width).node().getBBox(),a=n.fontSize?.replace?n.fontSize.replace(`px`,``):n.fontSize;return r.remove(),i.height+a*1.1*.5+t.padding},`getVirtualNodeHeight`),kdt=p(function(e,t,n,r,i){let{theme:a}=i,o=a?.includes(`redux`)?0:5,s=o>0?`M0 ${t.height-5} v${-t.height+10} q0,-${o},${o},-${o} h${t.width-10} q${o},0,${o},${o} v${t.height-5} H0 Z`:`M0 ${t.height-5} v${-(t.height-5)} h${t.width} v${t.height} H0 Z`;e.append(`path`).attr(`id`,r+`-node-`+M4++).attr(`class`,`node-bkg node-`+t.type).attr(`d`,s),a?.includes(`redux`)||e.append(`line`).attr(`class`,`node-line-`+n).attr(`x1`,0).attr(`y1`,t.height).attr(`x2`,t.width).attr(`y2`,t.height)},`defaultBkg`),R4={drawRect:N4,drawCircle:bdt,drawSection:Sdt,drawText:P4,drawLabel:xdt,drawTask:Cdt,drawBackgroundRect:wdt,getTextObj:Tdt,getNoteRect:I4,initGraphics:Edt,drawNode:Ddt,getVirtualNodeHeight:Odt},Adt=p(function(e,t,n,r){let i=Z(),{look:a,theme:o,themeVariables:s}=i,{useGradient:l,gradientStart:u,gradientStop:d}=s,f=i.timeline?.leftMargin??50;y.debug(`timeline`,r.db);let p=i.securityLevel,m;p===`sandbox`&&(m=Ac(`#i`+t));let h=Ac(p===`sandbox`?m.nodes()[0].contentDocument.body:`body`).select(`#`+t);h.append(`g`);let g=r.db.getTasks(),_=r.db.getCommonDb().getDiagramTitle();y.debug(`task`,g),R4.initGraphics(h,t);let v=r.db.getSections();y.debug(`sections`,v);let b=0,x=0,S=0,C=0,w=50+f,T=50;C=50;let E=0,D=!0;v.forEach(function(e){let t={number:E,descr:e,section:E,width:150,padding:20,maxHeight:b},n=R4.getVirtualNodeHeight(h,t,i);y.debug(`sectionHeight before draw`,n),b=Math.max(b,n+20)});let O=0,k=0;y.debug(`tasks.length`,g.length);for(let[e,t]of g.entries()){let n={number:e,descr:t,section:t.section,width:150,padding:20,maxHeight:x},r=R4.getVirtualNodeHeight(h,n,i);y.debug(`taskHeight before draw`,r),x=Math.max(x,r+20),O=Math.max(O,t.events.length);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:150,padding:20,maxHeight:50};a+=R4.getVirtualNodeHeight(h,n,i)}t.events.length>0&&(a+=(t.events.length-1)*10),k=Math.max(k,a)}y.debug(`maxSectionHeight before draw`,b),y.debug(`maxTaskHeight before draw`,x),v&&v.length>0?v.forEach(e=>{let n=g.filter(t=>t.section===e),r={number:E,descr:e,section:E,width:200*Math.max(n.length,1)-50,padding:20,maxHeight:b};y.debug(`sectionNode`,r);let a=h.append(`g`),o=R4.drawNode(a,r,E,i,t);y.debug(`sectionNode output`,o),a.attr(`transform`,`translate(${w}, ${C})`),T+=b+50,n.length>0&&z4(h,n,E,w,T,x,i,O,k,b,!1,t),w+=200*Math.max(n.length,1),T=C,E++}):(D=!1,z4(h,g,E,w,T,x,i,O,k,b,!0,t));let A=h.node().getBBox();if(y.debug(`bounds`,A),_&&h.append(`text`).text(_).attr(`x`,a===`neo`?A.x*2+f:A.width/2-f).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),S=D?b+x+150:x+100,h.append(`g`).attr(`class`,`lineWrapper`).append(`line`).attr(`x1`,f).attr(`y1`,S).attr(`x2`,A.width+3*f).attr(`y2`,S).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#${t}-arrowhead)`),a===`neo`&&l&&o!==`neutral`){let e=h.select(`defs`),t=(e.empty()?h.append(`defs`):e).append(`linearGradient`).attr(`id`,h.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,u).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,d).attr(`stop-opacity`,1)}ks(void 0,h,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},`draw`),z4=p(function(e,t,n,r,i,a,o,s,l,u,d,f){for(let s of t){let t={descr:s.task,section:n,number:n,width:150,padding:20,maxHeight:a};y.debug(`taskNode`,t);let u=e.append(`g`).attr(`class`,`taskWrapper`),p=R4.drawNode(u,t,n,o,f).height;if(y.debug(`taskHeight after draw`,p),u.attr(`transform`,`translate(${r}, ${i})`),a=Math.max(a,p),s.events){let t=e.append(`g`).attr(`class`,`lineWrapper`),u=a;i+=100,u+=jdt(e,s.events,n,r,i,o,f),i-=100,t.append(`line`).attr(`x1`,r+95).attr(`y1`,i+a).attr(`x2`,r+95).attr(`y2`,i+a+100+l+100).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#${f}-arrowhead)`).attr(`stroke-dasharray`,`5,5`)}r+=200,d&&!o.timeline?.disableMulticolor&&n++}i-=10},`drawTasks`),jdt=p(function(e,t,n,r,i,a,o){let s=0,l=i;i+=100;for(let l of t){let t={descr:l,section:n,number:n,width:150,padding:20,maxHeight:50};y.debug(`eventNode`,t);let u=e.append(`g`).attr(`class`,`eventWrapper`),d=R4.drawNode(u,t,n,a,o,!0).height;s+=d,u.attr(`transform`,`translate(${r}, ${i})`),i=i+10+d}return i=l,s},`drawEvents`),Mdt={setConf:p(()=>{},`setConf`),draw:Adt},B4=200,V4=5,Ndt=B4+V4*2,H4=B4+100,Pdt=H4+V4*2,U4=10,Fdt=0,W4=20,G4=20,K4=30,q4=50,Idt=p(function(e,t,n,r){let i=Z(),a=i.timeline?.leftMargin??50;y.debug(`timeline`,r.db);let o=gf(t);o.append(`g`);let s=r.db.getTasks(),l=r.db.getCommonDb().getDiagramTitle();y.debug(`task`,s),R4.initGraphics(o);let u=r.db.getSections();y.debug(`sections`,u);let d=0,f=0,p=50+a,m=50,h=m,g=p,_=Ndt+G4,v=Pdt+q4,b=g+_,x=0,S=u&&u.length>0,C=S?b:p+_,w=Math.max(50,_+v-V4*2);u.forEach(function(e){let t={number:x,descr:e,section:x,width:w,padding:V4,maxHeight:d},n=R4.getVirtualNodeHeight(o,t,i);y.debug(`sectionHeight before draw`,n),d=Math.max(d,n)});let T=0;y.debug(`tasks.length`,s.length);for(let[e,t]of s.entries()){let n={number:e,descr:t,section:t.section,width:B4,padding:V4,maxHeight:f},r=R4.getVirtualNodeHeight(o,n,i);y.debug(`taskHeight before draw`,r),f=Math.max(f,r);let a=0;for(let e of t.events){let n={descr:e,section:t.section,number:t.section,width:H4,padding:V4,maxHeight:50};a+=R4.getVirtualNodeHeight(o,n,i)}t.events.length>0&&(a+=(t.events.length-1)*U4),T=Math.max(T,a)+Fdt}y.debug(`maxSectionHeight before draw`,d),y.debug(`maxTaskHeight before draw`,f);let E=Math.max(f,T)+K4;S?u.forEach(e=>{let t=s.filter(t=>t.section===e),n={number:x,descr:e,section:x,width:w,padding:V4,maxHeight:d};y.debug(`sectionNode`,n);let r=o.append(`g`),a=R4.drawNode(r,n,x,i);y.debug(`sectionNode output`,a);let l=C-_;r.attr(`transform`,`translate(${l}, ${m})`);let u=m+a.height+W4;t.length>0&&J4(o,t,x,C,u,f,i,E,!1);let p=t.length,h=a.height+W4+E*Math.max(p,1)-(p>0?K4*2:0);m+=h,x++}):J4(o,s,x,C,m,f,i,E,!0);let D=o.node()?.getBBox();if(!D)throw Error(`bbox not found`);if(y.debug(`bounds`,D),l){if(o.append(`text`).text(l).attr(`x`,D.width/2-a).attr(`font-size`,`4ex`).attr(`font-weight`,`bold`).attr(`y`,20),D=o.node()?.getBBox(),!D)throw Error(`bbox not found`);y.debug(`bounds after title`,D)}let[O]=Hp(i.fontSize),k=(O??16)*2,A=(O??16)*.5+20,j=o.append(`g`).attr(`class`,`lineWrapper`);j.append(`line`).attr(`x1`,C).attr(`y1`,h-k).attr(`x2`,C).attr(`y2`,D.y+D.height+A).attr(`stroke-width`,4).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`),j.lower(),ks(void 0,o,i.timeline?.padding??50,i.timeline?.useMaxWidth??!1)},`draw`),J4=p(function(e,t,n,r,i,a,o,s,l){for(let u of t){let t={descr:u.task,section:n,number:n,width:B4,padding:V4,maxHeight:a};y.debug(`taskNode`,t);let d=e.append(`g`).attr(`class`,`taskWrapper`),f=R4.drawNode(d,t,n,o),p=f.height;y.debug(`taskHeight after draw`,p);let m=r-G4-f.width;if(d.attr(`transform`,`translate(${m}, ${i})`),a=Math.max(a,p),u.events&&u.events.length>0){let t=i,a=r+q4;Ldt(e,u.events,n,r,a,t,o)}i+=s,l&&!o.timeline?.disableMulticolor&&n++}},`drawTasks`),Ldt=p(function(e,t,n,r,i,a,o){let s=a;for(let a of t){let t={descr:a,section:n,number:n,width:H4,padding:V4,maxHeight:0};y.debug(`eventNode`,t);let l=e.append(`g`).attr(`class`,`eventWrapper`),u=R4.drawNode(l,t,n,o).height;l.attr(`transform`,`translate(${i}, ${s})`);let d=e.append(`g`).attr(`class`,`lineWrapper`),f=s+u/2;d.append(`line`).attr(`x1`,r).attr(`y1`,f).attr(`x2`,i).attr(`y2`,f).attr(`stroke-width`,2).attr(`stroke`,`black`).attr(`marker-end`,`url(#arrowhead)`).attr(`stroke-dasharray`,`5,5`),s=s+u+U4}return s-a},`drawEvents`),Rdt={setConf:p(()=>{},`setConf`),draw:Idt},zdt=p(e=>{let{theme:t}=es(),n=t?.includes(`dark`),r=t?.includes(`color`),i=e.svgId?.replace(/^#/,``)??``,a=i?`url(#${i}-drop-shadow)`:e.dropShadow??`none`,o=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++){let i=`${17-3*t}`,s=r?e.borderColorArray[t]:e.mainBkg,l=r?e.borderColorArray[t]:e.nodeBorder;o+=`2639- .section-${t-1} rect,2640- .section-${t-1} path,2641- .section-${t-1} circle {2642- fill: ${n&&r?e.mainBkg:s};2643- stroke: ${l};2644- stroke-width: ${e.strokeWidth};2645- filter: ${a};2646- }2647-2648- .section-${t-1} text {2649- fill: ${e.nodeBorder};2650- font-weight: ${e.fontWeight}2651- }2652-2653- .node-icon-${t-1} {2654- font-size: 40px;2655- color: ${e[`cScaleLabel`+t]};2656- }2657-2658- .section-edge-${t-1} {2659- stroke: ${e[`cScale`+t]};2660- }2661-2662- .edge-depth-${t-1} {2663- stroke-width: ${i};2664- }2665-2666- .section-${t-1} line {2667- stroke: ${e[`cScaleInv`+t]};2668- stroke-width: 3;2669- }2670-2671- .lineWrapper line {2672- stroke: ${e.nodeBorder};2673- stroke-width:${e.strokeWidth}2674- }2675-2676- .disabled,2677- .disabled circle,2678- .disabled text {2679- fill: ${e.tertiaryColor??`lightgray`};2680- }2681-2682- .disabled text {2683- fill: ${e.clusterBorder??`#efefef`};2684- }2685- `}return o},`genReduxSections`),Bdt=p(e=>{let t=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],ye(e[`lineColor`+t])?e[`lineColor`+t]=V(e[`lineColor`+t],20):e[`lineColor`+t]=we(e[`lineColor`+t],20);for(let n=0;n<e.THEME_COLOR_LIMIT;n++){let r=``+(17-3*n);t+=`2686- .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {2687- fill: ${e[`cScale`+n]};2688- }2689- .section-${n-1} text {2690- fill: ${e[`cScaleLabel`+n]};2691- }2692- .node-icon-${n-1} {2693- font-size: 40px;2694- color: ${e[`cScaleLabel`+n]};2695- }2696- .section-edge-${n-1}{2697- stroke: ${e[`cScale`+n]};2698- }2699- .edge-depth-${n-1}{2700- stroke-width: ${r};2701- }2702- .section-${n-1} line {2703- stroke: ${e[`cScaleInv`+n]} ;2704- stroke-width: 3;2705- }2706-2707- .lineWrapper line{2708- stroke: ${e[`cScaleLabel`+n]} ;2709- }2710-2711- .disabled, .disabled circle, .disabled text {2712- fill: ${e.tertiaryColor??`lightgray`};2713- }2714- .disabled text {2715- fill: ${e.clusterBorder??`#efefef`};2716- }2717- `}return t},`genSections`),Vdt={db:m4,renderer:{setConf:p(()=>{},`setConf`),draw:p((e,t,n,r)=>(r?.db?.getDirection?.()??`LR`)===`TD`?Rdt.draw(e,t,n,r):Mdt.draw(e,t,n,r),`draw`)},parser:_dt,styles:p(e=>{let{theme:t}=es(),n=t?.includes(`redux`),r=t===`neutral`,i=e.svgId?.replace(/^#/,``)??``,a=``;if(e.useGradient&&i&&e.THEME_COLOR_LIMIT&&!r)for(let t=0;t<e.THEME_COLOR_LIMIT;t++)a+=`2718- .section-${t-1}[data-look="neo"] rect,2719- .section-${t-1}[data-look="neo"] path,2720- .section-${t-1}[data-look="neo"] circle {2721- fill: ${e.mainBkg};2722- stroke: url(#${i}-gradient);2723- stroke-width: 2;2724- }2725- .section-${t-1}[data-look="neo"] line {2726- stroke: url(#${i}-gradient);2727- stroke-width: 2;2728- }`;return`2729- .edge {2730- stroke-width: 3;2731- }2732- ${n?zdt(e):Bdt(e)}2733- ${a}2734- .section-root rect, .section-root path, .section-root circle {2735- fill: ${e.git0};2736- }2737- .section-root text {2738- fill: ${e.gitBranchLabel0};2739- }2740- .icon-container {2741- height:100%;2742- display: flex;2743- justify-content: center;2744- align-items: center;2745- }2746- .edge {2747- fill: none;2748- }2749- .eventWrapper {2750- filter: brightness(120%);2751- }2752-`},`getStyles`)}}));function Udt(e,t=0){return(Y4[e[t+0]]+Y4[e[t+1]]+Y4[e[t+2]]+Y4[e[t+3]]+`-`+Y4[e[t+4]]+Y4[e[t+5]]+`-`+Y4[e[t+6]]+Y4[e[t+7]]+`-`+Y4[e[t+8]]+Y4[e[t+9]]+`-`+Y4[e[t+10]]+Y4[e[t+11]]+Y4[e[t+12]]+Y4[e[t+13]]+Y4[e[t+14]]+Y4[e[t+15]]).toLowerCase()}var Y4,Wdt=o((()=>{Y4=[];for(let e=0;e<256;++e)Y4.push((e+256).toString(16).slice(1))}));function Gdt(){return crypto.getRandomValues(Kdt)}var Kdt,qdt=o((()=>{Kdt=new Uint8Array(16)}));function Jdt(e,t,n){return!t&&!e&&crypto.randomUUID?crypto.randomUUID():Ydt(e,t,n)}function Ydt(e,t,n){e||={};let r=e.random??e.rng?.()??Gdt();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Udt(r)}var Xdt=o((()=>{qdt(),Wdt()})),Zdt=o((()=>{Wdt(),qdt(),Xdt()})),Qdt=l({diagram:()=>aft}),X4,$dt,eft,Z4,tft,nft,rft,ift,aft,oft=o((()=>{lF(),dF(),UN(),Mg(),Zg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),Zdt(),Ne(),X4=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],m=[6,7,11],h=[1,6,13,15,16,19,22],g=[1,33],_=[1,34],v=[1,6,7,11,13,15,16,19,22],y={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`MINDMAP`,11:`EOF`,13:`SPACELIST`,15:`ICON`,16:`CLASS`,19:`NODE_DSTART`,20:`NODE_DESCR`,21:`NODE_DEND`,22:`NODE_ID`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 16:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 17:case 21:r.decorateNode({class:a[s]});break;case 18:r.getLogger().trace(`SPACELIST`);break;case 19:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 20:r.decorateNode({icon:a[s]});break;case 25:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 26:this.$={id:a[s],descr:a[s],type:r.nodeType.DEFAULT};break;case 27:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])}}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:n,9:22,12:11,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},{6:u,7:d,10:23,11:f},e(m,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:s}),e(m,[2,18]),e(m,[2,19]),e(m,[2,20]),e(m,[2,21]),e(m,[2,23]),e(m,[2,24]),e(m,[2,26],{19:[1,30]}),{20:[1,31]},{6:u,7:d,10:32,11:f},{1:[2,7],6:n,12:21,13:r,14:14,15:i,16:a,17:17,18:18,19:o,22:s},e(h,[2,14],{7:g,11:_}),e(v,[2,8]),e(v,[2,9]),e(v,[2,10]),e(m,[2,15]),e(m,[2,16]),e(m,[2,17]),{20:[1,35]},{21:[1,36]},e(h,[2,13],{7:g,11:_}),e(v,[2,11]),e(v,[2,12]),{21:[1,37]},e(m,[2,25]),e(m,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2753-`+g.showPosition()+`2754-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};y.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2755-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2756-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2757-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return e.getLogger().trace(`Found comment`,t.yytext),6;case 1:return 8;case 2:this.begin(`CLASS`);break;case 3:return this.popState(),16;case 4:this.popState();break;case 5:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 6:return e.getLogger().trace(`SPACELINE`),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace(`end icon`),this.popState();break;case 10:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),19;case 11:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),19;case 12:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),19;case 13:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),19;case 14:return this.begin(`NODE`),19;case 15:return this.begin(`NODE`),19;case 16:return this.begin(`NODE`),19;case 17:return this.begin(`NODE`),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin(`NSTR2`);break;case 22:return`NODE_DESCR`;case 23:this.popState();break;case 24:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 25:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 26:this.popState();break;case 27:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 28:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 29:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 30:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 31:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 32:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 33:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 35:return e.getLogger().trace(`Long description:`,t.yytext),20;case 36:return e.getLogger().trace(`Long description:`,t.yytext),20}},`anonymous`),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}}})();function b(){this.yy={}}return p(b,`Parser`),b.prototype=y,y.Parser=b,new b})(),X4.parser=X4,$dt=X4,eft=12,Z4={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},tft=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=Z4,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{p(this,`MindmapDB`)}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level<e)return this.nodes[t];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,t,n,r){y.info(`addNode`,e,t,n,r);let i=!1;this.nodes.length===0?(this.baseLevel=e,e=0,i=!0):this.baseLevel!==void 0&&(e-=this.baseLevel,i=!1);let a=Z(),o=a.mindmap?.padding??Ho.mindmap.padding;switch(r){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:o*=2}let s={id:this.count++,nodeId:_s(t,a),level:e,descr:_s(n,a),type:r,children:[],width:a.mindmap?.maxNodeWidth??Ho.mindmap.maxNodeWidth,padding:o,isRoot:i},l=this.getParent(e);if(l)l.children.push(s),this.nodes.push(s);else if(i)this.nodes.push(s);else throw Error(`There can be only one root. No parent could be found for ("${s.descr}")`)}getType(e,t){switch(y.debug(`In get type`,e,t),e){case`[`:return this.nodeType.RECT;case`(`:return t===`)`?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case`((`:return this.nodeType.CIRCLE;case`)`:return this.nodeType.CLOUD;case`))`:return this.nodeType.BANG;case`{{`:return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=Z(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=_s(e.icon,t)),e.class&&(n.class=_s(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return`no-border`;case this.nodeType.RECT:return`rect`;case this.nodeType.ROUNDED_RECT:return`rounded-rect`;case this.nodeType.CIRCLE:return`circle`;case this.nodeType.CLOUD:return`cloud`;case this.nodeType.BANG:return`bang`;case this.nodeType.HEXAGON:return`hexgon`;default:return`no-border`}}assignSections(e,t){if(e.section=e.level===0?void 0:t,e.children)for(let[n,r]of e.children.entries()){let i=e.level===0?n%(eft-1):t;this.assignSections(r,i)}}flattenNodes(e,t){let n=Z(),r=[`mindmap-node`];e.isRoot===!0?r.push(`section-root`,`section--1`):e.section!==void 0&&r.push(`section-${e.section}`),e.class&&r.push(e.class);let i=r.join(` `),a=p(e=>{let t=(n.theme?.toLowerCase()??``).includes(`redux`);switch(e){case Z4.CIRCLE:return`mindmapCircle`;case Z4.RECT:return`rect`;case Z4.ROUNDED_RECT:return`rounded`;case Z4.CLOUD:return`cloud`;case Z4.BANG:return`bang`;case Z4.HEXAGON:return`hexagon`;case Z4.DEFAULT:return t?`rounded`:`defaultMindmapNode`;case Z4.NO_BORDER:default:return`rect`}},`getShapeFromType`),o={id:e.id.toString(),domId:`node_`+e.id.toString(),label:e.descr,labelType:`markdown`,isGroup:!1,shape:a(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:i,cssStyles:[],look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(o),e.children)for(let n of e.children)this.flattenNodes(n,t)}generateEdges(e,t){if(!e.children)return;let n=Z();for(let r of e.children){let i=`edge`;r.section!==void 0&&(i+=` section-edge-${r.section}`);let a=e.level+1;i+=` edge-depth-${a}`;let o={id:`edge_${e.id}_${r.id}`,start:e.id.toString(),end:r.id.toString(),type:`normal`,curve:`basis`,thickness:`normal`,look:n.look,classes:i,depth:e.level,section:r.section};t.push(o),this.generateEdges(r,t)}}getData(){let e=this.getMindmap(),t=Z(),n=as().layout!==void 0,r=t;if(n||(r.layout=`cose-bilkent`),!e)return{nodes:[],edges:[],config:r};y.debug(`getData: mindmapRoot`,e,t),this.assignSections(e);let i=[],a=[];this.flattenNodes(e,i),this.generateEdges(e,a),y.debug(`getData: processed ${i.length} nodes and ${a.length} edges`);let o=new Map;for(let e of i)o.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:i,edges:a,config:r,rootNode:e,markers:[`point`],direction:`TB`,nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(o),type:`mindmap`,diagramId:`mindmap-`+Jdt()}}getLogger(){return y}},nft={draw:p(async(e,t,n,r)=>{y.debug(`Rendering mindmap diagram2758-`+e);let i=r.db,a=i.getData(),o=cF(t,a.config.securityLevel);if(a.type=r.type,a.layoutAlgorithm=HN(a.config.layout,{fallback:`cose-bilkent`}),a.diagramId=t,!i.getMindmap())return;a.nodes.forEach(e=>{e.shape===`rounded`?(e.radius=15,e.taper=15,e.stroke=`none`,e.width=0,e.padding=15):e.shape===`circle`?e.padding=10:e.shape===`rect`?(e.width=0,e.padding=10):e.shape===`hexagon`&&(e.width=0,e.height=0)}),await VN(a,o);let{themeVariables:s}=es(),{useGradient:l,gradientStart:u,gradientStop:d}=s;if(l&&u&&d){let e=o.attr(`id`),t=o.append(`defs`).append(`linearGradient`).attr(`id`,`${e}-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);t.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,u).attr(`stop-opacity`,1),t.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,d).attr(`stop-opacity`,1)}uF(o,a.config.mindmap?.padding??Ho.mindmap.padding,`mindmapDiagram`,a.config.mindmap?.useMaxWidth??Ho.mindmap.useMaxWidth)},`draw`)},rft=p(e=>{let{theme:t,look:n}=e,r=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],ye(e[`lineColor`+t])?e[`lineColor`+t]=V(e[`lineColor`+t],20):e[`lineColor`+t]=we(e[`lineColor`+t],20);for(let i=0;i<e.THEME_COLOR_LIMIT;i++){let a=``+(n===`neo`?Math.max(10-(i-1)*2,2):17-3*i);r+=`2759- .section-${i-1} rect, .section-${i-1} path, .section-${i-1} circle, .section-${i-1} polygon, .section-${i-1} path {2760- fill: ${e[`cScale`+i]};2761- }2762- .section-${i-1} text {2763- fill: ${e[`cScaleLabel`+i]};2764- }2765- .section-${i-1} span {2766- color: ${e[`cScaleLabel`+i]};2767- }2768- .node-icon-${i-1} {2769- font-size: 40px;2770- color: ${e[`cScaleLabel`+i]};2771- }2772- .section-edge-${i-1}{2773- stroke: ${e[`cScale`+i]};2774- }2775- .edge-depth-${i-1}{2776- stroke-width: ${a};2777- }2778- .section-${i-1} line {2779- stroke: ${e[`cScaleInv`+i]} ;2780- stroke-width: 3;2781- }2782-2783- .disabled, .disabled circle, .disabled text {2784- fill: lightgray;2785- }2786- .disabled text {2787- fill: #efefef;2788- }2789- [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {2790- fill: ${t===`redux`||t===`redux-dark`||t===`neutral`?e.mainBkg:e[`cScale`+i]};2791- stroke: ${t===`redux`||t===`redux-dark`?e.nodeBorder:e[`cScale`+i]};2792- stroke-width: ${e.strokeWidth??2}px;2793- }2794- [data-look="neo"].section-edge-${i-1}{2795- stroke: ${t?.includes(`redux`)||t===`neo-dark`?e.nodeBorder:e[`cScale`+i]};2796- }2797- [data-look="neo"].mindmap-node.section-${i-1} text {2798- fill: ${t===`redux`||t===`redux-dark`?e.nodeBorder:e[`cScaleLabel`+(t===`neutral`?1:i)]};2799- }2800- `}return r},`genSections`),ift=p((e,t,n)=>{let r=``;for(let i=0;i<e;i++)r+=`2801- [data-look="neo"].mindmap-node.section-${i-1} rect, [data-look="neo"].mindmap-node.section-${i-1} path, [data-look="neo"].mindmap-node.section-${i-1} circle, [data-look="neo"].mindmap-node.section-${i-1} polygon {2802- stroke: url(${t}-gradient);2803- fill: ${n};2804- }2805- .section-${i-1} line {2806- stroke-width: 0;2807- }`;return r},`genGradient`),aft={get db(){return new tft},renderer:nft,parser:$dt,styles:p(e=>{let{theme:t}=e,n=e.svgId,r=e.dropShadow?e.dropShadow.replace(`url(#drop-shadow)`,`url(${n}-drop-shadow)`):`none`;return`2808- .edge {2809- stroke-width: 3;2810- }2811- ${rft(e)}2812- .section-root rect, .section-root path, .section-root circle, .section-root polygon {2813- fill: ${e.git0};2814- }2815- .section-root text {2816- fill: ${e.gitBranchLabel0};2817- }2818- .section-root span {2819- color: ${t?.includes(`redux`)?e.nodeBorder:e.gitBranchLabel0};2820- }2821- .icon-container {2822- height:100%;2823- display: flex;2824- justify-content: center;2825- align-items: center;2826- }2827- .edge {2828- fill: none;2829- }2830- .mindmap-node-label {2831- dy: 1em;2832- alignment-baseline: middle;2833- text-anchor: middle;2834- dominant-baseline: middle;2835- text-align: center;2836- }2837- [data-look="neo"].mindmap-node {2838- filter: ${r};2839- }2840- [data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {2841- fill: ${t?.includes(`redux`)?e.mainBkg:e.git0};2842- }2843- [data-look="neo"].mindmap-node.section-root .text-inner-tspan {2844- fill: ${t?.includes(`redux`)?e.nodeBorder:e[`cScaleLabel`+ +(t===`neutral`)]};2845- }2846- ${e.useGradient&&n&&e.mainBkg?ift(e.THEME_COLOR_LIMIT,n,e.mainBkg):``}2847-`},`getStyles`)}})),sft=l({diagram:()=>gft}),Q4,cft,$4,e3,t3,n3,lft,uft,r3,dft,fft,i3,pft,mft,hft,gft,_ft=o((()=>{_f(),sF(),vS(),Mg(),Og(),Cg(),Sf(),qm(),Pf(),Kp(),Zs(),S(),h(),Ne(),Q4=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,4],n=[1,13],r=[1,12],i=[1,15],a=[1,16],o=[1,20],s=[1,19],l=[6,7,8],u=[1,26],d=[1,24],f=[1,25],m=[6,7,11],h=[1,31],g=[6,7,11,24],_=[1,6,13,16,17,20,23],v=[1,35],y=[1,36],b=[1,6,7,11,13,16,17,20,23],x=[1,38],S={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,KANBAN:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,shapeData:15,ICON:16,CLASS:17,nodeWithId:18,nodeWithoutId:19,NODE_DSTART:20,NODE_DESCR:21,NODE_DEND:22,NODE_ID:23,SHAPE_DATA:24,$accept:0,$end:1},terminals_:{2:`error`,6:`SPACELINE`,7:`NL`,8:`KANBAN`,11:`EOF`,13:`SPACELIST`,16:`ICON`,17:`CLASS`,20:`NODE_DSTART`,21:`NODE_DESCR`,22:`NODE_DEND`,23:`NODE_ID`,24:`SHAPE_DATA`},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,3],[12,2],[12,2],[12,2],[12,1],[12,2],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[19,3],[18,1],[18,4],[15,2],[15,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 6:case 7:return r;case 8:r.getLogger().trace(`Stop NL `);break;case 9:r.getLogger().trace(`Stop EOF `);break;case 11:r.getLogger().trace(`Stop NL2 `);break;case 12:r.getLogger().trace(`Stop EOF2 `);break;case 15:r.getLogger().info(`Node: `,a[s-1].id),r.addNode(a[s-2].length,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 16:r.getLogger().info(`Node: `,a[s].id),r.addNode(a[s-1].length,a[s].id,a[s].descr,a[s].type);break;case 17:r.getLogger().trace(`Icon: `,a[s]),r.decorateNode({icon:a[s]});break;case 18:case 23:r.decorateNode({class:a[s]});break;case 19:r.getLogger().trace(`SPACELIST`);break;case 20:r.getLogger().trace(`Node: `,a[s-1].id),r.addNode(0,a[s-1].id,a[s-1].descr,a[s-1].type,a[s]);break;case 21:r.getLogger().trace(`Node: `,a[s].id),r.addNode(0,a[s].id,a[s].descr,a[s].type);break;case 22:r.decorateNode({icon:a[s]});break;case 27:r.getLogger().trace(`node found ..`,a[s-2]),this.$={id:a[s-1],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 28:this.$={id:a[s],descr:a[s],type:0};break;case 29:r.getLogger().trace(`node found ..`,a[s-3]),this.$={id:a[s-3],descr:a[s-1],type:r.getType(a[s-2],a[s])};break;case 30:this.$=a[s-1]+a[s];break;case 31:this.$=a[s]}},`anonymous`),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:n,9:22,12:11,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},{6:u,7:d,10:23,11:f},e(m,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:s}),e(m,[2,19]),e(m,[2,21],{15:30,24:h}),e(m,[2,22]),e(m,[2,23]),e(g,[2,25]),e(g,[2,26]),e(g,[2,28],{20:[1,32]}),{21:[1,33]},{6:u,7:d,10:34,11:f},{1:[2,7],6:n,12:21,13:r,14:14,16:i,17:a,18:17,19:18,20:o,23:s},e(_,[2,14],{7:v,11:y}),e(b,[2,8]),e(b,[2,9]),e(b,[2,10]),e(m,[2,16],{15:37,24:h}),e(m,[2,17]),e(m,[2,18]),e(m,[2,20],{24:x}),e(g,[2,31]),{21:[1,39]},{22:[1,40]},e(_,[2,13],{7:v,11:y}),e(b,[2,11]),e(b,[2,12]),e(m,[2,15],{24:x}),e(g,[2,30]),{22:[1,41]},e(g,[2,27]),e(g,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2848-`+g.showPosition()+`2849-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};S.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2850-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2851-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2852-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return this.pushState(`shapeData`),t.yytext=``,24;case 1:return this.pushState(`shapeDataStr`),24;case 2:return this.popState(),24;case 3:return t.yytext=t.yytext.replace(/\n\s*/g,`<br/>`),24;case 4:return 24;case 5:this.popState();break;case 6:return e.getLogger().trace(`Found comment`,t.yytext),6;case 7:return 8;case 8:this.begin(`CLASS`);break;case 9:return this.popState(),17;case 10:this.popState();break;case 11:e.getLogger().trace(`Begin icon`),this.begin(`ICON`);break;case 12:return e.getLogger().trace(`SPACELINE`),6;case 13:return 7;case 14:return 16;case 15:e.getLogger().trace(`end icon`),this.popState();break;case 16:return e.getLogger().trace(`Exploding node`),this.begin(`NODE`),20;case 17:return e.getLogger().trace(`Cloud`),this.begin(`NODE`),20;case 18:return e.getLogger().trace(`Explosion Bang`),this.begin(`NODE`),20;case 19:return e.getLogger().trace(`Cloud Bang`),this.begin(`NODE`),20;case 20:return this.begin(`NODE`),20;case 21:return this.begin(`NODE`),20;case 22:return this.begin(`NODE`),20;case 23:return this.begin(`NODE`),20;case 24:return 13;case 25:return 23;case 26:return 11;case 27:this.begin(`NSTR2`);break;case 28:return`NODE_DESCR`;case 29:this.popState();break;case 30:e.getLogger().trace(`Starting NSTR`),this.begin(`NSTR`);break;case 31:return e.getLogger().trace(`description:`,t.yytext),`NODE_DESCR`;case 32:this.popState();break;case 33:return this.popState(),e.getLogger().trace(`node end ))`),`NODE_DEND`;case 34:return this.popState(),e.getLogger().trace(`node end )`),`NODE_DEND`;case 35:return this.popState(),e.getLogger().trace(`node end ...`,t.yytext),`NODE_DEND`;case 36:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 37:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 38:return this.popState(),e.getLogger().trace(`node end (-`),`NODE_DEND`;case 39:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 40:return this.popState(),e.getLogger().trace(`node end ((`),`NODE_DEND`;case 41:return e.getLogger().trace(`Long description:`,t.yytext),21;case 42:return e.getLogger().trace(`Long description:`,t.yytext),21}},`anonymous`),rules:[/^(?:@\{)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^\"]+)/i,/^(?:[^}^"]+)/i,/^(?:\})/i,/^(?:\s*%%.*)/i,/^(?:kanban\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}@]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{shapeDataEndBracket:{rules:[],inclusive:!1},shapeDataStr:{rules:[2,3],inclusive:!1},shapeData:{rules:[1,4,5],inclusive:!1},CLASS:{rules:[9,10],inclusive:!1},ICON:{rules:[14,15],inclusive:!1},NSTR2:{rules:[28,29],inclusive:!1},NSTR:{rules:[31,32],inclusive:!1},NODE:{rules:[27,30,33,34,35,36,37,38,39,40,41,42],inclusive:!1},INITIAL:{rules:[0,6,7,8,11,12,13,16,17,18,19,20,21,22,23,24,25,26],inclusive:!0}}}})();function C(){this.yy={}}return p(C,`Parser`),C.prototype=S,S.Parser=C,new C})(),Q4.parser=Q4,cft=Q4,$4=[],e3=[],t3=0,n3={},lft=p(()=>{$4=[],e3=[],t3=0,n3={}},`clear`),uft=p(e=>{if($4.length===0)return null;let t=$4[0].level,n=null;for(let e=$4.length-1;e>=0;e--)if($4[e].level===t&&!n&&(n=$4[e]),$4[e].level<t)throw Error(`Items without section detected, found section ("`+$4[e].label+`")`);return e===n?.level?null:n},`getSection`),r3=p(function(){return e3},`getSections`),dft=p(function(){let e=[],t=[],n=r3(),r=Z();for(let e of n){let n={id:e.id,label:_s(e.label??``,r),labelType:`markdown`,isGroup:!0,ticket:e.ticket,shape:`kanbanSection`,level:e.level,look:r.look};t.push(n);let i=$4.filter(t=>t.parentId===e.id);for(let n of i){let i={id:n.id,parentId:e.id,label:_s(n.label??``,r),labelType:`markdown`,isGroup:!1,ticket:n?.ticket,priority:n?.priority,assigned:n?.assigned,icon:n?.icon,shape:`kanbanItem`,level:n.level,rx:5,ry:5,cssStyles:[`text-align: left`]};t.push(i)}}return{nodes:t,edges:e,other:{},config:Z()}},`getData`),fft=p((e,t,n,r,i)=>{let a=Z(),o=a.mindmap?.padding??Ho.mindmap.padding;switch(r){case i3.ROUNDED_RECT:case i3.RECT:case i3.HEXAGON:o*=2}let s={id:_s(t,a)||`kbn`+t3++,level:e,label:_s(n,a),width:a.mindmap?.maxNodeWidth??Ho.mindmap.maxNodeWidth,padding:o,isGroup:!1};if(i!==void 0){let e;e=i.includes(`2853-`)?i+`2854-`:`{2855-`+i+`2856-}`;let t=_S(e,{schema:gS});if(t.shape&&(t.shape!==t.shape.toLowerCase()||t.shape.includes(`_`)))throw Error(`No such shape: ${t.shape}. Shape names should be lowercase.`);t?.shape&&t.shape===`kanbanItem`&&(s.shape=t?.shape),t?.label&&(s.label=t?.label),t?.icon&&(s.icon=t?.icon.toString()),t?.assigned&&(s.assigned=t?.assigned.toString()),t?.ticket&&(s.ticket=t?.ticket.toString()),t?.priority&&(s.priority=t?.priority)}let l=uft(e);l?s.parentId=l.id||`kbn`+t3++:e3.push(s),$4.push(s)},`addNode`),i3={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},pft={clear:lft,addNode:fft,getSections:r3,getData:dft,nodeType:i3,getType:p((e,t)=>{switch(y.debug(`In get type`,e,t),e){case`[`:return i3.RECT;case`(`:return t===`)`?i3.ROUNDED_RECT:i3.CLOUD;case`((`:return i3.CIRCLE;case`)`:return i3.CLOUD;case`))`:return i3.BANG;case`{{`:return i3.HEXAGON;default:return i3.DEFAULT}},`getType`),setElementForId:p((e,t)=>{n3[e]=t},`setElementForId`),decorateNode:p(e=>{if(!e)return;let t=Z(),n=$4[$4.length-1];e.icon&&(n.icon=_s(e.icon,t)),e.class&&(n.cssClasses=_s(e.class,t))},`decorateNode`),type2Str:p(e=>{switch(e){case i3.DEFAULT:return`no-border`;case i3.RECT:return`rect`;case i3.ROUNDED_RECT:return`rounded-rect`;case i3.CIRCLE:return`circle`;case i3.CLOUD:return`cloud`;case i3.BANG:return`bang`;case i3.HEXAGON:return`hexgon`;default:return`no-border`}},`type2Str`),getLogger:p(()=>y,`getLogger`),getElementById:p(e=>n3[e],`getElementById`)},mft={draw:p(async(e,t,n,r)=>{y.debug(`Rendering kanban diagram2857-`+e);let i=r.db.getData(),a=Z();a.htmlLabels=!1;let o=gf(t);for(let e of i.nodes)e.domId=`${t}-${e.id}`;let s=o.append(`g`);s.attr(`class`,`sections`);let l=o.append(`g`);l.attr(`class`,`items`);let u=i.nodes.filter(e=>e.isGroup),d=0,f=[],p=25;for(let e of u){let t=a?.kanban?.sectionWidth||200;d+=1,e.x=t*d+(d-1)*10/2,e.width=t,e.y=0,e.height=t*3,e.rx=5,e.ry=5,e.cssClasses=e.cssClasses+` section-`+d;let n=await jg(s,e);p=Math.max(p,n?.labelBBox?.height),f.push(n)}let m=0;for(let e of u){let t=f[m];m+=1;let n=a?.kanban?.sectionWidth||200,r=-n*3/2+p,o=r,s=i.nodes.filter(t=>t.parentId===e.id);for(let t of s){if(t.isGroup)throw Error(`Groups within groups are not allowed in Kanban diagrams`);t.x=e.x,t.width=n-15;let r=(await wg(l,t,{config:a})).node().getBBox();t.y=o+r.height/2,await Dg(t),o=t.y+r.height/2+5}let u=t.cluster.select(`rect`),d=Math.max(o-r+30,50)+(p-25);u.attr(`height`,d)}ks(void 0,o,a.mindmap?.padding??Ho.kanban.padding,a.mindmap?.useMaxWidth??Ho.kanban.useMaxWidth)},`draw`)},hft=p(e=>{let t=``;for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e[`lineColor`+t]=e[`lineColor`+t]||e[`cScaleInv`+t],ye(e[`lineColor`+t])?e[`lineColor`+t]=V(e[`lineColor`+t],20):e[`lineColor`+t]=we(e[`lineColor`+t],20);let n=p((t,n)=>e.darkMode?we(t,n):V(t,n),`adjuster`);for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=``+(17-3*r);t+=`2858- .section-${r-1} rect, .section-${r-1} path, .section-${r-1} circle, .section-${r-1} polygon, .section-${r-1} path {2859- fill: ${n(e[`cScale`+r],10)};2860- stroke: ${n(e[`cScale`+r],10)};2861-2862- }2863- .section-${r-1} text {2864- fill: ${e[`cScaleLabel`+r]};2865- }2866- .node-icon-${r-1} {2867- font-size: 40px;2868- color: ${e[`cScaleLabel`+r]};2869- }2870- .section-edge-${r-1}{2871- stroke: ${e[`cScale`+r]};2872- }2873- .edge-depth-${r-1}{2874- stroke-width: ${i};2875- }2876- .section-${r-1} line {2877- stroke: ${e[`cScaleInv`+r]} ;2878- stroke-width: 3;2879- }2880-2881- .disabled, .disabled circle, .disabled text {2882- fill: lightgray;2883- }2884- .disabled text {2885- fill: #efefef;2886- }2887-2888- .node rect,2889- .node circle,2890- .node ellipse,2891- .node polygon,2892- .node path {2893- fill: ${e.background};2894- stroke: ${e.nodeBorder};2895- stroke-width: 1px;2896- }2897-2898- .kanban-ticket-link {2899- fill: ${e.background};2900- stroke: ${e.nodeBorder};2901- text-decoration: underline;2902- }2903- `}return t},`genSections`),gft={db:pft,renderer:mft,parser:cft,styles:p(e=>`2904- .edge {2905- stroke-width: 3;2906- }2907- ${hft(e)}2908- .section-root rect, .section-root path, .section-root circle, .section-root polygon {2909- fill: ${e.git0};2910- }2911- .section-root text {2912- fill: ${e.gitBranchLabel0};2913- }2914- .icon-container {2915- height:100%;2916- display: flex;2917- justify-content: center;2918- align-items: center;2919- }2920- .edge {2921- fill: none;2922- }2923- .cluster-label, .label {2924- color: ${e.textColor};2925- fill: ${e.textColor};2926- }2927- .kanban-label {2928- dy: 1em;2929- alignment-baseline: middle;2930- text-anchor: middle;2931- dominant-baseline: middle;2932- text-align: center;2933- }2934- ${oF()}2935-`,`getStyles`)}}));function vft(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n<t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}var yft=o((()=>{}));function bft(e,t){let n;if(t===void 0)for(let t of e)t!=null&&(n>t||n===void 0&&t>=t)&&(n=t);else{let r=-1;for(let i of e)(i=t(i,++r,e))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}var xft=o((()=>{}));function a3(e,t){let n=0;if(t===void 0)for(let t of e)(t=+t)&&(n+=t);else{let r=-1;for(let i of e)(i=+t(i,++r,e))&&(n+=i)}return n}var Sft=o((()=>{})),Cft=o((()=>{yft(),xft(),Sft()}));function wft(e){return e.target.depth}function Tft(e){return e.depth}function Eft(e,t){return t-1-e.height}function Dft(e,t){return e.sourceLinks.length?e.depth:t-1}function Oft(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?bft(e.sourceLinks,wft)-1:0}var kft=o((()=>{Cft()}));function o3(e){return function(){return e}}var Aft=o((()=>{}));function jft(e,t){return s3(e.source,t.source)||e.index-t.index}function Mft(e,t){return s3(e.target,t.target)||e.index-t.index}function s3(e,t){return e.y0-t.y0}function c3(e){return e.value}function Nft(e){return e.index}function Pft(e){return e.nodes}function Fft(e){return e.links}function Ift(e,t){let n=e.get(t);if(!n)throw Error(`missing: `+t);return n}function Lft({nodes:e}){for(let t of e){let e=t.y0,n=e;for(let n of t.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(let e of t.targetLinks)e.y1=n+e.width/2,n+=e.width}}function Rft(){let e=0,t=0,n=1,r=1,i=24,a=8,o,s=Nft,l=Dft,u,d,f=Pft,p=Fft,m=6;function h(){let e={nodes:f.apply(null,arguments),links:p.apply(null,arguments)};return g(e),_(e),v(e),y(e),S(e),Lft(e),e}h.update=function(e){return Lft(e),e},h.nodeId=function(e){return arguments.length?(s=typeof e==`function`?e:o3(e),h):s},h.nodeAlign=function(e){return arguments.length?(l=typeof e==`function`?e:o3(e),h):l},h.nodeSort=function(e){return arguments.length?(u=e,h):u},h.nodeWidth=function(e){return arguments.length?(i=+e,h):i},h.nodePadding=function(e){return arguments.length?(a=o=+e,h):a},h.nodes=function(e){return arguments.length?(f=typeof e==`function`?e:o3(e),h):f},h.links=function(e){return arguments.length?(p=typeof e==`function`?e:o3(e),h):p},h.linkSort=function(e){return arguments.length?(d=e,h):d},h.size=function(i){return arguments.length?(e=t=0,n=+i[0],r=+i[1],h):[n-e,r-t]},h.extent=function(i){return arguments.length?(e=+i[0][0],n=+i[1][0],t=+i[0][1],r=+i[1][1],h):[[e,t],[n,r]]},h.iterations=function(e){return arguments.length?(m=+e,h):m};function g({nodes:e,links:t}){for(let[t,n]of e.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];let n=new Map(e.map((t,n)=>[s(t,n,e),t]));for(let[e,r]of t.entries()){r.index=e;let{source:t,target:i}=r;typeof t!=`object`&&(t=r.source=Ift(n,t)),typeof i!=`object`&&(i=r.target=Ift(n,i)),t.sourceLinks.push(r),i.targetLinks.push(r)}if(d!=null)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(d),n.sort(d)}function _({nodes:e}){for(let t of e)t.value=t.fixedValue===void 0?Math.max(a3(t.sourceLinks,c3),a3(t.targetLinks,c3)):t.fixedValue}function v({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.depth=i;for(let{target:t}of e.sourceLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function y({nodes:e}){let t=e.length,n=new Set(e),r=new Set,i=0;for(;n.size;){for(let e of n){e.height=i;for(let{source:t}of e.targetLinks)r.add(t)}if(++i>t)throw Error(`circular link`);n=r,r=new Set}}function b({nodes:t}){let r=vft(t,e=>e.depth)+1,a=(n-e-i)/(r-1),o=Array(r);for(let n of t){let t=Math.max(0,Math.min(r-1,Math.floor(l.call(null,n,r))));n.layer=t,n.x0=e+t*a,n.x1=n.x0+i,o[t]?o[t].push(n):o[t]=[n]}if(u)for(let e of o)e.sort(u);return o}function x(e){let n=bft(e,e=>(r-t-(e.length-1)*o)/a3(e,c3));for(let i of e){let e=t;for(let t of i){t.y0=e,t.y1=e+t.value*n,e=t.y1+o;for(let e of t.sourceLinks)e.width=e.value*n}e=(r-e+o)/(i.length+1);for(let t=0;t<i.length;++t){let n=i[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}k(i)}}function S(e){let n=b(e);o=Math.min(a,(r-t)/(vft(n,e=>e.length)-1)),x(n);for(let e=0;e<m;++e){let t=.99**e,r=Math.max(1-t,(e+1)/m);w(n,t,r),C(n,t,r)}}function C(e,t,n){for(let r=1,i=e.length;r<i;++r){let i=e[r];for(let e of i){let n=0,r=0;for(let{source:t,value:i}of e.targetLinks){let a=i*(e.layer-t.layer);n+=A(t,e)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,O(e)}u===void 0&&i.sort(s3),T(i,n)}}function w(e,t,n){for(let r=e.length-2;r>=0;--r){let i=e[r];for(let e of i){let n=0,r=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);n+=j(e,t)*a,r+=a}if(!(r>0))continue;let i=(n/r-e.y0)*t;e.y0+=i,e.y1+=i,O(e)}u===void 0&&i.sort(s3),T(i,n)}}function T(e,n){let i=e.length>>1,a=e[i];D(e,a.y0-o,i-1,n),E(e,a.y1+o,i+1,n),D(e,r,e.length-1,n),E(e,t,0,n)}function E(e,t,n,r){for(;n<e.length;++n){let i=e[n],a=(t-i.y0)*r;a>1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+o}}function D(e,t,n,r){for(;n>=0;--n){let i=e[n],a=(i.y1-t)*r;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-o}}function O({sourceLinks:e,targetLinks:t}){if(d===void 0){for(let{source:{sourceLinks:e}}of t)e.sort(Mft);for(let{target:{targetLinks:t}}of e)t.sort(jft)}}function k(e){if(d===void 0)for(let{sourceLinks:t,targetLinks:n}of e)t.sort(Mft),n.sort(jft)}function A(e,t){let n=e.y0-(e.sourceLinks.length-1)*o/2;for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n+=i+o}for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n-=i}return n}function j(e,t){let n=t.y0-(t.targetLinks.length-1)*o/2;for(let{source:r,width:i}of t.targetLinks){if(r===e)break;n+=i+o}for(let{target:r,width:i}of e.sourceLinks){if(r===t)break;n-=i}return n}return h}var zft=o((()=>{Cft(),kft(),Aft()}));function l3(){this._x0=this._y0=this._x1=this._y1=null,this._=``}function Bft(){return new l3}var u3,d3,f3,Vft,Hft=o((()=>{u3=Math.PI,d3=2*u3,f3=1e-6,Vft=d3-f3,l3.prototype=Bft.prototype={constructor:l3,moveTo:function(e,t){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+=`Z`)},lineTo:function(e,t){this._+=`L`+(this._x1=+e)+`,`+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+=`Q`+ +e+`,`+ +t+`,`+(this._x1=+n)+`,`+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+=`C`+ +e+`,`+ +t+`,`+ +n+`,`+ +r+`,`+(this._x1=+i)+`,`+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-e,l=r-t,u=a-e,d=o-t,f=u*u+d*d;if(i<0)throw Error(`negative radius: `+i);if(this._x1===null)this._+=`M`+(this._x1=e)+`,`+(this._y1=t);else if(f>f3){if(!(Math.abs(d*s-l*u)>f3)||!i)this._+=`L`+(this._x1=e)+`,`+(this._y1=t);else{var p=n-a,m=r-o,h=s*s+l*l,g=p*p+m*m,_=Math.sqrt(h),v=Math.sqrt(f),y=i*Math.tan((u3-Math.acos((h+f-g)/(2*_*v)))/2),b=y/v,x=y/_;Math.abs(b-1)>f3&&(this._+=`L`+(e+b*u)+`,`+(t+b*d)),this._+=`A`+i+`,`+i+`,0,0,`+ +(d*p>u*m)+`,`+(this._x1=e+x*s)+`,`+(this._y1=t+x*l)}}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var o=n*Math.cos(r),s=n*Math.sin(r),l=e+o,u=t+s,d=1^a,f=a?r-i:i-r;if(n<0)throw Error(`negative radius: `+n);this._x1===null?this._+=`M`+l+`,`+u:(Math.abs(this._x1-l)>f3||Math.abs(this._y1-u)>f3)&&(this._+=`L`+l+`,`+u),n&&(f<0&&(f=f%d3+d3),f>Vft?this._+=`A`+n+`,`+n+`,0,1,`+d+`,`+(e-o)+`,`+(t-s)+`A`+n+`,`+n+`,0,1,`+d+`,`+(this._x1=l)+`,`+(this._y1=u):f>f3&&(this._+=`A`+n+`,`+n+`,0,`+ +(f>=u3)+`,`+d+`,`+(this._x1=e+n*Math.cos(i))+`,`+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+=`M`+(this._x0=this._x1=+e)+`,`+(this._y0=this._y1=+t)+`h`+ +n+`v`+ +r+`h`+-n+`Z`},toString:function(){return this._}}})),Uft=o((()=>{Hft()}));function Wft(e){return function(){return e}}var Gft=o((()=>{}));function Kft(e){return e[0]}function qft(e){return e[1]}var Jft=o((()=>{})),Yft,Xft=o((()=>{Yft=Array.prototype.slice}));function Zft(e){return e.source}function Qft(e){return e.target}function $ft(e){var t=Zft,n=Qft,r=Kft,i=qft,a=null;function o(){var o,s=Yft.call(arguments),l=t.apply(this,s),u=n.apply(this,s);if(a||=o=Bft(),e(a,+r.apply(this,(s[0]=l,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+``||null}return o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(e){return arguments.length?(n=e,o):n},o.x=function(e){return arguments.length?(r=typeof e==`function`?e:Wft(+e),o):r},o.y=function(e){return arguments.length?(i=typeof e==`function`?e:Wft(+e),o):i},o.context=function(e){return arguments.length?(a=e??null,o):a},o}function ept(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function tpt(){return $ft(ept)}var npt=o((()=>{Uft(),Xft(),Gft(),Jft()})),rpt=o((()=>{Uft(),Gft(),npt(),Xft()}));function ipt(e){return[e.source.x1,e.y0]}function apt(e){return[e.target.x0,e.y1]}function opt(){return tpt().source(ipt).target(apt)}var spt=o((()=>{rpt()})),cpt=o((()=>{zft(),kft(),spt()})),lpt=l({diagram:()=>xpt}),p3,m3,h3,g3,_3,upt,dpt,fpt,ppt,mpt,v3,hpt,gpt,_pt,vpt,ypt,bpt,xpt,Spt=o((()=>{Zs(),S(),h(),hf(),cpt(),p3=(function(){var e=p(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),t=[1,9],n=[1,10],r=[1,5,10,12],i={trace:p(function(){},`trace`),yy:{},symbols_:{error:2,start:3,SANKEY:4,NEWLINE:5,csv:6,opt_eof:7,record:8,csv_tail:9,EOF:10,"field[source]":11,COMMA:12,"field[target]":13,"field[value]":14,field:15,escaped:16,non_escaped:17,DQUOTE:18,ESCAPED_TEXT:19,NON_ESCAPED_TEXT:20,$accept:0,$end:1},terminals_:{2:`error`,4:`SANKEY`,5:`NEWLINE`,10:`EOF`,11:`field[source]`,12:`COMMA`,13:`field[target]`,14:`field[value]`,18:`DQUOTE`,19:`ESCAPED_TEXT`,20:`NON_ESCAPED_TEXT`},productions_:[0,[3,4],[6,2],[9,2],[9,0],[7,1],[7,0],[8,5],[15,1],[15,1],[16,3],[17,1]],performAction:p(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 7:let e=r.findOrCreateNode(a[s-4].trim().replaceAll(`""`,`"`)),t=r.findOrCreateNode(a[s-2].trim().replaceAll(`""`,`"`)),n=parseFloat(a[s].trim());r.addLink(e,t,n);break;case 8:case 9:case 11:this.$=a[s];break;case 10:this.$=a[s-1]}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3]},{6:4,8:5,15:6,16:7,17:8,18:t,20:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(r,[2,8]),e(r,[2,9]),{19:[1,16]},e(r,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:t,20:n},{15:18,16:7,17:8,18:t,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(r,[2,10]),{15:21,16:7,17:8,18:t,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:p(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:p(function(e){var t=this,n=[0],r=[],i=[null],a=[],o=this.table,s=``,l=0,u=0,d=0,f=2,m=1,h=a.slice.call(arguments,1),g=Object.create(this.lexer),_={yy:{}};for(var v in this.yy)Object.prototype.hasOwnProperty.call(this.yy,v)&&(_.yy[v]=this.yy[v]);g.setInput(e,_.yy),_.yy.lexer=g,_.yy.parser=this,g.yylloc===void 0&&(g.yylloc={});var y=g.yylloc;a.push(y);var b=g.options&&g.options.ranges;this.parseError=typeof _.yy.parseError==`function`?_.yy.parseError:Object.getPrototypeOf(this).parseError;function x(e){n.length-=2*e,i.length-=e,a.length-=e}p(x,`popStack`);function S(){var e=r.pop()||g.lex()||m;return typeof e!=`number`&&(e instanceof Array&&(r=e,e=r.pop()),e=t.symbols_[e]||e),e}p(S,`lex`);for(var C,w,T,E,D,O={},k,A,j,M;;){if(T=n[n.length-1],this.defaultActions[T]?E=this.defaultActions[T]:(C??=S(),E=o[T]&&o[T][C]),E===void 0||!E.length||!E[0]){var N=``;for(k in M=[],o[T])this.terminals_[k]&&k>f&&M.push(`'`+this.terminals_[k]+`'`);N=g.showPosition?`Parse error on line `+(l+1)+`:2936-`+g.showPosition()+`2937-Expecting `+M.join(`, `)+`, got '`+(this.terminals_[C]||C)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(C==m?`end of input`:`'`+(this.terminals_[C]||C)+`'`),this.parseError(N,{text:g.match,token:this.terminals_[C]||C,line:g.yylineno,loc:y,expected:M})}if(E[0]instanceof Array&&E.length>1)throw Error(`Parse Error: multiple actions possible at state: `+T+`, token: `+C);switch(E[0]){case 1:n.push(C),i.push(g.yytext),a.push(g.yylloc),n.push(E[1]),C=null,w?(C=w,w=null):(u=g.yyleng,s=g.yytext,l=g.yylineno,y=g.yylloc,d>0&&d--);break;case 2:if(A=this.productions_[E[1]][1],O.$=i[i.length-A],O._$={first_line:a[a.length-(A||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(A||1)].first_column,last_column:a[a.length-1].last_column},b&&(O._$.range=[a[a.length-(A||1)].range[0],a[a.length-1].range[1]]),D=this.performAction.apply(O,[s,u,l,_.yy,E[1],i,a].concat(h)),D!==void 0)return D;A&&(n=n.slice(0,-1*A*2),i=i.slice(0,-1*A),a=a.slice(0,-1*A)),n.push(this.productions_[E[1]][0]),i.push(O.$),a.push(O._$),j=o[n[n.length-2]][n[n.length-1]],n.push(j);break;case 3:return!0}}return!0},`parse`)};i.lexer=(function(){return{EOF:1,parseError:p(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:p(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:p(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:p(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:p(function(){return this._more=!0,this},`more`),reject:p(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).2938-`+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:p(function(e){this.unput(this.match.slice(e))},`less`),pastInput:p(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:p(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:p(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`2939-`+t+`^`},`showPosition`),test_match:p(function(e,t){var n,r,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),r=e[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},`test_match`),next:p(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var e,t,n,r;this._more||(this.yytext=``,this.match=``);for(var i=this._currentRules(),a=0;a<i.length;a++)if(n=this._input.match(this.rules[i[a]]),n&&(!t||n[0].length>t[0].length)){if(t=n,r=a,this.options.backtrack_lexer){if(e=this.test_match(n,i[a]),e!==!1)return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?(e=this.test_match(t,i[r]),e!==!1&&e):this._input===``?this.EOF:this.parseError(`Lexical error on line `+(this.yylineno+1)+`. Unrecognized text.2940-`+this.showPosition(),{text:``,token:null,line:this.yylineno})},`next`),lex:p(function(){return this.next()||this.lex()},`lex`),begin:p(function(e){this.conditionStack.push(e)},`begin`),popState:p(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},`popState`),_currentRules:p(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:p(function(e){return e=this.conditionStack.length-1-Math.abs(e||0),e>=0?this.conditionStack[e]:`INITIAL`},`topState`),pushState:p(function(e){this.begin(e)},`pushState`),stateStackSize:p(function(){return this.conditionStack.length},`stateStackSize`),options:{"case-insensitive":!0},performAction:p(function(e,t,n,r){switch(n){case 0:return this.pushState(`csv`),4;case 1:return this.pushState(`csv`),4;case 2:return 10;case 3:return 5;case 4:return 12;case 5:return this.pushState(`escaped_text`),18;case 6:return 20;case 7:return this.popState(`escaped_text`),18;case 8:return 19}},`anonymous`),rules:[/^(?:sankey-beta\b)/i,/^(?:sankey\b)/i,/^(?:$)/i,/^(?:((\u000D\u000A)|(\u000A)))/i,/^(?:(\u002C))/i,/^(?:(\u0022))/i,/^(?:([\u0020-\u0021\u0023-\u002B\u002D-\u007E])*)/i,/^(?:(\u0022)(?!(\u0022)))/i,/^(?:(([\u0020-\u0021\u0023-\u002B\u002D-\u007E])|(\u002C)|(\u000D)|(\u000A)|(\u0022)(\u0022))*)/i],conditions:{csv:{rules:[2,3,4,5,6,7,8],inclusive:!1},escaped_text:{rules:[7,8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8],inclusive:!0}}}})();function a(){this.yy={}}return p(a,`Parser`),a.prototype=i,i.Parser=a,new a})(),p3.parser=p3,m3=p3,h3=[],g3=[],_3=new Map,upt=p(()=>{h3=[],g3=[],_3=new Map,Is()},`clear`),dpt=class{constructor(e,t,n=0){this.source=e,this.target=t,this.value=n}static{p(this,`SankeyLink`)}},fpt=p((e,t,n)=>{h3.push(new dpt(e,t,n))},`addLink`),ppt=class{constructor(e){this.ID=e}static{p(this,`SankeyNode`)}},mpt={nodesMap:_3,getConfig:p(()=>Z().sankey,`getConfig`),getNodes:p(()=>g3,`getNodes`),getLinks:p(()=>h3,`getLinks`),getGraph:p(()=>({nodes:g3.map(e=>({id:e.ID})),links:h3.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),`getGraph`),addLink:fpt,findOrCreateNode:p(e=>{e=Ds.sanitizeText(e,Z());let t=_3.get(e);return t===void 0&&(t=new ppt(e),_3.set(e,t),g3.push(t)),t},`findOrCreateNode`),getAccTitle:Rs,setAccTitle:Ls,getAccDescription:Bs,setAccDescription:zs,getDiagramTitle:Hs,setDiagramTitle:Vs,clear:upt},v3=class e{static{p(this,`Uid`)}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(e){this.id=e,this.href=`#${e}`}toString(){return`url(`+this.href+`)`}},hpt={left:Tft,right:Eft,center:Oft,justify:Dft},gpt=p(e=>{let t=0,n=0;for(let r of e){let e=r.value??0;e>t&&(t=e,n=r.layer??0)}return n},`findCentralNodeLayer`),_pt={draw:p(function(e,t,n,r){let{securityLevel:i,sankey:a}=Z(),o=Gs.sankey,s;i===`sandbox`&&(s=Ac(`#i`+t));let l=Ac(i===`sandbox`?s.nodes()[0].contentDocument.body:`body`),u=i===`sandbox`?l.select(`[id="${t}"]`):Ac(`[id="${t}"]`),d=a?.width??o.width,f=a?.height??o.width,m=a?.useMaxWidth??o.useMaxWidth,h=a?.nodeAlignment??o.nodeAlignment,g=a?.prefix??o.prefix,_=a?.suffix??o.suffix,v=a?.showValues??o.showValues,y=a?.nodeWidth??o.nodeWidth??10,b=a?.nodePadding??o.nodePadding??12,x=a?.labelStyle??o.labelStyle??`legacy`,S=a?.nodeColors??{},C=r.db.getGraph(),w=hpt[h];Rft().nodeId(e=>e.id).nodeWidth(y).nodePadding(b+(v?15:0)).nodeAlign(w).extent([[0,0],[d,f]])(C);let T=gpt(C.nodes),E=Du(_pe),D=p(e=>S[e]??E(e),`getNodeColor`);u.append(`g`).attr(`class`,`nodes`).selectAll(`.node`).data(C.nodes).join(`g`).attr(`class`,`node`).attr(`id`,e=>(e.uid=v3.next(`node-`)).id).attr(`transform`,function(e){return`translate(`+e.x0+`,`+e.y0+`)`}).attr(`x`,e=>e.x0).attr(`y`,e=>e.y0).append(`rect`).attr(`height`,e=>e.y1-e.y0).attr(`width`,e=>e.x1-e.x0).attr(`fill`,e=>D(e.id));let O=p(({id:e,value:t})=>v?`${e}2941-${g}${Math.round(t*100)/100}${_}`:e,`getText`),k=p(e=>x===`outlined`?(e.layer??0)<T?{x:e.x0-6,anchor:`end`}:{x:e.x1+6,anchor:`start`}:e.x0<d/2?{x:e.x1+6,anchor:`start`}:{x:e.x0-6,anchor:`end`},`getLabelPosition`),A=u.append(`g`).attr(`class`,`node-labels`).attr(`font-size`,14),j=p(e=>A.selectAll(e?`.${e}`:`text`).data(C.nodes).join(`text`).attr(`class`,e??null).attr(`x`,e=>k(e).x).attr(`y`,e=>(e.y1+e.y0)/2).attr(`dy`,`${v?`0`:`0.35`}em`).attr(`text-anchor`,e=>k(e).anchor).text(O),`appendLabel`);x===`outlined`?(j(`sankey-label-bg`),j(`sankey-label-fg`)):j();let M=u.append(`g`).attr(`class`,`links`).attr(`fill`,`none`).attr(`stroke-opacity`,.5).selectAll(`.link`).data(C.links).join(`g`).attr(`class`,`link`).style(`mix-blend-mode`,`multiply`),N=a?.linkColor??`gradient`;if(N===`gradient`){let e=M.append(`linearGradient`).attr(`id`,e=>(e.uid=v3.next(`linearGradient-`)).id).attr(`gradientUnits`,`userSpaceOnUse`).attr(`x1`,e=>e.source.x1).attr(`x2`,e=>e.target.x0);e.append(`stop`).attr(`offset`,`0%`).attr(`stop-color`,e=>D(e.source.id)),e.append(`stop`).attr(`offset`,`100%`).attr(`stop-color`,e=>D(e.target.id))}let P;switch(N){case`gradient`:P=p(e=>e.uid,`coloring`);break;case`source`:P=p(e=>D(e.source.id),`coloring`);break;case`target`:P=p(e=>D(e.target.id),`coloring`);break;default:P=N}M.append(`path`).attr(`d`,opt()).attr(`stroke`,P).attr(`stroke-width`,e=>Math.max(1,e.width)),ks(void 0,u,0,m)},`draw`)},vpt=p(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,``).replaceAll(/([\n\r])+/g,`2942-`).trim(),`prepareTextForParsing`),ypt=p(e=>`.label {2943- font-family: ${e.fontFamily};2944- }2945-2946- .node-labels {2947- font-family: ${e.fontFamily};2948- }2949-2950- /* Outlined label style - background stroke for better readability */2951- .sankey-label-bg {2952- stroke: ${e.mainBkg||e.background||`#fff`};2953- stroke-width: 4px;2954- stroke-linejoin: round;2955- paint-order: stroke;2956- }2957-2958- /* Foreground label text */2959- .sankey-label-fg {2960- fill: ${e.textColor};2961- }2962-2963- /* Node styling */2964- .node rect {2965- shape-rendering: crispEdges;2966- }2967-2968- /* Link styling */2969- .link {2970- fill: none;2971- stroke-opacity: 0.5;2972- mix-blend-mode: multiply;2973- }2974-`,`getStyles`),bpt=m3.parse.bind(m3),m3.parse=e=>bpt(vpt(e)),xpt={styles:ypt,parser:m3,db:mpt,renderer:_pt}})),Cpt=l({diagram:()=>Mpt}),wpt,y3,Tpt,Ept,Dpt,b3,Opt,kpt,Apt,jpt,Mpt,Npt=o((()=>{EF(),_f(),Kp(),Zs(),S(),h(),l$(),wpt=Ho.packet,y3=class{constructor(){this.packet=[],this.setAccTitle=Ls,this.getAccTitle=Rs,this.setDiagramTitle=Vs,this.getDiagramTitle=Hs,this.getAccDescription=Bs,this.setAccDescription=zs}static{p(this,`PacketDB`)}getConfig(){let e=jp({...wpt,...es().packet});return e.showBits&&(e.paddingY+=10),e}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){Is(),this.packet=[]}},Tpt=1e4,Ept=p((e,t)=>{TF(e,t);let n=-1,r=[],i=1,{bitsPerRow:a}=t.getConfig();for(let{start:o,end:s,bits:l,label:u}of e.blocks){if(o!==void 0&&s!==void 0&&s<o)throw Error(`Packet block ${o} - ${s} is invalid. End must be greater than start.`);if(o??=n+1,o!==n+1)throw Error(`Packet block ${o} - ${s??o} is not contiguous. It should start from ${n+1}.`);if(l===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);for(s??=o+(l??1)-1,l??=s-o+1,n=s,y.debug(`Packet block ${o} - ${n} with label ${u}`);r.length<=a+1&&t.getPacket().length<Tpt;){let[e,n]=Dpt({start:o,end:s,bits:l,label:u},i,a);if(r.push(e),e.end+1===i*a&&(t.pushWord(r),r=[],i++),!n)break;({start:o,end:s,bits:l,label:u}=n)}}t.pushWord(r)},`populate`),Dpt=p((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),b3={parser:{yy:void 0},parse:p(async e=>{let t=await o$(`packet`,e),n=b3.parser?.yy;if(!(n instanceof y3))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);y.debug(t),Ept(t,n)},`parse`)},Opt=p((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),p=o+s,m=p*(d.length+1)-(f?0:o),h=l*u+2,g=gf(t);g.attr(`viewBox`,`0 0 ${h} ${m}`),Os(g,m,h,a.useMaxWidth);for(let[e,t]of d.entries())kpt(g,t,e,a);g.append(`text`).text(f).attr(`x`,h/2).attr(`y`,m-p/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),kpt=p((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:l})=>{let u=e.append(`g`),d=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(u.append(`rect`).attr(`x`,t).attr(`y`,d).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),u.append(`text`).attr(`x`,t+n/2).attr(`y`,d+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!l)continue;let a=e.end===e.start,f=d-2;u.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,f).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||u.append(`text`).attr(`x`,t+n).attr(`y`,f).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),Apt={draw:Opt},jpt={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},Mpt={parser:b3,get db(){return new y3},renderer:Apt,styles:p(({packet:e}={})=>{let t=jp(jpt,e);return`2975- .packetByte {2976- font-size: ${t.byteFontSize};2977- }2978- .packetByte.start {2979- fill: ${t.startByteColor};2980- }2981- .packetByte.end {2982- fill: ${t.endByteColor};2983- }2984- .packetLabel {2985- fill: ${t.labelColor};2986- font-size: ${t.labelFontSize};2987- }2988- .packetTitle {2989- fill: ${t.titleColor};2990- font-size: ${t.titleFontSize};2991- }2992- .packetBlock {2993- stroke: ${t.blockStrokeColor};2994- stroke-width: ${t.blockStrokeWidth};2995- fill: ${t.blockFillColor};2996- }2997- `},`styles`)}})),Ppt=l({diagram:()=>tmt});function Fpt(e,t,n,r,i,a,o){let s=t.length,l=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let u=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=Ipt(e,r,i,l);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,Lpt(u,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,u.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}function Ipt(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}function Lpt(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],l=e[(i+2)%n],u={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},d={x:s.x-(l.x-o.x)*t,y:s.y-(l.y-o.y)*t};r+=` C${u.x},${u.y} ${d.x},${d.y} ${s.x},${s.y}`}return`${r} Z`}function Rpt(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}var x3,S3,C3,w3,zpt,Bpt,T3,Vpt,Hpt,Upt,Wpt,Gpt,E3,Kpt,qpt,Jpt,Ypt,Xpt,Zpt,Qpt,$pt,emt,tmt,nmt=o((()=>{EF(),_f(),Kp(),Zs(),S(),h(),l$(),x3={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},S3=32,C3={axes:[],curves:[],options:x3},w3=structuredClone(C3),zpt=Ho.radar,Bpt=p(()=>jp({...zpt,...es().radar}),`getConfig`),T3=p(()=>w3.axes,`getAxes`),Vpt=p(()=>w3.curves,`getCurves`),Hpt=p(()=>w3.options,`getOptions`),Upt=p(e=>{w3.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),Wpt=p(e=>{w3.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:Gpt(e.entries)}))},`setCurves`),Gpt=p(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=T3();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),E3={getAxes:T3,getCurves:Vpt,getOptions:Hpt,setAxes:Upt,setCurves:Wpt,setOptions:p(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});w3.options={showLegend:t.showLegend?.value??x3.showLegend,ticks:t.ticks?.value??x3.ticks,max:t.max?.value??x3.max,min:t.min?.value??x3.min,graticule:t.graticule?.value??x3.graticule},w3.options.ticks>S3&&(y.warn(`Radar diagram ticks (${w3.options.ticks}) exceeds maximum allowed (${S3}). Using ${S3} instead.`),w3.options.ticks=S3)},`setOptions`),getConfig:Bpt,clear:p(()=>{Is(),w3=structuredClone(C3)},`clear`),setAccTitle:Ls,getAccTitle:Rs,setDiagramTitle:Vs,getDiagramTitle:Hs,getAccDescription:Bs,setAccDescription:zs},Kpt=p(e=>{TF(e,E3);let{axes:t,curves:n,options:r}=e;E3.setAxes(t),E3.setCurves(n),E3.setOptions(r)},`populate`),qpt={parse:p(async e=>{let t=await o$(`radar`,e);y.debug(t),Kpt(t)},`parse`)},Jpt=p((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),l=i.getConfig(),u=i.getDiagramTitle(),d=Ypt(gf(t),l),f=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),p=s.min,m=Math.min(l.width,l.height)/2;Xpt(d,a,m,s.ticks,s.graticule),Zpt(d,a,m,l),Fpt(d,a,o,p,f,s.graticule,l),Rpt(d,o,s.showLegend,l),d.append(`text`).attr(`class`,`radarTitle`).text(u).attr(`x`,0).attr(`y`,-l.height/2-l.marginTop)},`draw`),Ypt=p((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return Os(e,r,n,t.useMaxWidth??!0),e.attr(`viewBox`,`0 0 ${n} ${r}`).attr(`overflow`,`visible`),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),Xpt=p((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),Zpt=p((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2,l=Math.cos(s),u=Math.sin(s);e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*l).attr(`y2`,n*r.axisScaleFactor*u).attr(`class`,`radarAxisLine`);let d=l>.01?`start`:l<-.01?`end`:`middle`,f=u>.01?`hanging`:u<-.01?`auto`:`central`;e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*l+4*l).attr(`y`,n*r.axisLabelFactor*u+4*u).attr(`text-anchor`,d).attr(`dominant-baseline`,f).attr(`class`,`radarAxisLabel`)}},`drawAxes`),p(Fpt,`drawCurves`),p(Ipt,`relativeRadius`),p(Lpt,`closedRoundCurve`),p(Rpt,`drawLegend`),Qpt={draw:Jpt},$pt=p((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`2998- .radarCurve-${r} {2999- color: ${i};3000- fill: ${i};
diff truncated
D server/src/main/resources/web/diagramzip/renderer-frame.html +0 -14

Not shown: this page already shows 6000 lines of diff.